posthog-js 1.386.3 → 1.386.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/rrweb.js CHANGED
@@ -1,2 +1,2 @@
1
- function t(t,e,r,i,n,s,o){try{var a=t[s](o),h=a.value}catch(t){return void r(t)}a.done?e(h):Promise.resolve(h).then(i,n)}function e(e){return function(){var r=this,i=arguments;return new Promise((function(n,s){var o=e.apply(r,i);function a(e){t(o,n,s,a,h,"next",e)}function h(e){t(o,n,s,a,h,"throw",e)}a(void 0)}))}}function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},r.apply(null,arguments)}function i(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;r[i]=t[i]}return r}var n,s=["inputs"],o=["inputId"],a=["inputs"],h=["inputId"],u=["type"],l=Object.defineProperty,c=(t,e,r)=>((t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),f=Object.defineProperty,d=(t,e,r)=>((t,e,r)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),v=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(v||{}),p={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},m={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},y={};function g(t){if(y[t])return y[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in p?p[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in m?m[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return y[t]=e.prototype,e.prototype;var a=document.createElement("iframe");try{document.body.appendChild(a);var h=a.contentWindow;if(!h)return e.prototype;var u=h[t].prototype;return u?y[t]=u:r}catch(t){return r}finally{a.parentNode&&document.body.removeChild(a)}}var w={};function b(t,e,r){var i,n=t+"."+String(r);if(w[n])return w[n].call(e);var s=g(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(w[n]=o,o.call(e)):e[r]}var S={};function k(t,e,r){var i=t+"."+String(r);if(S[i])return S[i].bind(e);var n=g(t)[r];return"function"!=typeof n?e[r]:(S[i]=n,n.bind(e))}var C={childNodes:t=>b("Node",t,"childNodes"),parentNode:t=>b("Node",t,"parentNode"),parentElement:t=>b("Node",t,"parentElement"),textContent:t=>b("Node",t,"textContent"),contains:(t,e)=>k("Node",t,"contains")(e),getRootNode:t=>k("Node",t,"getRootNode")(),host:t=>t&&"host"in t?b("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?b("Element",t,"shadowRoot"):null,querySelector:(t,e)=>k("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>k("Element",t,"querySelectorAll")(e),mutationObserver:()=>g("MutationObserver").constructor,patch(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}};function M(t){return t.nodeType===t.ELEMENT_NODE}function I(t){var e=t&&"host"in t&&"mode"in t&&C.host(t)||null;return Boolean(e&&"shadowRoot"in e&&C.shadowRoot(e)===t)}function x(t){return"[object ShadowRoot]"==={}.toString.call(t)}function R(t){try{var e=t.rules||t.cssRules;if(!e)return null;var r=t.href;return!r&&t.ownerNode&&(r=t.ownerNode.baseURI),(i=Array.from(e,(t=>E(t,r))).join("")).includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}catch(t){return null}var i}function E(t,e){var r;if(function(t){return"styleSheet"in t}(t)){var i;try{i=R(t.styleSheet)||function(t){var{cssText:e}=t;if(3>e.split('"').length)return e;var r=["@import","url("+JSON.stringify(t.href)+")"];return""===t.layerName?r.push("layer"):t.layerName&&r.push("layer("+t.layerName+")"),t.supportsText&&r.push("supports("+t.supportsText+")"),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}(t)}catch(e){i=t.cssText}try{if(i&&(null==(r=t.styleSheet)?void 0:r.href))return U(i,t.styleSheet.href)}catch(t){}return i}var n=t.cssText;return function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")&&(n=n.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),e?U(n,e):n}class T{constructor(){d(this,"idNodeMap",new Map),d(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t))),M(t)){var r=C.shadowRoot(t);r&&this.removeNodeFromMap(r),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function A(){return new T}function O(t){var{element:e,maskInputOptions:r,tagName:i,type:n,value:s,maskInputFn:o}=t,a=s||"",h=n&&D(n);return(r[i.toLowerCase()]||h&&r[h])&&(a=o?o(a,e):"*".repeat(a.length)),a}function D(t){return t.toLowerCase()}var N="__rrweb_original__";function L(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?D(e):null}function B(t,e){var r,i;try{i=new URL(t,null!=e?e:window.location.href)}catch(t){return null}var n=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==n?void 0:n[1])&&void 0!==r?r:null}var _=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,F=/^(?:[a-z+]+:)?\/\//i,P=/^www\..*/i,j=/^(data:)([^,]*),(.*)/i;function U(t,e){return(t||"").replace(_,((t,r,i,n,s,o)=>{var a,h=i||s||o,u=r||n||"";if(!h)return t;if(F.test(h)||P.test(h))return"url("+u+h+u+")";if(j.test(h))return"url("+u+h+u+")";if("/"===h[0])return"url("+u+(((a=e).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+h)+u+")";var l=e.split("/"),c=h.split("/");for(var f of(l.pop(),c))"."!==f&&(".."===f?l.pop():l.push(f));return"url("+u+l.join("/")+u+")"}))}var W,G,H="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",z=4096,V=1,Y=new RegExp("[^a-z0-9-_:]"),q=-2;function Z(){return V++}var J=/^[^ \t\n\r\u000c]+/,X=/^[, \t\n\r\u000c]+/,Q=new WeakMap;function K(t,e){return e&&""!==e.trim()?tt(t,e):e}function tt(t,e){var r=Q.get(t);if(r||(r=t.createElement("a"),Q.set(t,r)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return r.setAttribute("href",e),r.href}function et(t,e,r,i,n,s){var o,a,h;if(!i)return i;if("src"===r||"href"===r&&("use"!==e||"#"!==i[0])){if("link"===e&&n){var u=null==(o=n.sheet)?void 0:o.href;if(u)return u}var l=K(t,i);if("img"===e&&l.startsWith("data:")&&n){var c=l;return((null==s?void 0:s.type)||void 0!==(null==s?void 0:s.quality))&&(c=function(t,e,r,i){if(!t.complete||0===t.naturalWidth)return e;if(t.naturalWidth>z||t.naturalHeight>z)return e;try{var n=document.createElement("canvas");n.width=t.naturalWidth,n.height=t.naturalHeight;var s=n.getContext("2d");return s?(s.drawImage(t,0,0),n.toDataURL(r||"image/webp",null!=i?i:.4)):e}catch(t){return e}}(n,l,s.type,s.quality)),(null==s?void 0:s.maxBase64ImageLength)&&(a=c,c=(h=s.maxBase64ImageLength)&&a.length>h?H:a),c}return l}return"xlink:href"===r&&"#"!==i[0]?K(t,i):"background"!==r||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===r?function(t,e){if(""===e.trim())return e;var r=0;function i(t){var i,n=t.exec(e.substring(r));return n?(r+=(i=n[0]).length,i):""}for(var n=[];i(X),e.length>r;){var s=i(J);if(","===s.slice(-1))s=K(t,s.substring(0,s.length-1)),n.push(s);else{var o="";s=K(t,s);for(var a=!1;;){var h=e.charAt(r);if(""===h){n.push((s+o).trim());break}if(a)")"===h&&(a=!1);else{if(","===h){r+=1,n.push((s+o).trim());break}"("===h&&(a=!0)}o+=h,r+=1}}}return n.join(", ")}(t,i):"style"===r?U(i,tt(t)):"object"===e&&"data"===r?K(t,i):i:K(t,i)}function rt(t,e,r){return("video"===t||"audio"===t)&&"autoplay"===e}function it(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!r&&it(C.parentNode(t),e,r);for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;return!!r&&it(C.parentNode(t),e,r)}function nt(t,e,r,i){var n;if(M(t)){if(!C.childNodes(n=t).length)return!1}else{if(null===C.parentElement(t))return!1;n=C.parentElement(t)}try{if("string"==typeof e){if(i){if(n.closest("."+e))return!0}else if(n.classList.contains(e))return!0}else if(it(n,e,i))return!0;if(r)if(i){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(t){}return!1}var st=new Map;function ot(t,e){return Array.from(t.styleSheets).find((t=>t.href===e))}function at(t){return null==t?"":t.toLowerCase()}var ht=50,ut=!1,lt=!1;function ct(){return lt}function ft(){lt=!1,ut=!1}function dt(t,e){var{doc:r,mirror:i,blockClass:n,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:h=!1,inlineStylesheet:u=!0,maskInputOptions:l={},maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:y=!1,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:b=5e3,onIframeListenerRegistered:S,onStylesheetLoad:k,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:T=(()=>!1),newlyAddedElement:A=!1,depth:_=0,maxDepth:F=ht}=e,{needsMask:P}=e,{preserveWhiteSpace:j=!0}=e;if(_>=F)return lt=!0,ut||(ut=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+F+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;P||(P=nt(t,o,a,void 0===P));var H,z=function(t,e){var{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:o,inlineStylesheet:a,maskInputOptions:h={},maskTextFn:u,maskInputFn:l,dataURLOptions:c={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m=!1}=e,y=function(t,e){if(e.hasNode(t)){var r=e.getId(t);return 1===r?void 0:r}}(r,i);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:v.Document,childNodes:[],compatMode:t.compatMode}:{type:v.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:v.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:y};case t.ELEMENT_NODE:return function(t,e){for(var r,i,n,s,{doc:o,blockClass:a,blockSelector:h,inlineStylesheet:u,maskInputOptions:l={},maskInputFn:c,dataURLOptions:f={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:y=!1,rootId:g}=e,w=function(t,e,r){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;if(r)return t.matches(r)}catch(t){}return!1}(t,a,h),b=function(t){if(t instanceof HTMLFormElement)return"form";var e=D(t.tagName);return Y.test(e)?"div":e}(t),S={},k=t.attributes.length,M=0;k>M;M++){var I=t.attributes[M];rt(b,I.name)||(S[I.name]=et(o,b,D(I.name),I.value,t,f))}if("link"===b&&u){var x=t.sheet;if(!x){var E=function(t){return t.href}(t);E&&!(x=ot(o,E))&&E.includes(".css")&&(x=ot(o,window.location.origin+"/"+E.replace(window.location.href,"")))}var T=null;x&&(T=R(x)),T&&(delete S.rel,delete S.href,S._cssText=T)}if("style"===b&&t.sheet&&!(t.innerText||C.textContent(t)||"").trim().length){var A=R(t.sheet);A&&(S._cssText=A)}if("input"===b||"textarea"===b||"select"===b){var B=t.value,_=t.checked;"radio"!==S.type&&"checkbox"!==S.type&&"submit"!==S.type&&"button"!==S.type&&B?S.value=O({element:t,type:L(t),tagName:b,value:B,maskInputOptions:l,maskInputFn:c}):_&&(S.checked=_)}if("option"===b&&(t.selected&&!l.select?S.selected=!0:delete S.selected),"dialog"===b&&t.open)try{S.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"}catch(t){S.rr_open_mode="modal",S.ph_rr_could_not_detect_modal=!0}if("canvas"===b&&p)if("2d"===t.__context)(function(t){var e=t.getContext("2d");if(!e)return!0;for(var r=0;t.width>r;r+=50)for(var i=0;t.height>i;i+=50){var n=e.getImageData;if(new Uint32Array((N in n?n[N]:n).call(e,r,i,Math.min(50,t.width-r),Math.min(50,t.height-i)).data.buffer).some((t=>0!==t)))return!1}return!0})(t)||(S.rr_dataURL=t.toDataURL(f.type,f.quality));else if(!("__context"in t)){var F=t.toDataURL(f.type,f.quality),P=o.createElement("canvas");P.width=t.width,P.height=t.height,F!==P.toDataURL(f.type,f.quality)&&(S.rr_dataURL=F)}if("img"===b&&d){W||(W=o.createElement("canvas"),G=W.getContext("2d"));var j=t,U=j.currentSrc||j.getAttribute("src")||"<unknown-src>",H=j.crossOrigin,z=()=>{j.removeEventListener("load",z);try{W.width=j.naturalWidth,W.height=j.naturalHeight,G.drawImage(j,0,0),S.rr_dataURL=W.toDataURL(f.type,f.quality)}catch(t){if("anonymous"!==j.crossOrigin)return j.crossOrigin="anonymous",void(j.complete&&0!==j.naturalWidth?z():j.addEventListener("load",z));console.warn("Cannot inline img src="+U+"! Error: "+t)}"anonymous"===j.crossOrigin&&(H?S.crossOrigin=H:j.removeAttribute("crossorigin"))};j.complete&&0!==j.naturalWidth?z():j.addEventListener("load",z)}if("audio"===b||"video"===b){var V=S;V.rr_mediaState=t.paused?"paused":"played",V.rr_mediaCurrentTime=t.currentTime,V.rr_mediaPlaybackRate=t.playbackRate,V.rr_mediaMuted=t.muted,V.rr_mediaLoop=t.loop,V.rr_mediaVolume=t.volume}if(y||(t.scrollLeft&&(S.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(S.rr_scrollTop=t.scrollTop)),w){var{width:q,height:Z,left:J,top:X}=t.getBoundingClientRect(),Q=null==(r=o.defaultView)?void 0:r.getComputedStyle(t);S={class:S.class,rr_width:q+"px",rr_height:Z+"px",rr_left:Math.floor(J+((null==(i=o.defaultView)?void 0:i.scrollX)||0))+"px",rr_top:Math.floor(X+((null==(n=o.defaultView)?void 0:n.scrollY)||0))+"px"},Q&&(S.rr_position=Q.position||"static",Q.transform&&"none"!==Q.transform&&(S.rr_transform=Q.transform),Q.display&&Q.display.startsWith("inline")&&(S.rr_display=Q.display))}"iframe"!==b||m(S.src)||(t.contentDocument||(S.rr_src=S.src),delete S.src);try{customElements.get(b)&&(s=!0)}catch(t){}return{type:v.Element,tagName:b,attributes:S,childNodes:[],isSVG:(K=t,Boolean("svg"===K.tagName||K.ownerSVGElement)||void 0),needBlock:w,rootId:g,isCustom:s};var K}(t,{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:a,maskInputOptions:h,maskInputFn:l,dataURLOptions:c,inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m,rootId:y});case t.TEXT_NODE:return function(t,e){var r,{needsMask:i,maskTextFn:n,rootId:s}=e,o=C.parentNode(t),a=o&&o.tagName,h=C.textContent(t),u="STYLE"===a||void 0,l="SCRIPT"===a||void 0;if(u&&h){try{if(t.nextSibling||t.previousSibling);else if(null==(r=o.sheet)?void 0:r.cssRules){var c=R(o.sheet);c&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(c)&&(h=c)}}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: "+e,t)}h=U(h,tt(e.doc))}return l&&(h="SCRIPT_PLACEHOLDER"),!u&&!l&&h&&i&&(h=n?n(h,C.parentElement(t)):h.replace(/[\S]/g,"*")),{type:v.Text,textContent:h||"",isStyle:u,rootId:s}}(t,{doc:r,needsMask:o,maskTextFn:u,rootId:y});case t.CDATA_SECTION_NODE:return{type:v.CDATA,textContent:"",rootId:y};case t.COMMENT_NODE:return{type:v.Comment,textContent:C.textContent(t)||"",rootId:y};default:return!1}}(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:P,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,dataURLOptions:p,inlineImages:m,recordCanvas:y,keepIframeSrcFn:T,newlyAddedElement:A});if(!z)return console.warn(t,"not serialized"),null;H=i.hasNode(t)?i.getId(t):!function(t,e){if(e.comment&&t.type===v.Comment)return!0;if(t.type===v.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===B(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(at(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===at(t.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes(at(t.attributes.rel)))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&at(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(at(t.attributes.property).match(/^(og|twitter|fb):/)||at(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===at(t.attributes.name)))return!0;if(e.headMetaRobots&&["robots","googlebot","bingbot"].includes(at(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(at(t.attributes.name))||at(t.attributes.property).match(/^article:/)||at(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(at(t.attributes.name)))return!0}}return!1}(z,d)&&(j||z.type!==v.Text||z.isStyle||z.textContent.replace(/^\s+|\s+$/gm,"").length)?Z():q;var V=Object.assign(z,{id:H});if(i.add(t,V),H===q)return null;g&&g(t);var J=!h;if(V.type===v.Element){J=J&&!V.needBlock,delete V.needBlock;var X=C.shadowRoot(t);X&&x(X)&&(V.isShadowHost=!0)}if((V.type===v.Document||V.type===v.Element)&&J){d.headWhitespace&&V.type===v.Element&&"head"===V.tagName&&(j=!1);var Q={doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:P,maskTextClass:o,maskTextSelector:a,skipChild:h,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:y,preserveWhiteSpace:j,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:b,onIframeListenerRegistered:S,onStylesheetLoad:k,stylesheetLoadTimeout:E,keepIframeSrcFn:T,depth:_+1,maxDepth:F};if(V.type===v.Element&&"textarea"===V.tagName&&void 0!==V.attributes.value);else for(var K of Array.from(C.childNodes(t))){var it=dt(K,Q);it&&V.childNodes.push(it)}var ct=null;if(M(t)&&(ct=C.shadowRoot(t)))for(var ft of Array.from(C.childNodes(ct))){var vt=dt(ft,Q);vt&&(x(ct)&&(vt.isShadow=!0),V.childNodes.push(vt))}}var pt=C.parentNode(t);if(pt&&I(pt)&&x(pt)&&(V.isShadow=!0),V.type===v.Element&&"iframe"===V.tagName){var mt=function(t,e,r){var i,n=()=>{},s=t.contentWindow;if(!s)return n;try{i=s.document.readyState}catch(t){return n}var o=()=>e();if("complete"!==i){var a=!1,h=null,u=()=>{a||(a=!0,null!==h&&(clearTimeout(h),h=null),t.removeEventListener("load",l),t.addEventListener("load",o),e())},l=()=>u();return h=setTimeout(u,r),t.addEventListener("load",l),()=>{null!==h&&(clearTimeout(h),h=null),a?t.removeEventListener("load",o):(a=!0,t.removeEventListener("load",l))}}var c,f="about:blank";try{c=s.location.href}catch(t){return n}if(c!==f||t.src===f||""===t.src){var d=setTimeout(e,0);return t.addEventListener("load",o),()=>{clearTimeout(d),t.removeEventListener("load",o)}}return t.addEventListener("load",o),()=>{t.removeEventListener("load",o)}}(t,(()=>{var e=t.contentDocument;if(e&&w){var r=dt(e,{doc:e,mirror:i,blockClass:n,blockSelector:s,needsMask:P,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:y,preserveWhiteSpace:j,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:b,onIframeListenerRegistered:S,onStylesheetLoad:k,stylesheetLoadTimeout:E,keepIframeSrcFn:T,depth:_+1,maxDepth:F});r&&w(t,r)}}),b);null==S||S(t,mt)}return V.type===v.Element&&"link"===V.tagName&&"stylesheet"===V.attributes.rel&&function(e,h,v){if(!st.has(e)){var S;try{S=e.sheet}catch(t){return}if(!S){var C=new AbortController,M=!1,I=()=>{if(!M){M=!0;try{(()=>{if(k){var e=dt(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:P,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:y,preserveWhiteSpace:j,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:E,keepIframeSrcFn:T,depth:_,maxDepth:F});e&&k(t,e)}})()}finally{st.delete(e),C.abort()}}},x=setTimeout(I,v);C.signal.addEventListener("abort",(()=>clearTimeout(x)),{once:!0}),e.addEventListener("load",I,{signal:C.signal,once:!0}),st.set(e,C)}}}(t,0,E),V}function vt(t){return!0===t||"all"===t?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===t,headMetaDescKeywords:"all"===t,headTitleMutations:"all"===t}:!1===t?{}:t}var pt=new RegExp(/(max|min)-device-(width|height)/.source,"g"),mt={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule(t){t.params.match(pt)&&(t.params=t.params.replace(pt,"$1-$2"))}}}},yt={postcssPlugin:"postcss-hover-classes",prepare(){var t=[];return{Rule(e){-1===t.indexOf(e)&&(t.push(e),e.selectors.forEach((function(t){if(t.includes(":hover")){var r=t.replace(new RegExp("(?<!\\\\):hover","g"),".\\:hover");r!==t&&(e.selector+=",\n"+r)}})))}}}};function gt(t){return t&&t.__esModule&&{}.hasOwnProperty.call(t,"default")?t.default:t}function wt(t){if({}.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})})),r}var bt,St={exports:{}};function kt(){if(bt)return St.exports;bt=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return St.exports=e(),St.exports.createColors=e,St.exports}var Ct,Mt,It,xt,Rt,Et,Tt=wt(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function At(){if(Mt)return Ct;Mt=1;var t=kt(),e=Tt;class r extends Error{constructor(t,e,i,n,s,o){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(r){if(!this.source)return"";var i=this.source;null==r&&(r=t.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(r){var{bold:a,gray:h,red:u}=t.createColors(!0);s=t=>a(u(t)),n=t=>h(t),e&&(o=t=>e(t))}var l=i.split(/\r?\n/),c=Math.max(this.line-3,0),f=Math.min(this.line+2,l.length),d=String(f).length;return l.slice(c,f).map(((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)})).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}return Ct=r,r.default=r,Ct}function Ot(){if(xt)return It;xt=1;var t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class e{constructor(t){this.builder=t}atrule(t,e){var r="@"+t.name,i=t.params?this.rawValue(t,"params"):"";void 0!==t.raws.afterName?r+=t.raws.afterName:i&&(r+=" "),t.nodes?this.block(t,r+i):this.builder(r+i+((t.raws.between||"")+(e?";":"")),t)}beforeAfter(t,e){var r;r=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;n>o;o++)r+=s}return r}block(t,e){var r,i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){for(var e=t.nodes.length-1;e>0&&"comment"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,"semicolon"),i=0;t.nodes.length>i;i++){var n=t.nodes[i],s=this.raw(n,"before");s&&this.builder(s),this.stringify(n,e!==i||r)}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+r+"*/",t)}decl(t,e){var r=this.raw(t,"between","colon"),i=t.prop+r+this.rawValue(t,"value");t.important&&(i+=t.raws.important||" !important"),e&&(i+=";"),this.builder(i,t)}document(t){this.body(t)}raw(e,r,i){var n;if(i||(i=r),r&&void 0!==(n=e.raws[r]))return n;var s=e.parent;if("before"===i){if(!s||"root"===s.type&&s.first===e)return"";if(s&&"document"===s.type)return""}if(!s)return t[i];var o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[i])return o.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(e,i);var a,h="raw"+((a=i)[0].toUpperCase()+a.slice(1));return this[h]?n=this[h](o,e):o.walk((t=>{if(void 0!==(n=t.raws[r]))return!1})),void 0===n&&(n=t[i]),o.rawCache[i]=n,n}rawBeforeClose(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk((t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1})),e}rawBeforeRule(t){var e;return t.walk((r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls((t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1})),e}rawEmptyBody(t){var e;return t.walk((t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1})),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk((r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}})),e);var e}rawSemicolon(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1})),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}}return It=e,e.default=e,It}function Dt(){if(Et)return Rt;Et=1;var t=Ot();function e(e,r){new t(r).stringify(e)}return Rt=e,e.default=e,Rt}var Nt,Lt,Bt,_t,Ft,Pt,jt,Ut,Wt,Gt,Ht,zt,Vt,Yt,$t,qt,Zt,Jt,Xt,Qt,Kt,te,ee,re,ie,ne,se,oe,ae,he,ue,le,ce,fe,de,ve,pe,me,ye,ge,we,be,Se,ke,Ce,Me,Ie,xe,Re,Ee,Te,Ae,Oe,De={};function Ne(){return Nt||(Nt=1,De.isClean=Symbol("isClean"),De.my=Symbol("my")),De}function Le(){if(Bt)return Lt;Bt=1;var t=At(),e=Ot(),r=Dt(),{isClean:i,my:n}=Ne();function s(t,e){var r=new t.constructor;for(var i in t)if({}.hasOwnProperty.call(t,i)&&"proxyCache"!==i){var n=t[i],o=typeof n;"parent"===i&&"object"===o?e&&(r[i]=e):"source"===i?r[i]=n:Array.isArray(n)?r[i]=n.map((t=>s(t,r))):("object"===o&&null!==n&&(n=s(n)),r[i]=n)}return r}function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;t.length>s;s++){if(i===e.line&&r===e.column){n=s;break}"\n"===t[s]?(r=1,i+=1):r+=1}return n}class a{get proxyOf(){return this}constructor(t){for(var e in void 0===t&&(t={}),this.raws={},this[i]=!1,this[n]=!0,t)if("nodes"===e)for(var r of(this.nodes=[],t[e]))this.append("function"==typeof r.clone?r.clone():r);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+e.input.from+":"+e.start.line+":"+e.start.column+"$&")}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t){void 0===t&&(t={});var e=s(this);for(var r in t)e[r]=t[r];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(e,r){if(void 0===r&&(r={}),this.source){var{end:i,start:n}=this.rangeBy(r);return this.source.input.error(e,{column:n.column,line:n.line},{column:i.column,line:i.line},r)}return new t(e)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[i]=!0}markDirty(){if(this[i]){this[i]=!1;for(var t=this;t=t.parent;)t[i]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){var r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(o(r,this.source.start),o(r,this.source.end)).indexOf(t.word);-1!==i&&(e=this.positionInside(i))}return e}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=o(i,this.source.start),s=n+t,a=n;s>a;a++)"\n"===i[a]?(e=1,r+=1):e+=1;return{column:e,line:r,offset:s}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:o(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:o(e,t.start)}:t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:o(e,t.end)}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1));return(r.line>i.line||i.line===r.line&&r.column>=i.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,r){return(new e).raw(this,t,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var r={},i=null==e;e=e||new Map;var n=0;for(var s in this)if({}.hasOwnProperty.call(this,s)&&"parent"!==s&&"proxyCache"!==s){var o=this[s];if(Array.isArray(o))r[s]=o.map((t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t));else if("object"==typeof o&&o.toJSON)r[s]=o.toJSON(null,e);else if("source"===s){if(null==o)continue;var a=e.get(o.input);null==a&&(a=n,e.set(o.input,n),n++),r[s]={end:o.end,inputId:a,start:o.start}}else r[s]=o}return i&&(r.inputs=[...e.keys()].map((t=>t.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=r),t.stringify&&(t=t.stringify);var e="";return t(this,(t=>{e+=t})),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}}return Lt=a,a.default=a,Lt}function Be(){if(Ft)return _t;Ft=1;var t=Le();class e extends t{constructor(t){super(t),this.type="comment"}}return _t=e,e.default=e,_t}function _e(){if(jt)return Pt;jt=1;var t=Le();class e extends t{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=r({},t,{value:String(t.value)})),super(t),this.type="decl"}}return Pt=e,e.default=e,Pt}function Fe(){if(Wt)return Ut;Wt=1;var t,e,r,i,n=Be(),s=_e(),o=Le(),{isClean:a,my:h}=Ne();function u(t){return t.map((t=>(t.nodes&&(t.nodes=u(t.nodes)),delete t.source,t)))}function l(t){if(t[a]=!1,t.proxyOf.nodes)for(var e of t.proxyOf.nodes)l(e)}class c extends o{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]}append(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e){var n=this.normalize(i,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.proxyOf.nodes.length>this.indexes[i]&&!1!==(r=t(this.proxyOf.nodes[e=this.indexes[i]],e));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];return t[e](...i.map((t=>"function"==typeof t?(e,r)=>t(e.toProxy(),r):t)))}:"every"===e||"some"===e?r=>t[e]((function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;e>n;n++)i[n-1]=arguments[n];return r(t.toProxy(),...i)})):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map((t=>t.toProxy())):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)(r=this.indexes[o])>i&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i],0===i&&"prepend").reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i,0,s);for(var o in this.indexes)i>(r=this.indexes[o])||(this.indexes[o]=r+n.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=u(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var f of r=r.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if("root"===r.type&&"document"!==this.type)for(var d of r=r.nodes.slice(0))d.parent&&d.parent.removeChild(d,"ignore");else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new s(r)]}else if(r.selector||r.selectors)r=[new i(r)];else if(r.name)r=[new t(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new n(r)]}var v=r.map((t=>(t[h]||c.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[a]&&l(t),t.raws||(t.raws={}),void 0===t.raws.before&&o&&void 0!==o.raws.before&&(t.raws.before=o.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return v}prepend(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e=e.reverse()){var n=this.normalize(i,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var r in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t>(e=this.indexes[r])||(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls((i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))})),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each(((e,r)=>{var i;try{i=t(e,r)}catch(t){throw e.addToError(t)}return!1!==i&&e.walk&&(i=e.walk(t)),i}))}walkAtRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)})):this.walk(((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("atrule"===t.type)return e(t,r)})))}walkComments(t){return this.walk(((e,r)=>{if("comment"===e.type)return t(e,r)}))}walkDecls(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)})):this.walk(((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("decl"===t.type)return e(t,r)})))}walkRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)})):this.walk(((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("rule"===t.type)return e(t,r)})))}}return c.registerParse=t=>{e=t},c.registerRule=t=>{i=t},c.registerAtRule=e=>{t=e},c.registerRoot=t=>{r=t},Ut=c,c.default=c,c.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,t.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,s.prototype):"comment"===e.type?Object.setPrototypeOf(e,n.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[h]=!0,e.nodes&&e.nodes.forEach((t=>{c.rebuild(t)}))},Ut}function Pe(){if(Ht)return Gt;Ht=1;var t=Fe();class e extends t{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}}return Gt=e,e.default=e,t.registerAtRule(e),Gt}function je(){if(Vt)return zt;Vt=1;var t,e,i=Fe();class n extends i{constructor(t){super(r({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return n.registerLazyResult=e=>{t=e},n.registerProcessor=t=>{e=t},zt=n,n.default=n,zt}function Ue(){return $t?Yt:($t=1,Yt={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e)=>(void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n--;)i+=t[Math.random()*t.length|0];return i})})}function We(){if(Zt)return qt;Zt=1;var{existsSync:t,readFileSync:e}=Tt,{dirname:r,join:i}=Tt,{SourceMapConsumer:n,SourceMapGenerator:s}=Tt;class o{constructor(t,e){if(!1!==e.map){this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),i&&(this.text=i)}}consumer(){return this.consumerCache||(this.consumerCache=new n(this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(i){if(this.root=r(i),t(i))return this.mapFile=i,e(i,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof n)return s.fromSourceMap(e).toString();if(e instanceof s)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var o=e(t);if(o){var a=this.loadFile(o);if(!a)throw new Error("Unable to load previous source map: "+o.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var h=this.annotation;return t&&(h=i(r(t),h)),this.loadFile(h)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}}return qt=o,o.default=o,qt}function Ge(){if(Xt)return Jt;Xt=1;var{nanoid:t}=Ue(),{isAbsolute:e,resolve:i}=Tt,{SourceMapConsumer:n,SourceMapGenerator:s}=Tt,{fileURLToPath:o,pathToFileURL:a}=Tt,h=At(),u=We(),l=Tt,c=Symbol("lineToIndexCache"),f=Boolean(n&&s),d=Boolean(i&&e);function v(t){if(t[c])return t[c];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;s>n;n++)r[n]=i,i+=e[n].length+1;return t[c]=r,r}class p{get from(){return this.file||this.id}constructor(r,n){if(void 0===n&&(n={}),null==r||"object"==typeof r&&!r.toString)throw new Error("PostCSS received "+r+" instead of CSS string");if(this.css=r.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(this.file=!d||/^\w+:\/\//.test(n.from)||e(n.from)?n.from:i(n.from)),d&&f){var s=new u(this.css,n);if(s.text){this.map=s;var o=s.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+t(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,u,l;if(void 0===i&&(i={}),e&&"object"==typeof e){var c=e,f=r;if("number"==typeof c.offset){var d=this.fromOffset(u=c.offset);e=d.line,r=d.col}else u=this.fromLineAndColumn(e=c.line,r=c.column);if("number"==typeof f.offset){var v=this.fromOffset(o=f.offset);s=v.line,n=v.col}else s=f.line,n=f.column,o=this.fromLineAndColumn(f.line,f.column)}else if(r)u=this.fromLineAndColumn(e,r);else{var p=this.fromOffset(u=e);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(l=m?new h(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new h(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:u,source:this.css},this.file&&(a&&(l.input.url=a(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,e){return v(this)[t-1]+e-1}fromOffset(t){var e=v(this),r=0;if(e[e.length-1]>t)for(var i,n=e.length-2;n>r;)if(e[i=r+(n-r>>1)]>t)n=i-1;else{if(e[i+1]>t){r=i;break}r=i+1}else r=e.length-1;return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:i(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,r,i,n){if(!this.map)return!1;var s,h,u=this.map.consumer(),l=u.originalPositionFor({column:r,line:t});if(!l.source)return!1;"number"==typeof i&&(s=u.originalPositionFor({column:n,line:i})),h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column,endColumn:s&&s.column,endLine:s&&s.line,line:l.line,url:h.toString()};if("file:"===h.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");c.file=o(h)}var f=u.sourceContentFor(l.source);return f&&(c.source=f),c}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=r({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}}return Jt=p,p.default=p,l&&l.registerInput&&l.registerInput(p),Jt}function He(){if(Kt)return Qt;Kt=1;var t,e,r=Fe();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var n of i)n.raws.before=e.raws.before;return i}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return i.registerLazyResult=e=>{t=e},i.registerProcessor=t=>{e=t},Qt=i,i.default=i,r.registerRoot(i),Qt}function ze(){if(ee)return te;ee=1;var t={comma(e){return t.split(e,[","],!0)},space(e){return t.split(e,[" ","\n","\t"])},split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};return te=t,t.default=t,te}function Ve(){if(ie)return re;ie=1;var t=Fe(),e=ze();class r extends t{get selectors(){return e.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}}return re=r,r.default=r,t.registerRule(r),re}function Ye(){if(ae)return oe;ae=1;var{dirname:t,relative:e,resolve:r,sep:i}=Tt,{SourceMapConsumer:n,SourceMapGenerator:s}=Tt,{pathToFileURL:o}=Tt,a=Ge(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return oe=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var t;t=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";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var r=this.toUrl(this.path(e.file)),i=e.root||t(e.file),s=void 0;!1===this.mapOpts.sourcesContent?(s=new n(e.text)).sourcesContent&&(s.sourcesContent=null):s=e.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&h&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,(e=>{t+=e})),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=s.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new s({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 s({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,h)=>{if(this.css+=s,a&&"end"!==h&&(o.generated.line=r,o.generated.column=i-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=s.match(/\n/g))?(r+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.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=i-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=i-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((t=>t.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some((t=>t.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((t=>t.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(i){if(this.mapOpts.absolute)return i;if(60===i.charCodeAt(0))return i;if(/^\w+:\/\//.test(i))return i;var n=this.memoizedPaths.get(i);if(n)return n;var s=this.opts.to?t(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=t(r(s,this.mapOpts.annotation)));var o=e(s,i);return this.memoizedPaths.set(i,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}}));else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk((e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}}));else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(o){var r=o(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===i&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}}function $e(){if(ue)return he;ue=1;var t="'".charCodeAt(0),e='"'.charCodeAt(0),r="\\".charCodeAt(0),i="/".charCodeAt(0),n="\n".charCodeAt(0),s=" ".charCodeAt(0),o="\f".charCodeAt(0),a="\t".charCodeAt(0),h="\r".charCodeAt(0),u="[".charCodeAt(0),l="]".charCodeAt(0),c="(".charCodeAt(0),f=")".charCodeAt(0),d="{".charCodeAt(0),v="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),y=":".charCodeAt(0),g="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return he=function(C,M){void 0===M&&(M={});var I,x,R,E,T,A,O,D,N,L,B=C.css.valueOf(),_=M.ignoreErrors,F=B.length,P=0,j=[],U=[];function W(t){throw C.error("Unclosed "+t,P)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&P>=F,nextToken(C){if(U.length)return U.pop();if(F>P){var M=!!C&&C.ignoreUnclosed;switch(I=B.charCodeAt(P)){case n:case s:case a:case h:case o:E=P;do{I=B.charCodeAt(E+=1)}while(I===s||I===n||I===a||I===h||I===o);A=["space",B.slice(P,E)],P=E-1;break;case u:case l:case d:case v:case y:case p:case f:var G=String.fromCharCode(I);A=[G,G,P];break;case c:if(L=j.length?j.pop()[1]:"",N=B.charCodeAt(P+1),"url"===L&&N!==t&&N!==e&&N!==s&&N!==n&&N!==a&&N!==o&&N!==h){E=P;do{if(O=!1,-1===(E=B.indexOf(")",E+1))){if(_||M){E=P;break}W("bracket")}for(D=E;B.charCodeAt(D-1)===r;)D-=1,O=!O}while(O);A=["brackets",B.slice(P,E+1),P,E],P=E}else E=B.indexOf(")",P+1),x=B.slice(P,E+1),-1===E||S.test(x)?A=["(","(",P]:(A=["brackets",x,P,E],P=E);break;case t:case e:T=I===t?"'":'"',E=P;do{if(O=!1,-1===(E=B.indexOf(T,E+1))){if(_||M){E=P+1;break}W("string")}for(D=E;B.charCodeAt(D-1)===r;)D-=1,O=!O}while(O);A=["string",B.slice(P,E+1),P,E],P=E;break;case g:w.lastIndex=P+1,w.test(B),A=["at-word",B.slice(P,1+(E=0===w.lastIndex?B.length-1:w.lastIndex-2)),P,E],P=E;break;case r:for(E=P,R=!0;B.charCodeAt(E+1)===r;)E+=1,R=!R;if(I=B.charCodeAt(E+1),R&&I!==i&&I!==s&&I!==n&&I!==a&&I!==h&&I!==o&&k.test(B.charAt(E+=1))){for(;k.test(B.charAt(E+1));)E+=1;B.charCodeAt(E+1)===s&&(E+=1)}A=["word",B.slice(P,E+1),P,E],P=E;break;default:I===i&&B.charCodeAt(P+1)===m?(0===(E=B.indexOf("*/",P+2)+1)&&(_||M?E=B.length:W("comment")),A=["comment",B.slice(P,E+1),P,E],P=E):(b.lastIndex=P+1,b.test(B),A=["word",B.slice(P,1+(E=0===b.lastIndex?B.length-1:b.lastIndex-2)),P,E],j.push(A),P=E)}return P++,A}},position:()=>P}}}function qe(){if(ce)return le;ce=1;var t=Pe(),e=Be(),r=_e(),i=He(),n=Ve(),s=$e(),o={empty:!0,space:!0};return le=class{constructor(t){this.input=t,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(e){var r,i,n,s=new t;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?u.push("("===r?")":"]"):"{"===r&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),0===u.length){if(";"===r){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===r){a=!0;break}if("}"===r){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}h.push(e)}else h.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(s.source.end=this.getPosition((e=h[h.length-1])[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var[s,o]of t.entries()){if("("===(i=(r=o)[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return s}this.doubleColon(r)}e=r}return!1}comment(t){var r=new e;this.init(r,t[2]),r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++;var i=t[1].slice(2,-2);if(/^\s*$/.test(i))r.text="",r.raws.left=i,r.raws.right="";else{var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n,s=t[t.length-1];for(";"===s[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(s[3]||s[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),i.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var o=t[0][0];if(":"===o||"space"===o||"comment"===o)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(n=t.shift())[0]){i.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),i.raws.between+=n[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var a,h=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)h.push(t.shift());this.precheckMissedSemicolon(t);for(var u=t.length-1;u>=0;u--){if("!important"===(n=t[u])[1].toLowerCase()){i.important=!0;var l=this.stringFrom(t,u);" !important"!==(l=this.spacesFromEnd(t)+l)&&(i.raws.important=l);break}if("important"===n[1].toLowerCase()){for(var c=t.slice(0),f="",d=u;d>0;d--){var v=c[d][0];if(f.trim().startsWith("!")&&"space"!==v)break;f=c.pop()[1]+f}f.trim().startsWith("!")&&(i.important=!0,i.raws.important=f,t=c)}if("space"!==n[0]&&"comment"!==n[0])break}var p=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));p&&(i.raws.between+=h.map((t=>t[1])).join(""),h=[]),this.raw(i,"value",h.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new n;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),s.push("}");else if(0===s.length){if(";"===r){if(i)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,r,i){for(var n,s,a=r.length,h="",u=!0,l=0;a>l;l+=1)"space"!==(s=(n=r[l])[0])||l!==a-1||i?"comment"===s&&(o[r[l-1]?r[l-1][0]:"empty"]||o[r[l+1]?r[l+1][0]:"empty"]||","===h.slice(-1))?u=!1:h+=n[1]:u=!1;if(!u){var c=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:c,value:h}}t[e]=h}rule(t){t.pop();var e=new n;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;t.length>i;i++)r+=t[i][1];return t.splice(e,t.length-e),r}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}}}function Ze(){if(de)return fe;de=1;var t=Fe(),e=Ge(),r=qe();function i(t,i){var n=new e(t,i),s=new r(n);try{s.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&i&&i.from&&(/\.scss$/i.test(i.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(i.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(i.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return s.root}return fe=i,i.default=i,t.registerParse(i),fe}function Je(){if(pe)return ve;pe=1;class t{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){var r=e.node.rangeBy(e);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in e)this[i]=e[i]}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}}return ve=t,t.default=t,ve}function Xe(){if(ye)return me;ye=1;var t=Je();class e{get content(){return this.css}constructor(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,r){void 0===r&&(r={}),r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);var i=new t(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter((t=>"warning"===t.type))}}return me=e,e.default=e,me}function Qe(){if(we)return ge;we=1;var t={};return ge=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Ke(){if(Se)return be;Se=1;var t=Fe(),i=je(),n=Ye(),s=Ze(),o=Xe(),a=He(),h=Dt(),{isClean:u,my:l}=Ne(),c=Qe(),f={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={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},v={Once:!0,postcssPlugin:!0,prepare:!0},p=0;function m(t){return"object"==typeof t&&"function"==typeof t.then}function y(t){var e=!1,r=f[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,p,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,p,r+"Exit"]:[r,r+"Exit"]}function g(t){return{eventIndex:0,events:"document"===t.type?["Document",p,"DocumentExit"]:"root"===t.type?["Root",p,"RootExit"]:y(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function w(t){return t[u]=!1,t.nodes&&t.nodes.forEach((t=>w(t))),t}var b={};class S{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"}constructor(e,i,n){var a;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof S||i instanceof o)a=w(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var h=s;n.syntax&&(h=n.syntax.parse),n.parser&&(h=n.parser),h.parse&&(h=h.parse);try{a=h(i,n)}catch(t){this.processed=!0,this.error=t}a&&!a[l]&&t.rebuild(a)}else a=w(i);this.result=new o(e,a,n),this.helpers=r({},b,{postcss:b,result:this.result}),this.plugins=this.processor.plugins.map((t=>"object"==typeof t&&t.prepare?r({},t,t.prepare(this.result)):t))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){var i=r.postcssPlugin,n=r.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!d[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!v[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e((function*(){t.plugin=0;for(var e=0;t.plugins.length>e;e++){var r=t.runOnRoot(t.plugins[e]);if(m(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var i=t.result.root;!i[u];){i[u]=!0;for(var n=[g(i)];n.length>0;){var s=t.visitTick(n);if(m(s))try{yield s}catch(e){throw t.handleError(e,n[n.length-1].node)}}}if(t.listeners.OnceExit){var o=function*(e){t.result.lastPlugin=a;try{if("document"===i.type){var r=i.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(i,t.helpers)}catch(e){throw t.handleError(e)}};for(var[a,h]of t.listeners.OnceExit)yield*o(h)}}return t.processed=!0,t.stringify()}))()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map((e=>t.Once(e,this.helpers)));return m(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=h;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=new n(e,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(var t of this.plugins)if(m(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[u];)e[u]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||c("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(t,e)}toString(){return this.css}visitSync(t,e){for(var[r,i]of t){this.result.lastPlugin=r;var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(m(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:r,visitors:i}=e;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&i.length>e.visitorIndex){var[n,s]=i[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=n;try{return s(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var o,a=e.iterator;o=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!o[u])return o[u]=!0,void t.push(g(o));e.iterator=0,delete r.indexes[a]}for(var h=e.events;h.length>e.eventIndex;){var l=h[e.eventIndex];if(e.eventIndex+=1,l===p)return void(r.nodes&&r.nodes.length&&(r[u]=!0,e.iterator=r.getIterator()));if(this.listeners[l])return void(e.visitors=this.listeners[l])}t.pop()}else t.pop()}walkSync(t){t[u]=!0;var e=y(t);for(var r of e)if(r===p)t.nodes&&t.each((t=>{t[u]||this.walkSync(t)}));else{var i=this.listeners[r];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}}return S.registerPostcss=t=>{b=t},be=S,S.default=S,a.registerLazyResult(S),i.registerLazyResult(S),be}function tr(){if(Re)return xe;Re=1;var t=Pe(),e=Be(),n=Fe(),a=At(),h=_e(),u=je(),l=function(){if(se)return ne;se=1;var t=Pe(),e=Be(),n=_e(),a=Ge(),h=We(),u=He(),l=Ve();function c(f,d){if(Array.isArray(f))return f.map((t=>c(t)));var{inputs:v}=f,p=i(f,s);if(v)for(var m of(d=[],v)){var y=r({},m,{__proto__:a.prototype});y.map&&(y.map=r({},y.map,{__proto__:h.prototype})),d.push(y)}if(p.nodes&&(p.nodes=f.nodes.map((t=>c(t,d)))),p.source){var g=p.source,{inputId:w}=g,b=i(g,o);p.source=b,null!=w&&(p.source.input=d[w])}if("root"===p.type)return new u(p);if("decl"===p.type)return new n(p);if("rule"===p.type)return new l(p);if("comment"===p.type)return new e(p);if("atrule"===p.type)return new t(p);throw new Error("Unknown node type: "+f.type)}return ne=c,c.default=c,ne}(),c=Ge(),f=Ke(),d=ze(),v=Le(),p=Ze(),m=function(){if(Ie)return Me;Ie=1;var t=je(),e=Ke(),r=function(){if(Ce)return ke;Ce=1;var t=Ye(),e=Ze(),r=Xe(),i=Dt(),n=Qe();class s{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;var t,r=e;try{t=r(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,n,s){var o;n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var a=i;this.result=new r(this._processor,o,this._opts),this.result.css=n;var h=this;Object.defineProperty(this.result,"root",{get(){return h.root}});var u=new t(a,o,this._opts,n);if(u.isMap()){var[l,c]=u.generate();l&&(this.result.css=l),c&&(this.result.map=c)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("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(t,e)}toString(){return this._css}warnings(){return[]}}return ke=s,s.default=s,ke}(),i=He();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.6",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else if("function"==typeof r)e.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 e}process(t,i){return void 0===i&&(i={}),this.plugins.length||i.parser||i.stringifier||i.syntax?new e(this,t,i):new r(this,t,i)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}return Me=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),Me}(),y=Xe(),g=He(),w=Ve(),b=Dt(),S=Je();function k(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new m(e)}return k.plugin=function(t,e){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var r=e(...arguments);return r.postcssPlugin=t,r.postcssVersion=(new m).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return k([n(r)]).process(t,e)},n},k.stringify=b,k.parse=p,k.fromJSON=l,k.list=d,k.comment=t=>new e(t),k.atRule=e=>new t(e),k.decl=t=>new h(t),k.rule=t=>new w(t),k.root=t=>new g(t),k.document=t=>new u(t),k.CssSyntaxError=a,k.Declaration=h,k.Container=n,k.Processor=m,k.Document=u,k.Comment=e,k.Warning=S,k.AtRule=t,k.Result=y,k.Input=c,k.Rule=w,k.Root=g,k.Node=v,f.registerPostcss(k),xe=k,k.default=k,xe}var er=gt(function(){if(Oe)return Ae;Oe=1;var{Input:t}=tr(),e=function(){if(Te)return Ee;Te=1;var t=Be(),e=qe(),r=$e();return Ee=class extends e{checkMissedSemicolon(){}comment(e){var r=new t;this.init(r,e[2]);var i=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:i.col,line:i.line,offset:e[3]+1};var n=e[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some((t=>"word"===t[0]))&&super.decl(t)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(t){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(0!==r&&r>=0){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map((t=>t[1])).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map((t=>t[1])).join("")}unnamedAtrule(t){t.name=""}}}();return Ae=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}()),rr=gt(tr()),ir={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function nr(t,e){var r=null==e?void 0:e.stylesWithHoverClass.get(t);if(r)return r;var i=t;try{i=rr([mt,yt]).process(t,{parser:er}).css}catch(t){console.warn("Failed to adapt css for replay",t)}return null==e||e.stylesWithHoverClass.set(t,i),i}function sr(){return{stylesWithHoverClass:new Map}}var or=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),ar=new Set;function hr(t,e){var r,i,{doc:n,mirror:s,skipChild:o=!1,hackCss:a=!0,afterAppend:h,cache:u}=e;if(s.has(t.id)){var l=s.getNode(t.id),c=s.getMeta(l);if(i=t,(r=c)&&i&&r.type===i.type&&(r.type===v.Document?r.compatMode===i.compatMode:r.type===v.DocumentType?r.name===i.name&&r.publicId===i.publicId&&r.systemId===i.systemId:r.type===v.Comment||r.type===v.Text||r.type===v.CDATA?r.textContent===i.textContent:r.type===v.Element&&r.tagName===i.tagName&&JSON.stringify(r.attributes)===JSON.stringify(i.attributes)&&r.isSVG===i.isSVG&&r.needBlock===i.needBlock))return s.getNode(t.id)}var f=function(t,e){var r,{doc:i,hackCss:n,cache:s}=e;switch(t.type){case v.Document:return i.implementation.createDocument(null,"",null);case v.DocumentType:return i.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case v.Element:var o,a=function(t){var e=ir[t.tagName]?ir[t.tagName]:t.tagName;return"link"===e&&t.attributes._cssText&&(e="style"),e}(t);if(t.isSVG)o=i.createElementNS("http://www.w3.org/2000/svg",a);else{if(t.isCustom&&(null==(r=i.defaultView)?void 0:r.customElements)&&function(t){if("string"!=typeof t||0===t.length)return!1;if(or.has(t))return!1;if(!t.includes("-"))return!1;var e=t.charCodeAt(0);return e>=97&&122>=e}(t.tagName)&&!i.defaultView.customElements.get(t.tagName))try{i.defaultView.customElements.define(t.tagName,class extends i.defaultView.HTMLElement{})}catch(e){ar.has(t.tagName)||(ar.add(t.tagName),console.warn("rrweb: failed to register custom element",t.tagName,e))}o=i.createElement(a)}var h={};for(var u in t.attributes)if({}.hasOwnProperty.call(t.attributes,u)){var l=t.attributes[u];if(("option"!==a||"selected"!==u||!1!==l)&&null!==l)if(!0===l&&(l=""),u.startsWith("rr_"))h[u]=l;else{var c="textarea"===a&&"value"===u,f="style"===a&&"_cssText"===u;if(f&&n&&"string"==typeof l&&(l=nr(l,s)),!c&&!f||"string"!=typeof l)try{if(t.isSVG&&"xlink:href"===u)o.setAttributeNS("http://www.w3.org/1999/xlink",u,l.toString());else if("onload"===u||"onclick"===u||"onmouse"===u.substring(0,7))o.setAttribute("_"+u,l.toString());else{if("meta"===a&&"Content-Security-Policy"===t.attributes["http-equiv"]&&"content"===u){o.setAttribute("csp-content",l.toString());continue}"link"===a&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===a&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===B(t.attributes.href)||("img"===a&&t.attributes.srcset&&t.attributes.rr_dataURL?o.setAttribute("rrweb-original-srcset",t.attributes.srcset):o.setAttribute(u,l.toString()))}}catch(t){}else o.appendChild(i.createTextNode(l)),t.childNodes=[]}}var d=!("static"!==h.rr_position&&"relative"!==h.rr_position&&"sticky"!==h.rr_position||void 0!==h.rr_transform&&"none"!==h.rr_transform);if(d&&"string"==typeof h.rr_display){var p=h.rr_display;o.style.setProperty("display","inline"===p?"inline-block":p)}var m=function(){var e=h[y];if("canvas"===a&&"rr_dataURL"===y){var r=i.createElement("img");r.onload=()=>{var t=o.getContext("2d");t&&t.drawImage(r,0,0,r.width,r.height)},r.src=e.toString(),o.RRNodeType&&(o.rr_dataURL=e.toString())}else if("img"===a&&"rr_dataURL"===y){var n=o;n.currentSrc.startsWith("data:")||(n.setAttribute("rrweb-original-src",t.attributes.src),n.src=e.toString())}if("rr_width"===y)o.style.setProperty("width",e.toString());else if("rr_height"===y)o.style.setProperty("height",e.toString());else if("rr_left"===y)d||(o.style.setProperty("left",e.toString()),o.style.setProperty("position","absolute"));else if("rr_top"===y)d||(o.style.setProperty("top",e.toString()),o.style.setProperty("position","absolute"));else if("rr_mediaCurrentTime"===y&&"number"==typeof e)o.currentTime=e;else if("rr_mediaState"===y)switch(e){case"played":o.play().catch((t=>console.warn("media playback error",t)));break;case"paused":o.pause()}else"rr_mediaPlaybackRate"===y&&"number"==typeof e?o.playbackRate=e:"rr_mediaMuted"===y&&"boolean"==typeof e?o.muted=e:"rr_mediaLoop"===y&&"boolean"==typeof e?o.loop=e:"rr_mediaVolume"===y&&"number"==typeof e?o.volume=e:"rr_open_mode"===y&&o.setAttribute("rr_open_mode",e)};for(var y in h)m();if(t.isShadowHost)if(o.shadowRoot)for(;o.shadowRoot.firstChild;)o.shadowRoot.removeChild(o.shadowRoot.firstChild);else o.attachShadow({mode:"open"});return o;case v.Text:return function(t,e){var r=t.textContent;if(t.isStyle&&e.hackCss)try{r=nr(t.textContent,e.cache)}catch(t){}return e.doc.createTextNode(r)}(t,{cache:s,doc:i,hackCss:n});case v.CDATA:return""===t.textContent.trim()?null:i.createCDATASection(t.textContent);case v.Comment:return i.createComment(t.textContent);default:return null}}(t,{doc:n,hackCss:a,cache:u});if(!f)return null;if(t.rootId&&s.getNode(t.rootId)!==n&&s.replace(t.rootId,n),t.type===v.Document&&(n.close(),n.open(),"BackCompat"===t.compatMode&&t.childNodes&&t.childNodes[0].type!==v.DocumentType&&n.write(t.childNodes[0].type===v.Element&&"xmlns"in t.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===t.childNodes[0].attributes.xmlns?'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">':'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'),f=n),s.add(f,t),(t.type===v.Document||t.type===v.Element)&&!o){var d=function(){var e=hr(p,{doc:n,mirror:s,skipChild:!1,hackCss:a,afterAppend:h,cache:u});if(!e)return console.warn("Failed to rebuild",p),1;if(p.isShadow&&M(f)&&f.shadowRoot)f.shadowRoot.appendChild(e);else if(t.type===v.Document&&p.type==v.Element){var r=e,i=null;r.childNodes.forEach((t=>{"BODY"===t.nodeName&&(i=t)})),i?(r.removeChild(i),f.appendChild(e),r.appendChild(i)):f.appendChild(e)}else if(t.type===v.Document&&p.type===v.DocumentType){var o=f.doctype;o&&f.removeChild(o),f.firstChild&&1===f.firstChild.nodeType?f.insertBefore(e,f.firstChild):f.appendChild(e)}else f.appendChild(e);h&&h(e,p.id)};for(var p of t.childNodes)d()}return f}var ur=Object.defineProperty,lr=(t,e,r)=>((t,e,r)=>e in t?ur(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),cr=Object.defineProperty,fr=(t,e,r)=>((t,e,r)=>e in t?cr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),dr={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},vr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},pr={};function mr(t){if(pr[t])return pr[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in dr?dr[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in vr?vr[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return pr[t]=e.prototype,e.prototype;var a=document.createElement("iframe");try{document.body.appendChild(a);var h=a.contentWindow;if(!h)return e.prototype;var u=h[t].prototype;return u?pr[t]=u:r}catch(t){return r}finally{a.parentNode&&document.body.removeChild(a)}}var yr={};function gr(t,e,r){var i,n=t+"."+String(r);if(yr[n])return yr[n].call(e);var s=mr(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(yr[n]=o,o.call(e)):e[r]}var wr={};function br(t,e,r){var i=t+"."+String(r);if(wr[i])return wr[i].bind(e);var n=mr(t)[r];return"function"!=typeof n?e[r]:(wr[i]=n,n.bind(e))}var Sr={childNodes:t=>gr("Node",t,"childNodes"),parentNode:t=>gr("Node",t,"parentNode"),parentElement:t=>gr("Node",t,"parentElement"),textContent:t=>gr("Node",t,"textContent"),contains:(t,e)=>br("Node",t,"contains")(e),getRootNode:t=>br("Node",t,"getRootNode")(),host:t=>t&&"host"in t?gr("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?gr("Element",t,"shadowRoot"):null,querySelector:(t,e)=>br("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>br("Element",t,"querySelectorAll")(e),mutationObserver:()=>mr("MutationObserver").constructor,patch(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}},kr=class{constructor(){fr(this,"idNodeMap",new Map),fr(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t))),function(t){return t.nodeType===t.ELEMENT_NODE}(t)){var r=Sr.shadowRoot(t);r&&this.removeNodeFromMap(r),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Cr(t){if({}.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})})),r}var Mr,Ir={exports:{}};function xr(){if(Mr)return Ir.exports;Mr=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return Ir.exports=e(),Ir.exports.createColors=e,Ir.exports}var Rr,Er,Tr,Ar,Or,Dr,Nr=Cr(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function Lr(){if(Er)return Rr;Er=1;var t=xr(),e=Nr;class r extends Error{constructor(t,e,i,n,s,o){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(r){if(!this.source)return"";var i=this.source;null==r&&(r=t.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(r){var{bold:a,gray:h,red:u}=t.createColors(!0);s=t=>a(u(t)),n=t=>h(t),e&&(o=t=>e(t))}var l=i.split(/\r?\n/),c=Math.max(this.line-3,0),f=Math.min(this.line+2,l.length),d=String(f).length;return l.slice(c,f).map(((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)})).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}return Rr=r,r.default=r,Rr}function Br(){if(Ar)return Tr;Ar=1;var t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class e{constructor(t){this.builder=t}atrule(t,e){var r="@"+t.name,i=t.params?this.rawValue(t,"params"):"";void 0!==t.raws.afterName?r+=t.raws.afterName:i&&(r+=" "),t.nodes?this.block(t,r+i):this.builder(r+i+((t.raws.between||"")+(e?";":"")),t)}beforeAfter(t,e){var r;r=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;n>o;o++)r+=s}return r}block(t,e){var r,i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){for(var e=t.nodes.length-1;e>0&&"comment"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,"semicolon"),i=0;t.nodes.length>i;i++){var n=t.nodes[i],s=this.raw(n,"before");s&&this.builder(s),this.stringify(n,e!==i||r)}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+r+"*/",t)}decl(t,e){var r=this.raw(t,"between","colon"),i=t.prop+r+this.rawValue(t,"value");t.important&&(i+=t.raws.important||" !important"),e&&(i+=";"),this.builder(i,t)}document(t){this.body(t)}raw(e,r,i){var n;if(i||(i=r),r&&void 0!==(n=e.raws[r]))return n;var s=e.parent;if("before"===i){if(!s||"root"===s.type&&s.first===e)return"";if(s&&"document"===s.type)return""}if(!s)return t[i];var o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[i])return o.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(e,i);var a,h="raw"+((a=i)[0].toUpperCase()+a.slice(1));return this[h]?n=this[h](o,e):o.walk((t=>{if(void 0!==(n=t.raws[r]))return!1})),void 0===n&&(n=t[i]),o.rawCache[i]=n,n}rawBeforeClose(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk((t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1})),e}rawBeforeRule(t){var e;return t.walk((r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls((t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1})),e}rawEmptyBody(t){var e;return t.walk((t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1})),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk((r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}})),e);var e}rawSemicolon(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1})),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}}return Tr=e,e.default=e,Tr}function _r(){if(Dr)return Or;Dr=1;var t=Br();function e(e,r){new t(r).stringify(e)}return Or=e,e.default=e,Or}var Fr,Pr,jr,Ur,Wr,Gr,Hr,zr,Vr,Yr,$r,qr,Zr,Jr,Xr,Qr,Kr,ti,ei,ri,ii,ni,si,oi,ai,hi,ui,li,ci,fi,di,vi,pi,mi,yi,gi,wi,bi,Si,ki,Ci,Mi,Ii,xi,Ri,Ei,Ti,Ai,Oi,Di,Ni,Li,Bi,_i={};function Fi(){return Fr||(Fr=1,_i.isClean=Symbol("isClean"),_i.my=Symbol("my")),_i}function Pi(){if(jr)return Pr;jr=1;var t=Lr(),e=Br(),r=_r(),{isClean:i,my:n}=Fi();function s(t,e){var r=new t.constructor;for(var i in t)if({}.hasOwnProperty.call(t,i)&&"proxyCache"!==i){var n=t[i],o=typeof n;"parent"===i&&"object"===o?e&&(r[i]=e):"source"===i?r[i]=n:Array.isArray(n)?r[i]=n.map((t=>s(t,r))):("object"===o&&null!==n&&(n=s(n)),r[i]=n)}return r}function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;t.length>s;s++){if(i===e.line&&r===e.column){n=s;break}"\n"===t[s]?(r=1,i+=1):r+=1}return n}class a{get proxyOf(){return this}constructor(t){for(var e in void 0===t&&(t={}),this.raws={},this[i]=!1,this[n]=!0,t)if("nodes"===e)for(var r of(this.nodes=[],t[e]))this.append("function"==typeof r.clone?r.clone():r);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+e.input.from+":"+e.start.line+":"+e.start.column+"$&")}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t){void 0===t&&(t={});var e=s(this);for(var r in t)e[r]=t[r];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(e,r){if(void 0===r&&(r={}),this.source){var{end:i,start:n}=this.rangeBy(r);return this.source.input.error(e,{column:n.column,line:n.line},{column:i.column,line:i.line},r)}return new t(e)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[i]=!0}markDirty(){if(this[i]){this[i]=!1;for(var t=this;t=t.parent;)t[i]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){var r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(o(r,this.source.start),o(r,this.source.end)).indexOf(t.word);-1!==i&&(e=this.positionInside(i))}return e}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=o(i,this.source.start),s=n+t,a=n;s>a;a++)"\n"===i[a]?(e=1,r+=1):e+=1;return{column:e,line:r,offset:s}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:o(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:o(e,t.start)}:t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:o(e,t.end)}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1));return(r.line>i.line||i.line===r.line&&r.column>=i.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,r){return(new e).raw(this,t,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var r={},i=null==e;e=e||new Map;var n=0;for(var s in this)if({}.hasOwnProperty.call(this,s)&&"parent"!==s&&"proxyCache"!==s){var o=this[s];if(Array.isArray(o))r[s]=o.map((t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t));else if("object"==typeof o&&o.toJSON)r[s]=o.toJSON(null,e);else if("source"===s){if(null==o)continue;var a=e.get(o.input);null==a&&(a=n,e.set(o.input,n),n++),r[s]={end:o.end,inputId:a,start:o.start}}else r[s]=o}return i&&(r.inputs=[...e.keys()].map((t=>t.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=r),t.stringify&&(t=t.stringify);var e="";return t(this,(t=>{e+=t})),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}}return Pr=a,a.default=a,Pr}function ji(){if(Wr)return Ur;Wr=1;var t=Pi();class e extends t{constructor(t){super(t),this.type="comment"}}return Ur=e,e.default=e,Ur}function Ui(){if(Hr)return Gr;Hr=1;var t=Pi();class e extends t{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=r({},t,{value:String(t.value)})),super(t),this.type="decl"}}return Gr=e,e.default=e,Gr}function Wi(){if(Vr)return zr;Vr=1;var t,e,r,i,n=ji(),s=Ui(),o=Pi(),{isClean:a,my:h}=Fi();function u(t){return t.map((t=>(t.nodes&&(t.nodes=u(t.nodes)),delete t.source,t)))}function l(t){if(t[a]=!1,t.proxyOf.nodes)for(var e of t.proxyOf.nodes)l(e)}class c extends o{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]}append(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e){var n=this.normalize(i,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.proxyOf.nodes.length>this.indexes[i]&&!1!==(r=t(this.proxyOf.nodes[e=this.indexes[i]],e));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];return t[e](...i.map((t=>"function"==typeof t?(e,r)=>t(e.toProxy(),r):t)))}:"every"===e||"some"===e?r=>t[e]((function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;e>n;n++)i[n-1]=arguments[n];return r(t.toProxy(),...i)})):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map((t=>t.toProxy())):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)(r=this.indexes[o])>i&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i],0===i&&"prepend").reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i,0,s);for(var o in this.indexes)i>(r=this.indexes[o])||(this.indexes[o]=r+n.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=u(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var f of r=r.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if("root"===r.type&&"document"!==this.type)for(var d of r=r.nodes.slice(0))d.parent&&d.parent.removeChild(d,"ignore");else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new s(r)]}else if(r.selector||r.selectors)r=[new i(r)];else if(r.name)r=[new t(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new n(r)]}var v=r.map((t=>(t[h]||c.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[a]&&l(t),t.raws||(t.raws={}),void 0===t.raws.before&&o&&void 0!==o.raws.before&&(t.raws.before=o.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return v}prepend(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e=e.reverse()){var n=this.normalize(i,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var r in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t>(e=this.indexes[r])||(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls((i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))})),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each(((e,r)=>{var i;try{i=t(e,r)}catch(t){throw e.addToError(t)}return!1!==i&&e.walk&&(i=e.walk(t)),i}))}walkAtRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)})):this.walk(((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("atrule"===t.type)return e(t,r)})))}walkComments(t){return this.walk(((e,r)=>{if("comment"===e.type)return t(e,r)}))}walkDecls(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)})):this.walk(((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("decl"===t.type)return e(t,r)})))}walkRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)})):this.walk(((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("rule"===t.type)return e(t,r)})))}}return c.registerParse=t=>{e=t},c.registerRule=t=>{i=t},c.registerAtRule=e=>{t=e},c.registerRoot=t=>{r=t},zr=c,c.default=c,c.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,t.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,s.prototype):"comment"===e.type?Object.setPrototypeOf(e,n.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[h]=!0,e.nodes&&e.nodes.forEach((t=>{c.rebuild(t)}))},zr}function Gi(){if($r)return Yr;$r=1;var t=Wi();class e extends t{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}}return Yr=e,e.default=e,t.registerAtRule(e),Yr}function Hi(){if(Zr)return qr;Zr=1;var t,e,i=Wi();class n extends i{constructor(t){super(r({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return n.registerLazyResult=e=>{t=e},n.registerProcessor=t=>{e=t},qr=n,n.default=n,qr}function zi(){return Xr?Jr:(Xr=1,Jr={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e)=>(void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n--;)i+=t[Math.random()*t.length|0];return i})})}function Vi(){if(Kr)return Qr;Kr=1;var{existsSync:t,readFileSync:e}=Nr,{dirname:r,join:i}=Nr,{SourceMapConsumer:n,SourceMapGenerator:s}=Nr;class o{constructor(t,e){if(!1!==e.map){this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),i&&(this.text=i)}}consumer(){return this.consumerCache||(this.consumerCache=new n(this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(i){if(this.root=r(i),t(i))return this.mapFile=i,e(i,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof n)return s.fromSourceMap(e).toString();if(e instanceof s)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var o=e(t);if(o){var a=this.loadFile(o);if(!a)throw new Error("Unable to load previous source map: "+o.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var h=this.annotation;return t&&(h=i(r(t),h)),this.loadFile(h)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}}return Qr=o,o.default=o,Qr}function Yi(){if(ei)return ti;ei=1;var{nanoid:t}=zi(),{isAbsolute:e,resolve:i}=Nr,{SourceMapConsumer:n,SourceMapGenerator:s}=Nr,{fileURLToPath:o,pathToFileURL:a}=Nr,h=Lr(),u=Vi(),l=Nr,c=Symbol("lineToIndexCache"),f=Boolean(n&&s),d=Boolean(i&&e);function v(t){if(t[c])return t[c];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;s>n;n++)r[n]=i,i+=e[n].length+1;return t[c]=r,r}class p{get from(){return this.file||this.id}constructor(r,n){if(void 0===n&&(n={}),null==r||"object"==typeof r&&!r.toString)throw new Error("PostCSS received "+r+" instead of CSS string");if(this.css=r.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(this.file=!d||/^\w+:\/\//.test(n.from)||e(n.from)?n.from:i(n.from)),d&&f){var s=new u(this.css,n);if(s.text){this.map=s;var o=s.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+t(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,u,l;if(void 0===i&&(i={}),e&&"object"==typeof e){var c=e,f=r;if("number"==typeof c.offset){var d=this.fromOffset(u=c.offset);e=d.line,r=d.col}else u=this.fromLineAndColumn(e=c.line,r=c.column);if("number"==typeof f.offset){var v=this.fromOffset(o=f.offset);s=v.line,n=v.col}else s=f.line,n=f.column,o=this.fromLineAndColumn(f.line,f.column)}else if(r)u=this.fromLineAndColumn(e,r);else{var p=this.fromOffset(u=e);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(l=m?new h(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new h(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:u,source:this.css},this.file&&(a&&(l.input.url=a(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,e){return v(this)[t-1]+e-1}fromOffset(t){var e=v(this),r=0;if(e[e.length-1]>t)for(var i,n=e.length-2;n>r;)if(e[i=r+(n-r>>1)]>t)n=i-1;else{if(e[i+1]>t){r=i;break}r=i+1}else r=e.length-1;return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:i(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,r,i,n){if(!this.map)return!1;var s,h,u=this.map.consumer(),l=u.originalPositionFor({column:r,line:t});if(!l.source)return!1;"number"==typeof i&&(s=u.originalPositionFor({column:n,line:i})),h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column,endColumn:s&&s.column,endLine:s&&s.line,line:l.line,url:h.toString()};if("file:"===h.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");c.file=o(h)}var f=u.sourceContentFor(l.source);return f&&(c.source=f),c}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=r({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}}return ti=p,p.default=p,l&&l.registerInput&&l.registerInput(p),ti}function $i(){if(ii)return ri;ii=1;var t,e,r=Wi();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var n of i)n.raws.before=e.raws.before;return i}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return i.registerLazyResult=e=>{t=e},i.registerProcessor=t=>{e=t},ri=i,i.default=i,r.registerRoot(i),ri}function qi(){if(si)return ni;si=1;var t={comma(e){return t.split(e,[","],!0)},space(e){return t.split(e,[" ","\n","\t"])},split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};return ni=t,t.default=t,ni}function Zi(){if(ai)return oi;ai=1;var t=Wi(),e=qi();class r extends t{get selectors(){return e.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}}return oi=r,r.default=r,t.registerRule(r),oi}function Ji(){if(ci)return li;ci=1;var{dirname:t,relative:e,resolve:r,sep:i}=Nr,{SourceMapConsumer:n,SourceMapGenerator:s}=Nr,{pathToFileURL:o}=Nr,a=Yi(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return li=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var t;t=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";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var r=this.toUrl(this.path(e.file)),i=e.root||t(e.file),s=void 0;!1===this.mapOpts.sourcesContent?(s=new n(e.text)).sourcesContent&&(s.sourcesContent=null):s=e.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&h&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,(e=>{t+=e})),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=s.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new s({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 s({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,h)=>{if(this.css+=s,a&&"end"!==h&&(o.generated.line=r,o.generated.column=i-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=s.match(/\n/g))?(r+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.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=i-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=i-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((t=>t.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some((t=>t.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((t=>t.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(i){if(this.mapOpts.absolute)return i;if(60===i.charCodeAt(0))return i;if(/^\w+:\/\//.test(i))return i;var n=this.memoizedPaths.get(i);if(n)return n;var s=this.opts.to?t(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=t(r(s,this.mapOpts.annotation)));var o=e(s,i);return this.memoizedPaths.set(i,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}}));else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk((e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}}));else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(o){var r=o(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===i&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}}function Xi(){if(di)return fi;di=1;var t="'".charCodeAt(0),e='"'.charCodeAt(0),r="\\".charCodeAt(0),i="/".charCodeAt(0),n="\n".charCodeAt(0),s=" ".charCodeAt(0),o="\f".charCodeAt(0),a="\t".charCodeAt(0),h="\r".charCodeAt(0),u="[".charCodeAt(0),l="]".charCodeAt(0),c="(".charCodeAt(0),f=")".charCodeAt(0),d="{".charCodeAt(0),v="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),y=":".charCodeAt(0),g="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return fi=function(C,M){void 0===M&&(M={});var I,x,R,E,T,A,O,D,N,L,B=C.css.valueOf(),_=M.ignoreErrors,F=B.length,P=0,j=[],U=[];function W(t){throw C.error("Unclosed "+t,P)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&P>=F,nextToken(C){if(U.length)return U.pop();if(F>P){var M=!!C&&C.ignoreUnclosed;switch(I=B.charCodeAt(P)){case n:case s:case a:case h:case o:E=P;do{I=B.charCodeAt(E+=1)}while(I===s||I===n||I===a||I===h||I===o);A=["space",B.slice(P,E)],P=E-1;break;case u:case l:case d:case v:case y:case p:case f:var G=String.fromCharCode(I);A=[G,G,P];break;case c:if(L=j.length?j.pop()[1]:"",N=B.charCodeAt(P+1),"url"===L&&N!==t&&N!==e&&N!==s&&N!==n&&N!==a&&N!==o&&N!==h){E=P;do{if(O=!1,-1===(E=B.indexOf(")",E+1))){if(_||M){E=P;break}W("bracket")}for(D=E;B.charCodeAt(D-1)===r;)D-=1,O=!O}while(O);A=["brackets",B.slice(P,E+1),P,E],P=E}else E=B.indexOf(")",P+1),x=B.slice(P,E+1),-1===E||S.test(x)?A=["(","(",P]:(A=["brackets",x,P,E],P=E);break;case t:case e:T=I===t?"'":'"',E=P;do{if(O=!1,-1===(E=B.indexOf(T,E+1))){if(_||M){E=P+1;break}W("string")}for(D=E;B.charCodeAt(D-1)===r;)D-=1,O=!O}while(O);A=["string",B.slice(P,E+1),P,E],P=E;break;case g:w.lastIndex=P+1,w.test(B),A=["at-word",B.slice(P,1+(E=0===w.lastIndex?B.length-1:w.lastIndex-2)),P,E],P=E;break;case r:for(E=P,R=!0;B.charCodeAt(E+1)===r;)E+=1,R=!R;if(I=B.charCodeAt(E+1),R&&I!==i&&I!==s&&I!==n&&I!==a&&I!==h&&I!==o&&k.test(B.charAt(E+=1))){for(;k.test(B.charAt(E+1));)E+=1;B.charCodeAt(E+1)===s&&(E+=1)}A=["word",B.slice(P,E+1),P,E],P=E;break;default:I===i&&B.charCodeAt(P+1)===m?(0===(E=B.indexOf("*/",P+2)+1)&&(_||M?E=B.length:W("comment")),A=["comment",B.slice(P,E+1),P,E],P=E):(b.lastIndex=P+1,b.test(B),A=["word",B.slice(P,1+(E=0===b.lastIndex?B.length-1:b.lastIndex-2)),P,E],j.push(A),P=E)}return P++,A}},position:()=>P}}}function Qi(){if(pi)return vi;pi=1;var t=Gi(),e=ji(),r=Ui(),i=$i(),n=Zi(),s=Xi(),o={empty:!0,space:!0};return vi=class{constructor(t){this.input=t,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(e){var r,i,n,s=new t;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?u.push("("===r?")":"]"):"{"===r&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),0===u.length){if(";"===r){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===r){a=!0;break}if("}"===r){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}h.push(e)}else h.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(s.source.end=this.getPosition((e=h[h.length-1])[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var[s,o]of t.entries()){if("("===(i=(r=o)[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return s}this.doubleColon(r)}e=r}return!1}comment(t){var r=new e;this.init(r,t[2]),r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++;var i=t[1].slice(2,-2);if(/^\s*$/.test(i))r.text="",r.raws.left=i,r.raws.right="";else{var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n,s=t[t.length-1];for(";"===s[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(s[3]||s[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),i.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var o=t[0][0];if(":"===o||"space"===o||"comment"===o)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(n=t.shift())[0]){i.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),i.raws.between+=n[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var a,h=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)h.push(t.shift());this.precheckMissedSemicolon(t);for(var u=t.length-1;u>=0;u--){if("!important"===(n=t[u])[1].toLowerCase()){i.important=!0;var l=this.stringFrom(t,u);" !important"!==(l=this.spacesFromEnd(t)+l)&&(i.raws.important=l);break}if("important"===n[1].toLowerCase()){for(var c=t.slice(0),f="",d=u;d>0;d--){var v=c[d][0];if(f.trim().startsWith("!")&&"space"!==v)break;f=c.pop()[1]+f}f.trim().startsWith("!")&&(i.important=!0,i.raws.important=f,t=c)}if("space"!==n[0]&&"comment"!==n[0])break}var p=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));p&&(i.raws.between+=h.map((t=>t[1])).join(""),h=[]),this.raw(i,"value",h.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new n;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),s.push("}");else if(0===s.length){if(";"===r){if(i)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,r,i){for(var n,s,a=r.length,h="",u=!0,l=0;a>l;l+=1)"space"!==(s=(n=r[l])[0])||l!==a-1||i?"comment"===s&&(o[r[l-1]?r[l-1][0]:"empty"]||o[r[l+1]?r[l+1][0]:"empty"]||","===h.slice(-1))?u=!1:h+=n[1]:u=!1;if(!u){var c=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:c,value:h}}t[e]=h}rule(t){t.pop();var e=new n;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;t.length>i;i++)r+=t[i][1];return t.splice(e,t.length-e),r}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}}}function Ki(){if(yi)return mi;yi=1;var t=Wi(),e=Yi(),r=Qi();function i(t,i){var n=new e(t,i),s=new r(n);try{s.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&i&&i.from&&(/\.scss$/i.test(i.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(i.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(i.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return s.root}return mi=i,i.default=i,t.registerParse(i),mi}function tn(){if(wi)return gi;wi=1;class t{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){var r=e.node.rangeBy(e);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in e)this[i]=e[i]}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}}return gi=t,t.default=t,gi}function en(){if(Si)return bi;Si=1;var t=tn();class e{get content(){return this.css}constructor(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,r){void 0===r&&(r={}),r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);var i=new t(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter((t=>"warning"===t.type))}}return bi=e,e.default=e,bi}function rn(){if(Ci)return ki;Ci=1;var t={};return ki=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function nn(){if(Ii)return Mi;Ii=1;var t=Wi(),i=Hi(),n=Ji(),s=Ki(),o=en(),a=$i(),h=_r(),{isClean:u,my:l}=Fi(),c=rn(),f={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={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},v={Once:!0,postcssPlugin:!0,prepare:!0},p=0;function m(t){return"object"==typeof t&&"function"==typeof t.then}function y(t){var e=!1,r=f[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,p,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,p,r+"Exit"]:[r,r+"Exit"]}function g(t){return{eventIndex:0,events:"document"===t.type?["Document",p,"DocumentExit"]:"root"===t.type?["Root",p,"RootExit"]:y(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function w(t){return t[u]=!1,t.nodes&&t.nodes.forEach((t=>w(t))),t}var b={};class S{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"}constructor(e,i,n){var a;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof S||i instanceof o)a=w(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var h=s;n.syntax&&(h=n.syntax.parse),n.parser&&(h=n.parser),h.parse&&(h=h.parse);try{a=h(i,n)}catch(t){this.processed=!0,this.error=t}a&&!a[l]&&t.rebuild(a)}else a=w(i);this.result=new o(e,a,n),this.helpers=r({},b,{postcss:b,result:this.result}),this.plugins=this.processor.plugins.map((t=>"object"==typeof t&&t.prepare?r({},t,t.prepare(this.result)):t))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){var i=r.postcssPlugin,n=r.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!d[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!v[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e((function*(){t.plugin=0;for(var e=0;t.plugins.length>e;e++){var r=t.runOnRoot(t.plugins[e]);if(m(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var i=t.result.root;!i[u];){i[u]=!0;for(var n=[g(i)];n.length>0;){var s=t.visitTick(n);if(m(s))try{yield s}catch(e){throw t.handleError(e,n[n.length-1].node)}}}if(t.listeners.OnceExit){var o=function*(e){t.result.lastPlugin=a;try{if("document"===i.type){var r=i.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(i,t.helpers)}catch(e){throw t.handleError(e)}};for(var[a,h]of t.listeners.OnceExit)yield*o(h)}}return t.processed=!0,t.stringify()}))()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map((e=>t.Once(e,this.helpers)));return m(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=h;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=new n(e,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(var t of this.plugins)if(m(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[u];)e[u]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||c("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(t,e)}toString(){return this.css}visitSync(t,e){for(var[r,i]of t){this.result.lastPlugin=r;var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(m(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:r,visitors:i}=e;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&i.length>e.visitorIndex){var[n,s]=i[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=n;try{return s(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var o,a=e.iterator;o=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!o[u])return o[u]=!0,void t.push(g(o));e.iterator=0,delete r.indexes[a]}for(var h=e.events;h.length>e.eventIndex;){var l=h[e.eventIndex];if(e.eventIndex+=1,l===p)return void(r.nodes&&r.nodes.length&&(r[u]=!0,e.iterator=r.getIterator()));if(this.listeners[l])return void(e.visitors=this.listeners[l])}t.pop()}else t.pop()}walkSync(t){t[u]=!0;var e=y(t);for(var r of e)if(r===p)t.nodes&&t.each((t=>{t[u]||this.walkSync(t)}));else{var i=this.listeners[r];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}}return S.registerPostcss=t=>{b=t},Mi=S,S.default=S,a.registerLazyResult(S),i.registerLazyResult(S),Mi}function sn(){if(Oi)return Ai;Oi=1;var t=Gi(),e=ji(),n=Wi(),s=Lr(),o=Ui(),u=Hi(),l=function(){if(ui)return hi;ui=1;var t=Gi(),e=ji(),n=Ui(),s=Yi(),o=Vi(),u=$i(),l=Zi();function c(f,d){if(Array.isArray(f))return f.map((t=>c(t)));var{inputs:v}=f,p=i(f,a);if(v)for(var m of(d=[],v)){var y=r({},m,{__proto__:s.prototype});y.map&&(y.map=r({},y.map,{__proto__:o.prototype})),d.push(y)}if(p.nodes&&(p.nodes=f.nodes.map((t=>c(t,d)))),p.source){var g=p.source,{inputId:w}=g,b=i(g,h);p.source=b,null!=w&&(p.source.input=d[w])}if("root"===p.type)return new u(p);if("decl"===p.type)return new n(p);if("rule"===p.type)return new l(p);if("comment"===p.type)return new e(p);if("atrule"===p.type)return new t(p);throw new Error("Unknown node type: "+f.type)}return hi=c,c.default=c,hi}(),c=Yi(),f=nn(),d=qi(),v=Pi(),p=Ki(),m=function(){if(Ti)return Ei;Ti=1;var t=Hi(),e=nn(),r=function(){if(Ri)return xi;Ri=1;var t=Ji(),e=Ki(),r=en(),i=_r(),n=rn();class s{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;var t,r=e;try{t=r(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,n,s){var o;n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var a=i;this.result=new r(this._processor,o,this._opts),this.result.css=n;var h=this;Object.defineProperty(this.result,"root",{get(){return h.root}});var u=new t(a,o,this._opts,n);if(u.isMap()){var[l,c]=u.generate();l&&(this.result.css=l),c&&(this.result.map=c)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("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(t,e)}toString(){return this._css}warnings(){return[]}}return xi=s,s.default=s,xi}(),i=$i();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.6",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else if("function"==typeof r)e.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 e}process(t,i){return void 0===i&&(i={}),this.plugins.length||i.parser||i.stringifier||i.syntax?new e(this,t,i):new r(this,t,i)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}return Ei=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),Ei}(),y=en(),g=$i(),w=Zi(),b=_r(),S=tn();function k(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new m(e)}return k.plugin=function(t,e){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var r=e(...arguments);return r.postcssPlugin=t,r.postcssVersion=(new m).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return k([n(r)]).process(t,e)},n},k.stringify=b,k.parse=p,k.fromJSON=l,k.list=d,k.comment=t=>new e(t),k.atRule=e=>new t(e),k.decl=t=>new o(t),k.rule=t=>new w(t),k.root=t=>new g(t),k.document=t=>new u(t),k.CssSyntaxError=s,k.Declaration=o,k.Container=n,k.Processor=m,k.Document=u,k.Comment=e,k.Warning=S,k.AtRule=t,k.Result=y,k.Input=c,k.Rule=w,k.Root=g,k.Node=v,f.registerPostcss(k),Ai=k,k.default=k,Ai}!function(){if(Bi)return Li;Bi=1;var{Input:t}=sn(),e=function(){if(Ni)return Di;Ni=1;var t=ji(),e=Qi(),r=Xi();return Di=class extends e{checkMissedSemicolon(){}comment(e){var r=new t;this.init(r,e[2]);var i=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:i.col,line:i.line,offset:e[3]+1};var n=e[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some((t=>"word"===t[0]))&&super.decl(t)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(t){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(0!==r&&r>=0){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map((t=>t[1])).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map((t=>t[1])).join("")}unnamedAtrule(t){t.name=""}}}();Li=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}(),sn();var on=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(on||{});function an(t){var e=[];for(var r in t){var i=t[r];if("string"==typeof i){var n=fn(r);e.push(n+": "+i+";")}}return e.join(" ")}var hn=/-([a-z])/g,un=/^--[a-zA-Z0-9-]+$/,ln=t=>un.test(t)?t:t.replace(hn,((t,e)=>e?e.toUpperCase():"")),cn=/\B([A-Z])/g,fn=t=>t.replace(cn,"-$1").toLowerCase();class dn{constructor(){lr(this,"parentElement",null),lr(this,"parentNode",null),lr(this,"ownerDocument"),lr(this,"firstChild",null),lr(this,"lastChild",null),lr(this,"previousSibling",null),lr(this,"nextSibling",null),lr(this,"ELEMENT_NODE",1),lr(this,"TEXT_NODE",3),lr(this,"nodeType"),lr(this,"nodeName"),lr(this,"RRNodeType")}get childNodes(){for(var t=[],e=this.firstChild;e;)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof dn))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,e){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class vn extends dn{constructor(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];super(e),lr(this,"nodeType",9),lr(this,"nodeName","#document"),lr(this,"compatMode","CSS1Compat"),lr(this,"RRNodeType",on.Document),lr(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find((t=>t.RRNodeType===on.Element&&"HTML"===t.tagName))||null}get body(){var t;return(null==(t=this.documentElement)?void 0:t.childNodes.find((t=>t.RRNodeType===on.Element&&"BODY"===t.tagName)))||null}get head(){var t;return(null==(t=this.documentElement)?void 0:t.childNodes.find((t=>t.RRNodeType===on.Element&&"HEAD"===t.tagName)))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){var e=t.RRNodeType;if((e===on.Element||e===on.DocumentType)&&this.childNodes.some((t=>t.RRNodeType===e)))throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one "+(e===on.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var r=Cn(this,t);return r.parentElement=null,r}insertBefore(t,e){var r=t.RRNodeType;if((r===on.Element||r===on.DocumentType)&&this.childNodes.some((t=>t.RRNodeType===r)))throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one "+(r===on.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var i=Mn(this,t,e);return i.parentElement=null,i}removeChild(t){return In(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){var e;if('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'===t?e="-//W3C//DTD XHTML 1.0 Transitional//EN":'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'===t&&(e="-//W3C//DTD HTML 4.0 Transitional//EN"),e){var r=this.createDocumentType("html",e,"");this.open(),this.appendChild(r)}}createDocument(t,e,r){return new vn}createDocumentType(t,e,r){var i=new pn(t,e,r);return i.ownerDocument=this,i}createElement(t){var e=new mn(t);return e.ownerDocument=this,e}createElementNS(t,e){return this.createElement(e)}createTextNode(t){var e=new wn(t);return e.ownerDocument=this,e}createComment(t){var e=new bn(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new Sn(t);return e.ownerDocument=this,e}toString(){return"RRDocument"}}class pn extends dn{constructor(t,e,r){super(),lr(this,"nodeType",10),lr(this,"RRNodeType",on.DocumentType),lr(this,"name"),lr(this,"publicId"),lr(this,"systemId"),lr(this,"textContent",null),this.name=t,this.publicId=e,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}}class mn extends dn{constructor(t){super(),lr(this,"nodeType",1),lr(this,"RRNodeType",on.Element),lr(this,"tagName"),lr(this,"attributes",{}),lr(this,"shadowRoot",null),lr(this,"scrollLeft"),lr(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){var t="";return this.childNodes.forEach((e=>t+=e.textContent)),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new kn(this.attributes.class,(t=>{this.attributes.class=t}))}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){var t,e,r=this.attributes.style?(t={},e=/:(.+)/,this.attributes.style.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach((function(r){if(r){var i=r.split(e);i.length>1&&(t[ln(i[0].trim())]=i[1].trim())}})),t):{},i=/\B([A-Z])/g;return r.setProperty=(t,e,n)=>{if(!i.test(t)){var s=ln(t);e?r[s]=e:delete r[s],"important"===n&&(r[s]+=" !important"),this.attributes.style=an(r)}},r.removeProperty=t=>{if(i.test(t))return"";var e=ln(t),n=r[e]||"";return delete r[e],this.attributes.style=an(r),n},r}getAttribute(t){return void 0===this.attributes[t]?null:this.attributes[t]}setAttribute(t,e){this.attributes[t]=e}setAttributeNS(t,e,r){this.setAttribute(e,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return Cn(this,t)}insertBefore(t,e){return Mn(this,t,e)}removeChild(t){return In(this,t)}attachShadow(t){var e=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=e,e}dispatchEvent(t){return!0}toString(){var t="";for(var e in this.attributes)t+=e+'="'+this.attributes[e]+'" ';return this.tagName+" "+t}}class yn extends mn{constructor(){super(...arguments),lr(this,"currentTime"),lr(this,"volume"),lr(this,"paused"),lr(this,"muted"),lr(this,"playbackRate"),lr(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class gn extends mn{constructor(){super(...arguments),lr(this,"tagName","DIALOG"),lr(this,"nodeName","DIALOG")}get isModal(){return"modal"===this.getAttribute("rr_open_mode")}get open(){return null!==this.getAttribute("open")}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class wn extends dn{constructor(t){super(),lr(this,"nodeType",3),lr(this,"nodeName","#text"),lr(this,"RRNodeType",on.Text),lr(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRText text="+JSON.stringify(this.data)}}class bn extends dn{constructor(t){super(),lr(this,"nodeType",8),lr(this,"nodeName","#comment"),lr(this,"RRNodeType",on.Comment),lr(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRComment text="+JSON.stringify(this.data)}}class Sn extends dn{constructor(t){super(),lr(this,"nodeName","#cdata-section"),lr(this,"nodeType",4),lr(this,"RRNodeType",on.CDATA),lr(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRCDATASection data="+JSON.stringify(this.data)}}class kn{constructor(t,e){var r=this;if(lr(this,"onChange"),lr(this,"classes",[]),lr(this,"add",(function(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];for(var n of e){var s=String(n);0>r.classes.indexOf(s)&&r.classes.push(s)}r.onChange&&r.onChange(r.classes.join(" "))})),lr(this,"remove",(function(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];r.classes=r.classes.filter((t=>-1===e.indexOf(t))),r.onChange&&r.onChange(r.classes.join(" "))})),t){var i=t.trim().split(/\s+/);this.classes.push(...i)}this.onChange=e}}function Cn(t,e){return e.parentNode&&e.parentNode.removeChild(e),t.lastChild?(t.lastChild.nextSibling=e,e.previousSibling=t.lastChild):(t.firstChild=e,e.previousSibling=null),t.lastChild=e,e.nextSibling=null,e.parentNode=t,e.parentElement=t,e.ownerDocument=t.ownerDocument,e}function Mn(t,e,r){if(!r)return Cn(t,e);if(r.parentNode!==t)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===r||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=r.previousSibling,r.previousSibling=e,e.nextSibling=r,e.previousSibling?e.previousSibling.nextSibling=e:t.firstChild=e,e.parentElement=t,e.parentNode=t,e.ownerDocument=t.ownerDocument),e}function In(t,e){if(e.parentNode!==t)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:t.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:t.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var xn=(t=>(t[t.PLACEHOLDER=0]="PLACEHOLDER",t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",t[t.ENTITY_NODE=6]="ENTITY_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",t))(xn||{}),Rn={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},En={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"},Tn=null;function An(t,e,r,i){void 0===i&&(i=e.mirror||e.ownerDocument.mirror),t=function(t,e,r,i){var n;if(r.afterAppend&&!Tn&&(Tn=new WeakSet,setTimeout((()=>{Tn=null}),0)),!Nn(t,e)){var s=Dn(e,r.mirror,i);null==(n=t.parentNode)||n.replaceChild(s,t),t=s}switch(e.RRNodeType){case on.Document:if(!Ln(t,e,r.mirror,i)){var o=i.getMeta(e);o&&(r.mirror.removeNodeFromMap(t),t.close(),t.open(),r.mirror.add(t,o),null==Tn||Tn.add(t))}break;case on.Element:var a=t,h=e;switch(h.tagName){case"IFRAME":var u=t.contentDocument;if(!u)break;An(u,e.contentDocument,r,i)}h.shadowRoot&&(a.shadowRoot||a.attachShadow({mode:"open"}),On(a.shadowRoot,h.shadowRoot,r,i)),function(t,e,r){var i=t.attributes,n=e.attributes,s=function(){var i=n[o],s=r.getMeta(e);if((null==s?void 0:s.isSVG)&&Rn[o])t.setAttributeNS(Rn[o],o,i);else if("CANVAS"===e.tagName&&"rr_dataURL"===o){var a=document.createElement("img");a.src=i,a.onload=()=>{var e=t.getContext("2d");e&&e.drawImage(a,0,0,a.width,a.height)}}else{if("IFRAME"===e.tagName&&"srcdoc"===o)return 1;try{t.getAttribute(o)!==i&&t.setAttribute(o,i)}catch(t){console.warn(t)}}};for(var o in n)s();for(var{name:a}of Array.from(i))a in n||t.removeAttribute(a);e.scrollLeft&&(t.scrollLeft=e.scrollLeft),e.scrollTop&&(t.scrollTop=e.scrollTop)}(a,h,i)}return t}(t,e,r,i),On(t,e,r,i),function(t,e,r){var i;switch(e.RRNodeType){case on.Document:var n=e.scrollData;n&&r.applyScroll(n,!0);break;case on.Element:var s=t,o=e;switch(o.scrollData&&r.applyScroll(o.scrollData,!0),o.inputData&&r.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":var a=t,h=o;void 0!==h.paused&&(h.paused?a.pause():a.play()),void 0!==h.muted&&(a.muted=h.muted),void 0!==h.volume&&(a.volume=h.volume),void 0!==h.currentTime&&(a.currentTime=h.currentTime),void 0!==h.playbackRate&&(a.playbackRate=h.playbackRate),void 0!==h.loop&&(a.loop=h.loop);break;case"CANVAS":var u=e;if(null!==u.rr_dataURL){var l=document.createElement("img");l.onload=()=>{var t=s.getContext("2d");t&&t.drawImage(l,0,0,l.width,l.height)},l.src=u.rr_dataURL}u.canvasMutations.forEach((e=>r.applyCanvas(e.event,e.mutation,t)));break;case"STYLE":var c=s.sheet;c&&e.rules.forEach((t=>r.applyStyleSheetMutation(t,c)));break;case"DIALOG":var f=s,d=o,v=f.open,p=f.matches("dialog:modal"),m=d.open,y=d.isModal,g=p!==y,w=v!==m;if((g||v&&w)&&f.close(),m&&(w||g))try{y?f.showModal():f.show()}catch(t){console.warn(t)}}break;case on.Text:case on.Comment:case on.CDATA:t.textContent!==e.data&&(t.textContent=e.data)}(null==Tn?void 0:Tn.has(t))&&(Tn.delete(t),null==(i=r.afterAppend)||i.call(r,t,r.mirror.getId(t)))}(t,e,r)}function On(t,e,r,i){var n=Array.from(t.childNodes),s=e.childNodes;if(0!==n.length||0!==s.length){for(var o=0,a=n.length-1,h=0,u=s.length-1,l=n[o],c=n[a],f=s[h],d=s[u],v=void 0,p=void 0;a>=o&&u>=h;)if(void 0===l)l=n[++o];else if(void 0===c)c=n[--a];else if(Ln(l,f,r.mirror,i))l=n[++o],f=s[++h];else if(Ln(c,d,r.mirror,i))c=n[--a],d=s[--u];else if(Ln(l,d,r.mirror,i)){try{t.insertBefore(l,c.nextSibling)}catch(t){console.warn(t)}l=n[++o],d=s[--u]}else if(Ln(c,f,r.mirror,i)){try{t.insertBefore(c,l)}catch(t){console.warn(t)}c=n[--a],f=s[++h]}else{if(!v){v={};for(var m=o;a>=m;m++){var y=n[m];y&&r.mirror.hasNode(y)&&(v[r.mirror.getId(y)]=m)}}var g=n[p=v[i.getId(f)]];if(void 0!==p&&g&&Ln(g,f,r.mirror,i)){try{t.insertBefore(g,l)}catch(t){console.warn(t)}n[p]=void 0}else{var w=Dn(f,r.mirror,i);"#document"===t.nodeName&&l&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&l.nodeType===l.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&l.nodeType===l.ELEMENT_NODE)&&(t.removeChild(l),r.mirror.removeNodeFromMap(l),l=n[++o]);try{t.insertBefore(w,l||null)}catch(t){console.warn(t)}}f=s[++h]}if(o>a){var b=s[u+1],S=null;for(b&&(S=r.mirror.getNode(i.getId(b)));u>=h;++h){var k=Dn(s[h],r.mirror,i);try{t.insertBefore(k,S)}catch(t){console.warn(t)}}}else if(h>u)for(;a>=o;o++){var C=n[o];if(C&&C.parentNode===t)try{t.removeChild(C),r.mirror.removeNodeFromMap(C)}catch(t){console.warn(t)}}for(var M=t.firstChild,I=e.firstChild;null!==M&&null!==I;)An(M,I,r,i),M=M.nextSibling,I=I.nextSibling}}function Dn(t,e,i){var n=i.getId(t),s=i.getMeta(t),o=null;if(n>-1&&(o=e.getNode(n)),null!==o&&Nn(o,t))return o;switch(t.RRNodeType){case on.Document:o=new Document;break;case on.DocumentType:o=document.implementation.createDocumentType(t.name,t.publicId,t.systemId);break;case on.Element:var a=t.tagName.toLowerCase();a=En[a]||a,o=s&&"isSVG"in s&&(null==s?void 0:s.isSVG)?document.createElementNS(Rn.svg,a):document.createElement(t.tagName);break;case on.Text:o=document.createTextNode(t.data);break;case on.Comment:o=document.createComment(t.data);break;case on.CDATA:o=document.createCDATASection(t.data)}s&&e.add(o,r({},s));try{null==Tn||Tn.add(o)}catch(t){}return o}function Nn(t,e){return t.nodeType===e.nodeType&&(t.nodeType!==t.ELEMENT_NODE||t.tagName.toUpperCase()===e.tagName)}function Ln(t,e,r,i){var n=r.getId(t),s=i.getId(e);return-1!==n&&n===s&&Nn(t,e)}class Bn extends vn{constructor(t){super(),lr(this,"UNSERIALIZED_STARTING_ID",-2),lr(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),lr(this,"mirror",new $n),lr(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this.l--}createDocument(t,e,r){return new Bn}createDocumentType(t,e,r){var i=new _n(t,e,r);return i.ownerDocument=this,i}createElement(t){var e,r=t.toUpperCase();switch(r){case"AUDIO":case"VIDEO":e=new Pn(r);break;case"IFRAME":e=new Gn(r,this.mirror);break;case"CANVAS":e=new Un(r);break;case"STYLE":e=new Wn(r);break;case"DIALOG":e=new jn(r);break;default:e=new Fn(r)}return e.ownerDocument=this,e}createComment(t){var e=new zn(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new Vn(t);return e.ownerDocument=this,e}createTextNode(t){var e=new Hn(t);return e.ownerDocument=this,e}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this.l=this.UNSERIALIZED_STARTING_ID}}var _n=pn;class Fn extends mn{constructor(){super(...arguments),lr(this,"inputData",null),lr(this,"scrollData",null)}}class Pn extends yn{}class jn extends gn{}class Un extends Fn{constructor(){super(...arguments),lr(this,"rr_dataURL",null),lr(this,"canvasMutations",[])}getContext(){return null}}class Wn extends Fn{constructor(){super(...arguments),lr(this,"rules",[])}}class Gn extends Fn{constructor(t,e){super(t),lr(this,"contentDocument",new Bn),this.contentDocument.mirror=e}}var Hn=wn,zn=bn,Vn=Sn;function Yn(t,e,i,n){var s,o;switch(t.nodeType){case xn.DOCUMENT_NODE:n&&"IFRAME"===n.nodeName?s=n.contentDocument:(s=e).compatMode=t.compatMode;break;case xn.DOCUMENT_TYPE_NODE:s=e.createDocumentType(t.name,t.publicId,t.systemId);break;case xn.ELEMENT_NODE:var a=t,h=(o=a)instanceof HTMLFormElement?"FORM":o.tagName.toUpperCase(),u=s=e.createElement(h);for(var{name:l,value:c}of Array.from(a.attributes))u.attributes[l]=c;a.scrollLeft&&(u.scrollLeft=a.scrollLeft),a.scrollTop&&(u.scrollTop=a.scrollTop);break;case xn.TEXT_NODE:s=e.createTextNode(t.textContent||"");break;case xn.CDATA_SECTION_NODE:s=e.createCDATASection(t.data);break;case xn.COMMENT_NODE:s=e.createComment(t.textContent||"");break;case xn.DOCUMENT_FRAGMENT_NODE:s=n.attachShadow({mode:"open"});break;default:return null}var f=i.getMeta(t);return e instanceof Bn&&(f||(f=qn(s,e.unserializedId),i.add(t,f)),e.mirror.add(s,r({},f))),s}class $n{constructor(){lr(this,"idNodeMap",new Map),lr(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t)))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function qn(t,e){switch(t.RRNodeType){case on.Document:return{id:e,type:t.RRNodeType,childNodes:[]};case on.DocumentType:return{id:e,type:t.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId};case on.Element:return{id:e,type:t.RRNodeType,tagName:t.tagName.toLowerCase(),attributes:{},childNodes:[]};case on.Text:case on.Comment:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case on.CDATA:return{id:e,type:t.RRNodeType,textContent:""}}}var Zn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},Jn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},Xn={};function Qn(t){if(Xn[t])return Xn[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in Zn?Zn[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in Jn?Jn[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return Xn[t]=e.prototype,e.prototype;var a=document.createElement("iframe");try{document.body.appendChild(a);var h=a.contentWindow;if(!h)return e.prototype;var u=h[t].prototype;return u?Xn[t]=u:r}catch(t){return r}finally{a.parentNode&&document.body.removeChild(a)}}var Kn={};function ts(t,e,r){var i,n=t+"."+String(r);if(Kn[n])return Kn[n].call(e);var s=Qn(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(Kn[n]=o,o.call(e)):e[r]}var es={};function rs(t,e,r){var i=t+"."+String(r);if(es[i])return es[i].bind(e);var n=Qn(t)[r];return"function"!=typeof n?e[r]:(es[i]=n,n.bind(e))}function is(){return Qn("MutationObserver").constructor}function ns(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}var ss={childNodes:t=>ts("Node",t,"childNodes"),parentNode:t=>ts("Node",t,"parentNode"),parentElement:t=>ts("Node",t,"parentElement"),textContent:t=>ts("Node",t,"textContent"),contains:(t,e)=>rs("Node",t,"contains")(e),getRootNode:t=>rs("Node",t,"getRootNode")(),host:t=>t&&"host"in t?ts("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?ts("Element",t,"shadowRoot"):null,querySelector:(t,e)=>rs("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>rs("Element",t,"querySelectorAll")(e),mutationObserver:is,patch:ns};function os(t,e,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>r.removeEventListener(t,e,i)}function as(t){try{t()}catch(t){if(!(t instanceof DOMException&&"SecurityError"===t.name))throw t}}var hs="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.",us={map:{},getId(){return console.error(hs),-1},getNode(){return console.error(hs),null},removeNodeFromMap(){console.error(hs)},has(){return console.error(hs),!1},reset(){console.error(hs)}};function ls(t,e,r){void 0===r&&(r={});var i=null,n=0;return function(){for(var s=arguments.length,o=new Array(s),a=0;s>a;a++)o[a]=arguments[a];var h=Date.now();n||!1!==r.leading||(n=h);var u=e-(h-n),l=this;0>=u||u>e?(i&&(clearTimeout(i),i=null),n=h,t.apply(l,o)):i||!1===r.trailing||(i=setTimeout((()=>{n=!1===r.leading?0:Date.now(),i=null,t.apply(l,o)}),u))}}function cs(t,e,r,i,n){void 0===n&&(n=window);var s=n.Object.getOwnPropertyDescriptor(t,e);return n.Object.defineProperty(t,e,i?r:{set(t){setTimeout((()=>{r.set.call(this,t)}),0),s&&s.set&&s.set.call(this,t)}}),()=>cs(t,e,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(us=new Proxy(us,{get(t,e,r){return"map"===e&&console.error(hs),Reflect.get(t,e,r)}}));var fs=Date.now;function ds(t){var e,r,i,n,s=t.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:s.documentElement.scrollLeft||(null==s?void 0:s.body)&&(null==(e=ss.parentElement(s.body))?void 0:e.scrollLeft)||(null==(r=null==s?void 0:s.body)?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==s?void 0:s.documentElement.scrollTop)||(null==s?void 0:s.body)&&(null==(i=ss.parentElement(s.body))?void 0:i.scrollTop)||(null==(n=null==s?void 0:s.body)?void 0:n.scrollTop)||0}}function vs(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ps(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ms(t){return t?t.nodeType===t.ELEMENT_NODE?t:ss.parentElement(t):null}function ys(t,e,r,i){if(!t)return!1;var n=ms(t);if(!n)return!1;try{if("string"==typeof e){if(n.classList.contains(e))return!0;if(i&&null!==n.closest("."+e))return!0}else if(it(n,e,i))return!0}catch(t){}if(r){if(n.matches(r))return!0;if(i&&null!==n.closest(r))return!0}return!1}function gs(t,e){return-1!==e.getId(t)}function ws(t,e,r){return!("TITLE"!==t.tagName||!r.headTitleMutations)||e.getId(t)===q}function bs(t,e){if(I(t))return!1;var r=e.getId(t);if(!e.has(r))return!0;var i=ss.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||bs(i,e))}function Ss(t){return Boolean(t.changedTouches)}function ks(t){void 0===t&&(t=window),"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=[].forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=[].forEach)}function Cs(t){var e={},r=(t,r)=>{var i={value:t,parent:r,children:[]};return e[t.node.id]=i,i},i=[];for(var n of t){var{nextId:s,parentId:o}=n;if(s&&s in e){var a=e[s];if(a.parent){var h=a.parent.children.indexOf(a);a.parent.children.splice(h,0,r(n,a.parent))}else{var u=i.indexOf(a);i.splice(u,0,r(n,null))}}else if(o in e){var l=e[o];l.children.push(r(n,l))}else i.push(r(n,null))}return i}function Ms(t,e){e(t.value);for(var r=t.children.length-1;r>=0;r--)Ms(t.children[r],e)}function Is(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function xs(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function Rs(t,e){var r,i,n=null==(i=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:i.frameElement;if(!n||n===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};var s=n.getBoundingClientRect(),o=Rs(n,e),a=s.height/n.clientHeight;return{x:s.x*o.relativeScale+o.x,y:s.y*o.relativeScale+o.y,relativeScale:a,absoluteScale:o.absoluteScale*a}}function Es(t){return!!t&&(t instanceof dn&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(ss.shadowRoot(t)))}function Ts(t,e){var r=null==t?void 0:t[e[0]];return r?1===e.length?r:Ts(r.cssRules,e.slice(1)):null}function As(t){var e=[...t],r=e.pop();return{positions:e,index:r}}function Os(t){for(var e=new Set,r=[],i=t.length;i--;){var n=t[i];e.has(n.id)||(r.push(n),e.add(n.id))}return r}/[1-9][0-9]{12}/.test(Date.now().toString())||(fs=()=>(new Date).getTime());class Ds{constructor(){c(this,"id",1),c(this,"styleIDMap",new WeakMap),c(this,"idStyleMap",new Map)}getId(t){var e;return null!==(e=this.styleIDMap.get(t))&&void 0!==e?e:-1}has(t){return this.styleIDMap.has(t)}add(t,e){return this.has(t)?this.getId(t):(r=void 0===e?this.id++:e,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r);var r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Ns(t){var e,r=null;return"getRootNode"in t&&(null==(e=ss.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ss.host(ss.getRootNode(t))&&(r=ss.host(ss.getRootNode(t))),r}function Ls(t){for(var e,r=t;e=Ns(r);)r=e;return r}function Bs(t){var e=t.ownerDocument;if(!e)return!1;var r=Ls(t);return ss.contains(e,r)}function _s(t){var e=t.ownerDocument;return!!e&&(ss.contains(e,t)||Bs(t))}var Fs=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Ds,get _mirror(){return us},callSafely:as,closestElementOfNode:ms,getBaseDimension:Rs,getNestedRule:Ts,getPositionsAndIndex:As,getRootShadowHost:Ls,getShadowHost:Ns,getWindowHeight:vs,getWindowScroll:ds,getWindowWidth:ps,hasShadowRoot:Es,hookSetter:cs,inDom:_s,isAncestorRemoved:bs,isBlocked:ys,isIgnored:ws,isSerialized:gs,isSerializedIframe:Is,isSerializedStylesheet:xs,iterateResolveTree:Ms,legacy_isTouchEvent:Ss,get nowTimestamp(){return fs},on:os,polyfill:ks,queueToResolveTrees:Cs,shadowHostInDom:Bs,throttle:ls,uniqueTextMutations:Os},Symbol.toStringTag,{value:"Module"})),Ps=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(Ps||{}),js=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(js||{}),Us=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Us||{}),Ws=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Ws||{}),Gs=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Gs||{}),Hs=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Hs||{}),zs=(t=>(t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back",t.Destroy="destroy",t))(zs||{}),Vs=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Vs||{});function Ys(t){return"__ln"in t}class $s{constructor(){c(this,"length",0),c(this,"head",null),c(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");for(var e=this.head,r=0;t>r;r++)e=(null==e?void 0:e.next)||null;return e}addNode(t){var e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&Ys(t.previousSibling)){var r=t.previousSibling.__ln.next;e.next=r,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,r&&(r.previous=e)}else if(t.nextSibling&&Ys(t.nextSibling)&&t.nextSibling.__ln.previous){var i=t.nextSibling.__ln.previous;e.previous=i,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,i&&(i.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){var e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}var qs,Zs=(t,e)=>t+"@"+e;class Js{constructor(){c(this,"frozen",!1),c(this,"locked",!1),c(this,"texts",[]),c(this,"attributes",[]),c(this,"attributeMap",new WeakMap),c(this,"removes",[]),c(this,"mapRemoves",[]),c(this,"movedMap",{}),c(this,"addedSet",new Set),c(this,"movedSet",new Set),c(this,"droppedSet",new Set),c(this,"removesSubTreeCache",new Set),c(this,"mutationCb"),c(this,"blockClass"),c(this,"blockSelector"),c(this,"maskTextClass"),c(this,"maskTextSelector"),c(this,"inlineStylesheet"),c(this,"maskInputOptions"),c(this,"maskTextFn"),c(this,"maskInputFn"),c(this,"keepIframeSrcFn"),c(this,"recordCanvas"),c(this,"inlineImages"),c(this,"slimDOMOptions"),c(this,"dataURLOptions"),c(this,"doc"),c(this,"mirror"),c(this,"iframeManager"),c(this,"stylesheetManager"),c(this,"shadowDomManager"),c(this,"canvasManager"),c(this,"processedNodeManager"),c(this,"unattachedDoc"),c(this,"canvasManagerReleased",!1),c(this,"processMutations",(t=>{t.forEach(this.processMutation),this.emit()})),c(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var t=[],e=new Set,r=new $s,i=t=>{for(var e=t,r=q;r===q;)r=(e=e&&e.nextSibling)&&this.mirror.getId(e);return r},n=n=>{var s=ss.parentNode(n);if(s&&_s(n)&&"TEXTAREA"!==s.tagName){var o=I(s)?this.mirror.getId(Ns(n)):this.mirror.getId(s),a=i(n);if(-1===o||-1===a)return r.addNode(n);var h=dt(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:t=>{Is(t,this.mirror)&&this.iframeManager.addIframe(t),xs(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),Es(n)&&this.shadowDomManager.addShadowRoot(ss.shadowRoot(n),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onIframeListenerRegistered:(t,e)=>{this.iframeManager.registerLoadListenerDisposer(t,e)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});h&&(t.push({parentId:o,nextId:a,node:h}),e.add(h.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var s of this.movedSet)Qs(this.removesSubTreeCache,s)&&!this.movedSet.has(ss.parentNode(s))||n(s);for(var o of this.addedSet)Ks(this.droppedSet,o)||Qs(this.removesSubTreeCache,o)?Ks(this.movedSet,o)?n(o):this.droppedSet.add(o):n(o);for(var a=null;r.length;){var h=null;if(a){var u=this.mirror.getId(ss.parentNode(a.value)),l=i(a.value);-1!==u&&-1!==l&&(h=a)}if(!h)for(var c=r.tail;c;){var f=c;if(c=c.previous,f){var d=this.mirror.getId(ss.parentNode(f.value));if(-1===i(f.value))continue;if(-1!==d){h=f;break}var v=ss.parentNode(f.value);if(v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var p=ss.host(v);if(-1!==this.mirror.getId(p)){h=f;break}}}}if(!h){for(;r.head;)r.removeNode(r.head.value);break}a=h.previous,r.removeNode(h.value),n(h.value)}var m={texts:this.texts.map((t=>{var e=t.node,r=ss.parentNode(e);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(e),value:t.value}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),attributes:this.attributes.map((t=>{var{attributes:e}=t;if("string"==typeof e.style){var r=JSON.stringify(t.styleDiff),i=JSON.stringify(t._unchangedStyles);e.style.length>r.length&&(r+i).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}return{id:this.mirror.getId(t.node),attributes:e}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(m.texts.length||m.attributes.length||m.removes.length||m.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(m))}})),c(this,"bufferBelongsToIframe",(t=>this.doc===t.contentDocument)),c(this,"genTextAreaValueMutation",(t=>{var e=this.attributeMap.get(t);e||(this.attributes.push(e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t,e));var r=Array.from(ss.childNodes(t),(t=>ss.textContent(t)||"")).join("");e.attributes.value=O({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:L(t),value:r,maskInputFn:this.maskInputFn})})),c(this,"processMutation",(t=>{if(!ws(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":var e=ss.textContent(t.target);ys(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:nt(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,ms(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break;case"attributes":var r=t.target,i=t.attributeName,n=t.target.getAttribute(i);if("value"===i){var s=L(r);n=O({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:n,maskInputFn:this.maskInputFn})}if(ys(t.target,this.blockClass,this.blockSelector,!1)||n===t.oldValue)return;var o=this.attributeMap.get(t.target);if("IFRAME"===r.tagName&&"src"===i&&!this.keepIframeSrcFn(n)){if(r.contentDocument)return;i="rr_src"}if(o||(this.attributes.push(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t.target,o)),"type"===i&&"INPUT"===r.tagName&&"password"===(t.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!rt(r.tagName,i))if(o.attributes[i]=et(this.doc,D(r.tagName),D(i),n,r,this.dataURLOptions),"style"===i){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var a=this.unattachedDoc.createElement("span");for(var h of(t.oldValue&&a.setAttribute("style",t.oldValue),Array.from(r.style))){var u=r.style.getPropertyValue(h),l=r.style.getPropertyPriority(h);u!==a.style.getPropertyValue(h)||l!==a.style.getPropertyPriority(h)?o.styleDiff[h]=""===l?u:[u,l]:o._unchangedStyles[h]=[u,l]}for(var c of Array.from(a.style))""===r.style.getPropertyValue(c)&&(o.styleDiff[c]=!1)}else"open"===i&&"DIALOG"===r.tagName&&(o.attributes.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal");break;case"childList":if(ys(t.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void this.genTextAreaValueMutation(t.target);t.addedNodes.forEach((e=>this.genAdds(e,t.target))),t.removedNodes.forEach((e=>{var r=this.mirror.getId(e),i=I(t.target)?this.mirror.getId(ss.host(t.target)):this.mirror.getId(t.target);ys(t.target,this.blockClass,this.blockSelector,!1)||ws(e,this.mirror,this.slimDOMOptions)||!gs(e,this.mirror)||(this.addedSet.has(e)?(Xs(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===r||bs(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[Zs(r,i)]?Xs(this.movedSet,e):(this.removes.push({parentId:i,id:r,isShadow:!(!I(t.target)||!x(t.target))||void 0}),function(t,e){for(var r=[t];r.length;){var i=r.pop();e.has(i)||(e.add(i),ss.childNodes(i).forEach((t=>r.push(t))))}}(e,this.removesSubTreeCache))),this.mapRemoves.push(e))}))}})),c(this,"genAdds",((t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(ws(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);var r=null;e&&this.mirror.hasNode(e)&&(r=this.mirror.getId(e)),r&&-1!==r&&(this.movedMap[Zs(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ys(t,this.blockClass,this.blockSelector,!1)||(ss.childNodes(t).forEach((t=>this.genAdds(t))),Es(t)&&ss.childNodes(ss.shadowRoot(t)).forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)})))}}))}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((e=>{this[e]=t[e]})),this.canvasManager.acquire()}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.releaseCanvasManager()}releaseCanvasManager(){this.canvasManagerReleased||(this.canvasManagerReleased=!0,this.canvasManager.reset())}bufferDoc(){return this.doc}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function Xs(t,e){t.delete(e),ss.childNodes(e).forEach((e=>Xs(t,e)))}function Qs(t,e,r){return 0!==t.size&&function(t,e,r){var i=ss.parentNode(e);return!!i&&t.has(i)}(t,e)}function Ks(t,e){return 0!==t.size&&to(t,e)}function to(t,e){var r=ss.parentNode(e);return!!r&&(!!t.has(r)||to(t,r))}var eo=t=>qs?function(){try{return t(...arguments)}catch(t){if(qs&&!0===qs(t))return;throw t}}:t,ro=[];function io(t){try{if("composedPath"in t){var e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function no(t,e){var r=new Js;ro.push(r),r.init(t);var i=new(is())(eo(r.processMutations.bind(r)));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{observer:i,buffer:r}}function so(t){var{scrollCb:e,doc:r,mirror:i,blockClass:n,blockSelector:s,sampling:o}=t,a=new Map,h=t=>{var o=io(t);if(o&&!ys(o,n,s,!0)){var h,u,l=i.getId(o);if(o===r&&r.defaultView){var c=ds(r.defaultView);h=c.left,u=c.top}else h=o.scrollLeft,u=o.scrollTop;var f=h+","+u;a.get(l)!==f&&(a.set(l,f),e({id:l,x:h,y:u}))}},u=[os("scroll",eo(ls(eo((t=>h(t))),o.scroll||100)),r)];return"onscrollend"in r&&u.push(os("scrollend",eo(h),r)),()=>u.forEach((t=>t()))}function oo(t,e){for(var r=ro.length-1;r>=0;r--){var i=ro[r];if(i){var n=i.bufferBelongsToIframe(t);!n&&e&&e.has(i.bufferDoc())&&(n=!0),n&&(i.reset(),ro.splice(r,1))}}}var ao=["INPUT","TEXTAREA","SELECT"],ho=new WeakMap;function uo(t){return function t(e,r){if(vo("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||vo("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||vo("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||vo("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var i=Array.from(e.parentRule.cssRules).indexOf(e);return r.unshift(i),t(e.parentRule,r)}if(e.parentStyleSheet){var n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);r.unshift(n)}return r}(t,[])}function lo(t,e,r){var i,n;return t?(t.ownerNode?i=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:i}):{}}function co(t,e){var r,i,n,s,{mirror:o,stylesheetManager:a}=t;s=o.getId("#document"===e.nodeName?e:ss.host(e));var h="#document"===e.nodeName?null==(r=e.defaultView)?void 0:r.Document:null==(n=null==(i=e.ownerDocument)?void 0:i.defaultView)?void 0:n.ShadowRoot,u=(null==h?void 0:h.prototype)?Object.getOwnPropertyDescriptor(null==h?void 0:h.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&h&&u?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var t;return null==(t=u.get)?void 0:t.call(this)},set(t){var e,r=null==(e=u.set)?void 0:e.call(this,t);if(null!==s&&-1!==s)try{a.adoptStyleSheets(t,s)}catch(t){}return r}}),eo((()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))):()=>{}}function fo(t,e){void 0===e&&(e={});var i,n,s=t.doc.defaultView;if(!s)return()=>{};if(function(t,e){var{mutationCb:r,mousemoveCb:i,mouseInteractionCb:n,scrollCb:s,viewportResizeCb:o,inputCb:a,mediaInteractionCb:h,styleSheetRuleCb:u,styleDeclarationCb:l,canvasMutationCb:c,fontCb:f,selectionCb:d,customElementCb:v}=t;t.mutationCb=function(){e.mutation&&e.mutation(...arguments),r(...arguments)},t.mousemoveCb=function(){e.mousemove&&e.mousemove(...arguments),i(...arguments)},t.mouseInteractionCb=function(){e.mouseInteraction&&e.mouseInteraction(...arguments),n(...arguments)},t.scrollCb=function(){e.scroll&&e.scroll(...arguments),s(...arguments)},t.viewportResizeCb=function(){e.viewportResize&&e.viewportResize(...arguments),o(...arguments)},t.inputCb=function(){e.input&&e.input(...arguments),a(...arguments)},t.mediaInteractionCb=function(){e.mediaInteaction&&e.mediaInteaction(...arguments),h(...arguments)},t.styleSheetRuleCb=function(){e.styleSheetRule&&e.styleSheetRule(...arguments),u(...arguments)},t.styleDeclarationCb=function(){e.styleDeclaration&&e.styleDeclaration(...arguments),l(...arguments)},t.canvasMutationCb=function(){e.canvasMutation&&e.canvasMutation(...arguments),c(...arguments)},t.fontCb=function(){e.font&&e.font(...arguments),f(...arguments)},t.selectionCb=function(){e.selection&&e.selection(...arguments),d(...arguments)},t.customElementCb=function(){e.customElement&&e.customElement(...arguments),v(...arguments)}}(t,e),t.recordDOM){var o=no(t,t.doc);i=o.observer,n=o.buffer}var a=function(t){var{mousemoveCb:e,sampling:r,doc:i,mirror:n}=t;if(!1===r.mousemove)return()=>{};var s,o="number"==typeof r.mousemove?r.mousemove:50,a="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,h=[],u=ls(eo((t=>{var r=Date.now()-s;e(h.map((t=>(t.timeOffset-=r,t))),t),h=[],s=null})),a),l=eo(ls(eo((t=>{var e=io(t),{clientX:r,clientY:i}=Ss(t)?t.changedTouches[0]:t;s||(s=fs()),h.push({x:r,y:i,id:n.getId(e),timeOffset:fs()-s}),u("undefined"!=typeof DragEvent&&t instanceof DragEvent?js.Drag:t instanceof MouseEvent?js.MouseMove:js.TouchMove)})),o,{trailing:!1})),c=[os("mousemove",l,i),os("touchmove",l,i),os("drag",l,i)];return eo((()=>{c.forEach((t=>t()))}))}(t),h=function(t){var{mouseInteractionCb:e,doc:i,mirror:n,blockClass:s,blockSelector:o,sampling:a}=t;if(!1===a.mouseInteraction)return()=>{};var h=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[],l=null;return Object.keys(Us).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==h[t])).forEach((t=>{var a=D(t),h=(t=>i=>{var a=io(i);if(!ys(a,s,o,!0)){var h=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":h=Ws.Mouse;break;case"touch":h=Ws.Touch;break;case"pen":h=Ws.Pen}h===Ws.Touch&&(Us[t]===Us.MouseDown?u="TouchStart":Us[t]===Us.MouseUp&&(u="TouchEnd"))}else Ss(i)&&(h=Ws.Touch);null!==h?(l=h,(u.startsWith("Touch")&&h===Ws.Touch||u.startsWith("Mouse")&&h===Ws.Mouse)&&(h=null)):Us[t]===Us.Click&&(h=l,l=null);var c=Ss(i)?i.changedTouches[0]:i;if(c){var f=n.getId(a),{clientX:d,clientY:v}=c;eo(e)(r({type:Us[u],id:f,x:d,y:v},null!==h&&{pointerType:h}))}}})(t);if(window.PointerEvent)switch(Us[t]){case Us.MouseDown:case Us.MouseUp:a=a.replace("mouse","pointer");break;case Us.TouchStart:case Us.TouchEnd:return}u.push(os(a,h,i))})),eo((()=>{u.forEach((t=>t()))}))}(t),u=so(t),l=function(t,e){var{viewportResizeCb:r}=t,{win:i}=e,n=-1,s=-1;return os("resize",eo(ls(eo((()=>{var t=vs(),e=ps();n===t&&s===e||(r({width:Number(e),height:Number(t)}),n=t,s=e)})),200)),i)}(t,{win:s}),c=function(t){var{inputCb:e,doc:i,mirror:n,blockClass:s,blockSelector:o,ignoreClass:a,ignoreSelector:h,maskInputOptions:u,maskInputFn:l,sampling:c,userTriggeredOnInput:f}=t;function d(t){var e=io(t),r=t.isTrusted,n=e&&e.tagName;if(e&&"OPTION"===n&&(e=ss.parentElement(e)),e&&n&&ao.indexOf(n)>=0&&!ys(e,s,o,!0)&&!(e.classList.contains(a)||h&&e.matches(h))){var c=e.value,d=!1,p=L(e)||"";"radio"===p||"checkbox"===p?d=e.checked:(u[n.toLowerCase()]||u[p])&&(c=O({element:e,maskInputOptions:u,tagName:n,type:p,value:c,maskInputFn:l})),v(e,f?{text:c,isChecked:d,userTriggered:r}:{text:c,isChecked:d});var m=e.name;"radio"===p&&m&&d&&i.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach((t=>{if(t!==e){var r=t.value;v(t,f?{text:r,isChecked:!d,userTriggered:!1}:{text:r,isChecked:!d})}}))}}function v(t,i){var s=ho.get(t);if(!s||s.text!==i.text||s.isChecked!==i.isChecked){ho.set(t,i);var o=n.getId(t);eo(e)(r({},i,{id:o}))}}var p=("last"===c.input?["change"]:["input","change"]).map((t=>os(t,eo(d),i))),m=i.defaultView;if(!m)return()=>{p.forEach((t=>t()))};var y=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value");return y&&y.set&&p.push(...[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]].map((t=>cs(t[0],t[1],{set(){eo(d)({target:this,isTrusted:!1})}},!1,m)))),eo((()=>{p.forEach((t=>t()))}))}(t),f=function(t){var{mediaInteractionCb:e,blockClass:r,blockSelector:i,mirror:n,sampling:s,doc:o}=t,a=eo((t=>ls(eo((s=>{var o=io(s);if(o&&!ys(o,r,i,!0)){var{currentTime:a,volume:h,muted:u,playbackRate:l,loop:c}=o;e({type:t,id:n.getId(o),currentTime:a,volume:h,muted:u,playbackRate:l,loop:c})}})),s.media||500))),h=[os("play",a(Hs.Play),o),os("pause",a(Hs.Pause),o),os("seeked",a(Hs.Seeked),o),os("volumechange",a(Hs.VolumeChange),o),os("ratechange",a(Hs.RateChange),o)];return eo((()=>{h.forEach((t=>t()))}))}(t),d=()=>{},v=()=>{},p=()=>{},m=()=>{};t.recordDOM&&(d=function(t,e){var{styleSheetRuleCb:r,mirror:i,stylesheetManager:n}=t,{win:s}=e;if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};var o=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:eo(((t,e,s)=>{var[o,a]=s,{id:h,styleId:u}=lo(e,i,n.styleMirror);return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,adds:[{rule:o,index:a}]}),t.apply(e,s)}))}),s.CSSStyleSheet.prototype.addRule=function(t,e,r){return void 0===r&&(r=this.cssRules.length),s.CSSStyleSheet.prototype.insertRule.apply(this,[t+" { "+e+" }",r])};var a,h,u=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(u,{apply:eo(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=lo(e,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,removes:[{index:o}]}),t.apply(e,s)}))}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},s.CSSStyleSheet.prototype.replace&&(a=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:eo(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=lo(e,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,replace:o}),t.apply(e,s)}))})),s.CSSStyleSheet.prototype.replaceSync&&(h=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(h,{apply:eo(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=lo(e,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,replaceSync:o}),t.apply(e,s)}))}));var l={};po("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(po("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),po("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),po("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));var c={};return Object.entries(l).forEach((t=>{var[e,s]=t;c[e]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(c[e].insertRule,{apply:eo(((t,e,s)=>{var[o,a]=s,{id:h,styleId:u}=lo(e.parentStyleSheet,i,n.styleMirror);return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,adds:[{rule:o,index:[...uo(e),a||0]}]}),t.apply(e,s)}))}),s.prototype.deleteRule=new Proxy(c[e].deleteRule,{apply:eo(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=lo(e.parentStyleSheet,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,removes:[{index:[...uo(e),o]}]}),t.apply(e,s)}))})})),eo((()=>{s.CSSStyleSheet.prototype.insertRule=o,s.CSSStyleSheet.prototype.deleteRule=u,a&&(s.CSSStyleSheet.prototype.replace=a),h&&(s.CSSStyleSheet.prototype.replaceSync=h),Object.entries(l).forEach((t=>{var[e,r]=t;r.prototype.insertRule=c[e].insertRule,r.prototype.deleteRule=c[e].deleteRule}))}))}(t,{win:s}),v=co(t,t.doc),p=function(t,e){var{styleDeclarationCb:r,mirror:i,ignoreCSSAttributes:n,stylesheetManager:s}=t,{win:o}=e,a=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:eo(((t,e,o)=>{var h,[u,l,c]=o;if(n.has(u))return a.apply(e,[u,l,c]);var{id:f,styleId:d}=lo(null==(h=e.parentRule)?void 0:h.parentStyleSheet,i,s.styleMirror);return(f&&-1!==f||d&&-1!==d)&&r({id:f,styleId:d,set:{property:u,value:l,priority:c},index:uo(e.parentRule)}),t.apply(e,o)}))});var h=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(h,{apply:eo(((t,e,o)=>{var a,[u]=o;if(n.has(u))return h.apply(e,[u]);var{id:l,styleId:c}=lo(null==(a=e.parentRule)?void 0:a.parentStyleSheet,i,s.styleMirror);return(l&&-1!==l||c&&-1!==c)&&r({id:l,styleId:c,remove:{property:u},index:uo(e.parentRule)}),t.apply(e,o)}))}),eo((()=>{o.CSSStyleDeclaration.prototype.setProperty=a,o.CSSStyleDeclaration.prototype.removeProperty=h}))}(t,{win:s}),t.collectFonts&&(m=function(t){var{fontCb:e,doc:r}=t,i=r.defaultView;if(!i)return()=>{};var n=[],s=new WeakMap,o=i.FontFace;i.FontFace=function(t,e,r){var i=new o(t,e,r);return s.set(i,{family:t,buffer:"string"!=typeof e,descriptors:r,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),i};var a=ns(r.fonts,"add",(function(t){return function(r){return setTimeout(eo((()=>{var t=s.get(r);t&&(e(t),s.delete(r))})),0),t.apply(this,[r])}}));return n.push((()=>{i.FontFace=o})),n.push(a),eo((()=>{n.forEach((t=>t()))}))}(t)));var y=function(t){var{doc:e,mirror:r,blockClass:i,blockSelector:n,selectionCb:s}=t,o=!0,a=eo((()=>{var t=e.getSelection();if(!(!t||o&&(null==t?void 0:t.isCollapsed))){o=t.isCollapsed||!1;for(var a=[],h=t.rangeCount||0,u=0;h>u;u++){var l=t.getRangeAt(u),{startContainer:c,startOffset:f,endContainer:d,endOffset:v}=l;ys(c,i,n,!0)||ys(d,i,n,!0)||a.push({start:r.getId(c),startOffset:f,end:r.getId(d),endOffset:v})}s({ranges:a})}}));return a(),os("selectionchange",a)}(t),g=function(t){var{doc:e,customElementCb:r}=t,i=e.defaultView;return i&&i.customElements?ns(i.customElements,"define",(function(t){return function(e,i,n){try{r({define:{name:e}})}catch(t){console.warn("Custom element callback failed for "+e)}return t.apply(this,[e,i,n])}})):()=>{}}(t),w=[];for(var b of t.plugins)w.push(b.observer(b.callback,s,b.options));return eo((()=>{if(n){n.destroy(),n.reset();var t=ro.indexOf(n);-1!==t&&ro.splice(t,1)}null==i||i.disconnect(),a(),h(),u(),l(),c(),f(),d(),v(),p(),m(),y(),g(),w.forEach((t=>t()))}))}function vo(t){return void 0!==window[t]}function po(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class mo{constructor(t){c(this,"iframeIdToRemoteIdMap",new WeakMap),c(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,r,i){var n=r||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t),o=n.get(e);return o||(o=this.generateIdFn(),n.set(e,o),s.set(o,e)),o}getIds(t,e){var r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return e.map((e=>this.getId(t,e,r,i)))}getRemoteId(t,e,r){var i=r||this.getRemoteIdToIdMap(t);return"number"!=typeof e?e:i.get(e)||-1}getRemoteIds(t,e){var r=this.getRemoteIdToIdMap(t);return e.map((e=>this.getRemoteId(t,e,r)))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){var e=this.iframeIdToRemoteIdMap.get(t);return e||this.iframeIdToRemoteIdMap.set(t,e=new Map),e}getRemoteIdToIdMap(t){var e=this.iframeRemoteIdToIdMap.get(t);return e||this.iframeRemoteIdToIdMap.set(t,e=new Map),e}}class yo{constructor(t){c(this,"iframes",new WeakMap),c(this,"crossOriginIframeMap",new WeakMap),c(this,"crossOriginIframeMirror",new mo(Z)),c(this,"crossOriginIframeStyleMirror"),c(this,"crossOriginIframeRootIdMap",new WeakMap),c(this,"mirror"),c(this,"mutationCb"),c(this,"wrappedEmit"),c(this,"loadListener"),c(this,"pageHideListener"),c(this,"stylesheetManager"),c(this,"recordCrossOriginIframes"),c(this,"messageHandler"),c(this,"nestedIframeListeners",new Map),c(this,"attachedWindows",new WeakMap),c(this,"attachedDocuments",new WeakMap),c(this,"attachedIframes",new Map),c(this,"loadListenerDisposers",new WeakMap),c(this,"iframeElementsById",new Map),c(this,"pageHideHandlers",new WeakMap),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new mo(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}registerLoadListenerDisposer(t,e){var r=this.loadListenerDisposers.get(t);r||this.loadListenerDisposers.set(t,r=new Set),r.add(e);var i=this.mirror.getId(t);-1!==i&&this.iframeElementsById.set(i,t)}getIframeElementById(t){var e,r,i;return null!==(e=null!==(r=null==(i=this.attachedIframes.get(t))?void 0:i.element)&&void 0!==r?r:this.iframeElementsById.get(t))&&void 0!==e?e:null}forgetIframeId(t){this.attachedIframes.delete(t),this.iframeElementsById.delete(t)}disposeLoadListeners(t){var e=this.loadListenerDisposers.get(t);e&&(e.forEach((t=>as(t))),this.loadListenerDisposers.delete(t))}removePageHideListener(t){var e=this.pageHideHandlers.get(t);e&&(e.forEach((t=>{var{win:e,handler:r}=t;as((()=>e.removeEventListener("pagehide",r)))})),this.pageHideHandlers.delete(t))}addLoadListener(t){this.loadListener=t}addPageHideListener(t){this.pageHideListener=t}removeLoadListener(){this.loadListener=void 0}trackIframeContent(t,e){var r=this.mirror.getId(t);return this.attachedIframes.set(r,{element:t,content:e}),r}attachIframe(t,e){var r,i=this.trackIframeContent(t,e);if(t.contentDocument){var n=this.attachedDocuments.get(t);n||this.attachedDocuments.set(t,n=new Set),n.add(t.contentDocument)}this.mutationCb({adds:[{parentId:i,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var s=t.contentWindow;if(this.recordCrossOriginIframes&&s&&!this.nestedIframeListeners.has(s)){var o=this.handleMessage.bind(this);as((()=>{s.addEventListener("message",o),this.nestedIframeListeners.set(s,o);var e=this.attachedWindows.get(t);e||this.attachedWindows.set(t,e=new Set),e.add(s)}))}as((()=>{var e=t.contentWindow;if(e){var r=this.pageHideHandlers.get(t);if(r)for(var i of r)if(i.win===e)return;var n=()=>{var e;null==(e=this.pageHideListener)||e.call(this,t),t.contentDocument&&this.mirror.removeNodeFromMap(t.contentDocument),t.contentWindow&&this.crossOriginIframeMap.delete(t.contentWindow)};e.addEventListener("pagehide",n),r||this.pageHideHandlers.set(t,r=new Set),r.add({win:e,handler:n})}})),null==(r=this.loadListener)||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){var e=t;if("rrweb"===e.data.type&&e.origin===e.data.origin&&t.source){var r=this.crossOriginIframeMap.get(t.source);if(r){var i=this.transformCrossOriginEvent(r,e.data.event);i&&this.wrappedEmit(i,e.data.isCheckout)}}}transformCrossOriginEvent(t,e){var r;switch(e.type){case Ps.FullSnapshot:this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);var i=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(e.data.node,i),this.trackIframeContent(t,e.data.node),{timestamp:e.timestamp,type:Ps.IncrementalSnapshot,data:{source:js.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Ps.Meta:case Ps.Load:case Ps.DomContentLoaded:return!1;case Ps.Plugin:return e;case Ps.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case Ps.IncrementalSnapshot:switch(e.data.source){case js.Mutation:return e.data.adds.forEach((e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);var r=this.crossOriginIframeRootIdMap.get(t);r&&this.patchRootIdOnNode(e.node,r)})),e.data.removes.forEach((e=>{this.replaceIds(e,t,["parentId","id"])})),e.data.attributes.forEach((e=>{this.replaceIds(e,t,["id"])})),e.data.texts.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case js.Drag:case js.TouchMove:case js.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case js.ViewportResize:return!1;case js.MediaInteraction:case js.MouseInteraction:case js.Scroll:case js.CanvasMutation:case js.Input:return this.replaceIds(e.data,t,["id"]),e;case js.StyleSheetRule:case js.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case js.Font:return e;case js.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case js.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null==(r=e.data.styles)||r.forEach((e=>{this.replaceStyleIds(e,t,["styleId"])})),e}}return!1}replace(t,e,r,i){for(var n of i)(Array.isArray(e[n])||"number"==typeof e[n])&&(e[n]=Array.isArray(e[n])?t.getIds(r,e[n]):t.getId(r,e[n]));return e}replaceIds(t,e,r){return this.replace(this.crossOriginIframeMirror,t,e,r)}replaceStyleIds(t,e,r){return this.replace(this.crossOriginIframeStyleMirror,t,e,r)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach((t=>{this.replaceIdOnNode(t,e)}))}patchRootIdOnNode(t,e){t.type===Vs.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}removeIframeById(t){var e=this.attachedIframes.get(t),r=(null==e?void 0:e.element)||this.iframeElementsById.get(t)||this.mirror.getNode(t);if(this.iframeElementsById.delete(t),r){var i=r.contentWindow,n=this.attachedWindows.get(r);if(n&&(n.forEach((t=>{var e=this.nestedIframeListeners.get(t);e&&(as((()=>t.removeEventListener("message",e))),this.nestedIframeListeners.delete(t)),this.crossOriginIframeMap.delete(t)})),this.attachedWindows.delete(r)),i&&this.nestedIframeListeners.has(i)){var s=this.nestedIframeListeners.get(i);as((()=>i.removeEventListener("message",s))),this.nestedIframeListeners.delete(i)}i&&this.crossOriginIframeMap.delete(i),this.iframes.delete(r),this.disposeLoadListeners(r),this.removePageHideListener(r);var o=this.attachedDocuments.get(r);o&&(o.forEach((t=>{as((()=>this.mirror.removeNodeFromMap(t)))})),as((()=>oo(r,o))),this.attachedDocuments.delete(r))}e&&this.attachedIframes.delete(t)}cleanupDetachedIframes(){if(0!==this.attachedIframes.size){var t=[];this.attachedIframes.forEach(((e,r)=>{this.mirror.has(r)||t.push(r)})),t.forEach((t=>this.removeIframeById(t)))}}reattachIframes(){this.attachedIframes.forEach(((t,e)=>{var{content:r}=t;this.mirror.has(e)?this.mutationCb({adds:[{parentId:e,nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(e)}))}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach(((t,e)=>{as((()=>e.removeEventListener("message",t)))})),this.nestedIframeListeners.clear();var t=new Set;this.iframeElementsById.forEach((e=>t.add(e))),this.attachedIframes.forEach((e=>{var{element:r}=e;return t.add(r)})),t.forEach((t=>{this.disposeLoadListeners(t),this.removePageHideListener(t)})),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap,this.loadListenerDisposers=new WeakMap,this.pageHideHandlers=new WeakMap,this.attachedDocuments=new WeakMap,this.attachedWindows=new WeakMap,this.iframeElementsById=new Map}}class go{constructor(t){c(this,"shadowDoms",new WeakSet),c(this,"mutationCb"),c(this,"scrollCb"),c(this,"bypassOptions"),c(this,"mirror"),c(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){if(x(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var{observer:i,buffer:n}=no(r({},this.bypassOptions,{doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push((()=>{i.disconnect(),n.destroy(),n.releaseCanvasManager();var t=ro.indexOf(n);-1!==t&&ro.splice(t,1)})),this.restoreHandlers.push(so(r({},this.bypassOptions,{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout((()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(ss.host(t))),this.restoreHandlers.push(co({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))}),0)}}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){var r=this;this.restoreHandlers.push(ns(t.prototype,"attachShadow",(function(t){return function(i){var n=t.call(this,i),s=ss.shadowRoot(this);return s&&_s(this)&&r.addShadowRoot(s,e),n}})))}reset(){this.restoreHandlers.forEach((t=>{try{t()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var wo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bo="undefined"==typeof Uint8Array?[]:new Uint8Array(256),So=0;64>So;So++)bo[wo.charCodeAt(So)]=So;var ko=function(t){var e,r,i,n,s,o=.75*t.length,a=t.length,h=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);var u=new ArrayBuffer(o),l=new Uint8Array(u);for(e=0;a>e;e+=4)r=bo[t.charCodeAt(e)],i=bo[t.charCodeAt(e+1)],n=bo[t.charCodeAt(e+2)],s=bo[t.charCodeAt(e+3)],l[h++]=r<<2|i>>4,l[h++]=(15&i)<<4|n>>2,l[h++]=(3&n)<<6|63&s;return u},Co=new Map,Mo=(t,e,r)=>{if(t&&(Ro(t,e)||"object"==typeof t)){var i=function(t,e){var r=Co.get(t);return r||Co.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}(r,t.constructor.name),n=i.indexOf(t);return-1===n&&(n=i.length,i.push(t)),n}};function Io(t,e,r,i){if(t instanceof Array)return t.map((t=>Io(t,e,r,i)));if(null===t)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:function(t){var e,r=new Uint8Array(t),i=r.length,n="";for(e=0;i>e;e+=3)n+=wo[r[e]>>2],n+=wo[(3&r[e])<<4|r[e+1]>>4],n+=wo[(15&r[e+1])<<2|r[e+2]>>6],n+=wo[63&r[e+2]];return i%3==2?n=n.substring(0,n.length-1)+"=":i%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(t)};if(t instanceof DataView)return{rr_type:t.constructor.name,args:[Io(t.buffer,e,r,i),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){var n=t.constructor.name,{src:s}=t;return{rr_type:n,src:s}}return t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL(i.type,i.quality)}:t instanceof ImageData?{rr_type:t.constructor.name,args:[Io(t.data,e,r,i),t.width,t.height]}:Ro(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Mo(t,e,r)}:t}var xo=(t,e,r,i)=>t.map((t=>Io(t,e,r,i))),Ro=(t,e)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((t=>"function"==typeof e[t]));return Boolean(r.find((r=>t instanceof e[r])))},Eo=["webgl","webgl2"];function To(t){return"nodeType"in t}function Ao(t,e,i,n){var s=[];try{if(n){var o=function(t,e,i){var n=t.GPUCanvasContext;if((null==n?void 0:n.prototype)&&"function"==typeof n.prototype.configure)return ns(n.prototype,"configure",(function(n){return function(s){var o=function(t){var{canvas:e}=t;return e&&"object"==typeof e?e:null}(this);if(!o||To(o)&&ys(o,e,i,!0))return n.call(this,s);To(o)&&!("__context"in o)&&(o.__context="webgpu");var a=function(t){var e=t.GPUTextureUsage;return e?e.COPY_SRC|e.RENDER_ATTACHMENT:null}(t);return n.call(this,null!==a&&s?r({},s,{usage:"number"==typeof s.usage?s.usage|a:a}):s)}}))}(t,e,i);o&&s.push(o)}var a=ns(t.HTMLCanvasElement.prototype,"getContext",(function(t){return function(r){for(var s=function(t){return"experimental-webgl"===t?"webgl":t}(r),o=arguments.length,a=new Array(o>1?o-1:0),h=1;o>h;h++)a[h-1]=arguments[h];if(!ys(this,e,i,!0)&&("__context"in this||(this.__context=s),n&&Eo.includes(s)))if(a[0]&&"object"==typeof a[0]){var u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0});return t.apply(this,[r,...a])}}));s.push(a)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach((t=>t()))}}function Oo(t,e,r,i,n,s,o){var a=[],h=Object.getOwnPropertyNames(t),u=function(h){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))return 0;try{if("function"!=typeof t[h])return 0;var u=ns(t,h,(function(t){return function(){for(var a=arguments.length,u=new Array(a),l=0;a>l;l++)u[l]=arguments[l];var c=t.apply(this,u);if(Mo(c,s,this),"tagName"in this.canvas&&!ys(this.canvas,i,n,!0)){var f=xo(u,s,this,o);r(this.canvas,{type:e,property:h,args:f})}return c}}));a.push(u)}catch(i){var l=cs(t,h,{set(t){r(this.canvas,{type:e,property:h,args:[t],setter:!0})}});a.push(l)}};for(var l of h)u(l);return a}var Do,No,Lo,Bo='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastFingerprintMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n function fnv1aHash(buffer) {\n const view = new Uint8Array(buffer);\n let hash = 2166136261;\n for (let i2 = 0; i2 < view.length; i2++) {\n hash ^= view[i2];\n hash = hash * 16777619 | 0;\n }\n return (hash >>> 0).toString(16);\n }\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n let reusableCanvas = null;\n let reusableCtx = null;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n try {\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n if (!reusableCanvas || reusableCanvas.width !== width || reusableCanvas.height !== height) {\n reusableCanvas = new OffscreenCanvas(width, height);\n reusableCtx = reusableCanvas.getContext("2d");\n }\n reusableCtx.clearRect(0, 0, width, height);\n reusableCtx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await reusableCanvas.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const fingerprint = fnv1aHash(arrayBuffer);\n if (!lastFingerprintMap.has(id)) {\n const base642 = encode(arrayBuffer);\n if (await transparentBase64 === base642) {\n lastFingerprintMap.set(id, fingerprint);\n return worker.postMessage({ id });\n }\n lastFingerprintMap.set(id, fingerprint);\n worker.postMessage({ id, type, base64: base642, width, height });\n return;\n }\n if (lastFingerprintMap.get(id) === fingerprint)\n return worker.postMessage({ id });\n const base64 = encode(arrayBuffer);\n worker.postMessage({ id, type, base64, width, height });\n lastFingerprintMap.set(id, fingerprint);\n } catch {\n worker.postMessage({ id });\n }\n } else {\n e.data.bitmap.close();\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-Ca9A-vl6.js.map\n',_o="undefined"!=typeof self&&self.Blob&&new Blob([Bo],{type:"text/javascript;charset=utf-8"});function Fo(t){var e;try{if(!(e=_o&&(self.URL||self.webkitURL).createObjectURL(_o)))throw"";var r=new Worker(e,{name:null==t?void 0:t.name});return r.addEventListener("error",(()=>{(self.URL||self.webkitURL).revokeObjectURL(e)})),r}catch(e){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Bo),{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class Po{constructor(t){c(this,"pendingCanvasMutations",new Map),c(this,"rafStamps",{latestId:0,invokeId:null}),c(this,"mirror"),c(this,"mutationCb"),c(this,"resetObservers"),c(this,"frozen",!1),c(this,"locked",!1),c(this,"rafIdTimestamp",null),c(this,"rafIdFlush",null),c(this,"refCount",0),c(this,"torndown",!1),c(this,"processMutation",((t,e)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)}));var{sampling:e="all",win:r,blockClass:i,blockSelector:n,recordCanvas:s,dataURLOptions:o}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&"all"===e&&this.initCanvasMutationObserver(r,i,n,o),s&&"number"==typeof e&&this.initCanvasFPSObserver(e,r,i,n,{dataURLOptions:o})}acquire(){this.refCount+=1}reset(){this.refCount>0&&(this.refCount-=1),this.refCount>0||this.teardown()}teardown(){this.torndown||(this.torndown=!0,this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),null!==this.rafIdTimestamp&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),null!==this.rafIdFlush&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null))}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,i,n,s){var o=this;if("OffscreenCanvas"in r){var a=Ao(r,i,n,!0),h=new Map,u=new Fo;u.onmessage=t=>{var{id:e}=t.data;if(h.set(e,!1),"base64"in t.data){var{base64:r,type:i,width:n,height:s}=t.data;this.mutationCb({id:e,type:Gs["2D"],commands:[{property:"clearRect",args:[0,0,n,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}],displayWidth:n,displayHeight:s})}};var l,c=1e3/t,f=0,d=t=>{var a,v;f&&c>t-f||(f=t,(a=[],v=t=>{try{t.querySelectorAll("canvas").forEach((t=>{ys(t,i,n,!0)||a.push(t)})),t.querySelectorAll("*").forEach((t=>{t.shadowRoot&&v(t.shadowRoot)}))}catch(t){}},v(r.document),a).forEach(function(){var t=e((function*(t){var e,r,i=o.mirror.getId(t);if(!h.get(i)&&0!==t.width&&0!==t.height){h.set(i,!0);try{if(["webgl","webgl2"].includes(t.__context)){var n=t.getContext(t.__context);if(null==(e=null==n?void 0:n.isContextLost)?void 0:e.call(n))return void h.set(i,!1);!1===(null==(r=null==n?void 0:n.getContextAttributes())?void 0:r.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}var a=t.clientWidth||t.width,l=t.clientHeight||t.height,c=yield createImageBitmap(t,{resizeWidth:a,resizeHeight:l});u.postMessage({id:i,bitmap:c,width:a,height:l,dataURLOptions:s.dataURLOptions},[c])}catch(t){h.set(i,!1)}}}));return function(e){return t.apply(this,arguments)}}())),l=requestAnimationFrame(d)};l=requestAnimationFrame(d),this.resetObservers=()=>{a(),cancelAnimationFrame(l)}}}initCanvasMutationObserver(t,e,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=Ao(t,e,r,!1),s=function(t,e,r,i,n){var s=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype),a=function(o){try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[o])return 1;var a=ns(e.CanvasRenderingContext2D.prototype,o,(function(s){return function(){for(var a=arguments.length,h=new Array(a),u=0;a>u;u++)h[u]=arguments[u];return ys(this.canvas,r,i,!0)||setTimeout((()=>{var r=xo(h,e,this,n);t(this.canvas,{type:Gs["2D"],property:o,args:r})}),0),s.apply(this,h)}}));s.push(a)}catch(r){var h=cs(e.CanvasRenderingContext2D.prototype,o,{set(e){t(this.canvas,{type:Gs["2D"],property:o,args:[e],setter:!0})}});s.push(h)}};for(var h of o)a(h);return()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i),o=function(t,e,r,i,n){var s=[];return void 0!==e.WebGLRenderingContext&&s.push(...Oo(e.WebGLRenderingContext.prototype,Gs.WebGL,t,r,i,e,n)),void 0!==e.WebGL2RenderingContext&&s.push(...Oo(e.WebGL2RenderingContext.prototype,Gs.WebGL2,t,r,i,e,n)),()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i);this.resetObservers=()=>{n(),s(),o()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var t=e=>{this.rafStamps.latestId=e,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((t,e)=>{var r=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,r)})),this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(t,e){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(t);if(r&&-1!==e){var n=r.map((t=>i(t,u))),{type:s}=r[0];this.mutationCb({id:e,type:s,commands:n}),this.pendingCanvasMutations.delete(t)}}}}class jo{constructor(t){c(this,"trackedLinkElements",new WeakSet),c(this,"mutationCb"),c(this,"adoptedStyleSheetCb"),c(this,"styleMirror",new Ds),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){var r=this;if(0!==t.length){var i={id:e,styleIds:[]},n=[],s=function(t){var e;r.styleMirror.has(t)?e=r.styleMirror.getId(t):(e=r.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,r)=>({rule:E(e,t.href),index:r})))})),i.styleIds.push(e)};for(var o of t)s(o);n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet,st.forEach((t=>t.abort())),st.clear()}trackStylesheetInLinkElement(t){}}class Uo{constructor(){c(this,"nodeMap",new WeakMap),c(this,"active",!1)}inOtherBuffer(t,e){var r=this.nodeMap.get(t);return r&&Array.from(r).some((t=>t!==e))}add(t,e){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}}var Wo=!1;try{if(2!==Array.from([1],(t=>2*t))[0]){var Go=document.createElement("iframe");document.body.appendChild(Go),Array.from=(null==(n=Go.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(Go)}}catch(t){console.debug("Unable to override Array.from",t)}var Ho=A();function zo(t){void 0===t&&(t={});var{emit:e,checkoutEveryNms:i,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:h=null,maskTextClass:u="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,maskAllInputs:f,maskInputOptions:d,slimDOMOptions:v,maskInputFn:p,maskTextFn:m,hooks:y,packFn:g,sampling:w={},dataURLOptions:b={},mousemoveWait:S,recordDOM:k=!0,recordCanvas:C=!1,recordCrossOriginIframes:M=!1,recordAfter:I=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:x=!1,collectFonts:R=!1,inlineImages:E=!1,plugins:A,keepIframeSrcFn:O=(()=>!1),ignoreCSSAttributes:D=new Set([]),errorHandler:N}=t;qs=N;var L=r({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},b),B=!M||window.parent===window,_=!1;if(!B)try{window.parent.document&&(_=!1)}catch(t){_=!0}if(B&&!e)throw new Error("emit function is required");if(!B&&!_)return()=>{};void 0!==S&&void 0===w.mousemove&&(w.mousemove=S),Ho.reset();var F,P=!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==d?d:{password:!0},j=vt(void 0!==v&&v);ks();var U,W,G=0,H=new Map,z=t=>{for(var e of A||[])e.eventProcessor&&(t=e.eventProcessor(t));return g&&!_&&(t=g(t)),t};Do=(t,r)=>{var s,o=t;if(o.timestamp=fs(),!(null==(s=ro[0])?void 0:s.isFrozen())||o.type===Ps.FullSnapshot||o.type===Ps.IncrementalSnapshot&&o.data.source===js.Mutation||ro.forEach((t=>t.unfreeze())),B)null==e||e(z(o),r);else if(_){var a={type:"rrweb",event:z(o),origin:window.location.origin,isCheckout:r};window.parent.postMessage(a,"*")}if(o.type===Ps.FullSnapshot)F=o,G=0;else if(o.type===Ps.IncrementalSnapshot){if(o.data.source===js.Mutation&&o.data.isAttachIframe)return;G++,(n&&G>=n||i&&o.timestamp-F.timestamp>i)&&No(!0)}};var V=t=>{if(t.removes&&t.removes.length>0){var e=t.adds.length>0?new Set(t.adds.map((t=>t.node.id))):null,i=new Set;if(t.adds.length>0)for(var n of t.adds){var s=Ho.getNode(n.node.id);s&&"IFRAME"===s.nodeName&&i.add(s)}t.removes.forEach((t=>{var{id:r}=t;if(!e||!e.has(r)){var n=J.getIframeElementById(r);n&&i.has(n)?J.forgetIframeId(r):(null==U||U(r),J.removeIframeById(r))}})),null==W||W(),J.cleanupDetachedIframes()}Do({type:Ps.IncrementalSnapshot,data:r({source:js.Mutation},t)})},Y=t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.Scroll},t)}),q=t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.CanvasMutation},t)}),Z=new jo({mutationCb:V,adoptedStyleSheetCb:t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.AdoptedStyleSheet},t)})}),J=new yo({mirror:Ho,mutationCb:V,stylesheetManager:Z,recordCrossOriginIframes:M,wrappedEmit:Do});for(var X of A||[])X.getMirror&&X.getMirror({nodeMirror:Ho,crossOriginIframeMirror:J.crossOriginIframeMirror,crossOriginIframeStyleMirror:J.crossOriginIframeStyleMirror});var Q=new Uo;Lo=new Po({recordCanvas:C,mutationCb:q,win:window,blockClass:s,blockSelector:o,mirror:Ho,sampling:w.canvas,dataURLOptions:L});var K=new go({mutationCb:V,scrollCb:Y,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskInputOptions:P,dataURLOptions:L,maskTextFn:m,maskInputFn:p,recordCanvas:C,inlineImages:E,sampling:w,slimDOMOptions:j,iframeManager:J,stylesheetManager:Z,canvasManager:Lo,keepIframeSrcFn:O,processedNodeManager:Q},mirror:Ho});No=function(t){if(void 0===t&&(t=!1),k){Do({type:Ps.Meta,data:{href:window.location.href,width:ps(),height:vs()}},t),Z.reset(),K.init(),ro.forEach((t=>t.lock()));var e=function(t,e){var{mirror:r=new T,blockClass:i="rr-block",blockSelector:n=null,maskTextClass:s="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:h=!1,recordCanvas:u=!1,maskAllInputs:l=!1,maskTextFn:c,maskInputFn:f,slimDOM:d=!1,dataURLOptions:v,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:y,iframeLoadTimeout:g,onIframeListenerRegistered:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:k=(()=>!1),maxDepth:C}=e||{};return dt(t,{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===l?{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===l?{password:!0}:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:vt(d),dataURLOptions:v,inlineImages:h,recordCanvas:u,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:y,iframeLoadTimeout:g,onIframeListenerRegistered:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:k,newlyAddedElement:!1,maxDepth:C})}(document,{mirror:Ho,blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskAllInputs:P,maskTextFn:m,maskInputFn:p,slimDOM:j,dataURLOptions:L,recordCanvas:C,inlineImages:E,onSerialize(t){Is(t,Ho)&&J.addIframe(t),xs(t,Ho)&&Z.trackLinkElement(t),Es(t)&&K.addShadowRoot(ss.shadowRoot(t),document)},onIframeLoad(t,e){J.attachIframe(t,e),K.observeAttachShadow(t)},onIframeListenerRegistered(t,e){J.registerLoadListenerDisposer(t,e)},onStylesheetLoad(t,e){Z.attachLinkElement(t,e)},keepIframeSrcFn:O});if(!e)return console.warn("Failed to snapshot the document");Do({type:Ps.FullSnapshot,data:{node:e,initialOffset:ds(window)}},t),ro.forEach((t=>t.unlock())),M&&J.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Z.adoptStyleSheets(document.adoptedStyleSheets,Ho.getId(document))}};try{var tt=[];U=t=>{var e=H.get(t);e&&(e.forEach((t=>{as(t);var e=tt.indexOf(t);-1!==e&&tt.splice(e,1)})),H.delete(t))},W=()=>{for(var[t]of H){var e=Ho.getNode(t);if(e)try{e.contentDocument&&e.contentDocument.defaultView||null==U||U(t)}catch(e){null==U||U(t)}else null==U||U(t)}};var et=t=>{var e;return eo(fo)({mutationCb:V,mousemoveCb:(t,e)=>Do({type:Ps.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.MouseInteraction},t)}),scrollCb:Y,viewportResizeCb:t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.ViewportResize},t)}),inputCb:t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.Input},t)}),mediaInteractionCb:t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.MediaInteraction},t)}),styleSheetRuleCb:t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.StyleSheetRule},t)}),styleDeclarationCb:t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.StyleDeclaration},t)}),canvasMutationCb:q,fontCb:t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.Font},t)}),selectionCb(t){Do({type:Ps.IncrementalSnapshot,data:r({source:js.Selection},t)})},customElementCb(t){Do({type:Ps.IncrementalSnapshot,data:r({source:js.CustomElement},t)})},blockClass:s,ignoreClass:a,ignoreSelector:h,maskTextClass:u,maskTextSelector:l,maskInputOptions:P,inlineStylesheet:c,sampling:w,recordDOM:k,recordCanvas:C,inlineImages:E,userTriggeredOnInput:x,collectFonts:R,doc:t,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:O,blockSelector:o,slimDOMOptions:j,dataURLOptions:L,mirror:Ho,iframeManager:J,stylesheetManager:Z,shadowDomManager:K,processedNodeManager:Q,canvasManager:Lo,ignoreCSSAttributes:D,plugins:(null==(e=null==A?void 0:A.filter((t=>t.observer)))?void 0:e.map((t=>({observer:t.observer,options:t.options,callback:e=>Do({type:Ps.Plugin,data:{plugin:t.name,payload:e}})}))))||[]},y)};J.addLoadListener((t=>{try{var e=Ho.getId(t),r=et(t.contentDocument);if(tt.push(r),-1!==e){var i=H.get(e);i||H.set(e,i=new Set),i.add(r)}}catch(t){console.warn(t)}})),J.addPageHideListener((t=>{var e=Ho.getId(t);null==U||U(e),oo(t)}));var rt=()=>{No(),tt.push(et(document)),Wo=!0};return["interactive","complete"].includes(document.readyState)?rt():(tt.push(os("DOMContentLoaded",(()=>{Do({type:Ps.DomContentLoaded,data:{}}),"DOMContentLoaded"===I&&rt()}))),tt.push(os("load",(()=>{Do({type:Ps.Load,data:{}}),"load"===I&&rt()}),window))),()=>{tt.forEach((t=>as(t))),Q.destroy(),J.removeLoadListener(),J.destroy(),H.clear(),Ho.reset(),Wo=!1,qs=void 0}}catch(t){console.warn(t)}}function Vo(t){return{all:t=t||new Map,on(e,r){var i=t.get(e);i?i.push(r):t.set(e,[r])},off(e,r){var i=t.get(e);i&&(r?i.splice(i.indexOf(r)>>>0,1):t.set(e,[]))},emit(e,r){var i=t.get(e);i&&i.slice().map((function(t){t(r)})),(i=t.get("*"))&&i.slice().map((function(t){t(e,r)}))}}}zo.addCustomEvent=(t,e)=>{if(!Wo)throw new Error("please add custom event after start recording");Do({type:Ps.Custom,data:{tag:t,payload:e}})},zo.freezePage=()=>{ro.forEach((t=>t.freeze()))},zo.takeFullSnapshot=t=>{if(!Wo)throw new Error("please take full snapshot after start recording");No(t)},zo.mirror=Ho;var Yo,$o,qo=Object.freeze(Object.defineProperty({__proto__:null,default:Vo},Symbol.toStringTag,{value:"Module"}));function Zo(t,e){if(void 0===t&&(t=window),void 0===e&&(e=document),!("scrollBehavior"in e.documentElement.style)||!0===t.__forceSmoothScrollPolyfill__){var r,i=t.HTMLElement||t.Element,n=468,s={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:i.prototype.scroll||h,scrollIntoView:i.prototype.scrollIntoView},o=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,a=(r=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==u(arguments[0])?v.call(t,e.body,void 0!==arguments[0].left?~~arguments[0].left:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:t.scrollY||t.pageYOffset):s.scroll.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:t.scrollY||t.pageYOffset))},t.scrollBy=function(){void 0!==arguments[0]&&(u(arguments[0])?s.scrollBy.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):v.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==u(arguments[0])){var t=arguments[0].left,e=arguments[0].top;v.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");s.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},i.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==u(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):s.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},i.prototype.scrollIntoView=function(){if(!0!==u(arguments[0])){var r=function(t){for(;t!==e.body&&!1===f(t);)t=t.parentNode||t.host;return t}(this),i=r.getBoundingClientRect(),n=this.getBoundingClientRect();r!==e.body?(v.call(this,r,r.scrollLeft+n.left-i.left,r.scrollTop+n.top-i.top),"fixed"!==t.getComputedStyle(r).position&&t.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):t.scrollBy({left:n.left,top:n.top,behavior:"smooth"})}else s.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function h(t,e){this.scrollLeft=t,this.scrollTop=e}function u(t){if(null===t||"object"!=typeof t||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;if("object"==typeof t&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function l(t,e){return"Y"===e?t.scrollHeight>t.clientHeight+a:"X"===e?t.scrollWidth>t.clientWidth+a:void 0}function c(e,r){var i=t.getComputedStyle(e,null)["overflow"+r];return"auto"===i||"scroll"===i}function f(t){var e=l(t,"Y")&&c(t,"Y"),r=l(t,"X")&&c(t,"X");return e||r}function d(e){var r,i,s,a=(o()-e.startTime)/n;a=a>1?1:a,r=.5*(1-Math.cos(Math.PI*a)),e.method.call(e.scrollable,i=e.startX+(e.x-e.startX)*r,s=e.startY+(e.y-e.startY)*r),i===e.x&&s===e.y||t.requestAnimationFrame(d.bind(t,e))}function v(r,i,n){var a,u,l,c,f=o();r===e.body?(a=t,u=t.scrollX||t.pageXOffset,l=t.scrollY||t.pageYOffset,c=s.scroll):(a=r,u=r.scrollLeft,l=r.scrollTop,c=h),d({scrollable:a,method:c,startTime:f,startX:u,startY:l,x:i,y:n})}}class Jo{constructor(t,e){void 0===t&&(t=[]),c(this,"timeOffset",0),c(this,"speed"),c(this,"actions"),c(this,"raf",null),c(this,"lastTimestamp"),this.actions=t,this.speed=e.speed}addAction(t){var e=!0===this.raf;if(this.actions.length&&this.actions[this.actions.length-1].delay>t.delay){var r=this.findActionIndex(t);this.actions.splice(r,0,t)}else this.actions.push(t);e&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){var t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){var e=this.actions[0];if(e.delay>this.timeOffset)break;this.actions.shift(),e.doAction()}this.raf=0>=this.actions.length||requestAnimationFrame(this.rafCheck.bind(this))}clear(){this.raf&&(!0!==this.raf&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return null!==this.raf}findActionIndex(t){for(var e=0,r=this.actions.length-1;r>=e;){var i=Math.floor((e+r)/2);if(t.delay>this.actions[i].delay)e=i+1;else{if(t.delay>=this.actions[i].delay)return i+1;r=i-1}}return e}}function Xo(t,e){if(t.type===Ps.IncrementalSnapshot&&t.data.source===js.MouseMove&&t.data.positions&&t.data.positions.length){var r=t.timestamp+t.data.positions[0].timeOffset;return t.delay=r-e,r-e}return t.delay=t.timestamp-e,t.delay}function Qo(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,n,s=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(i=s.next()).done;)o.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o}($o=Yo||(Yo={}))[$o.NotStarted=0]="NotStarted",$o[$o.Running=1]="Running",$o[$o.Stopped=2]="Stopped";var Ko={type:"xstate.init"};function ta(t){return void 0===t?[]:[].concat(t)}function ea(t){return{type:"xstate.assign",assignment:t}}function ra(t,e){return"string"==typeof(t="string"==typeof t&&e&&e[t]?e[t]:t)?{type:t}:"function"==typeof t?{type:t.name,exec:t}:t}function ia(t){return function(e){return t===e}}function na(t){return"string"==typeof t?{type:t}:t}function sa(t,e){return{value:t,context:e,actions:[],changed:!1,matches:ia(t)}}function oa(t,e,r){var i=e,n=!1;return[t.filter((function(t){if("xstate.assign"===t.type){n=!0;var e=Object.assign({},i);return"function"==typeof t.assignment?e=t.assignment(i,r):Object.keys(t.assignment).forEach((function(n){e[n]="function"==typeof t.assignment[n]?t.assignment[n](i,r):t.assignment[n]})),i=e,!1}return!0})),i,n]}function aa(t,e){void 0===e&&(e={});var r=Qo(oa(ta(t.states[t.initial].entry).map((function(t){return ra(t,e.actions)})),t.context,Ko),2),i={config:t,Tu:e,initialState:{value:t.initial,actions:r[0],context:r[1],matches:ia(t.initial)},transition(e,r){var n,s,o="string"==typeof e?{value:e,context:t.context}:e,a=o.value,h=o.context,u=na(r),l=t.states[a];if(l.on){var c=ta(l.on[u.type]);try{for(var f=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:()=>(t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t})}}(c),d=f.next();!d.done;d=f.next()){var v=d.value;if(void 0===v)return sa(a,h);var p="string"==typeof v?{target:v}:v,m=p.target,y=void 0===m?a:m,g=p.actions,w=void 0===g?[]:g,b=p.cond;if((void 0===b?function(){return!0}:b)(h,u)){var S=Qo(oa([].concat(l.exit,w,t.states[y].entry).filter((function(t){return t})).map((function(t){return ra(t,i.Tu.actions)})),h,u),3),k=S[0];return{value:y,context:S[1],actions:k,changed:y!==a||k.length>0||S[2],matches:ia(y)}}}}catch(t){n={error:t}}finally{try{d&&!d.done&&(s=f.return)&&s.call(f)}finally{if(n)throw n.error}}}return sa(a,h)}};return i}var ha=function(t,e){return t.actions.forEach((function(r){var i=r.exec;return i&&i(t.context,e)}))};function ua(t){var e=t.initialState,r=Yo.NotStarted,i=new Set,n={Oc:t,send(n){r===Yo.Running&&(e=t.transition(e,n),ha(e,na(n)),i.forEach((function(t){return t(e)})))},subscribe:t=>(i.add(t),t(e),{unsubscribe:()=>i.delete(t)}),start(i){if(i){var s="object"==typeof i?i:{context:t.config.context,value:i};e={value:s.value,actions:[],context:s.context,matches:ia(s.value)}}return r=Yo.Running,ha(e,Ko),n},stop:()=>(r=Yo.Stopped,i.clear(),n),get state(){return e},get status(){return r}};return n}var la=new Map;function ca(t,e){var r=la.get(t);return r||la.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}function fa(t,r,i){return function(){var n=e((function*(e){if(e&&"object"==typeof e&&"rr_type"in e){if(i&&(i.isUnchanged=!1),"ImageBitmap"===e.rr_type&&"args"in e){var n=yield fa(t,r,i)(e.args);return yield createImageBitmap.apply(null,n)}if("index"in e){if(i||null===r)return e;var{rr_type:s,index:o}=e;return ca(r,s)[o]}if("args"in e){var{rr_type:a,args:h}=e;return new(0,window[a])(...yield Promise.all(h.map(fa(t,r,i))))}if("base64"in e)return ko(e.base64);if("src"in e){var u=t.get(e.src);if(u)return u;var l=new Image;return l.src=e.src,t.set(e.src,l),l}if("data"in e&&"Blob"===e.rr_type){var c=yield Promise.all(e.data.map(fa(t,r,i)));return new Blob(c,{type:e.type})}}else if(Array.isArray(e))return yield Promise.all(e.map(fa(t,r,i)));return e}));return function(t){return n.apply(this,arguments)}}()}var da=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function va(t){return pa.apply(this,arguments)}function pa(){return(pa=e((function*(t){var{mutation:e,target:r,type:i,imageMap:n,errorHandler:s}=t;try{var o=function(t,e){try{return e===Gs.WebGL?t.getContext("webgl")||t.getContext("experimental-webgl"):t.getContext("webgl2")}catch(t){return null}}(r,i);if(!o)return;if(e.setter)return void(o[e.property]=e.args[0]);var a=o[e.property],h=yield Promise.all(e.args.map(fa(n,o)));!function(t,e){if(null==e?void 0:e.constructor){var{name:r}=e.constructor;if(da.includes(r)){var i=ca(t,r);i.includes(e)||i.push(e)}}}(o,a.apply(o,h))}catch(t){s(e,t)}}))).apply(this,arguments)}function ma(){return ma=e((function*(t){var{event:r,mutations:i,target:n,imageMap:s,errorHandler:o}=t,a=n.getContext("2d");if(a){var h=i.map(function(){var t=e((function*(t){return Promise.all(t.args.map(fa(s,a)))}));return function(e){return t.apply(this,arguments)}}());(yield Promise.all(h)).forEach(((t,e)=>{var n=i[e];try{if(n.setter)return void(a[n.property]=n.args[0]);var h=a[n.property];"drawImage"===n.property&&"string"==typeof n.args[0]?(s.get(r),h.apply(a,n.args)):h.apply(a,t)}catch(t){o(n,t)}}))}else o(i[0],new Error("Canvas context is null"))})),ma.apply(this,arguments)}function ya(t){return ga.apply(this,arguments)}function ga(){return ga=e((function*(t){var{event:e,mutation:r,target:i,imageMap:n,canvasEventMap:s,errorHandler:o}=t;try{var a=s.get(e)||r,h="commands"in a?a.commands:[a];if([Gs.WebGL,Gs.WebGL2].includes(r.type)){for(var u=0;h.length>u;u++){var l=h[u];yield va({mutation:l,type:r.type,target:i,imageMap:n,errorHandler:o})}return}yield function(t){return ma.apply(this,arguments)}({event:e,mutations:h,target:i,imageMap:n,errorHandler:o})}catch(t){o(r,t)}})),ga.apply(this,arguments)}var wa=["AUDIO","VIDEO"];class ba{constructor(t){c(this,"mediaMap",new Map),c(this,"warn"),c(this,"service"),c(this,"speedService"),c(this,"emitter"),c(this,"getCurrentTime"),c(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(zs.Start,this.start.bind(this)),this.emitter.on(zs.SkipStart,this.start.bind(this)),this.emitter.on(zs.Pause,this.pause.bind(this)),this.emitter.on(zs.Finish,this.pause.bind(this)),this.speedService.subscribe((()=>{this.syncAllMediaElements()}))}syncAllMediaElements(t){void 0===t&&(t={pause:!1}),this.mediaMap.forEach(((e,r)=>{this.syncTargetWithState(r),t.pause&&r.pause()}))}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo(t){var{time:e,target:r,mediaState:i}=t;if(i.isPlaying){var n=(e-i.lastInteractionTimeOffset)/1e3*i.playbackRate,s="duration"in r&&r.duration;if(Number.isNaN(s))return void this.waitForMetadata(r);var o=i.currentTimeAtLastInteraction+n;r.loop&&!1!==s&&(o%=s),r.currentTime=o}else r.pause(),r.currentTime=i.currentTimeAtLastInteraction}waitForMetadata(t){if(!this.metadataCallbackMap.has(t)&&"addEventListener"in t){var e=()=>{this.metadataCallbackMap.delete(t);var e=this.mediaMap.get(t);e&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:e})};this.metadataCallbackMap.set(t,e),t.addEventListener("loadedmetadata",e,{once:!0})}}getMediaStateFromMutation(t){var e,r,i,n,s,{target:o,timeOffset:a,mutation:h}=t,u=this.mediaMap.get(o),{type:l,playbackRate:c,currentTime:f,muted:d,volume:v,loop:p}=h;return{isPlaying:l===Hs.Play||l!==Hs.Pause&&((null==u?void 0:u.isPlaying)||null!==o.getAttribute("autoplay")),currentTimeAtLastInteraction:null!==(e=null!=f?f:null==u?void 0:u.currentTimeAtLastInteraction)&&void 0!==e?e:0,lastInteractionTimeOffset:a,playbackRate:null!==(r=null!=c?c:null==u?void 0:u.playbackRate)&&void 0!==r?r:1,volume:null!==(i=null!=v?v:null==u?void 0:u.volume)&&void 0!==i?i:1,muted:null!==(n=null!=d?d:null==u?void 0:u.muted)&&void 0!==n?n:null===o.getAttribute("muted"),loop:null!==(s=null!=p?p:null==u?void 0:u.loop)&&void 0!==s?s:null===o.getAttribute("loop")}}syncTargetWithState(t){var e=this.mediaMap.get(t);if(e){var{muted:r,loop:i,volume:n,isPlaying:s}=e,o=this.service.state.matches("paused"),a=e.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:e}),t.volume!==n&&(t.volume=n),t.muted=r,t.loop=i,t.playbackRate!==a&&(t.playbackRate=a),s&&!o?t.play():t.pause()}catch(t){this.warn("Failed to replay media interactions: "+(t.message||t))}}}addMediaElements(t,e,r){if(this.isSupportedMediaElement(t)){var i=t,n=r.getMeta(i);if(n&&"attributes"in n){var s,o=this.service.state.matches("paused"),a=n.attributes;(s=a.rr_mediaState?"played"===a.rr_mediaState:null!==i.getAttribute("autoplay"))&&o&&i.pause();var h=1;"number"==typeof a.rr_mediaPlaybackRate&&(h=a.rr_mediaPlaybackRate);var u;u="boolean"==typeof a.rr_mediaMuted?a.rr_mediaMuted:null!==i.getAttribute("muted");var l;l="boolean"==typeof a.rr_mediaLoop?a.rr_mediaLoop:null!==i.getAttribute("loop");var c=1;"number"==typeof a.rr_mediaVolume&&(c=a.rr_mediaVolume);var f=0;"number"==typeof a.rr_mediaCurrentTime&&(f=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:s,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:e,playbackRate:h,volume:c,muted:u,loop:l}),this.syncTargetWithState(i)}}}mediaMutation(t){var{target:e,timeOffset:r,mutation:i}=t;wa.includes(e.nodeName)&&(this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:r,mutation:i})),this.syncTargetWithState(e))}isSupportedMediaElement(t){return wa.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function Sa(t,e){if(!("DIALOG"!==t.nodeName||t instanceof dn)){var r=t,i=r.open,n=i&&r.matches("dialog:modal"),s=r.getAttribute("rr_open_mode"),o="string"==typeof(null==e?void 0:e.attributes.open)||"string"==typeof r.getAttribute("open"),a="modal"===s;i&&!(n&&"non-modal"===s||!n&&a)||(r.isConnected?(i&&r.close(),o&&(a?r.showModal():r.show())):console.warn("dialog is not attached to the dom",r))}}var ka=Vo||qo,Ca="[replayer]",Ma={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Ia(t){return t.type==Ps.IncrementalSnapshot&&(t.data.source==js.TouchMove||t.data.source==js.MouseInteraction&&t.data.type==Us.TouchStart)}class xa{constructor(t,e){var i=this;if(c(this,"wrapper"),c(this,"iframe"),c(this,"service"),c(this,"speedService"),c(this,"config"),c(this,"usingVirtualDom",!1),c(this,"virtualDom",new Bn),c(this,"mouse"),c(this,"mouseTail",null),c(this,"tailPositions",[]),c(this,"emitter",ka()),c(this,"nextUserInteractionEvent"),c(this,"legacy_missingNodeRetryMap",{}),c(this,"cache",sr()),c(this,"imageMap",new Map),c(this,"canvasEventMap",new Map),c(this,"mirror",A()),c(this,"styleMirror",new Ds),c(this,"mediaManager"),c(this,"firstFullSnapshot",null),c(this,"newDocumentQueue",[]),c(this,"mousePos",null),c(this,"touchActive",null),c(this,"lastMouseDownEvent",null),c(this,"lastHoveredRootNode"),c(this,"lastSelectionData",null),c(this,"lastScrollMap",new Map),c(this,"constructedStyleMutations",[]),c(this,"adoptedStyleSheets",[]),c(this,"emitterHandlers",[]),c(this,"serviceSubscription"),c(this,"speedServiceSubscription"),c(this,"timeouts",new Set),c(this,"styleSheetLoadListeners",new Map),c(this,"handleResize",(t=>{for(var e of(this.iframe.style.display="inherit",[this.mouseTail,this.iframe]))e&&(e.setAttribute("width",String(t.width)),e.setAttribute("height",String(t.height)))})),c(this,"applyEventsSynchronously",(t=>{for(var e of t){switch(e.type){case Ps.DomContentLoaded:case Ps.Load:case Ps.Custom:continue}this.getCastFn(e,!0)()}})),c(this,"getCastFn",(function(t,e){var r;switch(void 0===e&&(e=!1),t.type){case Ps.DomContentLoaded:case Ps.Load:break;case Ps.Custom:r=()=>{i.emitter.emit(zs.CustomEvent,t)};break;case Ps.Meta:r=()=>i.emitter.emit(zs.Resize,{width:t.data.width,height:t.data.height});break;case Ps.FullSnapshot:r=()=>{var r;if(i.firstFullSnapshot){if(i.firstFullSnapshot===t)return void(i.firstFullSnapshot=!0)}else i.firstFullSnapshot=!0;i.mediaManager.reset(),i.styleMirror.reset(),i.rebuildFullSnapshot(t,e),null==(r=i.iframe.contentWindow)||r.scrollTo(t.data.initialOffset)};break;case Ps.IncrementalSnapshot:r=()=>{if(i.applyIncremental(t,e),!e&&(t===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.backToNormal()),i.config.skipInactive&&!i.nextUserInteractionEvent)){for(var r of i.service.state.context.events)if(r.timestamp>t.timestamp&&i.isUserInteraction(r)){r.delay-t.delay>i.config.inactivePeriodThreshold*i.speedService.state.context.timer.speed&&(i.nextUserInteractionEvent=r);break}if(i.nextUserInteractionEvent){var n={speed:Math.min(Math.round((i.nextUserInteractionEvent.delay-t.delay)/5e3),i.config.maxSpeed)};i.speedService.send({type:"FAST_FORWARD",payload:n}),i.emitter.emit(zs.SkipStart,n)}}}}return()=>{for(var n of(r&&r(),i.config.plugins||[]))n.handler&&n.handler(t,e,{replayer:i});i.service.send({type:"CAST_EVENT",payload:{event:t}});var s=i.service.state.context.events.length-1;if(!i.config.liveMode&&t===i.service.state.context.events[s]){var o=50;t.type===Ps.IncrementalSnapshot&&t.data.source===js.MouseMove&&t.data.positions.length&&(o+=Math.max(0,-t.data.positions[0].timeOffset)),setTimeout((()=>{i.service.state.context.events.length-1>s||(i.backToNormal(),i.service.send("END"),i.emitter.emit(zs.Finish))}),o)}i.emitter.emit(zs.EventCast,t)}})),!(null==e?void 0:e.liveMode)&&2>t.length)throw new Error("Replayer need at least 2 events.");var n={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:1e4,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Ma,useVirtualDom:!0,logger:console};for(var s of(this.config=Object.assign({},n,e),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.addEmitterHandler(zs.Resize,this.handleResize),this.setupDom(),this.config.plugins||[]))s.getMirror&&s.getMirror({nodeMirror:this.mirror});this.addEmitterHandler(zs.Flush,(()=>{if(this.usingVirtualDom){var t={mirror:this.mirror,applyCanvas:(t,e,r)=>{ya({event:t,mutation:e,target:r,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(t,e)=>{t.source===js.StyleSheetRule?this.applyStyleSheetRule(t,e):t.source===js.StyleDeclaration&&this.applyStyleDeclaration(t,e)},afterAppend:(t,e)=>{for(var r of this.config.plugins||[])r.onBuild&&r.onBuild(t,{id:e,replayer:this})}};if(this.iframe.contentDocument)try{An(this.iframe.contentDocument,this.virtualDom,t,this.virtualDom.mirror)}catch(t){this.warn(t)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(var e in this.legacy_missingNodeRetryMap)try{var r=this.legacy_missingNodeRetryMap[e],i=Dn(r.node,this.mirror,this.virtualDom.mirror);An(i,r.node,t,this.virtualDom.mirror),r.node=i}catch(t){this.warn(t)}this.constructedStyleMutations.forEach((t=>{this.applyStyleSheetMutation(t)})),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach((t=>{this.applyAdoptedStyleSheet(t)})),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){var[n,s]=this.lastMouseDownEvent;n.dispatchEvent(s)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null),this.lastScrollMap.size&&(this.lastScrollMap.forEach((t=>{this.applyScroll(t,!0)})),this.lastScrollMap.clear())})),this.addEmitterHandler(zs.PlayBack,(()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.lastScrollMap.clear()}));var o=new Jo([],{speed:this.config.speed});this.service=function(t,e){var{getCastFn:i,applyEventsSynchronously:n,emitter:s}=e;return ua(aa({id:"player",context:t,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:ea({lastPlayedEvent(t,e){return"CAST_EVENT"===e.type?e.payload.event:t.lastPlayedEvent}}),recordTimeOffset:ea(((t,e)=>{var i=t.timeOffset;return"payload"in e&&"timeOffset"in e.payload&&(i=e.payload.timeOffset),r({},t,{timeOffset:i,baselineTime:t.events[0].timestamp+i})})),play(t){var e,{timer:r,events:o,baselineTime:a,lastPlayedEvent:h}=t;for(var u of(r.clear(),o))Xo(u,a);var l=function(t,e){for(var r=t.length-1;r>=0;r--){var i=t[r];if(i.type===Ps.Meta&&e>=i.timestamp)return t.slice(r)}return t}(o,a),c=null==h?void 0:h.timestamp;(null==h?void 0:h.type)===Ps.IncrementalSnapshot&&h.data.source===js.MouseMove&&(c=h.timestamp+(null==(e=h.data.positions[0])?void 0:e.timeOffset)),(c||0)>a&&s.emit(zs.PlayBack);var f=new Array,d=function(){if(c&&a>c&&(c>=v.timestamp||v===h))return 1;if(a>v.timestamp)f.push(v);else{var t=i(v,!1);r.addAction({doAction(){t()},delay:v.delay})}};for(var v of l)d();n(f),s.emit(zs.Flush),r.start()},pause(t){t.timer.clear()},resetLastPlayedEvent:ea((t=>r({},t,{lastPlayedEvent:null}))),startLive:ea({baselineTime(t,e){return t.timer.start(),"TO_LIVE"===e.type&&e.payload.baselineTime?e.payload.baselineTime:Date.now()}}),addEvent:ea(((t,e)=>{var{baselineTime:n,timer:s,events:o}=t;if("ADD_EVENT"===e.type){var{event:a}=e.payload;Xo(a,n);var h=o.length-1;if(o[h]&&o[h].timestamp>a.timestamp){for(var u=-1,l=0;h>=l;){var c=Math.floor((l+h)/2);o[c].timestamp>a.timestamp?h=c-1:l=c+1}-1===u&&(u=l),o.splice(u,0,a)}else o.push(a);if(n>a.timestamp)e.payload.applyPastEventSynchronously&&i(a,!0)();else if(s.isActive()){var f=i(a,!1);s.addAction({doAction(){f()},delay:a.delay})}}return r({},t,{events:o})}))}}))}({events:t.map((t=>e&&e.unpackFn?e.unpackFn(t):t)).sort(((t,e)=>t.timestamp-e.timestamp)),timer:o,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.serviceSubscription=this.service.subscribe((t=>{this.emitter.emit(zs.StateChange,{player:t})})),this.speedService=ua(aa({id:"speed",context:{normalSpeed:-1,timer:o},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed(t,e){"payload"in e&&t.timer.setSpeed(e.payload.speed)},recordSpeed:ea({normalSpeed:t=>t.timer.speed}),restoreSpeed(t){t.timer.setSpeed(t.normalSpeed)}}})),this.speedService.start(),this.speedServiceSubscription=this.speedService.subscribe((t=>{this.emitter.emit(zs.StateChange,{speed:t})})),this.mediaManager=new ba({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});var a=this.service.state.context.events.find((t=>t.type===Ps.Meta)),h=this.service.state.context.events.find((t=>t.type===Ps.FullSnapshot));if(a){var{width:u,height:l}=a.data;this.addTimeout((()=>{this.emitter.emit(zs.Resize,{width:u,height:l})}),0)}h&&this.addTimeout((()=>{var t;this.firstFullSnapshot||(this.firstFullSnapshot=h,this.rebuildFullSnapshot(h),null==(t=this.iframe.contentWindow)||t.scrollTo(h.data.initialOffset))}),1),this.service.state.context.events.find(Ia)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,e){return this.emitter.on(t,e),this}off(t,e){return this.emitter.off(t,e),this}addEmitterHandler(t,e){this.emitter.on(t,e),this.emitterHandlers.push({event:t,handler:e})}addTimeout(t,e){var r=setTimeout((()=>{this.timeouts.delete(r),t()}),e);return this.timeouts.add(r),r}setConfig(t){Object.keys(t).forEach((e=>{this.config[e]=t[e]})),this.config.skipInactive||this.backToNormal(),void 0!==t.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),void 0!==t.mouseTail&&(!1===t.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){var t=this.service.state.context.events[0],e=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:e.timestamp,totalTime:e.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){var{baselineTime:t,events:e}=this.service.state.context;return t-e[0].timestamp}getMirror(){return this.mirror}play(t){var e,r;void 0===t&&(t=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}}),null==(r=null==(e=this.iframe.contentDocument)?void 0:e.getElementsByTagName("html")[0])||r.classList.remove("rrweb-paused"),this.emitter.emit(zs.Start)}pause(t){var e,r;void 0===t&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof t&&(this.play(t),this.service.send({type:"PAUSE"})),null==(r=null==(e=this.iframe.contentDocument)?void 0:e.getElementsByTagName("html")[0])||r.classList.add("rrweb-paused"),this.emitter.emit(zs.Pause)}resume(t){void 0===t&&(t=0),this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(zs.Resume)}destroy(){var t,e;this.wrapper&&this.wrapper.parentNode&&(this.pause(),this.emitterHandlers.forEach((t=>{var{event:e,handler:r}=t;this.emitter.off(e,r)})),this.emitterHandlers=[],null==(t=this.serviceSubscription)||t.unsubscribe(),null==(e=this.speedServiceSubscription)||e.unsubscribe(),this.serviceSubscription=void 0,this.speedServiceSubscription=void 0,this.service.stop(),this.speedService.stop(),this.timeouts.forEach((t=>clearTimeout(t))),this.timeouts.clear(),this.styleSheetLoadListeners.forEach(((t,e)=>{e.removeEventListener("load",t)})),this.styleSheetLoadListeners.clear(),this.imageMap.clear(),this.canvasEventMap.clear(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.resetCache(),this.config.root.removeChild(this.wrapper),this.emitter.emit(zs.Destroy))}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){var e=this.config.unpackFn?this.config.unpackFn(t):t;Ia(e)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((()=>this.service.send({type:"ADD_EVENT",payload:{event:e,applyPastEventSynchronously:this.config.liveMode}})))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=sr()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Zo(this.iframe.contentWindow,this.iframe.contentDocument),ks(this.iframe.contentWindow))}rebuildFullSnapshot(t,e){var r=this;if(void 0===e&&(e=!1),!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};var i=[],n=new Set,s=(e,r)=>{if("DIALOG"===e.nodeName&&n.add(e),this.collectIframeAndAttachDocument(i,e),this.mediaManager.isSupportedMediaElement(e)){var{events:s}=this.service.state.context;this.mediaManager.addMediaElements(e,t.timestamp-s[0].timestamp,this.mirror)}for(var o of this.config.plugins||[])o.onBuild&&o.onBuild(e,{id:r,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),function(t,e){var{doc:r,onVisit:i,hackCss:n=!0,afterAppend:s,cache:o,mirror:a=new T}=e,h=hr(t,{doc:r,mirror:a,skipChild:!1,hackCss:n,afterAppend:s,cache:o});(function(t,e){for(var r of t.getIds())t.has(r)&&e(t.getNode(r))})(a,(t=>{i&&i(t),function(t,e){var r=e.getMeta(t);if((null==r?void 0:r.type)===v.Element){var i=t;for(var n in r.attributes)if({}.hasOwnProperty.call(r.attributes,n)&&n.startsWith("rr_")){var s=r.attributes[n];"rr_scrollLeft"===n&&(i.scrollLeft=s),"rr_scrollTop"===n&&(i.scrollTop=s)}}}(t,a)}))}(t.data.node,{doc:this.iframe.contentDocument,afterAppend:s,cache:this.cache,mirror:this.mirror}),s(this.iframe.contentDocument,t.data.node.id);var o=function(t){r.attachDocumentToIframe(t,h),r.newDocumentQueue=r.newDocumentQueue.filter((e=>e!==t))};for(var{mutationInQueue:a,builtNode:h}of i)o(a);var{documentElement:u,head:l}=this.iframe.contentDocument;this.insertStyleRules(u,l),n.forEach((t=>Sa(t))),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(zs.FullsnapshotRebuilded,t),e||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,e){var r,i,n=(i=this.config.blockClass,["."+i+" { background: currentColor }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&n.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){var s=this.virtualDom.createElement("style");this.virtualDom.mirror.add(s,qn(s,this.virtualDom.unserializedId)),t.insertBefore(s,e),s.rules.push({source:js.StyleSheetRule,adds:n.map(((t,e)=>({rule:t,index:e})))})}else{var o=document.createElement("style");t.insertBefore(o,e);for(var a=0;n.length>a;a++)null==(r=o.sheet)||r.insertRule(n[a],a)}}attachDocumentToIframe(t,e){var r=this,i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,n=[],s=new Set,o=(t,r)=>{"DIALOG"===t.nodeName&&s.add(t),this.collectIframeAndAttachDocument(n,t);var o=i.getMeta(t);if((null==o?void 0:o.type)===Vs.Element&&"HTML"===(null==o?void 0:o.tagName.toUpperCase())){var{documentElement:a,head:h}=e.contentDocument;this.insertStyleRules(a,h)}if(!this.usingVirtualDom)for(var u of this.config.plugins||[])u.onBuild&&u.onBuild(t,{id:r,replayer:this})};hr(t.node,{doc:e.contentDocument,mirror:i,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(e.contentDocument,t.node.id);var a=function(t){r.attachDocumentToIframe(t,u),r.newDocumentQueue=r.newDocumentQueue.filter((e=>e!==t))};for(var{mutationInQueue:h,builtNode:u}of n)a(h);s.forEach((t=>Sa(t)))}collectIframeAndAttachDocument(t,e){if(Is(e,this.mirror)){var r=this.newDocumentQueue.find((t=>t.parentId===this.mirror.getId(e)));r&&t.push({mutationInQueue:r,builtNode:e})}}waitForStylesheetLoad(){var t,e=null==(t=this.iframe.contentDocument)?void 0:t.head;if(e){var r,i=new Set,n=this.service.state,s=()=>{n=this.service.state};this.emitter.on(zs.Start,s),this.emitter.on(zs.Pause,s);var o=()=>{this.emitter.off(zs.Start,s),this.emitter.off(zs.Pause,s)};e.querySelectorAll('link[rel="stylesheet"]').forEach((t=>{t.sheet||(i.add(t),t.addEventListener("load",(()=>{i.delete(t),0===i.size&&-1!==r&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(zs.LoadStylesheetEnd),r&&clearTimeout(r),o())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(zs.LoadStylesheetStart),r=setTimeout((()=>{n.matches("playing")&&this.play(this.getCurrentTime()),r=-1,o()}),this.config.loadTimeout))}}preloadAllImages(){var t=this;return e((function*(){var e=[],r=function*(r){r.type===Ps.IncrementalSnapshot&&r.data.source===js.CanvasMutation&&(e.push(t.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach((e=>{t.preloadImages(e,r)})))};for(var i of t.service.state.context.events)yield*r(i);return Promise.all(e)}))()}preloadImages(t,e){if("drawImage"===t.property&&"string"==typeof t.args[0]&&!this.imageMap.has(e)){var r=document.createElement("canvas"),i=r.getContext("2d"),n=null==i?void 0:i.createImageData(r.width,r.height);null==i||i.putImageData(n,0,0)}}deserializeAndPreloadCanvasEvents(t,i){var n=this;return e((function*(){if(!n.canvasEventMap.has(i)){var s={isUnchanged:!0};if("commands"in t){var o=yield Promise.all(t.commands.map(function(){var t=e((function*(t){var e=yield Promise.all(t.args.map(fa(n.imageMap,null,s)));return r({},t,{args:e})}));return function(e){return t.apply(this,arguments)}}()));!1===s.isUnchanged&&n.canvasEventMap.set(i,r({},t,{commands:o}))}else{var a=yield Promise.all(t.args.map(fa(n.imageMap,null,s)));!1===s.isUnchanged&&n.canvasEventMap.set(i,r({},t,{args:a}))}}}))()}applyIncremental(t,e){var r,i,n,{data:s}=t;switch(s.source){case js.Mutation:try{this.applyMutation(s,e)}catch(t){this.warn("Exception in mutation "+(t.message||t),s)}break;case js.Drag:case js.TouchMove:case js.MouseMove:if(e){var o=s.positions[s.positions.length-1];this.mousePos={x:o.x,y:o.y,id:o.id,debugData:s}}else s.positions.forEach((r=>{this.timer.addAction({doAction:()=>{this.moveAndHover(r.x,r.y,r.id,e,s)},delay:r.timeOffset+t.timestamp-this.service.state.context.baselineTime})})),this.timer.addAction({doAction(){},delay:t.delay-(null==(r=s.positions[0])?void 0:r.timeOffset)});break;case js.MouseInteraction:if(-1===s.id)break;var a=new Event(D(Us[s.type])),h=this.mirror.getNode(s.id);if(!h)return this.debugNodeNotFound(s,s.id);this.emitter.emit(zs.MouseInteraction,{type:s.type,target:h});var{triggerFocus:u}=this.config;switch(s.type){case Us.Blur:"blur"in h&&h.blur();break;case Us.Focus:u&&h.focus&&h.focus({preventScroll:!0});break;case Us.Click:case Us.TouchStart:case Us.TouchEnd:case Us.MouseDown:case Us.MouseUp:e?(s.type===Us.TouchStart?this.touchActive=!0:s.type===Us.TouchEnd&&(this.touchActive=!1),s.type===Us.MouseDown?this.lastMouseDownEvent=[h,a]:s.type===Us.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:s.x||0,y:s.y||0,id:s.id,debugData:s}):(s.type===Us.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(s.x||0,s.y||0,s.id,e,s),s.type===Us.Click?(this.mouse.classList.remove("active"),this.mouse.classList.add("active")):s.type===Us.TouchStart?this.mouse.classList.add("touch-active"):s.type===Us.TouchEnd?this.mouse.classList.remove("touch-active"):h.dispatchEvent(a));break;case Us.TouchCancel:e?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:h.dispatchEvent(a)}break;case js.Scroll:if(-1===s.id)break;if(e&&this.lastScrollMap.set(s.id,s),this.usingVirtualDom){var l=this.virtualDom.mirror.getNode(s.id);if(!l)return this.debugNodeNotFound(s,s.id);l.scrollData=s;break}this.applyScroll(s,e);break;case js.ViewportResize:this.emitter.emit(zs.Resize,{width:s.width,height:s.height});break;case js.Input:if(-1===s.id)break;if(this.usingVirtualDom){var c=this.virtualDom.mirror.getNode(s.id);if(!c)return this.debugNodeNotFound(s,s.id);c.inputData=s;break}this.applyInput(s);break;case js.MediaInteraction:var f=this.usingVirtualDom?this.virtualDom.mirror.getNode(s.id):this.mirror.getNode(s.id);if(!f)return this.debugNodeNotFound(s,s.id);var d=f,{events:v}=this.service.state.context;this.mediaManager.mediaMutation({target:d,timeOffset:t.timestamp-v[0].timestamp,mutation:s});break;case js.StyleSheetRule:case js.StyleDeclaration:this.usingVirtualDom?s.styleId?this.constructedStyleMutations.push(s):s.id&&(null==(i=this.virtualDom.mirror.getNode(s.id))||i.rules.push(s)):this.applyStyleSheetMutation(s);break;case js.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){var p=this.virtualDom.mirror.getNode(s.id);if(!p)return this.debugNodeNotFound(s,s.id);p.canvasMutations.push({event:t,mutation:s})}else{var m=this.mirror.getNode(s.id);if(!m)return this.debugNodeNotFound(s,s.id);ya({event:t,mutation:s,target:m,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case js.Font:try{var y=new FontFace(s.family,s.buffer?new Uint8Array(JSON.parse(s.fontSource)):s.fontSource,s.descriptors);null==(n=this.iframe.contentDocument)||n.fonts.add(y)}catch(t){this.warn(t)}break;case js.Selection:if(e){this.lastSelectionData=s;break}this.applySelection(s);break;case js.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(s):this.applyAdoptedStyleSheet(s)}}applyMutation(t,e){var i,n,s,o=this;if(this.config.useVirtualDom&&!this.usingVirtualDom&&e&&(this.usingVirtualDom=!0,i=this.iframe.contentDocument,s=this.virtualDom,void 0===(n=this.mirror)&&(n=new kr),void 0===s&&(s=new Bn),function t(e,r){var i=Yn(e,s,n,r);if(null!==i)if("IFRAME"!==(null==r?void 0:r.nodeName)&&e.nodeType!==xn.DOCUMENT_FRAGMENT_NODE&&(null==r||r.appendChild(i),i.parentNode=r,i.parentElement=r),"IFRAME"===e.nodeName){var o=e.contentDocument;o&&t(o,i)}else e.nodeType!==xn.DOCUMENT_NODE&&e.nodeType!==xn.ELEMENT_NODE&&e.nodeType!==xn.DOCUMENT_FRAGMENT_NODE||(e.nodeType===xn.ELEMENT_NODE&&e.shadowRoot&&t(e.shadowRoot,i),e.childNodes.forEach((e=>t(e,i))))}(i,null),Object.keys(this.legacy_missingNodeRetryMap).length))for(var a in this.legacy_missingNodeRetryMap)try{var h=this.legacy_missingNodeRetryMap[a],u=Yn(h.node,this.virtualDom,this.mirror);u&&(h.node=u)}catch(t){this.warn(t)}var l=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes.filter((e=>!!l.getNode(e.id)||(this.warnNodeNotFound(t,e.id),!1))).forEach((e=>{var r,i=l.getNode(e.id);if(i){var n=l.getNode(e.parentId);if(!n)return this.warnNodeNotFound(t,e.parentId);if(e.isShadow&&Es(n)&&(n=n.shadowRoot),l.removeNodeFromMap(i),n)try{n.removeChild(i),this.usingVirtualDom&&"#text"===i.nodeName&&"STYLE"===n.nodeName&&(null==(r=n.rules)?void 0:r.length)>0&&(n.rules=[])}catch(e){if(!(e instanceof DOMException))throw e;this.warn("parent could not remove child in mutation",n,i,t)}}}));var c=r({},this.legacy_missingNodeRetryMap),f=[],d=e=>{var r,i;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");var n=l.getNode(e.parentId);if(!n)return e.node.type===Vs.Document?this.newDocumentQueue.push(e):t.adds.some((t=>t.node.id===e.parentId))?f.push(e):void 0;e.node.isShadow&&(Es(n)||n.attachShadow({mode:"open"}),n=n.shadowRoot);var s=null,o=null;if(e.previousId&&(s=l.getNode(e.previousId)),e.nextId&&(o=l.getNode(e.nextId)),!e.node.rootId||l.getNode(e.node.rootId)){var a=e.node.rootId?l.getNode(e.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Is(n,l))this.attachDocumentToIframe(e,n);else{var h=(t,e)=>{if(!this.usingVirtualDom)for(var r of(Sa(t),this.config.plugins||[]))r.onBuild&&r.onBuild(t,{id:e,replayer:this})},u=hr(e.node,{doc:a,mirror:l,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:h});if(-1!==e.previousId&&-1!==e.nextId){var d=l.getMeta(n);if(d&&d.type===Vs.Element&&e.node.type===Vs.Text){var v=Array.isArray(n.childNodes)?n.childNodes:Array.from(n.childNodes);if("textarea"===d.tagName)for(var p of v)p.nodeType===n.TEXT_NODE&&n.removeChild(p);else if("style"===d.tagName&&1===v.length)for(var m of v)m.nodeType!==n.TEXT_NODE||l.hasNode(m)||(u.textContent=m.textContent,n.removeChild(m))}else if((null==d?void 0:d.type)===Vs.Document){var y=n;e.node.type===Vs.DocumentType&&(null==(r=y.childNodes[0])?void 0:r.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),"HTML"===u.nodeName&&y.documentElement&&y.removeChild(y.documentElement)}if(s&&s.nextSibling&&s.nextSibling.parentNode?n.insertBefore(u,s.nextSibling):o&&o.parentNode?n.contains(o)?n.insertBefore(u,o):n.insertBefore(u,null):n.appendChild(u),h(u,e.node.id),this.usingVirtualDom&&"#text"===u.nodeName&&"STYLE"===n.nodeName&&(null==(i=n.rules)?void 0:i.length)>0&&(n.rules=[]),Is(u,this.mirror)){var g=this.mirror.getId(u),w=this.newDocumentQueue.find((t=>t.parentId===g));w&&(this.attachDocumentToIframe(w,u),this.newDocumentQueue=this.newDocumentQueue.filter((t=>t!==w)))}(e.previousId||e.nextId)&&this.legacy_resolveMissingNode(c,n,u,e)}else c[e.node.id]={node:u,mutation:e}}}};t.adds.forEach((t=>{d(t)}));for(var v=performance.now();f.length;){var p=Cs(f);if(f.length=0,performance.now()-v>150){this.warn("Timeout in the loop, please check the resolve tree data:",p);break}for(var m of p)l.getNode(m.value.parentId)?Ms(m,(t=>{d(t)})):this.debug("Drop resolve tree since there is no parent for the root node.",m)}Object.keys(c).length&&Object.assign(this.legacy_missingNodeRetryMap,c),Os(t.texts).forEach((e=>{var r,i=l.getNode(e.id);if(!i){if(t.removes.find((t=>t.id===e.id)))return;return this.warnNodeNotFound(t,e.id)}if(i.textContent=e.value,this.usingVirtualDom){var n=i.parentNode;(null==(r=null==n?void 0:n.rules)?void 0:r.length)>0&&(n.rules=[])}})),t.attributes.forEach((e=>{var i,n=l.getNode(e.id);if(!n){if(t.removes.find((t=>t.id===e.id)))return;return this.warnNodeNotFound(t,e.id)}var s=function(){if("string"==typeof a){var t=e.attributes[a];if(null===t)n.removeAttribute(a),"open"===a&&function(t,e){if(!("DIALOG"!==t.nodeName||t instanceof dn)){var r=t;r.isConnected?null===e.attributes.open&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode")):console.warn("dialog is not attached to the dom",r)}}(n,e);else if("string"==typeof t)try{if("_cssText"===a&&("LINK"===n.nodeName||"STYLE"===n.nodeName))try{var s=l.getMeta(n),h=hr(r({},s,{attributes:r({},s.attributes,e.attributes)}),{doc:n.ownerDocument,mirror:l,skipChild:!0,hackCss:!0,cache:o.cache});Object.assign(s.attributes,e.attributes);var u=n.nextSibling,c=n.parentNode;if(h&&c)return c.removeChild(n),c.insertBefore(h,u),l.replace(e.id,h),1}catch(t){}if("value"===a&&"TEXTAREA"===n.nodeName){var f=n;f.childNodes.forEach((t=>f.removeChild(t)));var d=null==(i=n.ownerDocument)?void 0:i.createTextNode(t);d&&f.appendChild(d)}else n.setAttribute(a,t);"rr_open_mode"===a&&"DIALOG"===n.nodeName&&Sa(n,e)}catch(t){o.warn("An error occurred may due to the checkout feature.",t)}else if("style"===a){var v=t,p=n;for(var m in v)if(!1===v[m])p.style.removeProperty(m);else if(v[m]instanceof Array){var y=v[m];p.style.setProperty(m,y[0],y[1])}else p.style.setProperty(m,v[m])}}};for(var a in e.attributes)if(s())break}))}applyScroll(t,e){var r,i,n=this.mirror.getNode(t.id);if(!n)return this.debugNodeNotFound(t,t.id);var s=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)null==(r=this.iframe.contentWindow)||r.scrollTo({top:t.y,left:t.x,behavior:e?"auto":"smooth"});else if((null==s?void 0:s.type)===Vs.Document)null==(i=n.defaultView)||i.scrollTo({top:t.y,left:t.x,behavior:e?"auto":"smooth"});else try{n.scrollTo({top:t.y,left:t.x,behavior:e?"auto":"smooth"})}catch(t){}}applyInput(t){var e=this.mirror.getNode(t.id);if(!e)return this.debugNodeNotFound(t,t.id);try{e.checked=t.isChecked,e.value=t.text}catch(t){}}applySelection(t){try{var e=new Set,r=t.ranges.map((t=>{var{start:r,startOffset:i,end:n,endOffset:s}=t,o=this.mirror.getNode(r),a=this.mirror.getNode(n);if(o&&a){var h=new Range;h.setStart(o,i),h.setEnd(a,s);var u=o.ownerDocument,l=null==u?void 0:u.getSelection();return l&&e.add(l),{range:h,selection:l}}}));e.forEach((t=>t.removeAllRanges())),r.forEach((t=>{var e;return t&&(null==(e=t.selection)?void 0:e.addRange(t.range))}))}catch(t){}}applyStyleSheetMutation(t){var e,r=null;t.styleId?r=this.styleMirror.getStyle(t.styleId):t.id&&(r=(null==(e=this.mirror.getNode(t.id))?void 0:e.sheet)||null),r&&(t.source===js.StyleSheetRule?this.applyStyleSheetRule(t,r):t.source===js.StyleDeclaration&&this.applyStyleDeclaration(t,r))}applyStyleSheetRule(t,e){var r,i,n,s;if(null==(r=t.adds)||r.forEach((t=>{var{rule:r,index:i}=t;try{if(Array.isArray(i)){var{positions:n,index:s}=As(i),o=Ts(e.cssRules,n);null==o||o.insertRule(r,s)}else{var a=void 0===i?void 0:Math.min(i,e.cssRules.length);null==e||e.insertRule(r,a)}}catch(t){}})),null==(i=t.removes)||i.forEach((t=>{var{index:r}=t;try{if(Array.isArray(r)){var{positions:i,index:n}=As(r),s=Ts(e.cssRules,i);null==s||s.deleteRule(n||0)}else null==e||e.deleteRule(r)}catch(t){}})),"string"==typeof t.replace)try{null==(n=e.replace)||n.call(e,t.replace)}catch(t){}if("string"==typeof t.replaceSync)try{null==(s=e.replaceSync)||s.call(e,t.replaceSync)}catch(t){}}applyStyleDeclaration(t,e){var r,i;if(t.set){var n=Ts(e.rules,t.index);null==(r=null==n?void 0:n.style)||r.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){var s=Ts(e.rules,t.index);null==(i=null==s?void 0:s.style)||i.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var e,r=this.mirror.getNode(t.id);if(r){null==(e=t.styles)||e.forEach((t=>{var e,i=null,n=null;if(Es(r)?n=(null==(e=r.ownerDocument)?void 0:e.defaultView)||null:"#document"===r.nodeName&&(n=r.defaultView),n)try{i=new n.CSSStyleSheet,this.styleMirror.add(i,t.styleId),this.applyStyleSheetRule({source:js.StyleSheetRule,adds:t.rules},i)}catch(t){}}));var i=0,n=(t,e)=>{var r=e.map((t=>this.styleMirror.getStyle(t))).filter((t=>null!==t));Es(t)?t.shadowRoot.adoptedStyleSheets=r:"#document"===t.nodeName&&(t.adoptedStyleSheets=r),r.length!==e.length&&10>i&&(setTimeout((()=>n(t,e)),0+100*i),i++)};n(r,t.styleIds)}}legacy_resolveMissingNode(t,e,r,i){var{previousId:n,nextId:s}=i,o=n&&t[n],a=s&&t[s];if(o){var{node:h,mutation:u}=o;e.insertBefore(h,r),delete t[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(t,e,h,u)}if(a){var{node:l,mutation:c}=a;e.insertBefore(l,r.nextSibling),delete t[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(t,e,l,c)}}moveAndHover(t,e,r,i,n){var s=this.mirror.getNode(r);if(!s)return this.debugNodeNotFound(n,r);var o=Rs(s,this.iframe),a=t*o.absoluteScale+o.x,h=e*o.absoluteScale+o.y;this.mouse.style.left=a+"px",this.mouse.style.top=h+"px",i||this.drawMouseTail({x:a,y:h}),this.hoverElements(s)}drawMouseTail(t){if(this.mouseTail){var{lineCap:e,lineWidth:r,strokeStyle:i,duration:n}=!0===this.config.mouseTail?Ma:Object.assign({},Ma,this.config.mouseTail),s=()=>{if(this.mouseTail){var t=this.mouseTail.getContext("2d");t&&this.tailPositions.length&&(t.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),t.beginPath(),t.lineWidth=r,t.lineCap=e,t.strokeStyle=i,t.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach((e=>t.lineTo(e.x,e.y))),t.stroke())}};this.tailPositions.push(t),s(),setTimeout((()=>{this.tailPositions=this.tailPositions.filter((e=>e!==t)),s()}),n/this.speedService.state.context.timer.speed)}}hoverElements(t){var e;null==(e=this.lastHoveredRootNode||this.iframe.contentDocument)||e.querySelectorAll(".\\:hover").forEach((t=>{t.classList.remove(":hover")})),this.lastHoveredRootNode=t.getRootNode();for(var r=t;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(t){return t.type===Ps.IncrementalSnapshot&&t.data.source>js.Mutation&&js.Input>=t.data.source}backToNormal(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(zs.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,e){this.warn("Node with id '"+e+"' not found. ",t)}warnCanvasMutationFailed(t,e){this.warn("Has error on canvas update",e,"canvas mutation:",t)}debugNodeNotFound(t,e){this.debug("Node with id '"+e+"' not found. ",t)}warn(){if(this.config.showWarning){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];this.config.logger.warn(Ca,...e)}}debug(){if(this.config.showDebug){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];this.config.logger.log(Ca,...e)}}}var{addCustomEvent:Ra}=zo,{freezePage:Ea}=zo,{takeFullSnapshot:Ta}=zo;export{Ps as EventType,js as IncrementalSource,Us as MouseInteractions,xa as Replayer,zs as ReplayerEvents,Ra as addCustomEvent,ya as canvasMutation,Ea as freezePage,us as mirror,zo as record,ft as resetMaxDepthState,Ta as takeFullSnapshot,Fs as utils,ct as wasMaxDepthReached};
1
+ function t(t,e,r,i,n,s,o){try{var a=t[s](o),h=a.value}catch(t){return void r(t)}a.done?e(h):Promise.resolve(h).then(i,n)}function e(e){return function(){var r=this,i=arguments;return new Promise((function(n,s){var o=e.apply(r,i);function a(e){t(o,n,s,a,h,"next",e)}function h(e){t(o,n,s,a,h,"throw",e)}a(void 0)}))}}function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},r.apply(null,arguments)}function i(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;r[i]=t[i]}return r}var n,s=["inputs"],o=["inputId"],a=["inputs"],h=["inputId"],u=["type"],l=Object.defineProperty,c=(t,e,r)=>((t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),f=Object.defineProperty,d=(t,e,r)=>((t,e,r)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),v=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(v||{}),p={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},m={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},y={};function g(t){if(y[t])return y[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in p?p[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in m?m[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return y[t]=e.prototype,e.prototype;var a=document.createElement("iframe");try{document.body.appendChild(a);var h=a.contentWindow;if(!h)return e.prototype;var u=h[t].prototype;return u?y[t]=u:r}catch(t){return r}finally{a.parentNode&&document.body.removeChild(a)}}var w={};function b(t,e,r){var i,n=t+"."+String(r);if(w[n])return w[n].call(e);var s=g(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(w[n]=o,o.call(e)):e[r]}var S={};function k(t,e,r){var i=t+"."+String(r);if(S[i])return S[i].bind(e);var n=g(t)[r];return"function"!=typeof n?e[r]:(S[i]=n,n.bind(e))}var C={childNodes:t=>b("Node",t,"childNodes"),parentNode:t=>b("Node",t,"parentNode"),parentElement:t=>b("Node",t,"parentElement"),textContent:t=>b("Node",t,"textContent"),contains:(t,e)=>k("Node",t,"contains")(e),getRootNode:t=>k("Node",t,"getRootNode")(),host:t=>t&&"host"in t?b("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?b("Element",t,"shadowRoot"):null,querySelector:(t,e)=>k("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>k("Element",t,"querySelectorAll")(e),mutationObserver:()=>g("MutationObserver").constructor,patch(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}};function M(t){return t.nodeType===t.ELEMENT_NODE}function I(t){var e=t&&"host"in t&&"mode"in t&&C.host(t)||null;return Boolean(e&&"shadowRoot"in e&&C.shadowRoot(e)===t)}function x(t){return"[object ShadowRoot]"==={}.toString.call(t)}function R(t){try{var e=t.rules||t.cssRules;if(!e)return null;var r=t.href;return!r&&t.ownerNode&&(r=t.ownerNode.baseURI),(i=Array.from(e,(t=>E(t,r))).join("")).includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}catch(t){return null}var i}function E(t,e){var r;if(function(t){return"styleSheet"in t}(t)){var i;try{i=R(t.styleSheet)||function(t){var{cssText:e}=t;if(3>e.split('"').length)return e;var r=["@import","url("+JSON.stringify(t.href)+")"];return""===t.layerName?r.push("layer"):t.layerName&&r.push("layer("+t.layerName+")"),t.supportsText&&r.push("supports("+t.supportsText+")"),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}(t)}catch(e){i=t.cssText}try{if(i&&(null==(r=t.styleSheet)?void 0:r.href))return U(i,t.styleSheet.href)}catch(t){}return i}var n=t.cssText;return function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")&&(n=n.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),e?U(n,e):n}class T{constructor(){d(this,"idNodeMap",new Map),d(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t))),M(t)){var r=C.shadowRoot(t);r&&this.removeNodeFromMap(r),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function A(){return new T}function O(t){var{element:e,maskInputOptions:r,tagName:i,type:n,value:s,maskInputFn:o}=t,a=s||"",h=n&&D(n);return(r[i.toLowerCase()]||h&&r[h])&&(a=o?o(a,e):"*".repeat(a.length)),a}function D(t){return t.toLowerCase()}var N="__rrweb_original__";function L(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?D(e):null}function B(t,e){var r,i;try{i=new URL(t,null!=e?e:window.location.href)}catch(t){return null}var n=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==n?void 0:n[1])&&void 0!==r?r:null}var _=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,F=/^(?:[a-z+]+:)?\/\//i,P=/^www\..*/i,j=/^(data:)([^,]*),(.*)/i;function U(t,e){return(t||"").replace(_,((t,r,i,n,s,o)=>{var a,h=i||s||o,u=r||n||"";if(!h)return t;if(F.test(h)||P.test(h))return"url("+u+h+u+")";if(j.test(h))return"url("+u+h+u+")";if("/"===h[0])return"url("+u+(((a=e).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+h)+u+")";var l=e.split("/"),c=h.split("/");for(var f of(l.pop(),c))"."!==f&&(".."===f?l.pop():l.push(f));return"url("+u+l.join("/")+u+")"}))}var W,G,H="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",z=4096,V=1,Y=new RegExp("[^a-z0-9-_:]"),q=-2;function Z(){return V++}var J=/^[^ \t\n\r\u000c]+/,X=/^[, \t\n\r\u000c]+/,Q=new WeakMap;function K(t,e){return e&&""!==e.trim()?tt(t,e):e}function tt(t,e){var r=Q.get(t);if(r||(r=t.createElement("a"),Q.set(t,r)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return r.setAttribute("href",e),r.href}function et(t,e,r,i,n,s){var o,a,h;if(!i)return i;if("src"===r||"href"===r&&("use"!==e||"#"!==i[0])){if("link"===e&&n){var u=null==(o=n.sheet)?void 0:o.href;if(u)return u}var l=K(t,i);if("img"===e&&l.startsWith("data:")&&n){var c=l;return((null==s?void 0:s.type)||void 0!==(null==s?void 0:s.quality))&&(c=function(t,e,r,i){if(!t.complete||0===t.naturalWidth)return e;if(t.naturalWidth>z||t.naturalHeight>z)return e;try{var n=document.createElement("canvas");n.width=t.naturalWidth,n.height=t.naturalHeight;var s=n.getContext("2d");return s?(s.drawImage(t,0,0),n.toDataURL(r||"image/webp",null!=i?i:.4)):e}catch(t){return e}}(n,l,s.type,s.quality)),(null==s?void 0:s.maxBase64ImageLength)&&(a=c,c=(h=s.maxBase64ImageLength)&&a.length>h?H:a),c}return l}return"xlink:href"===r&&"#"!==i[0]?K(t,i):"background"!==r||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===r?function(t,e){if(""===e.trim())return e;var r=0;function i(t){var i,n=t.exec(e.substring(r));return n?(r+=(i=n[0]).length,i):""}for(var n=[];i(X),e.length>r;){var s=i(J);if(","===s.slice(-1))s=K(t,s.substring(0,s.length-1)),n.push(s);else{var o="";s=K(t,s);for(var a=!1;;){var h=e.charAt(r);if(""===h){n.push((s+o).trim());break}if(a)")"===h&&(a=!1);else{if(","===h){r+=1,n.push((s+o).trim());break}"("===h&&(a=!0)}o+=h,r+=1}}}return n.join(", ")}(t,i):"style"===r?U(i,tt(t)):"object"===e&&"data"===r?K(t,i):i:K(t,i)}function rt(t,e,r){return("video"===t||"audio"===t)&&"autoplay"===e}function it(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!r&&it(C.parentNode(t),e,r);for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;return!!r&&it(C.parentNode(t),e,r)}function nt(t,e,r,i){var n;if(M(t)){if(!C.childNodes(n=t).length)return!1}else{if(null===C.parentElement(t))return!1;n=C.parentElement(t)}try{if("string"==typeof e){if(i){if(n.closest("."+e))return!0}else if(n.classList.contains(e))return!0}else if(it(n,e,i))return!0;if(r)if(i){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(t){}return!1}var st=new Map;function ot(t,e){return Array.from(t.styleSheets).find((t=>t.href===e))}function at(t){return null==t?"":t.toLowerCase()}var ht=50,ut=!1,lt=!1;function ct(){return lt}function ft(){lt=!1,ut=!1}function dt(t,e){var{doc:r,mirror:i,blockClass:n,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:h=!1,inlineStylesheet:u=!0,maskInputOptions:l={},maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:y=!1,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:b=5e3,onIframeListenerRegistered:S,onStylesheetLoad:k,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:T=(()=>!1),newlyAddedElement:A=!1,depth:_=0,maxDepth:F=ht}=e,{needsMask:P}=e,{preserveWhiteSpace:j=!0}=e;if(_>=F)return lt=!0,ut||(ut=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+F+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;P||(P=nt(t,o,a,void 0===P));var H,z=function(t,e){var{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:o,inlineStylesheet:a,maskInputOptions:h={},maskTextFn:u,maskInputFn:l,dataURLOptions:c={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m=!1}=e,y=function(t,e){if(e.hasNode(t)){var r=e.getId(t);return 1===r?void 0:r}}(r,i);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:v.Document,childNodes:[],compatMode:t.compatMode}:{type:v.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:v.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:y};case t.ELEMENT_NODE:return function(t,e){for(var r,i,n,s,{doc:o,blockClass:a,blockSelector:h,inlineStylesheet:u,maskInputOptions:l={},maskInputFn:c,dataURLOptions:f={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:y=!1,rootId:g}=e,w=function(t,e,r){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;if(r)return t.matches(r)}catch(t){}return!1}(t,a,h),b=function(t){if(t instanceof HTMLFormElement)return"form";var e=D(t.tagName);return Y.test(e)?"div":e}(t),S={},k=t.attributes.length,M=0;k>M;M++){var I=t.attributes[M];rt(b,I.name)||(S[I.name]=et(o,b,D(I.name),I.value,t,f))}if("link"===b&&u){var x=t.sheet;if(!x){var E=function(t){return t.href}(t);E&&!(x=ot(o,E))&&E.includes(".css")&&(x=ot(o,window.location.origin+"/"+E.replace(window.location.href,"")))}var T=null;x&&(T=R(x)),T&&(delete S.rel,delete S.href,S._cssText=T)}if("style"===b&&t.sheet&&!(t.innerText||C.textContent(t)||"").trim().length){var A=R(t.sheet);A&&(S._cssText=A)}if("input"===b||"textarea"===b||"select"===b){var B=t.value,_=t.checked;"radio"!==S.type&&"checkbox"!==S.type&&"submit"!==S.type&&"button"!==S.type&&B?S.value=O({element:t,type:L(t),tagName:b,value:B,maskInputOptions:l,maskInputFn:c}):_&&(S.checked=_)}if("option"===b&&(t.selected&&!l.select?S.selected=!0:delete S.selected),"dialog"===b&&t.open)try{S.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"}catch(t){S.rr_open_mode="modal",S.ph_rr_could_not_detect_modal=!0}if("canvas"===b&&p)if("2d"===t.__context)(function(t){var e=t.getContext("2d");if(!e)return!0;for(var r=0;t.width>r;r+=50)for(var i=0;t.height>i;i+=50){var n=e.getImageData;if(new Uint32Array((N in n?n[N]:n).call(e,r,i,Math.min(50,t.width-r),Math.min(50,t.height-i)).data.buffer).some((t=>0!==t)))return!1}return!0})(t)||(S.rr_dataURL=t.toDataURL(f.type,f.quality));else if(!("__context"in t)){var F=t.toDataURL(f.type,f.quality),P=o.createElement("canvas");P.width=t.width,P.height=t.height,F!==P.toDataURL(f.type,f.quality)&&(S.rr_dataURL=F)}if("img"===b&&d){W||(W=o.createElement("canvas"),G=W.getContext("2d"));var j=t,U=j.currentSrc||j.getAttribute("src")||"<unknown-src>",H=j.crossOrigin,z=()=>{j.removeEventListener("load",z);try{W.width=j.naturalWidth,W.height=j.naturalHeight,G.drawImage(j,0,0),S.rr_dataURL=W.toDataURL(f.type,f.quality)}catch(t){if("anonymous"!==j.crossOrigin)return j.crossOrigin="anonymous",void(j.complete&&0!==j.naturalWidth?z():j.addEventListener("load",z));console.warn("Cannot inline img src="+U+"! Error: "+t)}"anonymous"===j.crossOrigin&&(H?S.crossOrigin=H:j.removeAttribute("crossorigin"))};j.complete&&0!==j.naturalWidth?z():j.addEventListener("load",z)}if("audio"===b||"video"===b){var V=S;V.rr_mediaState=t.paused?"paused":"played",V.rr_mediaCurrentTime=t.currentTime,V.rr_mediaPlaybackRate=t.playbackRate,V.rr_mediaMuted=t.muted,V.rr_mediaLoop=t.loop,V.rr_mediaVolume=t.volume}if(y||(t.scrollLeft&&(S.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(S.rr_scrollTop=t.scrollTop)),w){var{width:q,height:Z,left:J,top:X}=t.getBoundingClientRect(),Q=null==(r=o.defaultView)?void 0:r.getComputedStyle(t);S={class:S.class,rr_width:q+"px",rr_height:Z+"px",rr_left:Math.floor(J+((null==(i=o.defaultView)?void 0:i.scrollX)||0))+"px",rr_top:Math.floor(X+((null==(n=o.defaultView)?void 0:n.scrollY)||0))+"px"},Q&&(S.rr_position=Q.position||"static",Q.transform&&"none"!==Q.transform&&(S.rr_transform=Q.transform),Q.display&&Q.display.startsWith("inline")&&(S.rr_display=Q.display))}"iframe"!==b||m(S.src)||(t.contentDocument||(S.rr_src=S.src),delete S.src);try{customElements.get(b)&&(s=!0)}catch(t){}return{type:v.Element,tagName:b,attributes:S,childNodes:[],isSVG:(K=t,Boolean("svg"===K.tagName||K.ownerSVGElement)||void 0),needBlock:w,rootId:g,isCustom:s};var K}(t,{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:a,maskInputOptions:h,maskInputFn:l,dataURLOptions:c,inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m,rootId:y});case t.TEXT_NODE:return function(t,e){var r,{needsMask:i,maskTextFn:n,rootId:s}=e,o=C.parentNode(t),a=o&&o.tagName,h=C.textContent(t),u="STYLE"===a||void 0,l="SCRIPT"===a||void 0;if(u&&h){try{if(t.nextSibling||t.previousSibling);else if(null==(r=o.sheet)?void 0:r.cssRules){var c=R(o.sheet);c&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(c)&&(h=c)}}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: "+e,t)}h=U(h,tt(e.doc))}return l&&(h="SCRIPT_PLACEHOLDER"),!u&&!l&&h&&i&&(h=n?n(h,C.parentElement(t)):h.replace(/[\S]/g,"*")),{type:v.Text,textContent:h||"",isStyle:u,rootId:s}}(t,{doc:r,needsMask:o,maskTextFn:u,rootId:y});case t.CDATA_SECTION_NODE:return{type:v.CDATA,textContent:"",rootId:y};case t.COMMENT_NODE:return{type:v.Comment,textContent:C.textContent(t)||"",rootId:y};default:return!1}}(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:P,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,dataURLOptions:p,inlineImages:m,recordCanvas:y,keepIframeSrcFn:T,newlyAddedElement:A});if(!z)return console.warn(t,"not serialized"),null;H=i.hasNode(t)?i.getId(t):!function(t,e){if(e.comment&&t.type===v.Comment)return!0;if(t.type===v.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===B(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(at(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===at(t.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes(at(t.attributes.rel)))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&at(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(at(t.attributes.property).match(/^(og|twitter|fb):/)||at(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===at(t.attributes.name)))return!0;if(e.headMetaRobots&&["robots","googlebot","bingbot"].includes(at(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(at(t.attributes.name))||at(t.attributes.property).match(/^article:/)||at(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(at(t.attributes.name)))return!0}}return!1}(z,d)&&(j||z.type!==v.Text||z.isStyle||z.textContent.replace(/^\s+|\s+$/gm,"").length)?Z():q;var V=Object.assign(z,{id:H});if(i.add(t,V),H===q)return null;g&&g(t);var J=!h;if(V.type===v.Element){J=J&&!V.needBlock,delete V.needBlock;var X=C.shadowRoot(t);X&&x(X)&&(V.isShadowHost=!0)}if((V.type===v.Document||V.type===v.Element)&&J){d.headWhitespace&&V.type===v.Element&&"head"===V.tagName&&(j=!1);var Q={doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:P,maskTextClass:o,maskTextSelector:a,skipChild:h,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:y,preserveWhiteSpace:j,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:b,onIframeListenerRegistered:S,onStylesheetLoad:k,stylesheetLoadTimeout:E,keepIframeSrcFn:T,depth:_+1,maxDepth:F};if(V.type===v.Element&&"textarea"===V.tagName&&void 0!==V.attributes.value);else for(var K of Array.from(C.childNodes(t))){var it=dt(K,Q);it&&V.childNodes.push(it)}var ct=null;if(M(t)&&(ct=C.shadowRoot(t)))for(var ft of Array.from(C.childNodes(ct))){var vt=dt(ft,Q);vt&&(x(ct)&&(vt.isShadow=!0),V.childNodes.push(vt))}}var pt=C.parentNode(t);if(pt&&I(pt)&&x(pt)&&(V.isShadow=!0),V.type===v.Element&&"iframe"===V.tagName){var mt=function(t,e,r){var i,n=()=>{},s=t.contentWindow;if(!s)return n;try{i=s.document.readyState}catch(t){return n}var o=()=>e();if("complete"!==i){var a=!1,h=null,u=()=>{a||(a=!0,null!==h&&(clearTimeout(h),h=null),t.removeEventListener("load",l),t.addEventListener("load",o),e())},l=()=>u();return h=setTimeout(u,r),t.addEventListener("load",l),()=>{null!==h&&(clearTimeout(h),h=null),a?t.removeEventListener("load",o):(a=!0,t.removeEventListener("load",l))}}var c,f="about:blank";try{c=s.location.href}catch(t){return n}if(c!==f||t.src===f||""===t.src){var d=setTimeout(e,0);return t.addEventListener("load",o),()=>{clearTimeout(d),t.removeEventListener("load",o)}}return t.addEventListener("load",o),()=>{t.removeEventListener("load",o)}}(t,(()=>{var e=t.contentDocument;if(e&&w){var r=dt(e,{doc:e,mirror:i,blockClass:n,blockSelector:s,needsMask:P,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:y,preserveWhiteSpace:j,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:b,onIframeListenerRegistered:S,onStylesheetLoad:k,stylesheetLoadTimeout:E,keepIframeSrcFn:T,depth:_+1,maxDepth:F});r&&w(t,r)}}),b);null==S||S(t,mt)}return V.type===v.Element&&"link"===V.tagName&&"stylesheet"===V.attributes.rel&&function(e,h,v){if(!st.has(e)){var S;try{S=e.sheet}catch(t){return}if(!S){var C=new AbortController,M=!1,I=()=>{if(!M){M=!0;try{(()=>{if(k){var e=dt(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:P,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:y,preserveWhiteSpace:j,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:E,keepIframeSrcFn:T,depth:_,maxDepth:F});e&&k(t,e)}})()}finally{st.delete(e),C.abort()}}},x=setTimeout(I,v);C.signal.addEventListener("abort",(()=>clearTimeout(x)),{once:!0}),e.addEventListener("load",I,{signal:C.signal,once:!0}),st.set(e,C)}}}(t,0,E),V}function vt(t){return!0===t||"all"===t?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===t,headMetaDescKeywords:"all"===t,headTitleMutations:"all"===t}:!1===t?{}:t}var pt=new RegExp(/(max|min)-device-(width|height)/.source,"g"),mt={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule(t){t.params.match(pt)&&(t.params=t.params.replace(pt,"$1-$2"))}}}},yt={postcssPlugin:"postcss-hover-classes",prepare(){var t=[];return{Rule(e){-1===t.indexOf(e)&&(t.push(e),e.selectors.forEach((function(t){if(t.includes(":hover")){var r=t.replace(new RegExp("(?<!\\\\):hover","g"),".\\:hover");r!==t&&(e.selector+=",\n"+r)}})))}}}};function gt(t){return t&&t.__esModule&&{}.hasOwnProperty.call(t,"default")?t.default:t}function wt(t){if({}.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})})),r}var bt,St={exports:{}};function kt(){if(bt)return St.exports;bt=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return St.exports=e(),St.exports.createColors=e,St.exports}var Ct,Mt,It,xt,Rt,Et,Tt=wt(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function At(){if(Mt)return Ct;Mt=1;var t=kt(),e=Tt;class r extends Error{constructor(t,e,i,n,s,o){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(r){if(!this.source)return"";var i=this.source;null==r&&(r=t.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(r){var{bold:a,gray:h,red:u}=t.createColors(!0);s=t=>a(u(t)),n=t=>h(t),e&&(o=t=>e(t))}var l=i.split(/\r?\n/),c=Math.max(this.line-3,0),f=Math.min(this.line+2,l.length),d=String(f).length;return l.slice(c,f).map(((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)})).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}return Ct=r,r.default=r,Ct}function Ot(){if(xt)return It;xt=1;var t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class e{constructor(t){this.builder=t}atrule(t,e){var r="@"+t.name,i=t.params?this.rawValue(t,"params"):"";void 0!==t.raws.afterName?r+=t.raws.afterName:i&&(r+=" "),t.nodes?this.block(t,r+i):this.builder(r+i+((t.raws.between||"")+(e?";":"")),t)}beforeAfter(t,e){var r;r=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;n>o;o++)r+=s}return r}block(t,e){var r,i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){for(var e=t.nodes.length-1;e>0&&"comment"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,"semicolon"),i=0;t.nodes.length>i;i++){var n=t.nodes[i],s=this.raw(n,"before");s&&this.builder(s),this.stringify(n,e!==i||r)}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+r+"*/",t)}decl(t,e){var r=this.raw(t,"between","colon"),i=t.prop+r+this.rawValue(t,"value");t.important&&(i+=t.raws.important||" !important"),e&&(i+=";"),this.builder(i,t)}document(t){this.body(t)}raw(e,r,i){var n;if(i||(i=r),r&&void 0!==(n=e.raws[r]))return n;var s=e.parent;if("before"===i){if(!s||"root"===s.type&&s.first===e)return"";if(s&&"document"===s.type)return""}if(!s)return t[i];var o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[i])return o.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(e,i);var a,h="raw"+((a=i)[0].toUpperCase()+a.slice(1));return this[h]?n=this[h](o,e):o.walk((t=>{if(void 0!==(n=t.raws[r]))return!1})),void 0===n&&(n=t[i]),o.rawCache[i]=n,n}rawBeforeClose(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk((t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1})),e}rawBeforeRule(t){var e;return t.walk((r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls((t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1})),e}rawEmptyBody(t){var e;return t.walk((t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1})),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk((r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}})),e);var e}rawSemicolon(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1})),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}}return It=e,e.default=e,It}function Dt(){if(Et)return Rt;Et=1;var t=Ot();function e(e,r){new t(r).stringify(e)}return Rt=e,e.default=e,Rt}var Nt,Lt,Bt,_t,Ft,Pt,jt,Ut,Wt,Gt,Ht,zt,Vt,Yt,$t,qt,Zt,Jt,Xt,Qt,Kt,te,ee,re,ie,ne,se,oe,ae,he,ue,le,ce,fe,de,ve,pe,me,ye,ge,we,be,Se,ke,Ce,Me,Ie,xe,Re,Ee,Te,Ae,Oe,De={};function Ne(){return Nt||(Nt=1,De.isClean=Symbol("isClean"),De.my=Symbol("my")),De}function Le(){if(Bt)return Lt;Bt=1;var t=At(),e=Ot(),r=Dt(),{isClean:i,my:n}=Ne();function s(t,e){var r=new t.constructor;for(var i in t)if({}.hasOwnProperty.call(t,i)&&"proxyCache"!==i){var n=t[i],o=typeof n;"parent"===i&&"object"===o?e&&(r[i]=e):"source"===i?r[i]=n:Array.isArray(n)?r[i]=n.map((t=>s(t,r))):("object"===o&&null!==n&&(n=s(n)),r[i]=n)}return r}function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;t.length>s;s++){if(i===e.line&&r===e.column){n=s;break}"\n"===t[s]?(r=1,i+=1):r+=1}return n}class a{get proxyOf(){return this}constructor(t){for(var e in void 0===t&&(t={}),this.raws={},this[i]=!1,this[n]=!0,t)if("nodes"===e)for(var r of(this.nodes=[],t[e]))this.append("function"==typeof r.clone?r.clone():r);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+e.input.from+":"+e.start.line+":"+e.start.column+"$&")}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t){void 0===t&&(t={});var e=s(this);for(var r in t)e[r]=t[r];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(e,r){if(void 0===r&&(r={}),this.source){var{end:i,start:n}=this.rangeBy(r);return this.source.input.error(e,{column:n.column,line:n.line},{column:i.column,line:i.line},r)}return new t(e)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[i]=!0}markDirty(){if(this[i]){this[i]=!1;for(var t=this;t=t.parent;)t[i]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){var r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(o(r,this.source.start),o(r,this.source.end)).indexOf(t.word);-1!==i&&(e=this.positionInside(i))}return e}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=o(i,this.source.start),s=n+t,a=n;s>a;a++)"\n"===i[a]?(e=1,r+=1):e+=1;return{column:e,line:r,offset:s}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:o(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:o(e,t.start)}:t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:o(e,t.end)}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1));return(r.line>i.line||i.line===r.line&&r.column>=i.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,r){return(new e).raw(this,t,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var r={},i=null==e;e=e||new Map;var n=0;for(var s in this)if({}.hasOwnProperty.call(this,s)&&"parent"!==s&&"proxyCache"!==s){var o=this[s];if(Array.isArray(o))r[s]=o.map((t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t));else if("object"==typeof o&&o.toJSON)r[s]=o.toJSON(null,e);else if("source"===s){if(null==o)continue;var a=e.get(o.input);null==a&&(a=n,e.set(o.input,n),n++),r[s]={end:o.end,inputId:a,start:o.start}}else r[s]=o}return i&&(r.inputs=[...e.keys()].map((t=>t.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=r),t.stringify&&(t=t.stringify);var e="";return t(this,(t=>{e+=t})),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}}return Lt=a,a.default=a,Lt}function Be(){if(Ft)return _t;Ft=1;var t=Le();class e extends t{constructor(t){super(t),this.type="comment"}}return _t=e,e.default=e,_t}function _e(){if(jt)return Pt;jt=1;var t=Le();class e extends t{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=r({},t,{value:String(t.value)})),super(t),this.type="decl"}}return Pt=e,e.default=e,Pt}function Fe(){if(Wt)return Ut;Wt=1;var t,e,r,i,n=Be(),s=_e(),o=Le(),{isClean:a,my:h}=Ne();function u(t){return t.map((t=>(t.nodes&&(t.nodes=u(t.nodes)),delete t.source,t)))}function l(t){if(t[a]=!1,t.proxyOf.nodes)for(var e of t.proxyOf.nodes)l(e)}class c extends o{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]}append(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e){var n=this.normalize(i,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.proxyOf.nodes.length>this.indexes[i]&&!1!==(r=t(this.proxyOf.nodes[e=this.indexes[i]],e));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];return t[e](...i.map((t=>"function"==typeof t?(e,r)=>t(e.toProxy(),r):t)))}:"every"===e||"some"===e?r=>t[e]((function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;e>n;n++)i[n-1]=arguments[n];return r(t.toProxy(),...i)})):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map((t=>t.toProxy())):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)(r=this.indexes[o])>i&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i],0===i&&"prepend").reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i,0,s);for(var o in this.indexes)i>(r=this.indexes[o])||(this.indexes[o]=r+n.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=u(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var f of r=r.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if("root"===r.type&&"document"!==this.type)for(var d of r=r.nodes.slice(0))d.parent&&d.parent.removeChild(d,"ignore");else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new s(r)]}else if(r.selector||r.selectors)r=[new i(r)];else if(r.name)r=[new t(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new n(r)]}var v=r.map((t=>(t[h]||c.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[a]&&l(t),t.raws||(t.raws={}),void 0===t.raws.before&&o&&void 0!==o.raws.before&&(t.raws.before=o.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return v}prepend(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e=e.reverse()){var n=this.normalize(i,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var r in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t>(e=this.indexes[r])||(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls((i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))})),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each(((e,r)=>{var i;try{i=t(e,r)}catch(t){throw e.addToError(t)}return!1!==i&&e.walk&&(i=e.walk(t)),i}))}walkAtRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)})):this.walk(((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("atrule"===t.type)return e(t,r)})))}walkComments(t){return this.walk(((e,r)=>{if("comment"===e.type)return t(e,r)}))}walkDecls(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)})):this.walk(((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("decl"===t.type)return e(t,r)})))}walkRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)})):this.walk(((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("rule"===t.type)return e(t,r)})))}}return c.registerParse=t=>{e=t},c.registerRule=t=>{i=t},c.registerAtRule=e=>{t=e},c.registerRoot=t=>{r=t},Ut=c,c.default=c,c.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,t.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,s.prototype):"comment"===e.type?Object.setPrototypeOf(e,n.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[h]=!0,e.nodes&&e.nodes.forEach((t=>{c.rebuild(t)}))},Ut}function Pe(){if(Ht)return Gt;Ht=1;var t=Fe();class e extends t{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}}return Gt=e,e.default=e,t.registerAtRule(e),Gt}function je(){if(Vt)return zt;Vt=1;var t,e,i=Fe();class n extends i{constructor(t){super(r({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return n.registerLazyResult=e=>{t=e},n.registerProcessor=t=>{e=t},zt=n,n.default=n,zt}function Ue(){return $t?Yt:($t=1,Yt={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e)=>(void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n--;)i+=t[Math.random()*t.length|0];return i})})}function We(){if(Zt)return qt;Zt=1;var{existsSync:t,readFileSync:e}=Tt,{dirname:r,join:i}=Tt,{SourceMapConsumer:n,SourceMapGenerator:s}=Tt;class o{constructor(t,e){if(!1!==e.map){this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),i&&(this.text=i)}}consumer(){return this.consumerCache||(this.consumerCache=new n(this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(i){if(this.root=r(i),t(i))return this.mapFile=i,e(i,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof n)return s.fromSourceMap(e).toString();if(e instanceof s)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var o=e(t);if(o){var a=this.loadFile(o);if(!a)throw new Error("Unable to load previous source map: "+o.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var h=this.annotation;return t&&(h=i(r(t),h)),this.loadFile(h)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}}return qt=o,o.default=o,qt}function Ge(){if(Xt)return Jt;Xt=1;var{nanoid:t}=Ue(),{isAbsolute:e,resolve:i}=Tt,{SourceMapConsumer:n,SourceMapGenerator:s}=Tt,{fileURLToPath:o,pathToFileURL:a}=Tt,h=At(),u=We(),l=Tt,c=Symbol("lineToIndexCache"),f=Boolean(n&&s),d=Boolean(i&&e);function v(t){if(t[c])return t[c];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;s>n;n++)r[n]=i,i+=e[n].length+1;return t[c]=r,r}class p{get from(){return this.file||this.id}constructor(r,n){if(void 0===n&&(n={}),null==r||"object"==typeof r&&!r.toString)throw new Error("PostCSS received "+r+" instead of CSS string");if(this.css=r.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(this.file=!d||/^\w+:\/\//.test(n.from)||e(n.from)?n.from:i(n.from)),d&&f){var s=new u(this.css,n);if(s.text){this.map=s;var o=s.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+t(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,u,l;if(void 0===i&&(i={}),e&&"object"==typeof e){var c=e,f=r;if("number"==typeof c.offset){var d=this.fromOffset(u=c.offset);e=d.line,r=d.col}else u=this.fromLineAndColumn(e=c.line,r=c.column);if("number"==typeof f.offset){var v=this.fromOffset(o=f.offset);s=v.line,n=v.col}else s=f.line,n=f.column,o=this.fromLineAndColumn(f.line,f.column)}else if(r)u=this.fromLineAndColumn(e,r);else{var p=this.fromOffset(u=e);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(l=m?new h(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new h(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:u,source:this.css},this.file&&(a&&(l.input.url=a(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,e){return v(this)[t-1]+e-1}fromOffset(t){var e=v(this),r=0;if(e[e.length-1]>t)for(var i,n=e.length-2;n>r;)if(e[i=r+(n-r>>1)]>t)n=i-1;else{if(e[i+1]>t){r=i;break}r=i+1}else r=e.length-1;return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:i(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,r,i,n){if(!this.map)return!1;var s,h,u=this.map.consumer(),l=u.originalPositionFor({column:r,line:t});if(!l.source)return!1;"number"==typeof i&&(s=u.originalPositionFor({column:n,line:i})),h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column,endColumn:s&&s.column,endLine:s&&s.line,line:l.line,url:h.toString()};if("file:"===h.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");c.file=o(h)}var f=u.sourceContentFor(l.source);return f&&(c.source=f),c}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=r({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}}return Jt=p,p.default=p,l&&l.registerInput&&l.registerInput(p),Jt}function He(){if(Kt)return Qt;Kt=1;var t,e,r=Fe();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var n of i)n.raws.before=e.raws.before;return i}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return i.registerLazyResult=e=>{t=e},i.registerProcessor=t=>{e=t},Qt=i,i.default=i,r.registerRoot(i),Qt}function ze(){if(ee)return te;ee=1;var t={comma(e){return t.split(e,[","],!0)},space(e){return t.split(e,[" ","\n","\t"])},split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};return te=t,t.default=t,te}function Ve(){if(ie)return re;ie=1;var t=Fe(),e=ze();class r extends t{get selectors(){return e.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}}return re=r,r.default=r,t.registerRule(r),re}function Ye(){if(ae)return oe;ae=1;var{dirname:t,relative:e,resolve:r,sep:i}=Tt,{SourceMapConsumer:n,SourceMapGenerator:s}=Tt,{pathToFileURL:o}=Tt,a=Ge(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return oe=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var t;t=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";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var r=this.toUrl(this.path(e.file)),i=e.root||t(e.file),s=void 0;!1===this.mapOpts.sourcesContent?(s=new n(e.text)).sourcesContent&&(s.sourcesContent=null):s=e.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&h&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,(e=>{t+=e})),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=s.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new s({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 s({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,h)=>{if(this.css+=s,a&&"end"!==h&&(o.generated.line=r,o.generated.column=i-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=s.match(/\n/g))?(r+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.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=i-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=i-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((t=>t.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some((t=>t.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((t=>t.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(i){if(this.mapOpts.absolute)return i;if(60===i.charCodeAt(0))return i;if(/^\w+:\/\//.test(i))return i;var n=this.memoizedPaths.get(i);if(n)return n;var s=this.opts.to?t(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=t(r(s,this.mapOpts.annotation)));var o=e(s,i);return this.memoizedPaths.set(i,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}}));else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk((e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}}));else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(o){var r=o(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===i&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}}function $e(){if(ue)return he;ue=1;var t="'".charCodeAt(0),e='"'.charCodeAt(0),r="\\".charCodeAt(0),i="/".charCodeAt(0),n="\n".charCodeAt(0),s=" ".charCodeAt(0),o="\f".charCodeAt(0),a="\t".charCodeAt(0),h="\r".charCodeAt(0),u="[".charCodeAt(0),l="]".charCodeAt(0),c="(".charCodeAt(0),f=")".charCodeAt(0),d="{".charCodeAt(0),v="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),y=":".charCodeAt(0),g="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return he=function(C,M){void 0===M&&(M={});var I,x,R,E,T,A,O,D,N,L,B=C.css.valueOf(),_=M.ignoreErrors,F=B.length,P=0,j=[],U=[];function W(t){throw C.error("Unclosed "+t,P)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&P>=F,nextToken(C){if(U.length)return U.pop();if(F>P){var M=!!C&&C.ignoreUnclosed;switch(I=B.charCodeAt(P)){case n:case s:case a:case h:case o:E=P;do{I=B.charCodeAt(E+=1)}while(I===s||I===n||I===a||I===h||I===o);A=["space",B.slice(P,E)],P=E-1;break;case u:case l:case d:case v:case y:case p:case f:var G=String.fromCharCode(I);A=[G,G,P];break;case c:if(L=j.length?j.pop()[1]:"",N=B.charCodeAt(P+1),"url"===L&&N!==t&&N!==e&&N!==s&&N!==n&&N!==a&&N!==o&&N!==h){E=P;do{if(O=!1,-1===(E=B.indexOf(")",E+1))){if(_||M){E=P;break}W("bracket")}for(D=E;B.charCodeAt(D-1)===r;)D-=1,O=!O}while(O);A=["brackets",B.slice(P,E+1),P,E],P=E}else E=B.indexOf(")",P+1),x=B.slice(P,E+1),-1===E||S.test(x)?A=["(","(",P]:(A=["brackets",x,P,E],P=E);break;case t:case e:T=I===t?"'":'"',E=P;do{if(O=!1,-1===(E=B.indexOf(T,E+1))){if(_||M){E=P+1;break}W("string")}for(D=E;B.charCodeAt(D-1)===r;)D-=1,O=!O}while(O);A=["string",B.slice(P,E+1),P,E],P=E;break;case g:w.lastIndex=P+1,w.test(B),A=["at-word",B.slice(P,1+(E=0===w.lastIndex?B.length-1:w.lastIndex-2)),P,E],P=E;break;case r:for(E=P,R=!0;B.charCodeAt(E+1)===r;)E+=1,R=!R;if(I=B.charCodeAt(E+1),R&&I!==i&&I!==s&&I!==n&&I!==a&&I!==h&&I!==o&&k.test(B.charAt(E+=1))){for(;k.test(B.charAt(E+1));)E+=1;B.charCodeAt(E+1)===s&&(E+=1)}A=["word",B.slice(P,E+1),P,E],P=E;break;default:I===i&&B.charCodeAt(P+1)===m?(0===(E=B.indexOf("*/",P+2)+1)&&(_||M?E=B.length:W("comment")),A=["comment",B.slice(P,E+1),P,E],P=E):(b.lastIndex=P+1,b.test(B),A=["word",B.slice(P,1+(E=0===b.lastIndex?B.length-1:b.lastIndex-2)),P,E],j.push(A),P=E)}return P++,A}},position:()=>P}}}function qe(){if(ce)return le;ce=1;var t=Pe(),e=Be(),r=_e(),i=He(),n=Ve(),s=$e(),o={empty:!0,space:!0};return le=class{constructor(t){this.input=t,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(e){var r,i,n,s=new t;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?u.push("("===r?")":"]"):"{"===r&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),0===u.length){if(";"===r){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===r){a=!0;break}if("}"===r){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}h.push(e)}else h.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(s.source.end=this.getPosition((e=h[h.length-1])[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var[s,o]of t.entries()){if("("===(i=(r=o)[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return s}this.doubleColon(r)}e=r}return!1}comment(t){var r=new e;this.init(r,t[2]),r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++;var i=t[1].slice(2,-2);if(/^\s*$/.test(i))r.text="",r.raws.left=i,r.raws.right="";else{var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n,s=t[t.length-1];for(";"===s[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(s[3]||s[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),i.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var o=t[0][0];if(":"===o||"space"===o||"comment"===o)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(n=t.shift())[0]){i.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),i.raws.between+=n[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var a,h=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)h.push(t.shift());this.precheckMissedSemicolon(t);for(var u=t.length-1;u>=0;u--){if("!important"===(n=t[u])[1].toLowerCase()){i.important=!0;var l=this.stringFrom(t,u);" !important"!==(l=this.spacesFromEnd(t)+l)&&(i.raws.important=l);break}if("important"===n[1].toLowerCase()){for(var c=t.slice(0),f="",d=u;d>0;d--){var v=c[d][0];if(f.trim().startsWith("!")&&"space"!==v)break;f=c.pop()[1]+f}f.trim().startsWith("!")&&(i.important=!0,i.raws.important=f,t=c)}if("space"!==n[0]&&"comment"!==n[0])break}var p=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));p&&(i.raws.between+=h.map((t=>t[1])).join(""),h=[]),this.raw(i,"value",h.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new n;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),s.push("}");else if(0===s.length){if(";"===r){if(i)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,r,i){for(var n,s,a=r.length,h="",u=!0,l=0;a>l;l+=1)"space"!==(s=(n=r[l])[0])||l!==a-1||i?"comment"===s&&(o[r[l-1]?r[l-1][0]:"empty"]||o[r[l+1]?r[l+1][0]:"empty"]||","===h.slice(-1))?u=!1:h+=n[1]:u=!1;if(!u){var c=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:c,value:h}}t[e]=h}rule(t){t.pop();var e=new n;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;t.length>i;i++)r+=t[i][1];return t.splice(e,t.length-e),r}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}}}function Ze(){if(de)return fe;de=1;var t=Fe(),e=Ge(),r=qe();function i(t,i){var n=new e(t,i),s=new r(n);try{s.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&i&&i.from&&(/\.scss$/i.test(i.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(i.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(i.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return s.root}return fe=i,i.default=i,t.registerParse(i),fe}function Je(){if(pe)return ve;pe=1;class t{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){var r=e.node.rangeBy(e);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in e)this[i]=e[i]}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}}return ve=t,t.default=t,ve}function Xe(){if(ye)return me;ye=1;var t=Je();class e{get content(){return this.css}constructor(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,r){void 0===r&&(r={}),r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);var i=new t(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter((t=>"warning"===t.type))}}return me=e,e.default=e,me}function Qe(){if(we)return ge;we=1;var t={};return ge=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Ke(){if(Se)return be;Se=1;var t=Fe(),i=je(),n=Ye(),s=Ze(),o=Xe(),a=He(),h=Dt(),{isClean:u,my:l}=Ne(),c=Qe(),f={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={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},v={Once:!0,postcssPlugin:!0,prepare:!0},p=0;function m(t){return"object"==typeof t&&"function"==typeof t.then}function y(t){var e=!1,r=f[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,p,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,p,r+"Exit"]:[r,r+"Exit"]}function g(t){return{eventIndex:0,events:"document"===t.type?["Document",p,"DocumentExit"]:"root"===t.type?["Root",p,"RootExit"]:y(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function w(t){return t[u]=!1,t.nodes&&t.nodes.forEach((t=>w(t))),t}var b={};class S{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"}constructor(e,i,n){var a;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof S||i instanceof o)a=w(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var h=s;n.syntax&&(h=n.syntax.parse),n.parser&&(h=n.parser),h.parse&&(h=h.parse);try{a=h(i,n)}catch(t){this.processed=!0,this.error=t}a&&!a[l]&&t.rebuild(a)}else a=w(i);this.result=new o(e,a,n),this.helpers=r({},b,{postcss:b,result:this.result}),this.plugins=this.processor.plugins.map((t=>"object"==typeof t&&t.prepare?r({},t,t.prepare(this.result)):t))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){var i=r.postcssPlugin,n=r.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!d[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!v[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e((function*(){t.plugin=0;for(var e=0;t.plugins.length>e;e++){var r=t.runOnRoot(t.plugins[e]);if(m(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var i=t.result.root;!i[u];){i[u]=!0;for(var n=[g(i)];n.length>0;){var s=t.visitTick(n);if(m(s))try{yield s}catch(e){throw t.handleError(e,n[n.length-1].node)}}}if(t.listeners.OnceExit){var o=function*(e){t.result.lastPlugin=a;try{if("document"===i.type){var r=i.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(i,t.helpers)}catch(e){throw t.handleError(e)}};for(var[a,h]of t.listeners.OnceExit)yield*o(h)}}return t.processed=!0,t.stringify()}))()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map((e=>t.Once(e,this.helpers)));return m(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=h;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=new n(e,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(var t of this.plugins)if(m(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[u];)e[u]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||c("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(t,e)}toString(){return this.css}visitSync(t,e){for(var[r,i]of t){this.result.lastPlugin=r;var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(m(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:r,visitors:i}=e;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&i.length>e.visitorIndex){var[n,s]=i[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=n;try{return s(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var o,a=e.iterator;o=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!o[u])return o[u]=!0,void t.push(g(o));e.iterator=0,delete r.indexes[a]}for(var h=e.events;h.length>e.eventIndex;){var l=h[e.eventIndex];if(e.eventIndex+=1,l===p)return void(r.nodes&&r.nodes.length&&(r[u]=!0,e.iterator=r.getIterator()));if(this.listeners[l])return void(e.visitors=this.listeners[l])}t.pop()}else t.pop()}walkSync(t){t[u]=!0;var e=y(t);for(var r of e)if(r===p)t.nodes&&t.each((t=>{t[u]||this.walkSync(t)}));else{var i=this.listeners[r];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}}return S.registerPostcss=t=>{b=t},be=S,S.default=S,a.registerLazyResult(S),i.registerLazyResult(S),be}function tr(){if(Re)return xe;Re=1;var t=Pe(),e=Be(),n=Fe(),a=At(),h=_e(),u=je(),l=function(){if(se)return ne;se=1;var t=Pe(),e=Be(),n=_e(),a=Ge(),h=We(),u=He(),l=Ve();function c(f,d){if(Array.isArray(f))return f.map((t=>c(t)));var{inputs:v}=f,p=i(f,s);if(v)for(var m of(d=[],v)){var y=r({},m,{__proto__:a.prototype});y.map&&(y.map=r({},y.map,{__proto__:h.prototype})),d.push(y)}if(p.nodes&&(p.nodes=f.nodes.map((t=>c(t,d)))),p.source){var g=p.source,{inputId:w}=g,b=i(g,o);p.source=b,null!=w&&(p.source.input=d[w])}if("root"===p.type)return new u(p);if("decl"===p.type)return new n(p);if("rule"===p.type)return new l(p);if("comment"===p.type)return new e(p);if("atrule"===p.type)return new t(p);throw new Error("Unknown node type: "+f.type)}return ne=c,c.default=c,ne}(),c=Ge(),f=Ke(),d=ze(),v=Le(),p=Ze(),m=function(){if(Ie)return Me;Ie=1;var t=je(),e=Ke(),r=function(){if(Ce)return ke;Ce=1;var t=Ye(),e=Ze(),r=Xe(),i=Dt(),n=Qe();class s{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;var t,r=e;try{t=r(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,n,s){var o;n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var a=i;this.result=new r(this._processor,o,this._opts),this.result.css=n;var h=this;Object.defineProperty(this.result,"root",{get(){return h.root}});var u=new t(a,o,this._opts,n);if(u.isMap()){var[l,c]=u.generate();l&&(this.result.css=l),c&&(this.result.map=c)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("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(t,e)}toString(){return this._css}warnings(){return[]}}return ke=s,s.default=s,ke}(),i=He();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.6",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else if("function"==typeof r)e.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 e}process(t,i){return void 0===i&&(i={}),this.plugins.length||i.parser||i.stringifier||i.syntax?new e(this,t,i):new r(this,t,i)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}return Me=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),Me}(),y=Xe(),g=He(),w=Ve(),b=Dt(),S=Je();function k(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new m(e)}return k.plugin=function(t,e){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var r=e(...arguments);return r.postcssPlugin=t,r.postcssVersion=(new m).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return k([n(r)]).process(t,e)},n},k.stringify=b,k.parse=p,k.fromJSON=l,k.list=d,k.comment=t=>new e(t),k.atRule=e=>new t(e),k.decl=t=>new h(t),k.rule=t=>new w(t),k.root=t=>new g(t),k.document=t=>new u(t),k.CssSyntaxError=a,k.Declaration=h,k.Container=n,k.Processor=m,k.Document=u,k.Comment=e,k.Warning=S,k.AtRule=t,k.Result=y,k.Input=c,k.Rule=w,k.Root=g,k.Node=v,f.registerPostcss(k),xe=k,k.default=k,xe}var er=gt(function(){if(Oe)return Ae;Oe=1;var{Input:t}=tr(),e=function(){if(Te)return Ee;Te=1;var t=Be(),e=qe(),r=$e();return Ee=class extends e{checkMissedSemicolon(){}comment(e){var r=new t;this.init(r,e[2]);var i=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:i.col,line:i.line,offset:e[3]+1};var n=e[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some((t=>"word"===t[0]))&&super.decl(t)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(t){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(0!==r&&r>=0){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map((t=>t[1])).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map((t=>t[1])).join("")}unnamedAtrule(t){t.name=""}}}();return Ae=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}()),rr=gt(tr()),ir={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function nr(t,e){var r=null==e?void 0:e.stylesWithHoverClass.get(t);if(r)return r;var i=t;try{i=rr([mt,yt]).process(t,{parser:er}).css}catch(t){console.warn("Failed to adapt css for replay",t)}return null==e||e.stylesWithHoverClass.set(t,i),i}function sr(){return{stylesWithHoverClass:new Map}}var or=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),ar=new Set;function hr(t,e){var r,i,{doc:n,mirror:s,skipChild:o=!1,hackCss:a=!0,afterAppend:h,cache:u}=e;if(s.has(t.id)){var l=s.getNode(t.id),c=s.getMeta(l);if(i=t,(r=c)&&i&&r.type===i.type&&(r.type===v.Document?r.compatMode===i.compatMode:r.type===v.DocumentType?r.name===i.name&&r.publicId===i.publicId&&r.systemId===i.systemId:r.type===v.Comment||r.type===v.Text||r.type===v.CDATA?r.textContent===i.textContent:r.type===v.Element&&r.tagName===i.tagName&&JSON.stringify(r.attributes)===JSON.stringify(i.attributes)&&r.isSVG===i.isSVG&&r.needBlock===i.needBlock))return s.getNode(t.id)}var f=function(t,e){var r,{doc:i,hackCss:n,cache:s}=e;switch(t.type){case v.Document:return i.implementation.createDocument(null,"",null);case v.DocumentType:return i.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case v.Element:var o,a=function(t){var e=ir[t.tagName]?ir[t.tagName]:t.tagName;return"link"===e&&t.attributes._cssText&&(e="style"),e}(t);if(t.isSVG)o=i.createElementNS("http://www.w3.org/2000/svg",a);else{if(t.isCustom&&(null==(r=i.defaultView)?void 0:r.customElements)&&function(t){if("string"!=typeof t||0===t.length)return!1;if(or.has(t))return!1;if(!t.includes("-"))return!1;var e=t.charCodeAt(0);return e>=97&&122>=e}(t.tagName)&&!i.defaultView.customElements.get(t.tagName))try{i.defaultView.customElements.define(t.tagName,class extends i.defaultView.HTMLElement{})}catch(e){ar.has(t.tagName)||(ar.add(t.tagName),console.warn("rrweb: failed to register custom element",t.tagName,e))}o=i.createElement(a)}var h={};for(var u in t.attributes)if({}.hasOwnProperty.call(t.attributes,u)){var l=t.attributes[u];if(("option"!==a||"selected"!==u||!1!==l)&&null!==l)if(!0===l&&(l=""),u.startsWith("rr_"))h[u]=l;else{var c="textarea"===a&&"value"===u,f="style"===a&&"_cssText"===u;if(f&&n&&"string"==typeof l&&(l=nr(l,s)),!c&&!f||"string"!=typeof l)try{if(t.isSVG&&"xlink:href"===u)o.setAttributeNS("http://www.w3.org/1999/xlink",u,l.toString());else if("onload"===u||"onclick"===u||"onmouse"===u.substring(0,7))o.setAttribute("_"+u,l.toString());else{if("meta"===a&&"Content-Security-Policy"===t.attributes["http-equiv"]&&"content"===u){o.setAttribute("csp-content",l.toString());continue}"link"===a&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===a&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===B(t.attributes.href)||("img"===a&&t.attributes.srcset&&t.attributes.rr_dataURL?o.setAttribute("rrweb-original-srcset",t.attributes.srcset):o.setAttribute(u,l.toString()))}}catch(t){}else o.appendChild(i.createTextNode(l)),t.childNodes=[]}}var d=!("static"!==h.rr_position&&"relative"!==h.rr_position&&"sticky"!==h.rr_position||void 0!==h.rr_transform&&"none"!==h.rr_transform);if(d&&"string"==typeof h.rr_display){var p=h.rr_display;o.style.setProperty("display","inline"===p?"inline-block":p)}var m=function(){var e=h[y];if("canvas"===a&&"rr_dataURL"===y){var r=i.createElement("img");r.onload=()=>{var t=o.getContext("2d");t&&t.drawImage(r,0,0,r.width,r.height)},r.src=e.toString(),o.RRNodeType&&(o.rr_dataURL=e.toString())}else if("img"===a&&"rr_dataURL"===y){var n=o;n.currentSrc.startsWith("data:")||(n.setAttribute("rrweb-original-src",t.attributes.src),n.src=e.toString())}if("rr_width"===y)o.style.setProperty("width",e.toString());else if("rr_height"===y)o.style.setProperty("height",e.toString());else if("rr_left"===y)d||(o.style.setProperty("left",e.toString()),o.style.setProperty("position","absolute"));else if("rr_top"===y)d||(o.style.setProperty("top",e.toString()),o.style.setProperty("position","absolute"));else if("rr_mediaCurrentTime"===y&&"number"==typeof e)o.currentTime=e;else if("rr_mediaState"===y)switch(e){case"played":o.play().catch((t=>console.warn("media playback error",t)));break;case"paused":o.pause()}else"rr_mediaPlaybackRate"===y&&"number"==typeof e?o.playbackRate=e:"rr_mediaMuted"===y&&"boolean"==typeof e?o.muted=e:"rr_mediaLoop"===y&&"boolean"==typeof e?o.loop=e:"rr_mediaVolume"===y&&"number"==typeof e?o.volume=e:"rr_open_mode"===y&&o.setAttribute("rr_open_mode",e)};for(var y in h)m();if(t.isShadowHost)if(o.shadowRoot)for(;o.shadowRoot.firstChild;)o.shadowRoot.removeChild(o.shadowRoot.firstChild);else o.attachShadow({mode:"open"});return o;case v.Text:return function(t,e){var r=t.textContent;if(t.isStyle&&e.hackCss)try{r=nr(t.textContent,e.cache)}catch(t){}return e.doc.createTextNode(r)}(t,{cache:s,doc:i,hackCss:n});case v.CDATA:return""===t.textContent.trim()?null:i.createCDATASection(t.textContent);case v.Comment:return i.createComment(t.textContent);default:return null}}(t,{doc:n,hackCss:a,cache:u});if(!f)return null;if(t.rootId&&s.getNode(t.rootId)!==n&&s.replace(t.rootId,n),t.type===v.Document&&(n.close(),n.open(),"BackCompat"===t.compatMode&&t.childNodes&&t.childNodes[0].type!==v.DocumentType&&n.write(t.childNodes[0].type===v.Element&&"xmlns"in t.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===t.childNodes[0].attributes.xmlns?'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">':'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'),f=n),s.add(f,t),(t.type===v.Document||t.type===v.Element)&&!o){var d=function(){var e=hr(p,{doc:n,mirror:s,skipChild:!1,hackCss:a,afterAppend:h,cache:u});if(!e)return console.warn("Failed to rebuild",p),1;if(p.isShadow&&M(f)&&f.shadowRoot)f.shadowRoot.appendChild(e);else if(t.type===v.Document&&p.type==v.Element){var r=e,i=null;r.childNodes.forEach((t=>{"BODY"===t.nodeName&&(i=t)})),i?(r.removeChild(i),f.appendChild(e),r.appendChild(i)):f.appendChild(e)}else if(t.type===v.Document&&p.type===v.DocumentType){var o=f.doctype;o&&f.removeChild(o),f.firstChild&&1===f.firstChild.nodeType?f.insertBefore(e,f.firstChild):f.appendChild(e)}else f.appendChild(e);h&&h(e,p.id)};for(var p of t.childNodes)d()}return f}var ur=Object.defineProperty,lr=(t,e,r)=>((t,e,r)=>e in t?ur(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),cr=Object.defineProperty,fr=(t,e,r)=>((t,e,r)=>e in t?cr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),dr={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},vr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},pr={};function mr(t){if(pr[t])return pr[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in dr?dr[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in vr?vr[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return pr[t]=e.prototype,e.prototype;var a=document.createElement("iframe");try{document.body.appendChild(a);var h=a.contentWindow;if(!h)return e.prototype;var u=h[t].prototype;return u?pr[t]=u:r}catch(t){return r}finally{a.parentNode&&document.body.removeChild(a)}}var yr={};function gr(t,e,r){var i,n=t+"."+String(r);if(yr[n])return yr[n].call(e);var s=mr(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(yr[n]=o,o.call(e)):e[r]}var wr={};function br(t,e,r){var i=t+"."+String(r);if(wr[i])return wr[i].bind(e);var n=mr(t)[r];return"function"!=typeof n?e[r]:(wr[i]=n,n.bind(e))}var Sr={childNodes:t=>gr("Node",t,"childNodes"),parentNode:t=>gr("Node",t,"parentNode"),parentElement:t=>gr("Node",t,"parentElement"),textContent:t=>gr("Node",t,"textContent"),contains:(t,e)=>br("Node",t,"contains")(e),getRootNode:t=>br("Node",t,"getRootNode")(),host:t=>t&&"host"in t?gr("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?gr("Element",t,"shadowRoot"):null,querySelector:(t,e)=>br("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>br("Element",t,"querySelectorAll")(e),mutationObserver:()=>mr("MutationObserver").constructor,patch(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}},kr=class{constructor(){fr(this,"idNodeMap",new Map),fr(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t))),function(t){return t.nodeType===t.ELEMENT_NODE}(t)){var r=Sr.shadowRoot(t);r&&this.removeNodeFromMap(r),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Cr(t){if({}.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})})),r}var Mr,Ir={exports:{}};function xr(){if(Mr)return Ir.exports;Mr=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return Ir.exports=e(),Ir.exports.createColors=e,Ir.exports}var Rr,Er,Tr,Ar,Or,Dr,Nr=Cr(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function Lr(){if(Er)return Rr;Er=1;var t=xr(),e=Nr;class r extends Error{constructor(t,e,i,n,s,o){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(r){if(!this.source)return"";var i=this.source;null==r&&(r=t.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(r){var{bold:a,gray:h,red:u}=t.createColors(!0);s=t=>a(u(t)),n=t=>h(t),e&&(o=t=>e(t))}var l=i.split(/\r?\n/),c=Math.max(this.line-3,0),f=Math.min(this.line+2,l.length),d=String(f).length;return l.slice(c,f).map(((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)})).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}return Rr=r,r.default=r,Rr}function Br(){if(Ar)return Tr;Ar=1;var t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class e{constructor(t){this.builder=t}atrule(t,e){var r="@"+t.name,i=t.params?this.rawValue(t,"params"):"";void 0!==t.raws.afterName?r+=t.raws.afterName:i&&(r+=" "),t.nodes?this.block(t,r+i):this.builder(r+i+((t.raws.between||"")+(e?";":"")),t)}beforeAfter(t,e){var r;r=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;n>o;o++)r+=s}return r}block(t,e){var r,i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){for(var e=t.nodes.length-1;e>0&&"comment"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,"semicolon"),i=0;t.nodes.length>i;i++){var n=t.nodes[i],s=this.raw(n,"before");s&&this.builder(s),this.stringify(n,e!==i||r)}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+r+"*/",t)}decl(t,e){var r=this.raw(t,"between","colon"),i=t.prop+r+this.rawValue(t,"value");t.important&&(i+=t.raws.important||" !important"),e&&(i+=";"),this.builder(i,t)}document(t){this.body(t)}raw(e,r,i){var n;if(i||(i=r),r&&void 0!==(n=e.raws[r]))return n;var s=e.parent;if("before"===i){if(!s||"root"===s.type&&s.first===e)return"";if(s&&"document"===s.type)return""}if(!s)return t[i];var o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[i])return o.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(e,i);var a,h="raw"+((a=i)[0].toUpperCase()+a.slice(1));return this[h]?n=this[h](o,e):o.walk((t=>{if(void 0!==(n=t.raws[r]))return!1})),void 0===n&&(n=t[i]),o.rawCache[i]=n,n}rawBeforeClose(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk((t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1})),e}rawBeforeRule(t){var e;return t.walk((r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls((t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1})),e}rawEmptyBody(t){var e;return t.walk((t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1})),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk((r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}})),e);var e}rawSemicolon(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1})),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}}return Tr=e,e.default=e,Tr}function _r(){if(Dr)return Or;Dr=1;var t=Br();function e(e,r){new t(r).stringify(e)}return Or=e,e.default=e,Or}var Fr,Pr,jr,Ur,Wr,Gr,Hr,zr,Vr,Yr,$r,qr,Zr,Jr,Xr,Qr,Kr,ti,ei,ri,ii,ni,si,oi,ai,hi,ui,li,ci,fi,di,vi,pi,mi,yi,gi,wi,bi,Si,ki,Ci,Mi,Ii,xi,Ri,Ei,Ti,Ai,Oi,Di,Ni,Li,Bi,_i={};function Fi(){return Fr||(Fr=1,_i.isClean=Symbol("isClean"),_i.my=Symbol("my")),_i}function Pi(){if(jr)return Pr;jr=1;var t=Lr(),e=Br(),r=_r(),{isClean:i,my:n}=Fi();function s(t,e){var r=new t.constructor;for(var i in t)if({}.hasOwnProperty.call(t,i)&&"proxyCache"!==i){var n=t[i],o=typeof n;"parent"===i&&"object"===o?e&&(r[i]=e):"source"===i?r[i]=n:Array.isArray(n)?r[i]=n.map((t=>s(t,r))):("object"===o&&null!==n&&(n=s(n)),r[i]=n)}return r}function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;t.length>s;s++){if(i===e.line&&r===e.column){n=s;break}"\n"===t[s]?(r=1,i+=1):r+=1}return n}class a{get proxyOf(){return this}constructor(t){for(var e in void 0===t&&(t={}),this.raws={},this[i]=!1,this[n]=!0,t)if("nodes"===e)for(var r of(this.nodes=[],t[e]))this.append("function"==typeof r.clone?r.clone():r);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+e.input.from+":"+e.start.line+":"+e.start.column+"$&")}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t){void 0===t&&(t={});var e=s(this);for(var r in t)e[r]=t[r];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(e,r){if(void 0===r&&(r={}),this.source){var{end:i,start:n}=this.rangeBy(r);return this.source.input.error(e,{column:n.column,line:n.line},{column:i.column,line:i.line},r)}return new t(e)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[i]=!0}markDirty(){if(this[i]){this[i]=!1;for(var t=this;t=t.parent;)t[i]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){var r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(o(r,this.source.start),o(r,this.source.end)).indexOf(t.word);-1!==i&&(e=this.positionInside(i))}return e}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=o(i,this.source.start),s=n+t,a=n;s>a;a++)"\n"===i[a]?(e=1,r+=1):e+=1;return{column:e,line:r,offset:s}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:o(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:o(e,t.start)}:t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:o(e,t.end)}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1));return(r.line>i.line||i.line===r.line&&r.column>=i.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,r){return(new e).raw(this,t,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var r={},i=null==e;e=e||new Map;var n=0;for(var s in this)if({}.hasOwnProperty.call(this,s)&&"parent"!==s&&"proxyCache"!==s){var o=this[s];if(Array.isArray(o))r[s]=o.map((t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t));else if("object"==typeof o&&o.toJSON)r[s]=o.toJSON(null,e);else if("source"===s){if(null==o)continue;var a=e.get(o.input);null==a&&(a=n,e.set(o.input,n),n++),r[s]={end:o.end,inputId:a,start:o.start}}else r[s]=o}return i&&(r.inputs=[...e.keys()].map((t=>t.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=r),t.stringify&&(t=t.stringify);var e="";return t(this,(t=>{e+=t})),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}}return Pr=a,a.default=a,Pr}function ji(){if(Wr)return Ur;Wr=1;var t=Pi();class e extends t{constructor(t){super(t),this.type="comment"}}return Ur=e,e.default=e,Ur}function Ui(){if(Hr)return Gr;Hr=1;var t=Pi();class e extends t{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=r({},t,{value:String(t.value)})),super(t),this.type="decl"}}return Gr=e,e.default=e,Gr}function Wi(){if(Vr)return zr;Vr=1;var t,e,r,i,n=ji(),s=Ui(),o=Pi(),{isClean:a,my:h}=Fi();function u(t){return t.map((t=>(t.nodes&&(t.nodes=u(t.nodes)),delete t.source,t)))}function l(t){if(t[a]=!1,t.proxyOf.nodes)for(var e of t.proxyOf.nodes)l(e)}class c extends o{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]}append(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e){var n=this.normalize(i,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.proxyOf.nodes.length>this.indexes[i]&&!1!==(r=t(this.proxyOf.nodes[e=this.indexes[i]],e));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];return t[e](...i.map((t=>"function"==typeof t?(e,r)=>t(e.toProxy(),r):t)))}:"every"===e||"some"===e?r=>t[e]((function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;e>n;n++)i[n-1]=arguments[n];return r(t.toProxy(),...i)})):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map((t=>t.toProxy())):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)(r=this.indexes[o])>i&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i],0===i&&"prepend").reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i,0,s);for(var o in this.indexes)i>(r=this.indexes[o])||(this.indexes[o]=r+n.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=u(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var f of r=r.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if("root"===r.type&&"document"!==this.type)for(var d of r=r.nodes.slice(0))d.parent&&d.parent.removeChild(d,"ignore");else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new s(r)]}else if(r.selector||r.selectors)r=[new i(r)];else if(r.name)r=[new t(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new n(r)]}var v=r.map((t=>(t[h]||c.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[a]&&l(t),t.raws||(t.raws={}),void 0===t.raws.before&&o&&void 0!==o.raws.before&&(t.raws.before=o.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return v}prepend(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e=e.reverse()){var n=this.normalize(i,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var r in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t>(e=this.indexes[r])||(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls((i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))})),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each(((e,r)=>{var i;try{i=t(e,r)}catch(t){throw e.addToError(t)}return!1!==i&&e.walk&&(i=e.walk(t)),i}))}walkAtRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)})):this.walk(((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("atrule"===t.type)return e(t,r)})))}walkComments(t){return this.walk(((e,r)=>{if("comment"===e.type)return t(e,r)}))}walkDecls(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)})):this.walk(((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("decl"===t.type)return e(t,r)})))}walkRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)})):this.walk(((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("rule"===t.type)return e(t,r)})))}}return c.registerParse=t=>{e=t},c.registerRule=t=>{i=t},c.registerAtRule=e=>{t=e},c.registerRoot=t=>{r=t},zr=c,c.default=c,c.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,t.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,s.prototype):"comment"===e.type?Object.setPrototypeOf(e,n.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[h]=!0,e.nodes&&e.nodes.forEach((t=>{c.rebuild(t)}))},zr}function Gi(){if($r)return Yr;$r=1;var t=Wi();class e extends t{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}}return Yr=e,e.default=e,t.registerAtRule(e),Yr}function Hi(){if(Zr)return qr;Zr=1;var t,e,i=Wi();class n extends i{constructor(t){super(r({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return n.registerLazyResult=e=>{t=e},n.registerProcessor=t=>{e=t},qr=n,n.default=n,qr}function zi(){return Xr?Jr:(Xr=1,Jr={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e)=>(void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n--;)i+=t[Math.random()*t.length|0];return i})})}function Vi(){if(Kr)return Qr;Kr=1;var{existsSync:t,readFileSync:e}=Nr,{dirname:r,join:i}=Nr,{SourceMapConsumer:n,SourceMapGenerator:s}=Nr;class o{constructor(t,e){if(!1!==e.map){this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),i&&(this.text=i)}}consumer(){return this.consumerCache||(this.consumerCache=new n(this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(i){if(this.root=r(i),t(i))return this.mapFile=i,e(i,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof n)return s.fromSourceMap(e).toString();if(e instanceof s)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var o=e(t);if(o){var a=this.loadFile(o);if(!a)throw new Error("Unable to load previous source map: "+o.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var h=this.annotation;return t&&(h=i(r(t),h)),this.loadFile(h)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}}return Qr=o,o.default=o,Qr}function Yi(){if(ei)return ti;ei=1;var{nanoid:t}=zi(),{isAbsolute:e,resolve:i}=Nr,{SourceMapConsumer:n,SourceMapGenerator:s}=Nr,{fileURLToPath:o,pathToFileURL:a}=Nr,h=Lr(),u=Vi(),l=Nr,c=Symbol("lineToIndexCache"),f=Boolean(n&&s),d=Boolean(i&&e);function v(t){if(t[c])return t[c];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;s>n;n++)r[n]=i,i+=e[n].length+1;return t[c]=r,r}class p{get from(){return this.file||this.id}constructor(r,n){if(void 0===n&&(n={}),null==r||"object"==typeof r&&!r.toString)throw new Error("PostCSS received "+r+" instead of CSS string");if(this.css=r.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(this.file=!d||/^\w+:\/\//.test(n.from)||e(n.from)?n.from:i(n.from)),d&&f){var s=new u(this.css,n);if(s.text){this.map=s;var o=s.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+t(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,u,l;if(void 0===i&&(i={}),e&&"object"==typeof e){var c=e,f=r;if("number"==typeof c.offset){var d=this.fromOffset(u=c.offset);e=d.line,r=d.col}else u=this.fromLineAndColumn(e=c.line,r=c.column);if("number"==typeof f.offset){var v=this.fromOffset(o=f.offset);s=v.line,n=v.col}else s=f.line,n=f.column,o=this.fromLineAndColumn(f.line,f.column)}else if(r)u=this.fromLineAndColumn(e,r);else{var p=this.fromOffset(u=e);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(l=m?new h(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new h(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:u,source:this.css},this.file&&(a&&(l.input.url=a(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,e){return v(this)[t-1]+e-1}fromOffset(t){var e=v(this),r=0;if(e[e.length-1]>t)for(var i,n=e.length-2;n>r;)if(e[i=r+(n-r>>1)]>t)n=i-1;else{if(e[i+1]>t){r=i;break}r=i+1}else r=e.length-1;return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:i(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,r,i,n){if(!this.map)return!1;var s,h,u=this.map.consumer(),l=u.originalPositionFor({column:r,line:t});if(!l.source)return!1;"number"==typeof i&&(s=u.originalPositionFor({column:n,line:i})),h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column,endColumn:s&&s.column,endLine:s&&s.line,line:l.line,url:h.toString()};if("file:"===h.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");c.file=o(h)}var f=u.sourceContentFor(l.source);return f&&(c.source=f),c}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=r({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}}return ti=p,p.default=p,l&&l.registerInput&&l.registerInput(p),ti}function $i(){if(ii)return ri;ii=1;var t,e,r=Wi();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var n of i)n.raws.before=e.raws.before;return i}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return i.registerLazyResult=e=>{t=e},i.registerProcessor=t=>{e=t},ri=i,i.default=i,r.registerRoot(i),ri}function qi(){if(si)return ni;si=1;var t={comma(e){return t.split(e,[","],!0)},space(e){return t.split(e,[" ","\n","\t"])},split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};return ni=t,t.default=t,ni}function Zi(){if(ai)return oi;ai=1;var t=Wi(),e=qi();class r extends t{get selectors(){return e.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}}return oi=r,r.default=r,t.registerRule(r),oi}function Ji(){if(ci)return li;ci=1;var{dirname:t,relative:e,resolve:r,sep:i}=Nr,{SourceMapConsumer:n,SourceMapGenerator:s}=Nr,{pathToFileURL:o}=Nr,a=Yi(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return li=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var t;t=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";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var r=this.toUrl(this.path(e.file)),i=e.root||t(e.file),s=void 0;!1===this.mapOpts.sourcesContent?(s=new n(e.text)).sourcesContent&&(s.sourcesContent=null):s=e.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&h&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,(e=>{t+=e})),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=s.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new s({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 s({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,h)=>{if(this.css+=s,a&&"end"!==h&&(o.generated.line=r,o.generated.column=i-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=s.match(/\n/g))?(r+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.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=i-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=i-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((t=>t.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some((t=>t.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((t=>t.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(i){if(this.mapOpts.absolute)return i;if(60===i.charCodeAt(0))return i;if(/^\w+:\/\//.test(i))return i;var n=this.memoizedPaths.get(i);if(n)return n;var s=this.opts.to?t(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=t(r(s,this.mapOpts.annotation)));var o=e(s,i);return this.memoizedPaths.set(i,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}}));else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk((e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}}));else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(o){var r=o(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===i&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}}function Xi(){if(di)return fi;di=1;var t="'".charCodeAt(0),e='"'.charCodeAt(0),r="\\".charCodeAt(0),i="/".charCodeAt(0),n="\n".charCodeAt(0),s=" ".charCodeAt(0),o="\f".charCodeAt(0),a="\t".charCodeAt(0),h="\r".charCodeAt(0),u="[".charCodeAt(0),l="]".charCodeAt(0),c="(".charCodeAt(0),f=")".charCodeAt(0),d="{".charCodeAt(0),v="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),y=":".charCodeAt(0),g="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return fi=function(C,M){void 0===M&&(M={});var I,x,R,E,T,A,O,D,N,L,B=C.css.valueOf(),_=M.ignoreErrors,F=B.length,P=0,j=[],U=[];function W(t){throw C.error("Unclosed "+t,P)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&P>=F,nextToken(C){if(U.length)return U.pop();if(F>P){var M=!!C&&C.ignoreUnclosed;switch(I=B.charCodeAt(P)){case n:case s:case a:case h:case o:E=P;do{I=B.charCodeAt(E+=1)}while(I===s||I===n||I===a||I===h||I===o);A=["space",B.slice(P,E)],P=E-1;break;case u:case l:case d:case v:case y:case p:case f:var G=String.fromCharCode(I);A=[G,G,P];break;case c:if(L=j.length?j.pop()[1]:"",N=B.charCodeAt(P+1),"url"===L&&N!==t&&N!==e&&N!==s&&N!==n&&N!==a&&N!==o&&N!==h){E=P;do{if(O=!1,-1===(E=B.indexOf(")",E+1))){if(_||M){E=P;break}W("bracket")}for(D=E;B.charCodeAt(D-1)===r;)D-=1,O=!O}while(O);A=["brackets",B.slice(P,E+1),P,E],P=E}else E=B.indexOf(")",P+1),x=B.slice(P,E+1),-1===E||S.test(x)?A=["(","(",P]:(A=["brackets",x,P,E],P=E);break;case t:case e:T=I===t?"'":'"',E=P;do{if(O=!1,-1===(E=B.indexOf(T,E+1))){if(_||M){E=P+1;break}W("string")}for(D=E;B.charCodeAt(D-1)===r;)D-=1,O=!O}while(O);A=["string",B.slice(P,E+1),P,E],P=E;break;case g:w.lastIndex=P+1,w.test(B),A=["at-word",B.slice(P,1+(E=0===w.lastIndex?B.length-1:w.lastIndex-2)),P,E],P=E;break;case r:for(E=P,R=!0;B.charCodeAt(E+1)===r;)E+=1,R=!R;if(I=B.charCodeAt(E+1),R&&I!==i&&I!==s&&I!==n&&I!==a&&I!==h&&I!==o&&k.test(B.charAt(E+=1))){for(;k.test(B.charAt(E+1));)E+=1;B.charCodeAt(E+1)===s&&(E+=1)}A=["word",B.slice(P,E+1),P,E],P=E;break;default:I===i&&B.charCodeAt(P+1)===m?(0===(E=B.indexOf("*/",P+2)+1)&&(_||M?E=B.length:W("comment")),A=["comment",B.slice(P,E+1),P,E],P=E):(b.lastIndex=P+1,b.test(B),A=["word",B.slice(P,1+(E=0===b.lastIndex?B.length-1:b.lastIndex-2)),P,E],j.push(A),P=E)}return P++,A}},position:()=>P}}}function Qi(){if(pi)return vi;pi=1;var t=Gi(),e=ji(),r=Ui(),i=$i(),n=Zi(),s=Xi(),o={empty:!0,space:!0};return vi=class{constructor(t){this.input=t,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(e){var r,i,n,s=new t;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?u.push("("===r?")":"]"):"{"===r&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),0===u.length){if(";"===r){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===r){a=!0;break}if("}"===r){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}h.push(e)}else h.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(s.source.end=this.getPosition((e=h[h.length-1])[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var[s,o]of t.entries()){if("("===(i=(r=o)[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return s}this.doubleColon(r)}e=r}return!1}comment(t){var r=new e;this.init(r,t[2]),r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++;var i=t[1].slice(2,-2);if(/^\s*$/.test(i))r.text="",r.raws.left=i,r.raws.right="";else{var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n,s=t[t.length-1];for(";"===s[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(s[3]||s[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),i.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var o=t[0][0];if(":"===o||"space"===o||"comment"===o)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(n=t.shift())[0]){i.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),i.raws.between+=n[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var a,h=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)h.push(t.shift());this.precheckMissedSemicolon(t);for(var u=t.length-1;u>=0;u--){if("!important"===(n=t[u])[1].toLowerCase()){i.important=!0;var l=this.stringFrom(t,u);" !important"!==(l=this.spacesFromEnd(t)+l)&&(i.raws.important=l);break}if("important"===n[1].toLowerCase()){for(var c=t.slice(0),f="",d=u;d>0;d--){var v=c[d][0];if(f.trim().startsWith("!")&&"space"!==v)break;f=c.pop()[1]+f}f.trim().startsWith("!")&&(i.important=!0,i.raws.important=f,t=c)}if("space"!==n[0]&&"comment"!==n[0])break}var p=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));p&&(i.raws.between+=h.map((t=>t[1])).join(""),h=[]),this.raw(i,"value",h.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new n;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),s.push("}");else if(0===s.length){if(";"===r){if(i)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,r,i){for(var n,s,a=r.length,h="",u=!0,l=0;a>l;l+=1)"space"!==(s=(n=r[l])[0])||l!==a-1||i?"comment"===s&&(o[r[l-1]?r[l-1][0]:"empty"]||o[r[l+1]?r[l+1][0]:"empty"]||","===h.slice(-1))?u=!1:h+=n[1]:u=!1;if(!u){var c=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:c,value:h}}t[e]=h}rule(t){t.pop();var e=new n;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;t.length>i;i++)r+=t[i][1];return t.splice(e,t.length-e),r}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}}}function Ki(){if(yi)return mi;yi=1;var t=Wi(),e=Yi(),r=Qi();function i(t,i){var n=new e(t,i),s=new r(n);try{s.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&i&&i.from&&(/\.scss$/i.test(i.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(i.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(i.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return s.root}return mi=i,i.default=i,t.registerParse(i),mi}function tn(){if(wi)return gi;wi=1;class t{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){var r=e.node.rangeBy(e);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in e)this[i]=e[i]}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}}return gi=t,t.default=t,gi}function en(){if(Si)return bi;Si=1;var t=tn();class e{get content(){return this.css}constructor(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,r){void 0===r&&(r={}),r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);var i=new t(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter((t=>"warning"===t.type))}}return bi=e,e.default=e,bi}function rn(){if(Ci)return ki;Ci=1;var t={};return ki=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function nn(){if(Ii)return Mi;Ii=1;var t=Wi(),i=Hi(),n=Ji(),s=Ki(),o=en(),a=$i(),h=_r(),{isClean:u,my:l}=Fi(),c=rn(),f={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={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},v={Once:!0,postcssPlugin:!0,prepare:!0},p=0;function m(t){return"object"==typeof t&&"function"==typeof t.then}function y(t){var e=!1,r=f[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,p,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,p,r+"Exit"]:[r,r+"Exit"]}function g(t){return{eventIndex:0,events:"document"===t.type?["Document",p,"DocumentExit"]:"root"===t.type?["Root",p,"RootExit"]:y(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function w(t){return t[u]=!1,t.nodes&&t.nodes.forEach((t=>w(t))),t}var b={};class S{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"}constructor(e,i,n){var a;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof S||i instanceof o)a=w(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var h=s;n.syntax&&(h=n.syntax.parse),n.parser&&(h=n.parser),h.parse&&(h=h.parse);try{a=h(i,n)}catch(t){this.processed=!0,this.error=t}a&&!a[l]&&t.rebuild(a)}else a=w(i);this.result=new o(e,a,n),this.helpers=r({},b,{postcss:b,result:this.result}),this.plugins=this.processor.plugins.map((t=>"object"==typeof t&&t.prepare?r({},t,t.prepare(this.result)):t))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){var i=r.postcssPlugin,n=r.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!d[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!v[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e((function*(){t.plugin=0;for(var e=0;t.plugins.length>e;e++){var r=t.runOnRoot(t.plugins[e]);if(m(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var i=t.result.root;!i[u];){i[u]=!0;for(var n=[g(i)];n.length>0;){var s=t.visitTick(n);if(m(s))try{yield s}catch(e){throw t.handleError(e,n[n.length-1].node)}}}if(t.listeners.OnceExit){var o=function*(e){t.result.lastPlugin=a;try{if("document"===i.type){var r=i.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(i,t.helpers)}catch(e){throw t.handleError(e)}};for(var[a,h]of t.listeners.OnceExit)yield*o(h)}}return t.processed=!0,t.stringify()}))()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map((e=>t.Once(e,this.helpers)));return m(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=h;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=new n(e,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(var t of this.plugins)if(m(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[u];)e[u]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||c("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(t,e)}toString(){return this.css}visitSync(t,e){for(var[r,i]of t){this.result.lastPlugin=r;var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(m(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:r,visitors:i}=e;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&i.length>e.visitorIndex){var[n,s]=i[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=n;try{return s(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var o,a=e.iterator;o=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!o[u])return o[u]=!0,void t.push(g(o));e.iterator=0,delete r.indexes[a]}for(var h=e.events;h.length>e.eventIndex;){var l=h[e.eventIndex];if(e.eventIndex+=1,l===p)return void(r.nodes&&r.nodes.length&&(r[u]=!0,e.iterator=r.getIterator()));if(this.listeners[l])return void(e.visitors=this.listeners[l])}t.pop()}else t.pop()}walkSync(t){t[u]=!0;var e=y(t);for(var r of e)if(r===p)t.nodes&&t.each((t=>{t[u]||this.walkSync(t)}));else{var i=this.listeners[r];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}}return S.registerPostcss=t=>{b=t},Mi=S,S.default=S,a.registerLazyResult(S),i.registerLazyResult(S),Mi}function sn(){if(Oi)return Ai;Oi=1;var t=Gi(),e=ji(),n=Wi(),s=Lr(),o=Ui(),u=Hi(),l=function(){if(ui)return hi;ui=1;var t=Gi(),e=ji(),n=Ui(),s=Yi(),o=Vi(),u=$i(),l=Zi();function c(f,d){if(Array.isArray(f))return f.map((t=>c(t)));var{inputs:v}=f,p=i(f,a);if(v)for(var m of(d=[],v)){var y=r({},m,{__proto__:s.prototype});y.map&&(y.map=r({},y.map,{__proto__:o.prototype})),d.push(y)}if(p.nodes&&(p.nodes=f.nodes.map((t=>c(t,d)))),p.source){var g=p.source,{inputId:w}=g,b=i(g,h);p.source=b,null!=w&&(p.source.input=d[w])}if("root"===p.type)return new u(p);if("decl"===p.type)return new n(p);if("rule"===p.type)return new l(p);if("comment"===p.type)return new e(p);if("atrule"===p.type)return new t(p);throw new Error("Unknown node type: "+f.type)}return hi=c,c.default=c,hi}(),c=Yi(),f=nn(),d=qi(),v=Pi(),p=Ki(),m=function(){if(Ti)return Ei;Ti=1;var t=Hi(),e=nn(),r=function(){if(Ri)return xi;Ri=1;var t=Ji(),e=Ki(),r=en(),i=_r(),n=rn();class s{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;var t,r=e;try{t=r(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,n,s){var o;n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var a=i;this.result=new r(this._processor,o,this._opts),this.result.css=n;var h=this;Object.defineProperty(this.result,"root",{get(){return h.root}});var u=new t(a,o,this._opts,n);if(u.isMap()){var[l,c]=u.generate();l&&(this.result.css=l),c&&(this.result.map=c)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("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(t,e)}toString(){return this._css}warnings(){return[]}}return xi=s,s.default=s,xi}(),i=$i();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.6",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else if("function"==typeof r)e.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 e}process(t,i){return void 0===i&&(i={}),this.plugins.length||i.parser||i.stringifier||i.syntax?new e(this,t,i):new r(this,t,i)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}return Ei=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),Ei}(),y=en(),g=$i(),w=Zi(),b=_r(),S=tn();function k(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new m(e)}return k.plugin=function(t,e){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var r=e(...arguments);return r.postcssPlugin=t,r.postcssVersion=(new m).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return k([n(r)]).process(t,e)},n},k.stringify=b,k.parse=p,k.fromJSON=l,k.list=d,k.comment=t=>new e(t),k.atRule=e=>new t(e),k.decl=t=>new o(t),k.rule=t=>new w(t),k.root=t=>new g(t),k.document=t=>new u(t),k.CssSyntaxError=s,k.Declaration=o,k.Container=n,k.Processor=m,k.Document=u,k.Comment=e,k.Warning=S,k.AtRule=t,k.Result=y,k.Input=c,k.Rule=w,k.Root=g,k.Node=v,f.registerPostcss(k),Ai=k,k.default=k,Ai}!function(){if(Bi)return Li;Bi=1;var{Input:t}=sn(),e=function(){if(Ni)return Di;Ni=1;var t=ji(),e=Qi(),r=Xi();return Di=class extends e{checkMissedSemicolon(){}comment(e){var r=new t;this.init(r,e[2]);var i=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:i.col,line:i.line,offset:e[3]+1};var n=e[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some((t=>"word"===t[0]))&&super.decl(t)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(t){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(0!==r&&r>=0){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map((t=>t[1])).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map((t=>t[1])).join("")}unnamedAtrule(t){t.name=""}}}();Li=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}(),sn();var on=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(on||{});function an(t){var e=[];for(var r in t){var i=t[r];if("string"==typeof i){var n=fn(r);e.push(n+": "+i+";")}}return e.join(" ")}var hn=/-([a-z])/g,un=/^--[a-zA-Z0-9-]+$/,ln=t=>un.test(t)?t:t.replace(hn,((t,e)=>e?e.toUpperCase():"")),cn=/\B([A-Z])/g,fn=t=>t.replace(cn,"-$1").toLowerCase();class dn{constructor(){lr(this,"parentElement",null),lr(this,"parentNode",null),lr(this,"ownerDocument"),lr(this,"firstChild",null),lr(this,"lastChild",null),lr(this,"previousSibling",null),lr(this,"nextSibling",null),lr(this,"ELEMENT_NODE",1),lr(this,"TEXT_NODE",3),lr(this,"nodeType"),lr(this,"nodeName"),lr(this,"RRNodeType")}get childNodes(){for(var t=[],e=this.firstChild;e;)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof dn))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,e){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class vn extends dn{constructor(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];super(e),lr(this,"nodeType",9),lr(this,"nodeName","#document"),lr(this,"compatMode","CSS1Compat"),lr(this,"RRNodeType",on.Document),lr(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find((t=>t.RRNodeType===on.Element&&"HTML"===t.tagName))||null}get body(){var t;return(null==(t=this.documentElement)?void 0:t.childNodes.find((t=>t.RRNodeType===on.Element&&"BODY"===t.tagName)))||null}get head(){var t;return(null==(t=this.documentElement)?void 0:t.childNodes.find((t=>t.RRNodeType===on.Element&&"HEAD"===t.tagName)))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){var e=t.RRNodeType;if((e===on.Element||e===on.DocumentType)&&this.childNodes.some((t=>t.RRNodeType===e)))throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one "+(e===on.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var r=Cn(this,t);return r.parentElement=null,r}insertBefore(t,e){var r=t.RRNodeType;if((r===on.Element||r===on.DocumentType)&&this.childNodes.some((t=>t.RRNodeType===r)))throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one "+(r===on.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var i=Mn(this,t,e);return i.parentElement=null,i}removeChild(t){return In(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){var e;if('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'===t?e="-//W3C//DTD XHTML 1.0 Transitional//EN":'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'===t&&(e="-//W3C//DTD HTML 4.0 Transitional//EN"),e){var r=this.createDocumentType("html",e,"");this.open(),this.appendChild(r)}}createDocument(t,e,r){return new vn}createDocumentType(t,e,r){var i=new pn(t,e,r);return i.ownerDocument=this,i}createElement(t){var e=new mn(t);return e.ownerDocument=this,e}createElementNS(t,e){return this.createElement(e)}createTextNode(t){var e=new wn(t);return e.ownerDocument=this,e}createComment(t){var e=new bn(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new Sn(t);return e.ownerDocument=this,e}toString(){return"RRDocument"}}class pn extends dn{constructor(t,e,r){super(),lr(this,"nodeType",10),lr(this,"RRNodeType",on.DocumentType),lr(this,"name"),lr(this,"publicId"),lr(this,"systemId"),lr(this,"textContent",null),this.name=t,this.publicId=e,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}}class mn extends dn{constructor(t){super(),lr(this,"nodeType",1),lr(this,"RRNodeType",on.Element),lr(this,"tagName"),lr(this,"attributes",{}),lr(this,"shadowRoot",null),lr(this,"scrollLeft"),lr(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){var t="";return this.childNodes.forEach((e=>t+=e.textContent)),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new kn(this.attributes.class,(t=>{this.attributes.class=t}))}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){var t,e,r=this.attributes.style?(t={},e=/:(.+)/,this.attributes.style.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach((function(r){if(r){var i=r.split(e);i.length>1&&(t[ln(i[0].trim())]=i[1].trim())}})),t):{},i=/\B([A-Z])/g;return r.setProperty=(t,e,n)=>{if(!i.test(t)){var s=ln(t);e?r[s]=e:delete r[s],"important"===n&&(r[s]+=" !important"),this.attributes.style=an(r)}},r.removeProperty=t=>{if(i.test(t))return"";var e=ln(t),n=r[e]||"";return delete r[e],this.attributes.style=an(r),n},r}getAttribute(t){return void 0===this.attributes[t]?null:this.attributes[t]}setAttribute(t,e){this.attributes[t]=e}setAttributeNS(t,e,r){this.setAttribute(e,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return Cn(this,t)}insertBefore(t,e){return Mn(this,t,e)}removeChild(t){return In(this,t)}attachShadow(t){var e=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=e,e}dispatchEvent(t){return!0}toString(){var t="";for(var e in this.attributes)t+=e+'="'+this.attributes[e]+'" ';return this.tagName+" "+t}}class yn extends mn{constructor(){super(...arguments),lr(this,"currentTime"),lr(this,"volume"),lr(this,"paused"),lr(this,"muted"),lr(this,"playbackRate"),lr(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class gn extends mn{constructor(){super(...arguments),lr(this,"tagName","DIALOG"),lr(this,"nodeName","DIALOG")}get isModal(){return"modal"===this.getAttribute("rr_open_mode")}get open(){return null!==this.getAttribute("open")}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class wn extends dn{constructor(t){super(),lr(this,"nodeType",3),lr(this,"nodeName","#text"),lr(this,"RRNodeType",on.Text),lr(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRText text="+JSON.stringify(this.data)}}class bn extends dn{constructor(t){super(),lr(this,"nodeType",8),lr(this,"nodeName","#comment"),lr(this,"RRNodeType",on.Comment),lr(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRComment text="+JSON.stringify(this.data)}}class Sn extends dn{constructor(t){super(),lr(this,"nodeName","#cdata-section"),lr(this,"nodeType",4),lr(this,"RRNodeType",on.CDATA),lr(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRCDATASection data="+JSON.stringify(this.data)}}class kn{constructor(t,e){var r=this;if(lr(this,"onChange"),lr(this,"classes",[]),lr(this,"add",(function(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];for(var n of e){var s=String(n);0>r.classes.indexOf(s)&&r.classes.push(s)}r.onChange&&r.onChange(r.classes.join(" "))})),lr(this,"remove",(function(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];r.classes=r.classes.filter((t=>-1===e.indexOf(t))),r.onChange&&r.onChange(r.classes.join(" "))})),t){var i=t.trim().split(/\s+/);this.classes.push(...i)}this.onChange=e}}function Cn(t,e){return e.parentNode&&e.parentNode.removeChild(e),t.lastChild?(t.lastChild.nextSibling=e,e.previousSibling=t.lastChild):(t.firstChild=e,e.previousSibling=null),t.lastChild=e,e.nextSibling=null,e.parentNode=t,e.parentElement=t,e.ownerDocument=t.ownerDocument,e}function Mn(t,e,r){if(!r)return Cn(t,e);if(r.parentNode!==t)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===r||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=r.previousSibling,r.previousSibling=e,e.nextSibling=r,e.previousSibling?e.previousSibling.nextSibling=e:t.firstChild=e,e.parentElement=t,e.parentNode=t,e.ownerDocument=t.ownerDocument),e}function In(t,e){if(e.parentNode!==t)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:t.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:t.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var xn=(t=>(t[t.PLACEHOLDER=0]="PLACEHOLDER",t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",t[t.ENTITY_NODE=6]="ENTITY_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",t))(xn||{}),Rn={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},En={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"},Tn=null;function An(t,e,r,i){void 0===i&&(i=e.mirror||e.ownerDocument.mirror),t=function(t,e,r,i){var n;if(r.afterAppend&&!Tn&&(Tn=new WeakSet,setTimeout((()=>{Tn=null}),0)),!Nn(t,e)){var s=Dn(e,r.mirror,i);null==(n=t.parentNode)||n.replaceChild(s,t),t=s}switch(e.RRNodeType){case on.Document:if(!Ln(t,e,r.mirror,i)){var o=i.getMeta(e);o&&(r.mirror.removeNodeFromMap(t),t.close(),t.open(),r.mirror.add(t,o),null==Tn||Tn.add(t))}break;case on.Element:var a=t,h=e;switch(h.tagName){case"IFRAME":var u=t.contentDocument;if(!u)break;An(u,e.contentDocument,r,i)}h.shadowRoot&&(a.shadowRoot||a.attachShadow({mode:"open"}),On(a.shadowRoot,h.shadowRoot,r,i)),function(t,e,r){var i=t.attributes,n=e.attributes,s=function(){var i=n[o],s=r.getMeta(e);if((null==s?void 0:s.isSVG)&&Rn[o])t.setAttributeNS(Rn[o],o,i);else if("CANVAS"===e.tagName&&"rr_dataURL"===o){var a=document.createElement("img");a.src=i,a.onload=()=>{var e=t.getContext("2d");e&&e.drawImage(a,0,0,a.width,a.height)}}else{if("IFRAME"===e.tagName&&"srcdoc"===o)return 1;try{t.getAttribute(o)!==i&&t.setAttribute(o,i)}catch(t){console.warn(t)}}};for(var o in n)s();for(var{name:a}of Array.from(i))a in n||t.removeAttribute(a);e.scrollLeft&&(t.scrollLeft=e.scrollLeft),e.scrollTop&&(t.scrollTop=e.scrollTop)}(a,h,i)}return t}(t,e,r,i),On(t,e,r,i),function(t,e,r){var i;switch(e.RRNodeType){case on.Document:var n=e.scrollData;n&&r.applyScroll(n,!0);break;case on.Element:var s=t,o=e;switch(o.scrollData&&r.applyScroll(o.scrollData,!0),o.inputData&&r.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":var a=t,h=o;void 0!==h.paused&&(h.paused?a.pause():a.play()),void 0!==h.muted&&(a.muted=h.muted),void 0!==h.volume&&(a.volume=h.volume),void 0!==h.currentTime&&(a.currentTime=h.currentTime),void 0!==h.playbackRate&&(a.playbackRate=h.playbackRate),void 0!==h.loop&&(a.loop=h.loop);break;case"CANVAS":var u=e;if(null!==u.rr_dataURL){var l=document.createElement("img");l.onload=()=>{var t=s.getContext("2d");t&&t.drawImage(l,0,0,l.width,l.height)},l.src=u.rr_dataURL}u.canvasMutations.forEach((e=>r.applyCanvas(e.event,e.mutation,t)));break;case"STYLE":var c=s.sheet;c&&e.rules.forEach((t=>r.applyStyleSheetMutation(t,c)));break;case"DIALOG":var f=s,d=o,v=f.open,p=f.matches("dialog:modal"),m=d.open,y=d.isModal,g=p!==y,w=v!==m;if((g||v&&w)&&f.close(),m&&(w||g))try{y?f.showModal():f.show()}catch(t){console.warn(t)}}break;case on.Text:case on.Comment:case on.CDATA:t.textContent!==e.data&&(t.textContent=e.data)}(null==Tn?void 0:Tn.has(t))&&(Tn.delete(t),null==(i=r.afterAppend)||i.call(r,t,r.mirror.getId(t)))}(t,e,r)}function On(t,e,r,i){var n=Array.from(t.childNodes),s=e.childNodes;if(0!==n.length||0!==s.length){for(var o=0,a=n.length-1,h=0,u=s.length-1,l=n[o],c=n[a],f=s[h],d=s[u],v=void 0,p=void 0;a>=o&&u>=h;)if(void 0===l)l=n[++o];else if(void 0===c)c=n[--a];else if(Ln(l,f,r.mirror,i))l=n[++o],f=s[++h];else if(Ln(c,d,r.mirror,i))c=n[--a],d=s[--u];else if(Ln(l,d,r.mirror,i)){try{t.insertBefore(l,c.nextSibling)}catch(t){console.warn(t)}l=n[++o],d=s[--u]}else if(Ln(c,f,r.mirror,i)){try{t.insertBefore(c,l)}catch(t){console.warn(t)}c=n[--a],f=s[++h]}else{if(!v){v={};for(var m=o;a>=m;m++){var y=n[m];y&&r.mirror.hasNode(y)&&(v[r.mirror.getId(y)]=m)}}var g=n[p=v[i.getId(f)]];if(void 0!==p&&g&&Ln(g,f,r.mirror,i)){try{t.insertBefore(g,l)}catch(t){console.warn(t)}n[p]=void 0}else{var w=Dn(f,r.mirror,i);"#document"===t.nodeName&&l&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&l.nodeType===l.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&l.nodeType===l.ELEMENT_NODE)&&(t.removeChild(l),r.mirror.removeNodeFromMap(l),l=n[++o]);try{t.insertBefore(w,l||null)}catch(t){console.warn(t)}}f=s[++h]}if(o>a){var b=s[u+1],S=null;for(b&&(S=r.mirror.getNode(i.getId(b)));u>=h;++h){var k=Dn(s[h],r.mirror,i);try{t.insertBefore(k,S)}catch(t){console.warn(t)}}}else if(h>u)for(;a>=o;o++){var C=n[o];if(C&&C.parentNode===t)try{t.removeChild(C),r.mirror.removeNodeFromMap(C)}catch(t){console.warn(t)}}for(var M=t.firstChild,I=e.firstChild;null!==M&&null!==I;)An(M,I,r,i),M=M.nextSibling,I=I.nextSibling}}function Dn(t,e,i){var n=i.getId(t),s=i.getMeta(t),o=null;if(n>-1&&(o=e.getNode(n)),null!==o&&Nn(o,t))return o;switch(t.RRNodeType){case on.Document:o=new Document;break;case on.DocumentType:o=document.implementation.createDocumentType(t.name,t.publicId,t.systemId);break;case on.Element:var a=t.tagName.toLowerCase();a=En[a]||a,o=s&&"isSVG"in s&&(null==s?void 0:s.isSVG)?document.createElementNS(Rn.svg,a):document.createElement(t.tagName);break;case on.Text:o=document.createTextNode(t.data);break;case on.Comment:o=document.createComment(t.data);break;case on.CDATA:o=document.createCDATASection(t.data)}s&&e.add(o,r({},s));try{null==Tn||Tn.add(o)}catch(t){}return o}function Nn(t,e){return t.nodeType===e.nodeType&&(t.nodeType!==t.ELEMENT_NODE||t.tagName.toUpperCase()===e.tagName)}function Ln(t,e,r,i){var n=r.getId(t),s=i.getId(e);return-1!==n&&n===s&&Nn(t,e)}class Bn extends vn{constructor(t){super(),lr(this,"UNSERIALIZED_STARTING_ID",-2),lr(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),lr(this,"mirror",new $n),lr(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this.l--}createDocument(t,e,r){return new Bn}createDocumentType(t,e,r){var i=new _n(t,e,r);return i.ownerDocument=this,i}createElement(t){var e,r=t.toUpperCase();switch(r){case"AUDIO":case"VIDEO":e=new Pn(r);break;case"IFRAME":e=new Gn(r,this.mirror);break;case"CANVAS":e=new Un(r);break;case"STYLE":e=new Wn(r);break;case"DIALOG":e=new jn(r);break;default:e=new Fn(r)}return e.ownerDocument=this,e}createComment(t){var e=new zn(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new Vn(t);return e.ownerDocument=this,e}createTextNode(t){var e=new Hn(t);return e.ownerDocument=this,e}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this.l=this.UNSERIALIZED_STARTING_ID}}var _n=pn;class Fn extends mn{constructor(){super(...arguments),lr(this,"inputData",null),lr(this,"scrollData",null)}}class Pn extends yn{}class jn extends gn{}class Un extends Fn{constructor(){super(...arguments),lr(this,"rr_dataURL",null),lr(this,"canvasMutations",[])}getContext(){return null}}class Wn extends Fn{constructor(){super(...arguments),lr(this,"rules",[])}}class Gn extends Fn{constructor(t,e){super(t),lr(this,"contentDocument",new Bn),this.contentDocument.mirror=e}}var Hn=wn,zn=bn,Vn=Sn;function Yn(t,e,i,n){var s,o;switch(t.nodeType){case xn.DOCUMENT_NODE:n&&"IFRAME"===n.nodeName?s=n.contentDocument:(s=e).compatMode=t.compatMode;break;case xn.DOCUMENT_TYPE_NODE:s=e.createDocumentType(t.name,t.publicId,t.systemId);break;case xn.ELEMENT_NODE:var a=t,h=(o=a)instanceof HTMLFormElement?"FORM":o.tagName.toUpperCase(),u=s=e.createElement(h);for(var{name:l,value:c}of Array.from(a.attributes))u.attributes[l]=c;a.scrollLeft&&(u.scrollLeft=a.scrollLeft),a.scrollTop&&(u.scrollTop=a.scrollTop);break;case xn.TEXT_NODE:s=e.createTextNode(t.textContent||"");break;case xn.CDATA_SECTION_NODE:s=e.createCDATASection(t.data);break;case xn.COMMENT_NODE:s=e.createComment(t.textContent||"");break;case xn.DOCUMENT_FRAGMENT_NODE:s=n.attachShadow({mode:"open"});break;default:return null}var f=i.getMeta(t);return e instanceof Bn&&(f||(f=qn(s,e.unserializedId),i.add(t,f)),e.mirror.add(s,r({},f))),s}class $n{constructor(){lr(this,"idNodeMap",new Map),lr(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t)))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function qn(t,e){switch(t.RRNodeType){case on.Document:return{id:e,type:t.RRNodeType,childNodes:[]};case on.DocumentType:return{id:e,type:t.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId};case on.Element:return{id:e,type:t.RRNodeType,tagName:t.tagName.toLowerCase(),attributes:{},childNodes:[]};case on.Text:case on.Comment:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case on.CDATA:return{id:e,type:t.RRNodeType,textContent:""}}}var Zn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},Jn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},Xn={};function Qn(t){if(Xn[t])return Xn[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in Zn?Zn[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in Jn?Jn[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return Xn[t]=e.prototype,e.prototype;var a=document.createElement("iframe");try{document.body.appendChild(a);var h=a.contentWindow;if(!h)return e.prototype;var u=h[t].prototype;return u?Xn[t]=u:r}catch(t){return r}finally{a.parentNode&&document.body.removeChild(a)}}var Kn={};function ts(t,e,r){var i,n=t+"."+String(r);if(Kn[n])return Kn[n].call(e);var s=Qn(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(Kn[n]=o,o.call(e)):e[r]}var es={};function rs(t,e,r){var i=t+"."+String(r);if(es[i])return es[i].bind(e);var n=Qn(t)[r];return"function"!=typeof n?e[r]:(es[i]=n,n.bind(e))}function is(){return Qn("MutationObserver").constructor}function ns(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}var ss={childNodes:t=>ts("Node",t,"childNodes"),parentNode:t=>ts("Node",t,"parentNode"),parentElement:t=>ts("Node",t,"parentElement"),textContent:t=>ts("Node",t,"textContent"),contains:(t,e)=>rs("Node",t,"contains")(e),getRootNode:t=>rs("Node",t,"getRootNode")(),host:t=>t&&"host"in t?ts("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?ts("Element",t,"shadowRoot"):null,querySelector:(t,e)=>rs("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>rs("Element",t,"querySelectorAll")(e),mutationObserver:is,patch:ns};function os(t,e,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>r.removeEventListener(t,e,i)}function as(t){try{t()}catch(t){if(!(t instanceof DOMException&&"SecurityError"===t.name))throw t}}var hs="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.",us={map:{},getId(){return console.error(hs),-1},getNode(){return console.error(hs),null},removeNodeFromMap(){console.error(hs)},has(){return console.error(hs),!1},reset(){console.error(hs)}};function ls(t,e,r){void 0===r&&(r={});var i=null,n=0;return function(){for(var s=arguments.length,o=new Array(s),a=0;s>a;a++)o[a]=arguments[a];var h=Date.now();n||!1!==r.leading||(n=h);var u=e-(h-n),l=this;0>=u||u>e?(i&&(clearTimeout(i),i=null),n=h,t.apply(l,o)):i||!1===r.trailing||(i=setTimeout((()=>{n=!1===r.leading?0:Date.now(),i=null,t.apply(l,o)}),u))}}function cs(t,e,r,i,n){void 0===n&&(n=window);var s=n.Object.getOwnPropertyDescriptor(t,e);return n.Object.defineProperty(t,e,i?r:{set(t){setTimeout((()=>{r.set.call(this,t)}),0),s&&s.set&&s.set.call(this,t)}}),()=>cs(t,e,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(us=new Proxy(us,{get(t,e,r){return"map"===e&&console.error(hs),Reflect.get(t,e,r)}}));var fs=Date.now;function ds(t){var e,r,i,n,s=t.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:s.documentElement.scrollLeft||(null==s?void 0:s.body)&&(null==(e=ss.parentElement(s.body))?void 0:e.scrollLeft)||(null==(r=null==s?void 0:s.body)?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==s?void 0:s.documentElement.scrollTop)||(null==s?void 0:s.body)&&(null==(i=ss.parentElement(s.body))?void 0:i.scrollTop)||(null==(n=null==s?void 0:s.body)?void 0:n.scrollTop)||0}}function vs(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ps(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ms(t){return t?t.nodeType===t.ELEMENT_NODE?t:ss.parentElement(t):null}function ys(t,e,r,i){if(!t)return!1;var n=ms(t);if(!n)return!1;try{if("string"==typeof e){if(n.classList.contains(e))return!0;if(i&&null!==n.closest("."+e))return!0}else if(it(n,e,i))return!0}catch(t){}if(r){if(n.matches(r))return!0;if(i&&null!==n.closest(r))return!0}return!1}function gs(t,e){return-1!==e.getId(t)}function ws(t,e,r){return!("TITLE"!==t.tagName||!r.headTitleMutations)||e.getId(t)===q}function bs(t,e){if(I(t))return!1;var r=e.getId(t);if(!e.has(r))return!0;var i=ss.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||bs(i,e))}function Ss(t){return Boolean(t.changedTouches)}function ks(t){void 0===t&&(t=window),"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=[].forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=[].forEach)}function Cs(t){var e={},r=(t,r)=>{var i={value:t,parent:r,children:[]};return e[t.node.id]=i,i},i=[];for(var n of t){var{nextId:s,parentId:o}=n;if(s&&s in e){var a=e[s];if(a.parent){var h=a.parent.children.indexOf(a);a.parent.children.splice(h,0,r(n,a.parent))}else{var u=i.indexOf(a);i.splice(u,0,r(n,null))}}else if(o in e){var l=e[o];l.children.push(r(n,l))}else i.push(r(n,null))}return i}function Ms(t,e){e(t.value);for(var r=t.children.length-1;r>=0;r--)Ms(t.children[r],e)}function Is(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function xs(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function Rs(t,e){var r,i,n=null==(i=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:i.frameElement;if(!n||n===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};var s=n.getBoundingClientRect(),o=Rs(n,e),a=s.height/n.clientHeight;return{x:s.x*o.relativeScale+o.x,y:s.y*o.relativeScale+o.y,relativeScale:a,absoluteScale:o.absoluteScale*a}}function Es(t){return!!t&&(t instanceof dn&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(ss.shadowRoot(t)))}function Ts(t,e){var r=null==t?void 0:t[e[0]];return r?1===e.length?r:Ts(r.cssRules,e.slice(1)):null}function As(t){var e=[...t],r=e.pop();return{positions:e,index:r}}function Os(t){for(var e=new Set,r=[],i=t.length;i--;){var n=t[i];e.has(n.id)||(r.push(n),e.add(n.id))}return r}/[1-9][0-9]{12}/.test(Date.now().toString())||(fs=()=>(new Date).getTime());class Ds{constructor(){c(this,"id",1),c(this,"styleIDMap",new WeakMap),c(this,"idStyleMap",new Map)}getId(t){var e;return null!==(e=this.styleIDMap.get(t))&&void 0!==e?e:-1}has(t){return this.styleIDMap.has(t)}add(t,e){return this.has(t)?this.getId(t):(r=void 0===e?this.id++:e,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r);var r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Ns(t){var e,r=null;return"getRootNode"in t&&(null==(e=ss.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ss.host(ss.getRootNode(t))&&(r=ss.host(ss.getRootNode(t))),r}function Ls(t){for(var e,r=t;e=Ns(r);)r=e;return r}function Bs(t){var e=t.ownerDocument;if(!e)return!1;var r=Ls(t);return ss.contains(e,r)}function _s(t){var e=t.ownerDocument;return!!e&&(ss.contains(e,t)||Bs(t))}var Fs=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Ds,get _mirror(){return us},callSafely:as,closestElementOfNode:ms,getBaseDimension:Rs,getNestedRule:Ts,getPositionsAndIndex:As,getRootShadowHost:Ls,getShadowHost:Ns,getWindowHeight:vs,getWindowScroll:ds,getWindowWidth:ps,hasShadowRoot:Es,hookSetter:cs,inDom:_s,isAncestorRemoved:bs,isBlocked:ys,isIgnored:ws,isSerialized:gs,isSerializedIframe:Is,isSerializedStylesheet:xs,iterateResolveTree:Ms,legacy_isTouchEvent:Ss,get nowTimestamp(){return fs},on:os,polyfill:ks,queueToResolveTrees:Cs,shadowHostInDom:Bs,throttle:ls,uniqueTextMutations:Os},Symbol.toStringTag,{value:"Module"})),Ps=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(Ps||{}),js=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(js||{}),Us=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Us||{}),Ws=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Ws||{}),Gs=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Gs||{}),Hs=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Hs||{}),zs=(t=>(t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back",t.Destroy="destroy",t))(zs||{}),Vs=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Vs||{});function Ys(t){return"__ln"in t}class $s{constructor(){c(this,"length",0),c(this,"head",null),c(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");for(var e=this.head,r=0;t>r;r++)e=(null==e?void 0:e.next)||null;return e}addNode(t){var e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&Ys(t.previousSibling)){var r=t.previousSibling.__ln.next;e.next=r,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,r&&(r.previous=e)}else if(t.nextSibling&&Ys(t.nextSibling)&&t.nextSibling.__ln.previous){var i=t.nextSibling.__ln.previous;e.previous=i,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,i&&(i.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){var e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}var qs,Zs=(t,e)=>t+"@"+e;class Js{constructor(){c(this,"frozen",!1),c(this,"locked",!1),c(this,"texts",[]),c(this,"attributes",[]),c(this,"attributeMap",new WeakMap),c(this,"removes",[]),c(this,"mapRemoves",[]),c(this,"movedMap",{}),c(this,"addedSet",new Set),c(this,"movedSet",new Set),c(this,"droppedSet",new Set),c(this,"removesSubTreeCache",new Set),c(this,"mutationCb"),c(this,"blockClass"),c(this,"blockSelector"),c(this,"maskTextClass"),c(this,"maskTextSelector"),c(this,"inlineStylesheet"),c(this,"maskInputOptions"),c(this,"maskTextFn"),c(this,"maskInputFn"),c(this,"keepIframeSrcFn"),c(this,"recordCanvas"),c(this,"inlineImages"),c(this,"slimDOMOptions"),c(this,"dataURLOptions"),c(this,"doc"),c(this,"mirror"),c(this,"iframeManager"),c(this,"stylesheetManager"),c(this,"shadowDomManager"),c(this,"canvasManager"),c(this,"processedNodeManager"),c(this,"unattachedDoc"),c(this,"canvasManagerReleased",!1),c(this,"processMutations",(t=>{t.forEach(this.processMutation),this.emit()})),c(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var t=[],e=new Set,r=new $s,i=t=>{for(var e=t,r=q;r===q;)r=(e=e&&e.nextSibling)&&this.mirror.getId(e);return r},n=n=>{var s=ss.parentNode(n);if(s&&_s(n)&&"TEXTAREA"!==s.tagName){var o=I(s)?this.mirror.getId(Ns(n)):this.mirror.getId(s),a=i(n);if(-1===o||-1===a)return r.addNode(n);var h=dt(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:t=>{Is(t,this.mirror)&&this.iframeManager.addIframe(t),xs(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),Es(n)&&this.shadowDomManager.addShadowRoot(ss.shadowRoot(n),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onIframeListenerRegistered:(t,e)=>{this.iframeManager.registerLoadListenerDisposer(t,e)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});h&&(t.push({parentId:o,nextId:a,node:h}),e.add(h.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var s of this.movedSet)Qs(this.removesSubTreeCache,s)&&!this.movedSet.has(ss.parentNode(s))||n(s);for(var o of this.addedSet)Ks(this.droppedSet,o)||Qs(this.removesSubTreeCache,o)?Ks(this.movedSet,o)?n(o):this.droppedSet.add(o):n(o);for(var a=null;r.length;){var h=null;if(a){var u=this.mirror.getId(ss.parentNode(a.value)),l=i(a.value);-1!==u&&-1!==l&&(h=a)}if(!h)for(var c=r.tail;c;){var f=c;if(c=c.previous,f){var d=this.mirror.getId(ss.parentNode(f.value));if(-1===i(f.value))continue;if(-1!==d){h=f;break}var v=ss.parentNode(f.value);if(v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var p=ss.host(v);if(-1!==this.mirror.getId(p)){h=f;break}}}}if(!h){for(;r.head;)r.removeNode(r.head.value);break}a=h.previous,r.removeNode(h.value),n(h.value)}var m={texts:this.texts.map((t=>{var e=t.node,r=ss.parentNode(e);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(e),value:t.value}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),attributes:this.attributes.map((t=>{var{attributes:e}=t;if("string"==typeof e.style){var r=JSON.stringify(t.styleDiff),i=JSON.stringify(t._unchangedStyles);e.style.length>r.length&&(r+i).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}return{id:this.mirror.getId(t.node),attributes:e}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(m.texts.length||m.attributes.length||m.removes.length||m.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(m))}})),c(this,"bufferBelongsToIframe",(t=>this.doc===t.contentDocument)),c(this,"genTextAreaValueMutation",(t=>{var e=this.attributeMap.get(t);e||(this.attributes.push(e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t,e));var r=Array.from(ss.childNodes(t),(t=>ss.textContent(t)||"")).join("");e.attributes.value=O({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:L(t),value:r,maskInputFn:this.maskInputFn})})),c(this,"processMutation",(t=>{if(!ws(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":var e=ss.textContent(t.target);ys(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:nt(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,ms(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break;case"attributes":var r=t.target,i=t.attributeName,n=t.target.getAttribute(i);if("value"===i){var s=L(r);n=O({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:n,maskInputFn:this.maskInputFn})}if(ys(t.target,this.blockClass,this.blockSelector,!1)||n===t.oldValue)return;var o=this.attributeMap.get(t.target);if("IFRAME"===r.tagName&&"src"===i&&!this.keepIframeSrcFn(n)){if(r.contentDocument)return;i="rr_src"}if(o||(this.attributes.push(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t.target,o)),"type"===i&&"INPUT"===r.tagName&&"password"===(t.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!rt(r.tagName,i))if(o.attributes[i]=et(this.doc,D(r.tagName),D(i),n,r,this.dataURLOptions),"style"===i){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var a=this.unattachedDoc.createElement("span");for(var h of(t.oldValue&&a.setAttribute("style",t.oldValue),Array.from(r.style))){var u=r.style.getPropertyValue(h),l=r.style.getPropertyPriority(h);u!==a.style.getPropertyValue(h)||l!==a.style.getPropertyPriority(h)?o.styleDiff[h]=""===l?u:[u,l]:o._unchangedStyles[h]=[u,l]}for(var c of Array.from(a.style))""===r.style.getPropertyValue(c)&&(o.styleDiff[c]=!1)}else"open"===i&&"DIALOG"===r.tagName&&(o.attributes.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal");break;case"childList":if(ys(t.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void this.genTextAreaValueMutation(t.target);t.addedNodes.forEach((e=>this.genAdds(e,t.target))),t.removedNodes.forEach((e=>{var r=this.mirror.getId(e),i=I(t.target)?this.mirror.getId(ss.host(t.target)):this.mirror.getId(t.target);ys(t.target,this.blockClass,this.blockSelector,!1)||ws(e,this.mirror,this.slimDOMOptions)||!gs(e,this.mirror)||(this.addedSet.has(e)?(Xs(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===r||bs(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[Zs(r,i)]?Xs(this.movedSet,e):(this.removes.push({parentId:i,id:r,isShadow:!(!I(t.target)||!x(t.target))||void 0}),function(t,e){for(var r=[t];r.length;){var i=r.pop();e.has(i)||(e.add(i),ss.childNodes(i).forEach((t=>r.push(t))))}}(e,this.removesSubTreeCache))),this.mapRemoves.push(e))}))}})),c(this,"genAdds",((t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(ws(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);var r=null;e&&this.mirror.hasNode(e)&&(r=this.mirror.getId(e)),r&&-1!==r&&(this.movedMap[Zs(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ys(t,this.blockClass,this.blockSelector,!1)||(ss.childNodes(t).forEach((t=>this.genAdds(t))),Es(t)&&ss.childNodes(ss.shadowRoot(t)).forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)})))}}))}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((e=>{this[e]=t[e]})),this.canvasManager.acquire()}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.releaseCanvasManager()}releaseCanvasManager(){this.canvasManagerReleased||(this.canvasManagerReleased=!0,this.canvasManager.reset())}bufferDoc(){return this.doc}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function Xs(t,e){t.delete(e),ss.childNodes(e).forEach((e=>Xs(t,e)))}function Qs(t,e,r){return 0!==t.size&&function(t,e,r){var i=ss.parentNode(e);return!!i&&t.has(i)}(t,e)}function Ks(t,e){return 0!==t.size&&to(t,e)}function to(t,e){var r=ss.parentNode(e);return!!r&&(!!t.has(r)||to(t,r))}var eo=t=>qs?function(){try{return t(...arguments)}catch(t){if(qs&&!0===qs(t))return;throw t}}:t,ro=[];function io(t){try{if("composedPath"in t){var e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function no(t,e){var r=new Js;ro.push(r),r.init(t);var i=new(is())(eo(r.processMutations.bind(r)));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{observer:i,buffer:r}}function so(t){var{scrollCb:e,doc:r,mirror:i,blockClass:n,blockSelector:s,sampling:o}=t,a=new Map,h=t=>{var o=io(t);if(o&&!ys(o,n,s,!0)){var h,u,l=i.getId(o);if(o===r&&r.defaultView){var c=ds(r.defaultView);h=c.left,u=c.top}else h=o.scrollLeft,u=o.scrollTop;var f=h+","+u;a.get(l)!==f&&(a.set(l,f),e({id:l,x:h,y:u}))}},u=[os("scroll",eo(ls(eo((t=>h(t))),o.scroll||100)),r)];return"onscrollend"in r&&u.push(os("scrollend",eo(h),r)),()=>u.forEach((t=>t()))}function oo(t,e){for(var r=ro.length-1;r>=0;r--){var i=ro[r];if(i){var n=i.bufferBelongsToIframe(t);!n&&e&&e.has(i.bufferDoc())&&(n=!0),n&&(i.reset(),ro.splice(r,1))}}}var ao=["INPUT","TEXTAREA","SELECT"],ho=new WeakMap;function uo(t){return function t(e,r){if(vo("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||vo("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||vo("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||vo("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var i=Array.from(e.parentRule.cssRules).indexOf(e);return r.unshift(i),t(e.parentRule,r)}if(e.parentStyleSheet){var n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);r.unshift(n)}return r}(t,[])}function lo(t,e,r){var i,n;return t?(t.ownerNode?i=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:i}):{}}function co(t,e){var r,i,n,s,{mirror:o,stylesheetManager:a}=t;s=o.getId("#document"===e.nodeName?e:ss.host(e));var h="#document"===e.nodeName?null==(r=e.defaultView)?void 0:r.Document:null==(n=null==(i=e.ownerDocument)?void 0:i.defaultView)?void 0:n.ShadowRoot,u=(null==h?void 0:h.prototype)?Object.getOwnPropertyDescriptor(null==h?void 0:h.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&h&&u?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var t;return null==(t=u.get)?void 0:t.call(this)},set(t){var e,r=null==(e=u.set)?void 0:e.call(this,t);if(null!==s&&-1!==s)try{a.adoptStyleSheets(t,s)}catch(t){}return r}}),eo((()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))):()=>{}}function fo(t,e){void 0===e&&(e={});var i,n,s=t.doc.defaultView;if(!s)return()=>{};if(function(t,e){var{mutationCb:r,mousemoveCb:i,mouseInteractionCb:n,scrollCb:s,viewportResizeCb:o,inputCb:a,mediaInteractionCb:h,styleSheetRuleCb:u,styleDeclarationCb:l,canvasMutationCb:c,fontCb:f,selectionCb:d,customElementCb:v}=t;t.mutationCb=function(){e.mutation&&e.mutation(...arguments),r(...arguments)},t.mousemoveCb=function(){e.mousemove&&e.mousemove(...arguments),i(...arguments)},t.mouseInteractionCb=function(){e.mouseInteraction&&e.mouseInteraction(...arguments),n(...arguments)},t.scrollCb=function(){e.scroll&&e.scroll(...arguments),s(...arguments)},t.viewportResizeCb=function(){e.viewportResize&&e.viewportResize(...arguments),o(...arguments)},t.inputCb=function(){e.input&&e.input(...arguments),a(...arguments)},t.mediaInteractionCb=function(){e.mediaInteaction&&e.mediaInteaction(...arguments),h(...arguments)},t.styleSheetRuleCb=function(){e.styleSheetRule&&e.styleSheetRule(...arguments),u(...arguments)},t.styleDeclarationCb=function(){e.styleDeclaration&&e.styleDeclaration(...arguments),l(...arguments)},t.canvasMutationCb=function(){e.canvasMutation&&e.canvasMutation(...arguments),c(...arguments)},t.fontCb=function(){e.font&&e.font(...arguments),f(...arguments)},t.selectionCb=function(){e.selection&&e.selection(...arguments),d(...arguments)},t.customElementCb=function(){e.customElement&&e.customElement(...arguments),v(...arguments)}}(t,e),t.recordDOM){var o=no(t,t.doc);i=o.observer,n=o.buffer}var a=function(t){var{mousemoveCb:e,sampling:r,doc:i,mirror:n}=t;if(!1===r.mousemove)return()=>{};var s,o="number"==typeof r.mousemove?r.mousemove:50,a="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,h=[],u=ls(eo((t=>{var r=Date.now()-s;e(h.map((t=>(t.timeOffset-=r,t))),t),h=[],s=null})),a),l=eo(ls(eo((t=>{var e=io(t),{clientX:r,clientY:i}=Ss(t)?t.changedTouches[0]:t;s||(s=fs()),h.push({x:r,y:i,id:n.getId(e),timeOffset:fs()-s}),u("undefined"!=typeof DragEvent&&t instanceof DragEvent?js.Drag:t instanceof MouseEvent?js.MouseMove:js.TouchMove)})),o,{trailing:!1})),c=[os("mousemove",l,i),os("touchmove",l,i),os("drag",l,i)];return eo((()=>{c.forEach((t=>t()))}))}(t),h=function(t){var{mouseInteractionCb:e,doc:i,mirror:n,blockClass:s,blockSelector:o,sampling:a}=t;if(!1===a.mouseInteraction)return()=>{};var h=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[],l=null;return Object.keys(Us).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==h[t])).forEach((t=>{var a=D(t),h=(t=>i=>{var a=io(i);if(!ys(a,s,o,!0)){var h=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":h=Ws.Mouse;break;case"touch":h=Ws.Touch;break;case"pen":h=Ws.Pen}h===Ws.Touch&&(Us[t]===Us.MouseDown?u="TouchStart":Us[t]===Us.MouseUp&&(u="TouchEnd"))}else Ss(i)&&(h=Ws.Touch);null!==h?(l=h,(u.startsWith("Touch")&&h===Ws.Touch||u.startsWith("Mouse")&&h===Ws.Mouse)&&(h=null)):Us[t]===Us.Click&&(h=l,l=null);var c=Ss(i)?i.changedTouches[0]:i;if(c){var f=n.getId(a),{clientX:d,clientY:v}=c;eo(e)(r({type:Us[u],id:f,x:d,y:v},null!==h&&{pointerType:h}))}}})(t);if(window.PointerEvent)switch(Us[t]){case Us.MouseDown:case Us.MouseUp:a=a.replace("mouse","pointer");break;case Us.TouchStart:case Us.TouchEnd:return}u.push(os(a,h,i))})),eo((()=>{u.forEach((t=>t()))}))}(t),u=so(t),l=function(t,e){var{viewportResizeCb:r}=t,{win:i}=e,n=-1,s=-1;return os("resize",eo(ls(eo((()=>{var t=vs(),e=ps();n===t&&s===e||(r({width:Number(e),height:Number(t)}),n=t,s=e)})),200)),i)}(t,{win:s}),c=function(t){var{inputCb:e,doc:i,mirror:n,blockClass:s,blockSelector:o,ignoreClass:a,ignoreSelector:h,maskInputOptions:u,maskInputFn:l,sampling:c,userTriggeredOnInput:f}=t;function d(t){var e=io(t),r=t.isTrusted,n=e&&e.tagName;if(e&&"OPTION"===n&&(e=ss.parentElement(e)),e&&n&&ao.indexOf(n)>=0&&!ys(e,s,o,!0)&&!(e.classList.contains(a)||h&&e.matches(h))){var c=e.value,d=!1,p=L(e)||"";"radio"===p||"checkbox"===p?d=e.checked:(u[n.toLowerCase()]||u[p])&&(c=O({element:e,maskInputOptions:u,tagName:n,type:p,value:c,maskInputFn:l})),v(e,f?{text:c,isChecked:d,userTriggered:r}:{text:c,isChecked:d});var m=e.name;"radio"===p&&m&&d&&i.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach((t=>{if(t!==e){var r=t.value;v(t,f?{text:r,isChecked:!d,userTriggered:!1}:{text:r,isChecked:!d})}}))}}function v(t,i){var s=ho.get(t);if(!s||s.text!==i.text||s.isChecked!==i.isChecked){ho.set(t,i);var o=n.getId(t);eo(e)(r({},i,{id:o}))}}var p=("last"===c.input?["change"]:["input","change"]).map((t=>os(t,eo(d),i))),m=i.defaultView;if(!m)return()=>{p.forEach((t=>t()))};var y=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value");return y&&y.set&&p.push(...[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]].map((t=>cs(t[0],t[1],{set(){eo(d)({target:this,isTrusted:!1})}},!1,m)))),eo((()=>{p.forEach((t=>t()))}))}(t),f=function(t){var{mediaInteractionCb:e,blockClass:r,blockSelector:i,mirror:n,sampling:s,doc:o}=t,a=eo((t=>ls(eo((s=>{var o=io(s);if(o&&!ys(o,r,i,!0)){var{currentTime:a,volume:h,muted:u,playbackRate:l,loop:c}=o;e({type:t,id:n.getId(o),currentTime:a,volume:h,muted:u,playbackRate:l,loop:c})}})),s.media||500))),h=[os("play",a(Hs.Play),o),os("pause",a(Hs.Pause),o),os("seeked",a(Hs.Seeked),o),os("volumechange",a(Hs.VolumeChange),o),os("ratechange",a(Hs.RateChange),o)];return eo((()=>{h.forEach((t=>t()))}))}(t),d=()=>{},v=()=>{},p=()=>{},m=()=>{};t.recordDOM&&(d=function(t,e){var{styleSheetRuleCb:r,mirror:i,stylesheetManager:n}=t,{win:s}=e;if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};var o=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:eo(((t,e,s)=>{var[o,a]=s,{id:h,styleId:u}=lo(e,i,n.styleMirror);return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,adds:[{rule:o,index:a}]}),t.apply(e,s)}))}),s.CSSStyleSheet.prototype.addRule=function(t,e,r){return void 0===r&&(r=this.cssRules.length),s.CSSStyleSheet.prototype.insertRule.apply(this,[t+" { "+e+" }",r])};var a,h,u=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(u,{apply:eo(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=lo(e,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,removes:[{index:o}]}),t.apply(e,s)}))}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},s.CSSStyleSheet.prototype.replace&&(a=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:eo(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=lo(e,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,replace:o}),t.apply(e,s)}))})),s.CSSStyleSheet.prototype.replaceSync&&(h=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(h,{apply:eo(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=lo(e,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,replaceSync:o}),t.apply(e,s)}))}));var l={};po("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(po("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),po("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),po("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));var c={};return Object.entries(l).forEach((t=>{var[e,s]=t;c[e]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(c[e].insertRule,{apply:eo(((t,e,s)=>{var[o,a]=s,{id:h,styleId:u}=lo(e.parentStyleSheet,i,n.styleMirror);return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,adds:[{rule:o,index:[...uo(e),a||0]}]}),t.apply(e,s)}))}),s.prototype.deleteRule=new Proxy(c[e].deleteRule,{apply:eo(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=lo(e.parentStyleSheet,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,removes:[{index:[...uo(e),o]}]}),t.apply(e,s)}))})})),eo((()=>{s.CSSStyleSheet.prototype.insertRule=o,s.CSSStyleSheet.prototype.deleteRule=u,a&&(s.CSSStyleSheet.prototype.replace=a),h&&(s.CSSStyleSheet.prototype.replaceSync=h),Object.entries(l).forEach((t=>{var[e,r]=t;r.prototype.insertRule=c[e].insertRule,r.prototype.deleteRule=c[e].deleteRule}))}))}(t,{win:s}),v=co(t,t.doc),p=function(t,e){var{styleDeclarationCb:r,mirror:i,ignoreCSSAttributes:n,stylesheetManager:s}=t,{win:o}=e,a=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:eo(((t,e,o)=>{var h,[u,l,c]=o;if(n.has(u))return a.apply(e,[u,l,c]);var{id:f,styleId:d}=lo(null==(h=e.parentRule)?void 0:h.parentStyleSheet,i,s.styleMirror);return(f&&-1!==f||d&&-1!==d)&&r({id:f,styleId:d,set:{property:u,value:l,priority:c},index:uo(e.parentRule)}),t.apply(e,o)}))});var h=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(h,{apply:eo(((t,e,o)=>{var a,[u]=o;if(n.has(u))return h.apply(e,[u]);var{id:l,styleId:c}=lo(null==(a=e.parentRule)?void 0:a.parentStyleSheet,i,s.styleMirror);return(l&&-1!==l||c&&-1!==c)&&r({id:l,styleId:c,remove:{property:u},index:uo(e.parentRule)}),t.apply(e,o)}))}),eo((()=>{o.CSSStyleDeclaration.prototype.setProperty=a,o.CSSStyleDeclaration.prototype.removeProperty=h}))}(t,{win:s}),t.collectFonts&&(m=function(t){var{fontCb:e,doc:r}=t,i=r.defaultView;if(!i)return()=>{};var n=[],s=new WeakMap,o=i.FontFace;i.FontFace=function(t,e,r){var i=new o(t,e,r);return s.set(i,{family:t,buffer:"string"!=typeof e,descriptors:r,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),i};var a=ns(r.fonts,"add",(function(t){return function(r){return setTimeout(eo((()=>{var t=s.get(r);t&&(e(t),s.delete(r))})),0),t.apply(this,[r])}}));return n.push((()=>{i.FontFace=o})),n.push(a),eo((()=>{n.forEach((t=>t()))}))}(t)));var y=function(t){var{doc:e,mirror:r,blockClass:i,blockSelector:n,selectionCb:s}=t,o=!0,a=eo((()=>{var t=e.getSelection();if(!(!t||o&&(null==t?void 0:t.isCollapsed))){o=t.isCollapsed||!1;for(var a=[],h=t.rangeCount||0,u=0;h>u;u++){var l=t.getRangeAt(u),{startContainer:c,startOffset:f,endContainer:d,endOffset:v}=l;ys(c,i,n,!0)||ys(d,i,n,!0)||a.push({start:r.getId(c),startOffset:f,end:r.getId(d),endOffset:v})}s({ranges:a})}}));return a(),os("selectionchange",a)}(t),g=function(t){var{doc:e,customElementCb:r}=t,i=e.defaultView;return i&&i.customElements?ns(i.customElements,"define",(function(t){return function(e,i,n){try{r({define:{name:e}})}catch(t){console.warn("Custom element callback failed for "+e)}return t.apply(this,[e,i,n])}})):()=>{}}(t),w=[];for(var b of t.plugins)w.push(b.observer(b.callback,s,b.options));return eo((()=>{if(n){n.destroy(),n.reset();var t=ro.indexOf(n);-1!==t&&ro.splice(t,1)}null==i||i.disconnect(),a(),h(),u(),l(),c(),f(),d(),v(),p(),m(),y(),g(),w.forEach((t=>t()))}))}function vo(t){return void 0!==window[t]}function po(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class mo{constructor(t){c(this,"iframeIdToRemoteIdMap",new WeakMap),c(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,r,i){var n=r||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t),o=n.get(e);return o||(o=this.generateIdFn(),n.set(e,o),s.set(o,e)),o}getIds(t,e){var r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return e.map((e=>this.getId(t,e,r,i)))}getRemoteId(t,e,r){var i=r||this.getRemoteIdToIdMap(t);return"number"!=typeof e?e:i.get(e)||-1}getRemoteIds(t,e){var r=this.getRemoteIdToIdMap(t);return e.map((e=>this.getRemoteId(t,e,r)))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){var e=this.iframeIdToRemoteIdMap.get(t);return e||this.iframeIdToRemoteIdMap.set(t,e=new Map),e}getRemoteIdToIdMap(t){var e=this.iframeRemoteIdToIdMap.get(t);return e||this.iframeRemoteIdToIdMap.set(t,e=new Map),e}}class yo{constructor(t){c(this,"iframes",new WeakMap),c(this,"crossOriginIframeMap",new WeakMap),c(this,"crossOriginIframeMirror",new mo(Z)),c(this,"crossOriginIframeStyleMirror"),c(this,"crossOriginIframeRootIdMap",new WeakMap),c(this,"mirror"),c(this,"mutationCb"),c(this,"wrappedEmit"),c(this,"loadListener"),c(this,"pageHideListener"),c(this,"stylesheetManager"),c(this,"recordCrossOriginIframes"),c(this,"messageHandler"),c(this,"nestedIframeListeners",new Map),c(this,"attachedWindows",new WeakMap),c(this,"attachedDocuments",new WeakMap),c(this,"attachedIframes",new Map),c(this,"loadListenerDisposers",new WeakMap),c(this,"iframeElementsById",new Map),c(this,"pageHideHandlers",new WeakMap),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new mo(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}registerLoadListenerDisposer(t,e){var r=this.loadListenerDisposers.get(t);r||this.loadListenerDisposers.set(t,r=new Set),r.add(e);var i=this.mirror.getId(t);-1!==i&&this.iframeElementsById.set(i,t)}getIframeElementById(t){var e,r,i;return null!==(e=null!==(r=null==(i=this.attachedIframes.get(t))?void 0:i.element)&&void 0!==r?r:this.iframeElementsById.get(t))&&void 0!==e?e:null}forgetIframeId(t){this.attachedIframes.delete(t),this.iframeElementsById.delete(t)}disposeLoadListeners(t){var e=this.loadListenerDisposers.get(t);e&&(e.forEach((t=>as(t))),this.loadListenerDisposers.delete(t))}removePageHideListener(t){var e=this.pageHideHandlers.get(t);e&&(e.forEach((t=>{var{win:e,handler:r}=t;as((()=>e.removeEventListener("pagehide",r)))})),this.pageHideHandlers.delete(t))}addLoadListener(t){this.loadListener=t}addPageHideListener(t){this.pageHideListener=t}removeLoadListener(){this.loadListener=void 0}trackIframeContent(t,e){var r=this.mirror.getId(t);return this.attachedIframes.set(r,{element:t,content:e}),r}attachIframe(t,e){var r,i=this.trackIframeContent(t,e);if(t.contentDocument){var n=this.attachedDocuments.get(t);n||this.attachedDocuments.set(t,n=new Set),n.add(t.contentDocument)}this.mutationCb({adds:[{parentId:i,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var s=t.contentWindow;if(this.recordCrossOriginIframes&&s&&!this.nestedIframeListeners.has(s)){var o=this.handleMessage.bind(this);as((()=>{s.addEventListener("message",o),this.nestedIframeListeners.set(s,o);var e=this.attachedWindows.get(t);e||this.attachedWindows.set(t,e=new Set),e.add(s)}))}as((()=>{var e=t.contentWindow;if(e){var r=this.pageHideHandlers.get(t);if(r)for(var i of r)if(i.win===e)return;var n=()=>{var e;null==(e=this.pageHideListener)||e.call(this,t),t.contentDocument&&this.mirror.removeNodeFromMap(t.contentDocument),t.contentWindow&&this.crossOriginIframeMap.delete(t.contentWindow)};e.addEventListener("pagehide",n),r||this.pageHideHandlers.set(t,r=new Set),r.add({win:e,handler:n})}})),null==(r=this.loadListener)||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){var e=t;if("rrweb"===e.data.type&&e.origin===e.data.origin&&t.source){var r=this.crossOriginIframeMap.get(t.source);if(r){var i=this.transformCrossOriginEvent(r,e.data.event);i&&this.wrappedEmit(i,e.data.isCheckout)}}}transformCrossOriginEvent(t,e){var r;switch(e.type){case Ps.FullSnapshot:this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);var i=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(e.data.node,i),this.trackIframeContent(t,e.data.node),{timestamp:e.timestamp,type:Ps.IncrementalSnapshot,data:{source:js.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Ps.Meta:case Ps.Load:case Ps.DomContentLoaded:return!1;case Ps.Plugin:return e;case Ps.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case Ps.IncrementalSnapshot:switch(e.data.source){case js.Mutation:return e.data.adds.forEach((e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);var r=this.crossOriginIframeRootIdMap.get(t);r&&this.patchRootIdOnNode(e.node,r)})),e.data.removes.forEach((e=>{this.replaceIds(e,t,["parentId","id"])})),e.data.attributes.forEach((e=>{this.replaceIds(e,t,["id"])})),e.data.texts.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case js.Drag:case js.TouchMove:case js.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case js.ViewportResize:return!1;case js.MediaInteraction:case js.MouseInteraction:case js.Scroll:case js.CanvasMutation:case js.Input:return this.replaceIds(e.data,t,["id"]),e;case js.StyleSheetRule:case js.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case js.Font:return e;case js.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case js.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null==(r=e.data.styles)||r.forEach((e=>{this.replaceStyleIds(e,t,["styleId"])})),e}}return!1}replace(t,e,r,i){for(var n of i)(Array.isArray(e[n])||"number"==typeof e[n])&&(e[n]=Array.isArray(e[n])?t.getIds(r,e[n]):t.getId(r,e[n]));return e}replaceIds(t,e,r){return this.replace(this.crossOriginIframeMirror,t,e,r)}replaceStyleIds(t,e,r){return this.replace(this.crossOriginIframeStyleMirror,t,e,r)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach((t=>{this.replaceIdOnNode(t,e)}))}patchRootIdOnNode(t,e){t.type===Vs.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}removeIframeById(t){var e=this.attachedIframes.get(t),r=(null==e?void 0:e.element)||this.iframeElementsById.get(t)||this.mirror.getNode(t);if(this.iframeElementsById.delete(t),r){var i=r.contentWindow,n=this.attachedWindows.get(r);if(n&&(n.forEach((t=>{var e=this.nestedIframeListeners.get(t);e&&(as((()=>t.removeEventListener("message",e))),this.nestedIframeListeners.delete(t)),this.crossOriginIframeMap.delete(t)})),this.attachedWindows.delete(r)),i&&this.nestedIframeListeners.has(i)){var s=this.nestedIframeListeners.get(i);as((()=>i.removeEventListener("message",s))),this.nestedIframeListeners.delete(i)}i&&this.crossOriginIframeMap.delete(i),this.iframes.delete(r),this.disposeLoadListeners(r),this.removePageHideListener(r);var o=this.attachedDocuments.get(r);o&&(o.forEach((t=>{as((()=>this.mirror.removeNodeFromMap(t)))})),as((()=>oo(r,o))),this.attachedDocuments.delete(r))}e&&this.attachedIframes.delete(t)}cleanupDetachedIframes(){if(0!==this.attachedIframes.size){var t=[];this.attachedIframes.forEach(((e,r)=>{this.mirror.has(r)||t.push(r)})),t.forEach((t=>this.removeIframeById(t)))}}reattachIframes(){this.attachedIframes.forEach(((t,e)=>{var{content:r}=t;this.mirror.has(e)?this.mutationCb({adds:[{parentId:e,nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(e)}))}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach(((t,e)=>{as((()=>e.removeEventListener("message",t)))})),this.nestedIframeListeners.clear();var t=new Set;this.iframeElementsById.forEach((e=>t.add(e))),this.attachedIframes.forEach((e=>{var{element:r}=e;return t.add(r)})),t.forEach((t=>{this.disposeLoadListeners(t),this.removePageHideListener(t)})),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap,this.loadListenerDisposers=new WeakMap,this.pageHideHandlers=new WeakMap,this.attachedDocuments=new WeakMap,this.attachedWindows=new WeakMap,this.iframeElementsById=new Map}}class go{constructor(t){c(this,"shadowDoms",new WeakSet),c(this,"mutationCb"),c(this,"scrollCb"),c(this,"bypassOptions"),c(this,"mirror"),c(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){if(x(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var{observer:i,buffer:n}=no(r({},this.bypassOptions,{doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push((()=>{i.disconnect(),n.destroy(),n.releaseCanvasManager();var t=ro.indexOf(n);-1!==t&&ro.splice(t,1)})),this.restoreHandlers.push(so(r({},this.bypassOptions,{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout((()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(ss.host(t))),this.restoreHandlers.push(co({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))}),0)}}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){var r=this;this.restoreHandlers.push(ns(t.prototype,"attachShadow",(function(t){return function(i){var n=t.call(this,i),s=ss.shadowRoot(this);return s&&_s(this)&&r.addShadowRoot(s,e),n}})))}reset(){this.restoreHandlers.forEach((t=>{try{t()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var wo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bo="undefined"==typeof Uint8Array?[]:new Uint8Array(256),So=0;64>So;So++)bo[wo.charCodeAt(So)]=So;var ko=function(t){var e,r,i,n,s,o=.75*t.length,a=t.length,h=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);var u=new ArrayBuffer(o),l=new Uint8Array(u);for(e=0;a>e;e+=4)r=bo[t.charCodeAt(e)],i=bo[t.charCodeAt(e+1)],n=bo[t.charCodeAt(e+2)],s=bo[t.charCodeAt(e+3)],l[h++]=r<<2|i>>4,l[h++]=(15&i)<<4|n>>2,l[h++]=(3&n)<<6|63&s;return u},Co=new Map,Mo=(t,e,r)=>{if(t&&(Ro(t,e)||"object"==typeof t)){var i=function(t,e){var r=Co.get(t);return r||Co.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}(r,t.constructor.name),n=i.indexOf(t);return-1===n&&(n=i.length,i.push(t)),n}};function Io(t,e,r,i){if(t instanceof Array)return t.map((t=>Io(t,e,r,i)));if(null===t)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:function(t){var e,r=new Uint8Array(t),i=r.length,n="";for(e=0;i>e;e+=3)n+=wo[r[e]>>2],n+=wo[(3&r[e])<<4|r[e+1]>>4],n+=wo[(15&r[e+1])<<2|r[e+2]>>6],n+=wo[63&r[e+2]];return i%3==2?n=n.substring(0,n.length-1)+"=":i%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(t)};if(t instanceof DataView)return{rr_type:t.constructor.name,args:[Io(t.buffer,e,r,i),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){var n=t.constructor.name,{src:s}=t;return{rr_type:n,src:s}}return t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL(i.type,i.quality)}:t instanceof ImageData?{rr_type:t.constructor.name,args:[Io(t.data,e,r,i),t.width,t.height]}:Ro(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Mo(t,e,r)}:t}var xo=(t,e,r,i)=>t.map((t=>Io(t,e,r,i))),Ro=(t,e)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((t=>"function"==typeof e[t]));return Boolean(r.find((r=>t instanceof e[r])))},Eo=["webgl","webgl2"];function To(t){return"nodeType"in t}function Ao(t,e,i,n){var s=[];try{if(n){var o=function(t,e,i){var n=t.GPUCanvasContext;if((null==n?void 0:n.prototype)&&"function"==typeof n.prototype.configure)return ns(n.prototype,"configure",(function(n){return function(s){var o=function(t){var{canvas:e}=t;return e&&"object"==typeof e?e:null}(this);if(!o||To(o)&&ys(o,e,i,!0))return n.call(this,s);To(o)&&!("__context"in o)&&(o.__context="webgpu");var a=function(t){var e=t.GPUTextureUsage;return e?e.COPY_SRC|e.RENDER_ATTACHMENT:null}(t);return n.call(this,null!==a&&s?r({},s,{usage:"number"==typeof s.usage?s.usage|a:a}):s)}}))}(t,e,i);o&&s.push(o)}var a=ns(t.HTMLCanvasElement.prototype,"getContext",(function(t){return function(r){for(var s=function(t){return"experimental-webgl"===t?"webgl":t}(r),o=arguments.length,a=new Array(o>1?o-1:0),h=1;o>h;h++)a[h-1]=arguments[h];if(!ys(this,e,i,!0)&&("__context"in this||(this.__context=s),n&&Eo.includes(s)))if(a[0]&&"object"==typeof a[0]){var u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0});return t.apply(this,[r,...a])}}));s.push(a)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach((t=>t()))}}function Oo(t,e,r,i,n,s,o){var a=[],h=Object.getOwnPropertyNames(t),u=function(h){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))return 0;try{if("function"!=typeof t[h])return 0;var u=ns(t,h,(function(t){return function(){for(var a=arguments.length,u=new Array(a),l=0;a>l;l++)u[l]=arguments[l];var c=t.apply(this,u);if(Mo(c,s,this),"tagName"in this.canvas&&!ys(this.canvas,i,n,!0)){var f=xo(u,s,this,o);r(this.canvas,{type:e,property:h,args:f})}return c}}));a.push(u)}catch(i){var l=cs(t,h,{set(t){r(this.canvas,{type:e,property:h,args:[t],setter:!0})}});a.push(l)}};for(var l of h)u(l);return a}var Do,No,Lo,Bo='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastFingerprintMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n function fnv1aHash(buffer) {\n const view = new Uint8Array(buffer);\n let hash = 2166136261;\n for (let i2 = 0; i2 < view.length; i2++) {\n hash ^= view[i2];\n hash = hash * 16777619 | 0;\n }\n return (hash >>> 0).toString(16);\n }\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n let reusableCanvas = null;\n let reusableCtx = null;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n try {\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n if (!reusableCanvas || reusableCanvas.width !== width || reusableCanvas.height !== height) {\n reusableCanvas = new OffscreenCanvas(width, height);\n reusableCtx = reusableCanvas.getContext("2d");\n }\n reusableCtx.clearRect(0, 0, width, height);\n reusableCtx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await reusableCanvas.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const fingerprint = fnv1aHash(arrayBuffer);\n if (!lastFingerprintMap.has(id)) {\n const base642 = encode(arrayBuffer);\n if (await transparentBase64 === base642) {\n lastFingerprintMap.set(id, fingerprint);\n return worker.postMessage({ id });\n }\n lastFingerprintMap.set(id, fingerprint);\n worker.postMessage({ id, type, base64: base642, width, height });\n return;\n }\n if (lastFingerprintMap.get(id) === fingerprint)\n return worker.postMessage({ id });\n const base64 = encode(arrayBuffer);\n worker.postMessage({ id, type, base64, width, height });\n lastFingerprintMap.set(id, fingerprint);\n } catch {\n worker.postMessage({ id });\n }\n } else {\n e.data.bitmap.close();\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-Ca9A-vl6.js.map\n',_o="undefined"!=typeof self&&self.Blob&&new Blob([Bo],{type:"text/javascript;charset=utf-8"});function Fo(t){var e;try{if(!(e=_o&&(self.URL||self.webkitURL).createObjectURL(_o)))throw"";var r=new Worker(e,{name:null==t?void 0:t.name});return r.addEventListener("error",(()=>{(self.URL||self.webkitURL).revokeObjectURL(e)})),r}catch(e){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Bo),{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class Po{constructor(t){c(this,"pendingCanvasMutations",new Map),c(this,"rafStamps",{latestId:0,invokeId:null}),c(this,"mirror"),c(this,"mutationCb"),c(this,"resetObservers"),c(this,"frozen",!1),c(this,"locked",!1),c(this,"rafIdTimestamp",null),c(this,"rafIdFlush",null),c(this,"refCount",0),c(this,"torndown",!1),c(this,"processMutation",((t,e)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)}));var{sampling:e="all",win:r,blockClass:i,blockSelector:n,recordCanvas:s,dataURLOptions:o}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&"all"===e&&this.initCanvasMutationObserver(r,i,n,o),s&&"number"==typeof e&&this.initCanvasFPSObserver(e,r,i,n,{dataURLOptions:o})}acquire(){this.refCount+=1}reset(){this.refCount>0&&(this.refCount-=1),this.refCount>0||this.teardown()}teardown(){this.torndown||(this.torndown=!0,this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),null!==this.rafIdTimestamp&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),null!==this.rafIdFlush&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null))}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,i,n,s){var o=this;if("OffscreenCanvas"in r){var a=Ao(r,i,n,!0),h=new Map,u=new Fo;u.onmessage=t=>{var{id:e}=t.data;if(h.set(e,!1),"base64"in t.data){var{base64:r,type:i,width:n,height:s}=t.data;this.mutationCb({id:e,type:Gs["2D"],commands:[{property:"clearRect",args:[0,0,n,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}],displayWidth:n,displayHeight:s})}};var l,c=1e3/t,f=0,d=t=>{var a,v;f&&c>t-f||(f=t,(a=[],v=t=>{try{t.querySelectorAll("canvas").forEach((t=>{ys(t,i,n,!0)||a.push(t)})),t.querySelectorAll("*").forEach((t=>{t.shadowRoot&&v(t.shadowRoot)}))}catch(t){}},v(r.document),a).forEach(function(){var t=e((function*(t){var e,r,i=o.mirror.getId(t);if(!h.get(i)&&0!==t.width&&0!==t.height){h.set(i,!0);try{if(["webgl","webgl2"].includes(t.__context)){var n=t.getContext(t.__context);if(null==(e=null==n?void 0:n.isContextLost)?void 0:e.call(n))return void h.set(i,!1);!1===(null==(r=null==n?void 0:n.getContextAttributes())?void 0:r.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}var a=t.clientWidth||t.width,l=t.clientHeight||t.height,c=yield createImageBitmap(t,{resizeWidth:a,resizeHeight:l});u.postMessage({id:i,bitmap:c,width:a,height:l,dataURLOptions:s.dataURLOptions},[c])}catch(t){h.set(i,!1)}}}));return function(e){return t.apply(this,arguments)}}())),l=requestAnimationFrame(d)};l=requestAnimationFrame(d),this.resetObservers=()=>{a(),cancelAnimationFrame(l)}}}initCanvasMutationObserver(t,e,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=Ao(t,e,r,!1),s=function(t,e,r,i,n){var s=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype),a=function(o){try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[o])return 1;var a=ns(e.CanvasRenderingContext2D.prototype,o,(function(s){return function(){for(var a=arguments.length,h=new Array(a),u=0;a>u;u++)h[u]=arguments[u];return ys(this.canvas,r,i,!0)||setTimeout((()=>{var r=xo(h,e,this,n);t(this.canvas,{type:Gs["2D"],property:o,args:r})}),0),s.apply(this,h)}}));s.push(a)}catch(r){var h=cs(e.CanvasRenderingContext2D.prototype,o,{set(e){t(this.canvas,{type:Gs["2D"],property:o,args:[e],setter:!0})}});s.push(h)}};for(var h of o)a(h);return()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i),o=function(t,e,r,i,n){var s=[];return void 0!==e.WebGLRenderingContext&&s.push(...Oo(e.WebGLRenderingContext.prototype,Gs.WebGL,t,r,i,e,n)),void 0!==e.WebGL2RenderingContext&&s.push(...Oo(e.WebGL2RenderingContext.prototype,Gs.WebGL2,t,r,i,e,n)),()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i);this.resetObservers=()=>{n(),s(),o()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var t=e=>{this.rafStamps.latestId=e,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((t,e)=>{var r=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,r)})),this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(t,e){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(t);if(r&&-1!==e){var n=r.map((t=>i(t,u))),{type:s}=r[0];this.mutationCb({id:e,type:s,commands:n}),this.pendingCanvasMutations.delete(t)}}}}class jo{constructor(t){c(this,"trackedLinkElements",new WeakSet),c(this,"mutationCb"),c(this,"adoptedStyleSheetCb"),c(this,"styleMirror",new Ds),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){var r=this;if(0!==t.length){var i={id:e,styleIds:[]},n=[],s=function(t){var e;r.styleMirror.has(t)?e=r.styleMirror.getId(t):(e=r.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,r)=>({rule:E(e,t.href),index:r})))})),i.styleIds.push(e)};for(var o of t)s(o);n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet,st.forEach((t=>t.abort())),st.clear()}trackStylesheetInLinkElement(t){}}class Uo{constructor(){c(this,"nodeMap",new WeakMap),c(this,"active",!1)}inOtherBuffer(t,e){var r=this.nodeMap.get(t);return r&&Array.from(r).some((t=>t!==e))}add(t,e){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}}var Wo=!1;try{if(2!==Array.from([1],(t=>2*t))[0]){var Go=document.createElement("iframe");document.body.appendChild(Go),Array.from=(null==(n=Go.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(Go)}}catch(t){console.debug("Unable to override Array.from",t)}var Ho=A();function zo(t){void 0===t&&(t={});var{emit:e,checkoutEveryNms:i,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:h=null,maskTextClass:u="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,maskAllInputs:f,maskInputOptions:d,slimDOMOptions:v,maskInputFn:p,maskTextFn:m,hooks:y,packFn:g,sampling:w={},dataURLOptions:b={},mousemoveWait:S,recordDOM:k=!0,recordCanvas:C=!1,recordCrossOriginIframes:M=!1,recordAfter:I=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:x=!1,collectFonts:R=!1,inlineImages:E=!1,plugins:A,keepIframeSrcFn:O=(()=>!1),ignoreCSSAttributes:D=new Set([]),errorHandler:N}=t;qs=N;var L=r({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},b),B=!M||window.parent===window,_=!1;if(!B)try{window.parent.document&&(_=!1)}catch(t){_=!0}if(B&&!e)throw new Error("emit function is required");if(!B&&!_)return()=>{};void 0!==S&&void 0===w.mousemove&&(w.mousemove=S),Ho.reset();var F,P=!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==d?d:{password:!0},j=vt(void 0!==v&&v);ks();var U,W,G=0,H=new Map,z=t=>{for(var e of A||[])e.eventProcessor&&(t=e.eventProcessor(t));return g&&!_&&(t=g(t)),t};Do=(t,r)=>{var s,o=t;if(o.timestamp=fs(),!(null==(s=ro[0])?void 0:s.isFrozen())||o.type===Ps.FullSnapshot||o.type===Ps.IncrementalSnapshot&&o.data.source===js.Mutation||ro.forEach((t=>t.unfreeze())),B)null==e||e(z(o),r);else if(_){var a={type:"rrweb",event:z(o),origin:window.location.origin,isCheckout:r};window.parent.postMessage(a,"*")}if(o.type===Ps.FullSnapshot)F=o,G=0;else if(o.type===Ps.IncrementalSnapshot){if(o.data.source===js.Mutation&&o.data.isAttachIframe)return;G++,(n&&G>=n||i&&o.timestamp-F.timestamp>i)&&No(!0)}};var V=t=>{if(t.removes&&t.removes.length>0){var e=t.adds.length>0?new Set(t.adds.map((t=>t.node.id))):null,i=new Set;if(t.adds.length>0)for(var n of t.adds){var s=Ho.getNode(n.node.id);s&&"IFRAME"===s.nodeName&&i.add(s)}t.removes.forEach((t=>{var{id:r}=t;if(!e||!e.has(r)){var n=J.getIframeElementById(r);n&&i.has(n)?J.forgetIframeId(r):(null==U||U(r),J.removeIframeById(r))}})),null==W||W(),J.cleanupDetachedIframes()}Do({type:Ps.IncrementalSnapshot,data:r({source:js.Mutation},t)})},Y=t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.Scroll},t)}),q=t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.CanvasMutation},t)}),Z=new jo({mutationCb:V,adoptedStyleSheetCb:t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.AdoptedStyleSheet},t)})}),J=new yo({mirror:Ho,mutationCb:V,stylesheetManager:Z,recordCrossOriginIframes:M,wrappedEmit:Do});for(var X of A||[])X.getMirror&&X.getMirror({nodeMirror:Ho,crossOriginIframeMirror:J.crossOriginIframeMirror,crossOriginIframeStyleMirror:J.crossOriginIframeStyleMirror});var Q=new Uo;Lo=new Po({recordCanvas:C,mutationCb:q,win:window,blockClass:s,blockSelector:o,mirror:Ho,sampling:w.canvas,dataURLOptions:L});var K=new go({mutationCb:V,scrollCb:Y,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskInputOptions:P,dataURLOptions:L,maskTextFn:m,maskInputFn:p,recordCanvas:C,inlineImages:E,sampling:w,slimDOMOptions:j,iframeManager:J,stylesheetManager:Z,canvasManager:Lo,keepIframeSrcFn:O,processedNodeManager:Q},mirror:Ho});No=function(t){if(void 0===t&&(t=!1),k){Do({type:Ps.Meta,data:{href:window.location.href,width:ps(),height:vs()}},t),Z.reset(),K.init(),ro.forEach((t=>t.lock()));var e=function(t,e){var{mirror:r=new T,blockClass:i="rr-block",blockSelector:n=null,maskTextClass:s="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:h=!1,recordCanvas:u=!1,maskAllInputs:l=!1,maskTextFn:c,maskInputFn:f,slimDOM:d=!1,dataURLOptions:v,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:y,iframeLoadTimeout:g,onIframeListenerRegistered:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:k=(()=>!1),maxDepth:C}=e||{};return dt(t,{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===l?{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===l?{password:!0}:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:vt(d),dataURLOptions:v,inlineImages:h,recordCanvas:u,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:y,iframeLoadTimeout:g,onIframeListenerRegistered:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:k,newlyAddedElement:!1,maxDepth:C})}(document,{mirror:Ho,blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskAllInputs:P,maskTextFn:m,maskInputFn:p,slimDOM:j,dataURLOptions:L,recordCanvas:C,inlineImages:E,onSerialize(t){Is(t,Ho)&&J.addIframe(t),xs(t,Ho)&&Z.trackLinkElement(t),Es(t)&&K.addShadowRoot(ss.shadowRoot(t),document)},onIframeLoad(t,e){J.attachIframe(t,e),K.observeAttachShadow(t)},onIframeListenerRegistered(t,e){J.registerLoadListenerDisposer(t,e)},onStylesheetLoad(t,e){Z.attachLinkElement(t,e)},keepIframeSrcFn:O});if(!e)return console.warn("Failed to snapshot the document");Do({type:Ps.FullSnapshot,data:{node:e,initialOffset:ds(window)}},t),ro.forEach((t=>t.unlock())),M&&J.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Z.adoptStyleSheets(document.adoptedStyleSheets,Ho.getId(document))}};try{var tt=[];U=t=>{var e=H.get(t);e&&(e.forEach((t=>{as(t);var e=tt.indexOf(t);-1!==e&&tt.splice(e,1)})),H.delete(t))},W=()=>{for(var[t]of H){var e=Ho.getNode(t);if(e)try{e.contentDocument&&e.contentDocument.defaultView||null==U||U(t)}catch(e){null==U||U(t)}else null==U||U(t)}};var et=t=>{var e;return eo(fo)({mutationCb:V,mousemoveCb:(t,e)=>Do({type:Ps.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.MouseInteraction},t)}),scrollCb:Y,viewportResizeCb:t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.ViewportResize},t)}),inputCb:t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.Input},t)}),mediaInteractionCb:t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.MediaInteraction},t)}),styleSheetRuleCb:t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.StyleSheetRule},t)}),styleDeclarationCb:t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.StyleDeclaration},t)}),canvasMutationCb:q,fontCb:t=>Do({type:Ps.IncrementalSnapshot,data:r({source:js.Font},t)}),selectionCb(t){Do({type:Ps.IncrementalSnapshot,data:r({source:js.Selection},t)})},customElementCb(t){Do({type:Ps.IncrementalSnapshot,data:r({source:js.CustomElement},t)})},blockClass:s,ignoreClass:a,ignoreSelector:h,maskTextClass:u,maskTextSelector:l,maskInputOptions:P,inlineStylesheet:c,sampling:w,recordDOM:k,recordCanvas:C,inlineImages:E,userTriggeredOnInput:x,collectFonts:R,doc:t,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:O,blockSelector:o,slimDOMOptions:j,dataURLOptions:L,mirror:Ho,iframeManager:J,stylesheetManager:Z,shadowDomManager:K,processedNodeManager:Q,canvasManager:Lo,ignoreCSSAttributes:D,plugins:(null==(e=null==A?void 0:A.filter((t=>t.observer)))?void 0:e.map((t=>({observer:t.observer,options:t.options,callback:e=>Do({type:Ps.Plugin,data:{plugin:t.name,payload:e}})}))))||[]},y)};J.addLoadListener((t=>{try{var e=Ho.getId(t),r=et(t.contentDocument);if(tt.push(r),-1!==e){var i=H.get(e);i||H.set(e,i=new Set),i.add(r)}}catch(t){console.warn(t)}})),J.addPageHideListener((t=>{var e=Ho.getId(t);null==U||U(e),oo(t)}));var rt=()=>{No(),tt.push(et(document)),Wo=!0};return["interactive","complete"].includes(document.readyState)?rt():(tt.push(os("DOMContentLoaded",(()=>{Do({type:Ps.DomContentLoaded,data:{}}),"DOMContentLoaded"===I&&rt()}))),tt.push(os("load",(()=>{Do({type:Ps.Load,data:{}}),"load"===I&&rt()}),window))),()=>{tt.forEach((t=>as(t))),Q.destroy(),J.removeLoadListener(),J.destroy(),H.clear(),Ho.reset(),Wo=!1,qs=void 0}}catch(t){console.warn(t)}}function Vo(t){return{all:t=t||new Map,on(e,r){var i=t.get(e);i?i.push(r):t.set(e,[r])},off(e,r){var i=t.get(e);i&&(r?i.splice(i.indexOf(r)>>>0,1):t.set(e,[]))},emit(e,r){var i=t.get(e);i&&i.slice().map((function(t){t(r)})),(i=t.get("*"))&&i.slice().map((function(t){t(e,r)}))}}}zo.addCustomEvent=(t,e)=>{if(!Wo)throw new Error("please add custom event after start recording");Do({type:Ps.Custom,data:{tag:t,payload:e}})},zo.freezePage=()=>{ro.forEach((t=>t.freeze()))},zo.takeFullSnapshot=t=>{if(!Wo)throw new Error("please take full snapshot after start recording");No(t)},zo.mirror=Ho;var Yo,$o,qo=Object.freeze(Object.defineProperty({__proto__:null,default:Vo},Symbol.toStringTag,{value:"Module"}));function Zo(t,e){if(void 0===t&&(t=window),void 0===e&&(e=document),!("scrollBehavior"in e.documentElement.style)||!0===t.__forceSmoothScrollPolyfill__){var r,i=t.HTMLElement||t.Element,n=468,s={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:i.prototype.scroll||h,scrollIntoView:i.prototype.scrollIntoView},o=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,a=(r=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==u(arguments[0])?v.call(t,e.body,void 0!==arguments[0].left?~~arguments[0].left:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:t.scrollY||t.pageYOffset):s.scroll.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:t.scrollY||t.pageYOffset))},t.scrollBy=function(){void 0!==arguments[0]&&(u(arguments[0])?s.scrollBy.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):v.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==u(arguments[0])){var t=arguments[0].left,e=arguments[0].top;v.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");s.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},i.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==u(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):s.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},i.prototype.scrollIntoView=function(){if(!0!==u(arguments[0])){var r=function(t){for(;t!==e.body&&!1===f(t);)t=t.parentNode||t.host;return t}(this),i=r.getBoundingClientRect(),n=this.getBoundingClientRect();r!==e.body?(v.call(this,r,r.scrollLeft+n.left-i.left,r.scrollTop+n.top-i.top),"fixed"!==t.getComputedStyle(r).position&&t.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):t.scrollBy({left:n.left,top:n.top,behavior:"smooth"})}else s.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function h(t,e){this.scrollLeft=t,this.scrollTop=e}function u(t){if(null===t||"object"!=typeof t||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;if("object"==typeof t&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function l(t,e){return"Y"===e?t.scrollHeight>t.clientHeight+a:"X"===e?t.scrollWidth>t.clientWidth+a:void 0}function c(e,r){var i=t.getComputedStyle(e,null)["overflow"+r];return"auto"===i||"scroll"===i}function f(t){var e=l(t,"Y")&&c(t,"Y"),r=l(t,"X")&&c(t,"X");return e||r}function d(e){var r,i,s,a=(o()-e.startTime)/n;a=a>1?1:a,r=.5*(1-Math.cos(Math.PI*a)),e.method.call(e.scrollable,i=e.startX+(e.x-e.startX)*r,s=e.startY+(e.y-e.startY)*r),i===e.x&&s===e.y||t.requestAnimationFrame(d.bind(t,e))}function v(r,i,n){var a,u,l,c,f=o();r===e.body?(a=t,u=t.scrollX||t.pageXOffset,l=t.scrollY||t.pageYOffset,c=s.scroll):(a=r,u=r.scrollLeft,l=r.scrollTop,c=h),d({scrollable:a,method:c,startTime:f,startX:u,startY:l,x:i,y:n})}}class Jo{constructor(t,e){void 0===t&&(t=[]),c(this,"timeOffset",0),c(this,"speed"),c(this,"actions"),c(this,"raf",null),c(this,"lastTimestamp"),this.actions=t,this.speed=e.speed}addAction(t){var e=!0===this.raf;if(this.actions.length&&this.actions[this.actions.length-1].delay>t.delay){var r=this.findActionIndex(t);this.actions.splice(r,0,t)}else this.actions.push(t);e&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){var t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){var e=this.actions[0];if(e.delay>this.timeOffset)break;this.actions.shift(),e.doAction()}this.raf=0>=this.actions.length||requestAnimationFrame(this.rafCheck.bind(this))}clear(){this.raf&&(!0!==this.raf&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return null!==this.raf}findActionIndex(t){for(var e=0,r=this.actions.length-1;r>=e;){var i=Math.floor((e+r)/2);if(t.delay>this.actions[i].delay)e=i+1;else{if(t.delay>=this.actions[i].delay)return i+1;r=i-1}}return e}}function Xo(t,e){if(t.type===Ps.IncrementalSnapshot&&t.data.source===js.MouseMove&&t.data.positions&&t.data.positions.length){var r=t.timestamp+t.data.positions[0].timeOffset;return t.delay=r-e,r-e}return t.delay=t.timestamp-e,t.delay}function Qo(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,n,s=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(i=s.next()).done;)o.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o}($o=Yo||(Yo={}))[$o.NotStarted=0]="NotStarted",$o[$o.Running=1]="Running",$o[$o.Stopped=2]="Stopped";var Ko={type:"xstate.init"};function ta(t){return void 0===t?[]:[].concat(t)}function ea(t){return{type:"xstate.assign",assignment:t}}function ra(t,e){return"string"==typeof(t="string"==typeof t&&e&&e[t]?e[t]:t)?{type:t}:"function"==typeof t?{type:t.name,exec:t}:t}function ia(t){return function(e){return t===e}}function na(t){return"string"==typeof t?{type:t}:t}function sa(t,e){return{value:t,context:e,actions:[],changed:!1,matches:ia(t)}}function oa(t,e,r){var i=e,n=!1;return[t.filter((function(t){if("xstate.assign"===t.type){n=!0;var e=Object.assign({},i);return"function"==typeof t.assignment?e=t.assignment(i,r):Object.keys(t.assignment).forEach((function(n){e[n]="function"==typeof t.assignment[n]?t.assignment[n](i,r):t.assignment[n]})),i=e,!1}return!0})),i,n]}function aa(t,e){void 0===e&&(e={});var r=Qo(oa(ta(t.states[t.initial].entry).map((function(t){return ra(t,e.actions)})),t.context,Ko),2),i={config:t,Tu:e,initialState:{value:t.initial,actions:r[0],context:r[1],matches:ia(t.initial)},transition(e,r){var n,s,o="string"==typeof e?{value:e,context:t.context}:e,a=o.value,h=o.context,u=na(r),l=t.states[a];if(l.on){var c=ta(l.on[u.type]);try{for(var f=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:()=>(t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t})}}(c),d=f.next();!d.done;d=f.next()){var v=d.value;if(void 0===v)return sa(a,h);var p="string"==typeof v?{target:v}:v,m=p.target,y=void 0===m?a:m,g=p.actions,w=void 0===g?[]:g,b=p.cond;if((void 0===b?function(){return!0}:b)(h,u)){var S=Qo(oa([].concat(l.exit,w,t.states[y].entry).filter((function(t){return t})).map((function(t){return ra(t,i.Tu.actions)})),h,u),3),k=S[0];return{value:y,context:S[1],actions:k,changed:y!==a||k.length>0||S[2],matches:ia(y)}}}}catch(t){n={error:t}}finally{try{d&&!d.done&&(s=f.return)&&s.call(f)}finally{if(n)throw n.error}}}return sa(a,h)}};return i}var ha=function(t,e){return t.actions.forEach((function(r){var i=r.exec;return i&&i(t.context,e)}))};function ua(t){var e=t.initialState,r=Yo.NotStarted,i=new Set,n={Oc:t,send(n){r===Yo.Running&&(e=t.transition(e,n),ha(e,na(n)),i.forEach((function(t){return t(e)})))},subscribe:t=>(i.add(t),t(e),{unsubscribe:()=>i.delete(t)}),start(i){if(i){var s="object"==typeof i?i:{context:t.config.context,value:i};e={value:s.value,actions:[],context:s.context,matches:ia(s.value)}}return r=Yo.Running,ha(e,Ko),n},stop:()=>(r=Yo.Stopped,i.clear(),n),get state(){return e},get status(){return r}};return n}var la=new Map;function ca(t,e){var r=la.get(t);return r||la.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}function fa(t,r,i){return function(){var n=e((function*(e){if(e&&"object"==typeof e&&"rr_type"in e){if(i&&(i.isUnchanged=!1),"ImageBitmap"===e.rr_type&&"args"in e){var n=yield fa(t,r,i)(e.args);return yield createImageBitmap.apply(null,n)}if("index"in e){if(i||null===r)return e;var{rr_type:s,index:o}=e;return ca(r,s)[o]}if("args"in e){var{rr_type:a,args:h}=e;return new(0,window[a])(...yield Promise.all(h.map(fa(t,r,i))))}if("base64"in e)return ko(e.base64);if("src"in e){var u=t.get(e.src);if(u)return u;var l=new Image;return l.src=e.src,t.set(e.src,l),l}if("data"in e&&"Blob"===e.rr_type){var c=yield Promise.all(e.data.map(fa(t,r,i)));return new Blob(c,{type:e.type})}}else if(Array.isArray(e))return yield Promise.all(e.map(fa(t,r,i)));return e}));return function(t){return n.apply(this,arguments)}}()}var da=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function va(t){return pa.apply(this,arguments)}function pa(){return(pa=e((function*(t){var{mutation:e,target:r,type:i,imageMap:n,errorHandler:s}=t;try{var o=function(t,e){try{return e===Gs.WebGL?t.getContext("webgl")||t.getContext("experimental-webgl"):t.getContext("webgl2")}catch(t){return null}}(r,i);if(!o)return;if(e.setter)return void(o[e.property]=e.args[0]);var a=o[e.property],h=yield Promise.all(e.args.map(fa(n,o)));!function(t,e){if(null==e?void 0:e.constructor){var{name:r}=e.constructor;if(da.includes(r)){var i=ca(t,r);i.includes(e)||i.push(e)}}}(o,a.apply(o,h))}catch(t){s(e,t)}}))).apply(this,arguments)}function ma(){return ma=e((function*(t){var{event:r,mutations:i,target:n,imageMap:s,errorHandler:o}=t,a=n.getContext("2d");if(a){var h=i.map(function(){var t=e((function*(t){return Promise.all(t.args.map(fa(s,a)))}));return function(e){return t.apply(this,arguments)}}());(yield Promise.all(h)).forEach(((t,e)=>{var n=i[e];try{if(n.setter)return void(a[n.property]=n.args[0]);var h=a[n.property];"drawImage"===n.property&&"string"==typeof n.args[0]?(s.get(r),h.apply(a,n.args)):h.apply(a,t)}catch(t){o(n,t)}}))}else o(i[0],new Error("Canvas context is null"))})),ma.apply(this,arguments)}function ya(t){return ga.apply(this,arguments)}function ga(){return ga=e((function*(t){var{event:e,mutation:r,target:i,imageMap:n,canvasEventMap:s,errorHandler:o}=t;try{var a=s.get(e)||r,h="commands"in a?a.commands:[a];if([Gs.WebGL,Gs.WebGL2].includes(r.type)){for(var u=0;h.length>u;u++){var l=h[u];yield va({mutation:l,type:r.type,target:i,imageMap:n,errorHandler:o})}return}yield function(t){return ma.apply(this,arguments)}({event:e,mutations:h,target:i,imageMap:n,errorHandler:o})}catch(t){o(r,t)}})),ga.apply(this,arguments)}var wa=["AUDIO","VIDEO"];class ba{constructor(t){c(this,"mediaMap",new Map),c(this,"warn"),c(this,"service"),c(this,"speedService"),c(this,"emitter"),c(this,"getCurrentTime"),c(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(zs.Start,this.start.bind(this)),this.emitter.on(zs.SkipStart,this.start.bind(this)),this.emitter.on(zs.Pause,this.pause.bind(this)),this.emitter.on(zs.Finish,this.pause.bind(this)),this.speedService.subscribe((()=>{this.syncAllMediaElements()}))}syncAllMediaElements(t){void 0===t&&(t={pause:!1}),this.mediaMap.forEach(((e,r)=>{this.syncTargetWithState(r),t.pause&&r.pause()}))}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo(t){var{time:e,target:r,mediaState:i}=t;if(i.isPlaying){var n=(e-i.lastInteractionTimeOffset)/1e3*i.playbackRate,s="duration"in r&&r.duration;if(Number.isNaN(s))return void this.waitForMetadata(r);var o=i.currentTimeAtLastInteraction+n;r.loop&&!1!==s&&(o%=s),r.currentTime=o}else r.pause(),r.currentTime=i.currentTimeAtLastInteraction}waitForMetadata(t){if(!this.metadataCallbackMap.has(t)&&"addEventListener"in t){var e=()=>{this.metadataCallbackMap.delete(t);var e=this.mediaMap.get(t);e&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:e})};this.metadataCallbackMap.set(t,e),t.addEventListener("loadedmetadata",e,{once:!0})}}getMediaStateFromMutation(t){var e,r,i,n,s,{target:o,timeOffset:a,mutation:h}=t,u=this.mediaMap.get(o),{type:l,playbackRate:c,currentTime:f,muted:d,volume:v,loop:p}=h;return{isPlaying:l===Hs.Play||l!==Hs.Pause&&((null==u?void 0:u.isPlaying)||null!==o.getAttribute("autoplay")),currentTimeAtLastInteraction:null!==(e=null!=f?f:null==u?void 0:u.currentTimeAtLastInteraction)&&void 0!==e?e:0,lastInteractionTimeOffset:a,playbackRate:null!==(r=null!=c?c:null==u?void 0:u.playbackRate)&&void 0!==r?r:1,volume:null!==(i=null!=v?v:null==u?void 0:u.volume)&&void 0!==i?i:1,muted:null!==(n=null!=d?d:null==u?void 0:u.muted)&&void 0!==n?n:null===o.getAttribute("muted"),loop:null!==(s=null!=p?p:null==u?void 0:u.loop)&&void 0!==s?s:null===o.getAttribute("loop")}}syncTargetWithState(t){var e=this.mediaMap.get(t);if(e){var{muted:r,loop:i,volume:n,isPlaying:s}=e,o=this.service.state.matches("paused"),a=e.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:e}),t.volume!==n&&(t.volume=n),t.muted=r,t.loop=i,t.playbackRate!==a&&(t.playbackRate=a),s&&!o?t.play():t.pause()}catch(t){this.warn("Failed to replay media interactions: "+(t.message||t))}}}addMediaElements(t,e,r){if(this.isSupportedMediaElement(t)){var i=t,n=r.getMeta(i);if(n&&"attributes"in n){var s,o=this.service.state.matches("paused"),a=n.attributes;(s=a.rr_mediaState?"played"===a.rr_mediaState:null!==i.getAttribute("autoplay"))&&o&&i.pause();var h=1;"number"==typeof a.rr_mediaPlaybackRate&&(h=a.rr_mediaPlaybackRate);var u;u="boolean"==typeof a.rr_mediaMuted?a.rr_mediaMuted:null!==i.getAttribute("muted");var l;l="boolean"==typeof a.rr_mediaLoop?a.rr_mediaLoop:null!==i.getAttribute("loop");var c=1;"number"==typeof a.rr_mediaVolume&&(c=a.rr_mediaVolume);var f=0;"number"==typeof a.rr_mediaCurrentTime&&(f=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:s,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:e,playbackRate:h,volume:c,muted:u,loop:l}),this.syncTargetWithState(i)}}}mediaMutation(t){var{target:e,timeOffset:r,mutation:i}=t;wa.includes(e.nodeName)&&(this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:r,mutation:i})),this.syncTargetWithState(e))}isSupportedMediaElement(t){return wa.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function Sa(t,e){if(!("DIALOG"!==t.nodeName||t instanceof dn)){var r=t,i=r.open,n=i&&r.matches("dialog:modal"),s=r.getAttribute("rr_open_mode"),o="string"==typeof(null==e?void 0:e.attributes.open)||"string"==typeof r.getAttribute("open"),a="modal"===s;i&&!(n&&"non-modal"===s||!n&&a)||(r.isConnected?(i&&r.close(),o&&(a?r.showModal():r.show())):console.warn("dialog is not attached to the dom",r))}}var ka=Vo||qo,Ca="[replayer]",Ma={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Ia(t){return t.type==Ps.IncrementalSnapshot&&(t.data.source==js.TouchMove||t.data.source==js.MouseInteraction&&t.data.type==Us.TouchStart)}class xa{constructor(t,e){var i=this;if(c(this,"wrapper"),c(this,"iframe"),c(this,"service"),c(this,"speedService"),c(this,"config"),c(this,"usingVirtualDom",!1),c(this,"virtualDom",new Bn),c(this,"mouse"),c(this,"mouseTail",null),c(this,"tailPositions",[]),c(this,"emitter",ka()),c(this,"nextUserInteractionEvent"),c(this,"legacy_missingNodeRetryMap",{}),c(this,"cache",sr()),c(this,"imageMap",new Map),c(this,"canvasEventMap",new Map),c(this,"mirror",A()),c(this,"styleMirror",new Ds),c(this,"mediaManager"),c(this,"firstFullSnapshot",null),c(this,"newDocumentQueue",[]),c(this,"mousePos",null),c(this,"touchActive",null),c(this,"lastMouseDownEvent",null),c(this,"lastHoveredRootNode"),c(this,"lastSelectionData",null),c(this,"lastScrollMap",new Map),c(this,"constructedStyleMutations",[]),c(this,"adoptedStyleSheets",[]),c(this,"emitterHandlers",[]),c(this,"serviceSubscription"),c(this,"speedServiceSubscription"),c(this,"timeouts",new Set),c(this,"styleSheetLoadListeners",new Map),c(this,"handleResize",(t=>{for(var e of(this.iframe.style.display="inherit",[this.mouseTail,this.iframe]))e&&(e.setAttribute("width",String(t.width)),e.setAttribute("height",String(t.height)))})),c(this,"applyEventsSynchronously",(t=>{for(var e of t){switch(e.type){case Ps.DomContentLoaded:case Ps.Load:case Ps.Custom:continue}this.getCastFn(e,!0)()}})),c(this,"getCastFn",(function(t,e){var n;switch(void 0===e&&(e=!1),t.type){case Ps.DomContentLoaded:case Ps.Load:break;case Ps.Custom:n=()=>{i.emitter.emit(zs.CustomEvent,t)};break;case Ps.Meta:n=()=>i.emitter.emit(zs.Resize,{width:t.data.width,height:t.data.height});break;case Ps.FullSnapshot:n=()=>{var n;if(i.firstFullSnapshot){if(i.firstFullSnapshot===t)return void(i.firstFullSnapshot=!0)}else i.firstFullSnapshot=!0;i.mediaManager.reset(),i.styleMirror.reset(),i.rebuildFullSnapshot(t,e),null==(n=i.iframe.contentWindow)||n.scrollTo(r({},t.data.initialOffset,{behavior:"instant"}))};break;case Ps.IncrementalSnapshot:n=()=>{if(i.applyIncremental(t,e),!e&&(t===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.backToNormal()),i.config.skipInactive&&!i.nextUserInteractionEvent)){for(var r of i.service.state.context.events)if(r.timestamp>t.timestamp&&i.isUserInteraction(r)){r.delay-t.delay>i.config.inactivePeriodThreshold*i.speedService.state.context.timer.speed&&(i.nextUserInteractionEvent=r);break}if(i.nextUserInteractionEvent){var n={speed:Math.min(Math.round((i.nextUserInteractionEvent.delay-t.delay)/5e3),i.config.maxSpeed)};i.speedService.send({type:"FAST_FORWARD",payload:n}),i.emitter.emit(zs.SkipStart,n)}}}}return()=>{for(var r of(n&&n(),i.config.plugins||[]))r.handler&&r.handler(t,e,{replayer:i});i.service.send({type:"CAST_EVENT",payload:{event:t}});var s=i.service.state.context.events.length-1;if(!i.config.liveMode&&t===i.service.state.context.events[s]){var o=50;t.type===Ps.IncrementalSnapshot&&t.data.source===js.MouseMove&&t.data.positions.length&&(o+=Math.max(0,-t.data.positions[0].timeOffset)),setTimeout((()=>{i.service.state.context.events.length-1>s||(i.backToNormal(),i.service.send("END"),i.emitter.emit(zs.Finish))}),o)}i.emitter.emit(zs.EventCast,t)}})),!(null==e?void 0:e.liveMode)&&2>t.length)throw new Error("Replayer need at least 2 events.");var n={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:1e4,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Ma,useVirtualDom:!0,logger:console};for(var s of(this.config=Object.assign({},n,e),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.addEmitterHandler(zs.Resize,this.handleResize),this.setupDom(),this.config.plugins||[]))s.getMirror&&s.getMirror({nodeMirror:this.mirror});this.addEmitterHandler(zs.Flush,(()=>{if(this.usingVirtualDom){var t={mirror:this.mirror,applyCanvas:(t,e,r)=>{ya({event:t,mutation:e,target:r,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(t,e)=>{t.source===js.StyleSheetRule?this.applyStyleSheetRule(t,e):t.source===js.StyleDeclaration&&this.applyStyleDeclaration(t,e)},afterAppend:(t,e)=>{for(var r of this.config.plugins||[])r.onBuild&&r.onBuild(t,{id:e,replayer:this})}};if(this.iframe.contentDocument)try{An(this.iframe.contentDocument,this.virtualDom,t,this.virtualDom.mirror)}catch(t){this.warn(t)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(var e in this.legacy_missingNodeRetryMap)try{var r=this.legacy_missingNodeRetryMap[e],i=Dn(r.node,this.mirror,this.virtualDom.mirror);An(i,r.node,t,this.virtualDom.mirror),r.node=i}catch(t){this.warn(t)}this.constructedStyleMutations.forEach((t=>{this.applyStyleSheetMutation(t)})),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach((t=>{this.applyAdoptedStyleSheet(t)})),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){var[n,s]=this.lastMouseDownEvent;n.dispatchEvent(s)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null),this.lastScrollMap.size&&(this.lastScrollMap.forEach((t=>{this.applyScroll(t,!0)})),this.lastScrollMap.clear())})),this.addEmitterHandler(zs.PlayBack,(()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.lastScrollMap.clear()}));var o=new Jo([],{speed:this.config.speed});this.service=function(t,e){var{getCastFn:i,applyEventsSynchronously:n,emitter:s}=e;return ua(aa({id:"player",context:t,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:ea({lastPlayedEvent(t,e){return"CAST_EVENT"===e.type?e.payload.event:t.lastPlayedEvent}}),recordTimeOffset:ea(((t,e)=>{var i=t.timeOffset;return"payload"in e&&"timeOffset"in e.payload&&(i=e.payload.timeOffset),r({},t,{timeOffset:i,baselineTime:t.events[0].timestamp+i})})),play(t){var e,{timer:r,events:o,baselineTime:a,lastPlayedEvent:h}=t;for(var u of(r.clear(),o))Xo(u,a);var l=function(t,e){for(var r=t.length-1;r>=0;r--){var i=t[r];if(i.type===Ps.Meta&&e>=i.timestamp)return t.slice(r)}return t}(o,a),c=null==h?void 0:h.timestamp;(null==h?void 0:h.type)===Ps.IncrementalSnapshot&&h.data.source===js.MouseMove&&(c=h.timestamp+(null==(e=h.data.positions[0])?void 0:e.timeOffset)),(c||0)>a&&s.emit(zs.PlayBack);var f=new Array,d=function(){if(c&&a>c&&(c>=v.timestamp||v===h))return 1;if(a>v.timestamp)f.push(v);else{var t=i(v,!1);r.addAction({doAction(){t()},delay:v.delay})}};for(var v of l)d();n(f),s.emit(zs.Flush),r.start()},pause(t){t.timer.clear()},resetLastPlayedEvent:ea((t=>r({},t,{lastPlayedEvent:null}))),startLive:ea({baselineTime(t,e){return t.timer.start(),"TO_LIVE"===e.type&&e.payload.baselineTime?e.payload.baselineTime:Date.now()}}),addEvent:ea(((t,e)=>{var{baselineTime:n,timer:s,events:o}=t;if("ADD_EVENT"===e.type){var{event:a}=e.payload;Xo(a,n);var h=o.length-1;if(o[h]&&o[h].timestamp>a.timestamp){for(var u=-1,l=0;h>=l;){var c=Math.floor((l+h)/2);o[c].timestamp>a.timestamp?h=c-1:l=c+1}-1===u&&(u=l),o.splice(u,0,a)}else o.push(a);if(n>a.timestamp)e.payload.applyPastEventSynchronously&&i(a,!0)();else if(s.isActive()){var f=i(a,!1);s.addAction({doAction(){f()},delay:a.delay})}}return r({},t,{events:o})}))}}))}({events:t.map((t=>e&&e.unpackFn?e.unpackFn(t):t)).sort(((t,e)=>t.timestamp-e.timestamp)),timer:o,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.serviceSubscription=this.service.subscribe((t=>{this.emitter.emit(zs.StateChange,{player:t})})),this.speedService=ua(aa({id:"speed",context:{normalSpeed:-1,timer:o},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed(t,e){"payload"in e&&t.timer.setSpeed(e.payload.speed)},recordSpeed:ea({normalSpeed:t=>t.timer.speed}),restoreSpeed(t){t.timer.setSpeed(t.normalSpeed)}}})),this.speedService.start(),this.speedServiceSubscription=this.speedService.subscribe((t=>{this.emitter.emit(zs.StateChange,{speed:t})})),this.mediaManager=new ba({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});var a=this.service.state.context.events.find((t=>t.type===Ps.Meta)),h=this.service.state.context.events.find((t=>t.type===Ps.FullSnapshot));if(a){var{width:u,height:l}=a.data;this.addTimeout((()=>{this.emitter.emit(zs.Resize,{width:u,height:l})}),0)}h&&this.addTimeout((()=>{var t;this.firstFullSnapshot||(this.firstFullSnapshot=h,this.rebuildFullSnapshot(h),null==(t=this.iframe.contentWindow)||t.scrollTo(r({},h.data.initialOffset,{behavior:"instant"})))}),1),this.service.state.context.events.find(Ia)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,e){return this.emitter.on(t,e),this}off(t,e){return this.emitter.off(t,e),this}addEmitterHandler(t,e){this.emitter.on(t,e),this.emitterHandlers.push({event:t,handler:e})}addTimeout(t,e){var r=setTimeout((()=>{this.timeouts.delete(r),t()}),e);return this.timeouts.add(r),r}setConfig(t){Object.keys(t).forEach((e=>{this.config[e]=t[e]})),this.config.skipInactive||this.backToNormal(),void 0!==t.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),void 0!==t.mouseTail&&(!1===t.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){var t=this.service.state.context.events[0],e=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:e.timestamp,totalTime:e.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){var{baselineTime:t,events:e}=this.service.state.context;return t-e[0].timestamp}getMirror(){return this.mirror}play(t){var e,r;void 0===t&&(t=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}}),null==(r=null==(e=this.iframe.contentDocument)?void 0:e.getElementsByTagName("html")[0])||r.classList.remove("rrweb-paused"),this.emitter.emit(zs.Start)}pause(t){var e,r;void 0===t&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof t&&(this.play(t),this.service.send({type:"PAUSE"})),null==(r=null==(e=this.iframe.contentDocument)?void 0:e.getElementsByTagName("html")[0])||r.classList.add("rrweb-paused"),this.emitter.emit(zs.Pause)}resume(t){void 0===t&&(t=0),this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(zs.Resume)}destroy(){var t,e;this.wrapper&&this.wrapper.parentNode&&(this.pause(),this.emitterHandlers.forEach((t=>{var{event:e,handler:r}=t;this.emitter.off(e,r)})),this.emitterHandlers=[],null==(t=this.serviceSubscription)||t.unsubscribe(),null==(e=this.speedServiceSubscription)||e.unsubscribe(),this.serviceSubscription=void 0,this.speedServiceSubscription=void 0,this.service.stop(),this.speedService.stop(),this.timeouts.forEach((t=>clearTimeout(t))),this.timeouts.clear(),this.styleSheetLoadListeners.forEach(((t,e)=>{e.removeEventListener("load",t)})),this.styleSheetLoadListeners.clear(),this.imageMap.clear(),this.canvasEventMap.clear(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.resetCache(),this.config.root.removeChild(this.wrapper),this.emitter.emit(zs.Destroy))}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){var e=this.config.unpackFn?this.config.unpackFn(t):t;Ia(e)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((()=>this.service.send({type:"ADD_EVENT",payload:{event:e,applyPastEventSynchronously:this.config.liveMode}})))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=sr()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Zo(this.iframe.contentWindow,this.iframe.contentDocument),ks(this.iframe.contentWindow))}rebuildFullSnapshot(t,e){var r=this;if(void 0===e&&(e=!1),!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};var i=[],n=new Set,s=(e,r)=>{if("DIALOG"===e.nodeName&&n.add(e),this.collectIframeAndAttachDocument(i,e),this.mediaManager.isSupportedMediaElement(e)){var{events:s}=this.service.state.context;this.mediaManager.addMediaElements(e,t.timestamp-s[0].timestamp,this.mirror)}for(var o of this.config.plugins||[])o.onBuild&&o.onBuild(e,{id:r,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),function(t,e){var{doc:r,onVisit:i,hackCss:n=!0,afterAppend:s,cache:o,mirror:a=new T}=e,h=hr(t,{doc:r,mirror:a,skipChild:!1,hackCss:n,afterAppend:s,cache:o});(function(t,e){for(var r of t.getIds())t.has(r)&&e(t.getNode(r))})(a,(t=>{i&&i(t),function(t,e){var r=e.getMeta(t);if((null==r?void 0:r.type)===v.Element){var i=t;for(var n in r.attributes)if({}.hasOwnProperty.call(r.attributes,n)&&n.startsWith("rr_")){var s=r.attributes[n];"rr_scrollLeft"===n&&(i.scrollLeft=s),"rr_scrollTop"===n&&(i.scrollTop=s)}}}(t,a)}))}(t.data.node,{doc:this.iframe.contentDocument,afterAppend:s,cache:this.cache,mirror:this.mirror}),s(this.iframe.contentDocument,t.data.node.id);var o=function(t){r.attachDocumentToIframe(t,h),r.newDocumentQueue=r.newDocumentQueue.filter((e=>e!==t))};for(var{mutationInQueue:a,builtNode:h}of i)o(a);var{documentElement:u,head:l}=this.iframe.contentDocument;this.insertStyleRules(u,l),n.forEach((t=>Sa(t))),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(zs.FullsnapshotRebuilded,t),e||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,e){var r,i,n=(i=this.config.blockClass,["."+i+" { background: currentColor }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&n.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){var s=this.virtualDom.createElement("style");this.virtualDom.mirror.add(s,qn(s,this.virtualDom.unserializedId)),t.insertBefore(s,e),s.rules.push({source:js.StyleSheetRule,adds:n.map(((t,e)=>({rule:t,index:e})))})}else{var o=document.createElement("style");t.insertBefore(o,e);for(var a=0;n.length>a;a++)null==(r=o.sheet)||r.insertRule(n[a],a)}}attachDocumentToIframe(t,e){var r=this,i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,n=[],s=new Set,o=(t,r)=>{"DIALOG"===t.nodeName&&s.add(t),this.collectIframeAndAttachDocument(n,t);var o=i.getMeta(t);if((null==o?void 0:o.type)===Vs.Element&&"HTML"===(null==o?void 0:o.tagName.toUpperCase())){var{documentElement:a,head:h}=e.contentDocument;this.insertStyleRules(a,h)}if(!this.usingVirtualDom)for(var u of this.config.plugins||[])u.onBuild&&u.onBuild(t,{id:r,replayer:this})};hr(t.node,{doc:e.contentDocument,mirror:i,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(e.contentDocument,t.node.id);var a=function(t){r.attachDocumentToIframe(t,u),r.newDocumentQueue=r.newDocumentQueue.filter((e=>e!==t))};for(var{mutationInQueue:h,builtNode:u}of n)a(h);s.forEach((t=>Sa(t)))}collectIframeAndAttachDocument(t,e){if(Is(e,this.mirror)){var r=this.newDocumentQueue.find((t=>t.parentId===this.mirror.getId(e)));r&&t.push({mutationInQueue:r,builtNode:e})}}waitForStylesheetLoad(){var t,e=null==(t=this.iframe.contentDocument)?void 0:t.head;if(e){var r,i=new Set,n=this.service.state,s=()=>{n=this.service.state};this.emitter.on(zs.Start,s),this.emitter.on(zs.Pause,s);var o=()=>{this.emitter.off(zs.Start,s),this.emitter.off(zs.Pause,s)};e.querySelectorAll('link[rel="stylesheet"]').forEach((t=>{t.sheet||(i.add(t),t.addEventListener("load",(()=>{i.delete(t),0===i.size&&-1!==r&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(zs.LoadStylesheetEnd),r&&clearTimeout(r),o())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(zs.LoadStylesheetStart),r=setTimeout((()=>{n.matches("playing")&&this.play(this.getCurrentTime()),r=-1,o()}),this.config.loadTimeout))}}preloadAllImages(){var t=this;return e((function*(){var e=[],r=function*(r){r.type===Ps.IncrementalSnapshot&&r.data.source===js.CanvasMutation&&(e.push(t.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach((e=>{t.preloadImages(e,r)})))};for(var i of t.service.state.context.events)yield*r(i);return Promise.all(e)}))()}preloadImages(t,e){if("drawImage"===t.property&&"string"==typeof t.args[0]&&!this.imageMap.has(e)){var r=document.createElement("canvas"),i=r.getContext("2d"),n=null==i?void 0:i.createImageData(r.width,r.height);null==i||i.putImageData(n,0,0)}}deserializeAndPreloadCanvasEvents(t,i){var n=this;return e((function*(){if(!n.canvasEventMap.has(i)){var s={isUnchanged:!0};if("commands"in t){var o=yield Promise.all(t.commands.map(function(){var t=e((function*(t){var e=yield Promise.all(t.args.map(fa(n.imageMap,null,s)));return r({},t,{args:e})}));return function(e){return t.apply(this,arguments)}}()));!1===s.isUnchanged&&n.canvasEventMap.set(i,r({},t,{commands:o}))}else{var a=yield Promise.all(t.args.map(fa(n.imageMap,null,s)));!1===s.isUnchanged&&n.canvasEventMap.set(i,r({},t,{args:a}))}}}))()}applyIncremental(t,e){var r,i,n,{data:s}=t;switch(s.source){case js.Mutation:try{this.applyMutation(s,e)}catch(t){this.warn("Exception in mutation "+(t.message||t),s)}break;case js.Drag:case js.TouchMove:case js.MouseMove:if(e){var o=s.positions[s.positions.length-1];this.mousePos={x:o.x,y:o.y,id:o.id,debugData:s}}else s.positions.forEach((r=>{this.timer.addAction({doAction:()=>{this.moveAndHover(r.x,r.y,r.id,e,s)},delay:r.timeOffset+t.timestamp-this.service.state.context.baselineTime})})),this.timer.addAction({doAction(){},delay:t.delay-(null==(r=s.positions[0])?void 0:r.timeOffset)});break;case js.MouseInteraction:if(-1===s.id)break;var a=new Event(D(Us[s.type])),h=this.mirror.getNode(s.id);if(!h)return this.debugNodeNotFound(s,s.id);this.emitter.emit(zs.MouseInteraction,{type:s.type,target:h});var{triggerFocus:u}=this.config;switch(s.type){case Us.Blur:"blur"in h&&h.blur();break;case Us.Focus:u&&h.focus&&h.focus({preventScroll:!0});break;case Us.Click:case Us.TouchStart:case Us.TouchEnd:case Us.MouseDown:case Us.MouseUp:e?(s.type===Us.TouchStart?this.touchActive=!0:s.type===Us.TouchEnd&&(this.touchActive=!1),s.type===Us.MouseDown?this.lastMouseDownEvent=[h,a]:s.type===Us.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:s.x||0,y:s.y||0,id:s.id,debugData:s}):(s.type===Us.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(s.x||0,s.y||0,s.id,e,s),s.type===Us.Click?(this.mouse.classList.remove("active"),this.mouse.classList.add("active")):s.type===Us.TouchStart?this.mouse.classList.add("touch-active"):s.type===Us.TouchEnd?this.mouse.classList.remove("touch-active"):h.dispatchEvent(a));break;case Us.TouchCancel:e?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:h.dispatchEvent(a)}break;case js.Scroll:if(-1===s.id)break;if(e&&this.lastScrollMap.set(s.id,s),this.usingVirtualDom){var l=this.virtualDom.mirror.getNode(s.id);if(!l)return this.debugNodeNotFound(s,s.id);l.scrollData=s;break}this.applyScroll(s,e);break;case js.ViewportResize:this.emitter.emit(zs.Resize,{width:s.width,height:s.height});break;case js.Input:if(-1===s.id)break;if(this.usingVirtualDom){var c=this.virtualDom.mirror.getNode(s.id);if(!c)return this.debugNodeNotFound(s,s.id);c.inputData=s;break}this.applyInput(s);break;case js.MediaInteraction:var f=this.usingVirtualDom?this.virtualDom.mirror.getNode(s.id):this.mirror.getNode(s.id);if(!f)return this.debugNodeNotFound(s,s.id);var d=f,{events:v}=this.service.state.context;this.mediaManager.mediaMutation({target:d,timeOffset:t.timestamp-v[0].timestamp,mutation:s});break;case js.StyleSheetRule:case js.StyleDeclaration:this.usingVirtualDom?s.styleId?this.constructedStyleMutations.push(s):s.id&&(null==(i=this.virtualDom.mirror.getNode(s.id))||i.rules.push(s)):this.applyStyleSheetMutation(s);break;case js.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){var p=this.virtualDom.mirror.getNode(s.id);if(!p)return this.debugNodeNotFound(s,s.id);p.canvasMutations.push({event:t,mutation:s})}else{var m=this.mirror.getNode(s.id);if(!m)return this.debugNodeNotFound(s,s.id);ya({event:t,mutation:s,target:m,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case js.Font:try{var y=new FontFace(s.family,s.buffer?new Uint8Array(JSON.parse(s.fontSource)):s.fontSource,s.descriptors);null==(n=this.iframe.contentDocument)||n.fonts.add(y)}catch(t){this.warn(t)}break;case js.Selection:if(e){this.lastSelectionData=s;break}this.applySelection(s);break;case js.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(s):this.applyAdoptedStyleSheet(s)}}applyMutation(t,e){var i,n,s,o=this;if(this.config.useVirtualDom&&!this.usingVirtualDom&&e&&(this.usingVirtualDom=!0,i=this.iframe.contentDocument,s=this.virtualDom,void 0===(n=this.mirror)&&(n=new kr),void 0===s&&(s=new Bn),function t(e,r){var i=Yn(e,s,n,r);if(null!==i)if("IFRAME"!==(null==r?void 0:r.nodeName)&&e.nodeType!==xn.DOCUMENT_FRAGMENT_NODE&&(null==r||r.appendChild(i),i.parentNode=r,i.parentElement=r),"IFRAME"===e.nodeName){var o=e.contentDocument;o&&t(o,i)}else e.nodeType!==xn.DOCUMENT_NODE&&e.nodeType!==xn.ELEMENT_NODE&&e.nodeType!==xn.DOCUMENT_FRAGMENT_NODE||(e.nodeType===xn.ELEMENT_NODE&&e.shadowRoot&&t(e.shadowRoot,i),e.childNodes.forEach((e=>t(e,i))))}(i,null),Object.keys(this.legacy_missingNodeRetryMap).length))for(var a in this.legacy_missingNodeRetryMap)try{var h=this.legacy_missingNodeRetryMap[a],u=Yn(h.node,this.virtualDom,this.mirror);u&&(h.node=u)}catch(t){this.warn(t)}var l=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes.filter((e=>!!l.getNode(e.id)||(this.warnNodeNotFound(t,e.id),!1))).forEach((e=>{var r,i=l.getNode(e.id);if(i){var n=l.getNode(e.parentId);if(!n)return this.warnNodeNotFound(t,e.parentId);if(e.isShadow&&Es(n)&&(n=n.shadowRoot),l.removeNodeFromMap(i),n)try{n.removeChild(i),this.usingVirtualDom&&"#text"===i.nodeName&&"STYLE"===n.nodeName&&(null==(r=n.rules)?void 0:r.length)>0&&(n.rules=[])}catch(e){if(!(e instanceof DOMException))throw e;this.warn("parent could not remove child in mutation",n,i,t)}}}));var c=r({},this.legacy_missingNodeRetryMap),f=[],d=e=>{var r,i;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");var n=l.getNode(e.parentId);if(!n)return e.node.type===Vs.Document?this.newDocumentQueue.push(e):t.adds.some((t=>t.node.id===e.parentId))?f.push(e):void 0;e.node.isShadow&&(Es(n)||n.attachShadow({mode:"open"}),n=n.shadowRoot);var s=null,o=null;if(e.previousId&&(s=l.getNode(e.previousId)),e.nextId&&(o=l.getNode(e.nextId)),!e.node.rootId||l.getNode(e.node.rootId)){var a=e.node.rootId?l.getNode(e.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Is(n,l))this.attachDocumentToIframe(e,n);else{var h=(t,e)=>{if(!this.usingVirtualDom)for(var r of(Sa(t),this.config.plugins||[]))r.onBuild&&r.onBuild(t,{id:e,replayer:this})},u=hr(e.node,{doc:a,mirror:l,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:h});if(-1!==e.previousId&&-1!==e.nextId){var d=l.getMeta(n);if(d&&d.type===Vs.Element&&e.node.type===Vs.Text){var v=Array.isArray(n.childNodes)?n.childNodes:Array.from(n.childNodes);if("textarea"===d.tagName)for(var p of v)p.nodeType===n.TEXT_NODE&&n.removeChild(p);else if("style"===d.tagName&&1===v.length)for(var m of v)m.nodeType!==n.TEXT_NODE||l.hasNode(m)||(u.textContent=m.textContent,n.removeChild(m))}else if((null==d?void 0:d.type)===Vs.Document){var y=n;e.node.type===Vs.DocumentType&&(null==(r=y.childNodes[0])?void 0:r.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),"HTML"===u.nodeName&&y.documentElement&&y.removeChild(y.documentElement)}if(s&&s.nextSibling&&s.nextSibling.parentNode?n.insertBefore(u,s.nextSibling):o&&o.parentNode?n.contains(o)?n.insertBefore(u,o):n.insertBefore(u,null):n.appendChild(u),h(u,e.node.id),this.usingVirtualDom&&"#text"===u.nodeName&&"STYLE"===n.nodeName&&(null==(i=n.rules)?void 0:i.length)>0&&(n.rules=[]),Is(u,this.mirror)){var g=this.mirror.getId(u),w=this.newDocumentQueue.find((t=>t.parentId===g));w&&(this.attachDocumentToIframe(w,u),this.newDocumentQueue=this.newDocumentQueue.filter((t=>t!==w)))}(e.previousId||e.nextId)&&this.legacy_resolveMissingNode(c,n,u,e)}else c[e.node.id]={node:u,mutation:e}}}};t.adds.forEach((t=>{d(t)}));for(var v=performance.now();f.length;){var p=Cs(f);if(f.length=0,performance.now()-v>150){this.warn("Timeout in the loop, please check the resolve tree data:",p);break}for(var m of p)l.getNode(m.value.parentId)?Ms(m,(t=>{d(t)})):this.debug("Drop resolve tree since there is no parent for the root node.",m)}Object.keys(c).length&&Object.assign(this.legacy_missingNodeRetryMap,c),Os(t.texts).forEach((e=>{var r,i=l.getNode(e.id);if(!i){if(t.removes.find((t=>t.id===e.id)))return;return this.warnNodeNotFound(t,e.id)}if(i.textContent=e.value,this.usingVirtualDom){var n=i.parentNode;(null==(r=null==n?void 0:n.rules)?void 0:r.length)>0&&(n.rules=[])}})),t.attributes.forEach((e=>{var i,n=l.getNode(e.id);if(!n){if(t.removes.find((t=>t.id===e.id)))return;return this.warnNodeNotFound(t,e.id)}var s=function(){if("string"==typeof a){var t=e.attributes[a];if(null===t)n.removeAttribute(a),"open"===a&&function(t,e){if(!("DIALOG"!==t.nodeName||t instanceof dn)){var r=t;r.isConnected?null===e.attributes.open&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode")):console.warn("dialog is not attached to the dom",r)}}(n,e);else if("string"==typeof t)try{if("_cssText"===a&&("LINK"===n.nodeName||"STYLE"===n.nodeName))try{var s=l.getMeta(n),h=hr(r({},s,{attributes:r({},s.attributes,e.attributes)}),{doc:n.ownerDocument,mirror:l,skipChild:!0,hackCss:!0,cache:o.cache});Object.assign(s.attributes,e.attributes);var u=n.nextSibling,c=n.parentNode;if(h&&c)return c.removeChild(n),c.insertBefore(h,u),l.replace(e.id,h),1}catch(t){}if("value"===a&&"TEXTAREA"===n.nodeName){var f=n;f.childNodes.forEach((t=>f.removeChild(t)));var d=null==(i=n.ownerDocument)?void 0:i.createTextNode(t);d&&f.appendChild(d)}else n.setAttribute(a,t);"rr_open_mode"===a&&"DIALOG"===n.nodeName&&Sa(n,e)}catch(t){o.warn("An error occurred may due to the checkout feature.",t)}else if("style"===a){var v=t,p=n;for(var m in v)if(!1===v[m])p.style.removeProperty(m);else if(v[m]instanceof Array){var y=v[m];p.style.setProperty(m,y[0],y[1])}else p.style.setProperty(m,v[m])}}};for(var a in e.attributes)if(s())break}))}applyScroll(t,e){var r,i,n=this.mirror.getNode(t.id);if(!n)return this.debugNodeNotFound(t,t.id);var s=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)null==(r=this.iframe.contentWindow)||r.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"});else if((null==s?void 0:s.type)===Vs.Document)null==(i=n.defaultView)||i.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"});else try{n.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"})}catch(t){}}applyInput(t){var e=this.mirror.getNode(t.id);if(!e)return this.debugNodeNotFound(t,t.id);try{e.checked=t.isChecked,e.value=t.text}catch(t){}}applySelection(t){try{var e=new Set,r=t.ranges.map((t=>{var{start:r,startOffset:i,end:n,endOffset:s}=t,o=this.mirror.getNode(r),a=this.mirror.getNode(n);if(o&&a){var h=new Range;h.setStart(o,i),h.setEnd(a,s);var u=o.ownerDocument,l=null==u?void 0:u.getSelection();return l&&e.add(l),{range:h,selection:l}}}));e.forEach((t=>t.removeAllRanges())),r.forEach((t=>{var e;return t&&(null==(e=t.selection)?void 0:e.addRange(t.range))}))}catch(t){}}applyStyleSheetMutation(t){var e,r=null;t.styleId?r=this.styleMirror.getStyle(t.styleId):t.id&&(r=(null==(e=this.mirror.getNode(t.id))?void 0:e.sheet)||null),r&&(t.source===js.StyleSheetRule?this.applyStyleSheetRule(t,r):t.source===js.StyleDeclaration&&this.applyStyleDeclaration(t,r))}applyStyleSheetRule(t,e){var r,i,n,s;if(null==(r=t.adds)||r.forEach((t=>{var{rule:r,index:i}=t;try{if(Array.isArray(i)){var{positions:n,index:s}=As(i),o=Ts(e.cssRules,n);null==o||o.insertRule(r,s)}else{var a=void 0===i?void 0:Math.min(i,e.cssRules.length);null==e||e.insertRule(r,a)}}catch(t){}})),null==(i=t.removes)||i.forEach((t=>{var{index:r}=t;try{if(Array.isArray(r)){var{positions:i,index:n}=As(r),s=Ts(e.cssRules,i);null==s||s.deleteRule(n||0)}else null==e||e.deleteRule(r)}catch(t){}})),"string"==typeof t.replace)try{null==(n=e.replace)||n.call(e,t.replace)}catch(t){}if("string"==typeof t.replaceSync)try{null==(s=e.replaceSync)||s.call(e,t.replaceSync)}catch(t){}}applyStyleDeclaration(t,e){var r,i;if(t.set){var n=Ts(e.rules,t.index);null==(r=null==n?void 0:n.style)||r.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){var s=Ts(e.rules,t.index);null==(i=null==s?void 0:s.style)||i.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var e,r=this.mirror.getNode(t.id);if(r){null==(e=t.styles)||e.forEach((t=>{var e,i=null,n=null;if(Es(r)?n=(null==(e=r.ownerDocument)?void 0:e.defaultView)||null:"#document"===r.nodeName&&(n=r.defaultView),n)try{i=new n.CSSStyleSheet,this.styleMirror.add(i,t.styleId),this.applyStyleSheetRule({source:js.StyleSheetRule,adds:t.rules},i)}catch(t){}}));var i=0,n=(t,e)=>{var r=e.map((t=>this.styleMirror.getStyle(t))).filter((t=>null!==t));Es(t)?t.shadowRoot.adoptedStyleSheets=r:"#document"===t.nodeName&&(t.adoptedStyleSheets=r),r.length!==e.length&&10>i&&(setTimeout((()=>n(t,e)),0+100*i),i++)};n(r,t.styleIds)}}legacy_resolveMissingNode(t,e,r,i){var{previousId:n,nextId:s}=i,o=n&&t[n],a=s&&t[s];if(o){var{node:h,mutation:u}=o;e.insertBefore(h,r),delete t[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(t,e,h,u)}if(a){var{node:l,mutation:c}=a;e.insertBefore(l,r.nextSibling),delete t[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(t,e,l,c)}}moveAndHover(t,e,r,i,n){var s=this.mirror.getNode(r);if(!s)return this.debugNodeNotFound(n,r);var o=Rs(s,this.iframe),a=t*o.absoluteScale+o.x,h=e*o.absoluteScale+o.y;this.mouse.style.left=a+"px",this.mouse.style.top=h+"px",i||this.drawMouseTail({x:a,y:h}),this.hoverElements(s)}drawMouseTail(t){if(this.mouseTail){var{lineCap:e,lineWidth:r,strokeStyle:i,duration:n}=!0===this.config.mouseTail?Ma:Object.assign({},Ma,this.config.mouseTail),s=()=>{if(this.mouseTail){var t=this.mouseTail.getContext("2d");t&&this.tailPositions.length&&(t.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),t.beginPath(),t.lineWidth=r,t.lineCap=e,t.strokeStyle=i,t.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach((e=>t.lineTo(e.x,e.y))),t.stroke())}};this.tailPositions.push(t),s(),setTimeout((()=>{this.tailPositions=this.tailPositions.filter((e=>e!==t)),s()}),n/this.speedService.state.context.timer.speed)}}hoverElements(t){var e;null==(e=this.lastHoveredRootNode||this.iframe.contentDocument)||e.querySelectorAll(".\\:hover").forEach((t=>{t.classList.remove(":hover")})),this.lastHoveredRootNode=t.getRootNode();for(var r=t;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(t){return t.type===Ps.IncrementalSnapshot&&t.data.source>js.Mutation&&js.Input>=t.data.source}backToNormal(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(zs.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,e){this.warn("Node with id '"+e+"' not found. ",t)}warnCanvasMutationFailed(t,e){this.warn("Has error on canvas update",e,"canvas mutation:",t)}debugNodeNotFound(t,e){this.debug("Node with id '"+e+"' not found. ",t)}warn(){if(this.config.showWarning){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];this.config.logger.warn(Ca,...e)}}debug(){if(this.config.showDebug){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];this.config.logger.log(Ca,...e)}}}var{addCustomEvent:Ra}=zo,{freezePage:Ea}=zo,{takeFullSnapshot:Ta}=zo;export{Ps as EventType,js as IncrementalSource,Us as MouseInteractions,xa as Replayer,zs as ReplayerEvents,Ra as addCustomEvent,ya as canvasMutation,Ea as freezePage,us as mirror,zo as record,ft as resetMaxDepthState,Ta as takeFullSnapshot,Fs as utils,ct as wasMaxDepthReached};
2
2
  //# sourceMappingURL=rrweb.js.map