@appsurify-testmap/rrweb-all 2.1.0-alpha.5 → 2.1.0-alpha.6

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.
@@ -11,60 +11,60 @@
11
11
  }(this, () => {
12
12
  var exports = {};
13
13
  var module = { exports };
14
- "use strict";var Vl=Object.defineProperty,Gl=Object.defineProperties;var jl=Object.getOwnPropertyDescriptors;var Qt=Object.getOwnPropertySymbols;var dn=Object.prototype.hasOwnProperty,pn=Object.prototype.propertyIsEnumerable;var fn=(s,e,t)=>e in s?Vl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,D=(s,e)=>{for(var t in e||(e={}))dn.call(e,t)&&fn(s,t,e[t]);if(Qt)for(var t of Qt(e))pn.call(e,t)&&fn(s,t,e[t]);return s},ue=(s,e)=>Gl(s,jl(e));var rt=(s,e)=>{var t={};for(var r in s)dn.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Qt)for(var r of Qt(s))e.indexOf(r)<0&&pn.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Hl=Object.defineProperty,Yl=(s,e,t)=>e in s?Hl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,S=(s,e,t)=>Yl(s,typeof e!="symbol"?e+"":e,t),mn,Zl=Object.defineProperty,Xl=(s,e,t)=>e in s?Zl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,gn=(s,e,t)=>Xl(s,typeof e!="symbol"?e+"":e,t),_=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(_||{});const yn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},vn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},qt={},Jl=()=>!!globalThis.Zone;function Si(s){if(qt[s])return qt[s];const e=globalThis[s],t=e.prototype,r=s in yn?yn[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),n=s in vn?vn[s]:void 0,o=!!(n&&n.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&o&&!Jl())return qt[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?qt[s]=u:t}catch(a){return t}}const ds={};function Ze(s,e,t){var r;const i=`${s}.${String(t)}`;if(ds[i])return ds[i].call(e);const n=Si(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(ds[i]=o,o.call(e)):e[t]}const ps={};function To(s,e,t){const r=`${s}.${String(t)}`;if(ps[r])return ps[r].bind(e);const n=Si(s)[t];return typeof n!="function"?e[t]:(ps[r]=n,n.bind(e))}function Kl(s){return Ze("Node",s,"childNodes")}function Ql(s){return Ze("Node",s,"parentNode")}function ql(s){return Ze("Node",s,"parentElement")}function eu(s){return Ze("Node",s,"textContent")}function tu(s,e){return To("Node",s,"contains")(e)}function ru(s){return To("Node",s,"getRootNode")()}function su(s){return!s||!("host"in s)?null:Ze("ShadowRoot",s,"host")}function iu(s){return s.styleSheets}function nu(s){return!s||!("shadowRoot"in s)?null:Ze("Element",s,"shadowRoot")}function ou(s,e){return Ze("Element",s,"querySelector")(e)}function au(s,e){return Ze("Element",s,"querySelectorAll")(e)}function lu(){return Si("MutationObserver").constructor}function uu(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const he={childNodes:Kl,parentNode:Ql,parentElement:ql,textContent:eu,contains:tu,getRootNode:ru,host:su,styleSheets:iu,shadowRoot:nu,querySelector:ou,querySelectorAll:au,mutationObserver:lu,patch:uu};function Ci(s){return s.nodeType===s.ELEMENT_NODE}function Rt(s){const e=s&&"host"in s&&"mode"in s&&he.host(s)||null;return!!(e&&"shadowRoot"in e&&he.shadowRoot(e)===s)}function Ot(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function cu(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function hu(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function Ts(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>ko(i,t)).join("");return cu(r)}catch(e){return null}}function ko(s,e){if(du(s)){let t;try{t=Ts(s.styleSheet)||hu(s)}catch(r){t=s.cssText}return s.styleSheet.href?kr(t,s.styleSheet.href):t}else{let t=s.cssText;return pu(s)&&s.selectorText.includes(":")&&(t=fu(t)),e?kr(t,e):t}}function fu(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function du(s){return"styleSheet"in s}function pu(s){return"selectorText"in s}class Ei{constructor(){gn(this,"idNodeMap",new Map),gn(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function _o(){return new Ei}function Dr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"";const a=r&&He(r);return(e[t.toLowerCase()]||a&&e[a])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function He(s){return s.toLowerCase()}const wn="__rrweb_original__";function mu(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const n=e.getImageData,o=wn in n?n[wn]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function gu(s,e){return!s||!e||s.type!==e.type?!1:s.type===_.Document?s.compatMode===e.compatMode:s.type===_.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===_.Comment||s.type===_.Text||s.type===_.CDATA?s.textContent===e.textContent:s.type===_.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function Tr(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?He(e):null}function Ii(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(o){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function yu(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const vu=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,wu=/^(?:[a-z+]+:)?\/\//i,bu=/^www\..*/i,Su=/^(data:)([^,]*),(.*)/i;function kr(s,e){return(s||"").replace(vu,(t,r,i,n,o,a)=>{const l=i||o||a,u=r||n||"";if(!l)return t;if(wu.test(l)||bu.test(l))return`url(${u}${l}${u})`;if(Su.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${yu(e)+l}${u})`;const c=e.split("/"),h=l.split("/");c.pop();for(const f of h)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}function er(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Cu(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let o=er(s,t);const a=o.length/s.length;for(let l=1;l<r.length;l++)if(r[l].textContent&&typeof r[l].textContent=="string"){const u=er(r[l].textContent,t),c=100;let h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let f=u.substring(0,h),p=o.split(f),d=-1;if(p.length===2)d=p[0].length;else if(p.length>2&&p[0]===""&&r[l-1].textContent!=="")d=o.indexOf(f,1);else if(p.length===1){if(f=f.substring(0,f.length-1),p=o.split(f),p.length<=1)return i.push(s),i;h=c+1}else h===u.length-1&&(d=o.indexOf(f));if(p.length>=2&&h>c){const m=r[l-1].textContent;if(m&&typeof m=="string"){const g=er(m).length;d=o.indexOf(f,g)}d===-1&&(d=p[0].length)}if(d!==-1){let m=Math.floor(d/a);for(;m>0&&m<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const g=er(s.substring(0,m),t);if(g.length===d){i.push(s.substring(0,m)),s=s.substring(m),o=o.substring(d);break}else g.length<d?m+=Math.max(1,Math.floor((d-g.length)/a)):m-=Math.max(1,Math.floor((g.length-d)*a))}break}}}}return i.push(s),i}function Eu(s,e){return Cu(s,e).join("/* rr_split */")}function Nt(s){if(s.nodeType===Node.DOCUMENT_NODE)return"/";if(s.nodeType===Node.DOCUMENT_TYPE_NODE)return"/html/doctype";if(s.nodeType===Node.ELEMENT_NODE){const e=s;if(e.id)return`//*[@id="${e.id}"]`;if(e.tagName&&e.tagName.toLowerCase()==="html")return"/html";if(e===document.head)return"/html/head";if(e===document.body)return"/html/body";const t=e.parentNode;if(!t)return"";const r=Array.from(t.children).filter(n=>n.tagName===e.tagName),i=r.length>1?`[${r.indexOf(e)+1}]`:"";return`${Nt(t)}/${e.tagName.toLowerCase()}${i}`}if(s.nodeType===Node.TEXT_NODE){const e=s.parentNode;if(!e)return"";const t=Array.from(e.childNodes).filter(i=>i.nodeType===Node.TEXT_NODE),r=t.length>1?`[${t.indexOf(s)+1}]`:"";return`${Nt(e)}/text()${r}`}if(s.nodeType===Node.CDATA_SECTION_NODE){const e=s.parentNode;if(!e)return"";const t=Array.from(e.childNodes).filter(i=>i.nodeType===Node.CDATA_SECTION_NODE),r=t.length>1?`[${t.indexOf(s)+1}]`:"";return`${Nt(e)}/text()${r}`}if(s.nodeType===Node.COMMENT_NODE){const e=s.parentNode;if(!e)return"";const t=Array.from(e.childNodes).filter(i=>i.nodeType===Node.COMMENT_NODE),r=t.length>1?`[${t.indexOf(s)+1}]`:"";return`${Nt(e)}/comment()${r}`}return""}function Iu(s){var e;const t=he.parentNode(s),r=t&&t;return!r||!$o(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function $o(s){var a;var e;const t=(a=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?a:null,r=t?t.getComputedStyle(s):null,i=r!=null&&r.display!=="none"&&r.visibility!=="hidden"&&parseFloat(r.opacity)!==0,n=s.getBoundingClientRect();return i&&xu(n)}function xu(s,e=window){var l,u,c,h;var t,r,i,n;const o=(u=(l=e==null?void 0:e.innerHeight)!=null?l:(r=(t=e==null?void 0:e.document)==null?void 0:t.documentElement)==null?void 0:r.clientHeight)!=null?u:0,a=(h=(c=e==null?void 0:e.innerWidth)!=null?c:(n=(i=e==null?void 0:e.document)==null?void 0:i.documentElement)==null?void 0:n.clientWidth)!=null?h:0;return s.width>0&&s.height>0&&s.top>=0&&s.left>=0&&s.bottom<=o&&s.right<=a}const Mu=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Nu=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],Au=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],xi=new WeakSet,Ru=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(Ru.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();Mu.includes(r)&&xi.add(this)}};const Ou=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){Ou.call(this,s,e,t)};function Du(s){return s instanceof Element&&xi.has(s)}function Po(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(Nu.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return Du(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function bn(){document.querySelectorAll("*").forEach(e=>{Au.forEach(t=>{e.hasAttribute(t)&&xi.add(e)})})}document.readyState==="complete"||document.readyState==="interactive"?bn():document.addEventListener("DOMContentLoaded",bn);let Tu=1;const ku=new RegExp("[^a-z0-9-_:]"),kt=-2;function Lo(){return Tu++}function _u(s){if(s instanceof HTMLFormElement)return"form";const e=He(s.tagName);return ku.test(e)?"div":e}let st,Sn;const $u=/^[^ \t\n\r\u000c]+/,Pu=/^[, \t\n\r\u000c]+/;function Lu(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o;const a=n.exec(e.substring(t));return a?(o=a[0],t+=o.length,o):""}const i=[];for(;r(Pu),!(t>=e.length);){let n=r($u);if(n.slice(-1)===",")n=at(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=at(s,n);let a=!1;for(;;){const l=e.charAt(t);if(l===""){i.push((n+o).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,i.push((n+o).trim());break}else l==="("&&(a=!0);o+=l,t+=1}}}return i.join(", ")}const Cn=new WeakMap;function at(s,e){return!e||e.trim()===""?e:Mi(s,e)}function Fu(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Mi(s,e){let t=Cn.get(s);if(t||(t=s.createElement("a"),Cn.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Fo(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?at(s,r):t==="srcset"?Lu(s,r):t==="style"?kr(r,Mi(s)):e==="object"&&t==="data"?at(s,r):r)}function Bo(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function ks(s,e){return typeof e=="string"?s.includes(e):e.test(s)}function Uo(s,e){return typeof e=="string"?s.includes(e):e.test(s)}function Bu(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function _r(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?_r(he.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?_r(he.parentNode(s),e,t):!1}function Wo(s,e,t,r){let i;if(Ci(s)){if(i=s,!he.childNodes(i).length)return!1}else{if(he.parentElement(s)===null)return!1;i=he.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(_r(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function Uu(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(a){return}if(n!=="complete"){const a=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}const o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function Wu(s,e,t){let r=!1,i;try{i=s.sheet}catch(o){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function zu(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:o,includeAttribute:a,needsMask:l,inlineStylesheet:u,maskInputOptions:c={},maskTextFn:h,maskInputFn:f,dataURLOptions:p={},inlineImages:d,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:y=!1,cssCaptured:w=!1}=e,v=Vu(t,r),C=Nt(s);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:_.Document,childNodes:[],xPath:C,compatMode:s.compatMode}:{type:_.Document,childNodes:[],xPath:C};case s.DOCUMENT_TYPE_NODE:return{type:_.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:v,xPath:C};case s.ELEMENT_NODE:return ju(s,{doc:t,blockClass:i,blockSelector:n,excludeAttribute:o,includeAttribute:a,inlineStylesheet:u,maskInputOptions:c,maskInputFn:f,dataURLOptions:p,inlineImages:d,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:y,rootId:v,xPath:C});case s.TEXT_NODE:return Gu(s,{doc:t,needsMask:l,maskTextFn:h,rootId:v,cssCaptured:w,xPath:C});case s.CDATA_SECTION_NODE:return{type:_.CDATA,textContent:"",rootId:v,xPath:C};case s.COMMENT_NODE:return{type:_.Comment,textContent:he.textContent(s)||"",rootId:v,xPath:C};default:return!1}}function Vu(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Gu(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n,xPath:o}=e,a=he.parentNode(s),l=a&&a.tagName;let u="";const c=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0;h?u="SCRIPT_PLACEHOLDER":n||(u=he.textContent(s),c&&u&&(u=kr(u,Mi(e.doc)))),!c&&!h&&u&&t&&(u=r?r(u,he.parentElement(s)):u.replace(/[\S]/g,"*"));const f=Iu(s),p=Po(s);return{type:_.Text,textContent:u||"",rootId:i,isVisible:f,isInteractive:p,xPath:o}}function ju(s,e){const{doc:t,blockClass:r,blockSelector:i,excludeAttribute:n,includeAttribute:o,inlineStylesheet:a,maskInputOptions:l={},maskInputFn:u,dataURLOptions:c={},inlineImages:h,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:d=!1,rootId:m,xPath:g}=e,y=Bu(s,r,i),w=_u(s);let v={};const C=s.attributes.length;for(let b=0;b<C;b++){const N=s.attributes[b];Uo(N.name,n)&&!ks(N.name,o)||Bo(w,N.name,N.value)||(v[N.name]=Fo(t,w,He(N.name),N.value))}if(w==="link"&&a){const b=Array.from(t.styleSheets).find(k=>k.href===s.href);let N=null;b&&(N=Ts(b)),N&&(delete v.rel,delete v.href,v._cssText=N)}if(w==="style"&&s.sheet){let b=Ts(s.sheet);b&&(s.childNodes.length>1&&(b=Eu(b,s)),v._cssText=b)}if(w==="input"||w==="textarea"||w==="select"){const b=s.value,N=s.checked;v.type!=="radio"&&v.type!=="checkbox"&&v.type!=="submit"&&v.type!=="button"&&b?v.value=Dr({element:s,type:Tr(s),tagName:w,value:b,maskInputOptions:l,maskInputFn:u}):N&&(v.checked=N)}if(w==="option"&&(s.selected&&!l.select?v.selected=!0:delete v.selected),w==="dialog"&&s.open&&(v.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),w==="canvas"&&f){if(s.__context==="2d")mu(s)||(v.rr_dataURL=s.toDataURL(c.type,c.quality));else if(!("__context"in s)){const b=s.toDataURL(c.type,c.quality),N=t.createElement("canvas");N.width=s.width,N.height=s.height;const k=N.toDataURL(c.type,c.quality);b!==k&&(v.rr_dataURL=b)}}if(w==="img"&&h){st||(st=t.createElement("canvas"),Sn=st.getContext("2d"));const b=s,N=b.currentSrc||b.getAttribute("src")||"<unknown-src>",k=b.crossOrigin,j=()=>{b.removeEventListener("load",j);try{st.width=b.naturalWidth,st.height=b.naturalHeight,Sn.drawImage(b,0,0),v.rr_dataURL=st.toDataURL(c.type,c.quality)}catch(W){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?j():b.addEventListener("load",j);return}else console.warn(`Cannot inline img src=${N}! Error: ${W}`)}b.crossOrigin==="anonymous"&&(k?v.crossOrigin=k:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?j():b.addEventListener("load",j)}if(w==="audio"||w==="video"){const b=v;b.rr_mediaState=s.paused?"paused":"played",b.rr_mediaCurrentTime=s.currentTime,b.rr_mediaPlaybackRate=s.playbackRate,b.rr_mediaMuted=s.muted,b.rr_mediaLoop=s.loop,b.rr_mediaVolume=s.volume}if(d||(s.scrollLeft&&(v.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(v.rr_scrollTop=s.scrollTop)),y){const{width:b,height:N}=s.getBoundingClientRect();v={class:v.class,rr_width:`${b}px`,rr_height:`${N}px`}}w==="iframe"&&!p(v.src)&&(s.contentDocument||(v.rr_src=v.src),delete v.src);let E;try{customElements.get(w)&&(E=!0)}catch(b){}const A=$o(s),R=Po(s);return{type:_.Element,tagName:w,attributes:v,childNodes:[],isSVG:Fu(s)||void 0,needBlock:y,rootId:m,isCustom:E,isVisible:A,isInteractive:R,xPath:g}}function K(s){return s==null?"":s.toLowerCase()}function Hu(s,e){if(e.comment&&s.type===_.Comment)return!0;if(s.type===_.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Ii(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(K(s.attributes.name).match(/^msapplication-tile(image|color)$/)||K(s.attributes.name)==="application-name"||K(s.attributes.rel)==="icon"||K(s.attributes.rel)==="apple-touch-icon"||K(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&K(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(K(s.attributes.property).match(/^(og|twitter|fb):/)||K(s.attributes.name).match(/^(og|twitter):/)||K(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(K(s.attributes.name)==="robots"||K(s.attributes.name)==="googlebot"||K(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(K(s.attributes.name)==="author"||K(s.attributes.name)==="generator"||K(s.attributes.name)==="framework"||K(s.attributes.name)==="publisher"||K(s.attributes.name)==="progid"||K(s.attributes.property).match(/^article:/)||K(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(K(s.attributes.name)==="google-site-verification"||K(s.attributes.name)==="yandex-verification"||K(s.attributes.name)==="csrf-token"||K(s.attributes.name)==="p:domain_verify"||K(s.attributes.name)==="verify-v1"||K(s.attributes.name)==="verification"||K(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function lt(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:a,excludeAttribute:l,includeAttribute:u,skipChild:c=!1,inlineStylesheet:h=!0,maskInputOptions:f={},maskTextFn:p,maskInputFn:d,slimDOMOptions:m,dataURLOptions:g={},inlineImages:y=!1,recordCanvas:w=!1,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:E=5e3,onStylesheetLoad:A,stylesheetLoadTimeout:R=5e3,keepIframeSrcFn:b=()=>!1,newlyAddedElement:N=!1,cssCaptured:k=!1}=e;let{needsMask:j}=e,{preserveWhiteSpace:W=!0}=e;j||(j=Wo(s,o,a,j===void 0));const Z=zu(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:l,includeAttribute:u,needsMask:j,inlineStylesheet:h,maskInputOptions:f,maskTextFn:p,maskInputFn:d,dataURLOptions:g,inlineImages:y,recordCanvas:w,keepIframeSrcFn:b,newlyAddedElement:N,cssCaptured:k});if(!Z)return console.warn(s,"not serialized"),null;let z;r.hasNode(s)?z=r.getId(s):Hu(Z,m)||!W&&Z.type===_.Text&&!Z.textContent.replace(/^\s+|\s+$/gm,"").length?z=kt:z=Lo();const O=Object.assign(Z,{id:z});if(r.add(s,O),z===kt)return null;v&&v(s);let V=!c;if(O.type===_.Element){V=V&&!O.needBlock,delete O.needBlock;const $=he.shadowRoot(s);$&&Ot($)&&(O.isShadowHost=!0)}if((O.type===_.Document||O.type===_.Element)&&V){m.headWhitespace&&O.type===_.Element&&O.tagName==="head"&&(W=!1);const $={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:j,maskTextClass:o,maskTextSelector:a,excludeAttribute:l,includeAttribute:u,skipChild:c,inlineStylesheet:h,maskInputOptions:f,maskTextFn:p,maskInputFn:d,slimDOMOptions:m,dataURLOptions:g,inlineImages:y,recordCanvas:w,preserveWhiteSpace:W,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:E,onStylesheetLoad:A,stylesheetLoadTimeout:R,keepIframeSrcFn:b,cssCaptured:!1};if(!(O.type===_.Element&&O.tagName==="textarea"&&O.attributes.value!==void 0)){O.type===_.Element&&O.attributes._cssText!==void 0&&typeof O.attributes._cssText=="string"&&($.cssCaptured=!0);for(const ae of Array.from(he.childNodes(s))){const re=lt(ae,$);re&&O.childNodes.push(re)}}let J=null;if(Ci(s)&&(J=he.shadowRoot(s)))for(const ae of Array.from(he.childNodes(J))){const re=lt(ae,$);re&&(Ot(J)&&(re.isShadow=!0),O.childNodes.push(re))}}const T=he.parentNode(s);return T&&Rt(T)&&Ot(T)&&(O.isShadow=!0),O.type===_.Element&&O.tagName==="iframe"&&Uu(s,()=>{const $=s.contentDocument;if($&&C){const J=lt($,{doc:$,mirror:r,blockClass:i,blockSelector:n,needsMask:j,maskTextClass:o,maskTextSelector:a,excludeAttribute:l,includeAttribute:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskTextFn:p,maskInputFn:d,slimDOMOptions:m,dataURLOptions:g,inlineImages:y,recordCanvas:w,preserveWhiteSpace:W,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:E,onStylesheetLoad:A,stylesheetLoadTimeout:R,keepIframeSrcFn:b});J&&C(s,J)}},E),O.type===_.Element&&O.tagName==="link"&&typeof O.attributes.rel=="string"&&(O.attributes.rel==="stylesheet"||O.attributes.rel==="preload"&&typeof O.attributes.href=="string"&&Ii(O.attributes.href)==="css")&&Wu(s,()=>{if(A){const $=lt(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:j,maskTextClass:o,maskTextSelector:a,excludeAttribute:l,includeAttribute:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskTextFn:p,maskInputFn:d,slimDOMOptions:m,dataURLOptions:g,inlineImages:y,recordCanvas:w,preserveWhiteSpace:W,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:E,onStylesheetLoad:A,stylesheetLoadTimeout:R,keepIframeSrcFn:b});$&&A(s,$)}},R),O}function Yu(s,e){const{mirror:t=new Ei,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,excludeAttribute:a=/^$a/,includeAttribute:l=/.+/i,inlineStylesheet:u=!0,inlineImages:c=!1,recordCanvas:h=!1,maskAllInputs:f=!1,maskTextFn:p,maskInputFn:d,slimDOM:m=!1,dataURLOptions:g,preserveWhiteSpace:y,onSerialize:w,onIframeLoad:v,iframeLoadTimeout:C,onStylesheetLoad:E,stylesheetLoadTimeout:A,keepIframeSrcFn:R=()=>!1}=e||{};return lt(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,excludeAttribute:a,includeAttribute:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:f===!0?{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}:f===!1?{password:!0}:f,maskTextFn:p,maskInputFn:d,slimDOMOptions:m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m===!1?{}:m,dataURLOptions:g,inlineImages:c,recordCanvas:h,preserveWhiteSpace:y,onSerialize:w,onIframeLoad:v,iframeLoadTimeout:C,onStylesheetLoad:E,stylesheetLoadTimeout:A,keepIframeSrcFn:R,newlyAddedElement:!1})}const Zu=/(max|min)-device-(width|height)/,En=new RegExp(Zu.source,"g"),Xu={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(En)&&(s.params=s.params.replace(En,"$1-$2"))}}}},Ju={postcssPlugin:"postcss-hover-classes",prepare:function(){const s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
15
- `+t.replace(/:hover/g,".\\:hover"))}))}}}};function Ku(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Qu(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Ni={exports:{}},Q=String,zo=function(){return{isColorSupported:!1,reset:Q,bold:Q,dim:Q,italic:Q,underline:Q,inverse:Q,hidden:Q,strikethrough:Q,black:Q,red:Q,green:Q,yellow:Q,blue:Q,magenta:Q,cyan:Q,white:Q,gray:Q,bgBlack:Q,bgRed:Q,bgGreen:Q,bgYellow:Q,bgBlue:Q,bgMagenta:Q,bgCyan:Q,bgWhite:Q}};Ni.exports=zo();Ni.exports.createColors=zo;var qu=Ni.exports;const ec={},tc=Object.freeze(Object.defineProperty({__proto__:null,default:ec},Symbol.toStringTag,{value:"Module"})),Ce=Qu(tc);let In=qu,xn=Ce,_s=class Vo extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Vo)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=In.isColorSupported),xn&&e&&(t=xn(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,a,l;if(e){let{bold:u,gray:c,red:h}=In.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let p=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
14
+ "use strict";var Hl=Object.defineProperty,Yl=Object.defineProperties;var Zl=Object.getOwnPropertyDescriptors;var er=Object.getOwnPropertySymbols;var gn=Object.prototype.hasOwnProperty,yn=Object.prototype.propertyIsEnumerable;var mn=(s,e,t)=>e in s?Hl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,D=(s,e)=>{for(var t in e||(e={}))gn.call(e,t)&&mn(s,t,e[t]);if(er)for(var t of er(e))yn.call(e,t)&&mn(s,t,e[t]);return s},le=(s,e)=>Yl(s,Zl(e));var rt=(s,e)=>{var t={};for(var r in s)gn.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&er)for(var r of er(s))e.indexOf(r)<0&&yn.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Xl=Object.defineProperty,Jl=(s,e,t)=>e in s?Xl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,S=(s,e,t)=>Jl(s,typeof e!="symbol"?e+"":e,t),vn,Kl=Object.defineProperty,Ql=(s,e,t)=>e in s?Kl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,wn=(s,e,t)=>Ql(s,typeof e!="symbol"?e+"":e,t),_=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(_||{});const bn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Sn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},tr={},ql=()=>!!globalThis.Zone;function Ii(s){if(tr[s])return tr[s];const e=globalThis[s],t=e.prototype,r=s in bn?bn[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),n=s in Sn?Sn[s]:void 0,o=!!(n&&n.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&o&&!ql())return tr[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?tr[s]=u:t}catch(a){return t}}const ps={};function Ye(s,e,t){var r;const i=`${s}.${String(t)}`;if(ps[i])return ps[i].call(e);const n=Ii(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(ps[i]=o,o.call(e)):e[t]}const ms={};function $o(s,e,t){const r=`${s}.${String(t)}`;if(ms[r])return ms[r].bind(e);const n=Ii(s)[t];return typeof n!="function"?e[t]:(ms[r]=n,n.bind(e))}function eu(s){return Ye("Node",s,"childNodes")}function tu(s){return Ye("Node",s,"parentNode")}function ru(s){return Ye("Node",s,"parentElement")}function su(s){return Ye("Node",s,"textContent")}function iu(s,e){return $o("Node",s,"contains")(e)}function nu(s){return $o("Node",s,"getRootNode")()}function ou(s){return!s||!("host"in s)?null:Ye("ShadowRoot",s,"host")}function au(s){return s.styleSheets}function lu(s){return!s||!("shadowRoot"in s)?null:Ye("Element",s,"shadowRoot")}function uu(s,e){return Ye("Element",s,"querySelector")(e)}function cu(s,e){return Ye("Element",s,"querySelectorAll")(e)}function hu(){return Ii("MutationObserver").constructor}function fu(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const he={childNodes:eu,parentNode:tu,parentElement:ru,textContent:su,contains:iu,getRootNode:nu,host:ou,styleSheets:au,shadowRoot:lu,querySelector:uu,querySelectorAll:cu,mutationObserver:hu,patch:fu};function xi(s){return s.nodeType===s.ELEMENT_NODE}function Ot(s){const e=s&&"host"in s&&"mode"in s&&he.host(s)||null;return!!(e&&"shadowRoot"in e&&he.shadowRoot(e)===s)}function Dt(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function du(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function pu(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function _s(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>Po(i,t)).join("");return du(r)}catch(e){return null}}function Po(s,e){if(gu(s)){let t;try{t=_s(s.styleSheet)||pu(s)}catch(r){t=s.cssText}return s.styleSheet.href?$r(t,s.styleSheet.href):t}else{let t=s.cssText;return yu(s)&&s.selectorText.includes(":")&&(t=mu(t)),e?$r(t,e):t}}function mu(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function gu(s){return"styleSheet"in s}function yu(s){return"selectorText"in s}class Mi{constructor(){wn(this,"idNodeMap",new Map),wn(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Lo(){return new Mi}function kr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"";const a=r&&je(r);return(e[t.toLowerCase()]||a&&e[a])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function je(s){return s.toLowerCase()}const Cn="__rrweb_original__";function vu(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const n=e.getImageData,o=Cn in n?n[Cn]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function wu(s,e){return!s||!e||s.type!==e.type?!1:s.type===_.Document?s.compatMode===e.compatMode:s.type===_.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===_.Comment||s.type===_.Text||s.type===_.CDATA?s.textContent===e.textContent:s.type===_.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function _r(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?je(e):null}function Ni(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(o){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function bu(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Su=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Cu=/^(?:[a-z+]+:)?\/\//i,Eu=/^www\..*/i,Iu=/^(data:)([^,]*),(.*)/i;function $r(s,e){return(s||"").replace(Su,(t,r,i,n,o,a)=>{const l=i||o||a,u=r||n||"";if(!l)return t;if(Cu.test(l)||Eu.test(l))return`url(${u}${l}${u})`;if(Iu.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${bu(e)+l}${u})`;const c=e.split("/"),h=l.split("/");c.pop();for(const f of h)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}function rr(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function xu(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let o=rr(s,t);const a=o.length/s.length;for(let l=1;l<r.length;l++)if(r[l].textContent&&typeof r[l].textContent=="string"){const u=rr(r[l].textContent,t),c=100;let h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let f=u.substring(0,h),p=o.split(f),d=-1;if(p.length===2)d=p[0].length;else if(p.length>2&&p[0]===""&&r[l-1].textContent!=="")d=o.indexOf(f,1);else if(p.length===1){if(f=f.substring(0,f.length-1),p=o.split(f),p.length<=1)return i.push(s),i;h=c+1}else h===u.length-1&&(d=o.indexOf(f));if(p.length>=2&&h>c){const m=r[l-1].textContent;if(m&&typeof m=="string"){const g=rr(m).length;d=o.indexOf(f,g)}d===-1&&(d=p[0].length)}if(d!==-1){let m=Math.floor(d/a);for(;m>0&&m<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const g=rr(s.substring(0,m),t);if(g.length===d){i.push(s.substring(0,m)),s=s.substring(m),o=o.substring(d);break}else g.length<d?m+=Math.max(1,Math.floor((d-g.length)/a)):m-=Math.max(1,Math.floor((g.length-d)*a))}break}}}}return i.push(s),i}function Mu(s,e){return xu(s,e).join("/* rr_split */")}function Rt(s){if(s.nodeType===Node.DOCUMENT_NODE)return"/";if(s.nodeType===Node.DOCUMENT_TYPE_NODE)return"/html/doctype";if(s.nodeType===Node.ELEMENT_NODE){const e=s;if(e.id)return`//*[@id="${e.id}"]`;if(e.tagName&&e.tagName.toLowerCase()==="html")return"/html";if(e===document.head)return"/html/head";if(e===document.body)return"/html/body";const t=e.parentNode;if(!t)return"";const r=Array.from(t.children).filter(n=>n.tagName===e.tagName),i=r.length>1?`[${r.indexOf(e)+1}]`:"";return`${Rt(t)}/${e.tagName.toLowerCase()}${i}`}if(s.nodeType===Node.TEXT_NODE){const e=s.parentNode;if(!e)return"";const t=Array.from(e.childNodes).filter(i=>i.nodeType===Node.TEXT_NODE),r=t.length>1?`[${t.indexOf(s)+1}]`:"";return`${Rt(e)}/text()${r}`}if(s.nodeType===Node.CDATA_SECTION_NODE){const e=s.parentNode;if(!e)return"";const t=Array.from(e.childNodes).filter(i=>i.nodeType===Node.CDATA_SECTION_NODE),r=t.length>1?`[${t.indexOf(s)+1}]`:"";return`${Rt(e)}/text()${r}`}if(s.nodeType===Node.COMMENT_NODE){const e=s.parentNode;if(!e)return"";const t=Array.from(e.childNodes).filter(i=>i.nodeType===Node.COMMENT_NODE),r=t.length>1?`[${t.indexOf(s)+1}]`:"";return`${Rt(e)}/comment()${r}`}return""}function Nu(s){var e;const t=he.parentNode(s),r=t&&t;return!r||!Fo(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function Fo(s){var a;var e;const t=(a=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?a:null,r=t?t.getComputedStyle(s):null,i=r!=null&&r.display!=="none"&&r.visibility!=="hidden"&&parseFloat(r.opacity)!==0,n=s.getBoundingClientRect();return i&&Ru(n)}function Ru(s,e=window){var l,u,c,h;var t,r,i,n;const o=(u=(l=e==null?void 0:e.innerHeight)!=null?l:(r=(t=e==null?void 0:e.document)==null?void 0:t.documentElement)==null?void 0:r.clientHeight)!=null?u:0,a=(h=(c=e==null?void 0:e.innerWidth)!=null?c:(n=(i=e==null?void 0:e.document)==null?void 0:i.documentElement)==null?void 0:n.clientWidth)!=null?h:0;return s.width>0&&s.height>0&&s.top>=0&&s.left>=0&&s.bottom<=o&&s.right<=a}const Au=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Ou=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],Du=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Ri=new WeakSet,Tu=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(Tu.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();Au.includes(r)&&Ri.add(this)}};const ku=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){ku.call(this,s,e,t)};function _u(s){return s instanceof Element&&Ri.has(s)}function Bo(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(Ou.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return _u(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function En(){document.querySelectorAll("*").forEach(e=>{Du.forEach(t=>{e.hasAttribute(t)&&Ri.add(e)})})}document.readyState==="complete"||document.readyState==="interactive"?En():document.addEventListener("DOMContentLoaded",En);let $u=1;const Pu=new RegExp("[^a-z0-9-_:]"),_t=-2;function Uo(){return $u++}function Lu(s){if(s instanceof HTMLFormElement)return"form";const e=je(s.tagName);return Pu.test(e)?"div":e}let st,In;const Fu=/^[^ \t\n\r\u000c]+/,Bu=/^[, \t\n\r\u000c]+/;function Uu(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o;const a=n.exec(e.substring(t));return a?(o=a[0],t+=o.length,o):""}const i=[];for(;r(Bu),!(t>=e.length);){let n=r(Fu);if(n.slice(-1)===",")n=at(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=at(s,n);let a=!1;for(;;){const l=e.charAt(t);if(l===""){i.push((n+o).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,i.push((n+o).trim());break}else l==="("&&(a=!0);o+=l,t+=1}}}return i.join(", ")}const xn=new WeakMap;function at(s,e){return!e||e.trim()===""?e:Ai(s,e)}function Wu(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Ai(s,e){let t=xn.get(s);if(t||(t=s.createElement("a"),xn.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Wo(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?at(s,r):t==="srcset"?Uu(s,r):t==="style"?$r(r,Ai(s)):e==="object"&&t==="data"?at(s,r):r)}function zo(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function $s(s,e){return typeof e=="string"?s.includes(e):e.test(s)}function Vo(s,e){return typeof e=="string"?s.includes(e):e.test(s)}function zu(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function Pr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?Pr(he.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?Pr(he.parentNode(s),e,t):!1}function Go(s,e,t,r){let i;if(xi(s)){if(i=s,!he.childNodes(i).length)return!1}else{if(he.parentElement(s)===null)return!1;i=he.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Pr(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function Vu(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(a){return}if(n!=="complete"){const a=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}const o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function Gu(s,e,t){let r=!1,i;try{i=s.sheet}catch(o){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function ju(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:o,includeAttribute:a,needsMask:l,inlineStylesheet:u,maskInputOptions:c={},maskTextFn:h,maskInputFn:f,dataURLOptions:p={},inlineImages:d,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:y=!1,cssCaptured:w=!1}=e,v=Hu(t,r),C=Rt(s);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:_.Document,childNodes:[],xPath:C,compatMode:s.compatMode}:{type:_.Document,childNodes:[],xPath:C};case s.DOCUMENT_TYPE_NODE:return{type:_.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:v,xPath:C};case s.ELEMENT_NODE:return Zu(s,{doc:t,blockClass:i,blockSelector:n,excludeAttribute:o,includeAttribute:a,inlineStylesheet:u,maskInputOptions:c,maskInputFn:f,dataURLOptions:p,inlineImages:d,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:y,rootId:v,xPath:C});case s.TEXT_NODE:return Yu(s,{doc:t,needsMask:l,maskTextFn:h,rootId:v,cssCaptured:w,xPath:C});case s.CDATA_SECTION_NODE:return{type:_.CDATA,textContent:"",rootId:v,xPath:C};case s.COMMENT_NODE:return{type:_.Comment,textContent:he.textContent(s)||"",rootId:v,xPath:C};default:return!1}}function Hu(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Yu(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n,xPath:o}=e,a=he.parentNode(s),l=a&&a.tagName;let u="";const c=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0;h?u="SCRIPT_PLACEHOLDER":n||(u=he.textContent(s),c&&u&&(u=$r(u,Ai(e.doc)))),!c&&!h&&u&&t&&(u=r?r(u,he.parentElement(s)):u.replace(/[\S]/g,"*"));const f=Nu(s),p=Bo(s);return{type:_.Text,textContent:u||"",rootId:i,isVisible:f,isInteractive:p,xPath:o}}function Zu(s,e){const{doc:t,blockClass:r,blockSelector:i,excludeAttribute:n,includeAttribute:o,inlineStylesheet:a,maskInputOptions:l={},maskInputFn:u,dataURLOptions:c={},inlineImages:h,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:d=!1,rootId:m,xPath:g}=e,y=zu(s,r,i),w=Lu(s);let v={};const C=s.attributes.length;for(let b=0;b<C;b++){const N=s.attributes[b];Vo(N.name,n)&&!$s(N.name,o)||zo(w,N.name,N.value)||(v[N.name]=Wo(t,w,je(N.name),N.value))}if(w==="link"&&a){const b=Array.from(t.styleSheets).find(k=>k.href===s.href);let N=null;b&&(N=_s(b)),N&&(delete v.rel,delete v.href,v._cssText=N)}if(w==="style"&&s.sheet){let b=_s(s.sheet);b&&(s.childNodes.length>1&&(b=Mu(b,s)),v._cssText=b)}if(w==="input"||w==="textarea"||w==="select"){const b=s.value,N=s.checked;v.type!=="radio"&&v.type!=="checkbox"&&v.type!=="submit"&&v.type!=="button"&&b?v.value=kr({element:s,type:_r(s),tagName:w,value:b,maskInputOptions:l,maskInputFn:u}):N&&(v.checked=N)}if(w==="option"&&(s.selected&&!l.select?v.selected=!0:delete v.selected),w==="dialog"&&s.open&&(v.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),w==="canvas"&&f){if(s.__context==="2d")vu(s)||(v.rr_dataURL=s.toDataURL(c.type,c.quality));else if(!("__context"in s)){const b=s.toDataURL(c.type,c.quality),N=t.createElement("canvas");N.width=s.width,N.height=s.height;const k=N.toDataURL(c.type,c.quality);b!==k&&(v.rr_dataURL=b)}}if(w==="img"&&h){st||(st=t.createElement("canvas"),In=st.getContext("2d"));const b=s,N=b.currentSrc||b.getAttribute("src")||"<unknown-src>",k=b.crossOrigin,V=()=>{b.removeEventListener("load",V);try{st.width=b.naturalWidth,st.height=b.naturalHeight,In.drawImage(b,0,0),v.rr_dataURL=st.toDataURL(c.type,c.quality)}catch(W){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?V():b.addEventListener("load",V);return}else console.warn(`Cannot inline img src=${N}! Error: ${W}`)}b.crossOrigin==="anonymous"&&(k?v.crossOrigin=k:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?V():b.addEventListener("load",V)}if(w==="audio"||w==="video"){const b=v;b.rr_mediaState=s.paused?"paused":"played",b.rr_mediaCurrentTime=s.currentTime,b.rr_mediaPlaybackRate=s.playbackRate,b.rr_mediaMuted=s.muted,b.rr_mediaLoop=s.loop,b.rr_mediaVolume=s.volume}if(d||(s.scrollLeft&&(v.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(v.rr_scrollTop=s.scrollTop)),y){const{width:b,height:N}=s.getBoundingClientRect();v={class:v.class,rr_width:`${b}px`,rr_height:`${N}px`}}w==="iframe"&&!p(v.src)&&(s.contentDocument||(v.rr_src=v.src),delete v.src);let E;try{customElements.get(w)&&(E=!0)}catch(b){}const R=Fo(s),O=Bo(s);return{type:_.Element,tagName:w,attributes:v,childNodes:[],isSVG:Wu(s)||void 0,needBlock:y,rootId:m,isCustom:E,isVisible:R,isInteractive:O,xPath:g}}function J(s){return s==null?"":s.toLowerCase()}function Xu(s,e){if(e.comment&&s.type===_.Comment)return!0;if(s.type===_.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Ni(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(J(s.attributes.name).match(/^msapplication-tile(image|color)$/)||J(s.attributes.name)==="application-name"||J(s.attributes.rel)==="icon"||J(s.attributes.rel)==="apple-touch-icon"||J(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&J(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(J(s.attributes.property).match(/^(og|twitter|fb):/)||J(s.attributes.name).match(/^(og|twitter):/)||J(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(J(s.attributes.name)==="robots"||J(s.attributes.name)==="googlebot"||J(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(J(s.attributes.name)==="author"||J(s.attributes.name)==="generator"||J(s.attributes.name)==="framework"||J(s.attributes.name)==="publisher"||J(s.attributes.name)==="progid"||J(s.attributes.property).match(/^article:/)||J(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(J(s.attributes.name)==="google-site-verification"||J(s.attributes.name)==="yandex-verification"||J(s.attributes.name)==="csrf-token"||J(s.attributes.name)==="p:domain_verify"||J(s.attributes.name)==="verify-v1"||J(s.attributes.name)==="verification"||J(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function lt(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:a,excludeAttribute:l,includeAttribute:u,skipChild:c=!1,inlineStylesheet:h=!0,maskInputOptions:f={},maskTextFn:p,maskInputFn:d,slimDOMOptions:m,dataURLOptions:g={},inlineImages:y=!1,recordCanvas:w=!1,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:E=5e3,onStylesheetLoad:R,stylesheetLoadTimeout:O=5e3,keepIframeSrcFn:b=()=>!1,newlyAddedElement:N=!1,cssCaptured:k=!1}=e;let{needsMask:V}=e,{preserveWhiteSpace:W=!0}=e;V||(V=Go(s,o,a,V===void 0));const X=ju(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:l,includeAttribute:u,needsMask:V,inlineStylesheet:h,maskInputOptions:f,maskTextFn:p,maskInputFn:d,dataURLOptions:g,inlineImages:y,recordCanvas:w,keepIframeSrcFn:b,newlyAddedElement:N,cssCaptured:k});if(!X)return console.warn(s,"not serialized"),null;let G;r.hasNode(s)?G=r.getId(s):Xu(X,m)||!W&&X.type===_.Text&&!X.textContent.replace(/^\s+|\s+$/gm,"").length?G=_t:G=Uo();const A=Object.assign(X,{id:G});if(r.add(s,A),G===_t)return null;v&&v(s);let z=!c;if(A.type===_.Element){z=z&&!A.needBlock,delete A.needBlock;const L=he.shadowRoot(s);L&&Dt(L)&&(A.isShadowHost=!0)}if((A.type===_.Document||A.type===_.Element)&&z){m.headWhitespace&&A.type===_.Element&&A.tagName==="head"&&(W=!1);const L={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:o,maskTextSelector:a,excludeAttribute:l,includeAttribute:u,skipChild:c,inlineStylesheet:h,maskInputOptions:f,maskTextFn:p,maskInputFn:d,slimDOMOptions:m,dataURLOptions:g,inlineImages:y,recordCanvas:w,preserveWhiteSpace:W,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:E,onStylesheetLoad:R,stylesheetLoadTimeout:O,keepIframeSrcFn:b,cssCaptured:!1};if(!(A.type===_.Element&&A.tagName==="textarea"&&A.attributes.value!==void 0)){A.type===_.Element&&A.attributes._cssText!==void 0&&typeof A.attributes._cssText=="string"&&(L.cssCaptured=!0);for(const ie of Array.from(he.childNodes(s))){const re=lt(ie,L);re&&A.childNodes.push(re)}}let K=null;if(xi(s)&&(K=he.shadowRoot(s)))for(const ie of Array.from(he.childNodes(K))){const re=lt(ie,L);re&&(Dt(K)&&(re.isShadow=!0),A.childNodes.push(re))}}const T=he.parentNode(s);return T&&Ot(T)&&Dt(T)&&(A.isShadow=!0),A.type===_.Element&&A.tagName==="iframe"&&Vu(s,()=>{const L=s.contentDocument;if(L&&C){const K=lt(L,{doc:L,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:o,maskTextSelector:a,excludeAttribute:l,includeAttribute:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskTextFn:p,maskInputFn:d,slimDOMOptions:m,dataURLOptions:g,inlineImages:y,recordCanvas:w,preserveWhiteSpace:W,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:E,onStylesheetLoad:R,stylesheetLoadTimeout:O,keepIframeSrcFn:b});K&&C(s,K)}},E),A.type===_.Element&&A.tagName==="link"&&typeof A.attributes.rel=="string"&&(A.attributes.rel==="stylesheet"||A.attributes.rel==="preload"&&typeof A.attributes.href=="string"&&Ni(A.attributes.href)==="css")&&Gu(s,()=>{if(R){const L=lt(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:o,maskTextSelector:a,excludeAttribute:l,includeAttribute:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskTextFn:p,maskInputFn:d,slimDOMOptions:m,dataURLOptions:g,inlineImages:y,recordCanvas:w,preserveWhiteSpace:W,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:E,onStylesheetLoad:R,stylesheetLoadTimeout:O,keepIframeSrcFn:b});L&&R(s,L)}},O),A}function Ju(s,e){const{mirror:t=new Mi,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,excludeAttribute:a=/^$a/,includeAttribute:l=/.+/i,inlineStylesheet:u=!0,inlineImages:c=!1,recordCanvas:h=!1,maskAllInputs:f=!1,maskTextFn:p,maskInputFn:d,slimDOM:m=!1,dataURLOptions:g,preserveWhiteSpace:y,onSerialize:w,onIframeLoad:v,iframeLoadTimeout:C,onStylesheetLoad:E,stylesheetLoadTimeout:R,keepIframeSrcFn:O=()=>!1}=e||{};return lt(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,excludeAttribute:a,includeAttribute:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:f===!0?{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}:f===!1?{password:!0}:f,maskTextFn:p,maskInputFn:d,slimDOMOptions:m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m===!1?{}:m,dataURLOptions:g,inlineImages:c,recordCanvas:h,preserveWhiteSpace:y,onSerialize:w,onIframeLoad:v,iframeLoadTimeout:C,onStylesheetLoad:E,stylesheetLoadTimeout:R,keepIframeSrcFn:O,newlyAddedElement:!1})}const Ku=/(max|min)-device-(width|height)/,Mn=new RegExp(Ku.source,"g"),Qu={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(Mn)&&(s.params=s.params.replace(Mn,"$1-$2"))}}}},qu={postcssPlugin:"postcss-hover-classes",prepare:function(){const s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
15
+ `+t.replace(/:hover/g,".\\:hover"))}))}}}};function ec(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function tc(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Oi={exports:{}},Q=String,jo=function(){return{isColorSupported:!1,reset:Q,bold:Q,dim:Q,italic:Q,underline:Q,inverse:Q,hidden:Q,strikethrough:Q,black:Q,red:Q,green:Q,yellow:Q,blue:Q,magenta:Q,cyan:Q,white:Q,gray:Q,bgBlack:Q,bgRed:Q,bgGreen:Q,bgYellow:Q,bgBlue:Q,bgMagenta:Q,bgCyan:Q,bgWhite:Q}};Oi.exports=jo();Oi.exports.createColors=jo;var rc=Oi.exports;const sc={},ic=Object.freeze(Object.defineProperty({__proto__:null,default:sc},Symbol.toStringTag,{value:"Module"})),Ee=tc(ic);let Nn=rc,Rn=Ee,Ps=class Ho extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Ho)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Nn.isColorSupported),Rn&&e&&(t=Rn(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,a,l;if(e){let{bold:u,gray:c,red:h}=Nn.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let p=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
16
16
  `+p+a("^")}return" "+l(f)+u}).join(`
17
17
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
18
18
 
19
19
  `+e+`
20
- `),this.name+": "+this.message+e}};var Ai=_s;_s.default=_s;var Gt={};Gt.isClean=Symbol("isClean");Gt.my=Symbol("my");const Mn={after:`
20
+ `),this.name+": "+this.message+e}};var Di=Ps;Ps.default=Ps;var jt={};jt.isClean=Symbol("isClean");jt.my=Symbol("my");const An={after:`
21
21
  `,beforeClose:`
22
22
  `,beforeComment:`
23
23
  `,beforeDecl:`
24
24
  `,beforeOpen:" ",beforeRule:`
25
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function rc(s){return s[0].toUpperCase()+s.slice(1)}let $s=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
26
- `)){let o=this.raw(e,null,"indent");if(o.length)for(let a=0;a<n;a++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Mn[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]!="undefined")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+rc(r);this[a]?i=this[a](o,e):o.walk(l=>{if(i=l.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=Mn[r]),o.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
25
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function nc(s){return s[0].toUpperCase()+s.slice(1)}let Ls=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
26
+ `)){let o=this.raw(e,null,"indent");if(o.length)for(let a=0;a<n;a++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return An[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]!="undefined")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+nc(r);this[a]?i=this[a](o,e):o.walk(l=>{if(i=l.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=An[r]),o.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
27
27
  `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
28
28
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
29
29
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
30
30
  `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before!="undefined"){let n=r.raws.before.split(`
31
- `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Go=$s;$s.default=$s;let sc=Go;function Ps(s,e){new sc(e).stringify(s)}var Jr=Ps;Ps.default=Ps;let{isClean:tr,my:ic}=Gt,nc=Ai,oc=Go,ac=Jr;function Ls(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>Ls(o,t)):(n==="object"&&i!==null&&(i=Ls(i)),t[r]=i)}return t}let Fs=class{constructor(e={}){this.raws={},this[tr]=!1,this[ic]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Ls(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new nc(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[tr]){this[tr]=!1;let e=this;for(;e=e.parent;)e[tr]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
32
- `?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new oc().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let a=this[o];if(Array.isArray(a))r[o]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[o]=a.toJSON(null,t);else if(o==="source"){let l=t.get(a.input);l==null&&(l=n,t.set(a.input,n),n++),r[o]={end:a.end,inputId:l,start:a.start}}else r[o]=a}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ac){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}};var Kr=Fs;Fs.default=Fs;let lc=Kr,Bs=class extends lc{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ue(D({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Qr=Bs;Bs.default=Bs;let uc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",cc=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},hc=(s=21)=>{let e="",t=s;for(;t--;)e+=uc[Math.random()*64|0];return e};var fc={nanoid:hc,customAlphabet:cc};let{SourceMapConsumer:Nn,SourceMapGenerator:An}=Ce,{existsSync:dc,readFileSync:pc}=Ce,{dirname:ms,join:mc}=Ce;function gc(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Us=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=ms(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Nn(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return gc(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=ms(e),dc(e))return this.mapFile=e,pc(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof Nn)return An.fromSourceMap(t).toString();if(t instanceof An)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=mc(ms(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var jo=Us;Us.default=Us;let{SourceMapConsumer:yc,SourceMapGenerator:vc}=Ce,{fileURLToPath:Rn,pathToFileURL:rr}=Ce,{isAbsolute:Ws,resolve:zs}=Ce,{nanoid:wc}=fc,gs=Ce,On=Ai,bc=jo,ys=Symbol("fromOffsetCache"),Sc=!!(yc&&vc),Dn=!!(zs&&Ws),$r=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Dn||/^\w+:\/\//.test(t.from)||Ws(t.from)?this.file=t.from:this.file=zs(t.from)),Dn&&Sc){let r=new bc(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+wc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,a;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);o=h.line,a=h.col}else o=c.line,a=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let l=this.origin(t,r,o,a);return l?n=new On(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):n=new On(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:a,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:a,endLine:o,line:t,source:this.css},this.file&&(rr&&(n.input.url=rr(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[ys])r=this[ys];else{let n=this.css.split(`
33
- `);r=new Array(n.length);let o=0;for(let a=0,l=n.length;a<l;a++)r[a]=o,o+=n[a].length+1;this[ys]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:zs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let a;typeof r=="number"&&(a=n.originalPositionFor({column:i,line:r}));let l;Ws(o.source)?l=rr(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||rr(this.map.mapFile));let u={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:l.toString()};if(l.protocol==="file:")if(Rn)u.file=Rn(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=D({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var qr=$r;$r.default=$r;gs&&gs.registerInput&&gs.registerInput($r);let{SourceMapConsumer:Ho,SourceMapGenerator:Ir}=Ce,{dirname:xr,relative:Yo,resolve:Zo,sep:Xo}=Ce,{pathToFileURL:Tn}=Ce,Cc=qr,Ec=!!(Ho&&Ir),Ic=!!(xr&&Zo&&Yo&&Xo),xc=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,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(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
31
+ `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Yo=Ls;Ls.default=Ls;let oc=Yo;function Fs(s,e){new oc(e).stringify(s)}var Qr=Fs;Fs.default=Fs;let{isClean:sr,my:ac}=jt,lc=Di,uc=Yo,cc=Qr;function Bs(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>Bs(o,t)):(n==="object"&&i!==null&&(i=Bs(i)),t[r]=i)}return t}let Us=class{constructor(e={}){this.raws={},this[sr]=!1,this[ac]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Bs(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new lc(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[sr]){this[sr]=!1;let e=this;for(;e=e.parent;)e[sr]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
32
+ `?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new uc().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let a=this[o];if(Array.isArray(a))r[o]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[o]=a.toJSON(null,t);else if(o==="source"){let l=t.get(a.input);l==null&&(l=n,t.set(a.input,n),n++),r[o]={end:a.end,inputId:l,start:a.start}}else r[o]=a}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=cc){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}};var qr=Us;Us.default=Us;let hc=qr,Ws=class extends hc{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=le(D({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var es=Ws;Ws.default=Ws;let fc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",dc=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},pc=(s=21)=>{let e="",t=s;for(;t--;)e+=fc[Math.random()*64|0];return e};var mc={nanoid:pc,customAlphabet:dc};let{SourceMapConsumer:On,SourceMapGenerator:Dn}=Ee,{existsSync:gc,readFileSync:yc}=Ee,{dirname:gs,join:vc}=Ee;function wc(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let zs=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=gs(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new On(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return wc(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=gs(e),gc(e))return this.mapFile=e,yc(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof On)return Dn.fromSourceMap(t).toString();if(t instanceof Dn)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=vc(gs(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Zo=zs;zs.default=zs;let{SourceMapConsumer:bc,SourceMapGenerator:Sc}=Ee,{fileURLToPath:Tn,pathToFileURL:ir}=Ee,{isAbsolute:Vs,resolve:Gs}=Ee,{nanoid:Cc}=mc,ys=Ee,kn=Di,Ec=Zo,vs=Symbol("fromOffsetCache"),Ic=!!(bc&&Sc),_n=!!(Gs&&Vs),Lr=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!_n||/^\w+:\/\//.test(t.from)||Vs(t.from)?this.file=t.from:this.file=Gs(t.from)),_n&&Ic){let r=new Ec(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Cc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,a;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);o=h.line,a=h.col}else o=c.line,a=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let l=this.origin(t,r,o,a);return l?n=new kn(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):n=new kn(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:a,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:a,endLine:o,line:t,source:this.css},this.file&&(ir&&(n.input.url=ir(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[vs])r=this[vs];else{let n=this.css.split(`
33
+ `);r=new Array(n.length);let o=0;for(let a=0,l=n.length;a<l;a++)r[a]=o,o+=n[a].length+1;this[vs]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Gs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let a;typeof r=="number"&&(a=n.originalPositionFor({column:i,line:r}));let l;Vs(o.source)?l=ir(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||ir(this.map.mapFile));let u={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:l.toString()};if(l.protocol==="file:")if(Tn)u.file=Tn(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=D({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var ts=Lr;Lr.default=Lr;ys&&ys.registerInput&&ys.registerInput(Lr);let{SourceMapConsumer:Xo,SourceMapGenerator:Mr}=Ee,{dirname:Nr,relative:Jo,resolve:Ko,sep:Qo}=Ee,{pathToFileURL:$n}=Ee,xc=ts,Mc=!!(Xo&&Mr),Nc=!!(Nr&&Ko&&Jo&&Qo),Rc=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,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(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
34
34
  `;this.css.includes(`\r
35
35
  `)&&(t=`\r
36
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||xr(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Ho(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Ic&&Ec&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ir.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ir({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 Ir({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=a.match(/\n/g),n?(e+=n.length,o=a.lastIndexOf(`
37
- `),t=a.length-o):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?xr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=xr(Zo(r,this.mapOpts.annotation)));let i=Yo(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Cc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Tn){let r=Tn(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Xo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Jo=xc;let Mc=Kr,Vs=class extends Mc{constructor(e){super(e),this.type="comment"}};var es=Vs;Vs.default=Vs;let{isClean:Ko,my:Qo}=Gt,qo=Qr,ea=es,Nc=Kr,ta,Ri,Oi,ra;function sa(s){return s.map(e=>(e.nodes&&(e.nodes=sa(e.nodes)),delete e.source,e))}function ia(s){if(s[Ko]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)ia(e)}let Le=class na extends Nc{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of n)this.proxyOf.nodes.splice(r,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<=o&&(this.indexes[a]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=sa(ta(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new qo(e)]}else if(e.selector)e=[new Ri(e)];else if(e.name)e=[new Oi(e)];else if(e.text)e=[new ea(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Qo]||na.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Ko]&&ia(i),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};Le.registerParse=s=>{ta=s};Le.registerRule=s=>{Ri=s};Le.registerAtRule=s=>{Oi=s};Le.registerRoot=s=>{ra=s};var qe=Le;Le.default=Le;Le.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Oi.prototype):s.type==="rule"?Object.setPrototypeOf(s,Ri.prototype):s.type==="decl"?Object.setPrototypeOf(s,qo.prototype):s.type==="comment"?Object.setPrototypeOf(s,ea.prototype):s.type==="root"&&Object.setPrototypeOf(s,ra.prototype),s[Qo]=!0,s.nodes&&s.nodes.forEach(e=>{Le.rebuild(e)})};let Ac=qe,oa,aa,_t=class extends Ac{constructor(e){super(D({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new oa(new aa,this,e).stringify()}};_t.registerLazyResult=s=>{oa=s};_t.registerProcessor=s=>{aa=s};var Di=_t;_t.default=_t;let Gs=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var la=Gs;Gs.default=Gs;let Rc=la,js=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Rc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Ti=js;js.default=js;const vs=39,kn=34,sr=92,_n=47,ir=10,St=32,nr=12,or=9,ar=13,Oc=91,Dc=93,Tc=40,kc=41,_c=123,$c=125,Pc=59,Lc=42,Fc=58,Bc=64,lr=/[\t\n\f\r "#'()/;[\\\]{}]/g,ur=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Uc=/.[\r\n"'(/\\]/,$n=/[\da-f]/i;var Wc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,a,l,u,c,h,f,p,d,m=r.length,g=0,y=[],w=[];function v(){return g}function C(b){throw e.error("Unclosed "+b,g)}function E(){return w.length===0&&g>=m}function A(b){if(w.length)return w.pop();if(g>=m)return;let N=b?b.ignoreUnclosed:!1;switch(n=r.charCodeAt(g),n){case ir:case St:case or:case ar:case nr:{o=g;do o+=1,n=r.charCodeAt(o);while(n===St||n===ir||n===or||n===ar||n===nr);d=["space",r.slice(g,o)],g=o-1;break}case Oc:case Dc:case _c:case $c:case Fc:case Pc:case kc:{let k=String.fromCharCode(n);d=[k,k,g];break}case Tc:{if(f=y.length?y.pop()[1]:"",p=r.charCodeAt(g+1),f==="url"&&p!==vs&&p!==kn&&p!==St&&p!==ir&&p!==or&&p!==nr&&p!==ar){o=g;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||N){o=g;break}else C("bracket");for(h=o;r.charCodeAt(h-1)===sr;)h-=1,c=!c}while(c);d=["brackets",r.slice(g,o+1),g,o],g=o}else o=r.indexOf(")",g+1),l=r.slice(g,o+1),o===-1||Uc.test(l)?d=["(","(",g]:(d=["brackets",l,g,o],g=o);break}case vs:case kn:{a=n===vs?"'":'"',o=g;do{if(c=!1,o=r.indexOf(a,o+1),o===-1)if(i||N){o=g+1;break}else C("string");for(h=o;r.charCodeAt(h-1)===sr;)h-=1,c=!c}while(c);d=["string",r.slice(g,o+1),g,o],g=o;break}case Bc:{lr.lastIndex=g+1,lr.test(r),lr.lastIndex===0?o=r.length-1:o=lr.lastIndex-2,d=["at-word",r.slice(g,o+1),g,o],g=o;break}case sr:{for(o=g,u=!0;r.charCodeAt(o+1)===sr;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==_n&&n!==St&&n!==ir&&n!==or&&n!==ar&&n!==nr&&(o+=1,$n.test(r.charAt(o)))){for(;$n.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===St&&(o+=1)}d=["word",r.slice(g,o+1),g,o],g=o;break}default:{n===_n&&r.charCodeAt(g+1)===Lc?(o=r.indexOf("*/",g+2)+1,o===0&&(i||N?o=r.length:C("comment")),d=["comment",r.slice(g,o+1),g,o],g=o):(ur.lastIndex=g+1,ur.test(r),ur.lastIndex===0?o=r.length-1:o=ur.lastIndex-2,d=["word",r.slice(g,o+1),g,o],y.push(d),g=o);break}}return g++,d}function R(b){w.push(b)}return{back:R,endOfFile:E,nextToken:A,position:v}};let ua=qe,Pr=class extends ua{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var ki=Pr;Pr.default=Pr;ua.registerAtRule(Pr);let ca=qe,ha,fa,dt=class extends ca{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new ha(new fa,this,e).stringify()}};dt.registerLazyResult=s=>{ha=s};dt.registerProcessor=s=>{fa=s};var jt=dt;dt.default=dt;ca.registerRoot(dt);let $t={comma(s){return $t.split(s,[","],!0)},space(s){let e=[" ",`
38
- `," "];return $t.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var da=$t;$t.default=$t;let pa=qe,zc=da,Lr=class extends pa{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return zc.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var _i=Lr;Lr.default=Lr;pa.registerRule(Lr);let Vc=Qr,Gc=Wc,jc=es,Hc=ki,Yc=jt,Pn=_i;const Ln={empty:!0,space:!0};function Zc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Xc=class{constructor(e){this.input=e,this.root=new Yc,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Hc;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(n=l.length-1,i=l[n];i&&i[0]==="space";)i=l[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new jc;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Gc(this.input)}decl(e,t){let r=new Vc;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Zc(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let p=c[f][0];if(h.trim().indexOf("!")===0&&p!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Pn;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(a&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)n=r[f],o=n[0],o==="space"&&f===a-1&&!i?u=!1:o==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!Ln[h]&&!Ln[c]?l.slice(-1)===","?u=!1:l+=n[1]:u=!1):l+=n[1];if(!u){let f=r.reduce((p,d)=>p+d[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Pn;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Jc=Xc;let Kc=qe,Qc=Jc,qc=qr;function Fr(s,e){let t=new qc(s,e),r=new Qc(t);try{r.parse()}catch(i){throw i}return r.root}var $i=Fr;Fr.default=Fr;Kc.registerParse(Fr);let{isClean:Re,my:eh}=Gt,th=Jo,rh=Jr,sh=qe,ih=Di;let Fn=Ti,nh=$i,oh=jt;const ah={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},lh={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},uh={Once:!0,postcssPlugin:!0,prepare:!0},pt=0;function Ct(s){return typeof s=="object"&&typeof s.then=="function"}function ma(s){let e=!1,t=ah[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,pt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,pt,t+"Exit"]:[t,t+"Exit"]}function Bn(s){let e;return s.type==="document"?e=["Document",pt,"DocumentExit"]:s.type==="root"?e=["Root",pt,"RootExit"]:e=ma(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Hs(s){return s[Re]=!1,s.nodes&&s.nodes.forEach(e=>Hs(e)),s}let Ys={},mt=class ga{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Hs(t);else if(t instanceof ga||t instanceof Fn)i=Hs(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=nh;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[eh]&&sh.rebuild(i)}this.result=new Fn(e,i,r),this.helpers=ue(D({},Ys),{postcss:Ys,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?D(D({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!lh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!uh[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Ct(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Re];){e[Re]=!0;let t=[Bn(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ct(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Ct(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(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();let e=this.result.opts,t=rh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new th(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Ct(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Re];)e[Re]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ct(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!a[Re]){a[Re]=!0,e.push(Bn(a));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===pt){r.nodes&&r.nodes.length&&(r[Re]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Re]=!0;let t=ma(e);for(let r of t)if(r===pt)e.nodes&&e.each(i=>{i[Re]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};mt.registerPostcss=s=>{Ys=s};var ya=mt;mt.default=mt;oh.registerLazyResult(mt);ih.registerLazyResult(mt);let ch=Jo,hh=Jr;let fh=$i;const dh=Ti;let Zs=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=hh;this.result=new dh(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new ch(n,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=fh;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var ph=Zs;Zs.default=Zs;let mh=ph,gh=ya,yh=Di,vh=jt,Pt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new mh(this,e,t):new gh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var wh=Pt;Pt.default=Pt;vh.registerProcessor(Pt);yh.registerProcessor(Pt);let bh=Qr,Sh=jo,Ch=es,Eh=ki,Ih=qr,xh=jt,Mh=_i;function Lt(s,e){if(Array.isArray(s))return s.map(o=>Lt(o));let i=s,{inputs:t}=i,r=rt(i,["inputs"]);if(t){e=[];for(let o of t){let a=ue(D({},o),{__proto__:Ih.prototype});a.map&&(a.map=ue(D({},a.map),{__proto__:Sh.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(o=>Lt(o,e))),r.source){let n=r.source,{inputId:o}=n,a=rt(n,["inputId"]);r.source=a,o!=null&&(r.source.input=e[o])}if(r.type==="root")return new xh(r);if(r.type==="decl")return new bh(r);if(r.type==="rule")return new Mh(r);if(r.type==="comment")return new Ch(r);if(r.type==="atrule")return new Eh(r);throw new Error("Unknown node type: "+s.type)}var Nh=Lt;Lt.default=Lt;let Ah=Ai,va=Qr,Rh=ya,Oh=qe,Pi=wh,Dh=Jr,Th=Nh,wa=Di,kh=la,ba=es,Sa=ki,_h=Ti,$h=qr,Ph=$i,Lh=da,Ca=_i,Ea=jt,Fh=Kr;function H(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Pi(s)}H.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
36
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Nr(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Xo(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Nc&&Mc&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Mr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Mr({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 Mr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=a.match(/\n/g),n?(e+=n.length,o=a.lastIndexOf(`
37
+ `),t=a.length-o):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Nr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Nr(Ko(r,this.mapOpts.annotation)));let i=Jo(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new xc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if($n){let r=$n(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Qo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var qo=Rc;let Ac=qr,js=class extends Ac{constructor(e){super(e),this.type="comment"}};var rs=js;js.default=js;let{isClean:ea,my:ta}=jt,ra=es,sa=rs,Oc=qr,ia,Ti,ki,na;function oa(s){return s.map(e=>(e.nodes&&(e.nodes=oa(e.nodes)),delete e.source,e))}function aa(s){if(s[ea]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)aa(e)}let $e=class la extends Oc{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of n)this.proxyOf.nodes.splice(r,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<=o&&(this.indexes[a]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=oa(ia(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new ra(e)]}else if(e.selector)e=[new Ti(e)];else if(e.name)e=[new ki(e)];else if(e.text)e=[new sa(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[ta]||la.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[ea]&&aa(i),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};$e.registerParse=s=>{ia=s};$e.registerRule=s=>{Ti=s};$e.registerAtRule=s=>{ki=s};$e.registerRoot=s=>{na=s};var qe=$e;$e.default=$e;$e.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,ki.prototype):s.type==="rule"?Object.setPrototypeOf(s,Ti.prototype):s.type==="decl"?Object.setPrototypeOf(s,ra.prototype):s.type==="comment"?Object.setPrototypeOf(s,sa.prototype):s.type==="root"&&Object.setPrototypeOf(s,na.prototype),s[ta]=!0,s.nodes&&s.nodes.forEach(e=>{$e.rebuild(e)})};let Dc=qe,ua,ca,$t=class extends Dc{constructor(e){super(D({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new ua(new ca,this,e).stringify()}};$t.registerLazyResult=s=>{ua=s};$t.registerProcessor=s=>{ca=s};var _i=$t;$t.default=$t;let Hs=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var ha=Hs;Hs.default=Hs;let Tc=ha,Ys=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Tc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var $i=Ys;Ys.default=Ys;const ws=39,Pn=34,nr=92,Ln=47,or=10,Ct=32,ar=12,lr=9,ur=13,kc=91,_c=93,$c=40,Pc=41,Lc=123,Fc=125,Bc=59,Uc=42,Wc=58,zc=64,cr=/[\t\n\f\r "#'()/;[\\\]{}]/g,hr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Vc=/.[\r\n"'(/\\]/,Fn=/[\da-f]/i;var Gc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,a,l,u,c,h,f,p,d,m=r.length,g=0,y=[],w=[];function v(){return g}function C(b){throw e.error("Unclosed "+b,g)}function E(){return w.length===0&&g>=m}function R(b){if(w.length)return w.pop();if(g>=m)return;let N=b?b.ignoreUnclosed:!1;switch(n=r.charCodeAt(g),n){case or:case Ct:case lr:case ur:case ar:{o=g;do o+=1,n=r.charCodeAt(o);while(n===Ct||n===or||n===lr||n===ur||n===ar);d=["space",r.slice(g,o)],g=o-1;break}case kc:case _c:case Lc:case Fc:case Wc:case Bc:case Pc:{let k=String.fromCharCode(n);d=[k,k,g];break}case $c:{if(f=y.length?y.pop()[1]:"",p=r.charCodeAt(g+1),f==="url"&&p!==ws&&p!==Pn&&p!==Ct&&p!==or&&p!==lr&&p!==ar&&p!==ur){o=g;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||N){o=g;break}else C("bracket");for(h=o;r.charCodeAt(h-1)===nr;)h-=1,c=!c}while(c);d=["brackets",r.slice(g,o+1),g,o],g=o}else o=r.indexOf(")",g+1),l=r.slice(g,o+1),o===-1||Vc.test(l)?d=["(","(",g]:(d=["brackets",l,g,o],g=o);break}case ws:case Pn:{a=n===ws?"'":'"',o=g;do{if(c=!1,o=r.indexOf(a,o+1),o===-1)if(i||N){o=g+1;break}else C("string");for(h=o;r.charCodeAt(h-1)===nr;)h-=1,c=!c}while(c);d=["string",r.slice(g,o+1),g,o],g=o;break}case zc:{cr.lastIndex=g+1,cr.test(r),cr.lastIndex===0?o=r.length-1:o=cr.lastIndex-2,d=["at-word",r.slice(g,o+1),g,o],g=o;break}case nr:{for(o=g,u=!0;r.charCodeAt(o+1)===nr;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Ln&&n!==Ct&&n!==or&&n!==lr&&n!==ur&&n!==ar&&(o+=1,Fn.test(r.charAt(o)))){for(;Fn.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ct&&(o+=1)}d=["word",r.slice(g,o+1),g,o],g=o;break}default:{n===Ln&&r.charCodeAt(g+1)===Uc?(o=r.indexOf("*/",g+2)+1,o===0&&(i||N?o=r.length:C("comment")),d=["comment",r.slice(g,o+1),g,o],g=o):(hr.lastIndex=g+1,hr.test(r),hr.lastIndex===0?o=r.length-1:o=hr.lastIndex-2,d=["word",r.slice(g,o+1),g,o],y.push(d),g=o);break}}return g++,d}function O(b){w.push(b)}return{back:O,endOfFile:E,nextToken:R,position:v}};let fa=qe,Fr=class extends fa{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Pi=Fr;Fr.default=Fr;fa.registerAtRule(Fr);let da=qe,pa,ma,dt=class extends da{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new pa(new ma,this,e).stringify()}};dt.registerLazyResult=s=>{pa=s};dt.registerProcessor=s=>{ma=s};var Ht=dt;dt.default=dt;da.registerRoot(dt);let Pt={comma(s){return Pt.split(s,[","],!0)},space(s){let e=[" ",`
38
+ `," "];return Pt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var ga=Pt;Pt.default=Pt;let ya=qe,jc=ga,Br=class extends ya{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return jc.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Li=Br;Br.default=Br;ya.registerRule(Br);let Hc=es,Yc=Gc,Zc=rs,Xc=Pi,Jc=Ht,Bn=Li;const Un={empty:!0,space:!0};function Kc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Qc=class{constructor(e){this.input=e,this.root=new Jc,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Xc;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(n=l.length-1,i=l[n];i&&i[0]==="space";)i=l[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new Zc;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Yc(this.input)}decl(e,t){let r=new Hc;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Kc(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let p=c[f][0];if(h.trim().indexOf("!")===0&&p!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Bn;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(a&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)n=r[f],o=n[0],o==="space"&&f===a-1&&!i?u=!1:o==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!Un[h]&&!Un[c]?l.slice(-1)===","?u=!1:l+=n[1]:u=!1):l+=n[1];if(!u){let f=r.reduce((p,d)=>p+d[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Bn;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var qc=Qc;let eh=qe,th=qc,rh=ts;function Ur(s,e){let t=new rh(s,e),r=new th(t);try{r.parse()}catch(i){throw i}return r.root}var Fi=Ur;Ur.default=Ur;eh.registerParse(Ur);let{isClean:Re,my:sh}=jt,ih=qo,nh=Qr,oh=qe,ah=_i;let Wn=$i,lh=Fi,uh=Ht;const ch={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},hh={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},fh={Once:!0,postcssPlugin:!0,prepare:!0},pt=0;function Et(s){return typeof s=="object"&&typeof s.then=="function"}function va(s){let e=!1,t=ch[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,pt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,pt,t+"Exit"]:[t,t+"Exit"]}function zn(s){let e;return s.type==="document"?e=["Document",pt,"DocumentExit"]:s.type==="root"?e=["Root",pt,"RootExit"]:e=va(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Zs(s){return s[Re]=!1,s.nodes&&s.nodes.forEach(e=>Zs(e)),s}let Xs={},mt=class wa{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Zs(t);else if(t instanceof wa||t instanceof Wn)i=Zs(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=lh;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[sh]&&oh.rebuild(i)}this.result=new Wn(e,i,r),this.helpers=le(D({},Xs),{postcss:Xs,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?D(D({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!hh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!fh[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Et(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Re];){e[Re]=!0;let t=[zn(e)];for(;t.length>0;){let r=this.visitTick(t);if(Et(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Et(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(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();let e=this.result.opts,t=nh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new ih(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Et(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Re];)e[Re]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Et(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!a[Re]){a[Re]=!0,e.push(zn(a));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===pt){r.nodes&&r.nodes.length&&(r[Re]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Re]=!0;let t=va(e);for(let r of t)if(r===pt)e.nodes&&e.each(i=>{i[Re]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};mt.registerPostcss=s=>{Xs=s};var ba=mt;mt.default=mt;uh.registerLazyResult(mt);ah.registerLazyResult(mt);let dh=qo,ph=Qr;let mh=Fi;const gh=$i;let Js=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=ph;this.result=new gh(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new dh(n,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=mh;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var yh=Js;Js.default=Js;let vh=yh,wh=ba,bh=_i,Sh=Ht,Lt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new vh(this,e,t):new wh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ch=Lt;Lt.default=Lt;Sh.registerProcessor(Lt);bh.registerProcessor(Lt);let Eh=es,Ih=Zo,xh=rs,Mh=Pi,Nh=ts,Rh=Ht,Ah=Li;function Ft(s,e){if(Array.isArray(s))return s.map(o=>Ft(o));let i=s,{inputs:t}=i,r=rt(i,["inputs"]);if(t){e=[];for(let o of t){let a=le(D({},o),{__proto__:Nh.prototype});a.map&&(a.map=le(D({},a.map),{__proto__:Ih.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(o=>Ft(o,e))),r.source){let n=r.source,{inputId:o}=n,a=rt(n,["inputId"]);r.source=a,o!=null&&(r.source.input=e[o])}if(r.type==="root")return new Rh(r);if(r.type==="decl")return new Eh(r);if(r.type==="rule")return new Ah(r);if(r.type==="comment")return new xh(r);if(r.type==="atrule")return new Mh(r);throw new Error("Unknown node type: "+s.type)}var Oh=Ft;Ft.default=Ft;let Dh=Di,Sa=es,Th=ba,kh=qe,Bi=Ch,_h=Qr,$h=Oh,Ca=_i,Ph=ha,Ea=rs,Ia=Pi,Lh=$i,Fh=ts,Bh=Fi,Uh=ga,xa=Li,Ma=Ht,Wh=qr;function H(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Bi(s)}H.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
39
39
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
40
- https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Pi().version,a}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,a,l){return H([i(l)]).process(o,a)},i};H.stringify=Dh;H.parse=Ph;H.fromJSON=Th;H.list=Lh;H.comment=s=>new ba(s);H.atRule=s=>new Sa(s);H.decl=s=>new va(s);H.rule=s=>new Ca(s);H.root=s=>new Ea(s);H.document=s=>new wa(s);H.CssSyntaxError=Ah;H.Declaration=va;H.Container=Oh;H.Processor=Pi;H.Document=wa;H.Comment=ba;H.Warning=kh;H.AtRule=Sa;H.Result=_h;H.Input=$h;H.Rule=Ca;H.Root=Ea;H.Node=Fh;Rh.registerPostcss(H);var Bh=H;H.default=H;const te=Ku(Bh);te.stringify;te.fromJSON;te.plugin;te.parse;te.list;te.document;te.comment;te.atRule;te.rule;te.decl;te.root;te.CssSyntaxError;te.Declaration;te.Container;te.Processor;te.Document;te.Comment;te.Warning;te.AtRule;te.Result;te.Input;te.Rule;te.Root;te.Node;const Un={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 Uh(s){let e=Un[s.tagName]?Un[s.tagName]:s.tagName;return e==="link"&&s.attributes._cssText&&(e="style"),e}function ts(s,e){const t=e==null?void 0:e.stylesWithHoverClass.get(s);if(t)return t;let r=s;try{r=te([Xu,Ju]).process(s).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e==null||e.stylesWithHoverClass.set(s,r),r}function Wn(){return{stylesWithHoverClass:new Map}}function Wh(s,e,t,r){const i=[];for(const l of s.childNodes)l.type===_.Text&&i.push(l);const n=e.split("/* rr_split */");for(;n.length>1&&n.length>i.length;)n.splice(-2,2,n.slice(-2).join(""));let o="";t&&(o=ts(n.join(""),r));let a=0;for(let l=0;l<i.length&&l!==n.length;l++){const u=i[l];if(!t)u.textContent=n[l];else if(l<n.length-1){let c=a,h=n[l+1].length;h=Math.min(h,30);let f=!1;for(;h>2;h--){const p=n[l+1].substring(0,h),d=o.substring(a).indexOf(p);if(f=d!==-1,f){c+=d;break}}f||(c+=n[l].length),u.textContent=o.substring(a,c),a=c}else u.textContent=o.substring(a)}}function zh(s,e,t,r){const{doc:i,hackCss:n,cache:o}=r;s.childNodes.length?Wh(s,t,n,o):(n&&(t=ts(t,o)),e.appendChild(i.createTextNode(t)))}function Vh(s,e){var t;const{doc:r,hackCss:i,cache:n}=e;switch(s.type){case _.Document:return r.implementation.createDocument(null,"",null);case _.DocumentType:return r.implementation.createDocumentType(s.name||"html",s.publicId,s.systemId);case _.Element:{const o=Uh(s);let a;s.isSVG?a=r.createElementNS("http://www.w3.org/2000/svg",o):(s.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(s.tagName)&&r.defaultView.customElements.define(s.tagName,class extends r.defaultView.HTMLElement{}),a=r.createElement(o));const l={};for(const u in s.attributes){if(!Object.prototype.hasOwnProperty.call(s.attributes,u))continue;let c=s.attributes[u];if(!(o==="option"&&u==="selected"&&c===!1)&&c!==null){if(c===!0&&(c=""),u.startsWith("rr_")){l[u]=c;continue}if(typeof c=="string"){if(o==="style"&&u==="_cssText"){zh(s,a,c,e);continue}else if(o==="textarea"&&u==="value"){a.appendChild(r.createTextNode(c)),s.childNodes=[];continue}}try{if(s.isSVG&&u==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",u,c.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")a.setAttribute("_"+u,c.toString());else if(o==="meta"&&s.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){a.setAttribute("csp-content",c.toString());continue}else o==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||o==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Ii(s.attributes.href)==="js"||(o==="img"&&s.attributes.srcset&&s.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",s.attributes.srcset):a.setAttribute(u,c.toString()))}catch(h){}}}for(const u in l){const c=l[u];if(o==="canvas"&&u==="rr_dataURL"){const h=r.createElement("img");h.onload=()=>{const f=a.getContext("2d");f&&f.drawImage(h,0,0,h.width,h.height)},h.src=c.toString(),a.RRNodeType&&(a.rr_dataURL=c.toString())}else if(o==="img"&&u==="rr_dataURL"){const h=a;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",s.attributes.src),h.src=c.toString())}if(u==="rr_width")a.style.setProperty("width",c.toString());else if(u==="rr_height")a.style.setProperty("height",c.toString());else if(u==="rr_mediaCurrentTime"&&typeof c=="number")a.currentTime=c;else if(u==="rr_mediaState")switch(c){case"played":a.play().catch(h=>console.warn("media playback error",h));break;case"paused":a.pause();break}else u==="rr_mediaPlaybackRate"&&typeof c=="number"?a.playbackRate=c:u==="rr_mediaMuted"&&typeof c=="boolean"?a.muted=c:u==="rr_mediaLoop"&&typeof c=="boolean"?a.loop=c:u==="rr_mediaVolume"&&typeof c=="number"?a.volume=c:u==="rr_open_mode"&&a.setAttribute("rr_open_mode",c)}if(s.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a}case _.Text:return s.isStyle&&i?r.createTextNode(ts(s.textContent,n)):r.createTextNode(s.textContent);case _.CDATA:return r.createCDATASection(s.textContent);case _.Comment:return r.createComment(s.textContent);default:return null}}function Dt(s,e){const{doc:t,mirror:r,skipChild:i=!1,hackCss:n=!0,afterAppend:o,cache:a}=e;if(r.has(s.id)){const u=r.getNode(s.id),c=r.getMeta(u);if(gu(c,s))return r.getNode(s.id)}let l=Vh(s,{doc:t,hackCss:n,cache:a});if(!l)return null;if(s.rootId&&r.getNode(s.rootId)!==t&&r.replace(s.rootId,t),s.type===_.Document&&(t.close(),t.open(),s.compatMode==="BackCompat"&&s.childNodes&&s.childNodes[0].type!==_.DocumentType&&(s.childNodes[0].type===_.Element&&"xmlns"in s.childNodes[0].attributes&&s.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),l=t),r.add(l,s),(s.type===_.Document||s.type===_.Element)&&!i)for(const u of s.childNodes){const c=Dt(u,{doc:t,mirror:r,skipChild:!1,hackCss:n,afterAppend:o,cache:a});if(!c){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&Ci(l)&&l.shadowRoot)l.shadowRoot.appendChild(c);else if(s.type===_.Document&&u.type==_.Element){const h=c;let f=null;h.childNodes.forEach(p=>{p.nodeName==="BODY"&&(f=p)}),f?(h.removeChild(f),l.appendChild(c),h.appendChild(f)):l.appendChild(c)}else l.appendChild(c);o&&o(c,u.id)}return l}function Gh(s,e){function t(r){e(r)}for(const r of s.getIds())s.has(r)&&t(s.getNode(r))}function jh(s,e){const t=e.getMeta(s);if((t==null?void 0:t.type)!==_.Element)return;const r=s;for(const i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;const n=t.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=n),i==="rr_scrollTop"&&(r.scrollTop=n)}}function Hh(s,e){const{doc:t,onVisit:r,hackCss:i=!0,afterAppend:n,cache:o,mirror:a=new Ei}=e,l=Dt(s,{doc:t,mirror:a,skipChild:!1,hackCss:i,afterAppend:n,cache:o});return Gh(a,u=>{r&&r(u),jh(u,a)}),l}var Yh=Object.defineProperty,Zh=(s,e,t)=>e in s?Yh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,I=(s,e,t)=>Zh(s,typeof e!="symbol"?e+"":e,t),Xh=Object.defineProperty,Jh=(s,e,t)=>e in s?Xh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,zn=(s,e,t)=>Jh(s,typeof e!="symbol"?e+"":e,t);let Kh=class{constructor(){zn(this,"idNodeMap",new Map),zn(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Qh(){return new Kh}const qh=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],ef=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Ia=new WeakSet,tf=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(tf.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();qh.includes(r)&&Ia.add(this)}};const rf=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){rf.call(this,s,e,t)};function Vn(){document.querySelectorAll("*").forEach(e=>{ef.forEach(t=>{e.hasAttribute(t)&&Ia.add(e)})})}document.readyState==="complete"||document.readyState==="interactive"?Vn():document.addEventListener("DOMContentLoaded",Vn);function sf(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function nf(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Li={exports:{}},q=String,xa=function(){return{isColorSupported:!1,reset:q,bold:q,dim:q,italic:q,underline:q,inverse:q,hidden:q,strikethrough:q,black:q,red:q,green:q,yellow:q,blue:q,magenta:q,cyan:q,white:q,gray:q,bgBlack:q,bgRed:q,bgGreen:q,bgYellow:q,bgBlue:q,bgMagenta:q,bgCyan:q,bgWhite:q}};Li.exports=xa();Li.exports.createColors=xa;var of=Li.exports;const af={},lf=Object.freeze(Object.defineProperty({__proto__:null,default:af},Symbol.toStringTag,{value:"Module"})),Ee=nf(lf);let Gn=of,jn=Ee,Xs=class Ma extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Ma)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Gn.isColorSupported),jn&&e&&(t=jn(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,a,l;if(e){let{bold:u,gray:c,red:h}=Gn.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let p=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
40
+ https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Bi().version,a}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,a,l){return H([i(l)]).process(o,a)},i};H.stringify=_h;H.parse=Bh;H.fromJSON=$h;H.list=Uh;H.comment=s=>new Ea(s);H.atRule=s=>new Ia(s);H.decl=s=>new Sa(s);H.rule=s=>new xa(s);H.root=s=>new Ma(s);H.document=s=>new Ca(s);H.CssSyntaxError=Dh;H.Declaration=Sa;H.Container=kh;H.Processor=Bi;H.Document=Ca;H.Comment=Ea;H.Warning=Ph;H.AtRule=Ia;H.Result=Lh;H.Input=Fh;H.Rule=xa;H.Root=Ma;H.Node=Wh;Th.registerPostcss(H);var zh=H;H.default=H;const te=ec(zh);te.stringify;te.fromJSON;te.plugin;te.parse;te.list;te.document;te.comment;te.atRule;te.rule;te.decl;te.root;te.CssSyntaxError;te.Declaration;te.Container;te.Processor;te.Document;te.Comment;te.Warning;te.AtRule;te.Result;te.Input;te.Rule;te.Root;te.Node;const Vn={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 Vh(s){let e=Vn[s.tagName]?Vn[s.tagName]:s.tagName;return e==="link"&&s.attributes._cssText&&(e="style"),e}function ss(s,e){const t=e==null?void 0:e.stylesWithHoverClass.get(s);if(t)return t;let r=s;try{r=te([Qu,qu]).process(s).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e==null||e.stylesWithHoverClass.set(s,r),r}function Gn(){return{stylesWithHoverClass:new Map}}function Gh(s,e,t,r){const i=[];for(const l of s.childNodes)l.type===_.Text&&i.push(l);const n=e.split("/* rr_split */");for(;n.length>1&&n.length>i.length;)n.splice(-2,2,n.slice(-2).join(""));let o="";t&&(o=ss(n.join(""),r));let a=0;for(let l=0;l<i.length&&l!==n.length;l++){const u=i[l];if(!t)u.textContent=n[l];else if(l<n.length-1){let c=a,h=n[l+1].length;h=Math.min(h,30);let f=!1;for(;h>2;h--){const p=n[l+1].substring(0,h),d=o.substring(a).indexOf(p);if(f=d!==-1,f){c+=d;break}}f||(c+=n[l].length),u.textContent=o.substring(a,c),a=c}else u.textContent=o.substring(a)}}function jh(s,e,t,r){const{doc:i,hackCss:n,cache:o}=r;s.childNodes.length?Gh(s,t,n,o):(n&&(t=ss(t,o)),e.appendChild(i.createTextNode(t)))}function Hh(s,e){var t;const{doc:r,hackCss:i,cache:n}=e;switch(s.type){case _.Document:return r.implementation.createDocument(null,"",null);case _.DocumentType:return r.implementation.createDocumentType(s.name||"html",s.publicId,s.systemId);case _.Element:{const o=Vh(s);let a;s.isSVG?a=r.createElementNS("http://www.w3.org/2000/svg",o):(s.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(s.tagName)&&r.defaultView.customElements.define(s.tagName,class extends r.defaultView.HTMLElement{}),a=r.createElement(o));const l={};for(const u in s.attributes){if(!Object.prototype.hasOwnProperty.call(s.attributes,u))continue;let c=s.attributes[u];if(!(o==="option"&&u==="selected"&&c===!1)&&c!==null){if(c===!0&&(c=""),u.startsWith("rr_")){l[u]=c;continue}if(typeof c=="string"){if(o==="style"&&u==="_cssText"){jh(s,a,c,e);continue}else if(o==="textarea"&&u==="value"){a.appendChild(r.createTextNode(c)),s.childNodes=[];continue}}try{if(s.isSVG&&u==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",u,c.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")a.setAttribute("_"+u,c.toString());else if(o==="meta"&&s.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){a.setAttribute("csp-content",c.toString());continue}else o==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||o==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Ni(s.attributes.href)==="js"||(o==="img"&&s.attributes.srcset&&s.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",s.attributes.srcset):a.setAttribute(u,c.toString()))}catch(h){}}}for(const u in l){const c=l[u];if(o==="canvas"&&u==="rr_dataURL"){const h=r.createElement("img");h.onload=()=>{const f=a.getContext("2d");f&&f.drawImage(h,0,0,h.width,h.height)},h.src=c.toString(),a.RRNodeType&&(a.rr_dataURL=c.toString())}else if(o==="img"&&u==="rr_dataURL"){const h=a;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",s.attributes.src),h.src=c.toString())}if(u==="rr_width")a.style.setProperty("width",c.toString());else if(u==="rr_height")a.style.setProperty("height",c.toString());else if(u==="rr_mediaCurrentTime"&&typeof c=="number")a.currentTime=c;else if(u==="rr_mediaState")switch(c){case"played":a.play().catch(h=>console.warn("media playback error",h));break;case"paused":a.pause();break}else u==="rr_mediaPlaybackRate"&&typeof c=="number"?a.playbackRate=c:u==="rr_mediaMuted"&&typeof c=="boolean"?a.muted=c:u==="rr_mediaLoop"&&typeof c=="boolean"?a.loop=c:u==="rr_mediaVolume"&&typeof c=="number"?a.volume=c:u==="rr_open_mode"&&a.setAttribute("rr_open_mode",c)}if(s.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a}case _.Text:return s.isStyle&&i?r.createTextNode(ss(s.textContent,n)):r.createTextNode(s.textContent);case _.CDATA:return r.createCDATASection(s.textContent);case _.Comment:return r.createComment(s.textContent);default:return null}}function Tt(s,e){const{doc:t,mirror:r,skipChild:i=!1,hackCss:n=!0,afterAppend:o,cache:a}=e;if(r.has(s.id)){const u=r.getNode(s.id),c=r.getMeta(u);if(wu(c,s))return r.getNode(s.id)}let l=Hh(s,{doc:t,hackCss:n,cache:a});if(!l)return null;if(s.rootId&&r.getNode(s.rootId)!==t&&r.replace(s.rootId,t),s.type===_.Document&&(t.close(),t.open(),s.compatMode==="BackCompat"&&s.childNodes&&s.childNodes[0].type!==_.DocumentType&&(s.childNodes[0].type===_.Element&&"xmlns"in s.childNodes[0].attributes&&s.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),l=t),r.add(l,s),(s.type===_.Document||s.type===_.Element)&&!i)for(const u of s.childNodes){const c=Tt(u,{doc:t,mirror:r,skipChild:!1,hackCss:n,afterAppend:o,cache:a});if(!c){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&xi(l)&&l.shadowRoot)l.shadowRoot.appendChild(c);else if(s.type===_.Document&&u.type==_.Element){const h=c;let f=null;h.childNodes.forEach(p=>{p.nodeName==="BODY"&&(f=p)}),f?(h.removeChild(f),l.appendChild(c),h.appendChild(f)):l.appendChild(c)}else l.appendChild(c);o&&o(c,u.id)}return l}function Yh(s,e){function t(r){e(r)}for(const r of s.getIds())s.has(r)&&t(s.getNode(r))}function Zh(s,e){const t=e.getMeta(s);if((t==null?void 0:t.type)!==_.Element)return;const r=s;for(const i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;const n=t.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=n),i==="rr_scrollTop"&&(r.scrollTop=n)}}function Xh(s,e){const{doc:t,onVisit:r,hackCss:i=!0,afterAppend:n,cache:o,mirror:a=new Mi}=e,l=Tt(s,{doc:t,mirror:a,skipChild:!1,hackCss:i,afterAppend:n,cache:o});return Yh(a,u=>{r&&r(u),Zh(u,a)}),l}var Jh=Object.defineProperty,Kh=(s,e,t)=>e in s?Jh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,I=(s,e,t)=>Kh(s,typeof e!="symbol"?e+"":e,t),Qh=Object.defineProperty,qh=(s,e,t)=>e in s?Qh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,jn=(s,e,t)=>qh(s,typeof e!="symbol"?e+"":e,t);let ef=class{constructor(){jn(this,"idNodeMap",new Map),jn(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function tf(){return new ef}const rf=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],sf=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Na=new WeakSet,nf=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(nf.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();rf.includes(r)&&Na.add(this)}};const of=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){of.call(this,s,e,t)};function Hn(){document.querySelectorAll("*").forEach(e=>{sf.forEach(t=>{e.hasAttribute(t)&&Na.add(e)})})}document.readyState==="complete"||document.readyState==="interactive"?Hn():document.addEventListener("DOMContentLoaded",Hn);function af(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function lf(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Ui={exports:{}},q=String,Ra=function(){return{isColorSupported:!1,reset:q,bold:q,dim:q,italic:q,underline:q,inverse:q,hidden:q,strikethrough:q,black:q,red:q,green:q,yellow:q,blue:q,magenta:q,cyan:q,white:q,gray:q,bgBlack:q,bgRed:q,bgGreen:q,bgYellow:q,bgBlue:q,bgMagenta:q,bgCyan:q,bgWhite:q}};Ui.exports=Ra();Ui.exports.createColors=Ra;var uf=Ui.exports;const cf={},hf=Object.freeze(Object.defineProperty({__proto__:null,default:cf},Symbol.toStringTag,{value:"Module"})),Ie=lf(hf);let Yn=uf,Zn=Ie,Ks=class Aa extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Aa)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Yn.isColorSupported),Zn&&e&&(t=Zn(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,a,l;if(e){let{bold:u,gray:c,red:h}=Yn.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let p=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
41
41
  `+p+a("^")}return" "+l(f)+u}).join(`
42
42
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
43
43
 
44
44
  `+e+`
45
- `),this.name+": "+this.message+e}};var Fi=Xs;Xs.default=Xs;var Ht={};Ht.isClean=Symbol("isClean");Ht.my=Symbol("my");const Hn={after:`
45
+ `),this.name+": "+this.message+e}};var Wi=Ks;Ks.default=Ks;var Yt={};Yt.isClean=Symbol("isClean");Yt.my=Symbol("my");const Xn={after:`
46
46
  `,beforeClose:`
47
47
  `,beforeComment:`
48
48
  `,beforeDecl:`
49
49
  `,beforeOpen:" ",beforeRule:`
50
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function uf(s){return s[0].toUpperCase()+s.slice(1)}let Js=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
51
- `)){let o=this.raw(e,null,"indent");if(o.length)for(let a=0;a<n;a++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Hn[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]!="undefined")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+uf(r);this[a]?i=this[a](o,e):o.walk(l=>{if(i=l.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=Hn[r]),o.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
50
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function ff(s){return s[0].toUpperCase()+s.slice(1)}let Qs=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
51
+ `)){let o=this.raw(e,null,"indent");if(o.length)for(let a=0;a<n;a++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Xn[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]!="undefined")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+ff(r);this[a]?i=this[a](o,e):o.walk(l=>{if(i=l.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=Xn[r]),o.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
52
52
  `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
53
53
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
54
54
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
55
55
  `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before!="undefined"){let n=r.raws.before.split(`
56
- `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Na=Js;Js.default=Js;let cf=Na;function Ks(s,e){new cf(e).stringify(s)}var rs=Ks;Ks.default=Ks;let{isClean:cr,my:hf}=Ht,ff=Fi,df=Na,pf=rs;function Qs(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>Qs(o,t)):(n==="object"&&i!==null&&(i=Qs(i)),t[r]=i)}return t}let qs=class{constructor(e={}){this.raws={},this[cr]=!1,this[hf]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Qs(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new ff(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[cr]){this[cr]=!1;let e=this;for(;e=e.parent;)e[cr]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
57
- `?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new df().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let a=this[o];if(Array.isArray(a))r[o]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[o]=a.toJSON(null,t);else if(o==="source"){let l=t.get(a.input);l==null&&(l=n,t.set(a.input,n),n++),r[o]={end:a.end,inputId:l,start:a.start}}else r[o]=a}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=pf){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}};var ss=qs;qs.default=qs;let mf=ss,ei=class extends mf{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ue(D({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var is=ei;ei.default=ei;let gf="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",yf=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},vf=(s=21)=>{let e="",t=s;for(;t--;)e+=gf[Math.random()*64|0];return e};var wf={nanoid:vf,customAlphabet:yf};let{SourceMapConsumer:Yn,SourceMapGenerator:Zn}=Ee,{existsSync:bf,readFileSync:Sf}=Ee,{dirname:ws,join:Cf}=Ee;function Ef(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let ti=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=ws(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Yn(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Ef(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=ws(e),bf(e))return this.mapFile=e,Sf(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof Yn)return Zn.fromSourceMap(t).toString();if(t instanceof Zn)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Cf(ws(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Aa=ti;ti.default=ti;let{SourceMapConsumer:If,SourceMapGenerator:xf}=Ee,{fileURLToPath:Xn,pathToFileURL:hr}=Ee,{isAbsolute:ri,resolve:si}=Ee,{nanoid:Mf}=wf,bs=Ee,Jn=Fi,Nf=Aa,Ss=Symbol("fromOffsetCache"),Af=!!(If&&xf),Kn=!!(si&&ri),Br=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Kn||/^\w+:\/\//.test(t.from)||ri(t.from)?this.file=t.from:this.file=si(t.from)),Kn&&Af){let r=new Nf(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Mf(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,a;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);o=h.line,a=h.col}else o=c.line,a=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let l=this.origin(t,r,o,a);return l?n=new Jn(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):n=new Jn(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:a,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:a,endLine:o,line:t,source:this.css},this.file&&(hr&&(n.input.url=hr(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Ss])r=this[Ss];else{let n=this.css.split(`
58
- `);r=new Array(n.length);let o=0;for(let a=0,l=n.length;a<l;a++)r[a]=o,o+=n[a].length+1;this[Ss]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:si(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let a;typeof r=="number"&&(a=n.originalPositionFor({column:i,line:r}));let l;ri(o.source)?l=hr(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||hr(this.map.mapFile));let u={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:l.toString()};if(l.protocol==="file:")if(Xn)u.file=Xn(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=D({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var ns=Br;Br.default=Br;bs&&bs.registerInput&&bs.registerInput(Br);let{SourceMapConsumer:Ra,SourceMapGenerator:Mr}=Ee,{dirname:Nr,relative:Oa,resolve:Da,sep:Ta}=Ee,{pathToFileURL:Qn}=Ee,Rf=ns,Of=!!(Ra&&Mr),Df=!!(Nr&&Da&&Oa&&Ta),Tf=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,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(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
56
+ `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Oa=Qs;Qs.default=Qs;let df=Oa;function qs(s,e){new df(e).stringify(s)}var is=qs;qs.default=qs;let{isClean:fr,my:pf}=Yt,mf=Wi,gf=Oa,yf=is;function ei(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>ei(o,t)):(n==="object"&&i!==null&&(i=ei(i)),t[r]=i)}return t}let ti=class{constructor(e={}){this.raws={},this[fr]=!1,this[pf]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ei(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new mf(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[fr]){this[fr]=!1;let e=this;for(;e=e.parent;)e[fr]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
57
+ `?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new gf().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let a=this[o];if(Array.isArray(a))r[o]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[o]=a.toJSON(null,t);else if(o==="source"){let l=t.get(a.input);l==null&&(l=n,t.set(a.input,n),n++),r[o]={end:a.end,inputId:l,start:a.start}}else r[o]=a}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=yf){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}};var ns=ti;ti.default=ti;let vf=ns,ri=class extends vf{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=le(D({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var os=ri;ri.default=ri;let wf="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",bf=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},Sf=(s=21)=>{let e="",t=s;for(;t--;)e+=wf[Math.random()*64|0];return e};var Cf={nanoid:Sf,customAlphabet:bf};let{SourceMapConsumer:Jn,SourceMapGenerator:Kn}=Ie,{existsSync:Ef,readFileSync:If}=Ie,{dirname:bs,join:xf}=Ie;function Mf(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let si=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=bs(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Jn(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Mf(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=bs(e),Ef(e))return this.mapFile=e,If(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof Jn)return Kn.fromSourceMap(t).toString();if(t instanceof Kn)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=xf(bs(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Da=si;si.default=si;let{SourceMapConsumer:Nf,SourceMapGenerator:Rf}=Ie,{fileURLToPath:Qn,pathToFileURL:dr}=Ie,{isAbsolute:ii,resolve:ni}=Ie,{nanoid:Af}=Cf,Ss=Ie,qn=Wi,Of=Da,Cs=Symbol("fromOffsetCache"),Df=!!(Nf&&Rf),eo=!!(ni&&ii),Wr=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!eo||/^\w+:\/\//.test(t.from)||ii(t.from)?this.file=t.from:this.file=ni(t.from)),eo&&Df){let r=new Of(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Af(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,a;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);o=h.line,a=h.col}else o=c.line,a=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let l=this.origin(t,r,o,a);return l?n=new qn(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):n=new qn(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:a,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:a,endLine:o,line:t,source:this.css},this.file&&(dr&&(n.input.url=dr(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Cs])r=this[Cs];else{let n=this.css.split(`
58
+ `);r=new Array(n.length);let o=0;for(let a=0,l=n.length;a<l;a++)r[a]=o,o+=n[a].length+1;this[Cs]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ni(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let a;typeof r=="number"&&(a=n.originalPositionFor({column:i,line:r}));let l;ii(o.source)?l=dr(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||dr(this.map.mapFile));let u={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:l.toString()};if(l.protocol==="file:")if(Qn)u.file=Qn(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=D({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var as=Wr;Wr.default=Wr;Ss&&Ss.registerInput&&Ss.registerInput(Wr);let{SourceMapConsumer:Ta,SourceMapGenerator:Rr}=Ie,{dirname:Ar,relative:ka,resolve:_a,sep:$a}=Ie,{pathToFileURL:to}=Ie,Tf=as,kf=!!(Ta&&Rr),_f=!!(Ar&&_a&&ka&&$a),$f=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,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(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
59
59
  `;this.css.includes(`\r
60
60
  `)&&(t=`\r
61
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Nr(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Ra(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Df&&Of&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Mr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Mr({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 Mr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=a.match(/\n/g),n?(e+=n.length,o=a.lastIndexOf(`
62
- `),t=a.length-o):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Nr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Nr(Da(r,this.mapOpts.annotation)));let i=Oa(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Rf(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Qn){let r=Qn(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Ta==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var ka=Tf;let kf=ss,ii=class extends kf{constructor(e){super(e),this.type="comment"}};var os=ii;ii.default=ii;let{isClean:_a,my:$a}=Ht,Pa=is,La=os,_f=ss,Fa,Bi,Ui,Ba;function Ua(s){return s.map(e=>(e.nodes&&(e.nodes=Ua(e.nodes)),delete e.source,e))}function Wa(s){if(s[_a]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Wa(e)}let Fe=class za extends _f{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of n)this.proxyOf.nodes.splice(r,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<=o&&(this.indexes[a]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Ua(Fa(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Pa(e)]}else if(e.selector)e=[new Bi(e)];else if(e.name)e=[new Ui(e)];else if(e.text)e=[new La(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[$a]||za.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[_a]&&Wa(i),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};Fe.registerParse=s=>{Fa=s};Fe.registerRule=s=>{Bi=s};Fe.registerAtRule=s=>{Ui=s};Fe.registerRoot=s=>{Ba=s};var et=Fe;Fe.default=Fe;Fe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Ui.prototype):s.type==="rule"?Object.setPrototypeOf(s,Bi.prototype):s.type==="decl"?Object.setPrototypeOf(s,Pa.prototype):s.type==="comment"?Object.setPrototypeOf(s,La.prototype):s.type==="root"&&Object.setPrototypeOf(s,Ba.prototype),s[$a]=!0,s.nodes&&s.nodes.forEach(e=>{Fe.rebuild(e)})};let $f=et,Va,Ga,Ft=class extends $f{constructor(e){super(D({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Va(new Ga,this,e).stringify()}};Ft.registerLazyResult=s=>{Va=s};Ft.registerProcessor=s=>{Ga=s};var Wi=Ft;Ft.default=Ft;let ni=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var ja=ni;ni.default=ni;let Pf=ja,oi=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Pf(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var zi=oi;oi.default=oi;const Cs=39,qn=34,fr=92,eo=47,dr=10,Et=32,pr=12,mr=9,gr=13,Lf=91,Ff=93,Bf=40,Uf=41,Wf=123,zf=125,Vf=59,Gf=42,jf=58,Hf=64,yr=/[\t\n\f\r "#'()/;[\\\]{}]/g,vr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Yf=/.[\r\n"'(/\\]/,to=/[\da-f]/i;var Zf=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,a,l,u,c,h,f,p,d,m=r.length,g=0,y=[],w=[];function v(){return g}function C(b){throw e.error("Unclosed "+b,g)}function E(){return w.length===0&&g>=m}function A(b){if(w.length)return w.pop();if(g>=m)return;let N=b?b.ignoreUnclosed:!1;switch(n=r.charCodeAt(g),n){case dr:case Et:case mr:case gr:case pr:{o=g;do o+=1,n=r.charCodeAt(o);while(n===Et||n===dr||n===mr||n===gr||n===pr);d=["space",r.slice(g,o)],g=o-1;break}case Lf:case Ff:case Wf:case zf:case jf:case Vf:case Uf:{let k=String.fromCharCode(n);d=[k,k,g];break}case Bf:{if(f=y.length?y.pop()[1]:"",p=r.charCodeAt(g+1),f==="url"&&p!==Cs&&p!==qn&&p!==Et&&p!==dr&&p!==mr&&p!==pr&&p!==gr){o=g;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||N){o=g;break}else C("bracket");for(h=o;r.charCodeAt(h-1)===fr;)h-=1,c=!c}while(c);d=["brackets",r.slice(g,o+1),g,o],g=o}else o=r.indexOf(")",g+1),l=r.slice(g,o+1),o===-1||Yf.test(l)?d=["(","(",g]:(d=["brackets",l,g,o],g=o);break}case Cs:case qn:{a=n===Cs?"'":'"',o=g;do{if(c=!1,o=r.indexOf(a,o+1),o===-1)if(i||N){o=g+1;break}else C("string");for(h=o;r.charCodeAt(h-1)===fr;)h-=1,c=!c}while(c);d=["string",r.slice(g,o+1),g,o],g=o;break}case Hf:{yr.lastIndex=g+1,yr.test(r),yr.lastIndex===0?o=r.length-1:o=yr.lastIndex-2,d=["at-word",r.slice(g,o+1),g,o],g=o;break}case fr:{for(o=g,u=!0;r.charCodeAt(o+1)===fr;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==eo&&n!==Et&&n!==dr&&n!==mr&&n!==gr&&n!==pr&&(o+=1,to.test(r.charAt(o)))){for(;to.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Et&&(o+=1)}d=["word",r.slice(g,o+1),g,o],g=o;break}default:{n===eo&&r.charCodeAt(g+1)===Gf?(o=r.indexOf("*/",g+2)+1,o===0&&(i||N?o=r.length:C("comment")),d=["comment",r.slice(g,o+1),g,o],g=o):(vr.lastIndex=g+1,vr.test(r),vr.lastIndex===0?o=r.length-1:o=vr.lastIndex-2,d=["word",r.slice(g,o+1),g,o],y.push(d),g=o);break}}return g++,d}function R(b){w.push(b)}return{back:R,endOfFile:E,nextToken:A,position:v}};let Ha=et,Ur=class extends Ha{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Vi=Ur;Ur.default=Ur;Ha.registerAtRule(Ur);let Ya=et,Za,Xa,gt=class extends Ya{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Za(new Xa,this,e).stringify()}};gt.registerLazyResult=s=>{Za=s};gt.registerProcessor=s=>{Xa=s};var Yt=gt;gt.default=gt;Ya.registerRoot(gt);let Bt={comma(s){return Bt.split(s,[","],!0)},space(s){let e=[" ",`
63
- `," "];return Bt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var Ja=Bt;Bt.default=Bt;let Ka=et,Xf=Ja,Wr=class extends Ka{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Xf.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Gi=Wr;Wr.default=Wr;Ka.registerRule(Wr);let Jf=is,Kf=Zf,Qf=os,qf=Vi,ed=Yt,ro=Gi;const so={empty:!0,space:!0};function td(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let rd=class{constructor(e){this.input=e,this.root=new ed,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new qf;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(n=l.length-1,i=l[n];i&&i[0]==="space";)i=l[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new Qf;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Kf(this.input)}decl(e,t){let r=new Jf;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||td(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let p=c[f][0];if(h.trim().indexOf("!")===0&&p!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new ro;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(a&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)n=r[f],o=n[0],o==="space"&&f===a-1&&!i?u=!1:o==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!so[h]&&!so[c]?l.slice(-1)===","?u=!1:l+=n[1]:u=!1):l+=n[1];if(!u){let f=r.reduce((p,d)=>p+d[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new ro;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var sd=rd;let id=et,nd=sd,od=ns;function zr(s,e){let t=new od(s,e),r=new nd(t);try{r.parse()}catch(i){throw i}return r.root}var ji=zr;zr.default=zr;id.registerParse(zr);let{isClean:Oe,my:ad}=Ht,ld=ka,ud=rs,cd=et,hd=Wi;let io=zi,fd=ji,dd=Yt;const pd={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},md={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},gd={Once:!0,postcssPlugin:!0,prepare:!0},yt=0;function It(s){return typeof s=="object"&&typeof s.then=="function"}function Qa(s){let e=!1,t=pd[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,yt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,yt,t+"Exit"]:[t,t+"Exit"]}function no(s){let e;return s.type==="document"?e=["Document",yt,"DocumentExit"]:s.type==="root"?e=["Root",yt,"RootExit"]:e=Qa(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ai(s){return s[Oe]=!1,s.nodes&&s.nodes.forEach(e=>ai(e)),s}let li={},vt=class qa{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=ai(t);else if(t instanceof qa||t instanceof io)i=ai(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=fd;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[ad]&&cd.rebuild(i)}this.result=new io(e,i,r),this.helpers=ue(D({},li),{postcss:li,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?D(D({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!md[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!gd[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(It(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Oe];){e[Oe]=!0;let t=[no(e)];for(;t.length>0;){let r=this.visitTick(t);if(It(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return It(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(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();let e=this.result.opts,t=ud;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new ld(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(It(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Oe];)e[Oe]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(It(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!a[Oe]){a[Oe]=!0,e.push(no(a));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===yt){r.nodes&&r.nodes.length&&(r[Oe]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Oe]=!0;let t=Qa(e);for(let r of t)if(r===yt)e.nodes&&e.each(i=>{i[Oe]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};vt.registerPostcss=s=>{li=s};var el=vt;vt.default=vt;dd.registerLazyResult(vt);hd.registerLazyResult(vt);let yd=ka,vd=rs;let wd=ji;const bd=zi;let ui=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=vd;this.result=new bd(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new yd(n,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=wd;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Sd=ui;ui.default=ui;let Cd=Sd,Ed=el,Id=Wi,xd=Yt,Ut=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Cd(this,e,t):new Ed(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Md=Ut;Ut.default=Ut;xd.registerProcessor(Ut);Id.registerProcessor(Ut);let Nd=is,Ad=Aa,Rd=os,Od=Vi,Dd=ns,Td=Yt,kd=Gi;function Wt(s,e){if(Array.isArray(s))return s.map(o=>Wt(o));let i=s,{inputs:t}=i,r=rt(i,["inputs"]);if(t){e=[];for(let o of t){let a=ue(D({},o),{__proto__:Dd.prototype});a.map&&(a.map=ue(D({},a.map),{__proto__:Ad.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(o=>Wt(o,e))),r.source){let n=r.source,{inputId:o}=n,a=rt(n,["inputId"]);r.source=a,o!=null&&(r.source.input=e[o])}if(r.type==="root")return new Td(r);if(r.type==="decl")return new Nd(r);if(r.type==="rule")return new kd(r);if(r.type==="comment")return new Rd(r);if(r.type==="atrule")return new Od(r);throw new Error("Unknown node type: "+s.type)}var _d=Wt;Wt.default=Wt;let $d=Fi,tl=is,Pd=el,Ld=et,Hi=Md,Fd=rs,Bd=_d,rl=Wi,Ud=ja,sl=os,il=Vi,Wd=zi,zd=ns,Vd=ji,Gd=Ja,nl=Gi,ol=Yt,jd=ss;function Y(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Hi(s)}Y.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
61
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Ar(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Ta(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),_f&&kf&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Rr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Rr({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 Rr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=a.match(/\n/g),n?(e+=n.length,o=a.lastIndexOf(`
62
+ `),t=a.length-o):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Ar(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Ar(_a(r,this.mapOpts.annotation)));let i=ka(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Tf(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(to){let r=to(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;$a==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Pa=$f;let Pf=ns,oi=class extends Pf{constructor(e){super(e),this.type="comment"}};var ls=oi;oi.default=oi;let{isClean:La,my:Fa}=Yt,Ba=os,Ua=ls,Lf=ns,Wa,zi,Vi,za;function Va(s){return s.map(e=>(e.nodes&&(e.nodes=Va(e.nodes)),delete e.source,e))}function Ga(s){if(s[La]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Ga(e)}let Pe=class ja extends Lf{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of n)this.proxyOf.nodes.splice(r,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<=o&&(this.indexes[a]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Va(Wa(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Ba(e)]}else if(e.selector)e=[new zi(e)];else if(e.name)e=[new Vi(e)];else if(e.text)e=[new Ua(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Fa]||ja.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[La]&&Ga(i),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};Pe.registerParse=s=>{Wa=s};Pe.registerRule=s=>{zi=s};Pe.registerAtRule=s=>{Vi=s};Pe.registerRoot=s=>{za=s};var et=Pe;Pe.default=Pe;Pe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Vi.prototype):s.type==="rule"?Object.setPrototypeOf(s,zi.prototype):s.type==="decl"?Object.setPrototypeOf(s,Ba.prototype):s.type==="comment"?Object.setPrototypeOf(s,Ua.prototype):s.type==="root"&&Object.setPrototypeOf(s,za.prototype),s[Fa]=!0,s.nodes&&s.nodes.forEach(e=>{Pe.rebuild(e)})};let Ff=et,Ha,Ya,Bt=class extends Ff{constructor(e){super(D({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Ha(new Ya,this,e).stringify()}};Bt.registerLazyResult=s=>{Ha=s};Bt.registerProcessor=s=>{Ya=s};var Gi=Bt;Bt.default=Bt;let ai=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Za=ai;ai.default=ai;let Bf=Za,li=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Bf(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var ji=li;li.default=li;const Es=39,ro=34,pr=92,so=47,mr=10,It=32,gr=12,yr=9,vr=13,Uf=91,Wf=93,zf=40,Vf=41,Gf=123,jf=125,Hf=59,Yf=42,Zf=58,Xf=64,wr=/[\t\n\f\r "#'()/;[\\\]{}]/g,br=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Jf=/.[\r\n"'(/\\]/,io=/[\da-f]/i;var Kf=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,a,l,u,c,h,f,p,d,m=r.length,g=0,y=[],w=[];function v(){return g}function C(b){throw e.error("Unclosed "+b,g)}function E(){return w.length===0&&g>=m}function R(b){if(w.length)return w.pop();if(g>=m)return;let N=b?b.ignoreUnclosed:!1;switch(n=r.charCodeAt(g),n){case mr:case It:case yr:case vr:case gr:{o=g;do o+=1,n=r.charCodeAt(o);while(n===It||n===mr||n===yr||n===vr||n===gr);d=["space",r.slice(g,o)],g=o-1;break}case Uf:case Wf:case Gf:case jf:case Zf:case Hf:case Vf:{let k=String.fromCharCode(n);d=[k,k,g];break}case zf:{if(f=y.length?y.pop()[1]:"",p=r.charCodeAt(g+1),f==="url"&&p!==Es&&p!==ro&&p!==It&&p!==mr&&p!==yr&&p!==gr&&p!==vr){o=g;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||N){o=g;break}else C("bracket");for(h=o;r.charCodeAt(h-1)===pr;)h-=1,c=!c}while(c);d=["brackets",r.slice(g,o+1),g,o],g=o}else o=r.indexOf(")",g+1),l=r.slice(g,o+1),o===-1||Jf.test(l)?d=["(","(",g]:(d=["brackets",l,g,o],g=o);break}case Es:case ro:{a=n===Es?"'":'"',o=g;do{if(c=!1,o=r.indexOf(a,o+1),o===-1)if(i||N){o=g+1;break}else C("string");for(h=o;r.charCodeAt(h-1)===pr;)h-=1,c=!c}while(c);d=["string",r.slice(g,o+1),g,o],g=o;break}case Xf:{wr.lastIndex=g+1,wr.test(r),wr.lastIndex===0?o=r.length-1:o=wr.lastIndex-2,d=["at-word",r.slice(g,o+1),g,o],g=o;break}case pr:{for(o=g,u=!0;r.charCodeAt(o+1)===pr;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==so&&n!==It&&n!==mr&&n!==yr&&n!==vr&&n!==gr&&(o+=1,io.test(r.charAt(o)))){for(;io.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===It&&(o+=1)}d=["word",r.slice(g,o+1),g,o],g=o;break}default:{n===so&&r.charCodeAt(g+1)===Yf?(o=r.indexOf("*/",g+2)+1,o===0&&(i||N?o=r.length:C("comment")),d=["comment",r.slice(g,o+1),g,o],g=o):(br.lastIndex=g+1,br.test(r),br.lastIndex===0?o=r.length-1:o=br.lastIndex-2,d=["word",r.slice(g,o+1),g,o],y.push(d),g=o);break}}return g++,d}function O(b){w.push(b)}return{back:O,endOfFile:E,nextToken:R,position:v}};let Xa=et,zr=class extends Xa{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Hi=zr;zr.default=zr;Xa.registerAtRule(zr);let Ja=et,Ka,Qa,gt=class extends Ja{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Ka(new Qa,this,e).stringify()}};gt.registerLazyResult=s=>{Ka=s};gt.registerProcessor=s=>{Qa=s};var Zt=gt;gt.default=gt;Ja.registerRoot(gt);let Ut={comma(s){return Ut.split(s,[","],!0)},space(s){let e=[" ",`
63
+ `," "];return Ut.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var qa=Ut;Ut.default=Ut;let el=et,Qf=qa,Vr=class extends el{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Qf.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Yi=Vr;Vr.default=Vr;el.registerRule(Vr);let qf=os,ed=Kf,td=ls,rd=Hi,sd=Zt,no=Yi;const oo={empty:!0,space:!0};function id(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let nd=class{constructor(e){this.input=e,this.root=new sd,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new rd;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(n=l.length-1,i=l[n];i&&i[0]==="space";)i=l[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new td;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=ed(this.input)}decl(e,t){let r=new qf;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||id(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let p=c[f][0];if(h.trim().indexOf("!")===0&&p!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new no;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(a&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)n=r[f],o=n[0],o==="space"&&f===a-1&&!i?u=!1:o==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!oo[h]&&!oo[c]?l.slice(-1)===","?u=!1:l+=n[1]:u=!1):l+=n[1];if(!u){let f=r.reduce((p,d)=>p+d[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new no;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var od=nd;let ad=et,ld=od,ud=as;function Gr(s,e){let t=new ud(s,e),r=new ld(t);try{r.parse()}catch(i){throw i}return r.root}var Zi=Gr;Gr.default=Gr;ad.registerParse(Gr);let{isClean:Ae,my:cd}=Yt,hd=Pa,fd=is,dd=et,pd=Gi;let ao=ji,md=Zi,gd=Zt;const yd={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},vd={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},wd={Once:!0,postcssPlugin:!0,prepare:!0},yt=0;function xt(s){return typeof s=="object"&&typeof s.then=="function"}function tl(s){let e=!1,t=yd[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,yt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,yt,t+"Exit"]:[t,t+"Exit"]}function lo(s){let e;return s.type==="document"?e=["Document",yt,"DocumentExit"]:s.type==="root"?e=["Root",yt,"RootExit"]:e=tl(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ui(s){return s[Ae]=!1,s.nodes&&s.nodes.forEach(e=>ui(e)),s}let ci={},vt=class rl{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=ui(t);else if(t instanceof rl||t instanceof ao)i=ui(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=md;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[cd]&&dd.rebuild(i)}this.result=new ao(e,i,r),this.helpers=le(D({},ci),{postcss:ci,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?D(D({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!vd[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!wd[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(xt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ae];){e[Ae]=!0;let t=[lo(e)];for(;t.length>0;){let r=this.visitTick(t);if(xt(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return xt(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(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();let e=this.result.opts,t=fd;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new hd(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(xt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ae];)e[Ae]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(xt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!a[Ae]){a[Ae]=!0,e.push(lo(a));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===yt){r.nodes&&r.nodes.length&&(r[Ae]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Ae]=!0;let t=tl(e);for(let r of t)if(r===yt)e.nodes&&e.each(i=>{i[Ae]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};vt.registerPostcss=s=>{ci=s};var sl=vt;vt.default=vt;gd.registerLazyResult(vt);pd.registerLazyResult(vt);let bd=Pa,Sd=is;let Cd=Zi;const Ed=ji;let hi=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Sd;this.result=new Ed(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new bd(n,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Cd;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Id=hi;hi.default=hi;let xd=Id,Md=sl,Nd=Gi,Rd=Zt,Wt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new xd(this,e,t):new Md(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ad=Wt;Wt.default=Wt;Rd.registerProcessor(Wt);Nd.registerProcessor(Wt);let Od=os,Dd=Da,Td=ls,kd=Hi,_d=as,$d=Zt,Pd=Yi;function zt(s,e){if(Array.isArray(s))return s.map(o=>zt(o));let i=s,{inputs:t}=i,r=rt(i,["inputs"]);if(t){e=[];for(let o of t){let a=le(D({},o),{__proto__:_d.prototype});a.map&&(a.map=le(D({},a.map),{__proto__:Dd.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(o=>zt(o,e))),r.source){let n=r.source,{inputId:o}=n,a=rt(n,["inputId"]);r.source=a,o!=null&&(r.source.input=e[o])}if(r.type==="root")return new $d(r);if(r.type==="decl")return new Od(r);if(r.type==="rule")return new Pd(r);if(r.type==="comment")return new Td(r);if(r.type==="atrule")return new kd(r);throw new Error("Unknown node type: "+s.type)}var Ld=zt;zt.default=zt;let Fd=Wi,il=os,Bd=sl,Ud=et,Xi=Ad,Wd=is,zd=Ld,nl=Gi,Vd=Za,ol=ls,al=Hi,Gd=ji,jd=as,Hd=Zi,Yd=qa,ll=Yi,ul=Zt,Zd=ns;function Y(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Xi(s)}Y.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
64
64
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
65
- https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Hi().version,a}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,a,l){return Y([i(l)]).process(o,a)},i};Y.stringify=Fd;Y.parse=Vd;Y.fromJSON=Bd;Y.list=Gd;Y.comment=s=>new sl(s);Y.atRule=s=>new il(s);Y.decl=s=>new tl(s);Y.rule=s=>new nl(s);Y.root=s=>new ol(s);Y.document=s=>new rl(s);Y.CssSyntaxError=$d;Y.Declaration=tl;Y.Container=Ld;Y.Processor=Hi;Y.Document=rl;Y.Comment=sl;Y.Warning=Ud;Y.AtRule=il;Y.Result=Wd;Y.Input=zd;Y.Rule=nl;Y.Root=ol;Y.Node=jd;Pd.registerPostcss(Y);var Hd=Y;Y.default=Y;const se=sf(Hd);se.stringify;se.fromJSON;se.plugin;se.parse;se.list;se.document;se.comment;se.atRule;se.rule;se.decl;se.root;se.CssSyntaxError;se.Declaration;se.Container;se.Processor;se.Document;se.Comment;se.Warning;se.AtRule;se.Result;se.Input;se.Rule;se.Root;se.Node;var L=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(L||{});function Yd(s){const e={},t=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return s.replace(i,"").split(t).forEach(function(n){if(n){const o=n.split(r);o.length>1&&(e[ci(o[0].trim())]=o[1].trim())}}),e}function oo(s){const e=[];for(const t in s){const r=s[t];if(typeof r!="string")continue;const i=Kd(t);e.push(`${i}: ${r};`)}return e.join(" ")}const Zd=/-([a-z])/g,Xd=/^--[a-zA-Z0-9-]+$/,ci=s=>Xd.test(s)?s:s.replace(Zd,(e,t)=>t?t.toUpperCase():""),Jd=/\B([A-Z])/g,Kd=s=>s.replace(Jd,"-$1").toLowerCase();class Ie{constructor(...e){I(this,"parentElement",null),I(this,"parentNode",null),I(this,"ownerDocument"),I(this,"firstChild",null),I(this,"lastChild",null),I(this,"previousSibling",null),I(this,"nextSibling",null),I(this,"ELEMENT_NODE",1),I(this,"TEXT_NODE",3),I(this,"nodeType"),I(this,"nodeName"),I(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof Ie){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class Yi extends Ie{constructor(...e){super(e),I(this,"nodeType",9),I(this,"nodeName","#document"),I(this,"compatMode","CSS1Compat"),I(this,"RRNodeType",L.Document),I(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===L.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===L.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===L.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===L.Element||t===L.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===L.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=Zi(this,e);return r.parentElement=null,r}insertBefore(e,t){const r=e.RRNodeType;if((r===L.Element||r===L.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===L.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=hl(this,e,t);return i.parentElement=null,i}removeChild(e){return fl(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const r=this.createDocumentType("html",t,"");this.open(),this.appendChild(r)}}createDocument(e,t,r){return new Yi}createDocumentType(e,t,r){const i=new al(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=new as(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new ll(e);return t.ownerDocument=this,t}createComment(e){const t=new ul(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new cl(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class al extends Ie{constructor(e,t,r){super(),I(this,"nodeType",10),I(this,"RRNodeType",L.DocumentType),I(this,"name"),I(this,"publicId"),I(this,"systemId"),I(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class as extends Ie{constructor(e){super(),I(this,"nodeType",1),I(this,"RRNodeType",L.Element),I(this,"tagName"),I(this,"attributes",{}),I(this,"shadowRoot",null),I(this,"scrollLeft"),I(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new ep(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?Yd(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,n)=>{if(t.test(r))return;const o=ci(r);i?e[o]=i:delete e[o],n==="important"&&(e[o]+=" !important"),this.attributes.style=oo(e)},e.removeProperty=r=>{if(t.test(r))return"";const i=ci(r),n=e[i]||"";return delete e[i],this.attributes.style=oo(e),n},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,r){this.setAttribute(t,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return Zi(this,e)}insertBefore(e,t){return hl(this,e,t)}removeChild(e){return fl(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class Qd extends as{constructor(){super(...arguments),I(this,"currentTime"),I(this,"volume"),I(this,"paused"),I(this,"muted"),I(this,"playbackRate"),I(this,"loop")}attachShadow(e){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 qd extends as{constructor(){super(...arguments),I(this,"tagName","DIALOG"),I(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}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 ll extends Ie{constructor(e){super(),I(this,"nodeType",3),I(this,"nodeName","#text"),I(this,"RRNodeType",L.Text),I(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class ul extends Ie{constructor(e){super(),I(this,"nodeType",8),I(this,"nodeName","#comment"),I(this,"RRNodeType",L.Comment),I(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class cl extends Ie{constructor(e){super(),I(this,"nodeName","#cdata-section"),I(this,"nodeType",4),I(this,"RRNodeType",L.CDATA),I(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class ep{constructor(e,t){if(I(this,"onChange"),I(this,"classes",[]),I(this,"add",(...r)=>{for(const i of r){const n=String(i);this.classes.indexOf(n)>=0||this.classes.push(n)}this.onChange&&this.onChange(this.classes.join(" "))}),I(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}}function Zi(s,e){return e.parentNode&&e.parentNode.removeChild(e),s.lastChild?(s.lastChild.nextSibling=e,e.previousSibling=s.lastChild):(s.firstChild=e,e.previousSibling=null),s.lastChild=e,e.nextSibling=null,e.parentNode=s,e.parentElement=s,e.ownerDocument=s.ownerDocument,e}function hl(s,e,t){if(!t)return Zi(s,e);if(t.parentNode!==s)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===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:s.firstChild=e,e.parentElement=s,e.parentNode=s,e.ownerDocument=s.ownerDocument),e}function fl(s,e){if(e.parentNode!==s)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:s.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:s.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var ve=(s=>(s[s.PLACEHOLDER=0]="PLACEHOLDER",s[s.ELEMENT_NODE=1]="ELEMENT_NODE",s[s.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",s[s.TEXT_NODE=3]="TEXT_NODE",s[s.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",s[s.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",s[s.ENTITY_NODE=6]="ENTITY_NODE",s[s.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",s[s.COMMENT_NODE=8]="COMMENT_NODE",s[s.DOCUMENT_NODE=9]="DOCUMENT_NODE",s[s.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",s[s.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",s))(ve||{});const hi={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},tp={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"};let De=null;function Vr(s,e,t,r=e.mirror||e.ownerDocument.mirror){s=rp(s,e,t,r),dl(s,e,t,r),sp(s,e,t)}function rp(s,e,t,r){var i;if(t.afterAppend&&!De&&(De=new WeakSet,setTimeout(()=>{De=null},0)),!Xi(s,e)){const n=Gr(e,t.mirror,r);(i=s.parentNode)==null||i.replaceChild(n,s),s=n}switch(e.RRNodeType){case L.Document:{if(!it(s,e,t.mirror,r)){const n=r.getMeta(e);n&&(t.mirror.removeNodeFromMap(s),s.close(),s.open(),t.mirror.add(s,n),De==null||De.add(s))}break}case L.Element:{const n=s,o=e;switch(o.tagName){case"IFRAME":{const a=s.contentDocument;if(!a)break;Vr(a,e.contentDocument,t,r);break}}o.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),dl(n.shadowRoot,o.shadowRoot,t,r)),ip(n,o,r);break}}return s}function sp(s,e,t){var r;switch(e.RRNodeType){case L.Document:{const i=e.scrollData;i&&t.applyScroll(i,!0);break}case L.Element:{const i=s,n=e;switch(n.scrollData&&t.applyScroll(n.scrollData,!0),n.inputData&&t.applyInput(n.inputData),n.tagName){case"AUDIO":case"VIDEO":{const o=s,a=n;a.paused!==void 0&&(a.paused?o.pause():o.play()),a.muted!==void 0&&(o.muted=a.muted),a.volume!==void 0&&(o.volume=a.volume),a.currentTime!==void 0&&(o.currentTime=a.currentTime),a.playbackRate!==void 0&&(o.playbackRate=a.playbackRate),a.loop!==void 0&&(o.loop=a.loop);break}case"CANVAS":{const o=e;if(o.rr_dataURL!==null){const a=document.createElement("img");a.onload=()=>{const l=i.getContext("2d");l&&l.drawImage(a,0,0,a.width,a.height)},a.src=o.rr_dataURL}o.canvasMutations.forEach(a=>t.applyCanvas(a.event,a.mutation,s));break}case"STYLE":{const o=i.sheet;o&&e.rules.forEach(a=>t.applyStyleSheetMutation(a,o));break}case"DIALOG":{const o=i,a=n,l=o.open,u=o.matches("dialog:modal"),c=a.open,h=a.isModal,f=u!==h,p=l!==c;if((f||l&&p)&&o.close(),c&&(p||f))try{h?o.showModal():o.show()}catch(d){console.warn(d)}break}}break}case L.Text:case L.Comment:case L.CDATA:{s.textContent!==e.data&&(s.textContent=e.data);break}}De!=null&&De.has(s)&&(De.delete(s),(r=t.afterAppend)==null||r.call(t,s,t.mirror.getId(s)))}function ip(s,e,t){const r=s.attributes,i=e.attributes;for(const n in i){const o=i[n],a=t.getMeta(e);if(a!=null&&a.isSVG&&hi[n])s.setAttributeNS(hi[n],n,o);else if(e.tagName==="CANVAS"&&n==="rr_dataURL"){const l=document.createElement("img");l.src=o,l.onload=()=>{const u=s.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&n==="srcdoc")continue;try{s.setAttribute(n,o)}catch(l){console.warn(l)}}}for(const{name:n}of Array.from(r))n in i||s.removeAttribute(n);e.scrollLeft&&(s.scrollLeft=e.scrollLeft),e.scrollTop&&(s.scrollTop=e.scrollTop)}function dl(s,e,t,r){const i=Array.from(s.childNodes),n=e.childNodes;if(i.length===0&&n.length===0)return;let o=0,a=i.length-1,l=0,u=n.length-1,c=i[o],h=i[a],f=n[l],p=n[u],d,m;for(;o<=a&&l<=u;)if(c===void 0)c=i[++o];else if(h===void 0)h=i[--a];else if(it(c,f,t.mirror,r))c=i[++o],f=n[++l];else if(it(h,p,t.mirror,r))h=i[--a],p=n[--u];else if(it(c,p,t.mirror,r)){try{s.insertBefore(c,h.nextSibling)}catch(w){console.warn(w)}c=i[++o],p=n[--u]}else if(it(h,f,t.mirror,r)){try{s.insertBefore(h,c)}catch(w){console.warn(w)}h=i[--a],f=n[++l]}else{if(!d){d={};for(let v=o;v<=a;v++){const C=i[v];C&&t.mirror.hasNode(C)&&(d[t.mirror.getId(C)]=v)}}m=d[r.getId(f)];const w=i[m];if(m!==void 0&&w&&it(w,f,t.mirror,r)){try{s.insertBefore(w,c)}catch(v){console.warn(v)}i[m]=void 0}else{const v=Gr(f,t.mirror,r);s.nodeName==="#document"&&c&&(v.nodeType===v.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||v.nodeType===v.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(s.removeChild(c),t.mirror.removeNodeFromMap(c),c=i[++o]);try{s.insertBefore(v,c||null)}catch(C){console.warn(C)}}f=n[++l]}if(o>a){const w=n[u+1];let v=null;for(w&&(v=t.mirror.getNode(r.getId(w)));l<=u;++l){const C=Gr(n[l],t.mirror,r);try{s.insertBefore(C,v)}catch(E){console.warn(E)}}}else if(l>u)for(;o<=a;o++){const w=i[o];if(!(!w||w.parentNode!==s))try{s.removeChild(w),t.mirror.removeNodeFromMap(w)}catch(v){console.warn(v)}}let g=s.firstChild,y=e.firstChild;for(;g!==null&&y!==null;)Vr(g,y,t,r),g=g.nextSibling,y=y.nextSibling}function Gr(s,e,t){const r=t.getId(s),i=t.getMeta(s);let n=null;if(r>-1&&(n=e.getNode(r)),n!==null&&Xi(n,s))return n;switch(s.RRNodeType){case L.Document:n=new Document;break;case L.DocumentType:n=document.implementation.createDocumentType(s.name,s.publicId,s.systemId);break;case L.Element:{let o=s.tagName.toLowerCase();o=tp[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?n=document.createElementNS(hi.svg,o):n=document.createElement(s.tagName);break}case L.Text:n=document.createTextNode(s.data);break;case L.Comment:n=document.createComment(s.data);break;case L.CDATA:n=document.createCDATASection(s.data);break}i&&e.add(n,D({},i));try{De==null||De.add(n)}catch(o){}return n}function Xi(s,e){return s.nodeType!==e.nodeType?!1:s.nodeType!==s.ELEMENT_NODE||s.tagName.toUpperCase()===e.tagName}function it(s,e,t,r){const i=t.getId(s),n=r.getId(e);return i===-1||i!==n?!1:Xi(s,e)}class bt extends Yi{constructor(e){super(),I(this,"UNSERIALIZED_STARTING_ID",-2),I(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),I(this,"mirror",gp()),I(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new bt}createDocumentType(e,t,r){const i=new np(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new op(t);break;case"IFRAME":r=new cp(t,this.mirror);break;case"CANVAS":r=new lp(t);break;case"STYLE":r=new up(t);break;case"DIALOG":r=new ap(t);break;default:r=new ls(t);break}return r.ownerDocument=this,r}createComment(e){const t=new fp(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new dp(e);return t.ownerDocument=this,t}createTextNode(e){const t=new hp(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const np=al;class ls extends as{constructor(){super(...arguments),I(this,"inputData",null),I(this,"scrollData",null)}}class op extends Qd{}class ap extends qd{}class lp extends ls{constructor(){super(...arguments),I(this,"rr_dataURL",null),I(this,"canvasMutations",[])}getContext(){return null}}class up extends ls{constructor(){super(...arguments),I(this,"rules",[])}}class cp extends ls{constructor(e,t){super(e),I(this,"contentDocument",new bt),this.contentDocument.mirror=t}}const hp=ll,fp=ul,dp=cl;function pp(s){return s instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase()}function pl(s,e,t,r){let i;switch(s.nodeType){case ve.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=s.compatMode);break;case ve.DOCUMENT_TYPE_NODE:{const o=s;i=e.createDocumentType(o.name,o.publicId,o.systemId);break}case ve.ELEMENT_NODE:{const o=s,a=pp(o);i=e.createElement(a);const l=i;for(const{name:u,value:c}of Array.from(o.attributes))l.attributes[u]=c;o.scrollLeft&&(l.scrollLeft=o.scrollLeft),o.scrollTop&&(l.scrollTop=o.scrollTop);break}case ve.TEXT_NODE:i=e.createTextNode(s.textContent||"");break;case ve.CDATA_SECTION_NODE:i=e.createCDATASection(s.data);break;case ve.COMMENT_NODE:i=e.createComment(s.textContent||"");break;case ve.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let n=t.getMeta(s);return e instanceof bt&&(n||(n=ml(i,e.unserializedId),t.add(s,n)),e.mirror.add(i,D({},n))),i}function mp(s,e=Qh(),t=new bt){function r(i,n){const o=pl(i,t,e,n);if(o!==null)if((n==null?void 0:n.nodeName)!=="IFRAME"&&i.nodeType!==ve.DOCUMENT_FRAGMENT_NODE&&(n==null||n.appendChild(o),o.parentNode=n,o.parentElement=n),i.nodeName==="IFRAME"){const a=i.contentDocument;a&&r(a,o)}else(i.nodeType===ve.DOCUMENT_NODE||i.nodeType===ve.ELEMENT_NODE||i.nodeType===ve.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ve.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,o),i.childNodes.forEach(a=>r(a,o)))}return r(s,null),t}function gp(){return new yp}class yp{constructor(){I(this,"idNodeMap",new Map),I(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function ml(s,e){switch(s.RRNodeType){case L.Document:return{id:e,type:s.RRNodeType,childNodes:[]};case L.DocumentType:{const t=s;return{id:e,type:s.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case L.Element:return{id:e,type:s.RRNodeType,tagName:s.tagName.toLowerCase(),attributes:{},childNodes:[]};case L.Text:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case L.Comment:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case L.CDATA:return{id:e,type:s.RRNodeType,textContent:""}}}const ao={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},lo={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},wr={},vp=()=>!!globalThis.Zone;function Ji(s){if(wr[s])return wr[s];const e=globalThis[s],t=e.prototype,r=s in ao?ao[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),n=s in lo?lo[s]:void 0,o=!!(n&&n.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&o&&!vp())return wr[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?wr[s]=u:t}catch(a){return t}}const Es={};function Xe(s,e,t){var r;const i=`${s}.${String(t)}`;if(Es[i])return Es[i].call(e);const n=Ji(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Es[i]=o,o.call(e)):e[t]}const Is={};function gl(s,e,t){const r=`${s}.${String(t)}`;if(Is[r])return Is[r].bind(e);const n=Ji(s)[t];return typeof n!="function"?e[t]:(Is[r]=n,n.bind(e))}function wp(s){return Xe("Node",s,"childNodes")}function bp(s){return Xe("Node",s,"parentNode")}function Sp(s){return Xe("Node",s,"parentElement")}function Cp(s){return Xe("Node",s,"textContent")}function Ep(s,e){return gl("Node",s,"contains")(e)}function Ip(s){return gl("Node",s,"getRootNode")()}function xp(s){return!s||!("host"in s)?null:Xe("ShadowRoot",s,"host")}function Mp(s){return s.styleSheets}function Np(s){return!s||!("shadowRoot"in s)?null:Xe("Element",s,"shadowRoot")}function Ap(s,e){return Xe("Element",s,"querySelector")(e)}function Rp(s,e){return Xe("Element",s,"querySelectorAll")(e)}function yl(){return Ji("MutationObserver").constructor}function tt(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const P={childNodes:wp,parentNode:bp,parentElement:Sp,textContent:Cp,contains:Ep,getRootNode:Ip,host:xp,styleSheets:Mp,shadowRoot:Np,querySelector:Ap,querySelectorAll:Rp,mutationObserver:yl,patch:tt};function fe(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const nt=`Please stop import mirror directly. Instead of that,\r
65
+ https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Xi().version,a}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,a,l){return Y([i(l)]).process(o,a)},i};Y.stringify=Wd;Y.parse=Hd;Y.fromJSON=zd;Y.list=Yd;Y.comment=s=>new ol(s);Y.atRule=s=>new al(s);Y.decl=s=>new il(s);Y.rule=s=>new ll(s);Y.root=s=>new ul(s);Y.document=s=>new nl(s);Y.CssSyntaxError=Fd;Y.Declaration=il;Y.Container=Ud;Y.Processor=Xi;Y.Document=nl;Y.Comment=ol;Y.Warning=Vd;Y.AtRule=al;Y.Result=Gd;Y.Input=jd;Y.Rule=ll;Y.Root=ul;Y.Node=Zd;Bd.registerPostcss(Y);var Xd=Y;Y.default=Y;const se=af(Xd);se.stringify;se.fromJSON;se.plugin;se.parse;se.list;se.document;se.comment;se.atRule;se.rule;se.decl;se.root;se.CssSyntaxError;se.Declaration;se.Container;se.Processor;se.Document;se.Comment;se.Warning;se.AtRule;se.Result;se.Input;se.Rule;se.Root;se.Node;var P=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(P||{});function Jd(s){const e={},t=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return s.replace(i,"").split(t).forEach(function(n){if(n){const o=n.split(r);o.length>1&&(e[fi(o[0].trim())]=o[1].trim())}}),e}function uo(s){const e=[];for(const t in s){const r=s[t];if(typeof r!="string")continue;const i=ep(t);e.push(`${i}: ${r};`)}return e.join(" ")}const Kd=/-([a-z])/g,Qd=/^--[a-zA-Z0-9-]+$/,fi=s=>Qd.test(s)?s:s.replace(Kd,(e,t)=>t?t.toUpperCase():""),qd=/\B([A-Z])/g,ep=s=>s.replace(qd,"-$1").toLowerCase();class xe{constructor(...e){I(this,"parentElement",null),I(this,"parentNode",null),I(this,"ownerDocument"),I(this,"firstChild",null),I(this,"lastChild",null),I(this,"previousSibling",null),I(this,"nextSibling",null),I(this,"ELEMENT_NODE",1),I(this,"TEXT_NODE",3),I(this,"nodeType"),I(this,"nodeName"),I(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof xe){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class Ji extends xe{constructor(...e){super(e),I(this,"nodeType",9),I(this,"nodeName","#document"),I(this,"compatMode","CSS1Compat"),I(this,"RRNodeType",P.Document),I(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===P.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===P.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===P.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===P.Element||t===P.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===P.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=Ki(this,e);return r.parentElement=null,r}insertBefore(e,t){const r=e.RRNodeType;if((r===P.Element||r===P.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===P.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=pl(this,e,t);return i.parentElement=null,i}removeChild(e){return ml(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const r=this.createDocumentType("html",t,"");this.open(),this.appendChild(r)}}createDocument(e,t,r){return new Ji}createDocumentType(e,t,r){const i=new cl(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=new us(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new hl(e);return t.ownerDocument=this,t}createComment(e){const t=new fl(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new dl(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class cl extends xe{constructor(e,t,r){super(),I(this,"nodeType",10),I(this,"RRNodeType",P.DocumentType),I(this,"name"),I(this,"publicId"),I(this,"systemId"),I(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class us extends xe{constructor(e){super(),I(this,"nodeType",1),I(this,"RRNodeType",P.Element),I(this,"tagName"),I(this,"attributes",{}),I(this,"shadowRoot",null),I(this,"scrollLeft"),I(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new sp(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?Jd(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,n)=>{if(t.test(r))return;const o=fi(r);i?e[o]=i:delete e[o],n==="important"&&(e[o]+=" !important"),this.attributes.style=uo(e)},e.removeProperty=r=>{if(t.test(r))return"";const i=fi(r),n=e[i]||"";return delete e[i],this.attributes.style=uo(e),n},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,r){this.setAttribute(t,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return Ki(this,e)}insertBefore(e,t){return pl(this,e,t)}removeChild(e){return ml(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class tp extends us{constructor(){super(...arguments),I(this,"currentTime"),I(this,"volume"),I(this,"paused"),I(this,"muted"),I(this,"playbackRate"),I(this,"loop")}attachShadow(e){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 rp extends us{constructor(){super(...arguments),I(this,"tagName","DIALOG"),I(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}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 hl extends xe{constructor(e){super(),I(this,"nodeType",3),I(this,"nodeName","#text"),I(this,"RRNodeType",P.Text),I(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class fl extends xe{constructor(e){super(),I(this,"nodeType",8),I(this,"nodeName","#comment"),I(this,"RRNodeType",P.Comment),I(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class dl extends xe{constructor(e){super(),I(this,"nodeName","#cdata-section"),I(this,"nodeType",4),I(this,"RRNodeType",P.CDATA),I(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class sp{constructor(e,t){if(I(this,"onChange"),I(this,"classes",[]),I(this,"add",(...r)=>{for(const i of r){const n=String(i);this.classes.indexOf(n)>=0||this.classes.push(n)}this.onChange&&this.onChange(this.classes.join(" "))}),I(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}}function Ki(s,e){return e.parentNode&&e.parentNode.removeChild(e),s.lastChild?(s.lastChild.nextSibling=e,e.previousSibling=s.lastChild):(s.firstChild=e,e.previousSibling=null),s.lastChild=e,e.nextSibling=null,e.parentNode=s,e.parentElement=s,e.ownerDocument=s.ownerDocument,e}function pl(s,e,t){if(!t)return Ki(s,e);if(t.parentNode!==s)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===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:s.firstChild=e,e.parentElement=s,e.parentNode=s,e.ownerDocument=s.ownerDocument),e}function ml(s,e){if(e.parentNode!==s)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:s.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:s.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var ve=(s=>(s[s.PLACEHOLDER=0]="PLACEHOLDER",s[s.ELEMENT_NODE=1]="ELEMENT_NODE",s[s.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",s[s.TEXT_NODE=3]="TEXT_NODE",s[s.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",s[s.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",s[s.ENTITY_NODE=6]="ENTITY_NODE",s[s.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",s[s.COMMENT_NODE=8]="COMMENT_NODE",s[s.DOCUMENT_NODE=9]="DOCUMENT_NODE",s[s.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",s[s.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",s))(ve||{});const di={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},ip={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"};let Oe=null;function jr(s,e,t,r=e.mirror||e.ownerDocument.mirror){s=np(s,e,t,r),gl(s,e,t,r),op(s,e,t)}function np(s,e,t,r){var i;if(t.afterAppend&&!Oe&&(Oe=new WeakSet,setTimeout(()=>{Oe=null},0)),!Qi(s,e)){const n=Hr(e,t.mirror,r);(i=s.parentNode)==null||i.replaceChild(n,s),s=n}switch(e.RRNodeType){case P.Document:{if(!it(s,e,t.mirror,r)){const n=r.getMeta(e);n&&(t.mirror.removeNodeFromMap(s),s.close(),s.open(),t.mirror.add(s,n),Oe==null||Oe.add(s))}break}case P.Element:{const n=s,o=e;switch(o.tagName){case"IFRAME":{const a=s.contentDocument;if(!a)break;jr(a,e.contentDocument,t,r);break}}o.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),gl(n.shadowRoot,o.shadowRoot,t,r)),ap(n,o,r);break}}return s}function op(s,e,t){var r;switch(e.RRNodeType){case P.Document:{const i=e.scrollData;i&&t.applyScroll(i,!0);break}case P.Element:{const i=s,n=e;switch(n.scrollData&&t.applyScroll(n.scrollData,!0),n.inputData&&t.applyInput(n.inputData),n.tagName){case"AUDIO":case"VIDEO":{const o=s,a=n;a.paused!==void 0&&(a.paused?o.pause():o.play()),a.muted!==void 0&&(o.muted=a.muted),a.volume!==void 0&&(o.volume=a.volume),a.currentTime!==void 0&&(o.currentTime=a.currentTime),a.playbackRate!==void 0&&(o.playbackRate=a.playbackRate),a.loop!==void 0&&(o.loop=a.loop);break}case"CANVAS":{const o=e;if(o.rr_dataURL!==null){const a=document.createElement("img");a.onload=()=>{const l=i.getContext("2d");l&&l.drawImage(a,0,0,a.width,a.height)},a.src=o.rr_dataURL}o.canvasMutations.forEach(a=>t.applyCanvas(a.event,a.mutation,s));break}case"STYLE":{const o=i.sheet;o&&e.rules.forEach(a=>t.applyStyleSheetMutation(a,o));break}case"DIALOG":{const o=i,a=n,l=o.open,u=o.matches("dialog:modal"),c=a.open,h=a.isModal,f=u!==h,p=l!==c;if((f||l&&p)&&o.close(),c&&(p||f))try{h?o.showModal():o.show()}catch(d){console.warn(d)}break}}break}case P.Text:case P.Comment:case P.CDATA:{s.textContent!==e.data&&(s.textContent=e.data);break}}Oe!=null&&Oe.has(s)&&(Oe.delete(s),(r=t.afterAppend)==null||r.call(t,s,t.mirror.getId(s)))}function ap(s,e,t){const r=s.attributes,i=e.attributes;for(const n in i){const o=i[n],a=t.getMeta(e);if(a!=null&&a.isSVG&&di[n])s.setAttributeNS(di[n],n,o);else if(e.tagName==="CANVAS"&&n==="rr_dataURL"){const l=document.createElement("img");l.src=o,l.onload=()=>{const u=s.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&n==="srcdoc")continue;try{s.setAttribute(n,o)}catch(l){console.warn(l)}}}for(const{name:n}of Array.from(r))n in i||s.removeAttribute(n);e.scrollLeft&&(s.scrollLeft=e.scrollLeft),e.scrollTop&&(s.scrollTop=e.scrollTop)}function gl(s,e,t,r){const i=Array.from(s.childNodes),n=e.childNodes;if(i.length===0&&n.length===0)return;let o=0,a=i.length-1,l=0,u=n.length-1,c=i[o],h=i[a],f=n[l],p=n[u],d,m;for(;o<=a&&l<=u;)if(c===void 0)c=i[++o];else if(h===void 0)h=i[--a];else if(it(c,f,t.mirror,r))c=i[++o],f=n[++l];else if(it(h,p,t.mirror,r))h=i[--a],p=n[--u];else if(it(c,p,t.mirror,r)){try{s.insertBefore(c,h.nextSibling)}catch(w){console.warn(w)}c=i[++o],p=n[--u]}else if(it(h,f,t.mirror,r)){try{s.insertBefore(h,c)}catch(w){console.warn(w)}h=i[--a],f=n[++l]}else{if(!d){d={};for(let v=o;v<=a;v++){const C=i[v];C&&t.mirror.hasNode(C)&&(d[t.mirror.getId(C)]=v)}}m=d[r.getId(f)];const w=i[m];if(m!==void 0&&w&&it(w,f,t.mirror,r)){try{s.insertBefore(w,c)}catch(v){console.warn(v)}i[m]=void 0}else{const v=Hr(f,t.mirror,r);s.nodeName==="#document"&&c&&(v.nodeType===v.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||v.nodeType===v.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(s.removeChild(c),t.mirror.removeNodeFromMap(c),c=i[++o]);try{s.insertBefore(v,c||null)}catch(C){console.warn(C)}}f=n[++l]}if(o>a){const w=n[u+1];let v=null;for(w&&(v=t.mirror.getNode(r.getId(w)));l<=u;++l){const C=Hr(n[l],t.mirror,r);try{s.insertBefore(C,v)}catch(E){console.warn(E)}}}else if(l>u)for(;o<=a;o++){const w=i[o];if(!(!w||w.parentNode!==s))try{s.removeChild(w),t.mirror.removeNodeFromMap(w)}catch(v){console.warn(v)}}let g=s.firstChild,y=e.firstChild;for(;g!==null&&y!==null;)jr(g,y,t,r),g=g.nextSibling,y=y.nextSibling}function Hr(s,e,t){const r=t.getId(s),i=t.getMeta(s);let n=null;if(r>-1&&(n=e.getNode(r)),n!==null&&Qi(n,s))return n;switch(s.RRNodeType){case P.Document:n=new Document;break;case P.DocumentType:n=document.implementation.createDocumentType(s.name,s.publicId,s.systemId);break;case P.Element:{let o=s.tagName.toLowerCase();o=ip[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?n=document.createElementNS(di.svg,o):n=document.createElement(s.tagName);break}case P.Text:n=document.createTextNode(s.data);break;case P.Comment:n=document.createComment(s.data);break;case P.CDATA:n=document.createCDATASection(s.data);break}i&&e.add(n,D({},i));try{Oe==null||Oe.add(n)}catch(o){}return n}function Qi(s,e){return s.nodeType!==e.nodeType?!1:s.nodeType!==s.ELEMENT_NODE||s.tagName.toUpperCase()===e.tagName}function it(s,e,t,r){const i=t.getId(s),n=r.getId(e);return i===-1||i!==n?!1:Qi(s,e)}class bt extends Ji{constructor(e){super(),I(this,"UNSERIALIZED_STARTING_ID",-2),I(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),I(this,"mirror",wp()),I(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new bt}createDocumentType(e,t,r){const i=new lp(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new up(t);break;case"IFRAME":r=new dp(t,this.mirror);break;case"CANVAS":r=new hp(t);break;case"STYLE":r=new fp(t);break;case"DIALOG":r=new cp(t);break;default:r=new cs(t);break}return r.ownerDocument=this,r}createComment(e){const t=new mp(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new gp(e);return t.ownerDocument=this,t}createTextNode(e){const t=new pp(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const lp=cl;class cs extends us{constructor(){super(...arguments),I(this,"inputData",null),I(this,"scrollData",null)}}class up extends tp{}class cp extends rp{}class hp extends cs{constructor(){super(...arguments),I(this,"rr_dataURL",null),I(this,"canvasMutations",[])}getContext(){return null}}class fp extends cs{constructor(){super(...arguments),I(this,"rules",[])}}class dp extends cs{constructor(e,t){super(e),I(this,"contentDocument",new bt),this.contentDocument.mirror=t}}const pp=hl,mp=fl,gp=dl;function yp(s){return s instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase()}function yl(s,e,t,r){let i;switch(s.nodeType){case ve.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=s.compatMode);break;case ve.DOCUMENT_TYPE_NODE:{const o=s;i=e.createDocumentType(o.name,o.publicId,o.systemId);break}case ve.ELEMENT_NODE:{const o=s,a=yp(o);i=e.createElement(a);const l=i;for(const{name:u,value:c}of Array.from(o.attributes))l.attributes[u]=c;o.scrollLeft&&(l.scrollLeft=o.scrollLeft),o.scrollTop&&(l.scrollTop=o.scrollTop);break}case ve.TEXT_NODE:i=e.createTextNode(s.textContent||"");break;case ve.CDATA_SECTION_NODE:i=e.createCDATASection(s.data);break;case ve.COMMENT_NODE:i=e.createComment(s.textContent||"");break;case ve.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let n=t.getMeta(s);return e instanceof bt&&(n||(n=vl(i,e.unserializedId),t.add(s,n)),e.mirror.add(i,D({},n))),i}function vp(s,e=tf(),t=new bt){function r(i,n){const o=yl(i,t,e,n);if(o!==null)if((n==null?void 0:n.nodeName)!=="IFRAME"&&i.nodeType!==ve.DOCUMENT_FRAGMENT_NODE&&(n==null||n.appendChild(o),o.parentNode=n,o.parentElement=n),i.nodeName==="IFRAME"){const a=i.contentDocument;a&&r(a,o)}else(i.nodeType===ve.DOCUMENT_NODE||i.nodeType===ve.ELEMENT_NODE||i.nodeType===ve.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ve.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,o),i.childNodes.forEach(a=>r(a,o)))}return r(s,null),t}function wp(){return new bp}class bp{constructor(){I(this,"idNodeMap",new Map),I(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function vl(s,e){switch(s.RRNodeType){case P.Document:return{id:e,type:s.RRNodeType,childNodes:[]};case P.DocumentType:{const t=s;return{id:e,type:s.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case P.Element:return{id:e,type:s.RRNodeType,tagName:s.tagName.toLowerCase(),attributes:{},childNodes:[]};case P.Text:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case P.Comment:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case P.CDATA:return{id:e,type:s.RRNodeType,textContent:""}}}const co={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ho={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Sr={},Sp=()=>!!globalThis.Zone;function qi(s){if(Sr[s])return Sr[s];const e=globalThis[s],t=e.prototype,r=s in co?co[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),n=s in ho?ho[s]:void 0,o=!!(n&&n.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&o&&!Sp())return Sr[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?Sr[s]=u:t}catch(a){return t}}const Is={};function Ze(s,e,t){var r;const i=`${s}.${String(t)}`;if(Is[i])return Is[i].call(e);const n=qi(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Is[i]=o,o.call(e)):e[t]}const xs={};function wl(s,e,t){const r=`${s}.${String(t)}`;if(xs[r])return xs[r].bind(e);const n=qi(s)[t];return typeof n!="function"?e[t]:(xs[r]=n,n.bind(e))}function Cp(s){return Ze("Node",s,"childNodes")}function Ep(s){return Ze("Node",s,"parentNode")}function Ip(s){return Ze("Node",s,"parentElement")}function xp(s){return Ze("Node",s,"textContent")}function Mp(s,e){return wl("Node",s,"contains")(e)}function Np(s){return wl("Node",s,"getRootNode")()}function Rp(s){return!s||!("host"in s)?null:Ze("ShadowRoot",s,"host")}function Ap(s){return s.styleSheets}function Op(s){return!s||!("shadowRoot"in s)?null:Ze("Element",s,"shadowRoot")}function Dp(s,e){return Ze("Element",s,"querySelector")(e)}function Tp(s,e){return Ze("Element",s,"querySelectorAll")(e)}function bl(){return qi("MutationObserver").constructor}function tt(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const $={childNodes:Cp,parentNode:Ep,parentElement:Ip,textContent:xp,contains:Mp,getRootNode:Np,host:Rp,styleSheets:Ap,shadowRoot:Op,querySelector:Dp,querySelectorAll:Tp,mutationObserver:bl,patch:tt};function fe(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const nt=`Please stop import mirror directly. Instead of that,\r
66
66
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
67
- or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(nt),-1},getNode(){return console.error(nt),null},removeNodeFromMap(){console.error(nt)},has(){return console.error(nt),!1},reset(){console.error(nt)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(s,e,t){return e==="map"&&console.error(nt),Reflect.get(s,e,t)}}));function wt(s,e,t={}){let r=null,i=0;return function(...n){const o=Date.now();!i&&t.leading===!1&&(i=o);const a=e-(o-i),l=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(l,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(l,n)},a))}}function Zt(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>Zt(s,e,n||{},!0)}function jr(){return Math.round(performance.timeOrigin+performance.now())}function Ki(s=window){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=P.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=P.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function Qi(s=window){const e=s.document;return s.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function qi(s=window){const e=s.document;return s.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function en(s){return s?s.nodeType===s.ELEMENT_NODE?s:P.parentElement(s):null}function de(s,e,t,r){if(!s)return!1;const i=en(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(_r(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function vl(s,e){return e.getId(s)!==-1}function Ar(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===kt}function tn(s,e){if(Rt(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=P.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?tn(r,e):!0}function Hr(s){return!!s.changedTouches}function rn(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function wl(s){const e={},t=(i,n)=>{const o={value:i,parent:n,children:[]};return e[i.node.id]=o,o},r=[];for(const i of s){const{nextId:n,parentId:o}=i;if(n&&n in e){const a=e[n];if(a.parent){const l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,t(i,a.parent))}else{const l=r.indexOf(a);r.splice(l,0,t(i,null))}continue}if(o in e){const a=e[o];a.children.push(t(i,a));continue}r.push(t(i,null))}return r}function sn(s,e){e(s.value);for(let t=s.children.length-1;t>=0;t--)sn(s.children[t],e)}function ft(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function nn(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function on(s,e){var t,r;const i=(r=(t=s.ownerDocument)==null?void 0:t.defaultView)==null?void 0:r.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const n=i.getBoundingClientRect(),o=on(i,e),a=n.height/i.clientHeight;return{x:n.x*o.relativeScale+o.x,y:n.y*o.relativeScale+o.y,relativeScale:a,absoluteScale:o.absoluteScale*a}}function Ge(s){return s?s instanceof Ie&&"shadowRoot"in s?!!s.shadowRoot:!!P.shadowRoot(s):!1}function ut(s,e){const t=s[e[0]];return e.length===1?t:ut(t.cssRules[e[1]].cssRules,e.slice(2))}function fi(s){const e=[...s],t=e.pop();return{positions:e,index:t}}function bl(s){const e=new Set,t=[];for(let r=s.length;r--;){const i=s[r];e.has(i.id)||(t.push(i),e.add(i.id))}return t}class an{constructor(){S(this,"id",1),S(this,"styleIDMap",new WeakMap),S(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function ln(s){var e;let t=null;return"getRootNode"in s&&((e=P.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&P.host(P.getRootNode(s))&&(t=P.host(P.getRootNode(s))),t}function Sl(s){let e=s,t;for(;t=ln(e);)e=t;return e}function Cl(s){const e=s.ownerDocument;if(!e)return!1;const t=Sl(s);return P.contains(e,t)}function un(s){const e=s.ownerDocument;return e?P.contains(e,s)||Cl(s):!1}const Op=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:an,get _mirror(){return exports.mirror},closestElementOfNode:en,getBaseDimension:on,getNestedRule:ut,getPositionsAndIndex:fi,getRootShadowHost:Sl,getShadowHost:ln,getWindowHeight:Qi,getWindowScroll:Ki,getWindowWidth:qi,hasShadowRoot:Ge,hookSetter:Zt,inDom:un,isAncestorRemoved:tn,isBlocked:de,isIgnored:Ar,isSerialized:vl,isSerializedIframe:ft,isSerializedStylesheet:nn,iterateResolveTree:sn,legacy_isTouchEvent:Hr,nowTimestamp:jr,on:fe,polyfill:rn,queueToResolveTrees:wl,shadowHostInDom:Cl,throttle:wt,uniqueTextMutations:bl},Symbol.toStringTag,{value:"Module"}));var M=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(M||{}),x=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(x||{}),U=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(U||{}),$e=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))($e||{}),Be=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Be||{}),Ve=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Ve||{}),B=(s=>(s.Start="start",s.Pause="pause",s.Resume="resume",s.Resize="resize",s.Finish="finish",s.FullsnapshotRebuilded="fullsnapshot-rebuilded",s.LoadStylesheetStart="load-stylesheet-start",s.LoadStylesheetEnd="load-stylesheet-end",s.SkipStart="skip-start",s.SkipEnd="skip-end",s.MouseInteraction="mouse-interaction",s.EventCast="event-cast",s.CustomEvent="custom-event",s.Flush="flush",s.StateChange="state-change",s.PlayBack="play-back",s.Destroy="destroy",s))(B||{}),Pe=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(Pe||{});function uo(s){return"__ln"in s}class Dp{constructor(){S(this,"length",0),S(this,"head",null),S(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&uo(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&uo(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const co=(s,e)=>`${s}@${e}`;class Tp{constructor(){S(this,"frozen",!1),S(this,"locked",!1),S(this,"texts",[]),S(this,"attributes",[]),S(this,"attributeMap",new WeakMap),S(this,"removes",[]),S(this,"mapRemoves",[]),S(this,"movedMap",{}),S(this,"addedSet",new Set),S(this,"movedSet",new Set),S(this,"droppedSet",new Set),S(this,"removesSubTreeCache",new Set),S(this,"mutationCb"),S(this,"blockClass"),S(this,"blockSelector"),S(this,"maskTextClass"),S(this,"maskTextSelector"),S(this,"excludeAttribute"),S(this,"includeAttribute"),S(this,"inlineStylesheet"),S(this,"maskInputOptions"),S(this,"maskTextFn"),S(this,"maskInputFn"),S(this,"keepIframeSrcFn"),S(this,"recordCanvas"),S(this,"inlineImages"),S(this,"slimDOMOptions"),S(this,"dataURLOptions"),S(this,"doc"),S(this,"mirror"),S(this,"iframeManager"),S(this,"stylesheetManager"),S(this,"shadowDomManager"),S(this,"canvasManager"),S(this,"processedNodeManager"),S(this,"unattachedDoc"),S(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),S(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Dp,i=l=>{let u=l,c=kt;for(;c===kt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=l=>{const u=P.parentNode(l);if(!u||!un(l))return;let c=!1;if(l.nodeType===Node.TEXT_NODE){const d=u.tagName;if(d==="TEXTAREA")return;d==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=Rt(u)?this.mirror.getId(ln(l)):this.mirror.getId(u),f=i(l);if(h===-1||f===-1)return r.addNode(l);const p=lt(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,excludeAttribute:this.excludeAttribute,includeAttribute:this.includeAttribute,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:d=>{ft(d,this.mirror)&&this.iframeManager.addIframe(d),nn(d,this.mirror)&&this.stylesheetManager.trackLinkElement(d),Ge(l)&&this.shadowDomManager.addShadowRoot(P.shadowRoot(l),this.doc)},onIframeLoad:(d,m)=>{this.iframeManager.attachIframe(d,m),this.shadowDomManager.observeAttachShadow(d)},onStylesheetLoad:(d,m)=>{this.stylesheetManager.attachLinkElement(d,m)},cssCaptured:c});p&&(e.push({parentId:h,nextId:f,node:p}),t.add(p.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)ho(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(P.parentNode(l))||n(l);for(const l of this.addedSet)!fo(this.droppedSet,l)&&!ho(this.removesSubTreeCache,l,this.mirror)||fo(this.movedSet,l)?n(l):this.droppedSet.add(l);let o=null;for(;r.length;){let l=null;if(o){const u=this.mirror.getId(P.parentNode(o.value)),c=i(o.value);u!==-1&&c!==-1&&(l=o)}if(!l){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId(P.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){l=c;break}else{const p=c.value,d=P.parentNode(p);if(d&&d.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=P.host(d);if(this.mirror.getId(m)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}o=l.previous,r.removeNode(l.value),n(l.value)}const a={texts:this.texts.map(l=>{const u=l.node,c=P.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:l.value}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:u}=l;if(typeof u.style=="string"){const c=JSON.stringify(l.styleDiff),h=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),S(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(P.childNodes(e),i=>P.textContent(i)||"").join("");t.attributes.value=Dr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Tr(e),value:r,maskInputFn:this.maskInputFn})}),S(this,"processMutation",e=>{if(!Ar(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=P.textContent(e.target);!de(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Wo(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,en(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);const n=t[r];if(i===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(n===""||n===null||typeof n=="undefined")&&!ks(r,this.includeAttribute)||Uo(r,this.excludeAttribute))return;if(r==="value"){const l=Tr(t);i=Dr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:l,value:i,maskInputFn:this.maskInputFn})}if(de(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let a=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(a||(a={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(e.target,a)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Bo(t.tagName,r)){if(a.attributes[r]=Fo(this.doc,He(t.tagName),He(r),i),i===a.attributes[r]&&!ks(r,this.includeAttribute)){delete a.attributes[r],Object.keys(a.attributes).length===0&&(this.attributes=this.attributes.filter(l=>l!==a),this.attributeMap.delete(e.target));return}if(r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(u){this.unattachedDoc=this.doc}const l=this.unattachedDoc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue);for(const u of Array.from(t.style)){const c=t.style.getPropertyValue(u),h=t.style.getPropertyPriority(u);c!==l.style.getPropertyValue(u)||h!==l.style.getPropertyPriority(u)?h===""?a.styleDiff[u]=c:a.styleDiff[u]=[c,h]:a._unchangedStyles[u]=[c,h]}for(const u of Array.from(l.style))t.style.getPropertyValue(u)===""&&(a.styleDiff[u]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal")}break}case"childList":{if(de(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=Rt(e.target)?this.mirror.getId(P.host(e.target)):this.mirror.getId(e.target);de(e.target,this.blockClass,this.blockSelector,!1)||Ar(t,this.mirror,this.slimDOMOptions)||!vl(t,this.mirror)||(this.addedSet.has(t)?(di(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||tn(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[co(r,i)]?di(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Rt(e.target)&&Ot(e.target)?!0:void 0}),kp(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),S(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Ar(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[co(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);de(e,this.blockClass,this.blockSelector,!1)||(P.childNodes(e).forEach(r=>this.genAdds(r)),Ge(e)&&P.childNodes(P.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","includeAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function di(s,e){s.delete(e),P.childNodes(e).forEach(t=>di(s,t))}function kp(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),P.childNodes(r).forEach(i=>t.push(i)))}}function ho(s,e,t){return s.size===0?!1:_p(s,e)}function _p(s,e,t){const r=P.parentNode(e);return r?s.has(r):!1}function fo(s,e){return s.size===0?!1:El(s,e)}function El(s,e){const t=P.parentNode(e);return t?s.has(t)?!0:El(s,t):!1}let Tt;function $p(s){Tt=s}function Pp(){Tt=void 0}const F=s=>Tt?(...t)=>{try{return s(...t)}catch(r){if(Tt&&Tt(r)===!0)return;throw r}}:s,Qe=[];function Xt(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function Il(s,e){const t=new Tp;Qe.push(t),t.init(s);const r=new(yl())(F(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Lp({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],a;const l=wt(F(h=>{const f=Date.now()-a;s(o.map(p=>(p.timeOffset-=f,p)),h),o=[],a=null}),n),u=F(wt(F(h=>{const f=Xt(h),{clientX:p,clientY:d}=Hr(h)?h.changedTouches[0]:h;a||(a=jr()),o.push({x:p,y:d,id:r.getId(f),timeOffset:jr()-a}),l(typeof DragEvent!="undefined"&&h instanceof DragEvent?x.Drag:h instanceof MouseEvent?x.MouseMove:x.TouchMove)}),i,{trailing:!1})),c=[fe("mousemove",u,t),fe("touchmove",u,t),fe("drag",u,t)];return F(()=>{c.forEach(h=>h())})}function Fp({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,a=[];let l=null;const u=c=>h=>{const f=Xt(h);if(de(f,r,i,!0))return;let p=null,d=c;if("pointerType"in h){switch(h.pointerType){case"mouse":p=$e.Mouse;break;case"touch":p=$e.Touch;break;case"pen":p=$e.Pen;break}p===$e.Touch?U[c]===U.MouseDown?d="TouchStart":U[c]===U.MouseUp&&(d="TouchEnd"):$e.Pen}else Hr(h)&&(p=$e.Touch);p!==null?(l=p,(d.startsWith("Touch")&&p===$e.Touch||d.startsWith("Mouse")&&p===$e.Mouse)&&(p=null)):U[c]===U.Click&&(p=l,l=null);const m=Hr(h)?h.changedTouches[0]:h;if(!m)return;const g=t.getId(f),{clientX:y,clientY:w}=m;F(s)(D({type:U[d],id:g,x:y,y:w},p!==null&&{pointerType:p}))};return Object.keys(U).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let h=He(c);const f=u(c);if(window.PointerEvent)switch(U[c]){case U.MouseDown:case U.MouseUp:h=h.replace("mouse","pointer");break;case U.TouchStart:case U.TouchEnd:return}a.push(fe(h,f,e))}),F(()=>{a.forEach(c=>c())})}function xl({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const o=F(wt(F(a=>{const l=Xt(a);if(!l||de(l,r,i,!0))return;const u=t.getId(l);if(l===e&&e.defaultView){const c=Ki(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:l.scrollLeft,y:l.scrollTop})}),n.scroll||100));return fe("scroll",o,e)}function Bp({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=F(wt(F(()=>{const n=Qi(),o=qi();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return fe("resize",i,e)}const xs=["INPUT","TEXTAREA","SELECT"],po=new WeakMap;function Up({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function h(w){let v=Xt(w);const C=w.isTrusted,E=v&&v.tagName;if(v&&E==="OPTION"&&(v=P.parentElement(v)),!v||!E||xs.indexOf(E)<0||de(v,r,i,!0)||v.classList.contains(n)||o&&v.matches(o))return;let A=v.value,R=!1;const b=Tr(v)||"";b==="radio"||b==="checkbox"?R=v.checked:(a[E.toLowerCase()]||a[b])&&(A=Dr({element:v,maskInputOptions:a,tagName:E,type:b,value:A,maskInputFn:l})),f(v,c?{text:A,isChecked:R,userTriggered:C}:{text:A,isChecked:R});const N=v.name;b==="radio"&&N&&R&&e.querySelectorAll(`input[type="radio"][name="${N}"]`).forEach(k=>{if(k!==v){const j=k.value;f(k,c?{text:j,isChecked:!R,userTriggered:!1}:{text:j,isChecked:!R})}})}function f(w,v){const C=po.get(w),E=w,A=E.hasAttribute("placeholder"),R=E.value==="",b=typeof E.defaultValue=="string"?E.defaultValue==="":!0,N=!v.userTriggered,k=!C||C.text==="",j=A&&R&&b&&k&&N&&!v.isChecked&&E.type!=="hidden"&&xs.includes(E.tagName),W=E.tagName==="INPUT"&&E.type==="text"&&!v.userTriggered&&v.text===E.defaultValue&&!C&&E.hasAttribute("placeholder"),Z=!v.userTriggered&&E.value===E.defaultValue&&!C&&E.hasAttribute("placeholder")&&!v.isChecked&&E.type!=="hidden"&&xs.includes(E.tagName),z=E.type==="checkbox"&&!v.userTriggered&&!v.isChecked&&!C,O=E.type==="radio"&&!v.userTriggered&&!v.isChecked&&!C;if(!(j||W||Z||z||O)&&(!C||C.text!==v.text||C.isChecked!==v.isChecked)){po.set(w,v);const V=t.getId(w);F(s)(ue(D({},v),{id:V}))}}const d=(u.input==="last"?["change"]:["input","change"]).map(w=>fe(w,F(h),e)),m=e.defaultView;if(!m)return()=>{d.forEach(w=>w())};const g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),y=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&d.push(...y.map(w=>Zt(w[0],w[1],{set(){F(h)({target:this,isTrusted:!1})}},!1,m))),F(()=>{d.forEach(w=>w())})}function Yr(s){const e=[];function t(r,i){if(br("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||br("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||br("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||br("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function ze(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Wp({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:F((c,h,f)=>{const[p,d]=f,{id:m,styleId:g}=ze(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,adds:[{rule:p,index:d}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,f=this.cssRules.length){const p=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[p,f])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:F((c,h,f)=>{const[p]=f,{id:d,styleId:m}=ze(h,e,t.styleMirror);return(d&&d!==-1||m&&m!==-1)&&s({id:d,styleId:m,removes:[{index:p}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:F((c,h,f)=>{const[p]=f,{id:d,styleId:m}=ze(h,e,t.styleMirror);return(d&&d!==-1||m&&m!==-1)&&s({id:d,styleId:m,replace:p}),c.apply(h,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:F((c,h,f)=>{const[p]=f,{id:d,styleId:m}=ze(h,e,t.styleMirror);return(d&&d!==-1||m&&m!==-1)&&s({id:d,styleId:m,replaceSync:p}),c.apply(h,f)})}));const l={};Sr("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(Sr("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),Sr("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),Sr("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(l).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:F((f,p,d)=>{const[m,g]=d,{id:y,styleId:w}=ze(p.parentStyleSheet,e,t.styleMirror);return(y&&y!==-1||w&&w!==-1)&&s({id:y,styleId:w,adds:[{rule:m,index:[...Yr(p),g||0]}]}),f.apply(p,d)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:F((f,p,d)=>{const[m]=d,{id:g,styleId:y}=ze(p.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||y&&y!==-1)&&s({id:g,styleId:y,removes:[{index:[...Yr(p),m]}]}),f.apply(p,d)})})}),F(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function Ml({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(P.host(t));const a=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,l=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!a||!l?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var u;return(u=l.get)==null?void 0:u.call(this)},set(u){var c;const h=(c=l.set)==null?void 0:c.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch(f){}return h}}),F(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function zp({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:F((a,l,u)=>{var c;const[h,f,p]=u;if(t.has(h))return n.apply(l,[h,f,p]);const{id:d,styleId:m}=ze((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(d&&d!==-1||m&&m!==-1)&&s({id:d,styleId:m,set:{property:h,value:f,priority:p},index:Yr(l.parentRule)}),a.apply(l,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:F((a,l,u)=>{var c;const[h]=u;if(t.has(h))return o.apply(l,[h]);const{id:f,styleId:p}=ze((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||p&&p!==-1)&&s({id:f,styleId:p,remove:{property:h},index:Yr(l.parentRule)}),a.apply(l,u)})}),F(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Vp({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const o=F(l=>wt(F(u=>{const c=Xt(u);if(!c||de(c,e,t,!0))return;const{currentTime:h,volume:f,muted:p,playbackRate:d,loop:m}=c;s({type:l,id:r.getId(c),currentTime:h,volume:f,muted:p,playbackRate:d,loop:m})}),i.media||500)),a=[fe("play",o(Ve.Play),n),fe("pause",o(Ve.Pause),n),fe("seeked",o(Ve.Seeked),n),fe("volumechange",o(Ve.VolumeChange),n),fe("ratechange",o(Ve.RateChange),n)];return F(()=>{a.forEach(l=>l())})}function Gp({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(l,u,c){const h=new n(l,u,c);return i.set(h,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};const o=tt(e.fonts,"add",function(a){return function(l){return setTimeout(F(()=>{const u=i.get(l);u&&(s(u),i.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{t.FontFace=n}),r.push(o),F(()=>{r.forEach(a=>a())})}function jp(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let o=!0;const a=F(()=>{const l=e.getSelection();if(!l||o&&(l!=null&&l.isCollapsed))return;o=l.isCollapsed||!1;const u=[],c=l.rangeCount||0;for(let h=0;h<c;h++){const f=l.getRangeAt(h),{startContainer:p,startOffset:d,endContainer:m,endOffset:g}=f;de(p,r,i,!0)||de(m,r,i,!0)||u.push({start:t.getId(p),startOffset:d,end:t.getId(m),endOffset:g})}n({ranges:u})});return a(),fe("selectionchange",a)}function Hp({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:tt(t.customElements,"define",function(i){return function(n,o,a){try{e({define:{name:n}})}catch(l){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,a])}})}function Yp(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:f,selectionCb:p,customElementCb:d}=s;s.mutationCb=(...m)=>{e.mutation&&e.mutation(...m),t(...m)},s.mousemoveCb=(...m)=>{e.mousemove&&e.mousemove(...m),r(...m)},s.mouseInteractionCb=(...m)=>{e.mouseInteraction&&e.mouseInteraction(...m),i(...m)},s.scrollCb=(...m)=>{e.scroll&&e.scroll(...m),n(...m)},s.viewportResizeCb=(...m)=>{e.viewportResize&&e.viewportResize(...m),o(...m)},s.inputCb=(...m)=>{e.input&&e.input(...m),a(...m)},s.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),l(...m)},s.styleSheetRuleCb=(...m)=>{e.styleSheetRule&&e.styleSheetRule(...m),u(...m)},s.styleDeclarationCb=(...m)=>{e.styleDeclaration&&e.styleDeclaration(...m),c(...m)},s.canvasMutationCb=(...m)=>{e.canvasMutation&&e.canvasMutation(...m),h(...m)},s.fontCb=(...m)=>{e.font&&e.font(...m),f(...m)},s.selectionCb=(...m)=>{e.selection&&e.selection(...m),p(...m)},s.customElementCb=(...m)=>{e.customElement&&e.customElement(...m),d(...m)}}function Zp(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Yp(s,e);let r;s.recordDOM&&(r=Il(s,s.doc));const i=Lp(s),n=Fp(s),o=xl(s),a=Bp(s,{win:t}),l=Up(s),u=Vp(s);let c=()=>{},h=()=>{},f=()=>{},p=()=>{};s.recordDOM&&(c=Wp(s,{win:t}),h=Ml(s,s.doc),f=zp(s,{win:t}),s.collectFonts&&(p=Gp(s)));const d=jp(s),m=Hp(s),g=[];for(const y of s.plugins)g.push(y.observer(y.callback,t,y.options));return F(()=>{Qe.forEach(y=>y.reset()),r==null||r.disconnect(),i(),n(),o(),a(),l(),u(),c(),h(),f(),p(),d(),m(),g.forEach(y=>y())})}function br(s){return typeof window[s]!="undefined"}function Sr(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class mo{constructor(e){S(this,"iframeIdToRemoteIdMap",new WeakMap),S(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e);let a=n.get(t);return a||(a=this.generateIdFn(),n.set(t,a),o.set(a,t)),a}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Xp{constructor(e){S(this,"iframes",new WeakMap),S(this,"crossOriginIframeMap",new WeakMap),S(this,"crossOriginIframeMirror",new mo(Lo)),S(this,"crossOriginIframeStyleMirror"),S(this,"crossOriginIframeRootIdMap",new WeakMap),S(this,"mirror"),S(this,"mutationCb"),S(this,"wrappedEmit"),S(this,"loadListener"),S(this,"stylesheetManager"),S(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new mo(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case M.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:M.IncrementalSnapshot,data:{source:x.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case M.Meta:case M.Load:case M.DomContentLoaded:return!1;case M.Plugin:return t;case M.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case M.IncrementalSnapshot:switch(t.data.source){case x.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.Drag:case x.TouchMove:case x.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.ViewportResize:return!1;case x.MediaInteraction:case x.MouseInteraction:case x.Scroll:case x.CanvasMutation:case x.Input:return this.replaceIds(t.data,e,["id"]),t;case x.StyleSheetRule:case x.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case x.Font:return t;case x.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case x.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==Pe.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class Jp{constructor(e){S(this,"shadowDoms",new WeakSet),S(this,"mutationCb"),S(this,"scrollCb"),S(this,"bypassOptions"),S(this,"mirror"),S(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Ot(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Il(ue(D({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(xl(ue(D({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(P.host(e))),this.restoreHandlers.push(Ml({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(tt(e.prototype,"attachShadow",function(i){return function(n){const o=i.call(this,n),a=P.shadowRoot(this);return a&&un(this)&&r.addShadowRoot(a,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",At=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Cr=0;Cr<ct.length;Cr++)At[ct.charCodeAt(Cr)]=Cr;var Kp=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=ct[e[t]>>2],i+=ct[(e[t]&3)<<4|e[t+1]>>4],i+=ct[(e[t+1]&15)<<2|e[t+2]>>6],i+=ct[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},Qp=function(s){var e=s.length*.75,t=s.length,r,i=0,n,o,a,l;s[s.length-1]==="="&&(e--,s[s.length-2]==="="&&e--);var u=new ArrayBuffer(e),c=new Uint8Array(u);for(r=0;r<t;r+=4)n=At[s.charCodeAt(r)],o=At[s.charCodeAt(r+1)],a=At[s.charCodeAt(r+2)],l=At[s.charCodeAt(r+3)],c[i++]=n<<2|o>>4,c[i++]=(o&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u};const go=new Map;function qp(s,e){let t=go.get(s);return t||(t=new Map,go.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Nl=(s,e,t)=>{if(!s||!(Rl(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=qp(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function Rr(s,e,t){if(s instanceof Array)return s.map(r=>Rr(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=Kp(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Rr(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[Rr(s.data,e,t),s.width,s.height]};if(Rl(s,e)||typeof s=="object"){const r=s.constructor.name,i=Nl(s,e,t);return{rr_type:r,index:i}}}}return s}const Al=(s,e,t)=>s.map(r=>Rr(r,e,t)),Rl=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function em(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const a=tt(e.CanvasRenderingContext2D.prototype,o,function(l){return function(...u){return de(this.canvas,t,r,!0)||setTimeout(()=>{const c=Al(u,e,this);s(this.canvas,{type:Be["2D"],property:o,args:c})},0),l.apply(this,u)}});i.push(a)}catch(a){const l=Zt(e.CanvasRenderingContext2D.prototype,o,{set(u){s(this.canvas,{type:Be["2D"],property:o,args:[u],setter:!0})}});i.push(l)}return()=>{i.forEach(o=>o())}}function tm(s){return s==="experimental-webgl"?"webgl":s}function yo(s,e,t,r){const i=[];try{const n=tt(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(a,...l){if(!de(this,e,t,!0)){const u=tm(a);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(l[0]&&typeof l[0]=="object"){const c=l[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[a,...l])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function vo(s,e,t,r,i,n){const o=[],a=Object.getOwnPropertyNames(s);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof s[l]!="function")continue;const u=tt(s,l,function(c){return function(...h){const f=c.apply(this,h);if(Nl(f,n,this),"tagName"in this.canvas&&!de(this.canvas,r,i,!0)){const p=Al(h,n,this),d={type:e,property:l,args:p};t(this.canvas,d)}return f}});o.push(u)}catch(u){const c=Zt(s,l,{set(h){t(this.canvas,{type:e,property:l,args:[h],setter:!0})}});o.push(c)}return o}function rm(s,e,t,r){const i=[];return i.push(...vo(e.WebGLRenderingContext.prototype,Be.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...vo(e.WebGL2RenderingContext.prototype,Be.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const Ol="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",sm=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),wo=typeof window!="undefined"&&window.Blob&&new Blob([sm(Ol)],{type:"text/javascript;charset=utf-8"});function im(s){let e;try{if(e=wo&&(window.URL||window.webkitURL).createObjectURL(wo),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+Ol,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class nm{constructor(e){S(this,"pendingCanvasMutations",new Map),S(this,"rafStamps",{latestId:0,invokeId:null}),S(this,"mirror"),S(this,"mutationCb"),S(this,"resetObservers"),S(this,"frozen",!1),S(this,"locked",!1),S(this,"processMutation",(l,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,i,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const o=yo(t,r,i,!0),a=new Map,l=new im;l.onmessage=d=>{const{id:m}=d.data;if(a.set(m,!1),!("base64"in d.data))return;const{base64:g,type:y,width:w,height:v}=d.data;this.mutationCb({id:m,type:Be["2D"],commands:[{property:"clearRect",args:[0,0,w,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:y}]},0,0]}]})};const u=1e3/e;let c=0,h;const f=()=>{const d=[];return t.document.querySelectorAll("canvas").forEach(m=>{de(m,r,i,!0)||d.push(m)}),d},p=d=>{if(c&&d-c<u){h=requestAnimationFrame(p);return}c=d,f().forEach(async m=>{var g;const y=this.mirror.getId(m);if(a.get(y)||m.width===0||m.height===0)return;if(a.set(y,!0),["webgl","webgl2"].includes(m.__context)){const v=m.getContext(m.__context);((g=v==null?void 0:v.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}const w=await createImageBitmap(m);l.postMessage({id:y,bitmap:w,width:m.width,height:m.height,dataURLOptions:n.dataURLOptions},[w])}),h=requestAnimationFrame(p)};h=requestAnimationFrame(p),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=yo(e,t,r,!1),n=em(this.processMutation.bind(this),e,t,r),o=rm(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(o=>{const u=o,{type:a}=u;return rt(u,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class om{constructor(e){S(this,"trackedLinkElements",new WeakSet),S(this,"mutationCb"),S(this,"adoptedStyleSheetCb"),S(this,"styleMirror",new an),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(a,l)=>({rule:ko(a,n.href),index:l}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class am{constructor(){S(this,"nodeMap",new WeakMap),S(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let oe,Or,Ms,Zr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((mn=s.contentWindow)==null?void 0:mn.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const Se=_o();function Je(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:a=null,excludeAttribute:l,includeAttribute:u,maskTextClass:c="rr-mask",maskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:p,maskInputOptions:d,slimDOMOptions:m,maskInputFn:g,maskTextFn:y,hooks:w,packFn:v,sampling:C={},dataURLOptions:E={},mousemoveWait:A,recordDOM:R=!0,recordCanvas:b=!1,recordCrossOriginIframes:N=!1,recordAfter:k=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:j=!1,collectFonts:W=!1,inlineImages:Z=!1,plugins:z,keepIframeSrcFn:O=()=>!1,ignoreCSSAttributes:V=new Set([]),errorHandler:T}=s;$p(T);const $=N?window.parent===window:!0;let J=!1;if(!$)try{window.parent.document&&(J=!1)}catch(G){J=!0}if($&&!e)throw new Error("emit function is required");if(!$&&!J)return()=>{};A!==void 0&&C.mousemove===void 0&&(C.mousemove=A),Se.reset();const ae=l===void 0?/^$a/:l,re=u===void 0?/.+/i:u,me=p===!0?{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}:d!==void 0?d:{password:!0},ye=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all",headTitleMutations:m==="all"}:m||{};rn();let ce,le=0;const Ke=G=>{for(const we of z||[])we.eventProcessor&&(G=we.eventProcessor(G));return v&&!J&&(G=v(G)),G};oe=(G,we)=>{var ie;const ne=G;if(ne.timestamp=jr(),(ie=Qe[0])!=null&&ie.isFrozen()&&ne.type!==M.FullSnapshot&&!(ne.type===M.IncrementalSnapshot&&ne.data.source===x.Mutation)&&Qe.forEach(Ae=>Ae.unfreeze()),$)e==null||e(Ke(ne),we);else if(J){const Ae={type:"rrweb",event:Ke(ne),origin:window.location.origin,isCheckout:we};window.parent.postMessage(Ae,"*")}if(ne.type===M.FullSnapshot)ce=ne,le=0;else if(ne.type===M.IncrementalSnapshot){if(ne.data.source===x.Mutation&&ne.data.isAttachIframe)return;le++;const Ae=r&&le>=r,X=t&&ne.timestamp-ce.timestamp>t;(Ae||X)&&Or(!0)}};const xe=G=>{oe({type:M.IncrementalSnapshot,data:D({source:x.Mutation},G)})},ke=G=>oe({type:M.IncrementalSnapshot,data:D({source:x.Scroll},G)}),Jt=G=>oe({type:M.IncrementalSnapshot,data:D({source:x.CanvasMutation},G)}),Kt=G=>oe({type:M.IncrementalSnapshot,data:D({source:x.AdoptedStyleSheet},G)}),Me=new om({mutationCb:xe,adoptedStyleSheetCb:Kt}),Ne=new Xp({mirror:Se,mutationCb:xe,stylesheetManager:Me,recordCrossOriginIframes:N,wrappedEmit:oe});for(const G of z||[])G.getMirror&&G.getMirror({nodeMirror:Se,crossOriginIframeMirror:Ne.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ne.crossOriginIframeStyleMirror});const hs=new am;Ms=new nm({recordCanvas:b,mutationCb:Jt,win:window,blockClass:i,blockSelector:n,mirror:Se,sampling:C.canvas,dataURLOptions:E});const Ue=new Jp({mutationCb:xe,scrollCb:ke,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:c,maskTextSelector:h,excludeAttribute:ae,includeAttribute:re,inlineStylesheet:f,maskInputOptions:me,dataURLOptions:E,maskTextFn:y,maskInputFn:g,recordCanvas:b,inlineImages:Z,sampling:C,slimDOMOptions:ye,iframeManager:Ne,stylesheetManager:Me,canvasManager:Ms,keepIframeSrcFn:O,processedNodeManager:hs},mirror:Se});Or=(G=!1)=>{if(!R)return;oe({type:M.Meta,data:{href:window.location.href,width:qi(),height:Qi()}},G),Me.reset(),Ue.init(),Qe.forEach(ie=>ie.lock());const we=Yu(document,{mirror:Se,blockClass:i,blockSelector:n,maskTextClass:c,maskTextSelector:h,excludeAttribute:ae,includeAttribute:re,inlineStylesheet:f,maskAllInputs:me,maskTextFn:y,maskInputFn:g,slimDOM:ye,dataURLOptions:E,recordCanvas:b,inlineImages:Z,onSerialize:ie=>{ft(ie,Se)&&Ne.addIframe(ie),nn(ie,Se)&&Me.trackLinkElement(ie),Ge(ie)&&Ue.addShadowRoot(P.shadowRoot(ie),document)},onIframeLoad:(ie,ne)=>{Ne.attachIframe(ie,ne),Ue.observeAttachShadow(ie)},onStylesheetLoad:(ie,ne)=>{Me.attachLinkElement(ie,ne)},keepIframeSrcFn:O});if(!we)return console.warn("Failed to snapshot the document");oe({type:M.FullSnapshot,data:{node:we,initialOffset:Ki(window)}},G),Qe.forEach(ie=>ie.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Me.adoptStyleSheets(document.adoptedStyleSheets,Se.getId(document))};try{const G=[],we=ne=>{var Ae;return F(Zp)({mutationCb:xe,mousemoveCb:(X,fs)=>oe({type:M.IncrementalSnapshot,data:{source:fs,positions:X}}),mouseInteractionCb:X=>oe({type:M.IncrementalSnapshot,data:D({source:x.MouseInteraction},X)}),scrollCb:ke,viewportResizeCb:X=>oe({type:M.IncrementalSnapshot,data:D({source:x.ViewportResize},X)}),inputCb:X=>oe({type:M.IncrementalSnapshot,data:D({source:x.Input},X)}),mediaInteractionCb:X=>oe({type:M.IncrementalSnapshot,data:D({source:x.MediaInteraction},X)}),styleSheetRuleCb:X=>oe({type:M.IncrementalSnapshot,data:D({source:x.StyleSheetRule},X)}),styleDeclarationCb:X=>oe({type:M.IncrementalSnapshot,data:D({source:x.StyleDeclaration},X)}),canvasMutationCb:Jt,fontCb:X=>oe({type:M.IncrementalSnapshot,data:D({source:x.Font},X)}),selectionCb:X=>{oe({type:M.IncrementalSnapshot,data:D({source:x.Selection},X)})},customElementCb:X=>{oe({type:M.IncrementalSnapshot,data:D({source:x.CustomElement},X)})},blockClass:i,ignoreClass:o,ignoreSelector:a,maskTextClass:c,maskTextSelector:h,excludeAttribute:ae,includeAttribute:re,maskInputOptions:me,inlineStylesheet:f,sampling:C,recordDOM:R,recordCanvas:b,inlineImages:Z,userTriggeredOnInput:j,collectFonts:W,doc:ne,maskInputFn:g,maskTextFn:y,keepIframeSrcFn:O,blockSelector:n,slimDOMOptions:ye,dataURLOptions:E,mirror:Se,iframeManager:Ne,stylesheetManager:Me,shadowDomManager:Ue,processedNodeManager:hs,canvasManager:Ms,ignoreCSSAttributes:V,plugins:((Ae=z==null?void 0:z.filter(X=>X.observer))==null?void 0:Ae.map(X=>({observer:X.observer,options:X.options,callback:fs=>oe({type:M.Plugin,data:{plugin:X.name,payload:fs}})})))||[]},w)};Ne.addLoadListener(ne=>{try{G.push(we(ne.contentDocument))}catch(Ae){console.warn(Ae)}});const ie=()=>{Or(),G.push(we(document)),Zr=!0};return document.readyState==="interactive"||document.readyState==="complete"?ie():(G.push(fe("DOMContentLoaded",()=>{oe({type:M.DomContentLoaded,data:{}}),k==="DOMContentLoaded"&&ie()})),G.push(fe("load",()=>{oe({type:M.Load,data:{}}),k==="load"&&ie()},window))),()=>{G.forEach(ne=>ne()),hs.destroy(),Zr=!1,Pp()}}catch(G){console.warn(G)}}Je.addCustomEvent=(s,e)=>{if(!Zr)throw new Error("please add custom event after start recording");oe({type:M.Custom,data:{tag:s,payload:e}})};Je.freezePage=()=>{Qe.forEach(s=>s.freeze())};Je.takeFullSnapshot=s=>{if(!Zr)throw new Error("please take full snapshot after start recording");Or(s)};Je.mirror=Se;function Dl(s){return{all:s=s||new Map,on:function(e,t){var r=s.get(e);r?r.push(t):s.set(e,[t])},off:function(e,t){var r=s.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):s.set(e,[]))},emit:function(e,t){var r=s.get(e);r&&r.slice().map(function(i){i(t)}),(r=s.get("*"))&&r.slice().map(function(i){i(e,t)})}}}const lm=Object.freeze(Object.defineProperty({__proto__:null,default:Dl},Symbol.toStringTag,{value:"Module"}));function um(s=window,e=document){if("scrollBehavior"in e.documentElement.style&&s.__forceSmoothScrollPolyfill__!==!0)return;const t=s.HTMLElement||s.Element,r=468,i={scroll:s.scroll||s.scrollTo,scrollBy:s.scrollBy,elementScroll:t.prototype.scroll||l,scrollIntoView:t.prototype.scrollIntoView},n=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now;function o(y){const w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(y)}const a=o(s.navigator.userAgent)?1:0;function l(y,w){this.scrollLeft=y,this.scrollTop=w}function u(y){return .5*(1-Math.cos(Math.PI*y))}function c(y){if(y===null||typeof y!="object"||y.behavior===void 0||y.behavior==="auto"||y.behavior==="instant")return!0;if(typeof y=="object"&&y.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+y.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(y,w){if(w==="Y")return y.clientHeight+a<y.scrollHeight;if(w==="X")return y.clientWidth+a<y.scrollWidth}function f(y,w){const v=s.getComputedStyle(y,null)["overflow"+w];return v==="auto"||v==="scroll"}function p(y){const w=h(y,"Y")&&f(y,"Y"),v=h(y,"X")&&f(y,"X");return w||v}function d(y){for(;y!==e.body&&p(y)===!1;)y=y.parentNode||y.host;return y}function m(y){const w=n();let v,C,E,A=(w-y.startTime)/r;A=A>1?1:A,v=u(A),C=y.startX+(y.x-y.startX)*v,E=y.startY+(y.y-y.startY)*v,y.method.call(y.scrollable,C,E),(C!==y.x||E!==y.y)&&s.requestAnimationFrame(m.bind(s,y))}function g(y,w,v){let C,E,A,R;const b=n();y===e.body?(C=s,E=s.scrollX||s.pageXOffset,A=s.scrollY||s.pageYOffset,R=i.scroll):(C=y,E=y.scrollLeft,A=y.scrollTop,R=l),m({scrollable:C,method:R,startTime:b,startX:E,startY:A,x:w,y:v})}s.scroll=s.scrollTo=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.scroll.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:s.scrollY||s.pageYOffset);return}g.call(s,e.body,arguments[0].left!==void 0?~~arguments[0].left:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:s.scrollY||s.pageYOffset)}},s.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])){i.scrollBy.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}g.call(s,e.body,~~arguments[0].left+(s.scrollX||s.pageXOffset),~~arguments[0].top+(s.scrollY||s.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(c(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const y=arguments[0].left,w=arguments[0].top;g.call(this,this,typeof y=="undefined"?this.scrollLeft:~~y,typeof w=="undefined"?this.scrollTop:~~w)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(c(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const y=d(this),w=y.getBoundingClientRect(),v=this.getBoundingClientRect();y!==e.body?(g.call(this,y,y.scrollLeft+v.left-w.left,y.scrollTop+v.top-w.top),s.getComputedStyle(y).position!=="fixed"&&s.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):s.scrollBy({left:v.left,top:v.top,behavior:"smooth"})}}class cm{constructor(e=[],t){S(this,"timeOffset",0),S(this,"speed"),S(this,"actions"),S(this,"raf",null),S(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){const t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const r=this.findActionIndex(e);this.actions.splice(r,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){const t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,r=this.actions.length-1;for(;t<=r;){const i=Math.floor((t+r)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)r=i-1;else return i+1}return t}}function bo(s,e){if(s.type===M.IncrementalSnapshot&&s.data.source===x.MouseMove&&s.data.positions&&s.data.positions.length){const t=s.data.positions[0].timeOffset,r=s.timestamp+t;return s.delay=r-e,r-e}return s.delay=s.timestamp-e,s.delay}/*! *****************************************************************************
67
+ or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(nt),-1},getNode(){return console.error(nt),null},removeNodeFromMap(){console.error(nt)},has(){return console.error(nt),!1},reset(){console.error(nt)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(s,e,t){return e==="map"&&console.error(nt),Reflect.get(s,e,t)}}));function wt(s,e,t={}){let r=null,i=0;return function(...n){const o=Date.now();!i&&t.leading===!1&&(i=o);const a=e-(o-i),l=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(l,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(l,n)},a))}}function Xt(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>Xt(s,e,n||{},!0)}function Yr(){return Math.round(performance.timeOrigin+performance.now())}function en(s=window){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=$.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=$.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function tn(s=window){const e=s.document;return s.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function rn(s=window){const e=s.document;return s.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function sn(s){return s?s.nodeType===s.ELEMENT_NODE?s:$.parentElement(s):null}function de(s,e,t,r){if(!s)return!1;const i=sn(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Pr(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Sl(s,e){return e.getId(s)!==-1}function Or(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===_t}function nn(s,e){if(Ot(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=$.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?nn(r,e):!0}function Zr(s){return!!s.changedTouches}function on(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Cl(s){const e={},t=(i,n)=>{const o={value:i,parent:n,children:[]};return e[i.node.id]=o,o},r=[];for(const i of s){const{nextId:n,parentId:o}=i;if(n&&n in e){const a=e[n];if(a.parent){const l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,t(i,a.parent))}else{const l=r.indexOf(a);r.splice(l,0,t(i,null))}continue}if(o in e){const a=e[o];a.children.push(t(i,a));continue}r.push(t(i,null))}return r}function an(s,e){e(s.value);for(let t=s.children.length-1;t>=0;t--)an(s.children[t],e)}function ft(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function ln(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function un(s,e){var t,r;const i=(r=(t=s.ownerDocument)==null?void 0:t.defaultView)==null?void 0:r.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const n=i.getBoundingClientRect(),o=un(i,e),a=n.height/i.clientHeight;return{x:n.x*o.relativeScale+o.x,y:n.y*o.relativeScale+o.y,relativeScale:a,absoluteScale:o.absoluteScale*a}}function Ve(s){return s?s instanceof xe&&"shadowRoot"in s?!!s.shadowRoot:!!$.shadowRoot(s):!1}function ut(s,e){const t=s[e[0]];return e.length===1?t:ut(t.cssRules[e[1]].cssRules,e.slice(2))}function pi(s){const e=[...s],t=e.pop();return{positions:e,index:t}}function El(s){const e=new Set,t=[];for(let r=s.length;r--;){const i=s[r];e.has(i.id)||(t.push(i),e.add(i.id))}return t}class cn{constructor(){S(this,"id",1),S(this,"styleIDMap",new WeakMap),S(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function hn(s){var e;let t=null;return"getRootNode"in s&&((e=$.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&$.host($.getRootNode(s))&&(t=$.host($.getRootNode(s))),t}function Il(s){let e=s,t;for(;t=hn(e);)e=t;return e}function xl(s){const e=s.ownerDocument;if(!e)return!1;const t=Il(s);return $.contains(e,t)}function fn(s){const e=s.ownerDocument;return e?$.contains(e,s)||xl(s):!1}const kp=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:cn,get _mirror(){return exports.mirror},closestElementOfNode:sn,getBaseDimension:un,getNestedRule:ut,getPositionsAndIndex:pi,getRootShadowHost:Il,getShadowHost:hn,getWindowHeight:tn,getWindowScroll:en,getWindowWidth:rn,hasShadowRoot:Ve,hookSetter:Xt,inDom:fn,isAncestorRemoved:nn,isBlocked:de,isIgnored:Or,isSerialized:Sl,isSerializedIframe:ft,isSerializedStylesheet:ln,iterateResolveTree:an,legacy_isTouchEvent:Zr,nowTimestamp:Yr,on:fe,polyfill:on,queueToResolveTrees:Cl,shadowHostInDom:xl,throttle:wt,uniqueTextMutations:El},Symbol.toStringTag,{value:"Module"}));var M=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(M||{}),x=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(x||{}),U=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(U||{}),ke=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(ke||{}),Le=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Le||{}),ze=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(ze||{}),B=(s=>(s.Start="start",s.Pause="pause",s.Resume="resume",s.Resize="resize",s.Finish="finish",s.FullsnapshotRebuilded="fullsnapshot-rebuilded",s.LoadStylesheetStart="load-stylesheet-start",s.LoadStylesheetEnd="load-stylesheet-end",s.SkipStart="skip-start",s.SkipEnd="skip-end",s.MouseInteraction="mouse-interaction",s.EventCast="event-cast",s.CustomEvent="custom-event",s.Flush="flush",s.StateChange="state-change",s.PlayBack="play-back",s.Destroy="destroy",s))(B||{}),_e=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(_e||{});function fo(s){return"__ln"in s}class _p{constructor(){S(this,"length",0),S(this,"head",null),S(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&fo(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&fo(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const po=(s,e)=>`${s}@${e}`;class $p{constructor(){S(this,"frozen",!1),S(this,"locked",!1),S(this,"texts",[]),S(this,"attributes",[]),S(this,"attributeMap",new WeakMap),S(this,"removes",[]),S(this,"mapRemoves",[]),S(this,"movedMap",{}),S(this,"addedSet",new Set),S(this,"movedSet",new Set),S(this,"droppedSet",new Set),S(this,"removesSubTreeCache",new Set),S(this,"mutationCb"),S(this,"blockClass"),S(this,"blockSelector"),S(this,"maskTextClass"),S(this,"maskTextSelector"),S(this,"excludeAttribute"),S(this,"includeAttribute"),S(this,"inlineStylesheet"),S(this,"maskInputOptions"),S(this,"maskTextFn"),S(this,"maskInputFn"),S(this,"keepIframeSrcFn"),S(this,"recordCanvas"),S(this,"inlineImages"),S(this,"slimDOMOptions"),S(this,"dataURLOptions"),S(this,"doc"),S(this,"mirror"),S(this,"iframeManager"),S(this,"stylesheetManager"),S(this,"shadowDomManager"),S(this,"canvasManager"),S(this,"processedNodeManager"),S(this,"unattachedDoc"),S(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),S(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new _p,i=l=>{let u=l,c=_t;for(;c===_t;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=l=>{const u=$.parentNode(l);if(!u||!fn(l))return;let c=!1;if(l.nodeType===Node.TEXT_NODE){const d=u.tagName;if(d==="TEXTAREA")return;d==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=Ot(u)?this.mirror.getId(hn(l)):this.mirror.getId(u),f=i(l);if(h===-1||f===-1)return r.addNode(l);const p=lt(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,excludeAttribute:this.excludeAttribute,includeAttribute:this.includeAttribute,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:d=>{ft(d,this.mirror)&&this.iframeManager.addIframe(d),ln(d,this.mirror)&&this.stylesheetManager.trackLinkElement(d),Ve(l)&&this.shadowDomManager.addShadowRoot($.shadowRoot(l),this.doc)},onIframeLoad:(d,m)=>{this.iframeManager.attachIframe(d,m),this.shadowDomManager.observeAttachShadow(d)},onStylesheetLoad:(d,m)=>{this.stylesheetManager.attachLinkElement(d,m)},cssCaptured:c});p&&(e.push({parentId:h,nextId:f,node:p}),t.add(p.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)mo(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has($.parentNode(l))||n(l);for(const l of this.addedSet)!go(this.droppedSet,l)&&!mo(this.removesSubTreeCache,l,this.mirror)||go(this.movedSet,l)?n(l):this.droppedSet.add(l);let o=null;for(;r.length;){let l=null;if(o){const u=this.mirror.getId($.parentNode(o.value)),c=i(o.value);u!==-1&&c!==-1&&(l=o)}if(!l){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId($.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){l=c;break}else{const p=c.value,d=$.parentNode(p);if(d&&d.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=$.host(d);if(this.mirror.getId(m)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}o=l.previous,r.removeNode(l.value),n(l.value)}const a={texts:this.texts.map(l=>{const u=l.node,c=$.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:l.value}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:u}=l;if(typeof u.style=="string"){const c=JSON.stringify(l.styleDiff),h=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),S(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from($.childNodes(e),i=>$.textContent(i)||"").join("");t.attributes.value=kr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:_r(e),value:r,maskInputFn:this.maskInputFn})}),S(this,"processMutation",e=>{if(!Or(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=$.textContent(e.target);!de(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Go(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,sn(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);const n=t[r];if(i===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(n===""||n===null||typeof n=="undefined")&&!$s(r,this.includeAttribute)||Vo(r,this.excludeAttribute))return;if(r==="value"){const l=_r(t);i=kr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:l,value:i,maskInputFn:this.maskInputFn})}if(de(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let a=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(a||(a={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(e.target,a)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!zo(t.tagName,r)){if(a.attributes[r]=Wo(this.doc,je(t.tagName),je(r),i),i===a.attributes[r]&&!$s(r,this.includeAttribute)){delete a.attributes[r],Object.keys(a.attributes).length===0&&(this.attributes=this.attributes.filter(l=>l!==a),this.attributeMap.delete(e.target));return}if(r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(u){this.unattachedDoc=this.doc}const l=this.unattachedDoc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue);for(const u of Array.from(t.style)){const c=t.style.getPropertyValue(u),h=t.style.getPropertyPriority(u);c!==l.style.getPropertyValue(u)||h!==l.style.getPropertyPriority(u)?h===""?a.styleDiff[u]=c:a.styleDiff[u]=[c,h]:a._unchangedStyles[u]=[c,h]}for(const u of Array.from(l.style))t.style.getPropertyValue(u)===""&&(a.styleDiff[u]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal")}break}case"childList":{if(de(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=Ot(e.target)?this.mirror.getId($.host(e.target)):this.mirror.getId(e.target);de(e.target,this.blockClass,this.blockSelector,!1)||Or(t,this.mirror,this.slimDOMOptions)||!Sl(t,this.mirror)||(this.addedSet.has(t)?(mi(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||nn(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[po(r,i)]?mi(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Ot(e.target)&&Dt(e.target)?!0:void 0}),Pp(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),S(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Or(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[po(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);de(e,this.blockClass,this.blockSelector,!1)||($.childNodes(e).forEach(r=>this.genAdds(r)),Ve(e)&&$.childNodes($.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","includeAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function mi(s,e){s.delete(e),$.childNodes(e).forEach(t=>mi(s,t))}function Pp(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),$.childNodes(r).forEach(i=>t.push(i)))}}function mo(s,e,t){return s.size===0?!1:Lp(s,e)}function Lp(s,e,t){const r=$.parentNode(e);return r?s.has(r):!1}function go(s,e){return s.size===0?!1:Ml(s,e)}function Ml(s,e){const t=$.parentNode(e);return t?s.has(t)?!0:Ml(s,t):!1}let kt;function Fp(s){kt=s}function Bp(){kt=void 0}const F=s=>kt?(...t)=>{try{return s(...t)}catch(r){if(kt&&kt(r)===!0)return;throw r}}:s,Qe=[];function Jt(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function Nl(s,e){const t=new $p;Qe.push(t),t.init(s);const r=new(bl())(F(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Up({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],a;const l=wt(F(h=>{const f=Date.now()-a;s(o.map(p=>(p.timeOffset-=f,p)),h),o=[],a=null}),n),u=F(wt(F(h=>{const f=Jt(h),{clientX:p,clientY:d}=Zr(h)?h.changedTouches[0]:h;a||(a=Yr()),o.push({x:p,y:d,id:r.getId(f),timeOffset:Yr()-a}),l(typeof DragEvent!="undefined"&&h instanceof DragEvent?x.Drag:h instanceof MouseEvent?x.MouseMove:x.TouchMove)}),i,{trailing:!1})),c=[fe("mousemove",u,t),fe("touchmove",u,t),fe("drag",u,t)];return F(()=>{c.forEach(h=>h())})}function Wp({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,a=[];let l=null;const u=c=>h=>{const f=Jt(h);if(de(f,r,i,!0))return;let p=null,d=c;if("pointerType"in h){switch(h.pointerType){case"mouse":p=ke.Mouse;break;case"touch":p=ke.Touch;break;case"pen":p=ke.Pen;break}p===ke.Touch?U[c]===U.MouseDown?d="TouchStart":U[c]===U.MouseUp&&(d="TouchEnd"):ke.Pen}else Zr(h)&&(p=ke.Touch);p!==null?(l=p,(d.startsWith("Touch")&&p===ke.Touch||d.startsWith("Mouse")&&p===ke.Mouse)&&(p=null)):U[c]===U.Click&&(p=l,l=null);const m=Zr(h)?h.changedTouches[0]:h;if(!m)return;const g=t.getId(f),{clientX:y,clientY:w}=m;F(s)(D({type:U[d],id:g,x:y,y:w},p!==null&&{pointerType:p}))};return Object.keys(U).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let h=je(c);const f=u(c);if(window.PointerEvent)switch(U[c]){case U.MouseDown:case U.MouseUp:h=h.replace("mouse","pointer");break;case U.TouchStart:case U.TouchEnd:return}a.push(fe(h,f,e))}),F(()=>{a.forEach(c=>c())})}function Rl({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const o=F(wt(F(a=>{const l=Jt(a);if(!l||de(l,r,i,!0))return;const u=t.getId(l);if(l===e&&e.defaultView){const c=en(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:l.scrollLeft,y:l.scrollTop})}),n.scroll||100));return fe("scroll",o,e)}function zp({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=F(wt(F(()=>{const n=tn(),o=rn();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return fe("resize",i,e)}const Ms=["INPUT","TEXTAREA","SELECT"],yo=new WeakMap;function Vp({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function h(w){let v=Jt(w);const C=w.isTrusted,E=v&&v.tagName;if(v&&E==="OPTION"&&(v=$.parentElement(v)),!v||!E||Ms.indexOf(E)<0||de(v,r,i,!0)||v.classList.contains(n)||o&&v.matches(o))return;let R=v.value,O=!1;const b=_r(v)||"";b==="radio"||b==="checkbox"?O=v.checked:(a[E.toLowerCase()]||a[b])&&(R=kr({element:v,maskInputOptions:a,tagName:E,type:b,value:R,maskInputFn:l})),f(v,c?{text:R,isChecked:O,userTriggered:C}:{text:R,isChecked:O});const N=v.name;b==="radio"&&N&&O&&e.querySelectorAll(`input[type="radio"][name="${N}"]`).forEach(k=>{if(k!==v){const V=k.value;f(k,c?{text:V,isChecked:!O,userTriggered:!1}:{text:V,isChecked:!O})}})}function f(w,v){const C=yo.get(w),E=w,R=E.hasAttribute("placeholder"),O=E.value==="",b=typeof E.defaultValue=="string"?E.defaultValue==="":!0,N=!v.userTriggered,k=!C||C.text==="",V=R&&O&&b&&k&&N&&!v.isChecked&&E.type!=="hidden"&&Ms.includes(E.tagName),W=E.tagName==="INPUT"&&E.type==="text"&&!v.userTriggered&&v.text===E.defaultValue&&!C&&E.hasAttribute("placeholder"),X=!v.userTriggered&&E.value===E.defaultValue&&!C&&E.hasAttribute("placeholder")&&!v.isChecked&&E.type!=="hidden"&&Ms.includes(E.tagName),G=E.type==="checkbox"&&!v.userTriggered&&!v.isChecked&&!C,A=E.type==="radio"&&!v.userTriggered&&!v.isChecked&&!C;if(!(V||W||X||G||A)&&(!C||C.text!==v.text||C.isChecked!==v.isChecked)){yo.set(w,v);const z=t.getId(w);F(s)(le(D({},v),{id:z}))}}const d=(u.input==="last"?["change"]:["input","change"]).map(w=>fe(w,F(h),e)),m=e.defaultView;if(!m)return()=>{d.forEach(w=>w())};const g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),y=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&d.push(...y.map(w=>Xt(w[0],w[1],{set(){F(h)({target:this,isTrusted:!1})}},!1,m))),F(()=>{d.forEach(w=>w())})}function Xr(s){const e=[];function t(r,i){if(Cr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Cr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Cr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Cr("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function We(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Gp({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:F((c,h,f)=>{const[p,d]=f,{id:m,styleId:g}=We(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,adds:[{rule:p,index:d}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,f=this.cssRules.length){const p=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[p,f])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:F((c,h,f)=>{const[p]=f,{id:d,styleId:m}=We(h,e,t.styleMirror);return(d&&d!==-1||m&&m!==-1)&&s({id:d,styleId:m,removes:[{index:p}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:F((c,h,f)=>{const[p]=f,{id:d,styleId:m}=We(h,e,t.styleMirror);return(d&&d!==-1||m&&m!==-1)&&s({id:d,styleId:m,replace:p}),c.apply(h,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:F((c,h,f)=>{const[p]=f,{id:d,styleId:m}=We(h,e,t.styleMirror);return(d&&d!==-1||m&&m!==-1)&&s({id:d,styleId:m,replaceSync:p}),c.apply(h,f)})}));const l={};Er("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(Er("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),Er("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),Er("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(l).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:F((f,p,d)=>{const[m,g]=d,{id:y,styleId:w}=We(p.parentStyleSheet,e,t.styleMirror);return(y&&y!==-1||w&&w!==-1)&&s({id:y,styleId:w,adds:[{rule:m,index:[...Xr(p),g||0]}]}),f.apply(p,d)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:F((f,p,d)=>{const[m]=d,{id:g,styleId:y}=We(p.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||y&&y!==-1)&&s({id:g,styleId:y,removes:[{index:[...Xr(p),m]}]}),f.apply(p,d)})})}),F(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function Al({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId($.host(t));const a=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,l=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!a||!l?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var u;return(u=l.get)==null?void 0:u.call(this)},set(u){var c;const h=(c=l.set)==null?void 0:c.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch(f){}return h}}),F(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function jp({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:F((a,l,u)=>{var c;const[h,f,p]=u;if(t.has(h))return n.apply(l,[h,f,p]);const{id:d,styleId:m}=We((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(d&&d!==-1||m&&m!==-1)&&s({id:d,styleId:m,set:{property:h,value:f,priority:p},index:Xr(l.parentRule)}),a.apply(l,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:F((a,l,u)=>{var c;const[h]=u;if(t.has(h))return o.apply(l,[h]);const{id:f,styleId:p}=We((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||p&&p!==-1)&&s({id:f,styleId:p,remove:{property:h},index:Xr(l.parentRule)}),a.apply(l,u)})}),F(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Hp({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const o=F(l=>wt(F(u=>{const c=Jt(u);if(!c||de(c,e,t,!0))return;const{currentTime:h,volume:f,muted:p,playbackRate:d,loop:m}=c;s({type:l,id:r.getId(c),currentTime:h,volume:f,muted:p,playbackRate:d,loop:m})}),i.media||500)),a=[fe("play",o(ze.Play),n),fe("pause",o(ze.Pause),n),fe("seeked",o(ze.Seeked),n),fe("volumechange",o(ze.VolumeChange),n),fe("ratechange",o(ze.RateChange),n)];return F(()=>{a.forEach(l=>l())})}function Yp({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(l,u,c){const h=new n(l,u,c);return i.set(h,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};const o=tt(e.fonts,"add",function(a){return function(l){return setTimeout(F(()=>{const u=i.get(l);u&&(s(u),i.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{t.FontFace=n}),r.push(o),F(()=>{r.forEach(a=>a())})}function Zp(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let o=!0;const a=F(()=>{const l=e.getSelection();if(!l||o&&(l!=null&&l.isCollapsed))return;o=l.isCollapsed||!1;const u=[],c=l.rangeCount||0;for(let h=0;h<c;h++){const f=l.getRangeAt(h),{startContainer:p,startOffset:d,endContainer:m,endOffset:g}=f;de(p,r,i,!0)||de(m,r,i,!0)||u.push({start:t.getId(p),startOffset:d,end:t.getId(m),endOffset:g})}n({ranges:u})});return a(),fe("selectionchange",a)}function Xp({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:tt(t.customElements,"define",function(i){return function(n,o,a){try{e({define:{name:n}})}catch(l){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,a])}})}function Jp(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:f,selectionCb:p,customElementCb:d}=s;s.mutationCb=(...m)=>{e.mutation&&e.mutation(...m),t(...m)},s.mousemoveCb=(...m)=>{e.mousemove&&e.mousemove(...m),r(...m)},s.mouseInteractionCb=(...m)=>{e.mouseInteraction&&e.mouseInteraction(...m),i(...m)},s.scrollCb=(...m)=>{e.scroll&&e.scroll(...m),n(...m)},s.viewportResizeCb=(...m)=>{e.viewportResize&&e.viewportResize(...m),o(...m)},s.inputCb=(...m)=>{e.input&&e.input(...m),a(...m)},s.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),l(...m)},s.styleSheetRuleCb=(...m)=>{e.styleSheetRule&&e.styleSheetRule(...m),u(...m)},s.styleDeclarationCb=(...m)=>{e.styleDeclaration&&e.styleDeclaration(...m),c(...m)},s.canvasMutationCb=(...m)=>{e.canvasMutation&&e.canvasMutation(...m),h(...m)},s.fontCb=(...m)=>{e.font&&e.font(...m),f(...m)},s.selectionCb=(...m)=>{e.selection&&e.selection(...m),p(...m)},s.customElementCb=(...m)=>{e.customElement&&e.customElement(...m),d(...m)}}function Kp(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Jp(s,e);let r;s.recordDOM&&(r=Nl(s,s.doc));const i=Up(s),n=Wp(s),o=Rl(s),a=zp(s,{win:t}),l=Vp(s),u=Hp(s);let c=()=>{},h=()=>{},f=()=>{},p=()=>{};s.recordDOM&&(c=Gp(s,{win:t}),h=Al(s,s.doc),f=jp(s,{win:t}),s.collectFonts&&(p=Yp(s)));const d=Zp(s),m=Xp(s),g=[];for(const y of s.plugins)g.push(y.observer(y.callback,t,y.options));return F(()=>{Qe.forEach(y=>y.reset()),r==null||r.disconnect(),i(),n(),o(),a(),l(),u(),c(),h(),f(),p(),d(),m(),g.forEach(y=>y())})}function Cr(s){return typeof window[s]!="undefined"}function Er(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class vo{constructor(e){S(this,"iframeIdToRemoteIdMap",new WeakMap),S(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e);let a=n.get(t);return a||(a=this.generateIdFn(),n.set(t,a),o.set(a,t)),a}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Qp{constructor(e){S(this,"iframes",new WeakMap),S(this,"crossOriginIframeMap",new WeakMap),S(this,"crossOriginIframeMirror",new vo(Uo)),S(this,"crossOriginIframeStyleMirror"),S(this,"crossOriginIframeRootIdMap",new WeakMap),S(this,"mirror"),S(this,"mutationCb"),S(this,"wrappedEmit"),S(this,"loadListener"),S(this,"stylesheetManager"),S(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new vo(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case M.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:M.IncrementalSnapshot,data:{source:x.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case M.Meta:case M.Load:case M.DomContentLoaded:return!1;case M.Plugin:return t;case M.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case M.IncrementalSnapshot:switch(t.data.source){case x.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.Drag:case x.TouchMove:case x.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.ViewportResize:return!1;case x.MediaInteraction:case x.MouseInteraction:case x.Scroll:case x.CanvasMutation:case x.Input:return this.replaceIds(t.data,e,["id"]),t;case x.StyleSheetRule:case x.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case x.Font:return t;case x.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case x.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==_e.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class qp{constructor(e){S(this,"shadowDoms",new WeakSet),S(this,"mutationCb"),S(this,"scrollCb"),S(this,"bypassOptions"),S(this,"mirror"),S(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Dt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Nl(le(D({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Rl(le(D({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId($.host(e))),this.restoreHandlers.push(Al({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(tt(e.prototype,"attachShadow",function(i){return function(n){const o=i.call(this,n),a=$.shadowRoot(this);return a&&fn(this)&&r.addShadowRoot(a,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",At=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Ir=0;Ir<ct.length;Ir++)At[ct.charCodeAt(Ir)]=Ir;var em=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=ct[e[t]>>2],i+=ct[(e[t]&3)<<4|e[t+1]>>4],i+=ct[(e[t+1]&15)<<2|e[t+2]>>6],i+=ct[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},tm=function(s){var e=s.length*.75,t=s.length,r,i=0,n,o,a,l;s[s.length-1]==="="&&(e--,s[s.length-2]==="="&&e--);var u=new ArrayBuffer(e),c=new Uint8Array(u);for(r=0;r<t;r+=4)n=At[s.charCodeAt(r)],o=At[s.charCodeAt(r+1)],a=At[s.charCodeAt(r+2)],l=At[s.charCodeAt(r+3)],c[i++]=n<<2|o>>4,c[i++]=(o&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u};const wo=new Map;function rm(s,e){let t=wo.get(s);return t||(t=new Map,wo.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Ol=(s,e,t)=>{if(!s||!(Tl(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=rm(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function Dr(s,e,t){if(s instanceof Array)return s.map(r=>Dr(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=em(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Dr(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[Dr(s.data,e,t),s.width,s.height]};if(Tl(s,e)||typeof s=="object"){const r=s.constructor.name,i=Ol(s,e,t);return{rr_type:r,index:i}}}}return s}const Dl=(s,e,t)=>s.map(r=>Dr(r,e,t)),Tl=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function sm(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const a=tt(e.CanvasRenderingContext2D.prototype,o,function(l){return function(...u){return de(this.canvas,t,r,!0)||setTimeout(()=>{const c=Dl(u,e,this);s(this.canvas,{type:Le["2D"],property:o,args:c})},0),l.apply(this,u)}});i.push(a)}catch(a){const l=Xt(e.CanvasRenderingContext2D.prototype,o,{set(u){s(this.canvas,{type:Le["2D"],property:o,args:[u],setter:!0})}});i.push(l)}return()=>{i.forEach(o=>o())}}function im(s){return s==="experimental-webgl"?"webgl":s}function bo(s,e,t,r){const i=[];try{const n=tt(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(a,...l){if(!de(this,e,t,!0)){const u=im(a);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(l[0]&&typeof l[0]=="object"){const c=l[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[a,...l])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function So(s,e,t,r,i,n){const o=[],a=Object.getOwnPropertyNames(s);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof s[l]!="function")continue;const u=tt(s,l,function(c){return function(...h){const f=c.apply(this,h);if(Ol(f,n,this),"tagName"in this.canvas&&!de(this.canvas,r,i,!0)){const p=Dl(h,n,this),d={type:e,property:l,args:p};t(this.canvas,d)}return f}});o.push(u)}catch(u){const c=Xt(s,l,{set(h){t(this.canvas,{type:e,property:l,args:[h],setter:!0})}});o.push(c)}return o}function nm(s,e,t,r){const i=[];return i.push(...So(e.WebGLRenderingContext.prototype,Le.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...So(e.WebGL2RenderingContext.prototype,Le.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const kl="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",om=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Co=typeof window!="undefined"&&window.Blob&&new Blob([om(kl)],{type:"text/javascript;charset=utf-8"});function am(s){let e;try{if(e=Co&&(window.URL||window.webkitURL).createObjectURL(Co),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+kl,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class lm{constructor(e){S(this,"pendingCanvasMutations",new Map),S(this,"rafStamps",{latestId:0,invokeId:null}),S(this,"mirror"),S(this,"mutationCb"),S(this,"resetObservers"),S(this,"frozen",!1),S(this,"locked",!1),S(this,"processMutation",(l,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,i,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const o=bo(t,r,i,!0),a=new Map,l=new am;l.onmessage=d=>{const{id:m}=d.data;if(a.set(m,!1),!("base64"in d.data))return;const{base64:g,type:y,width:w,height:v}=d.data;this.mutationCb({id:m,type:Le["2D"],commands:[{property:"clearRect",args:[0,0,w,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:y}]},0,0]}]})};const u=1e3/e;let c=0,h;const f=()=>{const d=[];return t.document.querySelectorAll("canvas").forEach(m=>{de(m,r,i,!0)||d.push(m)}),d},p=d=>{if(c&&d-c<u){h=requestAnimationFrame(p);return}c=d,f().forEach(async m=>{var g;const y=this.mirror.getId(m);if(a.get(y)||m.width===0||m.height===0)return;if(a.set(y,!0),["webgl","webgl2"].includes(m.__context)){const v=m.getContext(m.__context);((g=v==null?void 0:v.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}const w=await createImageBitmap(m);l.postMessage({id:y,bitmap:w,width:m.width,height:m.height,dataURLOptions:n.dataURLOptions},[w])}),h=requestAnimationFrame(p)};h=requestAnimationFrame(p),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=bo(e,t,r,!1),n=sm(this.processMutation.bind(this),e,t,r),o=nm(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(o=>{const u=o,{type:a}=u;return rt(u,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class um{constructor(e){S(this,"trackedLinkElements",new WeakSet),S(this,"mutationCb"),S(this,"adoptedStyleSheetCb"),S(this,"styleMirror",new cn),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(a,l)=>({rule:Po(a,n.href),index:l}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class cm{constructor(){S(this,"nodeMap",new WeakMap),S(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let ne,Tr,Ns,Jr=!1;const gi=[];try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((vn=s.contentWindow)==null?void 0:vn.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const Ce=Lo();function Xe(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:a=null,excludeAttribute:l,includeAttribute:u,maskTextClass:c="rr-mask",maskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:p,maskInputOptions:d,slimDOMOptions:m,maskInputFn:g,maskTextFn:y,hooks:w,packFn:v,sampling:C={},dataURLOptions:E={},mousemoveWait:R,recordDOM:O=!0,recordCanvas:b=!1,recordCrossOriginIframes:N=!1,recordAfter:k=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",flushCustomQueue:V=s.flushCustomQueue!==void 0?s.flushCustomQueue:"after",userTriggeredOnInput:W=!1,collectFonts:X=!1,inlineImages:G=!1,plugins:A,keepIframeSrcFn:z=()=>!1,ignoreCSSAttributes:T=new Set([]),errorHandler:L}=s;Fp(L);const K=N?window.parent===window:!0;let ie=!1;if(!K)try{window.parent.document&&(ie=!1)}catch(j){ie=!0}if(K&&!e)throw new Error("emit function is required");if(!K&&!ie)return()=>{};R!==void 0&&C.mousemove===void 0&&(C.mousemove=R),Ce.reset();const re=l===void 0?/^$a/:l,me=u===void 0?/.+/i:u,ye=p===!0?{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}:d!==void 0?d:{password:!0},ce=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all",headTitleMutations:m==="all"}:m||{};on();let ue,Fe=0;const Be=j=>{for(const be of A||[])be.eventProcessor&&(j=be.eventProcessor(j));return v&&!ie&&(j=v(j)),j};ne=(j,be)=>{var oe;const ae=j;if(ae.timestamp=Yr(),(oe=Qe[0])!=null&&oe.isFrozen()&&ae.type!==M.FullSnapshot&&!(ae.type===M.IncrementalSnapshot&&ae.data.source===x.Mutation)&&Qe.forEach(Ne=>Ne.unfreeze()),K)e==null||e(Be(ae),be);else if(ie){const Ne={type:"rrweb",event:Be(ae),origin:window.location.origin,isCheckout:be};window.parent.postMessage(Ne,"*")}if(ae.type===M.FullSnapshot)ue=ae,Fe=0;else if(ae.type===M.IncrementalSnapshot){if(ae.data.source===x.Mutation&&ae.data.isAttachIframe)return;Fe++;const Ne=r&&Fe>=r,Z=t&&ae.timestamp-ue.timestamp>t;(Ne||Z)&&Tr(!0)}};const we=j=>{ne({type:M.IncrementalSnapshot,data:D({source:x.Mutation},j)})},Kt=j=>ne({type:M.IncrementalSnapshot,data:D({source:x.Scroll},j)}),St=j=>ne({type:M.IncrementalSnapshot,data:D({source:x.CanvasMutation},j)}),Qt=j=>ne({type:M.IncrementalSnapshot,data:D({source:x.AdoptedStyleSheet},j)}),Me=new um({mutationCb:we,adoptedStyleSheetCb:Qt}),Je=new Qp({mirror:Ce,mutationCb:we,stylesheetManager:Me,recordCrossOriginIframes:N,wrappedEmit:ne});for(const j of A||[])j.getMirror&&j.getMirror({nodeMirror:Ce,crossOriginIframeMirror:Je.crossOriginIframeMirror,crossOriginIframeStyleMirror:Je.crossOriginIframeStyleMirror});const Ke=new cm;Ns=new lm({recordCanvas:b,mutationCb:St,win:window,blockClass:i,blockSelector:n,mirror:Ce,sampling:C.canvas,dataURLOptions:E});const qt=new qp({mutationCb:we,scrollCb:Kt,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:c,maskTextSelector:h,excludeAttribute:re,includeAttribute:me,inlineStylesheet:f,maskInputOptions:ye,dataURLOptions:E,maskTextFn:y,maskInputFn:g,recordCanvas:b,inlineImages:G,sampling:C,slimDOMOptions:ce,iframeManager:Je,stylesheetManager:Me,canvasManager:Ns,keepIframeSrcFn:z,processedNodeManager:Ke},mirror:Ce});Tr=(j=!1)=>{if(!O)return;ne({type:M.Meta,data:{href:window.location.href,width:rn(),height:tn()}},j),Me.reset(),qt.init(),Qe.forEach(oe=>oe.lock());const be=Ju(document,{mirror:Ce,blockClass:i,blockSelector:n,maskTextClass:c,maskTextSelector:h,excludeAttribute:re,includeAttribute:me,inlineStylesheet:f,maskAllInputs:ye,maskTextFn:y,maskInputFn:g,slimDOM:ce,dataURLOptions:E,recordCanvas:b,inlineImages:G,onSerialize:oe=>{ft(oe,Ce)&&Je.addIframe(oe),ln(oe,Ce)&&Me.trackLinkElement(oe),Ve(oe)&&qt.addShadowRoot($.shadowRoot(oe),document)},onIframeLoad:(oe,ae)=>{Je.attachIframe(oe,ae),qt.observeAttachShadow(oe)},onStylesheetLoad:(oe,ae)=>{Me.attachLinkElement(oe,ae)},keepIframeSrcFn:z});if(!be)return console.warn("Failed to snapshot the document");ne({type:M.FullSnapshot,data:{node:be,initialOffset:en(window)}},j),Qe.forEach(oe=>oe.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Me.adoptStyleSheets(document.adoptedStyleSheets,Ce.getId(document))};try{const j=[],be=ae=>{var Ne;return F(Kp)({mutationCb:we,mousemoveCb:(Z,ds)=>ne({type:M.IncrementalSnapshot,data:{source:ds,positions:Z}}),mouseInteractionCb:Z=>ne({type:M.IncrementalSnapshot,data:D({source:x.MouseInteraction},Z)}),scrollCb:Kt,viewportResizeCb:Z=>ne({type:M.IncrementalSnapshot,data:D({source:x.ViewportResize},Z)}),inputCb:Z=>ne({type:M.IncrementalSnapshot,data:D({source:x.Input},Z)}),mediaInteractionCb:Z=>ne({type:M.IncrementalSnapshot,data:D({source:x.MediaInteraction},Z)}),styleSheetRuleCb:Z=>ne({type:M.IncrementalSnapshot,data:D({source:x.StyleSheetRule},Z)}),styleDeclarationCb:Z=>ne({type:M.IncrementalSnapshot,data:D({source:x.StyleDeclaration},Z)}),canvasMutationCb:St,fontCb:Z=>ne({type:M.IncrementalSnapshot,data:D({source:x.Font},Z)}),selectionCb:Z=>{ne({type:M.IncrementalSnapshot,data:D({source:x.Selection},Z)})},customElementCb:Z=>{ne({type:M.IncrementalSnapshot,data:D({source:x.CustomElement},Z)})},blockClass:i,ignoreClass:o,ignoreSelector:a,maskTextClass:c,maskTextSelector:h,excludeAttribute:re,includeAttribute:me,maskInputOptions:ye,inlineStylesheet:f,sampling:C,recordDOM:O,recordCanvas:b,inlineImages:G,userTriggeredOnInput:W,collectFonts:X,doc:ae,maskInputFn:g,maskTextFn:y,keepIframeSrcFn:z,blockSelector:n,slimDOMOptions:ce,dataURLOptions:E,mirror:Ce,iframeManager:Je,stylesheetManager:Me,shadowDomManager:qt,processedNodeManager:Ke,canvasManager:Ns,ignoreCSSAttributes:T,plugins:((Ne=A==null?void 0:A.filter(Z=>Z.observer))==null?void 0:Ne.map(Z=>({observer:Z.observer,options:Z.options,callback:ds=>ne({type:M.Plugin,data:{plugin:Z.name,payload:ds}})})))||[]},w)};Je.addLoadListener(ae=>{try{j.push(be(ae.contentDocument))}catch(Ne){console.warn(Ne)}});const oe=()=>{V==="before"&&Rs(),Tr(),j.push(be(document)),Jr=!0,V==="after"&&Rs()};return document.readyState==="interactive"||document.readyState==="complete"?oe():(j.push(fe("DOMContentLoaded",()=>{ne({type:M.DomContentLoaded,data:{}}),k==="DOMContentLoaded"&&oe()})),j.push(fe("load",()=>{ne({type:M.Load,data:{}}),k==="load"&&oe()},window))),()=>{Rs(),j.forEach(ae=>ae()),Ke.destroy(),Jr=!1,Bp()}}catch(j){console.warn(j)}}function Rs(){for(const s of gi)ne(s);gi.length=0}Xe.addCustomEvent=(s,e)=>{const t={type:M.Custom,data:{tag:s,payload:e}};if(!Jr){console.warn(`[rrweb] CustomEvent buffered before recording start: ${s}`),gi.push(t);return}ne(t)};Xe.freezePage=()=>{Qe.forEach(s=>s.freeze())};Xe.takeFullSnapshot=s=>{if(!Jr)throw new Error("please take full snapshot after start recording");Tr(s)};Xe.mirror=Ce;function _l(s){return{all:s=s||new Map,on:function(e,t){var r=s.get(e);r?r.push(t):s.set(e,[t])},off:function(e,t){var r=s.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):s.set(e,[]))},emit:function(e,t){var r=s.get(e);r&&r.slice().map(function(i){i(t)}),(r=s.get("*"))&&r.slice().map(function(i){i(e,t)})}}}const hm=Object.freeze(Object.defineProperty({__proto__:null,default:_l},Symbol.toStringTag,{value:"Module"}));function fm(s=window,e=document){if("scrollBehavior"in e.documentElement.style&&s.__forceSmoothScrollPolyfill__!==!0)return;const t=s.HTMLElement||s.Element,r=468,i={scroll:s.scroll||s.scrollTo,scrollBy:s.scrollBy,elementScroll:t.prototype.scroll||l,scrollIntoView:t.prototype.scrollIntoView},n=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now;function o(y){const w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(y)}const a=o(s.navigator.userAgent)?1:0;function l(y,w){this.scrollLeft=y,this.scrollTop=w}function u(y){return .5*(1-Math.cos(Math.PI*y))}function c(y){if(y===null||typeof y!="object"||y.behavior===void 0||y.behavior==="auto"||y.behavior==="instant")return!0;if(typeof y=="object"&&y.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+y.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(y,w){if(w==="Y")return y.clientHeight+a<y.scrollHeight;if(w==="X")return y.clientWidth+a<y.scrollWidth}function f(y,w){const v=s.getComputedStyle(y,null)["overflow"+w];return v==="auto"||v==="scroll"}function p(y){const w=h(y,"Y")&&f(y,"Y"),v=h(y,"X")&&f(y,"X");return w||v}function d(y){for(;y!==e.body&&p(y)===!1;)y=y.parentNode||y.host;return y}function m(y){const w=n();let v,C,E,R=(w-y.startTime)/r;R=R>1?1:R,v=u(R),C=y.startX+(y.x-y.startX)*v,E=y.startY+(y.y-y.startY)*v,y.method.call(y.scrollable,C,E),(C!==y.x||E!==y.y)&&s.requestAnimationFrame(m.bind(s,y))}function g(y,w,v){let C,E,R,O;const b=n();y===e.body?(C=s,E=s.scrollX||s.pageXOffset,R=s.scrollY||s.pageYOffset,O=i.scroll):(C=y,E=y.scrollLeft,R=y.scrollTop,O=l),m({scrollable:C,method:O,startTime:b,startX:E,startY:R,x:w,y:v})}s.scroll=s.scrollTo=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.scroll.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:s.scrollY||s.pageYOffset);return}g.call(s,e.body,arguments[0].left!==void 0?~~arguments[0].left:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:s.scrollY||s.pageYOffset)}},s.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])){i.scrollBy.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}g.call(s,e.body,~~arguments[0].left+(s.scrollX||s.pageXOffset),~~arguments[0].top+(s.scrollY||s.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(c(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const y=arguments[0].left,w=arguments[0].top;g.call(this,this,typeof y=="undefined"?this.scrollLeft:~~y,typeof w=="undefined"?this.scrollTop:~~w)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(c(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const y=d(this),w=y.getBoundingClientRect(),v=this.getBoundingClientRect();y!==e.body?(g.call(this,y,y.scrollLeft+v.left-w.left,y.scrollTop+v.top-w.top),s.getComputedStyle(y).position!=="fixed"&&s.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):s.scrollBy({left:v.left,top:v.top,behavior:"smooth"})}}class dm{constructor(e=[],t){S(this,"timeOffset",0),S(this,"speed"),S(this,"actions"),S(this,"raf",null),S(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){const t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const r=this.findActionIndex(e);this.actions.splice(r,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){const t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,r=this.actions.length-1;for(;t<=r;){const i=Math.floor((t+r)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)r=i-1;else return i+1}return t}}function Eo(s,e){if(s.type===M.IncrementalSnapshot&&s.data.source===x.MouseMove&&s.data.positions&&s.data.positions.length){const t=s.data.positions[0].timeOffset,r=s.timestamp+t;return s.delay=r-e,r-e}return s.delay=s.timestamp-e,s.delay}/*! *****************************************************************************
68
68
  Copyright (c) Microsoft Corporation.
69
69
 
70
70
  Permission to use, copy, modify, and/or distribute this software for any
@@ -77,7 +77,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
77
77
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
78
78
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
79
79
  PERFORMANCE OF THIS SOFTWARE.
80
- ***************************************************************************** */function So(s,e){var t=typeof Symbol=="function"&&s[Symbol.iterator];if(!t)return s;var r,i,n=t.call(s),o=[];try{for(;(e===void 0||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o}var ht;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(ht||(ht={}));var Tl={type:"xstate.init"};function Ns(s){return s===void 0?[]:[].concat(s)}function ot(s){return{type:"xstate.assign",assignment:s}}function Co(s,e){return typeof(s=typeof s=="string"&&e&&e[s]?e[s]:s)=="string"?{type:s}:typeof s=="function"?{type:s.name,exec:s}:s}function Xr(s){return function(e){return s===e}}function kl(s){return typeof s=="string"?{type:s}:s}function Eo(s,e){return{value:s,context:e,actions:[],changed:!1,matches:Xr(s)}}function Io(s,e,t){var r=e,i=!1;return[s.filter(function(n){if(n.type==="xstate.assign"){i=!0;var o=Object.assign({},r);return typeof n.assignment=="function"?o=n.assignment(r,t):Object.keys(n.assignment).forEach(function(a){o[a]=typeof n.assignment[a]=="function"?n.assignment[a](r,t):n.assignment[a]}),r=o,!1}return!0}),r,i]}function _l(s,e){e===void 0&&(e={});var t=So(Io(Ns(s.states[s.initial].entry).map(function(o){return Co(o,e.actions)}),s.context,Tl),2),r=t[0],i=t[1],n={config:s,_options:e,initialState:{value:s.initial,actions:r,context:i,matches:Xr(s.initial)},transition:function(o,a){var l,u,c=typeof o=="string"?{value:o,context:s.context}:o,h=c.value,f=c.context,p=kl(a),d=s.states[h];if(d.on){var m=Ns(d.on[p.type]);try{for(var g=function(T){var $=typeof Symbol=="function"&&Symbol.iterator,J=$&&T[$],ae=0;if(J)return J.call(T);if(T&&typeof T.length=="number")return{next:function(){return T&&ae>=T.length&&(T=void 0),{value:T&&T[ae++],done:!T}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")}(m),y=g.next();!y.done;y=g.next()){var w=y.value;if(w===void 0)return Eo(h,f);var v=typeof w=="string"?{target:w}:w,C=v.target,E=v.actions,A=E===void 0?[]:E,R=v.cond,b=R===void 0?function(){return!0}:R,N=C===void 0,k=C!=null?C:h,j=s.states[k];if(b(f,p)){var W=So(Io((N?Ns(A):[].concat(d.exit,A,j.entry).filter(function(T){return T})).map(function(T){return Co(T,n._options.actions)}),f,p),3),Z=W[0],z=W[1],O=W[2],V=C!=null?C:h;return{value:V,context:z,actions:Z,changed:C!==h||Z.length>0||O,matches:Xr(V)}}}}catch(T){l={error:T}}finally{try{y&&!y.done&&(u=g.return)&&u.call(g)}finally{if(l)throw l.error}}}return Eo(h,f)}};return n}var xo=function(s,e){return s.actions.forEach(function(t){var r=t.exec;return r&&r(s.context,e)})};function $l(s){var e=s.initialState,t=ht.NotStarted,r=new Set,i={_machine:s,send:function(n){t===ht.Running&&(e=s.transition(e,n),xo(e,kl(n)),r.forEach(function(o){return o(e)}))},subscribe:function(n){return r.add(n),n(e),{unsubscribe:function(){return r.delete(n)}}},start:function(n){if(n){var o=typeof n=="object"?n:{context:s.config.context,value:n};e={value:o.value,actions:[],context:o.context,matches:Xr(o.value)}}return t=ht.Running,xo(e,Tl),i},stop:function(){return t=ht.Stopped,r.clear(),i},get state(){return e},get status(){return t}};return i}function hm(s,e){for(let t=s.length-1;t>=0;t--){const r=s[t];if(r.type===M.Meta&&r.timestamp<=e)return s.slice(t)}return s}function fm(s,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){const i=_l({id:"player",context:s,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:ot({lastPlayedEvent:(n,o)=>o.type==="CAST_EVENT"?o.payload.event:n.lastPlayedEvent}),recordTimeOffset:ot((n,o)=>{let a=n.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(a=o.payload.timeOffset),ue(D({},n),{timeOffset:a,baselineTime:n.events[0].timestamp+a})}),play(n){var o;const{timer:a,events:l,baselineTime:u,lastPlayedEvent:c}=n;a.clear();for(const d of l)bo(d,u);const h=hm(l,u);let f=c==null?void 0:c.timestamp;(c==null?void 0:c.type)===M.IncrementalSnapshot&&c.data.source===x.MouseMove&&(f=c.timestamp+((o=c.data.positions[0])==null?void 0:o.timeOffset)),u<(f||0)&&r.emit(B.PlayBack);const p=new Array;for(const d of h)if(!(f&&f<u&&(d.timestamp<=f||d===c)))if(d.timestamp<u)p.push(d);else{const m=e(d,!1);a.addAction({doAction:()=>{m()},delay:d.delay})}t(p),r.emit(B.Flush),a.start()},pause(n){n.timer.clear()},resetLastPlayedEvent:ot(n=>ue(D({},n),{lastPlayedEvent:null})),startLive:ot({baselineTime:(n,o)=>(n.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:ot((n,o)=>{const{baselineTime:a,timer:l,events:u}=n;if(o.type==="ADD_EVENT"){const{event:c}=o.payload;bo(c,a);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let d=-1,m=0;for(;m<=h;){const g=Math.floor((m+h)/2);u[g].timestamp<=c.timestamp?m=g+1:h=g-1}d===-1&&(d=m),u.splice(d,0,c)}const f=c.timestamp<a,p=e(c,f);f?p():l.isActive()&&l.addAction({doAction:()=>{p()},delay:c.delay})}return ue(D({},n),{events:u})})}});return $l(i)}function dm(s){const e=_l({id:"speed",context:s,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,r)=>{"payload"in r&&t.timer.setSpeed(r.payload.speed)},recordSpeed:ot({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return $l(e)}const pm=s=>[`.${s} { background: currentColor }`,"noscript { display: none !important; }"],Mo=new Map;function Pl(s,e){let t=Mo.get(s);return t||(t=new Map,Mo.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function je(s,e,t){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(t&&(t.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){const i=await je(s,e,t)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(t||e===null)return r;const{rr_type:i,index:n}=r;return Pl(e,i)[n]}else if("args"in r){const{rr_type:i,args:n}=r,o=window[i];return new o(...await Promise.all(n.map(je(s,e,t))))}else{if("base64"in r)return Qp(r.base64);if("src"in r){const i=s.get(r.src);if(i)return i;{const n=new Image;return n.src=r.src,s.set(r.src,n),n}}else if("data"in r&&r.rr_type==="Blob"){const i=await Promise.all(r.data.map(je(s,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(je(s,e,t)));return r}}function mm(s,e){try{return e===Be.WebGL?s.getContext("webgl")||s.getContext("experimental-webgl"):s.getContext("webgl2")}catch(t){return null}}const gm=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function ym(s,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!gm.includes(t))return;const r=Pl(s,t);r.includes(e)||r.push(e)}async function vm({mutation:s,target:e,type:t,imageMap:r,errorHandler:i}){try{const n=mm(e,t);if(!n)return;if(s.setter){n[s.property]=s.args[0];return}const o=n[s.property],a=await Promise.all(s.args.map(je(r,n))),l=o.apply(n,a);ym(n,l);const u=!1}catch(n){i(s,n)}}async function wm({event:s,mutations:e,target:t,imageMap:r,errorHandler:i}){const n=t.getContext("2d");if(!n){i(e[0],new Error("Canvas context is null"));return}const o=e.map(async l=>Promise.all(l.args.map(je(r,n))));(await Promise.all(o)).forEach((l,u)=>{const c=e[u];try{if(c.setter){n[c.property]=c.args[0];return}const h=n[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(r.get(s),h.apply(n,c.args)):h.apply(n,l)}catch(h){i(c,h)}})}async function pi({event:s,mutation:e,target:t,imageMap:r,canvasEventMap:i,errorHandler:n}){try{const o=i.get(s)||e,a="commands"in o?o.commands:[o];if([Be.WebGL,Be.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){const u=a[l];await vm({mutation:u,type:e.type,target:t,imageMap:r,errorHandler:n})}return}await wm({event:s,mutations:a,target:t,imageMap:r,errorHandler:n})}catch(o){n(e,o)}}class bm{constructor(e){S(this,"mediaMap",new Map),S(this,"warn"),S(this,"service"),S(this,"speedService"),S(this,"emitter"),S(this,"getCurrentTime"),S(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(B.Start,this.start.bind(this)),this.emitter.on(B.SkipStart,this.start.bind(this)),this.emitter.on(B.Pause,this.pause.bind(this)),this.emitter.on(B.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{this.syncTargetWithState(r),e.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:r}){if(r.isPlaying){const n=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,o="duration"in t&&t.duration;if(Number.isNaN(o)){this.waitForMetadata(t);return}let a=r.currentTimeAtLastInteraction+n;t.loop&&o!==!1&&(a=a%o),t.currentTime=a}else t.pause(),t.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const t=()=>{this.metadataCallbackMap.delete(e);const r=this.mediaMap.get(e);r&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:r}){var p,d,m,g,y;const i=this.mediaMap.get(e),{type:n,playbackRate:o,currentTime:a,muted:l,volume:u,loop:c}=r;return{isPlaying:n===Ve.Play||n!==Ve.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(p=a!=null?a:i==null?void 0:i.currentTimeAtLastInteraction)!=null?p:0,lastInteractionTimeOffset:t,playbackRate:(d=o!=null?o:i==null?void 0:i.playbackRate)!=null?d:1,volume:(m=u!=null?u:i==null?void 0:i.volume)!=null?m:1,muted:(g=l!=null?l:i==null?void 0:i.muted)!=null?g:e.getAttribute("muted")===null,loop:(y=c!=null?c:i==null?void 0:i.loop)!=null?y:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:r,loop:i,volume:n,isPlaying:o}=t,a=this.service.state.matches("paused"),l=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==n&&(e.volume=n),e.muted=r,e.loop=i,e.playbackRate!==l&&(e.playbackRate=l),o&&!a?e.play():e.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(e,t,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const i=e,n=r.getMeta(i);if(!n||!("attributes"in n))return;const o=this.service.state.matches("paused"),a=n.attributes;let l=!1;a.rr_mediaState?l=a.rr_mediaState==="played":l=i.getAttribute("autoplay")!==null,l&&o&&i.pause();let u=1;typeof a.rr_mediaPlaybackRate=="number"&&(u=a.rr_mediaPlaybackRate);let c=!1;typeof a.rr_mediaMuted=="boolean"?c=a.rr_mediaMuted:c=i.getAttribute("muted")!==null;let h=!1;typeof a.rr_mediaLoop=="boolean"?h=a.rr_mediaLoop:h=i.getAttribute("loop")!==null;let f=1;typeof a.rr_mediaVolume=="number"&&(f=a.rr_mediaVolume);let p=0;typeof a.rr_mediaCurrentTime=="number"&&(p=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:l,currentTimeAtLastInteraction:p,lastInteractionTimeOffset:t,playbackRate:u,volume:f,muted:c,loop:h}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:t,mutation:r}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:r})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function Er(s,e){if(s.nodeName!=="DIALOG"||s instanceof Ie)return;const t=s,r=t.open,i=r&&t.matches("dialog:modal"),n=t.getAttribute("rr_open_mode"),o=typeof(e==null?void 0:e.attributes.open)=="string"||typeof t.getAttribute("open")=="string",a=n==="modal";if(!(r&&!(i&&n==="non-modal"||!i&&a))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),o&&(a?t.showModal():t.show())}}function Sm(s,e){if(s.nodeName!=="DIALOG"||s instanceof Ie)return;const t=s;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}const Cm=5*1e3,Em=Dl||lm,No="[replayer]",As={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Ao(s){return s.type==M.IncrementalSnapshot&&(s.data.source==x.TouchMove||s.data.source==x.MouseInteraction&&s.data.type==U.TouchStart)}class Im{constructor(e,t){if(S(this,"wrapper"),S(this,"iframe"),S(this,"service"),S(this,"speedService"),S(this,"config"),S(this,"usingVirtualDom",!1),S(this,"virtualDom",new bt),S(this,"mouse"),S(this,"mouseTail",null),S(this,"tailPositions",[]),S(this,"emitter",Em()),S(this,"nextUserInteractionEvent"),S(this,"legacy_missingNodeRetryMap",{}),S(this,"cache",Wn()),S(this,"imageMap",new Map),S(this,"canvasEventMap",new Map),S(this,"mirror",_o()),S(this,"styleMirror",new an),S(this,"mediaManager"),S(this,"firstFullSnapshot",null),S(this,"newDocumentQueue",[]),S(this,"mousePos",null),S(this,"touchActive",null),S(this,"lastMouseDownEvent",null),S(this,"lastHoveredRootNode"),S(this,"lastSelectionData",null),S(this,"constructedStyleMutations",[]),S(this,"adoptedStyleSheets",[]),S(this,"handleResize",a=>{this.iframe.style.display="inherit";for(const l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(a.width)),l.setAttribute("height",String(a.height)))}),S(this,"applyEventsSynchronously",a=>{for(const l of a){switch(l.type){case M.DomContentLoaded:case M.Load:case M.Custom:continue;case M.FullSnapshot:case M.Meta:case M.Plugin:case M.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),S(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case M.DomContentLoaded:case M.Load:break;case M.Custom:u=()=>{this.emitter.emit(B.CustomEvent,a)};break;case M.Meta:u=()=>this.emitter.emit(B.Resize,{width:a.data.width,height:a.data.height});break;case M.FullSnapshot:u=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(a,l),(h=this.iframe.contentWindow)==null||h.scrollTo(a.data.initialOffset)};break;case M.IncrementalSnapshot:u=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=a.timestamp)&&this.isUserInteraction(h)){h.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-a.delay,f={speed:Math.min(Math.round(h/Cm),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(B.SkipStart,f)}}};break}return()=>{u&&u();for(const f of this.config.plugins||[])f.handler&&f.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===this.service.state.context.events[h]){const f=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(B.Finish))};let p=50;a.type===M.IncrementalSnapshot&&a.data.source===x.MouseMove&&a.data.positions.length&&(p+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,p)}this.emitter.emit(B.EventCast,a)}}),!(t!=null&&t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:As,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(B.Resize,this.handleResize),this.setupDom();for(const a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(B.Flush,()=>{if(this.usingVirtualDom){const a={mirror:this.mirror,applyCanvas:(l,u,c)=>{pi({event:l,mutation:u,target:c,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(l,u)=>{l.source===x.StyleSheetRule?this.applyStyleSheetRule(l,u):l.source===x.StyleDeclaration&&this.applyStyleDeclaration(l,u)},afterAppend:(l,u)=>{for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{Vr(this.iframe.contentDocument,this.virtualDom,a,this.virtualDom.mirror)}catch(l){console.warn(l)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const l in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[l],c=Gr(u.node,this.mirror,this.virtualDom.mirror);Vr(c,u.node,a,this.virtualDom.mirror),u.node=c}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(l=>{this.applyStyleSheetMutation(l)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(l=>{this.applyAdoptedStyleSheet(l)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[a,l]=this.lastMouseDownEvent;a.dispatchEvent(l)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(B.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new cm([],{speed:this.config.speed});this.service=fm({events:e.map(a=>t&&t.unpackFn?t.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(a=>{this.emitter.emit(B.StateChange,{player:a})}),this.speedService=dm({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(B.StateChange,{speed:a})}),this.mediaManager=new bm({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const n=this.service.state.context.events.find(a=>a.type===M.Meta),o=this.service.state.context.events.find(a=>a.type===M.FullSnapshot);if(n){const{width:a,height:l}=n.data;setTimeout(()=>{this.emitter.emit(B.Resize,{width:a,height:l})},0)}o&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(a=this.iframe.contentWindow)==null||a.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(Ao)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail!="undefined"&&(e.mouseTail===!1?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(){const e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,r;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit(B.Start)}pause(e){var t,r;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit(B.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(B.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(B.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;Ao(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}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=Wn()}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),this.config.mouseTail!==!1&&(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");const e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(um(this.iframe.contentWindow,this.iframe.contentDocument),rn(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!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={};const r=[],i=new Set,n=(l,u)=>{if(l.nodeName==="DIALOG"&&i.add(l),this.collectIframeAndAttachDocument(r,l),this.mediaManager.isSupportedMediaElement(l)){const{events:c}=this.service.state.context;this.mediaManager.addMediaElements(l,e.timestamp-c[0].timestamp,this.mirror)}for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Hh(e.data.node,{doc:this.iframe.contentDocument,afterAppend:n,cache:this.cache,mirror:this.mirror}),n(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:l,builtNode:u}of r)this.attachDocumentToIframe(l,u),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);const{documentElement:o,head:a}=this.iframe.contentDocument;this.insertStyleRules(o,a),i.forEach(l=>Er(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(B.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;const i=pm(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!i.length)if(this.usingVirtualDom){const n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,ml(n,this.virtualDom.unserializedId)),e.insertBefore(n,t),n.rules.push({source:x.StyleSheetRule,adds:i.map((o,a)=>({rule:o,index:a}))})}else{const n=document.createElement("style");e.insertBefore(n,t);for(let o=0;o<i.length;o++)(r=n.sheet)==null||r.insertRule(i[o],o)}}attachDocumentToIframe(e,t){const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],n=new Set,o=(a,l)=>{a.nodeName==="DIALOG"&&n.add(a),this.collectIframeAndAttachDocument(i,a);const u=r.getMeta(a);if((u==null?void 0:u.type)===Pe.Element&&(u==null?void 0:u.tagName.toUpperCase())==="HTML"){const{documentElement:c,head:h}=t.contentDocument;this.insertStyleRules(c,h)}if(!this.usingVirtualDom)for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:l,replayer:this})};Dt(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(const{mutationInQueue:a,builtNode:l}of i)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);n.forEach(a=>Er(a))}collectIframeAndAttachDocument(e,t){if(ft(t,this.mirror)){const r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){var e;const t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){const r=new Set;let i,n=this.service.state;const o=()=>{n=this.service.state};this.emitter.on(B.Start,o),this.emitter.on(B.Pause,o);const a=()=>{this.emitter.off(B.Start,o),this.emitter.off(B.Pause,o)};t.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&i!==-1&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(B.LoadStylesheetEnd),i&&clearTimeout(i),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(B.LoadStylesheetStart),i=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),i=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===M.IncrementalSnapshot&&t.data.source===x.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){const r=document.createElement("canvas"),i=r.getContext("2d"),n=i==null?void 0:i.createImageData(r.width,r.height);i==null||i.putImageData(n,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const r={isUnchanged:!0};if("commands"in e){const i=await Promise.all(e.commands.map(async n=>{const o=await Promise.all(n.args.map(je(this.imageMap,null,r)));return ue(D({},n),{args:o})}));r.isUnchanged===!1&&this.canvasEventMap.set(t,ue(D({},e),{commands:i}))}else{const i=await Promise.all(e.args.map(je(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,ue(D({},e),{args:i}))}}}applyIncremental(e,t){var r,i,n;const{data:o}=e;switch(o.source){case x.Mutation:{try{this.applyMutation(o,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,o)}break}case x.Drag:case x.TouchMove:case x.MouseMove:if(t){const a=o.positions[o.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:o}}else o.positions.forEach(a=>{const l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,t,o)},delay:a.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((r=o.positions[0])==null?void 0:r.timeOffset)});break;case x.MouseInteraction:{if(o.id===-1)break;const a=new Event(He(U[o.type])),l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);this.emitter.emit(B.MouseInteraction,{type:o.type,target:l});const{triggerFocus:u}=this.config;switch(o.type){case U.Blur:"blur"in l&&l.blur();break;case U.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case U.Click:case U.TouchStart:case U.TouchEnd:case U.MouseDown:case U.MouseUp:t?(o.type===U.TouchStart?this.touchActive=!0:o.type===U.TouchEnd&&(this.touchActive=!1),o.type===U.MouseDown?this.lastMouseDownEvent=[l,a]:o.type===U.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===U.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,t,o),o.type===U.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===U.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===U.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case U.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case x.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.scrollData=o;break}this.applyScroll(o,t);break}case x.ViewportResize:this.emitter.emit(B.Resize,{width:o.width,height:o.height});break;case x.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.inputData=o;break}this.applyInput(o);break}case x.MediaInteraction:{const a=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);const l=a,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-u[0].timestamp,mutation:o});break}case x.StyleSheetRule:case x.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case x.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.canvasMutations.push({event:e,mutation:o})}else{const a=this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);pi({event:e,mutation:o,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case x.Font:{try{const a=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(n=this.iframe.contentDocument)==null||n.fonts.add(a)}catch(a){this.warn(a)}break}case x.Selection:{if(t){this.lastSelectionData=o;break}this.applySelection(o);break}case x.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,mp(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const u in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[u],h=pl(c.node,this.virtualDom,this.mirror);h&&(c.node=h)}catch(c){this.warn(c)}const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(u=>r.getNode(u.id)?!0:(this.warnNodeNotFound(e,u.id),!1)),e.removes.forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return;let f=r.getNode(u.parentId);if(!f)return this.warnNodeNotFound(e,u.parentId);if(u.isShadow&&Ge(f)&&(f=f.shadowRoot),r.removeNodeFromMap(h),f)try{f.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&f.nodeName==="STYLE"&&((c=f.rules)==null?void 0:c.length)>0&&(f.rules=[])}catch(p){if(p instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw p}});const i=D({},this.legacy_missingNodeRetryMap),n=[],o=u=>{let c=null;return u.nextId&&(c=r.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!c},a=u=>{var c,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let f=r.getNode(u.parentId);if(!f)return u.node.type===Pe.Document?this.newDocumentQueue.push(u):n.push(u);u.node.isShadow&&(Ge(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let p=null,d=null;if(u.previousId&&(p=r.getNode(u.previousId)),u.nextId&&(d=r.getNode(u.nextId)),o(u))return n.push(u);if(u.node.rootId&&!r.getNode(u.node.rootId))return;const m=u.node.rootId?r.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(ft(f,r)){this.attachDocumentToIframe(u,f);return}const g=(v,C)=>{if(!this.usingVirtualDom){Er(v);for(const E of this.config.plugins||[])E.onBuild&&E.onBuild(v,{id:C,replayer:this})}},y=Dt(u.node,{doc:m,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:g});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:y,mutation:u};return}const w=r.getMeta(f);if(w&&w.type===Pe.Element&&u.node.type===Pe.Text){const v=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(w.tagName==="textarea")for(const C of v)C.nodeType===f.TEXT_NODE&&f.removeChild(C);else if(w.tagName==="style"&&v.length===1)for(const C of v)C.nodeType===f.TEXT_NODE&&!r.hasNode(C)&&(y.textContent=C.textContent,f.removeChild(C))}else if((w==null?void 0:w.type)===Pe.Document){const v=f;u.node.type===Pe.DocumentType&&((c=v.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&v.removeChild(v.childNodes[0]),y.nodeName==="HTML"&&v.documentElement&&v.removeChild(v.documentElement)}if(p&&p.nextSibling&&p.nextSibling.parentNode?f.insertBefore(y,p.nextSibling):d&&d.parentNode?f.contains(d)?f.insertBefore(y,d):f.insertBefore(y,null):f.appendChild(y),g(y,u.node.id),this.usingVirtualDom&&y.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),ft(y,this.mirror)){const v=this.mirror.getId(y),C=this.newDocumentQueue.find(E=>E.parentId===v);C&&(this.attachDocumentToIframe(C,y),this.newDocumentQueue=this.newDocumentQueue.filter(E=>E!==C))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,f,y,u)};e.adds.forEach(u=>{a(u)});const l=Date.now();for(;n.length;){const u=wl(n);if(n.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(const c of u)r.getNode(c.value.parentId)?sn(c,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),bl(e.texts).forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(p=>p.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);const f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=ts(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){const p=h.parentNode;((c=p==null?void 0:p.rules)==null?void 0:c.length)>0&&(p.rules=[])}}),e.attributes.forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(f=>f.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);for(const f in u.attributes)if(typeof f=="string"){const p=u.attributes[f];if(p===null)h.removeAttribute(f),f==="open"&&Sm(h,u);else if(typeof p=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const d=r.getMeta(h),m=Dt(ue(D({},d),{attributes:D(D({},d.attributes),u.attributes)}),{doc:h.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(d.attributes,u.attributes);const g=h.nextSibling,y=h.parentNode;if(m&&y){y.removeChild(h),y.insertBefore(m,g),r.replace(u.id,m);break}}catch(d){}if(f==="value"&&h.nodeName==="TEXTAREA"){const d=h;d.childNodes.forEach(g=>d.removeChild(g));const m=(c=h.ownerDocument)==null?void 0:c.createTextNode(p);m&&d.appendChild(m)}else h.setAttribute(f,p);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&Er(h,u)}catch(d){this.warn("An error occurred may due to the checkout feature.",d)}else if(f==="style"){const d=p,m=h;for(const g in d)if(d[g]===!1)m.style.removeProperty(g);else if(d[g]instanceof Array){const y=d[g];m.style.setProperty(g,y[0],y[1])}else{const y=d[g];m.style.setProperty(g,y)}}}})}applyScroll(e,t){var r,i;const n=this.mirror.getNode(e.id);if(!n)return this.debugNodeNotFound(e,e.id);const o=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((o==null?void 0:o.type)===Pe.Document)(i=n.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(a){}}applyInput(e){const t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(r){}}applySelection(e){try{const t=new Set,r=e.ranges.map(({start:i,startOffset:n,end:o,endOffset:a})=>{const l=this.mirror.getNode(i),u=this.mirror.getNode(o);if(!l||!u)return;const c=new Range;c.setStart(l,n),c.setEnd(u,a);const h=l.ownerDocument,f=h==null?void 0:h.getSelection();return f&&t.add(f),{range:c,selection:f}});t.forEach(i=>i.removeAllRanges()),r.forEach(i=>{var n;return i&&((n=i.selection)==null?void 0:n.addRange(i.range))})}catch(t){}}applyStyleSheetMutation(e){var t;let r=null;e.styleId?r=this.styleMirror.getStyle(e.styleId):e.id&&(r=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),r&&(e.source===x.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===x.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,i,n,o;if((r=e.adds)==null||r.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){const{positions:u,index:c}=fi(l);ut(t.cssRules,u).insertRule(a,c)}else{const u=l===void 0?void 0:Math.min(l,t.cssRules.length);t==null||t.insertRule(a,u)}}catch(u){}}),(i=e.removes)==null||i.forEach(({index:a})=>{try{if(Array.isArray(a)){const{positions:l,index:u}=fi(a);ut(t.cssRules,l).deleteRule(u||0)}else t==null||t.deleteRule(a)}catch(l){}}),e.replace)try{(n=t.replace)==null||n.call(t,e.replace)}catch(a){}if(e.replaceSync)try{(o=t.replaceSync)==null||o.call(t,e.replaceSync)}catch(a){}}applyStyleDeclaration(e,t){e.set&&ut(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&ut(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;const r=this.mirror.getNode(e.id);if(!r)return;(t=e.styles)==null||t.forEach(a=>{var l;let u=null,c=null;if(Ge(r)?c=((l=r.ownerDocument)==null?void 0:l.defaultView)||null:r.nodeName==="#document"&&(c=r.defaultView),!!c)try{u=new c.CSSStyleSheet,this.styleMirror.add(u,a.styleId),this.applyStyleSheetRule({source:x.StyleSheetRule,adds:a.rules},u)}catch(h){}});const i=10;let n=0;const o=(a,l)=>{const u=l.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);Ge(a)?a.shadowRoot.adoptedStyleSheets=u:a.nodeName==="#document"&&(a.adoptedStyleSheets=u),u.length!==l.length&&n<i&&(setTimeout(()=>o(a,l),0+100*n),n++)};o(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,i){const{previousId:n,nextId:o}=i,a=n&&e[n],l=o&&e[o];if(a){const{node:u,mutation:c}=a;t.insertBefore(u,r),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(l){const{node:u,mutation:c}=l;t.insertBefore(u,r.nextSibling),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}}moveAndHover(e,t,r,i,n){const o=this.mirror.getNode(r);if(!o)return this.debugNodeNotFound(n,r);const a=on(o,this.iframe),l=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:l,y:u}),this.hoverElements(o)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:r,strokeStyle:i,duration:n}=this.config.mouseTail===!0?As:Object.assign({},As,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const a=this.mouseTail.getContext("2d");!a||!this.tailPositions.length||(a.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),a.beginPath(),a.lineWidth=r,a.lineCap=t,a.strokeStyle=i,a.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>a.lineTo(l.x,l.y)),a.stroke())};this.tailPositions.push(e),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==e),o()},n/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let r=e;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(e){return e.type!==M.IncrementalSnapshot?!1:e.data.source>x.Mutation&&e.data.source<=x.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(B.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(No,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(No,...e)}}const{addCustomEvent:xm}=Je,{freezePage:Mm}=Je,{takeFullSnapshot:Nm}=Je;var pe=Uint8Array,ge=Uint16Array,zt=Uint32Array,us=new pe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),cs=new pe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),mi=new pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ll=function(s,e){for(var t=new ge(31),r=0;r<31;++r)t[r]=e+=1<<s[r-1];for(var i=new zt(t[30]),r=1;r<30;++r)for(var n=t[r];n<t[r+1];++n)i[n]=n-t[r]<<5|r;return[t,i]},Fl=Ll(us,2),Bl=Fl[0],gi=Fl[1];Bl[28]=258,gi[258]=28;var Ul=Ll(cs,0),Am=Ul[0],Ro=Ul[1],yi=new ge(32768);for(var ee=0;ee<32768;++ee){var We=(ee&43690)>>>1|(ee&21845)<<1;We=(We&52428)>>>2|(We&13107)<<2,We=(We&61680)>>>4|(We&3855)<<4,yi[ee]=((We&65280)>>>8|(We&255)<<8)>>>1}var Te=function(s,e,t){for(var r=s.length,i=0,n=new ge(e);i<r;++i)++n[s[i]-1];var o=new ge(e);for(i=0;i<e;++i)o[i]=o[i-1]+n[i-1]<<1;var a;if(t){a=new ge(1<<e);var l=15-e;for(i=0;i<r;++i)if(s[i])for(var u=i<<4|s[i],c=e-s[i],h=o[s[i]-1]++<<c,f=h|(1<<c)-1;h<=f;++h)a[yi[h]>>>l]=u}else for(a=new ge(r),i=0;i<r;++i)a[i]=yi[o[s[i]-1]++]>>>15-s[i];return a},Ye=new pe(288);for(var ee=0;ee<144;++ee)Ye[ee]=8;for(var ee=144;ee<256;++ee)Ye[ee]=9;for(var ee=256;ee<280;++ee)Ye[ee]=7;for(var ee=280;ee<288;++ee)Ye[ee]=8;var Vt=new pe(32);for(var ee=0;ee<32;++ee)Vt[ee]=5;var Rm=Te(Ye,9,0),Om=Te(Ye,9,1),Dm=Te(Vt,5,0),Tm=Te(Vt,5,1),Rs=function(s){for(var e=s[0],t=1;t<s.length;++t)s[t]>e&&(e=s[t]);return e},be=function(s,e,t){var r=e/8>>0;return(s[r]|s[r+1]<<8)>>>(e&7)&t},Os=function(s,e){var t=e/8>>0;return(s[t]|s[t+1]<<8|s[t+2]<<16)>>>(e&7)},cn=function(s){return(s/8>>0)+(s&7&&1)},hn=function(s,e,t){(t==null||t>s.length)&&(t=s.length);var r=new(s instanceof ge?ge:s instanceof zt?zt:pe)(t-e);return r.set(s.subarray(e,t)),r},km=function(s,e,t){var r=s.length,i=!e||t,n=!t||t.i;t||(t={}),e||(e=new pe(r*3));var o=function(Ke){var xe=e.length;if(Ke>xe){var ke=new pe(Math.max(xe*2,Ke));ke.set(e),e=ke}},a=t.f||0,l=t.p||0,u=t.b||0,c=t.l,h=t.d,f=t.m,p=t.n,d=r*8;do{if(!c){t.f=a=be(s,l,1);var m=be(s,l+1,3);if(l+=3,m)if(m==1)c=Om,h=Tm,f=9,p=5;else if(m==2){var v=be(s,l,31)+257,C=be(s,l+10,15)+4,E=v+be(s,l+5,31)+1;l+=14;for(var A=new pe(E),R=new pe(19),b=0;b<C;++b)R[mi[b]]=be(s,l+b*3,7);l+=C*3;var N=Rs(R),k=(1<<N)-1;if(!n&&l+E*(N+7)>d)break;for(var j=Te(R,N,1),b=0;b<E;){var W=j[be(s,l,k)];l+=W&15;var g=W>>>4;if(g<16)A[b++]=g;else{var Z=0,z=0;for(g==16?(z=3+be(s,l,3),l+=2,Z=A[b-1]):g==17?(z=3+be(s,l,7),l+=3):g==18&&(z=11+be(s,l,127),l+=7);z--;)A[b++]=Z}}var O=A.subarray(0,v),V=A.subarray(v);f=Rs(O),p=Rs(V),c=Te(O,f,1),h=Te(V,p,1)}else throw"invalid block type";else{var g=cn(l)+4,y=s[g-4]|s[g-3]<<8,w=g+y;if(w>r){if(n)throw"unexpected EOF";break}i&&o(u+y),e.set(s.subarray(g,w),u),t.b=u+=y,t.p=l=w*8;continue}if(l>d)throw"unexpected EOF"}i&&o(u+131072);for(var T=(1<<f)-1,$=(1<<p)-1,J=f+p+18;n||l+J<d;){var Z=c[Os(s,l)&T],ae=Z>>>4;if(l+=Z&15,l>d)throw"unexpected EOF";if(!Z)throw"invalid length/literal";if(ae<256)e[u++]=ae;else if(ae==256){c=null;break}else{var re=ae-254;if(ae>264){var b=ae-257,me=us[b];re=be(s,l,(1<<me)-1)+Bl[b],l+=me}var ye=h[Os(s,l)&$],ce=ye>>>4;if(!ye)throw"invalid distance";l+=ye&15;var V=Am[ce];if(ce>3){var me=cs[ce];V+=Os(s,l)&(1<<me)-1,l+=me}if(l>d)throw"unexpected EOF";i&&o(u+131072);for(var le=u+re;u<le;u+=4)e[u]=e[u-V],e[u+1]=e[u+1-V],e[u+2]=e[u+2-V],e[u+3]=e[u+3-V];u=le}}t.l=c,t.p=l,t.b=u,c&&(a=1,t.m=f,t.d=h,t.n=p)}while(!a);return u==e.length?e:hn(e,0,u)},_e=function(s,e,t){t<<=e&7;var r=e/8>>0;s[r]|=t,s[r+1]|=t>>>8},xt=function(s,e,t){t<<=e&7;var r=e/8>>0;s[r]|=t,s[r+1]|=t>>>8,s[r+2]|=t>>>16},Ds=function(s,e){for(var t=[],r=0;r<s.length;++r)s[r]&&t.push({s:r,f:s[r]});var i=t.length,n=t.slice();if(!i)return[new pe(0),0];if(i==1){var o=new pe(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(E,A){return E.f-A.f}),t.push({s:-1,f:25001});var a=t[0],l=t[1],u=0,c=1,h=2;for(t[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=t[t[u].f<t[h].f?u++:h++],l=t[u!=c&&t[u].f<t[h].f?u++:h++],t[c++]={s:-1,f:a.f+l.f,l:a,r:l};for(var f=n[0].s,r=1;r<i;++r)n[r].s>f&&(f=n[r].s);var p=new ge(f+1),d=vi(t[c-1],p,0);if(d>e){var r=0,m=0,g=d-e,y=1<<g;for(n.sort(function(A,R){return p[R.s]-p[A.s]||A.f-R.f});r<i;++r){var w=n[r].s;if(p[w]>e)m+=y-(1<<d-p[w]),p[w]=e;else break}for(m>>>=g;m>0;){var v=n[r].s;p[v]<e?m-=1<<e-p[v]++-1:++r}for(;r>=0&&m;--r){var C=n[r].s;p[C]==e&&(--p[C],++m)}d=e}return[new pe(p),d]},vi=function(s,e,t){return s.s==-1?Math.max(vi(s.l,e,t+1),vi(s.r,e,t+1)):e[s.s]=t},Oo=function(s){for(var e=s.length;e&&!s[--e];);for(var t=new ge(++e),r=0,i=s[0],n=1,o=function(l){t[r++]=l},a=1;a<=e;++a)if(s[a]==i&&a!=e)++n;else{if(!i&&n>2){for(;n>138;n-=138)o(32754);n>2&&(o(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(o(i),--n;n>6;n-=6)o(8304);n>2&&(o(n-3<<5|8208),n=0)}for(;n--;)o(i);n=1,i=s[a]}return[t.subarray(0,r),e]},Mt=function(s,e){for(var t=0,r=0;r<e.length;++r)t+=s[r]*e[r];return t},wi=function(s,e,t){var r=t.length,i=cn(e+2);s[i]=r&255,s[i+1]=r>>>8,s[i+2]=s[i]^255,s[i+3]=s[i+1]^255;for(var n=0;n<r;++n)s[i+n+4]=t[n];return(i+4+r)*8},Do=function(s,e,t,r,i,n,o,a,l,u,c){_e(e,c++,t),++i[256];for(var h=Ds(i,15),f=h[0],p=h[1],d=Ds(n,15),m=d[0],g=d[1],y=Oo(f),w=y[0],v=y[1],C=Oo(m),E=C[0],A=C[1],R=new ge(19),b=0;b<w.length;++b)R[w[b]&31]++;for(var b=0;b<E.length;++b)R[E[b]&31]++;for(var N=Ds(R,7),k=N[0],j=N[1],W=19;W>4&&!k[mi[W-1]];--W);var Z=u+5<<3,z=Mt(i,Ye)+Mt(n,Vt)+o,O=Mt(i,f)+Mt(n,m)+o+14+3*W+Mt(R,k)+(2*R[16]+3*R[17]+7*R[18]);if(Z<=z&&Z<=O)return wi(e,c,s.subarray(l,l+u));var V,T,$,J;if(_e(e,c,1+(O<z)),c+=2,O<z){V=Te(f,p,0),T=f,$=Te(m,g,0),J=m;var ae=Te(k,j,0);_e(e,c,v-257),_e(e,c+5,A-1),_e(e,c+10,W-4),c+=14;for(var b=0;b<W;++b)_e(e,c+3*b,k[mi[b]]);c+=3*W;for(var re=[w,E],me=0;me<2;++me)for(var ye=re[me],b=0;b<ye.length;++b){var ce=ye[b]&31;_e(e,c,ae[ce]),c+=k[ce],ce>15&&(_e(e,c,ye[b]>>>5&127),c+=ye[b]>>>12)}}else V=Rm,T=Ye,$=Dm,J=Vt;for(var b=0;b<a;++b)if(r[b]>255){var ce=r[b]>>>18&31;xt(e,c,V[ce+257]),c+=T[ce+257],ce>7&&(_e(e,c,r[b]>>>23&31),c+=us[ce]);var le=r[b]&31;xt(e,c,$[le]),c+=J[le],le>3&&(xt(e,c,r[b]>>>5&8191),c+=cs[le])}else xt(e,c,V[r[b]]),c+=T[r[b]];return xt(e,c,V[256]),c+T[256]},_m=new zt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),$m=function(s,e,t,r,i,n){var o=s.length,a=new pe(r+o+5*(1+Math.floor(o/7e3))+i),l=a.subarray(r,a.length-i),u=0;if(!e||o<8)for(var c=0;c<=o;c+=65535){var h=c+65535;h<o?u=wi(l,u,s.subarray(c,h)):(l[c]=n,u=wi(l,u,s.subarray(c,o)))}else{for(var f=_m[e-1],p=f>>>13,d=f&8191,m=(1<<t)-1,g=new ge(32768),y=new ge(m+1),w=Math.ceil(t/3),v=2*w,C=function(Ue){return(s[Ue]^s[Ue+1]<<w^s[Ue+2]<<v)&m},E=new zt(25e3),A=new ge(288),R=new ge(32),b=0,N=0,c=0,k=0,j=0,W=0;c<o;++c){var Z=C(c),z=c&32767,O=y[Z];if(g[z]=O,y[Z]=z,j<=c){var V=o-c;if((b>7e3||k>24576)&&V>423){u=Do(s,l,0,E,A,R,N,k,W,c-W,u),k=b=N=0,W=c;for(var T=0;T<286;++T)A[T]=0;for(var T=0;T<30;++T)R[T]=0}var $=2,J=0,ae=d,re=z-O&32767;if(V>2&&Z==C(c-re))for(var me=Math.min(p,V)-1,ye=Math.min(32767,c),ce=Math.min(258,V);re<=ye&&--ae&&z!=O;){if(s[c+$]==s[c+$-re]){for(var le=0;le<ce&&s[c+le]==s[c+le-re];++le);if(le>$){if($=le,J=re,le>me)break;for(var Ke=Math.min(re,le-2),xe=0,T=0;T<Ke;++T){var ke=c-re+T+32768&32767,Jt=g[ke],Kt=ke-Jt+32768&32767;Kt>xe&&(xe=Kt,O=ke)}}}z=O,O=g[z],re+=z-O+32768&32767}if(J){E[k++]=268435456|gi[$]<<18|Ro[J];var Me=gi[$]&31,Ne=Ro[J]&31;N+=us[Me]+cs[Ne],++A[257+Me],++R[Ne],j=c+$,++b}else E[k++]=s[c],++A[s[c]]}}u=Do(s,l,n,E,A,R,N,k,W,c-W,u)}return hn(a,0,r+cn(u)+i)},Pm=function(){var s=1,e=0;return{p:function(t){for(var r=s,i=e,n=t.length,o=0;o!=n;){for(var a=Math.min(o+5552,n);o<a;++o)r+=t[o],i+=r;r%=65521,i%=65521}s=r,e=i},d:function(){return(s>>>8<<16|(e&255)<<8|e>>>8)+((s&255)<<23)*2}}},Lm=function(s,e,t,r,i){return $m(s,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(s.length)))*1.5):12+e.mem,t,r,!i)},Fm=function(s,e,t){for(;t;++e)s[e]=t,t>>>=8},Bm=function(s,e){var t=e.level,r=t==0?0:t<6?1:t==9?3:2;s[0]=120,s[1]=r<<6|(r?32-2*r:1)},Um=function(s){if((s[0]&15)!=8||s[0]>>>4>7||(s[0]<<8|s[1])%31)throw"invalid zlib data";if(s[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function Wm(s,e){e===void 0&&(e={});var t=Pm();t.p(s);var r=Lm(s,e,2,4);return Bm(r,e),Fm(r,r.length-4,t.d()),r}function zm(s,e){return km((Um(s),s.subarray(2,-4)),e)}function Wl(s,e){var t=s.length;if(!e&&typeof TextEncoder!="undefined")return new TextEncoder().encode(s);for(var r=new pe(s.length+(s.length>>>1)),i=0,n=function(u){r[i++]=u},o=0;o<t;++o){if(i+5>r.length){var a=new pe(i+8+(t-o<<1));a.set(r),r=a}var l=s.charCodeAt(o);l<128||e?n(l):l<2048?(n(192|l>>>6),n(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|s.charCodeAt(++o)&1023,n(240|l>>>18),n(128|l>>>12&63),n(128|l>>>6&63),n(128|l&63)):(n(224|l>>>12),n(128|l>>>6&63),n(128|l&63))}return hn(r,0,i)}function zl(s,e){var t="";if(!e&&typeof TextDecoder!="undefined")return new TextDecoder().decode(s);for(var r=0;r<s.length;){var i=s[r++];i<128||e?t+=String.fromCharCode(i):i<224?t+=String.fromCharCode((i&31)<<6|s[r++]&63):i<240?t+=String.fromCharCode((i&15)<<12|(s[r++]&63)<<6|s[r++]&63):(i=((i&15)<<18|(s[r++]&63)<<12|(s[r++]&63)<<6|s[r++]&63)-65536,t+=String.fromCharCode(55296|i>>10,56320|i&1023))}return t}const bi="v1",Vm=s=>{const e=ue(D({},s),{v:bi});return zl(Wm(Wl(JSON.stringify(e))),!0)},Gm=s=>{if(typeof s!="string")return s;try{const e=JSON.parse(s);if(e.timestamp)return e}catch(e){}try{const e=JSON.parse(zl(zm(Wl(s,!0))));if(e.v===bi)return e;throw new Error(`These events were packed with packer ${e.v} which is incompatible with current packer ${bi}.`)}catch(e){throw console.error(e),new Error("Unknown data format.")}};exports.EventType=M;exports.IncrementalSource=x;exports.MouseInteractions=U;exports.Replayer=Im;exports.ReplayerEvents=B;exports.addCustomEvent=xm;exports.canvasMutation=pi;exports.freezePage=Mm;exports.pack=Vm;exports.record=Je;exports.takeFullSnapshot=Nm;exports.unpack=Gm;exports.utils=Op;
80
+ ***************************************************************************** */function Io(s,e){var t=typeof Symbol=="function"&&s[Symbol.iterator];if(!t)return s;var r,i,n=t.call(s),o=[];try{for(;(e===void 0||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o}var ht;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(ht||(ht={}));var $l={type:"xstate.init"};function As(s){return s===void 0?[]:[].concat(s)}function ot(s){return{type:"xstate.assign",assignment:s}}function xo(s,e){return typeof(s=typeof s=="string"&&e&&e[s]?e[s]:s)=="string"?{type:s}:typeof s=="function"?{type:s.name,exec:s}:s}function Kr(s){return function(e){return s===e}}function Pl(s){return typeof s=="string"?{type:s}:s}function Mo(s,e){return{value:s,context:e,actions:[],changed:!1,matches:Kr(s)}}function No(s,e,t){var r=e,i=!1;return[s.filter(function(n){if(n.type==="xstate.assign"){i=!0;var o=Object.assign({},r);return typeof n.assignment=="function"?o=n.assignment(r,t):Object.keys(n.assignment).forEach(function(a){o[a]=typeof n.assignment[a]=="function"?n.assignment[a](r,t):n.assignment[a]}),r=o,!1}return!0}),r,i]}function Ll(s,e){e===void 0&&(e={});var t=Io(No(As(s.states[s.initial].entry).map(function(o){return xo(o,e.actions)}),s.context,$l),2),r=t[0],i=t[1],n={config:s,_options:e,initialState:{value:s.initial,actions:r,context:i,matches:Kr(s.initial)},transition:function(o,a){var l,u,c=typeof o=="string"?{value:o,context:s.context}:o,h=c.value,f=c.context,p=Pl(a),d=s.states[h];if(d.on){var m=As(d.on[p.type]);try{for(var g=function(T){var L=typeof Symbol=="function"&&Symbol.iterator,K=L&&T[L],ie=0;if(K)return K.call(T);if(T&&typeof T.length=="number")return{next:function(){return T&&ie>=T.length&&(T=void 0),{value:T&&T[ie++],done:!T}}};throw new TypeError(L?"Object is not iterable.":"Symbol.iterator is not defined.")}(m),y=g.next();!y.done;y=g.next()){var w=y.value;if(w===void 0)return Mo(h,f);var v=typeof w=="string"?{target:w}:w,C=v.target,E=v.actions,R=E===void 0?[]:E,O=v.cond,b=O===void 0?function(){return!0}:O,N=C===void 0,k=C!=null?C:h,V=s.states[k];if(b(f,p)){var W=Io(No((N?As(R):[].concat(d.exit,R,V.entry).filter(function(T){return T})).map(function(T){return xo(T,n._options.actions)}),f,p),3),X=W[0],G=W[1],A=W[2],z=C!=null?C:h;return{value:z,context:G,actions:X,changed:C!==h||X.length>0||A,matches:Kr(z)}}}}catch(T){l={error:T}}finally{try{y&&!y.done&&(u=g.return)&&u.call(g)}finally{if(l)throw l.error}}}return Mo(h,f)}};return n}var Ro=function(s,e){return s.actions.forEach(function(t){var r=t.exec;return r&&r(s.context,e)})};function Fl(s){var e=s.initialState,t=ht.NotStarted,r=new Set,i={_machine:s,send:function(n){t===ht.Running&&(e=s.transition(e,n),Ro(e,Pl(n)),r.forEach(function(o){return o(e)}))},subscribe:function(n){return r.add(n),n(e),{unsubscribe:function(){return r.delete(n)}}},start:function(n){if(n){var o=typeof n=="object"?n:{context:s.config.context,value:n};e={value:o.value,actions:[],context:o.context,matches:Kr(o.value)}}return t=ht.Running,Ro(e,$l),i},stop:function(){return t=ht.Stopped,r.clear(),i},get state(){return e},get status(){return t}};return i}function pm(s,e){for(let t=s.length-1;t>=0;t--){const r=s[t];if(r.type===M.Meta&&r.timestamp<=e)return s.slice(t)}return s}function mm(s,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){const i=Ll({id:"player",context:s,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:ot({lastPlayedEvent:(n,o)=>o.type==="CAST_EVENT"?o.payload.event:n.lastPlayedEvent}),recordTimeOffset:ot((n,o)=>{let a=n.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(a=o.payload.timeOffset),le(D({},n),{timeOffset:a,baselineTime:n.events[0].timestamp+a})}),play(n){var o;const{timer:a,events:l,baselineTime:u,lastPlayedEvent:c}=n;a.clear();for(const d of l)Eo(d,u);const h=pm(l,u);let f=c==null?void 0:c.timestamp;(c==null?void 0:c.type)===M.IncrementalSnapshot&&c.data.source===x.MouseMove&&(f=c.timestamp+((o=c.data.positions[0])==null?void 0:o.timeOffset)),u<(f||0)&&r.emit(B.PlayBack);const p=new Array;for(const d of h)if(!(f&&f<u&&(d.timestamp<=f||d===c)))if(d.timestamp<u)p.push(d);else{const m=e(d,!1);a.addAction({doAction:()=>{m()},delay:d.delay})}t(p),r.emit(B.Flush),a.start()},pause(n){n.timer.clear()},resetLastPlayedEvent:ot(n=>le(D({},n),{lastPlayedEvent:null})),startLive:ot({baselineTime:(n,o)=>(n.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:ot((n,o)=>{const{baselineTime:a,timer:l,events:u}=n;if(o.type==="ADD_EVENT"){const{event:c}=o.payload;Eo(c,a);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let d=-1,m=0;for(;m<=h;){const g=Math.floor((m+h)/2);u[g].timestamp<=c.timestamp?m=g+1:h=g-1}d===-1&&(d=m),u.splice(d,0,c)}const f=c.timestamp<a,p=e(c,f);f?p():l.isActive()&&l.addAction({doAction:()=>{p()},delay:c.delay})}return le(D({},n),{events:u})})}});return Fl(i)}function gm(s){const e=Ll({id:"speed",context:s,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,r)=>{"payload"in r&&t.timer.setSpeed(r.payload.speed)},recordSpeed:ot({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return Fl(e)}const ym=s=>[`.${s} { background: currentColor }`,"noscript { display: none !important; }"],Ao=new Map;function Bl(s,e){let t=Ao.get(s);return t||(t=new Map,Ao.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function Ge(s,e,t){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(t&&(t.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){const i=await Ge(s,e,t)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(t||e===null)return r;const{rr_type:i,index:n}=r;return Bl(e,i)[n]}else if("args"in r){const{rr_type:i,args:n}=r,o=window[i];return new o(...await Promise.all(n.map(Ge(s,e,t))))}else{if("base64"in r)return tm(r.base64);if("src"in r){const i=s.get(r.src);if(i)return i;{const n=new Image;return n.src=r.src,s.set(r.src,n),n}}else if("data"in r&&r.rr_type==="Blob"){const i=await Promise.all(r.data.map(Ge(s,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(Ge(s,e,t)));return r}}function vm(s,e){try{return e===Le.WebGL?s.getContext("webgl")||s.getContext("experimental-webgl"):s.getContext("webgl2")}catch(t){return null}}const wm=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function bm(s,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!wm.includes(t))return;const r=Bl(s,t);r.includes(e)||r.push(e)}async function Sm({mutation:s,target:e,type:t,imageMap:r,errorHandler:i}){try{const n=vm(e,t);if(!n)return;if(s.setter){n[s.property]=s.args[0];return}const o=n[s.property],a=await Promise.all(s.args.map(Ge(r,n))),l=o.apply(n,a);bm(n,l);const u=!1}catch(n){i(s,n)}}async function Cm({event:s,mutations:e,target:t,imageMap:r,errorHandler:i}){const n=t.getContext("2d");if(!n){i(e[0],new Error("Canvas context is null"));return}const o=e.map(async l=>Promise.all(l.args.map(Ge(r,n))));(await Promise.all(o)).forEach((l,u)=>{const c=e[u];try{if(c.setter){n[c.property]=c.args[0];return}const h=n[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(r.get(s),h.apply(n,c.args)):h.apply(n,l)}catch(h){i(c,h)}})}async function yi({event:s,mutation:e,target:t,imageMap:r,canvasEventMap:i,errorHandler:n}){try{const o=i.get(s)||e,a="commands"in o?o.commands:[o];if([Le.WebGL,Le.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){const u=a[l];await Sm({mutation:u,type:e.type,target:t,imageMap:r,errorHandler:n})}return}await Cm({event:s,mutations:a,target:t,imageMap:r,errorHandler:n})}catch(o){n(e,o)}}class Em{constructor(e){S(this,"mediaMap",new Map),S(this,"warn"),S(this,"service"),S(this,"speedService"),S(this,"emitter"),S(this,"getCurrentTime"),S(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(B.Start,this.start.bind(this)),this.emitter.on(B.SkipStart,this.start.bind(this)),this.emitter.on(B.Pause,this.pause.bind(this)),this.emitter.on(B.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{this.syncTargetWithState(r),e.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:r}){if(r.isPlaying){const n=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,o="duration"in t&&t.duration;if(Number.isNaN(o)){this.waitForMetadata(t);return}let a=r.currentTimeAtLastInteraction+n;t.loop&&o!==!1&&(a=a%o),t.currentTime=a}else t.pause(),t.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const t=()=>{this.metadataCallbackMap.delete(e);const r=this.mediaMap.get(e);r&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:r}){var p,d,m,g,y;const i=this.mediaMap.get(e),{type:n,playbackRate:o,currentTime:a,muted:l,volume:u,loop:c}=r;return{isPlaying:n===ze.Play||n!==ze.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(p=a!=null?a:i==null?void 0:i.currentTimeAtLastInteraction)!=null?p:0,lastInteractionTimeOffset:t,playbackRate:(d=o!=null?o:i==null?void 0:i.playbackRate)!=null?d:1,volume:(m=u!=null?u:i==null?void 0:i.volume)!=null?m:1,muted:(g=l!=null?l:i==null?void 0:i.muted)!=null?g:e.getAttribute("muted")===null,loop:(y=c!=null?c:i==null?void 0:i.loop)!=null?y:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:r,loop:i,volume:n,isPlaying:o}=t,a=this.service.state.matches("paused"),l=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==n&&(e.volume=n),e.muted=r,e.loop=i,e.playbackRate!==l&&(e.playbackRate=l),o&&!a?e.play():e.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(e,t,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const i=e,n=r.getMeta(i);if(!n||!("attributes"in n))return;const o=this.service.state.matches("paused"),a=n.attributes;let l=!1;a.rr_mediaState?l=a.rr_mediaState==="played":l=i.getAttribute("autoplay")!==null,l&&o&&i.pause();let u=1;typeof a.rr_mediaPlaybackRate=="number"&&(u=a.rr_mediaPlaybackRate);let c=!1;typeof a.rr_mediaMuted=="boolean"?c=a.rr_mediaMuted:c=i.getAttribute("muted")!==null;let h=!1;typeof a.rr_mediaLoop=="boolean"?h=a.rr_mediaLoop:h=i.getAttribute("loop")!==null;let f=1;typeof a.rr_mediaVolume=="number"&&(f=a.rr_mediaVolume);let p=0;typeof a.rr_mediaCurrentTime=="number"&&(p=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:l,currentTimeAtLastInteraction:p,lastInteractionTimeOffset:t,playbackRate:u,volume:f,muted:c,loop:h}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:t,mutation:r}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:r})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function xr(s,e){if(s.nodeName!=="DIALOG"||s instanceof xe)return;const t=s,r=t.open,i=r&&t.matches("dialog:modal"),n=t.getAttribute("rr_open_mode"),o=typeof(e==null?void 0:e.attributes.open)=="string"||typeof t.getAttribute("open")=="string",a=n==="modal";if(!(r&&!(i&&n==="non-modal"||!i&&a))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),o&&(a?t.showModal():t.show())}}function Im(s,e){if(s.nodeName!=="DIALOG"||s instanceof xe)return;const t=s;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}const xm=5*1e3,Mm=_l||hm,Oo="[replayer]",Os={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Do(s){return s.type==M.IncrementalSnapshot&&(s.data.source==x.TouchMove||s.data.source==x.MouseInteraction&&s.data.type==U.TouchStart)}class Nm{constructor(e,t){if(S(this,"wrapper"),S(this,"iframe"),S(this,"service"),S(this,"speedService"),S(this,"config"),S(this,"usingVirtualDom",!1),S(this,"virtualDom",new bt),S(this,"mouse"),S(this,"mouseTail",null),S(this,"tailPositions",[]),S(this,"emitter",Mm()),S(this,"nextUserInteractionEvent"),S(this,"legacy_missingNodeRetryMap",{}),S(this,"cache",Gn()),S(this,"imageMap",new Map),S(this,"canvasEventMap",new Map),S(this,"mirror",Lo()),S(this,"styleMirror",new cn),S(this,"mediaManager"),S(this,"firstFullSnapshot",null),S(this,"newDocumentQueue",[]),S(this,"mousePos",null),S(this,"touchActive",null),S(this,"lastMouseDownEvent",null),S(this,"lastHoveredRootNode"),S(this,"lastSelectionData",null),S(this,"constructedStyleMutations",[]),S(this,"adoptedStyleSheets",[]),S(this,"handleResize",a=>{this.iframe.style.display="inherit";for(const l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(a.width)),l.setAttribute("height",String(a.height)))}),S(this,"applyEventsSynchronously",a=>{for(const l of a){switch(l.type){case M.DomContentLoaded:case M.Load:case M.Custom:continue;case M.FullSnapshot:case M.Meta:case M.Plugin:case M.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),S(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case M.DomContentLoaded:case M.Load:break;case M.Custom:u=()=>{this.emitter.emit(B.CustomEvent,a)};break;case M.Meta:u=()=>this.emitter.emit(B.Resize,{width:a.data.width,height:a.data.height});break;case M.FullSnapshot:u=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(a,l),(h=this.iframe.contentWindow)==null||h.scrollTo(a.data.initialOffset)};break;case M.IncrementalSnapshot:u=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=a.timestamp)&&this.isUserInteraction(h)){h.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-a.delay,f={speed:Math.min(Math.round(h/xm),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(B.SkipStart,f)}}};break}return()=>{u&&u();for(const f of this.config.plugins||[])f.handler&&f.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===this.service.state.context.events[h]){const f=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(B.Finish))};let p=50;a.type===M.IncrementalSnapshot&&a.data.source===x.MouseMove&&a.data.positions.length&&(p+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,p)}this.emitter.emit(B.EventCast,a)}}),!(t!=null&&t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Os,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(B.Resize,this.handleResize),this.setupDom();for(const a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(B.Flush,()=>{if(this.usingVirtualDom){const a={mirror:this.mirror,applyCanvas:(l,u,c)=>{yi({event:l,mutation:u,target:c,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(l,u)=>{l.source===x.StyleSheetRule?this.applyStyleSheetRule(l,u):l.source===x.StyleDeclaration&&this.applyStyleDeclaration(l,u)},afterAppend:(l,u)=>{for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{jr(this.iframe.contentDocument,this.virtualDom,a,this.virtualDom.mirror)}catch(l){console.warn(l)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const l in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[l],c=Hr(u.node,this.mirror,this.virtualDom.mirror);jr(c,u.node,a,this.virtualDom.mirror),u.node=c}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(l=>{this.applyStyleSheetMutation(l)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(l=>{this.applyAdoptedStyleSheet(l)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[a,l]=this.lastMouseDownEvent;a.dispatchEvent(l)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(B.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new dm([],{speed:this.config.speed});this.service=mm({events:e.map(a=>t&&t.unpackFn?t.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(a=>{this.emitter.emit(B.StateChange,{player:a})}),this.speedService=gm({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(B.StateChange,{speed:a})}),this.mediaManager=new Em({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const n=this.service.state.context.events.find(a=>a.type===M.Meta),o=this.service.state.context.events.find(a=>a.type===M.FullSnapshot);if(n){const{width:a,height:l}=n.data;setTimeout(()=>{this.emitter.emit(B.Resize,{width:a,height:l})},0)}o&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(a=this.iframe.contentWindow)==null||a.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(Do)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail!="undefined"&&(e.mouseTail===!1?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(){const e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,r;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit(B.Start)}pause(e){var t,r;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit(B.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(B.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(B.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;Do(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}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=Gn()}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),this.config.mouseTail!==!1&&(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");const e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(fm(this.iframe.contentWindow,this.iframe.contentDocument),on(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!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={};const r=[],i=new Set,n=(l,u)=>{if(l.nodeName==="DIALOG"&&i.add(l),this.collectIframeAndAttachDocument(r,l),this.mediaManager.isSupportedMediaElement(l)){const{events:c}=this.service.state.context;this.mediaManager.addMediaElements(l,e.timestamp-c[0].timestamp,this.mirror)}for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Xh(e.data.node,{doc:this.iframe.contentDocument,afterAppend:n,cache:this.cache,mirror:this.mirror}),n(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:l,builtNode:u}of r)this.attachDocumentToIframe(l,u),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);const{documentElement:o,head:a}=this.iframe.contentDocument;this.insertStyleRules(o,a),i.forEach(l=>xr(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(B.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;const i=ym(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!i.length)if(this.usingVirtualDom){const n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,vl(n,this.virtualDom.unserializedId)),e.insertBefore(n,t),n.rules.push({source:x.StyleSheetRule,adds:i.map((o,a)=>({rule:o,index:a}))})}else{const n=document.createElement("style");e.insertBefore(n,t);for(let o=0;o<i.length;o++)(r=n.sheet)==null||r.insertRule(i[o],o)}}attachDocumentToIframe(e,t){const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],n=new Set,o=(a,l)=>{a.nodeName==="DIALOG"&&n.add(a),this.collectIframeAndAttachDocument(i,a);const u=r.getMeta(a);if((u==null?void 0:u.type)===_e.Element&&(u==null?void 0:u.tagName.toUpperCase())==="HTML"){const{documentElement:c,head:h}=t.contentDocument;this.insertStyleRules(c,h)}if(!this.usingVirtualDom)for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:l,replayer:this})};Tt(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(const{mutationInQueue:a,builtNode:l}of i)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);n.forEach(a=>xr(a))}collectIframeAndAttachDocument(e,t){if(ft(t,this.mirror)){const r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){var e;const t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){const r=new Set;let i,n=this.service.state;const o=()=>{n=this.service.state};this.emitter.on(B.Start,o),this.emitter.on(B.Pause,o);const a=()=>{this.emitter.off(B.Start,o),this.emitter.off(B.Pause,o)};t.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&i!==-1&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(B.LoadStylesheetEnd),i&&clearTimeout(i),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(B.LoadStylesheetStart),i=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),i=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===M.IncrementalSnapshot&&t.data.source===x.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){const r=document.createElement("canvas"),i=r.getContext("2d"),n=i==null?void 0:i.createImageData(r.width,r.height);i==null||i.putImageData(n,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const r={isUnchanged:!0};if("commands"in e){const i=await Promise.all(e.commands.map(async n=>{const o=await Promise.all(n.args.map(Ge(this.imageMap,null,r)));return le(D({},n),{args:o})}));r.isUnchanged===!1&&this.canvasEventMap.set(t,le(D({},e),{commands:i}))}else{const i=await Promise.all(e.args.map(Ge(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,le(D({},e),{args:i}))}}}applyIncremental(e,t){var r,i,n;const{data:o}=e;switch(o.source){case x.Mutation:{try{this.applyMutation(o,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,o)}break}case x.Drag:case x.TouchMove:case x.MouseMove:if(t){const a=o.positions[o.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:o}}else o.positions.forEach(a=>{const l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,t,o)},delay:a.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((r=o.positions[0])==null?void 0:r.timeOffset)});break;case x.MouseInteraction:{if(o.id===-1)break;const a=new Event(je(U[o.type])),l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);this.emitter.emit(B.MouseInteraction,{type:o.type,target:l});const{triggerFocus:u}=this.config;switch(o.type){case U.Blur:"blur"in l&&l.blur();break;case U.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case U.Click:case U.TouchStart:case U.TouchEnd:case U.MouseDown:case U.MouseUp:t?(o.type===U.TouchStart?this.touchActive=!0:o.type===U.TouchEnd&&(this.touchActive=!1),o.type===U.MouseDown?this.lastMouseDownEvent=[l,a]:o.type===U.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===U.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,t,o),o.type===U.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===U.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===U.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case U.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case x.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.scrollData=o;break}this.applyScroll(o,t);break}case x.ViewportResize:this.emitter.emit(B.Resize,{width:o.width,height:o.height});break;case x.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.inputData=o;break}this.applyInput(o);break}case x.MediaInteraction:{const a=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);const l=a,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-u[0].timestamp,mutation:o});break}case x.StyleSheetRule:case x.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case x.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.canvasMutations.push({event:e,mutation:o})}else{const a=this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);yi({event:e,mutation:o,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case x.Font:{try{const a=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(n=this.iframe.contentDocument)==null||n.fonts.add(a)}catch(a){this.warn(a)}break}case x.Selection:{if(t){this.lastSelectionData=o;break}this.applySelection(o);break}case x.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,vp(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const u in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[u],h=yl(c.node,this.virtualDom,this.mirror);h&&(c.node=h)}catch(c){this.warn(c)}const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(u=>r.getNode(u.id)?!0:(this.warnNodeNotFound(e,u.id),!1)),e.removes.forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return;let f=r.getNode(u.parentId);if(!f)return this.warnNodeNotFound(e,u.parentId);if(u.isShadow&&Ve(f)&&(f=f.shadowRoot),r.removeNodeFromMap(h),f)try{f.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&f.nodeName==="STYLE"&&((c=f.rules)==null?void 0:c.length)>0&&(f.rules=[])}catch(p){if(p instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw p}});const i=D({},this.legacy_missingNodeRetryMap),n=[],o=u=>{let c=null;return u.nextId&&(c=r.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!c},a=u=>{var c,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let f=r.getNode(u.parentId);if(!f)return u.node.type===_e.Document?this.newDocumentQueue.push(u):n.push(u);u.node.isShadow&&(Ve(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let p=null,d=null;if(u.previousId&&(p=r.getNode(u.previousId)),u.nextId&&(d=r.getNode(u.nextId)),o(u))return n.push(u);if(u.node.rootId&&!r.getNode(u.node.rootId))return;const m=u.node.rootId?r.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(ft(f,r)){this.attachDocumentToIframe(u,f);return}const g=(v,C)=>{if(!this.usingVirtualDom){xr(v);for(const E of this.config.plugins||[])E.onBuild&&E.onBuild(v,{id:C,replayer:this})}},y=Tt(u.node,{doc:m,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:g});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:y,mutation:u};return}const w=r.getMeta(f);if(w&&w.type===_e.Element&&u.node.type===_e.Text){const v=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(w.tagName==="textarea")for(const C of v)C.nodeType===f.TEXT_NODE&&f.removeChild(C);else if(w.tagName==="style"&&v.length===1)for(const C of v)C.nodeType===f.TEXT_NODE&&!r.hasNode(C)&&(y.textContent=C.textContent,f.removeChild(C))}else if((w==null?void 0:w.type)===_e.Document){const v=f;u.node.type===_e.DocumentType&&((c=v.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&v.removeChild(v.childNodes[0]),y.nodeName==="HTML"&&v.documentElement&&v.removeChild(v.documentElement)}if(p&&p.nextSibling&&p.nextSibling.parentNode?f.insertBefore(y,p.nextSibling):d&&d.parentNode?f.contains(d)?f.insertBefore(y,d):f.insertBefore(y,null):f.appendChild(y),g(y,u.node.id),this.usingVirtualDom&&y.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),ft(y,this.mirror)){const v=this.mirror.getId(y),C=this.newDocumentQueue.find(E=>E.parentId===v);C&&(this.attachDocumentToIframe(C,y),this.newDocumentQueue=this.newDocumentQueue.filter(E=>E!==C))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,f,y,u)};e.adds.forEach(u=>{a(u)});const l=Date.now();for(;n.length;){const u=Cl(n);if(n.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(const c of u)r.getNode(c.value.parentId)?an(c,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),El(e.texts).forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(p=>p.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);const f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=ss(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){const p=h.parentNode;((c=p==null?void 0:p.rules)==null?void 0:c.length)>0&&(p.rules=[])}}),e.attributes.forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(f=>f.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);for(const f in u.attributes)if(typeof f=="string"){const p=u.attributes[f];if(p===null)h.removeAttribute(f),f==="open"&&Im(h,u);else if(typeof p=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const d=r.getMeta(h),m=Tt(le(D({},d),{attributes:D(D({},d.attributes),u.attributes)}),{doc:h.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(d.attributes,u.attributes);const g=h.nextSibling,y=h.parentNode;if(m&&y){y.removeChild(h),y.insertBefore(m,g),r.replace(u.id,m);break}}catch(d){}if(f==="value"&&h.nodeName==="TEXTAREA"){const d=h;d.childNodes.forEach(g=>d.removeChild(g));const m=(c=h.ownerDocument)==null?void 0:c.createTextNode(p);m&&d.appendChild(m)}else h.setAttribute(f,p);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&xr(h,u)}catch(d){this.warn("An error occurred may due to the checkout feature.",d)}else if(f==="style"){const d=p,m=h;for(const g in d)if(d[g]===!1)m.style.removeProperty(g);else if(d[g]instanceof Array){const y=d[g];m.style.setProperty(g,y[0],y[1])}else{const y=d[g];m.style.setProperty(g,y)}}}})}applyScroll(e,t){var r,i;const n=this.mirror.getNode(e.id);if(!n)return this.debugNodeNotFound(e,e.id);const o=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((o==null?void 0:o.type)===_e.Document)(i=n.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(a){}}applyInput(e){const t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(r){}}applySelection(e){try{const t=new Set,r=e.ranges.map(({start:i,startOffset:n,end:o,endOffset:a})=>{const l=this.mirror.getNode(i),u=this.mirror.getNode(o);if(!l||!u)return;const c=new Range;c.setStart(l,n),c.setEnd(u,a);const h=l.ownerDocument,f=h==null?void 0:h.getSelection();return f&&t.add(f),{range:c,selection:f}});t.forEach(i=>i.removeAllRanges()),r.forEach(i=>{var n;return i&&((n=i.selection)==null?void 0:n.addRange(i.range))})}catch(t){}}applyStyleSheetMutation(e){var t;let r=null;e.styleId?r=this.styleMirror.getStyle(e.styleId):e.id&&(r=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),r&&(e.source===x.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===x.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,i,n,o;if((r=e.adds)==null||r.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){const{positions:u,index:c}=pi(l);ut(t.cssRules,u).insertRule(a,c)}else{const u=l===void 0?void 0:Math.min(l,t.cssRules.length);t==null||t.insertRule(a,u)}}catch(u){}}),(i=e.removes)==null||i.forEach(({index:a})=>{try{if(Array.isArray(a)){const{positions:l,index:u}=pi(a);ut(t.cssRules,l).deleteRule(u||0)}else t==null||t.deleteRule(a)}catch(l){}}),e.replace)try{(n=t.replace)==null||n.call(t,e.replace)}catch(a){}if(e.replaceSync)try{(o=t.replaceSync)==null||o.call(t,e.replaceSync)}catch(a){}}applyStyleDeclaration(e,t){e.set&&ut(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&ut(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;const r=this.mirror.getNode(e.id);if(!r)return;(t=e.styles)==null||t.forEach(a=>{var l;let u=null,c=null;if(Ve(r)?c=((l=r.ownerDocument)==null?void 0:l.defaultView)||null:r.nodeName==="#document"&&(c=r.defaultView),!!c)try{u=new c.CSSStyleSheet,this.styleMirror.add(u,a.styleId),this.applyStyleSheetRule({source:x.StyleSheetRule,adds:a.rules},u)}catch(h){}});const i=10;let n=0;const o=(a,l)=>{const u=l.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);Ve(a)?a.shadowRoot.adoptedStyleSheets=u:a.nodeName==="#document"&&(a.adoptedStyleSheets=u),u.length!==l.length&&n<i&&(setTimeout(()=>o(a,l),0+100*n),n++)};o(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,i){const{previousId:n,nextId:o}=i,a=n&&e[n],l=o&&e[o];if(a){const{node:u,mutation:c}=a;t.insertBefore(u,r),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(l){const{node:u,mutation:c}=l;t.insertBefore(u,r.nextSibling),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}}moveAndHover(e,t,r,i,n){const o=this.mirror.getNode(r);if(!o)return this.debugNodeNotFound(n,r);const a=un(o,this.iframe),l=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:l,y:u}),this.hoverElements(o)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:r,strokeStyle:i,duration:n}=this.config.mouseTail===!0?Os:Object.assign({},Os,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const a=this.mouseTail.getContext("2d");!a||!this.tailPositions.length||(a.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),a.beginPath(),a.lineWidth=r,a.lineCap=t,a.strokeStyle=i,a.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>a.lineTo(l.x,l.y)),a.stroke())};this.tailPositions.push(e),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==e),o()},n/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let r=e;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(e){return e.type!==M.IncrementalSnapshot?!1:e.data.source>x.Mutation&&e.data.source<=x.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(B.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(Oo,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(Oo,...e)}}const{addCustomEvent:Rm}=Xe,{freezePage:Am}=Xe,{takeFullSnapshot:Om}=Xe;var pe=Uint8Array,ge=Uint16Array,Vt=Uint32Array,hs=new pe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),fs=new pe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),vi=new pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ul=function(s,e){for(var t=new ge(31),r=0;r<31;++r)t[r]=e+=1<<s[r-1];for(var i=new Vt(t[30]),r=1;r<30;++r)for(var n=t[r];n<t[r+1];++n)i[n]=n-t[r]<<5|r;return[t,i]},Wl=Ul(hs,2),zl=Wl[0],wi=Wl[1];zl[28]=258,wi[258]=28;var Vl=Ul(fs,0),Dm=Vl[0],To=Vl[1],bi=new ge(32768);for(var ee=0;ee<32768;++ee){var Ue=(ee&43690)>>>1|(ee&21845)<<1;Ue=(Ue&52428)>>>2|(Ue&13107)<<2,Ue=(Ue&61680)>>>4|(Ue&3855)<<4,bi[ee]=((Ue&65280)>>>8|(Ue&255)<<8)>>>1}var De=function(s,e,t){for(var r=s.length,i=0,n=new ge(e);i<r;++i)++n[s[i]-1];var o=new ge(e);for(i=0;i<e;++i)o[i]=o[i-1]+n[i-1]<<1;var a;if(t){a=new ge(1<<e);var l=15-e;for(i=0;i<r;++i)if(s[i])for(var u=i<<4|s[i],c=e-s[i],h=o[s[i]-1]++<<c,f=h|(1<<c)-1;h<=f;++h)a[bi[h]>>>l]=u}else for(a=new ge(r),i=0;i<r;++i)a[i]=bi[o[s[i]-1]++]>>>15-s[i];return a},He=new pe(288);for(var ee=0;ee<144;++ee)He[ee]=8;for(var ee=144;ee<256;++ee)He[ee]=9;for(var ee=256;ee<280;++ee)He[ee]=7;for(var ee=280;ee<288;++ee)He[ee]=8;var Gt=new pe(32);for(var ee=0;ee<32;++ee)Gt[ee]=5;var Tm=De(He,9,0),km=De(He,9,1),_m=De(Gt,5,0),$m=De(Gt,5,1),Ds=function(s){for(var e=s[0],t=1;t<s.length;++t)s[t]>e&&(e=s[t]);return e},Se=function(s,e,t){var r=e/8>>0;return(s[r]|s[r+1]<<8)>>>(e&7)&t},Ts=function(s,e){var t=e/8>>0;return(s[t]|s[t+1]<<8|s[t+2]<<16)>>>(e&7)},dn=function(s){return(s/8>>0)+(s&7&&1)},pn=function(s,e,t){(t==null||t>s.length)&&(t=s.length);var r=new(s instanceof ge?ge:s instanceof Vt?Vt:pe)(t-e);return r.set(s.subarray(e,t)),r},Pm=function(s,e,t){var r=s.length,i=!e||t,n=!t||t.i;t||(t={}),e||(e=new pe(r*3));var o=function(Fe){var Be=e.length;if(Fe>Be){var we=new pe(Math.max(Be*2,Fe));we.set(e),e=we}},a=t.f||0,l=t.p||0,u=t.b||0,c=t.l,h=t.d,f=t.m,p=t.n,d=r*8;do{if(!c){t.f=a=Se(s,l,1);var m=Se(s,l+1,3);if(l+=3,m)if(m==1)c=km,h=$m,f=9,p=5;else if(m==2){var v=Se(s,l,31)+257,C=Se(s,l+10,15)+4,E=v+Se(s,l+5,31)+1;l+=14;for(var R=new pe(E),O=new pe(19),b=0;b<C;++b)O[vi[b]]=Se(s,l+b*3,7);l+=C*3;var N=Ds(O),k=(1<<N)-1;if(!n&&l+E*(N+7)>d)break;for(var V=De(O,N,1),b=0;b<E;){var W=V[Se(s,l,k)];l+=W&15;var g=W>>>4;if(g<16)R[b++]=g;else{var X=0,G=0;for(g==16?(G=3+Se(s,l,3),l+=2,X=R[b-1]):g==17?(G=3+Se(s,l,7),l+=3):g==18&&(G=11+Se(s,l,127),l+=7);G--;)R[b++]=X}}var A=R.subarray(0,v),z=R.subarray(v);f=Ds(A),p=Ds(z),c=De(A,f,1),h=De(z,p,1)}else throw"invalid block type";else{var g=dn(l)+4,y=s[g-4]|s[g-3]<<8,w=g+y;if(w>r){if(n)throw"unexpected EOF";break}i&&o(u+y),e.set(s.subarray(g,w),u),t.b=u+=y,t.p=l=w*8;continue}if(l>d)throw"unexpected EOF"}i&&o(u+131072);for(var T=(1<<f)-1,L=(1<<p)-1,K=f+p+18;n||l+K<d;){var X=c[Ts(s,l)&T],ie=X>>>4;if(l+=X&15,l>d)throw"unexpected EOF";if(!X)throw"invalid length/literal";if(ie<256)e[u++]=ie;else if(ie==256){c=null;break}else{var re=ie-254;if(ie>264){var b=ie-257,me=hs[b];re=Se(s,l,(1<<me)-1)+zl[b],l+=me}var ye=h[Ts(s,l)&L],ce=ye>>>4;if(!ye)throw"invalid distance";l+=ye&15;var z=Dm[ce];if(ce>3){var me=fs[ce];z+=Ts(s,l)&(1<<me)-1,l+=me}if(l>d)throw"unexpected EOF";i&&o(u+131072);for(var ue=u+re;u<ue;u+=4)e[u]=e[u-z],e[u+1]=e[u+1-z],e[u+2]=e[u+2-z],e[u+3]=e[u+3-z];u=ue}}t.l=c,t.p=l,t.b=u,c&&(a=1,t.m=f,t.d=h,t.n=p)}while(!a);return u==e.length?e:pn(e,0,u)},Te=function(s,e,t){t<<=e&7;var r=e/8>>0;s[r]|=t,s[r+1]|=t>>>8},Mt=function(s,e,t){t<<=e&7;var r=e/8>>0;s[r]|=t,s[r+1]|=t>>>8,s[r+2]|=t>>>16},ks=function(s,e){for(var t=[],r=0;r<s.length;++r)s[r]&&t.push({s:r,f:s[r]});var i=t.length,n=t.slice();if(!i)return[new pe(0),0];if(i==1){var o=new pe(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(E,R){return E.f-R.f}),t.push({s:-1,f:25001});var a=t[0],l=t[1],u=0,c=1,h=2;for(t[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=t[t[u].f<t[h].f?u++:h++],l=t[u!=c&&t[u].f<t[h].f?u++:h++],t[c++]={s:-1,f:a.f+l.f,l:a,r:l};for(var f=n[0].s,r=1;r<i;++r)n[r].s>f&&(f=n[r].s);var p=new ge(f+1),d=Si(t[c-1],p,0);if(d>e){var r=0,m=0,g=d-e,y=1<<g;for(n.sort(function(R,O){return p[O.s]-p[R.s]||R.f-O.f});r<i;++r){var w=n[r].s;if(p[w]>e)m+=y-(1<<d-p[w]),p[w]=e;else break}for(m>>>=g;m>0;){var v=n[r].s;p[v]<e?m-=1<<e-p[v]++-1:++r}for(;r>=0&&m;--r){var C=n[r].s;p[C]==e&&(--p[C],++m)}d=e}return[new pe(p),d]},Si=function(s,e,t){return s.s==-1?Math.max(Si(s.l,e,t+1),Si(s.r,e,t+1)):e[s.s]=t},ko=function(s){for(var e=s.length;e&&!s[--e];);for(var t=new ge(++e),r=0,i=s[0],n=1,o=function(l){t[r++]=l},a=1;a<=e;++a)if(s[a]==i&&a!=e)++n;else{if(!i&&n>2){for(;n>138;n-=138)o(32754);n>2&&(o(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(o(i),--n;n>6;n-=6)o(8304);n>2&&(o(n-3<<5|8208),n=0)}for(;n--;)o(i);n=1,i=s[a]}return[t.subarray(0,r),e]},Nt=function(s,e){for(var t=0,r=0;r<e.length;++r)t+=s[r]*e[r];return t},Ci=function(s,e,t){var r=t.length,i=dn(e+2);s[i]=r&255,s[i+1]=r>>>8,s[i+2]=s[i]^255,s[i+3]=s[i+1]^255;for(var n=0;n<r;++n)s[i+n+4]=t[n];return(i+4+r)*8},_o=function(s,e,t,r,i,n,o,a,l,u,c){Te(e,c++,t),++i[256];for(var h=ks(i,15),f=h[0],p=h[1],d=ks(n,15),m=d[0],g=d[1],y=ko(f),w=y[0],v=y[1],C=ko(m),E=C[0],R=C[1],O=new ge(19),b=0;b<w.length;++b)O[w[b]&31]++;for(var b=0;b<E.length;++b)O[E[b]&31]++;for(var N=ks(O,7),k=N[0],V=N[1],W=19;W>4&&!k[vi[W-1]];--W);var X=u+5<<3,G=Nt(i,He)+Nt(n,Gt)+o,A=Nt(i,f)+Nt(n,m)+o+14+3*W+Nt(O,k)+(2*O[16]+3*O[17]+7*O[18]);if(X<=G&&X<=A)return Ci(e,c,s.subarray(l,l+u));var z,T,L,K;if(Te(e,c,1+(A<G)),c+=2,A<G){z=De(f,p,0),T=f,L=De(m,g,0),K=m;var ie=De(k,V,0);Te(e,c,v-257),Te(e,c+5,R-1),Te(e,c+10,W-4),c+=14;for(var b=0;b<W;++b)Te(e,c+3*b,k[vi[b]]);c+=3*W;for(var re=[w,E],me=0;me<2;++me)for(var ye=re[me],b=0;b<ye.length;++b){var ce=ye[b]&31;Te(e,c,ie[ce]),c+=k[ce],ce>15&&(Te(e,c,ye[b]>>>5&127),c+=ye[b]>>>12)}}else z=Tm,T=He,L=_m,K=Gt;for(var b=0;b<a;++b)if(r[b]>255){var ce=r[b]>>>18&31;Mt(e,c,z[ce+257]),c+=T[ce+257],ce>7&&(Te(e,c,r[b]>>>23&31),c+=hs[ce]);var ue=r[b]&31;Mt(e,c,L[ue]),c+=K[ue],ue>3&&(Mt(e,c,r[b]>>>5&8191),c+=fs[ue])}else Mt(e,c,z[r[b]]),c+=T[r[b]];return Mt(e,c,z[256]),c+T[256]},Lm=new Vt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Fm=function(s,e,t,r,i,n){var o=s.length,a=new pe(r+o+5*(1+Math.floor(o/7e3))+i),l=a.subarray(r,a.length-i),u=0;if(!e||o<8)for(var c=0;c<=o;c+=65535){var h=c+65535;h<o?u=Ci(l,u,s.subarray(c,h)):(l[c]=n,u=Ci(l,u,s.subarray(c,o)))}else{for(var f=Lm[e-1],p=f>>>13,d=f&8191,m=(1<<t)-1,g=new ge(32768),y=new ge(m+1),w=Math.ceil(t/3),v=2*w,C=function(Ke){return(s[Ke]^s[Ke+1]<<w^s[Ke+2]<<v)&m},E=new Vt(25e3),R=new ge(288),O=new ge(32),b=0,N=0,c=0,k=0,V=0,W=0;c<o;++c){var X=C(c),G=c&32767,A=y[X];if(g[G]=A,y[X]=G,V<=c){var z=o-c;if((b>7e3||k>24576)&&z>423){u=_o(s,l,0,E,R,O,N,k,W,c-W,u),k=b=N=0,W=c;for(var T=0;T<286;++T)R[T]=0;for(var T=0;T<30;++T)O[T]=0}var L=2,K=0,ie=d,re=G-A&32767;if(z>2&&X==C(c-re))for(var me=Math.min(p,z)-1,ye=Math.min(32767,c),ce=Math.min(258,z);re<=ye&&--ie&&G!=A;){if(s[c+L]==s[c+L-re]){for(var ue=0;ue<ce&&s[c+ue]==s[c+ue-re];++ue);if(ue>L){if(L=ue,K=re,ue>me)break;for(var Fe=Math.min(re,ue-2),Be=0,T=0;T<Fe;++T){var we=c-re+T+32768&32767,Kt=g[we],St=we-Kt+32768&32767;St>Be&&(Be=St,A=we)}}}G=A,A=g[G],re+=G-A+32768&32767}if(K){E[k++]=268435456|wi[L]<<18|To[K];var Qt=wi[L]&31,Me=To[K]&31;N+=hs[Qt]+fs[Me],++R[257+Qt],++O[Me],V=c+L,++b}else E[k++]=s[c],++R[s[c]]}}u=_o(s,l,n,E,R,O,N,k,W,c-W,u)}return pn(a,0,r+dn(u)+i)},Bm=function(){var s=1,e=0;return{p:function(t){for(var r=s,i=e,n=t.length,o=0;o!=n;){for(var a=Math.min(o+5552,n);o<a;++o)r+=t[o],i+=r;r%=65521,i%=65521}s=r,e=i},d:function(){return(s>>>8<<16|(e&255)<<8|e>>>8)+((s&255)<<23)*2}}},Um=function(s,e,t,r,i){return Fm(s,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(s.length)))*1.5):12+e.mem,t,r,!i)},Wm=function(s,e,t){for(;t;++e)s[e]=t,t>>>=8},zm=function(s,e){var t=e.level,r=t==0?0:t<6?1:t==9?3:2;s[0]=120,s[1]=r<<6|(r?32-2*r:1)},Vm=function(s){if((s[0]&15)!=8||s[0]>>>4>7||(s[0]<<8|s[1])%31)throw"invalid zlib data";if(s[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function Gm(s,e){e===void 0&&(e={});var t=Bm();t.p(s);var r=Um(s,e,2,4);return zm(r,e),Wm(r,r.length-4,t.d()),r}function jm(s,e){return Pm((Vm(s),s.subarray(2,-4)),e)}function Gl(s,e){var t=s.length;if(!e&&typeof TextEncoder!="undefined")return new TextEncoder().encode(s);for(var r=new pe(s.length+(s.length>>>1)),i=0,n=function(u){r[i++]=u},o=0;o<t;++o){if(i+5>r.length){var a=new pe(i+8+(t-o<<1));a.set(r),r=a}var l=s.charCodeAt(o);l<128||e?n(l):l<2048?(n(192|l>>>6),n(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|s.charCodeAt(++o)&1023,n(240|l>>>18),n(128|l>>>12&63),n(128|l>>>6&63),n(128|l&63)):(n(224|l>>>12),n(128|l>>>6&63),n(128|l&63))}return pn(r,0,i)}function jl(s,e){var t="";if(!e&&typeof TextDecoder!="undefined")return new TextDecoder().decode(s);for(var r=0;r<s.length;){var i=s[r++];i<128||e?t+=String.fromCharCode(i):i<224?t+=String.fromCharCode((i&31)<<6|s[r++]&63):i<240?t+=String.fromCharCode((i&15)<<12|(s[r++]&63)<<6|s[r++]&63):(i=((i&15)<<18|(s[r++]&63)<<12|(s[r++]&63)<<6|s[r++]&63)-65536,t+=String.fromCharCode(55296|i>>10,56320|i&1023))}return t}const Ei="v1",Hm=s=>{const e=le(D({},s),{v:Ei});return jl(Gm(Gl(JSON.stringify(e))),!0)},Ym=s=>{if(typeof s!="string")return s;try{const e=JSON.parse(s);if(e.timestamp)return e}catch(e){}try{const e=JSON.parse(jl(jm(Gl(s,!0))));if(e.v===Ei)return e;throw new Error(`These events were packed with packer ${e.v} which is incompatible with current packer ${Ei}.`)}catch(e){throw console.error(e),new Error("Unknown data format.")}};exports.EventType=M;exports.IncrementalSource=x;exports.MouseInteractions=U;exports.Replayer=Nm;exports.ReplayerEvents=B;exports.addCustomEvent=Rm;exports.canvasMutation=yi;exports.freezePage=Am;exports.pack=Hm;exports.record=Xe;exports.takeFullSnapshot=Om;exports.unpack=Ym;exports.utils=kp;
81
81
  if (typeof module.exports == "object" && typeof exports == "object") {
82
82
  var __cp = (to, from, except, desc) => {
83
83
  if ((from && typeof from === "object") || typeof from === "function") {