@appsurify-testmap/rrweb-all 2.1.2-alpha.2 → 2.1.3-alpha.1

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,13 +11,13 @@
11
11
  }(this, () => {
12
12
  var exports = {};
13
13
  var module = { exports };
14
- "use strict";var Xl=Object.defineProperty,Jl=Object.defineProperties;var Kl=Object.getOwnPropertyDescriptors;var nr=Object.getOwnPropertySymbols;var bn=Object.prototype.hasOwnProperty,Sn=Object.prototype.propertyIsEnumerable;var wn=(i,e,t)=>e in i?Xl(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,T=(i,e)=>{for(var t in e||(e={}))bn.call(e,t)&&wn(i,t,e[t]);if(nr)for(var t of nr(e))Sn.call(e,t)&&wn(i,t,e[t]);return i},ae=(i,e)=>Jl(i,Kl(e));var nt=(i,e)=>{var t={};for(var r in i)bn.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&nr)for(var r of nr(i))e.indexOf(r)<0&&Sn.call(i,r)&&(t[r]=i[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Ql=Object.defineProperty,ql=(i,e,t)=>e in i?Ql(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,w=(i,e,t)=>ql(i,typeof e!="symbol"?e+"":e,t),Cn,eu=Object.defineProperty,tu=(i,e,t)=>e in i?eu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,En=(i,e,t)=>tu(i,typeof e!="symbol"?e+"":e,t),$=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))($||{});const xn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Mn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},or={},ru=()=>!!globalThis.Zone;function As(i){if(or[i])return or[i];const e=globalThis[i],t=e.prototype,r=i in xn?xn[i]:void 0,s=!!(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]"))})),o=i in Mn?Mn[i]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(s&&n&&!ru())return or[i]=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[i].prototype;return document.body.removeChild(a),u?or[i]=u:t}catch(a){return t}}const vi={};function Ze(i,e,t){var r;const s=`${i}.${String(t)}`;if(vi[s])return vi[s].call(e);const o=As(i),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(vi[s]=n,n.call(e)):e[t]}const wi={};function Uo(i,e,t){const r=`${i}.${String(t)}`;if(wi[r])return wi[r].bind(e);const o=As(i)[t];return typeof o!="function"?e[t]:(wi[r]=o,o.bind(e))}function iu(i){return Ze("Node",i,"childNodes")}function su(i){return Ze("Node",i,"parentNode")}function nu(i){return Ze("Node",i,"parentElement")}function ou(i){return Ze("Node",i,"textContent")}function au(i,e){return Uo("Node",i,"contains")(e)}function lu(i){return Uo("Node",i,"getRootNode")()}function uu(i){return!i||!("host"in i)?null:Ze("ShadowRoot",i,"host")}function cu(i){return i.styleSheets}function hu(i){return!i||!("shadowRoot"in i)?null:Ze("Element",i,"shadowRoot")}function fu(i,e){return Ze("Element",i,"querySelector")(e)}function du(i,e){return Ze("Element",i,"querySelectorAll")(e)}function pu(){return As("MutationObserver").constructor}function mu(i,e,t){try{if(!(e in i))return()=>{};const r=i[e],s=t(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),i[e]=s,()=>{i[e]=r}}catch(r){return()=>{}}}function gu(i){const e=i.tagName.toLowerCase(),t=i.id?`#${i.id}`:"",r=i.classList.length?"."+Array.from(i.classList).join("."):"";return`${e}${t}${r}`}function yu(i){var f;var e,t;const r=(f=(e=i.ownerDocument)==null?void 0:e.defaultView)!=null?f:window,s=i.getBoundingClientRect(),o=r.innerWidth||r.document.documentElement.clientWidth||0,n=r.innerHeight||r.document.documentElement.clientHeight||0,a=s.width>0&&s.height>0&&s.bottom>0&&s.right>0&&s.top<n&&s.left<o,l=(t=r.getComputedStyle)==null?void 0:t.call(r,i),c=!!l&&l.display!=="none"&&l.visibility!=="hidden"&&(parseFloat(l.opacity)||0)>0&&a;let h=0;if(c){const m=Math.max(0,Math.min(s.right,o)-Math.max(s.left,0)),p=Math.max(0,Math.min(s.bottom,n)-Math.max(s.top,0)),y=m*p,d=s.width*s.height;h=d>0?y/d:0}return{isVisible:c,ratio:h}}const le={childNodes:iu,parentNode:su,parentElement:nu,textContent:ou,contains:au,getRootNode:lu,host:uu,styleSheets:cu,shadowRoot:hu,querySelector:fu,querySelectorAll:du,mutationObserver:pu,patch:mu,describeNode:gu,getElementVisibility:yu};function Pt(i){return i.nodeType===i.ELEMENT_NODE}function Ft(i){const e=i&&"host"in i&&"mode"in i&&le.host(i)||null;return!!(e&&"shadowRoot"in e&&le.shadowRoot(e)===i)}function Bt(i){return Object.prototype.toString.call(i)==="[object ShadowRoot]"}function vu(i){return i.includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}function wu(i){const{cssText:e}=i;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(i.href)})`];return i.layerName===""?t.push("layer"):i.layerName&&t.push(`layer(${i.layerName})`),i.supportsText&&t.push(`supports(${i.supportsText})`),i.media.length&&t.push(i.media.mediaText),t.join(" ")+";"}function Fi(i){try{const e=i.rules||i.cssRules;if(!e)return null;let t=i.href;!t&&i.ownerNode&&i.ownerNode.ownerDocument&&(t=i.ownerNode.ownerDocument.location.href);const r=Array.from(e,s=>Vo(s,t)).join("");return vu(r)}catch(e){return null}}function Vo(i,e){if(Su(i)){let t;try{t=Fi(i.styleSheet)||wu(i)}catch(r){t=i.cssText}return i.styleSheet.href?Br(t,i.styleSheet.href):t}else{let t=i.cssText;return Cu(i)&&i.selectorText.includes(":")&&(t=bu(t)),e?Br(t,e):t}}function bu(i){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return i.replace(e,"$1\\$2")}function Su(i){return"styleSheet"in i}function Cu(i){return"selectorText"in i}class Rs{constructor(){En(this,"idNodeMap",new Map),En(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 s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(t,s)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Wo(){return new Rs}function Pr({element:i,maskInputOptions:e,tagName:t,type:r,value:s,maskInputFn:o}){let n=s||"";const a=r&&He(r);return(e[t.toLowerCase()]||a&&e[a])&&(o?n=o(n,i):n="*".repeat(n.length)),n}function He(i){return i.toLowerCase()}const In="__rrweb_original__";function Eu(i){const e=i.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<i.width;r+=t)for(let s=0;s<i.height;s+=t){const o=e.getImageData,n=In in o?o[In]:o;if(new Uint32Array(n.call(e,r,s,Math.min(t,i.width-r),Math.min(t,i.height-s)).data.buffer).some(l=>l!==0))return!1}return!0}function xu(i,e){return!i||!e||i.type!==e.type?!1:i.type===$.Document?i.compatMode===e.compatMode:i.type===$.DocumentType?i.name===e.name&&i.publicId===e.publicId&&i.systemId===e.systemId:i.type===$.Comment||i.type===$.Text||i.type===$.CDATA?i.textContent===e.textContent:i.type===$.Element?i.tagName===e.tagName&&JSON.stringify(i.attributes)===JSON.stringify(e.attributes)&&i.isSVG===e.isSVG&&i.needBlock===e.needBlock:!1}function Fr(i){const e=i.type;return i.hasAttribute("data-rr-is-password")?"password":e?He(e):null}function Os(i,e){var o;let t;try{t=new URL(i,e!=null?e:window.location.href)}catch(n){return null}const r=/\.([0-9a-z]+)(?:$)/i,s=t.pathname.match(r);return(o=s==null?void 0:s[1])!=null?o:null}function Mu(i){let e="";return i.indexOf("//")>-1?e=i.split("/").slice(0,3).join("/"):e=i.split("/")[0],e=e.split("?")[0],e}const Iu=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Nu=/^(?:[a-z+]+:)?\/\//i,Au=/^www\..*/i,Ru=/^(data:)([^,]*),(.*)/i;function Br(i,e){return(i||"").replace(Iu,(t,r,s,o,n,a)=>{const l=s||n||a,u=r||o||"";if(!l)return t;if(Nu.test(l)||Au.test(l))return`url(${u}${l}${u})`;if(Ru.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${Mu(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 ar(i,e=!1){return e?i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Ou(i,e,t=!1){const r=Array.from(e.childNodes),s=[];let o=0;if(r.length>1&&i&&typeof i=="string"){let n=ar(i,t);const a=n.length/i.length;for(let l=1;l<r.length;l++)if(r[l].textContent&&typeof r[l].textContent=="string"){const u=ar(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),m=n.split(f),p=-1;if(m.length===2)p=m[0].length;else if(m.length>2&&m[0]===""&&r[l-1].textContent!=="")p=n.indexOf(f,1);else if(m.length===1){if(f=f.substring(0,f.length-1),m=n.split(f),m.length<=1)return s.push(i),s;h=c+1}else h===u.length-1&&(p=n.indexOf(f));if(m.length>=2&&h>c){const y=r[l-1].textContent;if(y&&typeof y=="string"){const d=ar(y).length;p=n.indexOf(f,d)}p===-1&&(p=m[0].length)}if(p!==-1){let y=Math.floor(p/a);for(;y>0&&y<i.length;){if(o+=1,o>50*r.length)return s.push(i),s;const d=ar(i.substring(0,y),t);if(d.length===p){s.push(i.substring(0,y)),i=i.substring(y),n=n.substring(p);break}else d.length<p?y+=Math.max(1,Math.floor((p-d.length)/a)):y-=Math.max(1,Math.floor((d.length-p)*a))}break}}}}return s.push(i),s}function Tu(i,e){return Ou(i,e).join("/* rr_split */")}function Du(i,e){try{const t=document.querySelectorAll(i);return t.length===1&&t[0]===e}catch(t){return!1}}function ku(i){if(!(i instanceof Element))return null;if(i.id)return`#${CSS.escape(i.id)}`;const e=[],t=i.tagName.toLowerCase();i.classList.length&&e.push(...Array.from(i.classList).map(n=>`.${CSS.escape(n)}`)),Array.from(i.attributes).forEach(n=>{n.name.startsWith("data-")&&e.push(`[${n.name}="${CSS.escape(n.value)}"]`)});const r=`${t}${e.join("")}`;if(Du(r,i))return r;const s=[];let o=i;for(;o&&o.nodeType===Node.ELEMENT_NODE;){const n=o.parentElement,a=o.tagName.toLowerCase();let l="";if(n){const u=Array.from(n.children).filter(c=>c.tagName.toLowerCase()===a);u.length>1&&(l=`:nth-of-type(${u.indexOf(o)+1})`)}s.unshift(`${a}${l}`),o=n}return s.join(" > ")||null}function Bi(i){switch(i.nodeType){case Node.DOCUMENT_NODE:return"/";case Node.DOCUMENT_TYPE_NODE:return"/html/doctype";case Node.ELEMENT_NODE:{const e=i;if(e.id)return`//*[@id="${CSS.escape(e.id)}"]`;if(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=e.tagName.toLowerCase(),s=Array.from(t.children).filter(n=>n.tagName.toLowerCase()===r),o=s.length>1?`[${s.indexOf(e)+1}]`:"";return`${Bi(t)}/${r}${o}`}case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:case Node.COMMENT_NODE:{const e=i.parentNode;if(!e)return"";const t={[Node.TEXT_NODE]:"text()",[Node.CDATA_SECTION_NODE]:"text()",[Node.COMMENT_NODE]:"comment()"},r=Array.from(e.childNodes).filter(o=>o.nodeType===i.nodeType),s=r.length>1?`[${r.indexOf(i)}]`:"";return`${Bi(e)}/${t[i.nodeType]}${s}`}default:return""}}function _u(i){var e;const t=le.parentNode(i),r=t&&t;return!r||!Ts(r)?!1:((e=i.textContent)==null?void 0:e.trim())!==""}function Ts(i){return le.getElementVisibility(i).isVisible}const $u=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Lu=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],Pu=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Ds=new WeakSet,Fu=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,e,t){if(Fu.call(this,i,e,t),this instanceof Element){const r=i.toLowerCase();$u.includes(r)&&Ds.add(this)}};const Bu=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(i,e,t){Bu.call(this,i,e,t)};function Uu(i){return i instanceof Element&&Ds.has(i)}function Vu(i){if(i.nodeType===Node.ELEMENT_NODE){const e=i,t=e.tagName.toLowerCase();if(Lu.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",s=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return Uu(e)||r||s||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function Nn(){document.querySelectorAll("*").forEach(e=>{Pu.forEach(t=>{e.hasAttribute(t)&&Ds.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Nn():document.addEventListener("DOMContentLoaded",Nn)}catch(i){}let Wu=1;const zu=new RegExp("[^a-z0-9-_:]"),Wt=-2;function zo(){return Wu++}function Gu(i){if(i instanceof HTMLFormElement)return"form";const e=He(i.tagName);return zu.test(e)?"div":e}let ot,An;const ju=/^[^ \t\n\r\u000c]+/,Hu=/^[, \t\n\r\u000c]+/;function Yu(i,e){if(e.trim()==="")return e;let t=0;function r(o){let n;const a=o.exec(e.substring(t));return a?(n=a[0],t+=n.length,n):""}const s=[];for(;r(Hu),!(t>=e.length);){let o=r(ju);if(o.slice(-1)===",")o=ct(i,o.substring(0,o.length-1)),s.push(o);else{let n="";o=ct(i,o);let a=!1;for(;;){const l=e.charAt(t);if(l===""){s.push((o+n).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,s.push((o+n).trim());break}else l==="("&&(a=!0);n+=l,t+=1}}}return s.join(", ")}const Rn=new WeakMap;function ct(i,e){return!e||e.trim()===""?e:ks(i,e)}function Zu(i){return!!(i.tagName==="svg"||i.ownerSVGElement)}function ks(i,e){let t=Rn.get(i);if(t||(t=i.createElement("a"),Rn.set(i,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Go(i,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")?ct(i,r):t==="srcset"?Yu(i,r):t==="style"?Br(r,ks(i)):e==="object"&&t==="data"?ct(i,r):r)}function jo(i,e,t){return(i==="video"||i==="audio")&&e==="autoplay"}function Ui(i,e){return typeof e=="string"?i.includes(e):e.test(i)}function Xu(i,e,t){try{if(typeof e=="string"){if(i.classList.contains(e))return!0}else for(let r=i.classList.length;r--;){const s=i.classList[r];if(e.test(s))return!0}if(t)return i.matches(t)}catch(r){}return!1}function Ur(i,e,t){if(!i)return!1;if(i.nodeType!==i.ELEMENT_NODE)return t?Ur(le.parentNode(i),e,t):!1;for(let r=i.classList.length;r--;){const s=i.classList[r];if(e.test(s))return!0}return t?Ur(le.parentNode(i),e,t):!1}function Ho(i,e,t,r){let s;if(Pt(i)){if(s=i,!le.childNodes(s).length)return!1}else{if(le.parentElement(i)===null)return!1;s=le.parentElement(i)}try{if(typeof e=="string"){if(r){if(s.closest(`.${e}`))return!0}else if(s.classList.contains(e))return!0}else if(Ur(s,e,r))return!0;if(t){if(r){if(s.closest(t))return!0}else if(s.matches(t))return!0}}catch(o){}return!1}function Ju(i,e,t){const r=i.contentWindow;if(!r)return;let s=!1,o;try{o=r.document.readyState}catch(a){return}if(o!=="complete"){const a=setTimeout(()=>{s||(e(),s=!0)},t);i.addEventListener("load",()=>{clearTimeout(a),s=!0,e()});return}const n="about:blank";if(r.location.href!==n||i.src===n||i.src==="")return setTimeout(e,0),i.addEventListener("load",e);i.addEventListener("load",e)}function Ku(i,e,t){let r=!1,s;try{s=i.sheet}catch(n){return}if(s)return;const o=setTimeout(()=>{r||(e(),r=!0)},t);i.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function Qu(i,e){const{doc:t,mirror:r,blockClass:s,blockSelector:o,excludeAttribute:n,needsMask:a,inlineStylesheet:l,maskInputOptions:u={},maskTextFn:c,maskInputFn:h,dataURLOptions:f={},inlineImages:m,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:d=!1,cssCaptured:g=!1}=e,S=qu(t,r);switch(i.nodeType){case i.DOCUMENT_NODE:return i.compatMode!=="CSS1Compat"?{type:$.Document,childNodes:[],compatMode:i.compatMode}:{type:$.Document,childNodes:[]};case i.DOCUMENT_TYPE_NODE:return{type:$.DocumentType,name:i.name,publicId:i.publicId,systemId:i.systemId,rootId:S};case i.ELEMENT_NODE:return tc(i,{doc:t,blockClass:s,blockSelector:o,excludeAttribute:n,inlineStylesheet:l,maskInputOptions:u,maskInputFn:h,dataURLOptions:f,inlineImages:m,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:d,rootId:S});case i.TEXT_NODE:return ec(i,{doc:t,needsMask:a,maskTextFn:c,rootId:S,cssCaptured:g});case i.CDATA_SECTION_NODE:return{type:$.CDATA,textContent:"",rootId:S};case i.COMMENT_NODE:return{type:$.Comment,textContent:le.textContent(i)||"",rootId:S};default:return!1}}function qu(i,e){if(!e.hasNode(i))return;const t=e.getId(i);return t===1?void 0:t}function ec(i,e){const{needsMask:t,maskTextFn:r,rootId:s,cssCaptured:o}=e,n=le.parentNode(i),a=n&&n.tagName;let l="";const u=a==="STYLE"?!0:void 0,c=a==="SCRIPT"?!0:void 0;return c?l="SCRIPT_PLACEHOLDER":o||(l=le.textContent(i),u&&l&&(l=Br(l,ks(e.doc)))),!u&&!c&&l&&t&&(l=r?r(l,le.parentElement(i)):l.replace(/[\S]/g,"*")),{type:$.Text,textContent:l||"",rootId:s}}function tc(i,e){const{doc:t,blockClass:r,blockSelector:s,excludeAttribute:o,inlineStylesheet:n,maskInputOptions:a={},maskInputFn:l,dataURLOptions:u={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:m=!1,rootId:p}=e,y=Xu(i,r,s),d=Gu(i);let g={};const S=i.attributes.length;for(let v=0;v<S;v++){const C=i.attributes[v];Ui(C.name,o)||jo(d,C.name,C.value)||(g[C.name]=Go(t,d,He(C.name),C.value))}if(d==="link"&&n){const v=Array.from(t.styleSheets).find(x=>x.href===i.href);let C=null;v&&(C=Fi(v)),C&&(delete g.rel,delete g.href,g._cssText=C)}if(d==="style"&&i.sheet){let v=Fi(i.sheet);v&&(i.childNodes.length>1&&(v=Tu(v,i)),g._cssText=v)}if(d==="input"||d==="textarea"||d==="select"){const v=i.value,C=i.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&v?g.value=Pr({element:i,type:Fr(i),tagName:d,value:v,maskInputOptions:a,maskInputFn:l}):C&&(g.checked=C)}if(d==="option"&&(i.selected&&!a.select?g.selected=!0:delete g.selected),d==="dialog"&&i.open&&(g.rr_open_mode=i.matches("dialog:modal")?"modal":"non-modal"),d==="canvas"&&h){if(i.__context==="2d")Eu(i)||(g.rr_dataURL=i.toDataURL(u.type,u.quality));else if(!("__context"in i)){const v=i.toDataURL(u.type,u.quality),C=t.createElement("canvas");C.width=i.width,C.height=i.height;const x=C.toDataURL(u.type,u.quality);v!==x&&(g.rr_dataURL=v)}}if(d==="img"&&c){ot||(ot=t.createElement("canvas"),An=ot.getContext("2d"));const v=i,C=v.currentSrc||v.getAttribute("src")||"<unknown-src>",x=v.crossOrigin,R=()=>{v.removeEventListener("load",R);try{ot.width=v.naturalWidth,ot.height=v.naturalHeight,An.drawImage(v,0,0),g.rr_dataURL=ot.toDataURL(u.type,u.quality)}catch(E){if(v.crossOrigin!=="anonymous"){v.crossOrigin="anonymous",v.complete&&v.naturalWidth!==0?R():v.addEventListener("load",R);return}else console.warn(`Cannot inline img src=${C}! Error: ${E}`)}v.crossOrigin==="anonymous"&&(x?g.crossOrigin=x:v.removeAttribute("crossorigin"))};v.complete&&v.naturalWidth!==0?R():v.addEventListener("load",R)}if(d==="audio"||d==="video"){const v=g;v.rr_mediaState=i.paused?"paused":"played",v.rr_mediaCurrentTime=i.currentTime,v.rr_mediaPlaybackRate=i.playbackRate,v.rr_mediaMuted=i.muted,v.rr_mediaLoop=i.loop,v.rr_mediaVolume=i.volume}if(m||(i.scrollLeft&&(g.rr_scrollLeft=i.scrollLeft),i.scrollTop&&(g.rr_scrollTop=i.scrollTop)),y){const{width:v,height:C}=i.getBoundingClientRect();g={class:g.class,rr_width:`${v}px`,rr_height:`${C}px`}}d==="iframe"&&!f(g.src)&&(i.contentDocument||(g.rr_src=g.src),delete g.src);let b;try{customElements.get(d)&&(b=!0)}catch(v){}return{type:$.Element,tagName:d,attributes:g,childNodes:[],isSVG:Zu(i)||void 0,needBlock:y,rootId:p,isCustom:b}}function K(i){return i==null?"":i.toLowerCase()}function rc(i,e){if(e.comment&&i.type===$.Comment)return!0;if(i.type===$.Element){if(e.script&&(i.tagName==="script"||i.tagName==="link"&&(i.attributes.rel==="preload"&&i.attributes.as==="script"||i.attributes.rel==="modulepreload")||i.tagName==="link"&&i.attributes.rel==="prefetch"&&typeof i.attributes.href=="string"&&Os(i.attributes.href)==="js"))return!0;if(e.headFavicon&&(i.tagName==="link"&&i.attributes.rel==="shortcut icon"||i.tagName==="meta"&&(K(i.attributes.name).match(/^msapplication-tile(image|color)$/)||K(i.attributes.name)==="application-name"||K(i.attributes.rel)==="icon"||K(i.attributes.rel)==="apple-touch-icon"||K(i.attributes.rel)==="shortcut icon")))return!0;if(i.tagName==="meta"){if(e.headMetaDescKeywords&&K(i.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(K(i.attributes.property).match(/^(og|twitter|fb):/)||K(i.attributes.name).match(/^(og|twitter):/)||K(i.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(K(i.attributes.name)==="robots"||K(i.attributes.name)==="googlebot"||K(i.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&i.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(K(i.attributes.name)==="author"||K(i.attributes.name)==="generator"||K(i.attributes.name)==="framework"||K(i.attributes.name)==="publisher"||K(i.attributes.name)==="progid"||K(i.attributes.property).match(/^article:/)||K(i.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(K(i.attributes.name)==="google-site-verification"||K(i.attributes.name)==="yandex-verification"||K(i.attributes.name)==="csrf-token"||K(i.attributes.name)==="p:domain_verify"||K(i.attributes.name)==="verify-v1"||K(i.attributes.name)==="verification"||K(i.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function ht(i,e){const{doc:t,mirror:r,blockClass:s,blockSelector:o,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:h={},maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y={},inlineImages:d=!1,recordCanvas:g=!1,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:R=()=>!1,newlyAddedElement:E=!1,cssCaptured:k=!1}=e;let{needsMask:D}=e,{preserveWhiteSpace:j=!0}=e;D||(D=Ho(i,n,a,D===void 0));const P=Qu(i,{doc:t,mirror:r,blockClass:s,blockSelector:o,excludeAttribute:l,needsMask:D,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,dataURLOptions:y,inlineImages:d,recordCanvas:g,keepIframeSrcFn:R,newlyAddedElement:E,cssCaptured:k});if(!P)return console.warn(i,"not serialized"),null;let z;r.hasNode(i)?z=r.getId(i):rc(P,p)||!j&&P.type===$.Text&&!P.textContent.replace(/^\s+|\s+$/gm,"").length?z=Wt:z=zo();const N=Object.assign(P,{id:z});if(Pt(i)||i.nodeType===Node.TEXT_NODE){if(N.xpath=Bi(i),Pt(i)){const A=ku(i);A&&(N.selector=A)}i.nodeType===Node.TEXT_NODE&&(N.isVisible=_u(i)),i.nodeType===Node.ELEMENT_NODE&&(N.isVisible=Ts(i),N.isInteractive=Vu(i))}if(r.add(i,N),z===Wt)return null;S&&S(i);let G=!u;if(N.type===$.Element){G=G&&!N.needBlock,delete N.needBlock;const A=le.shadowRoot(i);A&&Bt(A)&&(N.isShadowHost=!0)}if((N.type===$.Document||N.type===$.Element)&&G){p.headWhitespace&&N.type===$.Element&&N.tagName==="head"&&(j=!1);const A={doc:t,mirror:r,blockClass:s,blockSelector:o,needsMask:D,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:u,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:g,preserveWhiteSpace:j,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:R,cssCaptured:!1};if(!(N.type===$.Element&&N.tagName==="textarea"&&N.attributes.value!==void 0)){N.type===$.Element&&N.attributes._cssText!==void 0&&typeof N.attributes._cssText=="string"&&(A.cssCaptured=!0);for(const se of Array.from(le.childNodes(i))){const J=ht(se,A);J&&N.childNodes.push(J)}}let Z=null;if(Pt(i)&&(Z=le.shadowRoot(i)))for(const se of Array.from(le.childNodes(Z))){const J=ht(se,A);J&&(Bt(Z)&&(J.isShadow=!0),N.childNodes.push(J))}}const F=le.parentNode(i);return F&&Ft(F)&&Bt(F)&&(N.isShadow=!0),N.type===$.Element&&N.tagName==="iframe"&&Ju(i,()=>{const A=i.contentDocument;if(A&&b){const Z=ht(A,{doc:A,mirror:r,blockClass:s,blockSelector:o,needsMask:D,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:g,preserveWhiteSpace:j,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:R});Z&&b(i,Z)}},v),N.type===$.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&Os(N.attributes.href)==="css")&&Ku(i,()=>{if(C){const A=ht(i,{doc:t,mirror:r,blockClass:s,blockSelector:o,needsMask:D,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:g,preserveWhiteSpace:j,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:R});A&&C(i,A)}},x),N}function ic(i,e){const{mirror:t=new Rs,blockClass:r="rr-block",blockSelector:s=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,excludeAttribute:a=/.^/,inlineStylesheet:l=!0,inlineImages:u=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:f,maskInputFn:m,slimDOM:p=!1,dataURLOptions:y,preserveWhiteSpace:d,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:x=()=>!1}=e||{};return ht(i,{doc:i,mirror:t,blockClass:r,blockSelector:s,maskTextClass:o,maskTextSelector:n,excludeAttribute:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:h===!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}:h===!1?{password:!0}:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:p==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:p===!1?{}:p,dataURLOptions:y,inlineImages:u,recordCanvas:c,preserveWhiteSpace:d,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:x,newlyAddedElement:!1})}const sc=/(max|min)-device-(width|height)/,On=new RegExp(sc.source,"g"),nc={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(i){i.params.match(On)&&(i.params=i.params.replace(On,"$1-$2"))}}}},oc={postcssPlugin:"postcss-hover-classes",prepare:function(){const i=[];return{Rule:function(e){i.indexOf(e)===-1&&(i.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
15
- `+t.replace(/:hover/g,".\\:hover"))}))}}}};function ac(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function lc(i){if(i.__esModule)return i;var e=i.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(i).forEach(function(r){var s=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return i[r]}})}),t}var _s={exports:{}},Q=String,Yo=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}};_s.exports=Yo();_s.exports.createColors=Yo;var uc=_s.exports;const cc={},hc=Object.freeze(Object.defineProperty({__proto__:null,default:cc},Symbol.toStringTag,{value:"Module"})),Ie=lc(hc);let Tn=uc,Dn=Ie,Vi=class Zo extends Error{constructor(e,t,r,s,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),n&&(this.plugin=n),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,Zo)}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=Tn.isColorSupported),Dn&&e&&(t=Dn(t));let r=t.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=Tn.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(s,o).map((u,c)=>{let h=s+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let m=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
14
+ "use strict";var Xl=Object.defineProperty,Jl=Object.defineProperties;var Kl=Object.getOwnPropertyDescriptors;var nr=Object.getOwnPropertySymbols;var bn=Object.prototype.hasOwnProperty,Sn=Object.prototype.propertyIsEnumerable;var wn=(i,e,t)=>e in i?Xl(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,T=(i,e)=>{for(var t in e||(e={}))bn.call(e,t)&&wn(i,t,e[t]);if(nr)for(var t of nr(e))Sn.call(e,t)&&wn(i,t,e[t]);return i},ae=(i,e)=>Jl(i,Kl(e));var nt=(i,e)=>{var t={};for(var r in i)bn.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&nr)for(var r of nr(i))e.indexOf(r)<0&&Sn.call(i,r)&&(t[r]=i[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ql=Object.defineProperty,Ql=(i,e,t)=>e in i?ql(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,w=(i,e,t)=>Ql(i,typeof e!="symbol"?e+"":e,t),Cn,eu=Object.defineProperty,tu=(i,e,t)=>e in i?eu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,En=(i,e,t)=>tu(i,typeof e!="symbol"?e+"":e,t),$=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))($||{});const Mn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},xn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},or={},ru=()=>!!globalThis.Zone;function As(i){if(or[i])return or[i];const e=globalThis[i],t=e.prototype,r=i in Mn?Mn[i]:void 0,s=!!(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]"))})),o=i in xn?xn[i]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(s&&n&&!ru())return or[i]=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[i].prototype;return document.body.removeChild(a),u?or[i]=u:t}catch(a){return t}}const vi={};function Ze(i,e,t){var r;const s=`${i}.${String(t)}`;if(vi[s])return vi[s].call(e);const o=As(i),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(vi[s]=n,n.call(e)):e[t]}const wi={};function Uo(i,e,t){const r=`${i}.${String(t)}`;if(wi[r])return wi[r].bind(e);const o=As(i)[t];return typeof o!="function"?e[t]:(wi[r]=o,o.bind(e))}function iu(i){return Ze("Node",i,"childNodes")}function su(i){return Ze("Node",i,"parentNode")}function nu(i){return Ze("Node",i,"parentElement")}function ou(i){return Ze("Node",i,"textContent")}function au(i,e){return Uo("Node",i,"contains")(e)}function lu(i){return Uo("Node",i,"getRootNode")()}function uu(i){return!i||!("host"in i)?null:Ze("ShadowRoot",i,"host")}function cu(i){return i.styleSheets}function hu(i){return!i||!("shadowRoot"in i)?null:Ze("Element",i,"shadowRoot")}function fu(i,e){return Ze("Element",i,"querySelector")(e)}function du(i,e){return Ze("Element",i,"querySelectorAll")(e)}function pu(){return As("MutationObserver").constructor}function mu(i,e,t){try{if(!(e in i))return()=>{};const r=i[e],s=t(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),i[e]=s,()=>{i[e]=r}}catch(r){return()=>{}}}function gu(i){const e=i.tagName.toLowerCase(),t=i.id?`#${i.id}`:"",r=i.classList.length?"."+Array.from(i.classList).join("."):"";return`${e}${t}${r}`}function yu(i){var f;var e,t;const r=(f=(e=i.ownerDocument)==null?void 0:e.defaultView)!=null?f:window,s=i.getBoundingClientRect(),o=r.innerWidth||r.document.documentElement.clientWidth||0,n=r.innerHeight||r.document.documentElement.clientHeight||0,a=s.width>0&&s.height>0&&s.bottom>0&&s.right>0&&s.top<n&&s.left<o,l=(t=r.getComputedStyle)==null?void 0:t.call(r,i),c=!!l&&l.display!=="none"&&l.visibility!=="hidden"&&(parseFloat(l.opacity)||0)>0&&a;let h=0;if(c){const m=Math.max(0,Math.min(s.right,o)-Math.max(s.left,0)),p=Math.max(0,Math.min(s.bottom,n)-Math.max(s.top,0)),y=m*p,d=s.width*s.height;h=d>0?y/d:0}return{isVisible:c,ratio:h}}const le={childNodes:iu,parentNode:su,parentElement:nu,textContent:ou,contains:au,getRootNode:lu,host:uu,styleSheets:cu,shadowRoot:hu,querySelector:fu,querySelectorAll:du,mutationObserver:pu,patch:mu,describeNode:gu,getElementVisibility:yu};function Pt(i){return i.nodeType===i.ELEMENT_NODE}function Ft(i){const e=i&&"host"in i&&"mode"in i&&le.host(i)||null;return!!(e&&"shadowRoot"in e&&le.shadowRoot(e)===i)}function Bt(i){return Object.prototype.toString.call(i)==="[object ShadowRoot]"}function vu(i){return i.includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}function wu(i){const{cssText:e}=i;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(i.href)})`];return i.layerName===""?t.push("layer"):i.layerName&&t.push(`layer(${i.layerName})`),i.supportsText&&t.push(`supports(${i.supportsText})`),i.media.length&&t.push(i.media.mediaText),t.join(" ")+";"}function Fi(i){try{const e=i.rules||i.cssRules;if(!e)return null;let t=i.href;!t&&i.ownerNode&&i.ownerNode.ownerDocument&&(t=i.ownerNode.ownerDocument.location.href);const r=Array.from(e,s=>Vo(s,t)).join("");return vu(r)}catch(e){return null}}function Vo(i,e){if(Su(i)){let t;try{t=Fi(i.styleSheet)||wu(i)}catch(r){t=i.cssText}return i.styleSheet.href?Br(t,i.styleSheet.href):t}else{let t=i.cssText;return Cu(i)&&i.selectorText.includes(":")&&(t=bu(t)),e?Br(t,e):t}}function bu(i){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return i.replace(e,"$1\\$2")}function Su(i){return"styleSheet"in i}function Cu(i){return"selectorText"in i}class Rs{constructor(){En(this,"idNodeMap",new Map),En(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 s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(t,s)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Wo(){return new Rs}function Pr({element:i,maskInputOptions:e,tagName:t,type:r,value:s,maskInputFn:o}){let n=s||"";const a=r&&He(r);return(e[t.toLowerCase()]||a&&e[a])&&(o?n=o(n,i):n="*".repeat(n.length)),n}function He(i){return i.toLowerCase()}const In="__rrweb_original__";function Eu(i){const e=i.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<i.width;r+=t)for(let s=0;s<i.height;s+=t){const o=e.getImageData,n=In in o?o[In]:o;if(new Uint32Array(n.call(e,r,s,Math.min(t,i.width-r),Math.min(t,i.height-s)).data.buffer).some(l=>l!==0))return!1}return!0}function Mu(i,e){return!i||!e||i.type!==e.type?!1:i.type===$.Document?i.compatMode===e.compatMode:i.type===$.DocumentType?i.name===e.name&&i.publicId===e.publicId&&i.systemId===e.systemId:i.type===$.Comment||i.type===$.Text||i.type===$.CDATA?i.textContent===e.textContent:i.type===$.Element?i.tagName===e.tagName&&JSON.stringify(i.attributes)===JSON.stringify(e.attributes)&&i.isSVG===e.isSVG&&i.needBlock===e.needBlock:!1}function Fr(i){const e=i.type;return i.hasAttribute("data-rr-is-password")?"password":e?He(e):null}function Os(i,e){var o;let t;try{t=new URL(i,e!=null?e:window.location.href)}catch(n){return null}const r=/\.([0-9a-z]+)(?:$)/i,s=t.pathname.match(r);return(o=s==null?void 0:s[1])!=null?o:null}function xu(i){let e="";return i.indexOf("//")>-1?e=i.split("/").slice(0,3).join("/"):e=i.split("/")[0],e=e.split("?")[0],e}const Iu=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Nu=/^(?:[a-z+]+:)?\/\//i,Au=/^www\..*/i,Ru=/^(data:)([^,]*),(.*)/i;function Br(i,e){return(i||"").replace(Iu,(t,r,s,o,n,a)=>{const l=s||n||a,u=r||o||"";if(!l)return t;if(Nu.test(l)||Au.test(l))return`url(${u}${l}${u})`;if(Ru.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${xu(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 ar(i,e=!1){return e?i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Ou(i,e,t=!1){const r=Array.from(e.childNodes),s=[];let o=0;if(r.length>1&&i&&typeof i=="string"){let n=ar(i,t);const a=n.length/i.length;for(let l=1;l<r.length;l++)if(r[l].textContent&&typeof r[l].textContent=="string"){const u=ar(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),m=n.split(f),p=-1;if(m.length===2)p=m[0].length;else if(m.length>2&&m[0]===""&&r[l-1].textContent!=="")p=n.indexOf(f,1);else if(m.length===1){if(f=f.substring(0,f.length-1),m=n.split(f),m.length<=1)return s.push(i),s;h=c+1}else h===u.length-1&&(p=n.indexOf(f));if(m.length>=2&&h>c){const y=r[l-1].textContent;if(y&&typeof y=="string"){const d=ar(y).length;p=n.indexOf(f,d)}p===-1&&(p=m[0].length)}if(p!==-1){let y=Math.floor(p/a);for(;y>0&&y<i.length;){if(o+=1,o>50*r.length)return s.push(i),s;const d=ar(i.substring(0,y),t);if(d.length===p){s.push(i.substring(0,y)),i=i.substring(y),n=n.substring(p);break}else d.length<p?y+=Math.max(1,Math.floor((p-d.length)/a)):y-=Math.max(1,Math.floor((d.length-p)*a))}break}}}}return s.push(i),s}function Tu(i,e){return Ou(i,e).join("/* rr_split */")}function Du(i,e){try{const t=document.querySelectorAll(i);return t.length===1&&t[0]===e}catch(t){return!1}}function ku(i){if(!(i instanceof Element))return null;if(i.id)return`#${CSS.escape(i.id)}`;const e=[],t=i.tagName.toLowerCase();i.classList.length&&e.push(...Array.from(i.classList).map(n=>`.${CSS.escape(n)}`)),Array.from(i.attributes).forEach(n=>{n.name.startsWith("data-")&&e.push(`[${n.name}="${CSS.escape(n.value)}"]`)});const r=`${t}${e.join("")}`;if(Du(r,i))return r;const s=[];let o=i;for(;o&&o.nodeType===Node.ELEMENT_NODE;){const n=o.parentElement,a=o.tagName.toLowerCase();let l="";if(n){const u=Array.from(n.children).filter(c=>c.tagName.toLowerCase()===a);u.length>1&&(l=`:nth-of-type(${u.indexOf(o)+1})`)}s.unshift(`${a}${l}`),o=n}return s.join(" > ")||null}function Bi(i){switch(i.nodeType){case Node.DOCUMENT_NODE:return"/";case Node.DOCUMENT_TYPE_NODE:return"/html/doctype";case Node.ELEMENT_NODE:{const e=i;if(e.id)return`//*[@id="${CSS.escape(e.id)}"]`;if(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=e.tagName.toLowerCase(),s=Array.from(t.children).filter(n=>n.tagName.toLowerCase()===r),o=s.length>1?`[${s.indexOf(e)+1}]`:"";return`${Bi(t)}/${r}${o}`}case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:case Node.COMMENT_NODE:{const e=i.parentNode;if(!e)return"";const t={[Node.TEXT_NODE]:"text()",[Node.CDATA_SECTION_NODE]:"text()",[Node.COMMENT_NODE]:"comment()"},r=Array.from(e.childNodes).filter(o=>o.nodeType===i.nodeType),s=r.length>1?`[${r.indexOf(i)}]`:"";return`${Bi(e)}/${t[i.nodeType]}${s}`}default:return""}}function _u(i){var e;const t=le.parentNode(i),r=t&&t;return!r||!Ts(r)?!1:((e=i.textContent)==null?void 0:e.trim())!==""}function Ts(i){return le.getElementVisibility(i).isVisible}const $u=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Lu=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],Pu=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Ds=new WeakSet,Fu=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,e,t){if(Fu.call(this,i,e,t),this instanceof Element){const r=i.toLowerCase();$u.includes(r)&&Ds.add(this)}};const Bu=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(i,e,t){Bu.call(this,i,e,t)};function Uu(i){return i instanceof Element&&Ds.has(i)}function Vu(i){if(i.nodeType===Node.ELEMENT_NODE){const e=i,t=e.tagName.toLowerCase();if(Lu.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",s=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return Uu(e)||r||s||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function Nn(){document.querySelectorAll("*").forEach(e=>{Pu.forEach(t=>{e.hasAttribute(t)&&Ds.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Nn():document.addEventListener("DOMContentLoaded",Nn)}catch(i){}let Wu=1;const zu=new RegExp("[^a-z0-9-_:]"),Wt=-2;function zo(){return Wu++}function Gu(i){if(i instanceof HTMLFormElement)return"form";const e=He(i.tagName);return zu.test(e)?"div":e}let ot,An;const ju=/^[^ \t\n\r\u000c]+/,Hu=/^[, \t\n\r\u000c]+/;function Yu(i,e){if(e.trim()==="")return e;let t=0;function r(o){let n;const a=o.exec(e.substring(t));return a?(n=a[0],t+=n.length,n):""}const s=[];for(;r(Hu),!(t>=e.length);){let o=r(ju);if(o.slice(-1)===",")o=ct(i,o.substring(0,o.length-1)),s.push(o);else{let n="";o=ct(i,o);let a=!1;for(;;){const l=e.charAt(t);if(l===""){s.push((o+n).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,s.push((o+n).trim());break}else l==="("&&(a=!0);n+=l,t+=1}}}return s.join(", ")}const Rn=new WeakMap;function ct(i,e){return!e||e.trim()===""?e:ks(i,e)}function Zu(i){return!!(i.tagName==="svg"||i.ownerSVGElement)}function ks(i,e){let t=Rn.get(i);if(t||(t=i.createElement("a"),Rn.set(i,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Go(i,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")?ct(i,r):t==="srcset"?Yu(i,r):t==="style"?Br(r,ks(i)):e==="object"&&t==="data"?ct(i,r):r)}function jo(i,e,t){return(i==="video"||i==="audio")&&e==="autoplay"}function Ui(i,e){return typeof e=="string"?i.includes(e):e.test(i)}function Xu(i,e,t){try{if(typeof e=="string"){if(i.classList.contains(e))return!0}else for(let r=i.classList.length;r--;){const s=i.classList[r];if(e.test(s))return!0}if(t)return i.matches(t)}catch(r){}return!1}function Ur(i,e,t){if(!i)return!1;if(i.nodeType!==i.ELEMENT_NODE)return t?Ur(le.parentNode(i),e,t):!1;for(let r=i.classList.length;r--;){const s=i.classList[r];if(e.test(s))return!0}return t?Ur(le.parentNode(i),e,t):!1}function Ho(i,e,t,r){let s;if(Pt(i)){if(s=i,!le.childNodes(s).length)return!1}else{if(le.parentElement(i)===null)return!1;s=le.parentElement(i)}try{if(typeof e=="string"){if(r){if(s.closest(`.${e}`))return!0}else if(s.classList.contains(e))return!0}else if(Ur(s,e,r))return!0;if(t){if(r){if(s.closest(t))return!0}else if(s.matches(t))return!0}}catch(o){}return!1}function Ju(i,e,t){const r=i.contentWindow;if(!r)return;let s=!1,o;try{o=r.document.readyState}catch(a){return}if(o!=="complete"){const a=setTimeout(()=>{s||(e(),s=!0)},t);i.addEventListener("load",()=>{clearTimeout(a),s=!0,e()});return}const n="about:blank";if(r.location.href!==n||i.src===n||i.src==="")return setTimeout(e,0),i.addEventListener("load",e);i.addEventListener("load",e)}function Ku(i,e,t){let r=!1,s;try{s=i.sheet}catch(n){return}if(s)return;const o=setTimeout(()=>{r||(e(),r=!0)},t);i.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function qu(i,e){const{doc:t,mirror:r,blockClass:s,blockSelector:o,excludeAttribute:n,needsMask:a,inlineStylesheet:l,maskInputOptions:u={},maskTextFn:c,maskInputFn:h,dataURLOptions:f={},inlineImages:m,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:d=!1,cssCaptured:g=!1}=e,S=Qu(t,r);switch(i.nodeType){case i.DOCUMENT_NODE:return i.compatMode!=="CSS1Compat"?{type:$.Document,childNodes:[],compatMode:i.compatMode}:{type:$.Document,childNodes:[]};case i.DOCUMENT_TYPE_NODE:return{type:$.DocumentType,name:i.name,publicId:i.publicId,systemId:i.systemId,rootId:S};case i.ELEMENT_NODE:return tc(i,{doc:t,blockClass:s,blockSelector:o,excludeAttribute:n,inlineStylesheet:l,maskInputOptions:u,maskInputFn:h,dataURLOptions:f,inlineImages:m,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:d,rootId:S});case i.TEXT_NODE:return ec(i,{doc:t,needsMask:a,maskTextFn:c,rootId:S,cssCaptured:g});case i.CDATA_SECTION_NODE:return{type:$.CDATA,textContent:"",rootId:S};case i.COMMENT_NODE:return{type:$.Comment,textContent:le.textContent(i)||"",rootId:S};default:return!1}}function Qu(i,e){if(!e.hasNode(i))return;const t=e.getId(i);return t===1?void 0:t}function ec(i,e){const{needsMask:t,maskTextFn:r,rootId:s,cssCaptured:o}=e,n=le.parentNode(i),a=n&&n.tagName;let l="";const u=a==="STYLE"?!0:void 0,c=a==="SCRIPT"?!0:void 0;return c?l="SCRIPT_PLACEHOLDER":o||(l=le.textContent(i),u&&l&&(l=Br(l,ks(e.doc)))),!u&&!c&&l&&t&&(l=r?r(l,le.parentElement(i)):l.replace(/[\S]/g,"*")),{type:$.Text,textContent:l||"",rootId:s}}function tc(i,e){const{doc:t,blockClass:r,blockSelector:s,excludeAttribute:o,inlineStylesheet:n,maskInputOptions:a={},maskInputFn:l,dataURLOptions:u={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:m=!1,rootId:p}=e,y=Xu(i,r,s),d=Gu(i);let g={};const S=i.attributes.length;for(let v=0;v<S;v++){const C=i.attributes[v];Ui(C.name,o)||jo(d,C.name,C.value)||(g[C.name]=Go(t,d,He(C.name),C.value))}if(d==="link"&&n){const v=Array.from(t.styleSheets).find(M=>M.href===i.href);let C=null;v&&(C=Fi(v)),C&&(delete g.rel,delete g.href,g._cssText=C)}if(d==="style"&&i.sheet){let v=Fi(i.sheet);v&&(i.childNodes.length>1&&(v=Tu(v,i)),g._cssText=v)}if(d==="input"||d==="textarea"||d==="select"){const v=i.value,C=i.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&v?g.value=Pr({element:i,type:Fr(i),tagName:d,value:v,maskInputOptions:a,maskInputFn:l}):C&&(g.checked=C)}if(d==="option"&&(i.selected&&!a.select?g.selected=!0:delete g.selected),d==="dialog"&&i.open&&(g.rr_open_mode=i.matches("dialog:modal")?"modal":"non-modal"),d==="canvas"&&h){if(i.__context==="2d")Eu(i)||(g.rr_dataURL=i.toDataURL(u.type,u.quality));else if(!("__context"in i)){const v=i.toDataURL(u.type,u.quality),C=t.createElement("canvas");C.width=i.width,C.height=i.height;const M=C.toDataURL(u.type,u.quality);v!==M&&(g.rr_dataURL=v)}}if(d==="img"&&c){ot||(ot=t.createElement("canvas"),An=ot.getContext("2d"));const v=i,C=v.currentSrc||v.getAttribute("src")||"<unknown-src>",M=v.crossOrigin,R=()=>{v.removeEventListener("load",R);try{ot.width=v.naturalWidth,ot.height=v.naturalHeight,An.drawImage(v,0,0),g.rr_dataURL=ot.toDataURL(u.type,u.quality)}catch(E){if(v.crossOrigin!=="anonymous"){v.crossOrigin="anonymous",v.complete&&v.naturalWidth!==0?R():v.addEventListener("load",R);return}else console.warn(`Cannot inline img src=${C}! Error: ${E}`)}v.crossOrigin==="anonymous"&&(M?g.crossOrigin=M:v.removeAttribute("crossorigin"))};v.complete&&v.naturalWidth!==0?R():v.addEventListener("load",R)}if(d==="audio"||d==="video"){const v=g;v.rr_mediaState=i.paused?"paused":"played",v.rr_mediaCurrentTime=i.currentTime,v.rr_mediaPlaybackRate=i.playbackRate,v.rr_mediaMuted=i.muted,v.rr_mediaLoop=i.loop,v.rr_mediaVolume=i.volume}if(m||(i.scrollLeft&&(g.rr_scrollLeft=i.scrollLeft),i.scrollTop&&(g.rr_scrollTop=i.scrollTop)),y){const{width:v,height:C}=i.getBoundingClientRect();g={class:g.class,rr_width:`${v}px`,rr_height:`${C}px`}}d==="iframe"&&!f(g.src)&&(i.contentDocument||(g.rr_src=g.src),delete g.src);let b;try{customElements.get(d)&&(b=!0)}catch(v){}return{type:$.Element,tagName:d,attributes:g,childNodes:[],isSVG:Zu(i)||void 0,needBlock:y,rootId:p,isCustom:b}}function K(i){return i==null?"":i.toLowerCase()}function rc(i,e){if(e.comment&&i.type===$.Comment)return!0;if(i.type===$.Element){if(e.script&&(i.tagName==="script"||i.tagName==="link"&&(i.attributes.rel==="preload"&&i.attributes.as==="script"||i.attributes.rel==="modulepreload")||i.tagName==="link"&&i.attributes.rel==="prefetch"&&typeof i.attributes.href=="string"&&Os(i.attributes.href)==="js"))return!0;if(e.headFavicon&&(i.tagName==="link"&&i.attributes.rel==="shortcut icon"||i.tagName==="meta"&&(K(i.attributes.name).match(/^msapplication-tile(image|color)$/)||K(i.attributes.name)==="application-name"||K(i.attributes.rel)==="icon"||K(i.attributes.rel)==="apple-touch-icon"||K(i.attributes.rel)==="shortcut icon")))return!0;if(i.tagName==="meta"){if(e.headMetaDescKeywords&&K(i.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(K(i.attributes.property).match(/^(og|twitter|fb):/)||K(i.attributes.name).match(/^(og|twitter):/)||K(i.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(K(i.attributes.name)==="robots"||K(i.attributes.name)==="googlebot"||K(i.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&i.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(K(i.attributes.name)==="author"||K(i.attributes.name)==="generator"||K(i.attributes.name)==="framework"||K(i.attributes.name)==="publisher"||K(i.attributes.name)==="progid"||K(i.attributes.property).match(/^article:/)||K(i.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(K(i.attributes.name)==="google-site-verification"||K(i.attributes.name)==="yandex-verification"||K(i.attributes.name)==="csrf-token"||K(i.attributes.name)==="p:domain_verify"||K(i.attributes.name)==="verify-v1"||K(i.attributes.name)==="verification"||K(i.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function ht(i,e){const{doc:t,mirror:r,blockClass:s,blockSelector:o,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:h={},maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y={},inlineImages:d=!1,recordCanvas:g=!1,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:R=()=>!1,newlyAddedElement:E=!1,cssCaptured:k=!1}=e;let{needsMask:D}=e,{preserveWhiteSpace:j=!0}=e;D||(D=Ho(i,n,a,D===void 0));const P=qu(i,{doc:t,mirror:r,blockClass:s,blockSelector:o,excludeAttribute:l,needsMask:D,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,dataURLOptions:y,inlineImages:d,recordCanvas:g,keepIframeSrcFn:R,newlyAddedElement:E,cssCaptured:k});if(!P)return console.warn(i,"not serialized"),null;let z;r.hasNode(i)?z=r.getId(i):rc(P,p)||!j&&P.type===$.Text&&!P.textContent.replace(/^\s+|\s+$/gm,"").length?z=Wt:z=zo();const N=Object.assign(P,{id:z});if(Pt(i)||i.nodeType===Node.TEXT_NODE){if(N.xpath=Bi(i),Pt(i)){const A=ku(i);A&&(N.selector=A)}i.nodeType===Node.TEXT_NODE&&(N.isVisible=_u(i)),i.nodeType===Node.ELEMENT_NODE&&(N.isVisible=Ts(i),N.isInteractive=Vu(i))}if(r.add(i,N),z===Wt)return null;S&&S(i);let G=!u;if(N.type===$.Element){G=G&&!N.needBlock,delete N.needBlock;const A=le.shadowRoot(i);A&&Bt(A)&&(N.isShadowHost=!0)}if((N.type===$.Document||N.type===$.Element)&&G){p.headWhitespace&&N.type===$.Element&&N.tagName==="head"&&(j=!1);const A={doc:t,mirror:r,blockClass:s,blockSelector:o,needsMask:D,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:u,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:g,preserveWhiteSpace:j,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:C,stylesheetLoadTimeout:M,keepIframeSrcFn:R,cssCaptured:!1};if(!(N.type===$.Element&&N.tagName==="textarea"&&N.attributes.value!==void 0)){N.type===$.Element&&N.attributes._cssText!==void 0&&typeof N.attributes._cssText=="string"&&(A.cssCaptured=!0);for(const se of Array.from(le.childNodes(i))){const J=ht(se,A);J&&N.childNodes.push(J)}}let Z=null;if(Pt(i)&&(Z=le.shadowRoot(i)))for(const se of Array.from(le.childNodes(Z))){const J=ht(se,A);J&&(Bt(Z)&&(J.isShadow=!0),N.childNodes.push(J))}}const F=le.parentNode(i);return F&&Ft(F)&&Bt(F)&&(N.isShadow=!0),N.type===$.Element&&N.tagName==="iframe"&&Ju(i,()=>{const A=i.contentDocument;if(A&&b){const Z=ht(A,{doc:A,mirror:r,blockClass:s,blockSelector:o,needsMask:D,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:g,preserveWhiteSpace:j,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:C,stylesheetLoadTimeout:M,keepIframeSrcFn:R});Z&&b(i,Z)}},v),N.type===$.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&Os(N.attributes.href)==="css")&&Ku(i,()=>{if(C){const A=ht(i,{doc:t,mirror:r,blockClass:s,blockSelector:o,needsMask:D,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:g,preserveWhiteSpace:j,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:C,stylesheetLoadTimeout:M,keepIframeSrcFn:R});A&&C(i,A)}},M),N}function ic(i,e){const{mirror:t=new Rs,blockClass:r="rr-block",blockSelector:s=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,excludeAttribute:a=/.^/,inlineStylesheet:l=!0,inlineImages:u=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:f,maskInputFn:m,slimDOM:p=!1,dataURLOptions:y,preserveWhiteSpace:d,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:M=()=>!1}=e||{};return ht(i,{doc:i,mirror:t,blockClass:r,blockSelector:s,maskTextClass:o,maskTextSelector:n,excludeAttribute:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:h===!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}:h===!1?{password:!0}:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:p==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:p===!1?{}:p,dataURLOptions:y,inlineImages:u,recordCanvas:c,preserveWhiteSpace:d,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:M,newlyAddedElement:!1})}const sc=/(max|min)-device-(width|height)/,On=new RegExp(sc.source,"g"),nc={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(i){i.params.match(On)&&(i.params=i.params.replace(On,"$1-$2"))}}}},oc={postcssPlugin:"postcss-hover-classes",prepare:function(){const i=[];return{Rule:function(e){i.indexOf(e)===-1&&(i.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
15
+ `+t.replace(/:hover/g,".\\:hover"))}))}}}};function ac(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function lc(i){if(i.__esModule)return i;var e=i.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(i).forEach(function(r){var s=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return i[r]}})}),t}var _s={exports:{}},q=String,Yo=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}};_s.exports=Yo();_s.exports.createColors=Yo;var uc=_s.exports;const cc={},hc=Object.freeze(Object.defineProperty({__proto__:null,default:cc},Symbol.toStringTag,{value:"Module"})),Ie=lc(hc);let Tn=uc,Dn=Ie,Vi=class Zo extends Error{constructor(e,t,r,s,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),n&&(this.plugin=n),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,Zo)}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=Tn.isColorSupported),Dn&&e&&(t=Dn(t));let r=t.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=Tn.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(s,o).map((u,c)=>{let h=s+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let m=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
16
16
  `+m+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 $s=Vi;Vi.default=Vi;var qt={};qt.isClean=Symbol("isClean");qt.my=Symbol("my");const kn={after:`
20
+ `),this.name+": "+this.message+e}};var $s=Vi;Vi.default=Vi;var Qt={};Qt.isClean=Symbol("isClean");Qt.my=Symbol("my");const kn={after:`
21
21
  `,beforeClose:`
22
22
  `,beforeComment:`
23
23
  `,beforeDecl:`
@@ -28,45 +28,45 @@ var module = { exports };
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(s=>{if(typeof s.raws.before!="undefined")return r=s.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 s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before!="undefined"){let o=r.raws.before.split(`
31
- `);return t=o[o.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],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Xo=Wi;Wi.default=Wi;let dc=Xo;function zi(i,e){new dc(e).stringify(i)}var ti=zi;zi.default=zi;let{isClean:lr,my:pc}=qt,mc=$s,gc=Xo,yc=ti;function Gi(i,e){let t=new i.constructor;for(let r in i){if(!Object.prototype.hasOwnProperty.call(i,r)||r==="proxyCache")continue;let s=i[r],o=typeof s;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=s:Array.isArray(s)?t[r]=s.map(n=>Gi(n,t)):(o==="object"&&s!==null&&(s=Gi(s)),t[r]=s)}return t}let ji=class{constructor(e={}){this.raws={},this[lr]=!1,this[pc]=!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=Gi(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new mc(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[lr]){this[lr]=!1;let e=this;for(;e=e.parent;)e[lr]=!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 s=t.indexOf(e.word);s!==-1&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`
32
- `?(s=1,o+=1):s+=1;return{column:s,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),o=s.indexOf(e.word);o!==-1&&(t=this.positionInside(o,s),r=this.positionInside(o+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}: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 gc().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},s=t==null;t=t||new Map;let o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let a=this[n];if(Array.isArray(a))r[n]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[n]=a.toJSON(null,t);else if(n==="source"){let l=t.get(a.input);l==null&&(l=o,t.set(a.input,o),o++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return s&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=yc){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let s={node:this};for(let o in r)s[o]=r[o];return e.warn(t,s)}get proxyOf(){return this}};var ri=ji;ji.default=ji;let vc=ri,Hi=class extends vc{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ae(T({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var ii=Hi;Hi.default=Hi;let wc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",bc=(i,e=21)=>(t=e)=>{let r="",s=t;for(;s--;)r+=i[Math.random()*i.length|0];return r},Sc=(i=21)=>{let e="",t=i;for(;t--;)e+=wc[Math.random()*64|0];return e};var Cc={nanoid:Sc,customAlphabet:bc};let{SourceMapConsumer:_n,SourceMapGenerator:$n}=Ie,{existsSync:Ec,readFileSync:xc}=Ie,{dirname:bi,join:Mc}=Ie;function Ic(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let Yi=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,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=bi(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new _n(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(s.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Ic(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}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()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=bi(e),Ec(e))return this.mapFile=e,xc(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 s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof _n)return $n.fromSourceMap(t).toString();if(t instanceof $n)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(bi(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=Yi;Yi.default=Yi;let{SourceMapConsumer:Nc,SourceMapGenerator:Ac}=Ie,{fileURLToPath:Ln,pathToFileURL:ur}=Ie,{isAbsolute:Zi,resolve:Xi}=Ie,{nanoid:Rc}=Cc,Si=Ie,Pn=$s,Oc=Jo,Ci=Symbol("fromOffsetCache"),Tc=!!(Nc&&Ac),Fn=!!(Xi&&Zi),Vr=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&&(!Fn||/^\w+:\/\//.test(t.from)||Zi(t.from)?this.file=t.from:this.file=Xi(t.from)),Fn&&Tc){let r=new Oc(this.css,t);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+Rc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let o,n,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);n=h.line,a=h.col}else n=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,n,a);return l?o=new Pn(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,s.plugin):o=new Pn(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,s.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(ur&&(o.input.url=ur(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[Ci])r=this[Ci];else{let o=this.css.split(`
33
- `);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)r[a]=n,n+=o[a].length+1;this[Ci]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let o=r.length-2,n;for(;s<o;)if(n=s+(o-s>>1),e<r[n])o=n-1;else if(e>=r[n+1])s=n+1;else{s=n;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Xi(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof r=="number"&&(a=o.originalPositionFor({column:s,line:r}));let l;Zi(n.source)?l=ur(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||ur(this.map.mapFile));let u={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:l.toString()};if(l.protocol==="file:")if(Ln)u.file=Ln(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=o.sourceContentFor(n.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=T({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var si=Vr;Vr.default=Vr;Si&&Si.registerInput&&Si.registerInput(Vr);let{SourceMapConsumer:Ko,SourceMapGenerator:Tr}=Ie,{dirname:Dr,relative:Qo,resolve:qo,sep:ea}=Ie,{pathToFileURL:Bn}=Ie,Dc=si,kc=!!(Ko&&Tr),_c=!!(Dr&&qo&&Qo&&ea),$c=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;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=o[o.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],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Xo=Wi;Wi.default=Wi;let dc=Xo;function zi(i,e){new dc(e).stringify(i)}var ti=zi;zi.default=zi;let{isClean:lr,my:pc}=Qt,mc=$s,gc=Xo,yc=ti;function Gi(i,e){let t=new i.constructor;for(let r in i){if(!Object.prototype.hasOwnProperty.call(i,r)||r==="proxyCache")continue;let s=i[r],o=typeof s;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=s:Array.isArray(s)?t[r]=s.map(n=>Gi(n,t)):(o==="object"&&s!==null&&(s=Gi(s)),t[r]=s)}return t}let ji=class{constructor(e={}){this.raws={},this[lr]=!1,this[pc]=!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=Gi(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new mc(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[lr]){this[lr]=!1;let e=this;for(;e=e.parent;)e[lr]=!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 s=t.indexOf(e.word);s!==-1&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`
32
+ `?(s=1,o+=1):s+=1;return{column:s,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),o=s.indexOf(e.word);o!==-1&&(t=this.positionInside(o,s),r=this.positionInside(o+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}: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 gc().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},s=t==null;t=t||new Map;let o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let a=this[n];if(Array.isArray(a))r[n]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[n]=a.toJSON(null,t);else if(n==="source"){let l=t.get(a.input);l==null&&(l=o,t.set(a.input,o),o++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return s&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=yc){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let s={node:this};for(let o in r)s[o]=r[o];return e.warn(t,s)}get proxyOf(){return this}};var ri=ji;ji.default=ji;let vc=ri,Hi=class extends vc{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ae(T({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var ii=Hi;Hi.default=Hi;let wc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",bc=(i,e=21)=>(t=e)=>{let r="",s=t;for(;s--;)r+=i[Math.random()*i.length|0];return r},Sc=(i=21)=>{let e="",t=i;for(;t--;)e+=wc[Math.random()*64|0];return e};var Cc={nanoid:Sc,customAlphabet:bc};let{SourceMapConsumer:_n,SourceMapGenerator:$n}=Ie,{existsSync:Ec,readFileSync:Mc}=Ie,{dirname:bi,join:xc}=Ie;function Ic(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let Yi=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,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=bi(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new _n(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(s.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Ic(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}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()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=bi(e),Ec(e))return this.mapFile=e,Mc(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 s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof _n)return $n.fromSourceMap(t).toString();if(t instanceof $n)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=xc(bi(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=Yi;Yi.default=Yi;let{SourceMapConsumer:Nc,SourceMapGenerator:Ac}=Ie,{fileURLToPath:Ln,pathToFileURL:ur}=Ie,{isAbsolute:Zi,resolve:Xi}=Ie,{nanoid:Rc}=Cc,Si=Ie,Pn=$s,Oc=Jo,Ci=Symbol("fromOffsetCache"),Tc=!!(Nc&&Ac),Fn=!!(Xi&&Zi),Vr=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&&(!Fn||/^\w+:\/\//.test(t.from)||Zi(t.from)?this.file=t.from:this.file=Xi(t.from)),Fn&&Tc){let r=new Oc(this.css,t);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+Rc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let o,n,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);n=h.line,a=h.col}else n=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,n,a);return l?o=new Pn(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,s.plugin):o=new Pn(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,s.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(ur&&(o.input.url=ur(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[Ci])r=this[Ci];else{let o=this.css.split(`
33
+ `);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)r[a]=n,n+=o[a].length+1;this[Ci]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let o=r.length-2,n;for(;s<o;)if(n=s+(o-s>>1),e<r[n])o=n-1;else if(e>=r[n+1])s=n+1;else{s=n;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Xi(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof r=="number"&&(a=o.originalPositionFor({column:s,line:r}));let l;Zi(n.source)?l=ur(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||ur(this.map.mapFile));let u={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:l.toString()};if(l.protocol==="file:")if(Ln)u.file=Ln(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=o.sourceContentFor(n.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=T({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var si=Vr;Vr.default=Vr;Si&&Si.registerInput&&Si.registerInput(Vr);let{SourceMapConsumer:Ko,SourceMapGenerator:Tr}=Ie,{dirname:Dr,relative:qo,resolve:Qo,sep:ea}=Ie,{pathToFileURL:Bn}=Ie,Dc=si,kc=!!(Ko&&Tr),_c=!!(Dr&&Qo&&qo&&ea),$c=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;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
36
  `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Dr(e.file),s;this.mapOpts.sourcesContent===!1?(s=new Ko(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,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(),_c&&kc&&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=Tr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Tr({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 Tr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,n;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(s.generated.line=e,s.generated.column=t-1,l.source&&l.source.start?(s.source=this.sourcePath(l),s.original.line=l.source.start.line,s.original.column=l.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(`
37
- `),t=a.length-n):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?(s.source=this.sourcePath(l),s.original.line=l.source.end.line,s.original.column=l.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}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?Dr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Dr(qo(r,this.mapOpts.annotation)));let s=Qo(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Dc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let 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(Bn){let r=Bn(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;ea==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var ta=$c;let Lc=ri,Ji=class extends Lc{constructor(e){super(e),this.type="comment"}};var ni=Ji;Ji.default=Ji;let{isClean:ra,my:ia}=qt,sa=ii,na=ni,Pc=ri,oa,Ls,Ps,aa;function la(i){return i.map(e=>(e.nodes&&(e.nodes=la(e.nodes)),delete e.source,e))}function ua(i){if(i[ra]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)ua(e)}let Pe=class ca extends Pc{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}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,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}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(s=>typeof s=="function"?(o,n)=>s(o.toProxy(),n):s)):t==="every"||t==="some"?r=>e[t]((s,...o)=>r(s.toProxy(),...o)):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),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of s)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+s.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),s=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=la(oa(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"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 sa(e)]}else if(e.selector)e=[new Ls(e)];else if(e.name)e=[new Ps(e)];else if(e.text)e=[new na(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[ia]||ca.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[ra]&&ua(s),typeof s.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+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(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(o){throw t.addToError(o)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}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,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}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=i=>{oa=i};Pe.registerRule=i=>{Ls=i};Pe.registerAtRule=i=>{Ps=i};Pe.registerRoot=i=>{aa=i};var et=Pe;Pe.default=Pe;Pe.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Ps.prototype):i.type==="rule"?Object.setPrototypeOf(i,Ls.prototype):i.type==="decl"?Object.setPrototypeOf(i,sa.prototype):i.type==="comment"?Object.setPrototypeOf(i,na.prototype):i.type==="root"&&Object.setPrototypeOf(i,aa.prototype),i[ia]=!0,i.nodes&&i.nodes.forEach(e=>{Pe.rebuild(e)})};let Fc=et,ha,fa,zt=class extends Fc{constructor(e){super(T({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new ha(new fa,this,e).stringify()}};zt.registerLazyResult=i=>{ha=i};zt.registerProcessor=i=>{fa=i};var Fs=zt;zt.default=zt;let Ki=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 da=Ki;Ki.default=Ki;let Bc=da,Qi=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 Bc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Bs=Qi;Qi.default=Qi;const Ei="'".charCodeAt(0),Un='"'.charCodeAt(0),cr="\\".charCodeAt(0),Vn="/".charCodeAt(0),hr=`
38
- `.charCodeAt(0),Rt=" ".charCodeAt(0),fr="\f".charCodeAt(0),dr=" ".charCodeAt(0),pr="\r".charCodeAt(0),Uc="[".charCodeAt(0),Vc="]".charCodeAt(0),Wc="(".charCodeAt(0),zc=")".charCodeAt(0),Gc="{".charCodeAt(0),jc="}".charCodeAt(0),Hc=";".charCodeAt(0),Yc="*".charCodeAt(0),Zc=":".charCodeAt(0),Xc="@".charCodeAt(0),mr=/[\t\n\f\r "#'()/;[\\\]{}]/g,gr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Jc=/.[\r\n"'(/\\]/,Wn=/[\da-f]/i;var Kc=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,o,n,a,l,u,c,h,f,m,p,y=r.length,d=0,g=[],S=[];function b(){return d}function v(E){throw e.error("Unclosed "+E,d)}function C(){return S.length===0&&d>=y}function x(E){if(S.length)return S.pop();if(d>=y)return;let k=E?E.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case hr:case Rt:case dr:case pr:case fr:{n=d;do n+=1,o=r.charCodeAt(n);while(o===Rt||o===hr||o===dr||o===pr||o===fr);p=["space",r.slice(d,n)],d=n-1;break}case Uc:case Vc:case Gc:case jc:case Zc:case Hc:case zc:{let D=String.fromCharCode(o);p=[D,D,d];break}case Wc:{if(f=g.length?g.pop()[1]:"",m=r.charCodeAt(d+1),f==="url"&&m!==Ei&&m!==Un&&m!==Rt&&m!==hr&&m!==dr&&m!==fr&&m!==pr){n=d;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(s||k){n=d;break}else v("bracket");for(h=n;r.charCodeAt(h-1)===cr;)h-=1,c=!c}while(c);p=["brackets",r.slice(d,n+1),d,n],d=n}else n=r.indexOf(")",d+1),l=r.slice(d,n+1),n===-1||Jc.test(l)?p=["(","(",d]:(p=["brackets",l,d,n],d=n);break}case Ei:case Un:{a=o===Ei?"'":'"',n=d;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(s||k){n=d+1;break}else v("string");for(h=n;r.charCodeAt(h-1)===cr;)h-=1,c=!c}while(c);p=["string",r.slice(d,n+1),d,n],d=n;break}case Xc:{mr.lastIndex=d+1,mr.test(r),mr.lastIndex===0?n=r.length-1:n=mr.lastIndex-2,p=["at-word",r.slice(d,n+1),d,n],d=n;break}case cr:{for(n=d,u=!0;r.charCodeAt(n+1)===cr;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==Vn&&o!==Rt&&o!==hr&&o!==dr&&o!==pr&&o!==fr&&(n+=1,Wn.test(r.charAt(n)))){for(;Wn.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===Rt&&(n+=1)}p=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===Vn&&r.charCodeAt(d+1)===Yc?(n=r.indexOf("*/",d+2)+1,n===0&&(s||k?n=r.length:v("comment")),p=["comment",r.slice(d,n+1),d,n],d=n):(gr.lastIndex=d+1,gr.test(r),gr.lastIndex===0?n=r.length-1:n=gr.lastIndex-2,p=["word",r.slice(d,n+1),d,n],g.push(p),d=n);break}}return d++,p}function R(E){S.push(E)}return{back:R,endOfFile:C,nextToken:x,position:b}};let pa=et,Wr=class extends pa{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 Us=Wr;Wr.default=Wr;pa.registerAtRule(Wr);let ma=et,ga,ya,yt=class extends ma{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=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 o of s)o.raws.before=t.raws.before}return s}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 ga(new ya,this,e).stringify()}};yt.registerLazyResult=i=>{ga=i};yt.registerProcessor=i=>{ya=i};var er=yt;yt.default=yt;ma.registerRoot(yt);let Gt={comma(i){return Gt.split(i,[","],!0)},space(i){let e=[" ",`
39
- `," "];return Gt.split(i,e)},split(i,e,t){let r=[],s="",o=!1,n=0,a=!1,l="",u=!1;for(let c of i)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=c;return(t||s!=="")&&r.push(s.trim()),r}};var va=Gt;Gt.default=Gt;let wa=et,Qc=va,zr=class extends wa{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Qc.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 Vs=zr;zr.default=zr;wa.registerRule(zr);let qc=ii,eh=Kc,th=ni,rh=Us,ih=er,zn=Vs;const Gn={empty:!0,space:!0};function sh(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}let nh=class{constructor(e){this.input=e,this.root=new ih,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 rh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,o,n=!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(o=l.length-1,s=l[o];s&&s[0]==="space";)s=l[--o];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(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,s;for(let o=t-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,o;for(let[n,a]of e.entries()){if(r=a,s=r[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new th;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 s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=eh(this.input)}decl(e,t){let r=new qc;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||sh(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 o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let n=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(o=e[u],o[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(o[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let m=c[f][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(r,"value",n.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 zn;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,s=!1,o=null,n=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&s&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(s){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===":"&&(s=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&s){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,s){let o,n,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)o=r[f],n=o[0],n==="space"&&f===a-1&&!s?u=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!Gn[h]&&!Gn[c]?l.slice(-1)===","?u=!1:l+=o[1]:u=!1):l+=o[1];if(!u){let f=r.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new zn;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 s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var oh=nh;let ah=et,lh=oh,uh=si;function Gr(i,e){let t=new uh(i,e),r=new lh(t);try{r.parse()}catch(s){throw s}return r.root}var Ws=Gr;Gr.default=Gr;ah.registerParse(Gr);let{isClean:Re,my:ch}=qt,hh=ta,fh=ti,dh=et,ph=Fs;let jn=Bs,mh=Ws,gh=er;const yh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},vh={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},wh={Once:!0,postcssPlugin:!0,prepare:!0},vt=0;function Ot(i){return typeof i=="object"&&typeof i.then=="function"}function ba(i){let e=!1,t=yh[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,vt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,vt,t+"Exit"]:[t,t+"Exit"]}function Hn(i){let e;return i.type==="document"?e=["Document",vt,"DocumentExit"]:i.type==="root"?e=["Root",vt,"RootExit"]:e=ba(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function qi(i){return i[Re]=!1,i.nodes&&i.nodes.forEach(e=>qi(e)),i}let es={},wt=class Sa{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=qi(t);else if(t instanceof Sa||t instanceof jn)s=qi(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=mh;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{s=o(t,r)}catch(n){this.processed=!0,this.error=n}s&&!s[ch]&&dh.rebuild(s)}this.result=new jn(e,s,r),this.helpers=ae(T({},es),{postcss:es,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?T(T({},o),o.prepare(this.result)):o)}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(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!vh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!wh[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);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(Ot(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Re];){e[Re]=!0;let t=[Hn(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ot(r))try{await r}catch(s){let o=t[t.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(o=>r(o,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}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 Ot(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=fh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new hh(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(Ot(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,s]of e){this.result.lastPlugin=r;let o;try{o=s(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ot(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[n,a]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!a[Re]){a[Re]=!0,e.push(Hn(a));return}t.iterator=0,delete r.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===vt){r.nodes&&r.nodes.length&&(r[Re]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[Re]=!0;let t=ba(e);for(let r of t)if(r===vt)e.nodes&&e.each(s=>{s[Re]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,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"}};wt.registerPostcss=i=>{es=i};var Ca=wt;wt.default=wt;gh.registerLazyResult(wt);ph.registerLazyResult(wt);let bh=ta,Sh=ti;let Ch=Ws;const Eh=Bs;let ts=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 s,o=Sh;this.result=new Eh(this._processor,s,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new bh(o,s,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=Ch;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 xh=ts;ts.default=ts;let Mh=xh,Ih=Ca,Nh=Fs,Ah=er,jt=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 Ih(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Rh=jt;jt.default=jt;Ah.registerProcessor(jt);Nh.registerProcessor(jt);let Oh=ii,Th=Jo,Dh=ni,kh=Us,_h=si,$h=er,Lh=Vs;function Ht(i,e){if(Array.isArray(i))return i.map(n=>Ht(n));let s=i,{inputs:t}=s,r=nt(s,["inputs"]);if(t){e=[];for(let n of t){let a=ae(T({},n),{__proto__:_h.prototype});a.map&&(a.map=ae(T({},a.map),{__proto__:Th.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=i.nodes.map(n=>Ht(n,e))),r.source){let o=r.source,{inputId:n}=o,a=nt(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new $h(r);if(r.type==="decl")return new Oh(r);if(r.type==="rule")return new Lh(r);if(r.type==="comment")return new Dh(r);if(r.type==="atrule")return new kh(r);throw new Error("Unknown node type: "+i.type)}var Ph=Ht;Ht.default=Ht;let Fh=$s,Ea=ii,Bh=Ca,Uh=et,zs=Rh,Vh=ti,Wh=Ph,xa=Fs,zh=da,Ma=ni,Ia=Us,Gh=Bs,jh=si,Hh=Ws,Yh=va,Na=Vs,Aa=er,Zh=ri;function H(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new zs(i)}H.plugin=function(e,t){let r=!1;function s(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
37
+ `),t=a.length-n):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?(s.source=this.sourcePath(l),s.original.line=l.source.end.line,s.original.column=l.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}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?Dr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Dr(Qo(r,this.mapOpts.annotation)));let s=qo(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Dc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let 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(Bn){let r=Bn(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;ea==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var ta=$c;let Lc=ri,Ji=class extends Lc{constructor(e){super(e),this.type="comment"}};var ni=Ji;Ji.default=Ji;let{isClean:ra,my:ia}=Qt,sa=ii,na=ni,Pc=ri,oa,Ls,Ps,aa;function la(i){return i.map(e=>(e.nodes&&(e.nodes=la(e.nodes)),delete e.source,e))}function ua(i){if(i[ra]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)ua(e)}let Pe=class ca extends Pc{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}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,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}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(s=>typeof s=="function"?(o,n)=>s(o.toProxy(),n):s)):t==="every"||t==="some"?r=>e[t]((s,...o)=>r(s.toProxy(),...o)):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),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of s)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+s.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),s=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=la(oa(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"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 sa(e)]}else if(e.selector)e=[new Ls(e)];else if(e.name)e=[new Ps(e)];else if(e.text)e=[new na(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[ia]||ca.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[ra]&&ua(s),typeof s.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+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(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(o){throw t.addToError(o)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}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,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}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=i=>{oa=i};Pe.registerRule=i=>{Ls=i};Pe.registerAtRule=i=>{Ps=i};Pe.registerRoot=i=>{aa=i};var et=Pe;Pe.default=Pe;Pe.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Ps.prototype):i.type==="rule"?Object.setPrototypeOf(i,Ls.prototype):i.type==="decl"?Object.setPrototypeOf(i,sa.prototype):i.type==="comment"?Object.setPrototypeOf(i,na.prototype):i.type==="root"&&Object.setPrototypeOf(i,aa.prototype),i[ia]=!0,i.nodes&&i.nodes.forEach(e=>{Pe.rebuild(e)})};let Fc=et,ha,fa,zt=class extends Fc{constructor(e){super(T({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new ha(new fa,this,e).stringify()}};zt.registerLazyResult=i=>{ha=i};zt.registerProcessor=i=>{fa=i};var Fs=zt;zt.default=zt;let Ki=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 da=Ki;Ki.default=Ki;let Bc=da,qi=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 Bc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Bs=qi;qi.default=qi;const Ei="'".charCodeAt(0),Un='"'.charCodeAt(0),cr="\\".charCodeAt(0),Vn="/".charCodeAt(0),hr=`
38
+ `.charCodeAt(0),Rt=" ".charCodeAt(0),fr="\f".charCodeAt(0),dr=" ".charCodeAt(0),pr="\r".charCodeAt(0),Uc="[".charCodeAt(0),Vc="]".charCodeAt(0),Wc="(".charCodeAt(0),zc=")".charCodeAt(0),Gc="{".charCodeAt(0),jc="}".charCodeAt(0),Hc=";".charCodeAt(0),Yc="*".charCodeAt(0),Zc=":".charCodeAt(0),Xc="@".charCodeAt(0),mr=/[\t\n\f\r "#'()/;[\\\]{}]/g,gr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Jc=/.[\r\n"'(/\\]/,Wn=/[\da-f]/i;var Kc=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,o,n,a,l,u,c,h,f,m,p,y=r.length,d=0,g=[],S=[];function b(){return d}function v(E){throw e.error("Unclosed "+E,d)}function C(){return S.length===0&&d>=y}function M(E){if(S.length)return S.pop();if(d>=y)return;let k=E?E.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case hr:case Rt:case dr:case pr:case fr:{n=d;do n+=1,o=r.charCodeAt(n);while(o===Rt||o===hr||o===dr||o===pr||o===fr);p=["space",r.slice(d,n)],d=n-1;break}case Uc:case Vc:case Gc:case jc:case Zc:case Hc:case zc:{let D=String.fromCharCode(o);p=[D,D,d];break}case Wc:{if(f=g.length?g.pop()[1]:"",m=r.charCodeAt(d+1),f==="url"&&m!==Ei&&m!==Un&&m!==Rt&&m!==hr&&m!==dr&&m!==fr&&m!==pr){n=d;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(s||k){n=d;break}else v("bracket");for(h=n;r.charCodeAt(h-1)===cr;)h-=1,c=!c}while(c);p=["brackets",r.slice(d,n+1),d,n],d=n}else n=r.indexOf(")",d+1),l=r.slice(d,n+1),n===-1||Jc.test(l)?p=["(","(",d]:(p=["brackets",l,d,n],d=n);break}case Ei:case Un:{a=o===Ei?"'":'"',n=d;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(s||k){n=d+1;break}else v("string");for(h=n;r.charCodeAt(h-1)===cr;)h-=1,c=!c}while(c);p=["string",r.slice(d,n+1),d,n],d=n;break}case Xc:{mr.lastIndex=d+1,mr.test(r),mr.lastIndex===0?n=r.length-1:n=mr.lastIndex-2,p=["at-word",r.slice(d,n+1),d,n],d=n;break}case cr:{for(n=d,u=!0;r.charCodeAt(n+1)===cr;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==Vn&&o!==Rt&&o!==hr&&o!==dr&&o!==pr&&o!==fr&&(n+=1,Wn.test(r.charAt(n)))){for(;Wn.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===Rt&&(n+=1)}p=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===Vn&&r.charCodeAt(d+1)===Yc?(n=r.indexOf("*/",d+2)+1,n===0&&(s||k?n=r.length:v("comment")),p=["comment",r.slice(d,n+1),d,n],d=n):(gr.lastIndex=d+1,gr.test(r),gr.lastIndex===0?n=r.length-1:n=gr.lastIndex-2,p=["word",r.slice(d,n+1),d,n],g.push(p),d=n);break}}return d++,p}function R(E){S.push(E)}return{back:R,endOfFile:C,nextToken:M,position:b}};let pa=et,Wr=class extends pa{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 Us=Wr;Wr.default=Wr;pa.registerAtRule(Wr);let ma=et,ga,ya,yt=class extends ma{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=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 o of s)o.raws.before=t.raws.before}return s}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 ga(new ya,this,e).stringify()}};yt.registerLazyResult=i=>{ga=i};yt.registerProcessor=i=>{ya=i};var er=yt;yt.default=yt;ma.registerRoot(yt);let Gt={comma(i){return Gt.split(i,[","],!0)},space(i){let e=[" ",`
39
+ `," "];return Gt.split(i,e)},split(i,e,t){let r=[],s="",o=!1,n=0,a=!1,l="",u=!1;for(let c of i)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=c;return(t||s!=="")&&r.push(s.trim()),r}};var va=Gt;Gt.default=Gt;let wa=et,qc=va,zr=class extends wa{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return qc.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 Vs=zr;zr.default=zr;wa.registerRule(zr);let Qc=ii,eh=Kc,th=ni,rh=Us,ih=er,zn=Vs;const Gn={empty:!0,space:!0};function sh(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}let nh=class{constructor(e){this.input=e,this.root=new ih,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 rh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,o,n=!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(o=l.length-1,s=l[o];s&&s[0]==="space";)s=l[--o];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(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,s;for(let o=t-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,o;for(let[n,a]of e.entries()){if(r=a,s=r[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new th;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 s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=eh(this.input)}decl(e,t){let r=new Qc;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||sh(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 o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let n=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(o=e[u],o[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(o[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let m=c[f][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(r,"value",n.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 zn;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,s=!1,o=null,n=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&s&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(s){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===":"&&(s=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&s){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,s){let o,n,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)o=r[f],n=o[0],n==="space"&&f===a-1&&!s?u=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!Gn[h]&&!Gn[c]?l.slice(-1)===","?u=!1:l+=o[1]:u=!1):l+=o[1];if(!u){let f=r.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new zn;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 s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var oh=nh;let ah=et,lh=oh,uh=si;function Gr(i,e){let t=new uh(i,e),r=new lh(t);try{r.parse()}catch(s){throw s}return r.root}var Ws=Gr;Gr.default=Gr;ah.registerParse(Gr);let{isClean:Re,my:ch}=Qt,hh=ta,fh=ti,dh=et,ph=Fs;let jn=Bs,mh=Ws,gh=er;const yh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},vh={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},wh={Once:!0,postcssPlugin:!0,prepare:!0},vt=0;function Ot(i){return typeof i=="object"&&typeof i.then=="function"}function ba(i){let e=!1,t=yh[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,vt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,vt,t+"Exit"]:[t,t+"Exit"]}function Hn(i){let e;return i.type==="document"?e=["Document",vt,"DocumentExit"]:i.type==="root"?e=["Root",vt,"RootExit"]:e=ba(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function Qi(i){return i[Re]=!1,i.nodes&&i.nodes.forEach(e=>Qi(e)),i}let es={},wt=class Sa{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=Qi(t);else if(t instanceof Sa||t instanceof jn)s=Qi(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=mh;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{s=o(t,r)}catch(n){this.processed=!0,this.error=n}s&&!s[ch]&&dh.rebuild(s)}this.result=new jn(e,s,r),this.helpers=ae(T({},es),{postcss:es,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?T(T({},o),o.prepare(this.result)):o)}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(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!vh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!wh[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);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(Ot(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Re];){e[Re]=!0;let t=[Hn(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ot(r))try{await r}catch(s){let o=t[t.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(o=>r(o,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}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 Ot(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=fh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new hh(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(Ot(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,s]of e){this.result.lastPlugin=r;let o;try{o=s(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ot(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[n,a]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!a[Re]){a[Re]=!0,e.push(Hn(a));return}t.iterator=0,delete r.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===vt){r.nodes&&r.nodes.length&&(r[Re]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[Re]=!0;let t=ba(e);for(let r of t)if(r===vt)e.nodes&&e.each(s=>{s[Re]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,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"}};wt.registerPostcss=i=>{es=i};var Ca=wt;wt.default=wt;gh.registerLazyResult(wt);ph.registerLazyResult(wt);let bh=ta,Sh=ti;let Ch=Ws;const Eh=Bs;let ts=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 s,o=Sh;this.result=new Eh(this._processor,s,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new bh(o,s,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=Ch;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 Mh=ts;ts.default=ts;let xh=Mh,Ih=Ca,Nh=Fs,Ah=er,jt=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 xh(this,e,t):new Ih(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Rh=jt;jt.default=jt;Ah.registerProcessor(jt);Nh.registerProcessor(jt);let Oh=ii,Th=Jo,Dh=ni,kh=Us,_h=si,$h=er,Lh=Vs;function Ht(i,e){if(Array.isArray(i))return i.map(n=>Ht(n));let s=i,{inputs:t}=s,r=nt(s,["inputs"]);if(t){e=[];for(let n of t){let a=ae(T({},n),{__proto__:_h.prototype});a.map&&(a.map=ae(T({},a.map),{__proto__:Th.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=i.nodes.map(n=>Ht(n,e))),r.source){let o=r.source,{inputId:n}=o,a=nt(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new $h(r);if(r.type==="decl")return new Oh(r);if(r.type==="rule")return new Lh(r);if(r.type==="comment")return new Dh(r);if(r.type==="atrule")return new kh(r);throw new Error("Unknown node type: "+i.type)}var Ph=Ht;Ht.default=Ht;let Fh=$s,Ea=ii,Bh=Ca,Uh=et,zs=Rh,Vh=ti,Wh=Ph,Ma=Fs,zh=da,xa=ni,Ia=Us,Gh=Bs,jh=si,Hh=Ws,Yh=va,Na=Vs,Aa=er,Zh=ri;function H(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new zs(i)}H.plugin=function(e,t){let r=!1;function s(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
40
40
  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:
41
- https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new zs().version,a}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(n,a,l){return H([s(l)]).process(n,a)},s};H.stringify=Vh;H.parse=Hh;H.fromJSON=Wh;H.list=Yh;H.comment=i=>new Ma(i);H.atRule=i=>new Ia(i);H.decl=i=>new Ea(i);H.rule=i=>new Na(i);H.root=i=>new Aa(i);H.document=i=>new xa(i);H.CssSyntaxError=Fh;H.Declaration=Ea;H.Container=Uh;H.Processor=zs;H.Document=xa;H.Comment=Ma;H.Warning=zh;H.AtRule=Ia;H.Result=Gh;H.Input=jh;H.Rule=Na;H.Root=Aa;H.Node=Zh;Bh.registerPostcss(H);var Xh=H;H.default=H;const te=ac(Xh);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 Yn={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 Jh(i){let e=Yn[i.tagName]?Yn[i.tagName]:i.tagName;return e==="link"&&i.attributes._cssText&&(e="style"),e}function oi(i,e){const t=e==null?void 0:e.stylesWithHoverClass.get(i);if(t)return t;let r=i;try{r=te([nc,oc]).process(i).css}catch(s){console.warn("Failed to adapt css for replay",s)}return e==null||e.stylesWithHoverClass.set(i,r),r}function Zn(){return{stylesWithHoverClass:new Map}}function Kh(i,e,t,r){const s=[];for(const l of i.childNodes)l.type===$.Text&&s.push(l);const o=e.split("/* rr_split */");for(;o.length>1&&o.length>s.length;)o.splice(-2,2,o.slice(-2).join(""));let n="";t&&(n=oi(o.join(""),r));let a=0;for(let l=0;l<s.length&&l!==o.length;l++){const u=s[l];if(!t)u.textContent=o[l];else if(l<o.length-1){let c=a,h=o[l+1].length;h=Math.min(h,30);let f=!1;for(;h>2;h--){const m=o[l+1].substring(0,h),p=n.substring(a).indexOf(m);if(f=p!==-1,f){c+=p;break}}f||(c+=o[l].length),u.textContent=n.substring(a,c),a=c}else u.textContent=n.substring(a)}}function Qh(i,e,t,r){const{doc:s,hackCss:o,cache:n}=r;i.childNodes.length?Kh(i,t,o,n):(o&&(t=oi(t,n)),e.appendChild(s.createTextNode(t)))}function qh(i,e){var t;const{doc:r,hackCss:s,cache:o}=e;switch(i.type){case $.Document:return r.implementation.createDocument(null,"",null);case $.DocumentType:return r.implementation.createDocumentType(i.name||"html",i.publicId,i.systemId);case $.Element:{const n=Jh(i);let a;i.isSVG?a=r.createElementNS("http://www.w3.org/2000/svg",n):(i.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(i.tagName)&&r.defaultView.customElements.define(i.tagName,class extends r.defaultView.HTMLElement{}),a=r.createElement(n));const l={};for(const u in i.attributes){if(!Object.prototype.hasOwnProperty.call(i.attributes,u))continue;let c=i.attributes[u];if(!(n==="option"&&u==="selected"&&c===!1)&&c!==null){if(c===!0&&(c=""),u.startsWith("rr_")){l[u]=c;continue}if(typeof c=="string"){if(n==="style"&&u==="_cssText"){Qh(i,a,c,e);continue}else if(n==="textarea"&&u==="value"){a.appendChild(r.createTextNode(c)),i.childNodes=[];continue}}try{if(i.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(n==="meta"&&i.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){a.setAttribute("csp-content",c.toString());continue}else n==="link"&&(i.attributes.rel==="preload"&&i.attributes.as==="script"||i.attributes.rel==="modulepreload")||n==="link"&&i.attributes.rel==="prefetch"&&typeof i.attributes.href=="string"&&Os(i.attributes.href)==="js"||(n==="img"&&i.attributes.srcset&&i.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",i.attributes.srcset):a.setAttribute(u,c.toString()))}catch(h){}}}for(const u in l){const c=l[u];if(n==="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(n==="img"&&u==="rr_dataURL"){const h=a;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",i.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(i.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a}case $.Text:return i.isStyle&&s?r.createTextNode(oi(i.textContent,o)):r.createTextNode(i.textContent);case $.CDATA:return r.createCDATASection(i.textContent);case $.Comment:return r.createComment(i.textContent);default:return null}}function Ut(i,e){const{doc:t,mirror:r,skipChild:s=!1,hackCss:o=!0,afterAppend:n,cache:a}=e;if(r.has(i.id)){const u=r.getNode(i.id),c=r.getMeta(u);if(xu(c,i))return r.getNode(i.id)}let l=qh(i,{doc:t,hackCss:o,cache:a});if(!l)return null;if(i.rootId&&r.getNode(i.rootId)!==t&&r.replace(i.rootId,t),i.type===$.Document&&(t.close(),t.open(),i.compatMode==="BackCompat"&&i.childNodes&&i.childNodes[0].type!==$.DocumentType&&(i.childNodes[0].type===$.Element&&"xmlns"in i.childNodes[0].attributes&&i.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,i),(i.type===$.Document||i.type===$.Element)&&!s)for(const u of i.childNodes){const c=Ut(u,{doc:t,mirror:r,skipChild:!1,hackCss:o,afterAppend:n,cache:a});if(!c){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&Pt(l)&&l.shadowRoot)l.shadowRoot.appendChild(c);else if(i.type===$.Document&&u.type==$.Element){const h=c;let f=null;h.childNodes.forEach(m=>{m.nodeName==="BODY"&&(f=m)}),f?(h.removeChild(f),l.appendChild(c),h.appendChild(f)):l.appendChild(c)}else l.appendChild(c);n&&n(c,u.id)}return l}function ef(i,e){function t(r){e(r)}for(const r of i.getIds())i.has(r)&&t(i.getNode(r))}function tf(i,e){const t=e.getMeta(i);if((t==null?void 0:t.type)!==$.Element)return;const r=i;for(const s in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,s)&&s.startsWith("rr_")))continue;const o=t.attributes[s];s==="rr_scrollLeft"&&(r.scrollLeft=o),s==="rr_scrollTop"&&(r.scrollTop=o)}}function rf(i,e){const{doc:t,onVisit:r,hackCss:s=!0,afterAppend:o,cache:n,mirror:a=new Rs}=e,l=Ut(i,{doc:t,mirror:a,skipChild:!1,hackCss:s,afterAppend:o,cache:n});return ef(a,u=>{r&&r(u),tf(u,a)}),l}var sf=Object.defineProperty,nf=(i,e,t)=>e in i?sf(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,I=(i,e,t)=>nf(i,typeof e!="symbol"?e+"":e,t),of=Object.defineProperty,af=(i,e,t)=>e in i?of(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Xn=(i,e,t)=>af(i,typeof e!="symbol"?e+"":e,t);let lf=class{constructor(){Xn(this,"idNodeMap",new Map),Xn(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 s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(t,s)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function uf(){return new lf}const cf=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],hf=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Ra=new WeakSet,ff=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,e,t){if(ff.call(this,i,e,t),this instanceof Element){const r=i.toLowerCase();cf.includes(r)&&Ra.add(this)}};const df=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(i,e,t){df.call(this,i,e,t)};function Jn(){document.querySelectorAll("*").forEach(e=>{hf.forEach(t=>{e.hasAttribute(t)&&Ra.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Jn():document.addEventListener("DOMContentLoaded",Jn)}catch(i){}function pf(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function mf(i){if(i.__esModule)return i;var e=i.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(i).forEach(function(r){var s=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return i[r]}})}),t}var Gs={exports:{}},q=String,Oa=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}};Gs.exports=Oa();Gs.exports.createColors=Oa;var gf=Gs.exports;const yf={},vf=Object.freeze(Object.defineProperty({__proto__:null,default:yf},Symbol.toStringTag,{value:"Module"})),Ne=mf(vf);let Kn=gf,Qn=Ne,rs=class Ta extends Error{constructor(e,t,r,s,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),n&&(this.plugin=n),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,Ta)}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=Kn.isColorSupported),Qn&&e&&(t=Qn(t));let r=t.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=Kn.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(s,o).map((u,c)=>{let h=s+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let m=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
41
+ https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new zs().version,a}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(n,a,l){return H([s(l)]).process(n,a)},s};H.stringify=Vh;H.parse=Hh;H.fromJSON=Wh;H.list=Yh;H.comment=i=>new xa(i);H.atRule=i=>new Ia(i);H.decl=i=>new Ea(i);H.rule=i=>new Na(i);H.root=i=>new Aa(i);H.document=i=>new Ma(i);H.CssSyntaxError=Fh;H.Declaration=Ea;H.Container=Uh;H.Processor=zs;H.Document=Ma;H.Comment=xa;H.Warning=zh;H.AtRule=Ia;H.Result=Gh;H.Input=jh;H.Rule=Na;H.Root=Aa;H.Node=Zh;Bh.registerPostcss(H);var Xh=H;H.default=H;const te=ac(Xh);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 Yn={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 Jh(i){let e=Yn[i.tagName]?Yn[i.tagName]:i.tagName;return e==="link"&&i.attributes._cssText&&(e="style"),e}function oi(i,e){const t=e==null?void 0:e.stylesWithHoverClass.get(i);if(t)return t;let r=i;try{r=te([nc,oc]).process(i).css}catch(s){console.warn("Failed to adapt css for replay",s)}return e==null||e.stylesWithHoverClass.set(i,r),r}function Zn(){return{stylesWithHoverClass:new Map}}function Kh(i,e,t,r){const s=[];for(const l of i.childNodes)l.type===$.Text&&s.push(l);const o=e.split("/* rr_split */");for(;o.length>1&&o.length>s.length;)o.splice(-2,2,o.slice(-2).join(""));let n="";t&&(n=oi(o.join(""),r));let a=0;for(let l=0;l<s.length&&l!==o.length;l++){const u=s[l];if(!t)u.textContent=o[l];else if(l<o.length-1){let c=a,h=o[l+1].length;h=Math.min(h,30);let f=!1;for(;h>2;h--){const m=o[l+1].substring(0,h),p=n.substring(a).indexOf(m);if(f=p!==-1,f){c+=p;break}}f||(c+=o[l].length),u.textContent=n.substring(a,c),a=c}else u.textContent=n.substring(a)}}function qh(i,e,t,r){const{doc:s,hackCss:o,cache:n}=r;i.childNodes.length?Kh(i,t,o,n):(o&&(t=oi(t,n)),e.appendChild(s.createTextNode(t)))}function Qh(i,e){var t;const{doc:r,hackCss:s,cache:o}=e;switch(i.type){case $.Document:return r.implementation.createDocument(null,"",null);case $.DocumentType:return r.implementation.createDocumentType(i.name||"html",i.publicId,i.systemId);case $.Element:{const n=Jh(i);let a;i.isSVG?a=r.createElementNS("http://www.w3.org/2000/svg",n):(i.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(i.tagName)&&r.defaultView.customElements.define(i.tagName,class extends r.defaultView.HTMLElement{}),a=r.createElement(n));const l={};for(const u in i.attributes){if(!Object.prototype.hasOwnProperty.call(i.attributes,u))continue;let c=i.attributes[u];if(!(n==="option"&&u==="selected"&&c===!1)&&c!==null){if(c===!0&&(c=""),u.startsWith("rr_")){l[u]=c;continue}if(typeof c=="string"){if(n==="style"&&u==="_cssText"){qh(i,a,c,e);continue}else if(n==="textarea"&&u==="value"){a.appendChild(r.createTextNode(c)),i.childNodes=[];continue}}try{if(i.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(n==="meta"&&i.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){a.setAttribute("csp-content",c.toString());continue}else n==="link"&&(i.attributes.rel==="preload"&&i.attributes.as==="script"||i.attributes.rel==="modulepreload")||n==="link"&&i.attributes.rel==="prefetch"&&typeof i.attributes.href=="string"&&Os(i.attributes.href)==="js"||(n==="img"&&i.attributes.srcset&&i.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",i.attributes.srcset):a.setAttribute(u,c.toString()))}catch(h){}}}for(const u in l){const c=l[u];if(n==="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(n==="img"&&u==="rr_dataURL"){const h=a;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",i.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(i.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a}case $.Text:return i.isStyle&&s?r.createTextNode(oi(i.textContent,o)):r.createTextNode(i.textContent);case $.CDATA:return r.createCDATASection(i.textContent);case $.Comment:return r.createComment(i.textContent);default:return null}}function Ut(i,e){const{doc:t,mirror:r,skipChild:s=!1,hackCss:o=!0,afterAppend:n,cache:a}=e;if(r.has(i.id)){const u=r.getNode(i.id),c=r.getMeta(u);if(Mu(c,i))return r.getNode(i.id)}let l=Qh(i,{doc:t,hackCss:o,cache:a});if(!l)return null;if(i.rootId&&r.getNode(i.rootId)!==t&&r.replace(i.rootId,t),i.type===$.Document&&(t.close(),t.open(),i.compatMode==="BackCompat"&&i.childNodes&&i.childNodes[0].type!==$.DocumentType&&(i.childNodes[0].type===$.Element&&"xmlns"in i.childNodes[0].attributes&&i.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,i),(i.type===$.Document||i.type===$.Element)&&!s)for(const u of i.childNodes){const c=Ut(u,{doc:t,mirror:r,skipChild:!1,hackCss:o,afterAppend:n,cache:a});if(!c){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&Pt(l)&&l.shadowRoot)l.shadowRoot.appendChild(c);else if(i.type===$.Document&&u.type==$.Element){const h=c;let f=null;h.childNodes.forEach(m=>{m.nodeName==="BODY"&&(f=m)}),f?(h.removeChild(f),l.appendChild(c),h.appendChild(f)):l.appendChild(c)}else l.appendChild(c);n&&n(c,u.id)}return l}function ef(i,e){function t(r){e(r)}for(const r of i.getIds())i.has(r)&&t(i.getNode(r))}function tf(i,e){const t=e.getMeta(i);if((t==null?void 0:t.type)!==$.Element)return;const r=i;for(const s in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,s)&&s.startsWith("rr_")))continue;const o=t.attributes[s];s==="rr_scrollLeft"&&(r.scrollLeft=o),s==="rr_scrollTop"&&(r.scrollTop=o)}}function rf(i,e){const{doc:t,onVisit:r,hackCss:s=!0,afterAppend:o,cache:n,mirror:a=new Rs}=e,l=Ut(i,{doc:t,mirror:a,skipChild:!1,hackCss:s,afterAppend:o,cache:n});return ef(a,u=>{r&&r(u),tf(u,a)}),l}var sf=Object.defineProperty,nf=(i,e,t)=>e in i?sf(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,I=(i,e,t)=>nf(i,typeof e!="symbol"?e+"":e,t),of=Object.defineProperty,af=(i,e,t)=>e in i?of(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Xn=(i,e,t)=>af(i,typeof e!="symbol"?e+"":e,t);let lf=class{constructor(){Xn(this,"idNodeMap",new Map),Xn(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 s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(t,s)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function uf(){return new lf}const cf=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],hf=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Ra=new WeakSet,ff=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,e,t){if(ff.call(this,i,e,t),this instanceof Element){const r=i.toLowerCase();cf.includes(r)&&Ra.add(this)}};const df=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(i,e,t){df.call(this,i,e,t)};function Jn(){document.querySelectorAll("*").forEach(e=>{hf.forEach(t=>{e.hasAttribute(t)&&Ra.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Jn():document.addEventListener("DOMContentLoaded",Jn)}catch(i){}function pf(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function mf(i){if(i.__esModule)return i;var e=i.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(i).forEach(function(r){var s=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return i[r]}})}),t}var Gs={exports:{}},Q=String,Oa=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}};Gs.exports=Oa();Gs.exports.createColors=Oa;var gf=Gs.exports;const yf={},vf=Object.freeze(Object.defineProperty({__proto__:null,default:yf},Symbol.toStringTag,{value:"Module"})),Ne=mf(vf);let Kn=gf,qn=Ne,rs=class Ta extends Error{constructor(e,t,r,s,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),n&&(this.plugin=n),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,Ta)}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=Kn.isColorSupported),qn&&e&&(t=qn(t));let r=t.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=Kn.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(s,o).map((u,c)=>{let h=s+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let m=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
42
42
  `+m+a("^")}return" "+l(f)+u}).join(`
43
43
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
44
44
 
45
45
  `+e+`
46
- `),this.name+": "+this.message+e}};var js=rs;rs.default=rs;var tr={};tr.isClean=Symbol("isClean");tr.my=Symbol("my");const qn={after:`
46
+ `),this.name+": "+this.message+e}};var js=rs;rs.default=rs;var tr={};tr.isClean=Symbol("isClean");tr.my=Symbol("my");const Qn={after:`
47
47
  `,beforeClose:`
48
48
  `,beforeComment:`
49
49
  `,beforeDecl:`
50
50
  `,beforeOpen:" ",beforeRule:`
51
51
  `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function wf(i){return i[0].toUpperCase()+i.slice(1)}let is=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+s+o,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 s=e.parent,o=0;for(;s&&s.type!=="root";)o+=1,s=s.parent;if(r.includes(`
52
- `)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a<o;a++)r+=n}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),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 s=0;s<e.nodes.length;s++){let o=e.nodes[s],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],typeof s!="undefined"))return s;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return qn[r];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[r]!="undefined")return n.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+wf(r);this[a]?s=this[a](n,e):n.walk(l=>{if(s=l.raws[t],typeof s!="undefined")return!1})}return typeof s=="undefined"&&(s=qn[r]),n.rawCache[r]=s,s}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
+ `)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a<o;a++)r+=n}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),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 s=0;s<e.nodes.length;s++){let o=e.nodes[s],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],typeof s!="undefined"))return s;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return Qn[r];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[r]!="undefined")return n.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+wf(r);this[a]?s=this[a](n,e):n.walk(l=>{if(s=l.raws[t],typeof s!="undefined")return!1})}return typeof s=="undefined"&&(s=Qn[r]),n.rawCache[r]=s,s}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(`
53
53
  `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(s=>{if(typeof s.raws.before!="undefined")return r=s.raws.before,r.includes(`
54
54
  `)&&(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(s=>{if(typeof s.raws.before!="undefined")return r=s.raws.before,r.includes(`
55
55
  `)&&(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(`
56
56
  `)&&(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 s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before!="undefined"){let o=r.raws.before.split(`
57
- `);return t=o[o.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],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Da=is;is.default=is;let bf=Da;function ss(i,e){new bf(e).stringify(i)}var ai=ss;ss.default=ss;let{isClean:yr,my:Sf}=tr,Cf=js,Ef=Da,xf=ai;function ns(i,e){let t=new i.constructor;for(let r in i){if(!Object.prototype.hasOwnProperty.call(i,r)||r==="proxyCache")continue;let s=i[r],o=typeof s;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=s:Array.isArray(s)?t[r]=s.map(n=>ns(n,t)):(o==="object"&&s!==null&&(s=ns(s)),t[r]=s)}return t}let os=class{constructor(e={}){this.raws={},this[yr]=!1,this[Sf]=!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=ns(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Cf(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[yr]){this[yr]=!1;let e=this;for(;e=e.parent;)e[yr]=!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 s=t.indexOf(e.word);s!==-1&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`
58
- `?(s=1,o+=1):s+=1;return{column:s,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),o=s.indexOf(e.word);o!==-1&&(t=this.positionInside(o,s),r=this.positionInside(o+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}: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 Ef().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},s=t==null;t=t||new Map;let o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let a=this[n];if(Array.isArray(a))r[n]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[n]=a.toJSON(null,t);else if(n==="source"){let l=t.get(a.input);l==null&&(l=o,t.set(a.input,o),o++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return s&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=xf){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let s={node:this};for(let o in r)s[o]=r[o];return e.warn(t,s)}get proxyOf(){return this}};var li=os;os.default=os;let Mf=li,as=class extends Mf{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ae(T({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var ui=as;as.default=as;let If="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Nf=(i,e=21)=>(t=e)=>{let r="",s=t;for(;s--;)r+=i[Math.random()*i.length|0];return r},Af=(i=21)=>{let e="",t=i;for(;t--;)e+=If[Math.random()*64|0];return e};var Rf={nanoid:Af,customAlphabet:Nf};let{SourceMapConsumer:eo,SourceMapGenerator:to}=Ne,{existsSync:Of,readFileSync:Tf}=Ne,{dirname:xi,join:Df}=Ne;function kf(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let ls=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,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=xi(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new eo(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(s.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return kf(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}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()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=xi(e),Of(e))return this.mapFile=e,Tf(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 s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof eo)return to.fromSourceMap(t).toString();if(t instanceof to)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=Df(xi(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 ka=ls;ls.default=ls;let{SourceMapConsumer:_f,SourceMapGenerator:$f}=Ne,{fileURLToPath:ro,pathToFileURL:vr}=Ne,{isAbsolute:us,resolve:cs}=Ne,{nanoid:Lf}=Rf,Mi=Ne,io=js,Pf=ka,Ii=Symbol("fromOffsetCache"),Ff=!!(_f&&$f),so=!!(cs&&us),jr=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&&(!so||/^\w+:\/\//.test(t.from)||us(t.from)?this.file=t.from:this.file=cs(t.from)),so&&Ff){let r=new Pf(this.css,t);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+Lf(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let o,n,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);n=h.line,a=h.col}else n=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,n,a);return l?o=new io(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,s.plugin):o=new io(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,s.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(vr&&(o.input.url=vr(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[Ii])r=this[Ii];else{let o=this.css.split(`
59
- `);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)r[a]=n,n+=o[a].length+1;this[Ii]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let o=r.length-2,n;for(;s<o;)if(n=s+(o-s>>1),e<r[n])o=n-1;else if(e>=r[n+1])s=n+1;else{s=n;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:cs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof r=="number"&&(a=o.originalPositionFor({column:s,line:r}));let l;us(n.source)?l=vr(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||vr(this.map.mapFile));let u={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:l.toString()};if(l.protocol==="file:")if(ro)u.file=ro(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=o.sourceContentFor(n.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=T({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var ci=jr;jr.default=jr;Mi&&Mi.registerInput&&Mi.registerInput(jr);let{SourceMapConsumer:_a,SourceMapGenerator:kr}=Ne,{dirname:_r,relative:$a,resolve:La,sep:Pa}=Ne,{pathToFileURL:no}=Ne,Bf=ci,Uf=!!(_a&&kr),Vf=!!(_r&&La&&$a&&Pa),Wf=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;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=`
57
+ `);return t=o[o.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],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Da=is;is.default=is;let bf=Da;function ss(i,e){new bf(e).stringify(i)}var ai=ss;ss.default=ss;let{isClean:yr,my:Sf}=tr,Cf=js,Ef=Da,Mf=ai;function ns(i,e){let t=new i.constructor;for(let r in i){if(!Object.prototype.hasOwnProperty.call(i,r)||r==="proxyCache")continue;let s=i[r],o=typeof s;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=s:Array.isArray(s)?t[r]=s.map(n=>ns(n,t)):(o==="object"&&s!==null&&(s=ns(s)),t[r]=s)}return t}let os=class{constructor(e={}){this.raws={},this[yr]=!1,this[Sf]=!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=ns(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Cf(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[yr]){this[yr]=!1;let e=this;for(;e=e.parent;)e[yr]=!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 s=t.indexOf(e.word);s!==-1&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`
58
+ `?(s=1,o+=1):s+=1;return{column:s,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),o=s.indexOf(e.word);o!==-1&&(t=this.positionInside(o,s),r=this.positionInside(o+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}: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 Ef().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},s=t==null;t=t||new Map;let o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let a=this[n];if(Array.isArray(a))r[n]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[n]=a.toJSON(null,t);else if(n==="source"){let l=t.get(a.input);l==null&&(l=o,t.set(a.input,o),o++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return s&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Mf){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let s={node:this};for(let o in r)s[o]=r[o];return e.warn(t,s)}get proxyOf(){return this}};var li=os;os.default=os;let xf=li,as=class extends xf{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ae(T({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var ui=as;as.default=as;let If="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Nf=(i,e=21)=>(t=e)=>{let r="",s=t;for(;s--;)r+=i[Math.random()*i.length|0];return r},Af=(i=21)=>{let e="",t=i;for(;t--;)e+=If[Math.random()*64|0];return e};var Rf={nanoid:Af,customAlphabet:Nf};let{SourceMapConsumer:eo,SourceMapGenerator:to}=Ne,{existsSync:Of,readFileSync:Tf}=Ne,{dirname:Mi,join:Df}=Ne;function kf(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let ls=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,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Mi(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new eo(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(s.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return kf(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}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()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Mi(e),Of(e))return this.mapFile=e,Tf(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 s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof eo)return to.fromSourceMap(t).toString();if(t instanceof to)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=Df(Mi(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 ka=ls;ls.default=ls;let{SourceMapConsumer:_f,SourceMapGenerator:$f}=Ne,{fileURLToPath:ro,pathToFileURL:vr}=Ne,{isAbsolute:us,resolve:cs}=Ne,{nanoid:Lf}=Rf,xi=Ne,io=js,Pf=ka,Ii=Symbol("fromOffsetCache"),Ff=!!(_f&&$f),so=!!(cs&&us),jr=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&&(!so||/^\w+:\/\//.test(t.from)||us(t.from)?this.file=t.from:this.file=cs(t.from)),so&&Ff){let r=new Pf(this.css,t);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+Lf(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let o,n,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);n=h.line,a=h.col}else n=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,n,a);return l?o=new io(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,s.plugin):o=new io(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,s.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(vr&&(o.input.url=vr(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[Ii])r=this[Ii];else{let o=this.css.split(`
59
+ `);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)r[a]=n,n+=o[a].length+1;this[Ii]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let o=r.length-2,n;for(;s<o;)if(n=s+(o-s>>1),e<r[n])o=n-1;else if(e>=r[n+1])s=n+1;else{s=n;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:cs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof r=="number"&&(a=o.originalPositionFor({column:s,line:r}));let l;us(n.source)?l=vr(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||vr(this.map.mapFile));let u={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:l.toString()};if(l.protocol==="file:")if(ro)u.file=ro(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=o.sourceContentFor(n.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=T({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var ci=jr;jr.default=jr;xi&&xi.registerInput&&xi.registerInput(jr);let{SourceMapConsumer:_a,SourceMapGenerator:kr}=Ne,{dirname:_r,relative:$a,resolve:La,sep:Pa}=Ne,{pathToFileURL:no}=Ne,Bf=ci,Uf=!!(_a&&kr),Vf=!!(_r&&La&&$a&&Pa),Wf=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;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=`
60
60
  `;this.css.includes(`\r
61
61
  `)&&(t=`\r
62
62
  `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||_r(e.file),s;this.mapOpts.sourcesContent===!1?(s=new _a(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,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(),Vf&&Uf&&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=kr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new kr({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 kr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,n;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(s.generated.line=e,s.generated.column=t-1,l.source&&l.source.start?(s.source=this.sourcePath(l),s.original.line=l.source.start.line,s.original.column=l.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(`
63
63
  `),t=a.length-n):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?(s.source=this.sourcePath(l),s.original.line=l.source.end.line,s.original.column=l.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}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?_r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=_r(La(r,this.mapOpts.annotation)));let s=$a(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Bf(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let 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(no){let r=no(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;Pa==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Fa=Wf;let zf=li,hs=class extends zf{constructor(e){super(e),this.type="comment"}};var hi=hs;hs.default=hs;let{isClean:Ba,my:Ua}=tr,Va=ui,Wa=hi,Gf=li,za,Hs,Ys,Ga;function ja(i){return i.map(e=>(e.nodes&&(e.nodes=ja(e.nodes)),delete e.source,e))}function Ha(i){if(i[Ba]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)Ha(e)}let Fe=class Ya extends Gf{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}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,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}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(s=>typeof s=="function"?(o,n)=>s(o.toProxy(),n):s)):t==="every"||t==="some"?r=>e[t]((s,...o)=>r(s.toProxy(),...o)):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),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of s)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+s.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),s=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=ja(za(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"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 Va(e)]}else if(e.selector)e=[new Hs(e)];else if(e.name)e=[new Ys(e)];else if(e.text)e=[new Wa(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[Ua]||Ya.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Ba]&&Ha(s),typeof s.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+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(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(o){throw t.addToError(o)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}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,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}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=i=>{za=i};Fe.registerRule=i=>{Hs=i};Fe.registerAtRule=i=>{Ys=i};Fe.registerRoot=i=>{Ga=i};var tt=Fe;Fe.default=Fe;Fe.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Ys.prototype):i.type==="rule"?Object.setPrototypeOf(i,Hs.prototype):i.type==="decl"?Object.setPrototypeOf(i,Va.prototype):i.type==="comment"?Object.setPrototypeOf(i,Wa.prototype):i.type==="root"&&Object.setPrototypeOf(i,Ga.prototype),i[Ua]=!0,i.nodes&&i.nodes.forEach(e=>{Fe.rebuild(e)})};let jf=tt,Za,Xa,Yt=class extends jf{constructor(e){super(T({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Za(new Xa,this,e).stringify()}};Yt.registerLazyResult=i=>{Za=i};Yt.registerProcessor=i=>{Xa=i};var Zs=Yt;Yt.default=Yt;let fs=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=fs;fs.default=fs;let Hf=Ja,ds=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 Hf(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Xs=ds;ds.default=ds;const Ni="'".charCodeAt(0),oo='"'.charCodeAt(0),wr="\\".charCodeAt(0),ao="/".charCodeAt(0),br=`
64
- `.charCodeAt(0),Tt=" ".charCodeAt(0),Sr="\f".charCodeAt(0),Cr=" ".charCodeAt(0),Er="\r".charCodeAt(0),Yf="[".charCodeAt(0),Zf="]".charCodeAt(0),Xf="(".charCodeAt(0),Jf=")".charCodeAt(0),Kf="{".charCodeAt(0),Qf="}".charCodeAt(0),qf=";".charCodeAt(0),ed="*".charCodeAt(0),td=":".charCodeAt(0),rd="@".charCodeAt(0),xr=/[\t\n\f\r "#'()/;[\\\]{}]/g,Mr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,id=/.[\r\n"'(/\\]/,lo=/[\da-f]/i;var sd=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,o,n,a,l,u,c,h,f,m,p,y=r.length,d=0,g=[],S=[];function b(){return d}function v(E){throw e.error("Unclosed "+E,d)}function C(){return S.length===0&&d>=y}function x(E){if(S.length)return S.pop();if(d>=y)return;let k=E?E.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case br:case Tt:case Cr:case Er:case Sr:{n=d;do n+=1,o=r.charCodeAt(n);while(o===Tt||o===br||o===Cr||o===Er||o===Sr);p=["space",r.slice(d,n)],d=n-1;break}case Yf:case Zf:case Kf:case Qf:case td:case qf:case Jf:{let D=String.fromCharCode(o);p=[D,D,d];break}case Xf:{if(f=g.length?g.pop()[1]:"",m=r.charCodeAt(d+1),f==="url"&&m!==Ni&&m!==oo&&m!==Tt&&m!==br&&m!==Cr&&m!==Sr&&m!==Er){n=d;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(s||k){n=d;break}else v("bracket");for(h=n;r.charCodeAt(h-1)===wr;)h-=1,c=!c}while(c);p=["brackets",r.slice(d,n+1),d,n],d=n}else n=r.indexOf(")",d+1),l=r.slice(d,n+1),n===-1||id.test(l)?p=["(","(",d]:(p=["brackets",l,d,n],d=n);break}case Ni:case oo:{a=o===Ni?"'":'"',n=d;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(s||k){n=d+1;break}else v("string");for(h=n;r.charCodeAt(h-1)===wr;)h-=1,c=!c}while(c);p=["string",r.slice(d,n+1),d,n],d=n;break}case rd:{xr.lastIndex=d+1,xr.test(r),xr.lastIndex===0?n=r.length-1:n=xr.lastIndex-2,p=["at-word",r.slice(d,n+1),d,n],d=n;break}case wr:{for(n=d,u=!0;r.charCodeAt(n+1)===wr;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==ao&&o!==Tt&&o!==br&&o!==Cr&&o!==Er&&o!==Sr&&(n+=1,lo.test(r.charAt(n)))){for(;lo.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===Tt&&(n+=1)}p=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===ao&&r.charCodeAt(d+1)===ed?(n=r.indexOf("*/",d+2)+1,n===0&&(s||k?n=r.length:v("comment")),p=["comment",r.slice(d,n+1),d,n],d=n):(Mr.lastIndex=d+1,Mr.test(r),Mr.lastIndex===0?n=r.length-1:n=Mr.lastIndex-2,p=["word",r.slice(d,n+1),d,n],g.push(p),d=n);break}}return d++,p}function R(E){S.push(E)}return{back:R,endOfFile:C,nextToken:x,position:b}};let Ka=tt,Hr=class extends Ka{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 Js=Hr;Hr.default=Hr;Ka.registerAtRule(Hr);let Qa=tt,qa,el,bt=class extends Qa{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=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 o of s)o.raws.before=t.raws.before}return s}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 qa(new el,this,e).stringify()}};bt.registerLazyResult=i=>{qa=i};bt.registerProcessor=i=>{el=i};var rr=bt;bt.default=bt;Qa.registerRoot(bt);let Zt={comma(i){return Zt.split(i,[","],!0)},space(i){let e=[" ",`
65
- `," "];return Zt.split(i,e)},split(i,e,t){let r=[],s="",o=!1,n=0,a=!1,l="",u=!1;for(let c of i)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=c;return(t||s!=="")&&r.push(s.trim()),r}};var tl=Zt;Zt.default=Zt;let rl=tt,nd=tl,Yr=class extends rl{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return nd.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 Ks=Yr;Yr.default=Yr;rl.registerRule(Yr);let od=ui,ad=sd,ld=hi,ud=Js,cd=rr,uo=Ks;const co={empty:!0,space:!0};function hd(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}let fd=class{constructor(e){this.input=e,this.root=new cd,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 ud;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,o,n=!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(o=l.length-1,s=l[o];s&&s[0]==="space";)s=l[--o];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(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,s;for(let o=t-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,o;for(let[n,a]of e.entries()){if(r=a,s=r[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new ld;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 s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=ad(this.input)}decl(e,t){let r=new od;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||hd(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 o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let n=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(o=e[u],o[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(o[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let m=c[f][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(r,"value",n.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 uo;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,s=!1,o=null,n=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&s&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(s){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===":"&&(s=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&s){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,s){let o,n,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)o=r[f],n=o[0],n==="space"&&f===a-1&&!s?u=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!co[h]&&!co[c]?l.slice(-1)===","?u=!1:l+=o[1]:u=!1):l+=o[1];if(!u){let f=r.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new uo;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 s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var dd=fd;let pd=tt,md=dd,gd=ci;function Zr(i,e){let t=new gd(i,e),r=new md(t);try{r.parse()}catch(s){throw s}return r.root}var Qs=Zr;Zr.default=Zr;pd.registerParse(Zr);let{isClean:Oe,my:yd}=tr,vd=Fa,wd=ai,bd=tt,Sd=Zs;let ho=Xs,Cd=Qs,Ed=rr;const xd={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},Id={Once:!0,postcssPlugin:!0,prepare:!0},St=0;function Dt(i){return typeof i=="object"&&typeof i.then=="function"}function il(i){let e=!1,t=xd[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,St,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,St,t+"Exit"]:[t,t+"Exit"]}function fo(i){let e;return i.type==="document"?e=["Document",St,"DocumentExit"]:i.type==="root"?e=["Root",St,"RootExit"]:e=il(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function ps(i){return i[Oe]=!1,i.nodes&&i.nodes.forEach(e=>ps(e)),i}let ms={},Ct=class sl{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=ps(t);else if(t instanceof sl||t instanceof ho)s=ps(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=Cd;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{s=o(t,r)}catch(n){this.processed=!0,this.error=n}s&&!s[yd]&&bd.rebuild(s)}this.result=new ho(e,s,r),this.helpers=ae(T({},ms),{postcss:ms,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?T(T({},o),o.prepare(this.result)):o)}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(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};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(!Id[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);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(Dt(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Oe];){e[Oe]=!0;let t=[fo(e)];for(;t.length>0;){let r=this.visitTick(t);if(Dt(r))try{await r}catch(s){let o=t[t.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(o=>r(o,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}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 Dt(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=wd;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new vd(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(Dt(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,s]of e){this.result.lastPlugin=r;let o;try{o=s(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Dt(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[n,a]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!a[Oe]){a[Oe]=!0,e.push(fo(a));return}t.iterator=0,delete r.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===St){r.nodes&&r.nodes.length&&(r[Oe]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[Oe]=!0;let t=il(e);for(let r of t)if(r===St)e.nodes&&e.each(s=>{s[Oe]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,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"}};Ct.registerPostcss=i=>{ms=i};var nl=Ct;Ct.default=Ct;Ed.registerLazyResult(Ct);Sd.registerLazyResult(Ct);let Nd=Fa,Ad=ai;let Rd=Qs;const Od=Xs;let gs=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 s,o=Ad;this.result=new Od(this._processor,s,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new Nd(o,s,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=Rd;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 Td=gs;gs.default=gs;let Dd=Td,kd=nl,_d=Zs,$d=rr,Xt=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 Dd(this,e,t):new kd(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ld=Xt;Xt.default=Xt;$d.registerProcessor(Xt);_d.registerProcessor(Xt);let Pd=ui,Fd=ka,Bd=hi,Ud=Js,Vd=ci,Wd=rr,zd=Ks;function Jt(i,e){if(Array.isArray(i))return i.map(n=>Jt(n));let s=i,{inputs:t}=s,r=nt(s,["inputs"]);if(t){e=[];for(let n of t){let a=ae(T({},n),{__proto__:Vd.prototype});a.map&&(a.map=ae(T({},a.map),{__proto__:Fd.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=i.nodes.map(n=>Jt(n,e))),r.source){let o=r.source,{inputId:n}=o,a=nt(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new Wd(r);if(r.type==="decl")return new Pd(r);if(r.type==="rule")return new zd(r);if(r.type==="comment")return new Bd(r);if(r.type==="atrule")return new Ud(r);throw new Error("Unknown node type: "+i.type)}var Gd=Jt;Jt.default=Jt;let jd=js,ol=ui,Hd=nl,Yd=tt,qs=Ld,Zd=ai,Xd=Gd,al=Zs,Jd=Ja,ll=hi,ul=Js,Kd=Xs,Qd=ci,qd=Qs,ep=tl,cl=Ks,hl=rr,tp=li;function Y(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new qs(i)}Y.plugin=function(e,t){let r=!1;function s(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
64
+ `.charCodeAt(0),Tt=" ".charCodeAt(0),Sr="\f".charCodeAt(0),Cr=" ".charCodeAt(0),Er="\r".charCodeAt(0),Yf="[".charCodeAt(0),Zf="]".charCodeAt(0),Xf="(".charCodeAt(0),Jf=")".charCodeAt(0),Kf="{".charCodeAt(0),qf="}".charCodeAt(0),Qf=";".charCodeAt(0),ed="*".charCodeAt(0),td=":".charCodeAt(0),rd="@".charCodeAt(0),Mr=/[\t\n\f\r "#'()/;[\\\]{}]/g,xr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,id=/.[\r\n"'(/\\]/,lo=/[\da-f]/i;var sd=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,o,n,a,l,u,c,h,f,m,p,y=r.length,d=0,g=[],S=[];function b(){return d}function v(E){throw e.error("Unclosed "+E,d)}function C(){return S.length===0&&d>=y}function M(E){if(S.length)return S.pop();if(d>=y)return;let k=E?E.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case br:case Tt:case Cr:case Er:case Sr:{n=d;do n+=1,o=r.charCodeAt(n);while(o===Tt||o===br||o===Cr||o===Er||o===Sr);p=["space",r.slice(d,n)],d=n-1;break}case Yf:case Zf:case Kf:case qf:case td:case Qf:case Jf:{let D=String.fromCharCode(o);p=[D,D,d];break}case Xf:{if(f=g.length?g.pop()[1]:"",m=r.charCodeAt(d+1),f==="url"&&m!==Ni&&m!==oo&&m!==Tt&&m!==br&&m!==Cr&&m!==Sr&&m!==Er){n=d;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(s||k){n=d;break}else v("bracket");for(h=n;r.charCodeAt(h-1)===wr;)h-=1,c=!c}while(c);p=["brackets",r.slice(d,n+1),d,n],d=n}else n=r.indexOf(")",d+1),l=r.slice(d,n+1),n===-1||id.test(l)?p=["(","(",d]:(p=["brackets",l,d,n],d=n);break}case Ni:case oo:{a=o===Ni?"'":'"',n=d;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(s||k){n=d+1;break}else v("string");for(h=n;r.charCodeAt(h-1)===wr;)h-=1,c=!c}while(c);p=["string",r.slice(d,n+1),d,n],d=n;break}case rd:{Mr.lastIndex=d+1,Mr.test(r),Mr.lastIndex===0?n=r.length-1:n=Mr.lastIndex-2,p=["at-word",r.slice(d,n+1),d,n],d=n;break}case wr:{for(n=d,u=!0;r.charCodeAt(n+1)===wr;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==ao&&o!==Tt&&o!==br&&o!==Cr&&o!==Er&&o!==Sr&&(n+=1,lo.test(r.charAt(n)))){for(;lo.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===Tt&&(n+=1)}p=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===ao&&r.charCodeAt(d+1)===ed?(n=r.indexOf("*/",d+2)+1,n===0&&(s||k?n=r.length:v("comment")),p=["comment",r.slice(d,n+1),d,n],d=n):(xr.lastIndex=d+1,xr.test(r),xr.lastIndex===0?n=r.length-1:n=xr.lastIndex-2,p=["word",r.slice(d,n+1),d,n],g.push(p),d=n);break}}return d++,p}function R(E){S.push(E)}return{back:R,endOfFile:C,nextToken:M,position:b}};let Ka=tt,Hr=class extends Ka{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 Js=Hr;Hr.default=Hr;Ka.registerAtRule(Hr);let qa=tt,Qa,el,bt=class extends qa{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=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 o of s)o.raws.before=t.raws.before}return s}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 Qa(new el,this,e).stringify()}};bt.registerLazyResult=i=>{Qa=i};bt.registerProcessor=i=>{el=i};var rr=bt;bt.default=bt;qa.registerRoot(bt);let Zt={comma(i){return Zt.split(i,[","],!0)},space(i){let e=[" ",`
65
+ `," "];return Zt.split(i,e)},split(i,e,t){let r=[],s="",o=!1,n=0,a=!1,l="",u=!1;for(let c of i)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=c;return(t||s!=="")&&r.push(s.trim()),r}};var tl=Zt;Zt.default=Zt;let rl=tt,nd=tl,Yr=class extends rl{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return nd.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 Ks=Yr;Yr.default=Yr;rl.registerRule(Yr);let od=ui,ad=sd,ld=hi,ud=Js,cd=rr,uo=Ks;const co={empty:!0,space:!0};function hd(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}let fd=class{constructor(e){this.input=e,this.root=new cd,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 ud;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,o,n=!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(o=l.length-1,s=l[o];s&&s[0]==="space";)s=l[--o];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(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,s;for(let o=t-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,o;for(let[n,a]of e.entries()){if(r=a,s=r[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new ld;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 s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=ad(this.input)}decl(e,t){let r=new od;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||hd(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 o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let n=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(o=e[u],o[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(o[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let m=c[f][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(r,"value",n.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 uo;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,s=!1,o=null,n=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&s&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(s){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===":"&&(s=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&s){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,s){let o,n,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)o=r[f],n=o[0],n==="space"&&f===a-1&&!s?u=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!co[h]&&!co[c]?l.slice(-1)===","?u=!1:l+=o[1]:u=!1):l+=o[1];if(!u){let f=r.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new uo;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 s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var dd=fd;let pd=tt,md=dd,gd=ci;function Zr(i,e){let t=new gd(i,e),r=new md(t);try{r.parse()}catch(s){throw s}return r.root}var qs=Zr;Zr.default=Zr;pd.registerParse(Zr);let{isClean:Oe,my:yd}=tr,vd=Fa,wd=ai,bd=tt,Sd=Zs;let ho=Xs,Cd=qs,Ed=rr;const Md={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},xd={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},Id={Once:!0,postcssPlugin:!0,prepare:!0},St=0;function Dt(i){return typeof i=="object"&&typeof i.then=="function"}function il(i){let e=!1,t=Md[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,St,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,St,t+"Exit"]:[t,t+"Exit"]}function fo(i){let e;return i.type==="document"?e=["Document",St,"DocumentExit"]:i.type==="root"?e=["Root",St,"RootExit"]:e=il(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function ps(i){return i[Oe]=!1,i.nodes&&i.nodes.forEach(e=>ps(e)),i}let ms={},Ct=class sl{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=ps(t);else if(t instanceof sl||t instanceof ho)s=ps(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=Cd;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{s=o(t,r)}catch(n){this.processed=!0,this.error=n}s&&!s[yd]&&bd.rebuild(s)}this.result=new ho(e,s,r),this.helpers=ae(T({},ms),{postcss:ms,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?T(T({},o),o.prepare(this.result)):o)}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(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!xd[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Id[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);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(Dt(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Oe];){e[Oe]=!0;let t=[fo(e)];for(;t.length>0;){let r=this.visitTick(t);if(Dt(r))try{await r}catch(s){let o=t[t.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(o=>r(o,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}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 Dt(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=wd;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new vd(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(Dt(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,s]of e){this.result.lastPlugin=r;let o;try{o=s(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Dt(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[n,a]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!a[Oe]){a[Oe]=!0,e.push(fo(a));return}t.iterator=0,delete r.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===St){r.nodes&&r.nodes.length&&(r[Oe]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[Oe]=!0;let t=il(e);for(let r of t)if(r===St)e.nodes&&e.each(s=>{s[Oe]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,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"}};Ct.registerPostcss=i=>{ms=i};var nl=Ct;Ct.default=Ct;Ed.registerLazyResult(Ct);Sd.registerLazyResult(Ct);let Nd=Fa,Ad=ai;let Rd=qs;const Od=Xs;let gs=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 s,o=Ad;this.result=new Od(this._processor,s,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new Nd(o,s,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=Rd;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 Td=gs;gs.default=gs;let Dd=Td,kd=nl,_d=Zs,$d=rr,Xt=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 Dd(this,e,t):new kd(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ld=Xt;Xt.default=Xt;$d.registerProcessor(Xt);_d.registerProcessor(Xt);let Pd=ui,Fd=ka,Bd=hi,Ud=Js,Vd=ci,Wd=rr,zd=Ks;function Jt(i,e){if(Array.isArray(i))return i.map(n=>Jt(n));let s=i,{inputs:t}=s,r=nt(s,["inputs"]);if(t){e=[];for(let n of t){let a=ae(T({},n),{__proto__:Vd.prototype});a.map&&(a.map=ae(T({},a.map),{__proto__:Fd.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=i.nodes.map(n=>Jt(n,e))),r.source){let o=r.source,{inputId:n}=o,a=nt(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new Wd(r);if(r.type==="decl")return new Pd(r);if(r.type==="rule")return new zd(r);if(r.type==="comment")return new Bd(r);if(r.type==="atrule")return new Ud(r);throw new Error("Unknown node type: "+i.type)}var Gd=Jt;Jt.default=Jt;let jd=js,ol=ui,Hd=nl,Yd=tt,Qs=Ld,Zd=ai,Xd=Gd,al=Zs,Jd=Ja,ll=hi,ul=Js,Kd=Xs,qd=ci,Qd=qs,ep=tl,cl=Ks,hl=rr,tp=li;function Y(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new Qs(i)}Y.plugin=function(e,t){let r=!1;function s(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
66
66
  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:
67
- https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new qs().version,a}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(n,a,l){return Y([s(l)]).process(n,a)},s};Y.stringify=Zd;Y.parse=qd;Y.fromJSON=Xd;Y.list=ep;Y.comment=i=>new ll(i);Y.atRule=i=>new ul(i);Y.decl=i=>new ol(i);Y.rule=i=>new cl(i);Y.root=i=>new hl(i);Y.document=i=>new al(i);Y.CssSyntaxError=jd;Y.Declaration=ol;Y.Container=Yd;Y.Processor=qs;Y.Document=al;Y.Comment=ll;Y.Warning=Jd;Y.AtRule=ul;Y.Result=Kd;Y.Input=Qd;Y.Rule=cl;Y.Root=hl;Y.Node=tp;Hd.registerPostcss(Y);var rp=Y;Y.default=Y;const ie=pf(rp);ie.stringify;ie.fromJSON;ie.plugin;ie.parse;ie.list;ie.document;ie.comment;ie.atRule;ie.rule;ie.decl;ie.root;ie.CssSyntaxError;ie.Declaration;ie.Container;ie.Processor;ie.Document;ie.Comment;ie.Warning;ie.AtRule;ie.Result;ie.Input;ie.Rule;ie.Root;ie.Node;var B=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(B||{});function ip(i){const e={},t=/;(?![^(]*\))/g,r=/:(.+)/,s=/\/\*.*?\*\//g;return i.replace(s,"").split(t).forEach(function(o){if(o){const n=o.split(r);n.length>1&&(e[ys(n[0].trim())]=n[1].trim())}}),e}function po(i){const e=[];for(const t in i){const r=i[t];if(typeof r!="string")continue;const s=ap(t);e.push(`${s}: ${r};`)}return e.join(" ")}const sp=/-([a-z])/g,np=/^--[a-zA-Z0-9-]+$/,ys=i=>np.test(i)?i:i.replace(sp,(e,t)=>t?t.toUpperCase():""),op=/\B([A-Z])/g,ap=i=>i.replace(op,"-$1").toLowerCase();class Ae{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 Ae){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 en extends Ae{constructor(...e){super(e),I(this,"nodeType",9),I(this,"nodeName","#document"),I(this,"compatMode","CSS1Compat"),I(this,"RRNodeType",B.Document),I(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===B.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===B.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===B.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===B.Element||t===B.DocumentType)&&this.childNodes.some(s=>s.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===B.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=tn(this,e);return r.parentElement=null,r}insertBefore(e,t){const r=e.RRNodeType;if((r===B.Element||r===B.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===B.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=gl(this,e,t);return s.parentElement=null,s}removeChild(e){return yl(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 en}createDocumentType(e,t,r){const s=new fl(e,t,r);return s.ownerDocument=this,s}createElement(e){const t=new fi(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new dl(e);return t.ownerDocument=this,t}createComment(e){const t=new pl(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new ml(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class fl extends Ae{constructor(e,t,r){super(),I(this,"nodeType",10),I(this,"RRNodeType",B.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 fi extends Ae{constructor(e){super(),I(this,"nodeType",1),I(this,"RRNodeType",B.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 cp(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?ip(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,s,o)=>{if(t.test(r))return;const n=ys(r);s?e[n]=s:delete e[n],o==="important"&&(e[n]+=" !important"),this.attributes.style=po(e)},e.removeProperty=r=>{if(t.test(r))return"";const s=ys(r),o=e[s]||"";return delete e[s],this.attributes.style=po(e),o},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 tn(this,e)}insertBefore(e,t){return gl(this,e,t)}removeChild(e){return yl(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 lp extends fi{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 up extends fi{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 dl extends Ae{constructor(e){super(),I(this,"nodeType",3),I(this,"nodeName","#text"),I(this,"RRNodeType",B.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 pl extends Ae{constructor(e){super(),I(this,"nodeType",8),I(this,"nodeName","#comment"),I(this,"RRNodeType",B.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 ml extends Ae{constructor(e){super(),I(this,"nodeName","#cdata-section"),I(this,"nodeType",4),I(this,"RRNodeType",B.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 cp{constructor(e,t){if(I(this,"onChange"),I(this,"classes",[]),I(this,"add",(...r)=>{for(const s of r){const o=String(s);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),I(this,"remove",(...r)=>{this.classes=this.classes.filter(s=>r.indexOf(s)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}}function tn(i,e){return e.parentNode&&e.parentNode.removeChild(e),i.lastChild?(i.lastChild.nextSibling=e,e.previousSibling=i.lastChild):(i.firstChild=e,e.previousSibling=null),i.lastChild=e,e.nextSibling=null,e.parentNode=i,e.parentElement=i,e.ownerDocument=i.ownerDocument,e}function gl(i,e,t){if(!t)return tn(i,e);if(t.parentNode!==i)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:i.firstChild=e,e.parentElement=i,e.parentNode=i,e.ownerDocument=i.ownerDocument),e}function yl(i,e){if(e.parentNode!==i)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:i.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:i.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var be=(i=>(i[i.PLACEHOLDER=0]="PLACEHOLDER",i[i.ELEMENT_NODE=1]="ELEMENT_NODE",i[i.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",i[i.TEXT_NODE=3]="TEXT_NODE",i[i.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",i[i.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",i[i.ENTITY_NODE=6]="ENTITY_NODE",i[i.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",i[i.COMMENT_NODE=8]="COMMENT_NODE",i[i.DOCUMENT_NODE=9]="DOCUMENT_NODE",i[i.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",i[i.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",i))(be||{});const vs={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},hp={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 Te=null;function Xr(i,e,t,r=e.mirror||e.ownerDocument.mirror){i=fp(i,e,t,r),vl(i,e,t,r),dp(i,e,t)}function fp(i,e,t,r){var s;if(t.afterAppend&&!Te&&(Te=new WeakSet,setTimeout(()=>{Te=null},0)),!rn(i,e)){const o=Jr(e,t.mirror,r);(s=i.parentNode)==null||s.replaceChild(o,i),i=o}switch(e.RRNodeType){case B.Document:{if(!at(i,e,t.mirror,r)){const o=r.getMeta(e);o&&(t.mirror.removeNodeFromMap(i),i.close(),i.open(),t.mirror.add(i,o),Te==null||Te.add(i))}break}case B.Element:{const o=i,n=e;switch(n.tagName){case"IFRAME":{const a=i.contentDocument;if(!a)break;Xr(a,e.contentDocument,t,r);break}}n.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),vl(o.shadowRoot,n.shadowRoot,t,r)),pp(o,n,r);break}}return i}function dp(i,e,t){var r;switch(e.RRNodeType){case B.Document:{const s=e.scrollData;s&&t.applyScroll(s,!0);break}case B.Element:{const s=i,o=e;switch(o.scrollData&&t.applyScroll(o.scrollData,!0),o.inputData&&t.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{const n=i,a=o;a.paused!==void 0&&(a.paused?n.pause():n.play()),a.muted!==void 0&&(n.muted=a.muted),a.volume!==void 0&&(n.volume=a.volume),a.currentTime!==void 0&&(n.currentTime=a.currentTime),a.playbackRate!==void 0&&(n.playbackRate=a.playbackRate),a.loop!==void 0&&(n.loop=a.loop);break}case"CANVAS":{const n=e;if(n.rr_dataURL!==null){const a=document.createElement("img");a.onload=()=>{const l=s.getContext("2d");l&&l.drawImage(a,0,0,a.width,a.height)},a.src=n.rr_dataURL}n.canvasMutations.forEach(a=>t.applyCanvas(a.event,a.mutation,i));break}case"STYLE":{const n=s.sheet;n&&e.rules.forEach(a=>t.applyStyleSheetMutation(a,n));break}case"DIALOG":{const n=s,a=o,l=n.open,u=n.matches("dialog:modal"),c=a.open,h=a.isModal,f=u!==h,m=l!==c;if((f||l&&m)&&n.close(),c&&(m||f))try{h?n.showModal():n.show()}catch(p){console.warn(p)}break}}break}case B.Text:case B.Comment:case B.CDATA:{i.textContent!==e.data&&(i.textContent=e.data);break}}Te!=null&&Te.has(i)&&(Te.delete(i),(r=t.afterAppend)==null||r.call(t,i,t.mirror.getId(i)))}function pp(i,e,t){const r=i.attributes,s=e.attributes;for(const o in s){const n=s[o],a=t.getMeta(e);if(a!=null&&a.isSVG&&vs[o])i.setAttributeNS(vs[o],o,n);else if(e.tagName==="CANVAS"&&o==="rr_dataURL"){const l=document.createElement("img");l.src=n,l.onload=()=>{const u=i.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&o==="srcdoc")continue;try{i.setAttribute(o,n)}catch(l){console.warn(l)}}}for(const{name:o}of Array.from(r))o in s||i.removeAttribute(o);e.scrollLeft&&(i.scrollLeft=e.scrollLeft),e.scrollTop&&(i.scrollTop=e.scrollTop)}function vl(i,e,t,r){const s=Array.from(i.childNodes),o=e.childNodes;if(s.length===0&&o.length===0)return;let n=0,a=s.length-1,l=0,u=o.length-1,c=s[n],h=s[a],f=o[l],m=o[u],p,y;for(;n<=a&&l<=u;)if(c===void 0)c=s[++n];else if(h===void 0)h=s[--a];else if(at(c,f,t.mirror,r))c=s[++n],f=o[++l];else if(at(h,m,t.mirror,r))h=s[--a],m=o[--u];else if(at(c,m,t.mirror,r)){try{i.insertBefore(c,h.nextSibling)}catch(S){console.warn(S)}c=s[++n],m=o[--u]}else if(at(h,f,t.mirror,r)){try{i.insertBefore(h,c)}catch(S){console.warn(S)}h=s[--a],f=o[++l]}else{if(!p){p={};for(let b=n;b<=a;b++){const v=s[b];v&&t.mirror.hasNode(v)&&(p[t.mirror.getId(v)]=b)}}y=p[r.getId(f)];const S=s[y];if(y!==void 0&&S&&at(S,f,t.mirror,r)){try{i.insertBefore(S,c)}catch(b){console.warn(b)}s[y]=void 0}else{const b=Jr(f,t.mirror,r);i.nodeName==="#document"&&c&&(b.nodeType===b.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||b.nodeType===b.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(i.removeChild(c),t.mirror.removeNodeFromMap(c),c=s[++n]);try{i.insertBefore(b,c||null)}catch(v){console.warn(v)}}f=o[++l]}if(n>a){const S=o[u+1];let b=null;for(S&&(b=t.mirror.getNode(r.getId(S)));l<=u;++l){const v=Jr(o[l],t.mirror,r);try{i.insertBefore(v,b)}catch(C){console.warn(C)}}}else if(l>u)for(;n<=a;n++){const S=s[n];if(!(!S||S.parentNode!==i))try{i.removeChild(S),t.mirror.removeNodeFromMap(S)}catch(b){console.warn(b)}}let d=i.firstChild,g=e.firstChild;for(;d!==null&&g!==null;)Xr(d,g,t,r),d=d.nextSibling,g=g.nextSibling}function Jr(i,e,t){const r=t.getId(i),s=t.getMeta(i);let o=null;if(r>-1&&(o=e.getNode(r)),o!==null&&rn(o,i))return o;switch(i.RRNodeType){case B.Document:o=new Document;break;case B.DocumentType:o=document.implementation.createDocumentType(i.name,i.publicId,i.systemId);break;case B.Element:{let n=i.tagName.toLowerCase();n=hp[n]||n,s&&"isSVG"in s&&(s!=null&&s.isSVG)?o=document.createElementNS(vs.svg,n):o=document.createElement(i.tagName);break}case B.Text:o=document.createTextNode(i.data);break;case B.Comment:o=document.createComment(i.data);break;case B.CDATA:o=document.createCDATASection(i.data);break}s&&e.add(o,T({},s));try{Te==null||Te.add(o)}catch(n){}return o}function rn(i,e){return i.nodeType!==e.nodeType?!1:i.nodeType!==i.ELEMENT_NODE||i.tagName.toUpperCase()===e.tagName}function at(i,e,t,r){const s=t.getId(i),o=r.getId(e);return s===-1||s!==o?!1:rn(i,e)}class Mt extends en{constructor(e){super(),I(this,"UNSERIALIZED_STARTING_ID",-2),I(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),I(this,"mirror",Ip()),I(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new Mt}createDocumentType(e,t,r){const s=new mp(e,t,r);return s.ownerDocument=this,s}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new gp(t);break;case"IFRAME":r=new bp(t,this.mirror);break;case"CANVAS":r=new vp(t);break;case"STYLE":r=new wp(t);break;case"DIALOG":r=new yp(t);break;default:r=new di(t);break}return r.ownerDocument=this,r}createComment(e){const t=new Cp(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Ep(e);return t.ownerDocument=this,t}createTextNode(e){const t=new Sp(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 mp=fl;class di extends fi{constructor(){super(...arguments),I(this,"inputData",null),I(this,"scrollData",null)}}class gp extends lp{}class yp extends up{}class vp extends di{constructor(){super(...arguments),I(this,"rr_dataURL",null),I(this,"canvasMutations",[])}getContext(){return null}}class wp extends di{constructor(){super(...arguments),I(this,"rules",[])}}class bp extends di{constructor(e,t){super(e),I(this,"contentDocument",new Mt),this.contentDocument.mirror=t}}const Sp=dl,Cp=pl,Ep=ml;function xp(i){return i instanceof HTMLFormElement?"FORM":i.tagName.toUpperCase()}function wl(i,e,t,r){let s;switch(i.nodeType){case be.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?s=r.contentDocument:(s=e,s.compatMode=i.compatMode);break;case be.DOCUMENT_TYPE_NODE:{const n=i;s=e.createDocumentType(n.name,n.publicId,n.systemId);break}case be.ELEMENT_NODE:{const n=i,a=xp(n);s=e.createElement(a);const l=s;for(const{name:u,value:c}of Array.from(n.attributes))l.attributes[u]=c;n.scrollLeft&&(l.scrollLeft=n.scrollLeft),n.scrollTop&&(l.scrollTop=n.scrollTop);break}case be.TEXT_NODE:s=e.createTextNode(i.textContent||"");break;case be.CDATA_SECTION_NODE:s=e.createCDATASection(i.data);break;case be.COMMENT_NODE:s=e.createComment(i.textContent||"");break;case be.DOCUMENT_FRAGMENT_NODE:s=r.attachShadow({mode:"open"});break;default:return null}let o=t.getMeta(i);return e instanceof Mt&&(o||(o=bl(s,e.unserializedId),t.add(i,o)),e.mirror.add(s,T({},o))),s}function Mp(i,e=uf(),t=new Mt){function r(s,o){const n=wl(s,t,e,o);if(n!==null)if((o==null?void 0:o.nodeName)!=="IFRAME"&&s.nodeType!==be.DOCUMENT_FRAGMENT_NODE&&(o==null||o.appendChild(n),n.parentNode=o,n.parentElement=o),s.nodeName==="IFRAME"){const a=s.contentDocument;a&&r(a,n)}else(s.nodeType===be.DOCUMENT_NODE||s.nodeType===be.ELEMENT_NODE||s.nodeType===be.DOCUMENT_FRAGMENT_NODE)&&(s.nodeType===be.ELEMENT_NODE&&s.shadowRoot&&r(s.shadowRoot,n),s.childNodes.forEach(a=>r(a,n)))}return r(i,null),t}function Ip(){return new Np}class Np{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 s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(t,s)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function bl(i,e){switch(i.RRNodeType){case B.Document:return{id:e,type:i.RRNodeType,childNodes:[]};case B.DocumentType:{const t=i;return{id:e,type:i.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case B.Element:return{id:e,type:i.RRNodeType,tagName:i.tagName.toLowerCase(),attributes:{},childNodes:[]};case B.Text:return{id:e,type:i.RRNodeType,textContent:i.textContent||""};case B.Comment:return{id:e,type:i.RRNodeType,textContent:i.textContent||""};case B.CDATA:return{id:e,type:i.RRNodeType,textContent:""}}}const mo={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},go={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ir={},Ap=()=>!!globalThis.Zone;function sn(i){if(Ir[i])return Ir[i];const e=globalThis[i],t=e.prototype,r=i in mo?mo[i]:void 0,s=!!(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]"))})),o=i in go?go[i]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(s&&n&&!Ap())return Ir[i]=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[i].prototype;return document.body.removeChild(a),u?Ir[i]=u:t}catch(a){return t}}const Ai={};function Xe(i,e,t){var r;const s=`${i}.${String(t)}`;if(Ai[s])return Ai[s].call(e);const o=sn(i),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(Ai[s]=n,n.call(e)):e[t]}const Ri={};function Sl(i,e,t){const r=`${i}.${String(t)}`;if(Ri[r])return Ri[r].bind(e);const o=sn(i)[t];return typeof o!="function"?e[t]:(Ri[r]=o,o.bind(e))}function Rp(i){return Xe("Node",i,"childNodes")}function Op(i){return Xe("Node",i,"parentNode")}function Tp(i){return Xe("Node",i,"parentElement")}function Dp(i){return Xe("Node",i,"textContent")}function kp(i,e){return Sl("Node",i,"contains")(e)}function _p(i){return Sl("Node",i,"getRootNode")()}function $p(i){return!i||!("host"in i)?null:Xe("ShadowRoot",i,"host")}function Lp(i){return i.styleSheets}function Pp(i){return!i||!("shadowRoot"in i)?null:Xe("Element",i,"shadowRoot")}function Fp(i,e){return Xe("Element",i,"querySelector")(e)}function Bp(i,e){return Xe("Element",i,"querySelectorAll")(e)}function Cl(){return sn("MutationObserver").constructor}function rt(i,e,t){try{if(!(e in i))return()=>{};const r=i[e],s=t(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),i[e]=s,()=>{i[e]=r}}catch(r){return()=>{}}}function Up(i){const e=i.tagName.toLowerCase(),t=i.id?`#${i.id}`:"",r=i.classList.length?"."+Array.from(i.classList).join("."):"";return`${e}${t}${r}`}function Vp(i){var f;var e,t;const r=(f=(e=i.ownerDocument)==null?void 0:e.defaultView)!=null?f:window,s=i.getBoundingClientRect(),o=r.innerWidth||r.document.documentElement.clientWidth||0,n=r.innerHeight||r.document.documentElement.clientHeight||0,a=s.width>0&&s.height>0&&s.bottom>0&&s.right>0&&s.top<n&&s.left<o,l=(t=r.getComputedStyle)==null?void 0:t.call(r,i),c=!!l&&l.display!=="none"&&l.visibility!=="hidden"&&(parseFloat(l.opacity)||0)>0&&a;let h=0;if(c){const m=Math.max(0,Math.min(s.right,o)-Math.max(s.left,0)),p=Math.max(0,Math.min(s.bottom,n)-Math.max(s.top,0)),y=m*p,d=s.width*s.height;h=d>0?y/d:0}return{isVisible:c,ratio:h}}const _={childNodes:Rp,parentNode:Op,parentElement:Tp,textContent:Dp,contains:kp,getRootNode:_p,host:$p,styleSheets:Lp,shadowRoot:Pp,querySelector:Fp,querySelectorAll:Bp,mutationObserver:Cl,patch:rt,describeNode:Up,getElementVisibility:Vp};function fe(i,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(i,e,r),()=>t.removeEventListener(i,e,r)}const lt=`Please stop import mirror directly. Instead of that,\r
67
+ https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new Qs().version,a}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(n,a,l){return Y([s(l)]).process(n,a)},s};Y.stringify=Zd;Y.parse=Qd;Y.fromJSON=Xd;Y.list=ep;Y.comment=i=>new ll(i);Y.atRule=i=>new ul(i);Y.decl=i=>new ol(i);Y.rule=i=>new cl(i);Y.root=i=>new hl(i);Y.document=i=>new al(i);Y.CssSyntaxError=jd;Y.Declaration=ol;Y.Container=Yd;Y.Processor=Qs;Y.Document=al;Y.Comment=ll;Y.Warning=Jd;Y.AtRule=ul;Y.Result=Kd;Y.Input=qd;Y.Rule=cl;Y.Root=hl;Y.Node=tp;Hd.registerPostcss(Y);var rp=Y;Y.default=Y;const ie=pf(rp);ie.stringify;ie.fromJSON;ie.plugin;ie.parse;ie.list;ie.document;ie.comment;ie.atRule;ie.rule;ie.decl;ie.root;ie.CssSyntaxError;ie.Declaration;ie.Container;ie.Processor;ie.Document;ie.Comment;ie.Warning;ie.AtRule;ie.Result;ie.Input;ie.Rule;ie.Root;ie.Node;var B=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(B||{});function ip(i){const e={},t=/;(?![^(]*\))/g,r=/:(.+)/,s=/\/\*.*?\*\//g;return i.replace(s,"").split(t).forEach(function(o){if(o){const n=o.split(r);n.length>1&&(e[ys(n[0].trim())]=n[1].trim())}}),e}function po(i){const e=[];for(const t in i){const r=i[t];if(typeof r!="string")continue;const s=ap(t);e.push(`${s}: ${r};`)}return e.join(" ")}const sp=/-([a-z])/g,np=/^--[a-zA-Z0-9-]+$/,ys=i=>np.test(i)?i:i.replace(sp,(e,t)=>t?t.toUpperCase():""),op=/\B([A-Z])/g,ap=i=>i.replace(op,"-$1").toLowerCase();class Ae{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 Ae){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 en extends Ae{constructor(...e){super(e),I(this,"nodeType",9),I(this,"nodeName","#document"),I(this,"compatMode","CSS1Compat"),I(this,"RRNodeType",B.Document),I(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===B.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===B.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===B.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===B.Element||t===B.DocumentType)&&this.childNodes.some(s=>s.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===B.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=tn(this,e);return r.parentElement=null,r}insertBefore(e,t){const r=e.RRNodeType;if((r===B.Element||r===B.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===B.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=gl(this,e,t);return s.parentElement=null,s}removeChild(e){return yl(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 en}createDocumentType(e,t,r){const s=new fl(e,t,r);return s.ownerDocument=this,s}createElement(e){const t=new fi(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new dl(e);return t.ownerDocument=this,t}createComment(e){const t=new pl(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new ml(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class fl extends Ae{constructor(e,t,r){super(),I(this,"nodeType",10),I(this,"RRNodeType",B.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 fi extends Ae{constructor(e){super(),I(this,"nodeType",1),I(this,"RRNodeType",B.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 cp(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?ip(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,s,o)=>{if(t.test(r))return;const n=ys(r);s?e[n]=s:delete e[n],o==="important"&&(e[n]+=" !important"),this.attributes.style=po(e)},e.removeProperty=r=>{if(t.test(r))return"";const s=ys(r),o=e[s]||"";return delete e[s],this.attributes.style=po(e),o},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 tn(this,e)}insertBefore(e,t){return gl(this,e,t)}removeChild(e){return yl(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 lp extends fi{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 up extends fi{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 dl extends Ae{constructor(e){super(),I(this,"nodeType",3),I(this,"nodeName","#text"),I(this,"RRNodeType",B.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 pl extends Ae{constructor(e){super(),I(this,"nodeType",8),I(this,"nodeName","#comment"),I(this,"RRNodeType",B.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 ml extends Ae{constructor(e){super(),I(this,"nodeName","#cdata-section"),I(this,"nodeType",4),I(this,"RRNodeType",B.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 cp{constructor(e,t){if(I(this,"onChange"),I(this,"classes",[]),I(this,"add",(...r)=>{for(const s of r){const o=String(s);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),I(this,"remove",(...r)=>{this.classes=this.classes.filter(s=>r.indexOf(s)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}}function tn(i,e){return e.parentNode&&e.parentNode.removeChild(e),i.lastChild?(i.lastChild.nextSibling=e,e.previousSibling=i.lastChild):(i.firstChild=e,e.previousSibling=null),i.lastChild=e,e.nextSibling=null,e.parentNode=i,e.parentElement=i,e.ownerDocument=i.ownerDocument,e}function gl(i,e,t){if(!t)return tn(i,e);if(t.parentNode!==i)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:i.firstChild=e,e.parentElement=i,e.parentNode=i,e.ownerDocument=i.ownerDocument),e}function yl(i,e){if(e.parentNode!==i)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:i.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:i.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var be=(i=>(i[i.PLACEHOLDER=0]="PLACEHOLDER",i[i.ELEMENT_NODE=1]="ELEMENT_NODE",i[i.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",i[i.TEXT_NODE=3]="TEXT_NODE",i[i.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",i[i.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",i[i.ENTITY_NODE=6]="ENTITY_NODE",i[i.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",i[i.COMMENT_NODE=8]="COMMENT_NODE",i[i.DOCUMENT_NODE=9]="DOCUMENT_NODE",i[i.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",i[i.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",i))(be||{});const vs={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},hp={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 Te=null;function Xr(i,e,t,r=e.mirror||e.ownerDocument.mirror){i=fp(i,e,t,r),vl(i,e,t,r),dp(i,e,t)}function fp(i,e,t,r){var s;if(t.afterAppend&&!Te&&(Te=new WeakSet,setTimeout(()=>{Te=null},0)),!rn(i,e)){const o=Jr(e,t.mirror,r);(s=i.parentNode)==null||s.replaceChild(o,i),i=o}switch(e.RRNodeType){case B.Document:{if(!at(i,e,t.mirror,r)){const o=r.getMeta(e);o&&(t.mirror.removeNodeFromMap(i),i.close(),i.open(),t.mirror.add(i,o),Te==null||Te.add(i))}break}case B.Element:{const o=i,n=e;switch(n.tagName){case"IFRAME":{const a=i.contentDocument;if(!a)break;Xr(a,e.contentDocument,t,r);break}}n.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),vl(o.shadowRoot,n.shadowRoot,t,r)),pp(o,n,r);break}}return i}function dp(i,e,t){var r;switch(e.RRNodeType){case B.Document:{const s=e.scrollData;s&&t.applyScroll(s,!0);break}case B.Element:{const s=i,o=e;switch(o.scrollData&&t.applyScroll(o.scrollData,!0),o.inputData&&t.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{const n=i,a=o;a.paused!==void 0&&(a.paused?n.pause():n.play()),a.muted!==void 0&&(n.muted=a.muted),a.volume!==void 0&&(n.volume=a.volume),a.currentTime!==void 0&&(n.currentTime=a.currentTime),a.playbackRate!==void 0&&(n.playbackRate=a.playbackRate),a.loop!==void 0&&(n.loop=a.loop);break}case"CANVAS":{const n=e;if(n.rr_dataURL!==null){const a=document.createElement("img");a.onload=()=>{const l=s.getContext("2d");l&&l.drawImage(a,0,0,a.width,a.height)},a.src=n.rr_dataURL}n.canvasMutations.forEach(a=>t.applyCanvas(a.event,a.mutation,i));break}case"STYLE":{const n=s.sheet;n&&e.rules.forEach(a=>t.applyStyleSheetMutation(a,n));break}case"DIALOG":{const n=s,a=o,l=n.open,u=n.matches("dialog:modal"),c=a.open,h=a.isModal,f=u!==h,m=l!==c;if((f||l&&m)&&n.close(),c&&(m||f))try{h?n.showModal():n.show()}catch(p){console.warn(p)}break}}break}case B.Text:case B.Comment:case B.CDATA:{i.textContent!==e.data&&(i.textContent=e.data);break}}Te!=null&&Te.has(i)&&(Te.delete(i),(r=t.afterAppend)==null||r.call(t,i,t.mirror.getId(i)))}function pp(i,e,t){const r=i.attributes,s=e.attributes;for(const o in s){const n=s[o],a=t.getMeta(e);if(a!=null&&a.isSVG&&vs[o])i.setAttributeNS(vs[o],o,n);else if(e.tagName==="CANVAS"&&o==="rr_dataURL"){const l=document.createElement("img");l.src=n,l.onload=()=>{const u=i.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&o==="srcdoc")continue;try{i.setAttribute(o,n)}catch(l){console.warn(l)}}}for(const{name:o}of Array.from(r))o in s||i.removeAttribute(o);e.scrollLeft&&(i.scrollLeft=e.scrollLeft),e.scrollTop&&(i.scrollTop=e.scrollTop)}function vl(i,e,t,r){const s=Array.from(i.childNodes),o=e.childNodes;if(s.length===0&&o.length===0)return;let n=0,a=s.length-1,l=0,u=o.length-1,c=s[n],h=s[a],f=o[l],m=o[u],p,y;for(;n<=a&&l<=u;)if(c===void 0)c=s[++n];else if(h===void 0)h=s[--a];else if(at(c,f,t.mirror,r))c=s[++n],f=o[++l];else if(at(h,m,t.mirror,r))h=s[--a],m=o[--u];else if(at(c,m,t.mirror,r)){try{i.insertBefore(c,h.nextSibling)}catch(S){console.warn(S)}c=s[++n],m=o[--u]}else if(at(h,f,t.mirror,r)){try{i.insertBefore(h,c)}catch(S){console.warn(S)}h=s[--a],f=o[++l]}else{if(!p){p={};for(let b=n;b<=a;b++){const v=s[b];v&&t.mirror.hasNode(v)&&(p[t.mirror.getId(v)]=b)}}y=p[r.getId(f)];const S=s[y];if(y!==void 0&&S&&at(S,f,t.mirror,r)){try{i.insertBefore(S,c)}catch(b){console.warn(b)}s[y]=void 0}else{const b=Jr(f,t.mirror,r);i.nodeName==="#document"&&c&&(b.nodeType===b.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||b.nodeType===b.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(i.removeChild(c),t.mirror.removeNodeFromMap(c),c=s[++n]);try{i.insertBefore(b,c||null)}catch(v){console.warn(v)}}f=o[++l]}if(n>a){const S=o[u+1];let b=null;for(S&&(b=t.mirror.getNode(r.getId(S)));l<=u;++l){const v=Jr(o[l],t.mirror,r);try{i.insertBefore(v,b)}catch(C){console.warn(C)}}}else if(l>u)for(;n<=a;n++){const S=s[n];if(!(!S||S.parentNode!==i))try{i.removeChild(S),t.mirror.removeNodeFromMap(S)}catch(b){console.warn(b)}}let d=i.firstChild,g=e.firstChild;for(;d!==null&&g!==null;)Xr(d,g,t,r),d=d.nextSibling,g=g.nextSibling}function Jr(i,e,t){const r=t.getId(i),s=t.getMeta(i);let o=null;if(r>-1&&(o=e.getNode(r)),o!==null&&rn(o,i))return o;switch(i.RRNodeType){case B.Document:o=new Document;break;case B.DocumentType:o=document.implementation.createDocumentType(i.name,i.publicId,i.systemId);break;case B.Element:{let n=i.tagName.toLowerCase();n=hp[n]||n,s&&"isSVG"in s&&(s!=null&&s.isSVG)?o=document.createElementNS(vs.svg,n):o=document.createElement(i.tagName);break}case B.Text:o=document.createTextNode(i.data);break;case B.Comment:o=document.createComment(i.data);break;case B.CDATA:o=document.createCDATASection(i.data);break}s&&e.add(o,T({},s));try{Te==null||Te.add(o)}catch(n){}return o}function rn(i,e){return i.nodeType!==e.nodeType?!1:i.nodeType!==i.ELEMENT_NODE||i.tagName.toUpperCase()===e.tagName}function at(i,e,t,r){const s=t.getId(i),o=r.getId(e);return s===-1||s!==o?!1:rn(i,e)}class xt extends en{constructor(e){super(),I(this,"UNSERIALIZED_STARTING_ID",-2),I(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),I(this,"mirror",Ip()),I(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new xt}createDocumentType(e,t,r){const s=new mp(e,t,r);return s.ownerDocument=this,s}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new gp(t);break;case"IFRAME":r=new bp(t,this.mirror);break;case"CANVAS":r=new vp(t);break;case"STYLE":r=new wp(t);break;case"DIALOG":r=new yp(t);break;default:r=new di(t);break}return r.ownerDocument=this,r}createComment(e){const t=new Cp(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Ep(e);return t.ownerDocument=this,t}createTextNode(e){const t=new Sp(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 mp=fl;class di extends fi{constructor(){super(...arguments),I(this,"inputData",null),I(this,"scrollData",null)}}class gp extends lp{}class yp extends up{}class vp extends di{constructor(){super(...arguments),I(this,"rr_dataURL",null),I(this,"canvasMutations",[])}getContext(){return null}}class wp extends di{constructor(){super(...arguments),I(this,"rules",[])}}class bp extends di{constructor(e,t){super(e),I(this,"contentDocument",new xt),this.contentDocument.mirror=t}}const Sp=dl,Cp=pl,Ep=ml;function Mp(i){return i instanceof HTMLFormElement?"FORM":i.tagName.toUpperCase()}function wl(i,e,t,r){let s;switch(i.nodeType){case be.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?s=r.contentDocument:(s=e,s.compatMode=i.compatMode);break;case be.DOCUMENT_TYPE_NODE:{const n=i;s=e.createDocumentType(n.name,n.publicId,n.systemId);break}case be.ELEMENT_NODE:{const n=i,a=Mp(n);s=e.createElement(a);const l=s;for(const{name:u,value:c}of Array.from(n.attributes))l.attributes[u]=c;n.scrollLeft&&(l.scrollLeft=n.scrollLeft),n.scrollTop&&(l.scrollTop=n.scrollTop);break}case be.TEXT_NODE:s=e.createTextNode(i.textContent||"");break;case be.CDATA_SECTION_NODE:s=e.createCDATASection(i.data);break;case be.COMMENT_NODE:s=e.createComment(i.textContent||"");break;case be.DOCUMENT_FRAGMENT_NODE:s=r.attachShadow({mode:"open"});break;default:return null}let o=t.getMeta(i);return e instanceof xt&&(o||(o=bl(s,e.unserializedId),t.add(i,o)),e.mirror.add(s,T({},o))),s}function xp(i,e=uf(),t=new xt){function r(s,o){const n=wl(s,t,e,o);if(n!==null)if((o==null?void 0:o.nodeName)!=="IFRAME"&&s.nodeType!==be.DOCUMENT_FRAGMENT_NODE&&(o==null||o.appendChild(n),n.parentNode=o,n.parentElement=o),s.nodeName==="IFRAME"){const a=s.contentDocument;a&&r(a,n)}else(s.nodeType===be.DOCUMENT_NODE||s.nodeType===be.ELEMENT_NODE||s.nodeType===be.DOCUMENT_FRAGMENT_NODE)&&(s.nodeType===be.ELEMENT_NODE&&s.shadowRoot&&r(s.shadowRoot,n),s.childNodes.forEach(a=>r(a,n)))}return r(i,null),t}function Ip(){return new Np}class Np{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 s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(t,s)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function bl(i,e){switch(i.RRNodeType){case B.Document:return{id:e,type:i.RRNodeType,childNodes:[]};case B.DocumentType:{const t=i;return{id:e,type:i.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case B.Element:return{id:e,type:i.RRNodeType,tagName:i.tagName.toLowerCase(),attributes:{},childNodes:[]};case B.Text:return{id:e,type:i.RRNodeType,textContent:i.textContent||""};case B.Comment:return{id:e,type:i.RRNodeType,textContent:i.textContent||""};case B.CDATA:return{id:e,type:i.RRNodeType,textContent:""}}}const mo={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},go={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ir={},Ap=()=>!!globalThis.Zone;function sn(i){if(Ir[i])return Ir[i];const e=globalThis[i],t=e.prototype,r=i in mo?mo[i]:void 0,s=!!(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]"))})),o=i in go?go[i]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(s&&n&&!Ap())return Ir[i]=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[i].prototype;return document.body.removeChild(a),u?Ir[i]=u:t}catch(a){return t}}const Ai={};function Xe(i,e,t){var r;const s=`${i}.${String(t)}`;if(Ai[s])return Ai[s].call(e);const o=sn(i),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(Ai[s]=n,n.call(e)):e[t]}const Ri={};function Sl(i,e,t){const r=`${i}.${String(t)}`;if(Ri[r])return Ri[r].bind(e);const o=sn(i)[t];return typeof o!="function"?e[t]:(Ri[r]=o,o.bind(e))}function Rp(i){return Xe("Node",i,"childNodes")}function Op(i){return Xe("Node",i,"parentNode")}function Tp(i){return Xe("Node",i,"parentElement")}function Dp(i){return Xe("Node",i,"textContent")}function kp(i,e){return Sl("Node",i,"contains")(e)}function _p(i){return Sl("Node",i,"getRootNode")()}function $p(i){return!i||!("host"in i)?null:Xe("ShadowRoot",i,"host")}function Lp(i){return i.styleSheets}function Pp(i){return!i||!("shadowRoot"in i)?null:Xe("Element",i,"shadowRoot")}function Fp(i,e){return Xe("Element",i,"querySelector")(e)}function Bp(i,e){return Xe("Element",i,"querySelectorAll")(e)}function Cl(){return sn("MutationObserver").constructor}function rt(i,e,t){try{if(!(e in i))return()=>{};const r=i[e],s=t(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),i[e]=s,()=>{i[e]=r}}catch(r){return()=>{}}}function Up(i){const e=i.tagName.toLowerCase(),t=i.id?`#${i.id}`:"",r=i.classList.length?"."+Array.from(i.classList).join("."):"";return`${e}${t}${r}`}function Vp(i){var f;var e,t;const r=(f=(e=i.ownerDocument)==null?void 0:e.defaultView)!=null?f:window,s=i.getBoundingClientRect(),o=r.innerWidth||r.document.documentElement.clientWidth||0,n=r.innerHeight||r.document.documentElement.clientHeight||0,a=s.width>0&&s.height>0&&s.bottom>0&&s.right>0&&s.top<n&&s.left<o,l=(t=r.getComputedStyle)==null?void 0:t.call(r,i),c=!!l&&l.display!=="none"&&l.visibility!=="hidden"&&(parseFloat(l.opacity)||0)>0&&a;let h=0;if(c){const m=Math.max(0,Math.min(s.right,o)-Math.max(s.left,0)),p=Math.max(0,Math.min(s.bottom,n)-Math.max(s.top,0)),y=m*p,d=s.width*s.height;h=d>0?y/d:0}return{isVisible:c,ratio:h}}const _={childNodes:Rp,parentNode:Op,parentElement:Tp,textContent:Dp,contains:kp,getRootNode:_p,host:$p,styleSheets:Lp,shadowRoot:Pp,querySelector:Fp,querySelectorAll:Bp,mutationObserver:Cl,patch:rt,describeNode:Up,getElementVisibility:Vp};function fe(i,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(i,e,r),()=>t.removeEventListener(i,e,r)}const lt=`Please stop import mirror directly. Instead of that,\r
68
68
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
69
- or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(lt),-1},getNode(){return console.error(lt),null},removeNodeFromMap(){console.error(lt)},has(){return console.error(lt),!1},reset(){console.error(lt)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(i,e,t){return e==="map"&&console.error(lt),Reflect.get(i,e,t)}}));function Et(i,e,t={}){let r=null,s=0;return function(...o){const n=Date.now();!s&&t.leading===!1&&(s=n);const a=e-(n-s),l=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),s=n,i.apply(l,o)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{s=t.leading===!1?0:Date.now(),r=null,i.apply(l,o)},a))}}function ir(i,e,t,r,s=window){const o=s.Object.getOwnPropertyDescriptor(i,e);return s.Object.defineProperty(i,e,r?t:{set(n){setTimeout(()=>{t.set.call(this,n)},0),o&&o.set&&o.set.call(this,n)}}),()=>ir(i,e,o||{},!0)}function Me(){return Math.round(performance.timeOrigin+performance.now())}function nn(i=window){var e,t,r,s;const o=i.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:i.pageXOffset!==void 0?i.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((e=_.parentElement(o.body))==null?void 0:e.scrollLeft)||((t=o==null?void 0:o.body)==null?void 0:t.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:i.pageYOffset!==void 0?i.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((r=_.parentElement(o.body))==null?void 0:r.scrollTop)||((s=o==null?void 0:o.body)==null?void 0:s.scrollTop)||0}}function on(i=window){const e=i.document;return i.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function an(i=window){const e=i.document;return i.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function ln(i){return i?i.nodeType===i.ELEMENT_NODE?i:_.parentElement(i):null}function de(i,e,t,r){if(!i)return!1;const s=ln(i);if(!s)return!1;try{if(typeof e=="string"){if(s.classList.contains(e)||r&&s.closest("."+e)!==null)return!0}else if(Ur(s,e,r))return!0}catch(o){}return!!(t&&(s.matches(t)||r&&s.closest(t)!==null))}function El(i,e){return e.getId(i)!==-1}function $r(i,e,t){return i.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(i)===Wt}function un(i,e){if(Ft(i))return!1;const t=e.getId(i);if(!e.has(t))return!0;const r=_.parentNode(i);return r&&r.nodeType===i.DOCUMENT_NODE?!1:r?un(r,e):!0}function Kr(i){return!!i.changedTouches}function cn(i=window){"NodeList"in i&&!i.NodeList.prototype.forEach&&(i.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in i&&!i.DOMTokenList.prototype.forEach&&(i.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function xl(i){const e={},t=(s,o)=>{const n={value:s,parent:o,children:[]};return e[s.node.id]=n,n},r=[];for(const s of i){const{nextId:o,parentId:n}=s;if(o&&o in e){const a=e[o];if(a.parent){const l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,t(s,a.parent))}else{const l=r.indexOf(a);r.splice(l,0,t(s,null))}continue}if(n in e){const a=e[n];a.children.push(t(s,a));continue}r.push(t(s,null))}return r}function hn(i,e){e(i.value);for(let t=i.children.length-1;t>=0;t--)hn(i.children[t],e)}function mt(i,e){return!!(i.nodeName==="IFRAME"&&e.getMeta(i))}function fn(i,e){return!!(i.nodeName==="LINK"&&i.nodeType===i.ELEMENT_NODE&&i.getAttribute&&i.getAttribute("rel")==="stylesheet"&&e.getMeta(i))}function dn(i,e){var t,r;const s=(r=(t=i.ownerDocument)==null?void 0:t.defaultView)==null?void 0:r.frameElement;if(!s||s===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=s.getBoundingClientRect(),n=dn(s,e),a=o.height/s.clientHeight;return{x:o.x*n.relativeScale+n.x,y:o.y*n.relativeScale+n.y,relativeScale:a,absoluteScale:n.absoluteScale*a}}function Ge(i){return i?i instanceof Ae&&"shadowRoot"in i?!!i.shadowRoot:!!_.shadowRoot(i):!1}function ft(i,e){const t=i[e[0]];return e.length===1?t:ft(t.cssRules[e[1]].cssRules,e.slice(2))}function ws(i){const e=[...i],t=e.pop();return{positions:e,index:t}}function Ml(i){const e=new Set,t=[];for(let r=i.length;r--;){const s=i[r];e.has(s.id)||(t.push(s),e.add(s.id))}return t}class pn{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(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 mn(i){var e;let t=null;return"getRootNode"in i&&((e=_.getRootNode(i))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&_.host(_.getRootNode(i))&&(t=_.host(_.getRootNode(i))),t}function Il(i){let e=i,t;for(;t=mn(e);)e=t;return e}function Nl(i){const e=i.ownerDocument;if(!e)return!1;const t=Il(i);return _.contains(e,t)}function gn(i){const e=i.ownerDocument;return e?_.contains(e,i)||Nl(i):!1}const Wp=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:pn,get _mirror(){return exports.mirror},closestElementOfNode:ln,getBaseDimension:dn,getNestedRule:ft,getPositionsAndIndex:ws,getRootShadowHost:Il,getShadowHost:mn,getWindowHeight:on,getWindowScroll:nn,getWindowWidth:an,hasShadowRoot:Ge,hookSetter:ir,inDom:gn,isAncestorRemoved:un,isBlocked:de,isIgnored:$r,isSerialized:El,isSerializedIframe:mt,isSerializedStylesheet:fn,iterateResolveTree:hn,legacy_isTouchEvent:Kr,nowTimestamp:Me,on:fe,polyfill:cn,queueToResolveTrees:xl,shadowHostInDom:Nl,throttle:Et,uniqueTextMutations:Ml},Symbol.toStringTag,{value:"Module"}));var O=(i=>(i[i.DomContentLoaded=0]="DomContentLoaded",i[i.Load=1]="Load",i[i.FullSnapshot=2]="FullSnapshot",i[i.IncrementalSnapshot=3]="IncrementalSnapshot",i[i.Meta=4]="Meta",i[i.Custom=5]="Custom",i[i.Plugin=6]="Plugin",i))(O||{}),M=(i=>(i[i.Mutation=0]="Mutation",i[i.MouseMove=1]="MouseMove",i[i.MouseInteraction=2]="MouseInteraction",i[i.Scroll=3]="Scroll",i[i.ViewportResize=4]="ViewportResize",i[i.Input=5]="Input",i[i.TouchMove=6]="TouchMove",i[i.MediaInteraction=7]="MediaInteraction",i[i.StyleSheetRule=8]="StyleSheetRule",i[i.CanvasMutation=9]="CanvasMutation",i[i.Font=10]="Font",i[i.Log=11]="Log",i[i.Drag=12]="Drag",i[i.StyleDeclaration=13]="StyleDeclaration",i[i.Selection=14]="Selection",i[i.AdoptedStyleSheet=15]="AdoptedStyleSheet",i[i.CustomElement=16]="CustomElement",i[i.VisibilityMutation=17]="VisibilityMutation",i))(M||{}),W=(i=>(i[i.MouseUp=0]="MouseUp",i[i.MouseDown=1]="MouseDown",i[i.Click=2]="Click",i[i.ContextMenu=3]="ContextMenu",i[i.DblClick=4]="DblClick",i[i.Focus=5]="Focus",i[i.Blur=6]="Blur",i[i.TouchStart=7]="TouchStart",i[i.TouchMove_Departed=8]="TouchMove_Departed",i[i.TouchEnd=9]="TouchEnd",i[i.TouchCancel=10]="TouchCancel",i))(W||{}),$e=(i=>(i[i.Mouse=0]="Mouse",i[i.Pen=1]="Pen",i[i.Touch=2]="Touch",i))($e||{}),Be=(i=>(i[i["2D"]=0]="2D",i[i.WebGL=1]="WebGL",i[i.WebGL2=2]="WebGL2",i))(Be||{}),ze=(i=>(i[i.Play=0]="Play",i[i.Pause=1]="Pause",i[i.Seeked=2]="Seeked",i[i.VolumeChange=3]="VolumeChange",i[i.RateChange=4]="RateChange",i))(ze||{}),V=(i=>(i.Start="start",i.Pause="pause",i.Resume="resume",i.Resize="resize",i.Finish="finish",i.FullsnapshotRebuilded="fullsnapshot-rebuilded",i.LoadStylesheetStart="load-stylesheet-start",i.LoadStylesheetEnd="load-stylesheet-end",i.SkipStart="skip-start",i.SkipEnd="skip-end",i.MouseInteraction="mouse-interaction",i.EventCast="event-cast",i.CustomEvent="custom-event",i.Flush="flush",i.StateChange="state-change",i.PlayBack="play-back",i.Destroy="destroy",i))(V||{}),Le=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(Le||{});function yo(i){return"__ln"in i}class zp{constructor(){w(this,"length",0),w(this,"head",null),w(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&&yo(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&&yo(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 vo=(i,e)=>`${i}@${e}`;class Gp{constructor(){w(this,"frozen",!1),w(this,"locked",!1),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"excludeAttribute"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"visibilityManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new zp,s=l=>{let u=l,c=Wt;for(;c===Wt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},o=l=>{const u=_.parentNode(l);if(!u||!gn(l))return;let c=!1;if(l.nodeType===Node.TEXT_NODE){const p=u.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=Ft(u)?this.mirror.getId(mn(l)):this.mirror.getId(u),f=s(l);if(h===-1||f===-1)return r.addNode(l);const m=ht(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,excludeAttribute:this.excludeAttribute,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:p=>{mt(p,this.mirror)&&this.iframeManager.addIframe(p),fn(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Ge(l)&&this.shadowDomManager.addShadowRoot(_.shadowRoot(l),this.doc)},onIframeLoad:(p,y)=>{this.iframeManager.attachIframe(p,y),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,y)=>{this.stylesheetManager.attachLinkElement(p,y)},cssCaptured:c});m&&(e.push({parentId:h,nextId:f,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)wo(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(_.parentNode(l))||o(l);for(const l of this.addedSet)!bo(this.droppedSet,l)&&!wo(this.removesSubTreeCache,l,this.mirror)||bo(this.movedSet,l)?o(l):this.droppedSet.add(l);let n=null;for(;r.length;){let l=null;if(n){const u=this.mirror.getId(_.parentNode(n.value)),c=s(n.value);u!==-1&&c!==-1&&(l=n)}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(s(c.value)===-1)continue;if(h!==-1){l=c;break}else{const m=c.value,p=_.parentNode(m);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const y=_.host(p);if(this.mirror.getId(y)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}n=l.previous,r.removeNode(l.value),o(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))}),w(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),s=>_.textContent(s)||"").join("");t.attributes.value=Pr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Fr(e),value:r,maskInputFn:this.maskInputFn})}),w(this,"processMutation",e=>{if(!$r(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:Ho(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,ln(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,s=e.target.getAttribute(r);const n=t[r],a=typeof n=="boolean",l=document.contains(t),u=Ts(t),c=Ui(r,this.excludeAttribute);if(s===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(n===""||n===null||typeof n=="undefined")){console.debug(`[${Me()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:_.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:s,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:a,inDOM:l,isVisible:u,isExcludeAttributeName:c});return}if(Ui(r,this.excludeAttribute)){console.debug(`[${Me()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:_.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:s,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:a,inDOM:l,isVisible:u,isExcludeAttributeName:c});return}if(r==="value"){const m=Fr(t);s=Pr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:m,value:s,maskInputFn:this.maskInputFn})}if(de(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let f=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!t.contentDocument)r="rr_src";else return;if(f||(f={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(f),this.attributeMap.set(e.target,f)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!jo(t.tagName,r))if(f.attributes[r]=Go(this.doc,He(t.tagName),He(r),s),r!=="class"&&(e.oldValue===null||s===""||s!==e.oldValue)&&console.debug(`[${Me()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[s===e.oldValue?"no change in value":null,s===n?"mirrored in DOM property":null,s===f.attributes[r]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:_.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:s,oldValue:e.oldValue,transformedValue:f.attributes[r],excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:a,inDOM:l,isVisible:u,isExcludeAttributeName:c}),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(y){this.unattachedDoc=this.doc}const p=this.unattachedDoc.createElement("span");e.oldValue&&p.setAttribute("style",e.oldValue);for(const y of Array.from(t.style)){const d=t.style.getPropertyValue(y),g=t.style.getPropertyPriority(y);d!==p.style.getPropertyValue(y)||g!==p.style.getPropertyPriority(y)?g===""?f.styleDiff[y]=d:f.styleDiff[y]=[d,g]:f._unchangedStyles[y]=[d,g]}for(const y of Array.from(p.style))t.style.getPropertyValue(y)===""&&(f.styleDiff[y]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?f.attributes.rr_open_mode="modal":f.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),s=Ft(e.target)?this.mirror.getId(_.host(e.target)):this.mirror.getId(e.target);de(e.target,this.blockClass,this.blockSelector,!1)||$r(t,this.mirror,this.slimDOMOptions)||!El(t,this.mirror)||(this.addedSet.has(t)?(bs(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||un(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[vo(r,s)]?bs(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:Ft(e.target)&&Bt(e.target)?!0:void 0}),jp(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if($r(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[vo(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)),Ge(e)&&_.childNodes(_.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","visibilityManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze(),this.visibilityManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.visibilityManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock(),this.visibilityManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.visibilityManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset(),this.visibilityManager.reset()}}function bs(i,e){i.delete(e),_.childNodes(e).forEach(t=>bs(i,t))}function jp(i,e){const t=[i];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),_.childNodes(r).forEach(s=>t.push(s)))}}function wo(i,e,t){return i.size===0?!1:Hp(i,e)}function Hp(i,e,t){const r=_.parentNode(e);return r?i.has(r):!1}function bo(i,e){return i.size===0?!1:Al(i,e)}function Al(i,e){const t=_.parentNode(e);return t?i.has(t)?!0:Al(i,t):!1}let Vt;function Yp(i){Vt=i}function Zp(){Vt=void 0}const U=i=>Vt?(...t)=>{try{return i(...t)}catch(r){if(Vt&&Vt(r)===!0)return;throw r}}:i,qe=[];function xt(i){try{if("composedPath"in i){const e=i.composedPath();if(e.length)return e[0]}else if("path"in i&&i.path.length)return i.path[0]}catch(e){}return i&&i.target}function Rl(i,e){const t=new Gp;qe.push(t),t.init(i);const r=new(Cl())(U(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Xp({mousemoveCb:i,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const s=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let n=[],a;const l=Et(U(h=>{const f=Date.now()-a;i(n.map(m=>(m.timeOffset-=f,m)),h),n=[],a=null}),o),u=U(Et(U(h=>{const f=xt(h),{clientX:m,clientY:p}=Kr(h)?h.changedTouches[0]:h;a||(a=Me()),n.push({x:m,y:p,id:r.getId(f),timeOffset:Me()-a}),l(typeof DragEvent!="undefined"&&h instanceof DragEvent?M.Drag:h instanceof MouseEvent?M.MouseMove:M.TouchMove)}),s,{trailing:!1})),c=[fe("mousemove",u,t),fe("touchmove",u,t),fe("drag",u,t)];return U(()=>{c.forEach(h=>h())})}function Jp({mouseInteractionCb:i,doc:e,mirror:t,blockClass:r,blockSelector:s,sampling:o}){if(o.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const n=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[];let l=null;const u=c=>h=>{const f=xt(h);if(de(f,r,s,!0))return;let m=null,p=c;if("pointerType"in h){switch(h.pointerType){case"mouse":m=$e.Mouse;break;case"touch":m=$e.Touch;break;case"pen":m=$e.Pen;break}m===$e.Touch?W[c]===W.MouseDown?p="TouchStart":W[c]===W.MouseUp&&(p="TouchEnd"):$e.Pen}else Kr(h)&&(m=$e.Touch);m!==null?(l=m,(p.startsWith("Touch")&&m===$e.Touch||p.startsWith("Mouse")&&m===$e.Mouse)&&(m=null)):W[c]===W.Click&&(m=l,l=null);const y=Kr(h)?h.changedTouches[0]:h;if(!y)return;const d=t.getId(f),{clientX:g,clientY:S}=y;U(i)(T({type:W[p],id:d,x:g,y:S},m!==null&&{pointerType:m}))};return Object.keys(W).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&n[c]!==!1).forEach(c=>{let h=He(c);const f=u(c);if(window.PointerEvent)switch(W[c]){case W.MouseDown:case W.MouseUp:h=h.replace("mouse","pointer");break;case W.TouchStart:case W.TouchEnd:return}a.push(fe(h,f,e))}),U(()=>{a.forEach(c=>c())})}function Ol({scrollCb:i,doc:e,mirror:t,blockClass:r,blockSelector:s,sampling:o}){const n=U(Et(U(a=>{const l=xt(a);if(!l||de(l,r,s,!0))return;const u=t.getId(l);if(l===e&&e.defaultView){const c=nn(e.defaultView);i({id:u,x:c.left,y:c.top})}else i({id:u,x:l.scrollLeft,y:l.scrollTop})}),o.scroll||100));return fe("scroll",n,e)}function Kp({viewportResizeCb:i},{win:e}){let t=-1,r=-1;const s=U(Et(U(()=>{const o=on(),n=an();(t!==o||r!==n)&&(i({width:Number(n),height:Number(o)}),t=o,r=n)}),200));return fe("resize",s,e)}const Oi=["INPUT","TEXTAREA","SELECT"],So=new WeakMap,Qp=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],Co=new WeakMap;function qp({inputCb:i,doc:e,mirror:t,blockClass:r,blockSelector:s,ignoreClass:o,ignoreSelector:n,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function h(b){let v=xt(b);const C=b.isTrusted,x=v&&v.tagName;if(v&&x==="OPTION"&&(v=_.parentElement(v)),!v||!x||Oi.indexOf(x)<0||de(v,r,s,!0)||v.classList.contains(o)||n&&v.matches(n))return;let R=v.value,E=!1;const k=Fr(v)||"";k==="radio"||k==="checkbox"?E=v.checked:(a[x.toLowerCase()]||a[k])&&(R=Pr({element:v,maskInputOptions:a,tagName:x,type:k,value:R,maskInputFn:l})),f(v,c?{text:R,isChecked:E,userTriggered:C}:{text:R,isChecked:E});const D=v.name;k==="radio"&&D&&E&&e.querySelectorAll(`input[type="radio"][name="${D}"]`).forEach(j=>{if(j!==v){const P=j.value;f(j,c?{text:P,isChecked:!E,userTriggered:!1}:{text:P,isChecked:!E})}})}function f(b,v){const C=So.get(b),x=b,R=x.hasAttribute("placeholder"),E=x.value==="",k=typeof x.defaultValue=="string"?x.defaultValue==="":!0,D=!v.userTriggered,j=!C||C.text==="",P=R&&E&&k&&j&&D&&!v.isChecked&&x.type!=="hidden"&&Oi.includes(x.tagName),z=x.tagName==="INPUT"&&x.type==="text"&&!v.userTriggered&&v.text===x.defaultValue&&!C&&x.hasAttribute("placeholder"),N=!v.userTriggered&&x.value===x.defaultValue&&!C&&x.hasAttribute("placeholder")&&!v.isChecked&&x.type!=="hidden"&&Oi.includes(x.tagName),G=x.type==="checkbox"&&!v.userTriggered&&!v.isChecked&&!C,F=x.type==="radio"&&!v.userTriggered&&!v.isChecked&&!C;if(P||z||N||G||F){console.debug(`[${Me()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:_.describeNode(x),tag:x.tagName,nodeType:x.nodeType,attribute:x.attributes,value:x.value,isLikelyPhantom:P,isRenderDrivenTextInput:z,isValueFromDefault:N,isPhantomCheckbox:G,isPhantomRadio:F});return}if(!C||C.text!==v.text||C.isChecked!==v.isChecked){So.set(b,v);const A=t.getId(b);U(i)(ae(T({},v),{id:A}))}}const p=(u.input==="last"?["change"]:["input","change"]).map(b=>fe(b,U(h),e)),y=b=>{const v=xt(b);if(!v||!v.tagName)return;if(u.input==="all"){h(b);return}const C=v.tagName,x=b.key,R=Qp.includes(x),E=C==="TEXTAREA",k=e.activeElement===v,D=v.value,j=Co.get(v);if(Co.set(v,D),!k){h(b);return}if(R){if(!E){h(b);return}let P=j!=null?j:"",z=0;const N=2,G=()=>{const F=v.value,A=e.activeElement===v,Z=F!==P;if(!A){h(b);return}if(Z)z=0,P=F;else if(z++,z>=N){h(b);return}requestAnimationFrame(G)};requestAnimationFrame(G);return}};p.push(fe("keydown",U(y),e));const d=e.defaultView;if(!d)return()=>{p.forEach(b=>b())};const g=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),S=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...S.map(b=>ir(b[0],b[1],{set(){U(h)({target:this,isTrusted:!1})}},!1,d))),U(()=>{p.forEach(b=>b())})}function Qr(i){const e=[];function t(r,s){if(Nr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Nr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Nr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Nr("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const n=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(n)}else if(r.parentStyleSheet){const n=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(n)}return s}return t(i,e)}function We(i,e,t){let r,s;return i?(i.ownerNode?r=e.getId(i.ownerNode):s=t.getId(i),{styleId:s,id:r}):{}}function em({styleSheetRuleCb:i,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:U((c,h,f)=>{const[m,p]=f,{id:y,styleId:d}=We(h,e,t.styleMirror);return(y&&y!==-1||d&&d!==-1)&&i({id:y,styleId:d,adds:[{rule:m,index:p}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,f=this.cssRules.length){const m=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[m,f])};const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:U((c,h,f)=>{const[m]=f,{id:p,styleId:y}=We(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&i({id:p,styleId:y,removes:[{index:m}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let n;r.CSSStyleSheet.prototype.replace&&(n=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(n,{apply:U((c,h,f)=>{const[m]=f,{id:p,styleId:y}=We(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&i({id:p,styleId:y,replace:m}),c.apply(h,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:U((c,h,f)=>{const[m]=f,{id:p,styleId:y}=We(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&i({id:p,styleId:y,replaceSync:m}),c.apply(h,f)})}));const l={};Ar("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(Ar("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),Ar("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),Ar("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:U((f,m,p)=>{const[y,d]=p,{id:g,styleId:S}=We(m.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||S&&S!==-1)&&i({id:g,styleId:S,adds:[{rule:y,index:[...Qr(m),d||0]}]}),f.apply(m,p)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:U((f,m,p)=>{const[y]=p,{id:d,styleId:g}=We(m.parentStyleSheet,e,t.styleMirror);return(d&&d!==-1||g&&g!==-1)&&i({id:d,styleId:g,removes:[{index:[...Qr(m),y]}]}),f.apply(m,p)})})}),U(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,n&&(r.CSSStyleSheet.prototype.replace=n),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 Tl({mirror:i,stylesheetManager:e},t){var r,s,o;let n=null;t.nodeName==="#document"?n=i.getId(t):n=i.getId(_.host(t));const a=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(o=(s=t.ownerDocument)==null?void 0:s.defaultView)==null?void 0:o.ShadowRoot,l=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return n===null||n===-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(n!==null&&n!==-1)try{e.adoptStyleSheets(u,n)}catch(f){}return h}}),U(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function tm({styleDeclarationCb:i,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:U((a,l,u)=>{var c;const[h,f,m]=u;if(t.has(h))return o.apply(l,[h,f,m]);const{id:p,styleId:y}=We((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||y&&y!==-1)&&i({id:p,styleId:y,set:{property:h,value:f,priority:m},index:Qr(l.parentRule)}),a.apply(l,u)})});const n=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(n,{apply:U((a,l,u)=>{var c;const[h]=u;if(t.has(h))return n.apply(l,[h]);const{id:f,styleId:m}=We((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||m&&m!==-1)&&i({id:f,styleId:m,remove:{property:h},index:Qr(l.parentRule)}),a.apply(l,u)})}),U(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=n})}function rm({mediaInteractionCb:i,blockClass:e,blockSelector:t,mirror:r,sampling:s,doc:o}){const n=U(l=>Et(U(u=>{const c=xt(u);if(!c||de(c,e,t,!0))return;const{currentTime:h,volume:f,muted:m,playbackRate:p,loop:y}=c;i({type:l,id:r.getId(c),currentTime:h,volume:f,muted:m,playbackRate:p,loop:y})}),s.media||500)),a=[fe("play",n(ze.Play),o),fe("pause",n(ze.Pause),o),fe("seeked",n(ze.Seeked),o),fe("volumechange",n(ze.VolumeChange),o),fe("ratechange",n(ze.RateChange),o)];return U(()=>{a.forEach(l=>l())})}function im({fontCb:i,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],s=new WeakMap,o=t.FontFace;t.FontFace=function(l,u,c){const h=new o(l,u,c);return s.set(h,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};const n=rt(e.fonts,"add",function(a){return function(l){return setTimeout(U(()=>{const u=s.get(l);u&&(i(u),s.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{t.FontFace=o}),r.push(n),U(()=>{r.forEach(a=>a())})}function sm(i){const{doc:e,mirror:t,blockClass:r,blockSelector:s,selectionCb:o}=i;let n=!0;const a=U(()=>{const l=e.getSelection();if(!l||n&&(l!=null&&l.isCollapsed))return;n=l.isCollapsed||!1;const u=[],c=l.rangeCount||0;for(let h=0;h<c;h++){const f=l.getRangeAt(h),{startContainer:m,startOffset:p,endContainer:y,endOffset:d}=f;de(m,r,s,!0)||de(y,r,s,!0)||u.push({start:t.getId(m),startOffset:p,end:t.getId(y),endOffset:d})}o({ranges:u})});return a(),fe("selectionchange",a)}function nm({doc:i,customElementCb:e}){const t=i.defaultView;return!t||!t.customElements?()=>{}:rt(t.customElements,"define",function(s){return function(o,n,a){try{e({define:{name:o}})}catch(l){console.warn(`Custom element callback failed for ${o}`)}return s.apply(this,[o,n,a])}})}function om(i,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:s,scrollCb:o,viewportResizeCb:n,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,visibilityMutationCb:f,fontCb:m,selectionCb:p,customElementCb:y}=i;i.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),t(...d)},i.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),r(...d)},i.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),s(...d)},i.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),o(...d)},i.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),n(...d)},i.inputCb=(...d)=>{e.input&&e.input(...d),a(...d)},i.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),l(...d)},i.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),u(...d)},i.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),c(...d)},i.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),h(...d)},i.visibilityMutationCb=(...d)=>{e.visibilityMutation&&e.visibilityMutation(...d),f(...d)},i.fontCb=(...d)=>{e.font&&e.font(...d),m(...d)},i.selectionCb=(...d)=>{e.selection&&e.selection(...d),p(...d)},i.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),y(...d)}}function am(i,e={}){const t=i.doc.defaultView;if(!t)return()=>{};om(i,e);let r;i.recordDOM&&(r=Rl(i,i.doc));const s=Xp(i),o=Jp(i),n=Ol(i),a=Kp(i,{win:t}),l=qp(i),u=rm(i);let c=()=>{},h=()=>{},f=()=>{},m=()=>{};i.recordDOM&&(c=em(i,{win:t}),h=Tl(i,i.doc),f=tm(i,{win:t}),i.collectFonts&&(m=im(i)));const p=sm(i),y=nm(i),d=[];for(const g of i.plugins)d.push(g.observer(g.callback,t,g.options));return U(()=>{qe.forEach(g=>g.reset()),r==null||r.disconnect(),s(),o(),n(),a(),l(),u(),c(),h(),f(),m(),p(),y(),d.forEach(g=>g())})}function Nr(i){return typeof window[i]!="undefined"}function Ar(i){return!!(typeof window[i]!="undefined"&&window[i].prototype&&"insertRule"in window[i].prototype&&"deleteRule"in window[i].prototype)}class Eo{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){const o=r||this.getIdToRemoteIdMap(e),n=s||this.getRemoteIdToIdMap(e);let a=o.get(t);return a||(a=this.generateIdFn(),o.set(t,a),n.set(a,t)),a}getIds(e,t){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(o=>this.getId(e,o,r,s))}getRemoteId(e,t,r){const s=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const o=s.get(t);return o||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(s=>this.getRemoteId(e,s,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 lm{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new Eo(zo)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Eo(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(s=this.loadListener)==null||s.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const s=this.crossOriginIframeMap.get(e.source);if(!s)return;const o=this.transformCrossOriginEvent(s,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case O.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const s=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(t.data.node,s),{timestamp:t.timestamp,type:O.IncrementalSnapshot,data:{source:M.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case O.Meta:case O.Load:case O.DomContentLoaded:return!1;case O.Plugin:return t;case O.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case O.IncrementalSnapshot:switch(t.data.source){case M.Mutation:return t.data.adds.forEach(s=>{this.replaceIds(s,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,e);const o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(s.node,o)}),t.data.removes.forEach(s=>{this.replaceIds(s,e,["parentId","id"])}),t.data.attributes.forEach(s=>{this.replaceIds(s,e,["id"])}),t.data.texts.forEach(s=>{this.replaceIds(s,e,["id"])}),t;case M.Drag:case M.TouchMove:case M.MouseMove:return t.data.positions.forEach(s=>{this.replaceIds(s,e,["id"])}),t;case M.ViewportResize:return!1;case M.MediaInteraction:case M.MouseInteraction:case M.Scroll:case M.CanvasMutation:case M.Input:return this.replaceIds(t.data,e,["id"]),t;case M.StyleSheetRule:case M.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case M.Font:return t;case M.Selection:return t.data.ranges.forEach(s=>{this.replaceIds(s,e,["start","end"])}),t;case M.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(s=>{this.replaceStyleIds(s,e,["styleId"])}),t}}return!1}replace(e,t,r,s){for(const o of s)!Array.isArray(t[o])&&typeof t[o]!="number"||(Array.isArray(t[o])?t[o]=e.getIds(r,t[o]):t[o]=e.getId(r,t[o]));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!==Le.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class um{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(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(!Bt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Rl(ae(T({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Ol(ae(T({},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(Tl({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(rt(e.prototype,"attachShadow",function(s){return function(o){const n=s.call(this,o),a=_.shadowRoot(this);return a&&gn(this)&&r.addShadowRoot(a,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var dt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$t=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Rr=0;Rr<dt.length;Rr++)$t[dt.charCodeAt(Rr)]=Rr;var cm=function(i){var e=new Uint8Array(i),t,r=e.length,s="";for(t=0;t<r;t+=3)s+=dt[e[t]>>2],s+=dt[(e[t]&3)<<4|e[t+1]>>4],s+=dt[(e[t+1]&15)<<2|e[t+2]>>6],s+=dt[e[t+2]&63];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s},hm=function(i){var e=i.length*.75,t=i.length,r,s=0,o,n,a,l;i[i.length-1]==="="&&(e--,i[i.length-2]==="="&&e--);var u=new ArrayBuffer(e),c=new Uint8Array(u);for(r=0;r<t;r+=4)o=$t[i.charCodeAt(r)],n=$t[i.charCodeAt(r+1)],a=$t[i.charCodeAt(r+2)],l=$t[i.charCodeAt(r+3)],c[s++]=o<<2|n>>4,c[s++]=(n&15)<<4|a>>2,c[s++]=(a&3)<<6|l&63;return u};const xo=new Map;function fm(i,e){let t=xo.get(i);return t||(t=new Map,xo.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}const Dl=(i,e,t)=>{if(!i||!(_l(i,e)||typeof i=="object"))return;const r=i.constructor.name,s=fm(t,r);let o=s.indexOf(i);return o===-1&&(o=s.length,s.push(i)),o};function Lr(i,e,t){if(i instanceof Array)return i.map(r=>Lr(r,e,t));if(i===null)return i;if(i instanceof Float32Array||i instanceof Float64Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Uint8Array||i instanceof Uint16Array||i instanceof Int16Array||i instanceof Int8Array||i instanceof Uint8ClampedArray)return{rr_type:i.constructor.name,args:[Object.values(i)]};if(i instanceof ArrayBuffer){const r=i.constructor.name,s=cm(i);return{rr_type:r,base64:s}}else{if(i instanceof DataView)return{rr_type:i.constructor.name,args:[Lr(i.buffer,e,t),i.byteOffset,i.byteLength]};if(i instanceof HTMLImageElement){const r=i.constructor.name,{src:s}=i;return{rr_type:r,src:s}}else if(i instanceof HTMLCanvasElement){const r="HTMLImageElement",s=i.toDataURL();return{rr_type:r,src:s}}else{if(i instanceof ImageData)return{rr_type:i.constructor.name,args:[Lr(i.data,e,t),i.width,i.height]};if(_l(i,e)||typeof i=="object"){const r=i.constructor.name,s=Dl(i,e,t);return{rr_type:r,index:s}}}}return i}const kl=(i,e,t)=>i.map(r=>Lr(r,e,t)),_l=(i,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof e[s]=="function").find(s=>i instanceof e[s]);function dm(i,e,t,r){const s=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const n of o)try{if(typeof e.CanvasRenderingContext2D.prototype[n]!="function")continue;const a=rt(e.CanvasRenderingContext2D.prototype,n,function(l){return function(...u){return de(this.canvas,t,r,!0)||setTimeout(()=>{const c=kl(u,e,this);i(this.canvas,{type:Be["2D"],property:n,args:c})},0),l.apply(this,u)}});s.push(a)}catch(a){const l=ir(e.CanvasRenderingContext2D.prototype,n,{set(u){i(this.canvas,{type:Be["2D"],property:n,args:[u],setter:!0})}});s.push(l)}return()=>{s.forEach(n=>n())}}function pm(i){return i==="experimental-webgl"?"webgl":i}function Mo(i,e,t,r){const s=[];try{const o=rt(i.HTMLCanvasElement.prototype,"getContext",function(n){return function(a,...l){if(!de(this,e,t,!0)){const u=pm(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 n.apply(this,[a,...l])}});s.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(o=>o())}}function Io(i,e,t,r,s,o){const n=[],a=Object.getOwnPropertyNames(i);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof i[l]!="function")continue;const u=rt(i,l,function(c){return function(...h){const f=c.apply(this,h);if(Dl(f,o,this),"tagName"in this.canvas&&!de(this.canvas,r,s,!0)){const m=kl(h,o,this),p={type:e,property:l,args:m};t(this.canvas,p)}return f}});n.push(u)}catch(u){const c=ir(i,l,{set(h){t(this.canvas,{type:e,property:l,args:[h],setter:!0})}});n.push(c)}return n}function mm(i,e,t,r){const s=[];return s.push(...Io(e.WebGLRenderingContext.prototype,Be.WebGL,i,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&s.push(...Io(e.WebGL2RenderingContext.prototype,Be.WebGL2,i,t,r,e)),()=>{s.forEach(o=>o())}}const $l="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",gm=i=>Uint8Array.from(atob(i),e=>e.charCodeAt(0)),No=typeof window!="undefined"&&window.Blob&&new Blob([gm($l)],{type:"text/javascript;charset=utf-8"});function ym(i){let e;try{if(e=No&&(window.URL||window.webkitURL).createObjectURL(No),!e)throw"";const t=new Worker(e,{name:i==null?void 0:i.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+$l,{name:i==null?void 0:i.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class vm{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",!1),w(this,"locked",!1),w(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:s,blockSelector:o,recordCanvas:n,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,n&&t==="all"&&this.initCanvasMutationObserver(r,s,o),n&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,s,o,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,s,o){const n=Mo(t,r,s,!0),a=new Map,l=new ym;l.onmessage=p=>{const{id:y}=p.data;if(a.set(y,!1),!("base64"in p.data))return;const{base64:d,type:g,width:S,height:b}=p.data;this.mutationCb({id:y,type:Be["2D"],commands:[{property:"clearRect",args:[0,0,S,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:g}]},0,0]}]})};const u=1e3/e;let c=0,h;const f=()=>{const p=[];return t.document.querySelectorAll("canvas").forEach(y=>{de(y,r,s,!0)||p.push(y)}),p},m=p=>{if(c&&p-c<u){h=requestAnimationFrame(m);return}c=p,f().forEach(async y=>{var d;const g=this.mirror.getId(y);if(a.get(g)||y.width===0||y.height===0)return;if(a.set(g,!0),["webgl","webgl2"].includes(y.__context)){const b=y.getContext(y.__context);((d=b==null?void 0:b.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===!1&&b.clear(b.COLOR_BUFFER_BIT)}const S=await createImageBitmap(y);l.postMessage({id:g,bitmap:S,width:y.width,height:y.height,dataURLOptions:o.dataURLOptions},[S])}),h=requestAnimationFrame(m)};h=requestAnimationFrame(m),this.resetObservers=()=>{n(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=Mo(e,t,r,!1),o=dm(this.processMutation.bind(this),e,t,r),n=mm(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),o(),n()}}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 s=r.map(n=>{const u=n,{type:a}=u;return nt(u,["type"])}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:s}),this.pendingCanvasMutations.delete(e)}}class wm{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new pn),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:[]},s=[];for(const o of e){let n;this.styleMirror.has(o)?n=this.styleMirror.getId(o):(n=this.styleMirror.add(o),s.push({styleId:n,rules:Array.from(o.rules||CSSRule,(a,l)=>({rule:Vo(a,o.href),index:l}))})),r.styleIds.push(n)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class bm{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(s=>s!==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(){}}function Sm(i,e,t){var c,h,f,m,p,y;const r=(c=t==null?void 0:t.root)!=null?c:null,s=(h=t==null?void 0:t.threshold)!=null?h:.5,o=(f=t==null?void 0:t.sensitivity)!=null?f:.05,n=Cm((m=t==null?void 0:t.rootMargin)!=null?m:"0px"),a=new Map,l=Em(r),u=xm(l,n);for(const d of i){const g=d.getBoundingClientRect();let S=Nm(),b=0;g.width>0&&g.height>0&&(S=Mm(g,u),b=Im(g,S),b=Math.round(b*100)/100);const v=Am(d),C=(p=e.get(d))!=null?p:null,x=(y=C==null?void 0:C.intersectionRatio)!=null?y:0,R=b,E=(C==null?void 0:C.isStyleVisible)&&x>s,k=v&&R>s;!C||E!==k||E!==k&&Math.abs(R-x)>o?a.set(d,{target:d,isVisible:k,isStyleVisible:v,intersectionRatio:R,intersectionRect:S,oldValue:C}):a.set(d,C)}return a}function Cm(i){const e=i.trim().split(/\s+/),t=(r,s)=>r.endsWith("%")?parseFloat(r)/100*s:parseFloat(r)||0;return function(r){const s=t(e[0]||"0px",r.height),o=t(e[1]||e[0]||"0px",r.width),n=t(e[2]||e[0]||"0px",r.height),a=t(e[3]||e[1]||e[0]||"0px",r.width);return{top:s,right:o,bottom:n,left:a,width:0,height:0}}}function Em(i){return i?i.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function xm(i,e){const t=e(i);return new DOMRect(i.left-t.left,i.top-t.top,i.width+t.left+t.right,i.height+t.top+t.bottom)}function Mm(i,e){const t=Math.max(i.top,e.top),r=Math.max(i.left,e.left),s=Math.min(i.bottom,e.bottom),o=Math.min(i.right,e.right),n=Math.max(0,o-r),a=Math.max(0,s-t);return{top:t,left:r,bottom:s,right:o,width:n,height:a}}function Im(i,e){const t=i.width*i.height,r=e.width*e.height;return t>0?r/t:0}function Nm(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function Am(i){const e=getComputedStyle(i);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class Rm{constructor(e){var u,c,h,f,m,p;w(this,"frozen",!1),w(this,"locked",!1),w(this,"pending",new Map),w(this,"mirror"),w(this,"mutationCb"),w(this,"rafId",null),w(this,"rafThrottle"),w(this,"lastFlushTime",0),w(this,"elements",new Set),w(this,"previousState",new Map),w(this,"root",null),w(this,"threshold"),w(this,"sensitivity"),w(this,"rootMargin"),w(this,"hasInitialized",!1),w(this,"mode","none"),w(this,"debounce",50),w(this,"throttle",100),w(this,"buffer",new Map),w(this,"debounceTimer",null),w(this,"lastThrottleTime",0),w(this,"disabled",!1),w(this,"notifyActivity");const{doc:t,mirror:r,sampling:s,mutationCb:o,notifyActivity:n}=e;if(this.mirror=r,this.mutationCb=o,this.notifyActivity=n,this.rootMargin="0px",s===!1){this.disabled=!0;return}const a=typeof s=="object"&&s!==null?s:{};this.mode=(u=a==null?void 0:a.mode)!=null?u:"none",this.debounce=Number((c=a==null?void 0:a.debounce)!=null?c:100),this.throttle=Number((h=a==null?void 0:a.throttle)!=null?h:100),this.threshold=Number((f=a==null?void 0:a.threshold)!=null?f:.5),this.sensitivity=Number((m=a==null?void 0:a.sensitivity)!=null?m:.05),this.rafThrottle=Number((p=a==null?void 0:a.rafThrottle)!=null?p:100),t.querySelectorAll("*").forEach(y=>this.observe(y)),new MutationObserver(y=>{y.forEach(d=>{d.addedNodes.forEach(g=>{g.nodeType===Node.ELEMENT_NODE&&(this.observe(g),g.querySelectorAll("*").forEach(S=>this.observe(S)))}),d.removedNodes.forEach(g=>{g.nodeType===Node.ELEMENT_NODE&&this.unobserve(g)})})}).observe(t.body,{childList:!0,subtree:!0}),this.startPendingFlushLoop()}startPendingFlushLoop(){if(this.disabled)return;const e=t=>{t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations()),this.rafId=requestAnimationFrame(e)};this.rafId=requestAnimationFrame(e)}flushPendingVisibilityMutations(){if(this.disabled||this.frozen||this.locked||this.elements.size===0)return;const e=Sm(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,r]of e.entries()){const s=this.previousState.get(t);if(!s||s.isVisible!==r.isVisible||Math.abs(s.intersectionRatio-r.intersectionRatio)>this.sensitivity){const n=this.mirror.getId(t);n!==-1&&this.buffer.set(t,{id:n,isVisible:r.isVisible,ratio:r.intersectionRatio}),this.previousState.set(t,r)}}if(this.previousState=e,!this.hasInitialized){this.hasInitialized=!0,this.buffer.clear();return}this.scheduleEmit()}scheduleEmit(){if(this.mode==="debounce")clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.flushBuffer(),this.debounce);else if(this.mode==="throttle"){const e=performance.now();e-this.lastThrottleTime>=this.throttle&&(this.lastThrottleTime=e,this.flushBuffer())}else this.flushBuffer()}flushBuffer(){var e;this.buffer.size!==0&&((e=this.notifyActivity)==null||e.call(this,this.buffer.size),this.mutationCb({mutations:Array.from(this.buffer.values())}),this.buffer.clear())}observe(e){this.disabled||this.elements.add(e)}unobserve(e){this.disabled||(this.elements.delete(e),this.previousState.delete(e),this.pending.delete(e))}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}reset(){this.elements.clear(),this.previousState.clear(),this.pending.clear(),this.rafId&&cancelAnimationFrame(this.rafId)}}const Om="2.1.2-alpha.2";let re,Lt,Ti,Di,gt=!1;const qr=[];let Qe;function Tm(i){return new Promise(t=>{const r=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})},s=(()=>{let o=!1;return()=>{o||(o=!0,r())}})();["interactive","complete"].includes(i.document.readyState)?s():(i.addEventListener("DOMContentLoaded",s,{once:!0}),i.addEventListener("load",s,{once:!0}),setTimeout(()=>{s()},5e3))})}try{if(Array.from([1],i=>i*2)[0]!==2){const i=document.createElement("iframe");document.body.appendChild(i),Array.from=((Cn=i.contentWindow)==null?void 0:Cn.Array.from)||Array.from,document.body.removeChild(i)}}catch(i){console.debug("Unable to override Array.from",i)}const Se=Wo();function we(i={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryNvm:s,blockClass:o="rr-block",blockSelector:n=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,excludeAttribute:u,maskTextClass:c="rr-mask",maskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:p,slimDOMOptions:y,maskInputFn:d,maskTextFn:g,hooks:S,packFn:b,sampling:v={},dataURLOptions:C={},mousemoveWait:x,recordDOM:R=!0,recordCanvas:E=!1,recordCrossOriginIframes:k=!1,recordAfter:D=i.recordAfter==="DOMContentLoaded"?i.recordAfter:"load",flushCustomEvent:j=i.flushCustomEvent!==void 0?i.flushCustomEvent:"after",userTriggeredOnInput:P=!1,collectFonts:z=!1,inlineImages:N=!1,plugins:G,keepIframeSrcFn:F=()=>!1,ignoreCSSAttributes:A=new Set([]),errorHandler:Z}=i;Yp(Z);const se=k?window.parent===window:!0;let J=!1;if(!se)try{window.parent.document&&(J=!1)}catch(L){J=!0}if(se&&!e)throw new Error("emit function is required");if(!se&&!J)return()=>{};x!==void 0&&v.mousemove===void 0&&(v.mousemove=x),Se.reset();const ue=u===void 0?/.^/:u,me=m===!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}:p!==void 0?p:{password:!0},ve=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all",headTitleMutations:y==="all"}:y||{};cn();let ce,oe=0,Ue=0;const Je=L=>{Ue+=L},ke=L=>{for(const ge of G||[])ge.eventProcessor&&(L=ge.eventProcessor(L));return b&&!J&&(L=b(L)),L};re=(L,ge)=>{var ne;const he=L;if(he.timestamp=Me(),(ne=qe[0])!=null&&ne.isFrozen()&&he.type!==O.FullSnapshot&&!(he.type===O.IncrementalSnapshot&&he.data.source===M.Mutation)&&qe.forEach(Ee=>Ee.unfreeze()),se)e==null||e(ke(he),ge);else if(J){const Ee={type:"rrweb",event:ke(he),origin:window.location.origin,isCheckout:ge};window.parent.postMessage(Ee,"*")}if(he.type===O.FullSnapshot)ce=he,oe=0;else if(he.type===O.IncrementalSnapshot){if(he.data.source===M.Mutation&&he.data.isAttachIframe)return;oe++;const Ee=r&&oe>=r,st=t&&he.timestamp-ce.timestamp>t,X=s&&Ue>=s;(Ee||st||X)&&(X&&(Ue=0),Lt(!0))}};const it=L=>{re({type:O.IncrementalSnapshot,data:T({source:M.Mutation},L)})},It=L=>re({type:O.IncrementalSnapshot,data:T({source:M.Scroll},L)}),Nt=L=>re({type:O.IncrementalSnapshot,data:T({source:M.CanvasMutation},L)}),At=L=>{var ge;(ge=S==null?void 0:S.visibilityMutation)==null||ge.call(S,L),re({type:O.IncrementalSnapshot,data:T({source:M.VisibilityMutation},L)})},Zl=L=>re({type:O.IncrementalSnapshot,data:T({source:M.AdoptedStyleSheet},L)}),Ce=new wm({mutationCb:it,adoptedStyleSheetCb:Zl}),Ke=new lm({mirror:Se,mutationCb:it,stylesheetManager:Ce,recordCrossOriginIframes:k,wrappedEmit:re});for(const L of G||[])L.getMirror&&L.getMirror({nodeMirror:Se,crossOriginIframeMirror:Ke.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ke.crossOriginIframeStyleMirror});const gi=new bm;Ti=new vm({recordCanvas:E,mutationCb:Nt,win:window,blockClass:o,blockSelector:n,mirror:Se,sampling:v.canvas,dataURLOptions:C}),Di=new Rm({doc:window.document,mirror:Se,sampling:v.visibility,mutationCb:At,notifyActivity:Je});const sr=new um({mutationCb:it,scrollCb:It,bypassOptions:{blockClass:o,blockSelector:n,maskTextClass:c,maskTextSelector:h,excludeAttribute:ue,inlineStylesheet:f,maskInputOptions:me,dataURLOptions:C,maskTextFn:g,maskInputFn:d,recordCanvas:E,inlineImages:N,sampling:v,slimDOMOptions:ve,iframeManager:Ke,stylesheetManager:Ce,canvasManager:Ti,visibilityManager:Di,keepIframeSrcFn:F,processedNodeManager:gi},mirror:Se});Lt=(L=!1)=>{if(!R)return;re({type:O.Meta,data:{href:window.location.href,width:an(),height:on()}},L),Ce.reset(),sr.init(),qe.forEach(ne=>ne.lock());const ge=ic(document,{mirror:Se,blockClass:o,blockSelector:n,maskTextClass:c,maskTextSelector:h,excludeAttribute:ue,inlineStylesheet:f,maskAllInputs:me,maskTextFn:g,maskInputFn:d,slimDOM:ve,dataURLOptions:C,recordCanvas:E,inlineImages:N,onSerialize:ne=>{mt(ne,Se)&&Ke.addIframe(ne),fn(ne,Se)&&Ce.trackLinkElement(ne),Ge(ne)&&sr.addShadowRoot(_.shadowRoot(ne),document)},onIframeLoad:(ne,he)=>{Ke.attachIframe(ne,he),sr.observeAttachShadow(ne)},onStylesheetLoad:(ne,he)=>{Ce.attachLinkElement(ne,he)},keepIframeSrcFn:F});if(!ge)return console.warn("Failed to snapshot the document");re({type:O.FullSnapshot,data:{node:ge,initialOffset:nn(window)}},L),qe.forEach(ne=>ne.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ce.adoptStyleSheets(document.adoptedStyleSheets,Se.getId(document))},Qe=()=>{for(const L of qr)re(L);qr.length=0};try{const L=[],ge=Ee=>{var st;return U(am)({mutationCb:it,mousemoveCb:(X,yi)=>re({type:O.IncrementalSnapshot,data:{source:yi,positions:X}}),mouseInteractionCb:X=>re({type:O.IncrementalSnapshot,data:T({source:M.MouseInteraction},X)}),scrollCb:It,viewportResizeCb:X=>re({type:O.IncrementalSnapshot,data:T({source:M.ViewportResize},X)}),inputCb:X=>re({type:O.IncrementalSnapshot,data:T({source:M.Input},X)}),mediaInteractionCb:X=>re({type:O.IncrementalSnapshot,data:T({source:M.MediaInteraction},X)}),styleSheetRuleCb:X=>re({type:O.IncrementalSnapshot,data:T({source:M.StyleSheetRule},X)}),styleDeclarationCb:X=>re({type:O.IncrementalSnapshot,data:T({source:M.StyleDeclaration},X)}),canvasMutationCb:Nt,visibilityMutationCb:At,fontCb:X=>re({type:O.IncrementalSnapshot,data:T({source:M.Font},X)}),selectionCb:X=>{re({type:O.IncrementalSnapshot,data:T({source:M.Selection},X)})},customElementCb:X=>{re({type:O.IncrementalSnapshot,data:T({source:M.CustomElement},X)})},blockClass:o,ignoreClass:a,ignoreSelector:l,maskTextClass:c,maskTextSelector:h,excludeAttribute:ue,maskInputOptions:me,inlineStylesheet:f,sampling:v,recordDOM:R,recordCanvas:E,inlineImages:N,userTriggeredOnInput:P,collectFonts:z,doc:Ee,maskInputFn:d,maskTextFn:g,keepIframeSrcFn:F,blockSelector:n,slimDOMOptions:ve,dataURLOptions:C,mirror:Se,iframeManager:Ke,stylesheetManager:Ce,shadowDomManager:sr,processedNodeManager:gi,canvasManager:Ti,visibilityManager:Di,ignoreCSSAttributes:A,plugins:((st=G==null?void 0:G.filter(X=>X.observer))==null?void 0:st.map(X=>({observer:X.observer,options:X.options,callback:yi=>re({type:O.Plugin,data:{plugin:X.name,payload:yi}})})))||[]},S)};Ke.addLoadListener(Ee=>{try{L.push(ge(Ee.contentDocument))}catch(st){console.warn(st)}});const ne=()=>{j==="before"&&Qe(),Lt(),L.push(ge(document)),gt=!0,j==="after"&&Qe()},he=async()=>{j==="before"&&Qe(),D==="DOMContentStabilized"&&(console.debug(`[${Me()}] [rrweb:record] \u{1F7E2} Waiting for DOM stabilization...`),await Tm(window),console.debug(`[${Me()}] [rrweb:record] \u2705 DOM stabilized, starting recording`)),console.debug(`[${Me()}] [rrweb:record] \u2705 Init dom and takeFullSnapshot `),Lt(),L.push(ge(document)),gt=!0,j==="after"&&Qe()};return document.readyState==="interactive"||document.readyState==="complete"?ne():(L.push(fe("DOMContentLoaded",()=>{re({type:O.DomContentLoaded,data:{}}),D==="DOMContentLoaded"&&ne()})),L.push(fe("load",()=>{re({type:O.Load,data:{}}),D==="load"&&ne()},window))),()=>{Qe(),L.forEach(Ee=>Ee()),gi.destroy(),gt=!1,Zp()}}catch(L){console.warn(L)}}we.getVersion=()=>Om;we.isRecording=()=>gt;we.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${qr.length} events`),Qe()};we.addCustomEvent=(i,e)=>{const t={type:O.Custom,data:{tag:i,payload:e}};if(!gt){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${i}`),qr.push(t);return}re(t)};we.freezePage=()=>{qe.forEach(i=>i.freeze())};we.takeFullSnapshot=i=>{if(!gt)throw new Error("please take full snapshot after start recording");Lt(i)};we.mirror=Se;function Ll(i){return{all:i=i||new Map,on:function(e,t){var r=i.get(e);r?r.push(t):i.set(e,[t])},off:function(e,t){var r=i.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):i.set(e,[]))},emit:function(e,t){var r=i.get(e);r&&r.slice().map(function(s){s(t)}),(r=i.get("*"))&&r.slice().map(function(s){s(e,t)})}}}const Dm=Object.freeze(Object.defineProperty({__proto__:null,default:Ll},Symbol.toStringTag,{value:"Module"}));function km(i=window,e=document){if("scrollBehavior"in e.documentElement.style&&i.__forceSmoothScrollPolyfill__!==!0)return;const t=i.HTMLElement||i.Element,r=468,s={scroll:i.scroll||i.scrollTo,scrollBy:i.scrollBy,elementScroll:t.prototype.scroll||l,scrollIntoView:t.prototype.scrollIntoView},o=i.performance&&i.performance.now?i.performance.now.bind(i.performance):Date.now;function n(g){const S=["MSIE ","Trident/","Edge/"];return new RegExp(S.join("|")).test(g)}const a=n(i.navigator.userAgent)?1:0;function l(g,S){this.scrollLeft=g,this.scrollTop=S}function u(g){return .5*(1-Math.cos(Math.PI*g))}function c(g){if(g===null||typeof g!="object"||g.behavior===void 0||g.behavior==="auto"||g.behavior==="instant")return!0;if(typeof g=="object"&&g.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+g.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(g,S){if(S==="Y")return g.clientHeight+a<g.scrollHeight;if(S==="X")return g.clientWidth+a<g.scrollWidth}function f(g,S){const b=i.getComputedStyle(g,null)["overflow"+S];return b==="auto"||b==="scroll"}function m(g){const S=h(g,"Y")&&f(g,"Y"),b=h(g,"X")&&f(g,"X");return S||b}function p(g){for(;g!==e.body&&m(g)===!1;)g=g.parentNode||g.host;return g}function y(g){const S=o();let b,v,C,x=(S-g.startTime)/r;x=x>1?1:x,b=u(x),v=g.startX+(g.x-g.startX)*b,C=g.startY+(g.y-g.startY)*b,g.method.call(g.scrollable,v,C),(v!==g.x||C!==g.y)&&i.requestAnimationFrame(y.bind(i,g))}function d(g,S,b){let v,C,x,R;const E=o();g===e.body?(v=i,C=i.scrollX||i.pageXOffset,x=i.scrollY||i.pageYOffset,R=s.scroll):(v=g,C=g.scrollLeft,x=g.scrollTop,R=l),y({scrollable:v,method:R,startTime:E,startX:C,startY:x,x:S,y:b})}i.scroll=i.scrollTo=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){s.scroll.call(i,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:i.scrollX||i.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:i.scrollY||i.pageYOffset);return}d.call(i,e.body,arguments[0].left!==void 0?~~arguments[0].left:i.scrollX||i.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:i.scrollY||i.pageYOffset)}},i.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])){s.scrollBy.call(i,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}d.call(i,e.body,~~arguments[0].left+(i.scrollX||i.pageXOffset),~~arguments[0].top+(i.scrollY||i.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");s.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 g=arguments[0].left,S=arguments[0].top;d.call(this,this,typeof g=="undefined"?this.scrollLeft:~~g,typeof S=="undefined"?this.scrollTop:~~S)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){s.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){s.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const g=p(this),S=g.getBoundingClientRect(),b=this.getBoundingClientRect();g!==e.body?(d.call(this,g,g.scrollLeft+b.left-S.left,g.scrollTop+b.top-S.top),i.getComputedStyle(g).position!=="fixed"&&i.scrollBy({left:S.left,top:S.top,behavior:"smooth"})):i.scrollBy({left:b.left,top:b.top,behavior:"smooth"})}}class _m{constructor(e=[],t){w(this,"timeOffset",0),w(this,"speed"),w(this,"actions"),w(this,"raf",null),w(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 s=Math.floor((t+r)/2);if(this.actions[s].delay<e.delay)t=s+1;else if(this.actions[s].delay>e.delay)r=s-1;else return s+1}return t}}function Ao(i,e){if(i.type===O.IncrementalSnapshot&&i.data.source===M.MouseMove&&i.data.positions&&i.data.positions.length){const t=i.data.positions[0].timeOffset,r=i.timestamp+t;return i.delay=r-e,r-e}return i.delay=i.timestamp-e,i.delay}/*! *****************************************************************************
69
+ or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(lt),-1},getNode(){return console.error(lt),null},removeNodeFromMap(){console.error(lt)},has(){return console.error(lt),!1},reset(){console.error(lt)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(i,e,t){return e==="map"&&console.error(lt),Reflect.get(i,e,t)}}));function Et(i,e,t={}){let r=null,s=0;return function(...o){const n=Date.now();!s&&t.leading===!1&&(s=n);const a=e-(n-s),l=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),s=n,i.apply(l,o)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{s=t.leading===!1?0:Date.now(),r=null,i.apply(l,o)},a))}}function ir(i,e,t,r,s=window){const o=s.Object.getOwnPropertyDescriptor(i,e);return s.Object.defineProperty(i,e,r?t:{set(n){setTimeout(()=>{t.set.call(this,n)},0),o&&o.set&&o.set.call(this,n)}}),()=>ir(i,e,o||{},!0)}function xe(){return Math.round(performance.timeOrigin+performance.now())}function nn(i=window){var e,t,r,s;const o=i.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:i.pageXOffset!==void 0?i.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((e=_.parentElement(o.body))==null?void 0:e.scrollLeft)||((t=o==null?void 0:o.body)==null?void 0:t.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:i.pageYOffset!==void 0?i.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((r=_.parentElement(o.body))==null?void 0:r.scrollTop)||((s=o==null?void 0:o.body)==null?void 0:s.scrollTop)||0}}function on(i=window){const e=i.document;return i.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function an(i=window){const e=i.document;return i.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function ln(i){return i?i.nodeType===i.ELEMENT_NODE?i:_.parentElement(i):null}function de(i,e,t,r){if(!i)return!1;const s=ln(i);if(!s)return!1;try{if(typeof e=="string"){if(s.classList.contains(e)||r&&s.closest("."+e)!==null)return!0}else if(Ur(s,e,r))return!0}catch(o){}return!!(t&&(s.matches(t)||r&&s.closest(t)!==null))}function El(i,e){return e.getId(i)!==-1}function $r(i,e,t){return i.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(i)===Wt}function un(i,e){if(Ft(i))return!1;const t=e.getId(i);if(!e.has(t))return!0;const r=_.parentNode(i);return r&&r.nodeType===i.DOCUMENT_NODE?!1:r?un(r,e):!0}function Kr(i){return!!i.changedTouches}function cn(i=window){"NodeList"in i&&!i.NodeList.prototype.forEach&&(i.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in i&&!i.DOMTokenList.prototype.forEach&&(i.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Ml(i){const e={},t=(s,o)=>{const n={value:s,parent:o,children:[]};return e[s.node.id]=n,n},r=[];for(const s of i){const{nextId:o,parentId:n}=s;if(o&&o in e){const a=e[o];if(a.parent){const l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,t(s,a.parent))}else{const l=r.indexOf(a);r.splice(l,0,t(s,null))}continue}if(n in e){const a=e[n];a.children.push(t(s,a));continue}r.push(t(s,null))}return r}function hn(i,e){e(i.value);for(let t=i.children.length-1;t>=0;t--)hn(i.children[t],e)}function mt(i,e){return!!(i.nodeName==="IFRAME"&&e.getMeta(i))}function fn(i,e){return!!(i.nodeName==="LINK"&&i.nodeType===i.ELEMENT_NODE&&i.getAttribute&&i.getAttribute("rel")==="stylesheet"&&e.getMeta(i))}function dn(i,e){var t,r;const s=(r=(t=i.ownerDocument)==null?void 0:t.defaultView)==null?void 0:r.frameElement;if(!s||s===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=s.getBoundingClientRect(),n=dn(s,e),a=o.height/s.clientHeight;return{x:o.x*n.relativeScale+n.x,y:o.y*n.relativeScale+n.y,relativeScale:a,absoluteScale:n.absoluteScale*a}}function Ge(i){return i?i instanceof Ae&&"shadowRoot"in i?!!i.shadowRoot:!!_.shadowRoot(i):!1}function ft(i,e){const t=i[e[0]];return e.length===1?t:ft(t.cssRules[e[1]].cssRules,e.slice(2))}function ws(i){const e=[...i],t=e.pop();return{positions:e,index:t}}function xl(i){const e=new Set,t=[];for(let r=i.length;r--;){const s=i[r];e.has(s.id)||(t.push(s),e.add(s.id))}return t}class pn{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(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 mn(i){var e;let t=null;return"getRootNode"in i&&((e=_.getRootNode(i))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&_.host(_.getRootNode(i))&&(t=_.host(_.getRootNode(i))),t}function Il(i){let e=i,t;for(;t=mn(e);)e=t;return e}function Nl(i){const e=i.ownerDocument;if(!e)return!1;const t=Il(i);return _.contains(e,t)}function gn(i){const e=i.ownerDocument;return e?_.contains(e,i)||Nl(i):!1}const Wp=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:pn,get _mirror(){return exports.mirror},closestElementOfNode:ln,getBaseDimension:dn,getNestedRule:ft,getPositionsAndIndex:ws,getRootShadowHost:Il,getShadowHost:mn,getWindowHeight:on,getWindowScroll:nn,getWindowWidth:an,hasShadowRoot:Ge,hookSetter:ir,inDom:gn,isAncestorRemoved:un,isBlocked:de,isIgnored:$r,isSerialized:El,isSerializedIframe:mt,isSerializedStylesheet:fn,iterateResolveTree:hn,legacy_isTouchEvent:Kr,nowTimestamp:xe,on:fe,polyfill:cn,queueToResolveTrees:Ml,shadowHostInDom:Nl,throttle:Et,uniqueTextMutations:xl},Symbol.toStringTag,{value:"Module"}));var O=(i=>(i[i.DomContentLoaded=0]="DomContentLoaded",i[i.Load=1]="Load",i[i.FullSnapshot=2]="FullSnapshot",i[i.IncrementalSnapshot=3]="IncrementalSnapshot",i[i.Meta=4]="Meta",i[i.Custom=5]="Custom",i[i.Plugin=6]="Plugin",i))(O||{}),x=(i=>(i[i.Mutation=0]="Mutation",i[i.MouseMove=1]="MouseMove",i[i.MouseInteraction=2]="MouseInteraction",i[i.Scroll=3]="Scroll",i[i.ViewportResize=4]="ViewportResize",i[i.Input=5]="Input",i[i.TouchMove=6]="TouchMove",i[i.MediaInteraction=7]="MediaInteraction",i[i.StyleSheetRule=8]="StyleSheetRule",i[i.CanvasMutation=9]="CanvasMutation",i[i.Font=10]="Font",i[i.Log=11]="Log",i[i.Drag=12]="Drag",i[i.StyleDeclaration=13]="StyleDeclaration",i[i.Selection=14]="Selection",i[i.AdoptedStyleSheet=15]="AdoptedStyleSheet",i[i.CustomElement=16]="CustomElement",i[i.VisibilityMutation=17]="VisibilityMutation",i))(x||{}),W=(i=>(i[i.MouseUp=0]="MouseUp",i[i.MouseDown=1]="MouseDown",i[i.Click=2]="Click",i[i.ContextMenu=3]="ContextMenu",i[i.DblClick=4]="DblClick",i[i.Focus=5]="Focus",i[i.Blur=6]="Blur",i[i.TouchStart=7]="TouchStart",i[i.TouchMove_Departed=8]="TouchMove_Departed",i[i.TouchEnd=9]="TouchEnd",i[i.TouchCancel=10]="TouchCancel",i))(W||{}),$e=(i=>(i[i.Mouse=0]="Mouse",i[i.Pen=1]="Pen",i[i.Touch=2]="Touch",i))($e||{}),Be=(i=>(i[i["2D"]=0]="2D",i[i.WebGL=1]="WebGL",i[i.WebGL2=2]="WebGL2",i))(Be||{}),ze=(i=>(i[i.Play=0]="Play",i[i.Pause=1]="Pause",i[i.Seeked=2]="Seeked",i[i.VolumeChange=3]="VolumeChange",i[i.RateChange=4]="RateChange",i))(ze||{}),V=(i=>(i.Start="start",i.Pause="pause",i.Resume="resume",i.Resize="resize",i.Finish="finish",i.FullsnapshotRebuilded="fullsnapshot-rebuilded",i.LoadStylesheetStart="load-stylesheet-start",i.LoadStylesheetEnd="load-stylesheet-end",i.SkipStart="skip-start",i.SkipEnd="skip-end",i.MouseInteraction="mouse-interaction",i.EventCast="event-cast",i.CustomEvent="custom-event",i.Flush="flush",i.StateChange="state-change",i.PlayBack="play-back",i.Destroy="destroy",i))(V||{}),Le=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(Le||{});function yo(i){return"__ln"in i}class zp{constructor(){w(this,"length",0),w(this,"head",null),w(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&&yo(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&&yo(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 vo=(i,e)=>`${i}@${e}`;class Gp{constructor(){w(this,"frozen",!1),w(this,"locked",!1),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"excludeAttribute"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"visibilityManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new zp,s=l=>{let u=l,c=Wt;for(;c===Wt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},o=l=>{const u=_.parentNode(l);if(!u||!gn(l))return;let c=!1;if(l.nodeType===Node.TEXT_NODE){const p=u.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=Ft(u)?this.mirror.getId(mn(l)):this.mirror.getId(u),f=s(l);if(h===-1||f===-1)return r.addNode(l);const m=ht(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,excludeAttribute:this.excludeAttribute,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:p=>{mt(p,this.mirror)&&this.iframeManager.addIframe(p),fn(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Ge(l)&&this.shadowDomManager.addShadowRoot(_.shadowRoot(l),this.doc)},onIframeLoad:(p,y)=>{this.iframeManager.attachIframe(p,y),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,y)=>{this.stylesheetManager.attachLinkElement(p,y)},cssCaptured:c});m&&(e.push({parentId:h,nextId:f,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)wo(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(_.parentNode(l))||o(l);for(const l of this.addedSet)!bo(this.droppedSet,l)&&!wo(this.removesSubTreeCache,l,this.mirror)||bo(this.movedSet,l)?o(l):this.droppedSet.add(l);let n=null;for(;r.length;){let l=null;if(n){const u=this.mirror.getId(_.parentNode(n.value)),c=s(n.value);u!==-1&&c!==-1&&(l=n)}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(s(c.value)===-1)continue;if(h!==-1){l=c;break}else{const m=c.value,p=_.parentNode(m);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const y=_.host(p);if(this.mirror.getId(y)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}n=l.previous,r.removeNode(l.value),o(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))}),w(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),s=>_.textContent(s)||"").join("");t.attributes.value=Pr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Fr(e),value:r,maskInputFn:this.maskInputFn})}),w(this,"processMutation",e=>{if(!$r(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:Ho(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,ln(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,s=e.target.getAttribute(r);const n=t[r],a=typeof n=="boolean",l=document.contains(t),u=Ts(t),c=Ui(r,this.excludeAttribute);if(s===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(n===""||n===null||typeof n=="undefined")){console.debug(`[${xe()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:_.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:s,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:a,inDOM:l,isVisible:u,isExcludeAttributeName:c});return}if(Ui(r,this.excludeAttribute)){console.debug(`[${xe()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:_.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:s,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:a,inDOM:l,isVisible:u,isExcludeAttributeName:c});return}if(r==="value"){const m=Fr(t);s=Pr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:m,value:s,maskInputFn:this.maskInputFn})}if(de(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let f=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!t.contentDocument)r="rr_src";else return;if(f||(f={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(f),this.attributeMap.set(e.target,f)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!jo(t.tagName,r))if(f.attributes[r]=Go(this.doc,He(t.tagName),He(r),s),r!=="class"&&(e.oldValue===null||s===""||s!==e.oldValue)&&console.debug(`[${xe()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[s===e.oldValue?"no change in value":null,s===n?"mirrored in DOM property":null,s===f.attributes[r]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:_.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:s,oldValue:e.oldValue,transformedValue:f.attributes[r],excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:a,inDOM:l,isVisible:u,isExcludeAttributeName:c}),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(y){this.unattachedDoc=this.doc}const p=this.unattachedDoc.createElement("span");e.oldValue&&p.setAttribute("style",e.oldValue);for(const y of Array.from(t.style)){const d=t.style.getPropertyValue(y),g=t.style.getPropertyPriority(y);d!==p.style.getPropertyValue(y)||g!==p.style.getPropertyPriority(y)?g===""?f.styleDiff[y]=d:f.styleDiff[y]=[d,g]:f._unchangedStyles[y]=[d,g]}for(const y of Array.from(p.style))t.style.getPropertyValue(y)===""&&(f.styleDiff[y]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?f.attributes.rr_open_mode="modal":f.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),s=Ft(e.target)?this.mirror.getId(_.host(e.target)):this.mirror.getId(e.target);de(e.target,this.blockClass,this.blockSelector,!1)||$r(t,this.mirror,this.slimDOMOptions)||!El(t,this.mirror)||(this.addedSet.has(t)?(bs(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||un(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[vo(r,s)]?bs(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:Ft(e.target)&&Bt(e.target)?!0:void 0}),jp(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if($r(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[vo(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)),Ge(e)&&_.childNodes(_.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","visibilityManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze(),this.visibilityManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.visibilityManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock(),this.visibilityManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.visibilityManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset(),this.visibilityManager.reset()}}function bs(i,e){i.delete(e),_.childNodes(e).forEach(t=>bs(i,t))}function jp(i,e){const t=[i];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),_.childNodes(r).forEach(s=>t.push(s)))}}function wo(i,e,t){return i.size===0?!1:Hp(i,e)}function Hp(i,e,t){const r=_.parentNode(e);return r?i.has(r):!1}function bo(i,e){return i.size===0?!1:Al(i,e)}function Al(i,e){const t=_.parentNode(e);return t?i.has(t)?!0:Al(i,t):!1}let Vt;function Yp(i){Vt=i}function Zp(){Vt=void 0}const U=i=>Vt?(...t)=>{try{return i(...t)}catch(r){if(Vt&&Vt(r)===!0)return;throw r}}:i,Qe=[];function Mt(i){try{if("composedPath"in i){const e=i.composedPath();if(e.length)return e[0]}else if("path"in i&&i.path.length)return i.path[0]}catch(e){}return i&&i.target}function Rl(i,e){const t=new Gp;Qe.push(t),t.init(i);const r=new(Cl())(U(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Xp({mousemoveCb:i,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const s=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let n=[],a;const l=Et(U(h=>{const f=Date.now()-a;i(n.map(m=>(m.timeOffset-=f,m)),h),n=[],a=null}),o),u=U(Et(U(h=>{const f=Mt(h),{clientX:m,clientY:p}=Kr(h)?h.changedTouches[0]:h;a||(a=xe()),n.push({x:m,y:p,id:r.getId(f),timeOffset:xe()-a}),l(typeof DragEvent!="undefined"&&h instanceof DragEvent?x.Drag:h instanceof MouseEvent?x.MouseMove:x.TouchMove)}),s,{trailing:!1})),c=[fe("mousemove",u,t),fe("touchmove",u,t),fe("drag",u,t)];return U(()=>{c.forEach(h=>h())})}function Jp({mouseInteractionCb:i,doc:e,mirror:t,blockClass:r,blockSelector:s,sampling:o}){if(o.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const n=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[];let l=null;const u=c=>h=>{const f=Mt(h);if(de(f,r,s,!0))return;let m=null,p=c;if("pointerType"in h){switch(h.pointerType){case"mouse":m=$e.Mouse;break;case"touch":m=$e.Touch;break;case"pen":m=$e.Pen;break}m===$e.Touch?W[c]===W.MouseDown?p="TouchStart":W[c]===W.MouseUp&&(p="TouchEnd"):$e.Pen}else Kr(h)&&(m=$e.Touch);m!==null?(l=m,(p.startsWith("Touch")&&m===$e.Touch||p.startsWith("Mouse")&&m===$e.Mouse)&&(m=null)):W[c]===W.Click&&(m=l,l=null);const y=Kr(h)?h.changedTouches[0]:h;if(!y)return;const d=t.getId(f),{clientX:g,clientY:S}=y;U(i)(T({type:W[p],id:d,x:g,y:S},m!==null&&{pointerType:m}))};return Object.keys(W).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&n[c]!==!1).forEach(c=>{let h=He(c);const f=u(c);if(window.PointerEvent)switch(W[c]){case W.MouseDown:case W.MouseUp:h=h.replace("mouse","pointer");break;case W.TouchStart:case W.TouchEnd:return}a.push(fe(h,f,e))}),U(()=>{a.forEach(c=>c())})}function Ol({scrollCb:i,doc:e,mirror:t,blockClass:r,blockSelector:s,sampling:o}){const n=U(Et(U(a=>{const l=Mt(a);if(!l||de(l,r,s,!0))return;const u=t.getId(l);if(l===e&&e.defaultView){const c=nn(e.defaultView);i({id:u,x:c.left,y:c.top})}else i({id:u,x:l.scrollLeft,y:l.scrollTop})}),o.scroll||100));return fe("scroll",n,e)}function Kp({viewportResizeCb:i},{win:e}){let t=-1,r=-1;const s=U(Et(U(()=>{const o=on(),n=an();(t!==o||r!==n)&&(i({width:Number(n),height:Number(o)}),t=o,r=n)}),200));return fe("resize",s,e)}const Oi=["INPUT","TEXTAREA","SELECT"],So=new WeakMap,qp=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],Co=new WeakMap;function Qp({inputCb:i,doc:e,mirror:t,blockClass:r,blockSelector:s,ignoreClass:o,ignoreSelector:n,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function h(b){let v=Mt(b);const C=b.isTrusted,M=v&&v.tagName;if(v&&M==="OPTION"&&(v=_.parentElement(v)),!v||!M||Oi.indexOf(M)<0||de(v,r,s,!0)||v.classList.contains(o)||n&&v.matches(n))return;let R=v.value,E=!1;const k=Fr(v)||"";k==="radio"||k==="checkbox"?E=v.checked:(a[M.toLowerCase()]||a[k])&&(R=Pr({element:v,maskInputOptions:a,tagName:M,type:k,value:R,maskInputFn:l})),f(v,c?{text:R,isChecked:E,userTriggered:C}:{text:R,isChecked:E});const D=v.name;k==="radio"&&D&&E&&e.querySelectorAll(`input[type="radio"][name="${D}"]`).forEach(j=>{if(j!==v){const P=j.value;f(j,c?{text:P,isChecked:!E,userTriggered:!1}:{text:P,isChecked:!E})}})}function f(b,v){const C=So.get(b),M=b,R=M.hasAttribute("placeholder"),E=M.value==="",k=typeof M.defaultValue=="string"?M.defaultValue==="":!0,D=!v.userTriggered,j=!C||C.text==="",P=R&&E&&k&&j&&D&&!v.isChecked&&M.type!=="hidden"&&Oi.includes(M.tagName),z=M.tagName==="INPUT"&&M.type==="text"&&!v.userTriggered&&v.text===M.defaultValue&&!C&&M.hasAttribute("placeholder"),N=!v.userTriggered&&M.value===M.defaultValue&&!C&&M.hasAttribute("placeholder")&&!v.isChecked&&M.type!=="hidden"&&Oi.includes(M.tagName),G=M.type==="checkbox"&&!v.userTriggered&&!v.isChecked&&!C,F=M.type==="radio"&&!v.userTriggered&&!v.isChecked&&!C;if(P||z||N||G||F){console.debug(`[${xe()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:_.describeNode(M),tag:M.tagName,nodeType:M.nodeType,attribute:M.attributes,value:M.value,isLikelyPhantom:P,isRenderDrivenTextInput:z,isValueFromDefault:N,isPhantomCheckbox:G,isPhantomRadio:F});return}if(!C||C.text!==v.text||C.isChecked!==v.isChecked){So.set(b,v);const A=t.getId(b);U(i)(ae(T({},v),{id:A}))}}const p=(u.input==="last"?["change"]:["input","change"]).map(b=>fe(b,U(h),e)),y=b=>{const v=Mt(b);if(!v||!v.tagName)return;if(u.input==="all"){h(b);return}const C=v.tagName,M=b.key,R=qp.includes(M),E=C==="TEXTAREA",k=e.activeElement===v,D=v.value,j=Co.get(v);if(Co.set(v,D),!k){h(b);return}if(R){if(!E){h(b);return}let P=j!=null?j:"",z=0;const N=2,G=()=>{const F=v.value,A=e.activeElement===v,Z=F!==P;if(!A){h(b);return}if(Z)z=0,P=F;else if(z++,z>=N){h(b);return}requestAnimationFrame(G)};requestAnimationFrame(G);return}};p.push(fe("keydown",U(y),e));const d=e.defaultView;if(!d)return()=>{p.forEach(b=>b())};const g=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),S=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...S.map(b=>ir(b[0],b[1],{set(){U(h)({target:this,isTrusted:!1})}},!1,d))),U(()=>{p.forEach(b=>b())})}function qr(i){const e=[];function t(r,s){if(Nr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Nr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Nr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Nr("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const n=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(n)}else if(r.parentStyleSheet){const n=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(n)}return s}return t(i,e)}function We(i,e,t){let r,s;return i?(i.ownerNode?r=e.getId(i.ownerNode):s=t.getId(i),{styleId:s,id:r}):{}}function em({styleSheetRuleCb:i,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:U((c,h,f)=>{const[m,p]=f,{id:y,styleId:d}=We(h,e,t.styleMirror);return(y&&y!==-1||d&&d!==-1)&&i({id:y,styleId:d,adds:[{rule:m,index:p}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,f=this.cssRules.length){const m=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[m,f])};const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:U((c,h,f)=>{const[m]=f,{id:p,styleId:y}=We(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&i({id:p,styleId:y,removes:[{index:m}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let n;r.CSSStyleSheet.prototype.replace&&(n=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(n,{apply:U((c,h,f)=>{const[m]=f,{id:p,styleId:y}=We(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&i({id:p,styleId:y,replace:m}),c.apply(h,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:U((c,h,f)=>{const[m]=f,{id:p,styleId:y}=We(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&i({id:p,styleId:y,replaceSync:m}),c.apply(h,f)})}));const l={};Ar("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(Ar("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),Ar("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),Ar("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:U((f,m,p)=>{const[y,d]=p,{id:g,styleId:S}=We(m.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||S&&S!==-1)&&i({id:g,styleId:S,adds:[{rule:y,index:[...qr(m),d||0]}]}),f.apply(m,p)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:U((f,m,p)=>{const[y]=p,{id:d,styleId:g}=We(m.parentStyleSheet,e,t.styleMirror);return(d&&d!==-1||g&&g!==-1)&&i({id:d,styleId:g,removes:[{index:[...qr(m),y]}]}),f.apply(m,p)})})}),U(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,n&&(r.CSSStyleSheet.prototype.replace=n),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 Tl({mirror:i,stylesheetManager:e},t){var r,s,o;let n=null;t.nodeName==="#document"?n=i.getId(t):n=i.getId(_.host(t));const a=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(o=(s=t.ownerDocument)==null?void 0:s.defaultView)==null?void 0:o.ShadowRoot,l=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return n===null||n===-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(n!==null&&n!==-1)try{e.adoptStyleSheets(u,n)}catch(f){}return h}}),U(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function tm({styleDeclarationCb:i,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:U((a,l,u)=>{var c;const[h,f,m]=u;if(t.has(h))return o.apply(l,[h,f,m]);const{id:p,styleId:y}=We((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||y&&y!==-1)&&i({id:p,styleId:y,set:{property:h,value:f,priority:m},index:qr(l.parentRule)}),a.apply(l,u)})});const n=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(n,{apply:U((a,l,u)=>{var c;const[h]=u;if(t.has(h))return n.apply(l,[h]);const{id:f,styleId:m}=We((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||m&&m!==-1)&&i({id:f,styleId:m,remove:{property:h},index:qr(l.parentRule)}),a.apply(l,u)})}),U(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=n})}function rm({mediaInteractionCb:i,blockClass:e,blockSelector:t,mirror:r,sampling:s,doc:o}){const n=U(l=>Et(U(u=>{const c=Mt(u);if(!c||de(c,e,t,!0))return;const{currentTime:h,volume:f,muted:m,playbackRate:p,loop:y}=c;i({type:l,id:r.getId(c),currentTime:h,volume:f,muted:m,playbackRate:p,loop:y})}),s.media||500)),a=[fe("play",n(ze.Play),o),fe("pause",n(ze.Pause),o),fe("seeked",n(ze.Seeked),o),fe("volumechange",n(ze.VolumeChange),o),fe("ratechange",n(ze.RateChange),o)];return U(()=>{a.forEach(l=>l())})}function im({fontCb:i,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],s=new WeakMap,o=t.FontFace;t.FontFace=function(l,u,c){const h=new o(l,u,c);return s.set(h,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};const n=rt(e.fonts,"add",function(a){return function(l){return setTimeout(U(()=>{const u=s.get(l);u&&(i(u),s.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{t.FontFace=o}),r.push(n),U(()=>{r.forEach(a=>a())})}function sm(i){const{doc:e,mirror:t,blockClass:r,blockSelector:s,selectionCb:o}=i;let n=!0;const a=U(()=>{const l=e.getSelection();if(!l||n&&(l!=null&&l.isCollapsed))return;n=l.isCollapsed||!1;const u=[],c=l.rangeCount||0;for(let h=0;h<c;h++){const f=l.getRangeAt(h),{startContainer:m,startOffset:p,endContainer:y,endOffset:d}=f;de(m,r,s,!0)||de(y,r,s,!0)||u.push({start:t.getId(m),startOffset:p,end:t.getId(y),endOffset:d})}o({ranges:u})});return a(),fe("selectionchange",a)}function nm({doc:i,customElementCb:e}){const t=i.defaultView;return!t||!t.customElements?()=>{}:rt(t.customElements,"define",function(s){return function(o,n,a){try{e({define:{name:o}})}catch(l){console.warn(`Custom element callback failed for ${o}`)}return s.apply(this,[o,n,a])}})}function om(i,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:s,scrollCb:o,viewportResizeCb:n,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,visibilityMutationCb:f,fontCb:m,selectionCb:p,customElementCb:y}=i;i.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),t(...d)},i.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),r(...d)},i.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),s(...d)},i.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),o(...d)},i.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),n(...d)},i.inputCb=(...d)=>{e.input&&e.input(...d),a(...d)},i.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),l(...d)},i.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),u(...d)},i.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),c(...d)},i.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),h(...d)},i.visibilityMutationCb=(...d)=>{e.visibilityMutation&&e.visibilityMutation(...d),f(...d)},i.fontCb=(...d)=>{e.font&&e.font(...d),m(...d)},i.selectionCb=(...d)=>{e.selection&&e.selection(...d),p(...d)},i.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),y(...d)}}function am(i,e={}){const t=i.doc.defaultView;if(!t)return()=>{};om(i,e);let r;i.recordDOM&&(r=Rl(i,i.doc));const s=Xp(i),o=Jp(i),n=Ol(i),a=Kp(i,{win:t}),l=Qp(i),u=rm(i);let c=()=>{},h=()=>{},f=()=>{},m=()=>{};i.recordDOM&&(c=em(i,{win:t}),h=Tl(i,i.doc),f=tm(i,{win:t}),i.collectFonts&&(m=im(i)));const p=sm(i),y=nm(i),d=[];for(const g of i.plugins)d.push(g.observer(g.callback,t,g.options));return U(()=>{Qe.forEach(g=>g.reset()),r==null||r.disconnect(),s(),o(),n(),a(),l(),u(),c(),h(),f(),m(),p(),y(),d.forEach(g=>g())})}function Nr(i){return typeof window[i]!="undefined"}function Ar(i){return!!(typeof window[i]!="undefined"&&window[i].prototype&&"insertRule"in window[i].prototype&&"deleteRule"in window[i].prototype)}class Eo{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){const o=r||this.getIdToRemoteIdMap(e),n=s||this.getRemoteIdToIdMap(e);let a=o.get(t);return a||(a=this.generateIdFn(),o.set(t,a),n.set(a,t)),a}getIds(e,t){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(o=>this.getId(e,o,r,s))}getRemoteId(e,t,r){const s=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const o=s.get(t);return o||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(s=>this.getRemoteId(e,s,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 lm{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new Eo(zo)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Eo(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(s=this.loadListener)==null||s.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const s=this.crossOriginIframeMap.get(e.source);if(!s)return;const o=this.transformCrossOriginEvent(s,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case O.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const s=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(t.data.node,s),{timestamp:t.timestamp,type:O.IncrementalSnapshot,data:{source:x.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case O.Meta:case O.Load:case O.DomContentLoaded:return!1;case O.Plugin:return t;case O.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case O.IncrementalSnapshot:switch(t.data.source){case x.Mutation:return t.data.adds.forEach(s=>{this.replaceIds(s,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,e);const o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(s.node,o)}),t.data.removes.forEach(s=>{this.replaceIds(s,e,["parentId","id"])}),t.data.attributes.forEach(s=>{this.replaceIds(s,e,["id"])}),t.data.texts.forEach(s=>{this.replaceIds(s,e,["id"])}),t;case x.Drag:case x.TouchMove:case x.MouseMove:return t.data.positions.forEach(s=>{this.replaceIds(s,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(s=>{this.replaceIds(s,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(s=>{this.replaceStyleIds(s,e,["styleId"])}),t}}return!1}replace(e,t,r,s){for(const o of s)!Array.isArray(t[o])&&typeof t[o]!="number"||(Array.isArray(t[o])?t[o]=e.getIds(r,t[o]):t[o]=e.getId(r,t[o]));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!==Le.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class um{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(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(!Bt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Rl(ae(T({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Ol(ae(T({},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(Tl({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(rt(e.prototype,"attachShadow",function(s){return function(o){const n=s.call(this,o),a=_.shadowRoot(this);return a&&gn(this)&&r.addShadowRoot(a,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var dt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$t=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Rr=0;Rr<dt.length;Rr++)$t[dt.charCodeAt(Rr)]=Rr;var cm=function(i){var e=new Uint8Array(i),t,r=e.length,s="";for(t=0;t<r;t+=3)s+=dt[e[t]>>2],s+=dt[(e[t]&3)<<4|e[t+1]>>4],s+=dt[(e[t+1]&15)<<2|e[t+2]>>6],s+=dt[e[t+2]&63];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s},hm=function(i){var e=i.length*.75,t=i.length,r,s=0,o,n,a,l;i[i.length-1]==="="&&(e--,i[i.length-2]==="="&&e--);var u=new ArrayBuffer(e),c=new Uint8Array(u);for(r=0;r<t;r+=4)o=$t[i.charCodeAt(r)],n=$t[i.charCodeAt(r+1)],a=$t[i.charCodeAt(r+2)],l=$t[i.charCodeAt(r+3)],c[s++]=o<<2|n>>4,c[s++]=(n&15)<<4|a>>2,c[s++]=(a&3)<<6|l&63;return u};const Mo=new Map;function fm(i,e){let t=Mo.get(i);return t||(t=new Map,Mo.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}const Dl=(i,e,t)=>{if(!i||!(_l(i,e)||typeof i=="object"))return;const r=i.constructor.name,s=fm(t,r);let o=s.indexOf(i);return o===-1&&(o=s.length,s.push(i)),o};function Lr(i,e,t){if(i instanceof Array)return i.map(r=>Lr(r,e,t));if(i===null)return i;if(i instanceof Float32Array||i instanceof Float64Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Uint8Array||i instanceof Uint16Array||i instanceof Int16Array||i instanceof Int8Array||i instanceof Uint8ClampedArray)return{rr_type:i.constructor.name,args:[Object.values(i)]};if(i instanceof ArrayBuffer){const r=i.constructor.name,s=cm(i);return{rr_type:r,base64:s}}else{if(i instanceof DataView)return{rr_type:i.constructor.name,args:[Lr(i.buffer,e,t),i.byteOffset,i.byteLength]};if(i instanceof HTMLImageElement){const r=i.constructor.name,{src:s}=i;return{rr_type:r,src:s}}else if(i instanceof HTMLCanvasElement){const r="HTMLImageElement",s=i.toDataURL();return{rr_type:r,src:s}}else{if(i instanceof ImageData)return{rr_type:i.constructor.name,args:[Lr(i.data,e,t),i.width,i.height]};if(_l(i,e)||typeof i=="object"){const r=i.constructor.name,s=Dl(i,e,t);return{rr_type:r,index:s}}}}return i}const kl=(i,e,t)=>i.map(r=>Lr(r,e,t)),_l=(i,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof e[s]=="function").find(s=>i instanceof e[s]);function dm(i,e,t,r){const s=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const n of o)try{if(typeof e.CanvasRenderingContext2D.prototype[n]!="function")continue;const a=rt(e.CanvasRenderingContext2D.prototype,n,function(l){return function(...u){return de(this.canvas,t,r,!0)||setTimeout(()=>{const c=kl(u,e,this);i(this.canvas,{type:Be["2D"],property:n,args:c})},0),l.apply(this,u)}});s.push(a)}catch(a){const l=ir(e.CanvasRenderingContext2D.prototype,n,{set(u){i(this.canvas,{type:Be["2D"],property:n,args:[u],setter:!0})}});s.push(l)}return()=>{s.forEach(n=>n())}}function pm(i){return i==="experimental-webgl"?"webgl":i}function xo(i,e,t,r){const s=[];try{const o=rt(i.HTMLCanvasElement.prototype,"getContext",function(n){return function(a,...l){if(!de(this,e,t,!0)){const u=pm(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 n.apply(this,[a,...l])}});s.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(o=>o())}}function Io(i,e,t,r,s,o){const n=[],a=Object.getOwnPropertyNames(i);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof i[l]!="function")continue;const u=rt(i,l,function(c){return function(...h){const f=c.apply(this,h);if(Dl(f,o,this),"tagName"in this.canvas&&!de(this.canvas,r,s,!0)){const m=kl(h,o,this),p={type:e,property:l,args:m};t(this.canvas,p)}return f}});n.push(u)}catch(u){const c=ir(i,l,{set(h){t(this.canvas,{type:e,property:l,args:[h],setter:!0})}});n.push(c)}return n}function mm(i,e,t,r){const s=[];return s.push(...Io(e.WebGLRenderingContext.prototype,Be.WebGL,i,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&s.push(...Io(e.WebGL2RenderingContext.prototype,Be.WebGL2,i,t,r,e)),()=>{s.forEach(o=>o())}}const $l="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",gm=i=>Uint8Array.from(atob(i),e=>e.charCodeAt(0)),No=typeof window!="undefined"&&window.Blob&&new Blob([gm($l)],{type:"text/javascript;charset=utf-8"});function ym(i){let e;try{if(e=No&&(window.URL||window.webkitURL).createObjectURL(No),!e)throw"";const t=new Worker(e,{name:i==null?void 0:i.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+$l,{name:i==null?void 0:i.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class vm{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",!1),w(this,"locked",!1),w(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:s,blockSelector:o,recordCanvas:n,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,n&&t==="all"&&this.initCanvasMutationObserver(r,s,o),n&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,s,o,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,s,o){const n=xo(t,r,s,!0),a=new Map,l=new ym;l.onmessage=p=>{const{id:y}=p.data;if(a.set(y,!1),!("base64"in p.data))return;const{base64:d,type:g,width:S,height:b}=p.data;this.mutationCb({id:y,type:Be["2D"],commands:[{property:"clearRect",args:[0,0,S,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:g}]},0,0]}]})};const u=1e3/e;let c=0,h;const f=()=>{const p=[];return t.document.querySelectorAll("canvas").forEach(y=>{de(y,r,s,!0)||p.push(y)}),p},m=p=>{if(c&&p-c<u){h=requestAnimationFrame(m);return}c=p,f().forEach(async y=>{var d;const g=this.mirror.getId(y);if(a.get(g)||y.width===0||y.height===0)return;if(a.set(g,!0),["webgl","webgl2"].includes(y.__context)){const b=y.getContext(y.__context);((d=b==null?void 0:b.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===!1&&b.clear(b.COLOR_BUFFER_BIT)}const S=await createImageBitmap(y);l.postMessage({id:g,bitmap:S,width:y.width,height:y.height,dataURLOptions:o.dataURLOptions},[S])}),h=requestAnimationFrame(m)};h=requestAnimationFrame(m),this.resetObservers=()=>{n(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=xo(e,t,r,!1),o=dm(this.processMutation.bind(this),e,t,r),n=mm(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),o(),n()}}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 s=r.map(n=>{const u=n,{type:a}=u;return nt(u,["type"])}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:s}),this.pendingCanvasMutations.delete(e)}}class wm{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new pn),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:[]},s=[];for(const o of e){let n;this.styleMirror.has(o)?n=this.styleMirror.getId(o):(n=this.styleMirror.add(o),s.push({styleId:n,rules:Array.from(o.rules||CSSRule,(a,l)=>({rule:Vo(a,o.href),index:l}))})),r.styleIds.push(n)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class bm{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(s=>s!==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(){}}function Sm(i,e,t){var c,h,f,m,p,y;const r=(c=t==null?void 0:t.root)!=null?c:null,s=(h=t==null?void 0:t.threshold)!=null?h:.5,o=(f=t==null?void 0:t.sensitivity)!=null?f:.05,n=Cm((m=t==null?void 0:t.rootMargin)!=null?m:"0px"),a=new Map,l=Em(r),u=Mm(l,n);for(const d of i){const g=d.getBoundingClientRect();let S=Nm(),b=0;g.width>0&&g.height>0&&(S=xm(g,u),b=Im(g,S),b=Math.round(b*100)/100);const v=Am(d),C=(p=e.get(d))!=null?p:null,M=(y=C==null?void 0:C.intersectionRatio)!=null?y:0,R=b,E=(C==null?void 0:C.isStyleVisible)&&M>s,k=v&&R>s;!C||E!==k||E!==k&&Math.abs(R-M)>o?a.set(d,{target:d,isVisible:k,isStyleVisible:v,intersectionRatio:R,intersectionRect:S,oldValue:C}):a.set(d,C)}return a}function Cm(i){const e=i.trim().split(/\s+/),t=(r,s)=>r.endsWith("%")?parseFloat(r)/100*s:parseFloat(r)||0;return function(r){const s=t(e[0]||"0px",r.height),o=t(e[1]||e[0]||"0px",r.width),n=t(e[2]||e[0]||"0px",r.height),a=t(e[3]||e[1]||e[0]||"0px",r.width);return{top:s,right:o,bottom:n,left:a,width:0,height:0}}}function Em(i){return i?i.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function Mm(i,e){const t=e(i);return new DOMRect(i.left-t.left,i.top-t.top,i.width+t.left+t.right,i.height+t.top+t.bottom)}function xm(i,e){const t=Math.max(i.top,e.top),r=Math.max(i.left,e.left),s=Math.min(i.bottom,e.bottom),o=Math.min(i.right,e.right),n=Math.max(0,o-r),a=Math.max(0,s-t);return{top:t,left:r,bottom:s,right:o,width:n,height:a}}function Im(i,e){const t=i.width*i.height,r=e.width*e.height;return t>0?r/t:0}function Nm(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function Am(i){const e=getComputedStyle(i);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class Rm{constructor(e){var u,c,h,f,m,p;w(this,"frozen",!1),w(this,"locked",!1),w(this,"pending",new Map),w(this,"mirror"),w(this,"mutationCb"),w(this,"rafId",null),w(this,"intervalId",null),w(this,"rafThrottle"),w(this,"lastFlushTime",0),w(this,"elements",new Set),w(this,"previousState",new Map),w(this,"root",null),w(this,"threshold"),w(this,"sensitivity"),w(this,"rootMargin"),w(this,"hasInitialized",!1),w(this,"mode","none"),w(this,"debounce",50),w(this,"throttle",100),w(this,"buffer",new Map),w(this,"debounceTimer",null),w(this,"lastThrottleTime",0),w(this,"disabled",!1),w(this,"notifyActivity");const{doc:t,mirror:r,sampling:s,mutationCb:o,notifyActivity:n}=e;if(this.mirror=r,this.mutationCb=o,this.notifyActivity=n,this.rootMargin="0px",s===!1){this.disabled=!0;return}const a=typeof s=="object"&&s!==null?s:{};this.mode=(u=a==null?void 0:a.mode)!=null?u:"none",this.debounce=Number((c=a==null?void 0:a.debounce)!=null?c:100),this.throttle=Number((h=a==null?void 0:a.throttle)!=null?h:100),this.threshold=Number((f=a==null?void 0:a.threshold)!=null?f:.5),this.sensitivity=Number((m=a==null?void 0:a.sensitivity)!=null?m:.05),this.rafThrottle=Number((p=a==null?void 0:a.rafThrottle)!=null?p:50),t.querySelectorAll("*").forEach(y=>this.observe(y)),new MutationObserver(y=>{y.forEach(d=>{d.addedNodes.forEach(g=>{g.nodeType===Node.ELEMENT_NODE&&(this.observe(g),g.querySelectorAll("*").forEach(S=>this.observe(S)))}),d.removedNodes.forEach(g=>{g.nodeType===Node.ELEMENT_NODE&&this.unobserve(g)})})}).observe(t.body,{childList:!0,subtree:!0}),this.startPendingFlushLoop()}startPendingFlushLoop(){if(!this.disabled)if(typeof requestAnimationFrame=="function"){const e=t=>{t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations()),this.rafId=requestAnimationFrame(e)};this.rafId=requestAnimationFrame(e)}else{const e=()=>{const t=performance.now();t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations())};this.intervalId=setInterval(e,this.rafThrottle)}}flushPendingVisibilityMutations(){if(this.disabled||this.frozen||this.locked||this.elements.size===0)return;const e=Sm(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,r]of e.entries()){const s=this.previousState.get(t);if(!s||s.isVisible!==r.isVisible||Math.abs(s.intersectionRatio-r.intersectionRatio)>this.sensitivity){const n=this.mirror.getId(t);n!==-1&&this.buffer.set(t,{id:n,isVisible:r.isVisible,ratio:r.intersectionRatio}),this.previousState.set(t,r)}}if(this.previousState=e,!this.hasInitialized){this.hasInitialized=!0,this.buffer.clear();return}this.scheduleEmit()}scheduleEmit(){if(this.mode==="debounce")clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.flushBuffer(),this.debounce);else if(this.mode==="throttle"){const e=performance.now();e-this.lastThrottleTime>=this.throttle&&(this.lastThrottleTime=e,this.flushBuffer())}else this.flushBuffer()}flushBuffer(){var e;this.buffer.size!==0&&((e=this.notifyActivity)==null||e.call(this,this.buffer.size),this.mutationCb({mutations:Array.from(this.buffer.values())}),this.buffer.clear())}observe(e){this.disabled||this.elements.add(e)}unobserve(e){this.disabled||(this.elements.delete(e),this.previousState.delete(e),this.pending.delete(e))}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1,this.flushPendingVisibilityMutations()}lock(){this.locked=!0}unlock(){this.locked=!1}reset(){this.elements.clear(),this.previousState.clear(),this.pending.clear(),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}}const Om="2.1.3-alpha.1";let re,Lt,Ti,Di,gt=!1;const Qr=[];let qe;function Tm(i){return new Promise(t=>{const r=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})},s=(()=>{let o=!1;return()=>{o||(o=!0,r())}})();["interactive","complete"].includes(i.document.readyState)?s():(i.addEventListener("DOMContentLoaded",s,{once:!0}),i.addEventListener("load",s,{once:!0}),setTimeout(()=>{s()},5e3))})}try{if(Array.from([1],i=>i*2)[0]!==2){const i=document.createElement("iframe");document.body.appendChild(i),Array.from=((Cn=i.contentWindow)==null?void 0:Cn.Array.from)||Array.from,document.body.removeChild(i)}}catch(i){console.debug("Unable to override Array.from",i)}const Se=Wo();function we(i={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryNvm:s,blockClass:o="rr-block",blockSelector:n=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,excludeAttribute:u,maskTextClass:c="rr-mask",maskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:p,slimDOMOptions:y,maskInputFn:d,maskTextFn:g,hooks:S,packFn:b,sampling:v={},dataURLOptions:C={},mousemoveWait:M,recordDOM:R=!0,recordCanvas:E=!1,recordCrossOriginIframes:k=!1,recordAfter:D=i.recordAfter==="DOMContentLoaded"?i.recordAfter:"load",flushCustomEvent:j=i.flushCustomEvent!==void 0?i.flushCustomEvent:"after",userTriggeredOnInput:P=!1,collectFonts:z=!1,inlineImages:N=!1,plugins:G,keepIframeSrcFn:F=()=>!1,ignoreCSSAttributes:A=new Set([]),errorHandler:Z}=i;Yp(Z);const se=k?window.parent===window:!0;let J=!1;if(!se)try{window.parent.document&&(J=!1)}catch(L){J=!0}if(se&&!e)throw new Error("emit function is required");if(!se&&!J)return()=>{};M!==void 0&&v.mousemove===void 0&&(v.mousemove=M),Se.reset();const ue=u===void 0?/.^/:u,me=m===!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}:p!==void 0?p:{password:!0},ve=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all",headTitleMutations:y==="all"}:y||{};cn();let ce,oe=0,Ue=0;const Je=L=>{Ue+=L},ke=L=>{for(const ge of G||[])ge.eventProcessor&&(L=ge.eventProcessor(L));return b&&!J&&(L=b(L)),L};re=(L,ge)=>{var ne;const he=L;if(he.timestamp=xe(),(ne=Qe[0])!=null&&ne.isFrozen()&&he.type!==O.FullSnapshot&&!(he.type===O.IncrementalSnapshot&&he.data.source===x.Mutation)&&Qe.forEach(Ee=>Ee.unfreeze()),se)e==null||e(ke(he),ge);else if(J){const Ee={type:"rrweb",event:ke(he),origin:window.location.origin,isCheckout:ge};window.parent.postMessage(Ee,"*")}if(he.type===O.FullSnapshot)ce=he,oe=0;else if(he.type===O.IncrementalSnapshot){if(he.data.source===x.Mutation&&he.data.isAttachIframe)return;oe++;const Ee=r&&oe>=r,st=t&&he.timestamp-ce.timestamp>t,X=s&&Ue>=s;(Ee||st||X)&&(X&&(Ue=0),Lt(!0))}};const it=L=>{re({type:O.IncrementalSnapshot,data:T({source:x.Mutation},L)})},It=L=>re({type:O.IncrementalSnapshot,data:T({source:x.Scroll},L)}),Nt=L=>re({type:O.IncrementalSnapshot,data:T({source:x.CanvasMutation},L)}),At=L=>{var ge;(ge=S==null?void 0:S.visibilityMutation)==null||ge.call(S,L),re({type:O.IncrementalSnapshot,data:T({source:x.VisibilityMutation},L)})},Zl=L=>re({type:O.IncrementalSnapshot,data:T({source:x.AdoptedStyleSheet},L)}),Ce=new wm({mutationCb:it,adoptedStyleSheetCb:Zl}),Ke=new lm({mirror:Se,mutationCb:it,stylesheetManager:Ce,recordCrossOriginIframes:k,wrappedEmit:re});for(const L of G||[])L.getMirror&&L.getMirror({nodeMirror:Se,crossOriginIframeMirror:Ke.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ke.crossOriginIframeStyleMirror});const gi=new bm;Ti=new vm({recordCanvas:E,mutationCb:Nt,win:window,blockClass:o,blockSelector:n,mirror:Se,sampling:v.canvas,dataURLOptions:C}),Di=new Rm({doc:window.document,mirror:Se,sampling:v.visibility,mutationCb:At,notifyActivity:Je});const sr=new um({mutationCb:it,scrollCb:It,bypassOptions:{blockClass:o,blockSelector:n,maskTextClass:c,maskTextSelector:h,excludeAttribute:ue,inlineStylesheet:f,maskInputOptions:me,dataURLOptions:C,maskTextFn:g,maskInputFn:d,recordCanvas:E,inlineImages:N,sampling:v,slimDOMOptions:ve,iframeManager:Ke,stylesheetManager:Ce,canvasManager:Ti,visibilityManager:Di,keepIframeSrcFn:F,processedNodeManager:gi},mirror:Se});Lt=(L=!1)=>{if(!R)return;re({type:O.Meta,data:{href:window.location.href,width:an(),height:on()}},L),Ce.reset(),sr.init(),Qe.forEach(ne=>ne.lock());const ge=ic(document,{mirror:Se,blockClass:o,blockSelector:n,maskTextClass:c,maskTextSelector:h,excludeAttribute:ue,inlineStylesheet:f,maskAllInputs:me,maskTextFn:g,maskInputFn:d,slimDOM:ve,dataURLOptions:C,recordCanvas:E,inlineImages:N,onSerialize:ne=>{mt(ne,Se)&&Ke.addIframe(ne),fn(ne,Se)&&Ce.trackLinkElement(ne),Ge(ne)&&sr.addShadowRoot(_.shadowRoot(ne),document)},onIframeLoad:(ne,he)=>{Ke.attachIframe(ne,he),sr.observeAttachShadow(ne)},onStylesheetLoad:(ne,he)=>{Ce.attachLinkElement(ne,he)},keepIframeSrcFn:F});if(!ge)return console.warn("Failed to snapshot the document");re({type:O.FullSnapshot,data:{node:ge,initialOffset:nn(window)}},L),Qe.forEach(ne=>ne.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ce.adoptStyleSheets(document.adoptedStyleSheets,Se.getId(document))},qe=()=>{for(const L of Qr)re(L);Qr.length=0};try{const L=[],ge=Ee=>{var st;return U(am)({mutationCb:it,mousemoveCb:(X,yi)=>re({type:O.IncrementalSnapshot,data:{source:yi,positions:X}}),mouseInteractionCb:X=>re({type:O.IncrementalSnapshot,data:T({source:x.MouseInteraction},X)}),scrollCb:It,viewportResizeCb:X=>re({type:O.IncrementalSnapshot,data:T({source:x.ViewportResize},X)}),inputCb:X=>re({type:O.IncrementalSnapshot,data:T({source:x.Input},X)}),mediaInteractionCb:X=>re({type:O.IncrementalSnapshot,data:T({source:x.MediaInteraction},X)}),styleSheetRuleCb:X=>re({type:O.IncrementalSnapshot,data:T({source:x.StyleSheetRule},X)}),styleDeclarationCb:X=>re({type:O.IncrementalSnapshot,data:T({source:x.StyleDeclaration},X)}),canvasMutationCb:Nt,visibilityMutationCb:At,fontCb:X=>re({type:O.IncrementalSnapshot,data:T({source:x.Font},X)}),selectionCb:X=>{re({type:O.IncrementalSnapshot,data:T({source:x.Selection},X)})},customElementCb:X=>{re({type:O.IncrementalSnapshot,data:T({source:x.CustomElement},X)})},blockClass:o,ignoreClass:a,ignoreSelector:l,maskTextClass:c,maskTextSelector:h,excludeAttribute:ue,maskInputOptions:me,inlineStylesheet:f,sampling:v,recordDOM:R,recordCanvas:E,inlineImages:N,userTriggeredOnInput:P,collectFonts:z,doc:Ee,maskInputFn:d,maskTextFn:g,keepIframeSrcFn:F,blockSelector:n,slimDOMOptions:ve,dataURLOptions:C,mirror:Se,iframeManager:Ke,stylesheetManager:Ce,shadowDomManager:sr,processedNodeManager:gi,canvasManager:Ti,visibilityManager:Di,ignoreCSSAttributes:A,plugins:((st=G==null?void 0:G.filter(X=>X.observer))==null?void 0:st.map(X=>({observer:X.observer,options:X.options,callback:yi=>re({type:O.Plugin,data:{plugin:X.name,payload:yi}})})))||[]},S)};Ke.addLoadListener(Ee=>{try{L.push(ge(Ee.contentDocument))}catch(st){console.warn(st)}});const ne=()=>{j==="before"&&qe(),Lt(),L.push(ge(document)),gt=!0,j==="after"&&qe()},he=async()=>{j==="before"&&qe(),D==="DOMContentStabilized"&&(console.debug(`[${xe()}] [rrweb:record] \u{1F7E2} Waiting for DOM stabilization...`),await Tm(window),console.debug(`[${xe()}] [rrweb:record] \u2705 DOM stabilized, starting recording`)),console.debug(`[${xe()}] [rrweb:record] \u2705 Init dom and takeFullSnapshot `),Lt(),L.push(ge(document)),gt=!0,j==="after"&&qe()};return document.readyState==="interactive"||document.readyState==="complete"?ne():(L.push(fe("DOMContentLoaded",()=>{re({type:O.DomContentLoaded,data:{}}),D==="DOMContentLoaded"&&ne()})),L.push(fe("load",()=>{re({type:O.Load,data:{}}),D==="load"&&ne()},window))),()=>{qe(),L.forEach(Ee=>Ee()),gi.destroy(),gt=!1,Zp()}}catch(L){console.warn(L)}}we.getVersion=()=>Om;we.isRecording=()=>gt;we.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${Qr.length} events`),qe()};we.addCustomEvent=(i,e)=>{const t={type:O.Custom,data:{tag:i,payload:e}};if(!gt){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${i}`),Qr.push(t);return}re(t)};we.freezePage=()=>{Qe.forEach(i=>i.freeze())};we.takeFullSnapshot=i=>{if(!gt)throw new Error("please take full snapshot after start recording");Lt(i)};we.mirror=Se;function Ll(i){return{all:i=i||new Map,on:function(e,t){var r=i.get(e);r?r.push(t):i.set(e,[t])},off:function(e,t){var r=i.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):i.set(e,[]))},emit:function(e,t){var r=i.get(e);r&&r.slice().map(function(s){s(t)}),(r=i.get("*"))&&r.slice().map(function(s){s(e,t)})}}}const Dm=Object.freeze(Object.defineProperty({__proto__:null,default:Ll},Symbol.toStringTag,{value:"Module"}));function km(i=window,e=document){if("scrollBehavior"in e.documentElement.style&&i.__forceSmoothScrollPolyfill__!==!0)return;const t=i.HTMLElement||i.Element,r=468,s={scroll:i.scroll||i.scrollTo,scrollBy:i.scrollBy,elementScroll:t.prototype.scroll||l,scrollIntoView:t.prototype.scrollIntoView},o=i.performance&&i.performance.now?i.performance.now.bind(i.performance):Date.now;function n(g){const S=["MSIE ","Trident/","Edge/"];return new RegExp(S.join("|")).test(g)}const a=n(i.navigator.userAgent)?1:0;function l(g,S){this.scrollLeft=g,this.scrollTop=S}function u(g){return .5*(1-Math.cos(Math.PI*g))}function c(g){if(g===null||typeof g!="object"||g.behavior===void 0||g.behavior==="auto"||g.behavior==="instant")return!0;if(typeof g=="object"&&g.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+g.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(g,S){if(S==="Y")return g.clientHeight+a<g.scrollHeight;if(S==="X")return g.clientWidth+a<g.scrollWidth}function f(g,S){const b=i.getComputedStyle(g,null)["overflow"+S];return b==="auto"||b==="scroll"}function m(g){const S=h(g,"Y")&&f(g,"Y"),b=h(g,"X")&&f(g,"X");return S||b}function p(g){for(;g!==e.body&&m(g)===!1;)g=g.parentNode||g.host;return g}function y(g){const S=o();let b,v,C,M=(S-g.startTime)/r;M=M>1?1:M,b=u(M),v=g.startX+(g.x-g.startX)*b,C=g.startY+(g.y-g.startY)*b,g.method.call(g.scrollable,v,C),(v!==g.x||C!==g.y)&&i.requestAnimationFrame(y.bind(i,g))}function d(g,S,b){let v,C,M,R;const E=o();g===e.body?(v=i,C=i.scrollX||i.pageXOffset,M=i.scrollY||i.pageYOffset,R=s.scroll):(v=g,C=g.scrollLeft,M=g.scrollTop,R=l),y({scrollable:v,method:R,startTime:E,startX:C,startY:M,x:S,y:b})}i.scroll=i.scrollTo=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){s.scroll.call(i,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:i.scrollX||i.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:i.scrollY||i.pageYOffset);return}d.call(i,e.body,arguments[0].left!==void 0?~~arguments[0].left:i.scrollX||i.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:i.scrollY||i.pageYOffset)}},i.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])){s.scrollBy.call(i,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}d.call(i,e.body,~~arguments[0].left+(i.scrollX||i.pageXOffset),~~arguments[0].top+(i.scrollY||i.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");s.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 g=arguments[0].left,S=arguments[0].top;d.call(this,this,typeof g=="undefined"?this.scrollLeft:~~g,typeof S=="undefined"?this.scrollTop:~~S)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){s.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){s.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const g=p(this),S=g.getBoundingClientRect(),b=this.getBoundingClientRect();g!==e.body?(d.call(this,g,g.scrollLeft+b.left-S.left,g.scrollTop+b.top-S.top),i.getComputedStyle(g).position!=="fixed"&&i.scrollBy({left:S.left,top:S.top,behavior:"smooth"})):i.scrollBy({left:b.left,top:b.top,behavior:"smooth"})}}class _m{constructor(e=[],t){w(this,"timeOffset",0),w(this,"speed"),w(this,"actions"),w(this,"raf",null),w(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 s=Math.floor((t+r)/2);if(this.actions[s].delay<e.delay)t=s+1;else if(this.actions[s].delay>e.delay)r=s-1;else return s+1}return t}}function Ao(i,e){if(i.type===O.IncrementalSnapshot&&i.data.source===x.MouseMove&&i.data.positions&&i.data.positions.length){const t=i.data.positions[0].timeOffset,r=i.timestamp+t;return i.delay=r-e,r-e}return i.delay=i.timestamp-e,i.delay}/*! *****************************************************************************
70
70
  Copyright (c) Microsoft Corporation.
71
71
 
72
72
  Permission to use, copy, modify, and/or distribute this software for any
@@ -79,7 +79,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
79
79
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
80
80
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
81
81
  PERFORMANCE OF THIS SOFTWARE.
82
- ***************************************************************************** */function Ro(i,e){var t=typeof Symbol=="function"&&i[Symbol.iterator];if(!t)return i;var r,s,o=t.call(i),n=[];try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)n.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(s)throw s.error}}return n}var pt;(function(i){i[i.NotStarted=0]="NotStarted",i[i.Running=1]="Running",i[i.Stopped=2]="Stopped"})(pt||(pt={}));var Pl={type:"xstate.init"};function ki(i){return i===void 0?[]:[].concat(i)}function ut(i){return{type:"xstate.assign",assignment:i}}function Oo(i,e){return typeof(i=typeof i=="string"&&e&&e[i]?e[i]:i)=="string"?{type:i}:typeof i=="function"?{type:i.name,exec:i}:i}function ei(i){return function(e){return i===e}}function Fl(i){return typeof i=="string"?{type:i}:i}function To(i,e){return{value:i,context:e,actions:[],changed:!1,matches:ei(i)}}function Do(i,e,t){var r=e,s=!1;return[i.filter(function(o){if(o.type==="xstate.assign"){s=!0;var n=Object.assign({},r);return typeof o.assignment=="function"?n=o.assignment(r,t):Object.keys(o.assignment).forEach(function(a){n[a]=typeof o.assignment[a]=="function"?o.assignment[a](r,t):o.assignment[a]}),r=n,!1}return!0}),r,s]}function Bl(i,e){e===void 0&&(e={});var t=Ro(Do(ki(i.states[i.initial].entry).map(function(n){return Oo(n,e.actions)}),i.context,Pl),2),r=t[0],s=t[1],o={config:i,_options:e,initialState:{value:i.initial,actions:r,context:s,matches:ei(i.initial)},transition:function(n,a){var l,u,c=typeof n=="string"?{value:n,context:i.context}:n,h=c.value,f=c.context,m=Fl(a),p=i.states[h];if(p.on){var y=ki(p.on[m.type]);try{for(var d=function(A){var Z=typeof Symbol=="function"&&Symbol.iterator,se=Z&&A[Z],J=0;if(se)return se.call(A);if(A&&typeof A.length=="number")return{next:function(){return A&&J>=A.length&&(A=void 0),{value:A&&A[J++],done:!A}}};throw new TypeError(Z?"Object is not iterable.":"Symbol.iterator is not defined.")}(y),g=d.next();!g.done;g=d.next()){var S=g.value;if(S===void 0)return To(h,f);var b=typeof S=="string"?{target:S}:S,v=b.target,C=b.actions,x=C===void 0?[]:C,R=b.cond,E=R===void 0?function(){return!0}:R,k=v===void 0,D=v!=null?v:h,j=i.states[D];if(E(f,m)){var P=Ro(Do((k?ki(x):[].concat(p.exit,x,j.entry).filter(function(A){return A})).map(function(A){return Oo(A,o._options.actions)}),f,m),3),z=P[0],N=P[1],G=P[2],F=v!=null?v:h;return{value:F,context:N,actions:z,changed:v!==h||z.length>0||G,matches:ei(F)}}}}catch(A){l={error:A}}finally{try{g&&!g.done&&(u=d.return)&&u.call(d)}finally{if(l)throw l.error}}}return To(h,f)}};return o}var ko=function(i,e){return i.actions.forEach(function(t){var r=t.exec;return r&&r(i.context,e)})};function Ul(i){var e=i.initialState,t=pt.NotStarted,r=new Set,s={_machine:i,send:function(o){t===pt.Running&&(e=i.transition(e,o),ko(e,Fl(o)),r.forEach(function(n){return n(e)}))},subscribe:function(o){return r.add(o),o(e),{unsubscribe:function(){return r.delete(o)}}},start:function(o){if(o){var n=typeof o=="object"?o:{context:i.config.context,value:o};e={value:n.value,actions:[],context:n.context,matches:ei(n.value)}}return t=pt.Running,ko(e,Pl),s},stop:function(){return t=pt.Stopped,r.clear(),s},get state(){return e},get status(){return t}};return s}function $m(i,e){for(let t=i.length-1;t>=0;t--){const r=i[t];if(r.type===O.Meta&&r.timestamp<=e)return i.slice(t)}return i}function Lm(i,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){const s=Bl({id:"player",context:i,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:ut({lastPlayedEvent:(o,n)=>n.type==="CAST_EVENT"?n.payload.event:o.lastPlayedEvent}),recordTimeOffset:ut((o,n)=>{let a=o.timeOffset;return"payload"in n&&"timeOffset"in n.payload&&(a=n.payload.timeOffset),ae(T({},o),{timeOffset:a,baselineTime:o.events[0].timestamp+a})}),play(o){var n;const{timer:a,events:l,baselineTime:u,lastPlayedEvent:c}=o;a.clear();for(const p of l)Ao(p,u);const h=$m(l,u);let f=c==null?void 0:c.timestamp;(c==null?void 0:c.type)===O.IncrementalSnapshot&&c.data.source===M.MouseMove&&(f=c.timestamp+((n=c.data.positions[0])==null?void 0:n.timeOffset)),u<(f||0)&&r.emit(V.PlayBack);const m=new Array;for(const p of h)if(!(f&&f<u&&(p.timestamp<=f||p===c)))if(p.timestamp<u)m.push(p);else{const y=e(p,!1);a.addAction({doAction:()=>{y()},delay:p.delay})}t(m),r.emit(V.Flush),a.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:ut(o=>ae(T({},o),{lastPlayedEvent:null})),startLive:ut({baselineTime:(o,n)=>(o.timer.start(),n.type==="TO_LIVE"&&n.payload.baselineTime?n.payload.baselineTime:Date.now())}),addEvent:ut((o,n)=>{const{baselineTime:a,timer:l,events:u}=o;if(n.type==="ADD_EVENT"){const{event:c}=n.payload;Ao(c,a);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let p=-1,y=0;for(;y<=h;){const d=Math.floor((y+h)/2);u[d].timestamp<=c.timestamp?y=d+1:h=d-1}p===-1&&(p=y),u.splice(p,0,c)}const f=c.timestamp<a,m=e(c,f);f?m():l.isActive()&&l.addAction({doAction:()=>{m()},delay:c.delay})}return ae(T({},o),{events:u})})}});return Ul(s)}function Pm(i){const e=Bl({id:"speed",context:i,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:ut({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return Ul(e)}const Fm=i=>[`.${i} { background: currentColor }`,"noscript { display: none !important; }"],_o=new Map;function Vl(i,e){let t=_o.get(i);return t||(t=new Map,_o.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}function je(i,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 s=await je(i,e,t)(r.args);return await createImageBitmap.apply(null,s)}else if("index"in r){if(t||e===null)return r;const{rr_type:s,index:o}=r;return Vl(e,s)[o]}else if("args"in r){const{rr_type:s,args:o}=r,n=window[s];return new n(...await Promise.all(o.map(je(i,e,t))))}else{if("base64"in r)return hm(r.base64);if("src"in r){const s=i.get(r.src);if(s)return s;{const o=new Image;return o.src=r.src,i.set(r.src,o),o}}else if("data"in r&&r.rr_type==="Blob"){const s=await Promise.all(r.data.map(je(i,e,t)));return new Blob(s,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(je(i,e,t)));return r}}function Bm(i,e){try{return e===Be.WebGL?i.getContext("webgl")||i.getContext("experimental-webgl"):i.getContext("webgl2")}catch(t){return null}}const Um=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Vm(i,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!Um.includes(t))return;const r=Vl(i,t);r.includes(e)||r.push(e)}async function Wm({mutation:i,target:e,type:t,imageMap:r,errorHandler:s}){try{const o=Bm(e,t);if(!o)return;if(i.setter){o[i.property]=i.args[0];return}const n=o[i.property],a=await Promise.all(i.args.map(je(r,o))),l=n.apply(o,a);Vm(o,l);const u=!1}catch(o){s(i,o)}}async function zm({event:i,mutations:e,target:t,imageMap:r,errorHandler:s}){const o=t.getContext("2d");if(!o){s(e[0],new Error("Canvas context is null"));return}const n=e.map(async l=>Promise.all(l.args.map(je(r,o))));(await Promise.all(n)).forEach((l,u)=>{const c=e[u];try{if(c.setter){o[c.property]=c.args[0];return}const h=o[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(r.get(i),h.apply(o,c.args)):h.apply(o,l)}catch(h){s(c,h)}})}async function Ss({event:i,mutation:e,target:t,imageMap:r,canvasEventMap:s,errorHandler:o}){try{const n=s.get(i)||e,a="commands"in n?n.commands:[n];if([Be.WebGL,Be.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){const u=a[l];await Wm({mutation:u,type:e.type,target:t,imageMap:r,errorHandler:o})}return}await zm({event:i,mutations:a,target:t,imageMap:r,errorHandler:o})}catch(n){o(e,n)}}class Gm{constructor(e){w(this,"mediaMap",new Map),w(this,"warn"),w(this,"service"),w(this,"speedService"),w(this,"emitter"),w(this,"getCurrentTime"),w(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(V.Start,this.start.bind(this)),this.emitter.on(V.SkipStart,this.start.bind(this)),this.emitter.on(V.Pause,this.pause.bind(this)),this.emitter.on(V.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 o=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,n="duration"in t&&t.duration;if(Number.isNaN(n)){this.waitForMetadata(t);return}let a=r.currentTimeAtLastInteraction+o;t.loop&&n!==!1&&(a=a%n),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 m,p,y,d,g;const s=this.mediaMap.get(e),{type:o,playbackRate:n,currentTime:a,muted:l,volume:u,loop:c}=r;return{isPlaying:o===ze.Play||o!==ze.Pause&&((s==null?void 0:s.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(m=a!=null?a:s==null?void 0:s.currentTimeAtLastInteraction)!=null?m:0,lastInteractionTimeOffset:t,playbackRate:(p=n!=null?n:s==null?void 0:s.playbackRate)!=null?p:1,volume:(y=u!=null?u:s==null?void 0:s.volume)!=null?y:1,muted:(d=l!=null?l:s==null?void 0:s.muted)!=null?d:e.getAttribute("muted")===null,loop:(g=c!=null?c:s==null?void 0:s.loop)!=null?g:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:r,loop:s,volume:o,isPlaying:n}=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!==o&&(e.volume=o),e.muted=r,e.loop=s,e.playbackRate!==l&&(e.playbackRate=l),n&&!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 s=e,o=r.getMeta(s);if(!o||!("attributes"in o))return;const n=this.service.state.matches("paused"),a=o.attributes;let l=!1;a.rr_mediaState?l=a.rr_mediaState==="played":l=s.getAttribute("autoplay")!==null,l&&n&&s.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=s.getAttribute("muted")!==null;let h=!1;typeof a.rr_mediaLoop=="boolean"?h=a.rr_mediaLoop:h=s.getAttribute("loop")!==null;let f=1;typeof a.rr_mediaVolume=="number"&&(f=a.rr_mediaVolume);let m=0;typeof a.rr_mediaCurrentTime=="number"&&(m=a.rr_mediaCurrentTime),this.mediaMap.set(s,{isPlaying:l,currentTimeAtLastInteraction:m,lastInteractionTimeOffset:t,playbackRate:u,volume:f,muted:c,loop:h}),this.syncTargetWithState(s)}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 Or(i,e){if(i.nodeName!=="DIALOG"||i instanceof Ae)return;const t=i,r=t.open,s=r&&t.matches("dialog:modal"),o=t.getAttribute("rr_open_mode"),n=typeof(e==null?void 0:e.attributes.open)=="string"||typeof t.getAttribute("open")=="string",a=o==="modal";if(!(r&&!(s&&o==="non-modal"||!s&&a))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),n&&(a?t.showModal():t.show())}}function jm(i,e){if(i.nodeName!=="DIALOG"||i instanceof Ae)return;const t=i;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 Hm=5*1e3,Ym=Ll||Dm,$o="[replayer]",_i={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Lo(i){return i.type==O.IncrementalSnapshot&&(i.data.source==M.TouchMove||i.data.source==M.MouseInteraction&&i.data.type==W.TouchStart)}class Zm{constructor(e,t){if(w(this,"wrapper"),w(this,"iframe"),w(this,"service"),w(this,"speedService"),w(this,"config"),w(this,"usingVirtualDom",!1),w(this,"virtualDom",new Mt),w(this,"mouse"),w(this,"mouseTail",null),w(this,"tailPositions",[]),w(this,"emitter",Ym()),w(this,"nextUserInteractionEvent"),w(this,"legacy_missingNodeRetryMap",{}),w(this,"cache",Zn()),w(this,"imageMap",new Map),w(this,"canvasEventMap",new Map),w(this,"mirror",Wo()),w(this,"styleMirror",new pn),w(this,"mediaManager"),w(this,"firstFullSnapshot",null),w(this,"newDocumentQueue",[]),w(this,"mousePos",null),w(this,"touchActive",null),w(this,"lastMouseDownEvent",null),w(this,"lastHoveredRootNode"),w(this,"lastSelectionData",null),w(this,"constructedStyleMutations",[]),w(this,"adoptedStyleSheets",[]),w(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)))}),w(this,"applyEventsSynchronously",a=>{for(const l of a){switch(l.type){case O.DomContentLoaded:case O.Load:case O.Custom:continue;case O.FullSnapshot:case O.Meta:case O.Plugin:case O.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),w(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case O.DomContentLoaded:case O.Load:break;case O.Custom:u=()=>{this.emitter.emit(V.CustomEvent,a)};break;case O.Meta:u=()=>this.emitter.emit(V.Resize,{width:a.data.width,height:a.data.height});break;case O.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 O.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/Hm),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(V.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(V.Finish))};let m=50;a.type===O.IncrementalSnapshot&&a.data.source===M.MouseMove&&a.data.positions.length&&(m+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,m)}this.emitter.emit(V.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:_i,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(V.Resize,this.handleResize),this.setupDom();for(const a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(V.Flush,()=>{if(this.usingVirtualDom){const a={mirror:this.mirror,applyCanvas:(l,u,c)=>{Ss({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===M.StyleSheetRule?this.applyStyleSheetRule(l,u):l.source===M.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{Xr(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=Jr(u.node,this.mirror,this.virtualDom.mirror);Xr(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(V.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const s=new _m([],{speed:this.config.speed});this.service=Lm({events:e.map(a=>t&&t.unpackFn?t.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:s,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(V.StateChange,{player:a})}),this.speedService=Pm({normalSpeed:-1,timer:s}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(V.StateChange,{speed:a})}),this.mediaManager=new Gm({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const o=this.service.state.context.events.find(a=>a.type===O.Meta),n=this.service.state.context.events.find(a=>a.type===O.FullSnapshot);if(o){const{width:a,height:l}=o.data;setTimeout(()=>{this.emitter.emit(V.Resize,{width:a,height:l})},0)}n&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=n,this.rebuildFullSnapshot(n),(a=this.iframe.contentWindow)==null||a.scrollTo(n.data.initialOffset))},1),this.service.state.context.events.find(Lo)&&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(V.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(V.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(V.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(V.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;Lo(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=Zn()}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&&(km(this.iframe.contentWindow,this.iframe.contentDocument),cn(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=[],s=new Set,o=(l,u)=>{if(l.nodeName==="DIALOG"&&s.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(),rf(e.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(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:n,head:a}=this.iframe.contentDocument;this.insertStyleRules(n,a),s.forEach(l=>Or(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(V.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;const s=Fm(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&s.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!s.length)if(this.usingVirtualDom){const o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,bl(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:M.StyleSheetRule,adds:s.map((n,a)=>({rule:n,index:a}))})}else{const o=document.createElement("style");e.insertBefore(o,t);for(let n=0;n<s.length;n++)(r=o.sheet)==null||r.insertRule(s[n],n)}}attachDocumentToIframe(e,t){const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,s=[],o=new Set,n=(a,l)=>{a.nodeName==="DIALOG"&&o.add(a),this.collectIframeAndAttachDocument(s,a);const u=r.getMeta(a);if((u==null?void 0:u.type)===Le.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})};Ut(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:n,cache:this.cache}),n(t.contentDocument,e.node.id);for(const{mutationInQueue:a,builtNode:l}of s)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);o.forEach(a=>Or(a))}collectIframeAndAttachDocument(e,t){if(mt(t,this.mirror)){const r=this.newDocumentQueue.find(s=>s.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 s,o=this.service.state;const n=()=>{o=this.service.state};this.emitter.on(V.Start,n),this.emitter.on(V.Pause,n);const a=()=>{this.emitter.off(V.Start,n),this.emitter.off(V.Pause,n)};t.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&s!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(V.LoadStylesheetEnd),s&&clearTimeout(s),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(V.LoadStylesheetStart),s=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),s=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===O.IncrementalSnapshot&&t.data.source===M.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(s=>{this.preloadImages(s,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"),s=r.getContext("2d"),o=s==null?void 0:s.createImageData(r.width,r.height);s==null||s.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const r={isUnchanged:!0};if("commands"in e){const s=await Promise.all(e.commands.map(async o=>{const n=await Promise.all(o.args.map(je(this.imageMap,null,r)));return ae(T({},o),{args:n})}));r.isUnchanged===!1&&this.canvasEventMap.set(t,ae(T({},e),{commands:s}))}else{const s=await Promise.all(e.args.map(je(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,ae(T({},e),{args:s}))}}}applyIncremental(e,t){var r,s,o;const{data:n}=e;switch(n.source){case M.Mutation:{try{this.applyMutation(n,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,n)}break}case M.Drag:case M.TouchMove:case M.MouseMove:if(t){const a=n.positions[n.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:n}}else n.positions.forEach(a=>{const l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,t,n)},delay:a.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((r=n.positions[0])==null?void 0:r.timeOffset)});break;case M.MouseInteraction:{if(n.id===-1)break;const a=new Event(He(W[n.type])),l=this.mirror.getNode(n.id);if(!l)return this.debugNodeNotFound(n,n.id);this.emitter.emit(V.MouseInteraction,{type:n.type,target:l});const{triggerFocus:u}=this.config;switch(n.type){case W.Blur:"blur"in l&&l.blur();break;case W.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case W.Click:case W.TouchStart:case W.TouchEnd:case W.MouseDown:case W.MouseUp:t?(n.type===W.TouchStart?this.touchActive=!0:n.type===W.TouchEnd&&(this.touchActive=!1),n.type===W.MouseDown?this.lastMouseDownEvent=[l,a]:n.type===W.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:n.x||0,y:n.y||0,id:n.id,debugData:n}):(n.type===W.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(n.x||0,n.y||0,n.id,t,n),n.type===W.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):n.type===W.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):n.type===W.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case W.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case M.Scroll:{if(n.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.scrollData=n;break}this.applyScroll(n,t);break}case M.ViewportResize:this.emitter.emit(V.Resize,{width:n.width,height:n.height});break;case M.Input:{if(n.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.inputData=n;break}this.applyInput(n);break}case M.MediaInteraction:{const a=this.usingVirtualDom?this.virtualDom.mirror.getNode(n.id):this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);const l=a,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-u[0].timestamp,mutation:n});break}case M.StyleSheetRule:case M.StyleDeclaration:{this.usingVirtualDom?n.styleId?this.constructedStyleMutations.push(n):n.id&&((s=this.virtualDom.mirror.getNode(n.id))==null||s.rules.push(n)):this.applyStyleSheetMutation(n);break}case M.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.canvasMutations.push({event:e,mutation:n})}else{const a=this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);Ss({event:e,mutation:n,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case M.Font:{try{const a=new FontFace(n.family,n.buffer?new Uint8Array(JSON.parse(n.fontSource)):n.fontSource,n.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(a)}catch(a){this.warn(a)}break}case M.Selection:{if(t){this.lastSelectionData=n;break}this.applySelection(n);break}case M.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(n):this.applyAdoptedStyleSheet(n);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=wl(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(m){if(m instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw m}});const s=T({},this.legacy_missingNodeRetryMap),o=[],n=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===Le.Document?this.newDocumentQueue.push(u):o.push(u);u.node.isShadow&&(Ge(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let m=null,p=null;if(u.previousId&&(m=r.getNode(u.previousId)),u.nextId&&(p=r.getNode(u.nextId)),n(u))return o.push(u);if(u.node.rootId&&!r.getNode(u.node.rootId))return;const y=u.node.rootId?r.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(mt(f,r)){this.attachDocumentToIframe(u,f);return}const d=(b,v)=>{if(!this.usingVirtualDom){Or(b);for(const C of this.config.plugins||[])C.onBuild&&C.onBuild(b,{id:v,replayer:this})}},g=Ut(u.node,{doc:y,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:d});if(u.previousId===-1||u.nextId===-1){s[u.node.id]={node:g,mutation:u};return}const S=r.getMeta(f);if(S&&S.type===Le.Element&&u.node.type===Le.Text){const b=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(S.tagName==="textarea")for(const v of b)v.nodeType===f.TEXT_NODE&&f.removeChild(v);else if(S.tagName==="style"&&b.length===1)for(const v of b)v.nodeType===f.TEXT_NODE&&!r.hasNode(v)&&(g.textContent=v.textContent,f.removeChild(v))}else if((S==null?void 0:S.type)===Le.Document){const b=f;u.node.type===Le.DocumentType&&((c=b.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&b.removeChild(b.childNodes[0]),g.nodeName==="HTML"&&b.documentElement&&b.removeChild(b.documentElement)}if(m&&m.nextSibling&&m.nextSibling.parentNode?f.insertBefore(g,m.nextSibling):p&&p.parentNode?f.contains(p)?f.insertBefore(g,p):f.insertBefore(g,null):f.appendChild(g),d(g,u.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),mt(g,this.mirror)){const b=this.mirror.getId(g),v=this.newDocumentQueue.find(C=>C.parentId===b);v&&(this.attachDocumentToIframe(v,g),this.newDocumentQueue=this.newDocumentQueue.filter(C=>C!==v))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(s,f,g,u)};e.adds.forEach(u=>{a(u)});const l=Date.now();for(;o.length;){const u=xl(o);if(o.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)?hn(c,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(s).length&&Object.assign(this.legacy_missingNodeRetryMap,s),Ml(e.texts).forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(m=>m.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);const f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=oi(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){const m=h.parentNode;((c=m==null?void 0:m.rules)==null?void 0:c.length)>0&&(m.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 m=u.attributes[f];if(m===null)h.removeAttribute(f),f==="open"&&jm(h,u);else if(typeof m=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const p=r.getMeta(h),y=Ut(ae(T({},p),{attributes:T(T({},p.attributes),u.attributes)}),{doc:h.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(p.attributes,u.attributes);const d=h.nextSibling,g=h.parentNode;if(y&&g){g.removeChild(h),g.insertBefore(y,d),r.replace(u.id,y);break}}catch(p){}if(f==="value"&&h.nodeName==="TEXTAREA"){const p=h;p.childNodes.forEach(d=>p.removeChild(d));const y=(c=h.ownerDocument)==null?void 0:c.createTextNode(m);y&&p.appendChild(y)}else h.setAttribute(f,m);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&Or(h,u)}catch(p){this.warn("An error occurred may due to the checkout feature.",p)}else if(f==="style"){const p=m,y=h;for(const d in p)if(p[d]===!1)y.style.removeProperty(d);else if(p[d]instanceof Array){const g=p[d];y.style.setProperty(d,g[0],g[1])}else{const g=p[d];y.style.setProperty(d,g)}}}})}applyScroll(e,t){var r,s;const o=this.mirror.getNode(e.id);if(!o)return this.debugNodeNotFound(e,e.id);const n=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((n==null?void 0:n.type)===Le.Document)(s=o.defaultView)==null||s.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{o.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:s,startOffset:o,end:n,endOffset:a})=>{const l=this.mirror.getNode(s),u=this.mirror.getNode(n);if(!l||!u)return;const c=new Range;c.setStart(l,o),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(s=>s.removeAllRanges()),r.forEach(s=>{var o;return s&&((o=s.selection)==null?void 0:o.addRange(s.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===M.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===M.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,s,o,n;if((r=e.adds)==null||r.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){const{positions:u,index:c}=ws(l);ft(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){}}),(s=e.removes)==null||s.forEach(({index:a})=>{try{if(Array.isArray(a)){const{positions:l,index:u}=ws(a);ft(t.cssRules,l).deleteRule(u||0)}else t==null||t.deleteRule(a)}catch(l){}}),e.replace)try{(o=t.replace)==null||o.call(t,e.replace)}catch(a){}if(e.replaceSync)try{(n=t.replaceSync)==null||n.call(t,e.replaceSync)}catch(a){}}applyStyleDeclaration(e,t){e.set&&ft(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&ft(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:M.StyleSheetRule,adds:a.rules},u)}catch(h){}});const s=10;let o=0;const n=(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&&o<s&&(setTimeout(()=>n(a,l),0+100*o),o++)};n(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,s){const{previousId:o,nextId:n}=s,a=o&&e[o],l=n&&e[n];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,s,o){const n=this.mirror.getNode(r);if(!n)return this.debugNodeNotFound(o,r);const a=dn(n,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`,s||this.drawMouseTail({x:l,y:u}),this.hoverElements(n)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:r,strokeStyle:s,duration:o}=this.config.mouseTail===!0?_i:Object.assign({},_i,this.config.mouseTail),n=()=>{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=s,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),n(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==e),n()},o/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(s=>{s.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!==O.IncrementalSnapshot?!1:e.data.source>M.Mutation&&e.data.source<=M.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(V.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($o,...e)}debug(...e){this.config.showDebug&&this.config.logger.log($o,...e)}}const Xm="2.1.2-alpha.2",{getVersion:Jm}=we,{isRecording:Km}=we,{flushCustomEventQueue:Qm}=we,{addCustomEvent:qm}=we,{freezePage:eg}=we,{takeFullSnapshot:tg}=we;var pe=Uint8Array,ye=Uint16Array,Kt=Uint32Array,pi=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]),mi=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]),Cs=new pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Wl=function(i,e){for(var t=new ye(31),r=0;r<31;++r)t[r]=e+=1<<i[r-1];for(var s=new Kt(t[30]),r=1;r<30;++r)for(var o=t[r];o<t[r+1];++o)s[o]=o-t[r]<<5|r;return[t,s]},zl=Wl(pi,2),Gl=zl[0],Es=zl[1];Gl[28]=258,Es[258]=28;var jl=Wl(mi,0),rg=jl[0],Po=jl[1],xs=new ye(32768);for(var ee=0;ee<32768;++ee){var Ve=(ee&43690)>>>1|(ee&21845)<<1;Ve=(Ve&52428)>>>2|(Ve&13107)<<2,Ve=(Ve&61680)>>>4|(Ve&3855)<<4,xs[ee]=((Ve&65280)>>>8|(Ve&255)<<8)>>>1}var De=function(i,e,t){for(var r=i.length,s=0,o=new ye(e);s<r;++s)++o[i[s]-1];var n=new ye(e);for(s=0;s<e;++s)n[s]=n[s-1]+o[s-1]<<1;var a;if(t){a=new ye(1<<e);var l=15-e;for(s=0;s<r;++s)if(i[s])for(var u=s<<4|i[s],c=e-i[s],h=n[i[s]-1]++<<c,f=h|(1<<c)-1;h<=f;++h)a[xs[h]>>>l]=u}else for(a=new ye(r),s=0;s<r;++s)a[s]=xs[n[i[s]-1]++]>>>15-i[s];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 Qt=new pe(32);for(var ee=0;ee<32;++ee)Qt[ee]=5;var ig=De(Ye,9,0),sg=De(Ye,9,1),ng=De(Qt,5,0),og=De(Qt,5,1),$i=function(i){for(var e=i[0],t=1;t<i.length;++t)i[t]>e&&(e=i[t]);return e},xe=function(i,e,t){var r=e/8>>0;return(i[r]|i[r+1]<<8)>>>(e&7)&t},Li=function(i,e){var t=e/8>>0;return(i[t]|i[t+1]<<8|i[t+2]<<16)>>>(e&7)},yn=function(i){return(i/8>>0)+(i&7&&1)},vn=function(i,e,t){(t==null||t>i.length)&&(t=i.length);var r=new(i instanceof ye?ye:i instanceof Kt?Kt:pe)(t-e);return r.set(i.subarray(e,t)),r},ag=function(i,e,t){var r=i.length,s=!e||t,o=!t||t.i;t||(t={}),e||(e=new pe(r*3));var n=function(Ue){var Je=e.length;if(Ue>Je){var ke=new pe(Math.max(Je*2,Ue));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,m=t.n,p=r*8;do{if(!c){t.f=a=xe(i,l,1);var y=xe(i,l+1,3);if(l+=3,y)if(y==1)c=sg,h=og,f=9,m=5;else if(y==2){var b=xe(i,l,31)+257,v=xe(i,l+10,15)+4,C=b+xe(i,l+5,31)+1;l+=14;for(var x=new pe(C),R=new pe(19),E=0;E<v;++E)R[Cs[E]]=xe(i,l+E*3,7);l+=v*3;var k=$i(R),D=(1<<k)-1;if(!o&&l+C*(k+7)>p)break;for(var j=De(R,k,1),E=0;E<C;){var P=j[xe(i,l,D)];l+=P&15;var d=P>>>4;if(d<16)x[E++]=d;else{var z=0,N=0;for(d==16?(N=3+xe(i,l,3),l+=2,z=x[E-1]):d==17?(N=3+xe(i,l,7),l+=3):d==18&&(N=11+xe(i,l,127),l+=7);N--;)x[E++]=z}}var G=x.subarray(0,b),F=x.subarray(b);f=$i(G),m=$i(F),c=De(G,f,1),h=De(F,m,1)}else throw"invalid block type";else{var d=yn(l)+4,g=i[d-4]|i[d-3]<<8,S=d+g;if(S>r){if(o)throw"unexpected EOF";break}s&&n(u+g),e.set(i.subarray(d,S),u),t.b=u+=g,t.p=l=S*8;continue}if(l>p)throw"unexpected EOF"}s&&n(u+131072);for(var A=(1<<f)-1,Z=(1<<m)-1,se=f+m+18;o||l+se<p;){var z=c[Li(i,l)&A],J=z>>>4;if(l+=z&15,l>p)throw"unexpected EOF";if(!z)throw"invalid length/literal";if(J<256)e[u++]=J;else if(J==256){c=null;break}else{var ue=J-254;if(J>264){var E=J-257,me=pi[E];ue=xe(i,l,(1<<me)-1)+Gl[E],l+=me}var ve=h[Li(i,l)&Z],ce=ve>>>4;if(!ve)throw"invalid distance";l+=ve&15;var F=rg[ce];if(ce>3){var me=mi[ce];F+=Li(i,l)&(1<<me)-1,l+=me}if(l>p)throw"unexpected EOF";s&&n(u+131072);for(var oe=u+ue;u<oe;u+=4)e[u]=e[u-F],e[u+1]=e[u+1-F],e[u+2]=e[u+2-F],e[u+3]=e[u+3-F];u=oe}}t.l=c,t.p=l,t.b=u,c&&(a=1,t.m=f,t.d=h,t.n=m)}while(!a);return u==e.length?e:vn(e,0,u)},_e=function(i,e,t){t<<=e&7;var r=e/8>>0;i[r]|=t,i[r+1]|=t>>>8},kt=function(i,e,t){t<<=e&7;var r=e/8>>0;i[r]|=t,i[r+1]|=t>>>8,i[r+2]|=t>>>16},Pi=function(i,e){for(var t=[],r=0;r<i.length;++r)i[r]&&t.push({s:r,f:i[r]});var s=t.length,o=t.slice();if(!s)return[new pe(0),0];if(s==1){var n=new pe(t[0].s+1);return n[t[0].s]=1,[n,1]}t.sort(function(C,x){return C.f-x.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!=s-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=o[0].s,r=1;r<s;++r)o[r].s>f&&(f=o[r].s);var m=new ye(f+1),p=Ms(t[c-1],m,0);if(p>e){var r=0,y=0,d=p-e,g=1<<d;for(o.sort(function(x,R){return m[R.s]-m[x.s]||x.f-R.f});r<s;++r){var S=o[r].s;if(m[S]>e)y+=g-(1<<p-m[S]),m[S]=e;else break}for(y>>>=d;y>0;){var b=o[r].s;m[b]<e?y-=1<<e-m[b]++-1:++r}for(;r>=0&&y;--r){var v=o[r].s;m[v]==e&&(--m[v],++y)}p=e}return[new pe(m),p]},Ms=function(i,e,t){return i.s==-1?Math.max(Ms(i.l,e,t+1),Ms(i.r,e,t+1)):e[i.s]=t},Fo=function(i){for(var e=i.length;e&&!i[--e];);for(var t=new ye(++e),r=0,s=i[0],o=1,n=function(l){t[r++]=l},a=1;a<=e;++a)if(i[a]==s&&a!=e)++o;else{if(!s&&o>2){for(;o>138;o-=138)n(32754);o>2&&(n(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(n(s),--o;o>6;o-=6)n(8304);o>2&&(n(o-3<<5|8208),o=0)}for(;o--;)n(s);o=1,s=i[a]}return[t.subarray(0,r),e]},_t=function(i,e){for(var t=0,r=0;r<e.length;++r)t+=i[r]*e[r];return t},Is=function(i,e,t){var r=t.length,s=yn(e+2);i[s]=r&255,i[s+1]=r>>>8,i[s+2]=i[s]^255,i[s+3]=i[s+1]^255;for(var o=0;o<r;++o)i[s+o+4]=t[o];return(s+4+r)*8},Bo=function(i,e,t,r,s,o,n,a,l,u,c){_e(e,c++,t),++s[256];for(var h=Pi(s,15),f=h[0],m=h[1],p=Pi(o,15),y=p[0],d=p[1],g=Fo(f),S=g[0],b=g[1],v=Fo(y),C=v[0],x=v[1],R=new ye(19),E=0;E<S.length;++E)R[S[E]&31]++;for(var E=0;E<C.length;++E)R[C[E]&31]++;for(var k=Pi(R,7),D=k[0],j=k[1],P=19;P>4&&!D[Cs[P-1]];--P);var z=u+5<<3,N=_t(s,Ye)+_t(o,Qt)+n,G=_t(s,f)+_t(o,y)+n+14+3*P+_t(R,D)+(2*R[16]+3*R[17]+7*R[18]);if(z<=N&&z<=G)return Is(e,c,i.subarray(l,l+u));var F,A,Z,se;if(_e(e,c,1+(G<N)),c+=2,G<N){F=De(f,m,0),A=f,Z=De(y,d,0),se=y;var J=De(D,j,0);_e(e,c,b-257),_e(e,c+5,x-1),_e(e,c+10,P-4),c+=14;for(var E=0;E<P;++E)_e(e,c+3*E,D[Cs[E]]);c+=3*P;for(var ue=[S,C],me=0;me<2;++me)for(var ve=ue[me],E=0;E<ve.length;++E){var ce=ve[E]&31;_e(e,c,J[ce]),c+=D[ce],ce>15&&(_e(e,c,ve[E]>>>5&127),c+=ve[E]>>>12)}}else F=ig,A=Ye,Z=ng,se=Qt;for(var E=0;E<a;++E)if(r[E]>255){var ce=r[E]>>>18&31;kt(e,c,F[ce+257]),c+=A[ce+257],ce>7&&(_e(e,c,r[E]>>>23&31),c+=pi[ce]);var oe=r[E]&31;kt(e,c,Z[oe]),c+=se[oe],oe>3&&(kt(e,c,r[E]>>>5&8191),c+=mi[oe])}else kt(e,c,F[r[E]]),c+=A[r[E]];return kt(e,c,F[256]),c+A[256]},lg=new Kt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ug=function(i,e,t,r,s,o){var n=i.length,a=new pe(r+n+5*(1+Math.floor(n/7e3))+s),l=a.subarray(r,a.length-s),u=0;if(!e||n<8)for(var c=0;c<=n;c+=65535){var h=c+65535;h<n?u=Is(l,u,i.subarray(c,h)):(l[c]=o,u=Is(l,u,i.subarray(c,n)))}else{for(var f=lg[e-1],m=f>>>13,p=f&8191,y=(1<<t)-1,d=new ye(32768),g=new ye(y+1),S=Math.ceil(t/3),b=2*S,v=function(Ce){return(i[Ce]^i[Ce+1]<<S^i[Ce+2]<<b)&y},C=new Kt(25e3),x=new ye(288),R=new ye(32),E=0,k=0,c=0,D=0,j=0,P=0;c<n;++c){var z=v(c),N=c&32767,G=g[z];if(d[N]=G,g[z]=N,j<=c){var F=n-c;if((E>7e3||D>24576)&&F>423){u=Bo(i,l,0,C,x,R,k,D,P,c-P,u),D=E=k=0,P=c;for(var A=0;A<286;++A)x[A]=0;for(var A=0;A<30;++A)R[A]=0}var Z=2,se=0,J=p,ue=N-G&32767;if(F>2&&z==v(c-ue))for(var me=Math.min(m,F)-1,ve=Math.min(32767,c),ce=Math.min(258,F);ue<=ve&&--J&&N!=G;){if(i[c+Z]==i[c+Z-ue]){for(var oe=0;oe<ce&&i[c+oe]==i[c+oe-ue];++oe);if(oe>Z){if(Z=oe,se=ue,oe>me)break;for(var Ue=Math.min(ue,oe-2),Je=0,A=0;A<Ue;++A){var ke=c-ue+A+32768&32767,it=d[ke],It=ke-it+32768&32767;It>Je&&(Je=It,G=ke)}}}N=G,G=d[N],ue+=N-G+32768&32767}if(se){C[D++]=268435456|Es[Z]<<18|Po[se];var Nt=Es[Z]&31,At=Po[se]&31;k+=pi[Nt]+mi[At],++x[257+Nt],++R[At],j=c+Z,++E}else C[D++]=i[c],++x[i[c]]}}u=Bo(i,l,o,C,x,R,k,D,P,c-P,u)}return vn(a,0,r+yn(u)+s)},cg=function(){var i=1,e=0;return{p:function(t){for(var r=i,s=e,o=t.length,n=0;n!=o;){for(var a=Math.min(n+5552,o);n<a;++n)r+=t[n],s+=r;r%=65521,s%=65521}i=r,e=s},d:function(){return(i>>>8<<16|(e&255)<<8|e>>>8)+((i&255)<<23)*2}}},hg=function(i,e,t,r,s){return ug(i,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(i.length)))*1.5):12+e.mem,t,r,!s)},fg=function(i,e,t){for(;t;++e)i[e]=t,t>>>=8},dg=function(i,e){var t=e.level,r=t==0?0:t<6?1:t==9?3:2;i[0]=120,i[1]=r<<6|(r?32-2*r:1)},pg=function(i){if((i[0]&15)!=8||i[0]>>>4>7||(i[0]<<8|i[1])%31)throw"invalid zlib data";if(i[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function mg(i,e){e===void 0&&(e={});var t=cg();t.p(i);var r=hg(i,e,2,4);return dg(r,e),fg(r,r.length-4,t.d()),r}function gg(i,e){return ag((pg(i),i.subarray(2,-4)),e)}function Hl(i,e){var t=i.length;if(!e&&typeof TextEncoder!="undefined")return new TextEncoder().encode(i);for(var r=new pe(i.length+(i.length>>>1)),s=0,o=function(u){r[s++]=u},n=0;n<t;++n){if(s+5>r.length){var a=new pe(s+8+(t-n<<1));a.set(r),r=a}var l=i.charCodeAt(n);l<128||e?o(l):l<2048?(o(192|l>>>6),o(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|i.charCodeAt(++n)&1023,o(240|l>>>18),o(128|l>>>12&63),o(128|l>>>6&63),o(128|l&63)):(o(224|l>>>12),o(128|l>>>6&63),o(128|l&63))}return vn(r,0,s)}function Yl(i,e){var t="";if(!e&&typeof TextDecoder!="undefined")return new TextDecoder().decode(i);for(var r=0;r<i.length;){var s=i[r++];s<128||e?t+=String.fromCharCode(s):s<224?t+=String.fromCharCode((s&31)<<6|i[r++]&63):s<240?t+=String.fromCharCode((s&15)<<12|(i[r++]&63)<<6|i[r++]&63):(s=((s&15)<<18|(i[r++]&63)<<12|(i[r++]&63)<<6|i[r++]&63)-65536,t+=String.fromCharCode(55296|s>>10,56320|s&1023))}return t}const Ns="v1",yg=i=>{const e=ae(T({},i),{v:Ns});return Yl(mg(Hl(JSON.stringify(e))),!0)},vg=i=>{if(typeof i!="string")return i;try{const e=JSON.parse(i);if(e.timestamp)return e}catch(e){}try{const e=JSON.parse(Yl(gg(Hl(i,!0))));if(e.v===Ns)return e;throw new Error(`These events were packed with packer ${e.v} which is incompatible with current packer ${Ns}.`)}catch(e){throw console.error(e),new Error("Unknown data format.")}};exports.EventType=O;exports.IncrementalSource=M;exports.MouseInteractions=W;exports.Replayer=Zm;exports.ReplayerEvents=V;exports.addCustomEvent=qm;exports.canvasMutation=Ss;exports.flushCustomEventQueue=Qm;exports.freezePage=eg;exports.getVersion=Jm;exports.isRecording=Km;exports.pack=yg;exports.record=we;exports.takeFullSnapshot=tg;exports.unpack=vg;exports.utils=Wp;exports.version=Xm;
82
+ ***************************************************************************** */function Ro(i,e){var t=typeof Symbol=="function"&&i[Symbol.iterator];if(!t)return i;var r,s,o=t.call(i),n=[];try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)n.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(s)throw s.error}}return n}var pt;(function(i){i[i.NotStarted=0]="NotStarted",i[i.Running=1]="Running",i[i.Stopped=2]="Stopped"})(pt||(pt={}));var Pl={type:"xstate.init"};function ki(i){return i===void 0?[]:[].concat(i)}function ut(i){return{type:"xstate.assign",assignment:i}}function Oo(i,e){return typeof(i=typeof i=="string"&&e&&e[i]?e[i]:i)=="string"?{type:i}:typeof i=="function"?{type:i.name,exec:i}:i}function ei(i){return function(e){return i===e}}function Fl(i){return typeof i=="string"?{type:i}:i}function To(i,e){return{value:i,context:e,actions:[],changed:!1,matches:ei(i)}}function Do(i,e,t){var r=e,s=!1;return[i.filter(function(o){if(o.type==="xstate.assign"){s=!0;var n=Object.assign({},r);return typeof o.assignment=="function"?n=o.assignment(r,t):Object.keys(o.assignment).forEach(function(a){n[a]=typeof o.assignment[a]=="function"?o.assignment[a](r,t):o.assignment[a]}),r=n,!1}return!0}),r,s]}function Bl(i,e){e===void 0&&(e={});var t=Ro(Do(ki(i.states[i.initial].entry).map(function(n){return Oo(n,e.actions)}),i.context,Pl),2),r=t[0],s=t[1],o={config:i,_options:e,initialState:{value:i.initial,actions:r,context:s,matches:ei(i.initial)},transition:function(n,a){var l,u,c=typeof n=="string"?{value:n,context:i.context}:n,h=c.value,f=c.context,m=Fl(a),p=i.states[h];if(p.on){var y=ki(p.on[m.type]);try{for(var d=function(A){var Z=typeof Symbol=="function"&&Symbol.iterator,se=Z&&A[Z],J=0;if(se)return se.call(A);if(A&&typeof A.length=="number")return{next:function(){return A&&J>=A.length&&(A=void 0),{value:A&&A[J++],done:!A}}};throw new TypeError(Z?"Object is not iterable.":"Symbol.iterator is not defined.")}(y),g=d.next();!g.done;g=d.next()){var S=g.value;if(S===void 0)return To(h,f);var b=typeof S=="string"?{target:S}:S,v=b.target,C=b.actions,M=C===void 0?[]:C,R=b.cond,E=R===void 0?function(){return!0}:R,k=v===void 0,D=v!=null?v:h,j=i.states[D];if(E(f,m)){var P=Ro(Do((k?ki(M):[].concat(p.exit,M,j.entry).filter(function(A){return A})).map(function(A){return Oo(A,o._options.actions)}),f,m),3),z=P[0],N=P[1],G=P[2],F=v!=null?v:h;return{value:F,context:N,actions:z,changed:v!==h||z.length>0||G,matches:ei(F)}}}}catch(A){l={error:A}}finally{try{g&&!g.done&&(u=d.return)&&u.call(d)}finally{if(l)throw l.error}}}return To(h,f)}};return o}var ko=function(i,e){return i.actions.forEach(function(t){var r=t.exec;return r&&r(i.context,e)})};function Ul(i){var e=i.initialState,t=pt.NotStarted,r=new Set,s={_machine:i,send:function(o){t===pt.Running&&(e=i.transition(e,o),ko(e,Fl(o)),r.forEach(function(n){return n(e)}))},subscribe:function(o){return r.add(o),o(e),{unsubscribe:function(){return r.delete(o)}}},start:function(o){if(o){var n=typeof o=="object"?o:{context:i.config.context,value:o};e={value:n.value,actions:[],context:n.context,matches:ei(n.value)}}return t=pt.Running,ko(e,Pl),s},stop:function(){return t=pt.Stopped,r.clear(),s},get state(){return e},get status(){return t}};return s}function $m(i,e){for(let t=i.length-1;t>=0;t--){const r=i[t];if(r.type===O.Meta&&r.timestamp<=e)return i.slice(t)}return i}function Lm(i,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){const s=Bl({id:"player",context:i,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:ut({lastPlayedEvent:(o,n)=>n.type==="CAST_EVENT"?n.payload.event:o.lastPlayedEvent}),recordTimeOffset:ut((o,n)=>{let a=o.timeOffset;return"payload"in n&&"timeOffset"in n.payload&&(a=n.payload.timeOffset),ae(T({},o),{timeOffset:a,baselineTime:o.events[0].timestamp+a})}),play(o){var n;const{timer:a,events:l,baselineTime:u,lastPlayedEvent:c}=o;a.clear();for(const p of l)Ao(p,u);const h=$m(l,u);let f=c==null?void 0:c.timestamp;(c==null?void 0:c.type)===O.IncrementalSnapshot&&c.data.source===x.MouseMove&&(f=c.timestamp+((n=c.data.positions[0])==null?void 0:n.timeOffset)),u<(f||0)&&r.emit(V.PlayBack);const m=new Array;for(const p of h)if(!(f&&f<u&&(p.timestamp<=f||p===c)))if(p.timestamp<u)m.push(p);else{const y=e(p,!1);a.addAction({doAction:()=>{y()},delay:p.delay})}t(m),r.emit(V.Flush),a.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:ut(o=>ae(T({},o),{lastPlayedEvent:null})),startLive:ut({baselineTime:(o,n)=>(o.timer.start(),n.type==="TO_LIVE"&&n.payload.baselineTime?n.payload.baselineTime:Date.now())}),addEvent:ut((o,n)=>{const{baselineTime:a,timer:l,events:u}=o;if(n.type==="ADD_EVENT"){const{event:c}=n.payload;Ao(c,a);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let p=-1,y=0;for(;y<=h;){const d=Math.floor((y+h)/2);u[d].timestamp<=c.timestamp?y=d+1:h=d-1}p===-1&&(p=y),u.splice(p,0,c)}const f=c.timestamp<a,m=e(c,f);f?m():l.isActive()&&l.addAction({doAction:()=>{m()},delay:c.delay})}return ae(T({},o),{events:u})})}});return Ul(s)}function Pm(i){const e=Bl({id:"speed",context:i,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:ut({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return Ul(e)}const Fm=i=>[`.${i} { background: currentColor }`,"noscript { display: none !important; }"],_o=new Map;function Vl(i,e){let t=_o.get(i);return t||(t=new Map,_o.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}function je(i,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 s=await je(i,e,t)(r.args);return await createImageBitmap.apply(null,s)}else if("index"in r){if(t||e===null)return r;const{rr_type:s,index:o}=r;return Vl(e,s)[o]}else if("args"in r){const{rr_type:s,args:o}=r,n=window[s];return new n(...await Promise.all(o.map(je(i,e,t))))}else{if("base64"in r)return hm(r.base64);if("src"in r){const s=i.get(r.src);if(s)return s;{const o=new Image;return o.src=r.src,i.set(r.src,o),o}}else if("data"in r&&r.rr_type==="Blob"){const s=await Promise.all(r.data.map(je(i,e,t)));return new Blob(s,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(je(i,e,t)));return r}}function Bm(i,e){try{return e===Be.WebGL?i.getContext("webgl")||i.getContext("experimental-webgl"):i.getContext("webgl2")}catch(t){return null}}const Um=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Vm(i,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!Um.includes(t))return;const r=Vl(i,t);r.includes(e)||r.push(e)}async function Wm({mutation:i,target:e,type:t,imageMap:r,errorHandler:s}){try{const o=Bm(e,t);if(!o)return;if(i.setter){o[i.property]=i.args[0];return}const n=o[i.property],a=await Promise.all(i.args.map(je(r,o))),l=n.apply(o,a);Vm(o,l);const u=!1}catch(o){s(i,o)}}async function zm({event:i,mutations:e,target:t,imageMap:r,errorHandler:s}){const o=t.getContext("2d");if(!o){s(e[0],new Error("Canvas context is null"));return}const n=e.map(async l=>Promise.all(l.args.map(je(r,o))));(await Promise.all(n)).forEach((l,u)=>{const c=e[u];try{if(c.setter){o[c.property]=c.args[0];return}const h=o[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(r.get(i),h.apply(o,c.args)):h.apply(o,l)}catch(h){s(c,h)}})}async function Ss({event:i,mutation:e,target:t,imageMap:r,canvasEventMap:s,errorHandler:o}){try{const n=s.get(i)||e,a="commands"in n?n.commands:[n];if([Be.WebGL,Be.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){const u=a[l];await Wm({mutation:u,type:e.type,target:t,imageMap:r,errorHandler:o})}return}await zm({event:i,mutations:a,target:t,imageMap:r,errorHandler:o})}catch(n){o(e,n)}}class Gm{constructor(e){w(this,"mediaMap",new Map),w(this,"warn"),w(this,"service"),w(this,"speedService"),w(this,"emitter"),w(this,"getCurrentTime"),w(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(V.Start,this.start.bind(this)),this.emitter.on(V.SkipStart,this.start.bind(this)),this.emitter.on(V.Pause,this.pause.bind(this)),this.emitter.on(V.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 o=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,n="duration"in t&&t.duration;if(Number.isNaN(n)){this.waitForMetadata(t);return}let a=r.currentTimeAtLastInteraction+o;t.loop&&n!==!1&&(a=a%n),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 m,p,y,d,g;const s=this.mediaMap.get(e),{type:o,playbackRate:n,currentTime:a,muted:l,volume:u,loop:c}=r;return{isPlaying:o===ze.Play||o!==ze.Pause&&((s==null?void 0:s.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(m=a!=null?a:s==null?void 0:s.currentTimeAtLastInteraction)!=null?m:0,lastInteractionTimeOffset:t,playbackRate:(p=n!=null?n:s==null?void 0:s.playbackRate)!=null?p:1,volume:(y=u!=null?u:s==null?void 0:s.volume)!=null?y:1,muted:(d=l!=null?l:s==null?void 0:s.muted)!=null?d:e.getAttribute("muted")===null,loop:(g=c!=null?c:s==null?void 0:s.loop)!=null?g:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:r,loop:s,volume:o,isPlaying:n}=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!==o&&(e.volume=o),e.muted=r,e.loop=s,e.playbackRate!==l&&(e.playbackRate=l),n&&!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 s=e,o=r.getMeta(s);if(!o||!("attributes"in o))return;const n=this.service.state.matches("paused"),a=o.attributes;let l=!1;a.rr_mediaState?l=a.rr_mediaState==="played":l=s.getAttribute("autoplay")!==null,l&&n&&s.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=s.getAttribute("muted")!==null;let h=!1;typeof a.rr_mediaLoop=="boolean"?h=a.rr_mediaLoop:h=s.getAttribute("loop")!==null;let f=1;typeof a.rr_mediaVolume=="number"&&(f=a.rr_mediaVolume);let m=0;typeof a.rr_mediaCurrentTime=="number"&&(m=a.rr_mediaCurrentTime),this.mediaMap.set(s,{isPlaying:l,currentTimeAtLastInteraction:m,lastInteractionTimeOffset:t,playbackRate:u,volume:f,muted:c,loop:h}),this.syncTargetWithState(s)}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 Or(i,e){if(i.nodeName!=="DIALOG"||i instanceof Ae)return;const t=i,r=t.open,s=r&&t.matches("dialog:modal"),o=t.getAttribute("rr_open_mode"),n=typeof(e==null?void 0:e.attributes.open)=="string"||typeof t.getAttribute("open")=="string",a=o==="modal";if(!(r&&!(s&&o==="non-modal"||!s&&a))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),n&&(a?t.showModal():t.show())}}function jm(i,e){if(i.nodeName!=="DIALOG"||i instanceof Ae)return;const t=i;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 Hm=5*1e3,Ym=Ll||Dm,$o="[replayer]",_i={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Lo(i){return i.type==O.IncrementalSnapshot&&(i.data.source==x.TouchMove||i.data.source==x.MouseInteraction&&i.data.type==W.TouchStart)}class Zm{constructor(e,t){if(w(this,"wrapper"),w(this,"iframe"),w(this,"service"),w(this,"speedService"),w(this,"config"),w(this,"usingVirtualDom",!1),w(this,"virtualDom",new xt),w(this,"mouse"),w(this,"mouseTail",null),w(this,"tailPositions",[]),w(this,"emitter",Ym()),w(this,"nextUserInteractionEvent"),w(this,"legacy_missingNodeRetryMap",{}),w(this,"cache",Zn()),w(this,"imageMap",new Map),w(this,"canvasEventMap",new Map),w(this,"mirror",Wo()),w(this,"styleMirror",new pn),w(this,"mediaManager"),w(this,"firstFullSnapshot",null),w(this,"newDocumentQueue",[]),w(this,"mousePos",null),w(this,"touchActive",null),w(this,"lastMouseDownEvent",null),w(this,"lastHoveredRootNode"),w(this,"lastSelectionData",null),w(this,"constructedStyleMutations",[]),w(this,"adoptedStyleSheets",[]),w(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)))}),w(this,"applyEventsSynchronously",a=>{for(const l of a){switch(l.type){case O.DomContentLoaded:case O.Load:case O.Custom:continue;case O.FullSnapshot:case O.Meta:case O.Plugin:case O.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),w(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case O.DomContentLoaded:case O.Load:break;case O.Custom:u=()=>{this.emitter.emit(V.CustomEvent,a)};break;case O.Meta:u=()=>this.emitter.emit(V.Resize,{width:a.data.width,height:a.data.height});break;case O.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 O.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/Hm),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(V.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(V.Finish))};let m=50;a.type===O.IncrementalSnapshot&&a.data.source===x.MouseMove&&a.data.positions.length&&(m+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,m)}this.emitter.emit(V.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:_i,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(V.Resize,this.handleResize),this.setupDom();for(const a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(V.Flush,()=>{if(this.usingVirtualDom){const a={mirror:this.mirror,applyCanvas:(l,u,c)=>{Ss({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{Xr(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=Jr(u.node,this.mirror,this.virtualDom.mirror);Xr(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(V.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const s=new _m([],{speed:this.config.speed});this.service=Lm({events:e.map(a=>t&&t.unpackFn?t.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:s,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(V.StateChange,{player:a})}),this.speedService=Pm({normalSpeed:-1,timer:s}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(V.StateChange,{speed:a})}),this.mediaManager=new Gm({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const o=this.service.state.context.events.find(a=>a.type===O.Meta),n=this.service.state.context.events.find(a=>a.type===O.FullSnapshot);if(o){const{width:a,height:l}=o.data;setTimeout(()=>{this.emitter.emit(V.Resize,{width:a,height:l})},0)}n&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=n,this.rebuildFullSnapshot(n),(a=this.iframe.contentWindow)==null||a.scrollTo(n.data.initialOffset))},1),this.service.state.context.events.find(Lo)&&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(V.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(V.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(V.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(V.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;Lo(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=Zn()}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&&(km(this.iframe.contentWindow,this.iframe.contentDocument),cn(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=[],s=new Set,o=(l,u)=>{if(l.nodeName==="DIALOG"&&s.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(),rf(e.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(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:n,head:a}=this.iframe.contentDocument;this.insertStyleRules(n,a),s.forEach(l=>Or(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(V.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;const s=Fm(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&s.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!s.length)if(this.usingVirtualDom){const o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,bl(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:x.StyleSheetRule,adds:s.map((n,a)=>({rule:n,index:a}))})}else{const o=document.createElement("style");e.insertBefore(o,t);for(let n=0;n<s.length;n++)(r=o.sheet)==null||r.insertRule(s[n],n)}}attachDocumentToIframe(e,t){const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,s=[],o=new Set,n=(a,l)=>{a.nodeName==="DIALOG"&&o.add(a),this.collectIframeAndAttachDocument(s,a);const u=r.getMeta(a);if((u==null?void 0:u.type)===Le.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})};Ut(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:n,cache:this.cache}),n(t.contentDocument,e.node.id);for(const{mutationInQueue:a,builtNode:l}of s)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);o.forEach(a=>Or(a))}collectIframeAndAttachDocument(e,t){if(mt(t,this.mirror)){const r=this.newDocumentQueue.find(s=>s.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 s,o=this.service.state;const n=()=>{o=this.service.state};this.emitter.on(V.Start,n),this.emitter.on(V.Pause,n);const a=()=>{this.emitter.off(V.Start,n),this.emitter.off(V.Pause,n)};t.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&s!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(V.LoadStylesheetEnd),s&&clearTimeout(s),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(V.LoadStylesheetStart),s=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),s=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===O.IncrementalSnapshot&&t.data.source===x.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(s=>{this.preloadImages(s,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"),s=r.getContext("2d"),o=s==null?void 0:s.createImageData(r.width,r.height);s==null||s.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const r={isUnchanged:!0};if("commands"in e){const s=await Promise.all(e.commands.map(async o=>{const n=await Promise.all(o.args.map(je(this.imageMap,null,r)));return ae(T({},o),{args:n})}));r.isUnchanged===!1&&this.canvasEventMap.set(t,ae(T({},e),{commands:s}))}else{const s=await Promise.all(e.args.map(je(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,ae(T({},e),{args:s}))}}}applyIncremental(e,t){var r,s,o;const{data:n}=e;switch(n.source){case x.Mutation:{try{this.applyMutation(n,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,n)}break}case x.Drag:case x.TouchMove:case x.MouseMove:if(t){const a=n.positions[n.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:n}}else n.positions.forEach(a=>{const l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,t,n)},delay:a.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((r=n.positions[0])==null?void 0:r.timeOffset)});break;case x.MouseInteraction:{if(n.id===-1)break;const a=new Event(He(W[n.type])),l=this.mirror.getNode(n.id);if(!l)return this.debugNodeNotFound(n,n.id);this.emitter.emit(V.MouseInteraction,{type:n.type,target:l});const{triggerFocus:u}=this.config;switch(n.type){case W.Blur:"blur"in l&&l.blur();break;case W.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case W.Click:case W.TouchStart:case W.TouchEnd:case W.MouseDown:case W.MouseUp:t?(n.type===W.TouchStart?this.touchActive=!0:n.type===W.TouchEnd&&(this.touchActive=!1),n.type===W.MouseDown?this.lastMouseDownEvent=[l,a]:n.type===W.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:n.x||0,y:n.y||0,id:n.id,debugData:n}):(n.type===W.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(n.x||0,n.y||0,n.id,t,n),n.type===W.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):n.type===W.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):n.type===W.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case W.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case x.Scroll:{if(n.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.scrollData=n;break}this.applyScroll(n,t);break}case x.ViewportResize:this.emitter.emit(V.Resize,{width:n.width,height:n.height});break;case x.Input:{if(n.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.inputData=n;break}this.applyInput(n);break}case x.MediaInteraction:{const a=this.usingVirtualDom?this.virtualDom.mirror.getNode(n.id):this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);const l=a,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-u[0].timestamp,mutation:n});break}case x.StyleSheetRule:case x.StyleDeclaration:{this.usingVirtualDom?n.styleId?this.constructedStyleMutations.push(n):n.id&&((s=this.virtualDom.mirror.getNode(n.id))==null||s.rules.push(n)):this.applyStyleSheetMutation(n);break}case x.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.canvasMutations.push({event:e,mutation:n})}else{const a=this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);Ss({event:e,mutation:n,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case x.Font:{try{const a=new FontFace(n.family,n.buffer?new Uint8Array(JSON.parse(n.fontSource)):n.fontSource,n.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(a)}catch(a){this.warn(a)}break}case x.Selection:{if(t){this.lastSelectionData=n;break}this.applySelection(n);break}case x.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(n):this.applyAdoptedStyleSheet(n);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,xp(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=wl(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(m){if(m instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw m}});const s=T({},this.legacy_missingNodeRetryMap),o=[],n=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===Le.Document?this.newDocumentQueue.push(u):o.push(u);u.node.isShadow&&(Ge(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let m=null,p=null;if(u.previousId&&(m=r.getNode(u.previousId)),u.nextId&&(p=r.getNode(u.nextId)),n(u))return o.push(u);if(u.node.rootId&&!r.getNode(u.node.rootId))return;const y=u.node.rootId?r.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(mt(f,r)){this.attachDocumentToIframe(u,f);return}const d=(b,v)=>{if(!this.usingVirtualDom){Or(b);for(const C of this.config.plugins||[])C.onBuild&&C.onBuild(b,{id:v,replayer:this})}},g=Ut(u.node,{doc:y,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:d});if(u.previousId===-1||u.nextId===-1){s[u.node.id]={node:g,mutation:u};return}const S=r.getMeta(f);if(S&&S.type===Le.Element&&u.node.type===Le.Text){const b=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(S.tagName==="textarea")for(const v of b)v.nodeType===f.TEXT_NODE&&f.removeChild(v);else if(S.tagName==="style"&&b.length===1)for(const v of b)v.nodeType===f.TEXT_NODE&&!r.hasNode(v)&&(g.textContent=v.textContent,f.removeChild(v))}else if((S==null?void 0:S.type)===Le.Document){const b=f;u.node.type===Le.DocumentType&&((c=b.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&b.removeChild(b.childNodes[0]),g.nodeName==="HTML"&&b.documentElement&&b.removeChild(b.documentElement)}if(m&&m.nextSibling&&m.nextSibling.parentNode?f.insertBefore(g,m.nextSibling):p&&p.parentNode?f.contains(p)?f.insertBefore(g,p):f.insertBefore(g,null):f.appendChild(g),d(g,u.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),mt(g,this.mirror)){const b=this.mirror.getId(g),v=this.newDocumentQueue.find(C=>C.parentId===b);v&&(this.attachDocumentToIframe(v,g),this.newDocumentQueue=this.newDocumentQueue.filter(C=>C!==v))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(s,f,g,u)};e.adds.forEach(u=>{a(u)});const l=Date.now();for(;o.length;){const u=Ml(o);if(o.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)?hn(c,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(s).length&&Object.assign(this.legacy_missingNodeRetryMap,s),xl(e.texts).forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(m=>m.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);const f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=oi(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){const m=h.parentNode;((c=m==null?void 0:m.rules)==null?void 0:c.length)>0&&(m.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 m=u.attributes[f];if(m===null)h.removeAttribute(f),f==="open"&&jm(h,u);else if(typeof m=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const p=r.getMeta(h),y=Ut(ae(T({},p),{attributes:T(T({},p.attributes),u.attributes)}),{doc:h.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(p.attributes,u.attributes);const d=h.nextSibling,g=h.parentNode;if(y&&g){g.removeChild(h),g.insertBefore(y,d),r.replace(u.id,y);break}}catch(p){}if(f==="value"&&h.nodeName==="TEXTAREA"){const p=h;p.childNodes.forEach(d=>p.removeChild(d));const y=(c=h.ownerDocument)==null?void 0:c.createTextNode(m);y&&p.appendChild(y)}else h.setAttribute(f,m);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&Or(h,u)}catch(p){this.warn("An error occurred may due to the checkout feature.",p)}else if(f==="style"){const p=m,y=h;for(const d in p)if(p[d]===!1)y.style.removeProperty(d);else if(p[d]instanceof Array){const g=p[d];y.style.setProperty(d,g[0],g[1])}else{const g=p[d];y.style.setProperty(d,g)}}}})}applyScroll(e,t){var r,s;const o=this.mirror.getNode(e.id);if(!o)return this.debugNodeNotFound(e,e.id);const n=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((n==null?void 0:n.type)===Le.Document)(s=o.defaultView)==null||s.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{o.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:s,startOffset:o,end:n,endOffset:a})=>{const l=this.mirror.getNode(s),u=this.mirror.getNode(n);if(!l||!u)return;const c=new Range;c.setStart(l,o),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(s=>s.removeAllRanges()),r.forEach(s=>{var o;return s&&((o=s.selection)==null?void 0:o.addRange(s.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,s,o,n;if((r=e.adds)==null||r.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){const{positions:u,index:c}=ws(l);ft(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){}}),(s=e.removes)==null||s.forEach(({index:a})=>{try{if(Array.isArray(a)){const{positions:l,index:u}=ws(a);ft(t.cssRules,l).deleteRule(u||0)}else t==null||t.deleteRule(a)}catch(l){}}),e.replace)try{(o=t.replace)==null||o.call(t,e.replace)}catch(a){}if(e.replaceSync)try{(n=t.replaceSync)==null||n.call(t,e.replaceSync)}catch(a){}}applyStyleDeclaration(e,t){e.set&&ft(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&ft(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 s=10;let o=0;const n=(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&&o<s&&(setTimeout(()=>n(a,l),0+100*o),o++)};n(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,s){const{previousId:o,nextId:n}=s,a=o&&e[o],l=n&&e[n];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,s,o){const n=this.mirror.getNode(r);if(!n)return this.debugNodeNotFound(o,r);const a=dn(n,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`,s||this.drawMouseTail({x:l,y:u}),this.hoverElements(n)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:r,strokeStyle:s,duration:o}=this.config.mouseTail===!0?_i:Object.assign({},_i,this.config.mouseTail),n=()=>{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=s,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),n(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==e),n()},o/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(s=>{s.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!==O.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(V.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($o,...e)}debug(...e){this.config.showDebug&&this.config.logger.log($o,...e)}}const Xm="2.1.3-alpha.1",{getVersion:Jm}=we,{isRecording:Km}=we,{flushCustomEventQueue:qm}=we,{addCustomEvent:Qm}=we,{freezePage:eg}=we,{takeFullSnapshot:tg}=we;var pe=Uint8Array,ye=Uint16Array,Kt=Uint32Array,pi=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]),mi=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]),Cs=new pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Wl=function(i,e){for(var t=new ye(31),r=0;r<31;++r)t[r]=e+=1<<i[r-1];for(var s=new Kt(t[30]),r=1;r<30;++r)for(var o=t[r];o<t[r+1];++o)s[o]=o-t[r]<<5|r;return[t,s]},zl=Wl(pi,2),Gl=zl[0],Es=zl[1];Gl[28]=258,Es[258]=28;var jl=Wl(mi,0),rg=jl[0],Po=jl[1],Ms=new ye(32768);for(var ee=0;ee<32768;++ee){var Ve=(ee&43690)>>>1|(ee&21845)<<1;Ve=(Ve&52428)>>>2|(Ve&13107)<<2,Ve=(Ve&61680)>>>4|(Ve&3855)<<4,Ms[ee]=((Ve&65280)>>>8|(Ve&255)<<8)>>>1}var De=function(i,e,t){for(var r=i.length,s=0,o=new ye(e);s<r;++s)++o[i[s]-1];var n=new ye(e);for(s=0;s<e;++s)n[s]=n[s-1]+o[s-1]<<1;var a;if(t){a=new ye(1<<e);var l=15-e;for(s=0;s<r;++s)if(i[s])for(var u=s<<4|i[s],c=e-i[s],h=n[i[s]-1]++<<c,f=h|(1<<c)-1;h<=f;++h)a[Ms[h]>>>l]=u}else for(a=new ye(r),s=0;s<r;++s)a[s]=Ms[n[i[s]-1]++]>>>15-i[s];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 qt=new pe(32);for(var ee=0;ee<32;++ee)qt[ee]=5;var ig=De(Ye,9,0),sg=De(Ye,9,1),ng=De(qt,5,0),og=De(qt,5,1),$i=function(i){for(var e=i[0],t=1;t<i.length;++t)i[t]>e&&(e=i[t]);return e},Me=function(i,e,t){var r=e/8>>0;return(i[r]|i[r+1]<<8)>>>(e&7)&t},Li=function(i,e){var t=e/8>>0;return(i[t]|i[t+1]<<8|i[t+2]<<16)>>>(e&7)},yn=function(i){return(i/8>>0)+(i&7&&1)},vn=function(i,e,t){(t==null||t>i.length)&&(t=i.length);var r=new(i instanceof ye?ye:i instanceof Kt?Kt:pe)(t-e);return r.set(i.subarray(e,t)),r},ag=function(i,e,t){var r=i.length,s=!e||t,o=!t||t.i;t||(t={}),e||(e=new pe(r*3));var n=function(Ue){var Je=e.length;if(Ue>Je){var ke=new pe(Math.max(Je*2,Ue));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,m=t.n,p=r*8;do{if(!c){t.f=a=Me(i,l,1);var y=Me(i,l+1,3);if(l+=3,y)if(y==1)c=sg,h=og,f=9,m=5;else if(y==2){var b=Me(i,l,31)+257,v=Me(i,l+10,15)+4,C=b+Me(i,l+5,31)+1;l+=14;for(var M=new pe(C),R=new pe(19),E=0;E<v;++E)R[Cs[E]]=Me(i,l+E*3,7);l+=v*3;var k=$i(R),D=(1<<k)-1;if(!o&&l+C*(k+7)>p)break;for(var j=De(R,k,1),E=0;E<C;){var P=j[Me(i,l,D)];l+=P&15;var d=P>>>4;if(d<16)M[E++]=d;else{var z=0,N=0;for(d==16?(N=3+Me(i,l,3),l+=2,z=M[E-1]):d==17?(N=3+Me(i,l,7),l+=3):d==18&&(N=11+Me(i,l,127),l+=7);N--;)M[E++]=z}}var G=M.subarray(0,b),F=M.subarray(b);f=$i(G),m=$i(F),c=De(G,f,1),h=De(F,m,1)}else throw"invalid block type";else{var d=yn(l)+4,g=i[d-4]|i[d-3]<<8,S=d+g;if(S>r){if(o)throw"unexpected EOF";break}s&&n(u+g),e.set(i.subarray(d,S),u),t.b=u+=g,t.p=l=S*8;continue}if(l>p)throw"unexpected EOF"}s&&n(u+131072);for(var A=(1<<f)-1,Z=(1<<m)-1,se=f+m+18;o||l+se<p;){var z=c[Li(i,l)&A],J=z>>>4;if(l+=z&15,l>p)throw"unexpected EOF";if(!z)throw"invalid length/literal";if(J<256)e[u++]=J;else if(J==256){c=null;break}else{var ue=J-254;if(J>264){var E=J-257,me=pi[E];ue=Me(i,l,(1<<me)-1)+Gl[E],l+=me}var ve=h[Li(i,l)&Z],ce=ve>>>4;if(!ve)throw"invalid distance";l+=ve&15;var F=rg[ce];if(ce>3){var me=mi[ce];F+=Li(i,l)&(1<<me)-1,l+=me}if(l>p)throw"unexpected EOF";s&&n(u+131072);for(var oe=u+ue;u<oe;u+=4)e[u]=e[u-F],e[u+1]=e[u+1-F],e[u+2]=e[u+2-F],e[u+3]=e[u+3-F];u=oe}}t.l=c,t.p=l,t.b=u,c&&(a=1,t.m=f,t.d=h,t.n=m)}while(!a);return u==e.length?e:vn(e,0,u)},_e=function(i,e,t){t<<=e&7;var r=e/8>>0;i[r]|=t,i[r+1]|=t>>>8},kt=function(i,e,t){t<<=e&7;var r=e/8>>0;i[r]|=t,i[r+1]|=t>>>8,i[r+2]|=t>>>16},Pi=function(i,e){for(var t=[],r=0;r<i.length;++r)i[r]&&t.push({s:r,f:i[r]});var s=t.length,o=t.slice();if(!s)return[new pe(0),0];if(s==1){var n=new pe(t[0].s+1);return n[t[0].s]=1,[n,1]}t.sort(function(C,M){return C.f-M.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!=s-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=o[0].s,r=1;r<s;++r)o[r].s>f&&(f=o[r].s);var m=new ye(f+1),p=xs(t[c-1],m,0);if(p>e){var r=0,y=0,d=p-e,g=1<<d;for(o.sort(function(M,R){return m[R.s]-m[M.s]||M.f-R.f});r<s;++r){var S=o[r].s;if(m[S]>e)y+=g-(1<<p-m[S]),m[S]=e;else break}for(y>>>=d;y>0;){var b=o[r].s;m[b]<e?y-=1<<e-m[b]++-1:++r}for(;r>=0&&y;--r){var v=o[r].s;m[v]==e&&(--m[v],++y)}p=e}return[new pe(m),p]},xs=function(i,e,t){return i.s==-1?Math.max(xs(i.l,e,t+1),xs(i.r,e,t+1)):e[i.s]=t},Fo=function(i){for(var e=i.length;e&&!i[--e];);for(var t=new ye(++e),r=0,s=i[0],o=1,n=function(l){t[r++]=l},a=1;a<=e;++a)if(i[a]==s&&a!=e)++o;else{if(!s&&o>2){for(;o>138;o-=138)n(32754);o>2&&(n(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(n(s),--o;o>6;o-=6)n(8304);o>2&&(n(o-3<<5|8208),o=0)}for(;o--;)n(s);o=1,s=i[a]}return[t.subarray(0,r),e]},_t=function(i,e){for(var t=0,r=0;r<e.length;++r)t+=i[r]*e[r];return t},Is=function(i,e,t){var r=t.length,s=yn(e+2);i[s]=r&255,i[s+1]=r>>>8,i[s+2]=i[s]^255,i[s+3]=i[s+1]^255;for(var o=0;o<r;++o)i[s+o+4]=t[o];return(s+4+r)*8},Bo=function(i,e,t,r,s,o,n,a,l,u,c){_e(e,c++,t),++s[256];for(var h=Pi(s,15),f=h[0],m=h[1],p=Pi(o,15),y=p[0],d=p[1],g=Fo(f),S=g[0],b=g[1],v=Fo(y),C=v[0],M=v[1],R=new ye(19),E=0;E<S.length;++E)R[S[E]&31]++;for(var E=0;E<C.length;++E)R[C[E]&31]++;for(var k=Pi(R,7),D=k[0],j=k[1],P=19;P>4&&!D[Cs[P-1]];--P);var z=u+5<<3,N=_t(s,Ye)+_t(o,qt)+n,G=_t(s,f)+_t(o,y)+n+14+3*P+_t(R,D)+(2*R[16]+3*R[17]+7*R[18]);if(z<=N&&z<=G)return Is(e,c,i.subarray(l,l+u));var F,A,Z,se;if(_e(e,c,1+(G<N)),c+=2,G<N){F=De(f,m,0),A=f,Z=De(y,d,0),se=y;var J=De(D,j,0);_e(e,c,b-257),_e(e,c+5,M-1),_e(e,c+10,P-4),c+=14;for(var E=0;E<P;++E)_e(e,c+3*E,D[Cs[E]]);c+=3*P;for(var ue=[S,C],me=0;me<2;++me)for(var ve=ue[me],E=0;E<ve.length;++E){var ce=ve[E]&31;_e(e,c,J[ce]),c+=D[ce],ce>15&&(_e(e,c,ve[E]>>>5&127),c+=ve[E]>>>12)}}else F=ig,A=Ye,Z=ng,se=qt;for(var E=0;E<a;++E)if(r[E]>255){var ce=r[E]>>>18&31;kt(e,c,F[ce+257]),c+=A[ce+257],ce>7&&(_e(e,c,r[E]>>>23&31),c+=pi[ce]);var oe=r[E]&31;kt(e,c,Z[oe]),c+=se[oe],oe>3&&(kt(e,c,r[E]>>>5&8191),c+=mi[oe])}else kt(e,c,F[r[E]]),c+=A[r[E]];return kt(e,c,F[256]),c+A[256]},lg=new Kt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ug=function(i,e,t,r,s,o){var n=i.length,a=new pe(r+n+5*(1+Math.floor(n/7e3))+s),l=a.subarray(r,a.length-s),u=0;if(!e||n<8)for(var c=0;c<=n;c+=65535){var h=c+65535;h<n?u=Is(l,u,i.subarray(c,h)):(l[c]=o,u=Is(l,u,i.subarray(c,n)))}else{for(var f=lg[e-1],m=f>>>13,p=f&8191,y=(1<<t)-1,d=new ye(32768),g=new ye(y+1),S=Math.ceil(t/3),b=2*S,v=function(Ce){return(i[Ce]^i[Ce+1]<<S^i[Ce+2]<<b)&y},C=new Kt(25e3),M=new ye(288),R=new ye(32),E=0,k=0,c=0,D=0,j=0,P=0;c<n;++c){var z=v(c),N=c&32767,G=g[z];if(d[N]=G,g[z]=N,j<=c){var F=n-c;if((E>7e3||D>24576)&&F>423){u=Bo(i,l,0,C,M,R,k,D,P,c-P,u),D=E=k=0,P=c;for(var A=0;A<286;++A)M[A]=0;for(var A=0;A<30;++A)R[A]=0}var Z=2,se=0,J=p,ue=N-G&32767;if(F>2&&z==v(c-ue))for(var me=Math.min(m,F)-1,ve=Math.min(32767,c),ce=Math.min(258,F);ue<=ve&&--J&&N!=G;){if(i[c+Z]==i[c+Z-ue]){for(var oe=0;oe<ce&&i[c+oe]==i[c+oe-ue];++oe);if(oe>Z){if(Z=oe,se=ue,oe>me)break;for(var Ue=Math.min(ue,oe-2),Je=0,A=0;A<Ue;++A){var ke=c-ue+A+32768&32767,it=d[ke],It=ke-it+32768&32767;It>Je&&(Je=It,G=ke)}}}N=G,G=d[N],ue+=N-G+32768&32767}if(se){C[D++]=268435456|Es[Z]<<18|Po[se];var Nt=Es[Z]&31,At=Po[se]&31;k+=pi[Nt]+mi[At],++M[257+Nt],++R[At],j=c+Z,++E}else C[D++]=i[c],++M[i[c]]}}u=Bo(i,l,o,C,M,R,k,D,P,c-P,u)}return vn(a,0,r+yn(u)+s)},cg=function(){var i=1,e=0;return{p:function(t){for(var r=i,s=e,o=t.length,n=0;n!=o;){for(var a=Math.min(n+5552,o);n<a;++n)r+=t[n],s+=r;r%=65521,s%=65521}i=r,e=s},d:function(){return(i>>>8<<16|(e&255)<<8|e>>>8)+((i&255)<<23)*2}}},hg=function(i,e,t,r,s){return ug(i,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(i.length)))*1.5):12+e.mem,t,r,!s)},fg=function(i,e,t){for(;t;++e)i[e]=t,t>>>=8},dg=function(i,e){var t=e.level,r=t==0?0:t<6?1:t==9?3:2;i[0]=120,i[1]=r<<6|(r?32-2*r:1)},pg=function(i){if((i[0]&15)!=8||i[0]>>>4>7||(i[0]<<8|i[1])%31)throw"invalid zlib data";if(i[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function mg(i,e){e===void 0&&(e={});var t=cg();t.p(i);var r=hg(i,e,2,4);return dg(r,e),fg(r,r.length-4,t.d()),r}function gg(i,e){return ag((pg(i),i.subarray(2,-4)),e)}function Hl(i,e){var t=i.length;if(!e&&typeof TextEncoder!="undefined")return new TextEncoder().encode(i);for(var r=new pe(i.length+(i.length>>>1)),s=0,o=function(u){r[s++]=u},n=0;n<t;++n){if(s+5>r.length){var a=new pe(s+8+(t-n<<1));a.set(r),r=a}var l=i.charCodeAt(n);l<128||e?o(l):l<2048?(o(192|l>>>6),o(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|i.charCodeAt(++n)&1023,o(240|l>>>18),o(128|l>>>12&63),o(128|l>>>6&63),o(128|l&63)):(o(224|l>>>12),o(128|l>>>6&63),o(128|l&63))}return vn(r,0,s)}function Yl(i,e){var t="";if(!e&&typeof TextDecoder!="undefined")return new TextDecoder().decode(i);for(var r=0;r<i.length;){var s=i[r++];s<128||e?t+=String.fromCharCode(s):s<224?t+=String.fromCharCode((s&31)<<6|i[r++]&63):s<240?t+=String.fromCharCode((s&15)<<12|(i[r++]&63)<<6|i[r++]&63):(s=((s&15)<<18|(i[r++]&63)<<12|(i[r++]&63)<<6|i[r++]&63)-65536,t+=String.fromCharCode(55296|s>>10,56320|s&1023))}return t}const Ns="v1",yg=i=>{const e=ae(T({},i),{v:Ns});return Yl(mg(Hl(JSON.stringify(e))),!0)},vg=i=>{if(typeof i!="string")return i;try{const e=JSON.parse(i);if(e.timestamp)return e}catch(e){}try{const e=JSON.parse(Yl(gg(Hl(i,!0))));if(e.v===Ns)return e;throw new Error(`These events were packed with packer ${e.v} which is incompatible with current packer ${Ns}.`)}catch(e){throw console.error(e),new Error("Unknown data format.")}};exports.EventType=O;exports.IncrementalSource=x;exports.MouseInteractions=W;exports.Replayer=Zm;exports.ReplayerEvents=V;exports.addCustomEvent=Qm;exports.canvasMutation=Ss;exports.flushCustomEventQueue=qm;exports.freezePage=eg;exports.getVersion=Jm;exports.isRecording=Km;exports.pack=yg;exports.record=we;exports.takeFullSnapshot=tg;exports.unpack=vg;exports.utils=Wp;exports.version=Xm;
83
83
  if (typeof module.exports == "object" && typeof exports == "object") {
84
84
  var __cp = (to, from, except, desc) => {
85
85
  if ((from && typeof from === "object") || typeof from === "function") {