@glimt/record 0.0.61 → 0.0.63

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.
@@ -1,5 +1,5 @@
1
1
  (function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("rrweb", [], f);} else if ("object" == typeof exports) {exports["rrweb"] = f();} else {g["rrweb"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
2
- "use strict";var aa=Object.defineProperty,la=Object.defineProperties;var ua=Object.getOwnPropertyDescriptors;var Mt=Object.getOwnPropertySymbols;var ri=Object.prototype.hasOwnProperty,si=Object.prototype.propertyIsEnumerable;var ti=(s,e,t)=>e in s?aa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,A=(s,e)=>{for(var t in e||(e={}))ri.call(e,t)&&ti(s,t,e[t]);if(Mt)for(var t of Mt(e))si.call(e,t)&&ti(s,t,e[t]);return s},re=(s,e)=>la(s,ua(e));var Pe=(s,e)=>{var t={};for(var r in s)ri.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Mt)for(var r of Mt(s))e.indexOf(r)<0&&si.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ca=Object.defineProperty,ha=(s,e,t)=>e in s?ca(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,y=(s,e,t)=>ha(s,typeof e!="symbol"?e+"":e,t),ii,R=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(R||{}),x=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(x||{}),K=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(K||{}),me=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(me||{}),Ve=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Ve||{}),Fe=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Fe||{}),on=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(on||{});const ni={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},oi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Et={},fa=()=>!!globalThis.Zone;function Es(s){if(Et[s])return Et[s];const e=globalThis[s],t=e.prototype,r=s in ni?ni[s]:void 0,i=!!(r&&r.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=s in oi?oi[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!fa())return Et[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const c=a[s].prototype;return document.body.removeChild(l),c?Et[s]=c:t}catch(l){return t}}const Pr={};function ve(s,e,t){var r;const i=`${s}.${String(t)}`;if(Pr[i])return Pr[i].call(e);const n=Es(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Pr[i]=o,o.call(e)):e[t]}const Lr={};function an(s,e,t){const r=`${s}.${String(t)}`;if(Lr[r])return Lr[r].bind(e);const n=Es(s)[t];return typeof n!="function"?e[t]:(Lr[r]=n,n.bind(e))}function pa(s){return ve("Node",s,"childNodes")}function da(s){return ve("Node",s,"parentNode")}function ma(s){return ve("Node",s,"parentElement")}function ga(s){return ve("Node",s,"textContent")}function ya(s,e){return an("Node",s,"contains")(e)}function wa(s){return an("Node",s,"getRootNode")()}function ba(s){return!s||!("host"in s)?null:ve("ShadowRoot",s,"host")}function Sa(s){return s.styleSheets}function Ca(s){return!s||!("shadowRoot"in s)?null:ve("Element",s,"shadowRoot")}function va(s,e){return ve("Element",s,"querySelector")(e)}function Ia(s,e){return ve("Element",s,"querySelectorAll")(e)}function ln(){return Es("MutationObserver").constructor}function Ne(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const I={childNodes:pa,parentNode:da,parentElement:ma,textContent:ga,contains:ya,getRootNode:wa,host:ba,styleSheets:Sa,shadowRoot:Ca,querySelector:va,querySelectorAll:Ia,mutationObserver:ln,patch:Ne};var xa=Object.defineProperty,Aa=(s,e,t)=>e in s?xa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,je=(s,e,t)=>Aa(s,typeof e!="symbol"?e+"":e,t),H=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(H||{});const ai={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},li={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},$t={},Oa=()=>!!globalThis.Zone;function $s(s){if($t[s])return $t[s];const e=globalThis[s],t=e.prototype,r=s in ai?ai[s]:void 0,i=!!(r&&r.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=s in li?li[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!Oa())return $t[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const c=a[s].prototype;return document.body.removeChild(l),c?$t[s]=c:t}catch(l){return t}}const Dr={};function Ie(s,e,t){var r;const i=`${s}.${String(t)}`;if(Dr[i])return Dr[i].call(e);const n=$s(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Dr[i]=o,o.call(e)):e[t]}const Fr={};function un(s,e,t){const r=`${s}.${String(t)}`;if(Fr[r])return Fr[r].bind(e);const n=$s(s)[t];return typeof n!="function"?e[t]:(Fr[r]=n,n.bind(e))}function Ra(s){return Ie("Node",s,"childNodes")}function Ma(s){return Ie("Node",s,"parentNode")}function Ea(s){return Ie("Node",s,"parentElement")}function $a(s){return Ie("Node",s,"textContent")}function Na(s,e){return un("Node",s,"contains")(e)}function ka(s){return un("Node",s,"getRootNode")()}function _a(s){return!s||!("host"in s)?null:Ie("ShadowRoot",s,"host")}function Ta(s){return s.styleSheets}function Pa(s){return!s||!("shadowRoot"in s)?null:Ie("Element",s,"shadowRoot")}function La(s,e){return Ie("Element",s,"querySelector")(e)}function Da(s,e){return Ie("Element",s,"querySelectorAll")(e)}function Fa(){return $s("MutationObserver").constructor}function Ba(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const Y={childNodes:Ra,parentNode:Ma,parentElement:Ea,textContent:$a,contains:Na,getRootNode:ka,host:_a,styleSheets:Ta,shadowRoot:Pa,querySelector:La,querySelectorAll:Da,mutationObserver:Fa,patch:Ba},cn=()=>!("_rrweb_skip_re_fetching_to_suppress_cors_errors"in window&&window._rrweb_skip_re_fetching_to_suppress_cors_errors===!0),hn=()=>"_rrweb_is_debug"in window&&window._rrweb_is_debug?window._rrweb_is_debug:!1;function fn(s){return s.nodeType===s.ELEMENT_NODE}function ot(s){const e=s&&"host"in s&&"mode"in s&&Y.host(s)||null;return!!(e&&"shadowRoot"in e&&Y.shadowRoot(e)===s)}function at(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Ua(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function za(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function Cr(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>pn(i,t)).join("");return Ua(r)}catch(e){return null}}function pn(s,e){if(ja(s)){let t;try{t=Cr(s.styleSheet)||za(s)}catch(r){t=s.cssText}return s.styleSheet.href?lr(t,s.styleSheet.href):t}else{let t=s.cssText;return Ga(s)&&s.selectorText.includes(":")&&(t=Wa(t)),e?lr(t,e):t}}function Wa(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function ja(s){return"styleSheet"in s}function Ga(s){return"selectorText"in s}class dn{constructor(){je(this,"idNodeMap",new Map),je(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Va(){return new dn}function or({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"";const l=r&&$e(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function $e(s){return s.toLowerCase()}const ui="__rrweb_original__",Ha=25e4;function Ya(s,e){if(s.width*s.height<Ha)return e!=null?e:s.getContext("2d");const t=document.createElement("canvas");t.width=s.width,t.height=s.height;const r=t.getContext("2d");return r&&r.drawImage(s,0,0),t.getContext("2d",{willReadFrequently:!0})}function Za(s,e){if(s.width===0||s.height===0)return!0;const t=Ya(s,e);if(!t)return!0;const r=s.width>512||s.height>512?100:50,i=t.getImageData,n=ui in i?i[ui]:i;for(let o=0;o<s.width;o+=r){const l=Math.min(r,s.width-o);for(let a=0;a<s.height;a+=r){const c=Math.min(r,s.height-a),u=new Uint32Array(n.call(t,o,a,l,c).data.buffer);for(let h=0;h<u.length;h++)if(u[h]!==0)return!1}}return!0}function ar(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?$e(e):null}function mn(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(o){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function Ja(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Xa=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ka=/^(?:[a-z+]+:)?\/\//i,qa=/^www\..*/i,Qa=/^(data:)([^,]*),(.*)/i;function lr(s,e){return(s||"").replace(Xa,(t,r,i,n,o,l)=>{const a=i||o||l,c=r||n||"";if(!a)return t;if(Ka.test(a)||qa.test(a))return`url(${c}${a}${c})`;if(Qa.test(a))return`url(${c}${a}${c})`;if(a[0]==="/")return`url(${c}${Ja(e)+a}${c})`;const u=e.split("/"),h=a.split("/");u.pop();for(const f of h)f!=="."&&(f===".."?u.pop():u.push(f));return`url(${c}${u.join("/")}${c})`})}function Nt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function el(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let o=Nt(s,t);const l=o.length/s.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){const c=Nt(r[a].textContent,t),u=100;let h=3;for(;h<c.length&&(c[h].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,h),1)!==-1);h++);for(;h<c.length;h++){let f=c.substring(0,h),d=o.split(f),g=-1;if(d.length===2)g=d[0].length;else if(d.length>2&&d[0]===""&&r[a-1].textContent!=="")g=o.indexOf(f,1);else if(d.length===1){if(f=f.substring(0,f.length-1),d=o.split(f),d.length<=1)return i.push(s),i;h=u+1}else h===c.length-1&&(g=o.indexOf(f));if(d.length>=2&&h>u){const m=r[a-1].textContent;if(m&&typeof m=="string"){const p=Nt(m).length;g=o.indexOf(f,p)}g===-1&&(g=d[0].length)}if(g!==-1){let m=Math.floor(g/l);for(;m>0&&m<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const p=Nt(s.substring(0,m),t);if(p.length===g){i.push(s.substring(0,m)),s=s.substring(m),o=o.substring(g);break}else p.length<g?m+=Math.max(1,Math.floor((g-p.length)/l)):m-=Math.max(1,Math.floor((p.length-g)*l))}break}}}}return i.push(s),i}function tl(s,e){return el(s,e).join("/* rr_split */")}const rl=1e3*30,Le="data-recapt-rrweb-link-cloned",sl=["woff","woff2","ttf","otf","eot","png","jpg","jpeg","gif","svg","webp","ico","js","mjs","ts","jsx","tsx","json","map","mp4","webm","ogg","mp3","wav","zip","rar","7z","tar","gz","pdf","doc","docx","xls","xlsx"],gn=class Kt{constructor(){if(je(this,"currentHref",null),je(this,"clones",{}),je(this,"cleanTimeout",null),Kt.instance)return Kt.instance;Kt.instance=this}removeCloneNode(e){var t;if(!(e in this.clones)||this.clones[e]===void 0)return;const r=document.querySelector(`link[${Le}="${this.clones[e].cloneNodeAttrId}"]`);r&&((t=r.parentNode)==null||t.removeChild(r))}onLoad(e){if(!(e in this.clones)||this.clones[e]===void 0)return;const t=Array.from(document.styleSheets);let r=null;for(let o=t.length-1;o>=0;o--)if(t[o].href===e){r=t[o];break}if(!r)return this.removeCloneNode(e);const i=Cr(r);if(this.removeCloneNode(e),!i)return;this.clones[e].cssText=i,this.clones[e].loaded=!0;const n=document.querySelector(`link[${Le}="source-${this.clones[e].cloneNodeAttrId}"]`);n?(n.setAttribute("data-rrweb-mutation",Date.now().toString()),n.removeAttribute(Le)):(this.clones[e].original.setAttribute("data-rrweb-mutation",Date.now().toString()),this.clones[e].original.removeAttribute(Le)),window.dispatchEvent(new CustomEvent("__rrweb_custom_event__",{detail:{type:5,timestamp:Date.now(),data:{tag:"async-css-resolution",requestCssId:this.clones[e].requestCssId,cssText:this.clones[e].cssText}}}))}onLoadError(e){!(e in this.clones)||this.clones[e]===void 0||this.removeCloneNode(e)}removeAllCloneElements(){for(const e of Object.keys(this.clones))this.removeCloneNode(e)}onCleanTimeout(){lt.cleanTimeout=null,lt.removeAllCloneElements()}blowCache(){this.removeAllCloneElements(),this.clones={}}requestClone({forElement:e,requestCssId:t}){if(!cn())return;this.currentHref!=null&&document.location.href!==this.currentHref&&this.blowCache(),this.currentHref=document.location.href;const r=e.href;if(!r||r in this.clones&&this.clones[r]!==void 0||e.getAttribute("crossorigin")==="anonymous")return;if(e.rel!=="stylesheet"){const o=r.split("/").pop();if(o&&o.includes(".")){const[l]=o.split("?"),a=l.split(".").pop();if(a&&sl.includes(a.trim().toLowerCase()))return}}const i=e.cloneNode(),n=Math.random().toString(36).slice(2);i.setAttribute("crossorigin","anonymous"),i.setAttribute(Le,n),e.setAttribute(Le,`source-${n}`),document.head.appendChild(i),this.clones[r]={original:e,clone:i,loaded:!1,cssText:null,cloneNodeAttrId:n,requestCssId:t},i.onload=()=>{this.onLoad(r)},i.onerror=()=>{this.onLoadError(r)},this.cleanTimeout&&clearTimeout(this.cleanTimeout),this.cleanTimeout=setTimeout(lt.onCleanTimeout,rl)}getClonedCssTextIfAvailable(e){return e in this.clones&&this.clones[e]!==void 0&&this.clones[e].loaded===!0?this.clones[e].cssText:null}};je(gn,"instance");let il=gn;const lt=new il,nl=({attributes:s,doc:e,n:t})=>{const r=Array.from(e.styleSheets);let i=null;for(let o=0;o<r.length;o++)if(r[o].href===t.href){i=r[o];break}let n=null;if(i&&(n=Cr(i)),n||(n=lt.getClonedCssTextIfAvailable(t.href)),n)delete s.rel,delete s.href,s._cssText=n;else{const o=`css-request-${Math.random().toString(36).slice(2)}`;lt.requestClone({forElement:t,requestCssId:o}),s._requestCssId=o}return s},ol=({attributes:s,n:e})=>{let t=Cr(e.sheet);return t&&(e.childNodes.length>1&&(t=tl(t,e)),s._cssText=t),s},al=({attributes:s,n:e,tagName:t,maskInputOptions:r,maskInputFn:i})=>{const n=e.value,o=e.checked;return s.type!=="radio"&&s.type!=="checkbox"&&s.type!=="submit"&&s.type!=="button"&&n?s.value=or({element:e,type:ar(e),tagName:t,value:n,maskInputOptions:r,maskInputFn:i}):o&&(s.checked=o),s},ll=({attributes:s,n:e,maskInputOptions:t})=>(e.selected&&!t.select?s.selected=!0:delete s.selected,s),ul=s=>{"requestIdleCallback"in window?window.requestIdleCallback(s):setTimeout(s,100)},cl=({attributes:s,n:e,dataURLOptions:t,doc:r})=>{let i="getContext"in e?e.getContext("2d"):null;if(i!=null)Za(e,i)||(s.rr_dataURL=e.toDataURL(t.type,t.quality));else if(e.width!==0&&e.height!==0){const n=e.toDataURL(t.type,t.quality);s.rr_dataURL=n,ul(()=>{try{const o=r.createElement("canvas");o.width=e.width,o.height=e.height;const l=o.toDataURL(t.type,t.quality);n===l&&delete s.rr_dataURL}catch(o){}})}return s},hl=({attributes:s,n:e,canvasService:t,canvasCtx:r,dataURLOptions:i,doc:n})=>{t||(t=n.createElement("canvas"),r=t.getContext("2d"));const o=e;let l=null,a=0;const c=(o.currentSrc||o.getAttribute("src")||"<unknown-src>")+"",u=o.naturalHeight,h=o.naturalWidth,f=()=>{l=null},d=()=>{if(a++,!(a>3)){(l!=null?l:o).removeEventListener("error",g);try{t.width=h,t.height=u,r.drawImage(o,0,0),s.rr_dataURL=t.toDataURL(i.type,i.quality)}catch(m){if(o.crossOrigin!=="anonymous"){if(cn()){l=new Image,l.src=c,l.crossOrigin="anonymous",l.height=u,l.width=h,l.complete&&l.naturalWidth!==0?d():(l.addEventListener("load",d,{once:!0}),l.addEventListener("error",g,{once:!0}));return}}else hn()&&console.warn(`Cannot inline img src=${c}! Error: ${m}`)}f()}},g=()=>{(l!=null?l:o).removeEventListener("load",d),f()};return o.complete&&o.naturalWidth!==0?d():(o.addEventListener("load",d,{once:!0}),o.addEventListener("error",g,{once:!0})),s},fl=({attributes:s,n:e})=>{const t=s;return t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume,s};let pl=1;const dl=new RegExp("[^a-z0-9-_:]"),ht=-2;function yn(){return pl++}function ml(s){if(s instanceof HTMLFormElement)return"form";const e=$e(s.tagName);return dl.test(e)?"div":e}let gl=null,yl=null;const wl=/^[^ \t\n\r\u000c]+/,bl=/^[, \t\n\r\u000c]+/;function Sl(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o;const l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}const i=[];for(;r(bl),!(t>=e.length);){let n=r(wl);if(n.slice(-1)===",")n=Ue(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=Ue(s,n);let l=!1;for(;;){const a=e.charAt(t);if(a===""){i.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,i.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return i.join(", ")}const ci=new WeakMap;function Ue(s,e){return!e||e.trim()===""?e:Ns(s,e)}function Cl(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Ns(s,e){let t=ci.get(s);if(t||(t=s.createElement("a"),ci.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function wn(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?Ue(s,r):t==="srcset"?Sl(s,r):t==="style"?lr(r,Ns(s)):e==="object"&&t==="data"?Ue(s,r):r)}function bn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function vl(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function ur(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?ur(Y.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?ur(Y.parentNode(s),e,t):!1}function Sn(s,e,t,r){let i;if(fn(s)){if(i=s,!Y.childNodes(i).length)return!1}else{if(Y.parentElement(s)===null)return!1;i=Y.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(ur(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function Il(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(l){return}if(n!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function xl(s,e,t){let r=!1,i;try{i=s.sheet}catch(o){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function Al(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m=!1,cssCaptured:p=!1}=e,w=Ol(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:H.Document,childNodes:[],compatMode:s.compatMode}:{type:H.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:H.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:w};case s.ELEMENT_NODE:return Ml(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:u,dataURLOptions:h,inlineImages:f,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m,rootId:w});case s.TEXT_NODE:return Rl(s,{doc:t,needsMask:o,maskTextFn:c,rootId:w,cssCaptured:p});case s.CDATA_SECTION_NODE:return{type:H.CDATA,textContent:"",rootId:w};case s.COMMENT_NODE:return{type:H.Comment,textContent:Y.textContent(s)||"",rootId:w};default:return!1}}function Ol(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Rl(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=Y.parentNode(s),l=o&&o.tagName;let a="";const c=l==="STYLE"?!0:void 0,u=l==="SCRIPT"?!0:void 0;return u?a="SCRIPT_PLACEHOLDER":n||(a=Y.textContent(s),c&&a&&(a=lr(a,Ns(e.doc)))),!c&&!u&&a&&t&&(a=r?r(a,Y.parentElement(s)):a.replace(/[\S]/g,"*")),{type:H.Text,textContent:a||"",rootId:i}}function Ml(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:d}=e,g=vl(s,r,i),m=ml(s);let p={};const w=s.attributes.length;for(let S=0;S<w;S++){const M=s.attributes[S];bn(m,M.name,M.value)||(p[M.name]=wn(t,m,$e(M.name),M.value))}switch(m){case"link":n&&(p=nl({doc:t,attributes:p,n:s}));break;case"style":s.sheet&&(p=ol({attributes:p,n:s}));break;case"input":case"textarea":case"select":p=al({attributes:p,n:s,tagName:m,maskInputOptions:o,maskInputFn:l});break;case"option":p=ll({attributes:p,n:s,maskInputOptions:o});break;case"dialog":s.open&&(p.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal");break;case"canvas":u&&(p=cl({attributes:p,n:s,dataURLOptions:a,doc:t}));case"img":c&&(p=hl({attributes:p,n:s,canvasService:gl,canvasCtx:yl,dataURLOptions:a,doc:t}));break;case"audio":case"video":p=fl({attributes:p,n:s});break}if(f||(s.scrollLeft&&(p.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(p.rr_scrollTop=s.scrollTop)),g){const{width:S,height:M}=s.getBoundingClientRect();p={class:p.class,rr_width:`${S}px`,rr_height:`${M}px`}}m==="iframe"&&!h(p.src)&&(s.contentDocument||(p.rr_src=p.src),delete p.src);let b;try{customElements.get(m)&&(b=!0)}catch(S){}return{type:H.Element,tagName:m,attributes:p,childNodes:[],isSVG:Cl(s)||void 0,needBlock:g,rootId:d,isCustom:b}}function _(s){return s==null?"":s.toLowerCase()}function El(s,e){if(e.comment&&s.type===H.Comment)return!0;if(s.type===H.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&mn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(_(s.attributes.name).match(/^msapplication-tile(image|color)$/)||_(s.attributes.name)==="application-name"||_(s.attributes.rel)==="icon"||_(s.attributes.rel)==="apple-touch-icon"||_(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&_(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(_(s.attributes.property).match(/^(og|twitter|fb):/)||_(s.attributes.name).match(/^(og|twitter):/)||_(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(_(s.attributes.name)==="robots"||_(s.attributes.name)==="googlebot"||_(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(_(s.attributes.name)==="author"||_(s.attributes.name)==="generator"||_(s.attributes.name)==="framework"||_(s.attributes.name)==="publisher"||_(s.attributes.name)==="progid"||_(s.attributes.property).match(/^article:/)||_(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(_(s.attributes.name)==="google-site-verification"||_(s.attributes.name)==="yandex-verification"||_(s.attributes.name)==="csrf-token"||_(s.attributes.name)==="p:domain_verify"||_(s.attributes.name)==="verify-v1"||_(s.attributes.name)==="verification"||_(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}const Se={index:0,store:{}};function ze(s,e){const t=Date.now(),{doc:r,mirror:i,blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:a,skipChild:c=!1,inlineStylesheet:u=!0,maskInputOptions:h={},maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:w=!1,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:M=5e3,onStylesheetLoad:F,stylesheetLoadTimeout:j=5e3,keepIframeSrcFn:G=()=>!1,newlyAddedElement:P=!1,cssCaptured:X=!1}=e;let{needsMask:V}=e,{preserveWhiteSpace:q=!0}=e;V||(V=Sn(s,l,a,V===void 0));const le=Al(s,{doc:r,mirror:i,blockClass:n,blockSelector:o,needsMask:V,inlineStylesheet:u,maskInputOptions:h,maskTextFn:f,maskInputFn:d,dataURLOptions:m,inlineImages:p,recordCanvas:w,keepIframeSrcFn:G,newlyAddedElement:P,cssCaptured:X});if(!le)return hn()&&console.warn(s,"not serialized"),null;let he;i.hasNode(s)?he=i.getId(s):El(le,g)||!q&&le.type===H.Text&&!le.textContent.replace(/^\s+|\s+$/gm,"").length?he=ht:he=yn();const E=Object.assign(le,{id:he});if(i.add(s,E),he===ht)return null;b&&b(s);let qe=!c;if(E.type===H.Element){qe=qe&&!E.needBlock,delete E.needBlock;const z=Y.shadowRoot(s);z&&at(z)&&(E.isShadowHost=!0)}if((E.type===H.Document||E.type===H.Element)&&qe){g.headWhitespace&&E.type===H.Element&&E.tagName==="head"&&(q=!1);const z={doc:r,mirror:i,blockClass:n,blockSelector:o,needsMask:V,maskTextClass:l,maskTextSelector:a,skipChild:c,inlineStylesheet:u,maskInputOptions:h,maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:w,preserveWhiteSpace:q,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:M,onStylesheetLoad:F,stylesheetLoadTimeout:j,keepIframeSrcFn:G,cssCaptured:!1};if(!(E.type===H.Element&&E.tagName==="textarea"&&E.attributes.value!==void 0)){E.type===H.Element&&E.attributes._cssText!==void 0&&typeof E.attributes._cssText=="string"&&(z.cssCaptured=!0);for(const ee of Array.from(Y.childNodes(s))){const te=ze(ee,z);te&&E.childNodes.push(te)}}let Q=null;if(fn(s)&&(Q=Y.shadowRoot(s))){const ee=Y.childNodes(Q);for(let te=0;te<ee.length;te++){const Te=ee[te],be=ze(Te,z);be&&(at(Q)&&(be.isShadow=!0),E.childNodes.push(be))}}}const we=Y.parentNode(s);we&&ot(we)&&at(we)&&(E.isShadow=!0),E.type===H.Element&&E.tagName==="iframe"&&Il(s,()=>{const z=s.contentDocument;if(z&&S){const Q=ze(z,{doc:z,mirror:i,blockClass:n,blockSelector:o,needsMask:V,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:w,preserveWhiteSpace:q,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:M,onStylesheetLoad:F,stylesheetLoadTimeout:j,keepIframeSrcFn:G});Q&&S(s,Q)}},M),E.type===H.Element&&E.tagName==="link"&&typeof E.attributes.rel=="string"&&(E.attributes.rel==="stylesheet"||E.attributes.rel==="preload"&&typeof E.attributes.href=="string"&&mn(E.attributes.href)==="css")&&xl(s,()=>{if(F){const z=ze(s,{doc:r,mirror:i,blockClass:n,blockSelector:o,needsMask:V,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:w,preserveWhiteSpace:q,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:M,onStylesheetLoad:F,stylesheetLoadTimeout:j,keepIframeSrcFn:G});z&&F(s,z)}},j),Se.index++;const Ae=Date.now()-t;if(s.nodeName in Se.store||(Se.store[s.nodeName]=[]),Se.store[s.nodeName].push(Ae),Se.index%1e3===0){Se.index=0;const z=Object.entries(Se.store).map(([Q,ee])=>({key:Q,avg:ee.reduce((te,Te)=>te+Te,0)/ee.length,max:Math.max(...ee),min:Math.min(...ee)}));console.log("last 1000 avgs",JSON.parse(JSON.stringify(z))),Se.store={}}return E}function $l(s,e){const{mirror:t=new dn,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:h,maskInputFn:f,slimDOM:d=!1,dataURLOptions:g,preserveWhiteSpace:m,onSerialize:p,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:M,keepIframeSrcFn:F=()=>!1}=e||{};return ze(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:u===!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}:u===!1?{password:!0}:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:d==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:d===!1?{}:d,dataURLOptions:g,inlineImages:a,recordCanvas:c,preserveWhiteSpace:m,onSerialize:p,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:M,keepIframeSrcFn:F,newlyAddedElement:!1})}function Nl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function kl(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var ks={exports:{}},C=String,Cn=function(){return{isColorSupported:!1,reset:C,bold:C,dim:C,italic:C,underline:C,inverse:C,hidden:C,strikethrough:C,black:C,red:C,green:C,yellow:C,blue:C,magenta:C,cyan:C,white:C,gray:C,bgBlack:C,bgRed:C,bgGreen:C,bgYellow:C,bgBlue:C,bgMagenta:C,bgCyan:C,bgWhite:C,blackBright:C,redBright:C,greenBright:C,yellowBright:C,blueBright:C,magentaBright:C,cyanBright:C,whiteBright:C,bgBlackBright:C,bgRedBright:C,bgGreenBright:C,bgYellowBright:C,bgBlueBright:C,bgMagentaBright:C,bgCyanBright:C,bgWhiteBright:C}};ks.exports=Cn();ks.exports.createColors=Cn;var _l=ks.exports;const Tl={},Pl=Object.freeze(Object.defineProperty({__proto__:null,default:Tl},Symbol.toStringTag,{value:"Module"})),oe=kl(Pl);let hi=_l,fi=oe,Xr=class vn extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,vn)}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=hi.isColorSupported);let r=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:f}=hi.createColors(!0);i=d=>u(f(d)),r=d=>h(d),fi&&(n=d=>fi(d))}let o=t.split(/\r?\n/),l=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;return o.slice(l,a).map((u,h)=>{let f=l+1+h,d=" "+(" "+f).slice(-c)+" | ";if(f===this.line){if(u.length>160){let m=20,p=Math.max(0,this.column-m),w=Math.max(this.column+m,this.endColumn+m),b=u.slice(p,w),S=r(d.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,m-1)).replace(/[^\t]/g," ");return i(">")+r(d)+n(b)+`
2
+ "use strict";var aa=Object.defineProperty,la=Object.defineProperties;var ua=Object.getOwnPropertyDescriptors;var Mt=Object.getOwnPropertySymbols;var ri=Object.prototype.hasOwnProperty,si=Object.prototype.propertyIsEnumerable;var ti=(s,e,t)=>e in s?aa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,A=(s,e)=>{for(var t in e||(e={}))ri.call(e,t)&&ti(s,t,e[t]);if(Mt)for(var t of Mt(e))si.call(e,t)&&ti(s,t,e[t]);return s},re=(s,e)=>la(s,ua(e));var Pe=(s,e)=>{var t={};for(var r in s)ri.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Mt)for(var r of Mt(s))e.indexOf(r)<0&&si.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ca=Object.defineProperty,ha=(s,e,t)=>e in s?ca(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,y=(s,e,t)=>ha(s,typeof e!="symbol"?e+"":e,t),ii,R=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(R||{}),x=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(x||{}),K=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(K||{}),me=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(me||{}),Ve=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Ve||{}),Fe=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Fe||{}),on=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(on||{});const ni={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},oi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Et={},fa=()=>!!globalThis.Zone;function Es(s){if(Et[s])return Et[s];const e=globalThis[s],t=e.prototype,r=s in ni?ni[s]:void 0,i=!!(r&&r.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=s in oi?oi[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!fa())return Et[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const c=a[s].prototype;return document.body.removeChild(l),c?Et[s]=c:t}catch(l){return t}}const Pr={};function ve(s,e,t){var r;const i=`${s}.${String(t)}`;if(Pr[i])return Pr[i].call(e);const n=Es(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Pr[i]=o,o.call(e)):e[t]}const Lr={};function an(s,e,t){const r=`${s}.${String(t)}`;if(Lr[r])return Lr[r].bind(e);const n=Es(s)[t];return typeof n!="function"?e[t]:(Lr[r]=n,n.bind(e))}function pa(s){return ve("Node",s,"childNodes")}function da(s){return ve("Node",s,"parentNode")}function ma(s){return ve("Node",s,"parentElement")}function ga(s){return ve("Node",s,"textContent")}function ya(s,e){return an("Node",s,"contains")(e)}function wa(s){return an("Node",s,"getRootNode")()}function ba(s){return!s||!("host"in s)?null:ve("ShadowRoot",s,"host")}function Sa(s){return s.styleSheets}function Ca(s){return!s||!("shadowRoot"in s)?null:ve("Element",s,"shadowRoot")}function va(s,e){return ve("Element",s,"querySelector")(e)}function Ia(s,e){return ve("Element",s,"querySelectorAll")(e)}function ln(){return Es("MutationObserver").constructor}function Ne(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const I={childNodes:pa,parentNode:da,parentElement:ma,textContent:ga,contains:ya,getRootNode:wa,host:ba,styleSheets:Sa,shadowRoot:Ca,querySelector:va,querySelectorAll:Ia,mutationObserver:ln,patch:Ne};var xa=Object.defineProperty,Aa=(s,e,t)=>e in s?xa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,je=(s,e,t)=>Aa(s,typeof e!="symbol"?e+"":e,t),H=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(H||{});const ai={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},li={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},$t={},Oa=()=>!!globalThis.Zone;function $s(s){if($t[s])return $t[s];const e=globalThis[s],t=e.prototype,r=s in ai?ai[s]:void 0,i=!!(r&&r.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=s in li?li[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!Oa())return $t[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const c=a[s].prototype;return document.body.removeChild(l),c?$t[s]=c:t}catch(l){return t}}const Dr={};function Ie(s,e,t){var r;const i=`${s}.${String(t)}`;if(Dr[i])return Dr[i].call(e);const n=$s(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Dr[i]=o,o.call(e)):e[t]}const Fr={};function un(s,e,t){const r=`${s}.${String(t)}`;if(Fr[r])return Fr[r].bind(e);const n=$s(s)[t];return typeof n!="function"?e[t]:(Fr[r]=n,n.bind(e))}function Ra(s){return Ie("Node",s,"childNodes")}function Ma(s){return Ie("Node",s,"parentNode")}function Ea(s){return Ie("Node",s,"parentElement")}function $a(s){return Ie("Node",s,"textContent")}function Na(s,e){return un("Node",s,"contains")(e)}function ka(s){return un("Node",s,"getRootNode")()}function _a(s){return!s||!("host"in s)?null:Ie("ShadowRoot",s,"host")}function Ta(s){return s.styleSheets}function Pa(s){return!s||!("shadowRoot"in s)?null:Ie("Element",s,"shadowRoot")}function La(s,e){return Ie("Element",s,"querySelector")(e)}function Da(s,e){return Ie("Element",s,"querySelectorAll")(e)}function Fa(){return $s("MutationObserver").constructor}function Ba(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const Y={childNodes:Ra,parentNode:Ma,parentElement:Ea,textContent:$a,contains:Na,getRootNode:ka,host:_a,styleSheets:Ta,shadowRoot:Pa,querySelector:La,querySelectorAll:Da,mutationObserver:Fa,patch:Ba},cn=()=>!("_rrweb_skip_re_fetching_to_suppress_cors_errors"in window&&window._rrweb_skip_re_fetching_to_suppress_cors_errors===!0),hn=()=>"_rrweb_is_debug"in window&&window._rrweb_is_debug?window._rrweb_is_debug:!1;function fn(s){return s.nodeType===s.ELEMENT_NODE}function ot(s){const e=s&&"host"in s&&"mode"in s&&Y.host(s)||null;return!!(e&&"shadowRoot"in e&&Y.shadowRoot(e)===s)}function at(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Ua(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function za(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function Cr(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>pn(i,t)).join("");return Ua(r)}catch(e){return null}}function pn(s,e){if(ja(s)){let t;try{t=Cr(s.styleSheet)||za(s)}catch(r){t=s.cssText}return s.styleSheet.href?lr(t,s.styleSheet.href):t}else{let t=s.cssText;return Ga(s)&&s.selectorText.includes(":")&&(t=Wa(t)),e?lr(t,e):t}}function Wa(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function ja(s){return"styleSheet"in s}function Ga(s){return"selectorText"in s}class dn{constructor(){je(this,"idNodeMap",new Map),je(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Va(){return new dn}function or({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"";const l=r&&$e(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function $e(s){return s.toLowerCase()}const ui="__rrweb_original__",Ha=25e4;function Ya(s,e){if(s.width*s.height<Ha)return e!=null?e:s.getContext("2d");const t=document.createElement("canvas");t.width=s.width,t.height=s.height;const r=t.getContext("2d");return r&&r.drawImage(s,0,0),t.getContext("2d",{willReadFrequently:!0})}function Za(s,e){if(s.width===0||s.height===0)return!0;const t=Ya(s,e);if(!t)return!0;const r=s.width>512||s.height>512?100:50,i=t.getImageData,n=ui in i?i[ui]:i;for(let o=0;o<s.width;o+=r){const l=Math.min(r,s.width-o);for(let a=0;a<s.height;a+=r){const c=Math.min(r,s.height-a),u=new Uint32Array(n.call(t,o,a,l,c).data.buffer);for(let h=0;h<u.length;h++)if(u[h]!==0)return!1}}return!0}function ar(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?$e(e):null}function mn(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(o){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function Ja(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Xa=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ka=/^(?:[a-z+]+:)?\/\//i,qa=/^www\..*/i,Qa=/^(data:)([^,]*),(.*)/i;function lr(s,e){return(s||"").replace(Xa,(t,r,i,n,o,l)=>{const a=i||o||l,c=r||n||"";if(!a)return t;if(Ka.test(a)||qa.test(a))return`url(${c}${a}${c})`;if(Qa.test(a))return`url(${c}${a}${c})`;if(a[0]==="/")return`url(${c}${Ja(e)+a}${c})`;const u=e.split("/"),h=a.split("/");u.pop();for(const f of h)f!=="."&&(f===".."?u.pop():u.push(f));return`url(${c}${u.join("/")}${c})`})}function Nt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function el(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let o=Nt(s,t);const l=o.length/s.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){const c=Nt(r[a].textContent,t),u=100;let h=3;for(;h<c.length&&(c[h].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,h),1)!==-1);h++);for(;h<c.length;h++){let f=c.substring(0,h),d=o.split(f),g=-1;if(d.length===2)g=d[0].length;else if(d.length>2&&d[0]===""&&r[a-1].textContent!=="")g=o.indexOf(f,1);else if(d.length===1){if(f=f.substring(0,f.length-1),d=o.split(f),d.length<=1)return i.push(s),i;h=u+1}else h===c.length-1&&(g=o.indexOf(f));if(d.length>=2&&h>u){const m=r[a-1].textContent;if(m&&typeof m=="string"){const p=Nt(m).length;g=o.indexOf(f,p)}g===-1&&(g=d[0].length)}if(g!==-1){let m=Math.floor(g/l);for(;m>0&&m<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const p=Nt(s.substring(0,m),t);if(p.length===g){i.push(s.substring(0,m)),s=s.substring(m),o=o.substring(g);break}else p.length<g?m+=Math.max(1,Math.floor((g-p.length)/l)):m-=Math.max(1,Math.floor((p.length-g)*l))}break}}}}return i.push(s),i}function tl(s,e){return el(s,e).join("/* rr_split */")}const rl=1e3*30,Le="data-recapt-rrweb-link-cloned",sl=["woff","woff2","ttf","otf","eot","png","jpg","jpeg","gif","svg","webp","ico","js","mjs","ts","jsx","tsx","json","map","mp4","webm","ogg","mp3","wav","zip","rar","7z","tar","gz","pdf","doc","docx","xls","xlsx"],gn=class Kt{constructor(){if(je(this,"currentHref",null),je(this,"clones",{}),je(this,"cleanTimeout",null),Kt.instance)return Kt.instance;Kt.instance=this}removeCloneNode(e){var t;if(!(e in this.clones)||this.clones[e]===void 0)return;const r=document.querySelector(`link[${Le}="${this.clones[e].cloneNodeAttrId}"]`);r&&((t=r.parentNode)==null||t.removeChild(r))}onLoad(e){if(!(e in this.clones)||this.clones[e]===void 0)return;const t=Array.from(document.styleSheets);let r=null;for(let o=t.length-1;o>=0;o--)if(t[o].href===e){r=t[o];break}if(!r)return this.removeCloneNode(e);const i=Cr(r);if(this.removeCloneNode(e),!i)return;this.clones[e].cssText=i,this.clones[e].loaded=!0;const n=document.querySelector(`link[${Le}="source-${this.clones[e].cloneNodeAttrId}"]`);n?(n.setAttribute("data-rrweb-mutation",Date.now().toString()),n.removeAttribute(Le)):(this.clones[e].original.setAttribute("data-rrweb-mutation",Date.now().toString()),this.clones[e].original.removeAttribute(Le)),window.dispatchEvent(new CustomEvent("__rrweb_custom_event__",{detail:{type:5,timestamp:Date.now(),data:{tag:"async-css-resolution",requestCssId:this.clones[e].requestCssId,cssText:this.clones[e].cssText}}}))}onLoadError(e){!(e in this.clones)||this.clones[e]===void 0||this.removeCloneNode(e)}removeAllCloneElements(){for(const e of Object.keys(this.clones))this.removeCloneNode(e)}onCleanTimeout(){lt.cleanTimeout=null,lt.removeAllCloneElements()}blowCache(){this.removeAllCloneElements(),this.clones={}}requestClone({forElement:e,requestCssId:t}){if(!cn())return;this.currentHref!=null&&document.location.href!==this.currentHref&&this.blowCache(),this.currentHref=document.location.href;const r=e.href;if(!r||r in this.clones&&this.clones[r]!==void 0||e.getAttribute("crossorigin")==="anonymous")return;if(e.rel!=="stylesheet"){const o=r.split("/").pop();if(o&&o.includes(".")){const[l]=o.split("?"),a=l.split(".").pop();if(a&&sl.includes(a.trim().toLowerCase()))return}}const i=e.cloneNode(),n=Math.random().toString(36).slice(2);i.setAttribute("crossorigin","anonymous"),i.setAttribute(Le,n),e.setAttribute(Le,`source-${n}`),document.head.appendChild(i),this.clones[r]={original:e,clone:i,loaded:!1,cssText:null,cloneNodeAttrId:n,requestCssId:t},i.onload=()=>{this.onLoad(r)},i.onerror=()=>{this.onLoadError(r)},this.cleanTimeout&&clearTimeout(this.cleanTimeout),this.cleanTimeout=setTimeout(lt.onCleanTimeout,rl)}getClonedCssTextIfAvailable(e){return e in this.clones&&this.clones[e]!==void 0&&this.clones[e].loaded===!0?this.clones[e].cssText:null}};je(gn,"instance");let il=gn;const lt=new il,nl=({attributes:s,doc:e,n:t})=>{const r=Array.from(e.styleSheets);let i=null;for(let o=0;o<r.length;o++)if(r[o].href===t.href){i=r[o];break}let n=null;if(i&&(n=Cr(i)),n||(n=lt.getClonedCssTextIfAvailable(t.href)),n)delete s.rel,delete s.href,s._cssText=n;else{const o=`css-request-${Math.random().toString(36).slice(2)}`;lt.requestClone({forElement:t,requestCssId:o}),s._requestCssId=o}return s},ol=({attributes:s,n:e})=>{let t=Cr(e.sheet);return t&&(e.childNodes.length>1&&(t=tl(t,e)),s._cssText=t),s},al=({attributes:s,n:e,tagName:t,maskInputOptions:r,maskInputFn:i})=>{const n=e.value,o=e.checked;return s.type!=="radio"&&s.type!=="checkbox"&&s.type!=="submit"&&s.type!=="button"&&n?s.value=or({element:e,type:ar(e),tagName:t,value:n,maskInputOptions:r,maskInputFn:i}):o&&(s.checked=o),s},ll=({attributes:s,n:e,maskInputOptions:t})=>(e.selected&&!t.select?s.selected=!0:delete s.selected,s),ul=s=>{"requestIdleCallback"in window?window.requestIdleCallback(s):setTimeout(s,100)},cl=({attributes:s,n:e,dataURLOptions:t,doc:r})=>{let i="getContext"in e?e.getContext("2d"):null;if(i!=null)Za(e,i)||(s.rr_dataURL=e.toDataURL(t.type,t.quality));else if(e.width!==0&&e.height!==0){const n=e.toDataURL(t.type,t.quality);s.rr_dataURL=n,ul(()=>{try{const o=r.createElement("canvas");o.width=e.width,o.height=e.height;const l=o.toDataURL(t.type,t.quality);n===l&&delete s.rr_dataURL}catch(o){}})}return s},hl=({attributes:s,n:e,canvasService:t,canvasCtx:r,dataURLOptions:i,doc:n})=>{t||(t=n.createElement("canvas"),r=t.getContext("2d"));const o=e;let l=null,a=0;const c=(o.currentSrc||o.getAttribute("src")||"<unknown-src>")+"",u=o.naturalHeight,h=o.naturalWidth,f=()=>{l=null},d=()=>{if(a++,!(a>3)){(l!=null?l:o).removeEventListener("error",g);try{t.width=h,t.height=u,r.drawImage(o,0,0),s.rr_dataURL=t.toDataURL(i.type,i.quality)}catch(m){if(o.crossOrigin!=="anonymous"){if(cn()){l=new Image,l.src=c,l.crossOrigin="anonymous",l.height=u,l.width=h,l.complete&&l.naturalWidth!==0?d():(l.addEventListener("load",d,{once:!0}),l.addEventListener("error",g,{once:!0}));return}}else hn()&&console.warn(`Cannot inline img src=${c}! Error: ${m}`)}f()}},g=()=>{(l!=null?l:o).removeEventListener("load",d),f()};return o.complete&&o.naturalWidth!==0?d():(o.addEventListener("load",d,{once:!0}),o.addEventListener("error",g,{once:!0})),s},fl=({attributes:s,n:e})=>{const t=s;return t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume,s};let pl=1;const dl=new RegExp("[^a-z0-9-_:]"),ht=-2;function yn(){return pl++}function ml(s){if(s instanceof HTMLFormElement)return"form";const e=$e(s.tagName);return dl.test(e)?"div":e}let gl=null,yl=null;const wl=/^[^ \t\n\r\u000c]+/,bl=/^[, \t\n\r\u000c]+/;function Sl(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o;const l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}const i=[];for(;r(bl),!(t>=e.length);){let n=r(wl);if(n.slice(-1)===",")n=Ue(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=Ue(s,n);let l=!1;for(;;){const a=e.charAt(t);if(a===""){i.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,i.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return i.join(", ")}const ci=new WeakMap;function Ue(s,e){return!e||e.trim()===""?e:Ns(s,e)}function Cl(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Ns(s,e){let t=ci.get(s);if(t||(t=s.createElement("a"),ci.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function wn(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?Ue(s,r):t==="srcset"?Sl(s,r):t==="style"?lr(r,Ns(s)):e==="object"&&t==="data"?Ue(s,r):r)}function bn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function vl(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function ur(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?ur(Y.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?ur(Y.parentNode(s),e,t):!1}function Sn(s,e,t,r){let i;if(fn(s)){if(i=s,!Y.childNodes(i).length)return!1}else{if(Y.parentElement(s)===null)return!1;i=Y.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(ur(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function Il(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(l){return}if(n!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function xl(s,e,t){let r=!1,i;try{i=s.sheet}catch(o){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function Al(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m=!1,cssCaptured:p=!1}=e,w=Ol(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:H.Document,childNodes:[],compatMode:s.compatMode}:{type:H.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:H.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:w};case s.ELEMENT_NODE:return Ml(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:u,dataURLOptions:h,inlineImages:f,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m,rootId:w});case s.TEXT_NODE:return Rl(s,{doc:t,needsMask:o,maskTextFn:c,rootId:w,cssCaptured:p});case s.CDATA_SECTION_NODE:return{type:H.CDATA,textContent:"",rootId:w};case s.COMMENT_NODE:return{type:H.Comment,textContent:Y.textContent(s)||"",rootId:w};default:return!1}}function Ol(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Rl(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=Y.parentNode(s),l=o&&o.tagName;let a="";const c=l==="STYLE"?!0:void 0,u=l==="SCRIPT"?!0:void 0;return u?a="SCRIPT_PLACEHOLDER":n||(a=Y.textContent(s),c&&a&&(a=lr(a,Ns(e.doc)))),!c&&!u&&a&&t&&(a=r?r(a,Y.parentElement(s)):a.replace(/[\S]/g,"*")),{type:H.Text,textContent:a||"",rootId:i}}function Ml(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:d}=e,g=vl(s,r,i),m=ml(s);let p={};const w=s.attributes.length;for(let S=0;S<w;S++){const M=s.attributes[S];bn(m,M.name,M.value)||(p[M.name]=wn(t,m,$e(M.name),M.value))}switch(m){case"link":n&&(p=nl({doc:t,attributes:p,n:s}));break;case"style":s.sheet&&(p=ol({attributes:p,n:s}));break;case"input":case"textarea":case"select":p=al({attributes:p,n:s,tagName:m,maskInputOptions:o,maskInputFn:l});break;case"option":p=ll({attributes:p,n:s,maskInputOptions:o});break;case"dialog":s.open&&(p.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal");break;case"canvas":u&&(p=cl({attributes:p,n:s,dataURLOptions:a,doc:t}));case"img":c&&(p=hl({attributes:p,n:s,canvasService:gl,canvasCtx:yl,dataURLOptions:a,doc:t}));break;case"audio":case"video":p=fl({attributes:p,n:s});break}if(f||(s.scrollLeft&&(p.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(p.rr_scrollTop=s.scrollTop)),g){const{width:S,height:M}=s.getBoundingClientRect();p={class:p.class,rr_width:`${S}px`,rr_height:`${M}px`}}m==="iframe"&&!h(p.src)&&(s.contentDocument||(p.rr_src=p.src),delete p.src);let b;try{customElements.get(m)&&(b=!0)}catch(S){}return{type:H.Element,tagName:m,attributes:p,childNodes:[],isSVG:Cl(s)||void 0,needBlock:g,rootId:d,isCustom:b}}function _(s){return s==null?"":s.toLowerCase()}function El(s,e){if(e.comment&&s.type===H.Comment)return!0;if(s.type===H.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&mn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(_(s.attributes.name).match(/^msapplication-tile(image|color)$/)||_(s.attributes.name)==="application-name"||_(s.attributes.rel)==="icon"||_(s.attributes.rel)==="apple-touch-icon"||_(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&_(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(_(s.attributes.property).match(/^(og|twitter|fb):/)||_(s.attributes.name).match(/^(og|twitter):/)||_(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(_(s.attributes.name)==="robots"||_(s.attributes.name)==="googlebot"||_(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(_(s.attributes.name)==="author"||_(s.attributes.name)==="generator"||_(s.attributes.name)==="framework"||_(s.attributes.name)==="publisher"||_(s.attributes.name)==="progid"||_(s.attributes.property).match(/^article:/)||_(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(_(s.attributes.name)==="google-site-verification"||_(s.attributes.name)==="yandex-verification"||_(s.attributes.name)==="csrf-token"||_(s.attributes.name)==="p:domain_verify"||_(s.attributes.name)==="verify-v1"||_(s.attributes.name)==="verification"||_(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}const Se={index:0,store:{}};function ze(s,e){const t=Date.now(),{doc:r,mirror:i,blockClass:n,blockSelector:o,maskTextClass:l,maskTextSelector:a,skipChild:c=!1,inlineStylesheet:u=!0,maskInputOptions:h={},maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:w=!1,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:M=5e3,onStylesheetLoad:F,stylesheetLoadTimeout:j=5e3,keepIframeSrcFn:G=()=>!1,newlyAddedElement:P=!1,cssCaptured:X=!1}=e;let{needsMask:V}=e,{preserveWhiteSpace:q=!0}=e;V||(V=Sn(s,l,a,V===void 0));const le=Al(s,{doc:r,mirror:i,blockClass:n,blockSelector:o,needsMask:V,inlineStylesheet:u,maskInputOptions:h,maskTextFn:f,maskInputFn:d,dataURLOptions:m,inlineImages:p,recordCanvas:w,keepIframeSrcFn:G,newlyAddedElement:P,cssCaptured:X});if(!le)return hn()&&console.warn(s,"not serialized"),null;let he;i.hasNode(s)?he=i.getId(s):El(le,g)||!q&&le.type===H.Text&&!le.textContent.replace(/^\s+|\s+$/gm,"").length?he=ht:he=yn();const E=Object.assign(le,{id:he});if(i.add(s,E),he===ht)return null;b&&b(s);let qe=!c;if(E.type===H.Element){qe=qe&&!E.needBlock,delete E.needBlock;const z=Y.shadowRoot(s);z&&at(z)&&(E.isShadowHost=!0)}if((E.type===H.Document||E.type===H.Element)&&qe){g.headWhitespace&&E.type===H.Element&&E.tagName==="head"&&(q=!1);const z={doc:r,mirror:i,blockClass:n,blockSelector:o,needsMask:V,maskTextClass:l,maskTextSelector:a,skipChild:c,inlineStylesheet:u,maskInputOptions:h,maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:w,preserveWhiteSpace:q,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:M,onStylesheetLoad:F,stylesheetLoadTimeout:j,keepIframeSrcFn:G,cssCaptured:!1};if(!(E.type===H.Element&&E.tagName==="textarea"&&E.attributes.value!==void 0)){E.type===H.Element&&E.attributes._cssText!==void 0&&typeof E.attributes._cssText=="string"&&(z.cssCaptured=!0);for(const ee of Array.from(Y.childNodes(s))){const te=ze(ee,z);te&&E.childNodes.push(te)}}let Q=null;if(fn(s)&&(Q=Y.shadowRoot(s))){const ee=Y.childNodes(Q);for(let te=0;te<ee.length;te++){const Te=ee[te],be=ze(Te,z);be&&(at(Q)&&(be.isShadow=!0),E.childNodes.push(be))}}}const we=Y.parentNode(s);we&&ot(we)&&at(we)&&(E.isShadow=!0),E.type===H.Element&&E.tagName==="iframe"&&Il(s,()=>{const z=s.contentDocument;if(z&&S){const Q=ze(z,{doc:z,mirror:i,blockClass:n,blockSelector:o,needsMask:V,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:w,preserveWhiteSpace:q,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:M,onStylesheetLoad:F,stylesheetLoadTimeout:j,keepIframeSrcFn:G});Q&&S(s,Q)}},M),E.type===H.Element&&E.tagName==="link"&&typeof E.attributes.rel=="string"&&(E.attributes.rel==="stylesheet"||E.attributes.rel==="preload"&&typeof E.attributes.href=="string"&&mn(E.attributes.href)==="css")&&xl(s,()=>{if(F){const z=ze(s,{doc:r,mirror:i,blockClass:n,blockSelector:o,needsMask:V,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:w,preserveWhiteSpace:q,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:M,onStylesheetLoad:F,stylesheetLoadTimeout:j,keepIframeSrcFn:G});z&&F(s,z)}},j),Se.index++;const Ae=Date.now()-t;if(s.nodeName in Se.store||(Se.store[s.nodeName]=[]),Se.store[s.nodeName].push(Ae),Se.index%5e3===0){Se.index=0;const z=Object.entries(Se.store).map(([Q,ee])=>({tagName:Q,avg:ee.reduce((te,Te)=>te+Te,0)/ee.length,max:Math.max(...ee),min:Math.min(...ee)}));console.log("last 5000 avgs"),console.table(z),Se.store={}}return E}function $l(s,e){const{mirror:t=new dn,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:h,maskInputFn:f,slimDOM:d=!1,dataURLOptions:g,preserveWhiteSpace:m,onSerialize:p,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:M,keepIframeSrcFn:F=()=>!1}=e||{};return ze(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:u===!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}:u===!1?{password:!0}:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:d==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:d===!1?{}:d,dataURLOptions:g,inlineImages:a,recordCanvas:c,preserveWhiteSpace:m,onSerialize:p,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:M,keepIframeSrcFn:F,newlyAddedElement:!1})}function Nl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function kl(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var ks={exports:{}},C=String,Cn=function(){return{isColorSupported:!1,reset:C,bold:C,dim:C,italic:C,underline:C,inverse:C,hidden:C,strikethrough:C,black:C,red:C,green:C,yellow:C,blue:C,magenta:C,cyan:C,white:C,gray:C,bgBlack:C,bgRed:C,bgGreen:C,bgYellow:C,bgBlue:C,bgMagenta:C,bgCyan:C,bgWhite:C,blackBright:C,redBright:C,greenBright:C,yellowBright:C,blueBright:C,magentaBright:C,cyanBright:C,whiteBright:C,bgBlackBright:C,bgRedBright:C,bgGreenBright:C,bgYellowBright:C,bgBlueBright:C,bgMagentaBright:C,bgCyanBright:C,bgWhiteBright:C}};ks.exports=Cn();ks.exports.createColors=Cn;var _l=ks.exports;const Tl={},Pl=Object.freeze(Object.defineProperty({__proto__:null,default:Tl},Symbol.toStringTag,{value:"Module"})),oe=kl(Pl);let hi=_l,fi=oe,Xr=class vn extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,vn)}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=hi.isColorSupported);let r=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:f}=hi.createColors(!0);i=d=>u(f(d)),r=d=>h(d),fi&&(n=d=>fi(d))}let o=t.split(/\r?\n/),l=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;return o.slice(l,a).map((u,h)=>{let f=l+1+h,d=" "+(" "+f).slice(-c)+" | ";if(f===this.line){if(u.length>160){let m=20,p=Math.max(0,this.column-m),w=Math.max(this.column+m,this.endColumn+m),b=u.slice(p,w),S=r(d.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,m-1)).replace(/[^\t]/g," ");return i(">")+r(d)+n(b)+`
3
3
  `+S+i("^")}let g=r(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(d)+n(u)+`
4
4
  `+g+i("^")}return" "+r(d)+n(u)}).join(`
5
5
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
@@ -55,7 +55,7 @@ https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.p
55
55
  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:
56
56
  https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Ks().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return k([i(a)]).process(o,l)},i};k.stringify=xf;k.parse=vf;k.fromJSON=yf;k.list=Sf;k.comment=s=>new Do(s);k.atRule=s=>new Lo(s);k.decl=s=>new Fo(s);k.rule=s=>new zo(s);k.root=s=>new Uo(s);k.document=s=>new Bo(s);k.CssSyntaxError=gf;k.Declaration=Fo;k.Container=mf;k.Processor=Ks;k.Document=Bo;k.Comment=Do;k.Warning=Af;k.AtRule=Lo;k.Result=If;k.Input=wf;k.Rule=zo;k.Root=Uo;k.Node=Cf;bf.registerPostcss(k);var Of=k;k.default=k;const D=Fc(Of);D.stringify;D.fromJSON;D.plugin;D.parse;D.list;D.document;D.comment;D.atRule;D.rule;D.decl;D.root;D.CssSyntaxError;D.Declaration;D.Container;D.Processor;D.Document;D.Comment;D.Warning;D.AtRule;D.Result;D.Input;D.Rule;D.Root;D.Node;class qs{constructor(...e){se(this,"parentElement",null),se(this,"parentNode",null),se(this,"ownerDocument"),se(this,"firstChild",null),se(this,"lastChild",null),se(this,"previousSibling",null),se(this,"nextSibling",null),se(this,"ELEMENT_NODE",1),se(this,"TEXT_NODE",3),se(this,"nodeType"),se(this,"nodeName"),se(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 qs){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"}}function Z(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const Be=`Please stop import mirror directly. Instead of that,\r
57
57
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
58
- or you can use record.mirror to access the mirror instance during recording.`;let Hi={map:{},getId(){return console.error(Be),-1},getNode(){return console.error(Be),null},removeNodeFromMap(){console.error(Be)},has(){return console.error(Be),!1},reset(){console.error(Be)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Hi=new Proxy(Hi,{get(s,e,t){return e==="map"&&console.error(Be),Reflect.get(s,e,t)}}));function St(s,e,t={}){let r=null,i=0;return function(...n){const o=Date.now();!i&&t.leading===!1&&(i=o);const l=e-(o-i),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(a,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(a,n)},l))}}function kr(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>kr(s,e,n||{},!0)}let wr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(wr=()=>new Date().getTime());function Wo(s){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=I.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=I.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function jo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Go(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Vo(s){return s?s.nodeType===s.ELEMENT_NODE?s:I.parentElement(s):null}function J(s,e,t,r){if(!s)return!1;const i=Vo(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(ur(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Rf(s,e){return e.getId(s)!==-1}function Zr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===ht}function Ho(s,e){if(ot(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=I.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Ho(r,e):!0}function Os(s){return!!s.changedTouches}function Mf(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Yo(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Zo(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Rs(s){return s?s instanceof qs&&"shadowRoot"in s?!!s.shadowRoot:!!I.shadowRoot(s):!1}class Ef{constructor(){y(this,"id",1),y(this,"styleIDMap",new WeakMap),y(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 Jo(s){var e;let t=null;return"getRootNode"in s&&((e=I.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&I.host(I.getRootNode(s))&&(t=I.host(I.getRootNode(s))),t}function $f(s){let e=s,t;for(;t=Jo(e);)e=t;return e}function Nf(s){const e=s.ownerDocument;if(!e)return!1;const t=$f(s);return I.contains(e,t)}function Xo(s){const e=s.ownerDocument;return e?I.contains(e,s)||Nf(s):!1}let ut;function kf(s){ut=s}function _f(){ut=void 0}const O=s=>ut?(...t)=>{try{return s(...t)}catch(r){if(ut&&ut(r)===!0)return;throw r}}:s;class Yi{constructor(e){y(this,"iframeIdToRemoteIdMap",new WeakMap),y(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Tf{constructor(e){y(this,"iframes",new WeakMap),y(this,"crossOriginIframeMap",new WeakMap),y(this,"crossOriginIframeMirror",new Yi(yn)),y(this,"crossOriginIframeStyleMirror"),y(this,"crossOriginIframeRootIdMap",new WeakMap),y(this,"mirror"),y(this,"mutationCb"),y(this,"wrappedEmit"),y(this,"loadListener"),y(this,"stylesheetManager"),y(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Yi(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case R.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:R.IncrementalSnapshot,data:{source:x.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case R.Meta:case R.Load:case R.DomContentLoaded:return!1;case R.Plugin:return t;case R.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case R.IncrementalSnapshot:switch(t.data.source){case x.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.Drag:case x.TouchMove:case x.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.ViewportResize:return!1;case x.MediaInteraction:case x.MouseInteraction:case x.Scroll:case x.CanvasMutation:case x.Input:return this.replaceIds(t.data,e,["id"]),t;case x.StyleSheetRule:case x.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case x.Font:return t;case x.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case x.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==on.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}const Ge=()=>"_rrweb_is_debug"in window&&window._rrweb_is_debug?window._rrweb_is_debug:!1,br=(...s)=>{Ge()&&console.log("[recapt:rrweb]",...s)},Ko=class ir{constructor(){if(y(this,"lastFullSnapshot",-1),y(this,"intervalBetweenSnapshots",150),y(this,"debounceTimeout",null),y(this,"debounceTime",10),ir.instance)return ir.instance;ir.instance=this}requestFullSnapshot(){this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(()=>{this.debounceTimeout=null,this.takeSnapshot()},this.debounceTime)}takeSnapshot(){if(Date.now()-this.lastFullSnapshot<this.intervalBetweenSnapshots){br("StormSnapshotManager, takeSnapshot: too soon");return}br("StormSnapshotManager, takeSnapshot: taking full snapshot"),pp(),this.lastFullSnapshot=Date.now()}};y(Ko,"instance");let Pf=Ko;const Lf=new Pf;function Zi(s){return"__ln"in s}class Df{constructor(){y(this,"length",0),y(this,"head",null),y(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&&Zi(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&&Zi(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 Ji=(s,e)=>`${s}@${e}`,Xi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function Ff(s=8){let e="";for(let t=0;t<s;t++)e+=Xi.charAt(Math.floor(Math.random()*Xi.length));return e}class Bf{constructor(){y(this,"frozen",!1),y(this,"locked",!1),y(this,"texts",[]),y(this,"attributes",[]),y(this,"attributeMap",new WeakMap),y(this,"removes",[]),y(this,"mapRemoves",[]),y(this,"movedMap",{}),y(this,"addedSet",new Set),y(this,"movedSet",new Set),y(this,"droppedSet",new Set),y(this,"removesSubTreeCache",new Set),y(this,"mutationCb"),y(this,"blockClass"),y(this,"blockSelector"),y(this,"maskTextClass"),y(this,"maskTextSelector"),y(this,"inlineStylesheet"),y(this,"maskInputOptions"),y(this,"maskTextFn"),y(this,"maskInputFn"),y(this,"keepIframeSrcFn"),y(this,"recordCanvas"),y(this,"inlineImages"),y(this,"slimDOMOptions"),y(this,"dataURLOptions"),y(this,"doc"),y(this,"mirror"),y(this,"iframeManager"),y(this,"stylesheetManager"),y(this,"shadowDomManager"),y(this,"canvasManager"),y(this,"processedNodeManager"),y(this,"unattachedDoc"),y(this,"bufId",Ge()?Ff():""),y(this,"stormBatches",[]),y(this,"stormInfo",null),y(this,"stormSettings",{batchSize:150,timeout:30,mutationLimit:800}),y(this,"handleStormMutations",e=>{const t=Date.now();this.stormInfo==null&&(br("detected probable mutation storm start","buffer id:",this.bufId),this.stormInfo={startedAt:t,totalMutations:0,timeout:setTimeout(this.handleStormFinish,this.stormSettings.timeout),stormExceededLimit:!1}),this.stormInfo.totalMutations+=e.length,this.stormInfo.totalMutations>=this.stormSettings.mutationLimit?(this.stormInfo.stormExceededLimit=!0,this.stormBatches=[]):this.stormBatches.push({ts:t,mutations:e}),clearTimeout(this.stormInfo.timeout),e.length<this.stormSettings.batchSize?this.handleStormFinish():this.stormInfo.timeout=setTimeout(this.handleStormFinish,this.stormSettings.timeout)}),y(this,"handleStormFinish",()=>{if(!this.stormInfo)return;const{stormExceededLimit:e}=this.stormInfo;if(br("mutation storm finished","totalMutations:",this.stormInfo.totalMutations,"stormExceededLimit:",e,"storm duration:",Date.now()-this.stormInfo.startedAt,"ms","buffer id:",this.bufId),clearTimeout(this.stormInfo.timeout),this.stormInfo=null,e)this.stormBatches=[],Lf.requestFullSnapshot();else{let t=[];for(const r of this.stormBatches)t.push(...r.mutations);this.stormBatches=[],this.processInternalMutations(t,!0)}}),y(this,"processInternalMutations",(e,t=!1)=>{if(!t&&(this.stormInfo!=null||e.length>=this.stormSettings.batchSize)){this.handleStormMutations(e);return}for(const r of e)this.processMutation(r);this.emit()}),y(this,"processMutations",e=>{this.processInternalMutations(e)}),y(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Df,i=u=>{let h=u,f=ht;for(;f===ht;)h=h&&h.nextSibling,f=h&&this.mirror.getId(h);return f},n=u=>{const h=I.parentNode(u);if(!h||!Xo(u))return;let f=!1;if(u.nodeType===Node.TEXT_NODE){const p=h.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(h)&&(f=!0)}const d=ot(h)?this.mirror.getId(Jo(u)):this.mirror.getId(h),g=i(u);if(d===-1||g===-1)return r.addNode(u);const m=ze(u,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{Yo(p,this.mirror)&&this.iframeManager.addIframe(p),Zo(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Rs(u)&&this.shadowDomManager.addShadowRoot(I.shadowRoot(u),this.doc)},onIframeLoad:(p,w)=>{this.iframeManager.attachIframe(p,w),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,w)=>{this.stylesheetManager.attachLinkElement(p,w)},cssCaptured:f});m&&(e.push({parentId:d,nextId:g,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)Ki(this.removesSubTreeCache,u,this.mirror)&&!this.movedSet.has(I.parentNode(u))||n(u);for(const u of this.addedSet)!qi(this.droppedSet,u)&&!Ki(this.removesSubTreeCache,u,this.mirror)||qi(this.movedSet,u)?n(u):this.droppedSet.add(u);let o=null;for(;r.length;){let u=null;if(o){const h=this.mirror.getId(I.parentNode(o.value)),f=i(o.value);h!==-1&&f!==-1&&(u=o)}if(!u){let h=r.tail;for(;h;){const f=h;if(h=h.previous,f){const d=this.mirror.getId(I.parentNode(f.value));if(i(f.value)===-1)continue;if(d!==-1){u=f;break}else{const m=f.value,p=I.parentNode(m);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const w=I.host(p);if(this.mirror.getId(w)!==-1){u=f;break}}}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}o=u.previous,r.removeNode(u.value),n(u.value)}const l=[];for(const u of this.texts){const h=u.node,f=I.parentNode(h);f&&f.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(f);const d=this.mirror.getId(h);!t.has(d)&&this.mirror.has(d)&&l.push({id:d,value:u.value})}const a=[];for(const u of this.attributes){const{attributes:h}=u;if(typeof h.style=="string"){const d=JSON.stringify(u.styleDiff),g=JSON.stringify(u._unchangedStyles);d.length<h.style.length&&(d+g).split("var(").length===h.style.split("var(").length&&(h.style=u.styleDiff)}const f=this.mirror.getId(u.node);!t.has(f)&&this.mirror.has(f)&&a.push({id:f,attributes:h})}const c={texts:l,attributes:a,removes:this.removes,adds:e};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.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(c))}),y(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(I.childNodes(e),i=>I.textContent(i)||"").join("");t.attributes.value=or({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:ar(e),value:r,maskInputFn:this.maskInputFn})}),y(this,"processMutation",e=>{if(!Zr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=I.textContent(e.target);!J(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Sn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Vo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){const o=ar(t);i=or({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(J(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!bn(t.tagName,r))if(n.attributes[r]=wn(this.doc,$e(t.tagName),$e(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(l){this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(const l of Array.from(t.style)){const a=t.style.getPropertyValue(l),c=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||c!==o.style.getPropertyPriority(l)?c===""?n.styleDiff[l]=a:n.styleDiff[l]=[a,c]:n._unchangedStyles[l]=[a,c]}for(const l of Array.from(o.style))t.style.getPropertyValue(l)===""&&(n.styleDiff[l]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(J(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}for(let o=0;o<e.addedNodes.length;o++)this.genAdds(e.addedNodes[o],e.target);const t=ot(e.target)?this.mirror.getId(I.host(e.target)):this.mirror.getId(e.target);if(J(e.target,this.blockClass,this.blockSelector,!1))return;const r=this.addedSet.has(e.target),i=Ho(e.target,this.mirror),n=ot(e.target)&&at(e.target)?!0:void 0;for(let o=0;o<e.removedNodes.length;o++){const l=e.removedNodes[o],a=this.mirror.getId(l);if(Zr(l,this.mirror,this.slimDOMOptions)||!Rf(l,this.mirror))return;this.addedSet.has(l)?(Ms(this.addedSet,l),this.droppedSet.add(l)):r&&a===-1||i||(this.movedSet.has(l)&&this.movedMap[Ji(a,t)]?Ms(this.movedSet,l):(this.removes.push({parentId:t,id:a,isShadow:n}),Uf(l,this.removesSubTreeCache))),this.mapRemoves.push(l)}break}}}),y(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Zr(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[Ji(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);if(!J(e,this.blockClass,this.blockSelector,!1)){const r=I.childNodes(e);for(let i=0;i<r.length;i++)this.genAdds(r[i]);if(Rs(e)){const i=I.childNodes(I.shadowRoot(e));for(let n=0;n<i.length;n++){const o=i[n];this.processedNodeManager.add(o,this),this.genAdds(o,e)}}}}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Ms(s,e){s.delete(e);const t=I.childNodes(e);for(let r=0;r<t.length;r++)Ms(s,t[r])}function Uf(s,e){const t=[s];for(;t.length;){const r=t.pop();if(e.has(r))continue;e.add(r);const i=I.childNodes(r);for(let n=0;n<i.length;n++)t.push(i[n])}}function Ki(s,e,t){return s.size===0?!1:zf(s,e)}function zf(s,e,t){const r=I.parentNode(e);return r?s.has(r):!1}function qi(s,e){return s.size===0?!1:qo(s,e)}function qo(s,e){const t=I.parentNode(e);return t?s.has(t)?!0:qo(s,t):!1}const Ee=[];function At(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function Qo(s,e){const t=new Bf;Ee.push(t),t.init(s);const r=new(ln())(O(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Wf({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],l;const a=St(O(h=>{const f=Date.now()-l;s(o.map(d=>(d.timeOffset-=f,d)),h),o=[],l=null}),n),c=O(St(O(h=>{const f=At(h),{clientX:d,clientY:g}=Os(h)?h.changedTouches[0]:h;l||(l=wr()),o.push({x:d,y:g,id:r.getId(f),timeOffset:wr()-l}),a(typeof DragEvent!="undefined"&&h instanceof DragEvent?x.Drag:h instanceof MouseEvent?x.MouseMove:x.TouchMove)}),i,{trailing:!1})),u=[Z("mousemove",c,t),Z("touchmove",c,t),Z("drag",c,t)];return O(()=>{u.forEach(h=>h())})}function jf({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};const o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let a=null;const c=u=>h=>{const f=At(h);if(J(f,r,i,!0))return;let d=null,g=u;if("pointerType"in h){switch(h.pointerType){case"mouse":d=me.Mouse;break;case"touch":d=me.Touch;break;case"pen":d=me.Pen;break}d===me.Touch?K[u]===K.MouseDown?g="TouchStart":K[u]===K.MouseUp&&(g="TouchEnd"):me.Pen}else Os(h)&&(d=me.Touch);d!==null?(a=d,(g.startsWith("Touch")&&d===me.Touch||g.startsWith("Mouse")&&d===me.Mouse)&&(d=null)):K[u]===K.Click&&(d=a,a=null);const m=Os(h)?h.changedTouches[0]:h;if(!m)return;const p=t.getId(f),{clientX:w,clientY:b}=m;O(s)(A({type:K[g],id:p,x:w,y:b},d!==null&&{pointerType:d}))};return Object.keys(K).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&o[u]!==!1).forEach(u=>{let h=$e(u);const f=c(u);if(window.PointerEvent)switch(K[u]){case K.MouseDown:case K.MouseUp:h=h.replace("mouse","pointer");break;case K.TouchStart:case K.TouchEnd:return}l.push(Z(h,f,e))}),O(()=>{l.forEach(u=>u())})}function ea({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const o=O(St(O(l=>{const a=At(l);if(!a||J(a,r,i,!0))return;const c=t.getId(a);if(a===e&&e.defaultView){const u=Wo(e.defaultView);s({id:c,x:u.left,y:u.top})}else s({id:c,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return Z("scroll",o,e)}function Gf({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=O(St(O(()=>{const n=jo(),o=Go();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return Z("resize",i,e)}const Vf=["INPUT","TEXTAREA","SELECT"],Qi=new WeakMap;function Hf({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:c,userTriggeredOnInput:u}){function h(b){let S=At(b);const M=b.isTrusted,F=S&&S.tagName;if(S&&F==="OPTION"&&(S=I.parentElement(S)),!S||!F||Vf.indexOf(F)<0||J(S,r,i,!0)||S.classList.contains(n)||o&&S.matches(o))return;let j=S.value,G=!1;const P=ar(S)||"";P==="radio"||P==="checkbox"?G=S.checked:(l[F.toLowerCase()]||l[P])&&(j=or({element:S,maskInputOptions:l,tagName:F,type:P,value:j,maskInputFn:a})),f(S,u?{text:j,isChecked:G,userTriggered:M}:{text:j,isChecked:G});const X=S.name;P==="radio"&&X&&G&&e.querySelectorAll(`input[type="radio"][name="${X}"]`).forEach(V=>{if(V!==S){const q=V.value;f(V,u?{text:q,isChecked:!G,userTriggered:!1}:{text:q,isChecked:!G})}})}function f(b,S){const M=Qi.get(b);if(!M||M.text!==S.text||M.isChecked!==S.isChecked){Qi.set(b,S);const F=t.getId(b);O(s)(re(A({},S),{id:F}))}}const g=(c.input==="last"?["change"]:["input","change"]).map(b=>Z(b,O(h),e)),m=e.defaultView;if(!m)return()=>{g.forEach(b=>b())};const p=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),w=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return p&&p.set&&g.push(...w.map(b=>kr(b[0],b[1],{set(){O(h)({target:this,isTrusted:!1})}},!1,m))),O(()=>{g.forEach(b=>b())})}function Sr(s){const e=[];function t(r,i){if(Zt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Zt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Zt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Zt("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function Ce(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Yf({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:O((u,h,f)=>{const[d,g]=f,{id:m,styleId:p}=Ce(h,e,t.styleMirror);return(m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,adds:[{rule:d,index:g}]}),u.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(u,h,f=this.cssRules.length){const d=`${u} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[d,f])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:O((u,h,f)=>{const[d]=f,{id:g,styleId:m}=Ce(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,removes:[{index:d}]}),u.apply(h,f)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:O((u,h,f)=>{const[d]=f,{id:g,styleId:m}=Ce(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replace:d}),u.apply(h,f)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:O((u,h,f)=>{const[d]=f,{id:g,styleId:m}=Ce(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replaceSync:d}),u.apply(h,f)})}));const a={};Jt("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Jt("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Jt("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Jt("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(a).forEach(([u,h])=>{c[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(c[u].insertRule,{apply:O((f,d,g)=>{const[m,p]=g,{id:w,styleId:b}=Ce(d.parentStyleSheet,e,t.styleMirror);return(w&&w!==-1||b&&b!==-1)&&s({id:w,styleId:b,adds:[{rule:m,index:[...Sr(d),p||0]}]}),f.apply(d,g)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:O((f,d,g)=>{const[m]=g,{id:p,styleId:w}=Ce(d.parentStyleSheet,e,t.styleMirror);return(p&&p!==-1||w&&w!==-1)&&s({id:p,styleId:w,removes:[{index:[...Sr(d),m]}]}),f.apply(d,g)})})}),O(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([u,h])=>{h.prototype.insertRule=c[u].insertRule,h.prototype.deleteRule=c[u].deleteRule})})}function ta({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(I.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var c;return(c=a.get)==null?void 0:c.call(this)},set(c){var u;const h=(u=a.set)==null?void 0:u.call(this,c);if(o!==null&&o!==-1)try{e.adoptStyleSheets(c,o)}catch(f){}return h}}),O(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Zf({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:O((l,a,c)=>{var u;const[h,f,d]=c;if(t.has(h))return n.apply(a,[h,f,d]);const{id:g,styleId:m}=Ce((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,set:{property:h,value:f,priority:d},index:Sr(a.parentRule)}),l.apply(a,c)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:O((l,a,c)=>{var u;const[h]=c;if(t.has(h))return o.apply(a,[h]);const{id:f,styleId:d}=Ce((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||d&&d!==-1)&&s({id:f,styleId:d,remove:{property:h},index:Sr(a.parentRule)}),l.apply(a,c)})}),O(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Jf({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const o=O(a=>St(O(c=>{const u=At(c);if(!u||J(u,e,t,!0))return;const{currentTime:h,volume:f,muted:d,playbackRate:g,loop:m}=u;s({type:a,id:r.getId(u),currentTime:h,volume:f,muted:d,playbackRate:g,loop:m})}),i.media||500)),l=[Z("play",o(Fe.Play),n),Z("pause",o(Fe.Pause),n),Z("seeked",o(Fe.Seeked),n),Z("volumechange",o(Fe.VolumeChange),n),Z("ratechange",o(Fe.RateChange),n)];return O(()=>{l.forEach(a=>a())})}function Xf({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(a,c,u){const h=new n(a,c,u);return i.set(h,{family:a,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),h};const o=Ne(e.fonts,"add",function(l){return function(a){return setTimeout(O(()=>{const c=i.get(a);c&&(s(c),i.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=n}),r.push(o),O(()=>{r.forEach(l=>l())})}function Kf(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let o=!0;const l=O(()=>{const a=e.getSelection();if(!a||o&&(a!=null&&a.isCollapsed))return;o=a.isCollapsed||!1;const c=[],u=a.rangeCount||0;for(let h=0;h<u;h++){const f=a.getRangeAt(h),{startContainer:d,startOffset:g,endContainer:m,endOffset:p}=f;J(d,r,i,!0)||J(m,r,i,!0)||c.push({start:t.getId(d),startOffset:g,end:t.getId(m),endOffset:p})}n({ranges:c})});return l(),Z("selectionchange",l)}function qf({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Ne(t.customElements,"define",function(i){return function(n,o,l){try{e({define:{name:n}})}catch(a){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,l])}})}function Qf(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:h,fontCb:f,selectionCb:d,customElementCb:g}=s;s.mutationCb=(...m)=>{e.mutation&&e.mutation(...m),t(...m)},s.mousemoveCb=(...m)=>{e.mousemove&&e.mousemove(...m),r(...m)},s.mouseInteractionCb=(...m)=>{e.mouseInteraction&&e.mouseInteraction(...m),i(...m)},s.scrollCb=(...m)=>{e.scroll&&e.scroll(...m),n(...m)},s.viewportResizeCb=(...m)=>{e.viewportResize&&e.viewportResize(...m),o(...m)},s.inputCb=(...m)=>{e.input&&e.input(...m),l(...m)},s.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),a(...m)},s.styleSheetRuleCb=(...m)=>{e.styleSheetRule&&e.styleSheetRule(...m),c(...m)},s.styleDeclarationCb=(...m)=>{e.styleDeclaration&&e.styleDeclaration(...m),u(...m)},s.canvasMutationCb=(...m)=>{e.canvasMutation&&e.canvasMutation(...m),h(...m)},s.fontCb=(...m)=>{e.font&&e.font(...m),f(...m)},s.selectionCb=(...m)=>{e.selection&&e.selection(...m),d(...m)},s.customElementCb=(...m)=>{e.customElement&&e.customElement(...m),g(...m)}}function ep(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Qf(s,e);let r;s.recordDOM&&(r=Qo(s,s.doc));const i=Wf(s),n=jf(s),o=ea(s),l=Gf(s,{win:t}),a=Hf(s),c=Jf(s);let u=()=>{},h=()=>{},f=()=>{},d=()=>{};s.recordDOM&&(u=Yf(s,{win:t}),h=ta(s,s.doc),f=Zf(s,{win:t}),s.collectFonts&&(d=Xf(s)));const g=Kf(s),m=qf(s),p=[];for(const w of s.plugins)p.push(w.observer(w.callback,t,w.options));return O(()=>{Ee.forEach(w=>w.reset()),r==null||r.disconnect(),i(),n(),o(),l(),a(),c(),u(),h(),f(),d(),g(),m(),p.forEach(w=>w())})}function Zt(s){return typeof window[s]!="undefined"}function Jt(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}var We="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tp=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Xt=0;Xt<We.length;Xt++)tp[We.charCodeAt(Xt)]=Xt;var rp=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=We[e[t]>>2],i+=We[(e[t]&3)<<4|e[t+1]>>4],i+=We[(e[t+1]&15)<<2|e[t+2]>>6],i+=We[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const en=new Map;function sp(s,e){let t=en.get(s);return t||(t=new Map,en.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const ra=(s,e,t)=>{if(!s||!(ia(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=sp(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function nr(s,e,t){if(s instanceof Array)return s.map(r=>nr(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=rp(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[nr(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[nr(s.data,e,t),s.width,s.height]};if(ia(s,e)||typeof s=="object"){const r=s.constructor.name,i=ra(s,e,t);return{rr_type:r,index:i}}}}return s}const sa=(s,e,t)=>s.map(r=>nr(r,e,t)),ia=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function ip(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=Ne(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...c){return J(this.canvas,t,r,!0)||setTimeout(()=>{const u=sa(c,e,this);s(this.canvas,{type:Ve["2D"],property:o,args:u})},0),a.apply(this,c)}});i.push(l)}catch(l){const a=kr(e.CanvasRenderingContext2D.prototype,o,{set(c){s(this.canvas,{type:Ve["2D"],property:o,args:[c],setter:!0})}});i.push(a)}return()=>{i.forEach(o=>o())}}function np(s){return s==="experimental-webgl"?"webgl":s}function tn(s,e,t,r){const i=[];try{const n=Ne(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!J(this,e,t,!0)){const c=np(l);if("__context"in this||(this.__context=c),r&&["webgl","webgl2"].includes(c))if(a[0]&&typeof a[0]=="object"){const u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function rn(s,e,t,r,i,n){const o=[],l=Object.getOwnPropertyNames(s);for(const a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;const c=Ne(s,a,function(u){return function(...h){const f=u.apply(this,h);if(ra(f,n,this),"tagName"in this.canvas&&!J(this.canvas,r,i,!0)){const d=sa(h,n,this),g={type:e,property:a,args:d};t(this.canvas,g)}return f}});o.push(c)}catch(c){const u=kr(s,a,{set(h){t(this.canvas,{type:e,property:a,args:[h],setter:!0})}});o.push(u)}return o}function op(s,e,t,r){const i=[];return i.push(...rn(e.WebGLRenderingContext.prototype,Ve.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...rn(e.WebGL2RenderingContext.prototype,Ve.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const na="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",ap=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),sn=typeof self!="undefined"&&self.Blob&&new Blob([ap(na)],{type:"text/javascript;charset=utf-8"});function lp(s){let e;try{if(e=sn&&(self.URL||self.webkitURL).createObjectURL(sn),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+na,{name:s==null?void 0:s.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class up{constructor(e){y(this,"pendingCanvasMutations",new Map),y(this,"rafStamps",{latestId:0,invokeId:null}),y(this,"mirror"),y(this,"mutationCb"),y(this,"resetObservers"),y(this,"frozen",!1),y(this,"locked",!1),y(this,"processMutation",(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,i,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const o=tn(t,r,i,!0),l=new Map,a=new lp;a.onmessage=g=>{const{id:m}=g.data;if(l.set(m,!1),!("base64"in g.data))return;const{base64:p,type:w,width:b,height:S}=g.data;this.mutationCb({id:m,type:Ve["2D"],commands:[{property:"clearRect",args:[0,0,b,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:p}],type:w}]},0,0]}]})};const c=1e3/e;let u=0,h;const f=()=>{const g=[];return t.document.querySelectorAll("canvas").forEach(m=>{J(m,r,i,!0)||g.push(m)}),g},d=g=>{if(u&&g-u<c){h=requestAnimationFrame(d);return}u=g,f().forEach(async m=>{var p;const w=this.mirror.getId(m);if(l.get(w)||m.width===0||m.height===0)return;if(l.set(w,!0),["webgl","webgl2"].includes(m.__context)){const S=m.getContext(m.__context);((p=S==null?void 0:S.getContextAttributes())==null?void 0:p.preserveDrawingBuffer)===!1&&S.clear(S.COLOR_BUFFER_BIT)}const b=await createImageBitmap(m);a.postMessage({id:w,bitmap:b,width:m.width,height:m.height,dataURLOptions:n.dataURLOptions},[b])}),h=requestAnimationFrame(d)};h=requestAnimationFrame(d),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=tn(e,t,r,!1),n=ip(this.processMutation.bind(this),e,t,r),o=op(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(o=>{const c=o,{type:l}=c;return Pe(c,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class cp{constructor(){y(this,"nodeMap",new WeakMap),y(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}class hp{constructor(e){y(this,"shadowDoms",new WeakSet),y(this,"mutationCb"),y(this,"scrollCb"),y(this,"bypassOptions"),y(this,"mirror"),y(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(!at(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Qo(re(A({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(ea(re(A({},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(I.host(e))),this.restoreHandlers.push(ta({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(Ne(e.prototype,"attachShadow",function(i){return function(n){const o=i.call(this,n),l=I.shadowRoot(this);return l&&Xo(this)&&r.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class fp{constructor(e){y(this,"trackedLinkElements",new WeakSet),y(this,"mutationCb"),y(this,"adoptedStyleSheetCb"),y(this,"styleMirror",new Ef),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:pn(l,n.href),index:a}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}let U,nt,Jr,ct=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((ii=s.contentWindow)==null?void 0:ii.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){Ge()&&console.debug("Unable to override Array.from",s)}const ne=Va();function xe(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:f,slimDOMOptions:d,maskInputFn:g,maskTextFn:m,hooks:p,packFn:w,sampling:b={},dataURLOptions:S={},mousemoveWait:M,recordDOM:F=!0,recordCanvas:j=!1,recordCrossOriginIframes:G=!1,recordAfter:P=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:X=!1,collectFonts:V=!1,inlineImages:q=!1,plugins:le,keepIframeSrcFn:he=()=>!1,ignoreCSSAttributes:E=new Set([]),errorHandler:qe}=s;kf(qe);const we=G?window.parent===window:!0;let Ae=!1;if(!we)try{window.parent.document&&(Ae=!1)}catch($){Ae=!0}if(we&&!e)throw new Error("emit function is required");if(!we&&!Ae)return()=>{};M!==void 0&&b.mousemove===void 0&&(b.mousemove=M),ne.reset();const z=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}:f!==void 0?f:{password:!0},Q=d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:d==="all",headMetaDescKeywords:d==="all",headTitleMutations:d==="all"}:d||{};Mf();let ee,te=0;const Te=$=>{for(const ie of le||[])ie.eventProcessor&&($=ie.eventProcessor($));return w&&!Ae&&($=w($)),$};U=($,ie)=>{var B;const W=$;if(W.timestamp=wr(),(B=Ee[0])!=null&&B.isFrozen()&&W.type!==R.FullSnapshot&&!(W.type===R.IncrementalSnapshot&&W.data.source===x.Mutation)&&Ee.forEach(fe=>fe.unfreeze()),we)e==null||e(Te(W),ie);else if(Ae){const fe={type:"rrweb",event:Te(W),origin:window.location.origin,isCheckout:ie};window.parent.postMessage(fe,"*")}if(W.type===R.FullSnapshot)ee=W,te=0;else if(W.type===R.IncrementalSnapshot){if(W.data.source===x.Mutation&&W.data.isAttachIframe)return;te++;const fe=r&&te>=r,Me=t&&W.timestamp-ee.timestamp>t;(fe||Me)&&nt(!0)}};const be=$=>{U({type:R.IncrementalSnapshot,data:A({source:x.Mutation},$)})},Qs=$=>U({type:R.IncrementalSnapshot,data:A({source:x.Scroll},$)}),ei=$=>U({type:R.IncrementalSnapshot,data:A({source:x.CanvasMutation},$)}),oa=$=>U({type:R.IncrementalSnapshot,data:A({source:x.AdoptedStyleSheet},$)}),Oe=new fp({mutationCb:be,adoptedStyleSheetCb:oa}),Re=new Tf({mirror:ne,mutationCb:be,stylesheetManager:Oe,recordCrossOriginIframes:G,wrappedEmit:U});for(const $ of le||[])$.getMirror&&$.getMirror({nodeMirror:ne,crossOriginIframeMirror:Re.crossOriginIframeMirror,crossOriginIframeStyleMirror:Re.crossOriginIframeStyleMirror});const _r=new cp;Jr=new up({recordCanvas:j,mutationCb:ei,win:window,blockClass:i,blockSelector:n,mirror:ne,sampling:b.canvas,dataURLOptions:S});const Ot=new hp({mutationCb:be,scrollCb:Qs,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:z,dataURLOptions:S,maskTextFn:m,maskInputFn:g,recordCanvas:j,inlineImages:q,sampling:b,slimDOMOptions:Q,iframeManager:Re,stylesheetManager:Oe,canvasManager:Jr,keepIframeSrcFn:he,processedNodeManager:_r},mirror:ne});nt=($=!1)=>{if(!F)return;U({type:R.Meta,data:{href:window.location.href,width:Go(),height:jo()}},$),Oe.reset(),Ot.init(),Ee.forEach(B=>B.lock());const ie=$l(document,{mirror:ne,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:z,maskTextFn:m,maskInputFn:g,slimDOM:Q,dataURLOptions:S,recordCanvas:j,inlineImages:q,onSerialize:B=>{Yo(B,ne)&&Re.addIframe(B),Zo(B,ne)&&Oe.trackLinkElement(B),Rs(B)&&Ot.addShadowRoot(I.shadowRoot(B),document)},onIframeLoad:(B,W)=>{Re.attachIframe(B,W),Ot.observeAttachShadow(B)},onStylesheetLoad:(B,W)=>{Oe.attachLinkElement(B,W)},keepIframeSrcFn:he});if(!ie){Ge()&&console.warn("Failed to snapshot the document");return}U({type:R.FullSnapshot,data:{node:ie,initialOffset:Wo(window)}},$),Ee.forEach(B=>B.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Oe.adoptStyleSheets(document.adoptedStyleSheets,ne.getId(document))};try{const $=[],ie=Me=>{var Rt;return O(ep)({mutationCb:be,mousemoveCb:(T,Tr)=>U({type:R.IncrementalSnapshot,data:{source:Tr,positions:T}}),mouseInteractionCb:T=>U({type:R.IncrementalSnapshot,data:A({source:x.MouseInteraction},T)}),scrollCb:Qs,viewportResizeCb:T=>U({type:R.IncrementalSnapshot,data:A({source:x.ViewportResize},T)}),inputCb:T=>U({type:R.IncrementalSnapshot,data:A({source:x.Input},T)}),mediaInteractionCb:T=>U({type:R.IncrementalSnapshot,data:A({source:x.MediaInteraction},T)}),styleSheetRuleCb:T=>U({type:R.IncrementalSnapshot,data:A({source:x.StyleSheetRule},T)}),styleDeclarationCb:T=>U({type:R.IncrementalSnapshot,data:A({source:x.StyleDeclaration},T)}),canvasMutationCb:ei,fontCb:T=>U({type:R.IncrementalSnapshot,data:A({source:x.Font},T)}),selectionCb:T=>{U({type:R.IncrementalSnapshot,data:A({source:x.Selection},T)})},customElementCb:T=>{U({type:R.IncrementalSnapshot,data:A({source:x.CustomElement},T)})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:c,maskInputOptions:z,inlineStylesheet:u,sampling:b,recordDOM:F,recordCanvas:j,inlineImages:q,userTriggeredOnInput:X,collectFonts:V,doc:Me,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:he,blockSelector:n,slimDOMOptions:Q,dataURLOptions:S,mirror:ne,iframeManager:Re,stylesheetManager:Oe,shadowDomManager:Ot,processedNodeManager:_r,canvasManager:Jr,ignoreCSSAttributes:E,plugins:((Rt=le==null?void 0:le.filter(T=>T.observer))==null?void 0:Rt.map(T=>({observer:T.observer,options:T.options,callback:Tr=>U({type:R.Plugin,data:{plugin:T.name,payload:Tr}})})))||[]},p)};Re.addLoadListener(Me=>{try{$.push(ie(Me.contentDocument))}catch(Rt){Ge()&&(console.warn("internal error"),console.warn(Rt))}});let B=null;const W=()=>{B=Date.now(),nt(),$.push(ie(document)),ct=!0},fe=()=>{window.removeEventListener("load",fe),!(!ct||B==null)&&(Date.now()-B<=10||nt())};return window.addEventListener("load",fe),document.readyState==="interactive"||document.readyState==="complete"?(document.readyState==="complete"&&window.removeEventListener("load",fe),W()):($.push(Z("DOMContentLoaded",()=>{U({type:R.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&W()})),$.push(Z("load",()=>{U({type:R.Load,data:{}}),P==="load"&&W()},window))),()=>{$.forEach(Me=>Me()),_r.destroy(),ct=!1,_f()}}catch($){Ge()&&(console.warn("internal error1"),console.warn($))}}xe.addCustomEvent=(s,e)=>{if(!ct)throw new Error("please add custom event after start recording");U({type:R.Custom,data:{tag:s,payload:e}})};xe.freezePage=()=>{Ee.forEach(s=>s.freeze())};xe.takeFullSnapshot=s=>{if(!ct)throw new Error("please take full snapshot after start recording");nt(s)};xe.mirror=ne;var nn;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(nn||(nn={}));const{addCustomEvent:Yp}=xe,{freezePage:Zp}=xe,{takeFullSnapshot:pp}=xe;exports.record=xe;
58
+ or you can use record.mirror to access the mirror instance during recording.`;let Hi={map:{},getId(){return console.error(Be),-1},getNode(){return console.error(Be),null},removeNodeFromMap(){console.error(Be)},has(){return console.error(Be),!1},reset(){console.error(Be)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Hi=new Proxy(Hi,{get(s,e,t){return e==="map"&&console.error(Be),Reflect.get(s,e,t)}}));function St(s,e,t={}){let r=null,i=0;return function(...n){const o=Date.now();!i&&t.leading===!1&&(i=o);const l=e-(o-i),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(a,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(a,n)},l))}}function kr(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>kr(s,e,n||{},!0)}let wr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(wr=()=>new Date().getTime());function Wo(s){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=I.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=I.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function jo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Go(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Vo(s){return s?s.nodeType===s.ELEMENT_NODE?s:I.parentElement(s):null}function J(s,e,t,r){if(!s)return!1;const i=Vo(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(ur(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Rf(s,e){return e.getId(s)!==-1}function Zr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===ht}function Ho(s,e){if(ot(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=I.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Ho(r,e):!0}function Os(s){return!!s.changedTouches}function Mf(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Yo(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Zo(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Rs(s){return s?s instanceof qs&&"shadowRoot"in s?!!s.shadowRoot:!!I.shadowRoot(s):!1}class Ef{constructor(){y(this,"id",1),y(this,"styleIDMap",new WeakMap),y(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 Jo(s){var e;let t=null;return"getRootNode"in s&&((e=I.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&I.host(I.getRootNode(s))&&(t=I.host(I.getRootNode(s))),t}function $f(s){let e=s,t;for(;t=Jo(e);)e=t;return e}function Nf(s){const e=s.ownerDocument;if(!e)return!1;const t=$f(s);return I.contains(e,t)}function Xo(s){const e=s.ownerDocument;return e?I.contains(e,s)||Nf(s):!1}let ut;function kf(s){ut=s}function _f(){ut=void 0}const O=s=>ut?(...t)=>{try{return s(...t)}catch(r){if(ut&&ut(r)===!0)return;throw r}}:s;class Yi{constructor(e){y(this,"iframeIdToRemoteIdMap",new WeakMap),y(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Tf{constructor(e){y(this,"iframes",new WeakMap),y(this,"crossOriginIframeMap",new WeakMap),y(this,"crossOriginIframeMirror",new Yi(yn)),y(this,"crossOriginIframeStyleMirror"),y(this,"crossOriginIframeRootIdMap",new WeakMap),y(this,"mirror"),y(this,"mutationCb"),y(this,"wrappedEmit"),y(this,"loadListener"),y(this,"stylesheetManager"),y(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Yi(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case R.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:R.IncrementalSnapshot,data:{source:x.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case R.Meta:case R.Load:case R.DomContentLoaded:return!1;case R.Plugin:return t;case R.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case R.IncrementalSnapshot:switch(t.data.source){case x.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.Drag:case x.TouchMove:case x.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.ViewportResize:return!1;case x.MediaInteraction:case x.MouseInteraction:case x.Scroll:case x.CanvasMutation:case x.Input:return this.replaceIds(t.data,e,["id"]),t;case x.StyleSheetRule:case x.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case x.Font:return t;case x.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case x.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==on.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}const Ge=()=>"_rrweb_is_debug"in window&&window._rrweb_is_debug?window._rrweb_is_debug:!1,br=(...s)=>{Ge()&&console.log("[recapt:rrweb]",...s)},Ko=class ir{constructor(){if(y(this,"lastFullSnapshot",-1),y(this,"intervalBetweenSnapshots",150),y(this,"debounceTimeout",null),y(this,"debounceTime",10),ir.instance)return ir.instance;ir.instance=this}requestFullSnapshot(){this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(()=>{this.debounceTimeout=null,this.takeSnapshot()},this.debounceTime)}takeSnapshot(){if(Date.now()-this.lastFullSnapshot<this.intervalBetweenSnapshots){br("StormSnapshotManager, takeSnapshot: too soon");return}br("StormSnapshotManager, takeSnapshot: taking full snapshot"),pp(),this.lastFullSnapshot=Date.now()}};y(Ko,"instance");let Pf=Ko;const Lf=new Pf;function Zi(s){return"__ln"in s}class Df{constructor(){y(this,"length",0),y(this,"head",null),y(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&&Zi(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&&Zi(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 Ji=(s,e)=>`${s}@${e}`,Xi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function Ff(s=8){let e="";for(let t=0;t<s;t++)e+=Xi.charAt(Math.floor(Math.random()*Xi.length));return e}class Bf{constructor(){y(this,"frozen",!1),y(this,"locked",!1),y(this,"texts",[]),y(this,"attributes",[]),y(this,"attributeMap",new WeakMap),y(this,"removes",[]),y(this,"mapRemoves",[]),y(this,"movedMap",{}),y(this,"addedSet",new Set),y(this,"movedSet",new Set),y(this,"droppedSet",new Set),y(this,"removesSubTreeCache",new Set),y(this,"mutationCb"),y(this,"blockClass"),y(this,"blockSelector"),y(this,"maskTextClass"),y(this,"maskTextSelector"),y(this,"inlineStylesheet"),y(this,"maskInputOptions"),y(this,"maskTextFn"),y(this,"maskInputFn"),y(this,"keepIframeSrcFn"),y(this,"recordCanvas"),y(this,"inlineImages"),y(this,"slimDOMOptions"),y(this,"dataURLOptions"),y(this,"doc"),y(this,"mirror"),y(this,"iframeManager"),y(this,"stylesheetManager"),y(this,"shadowDomManager"),y(this,"canvasManager"),y(this,"processedNodeManager"),y(this,"unattachedDoc"),y(this,"bufId",Ge()?Ff():""),y(this,"stormBatches",[]),y(this,"stormInfo",null),y(this,"stormSettings",{batchSize:50,timeout:30,mutationLimit:800}),y(this,"handleStormMutations",e=>{const t=Date.now();this.stormInfo==null&&(br("detected probable mutation storm start","buffer id:",this.bufId),this.stormInfo={startedAt:t,totalMutations:0,timeout:setTimeout(this.handleStormFinish,this.stormSettings.timeout),stormExceededLimit:!1}),this.stormInfo.totalMutations+=e.length,this.stormInfo.totalMutations>=this.stormSettings.mutationLimit?(this.stormInfo.stormExceededLimit=!0,this.stormBatches=[]):this.stormBatches.push({ts:t,mutations:e}),clearTimeout(this.stormInfo.timeout),e.length<this.stormSettings.batchSize?this.handleStormFinish():this.stormInfo.timeout=setTimeout(this.handleStormFinish,this.stormSettings.timeout)}),y(this,"handleStormFinish",()=>{if(!this.stormInfo)return;const{stormExceededLimit:e}=this.stormInfo;if(br("mutation storm finished","totalMutations:",this.stormInfo.totalMutations,"stormExceededLimit:",e,"storm duration:",Date.now()-this.stormInfo.startedAt,"ms","buffer id:",this.bufId),clearTimeout(this.stormInfo.timeout),this.stormInfo=null,e)this.stormBatches=[],Lf.requestFullSnapshot();else{let t=[];for(const r of this.stormBatches)t.push(...r.mutations);this.stormBatches=[],this.processInternalMutations(t,!0)}}),y(this,"processInternalMutations",(e,t=!1)=>{if(console.log("muts",e.length),!t&&(this.stormInfo!=null||e.length>=this.stormSettings.batchSize)){this.handleStormMutations(e);return}for(const r of e)this.processMutation(r);this.emit()}),y(this,"processMutations",e=>{this.processInternalMutations(e)}),y(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Df,i=u=>{let h=u,f=ht;for(;f===ht;)h=h&&h.nextSibling,f=h&&this.mirror.getId(h);return f},n=u=>{const h=I.parentNode(u);if(!h||!Xo(u))return;let f=!1;if(u.nodeType===Node.TEXT_NODE){const p=h.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(h)&&(f=!0)}const d=ot(h)?this.mirror.getId(Jo(u)):this.mirror.getId(h),g=i(u);if(d===-1||g===-1)return r.addNode(u);const m=ze(u,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{Yo(p,this.mirror)&&this.iframeManager.addIframe(p),Zo(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Rs(u)&&this.shadowDomManager.addShadowRoot(I.shadowRoot(u),this.doc)},onIframeLoad:(p,w)=>{this.iframeManager.attachIframe(p,w),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,w)=>{this.stylesheetManager.attachLinkElement(p,w)},cssCaptured:f});m&&(e.push({parentId:d,nextId:g,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)Ki(this.removesSubTreeCache,u,this.mirror)&&!this.movedSet.has(I.parentNode(u))||n(u);for(const u of this.addedSet)!qi(this.droppedSet,u)&&!Ki(this.removesSubTreeCache,u,this.mirror)||qi(this.movedSet,u)?n(u):this.droppedSet.add(u);let o=null;for(;r.length;){let u=null;if(o){const h=this.mirror.getId(I.parentNode(o.value)),f=i(o.value);h!==-1&&f!==-1&&(u=o)}if(!u){let h=r.tail;for(;h;){const f=h;if(h=h.previous,f){const d=this.mirror.getId(I.parentNode(f.value));if(i(f.value)===-1)continue;if(d!==-1){u=f;break}else{const m=f.value,p=I.parentNode(m);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const w=I.host(p);if(this.mirror.getId(w)!==-1){u=f;break}}}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}o=u.previous,r.removeNode(u.value),n(u.value)}const l=[];for(const u of this.texts){const h=u.node,f=I.parentNode(h);f&&f.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(f);const d=this.mirror.getId(h);!t.has(d)&&this.mirror.has(d)&&l.push({id:d,value:u.value})}const a=[];for(const u of this.attributes){const{attributes:h}=u;if(typeof h.style=="string"){const d=JSON.stringify(u.styleDiff),g=JSON.stringify(u._unchangedStyles);d.length<h.style.length&&(d+g).split("var(").length===h.style.split("var(").length&&(h.style=u.styleDiff)}const f=this.mirror.getId(u.node);!t.has(f)&&this.mirror.has(f)&&a.push({id:f,attributes:h})}const c={texts:l,attributes:a,removes:this.removes,adds:e};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.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(c))}),y(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(I.childNodes(e),i=>I.textContent(i)||"").join("");t.attributes.value=or({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:ar(e),value:r,maskInputFn:this.maskInputFn})}),y(this,"processMutation",e=>{if(!Zr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=I.textContent(e.target);!J(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Sn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Vo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){const o=ar(t);i=or({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(J(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!bn(t.tagName,r))if(n.attributes[r]=wn(this.doc,$e(t.tagName),$e(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(l){this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(const l of Array.from(t.style)){const a=t.style.getPropertyValue(l),c=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||c!==o.style.getPropertyPriority(l)?c===""?n.styleDiff[l]=a:n.styleDiff[l]=[a,c]:n._unchangedStyles[l]=[a,c]}for(const l of Array.from(o.style))t.style.getPropertyValue(l)===""&&(n.styleDiff[l]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(J(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}for(let o=0;o<e.addedNodes.length;o++)this.genAdds(e.addedNodes[o],e.target);const t=ot(e.target)?this.mirror.getId(I.host(e.target)):this.mirror.getId(e.target);if(J(e.target,this.blockClass,this.blockSelector,!1))return;const r=this.addedSet.has(e.target),i=Ho(e.target,this.mirror),n=ot(e.target)&&at(e.target)?!0:void 0;for(let o=0;o<e.removedNodes.length;o++){const l=e.removedNodes[o],a=this.mirror.getId(l);if(Zr(l,this.mirror,this.slimDOMOptions)||!Rf(l,this.mirror))return;this.addedSet.has(l)?(Ms(this.addedSet,l),this.droppedSet.add(l)):r&&a===-1||i||(this.movedSet.has(l)&&this.movedMap[Ji(a,t)]?Ms(this.movedSet,l):(this.removes.push({parentId:t,id:a,isShadow:n}),Uf(l,this.removesSubTreeCache))),this.mapRemoves.push(l)}break}}}),y(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Zr(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[Ji(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);if(!J(e,this.blockClass,this.blockSelector,!1)){const r=I.childNodes(e);for(let i=0;i<r.length;i++)this.genAdds(r[i]);if(Rs(e)){const i=I.childNodes(I.shadowRoot(e));for(let n=0;n<i.length;n++){const o=i[n];this.processedNodeManager.add(o,this),this.genAdds(o,e)}}}}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Ms(s,e){s.delete(e);const t=I.childNodes(e);for(let r=0;r<t.length;r++)Ms(s,t[r])}function Uf(s,e){const t=[s];for(;t.length;){const r=t.pop();if(e.has(r))continue;e.add(r);const i=I.childNodes(r);for(let n=0;n<i.length;n++)t.push(i[n])}}function Ki(s,e,t){return s.size===0?!1:zf(s,e)}function zf(s,e,t){const r=I.parentNode(e);return r?s.has(r):!1}function qi(s,e){return s.size===0?!1:qo(s,e)}function qo(s,e){const t=I.parentNode(e);return t?s.has(t)?!0:qo(s,t):!1}const Ee=[];function At(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function Qo(s,e){const t=new Bf;Ee.push(t),t.init(s);const r=new(ln())(O(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Wf({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],l;const a=St(O(h=>{const f=Date.now()-l;s(o.map(d=>(d.timeOffset-=f,d)),h),o=[],l=null}),n),c=O(St(O(h=>{const f=At(h),{clientX:d,clientY:g}=Os(h)?h.changedTouches[0]:h;l||(l=wr()),o.push({x:d,y:g,id:r.getId(f),timeOffset:wr()-l}),a(typeof DragEvent!="undefined"&&h instanceof DragEvent?x.Drag:h instanceof MouseEvent?x.MouseMove:x.TouchMove)}),i,{trailing:!1})),u=[Z("mousemove",c,t),Z("touchmove",c,t),Z("drag",c,t)];return O(()=>{u.forEach(h=>h())})}function jf({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};const o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let a=null;const c=u=>h=>{const f=At(h);if(J(f,r,i,!0))return;let d=null,g=u;if("pointerType"in h){switch(h.pointerType){case"mouse":d=me.Mouse;break;case"touch":d=me.Touch;break;case"pen":d=me.Pen;break}d===me.Touch?K[u]===K.MouseDown?g="TouchStart":K[u]===K.MouseUp&&(g="TouchEnd"):me.Pen}else Os(h)&&(d=me.Touch);d!==null?(a=d,(g.startsWith("Touch")&&d===me.Touch||g.startsWith("Mouse")&&d===me.Mouse)&&(d=null)):K[u]===K.Click&&(d=a,a=null);const m=Os(h)?h.changedTouches[0]:h;if(!m)return;const p=t.getId(f),{clientX:w,clientY:b}=m;O(s)(A({type:K[g],id:p,x:w,y:b},d!==null&&{pointerType:d}))};return Object.keys(K).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&o[u]!==!1).forEach(u=>{let h=$e(u);const f=c(u);if(window.PointerEvent)switch(K[u]){case K.MouseDown:case K.MouseUp:h=h.replace("mouse","pointer");break;case K.TouchStart:case K.TouchEnd:return}l.push(Z(h,f,e))}),O(()=>{l.forEach(u=>u())})}function ea({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const o=O(St(O(l=>{const a=At(l);if(!a||J(a,r,i,!0))return;const c=t.getId(a);if(a===e&&e.defaultView){const u=Wo(e.defaultView);s({id:c,x:u.left,y:u.top})}else s({id:c,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return Z("scroll",o,e)}function Gf({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=O(St(O(()=>{const n=jo(),o=Go();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return Z("resize",i,e)}const Vf=["INPUT","TEXTAREA","SELECT"],Qi=new WeakMap;function Hf({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:c,userTriggeredOnInput:u}){function h(b){let S=At(b);const M=b.isTrusted,F=S&&S.tagName;if(S&&F==="OPTION"&&(S=I.parentElement(S)),!S||!F||Vf.indexOf(F)<0||J(S,r,i,!0)||S.classList.contains(n)||o&&S.matches(o))return;let j=S.value,G=!1;const P=ar(S)||"";P==="radio"||P==="checkbox"?G=S.checked:(l[F.toLowerCase()]||l[P])&&(j=or({element:S,maskInputOptions:l,tagName:F,type:P,value:j,maskInputFn:a})),f(S,u?{text:j,isChecked:G,userTriggered:M}:{text:j,isChecked:G});const X=S.name;P==="radio"&&X&&G&&e.querySelectorAll(`input[type="radio"][name="${X}"]`).forEach(V=>{if(V!==S){const q=V.value;f(V,u?{text:q,isChecked:!G,userTriggered:!1}:{text:q,isChecked:!G})}})}function f(b,S){const M=Qi.get(b);if(!M||M.text!==S.text||M.isChecked!==S.isChecked){Qi.set(b,S);const F=t.getId(b);O(s)(re(A({},S),{id:F}))}}const g=(c.input==="last"?["change"]:["input","change"]).map(b=>Z(b,O(h),e)),m=e.defaultView;if(!m)return()=>{g.forEach(b=>b())};const p=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),w=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return p&&p.set&&g.push(...w.map(b=>kr(b[0],b[1],{set(){O(h)({target:this,isTrusted:!1})}},!1,m))),O(()=>{g.forEach(b=>b())})}function Sr(s){const e=[];function t(r,i){if(Zt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Zt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Zt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Zt("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function Ce(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Yf({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:O((u,h,f)=>{const[d,g]=f,{id:m,styleId:p}=Ce(h,e,t.styleMirror);return(m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,adds:[{rule:d,index:g}]}),u.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(u,h,f=this.cssRules.length){const d=`${u} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[d,f])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:O((u,h,f)=>{const[d]=f,{id:g,styleId:m}=Ce(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,removes:[{index:d}]}),u.apply(h,f)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:O((u,h,f)=>{const[d]=f,{id:g,styleId:m}=Ce(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replace:d}),u.apply(h,f)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:O((u,h,f)=>{const[d]=f,{id:g,styleId:m}=Ce(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replaceSync:d}),u.apply(h,f)})}));const a={};Jt("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Jt("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Jt("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Jt("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(a).forEach(([u,h])=>{c[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(c[u].insertRule,{apply:O((f,d,g)=>{const[m,p]=g,{id:w,styleId:b}=Ce(d.parentStyleSheet,e,t.styleMirror);return(w&&w!==-1||b&&b!==-1)&&s({id:w,styleId:b,adds:[{rule:m,index:[...Sr(d),p||0]}]}),f.apply(d,g)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:O((f,d,g)=>{const[m]=g,{id:p,styleId:w}=Ce(d.parentStyleSheet,e,t.styleMirror);return(p&&p!==-1||w&&w!==-1)&&s({id:p,styleId:w,removes:[{index:[...Sr(d),m]}]}),f.apply(d,g)})})}),O(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([u,h])=>{h.prototype.insertRule=c[u].insertRule,h.prototype.deleteRule=c[u].deleteRule})})}function ta({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(I.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var c;return(c=a.get)==null?void 0:c.call(this)},set(c){var u;const h=(u=a.set)==null?void 0:u.call(this,c);if(o!==null&&o!==-1)try{e.adoptStyleSheets(c,o)}catch(f){}return h}}),O(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Zf({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:O((l,a,c)=>{var u;const[h,f,d]=c;if(t.has(h))return n.apply(a,[h,f,d]);const{id:g,styleId:m}=Ce((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,set:{property:h,value:f,priority:d},index:Sr(a.parentRule)}),l.apply(a,c)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:O((l,a,c)=>{var u;const[h]=c;if(t.has(h))return o.apply(a,[h]);const{id:f,styleId:d}=Ce((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||d&&d!==-1)&&s({id:f,styleId:d,remove:{property:h},index:Sr(a.parentRule)}),l.apply(a,c)})}),O(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Jf({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const o=O(a=>St(O(c=>{const u=At(c);if(!u||J(u,e,t,!0))return;const{currentTime:h,volume:f,muted:d,playbackRate:g,loop:m}=u;s({type:a,id:r.getId(u),currentTime:h,volume:f,muted:d,playbackRate:g,loop:m})}),i.media||500)),l=[Z("play",o(Fe.Play),n),Z("pause",o(Fe.Pause),n),Z("seeked",o(Fe.Seeked),n),Z("volumechange",o(Fe.VolumeChange),n),Z("ratechange",o(Fe.RateChange),n)];return O(()=>{l.forEach(a=>a())})}function Xf({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(a,c,u){const h=new n(a,c,u);return i.set(h,{family:a,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),h};const o=Ne(e.fonts,"add",function(l){return function(a){return setTimeout(O(()=>{const c=i.get(a);c&&(s(c),i.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=n}),r.push(o),O(()=>{r.forEach(l=>l())})}function Kf(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let o=!0;const l=O(()=>{const a=e.getSelection();if(!a||o&&(a!=null&&a.isCollapsed))return;o=a.isCollapsed||!1;const c=[],u=a.rangeCount||0;for(let h=0;h<u;h++){const f=a.getRangeAt(h),{startContainer:d,startOffset:g,endContainer:m,endOffset:p}=f;J(d,r,i,!0)||J(m,r,i,!0)||c.push({start:t.getId(d),startOffset:g,end:t.getId(m),endOffset:p})}n({ranges:c})});return l(),Z("selectionchange",l)}function qf({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Ne(t.customElements,"define",function(i){return function(n,o,l){try{e({define:{name:n}})}catch(a){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,l])}})}function Qf(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:h,fontCb:f,selectionCb:d,customElementCb:g}=s;s.mutationCb=(...m)=>{e.mutation&&e.mutation(...m),t(...m)},s.mousemoveCb=(...m)=>{e.mousemove&&e.mousemove(...m),r(...m)},s.mouseInteractionCb=(...m)=>{e.mouseInteraction&&e.mouseInteraction(...m),i(...m)},s.scrollCb=(...m)=>{e.scroll&&e.scroll(...m),n(...m)},s.viewportResizeCb=(...m)=>{e.viewportResize&&e.viewportResize(...m),o(...m)},s.inputCb=(...m)=>{e.input&&e.input(...m),l(...m)},s.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),a(...m)},s.styleSheetRuleCb=(...m)=>{e.styleSheetRule&&e.styleSheetRule(...m),c(...m)},s.styleDeclarationCb=(...m)=>{e.styleDeclaration&&e.styleDeclaration(...m),u(...m)},s.canvasMutationCb=(...m)=>{e.canvasMutation&&e.canvasMutation(...m),h(...m)},s.fontCb=(...m)=>{e.font&&e.font(...m),f(...m)},s.selectionCb=(...m)=>{e.selection&&e.selection(...m),d(...m)},s.customElementCb=(...m)=>{e.customElement&&e.customElement(...m),g(...m)}}function ep(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Qf(s,e);let r;s.recordDOM&&(r=Qo(s,s.doc));const i=Wf(s),n=jf(s),o=ea(s),l=Gf(s,{win:t}),a=Hf(s),c=Jf(s);let u=()=>{},h=()=>{},f=()=>{},d=()=>{};s.recordDOM&&(u=Yf(s,{win:t}),h=ta(s,s.doc),f=Zf(s,{win:t}),s.collectFonts&&(d=Xf(s)));const g=Kf(s),m=qf(s),p=[];for(const w of s.plugins)p.push(w.observer(w.callback,t,w.options));return O(()=>{Ee.forEach(w=>w.reset()),r==null||r.disconnect(),i(),n(),o(),l(),a(),c(),u(),h(),f(),d(),g(),m(),p.forEach(w=>w())})}function Zt(s){return typeof window[s]!="undefined"}function Jt(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}var We="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tp=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Xt=0;Xt<We.length;Xt++)tp[We.charCodeAt(Xt)]=Xt;var rp=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=We[e[t]>>2],i+=We[(e[t]&3)<<4|e[t+1]>>4],i+=We[(e[t+1]&15)<<2|e[t+2]>>6],i+=We[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const en=new Map;function sp(s,e){let t=en.get(s);return t||(t=new Map,en.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const ra=(s,e,t)=>{if(!s||!(ia(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=sp(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function nr(s,e,t){if(s instanceof Array)return s.map(r=>nr(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=rp(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[nr(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[nr(s.data,e,t),s.width,s.height]};if(ia(s,e)||typeof s=="object"){const r=s.constructor.name,i=ra(s,e,t);return{rr_type:r,index:i}}}}return s}const sa=(s,e,t)=>s.map(r=>nr(r,e,t)),ia=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function ip(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=Ne(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...c){return J(this.canvas,t,r,!0)||setTimeout(()=>{const u=sa(c,e,this);s(this.canvas,{type:Ve["2D"],property:o,args:u})},0),a.apply(this,c)}});i.push(l)}catch(l){const a=kr(e.CanvasRenderingContext2D.prototype,o,{set(c){s(this.canvas,{type:Ve["2D"],property:o,args:[c],setter:!0})}});i.push(a)}return()=>{i.forEach(o=>o())}}function np(s){return s==="experimental-webgl"?"webgl":s}function tn(s,e,t,r){const i=[];try{const n=Ne(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!J(this,e,t,!0)){const c=np(l);if("__context"in this||(this.__context=c),r&&["webgl","webgl2"].includes(c))if(a[0]&&typeof a[0]=="object"){const u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function rn(s,e,t,r,i,n){const o=[],l=Object.getOwnPropertyNames(s);for(const a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;const c=Ne(s,a,function(u){return function(...h){const f=u.apply(this,h);if(ra(f,n,this),"tagName"in this.canvas&&!J(this.canvas,r,i,!0)){const d=sa(h,n,this),g={type:e,property:a,args:d};t(this.canvas,g)}return f}});o.push(c)}catch(c){const u=kr(s,a,{set(h){t(this.canvas,{type:e,property:a,args:[h],setter:!0})}});o.push(u)}return o}function op(s,e,t,r){const i=[];return i.push(...rn(e.WebGLRenderingContext.prototype,Ve.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...rn(e.WebGL2RenderingContext.prototype,Ve.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const na="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",ap=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),sn=typeof self!="undefined"&&self.Blob&&new Blob([ap(na)],{type:"text/javascript;charset=utf-8"});function lp(s){let e;try{if(e=sn&&(self.URL||self.webkitURL).createObjectURL(sn),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+na,{name:s==null?void 0:s.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class up{constructor(e){y(this,"pendingCanvasMutations",new Map),y(this,"rafStamps",{latestId:0,invokeId:null}),y(this,"mirror"),y(this,"mutationCb"),y(this,"resetObservers"),y(this,"frozen",!1),y(this,"locked",!1),y(this,"processMutation",(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,i,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const o=tn(t,r,i,!0),l=new Map,a=new lp;a.onmessage=g=>{const{id:m}=g.data;if(l.set(m,!1),!("base64"in g.data))return;const{base64:p,type:w,width:b,height:S}=g.data;this.mutationCb({id:m,type:Ve["2D"],commands:[{property:"clearRect",args:[0,0,b,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:p}],type:w}]},0,0]}]})};const c=1e3/e;let u=0,h;const f=()=>{const g=[];return t.document.querySelectorAll("canvas").forEach(m=>{J(m,r,i,!0)||g.push(m)}),g},d=g=>{if(u&&g-u<c){h=requestAnimationFrame(d);return}u=g,f().forEach(async m=>{var p;const w=this.mirror.getId(m);if(l.get(w)||m.width===0||m.height===0)return;if(l.set(w,!0),["webgl","webgl2"].includes(m.__context)){const S=m.getContext(m.__context);((p=S==null?void 0:S.getContextAttributes())==null?void 0:p.preserveDrawingBuffer)===!1&&S.clear(S.COLOR_BUFFER_BIT)}const b=await createImageBitmap(m);a.postMessage({id:w,bitmap:b,width:m.width,height:m.height,dataURLOptions:n.dataURLOptions},[b])}),h=requestAnimationFrame(d)};h=requestAnimationFrame(d),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=tn(e,t,r,!1),n=ip(this.processMutation.bind(this),e,t,r),o=op(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(o=>{const c=o,{type:l}=c;return Pe(c,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class cp{constructor(){y(this,"nodeMap",new WeakMap),y(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}class hp{constructor(e){y(this,"shadowDoms",new WeakSet),y(this,"mutationCb"),y(this,"scrollCb"),y(this,"bypassOptions"),y(this,"mirror"),y(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(!at(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Qo(re(A({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(ea(re(A({},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(I.host(e))),this.restoreHandlers.push(ta({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(Ne(e.prototype,"attachShadow",function(i){return function(n){const o=i.call(this,n),l=I.shadowRoot(this);return l&&Xo(this)&&r.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class fp{constructor(e){y(this,"trackedLinkElements",new WeakSet),y(this,"mutationCb"),y(this,"adoptedStyleSheetCb"),y(this,"styleMirror",new Ef),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:pn(l,n.href),index:a}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}let U,nt,Jr,ct=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((ii=s.contentWindow)==null?void 0:ii.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){Ge()&&console.debug("Unable to override Array.from",s)}const ne=Va();function xe(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:f,slimDOMOptions:d,maskInputFn:g,maskTextFn:m,hooks:p,packFn:w,sampling:b={},dataURLOptions:S={},mousemoveWait:M,recordDOM:F=!0,recordCanvas:j=!1,recordCrossOriginIframes:G=!1,recordAfter:P=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:X=!1,collectFonts:V=!1,inlineImages:q=!1,plugins:le,keepIframeSrcFn:he=()=>!1,ignoreCSSAttributes:E=new Set([]),errorHandler:qe}=s;kf(qe);const we=G?window.parent===window:!0;let Ae=!1;if(!we)try{window.parent.document&&(Ae=!1)}catch($){Ae=!0}if(we&&!e)throw new Error("emit function is required");if(!we&&!Ae)return()=>{};M!==void 0&&b.mousemove===void 0&&(b.mousemove=M),ne.reset();const z=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}:f!==void 0?f:{password:!0},Q=d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:d==="all",headMetaDescKeywords:d==="all",headTitleMutations:d==="all"}:d||{};Mf();let ee,te=0;const Te=$=>{for(const ie of le||[])ie.eventProcessor&&($=ie.eventProcessor($));return w&&!Ae&&($=w($)),$};U=($,ie)=>{var B;const W=$;if(W.timestamp=wr(),(B=Ee[0])!=null&&B.isFrozen()&&W.type!==R.FullSnapshot&&!(W.type===R.IncrementalSnapshot&&W.data.source===x.Mutation)&&Ee.forEach(fe=>fe.unfreeze()),we)e==null||e(Te(W),ie);else if(Ae){const fe={type:"rrweb",event:Te(W),origin:window.location.origin,isCheckout:ie};window.parent.postMessage(fe,"*")}if(W.type===R.FullSnapshot)ee=W,te=0;else if(W.type===R.IncrementalSnapshot){if(W.data.source===x.Mutation&&W.data.isAttachIframe)return;te++;const fe=r&&te>=r,Me=t&&W.timestamp-ee.timestamp>t;(fe||Me)&&nt(!0)}};const be=$=>{U({type:R.IncrementalSnapshot,data:A({source:x.Mutation},$)})},Qs=$=>U({type:R.IncrementalSnapshot,data:A({source:x.Scroll},$)}),ei=$=>U({type:R.IncrementalSnapshot,data:A({source:x.CanvasMutation},$)}),oa=$=>U({type:R.IncrementalSnapshot,data:A({source:x.AdoptedStyleSheet},$)}),Oe=new fp({mutationCb:be,adoptedStyleSheetCb:oa}),Re=new Tf({mirror:ne,mutationCb:be,stylesheetManager:Oe,recordCrossOriginIframes:G,wrappedEmit:U});for(const $ of le||[])$.getMirror&&$.getMirror({nodeMirror:ne,crossOriginIframeMirror:Re.crossOriginIframeMirror,crossOriginIframeStyleMirror:Re.crossOriginIframeStyleMirror});const _r=new cp;Jr=new up({recordCanvas:j,mutationCb:ei,win:window,blockClass:i,blockSelector:n,mirror:ne,sampling:b.canvas,dataURLOptions:S});const Ot=new hp({mutationCb:be,scrollCb:Qs,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:z,dataURLOptions:S,maskTextFn:m,maskInputFn:g,recordCanvas:j,inlineImages:q,sampling:b,slimDOMOptions:Q,iframeManager:Re,stylesheetManager:Oe,canvasManager:Jr,keepIframeSrcFn:he,processedNodeManager:_r},mirror:ne});nt=($=!1)=>{if(!F)return;U({type:R.Meta,data:{href:window.location.href,width:Go(),height:jo()}},$),Oe.reset(),Ot.init(),Ee.forEach(B=>B.lock());const ie=$l(document,{mirror:ne,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:z,maskTextFn:m,maskInputFn:g,slimDOM:Q,dataURLOptions:S,recordCanvas:j,inlineImages:q,onSerialize:B=>{Yo(B,ne)&&Re.addIframe(B),Zo(B,ne)&&Oe.trackLinkElement(B),Rs(B)&&Ot.addShadowRoot(I.shadowRoot(B),document)},onIframeLoad:(B,W)=>{Re.attachIframe(B,W),Ot.observeAttachShadow(B)},onStylesheetLoad:(B,W)=>{Oe.attachLinkElement(B,W)},keepIframeSrcFn:he});if(!ie){Ge()&&console.warn("Failed to snapshot the document");return}U({type:R.FullSnapshot,data:{node:ie,initialOffset:Wo(window)}},$),Ee.forEach(B=>B.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Oe.adoptStyleSheets(document.adoptedStyleSheets,ne.getId(document))};try{const $=[],ie=Me=>{var Rt;return O(ep)({mutationCb:be,mousemoveCb:(T,Tr)=>U({type:R.IncrementalSnapshot,data:{source:Tr,positions:T}}),mouseInteractionCb:T=>U({type:R.IncrementalSnapshot,data:A({source:x.MouseInteraction},T)}),scrollCb:Qs,viewportResizeCb:T=>U({type:R.IncrementalSnapshot,data:A({source:x.ViewportResize},T)}),inputCb:T=>U({type:R.IncrementalSnapshot,data:A({source:x.Input},T)}),mediaInteractionCb:T=>U({type:R.IncrementalSnapshot,data:A({source:x.MediaInteraction},T)}),styleSheetRuleCb:T=>U({type:R.IncrementalSnapshot,data:A({source:x.StyleSheetRule},T)}),styleDeclarationCb:T=>U({type:R.IncrementalSnapshot,data:A({source:x.StyleDeclaration},T)}),canvasMutationCb:ei,fontCb:T=>U({type:R.IncrementalSnapshot,data:A({source:x.Font},T)}),selectionCb:T=>{U({type:R.IncrementalSnapshot,data:A({source:x.Selection},T)})},customElementCb:T=>{U({type:R.IncrementalSnapshot,data:A({source:x.CustomElement},T)})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:c,maskInputOptions:z,inlineStylesheet:u,sampling:b,recordDOM:F,recordCanvas:j,inlineImages:q,userTriggeredOnInput:X,collectFonts:V,doc:Me,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:he,blockSelector:n,slimDOMOptions:Q,dataURLOptions:S,mirror:ne,iframeManager:Re,stylesheetManager:Oe,shadowDomManager:Ot,processedNodeManager:_r,canvasManager:Jr,ignoreCSSAttributes:E,plugins:((Rt=le==null?void 0:le.filter(T=>T.observer))==null?void 0:Rt.map(T=>({observer:T.observer,options:T.options,callback:Tr=>U({type:R.Plugin,data:{plugin:T.name,payload:Tr}})})))||[]},p)};Re.addLoadListener(Me=>{try{$.push(ie(Me.contentDocument))}catch(Rt){Ge()&&(console.warn("internal error"),console.warn(Rt))}});let B=null;const W=()=>{B=Date.now(),nt(),$.push(ie(document)),ct=!0},fe=()=>{window.removeEventListener("load",fe),!(!ct||B==null)&&(Date.now()-B<=10||nt())};return window.addEventListener("load",fe),document.readyState==="interactive"||document.readyState==="complete"?(document.readyState==="complete"&&window.removeEventListener("load",fe),W()):($.push(Z("DOMContentLoaded",()=>{U({type:R.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&W()})),$.push(Z("load",()=>{U({type:R.Load,data:{}}),P==="load"&&W()},window))),()=>{$.forEach(Me=>Me()),_r.destroy(),ct=!1,_f()}}catch($){Ge()&&(console.warn("internal error1"),console.warn($))}}xe.addCustomEvent=(s,e)=>{if(!ct)throw new Error("please add custom event after start recording");U({type:R.Custom,data:{tag:s,payload:e}})};xe.freezePage=()=>{Ee.forEach(s=>s.freeze())};xe.takeFullSnapshot=s=>{if(!ct)throw new Error("please take full snapshot after start recording");nt(s)};xe.mirror=ne;var nn;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(nn||(nn={}));const{addCustomEvent:Yp}=xe,{freezePage:Zp}=xe,{takeFullSnapshot:pp}=xe;exports.record=xe;
59
59
  ;if (typeof module.exports == "object" && typeof exports == "object") {
60
60
  var __cp = (to, from, except, desc) => {
61
61
  if ((from && typeof from === "object") || typeof from === "function") {