@highlight-run/rrweb 2.0.18 → 2.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/rrweb.min.js CHANGED
@@ -1,8 +1,8 @@
1
- var rrweb=function(q){"use strict";var k;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(k||(k={}));function Nt(e){return e.nodeType===e.ELEMENT_NODE}function Re(e){var t=e?.host;return Boolean(t?.shadowRoot===e)}var Ke=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var n;if(!t)return-1;var r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var n=this,r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,n){var r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)},e.prototype.replace=function(t,n){this.idNodeMap.set(t,n)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Et(){return new Ke}function Qe(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,i=e.maskInputFn,a=o||"";return(t[n.toLowerCase()]||t[r])&&(i?a=i(a):a="*".repeat(a.length)),a}var wt="__rrweb_original__";function Zn(e){var t=e.getContext("2d");if(!t)return!0;for(var n=50,r=0;r<e.width;r+=n)for(var o=0;o<e.height;o+=n){var i=t.getImageData,a=wt in i?i[wt]:i,l=new Uint32Array(a.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer);if(l.some(function(c){return c!==0}))return!1}return!0}function Ct(e){return e=e.replace(/[^ -~]+/g,""),e=e?.split(" ").map(function(t){return Math.random().toString(20).substr(2,t.length)}).join(" ")||"",e}var Kn=1,Qn=new RegExp("[^a-z0-9-_:]"),De=-2;function Jn(){return Kn++}function qn(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return Qn.test(t)?"div":t}function Je(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(er).join(""):null}catch{return null}}function er(e){var t=e.cssText;if(tr(e))try{t=Je(e.styleSheet)||t}catch{}return t}function tr(e){return"styleSheet"in e}function nr(e){return e.cssRules?Array.from(e.cssRules).map(function(t){return t.cssText||""}).join(""):""}function rr(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var ye,It,or=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ir=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,sr=/^(data:)([^,]*),(.*)/i;function $e(e,t){return(e||"").replace(or,function(n,r,o,i,a,l){var c=o||a||l,s=r||i||"";if(!c)return n;if(!ir.test(c)||sr.test(c))return"url(".concat(s).concat(c).concat(s,")");if(c[0]==="/")return"url(".concat(s).concat(rr(t)+c).concat(s,")");var u=t.split("/"),d=c.split("/");u.pop();for(var h=0,m=d;h<m.length;h++){var p=m[h];p!=="."&&(p===".."?u.pop():u.push(p))}return"url(".concat(s).concat(u.join("/")).concat(s,")")})}var ar=/^[^ \t\n\r\u000c]+/,lr=/^[, \t\n\r\u000c]+/;function cr(e,t){if(t.trim()==="")return t;var n=0;function r(s){var u,d=s.exec(t.substring(n));return d?(u=d[0],n+=u.length,u):""}for(var o=[];r(lr),!(n>=t.length);){var i=r(ar);if(i.slice(-1)===",")i=Ve(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=Ve(e,i);for(var l=!1;;){var c=t.charAt(n);if(c===""){o.push((i+a).trim());break}else if(l)c===")"&&(l=!1);else if(c===","){n+=1,o.push((i+a).trim());break}else c==="("&&(l=!0);a+=c,n+=1}}}return o.join(", ")}function Ve(e,t){if(!t||t.trim()==="")return t;var n=e.createElement("a");return n.href=t,n.href}function ur(e){return Boolean(e.tagName==="svg"||e.ownerSVGElement)}function qe(){var e=document.createElement("a");return e.href="",e.href}function Mt(e,t,n,r){return n==="src"||n==="href"&&r||n==="xlink:href"&&r&&r[0]!=="#"||n==="background"&&r&&(t==="table"||t==="td"||t==="th")?Ve(e,r):n==="srcset"&&r?cr(e,r):n==="style"&&r?$e(r,qe()):t==="object"&&n==="data"&&r?Ve(e,r):r}function dr(e,t,n){if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return n?e.matches(n):!1}function Ue(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?Ue(e.parentNode,t,n):!1;for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return n?Ue(e.parentNode,t,n):!1}function xt(e,t,n){var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(r===null)return!1;if(typeof t=="string"){if(r.classList.contains(t)||r.closest(".".concat(t)))return!0}else if(Ue(r,t,!0))return!0;return!!(n&&(r.matches(n)||r.closest(n)))}function hr(e,t,n){var r=e.contentWindow;if(r){var o=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){var a=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(a),o=!0,t()});return}var l="about:blank";if(r.location.href!==l||e.src===l||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function mr(e){return e.getAttribute("href")?e.sheet!==null:!0}function pr(e,t,n){var r=!1,o;try{o=e.sheet}catch{return}if(!o){var i=setTimeout(function(){r||(t(),r=!0)},n);e.addEventListener("load",function(){clearTimeout(i),r=!0,t()})}}function fr(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,i=t.blockSelector,a=t.maskTextClass,l=t.maskTextSelector,c=t.inlineStylesheet,s=t.maskInputOptions,u=s===void 0?{}:s,d=t.maskTextFn,h=t.maskInputFn,m=t.dataURLOptions,p=m===void 0?{}:m,g=t.inlineImages,N=t.recordCanvas,f=t.keepIframeSrcFn,b=t.newlyAddedElement,S=b===void 0?!1:b,y=t.enableStrictPrivacy,M=gr(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:k.Document,childNodes:[],compatMode:e.compatMode,rootId:M}:{type:k.Document,childNodes:[],rootId:M};case e.DOCUMENT_TYPE_NODE:return{type:k.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:M};case e.ELEMENT_NODE:return yr(e,{doc:n,blockClass:o,blockSelector:i,inlineStylesheet:c,maskInputOptions:u,maskInputFn:h,dataURLOptions:p,inlineImages:g,recordCanvas:N,keepIframeSrcFn:f,newlyAddedElement:S,enableStrictPrivacy:y,rootId:M});case e.TEXT_NODE:return vr(e,{maskTextClass:a,maskTextSelector:l,maskTextFn:d,enableStrictPrivacy:y,rootId:M});case e.CDATA_SECTION_NODE:return{type:k.CDATA,textContent:"",rootId:M};case e.COMMENT_NODE:return{type:k.Comment,textContent:e.textContent||"",rootId:M};default:return!1}}function gr(e,t){if(t.hasNode(e)){var n=t.getId(e);return n===1?void 0:n}}function vr(e,t){var n,r=t.maskTextClass,o=t.maskTextSelector,i=t.maskTextFn,a=t.enableStrictPrivacy,l=t.rootId,c=e.parentNode&&e.parentNode.tagName,s=e.textContent,u=c==="STYLE"?!0:void 0,d=c==="SCRIPT"?!0:void 0,h=!1;if(u&&s){try{e.nextSibling||e.previousSibling||!((n=e.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(s=nr(e.parentNode.sheet))}catch(p){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(p),e)}s=$e(s,qe()),h=!0}if(d?(s="SCRIPT_PLACEHOLDER",h=!0):c==="NOSCRIPT"&&(s="",h=!0),!u&&!d&&s&&xt(e,r,o)&&(s=i?i(s):s.replace(/[\S]/g,"*")),a&&!h&&c){var m=new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]);!m.has(c)&&s&&(s=Ct(s))}return{type:k.Text,textContent:s||"",isStyle:u,rootId:l}}function yr(e,t){for(var n=t.doc,r=t.blockClass,o=t.blockSelector,i=t.inlineStylesheet,a=t.maskInputOptions,l=a===void 0?{}:a,c=t.maskInputFn,s=t.dataURLOptions,u=s===void 0?{}:s,d=t.inlineImages,h=t.recordCanvas,m=t.keepIframeSrcFn,p=t.newlyAddedElement,g=p===void 0?!1:p,N=t.enableStrictPrivacy,f=t.rootId,b=dr(e,r,o),S=qn(e),y={},M=e.attributes.length,D=0;D<M;D++){var L=e.attributes[D];y[L.name]=Mt(n,S,L.name,L.value)}if(S==="link"&&i){var P=Array.from(n.styleSheets).find(function(v){return v.href===e.href}),A=null;P&&(A=Je(P)),A&&(delete y.rel,delete y.href,y._cssText=$e(A,P.href))}if(S==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var A=Je(e.sheet);A&&(y._cssText=$e(A,qe()))}if(S==="input"||S==="textarea"||S==="select"){var z=e.value;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&z?y.value=Qe({type:y.type,tagName:S,value:z,maskInputOptions:l,maskInputFn:c}):e.checked&&(y.checked=e.checked)}if(S==="option"&&(e.selected&&!l.select?y.selected=!0:delete y.selected),S==="canvas"&&h){if(e.__context==="2d")Zn(e)||(y.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){var $=e.toDataURL(u.type,u.quality),K=document.createElement("canvas");K.width=e.width,K.height=e.height;var Q=K.toDataURL(u.type,u.quality);$!==Q&&(y.rr_dataURL=$)}}if(S==="img"&&d){ye||(ye=n.createElement("canvas"),It=ye.getContext("2d"));var j=e,Y=j.crossOrigin;j.crossOrigin="anonymous";var X=function(){try{ye.width=j.naturalWidth,ye.height=j.naturalHeight,It.drawImage(j,0,0),y.rr_dataURL=ye.toDataURL(u.type,u.quality)}catch(v){console.warn("Cannot inline img src=".concat(j.currentSrc,"! Error: ").concat(v))}Y?y.crossOrigin=Y:j.removeAttribute("crossorigin")};j.complete&&j.naturalWidth!==0?X():j.onload=X}if((S==="audio"||S==="video")&&(y.rr_mediaState=e.paused?"paused":"played",y.rr_mediaCurrentTime=e.currentTime),g||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop)),b||S==="img"&&N){var _=e.getBoundingClientRect(),B=_.width,T=_.height;y={class:y.class,rr_width:"".concat(B,"px"),rr_height:"".concat(T,"px")},b=!0}return S==="iframe"&&!m(y.src)&&(e.contentDocument||(y.rr_src=y.src),delete y.src),{type:k.Element,tagName:S,attributes:y,childNodes:[],isSVG:ur(e)||void 0,needBlock:b,rootId:f}}function W(e){return e===void 0?"":e.toLowerCase()}function br(e,t){return!!(t.comment&&e.type===k.Comment||e.type===k.Element&&(t.script&&(e.tagName==="script"||e.tagName==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js"))||t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(W(e.attributes.name).match(/^msapplication-tile(image|color)$/)||W(e.attributes.name)==="application-name"||W(e.attributes.rel)==="icon"||W(e.attributes.rel)==="apple-touch-icon"||W(e.attributes.rel)==="shortcut icon"))||e.tagName==="meta"&&(t.headMetaDescKeywords&&W(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(W(e.attributes.property).match(/^(og|twitter|fb):/)||W(e.attributes.name).match(/^(og|twitter):/)||W(e.attributes.name)==="pinterest")||t.headMetaRobots&&(W(e.attributes.name)==="robots"||W(e.attributes.name)==="googlebot"||W(e.attributes.name)==="bingbot")||t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0||t.headMetaAuthorship&&(W(e.attributes.name)==="author"||W(e.attributes.name)==="generator"||W(e.attributes.name)==="framework"||W(e.attributes.name)==="publisher"||W(e.attributes.name)==="progid"||W(e.attributes.property).match(/^article:/)||W(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(W(e.attributes.name)==="google-site-verification"||W(e.attributes.name)==="yandex-verification"||W(e.attributes.name)==="csrf-token"||W(e.attributes.name)==="p:domain_verify"||W(e.attributes.name)==="verify-v1"||W(e.attributes.name)==="verification"||W(e.attributes.name)==="shopify-checkout-api-token"))))}function be(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,i=t.blockSelector,a=t.maskTextClass,l=t.maskTextSelector,c=t.skipChild,s=c===void 0?!1:c,u=t.inlineStylesheet,d=u===void 0?!0:u,h=t.maskInputOptions,m=h===void 0?{}:h,p=t.maskTextFn,g=t.maskInputFn,N=t.slimDOMOptions,f=t.dataURLOptions,b=f===void 0?{}:f,S=t.inlineImages,y=S===void 0?!1:S,M=t.recordCanvas,D=M===void 0?!1:M,L=t.onSerialize,P=t.onIframeLoad,A=t.iframeLoadTimeout,z=A===void 0?5e3:A,$=t.onStylesheetLoad,K=t.stylesheetLoadTimeout,Q=K===void 0?5e3:K,j=t.keepIframeSrcFn,Y=j===void 0?function(){return!1}:j,X=t.newlyAddedElement,_=X===void 0?!1:X,B=t.enableStrictPrivacy,T=t.preserveWhiteSpace,v=T===void 0?!0:T,I=fr(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:l,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:g,dataURLOptions:b,inlineImages:y,recordCanvas:D,keepIframeSrcFn:Y,newlyAddedElement:_,enableStrictPrivacy:B});if(!I)return console.warn(e,"not serialized"),null;var E;if(r.hasNode(e)?E=r.getId(e):br(I,N)||!v&&I.type===k.Text&&!I.isStyle&&!I.textContent.replace(/^\s+|\s+$/gm,"").length?E=De:E=Jn(),E===De)return null;var C=Object.assign(I,{id:E});r.add(e,C),L&&L(e);var J=!s;if(C.type===k.Element){if(J=J&&!C.needBlock,C.needBlock&&C.tagName==="img"){var ee=e.cloneNode();ee.src="",r.add(ee,C)}delete C.needBlock,e.shadowRoot&&(C.isShadowHost=!0)}if((C.type===k.Document||C.type===k.Element)&&J){N.headWhitespace&&C.type===k.Element&&C.tagName==="head"&&(v=!1);for(var le={doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:l,skipChild:s,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:g,slimDOMOptions:N,dataURLOptions:b,inlineImages:y,recordCanvas:D,preserveWhiteSpace:v,onSerialize:L,onIframeLoad:P,iframeLoadTimeout:z,onStylesheetLoad:$,stylesheetLoadTimeout:Q,keepIframeSrcFn:Y,enableStrictPrivacy:B},F=0,U=Array.from(e.childNodes);F<U.length;F++){var ve=U[F],xe=be(ve,le);xe&&C.childNodes.push(xe)}if(Nt(e)&&e.shadowRoot)for(var Tt=0,Hn=Array.from(e.shadowRoot.childNodes);Tt<Hn.length;Tt++){var ve=Hn[Tt],xe=be(ve,le);xe&&(xe.isShadow=!0,C.childNodes.push(xe))}}return e.parentNode&&Re(e.parentNode)&&(C.isShadow=!0),C.type===k.Element&&C.tagName==="iframe"&&hr(e,function(){var ke=e.contentDocument;if(ke&&P){var Yn=be(ke,{doc:ke,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:g,slimDOMOptions:N,dataURLOptions:b,inlineImages:y,recordCanvas:D,preserveWhiteSpace:v,onSerialize:L,onIframeLoad:P,iframeLoadTimeout:z,onStylesheetLoad:$,stylesheetLoadTimeout:Q,keepIframeSrcFn:Y,enableStrictPrivacy:B});Yn&&P(e,Yn)}},z),C.type===k.Element&&C.tagName==="link"&&C.attributes.rel==="stylesheet"&&(pr(e,function(){if($){var ke=be(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:g,slimDOMOptions:N,dataURLOptions:b,inlineImages:y,recordCanvas:D,preserveWhiteSpace:v,onSerialize:L,onIframeLoad:P,iframeLoadTimeout:z,onStylesheetLoad:$,stylesheetLoadTimeout:Q,keepIframeSrcFn:Y,enableStrictPrivacy:B});ke&&$(e,ke)}},Q),mr(e)===!1)?null:C}function Sr(e,t){var n=t||{},r=n.mirror,o=r===void 0?new Ke:r,i=n.blockClass,a=i===void 0?"highlight-block":i,l=n.blockSelector,c=l===void 0?null:l,s=n.maskTextClass,u=s===void 0?"highlight-mask":s,d=n.maskTextSelector,h=d===void 0?null:d,m=n.inlineStylesheet,p=m===void 0?!0:m,g=n.inlineImages,N=g===void 0?!1:g,f=n.recordCanvas,b=f===void 0?!1:f,S=n.maskAllInputs,y=S===void 0?!1:S,M=n.maskTextFn,D=n.maskInputFn,L=n.slimDOM,P=L===void 0?!1:L,A=n.dataURLOptions,z=n.preserveWhiteSpace,$=n.onSerialize,K=n.onIframeLoad,Q=n.iframeLoadTimeout,j=n.onStylesheetLoad,Y=n.stylesheetLoadTimeout,X=n.keepIframeSrcFn,_=X===void 0?function(){return!1}:X,B=n.enableStrictPrivacy,T=B===void 0?!1:B,v=y===!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}:y===!1?{password:!0}:y,I=P===!0||P==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:P==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:P===!1?{}:P;return be(e,{doc:e,mirror:o,blockClass:a,blockSelector:c,maskTextClass:u,maskTextSelector:h,skipChild:!1,inlineStylesheet:p,maskInputOptions:v,maskTextFn:M,maskInputFn:D,slimDOMOptions:I,dataURLOptions:A,inlineImages:N,recordCanvas:b,preserveWhiteSpace:z,onSerialize:$,onIframeLoad:K,iframeLoadTimeout:Q,onStylesheetLoad:j,stylesheetLoadTimeout:Y,keepIframeSrcFn:_,newlyAddedElement:!1,enableStrictPrivacy:T})}var kt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Tr(e,t){t===void 0&&(t={});var n=1,r=1;function o(T){var v=T.match(/\n/g);v&&(n+=v.length);var I=T.lastIndexOf(`
2
- `);r=I===-1?r+T.length:T.length-I}function i(){var T={line:n,column:r};return function(v){return v.position=new a(T),p(),v}}var a=function(){function T(v){this.start=v,this.end={line:n,column:r},this.source=t.source}return T}();a.prototype.content=e;var l=[];function c(T){var v=new Error(t.source+":"+n+":"+r+": "+T);if(v.reason=T,v.filename=t.source,v.line=n,v.column=r,v.source=e,t.silent)l.push(v);else throw v}function s(){var T=h();return{type:"stylesheet",stylesheet:{source:t.source,rules:T,parsingErrors:l}}}function u(){return m(/^{\s*/)}function d(){return m(/^}/)}function h(){var T,v=[];for(p(),g(v);e.length&&e.charAt(0)!=="}"&&(T=_()||B());)T!==!1&&(v.push(T),g(v));return v}function m(T){var v=T.exec(e);if(v){var I=v[0];return o(I),e=e.slice(I.length),v}}function p(){m(/^\s*/)}function g(T){T===void 0&&(T=[]);for(var v;v=N();)v!==!1&&T.push(v),v=N();return T}function N(){var T=i();if(!(e.charAt(0)!=="/"||e.charAt(1)!=="*")){for(var v=2;e.charAt(v)!==""&&(e.charAt(v)!=="*"||e.charAt(v+1)!=="/");)++v;if(v+=2,e.charAt(v-1)==="")return c("End of comment missing");var I=e.slice(2,v-2);return r+=2,o(I),e=e.slice(v),r+=2,T({type:"comment",comment:I})}}function f(){var T=m(/^([^{]+)/);if(T)return ce(T[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(v){return v.replace(/,/g,"\u200C")}).split(/\s*(?![^(]*\)),\s*/).map(function(v){return v.replace(/\u200C/g,",")})}function b(){var T=i(),v=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(v){var I=ce(v[0]);if(!m(/^:\s*/))return c("property missing ':'");var E=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),C=T({type:"declaration",property:I.replace(kt,""),value:E?ce(E[0]).replace(kt,""):""});return m(/^[;\s]*/),C}}function S(){var T=[];if(!u())return c("missing '{'");g(T);for(var v;v=b();)v!==!1&&(T.push(v),g(T)),v=b();return d()?T:c("missing '}'")}function y(){for(var T,v=[],I=i();T=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)v.push(T[1]),m(/^,\s*/);if(v.length)return I({type:"keyframe",values:v,declarations:S()})}function M(){var T=i(),v=m(/^@([-\w]+)?keyframes\s*/);if(v){var I=v[1];if(v=m(/^([-\w]+)\s*/),!v)return c("@keyframes missing name");var E=v[1];if(!u())return c("@keyframes missing '{'");for(var C,J=g();C=y();)J.push(C),J=J.concat(g());return d()?T({type:"keyframes",name:E,vendor:I,keyframes:J}):c("@keyframes missing '}'")}}function D(){var T=i(),v=m(/^@supports *([^{]+)/);if(v){var I=ce(v[1]);if(!u())return c("@supports missing '{'");var E=g().concat(h());return d()?T({type:"supports",supports:I,rules:E}):c("@supports missing '}'")}}function L(){var T=i(),v=m(/^@host\s*/);if(v){if(!u())return c("@host missing '{'");var I=g().concat(h());return d()?T({type:"host",rules:I}):c("@host missing '}'")}}function P(){var T=i(),v=m(/^@media *([^{]+)/);if(v){var I=ce(v[1]);if(!u())return c("@media missing '{'");var E=g().concat(h());return d()?T({type:"media",media:I,rules:E}):c("@media missing '}'")}}function A(){var T=i(),v=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(v)return T({type:"custom-media",name:ce(v[1]),media:ce(v[2])})}function z(){var T=i(),v=m(/^@page */);if(v){var I=f()||[];if(!u())return c("@page missing '{'");for(var E=g(),C;C=b();)E.push(C),E=E.concat(g());return d()?T({type:"page",selectors:I,declarations:E}):c("@page missing '}'")}}function $(){var T=i(),v=m(/^@([-\w]+)?document *([^{]+)/);if(v){var I=ce(v[1]),E=ce(v[2]);if(!u())return c("@document missing '{'");var C=g().concat(h());return d()?T({type:"document",document:E,vendor:I,rules:C}):c("@document missing '}'")}}function K(){var T=i(),v=m(/^@font-face\s*/);if(v){if(!u())return c("@font-face missing '{'");for(var I=g(),E;E=b();)I.push(E),I=I.concat(g());return d()?T({type:"font-face",declarations:I}):c("@font-face missing '}'")}}var Q=X("import"),j=X("charset"),Y=X("namespace");function X(T){var v=new RegExp("^@"+T+"\\s*([^;]+);");return function(){var I=i(),E=m(v);if(E){var C={type:T};return C[T]=E[1].trim(),I(C)}}}function _(){if(e[0]==="@")return M()||P()||A()||D()||Q()||j()||Y()||$()||z()||L()||K()}function B(){var T=i(),v=f();return v?(g(),T({type:"rule",selectors:v,declarations:S()})):c("selector missing")}return et(s())}function ce(e){return e?e.replace(/^\s+|\s+$/g,""):""}function et(e,t){for(var n=e&&typeof e.type=="string",r=n?e:t,o=0,i=Object.keys(e);o<i.length;o++){var a=i[o],l=e[a];Array.isArray(l)?l.forEach(function(c){et(c,r)}):l&&typeof l=="object"&&et(l,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Rt={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function Nr(e){var t=Rt[e.tagName]?Rt[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function Er(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Dt=/([^\\]):hover/,wr=new RegExp(Dt.source,"g");function Ot(e,t){var n;if(!(!((n=window?.HIG_CONFIGURATION)===null||n===void 0)&&n.enableOnHoverClass))return e;var r=t?.stylesWithHoverClass.get(e);if(r)return r;var o=Tr(e,{silent:!0});if(!o.stylesheet)return e;var i=[];if(o.stylesheet.rules.forEach(function(c){"selectors"in c&&(c.selectors||[]).forEach(function(s){Dt.test(s)&&i.push(s)})}),i.length===0)return e;var a=new RegExp(i.filter(function(c,s){return i.indexOf(c)===s}).sort(function(c,s){return s.length-c.length}).map(function(c){return Er(c)}).join("|"),"g"),l=e.replace(a,function(c){var s=c.replace(wr,"$1.\\:hover");return"".concat(c,", ").concat(s)});return t?.stylesWithHoverClass.set(e,l),l}function At(){var e=new Map;return{stylesWithHoverClass:e}}function Cr(e,t){var n=t.doc,r=t.hackCss,o=t.cache;switch(e.type){case k.Document:return n.implementation.createDocument(null,"",null);case k.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case k.Element:var i=Nr(e),a;e.isSVG?a=n.createElementNS("http://www.w3.org/2000/svg",i):a=n.createElement(i);var l=function(d){if(!e.attributes.hasOwnProperty(d))return"continue";var h=e.attributes[d];if(i==="option"&&d==="selected"&&h===!1)return"continue";if(h=typeof h=="boolean"||typeof h=="number"?"":h,d.startsWith("rr_")){if(i==="canvas"&&d==="rr_dataURL"){var m=document.createElement("img");m.src=h,m.onload=function(){var A=a.getContext("2d");A&&A.drawImage(m,0,0,m.width,m.height)}}else if(i==="img"&&d==="rr_dataURL"){var p=a;p.currentSrc.startsWith("data:")||(p.setAttribute("rrweb-original-src",e.attributes.src),p.src=h,p.setAttribute("rrweb-inline-src",h))}if(d==="rr_width")a.style.width=h;else if(d==="rr_height")a.style.height=h;else if(d==="rr_mediaCurrentTime")a.currentTime=e.attributes.rr_mediaCurrentTime;else if(d==="rr_mediaState")switch(h){case"played":a.play().catch(function(A){return console.warn("media playback error",A)});break;case"paused":a.pause();break}}else{var g=i==="textarea"&&d==="value",N=i==="style"&&d==="_cssText";if(N&&r&&(h=Ot(h,o),typeof h=="string")){for(var f=/url\(\"https:\/\/\S*(.eot|.woff2|.ttf|.woff)\S*\"\)/gm,b=void 0,S=[],y="https://replay-cors-proxy.highlightrun.workers.dev";(b=f.exec(h))!==null;)b.index===f.lastIndex&&f.lastIndex++,b.forEach(function(A,z){if(z===0){var $=A.slice(5,A.length-2);S.push({originalUrl:$,proxyUrl:$.replace($,"".concat(y,"?url=").concat($))})}});S.forEach(function(A){h=h.replace(A.originalUrl,A.proxyUrl)})}if(g||N){for(var M=n.createTextNode(h),D=0,L=Array.from(a.childNodes);D<L.length;D++){var P=L[D];P.nodeType===a.TEXT_NODE&&a.removeChild(P)}return a.appendChild(M),"continue"}try{if(e.isSVG&&d==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",d,h);else if(d==="onload"||d==="onclick"||d.substring(0,7)==="onmouse")a.setAttribute("_"+d,h);else{if(i==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&d==="content")return a.setAttribute("csp-content",h),"continue";i==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||i==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")||(i==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",e.attributes.srcset):a.setAttribute(d,h))}}catch{}}};for(var c in e.attributes)l(c);if(i==="img"){var s=a;if(!s.currentSrc.startsWith("data:")){var u=s.getAttribute("rrweb-inline-src");u!=null&&u.startsWith("data:")&&(s.src=u)}}if(e.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a;case k.Text:return n.createTextNode(e.isStyle&&r?Ot(e.textContent,o):e.textContent);case k.CDATA:return n.createCDATASection(e.textContent);case k.Comment:return n.createComment(e.textContent);default:return null}}function je(e,t){var n=t.doc,r=t.mirror,o=t.skipChild,i=o===void 0?!1:o,a=t.hackCss,l=a===void 0?!0:a,c=t.afterAppend,s=t.cache,u=Cr(e,{doc:n,hackCss:l,cache:s});if(!u)return null;if(e.rootId&&console.assert(r.getNode(e.rootId)===n,"Target document should have the same root id."),e.type===k.Document&&(n.close(),n.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==k.DocumentType&&(e.childNodes[0].type===k.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?n.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):n.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),u=n),r.add(u,e),(e.type===k.Document||e.type===k.Element)&&!i)for(var d=0,h=e.childNodes;d<h.length;d++){var m=h[d],p=je(m,{doc:n,mirror:r,skipChild:!1,hackCss:l,afterAppend:c,cache:s});if(!p){console.warn("Failed to rebuild",m);continue}m.isShadow&&Nt(u)&&u.shadowRoot?u.shadowRoot.appendChild(p):u.appendChild(p),c&&c(p)}return u}function Ir(e,t){function n(a){t(a)}for(var r=0,o=e.getIds();r<o.length;r++){var i=o[r];e.has(i)&&n(e.getNode(i))}}function Mr(e,t){var n=t.getMeta(e);if(n?.type===k.Element){var r=e;for(var o in n.attributes)if(n.attributes.hasOwnProperty(o)&&o.startsWith("rr_")){var i=n.attributes[o];o==="rr_scrollLeft"&&(r.scrollLeft=i),o==="rr_scrollTop"&&(r.scrollTop=i)}}}function xr(e,t){var n=t.doc,r=t.onVisit,o=t.hackCss,i=o===void 0?!0:o,a=t.afterAppend,l=t.cache,c=t.mirror,s=c===void 0?new Ke:c,u=je(e,{doc:n,mirror:s,skipChild:!1,hackCss:i,afterAppend:a,cache:l});return Ir(s,function(d){r&&r(d),Mr(d,s)}),u}function te(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Se=`Please stop import mirror directly. Instead of that,\r
1
+ var rrweb=function(q){"use strict";var k;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(k||(k={}));function Et(e){return e.nodeType===e.ELEMENT_NODE}function Re(e){var t=e?.host;return Boolean(t?.shadowRoot===e)}var Ke=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var n;if(!t)return-1;var r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var n=this,r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,n){var r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)},e.prototype.replace=function(t,n){this.idNodeMap.set(t,n)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function wt(){return new Ke}function Qe(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,i=e.maskInputFn,a=o||"";return(t[n.toLowerCase()]||t[r])&&(i?a=i(a):a="*".repeat(a.length)),a}var Ct="__rrweb_original__";function Zn(e){var t=e.getContext("2d");if(!t)return!0;for(var n=50,r=0;r<e.width;r+=n)for(var o=0;o<e.height;o+=n){var i=t.getImageData,a=Ct in i?i[Ct]:i,l=new Uint32Array(a.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer);if(l.some(function(c){return c!==0}))return!1}return!0}function Je(e){return e=e.replace(/[^ -~]+/g,""),e=e?.split(" ").map(function(t){return Math.random().toString(20).substr(2,t.length)}).join(" ")||"",e}var Kn=1,Qn=new RegExp("[^a-z0-9-_:]"),De=-2;function Jn(){return Kn++}function qn(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return Qn.test(t)?"div":t}function qe(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(er).join(""):null}catch{return null}}function er(e){var t=e.cssText;if(tr(e))try{t=qe(e.styleSheet)||t}catch{}return t}function tr(e){return"styleSheet"in e}function nr(e){return e.cssRules?Array.from(e.cssRules).map(function(t){return t.cssText||""}).join(""):""}function rr(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var ye,It,or=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ir=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,sr=/^(data:)([^,]*),(.*)/i;function $e(e,t){return(e||"").replace(or,function(n,r,o,i,a,l){var c=o||a||l,s=r||i||"";if(!c)return n;if(!ir.test(c)||sr.test(c))return"url(".concat(s).concat(c).concat(s,")");if(c[0]==="/")return"url(".concat(s).concat(rr(t)+c).concat(s,")");var u=t.split("/"),d=c.split("/");u.pop();for(var h=0,m=d;h<m.length;h++){var p=m[h];p!=="."&&(p===".."?u.pop():u.push(p))}return"url(".concat(s).concat(u.join("/")).concat(s,")")})}var ar=/^[^ \t\n\r\u000c]+/,lr=/^[, \t\n\r\u000c]+/;function cr(e,t){if(t.trim()==="")return t;var n=0;function r(s){var u,d=s.exec(t.substring(n));return d?(u=d[0],n+=u.length,u):""}for(var o=[];r(lr),!(n>=t.length);){var i=r(ar);if(i.slice(-1)===",")i=Ve(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=Ve(e,i);for(var l=!1;;){var c=t.charAt(n);if(c===""){o.push((i+a).trim());break}else if(l)c===")"&&(l=!1);else if(c===","){n+=1,o.push((i+a).trim());break}else c==="("&&(l=!0);a+=c,n+=1}}}return o.join(", ")}function Ve(e,t){if(!t||t.trim()==="")return t;var n=e.createElement("a");return n.href=t,n.href}function ur(e){return Boolean(e.tagName==="svg"||e.ownerSVGElement)}function et(){var e=document.createElement("a");return e.href="",e.href}function Mt(e,t,n,r){return n==="src"||n==="href"&&r||n==="xlink:href"&&r&&r[0]!=="#"||n==="background"&&r&&(t==="table"||t==="td"||t==="th")?Ve(e,r):n==="srcset"&&r?cr(e,r):n==="style"&&r?$e(r,et()):t==="object"&&n==="data"&&r?Ve(e,r):r}function dr(e,t,n){if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return n?e.matches(n):!1}function Ue(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?Ue(e.parentNode,t,n):!1;for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return n?Ue(e.parentNode,t,n):!1}function xt(e,t,n){var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(r===null)return!1;if(typeof t=="string"){if(r.classList.contains(t)||r.closest(".".concat(t)))return!0}else if(Ue(r,t,!0))return!0;return!!(n&&(r.matches(n)||r.closest(n)))}function hr(e,t,n){var r=e.contentWindow;if(r){var o=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){var a=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(a),o=!0,t()});return}var l="about:blank";if(r.location.href!==l||e.src===l||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function mr(e){return e.getAttribute("href")?e.sheet!==null:!0}function pr(e,t,n){var r=!1,o;try{o=e.sheet}catch{return}if(!o){var i=setTimeout(function(){r||(t(),r=!0)},n);e.addEventListener("load",function(){clearTimeout(i),r=!0,t()})}}function fr(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,i=t.blockSelector,a=t.maskTextClass,l=t.maskTextSelector,c=t.inlineStylesheet,s=t.maskInputOptions,u=s===void 0?{}:s,d=t.maskTextFn,h=t.maskInputFn,m=t.dataURLOptions,p=m===void 0?{}:m,g=t.inlineImages,N=t.recordCanvas,f=t.keepIframeSrcFn,b=t.newlyAddedElement,S=b===void 0?!1:b,y=t.enableStrictPrivacy,M=gr(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:k.Document,childNodes:[],compatMode:e.compatMode,rootId:M}:{type:k.Document,childNodes:[],rootId:M};case e.DOCUMENT_TYPE_NODE:return{type:k.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:M};case e.ELEMENT_NODE:return yr(e,{doc:n,blockClass:o,blockSelector:i,inlineStylesheet:c,maskInputOptions:u,maskInputFn:h,dataURLOptions:p,inlineImages:g,recordCanvas:N,keepIframeSrcFn:f,newlyAddedElement:S,enableStrictPrivacy:y,rootId:M});case e.TEXT_NODE:return vr(e,{maskTextClass:a,maskTextSelector:l,maskTextFn:d,enableStrictPrivacy:y,rootId:M});case e.CDATA_SECTION_NODE:return{type:k.CDATA,textContent:"",rootId:M};case e.COMMENT_NODE:return{type:k.Comment,textContent:e.textContent||"",rootId:M};default:return!1}}function gr(e,t){if(t.hasNode(e)){var n=t.getId(e);return n===1?void 0:n}}function vr(e,t){var n,r=t.maskTextClass,o=t.maskTextSelector,i=t.maskTextFn,a=t.enableStrictPrivacy,l=t.rootId,c=e.parentNode&&e.parentNode.tagName,s=e.textContent,u=c==="STYLE"?!0:void 0,d=c==="SCRIPT"?!0:void 0,h=!1;if(u&&s){try{e.nextSibling||e.previousSibling||!((n=e.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(s=nr(e.parentNode.sheet))}catch(p){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(p),e)}s=$e(s,et()),h=!0}if(d?(s="SCRIPT_PLACEHOLDER",h=!0):c==="NOSCRIPT"&&(s="",h=!0),!u&&!d&&s&&xt(e,r,o)&&(s=i?i(s):s.replace(/[\S]/g,"*")),a&&!h&&c){var m=new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]);!m.has(c)&&s&&(s=Je(s))}return{type:k.Text,textContent:s||"",isStyle:u,rootId:l}}function yr(e,t){for(var n=t.doc,r=t.blockClass,o=t.blockSelector,i=t.inlineStylesheet,a=t.maskInputOptions,l=a===void 0?{}:a,c=t.maskInputFn,s=t.dataURLOptions,u=s===void 0?{}:s,d=t.inlineImages,h=t.recordCanvas,m=t.keepIframeSrcFn,p=t.newlyAddedElement,g=p===void 0?!1:p,N=t.enableStrictPrivacy,f=t.rootId,b=dr(e,r,o),S=qn(e),y={},M=e.attributes.length,D=0;D<M;D++){var L=e.attributes[D];y[L.name]=Mt(n,S,L.name,L.value)}if(S==="link"&&i){var P=Array.from(n.styleSheets).find(function(v){return v.href===e.href}),A=null;P&&(A=qe(P)),A&&(delete y.rel,delete y.href,y._cssText=$e(A,P.href))}if(S==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var A=qe(e.sheet);A&&(y._cssText=$e(A,et()))}if(S==="input"||S==="textarea"||S==="select"){var z=e.value;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&z?y.value=Qe({type:y.type,tagName:S,value:z,maskInputOptions:l,maskInputFn:c}):e.checked&&(y.checked=e.checked)}if(S==="option"&&(e.selected&&!l.select?y.selected=!0:delete y.selected),S==="canvas"&&h){if(e.__context==="2d")Zn(e)||(y.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){var $=e.toDataURL(u.type,u.quality),K=document.createElement("canvas");K.width=e.width,K.height=e.height;var Q=K.toDataURL(u.type,u.quality);$!==Q&&(y.rr_dataURL=$)}}if(S==="img"&&d){ye||(ye=n.createElement("canvas"),It=ye.getContext("2d"));var j=e,Y=j.crossOrigin;j.crossOrigin="anonymous";var X=function(){try{ye.width=j.naturalWidth,ye.height=j.naturalHeight,It.drawImage(j,0,0),y.rr_dataURL=ye.toDataURL(u.type,u.quality)}catch(v){console.warn("Cannot inline img src=".concat(j.currentSrc,"! Error: ").concat(v))}Y?y.crossOrigin=Y:j.removeAttribute("crossorigin")};j.complete&&j.naturalWidth!==0?X():j.onload=X}if((S==="audio"||S==="video")&&(y.rr_mediaState=e.paused?"paused":"played",y.rr_mediaCurrentTime=e.currentTime),g||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop)),b||S==="img"&&N){var _=e.getBoundingClientRect(),B=_.width,T=_.height;y={class:y.class,rr_width:"".concat(B,"px"),rr_height:"".concat(T,"px")},b=!0}return S==="iframe"&&!m(y.src)&&(e.contentDocument||(y.rr_src=y.src),delete y.src),{type:k.Element,tagName:S,attributes:y,childNodes:[],isSVG:ur(e)||void 0,needBlock:b,rootId:f}}function W(e){return e===void 0?"":e.toLowerCase()}function br(e,t){return!!(t.comment&&e.type===k.Comment||e.type===k.Element&&(t.script&&(e.tagName==="script"||e.tagName==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js"))||t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(W(e.attributes.name).match(/^msapplication-tile(image|color)$/)||W(e.attributes.name)==="application-name"||W(e.attributes.rel)==="icon"||W(e.attributes.rel)==="apple-touch-icon"||W(e.attributes.rel)==="shortcut icon"))||e.tagName==="meta"&&(t.headMetaDescKeywords&&W(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(W(e.attributes.property).match(/^(og|twitter|fb):/)||W(e.attributes.name).match(/^(og|twitter):/)||W(e.attributes.name)==="pinterest")||t.headMetaRobots&&(W(e.attributes.name)==="robots"||W(e.attributes.name)==="googlebot"||W(e.attributes.name)==="bingbot")||t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0||t.headMetaAuthorship&&(W(e.attributes.name)==="author"||W(e.attributes.name)==="generator"||W(e.attributes.name)==="framework"||W(e.attributes.name)==="publisher"||W(e.attributes.name)==="progid"||W(e.attributes.property).match(/^article:/)||W(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(W(e.attributes.name)==="google-site-verification"||W(e.attributes.name)==="yandex-verification"||W(e.attributes.name)==="csrf-token"||W(e.attributes.name)==="p:domain_verify"||W(e.attributes.name)==="verify-v1"||W(e.attributes.name)==="verification"||W(e.attributes.name)==="shopify-checkout-api-token"))))}function be(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,i=t.blockSelector,a=t.maskTextClass,l=t.maskTextSelector,c=t.skipChild,s=c===void 0?!1:c,u=t.inlineStylesheet,d=u===void 0?!0:u,h=t.maskInputOptions,m=h===void 0?{}:h,p=t.maskTextFn,g=t.maskInputFn,N=t.slimDOMOptions,f=t.dataURLOptions,b=f===void 0?{}:f,S=t.inlineImages,y=S===void 0?!1:S,M=t.recordCanvas,D=M===void 0?!1:M,L=t.onSerialize,P=t.onIframeLoad,A=t.iframeLoadTimeout,z=A===void 0?5e3:A,$=t.onStylesheetLoad,K=t.stylesheetLoadTimeout,Q=K===void 0?5e3:K,j=t.keepIframeSrcFn,Y=j===void 0?function(){return!1}:j,X=t.newlyAddedElement,_=X===void 0?!1:X,B=t.enableStrictPrivacy,T=t.preserveWhiteSpace,v=T===void 0?!0:T,I=fr(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:l,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:g,dataURLOptions:b,inlineImages:y,recordCanvas:D,keepIframeSrcFn:Y,newlyAddedElement:_,enableStrictPrivacy:B});if(!I)return console.warn(e,"not serialized"),null;var E;if(r.hasNode(e)?E=r.getId(e):br(I,N)||!v&&I.type===k.Text&&!I.isStyle&&!I.textContent.replace(/^\s+|\s+$/gm,"").length?E=De:E=Jn(),E===De)return null;var C=Object.assign(I,{id:E});r.add(e,C),L&&L(e);var J=!s;if(C.type===k.Element){if(J=J&&!C.needBlock,C.needBlock&&C.tagName==="img"){var ee=e.cloneNode();ee.src="",r.add(ee,C)}delete C.needBlock,e.shadowRoot&&(C.isShadowHost=!0)}if((C.type===k.Document||C.type===k.Element)&&J){N.headWhitespace&&C.type===k.Element&&C.tagName==="head"&&(v=!1);for(var le={doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:l,skipChild:s,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:g,slimDOMOptions:N,dataURLOptions:b,inlineImages:y,recordCanvas:D,preserveWhiteSpace:v,onSerialize:L,onIframeLoad:P,iframeLoadTimeout:z,onStylesheetLoad:$,stylesheetLoadTimeout:Q,keepIframeSrcFn:Y,enableStrictPrivacy:B},F=0,U=Array.from(e.childNodes);F<U.length;F++){var ve=U[F],xe=be(ve,le);xe&&C.childNodes.push(xe)}if(Et(e)&&e.shadowRoot)for(var Nt=0,Hn=Array.from(e.shadowRoot.childNodes);Nt<Hn.length;Nt++){var ve=Hn[Nt],xe=be(ve,le);xe&&(xe.isShadow=!0,C.childNodes.push(xe))}}return e.parentNode&&Re(e.parentNode)&&(C.isShadow=!0),C.type===k.Element&&C.tagName==="iframe"&&hr(e,function(){var ke=e.contentDocument;if(ke&&P){var Yn=be(ke,{doc:ke,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:g,slimDOMOptions:N,dataURLOptions:b,inlineImages:y,recordCanvas:D,preserveWhiteSpace:v,onSerialize:L,onIframeLoad:P,iframeLoadTimeout:z,onStylesheetLoad:$,stylesheetLoadTimeout:Q,keepIframeSrcFn:Y,enableStrictPrivacy:B});Yn&&P(e,Yn)}},z),C.type===k.Element&&C.tagName==="link"&&C.attributes.rel==="stylesheet"&&(pr(e,function(){if($){var ke=be(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:g,slimDOMOptions:N,dataURLOptions:b,inlineImages:y,recordCanvas:D,preserveWhiteSpace:v,onSerialize:L,onIframeLoad:P,iframeLoadTimeout:z,onStylesheetLoad:$,stylesheetLoadTimeout:Q,keepIframeSrcFn:Y,enableStrictPrivacy:B});ke&&$(e,ke)}},Q),mr(e)===!1)?null:C}function Sr(e,t){var n=t||{},r=n.mirror,o=r===void 0?new Ke:r,i=n.blockClass,a=i===void 0?"highlight-block":i,l=n.blockSelector,c=l===void 0?null:l,s=n.maskTextClass,u=s===void 0?"highlight-mask":s,d=n.maskTextSelector,h=d===void 0?null:d,m=n.inlineStylesheet,p=m===void 0?!0:m,g=n.inlineImages,N=g===void 0?!1:g,f=n.recordCanvas,b=f===void 0?!1:f,S=n.maskAllInputs,y=S===void 0?!1:S,M=n.maskTextFn,D=n.maskInputFn,L=n.slimDOM,P=L===void 0?!1:L,A=n.dataURLOptions,z=n.preserveWhiteSpace,$=n.onSerialize,K=n.onIframeLoad,Q=n.iframeLoadTimeout,j=n.onStylesheetLoad,Y=n.stylesheetLoadTimeout,X=n.keepIframeSrcFn,_=X===void 0?function(){return!1}:X,B=n.enableStrictPrivacy,T=B===void 0?!1:B,v=y===!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}:y===!1?{password:!0}:y,I=P===!0||P==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:P==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:P===!1?{}:P;return be(e,{doc:e,mirror:o,blockClass:a,blockSelector:c,maskTextClass:u,maskTextSelector:h,skipChild:!1,inlineStylesheet:p,maskInputOptions:v,maskTextFn:M,maskInputFn:D,slimDOMOptions:I,dataURLOptions:A,inlineImages:N,recordCanvas:b,preserveWhiteSpace:z,onSerialize:$,onIframeLoad:K,iframeLoadTimeout:Q,onStylesheetLoad:j,stylesheetLoadTimeout:Y,keepIframeSrcFn:_,newlyAddedElement:!1,enableStrictPrivacy:T})}var kt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Tr(e,t){t===void 0&&(t={});var n=1,r=1;function o(T){var v=T.match(/\n/g);v&&(n+=v.length);var I=T.lastIndexOf(`
2
+ `);r=I===-1?r+T.length:T.length-I}function i(){var T={line:n,column:r};return function(v){return v.position=new a(T),p(),v}}var a=function(){function T(v){this.start=v,this.end={line:n,column:r},this.source=t.source}return T}();a.prototype.content=e;var l=[];function c(T){var v=new Error(t.source+":"+n+":"+r+": "+T);if(v.reason=T,v.filename=t.source,v.line=n,v.column=r,v.source=e,t.silent)l.push(v);else throw v}function s(){var T=h();return{type:"stylesheet",stylesheet:{source:t.source,rules:T,parsingErrors:l}}}function u(){return m(/^{\s*/)}function d(){return m(/^}/)}function h(){var T,v=[];for(p(),g(v);e.length&&e.charAt(0)!=="}"&&(T=_()||B());)T!==!1&&(v.push(T),g(v));return v}function m(T){var v=T.exec(e);if(v){var I=v[0];return o(I),e=e.slice(I.length),v}}function p(){m(/^\s*/)}function g(T){T===void 0&&(T=[]);for(var v;v=N();)v!==!1&&T.push(v),v=N();return T}function N(){var T=i();if(!(e.charAt(0)!=="/"||e.charAt(1)!=="*")){for(var v=2;e.charAt(v)!==""&&(e.charAt(v)!=="*"||e.charAt(v+1)!=="/");)++v;if(v+=2,e.charAt(v-1)==="")return c("End of comment missing");var I=e.slice(2,v-2);return r+=2,o(I),e=e.slice(v),r+=2,T({type:"comment",comment:I})}}function f(){var T=m(/^([^{]+)/);if(T)return ce(T[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(v){return v.replace(/,/g,"\u200C")}).split(/\s*(?![^(]*\)),\s*/).map(function(v){return v.replace(/\u200C/g,",")})}function b(){var T=i(),v=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(v){var I=ce(v[0]);if(!m(/^:\s*/))return c("property missing ':'");var E=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),C=T({type:"declaration",property:I.replace(kt,""),value:E?ce(E[0]).replace(kt,""):""});return m(/^[;\s]*/),C}}function S(){var T=[];if(!u())return c("missing '{'");g(T);for(var v;v=b();)v!==!1&&(T.push(v),g(T)),v=b();return d()?T:c("missing '}'")}function y(){for(var T,v=[],I=i();T=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)v.push(T[1]),m(/^,\s*/);if(v.length)return I({type:"keyframe",values:v,declarations:S()})}function M(){var T=i(),v=m(/^@([-\w]+)?keyframes\s*/);if(v){var I=v[1];if(v=m(/^([-\w]+)\s*/),!v)return c("@keyframes missing name");var E=v[1];if(!u())return c("@keyframes missing '{'");for(var C,J=g();C=y();)J.push(C),J=J.concat(g());return d()?T({type:"keyframes",name:E,vendor:I,keyframes:J}):c("@keyframes missing '}'")}}function D(){var T=i(),v=m(/^@supports *([^{]+)/);if(v){var I=ce(v[1]);if(!u())return c("@supports missing '{'");var E=g().concat(h());return d()?T({type:"supports",supports:I,rules:E}):c("@supports missing '}'")}}function L(){var T=i(),v=m(/^@host\s*/);if(v){if(!u())return c("@host missing '{'");var I=g().concat(h());return d()?T({type:"host",rules:I}):c("@host missing '}'")}}function P(){var T=i(),v=m(/^@media *([^{]+)/);if(v){var I=ce(v[1]);if(!u())return c("@media missing '{'");var E=g().concat(h());return d()?T({type:"media",media:I,rules:E}):c("@media missing '}'")}}function A(){var T=i(),v=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(v)return T({type:"custom-media",name:ce(v[1]),media:ce(v[2])})}function z(){var T=i(),v=m(/^@page */);if(v){var I=f()||[];if(!u())return c("@page missing '{'");for(var E=g(),C;C=b();)E.push(C),E=E.concat(g());return d()?T({type:"page",selectors:I,declarations:E}):c("@page missing '}'")}}function $(){var T=i(),v=m(/^@([-\w]+)?document *([^{]+)/);if(v){var I=ce(v[1]),E=ce(v[2]);if(!u())return c("@document missing '{'");var C=g().concat(h());return d()?T({type:"document",document:E,vendor:I,rules:C}):c("@document missing '}'")}}function K(){var T=i(),v=m(/^@font-face\s*/);if(v){if(!u())return c("@font-face missing '{'");for(var I=g(),E;E=b();)I.push(E),I=I.concat(g());return d()?T({type:"font-face",declarations:I}):c("@font-face missing '}'")}}var Q=X("import"),j=X("charset"),Y=X("namespace");function X(T){var v=new RegExp("^@"+T+"\\s*([^;]+);");return function(){var I=i(),E=m(v);if(E){var C={type:T};return C[T]=E[1].trim(),I(C)}}}function _(){if(e[0]==="@")return M()||P()||A()||D()||Q()||j()||Y()||$()||z()||L()||K()}function B(){var T=i(),v=f();return v?(g(),T({type:"rule",selectors:v,declarations:S()})):c("selector missing")}return tt(s())}function ce(e){return e?e.replace(/^\s+|\s+$/g,""):""}function tt(e,t){for(var n=e&&typeof e.type=="string",r=n?e:t,o=0,i=Object.keys(e);o<i.length;o++){var a=i[o],l=e[a];Array.isArray(l)?l.forEach(function(c){tt(c,r)}):l&&typeof l=="object"&&tt(l,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Rt={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function Nr(e){var t=Rt[e.tagName]?Rt[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function Er(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Dt=/([^\\]):hover/,wr=new RegExp(Dt.source,"g");function Ot(e,t){var n;if(!(!((n=window?.HIG_CONFIGURATION)===null||n===void 0)&&n.enableOnHoverClass))return e;var r=t?.stylesWithHoverClass.get(e);if(r)return r;var o=Tr(e,{silent:!0});if(!o.stylesheet)return e;var i=[];if(o.stylesheet.rules.forEach(function(c){"selectors"in c&&(c.selectors||[]).forEach(function(s){Dt.test(s)&&i.push(s)})}),i.length===0)return e;var a=new RegExp(i.filter(function(c,s){return i.indexOf(c)===s}).sort(function(c,s){return s.length-c.length}).map(function(c){return Er(c)}).join("|"),"g"),l=e.replace(a,function(c){var s=c.replace(wr,"$1.\\:hover");return"".concat(c,", ").concat(s)});return t?.stylesWithHoverClass.set(e,l),l}function At(){var e=new Map;return{stylesWithHoverClass:e}}function Cr(e,t){var n=t.doc,r=t.hackCss,o=t.cache;switch(e.type){case k.Document:return n.implementation.createDocument(null,"",null);case k.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case k.Element:var i=Nr(e),a;e.isSVG?a=n.createElementNS("http://www.w3.org/2000/svg",i):a=n.createElement(i);var l=function(d){if(!e.attributes.hasOwnProperty(d))return"continue";var h=e.attributes[d];if(i==="option"&&d==="selected"&&h===!1)return"continue";if(h=typeof h=="boolean"||typeof h=="number"?"":h,d.startsWith("rr_")){if(i==="canvas"&&d==="rr_dataURL"){var m=document.createElement("img");m.src=h,m.onload=function(){var A=a.getContext("2d");A&&A.drawImage(m,0,0,m.width,m.height)}}else if(i==="img"&&d==="rr_dataURL"){var p=a;p.currentSrc.startsWith("data:")||(p.setAttribute("rrweb-original-src",e.attributes.src),p.src=h,p.setAttribute("rrweb-inline-src",h))}if(d==="rr_width")a.style.width=h;else if(d==="rr_height")a.style.height=h;else if(d==="rr_mediaCurrentTime")a.currentTime=e.attributes.rr_mediaCurrentTime;else if(d==="rr_mediaState")switch(h){case"played":a.play().catch(function(A){return console.warn("media playback error",A)});break;case"paused":a.pause();break}}else{var g=i==="textarea"&&d==="value",N=i==="style"&&d==="_cssText";if(N&&r&&(h=Ot(h,o),typeof h=="string")){for(var f=/url\(\"https:\/\/\S*(.eot|.woff2|.ttf|.woff)\S*\"\)/gm,b=void 0,S=[],y="https://replay-cors-proxy.highlightrun.workers.dev";(b=f.exec(h))!==null;)b.index===f.lastIndex&&f.lastIndex++,b.forEach(function(A,z){if(z===0){var $=A.slice(5,A.length-2);S.push({originalUrl:$,proxyUrl:$.replace($,"".concat(y,"?url=").concat($))})}});S.forEach(function(A){h=h.replace(A.originalUrl,A.proxyUrl)})}if(g||N){for(var M=n.createTextNode(h),D=0,L=Array.from(a.childNodes);D<L.length;D++){var P=L[D];P.nodeType===a.TEXT_NODE&&a.removeChild(P)}return a.appendChild(M),"continue"}try{if(e.isSVG&&d==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",d,h);else if(d==="onload"||d==="onclick"||d.substring(0,7)==="onmouse")a.setAttribute("_"+d,h);else{if(i==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&d==="content")return a.setAttribute("csp-content",h),"continue";i==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||i==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")||(i==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",e.attributes.srcset):a.setAttribute(d,h))}}catch{}}};for(var c in e.attributes)l(c);if(i==="img"){var s=a;if(!s.currentSrc.startsWith("data:")){var u=s.getAttribute("rrweb-inline-src");u!=null&&u.startsWith("data:")&&(s.src=u)}}if(e.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a;case k.Text:return n.createTextNode(e.isStyle&&r?Ot(e.textContent,o):e.textContent);case k.CDATA:return n.createCDATASection(e.textContent);case k.Comment:return n.createComment(e.textContent);default:return null}}function je(e,t){var n=t.doc,r=t.mirror,o=t.skipChild,i=o===void 0?!1:o,a=t.hackCss,l=a===void 0?!0:a,c=t.afterAppend,s=t.cache,u=Cr(e,{doc:n,hackCss:l,cache:s});if(!u)return null;if(e.rootId&&console.assert(r.getNode(e.rootId)===n,"Target document should have the same root id."),e.type===k.Document&&(n.close(),n.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==k.DocumentType&&(e.childNodes[0].type===k.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?n.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):n.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),u=n),r.add(u,e),(e.type===k.Document||e.type===k.Element)&&!i)for(var d=0,h=e.childNodes;d<h.length;d++){var m=h[d],p=je(m,{doc:n,mirror:r,skipChild:!1,hackCss:l,afterAppend:c,cache:s});if(!p){console.warn("Failed to rebuild",m);continue}m.isShadow&&Et(u)&&u.shadowRoot?u.shadowRoot.appendChild(p):u.appendChild(p),c&&c(p)}return u}function Ir(e,t){function n(a){t(a)}for(var r=0,o=e.getIds();r<o.length;r++){var i=o[r];e.has(i)&&n(e.getNode(i))}}function Mr(e,t){var n=t.getMeta(e);if(n?.type===k.Element){var r=e;for(var o in n.attributes)if(n.attributes.hasOwnProperty(o)&&o.startsWith("rr_")){var i=n.attributes[o];o==="rr_scrollLeft"&&(r.scrollLeft=i),o==="rr_scrollTop"&&(r.scrollTop=i)}}}function xr(e,t){var n=t.doc,r=t.onVisit,o=t.hackCss,i=o===void 0?!0:o,a=t.afterAppend,l=t.cache,c=t.mirror,s=c===void 0?new Ke:c,u=je(e,{doc:n,mirror:s,skipChild:!1,hackCss:i,afterAppend:a,cache:l});return Ir(s,function(d){r&&r(d),Mr(d,s)}),u}function te(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Se=`Please stop import mirror directly. Instead of that,\r
3
3
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
4
- or you can use record.mirror to access the mirror instance during recording.`;q.mirror={map:{},getId(){return console.error(Se),-1},getNode(){return console.error(Se),null},removeNodeFromMap(){console.error(Se)},has(){return console.error(Se),!1},reset(){console.error(Se)}},typeof window<"u"&&window.Proxy&&window.Reflect&&(q.mirror=new Proxy(q.mirror,{get(e,t,n){return t==="map"&&console.error(Se),Reflect.get(e,t,n)}}));function Te(e,t,n={}){let r=null,o=0;return function(i){const a=Date.now();!o&&n.leading===!1&&(o=a);const l=t-(a-o),c=this,s=arguments;l<=0||l>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(c,s)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,s)},l))}}function Oe(e,t,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(a){setTimeout(()=>{n.set.call(this,a)},0),i&&i.set&&i.set.call(this,a)}}),()=>Oe(e,t,i||{},!0)}function he(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}function tt(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function nt(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}const Lt=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch{return!1}return!1};function ne(e,t,n){if(!e)return!1;const r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!r)return!1;if(typeof t=="string"){if(r.classList.contains(t)||n&&r.closest("."+t)!==null)return!0}else if(Ue(r,t,n))return!0;return!1}function Pt(e,t){return t.getId(e)!==-1}function Be(e,t){return t.getId(e)===De}function rt(e,t){if(Re(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?rt(e.parentNode,t):!0:!0}function ot(e){return Boolean(e.changedTouches)}function it(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(t){if(!(0 in arguments))throw new TypeError("1 argument is required");do if(this===t)return!0;while(t=t&&t.parentNode);return!1})}function _t(e){const t={},n=(o,i)=>{const a={value:o,parent:i,children:[]};return t[o.node.id]=a,a},r=[];for(const o of e){const{nextId:i,parentId:a}=o;if(i&&i in t){const l=t[i];if(l.parent){const c=l.parent.children.indexOf(l);l.parent.children.splice(c,0,n(o,l.parent))}else{const c=r.indexOf(l);r.splice(c,0,n(o,null))}continue}if(a in t){const l=t[a];l.children.push(n(o,l));continue}r.push(n(o,null))}return r}function st(e,t){t(e.value);for(let n=e.children.length-1;n>=0;n--)st(e.children[n],t)}function Ne(e,t){return Boolean(e.nodeName==="IFRAME"&&t.getMeta(e))}function at(e,t){return Boolean(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function lt(e,t){var n,r;const o=(r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement;if(!o||o===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const i=o.getBoundingClientRect(),a=lt(o,t),l=i.height/o.clientHeight;return{x:i.x*a.relativeScale+a.x,y:i.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}}function Ae(e){return Boolean(e?.shadowRoot)}function Ee(e,t){const n=e[t[0]];return t.length===1?n:Ee(n.cssRules[t[1]].cssRules,t.slice(2))}function ct(e){const t=[...e],n=t.pop();return{positions:t,index:n}}function Ft(e){const t=new Set,n=[];for(let r=e.length;r--;){const o=e[r];t.has(o.id)||(n.push(o),t.add(o.id))}return n}var kr=Object.freeze({__proto__:null,on:te,get _mirror(){return q.mirror},throttle:Te,hookSetter:Oe,patch:he,getWindowHeight:tt,getWindowWidth:nt,isCanvasNode:Lt,isBlocked:ne,isSerialized:Pt,isIgnored:Be,isAncestorRemoved:rt,isTouchEvent:ot,polyfill:it,queueToResolveTrees:_t,iterateResolveTree:st,isSerializedIframe:Ne,isSerializedStylesheet:at,getBaseDimension:lt,hasShadowRoot:Ae,getNestedRule:Ee,getPositionsAndIndex:ct,uniqueTextMutations:Ft}),w=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(w||{}),x=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e))(x||{}),H=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(H||{}),ue=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ue||{}),me=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e))(me||{}),O=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e))(O||{});function Wt(e){return"__ln"in e}class Rr{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Wt(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Wt(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;this.length++}removeNode(t){const n=t.__ln;!this.head||(n.previous?(n.previous.next=n.next,n.next&&(n.next.previous=n.previous)):(this.head=n.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}}const $t=(e,t)=>`${e}@${t}`;class Dr{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Rr,r=l=>{let c=l,s=De;for(;s===De;)c=c&&c.nextSibling,s=c&&this.mirror.getId(c);return s},o=l=>{var c,s,u,d,h;const m=l.getRootNode?(c=l.getRootNode())==null?void 0:c.host:null;let p=m;for(;(u=(s=p?.getRootNode)==null?void 0:s.call(p))!=null&&u.host;)p=((h=(d=p?.getRootNode)==null?void 0:d.call(p))==null?void 0:h.host)||null;const g=!this.doc.contains(l)&&(!p||!this.doc.contains(p));if(!l.parentNode||g)return;const N=Re(l.parentNode)?this.mirror.getId(m):this.mirror.getId(l.parentNode),f=r(l);if(N===-1||f===-1)return n.addNode(l);const b=be(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,enableStrictPrivacy:this.enableStrictPrivacy,onSerialize:S=>{Ne(S,this.mirror)&&this.iframeManager.addIframe(S),at(S,this.mirror)&&this.stylesheetManager.addStylesheet(S),Ae(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,document)},onIframeLoad:(S,y)=>{this.iframeManager.attachIframe(S,y,this.mirror),this.shadowDomManager.observeAttachShadow(S)},onStylesheetLoad:(S,y)=>{this.stylesheetManager.attachStylesheet(S,y,this.mirror)},newlyAddedElement:!0});b&&t.push({parentId:N,nextId:f,node:b})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of Array.from(this.movedSet.values()))Vt(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||o(l);for(const l of Array.from(this.addedSet.values()))!jt(this.droppedSet,l)&&!Vt(this.removes,l,this.mirror)||jt(this.movedSet,l)?o(l):this.droppedSet.add(l);let i=null;for(;n.length;){let l=null;if(i){const c=this.mirror.getId(i.value.parentNode),s=r(i.value);c!==-1&&s!==-1&&(l=i)}if(!l)for(let c=n.length-1;c>=0;c--){const s=n.get(c);if(s){const u=this.mirror.getId(s.value.parentNode),d=r(s.value);if(u!==-1&&d!==-1){l=s;break}}}if(!l){for(;n.head;)n.removeNode(n.head.value);break}i=l.previous,n.removeNode(l.value),o(l.value)}const a={texts:this.texts.map(l=>{let c=l.value;return this.enableStrictPrivacy&&c&&(c=Ct(c)),{id:this.mirror.getId(l.node),value:c}}).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>({id:this.mirror.getId(l.node),attributes:l.attributes})).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!Be(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!ne(t.target,this.blockClass,!1)&&n!==t.oldValue&&this.texts.push({value:xt(t.target,this.maskTextClass,this.maskTextSelector)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.target.getAttribute(t.attributeName);if(t.attributeName==="value"&&(r=Qe({maskInputOptions:this.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),ne(t.target,this.blockClass,!1)||r===t.oldValue)return;let o=this.attributes.find(i=>i.node===t.target);if(n.tagName==="IFRAME"&&t.attributeName==="src"&&!this.keepIframeSrcFn(r))if(!n.contentDocument)t.attributeName="rr_src";else return;if(o||(o={node:t.target,attributes:{}},this.attributes.push(o)),t.attributeName==="style"){const i=this.doc.createElement("span");t.oldValue&&i.setAttribute("style",t.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});const a=o.attributes.style;for(const l of Array.from(n.style)){const c=n.style.getPropertyValue(l),s=n.style.getPropertyPriority(l);(c!==i.style.getPropertyValue(l)||s!==i.style.getPropertyPriority(l))&&(s===""?a[l]=c:a[l]=[c,s])}for(const l of Array.from(i.style))n.style.getPropertyValue(l)===""&&(a[l]=!1)}else{if(t.target.tagName==="INPUT"){const i=t.target;if(i.type==="password"){o.attributes.value="*".repeat(i.value.length);break}}o.attributes[t.attributeName]=Mt(this.doc,n.tagName,t.attributeName,r)}break}case"childList":{if(ne(t.target,this.blockClass,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=Re(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);ne(t.target,this.blockClass,!1)||Be(n,this.mirror)||!Pt(n,this.mirror)||(this.addedSet.has(n)?(ut(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||rt(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[$t(r,o)]?ut(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:Re(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(this.mirror.hasNode(t)){if(Be(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[$t(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ne(t,this.blockClass,!1)||t.childNodes.forEach(r=>this.genAdds(r))}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","enableStrictPrivacy"].forEach(n=>{this[n]=t[n]})}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 ut(e,t){e.delete(t),t.childNodes.forEach(n=>ut(e,n))}function Vt(e,t,n){return e.length===0?!1:Ut(e,t,n)}function Ut(e,t,n){const{parentNode:r}=t;if(!r)return!1;const o=n.getId(r);return e.some(i=>i.id===o)?!0:Ut(e,r,n)}function jt(e,t){return e.size===0?!1:Bt(e,t)}function Bt(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Bt(e,n):!1}var Or=Object.defineProperty,Ar=Object.defineProperties,Lr=Object.getOwnPropertyDescriptors,Gt=Object.getOwnPropertySymbols,Pr=Object.prototype.hasOwnProperty,_r=Object.prototype.propertyIsEnumerable,zt=(e,t,n)=>t in e?Or(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ht=(e,t)=>{for(var n in t||(t={}))Pr.call(t,n)&&zt(e,n,t[n]);if(Gt)for(var n of Gt(t))_r.call(t,n)&&zt(e,n,t[n]);return e},Fr=(e,t)=>Ar(e,Lr(t));const pe=[],Yt=typeof CSSGroupingRule<"u",Xt=typeof CSSMediaRule<"u",Zt=typeof CSSSupportsRule<"u",Kt=typeof CSSConditionRule<"u";function Le(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch{return e.target}}function Qt(e,t){var n,r;const o=new Dr;pe.push(o),o.init(e);let i=window.MutationObserver||window.__rrMutationObserver;const a=(r=(n=window?.Zone)==null?void 0:n.__symbol__)==null?void 0:r.call(n,"MutationObserver");a&&window[a]&&(i=window[a]);const l=new i(o.processMutations.bind(o));return l.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),l}function Wr({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let a=[],l;const c=Te(d=>{const h=Date.now()-l;e(a.map(m=>(m.timeOffset-=h,m)),d),a=[],l=null},i),s=Te(d=>{const h=Le(d),{clientX:m,clientY:p}=ot(d)?d.changedTouches[0]:d;l||(l=Date.now()),a.push({x:m,y:p,id:r.getId(h),timeOffset:Date.now()-l}),c(typeof DragEvent<"u"&&d instanceof DragEvent?x.Drag:d instanceof MouseEvent?x.MouseMove:x.TouchMove)},o,{trailing:!1}),u=[te("mousemove",s,n),te("touchmove",s,n),te("drag",s,n)];return()=>{u.forEach(d=>d())}}function $r({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const i=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[],l=c=>s=>{const u=Le(s);if(ne(u,r,!0)||Lt(u))return;const d=ot(s)?s.changedTouches[0]:s;if(!d)return;const h=n.getId(u),{clientX:m,clientY:p}=d;e({type:H[c],id:h,x:m,y:p})};return Object.keys(H).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&i[c]!==!1).forEach(c=>{const s=c.toLowerCase(),u=l(c);a.push(te(s,u,t))}),()=>{a.forEach(c=>c())}}function Jt({scrollCb:e,doc:t,mirror:n,blockClass:r,sampling:o}){const i=Te(a=>{const l=Le(a);if(!l||ne(l,r,!0))return;const c=n.getId(l);if(l===t){const s=t.scrollingElement||t.documentElement;e({id:c,x:s.scrollLeft,y:s.scrollTop})}else e({id:c,x:l.scrollLeft,y:l.scrollTop})},o.scroll||100);return te("scroll",i,t)}function Vr({viewportResizeCb:e}){let t=-1,n=-1;const r=Te(()=>{const o=tt(),i=nt();(t!==o||n!==i)&&(e({width:Number(i),height:Number(o)}),t=o,n=i)},200);return te("resize",r,window)}function qt(e,t){const n=Ht({},e);return t||delete n.userTriggered,n}const Ur=["INPUT","TEXTAREA","SELECT"],en=new WeakMap;function jr({inputCb:e,doc:t,mirror:n,blockClass:r,ignoreClass:o,maskInputOptions:i,maskInputFn:a,sampling:l,userTriggeredOnInput:c}){function s(p){let g=Le(p);const N=p.isTrusted;if(g&&g.tagName==="OPTION"&&(g=g.parentElement),!g||!g.tagName||Ur.indexOf(g.tagName)<0||ne(g,r,!0))return;const f=g.type;if(g.classList.contains(o))return;let b=g.value,S=!1;f==="radio"||f==="checkbox"?S=g.checked:(i[g.tagName.toLowerCase()]||i[f])&&(b=Qe({maskInputOptions:i,tagName:g.tagName,type:f,value:b,maskInputFn:a})),u(g,qt({text:b,isChecked:S,userTriggered:N},c));const y=g.name;f==="radio"&&y&&S&&t.querySelectorAll(`input[type="radio"][name="${y}"]`).forEach(M=>{M!==g&&u(M,qt({text:M.value,isChecked:!S,userTriggered:!1},c))})}function u(p,g){const N=en.get(p);if(!N||N.text!==g.text||N.isChecked!==g.isChecked){en.set(p,g);const f=n.getId(p);e(Fr(Ht({},g),{id:f}))}}const d=(l.input==="last"?["change"]:["input","change"]).map(p=>te(p,s,t)),h=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),m=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return h&&h.set&&d.push(...m.map(p=>Oe(p[0],p[1],{set(){s({target:this})}}))),()=>{d.forEach(p=>p())}}function Ge(e){const t=[];function n(r,o){if(Yt&&r.parentRule instanceof CSSGroupingRule||Xt&&r.parentRule instanceof CSSMediaRule||Zt&&r.parentRule instanceof CSSSupportsRule||Kt&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(i)}else{const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(i)}return o}return n(e,t)}function Br({styleSheetRuleCb:e,mirror:t},{win:n}){const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=function(l,c){const s=t.getId(this.ownerNode);return s!==-1&&e({id:s,adds:[{rule:l,index:c}]}),r.apply(this,arguments)};const o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=function(l){const c=t.getId(this.ownerNode);return c!==-1&&e({id:c,removes:[{index:l}]}),o.apply(this,arguments)};const i={};Yt?i.CSSGroupingRule=n.CSSGroupingRule:(Xt&&(i.CSSMediaRule=n.CSSMediaRule),Kt&&(i.CSSConditionRule=n.CSSConditionRule),Zt&&(i.CSSSupportsRule=n.CSSSupportsRule));const a={};return Object.entries(i).forEach(([l,c])=>{a[l]={insertRule:c.prototype.insertRule,deleteRule:c.prototype.deleteRule},c.prototype.insertRule=function(s,u){const d=t.getId(this.parentStyleSheet.ownerNode);return d!==-1&&e({id:d,adds:[{rule:s,index:[...Ge(this),u||0]}]}),a[l].insertRule.apply(this,arguments)},c.prototype.deleteRule=function(s){const u=t.getId(this.parentStyleSheet.ownerNode);return u!==-1&&e({id:u,removes:[{index:[...Ge(this),s]}]}),a[l].deleteRule.apply(this,arguments)}}),()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=o,Object.entries(i).forEach(([l,c])=>{c.prototype.insertRule=a[l].insertRule,c.prototype.deleteRule=a[l].deleteRule})}}function Gr({styleDeclarationCb:e,mirror:t},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=function(i,a,l){var c,s;const u=t.getId((s=(c=this.parentRule)==null?void 0:c.parentStyleSheet)==null?void 0:s.ownerNode);return u!==-1&&e({id:u,set:{property:i,value:a,priority:l},index:Ge(this.parentRule)}),r.apply(this,arguments)};const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=function(i){var a,l;const c=t.getId((l=(a=this.parentRule)==null?void 0:a.parentStyleSheet)==null?void 0:l.ownerNode);return c!==-1&&e({id:c,remove:{property:i},index:Ge(this.parentRule)}),o.apply(this,arguments)},()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=o}}function zr({mediaInteractionCb:e,blockClass:t,mirror:n,sampling:r}){const o=a=>Te(l=>{const c=Le(l);if(!c||ne(c,t,!0))return;const{currentTime:s,volume:u,muted:d}=c;e({type:a,id:n.getId(c),currentTime:s,volume:u,muted:d})},r.media||500),i=[te("play",o(me.Play)),te("pause",o(me.Pause)),te("seeked",o(me.Seeked)),te("volumechange",o(me.VolumeChange))];return()=>{i.forEach(a=>a())}}function Hr({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(l,c,s){const u=new i(l,c,s);return o.set(u,{family:l,buffer:typeof c!="string",descriptors:s,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),u};const a=he(t.fonts,"add",function(l){return function(c){return setTimeout(()=>{const s=o.get(c);s&&(e(s),o.delete(c))},0),l.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(a),()=>{r.forEach(l=>l())}}function Yr(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:a,inputCb:l,mediaInteractionCb:c,styleSheetRuleCb:s,styleDeclarationCb:u,canvasMutationCb:d,fontCb:h}=e;e.mutationCb=(...m)=>{t.mutation&&t.mutation(...m),n(...m)},e.mousemoveCb=(...m)=>{t.mousemove&&t.mousemove(...m),r(...m)},e.mouseInteractionCb=(...m)=>{t.mouseInteraction&&t.mouseInteraction(...m),o(...m)},e.scrollCb=(...m)=>{t.scroll&&t.scroll(...m),i(...m)},e.viewportResizeCb=(...m)=>{t.viewportResize&&t.viewportResize(...m),a(...m)},e.inputCb=(...m)=>{t.input&&t.input(...m),l(...m)},e.mediaInteractionCb=(...m)=>{t.mediaInteaction&&t.mediaInteaction(...m),c(...m)},e.styleSheetRuleCb=(...m)=>{t.styleSheetRule&&t.styleSheetRule(...m),s(...m)},e.styleDeclarationCb=(...m)=>{t.styleDeclaration&&t.styleDeclaration(...m),u(...m)},e.canvasMutationCb=(...m)=>{t.canvasMutation&&t.canvasMutation(...m),d(...m)},e.fontCb=(...m)=>{t.font&&t.font(...m),h(...m)}}function Xr(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};Yr(e,t);const r=Qt(e,e.doc),o=Wr(e),i=$r(e),a=Jt(e),l=Vr(e),c=jr(e),s=zr(e),u=Br(e,{win:n}),d=Gr(e,{win:n}),h=e.collectFonts?Hr(e):()=>{},m=[];for(const p of e.plugins)m.push(p.observer(p.callback,n,p.options));return()=>{pe.forEach(p=>p.reset()),r.disconnect(),o(),i(),a(),l(),c(),s(),u(),d(),h(),m.forEach(p=>p())}}class Zr{constructor(t){this.iframes=new WeakMap,this.mutationCb=t.mutationCb}addIframe(t){this.iframes.set(t,!0)}addLoadListener(t){this.loadListener=t}attachIframe(t,n,r){var o;this.mutationCb({adds:[{parentId:r.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(o=this.loadListener)==null||o.call(this,t)}}var Kr=Object.defineProperty,Qr=Object.defineProperties,Jr=Object.getOwnPropertyDescriptors,tn=Object.getOwnPropertySymbols,qr=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable,nn=(e,t,n)=>t in e?Kr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rn=(e,t)=>{for(var n in t||(t={}))qr.call(t,n)&&nn(e,n,t[n]);if(tn)for(var n of tn(t))eo.call(t,n)&&nn(e,n,t[n]);return e},on=(e,t)=>Qr(e,Jr(t));class to{constructor(t){this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;const n=this;this.restorePatches.push(he(HTMLElement.prototype,"attachShadow",function(r){return function(){const o=r.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),o}}))}addShadowRoot(t,n){Qt(on(rn({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),Jt(on(rn({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))}observeAttachShadow(t){if(t.contentWindow){const n=this;this.restorePatches.push(he(t.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(){const o=r.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,t.contentDocument),o}}))}}reset(){this.restorePatches.forEach(t=>t())}}for(var we="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pe=typeof Uint8Array>"u"?[]:new Uint8Array(256),ze=0;ze<we.length;ze++)Pe[we.charCodeAt(ze)]=ze;var no=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=we[t[n]>>2],o+=we[(t[n]&3)<<4|t[n+1]>>4],o+=we[(t[n+1]&15)<<2|t[n+2]>>6],o+=we[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o},ro=function(e){var t=e.length*.75,n=e.length,r,o=0,i,a,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var s=new ArrayBuffer(t),u=new Uint8Array(s);for(r=0;r<n;r+=4)i=Pe[e.charCodeAt(r)],a=Pe[e.charCodeAt(r+1)],l=Pe[e.charCodeAt(r+2)],c=Pe[e.charCodeAt(r+3)],u[o++]=i<<2|a>>4,u[o++]=(a&15)<<4|l>>2,u[o++]=(l&3)<<6|c&63;return s};const sn=new Map;function oo(e,t){let n=sn.get(e);return n||(n=new Map,sn.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const an=(e,t,n)=>{if(!e||!(cn(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=oo(n,r);let i=o.indexOf(e);return i===-1&&(i=o.length,o.push(e)),i};function He(e,t,n){if(e instanceof Array)return e.map(r=>He(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,o=no(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[He(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[He(e.data,t,n),e.width,e.height]};if(cn(e,t)||typeof e=="object"){const r=e.constructor.name,o=an(e,t,n);return{rr_type:r,index:o}}}}return e}const ln=(e,t,n)=>[...e].map(r=>He(r,t,n)),cn=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof t[r]=="function");return Boolean(n.find(r=>e instanceof t[r]))};function io(e,t,n,r){const o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=he(t.CanvasRenderingContext2D.prototype,a,function(c){return function(...s){return ne(this.canvas,n,!0)||setTimeout(()=>{const u=ln([...s],t,this);e(this.canvas,{type:ue["2D"],property:a,args:u})},0),c.apply(this,s)}});o.push(l)}catch{const c=Oe(t.CanvasRenderingContext2D.prototype,a,{set(s){e(this.canvas,{type:ue["2D"],property:a,args:[s],setter:!0})}});o.push(c)}return()=>{o.forEach(a=>a())}}function un(e,t){const n=[];try{const r=he(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(i,...a){return ne(this,t,!0)||"__context"in this||(this.__context=i),o.apply(this,[i,...a])}});n.push(r)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(r=>r())}}function dn(e,t,n,r,o,i){const a=[],l=Object.getOwnPropertyNames(e);for(const c of l)try{if(typeof e[c]!="function")continue;const s=he(e,c,function(u){return function(...d){const h=u.apply(this,d);if(an(h,i,e),!ne(this.canvas,r,!0)){const m=ln([...d],i,e),p={type:t,property:c,args:m};n(this.canvas,p)}return h}});a.push(s)}catch{const u=Oe(e,c,{set(d){n(this.canvas,{type:t,property:c,args:[d],setter:!0})}});a.push(u)}return a}function so(e,t,n,r){const o=[];return o.push(...dn(t.WebGLRenderingContext.prototype,ue.WebGL,e,n,r,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...dn(t.WebGL2RenderingContext.prototype,ue.WebGL2,e,n,r,t)),()=>{o.forEach(i=>i())}}function ao(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,i=n.length;o<i;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}function lo(e,t,n){var r=t===void 0?null:t,o=n===void 0?!1:n,i=ao(e,o),a=i.indexOf(`
5
- `,10)+1,l=i.substring(a)+(r?"//# sourceMappingURL="+r:""),c=new Blob([l],{type:"application/javascript"});return URL.createObjectURL(c)}function co(e,t,n){var r;return function(i){return r=r||lo(e,t,n),new Worker(r,i)}}var uo=co("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixsPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylsW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgZD1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCx1PW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gcChzLGUpe2NvbnN0IG49YCR7c30tJHtlfWA7aWYodS5oYXMobikpcmV0dXJuIHUuZ2V0KG4pO2NvbnN0IGE9bmV3IE9mZnNjcmVlbkNhbnZhcyhzLGUpO2EuZ2V0Q29udGV4dCgiMmQiKTtjb25zdCB0PWF3YWl0KGF3YWl0IGEuY29udmVydFRvQmxvYigpKS5hcnJheUJ1ZmZlcigpLGc9ZCh0KTtyZXR1cm4gdS5zZXQobixnKSxnfWNvbnN0IGk9c2VsZjtpLm9ubWVzc2FnZT1hc3luYyBmdW5jdGlvbihzKXtpZighKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcykpcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOnMuZGF0YS5pZH0pO2NvbnN0e2lkOmUsYml0bWFwOm4sd2lkdGg6YSxoZWlnaHQ6dH09cy5kYXRhLGc9cChhLHQpLGg9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2guZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCB3PWF3YWl0IGguY29udmVydFRvQmxvYigpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89ZChiKTtpZighYy5oYXMoZSkmJmF3YWl0IGc9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX19KSgpOwoK",null,!1),hn=Object.getOwnPropertySymbols,ho=Object.prototype.hasOwnProperty,mo=Object.prototype.propertyIsEnumerable,po=(e,t)=>{var n={};for(var r in e)ho.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hn)for(var r of hn(e))t.indexOf(r)<0&&mo.call(e,r)&&(n[r]=e[r]);return n},fo=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{l(n.next(c))}catch(s){o(s)}},a=c=>{try{l(n.throw(c))}catch(s){o(s)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,a);l((n=n.apply(e,t)).next())});class go{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(a,l){(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(l)};const{sampling:n="all",win:r,blockClass:o,recordCanvas:i}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,i&&n==="all"&&this.initCanvasMutationObserver(r,o),i&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o)}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(t,n,r){const o=un(n,r),i=new Map,a=new uo;a.onmessage=d=>{const{id:h}=d.data;if(i.set(h,!1),!("base64"in d.data))return;const{base64:m,type:p,width:g,height:N}=d.data;this.mutationCb({id:h,type:ue["2D"],commands:[{property:"clearRect",args:[0,0,g,N]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:m}],type:p}]},0,0]}]})};const l=1e3/t;let c=0,s;const u=d=>{if(c&&d-c<l){s=requestAnimationFrame(u);return}c=d,n.document.querySelectorAll(`canvas:not(.${r} *)`).forEach(h=>fo(this,null,function*(){var m;const p=this.mirror.getId(h);if(i.get(p))return;if(i.set(p,!0),["webgl","webgl2"].includes(h.__context)){const N=h.getContext(h.__context);((m=N?.getContextAttributes())==null?void 0:m.preserveDrawingBuffer)===!1&&N?.clear(N.COLOR_BUFFER_BIT)}if(h.width===0||h.height===0)return;const g=yield createImageBitmap(h);a.postMessage({id:p,bitmap:g,width:h.width,height:h.height},[g])})),s=requestAnimationFrame(u)};s=requestAnimationFrame(u),this.resetObservers=()=>{o(),cancelAnimationFrame(s)}}initCanvasMutationObserver(t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=un(t,n),o=io(this.processMutation.bind(this),t,n,this.mirror),i=so(this.processMutation.bind(this),t,n,this.mirror);this.resetObservers=()=>{r(),o(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(a=>po(a,["type"])),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}}class vo{constructor(t){this.trackedStylesheets=new WeakSet,this.mutationCb=t.mutationCb}addStylesheet(t){this.trackedStylesheets.has(t)||(this.trackedStylesheets.add(t),this.trackStylesheet(t))}trackStylesheet(t){}attachStylesheet(t,n,r){this.mutationCb({adds:[{parentId:r.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[]}),this.addStylesheet(t)}}var yo=Object.defineProperty,bo=Object.defineProperties,So=Object.getOwnPropertyDescriptors,mn=Object.getOwnPropertySymbols,To=Object.prototype.hasOwnProperty,No=Object.prototype.propertyIsEnumerable,pn=(e,t,n)=>t in e?yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,re=(e,t)=>{for(var n in t||(t={}))To.call(t,n)&&pn(e,n,t[n]);if(mn)for(var n of mn(t))No.call(t,n)&&pn(e,n,t[n]);return e},Eo=(e,t)=>bo(e,So(t));function Z(e){return Eo(re({},e),{timestamp:Date.now()})}let G,_e;const se=Et();function fe(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="highlight-block",blockSelector:i=null,ignoreClass:a="highlight-ignore",maskTextClass:l="highlight-mask",maskTextSelector:c=null,inlineStylesheet:s=!0,maskAllInputs:u,maskInputOptions:d,slimDOMOptions:h,maskInputFn:m,maskTextFn:p,hooks:g,packFn:N,sampling:f={},mousemoveWait:b,recordCanvas:S=!1,userTriggeredOnInput:y=!1,collectFonts:M=!1,inlineImages:D=!1,plugins:L,keepIframeSrcFn:P=()=>!1,enableStrictPrivacy:A=!1}=e;if(!t)throw new Error("emit function is required");b!==void 0&&f.mousemove===void 0&&(f.mousemove=b),se.reset();const z=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}:d!==void 0?d:{password:!0},$=h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:h==="all",headMetaDescKeywords:h==="all"}:h||{};it();let K,Q=0;const j=E=>{for(const C of L||[])C.eventProcessor&&(E=C.eventProcessor(E));return N&&(E=N(E)),E};G=(E,C)=>{var J;if(((J=pe[0])==null?void 0:J.isFrozen())&&E.type!==w.FullSnapshot&&!(E.type===w.IncrementalSnapshot&&E.data.source===x.Mutation)&&pe.forEach(ee=>ee.unfreeze()),t(j(E),C),E.type===w.FullSnapshot)K=E,Q=0;else if(E.type===w.IncrementalSnapshot){if(E.data.source===x.Mutation&&E.data.isAttachIframe)return;Q++;const ee=r&&Q>=r,le=n&&E.timestamp-K.timestamp>n;(ee||le)&&_e(!0)}};const Y=E=>{G(Z({type:w.IncrementalSnapshot,data:re({source:x.Mutation},E)}))},X=E=>G(Z({type:w.IncrementalSnapshot,data:re({source:x.Scroll},E)})),_=E=>G(Z({type:w.IncrementalSnapshot,data:re({source:x.CanvasMutation},E)})),B=new Zr({mutationCb:Y}),T=new vo({mutationCb:Y}),v=new go({recordCanvas:S,mutationCb:_,win:window,blockClass:o,mirror:se,sampling:f.canvas}),I=new to({mutationCb:Y,scrollCb:X,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:s,maskInputOptions:z,maskTextFn:p,maskInputFn:m,recordCanvas:S,inlineImages:D,sampling:f,slimDOMOptions:$,iframeManager:B,stylesheetManager:T,canvasManager:v,keepIframeSrcFn:P,enableStrictPrivacy:A},mirror:se});_e=(E=!1)=>{var C,J,ee,le;G(Z({type:w.Meta,data:{href:window.location.href,width:nt(),height:tt()}}),E),pe.forEach(U=>U.lock());const F=Sr(document,{mirror:se,blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:s,maskAllInputs:z,maskTextFn:p,slimDOM:$,recordCanvas:S,inlineImages:D,enableStrictPrivacy:A,onSerialize:U=>{Ne(U,se)&&B.addIframe(U),at(U,se)&&T.addStylesheet(U),Ae(U)&&I.addShadowRoot(U.shadowRoot,document)},onIframeLoad:(U,ve)=>{B.attachIframe(U,ve,se),I.observeAttachShadow(U)},onStylesheetLoad:(U,ve)=>{T.attachStylesheet(U,ve,se)},keepIframeSrcFn:P});if(!F)return console.warn("Failed to snapshot the document");G(Z({type:w.FullSnapshot,data:{node:F,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((J=(C=document?.body)==null?void 0:C.parentElement)==null?void 0:J.scrollLeft)||document?.body.scrollLeft||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((le=(ee=document?.body)==null?void 0:ee.parentElement)==null?void 0:le.scrollTop)||document?.body.scrollTop||0}}})),pe.forEach(U=>U.unlock())};try{const E=[];E.push(te("DOMContentLoaded",()=>{G(Z({type:w.DomContentLoaded,data:{}}))}));const C=ee=>{var le;return Xr({mutationCb:Y,mousemoveCb:(F,U)=>G(Z({type:w.IncrementalSnapshot,data:{source:U,positions:F}})),mouseInteractionCb:F=>G(Z({type:w.IncrementalSnapshot,data:re({source:x.MouseInteraction},F)})),scrollCb:X,viewportResizeCb:F=>G(Z({type:w.IncrementalSnapshot,data:re({source:x.ViewportResize},F)})),inputCb:F=>G(Z({type:w.IncrementalSnapshot,data:re({source:x.Input},F)})),mediaInteractionCb:F=>G(Z({type:w.IncrementalSnapshot,data:re({source:x.MediaInteraction},F)})),styleSheetRuleCb:F=>G(Z({type:w.IncrementalSnapshot,data:re({source:x.StyleSheetRule},F)})),styleDeclarationCb:F=>G(Z({type:w.IncrementalSnapshot,data:re({source:x.StyleDeclaration},F)})),canvasMutationCb:_,fontCb:F=>G(Z({type:w.IncrementalSnapshot,data:re({source:x.Font},F)})),blockClass:o,ignoreClass:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:z,inlineStylesheet:s,sampling:f,recordCanvas:S,inlineImages:D,userTriggeredOnInput:y,collectFonts:M,doc:ee,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:P,blockSelector:i,slimDOMOptions:$,mirror:se,iframeManager:B,stylesheetManager:T,shadowDomManager:I,canvasManager:v,enableStrictPrivacy:A,plugins:((le=L?.filter(F=>F.observer))==null?void 0:le.map(F=>({observer:F.observer,options:F.options,callback:U=>G(Z({type:w.Plugin,data:{plugin:F.name,payload:U}}))})))||[]},g)};B.addLoadListener(ee=>{E.push(C(ee.contentDocument))});const J=()=>{_e(),E.push(C(document))};return document.readyState==="interactive"||document.readyState==="complete"?J():E.push(te("load",()=>{G(Z({type:w.Load,data:{}})),J()},window)),()=>{E.forEach(ee=>ee())}}catch(E){console.warn(E)}}fe.addCustomEvent=(e,t)=>{!G||G(Z({type:w.Custom,data:{tag:e,payload:t}}))},fe.freezePage=()=>{pe.forEach(e=>e.freeze())},fe.takeFullSnapshot=e=>{if(!_e)throw new Error("please take full snapshot after start recording");_e(e)},fe.mirror=se;var R;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(R||(R={}));var wo=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var n;if(!t)return-1;var r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var n=this,r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,n){var r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)},e.prototype.replace=function(t,n){this.idNodeMap.set(t,n)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Co(){return new wo}function Io(e){const t={},n=/;(?![^(]*\))/g,r=/:(.+)/,o=/\/\*.*?\*\//g;return e.replace(o,"").split(n).forEach(function(i){if(i){const a=i.split(r);a.length>1&&(t[dt(a[0].trim())]=a[1].trim())}}),t}function fn(e){const t=[];for(const n in e){const r=e[n];if(typeof r!="string")continue;const o=Ro(n);t.push(`${o}: ${r};`)}return t.join(" ")}const Mo=/-([a-z])/g,xo=/^--[a-zA-Z0-9-]+$/,dt=e=>xo.test(e)?e:e.replace(Mo,(t,n)=>n?n.toUpperCase():""),ko=/\B([A-Z])/g,Ro=e=>e.replace(ko,"-$1").toLowerCase();class oe{constructor(...t){this.childNodes=[],this.parentElement=null,this.parentNode=null,this.ELEMENT_NODE=V.ELEMENT_NODE,this.TEXT_NODE=V.TEXT_NODE}get firstChild(){return this.childNodes[0]||null}get lastChild(){return this.childNodes[this.childNodes.length-1]||null}get nextSibling(){const t=this.parentNode;if(!t)return null;const n=t.childNodes,r=n.indexOf(this);return n[r+1]||null}contains(t){if(t===this)return!0;for(const n of this.childNodes)if(n.contains(t))return!0;return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function Do(e){return class Xn extends e{constructor(){super(...arguments),this.nodeType=V.DOCUMENT_NODE,this.nodeName="#document",this.compatMode="CSS1Compat",this.RRNodeType=R.Document,this.textContent=null}get documentElement(){return this.childNodes.find(n=>n.RRNodeType===R.Element&&n.tagName==="HTML")||null}get body(){var n;return((n=this.documentElement)===null||n===void 0?void 0:n.childNodes.find(r=>r.RRNodeType===R.Element&&r.tagName==="BODY"))||null}get head(){var n;return((n=this.documentElement)===null||n===void 0?void 0:n.childNodes.find(r=>r.RRNodeType===R.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(n){const r=n.RRNodeType;if((r===R.Element||r===R.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===R.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);return n.parentElement=null,n.parentNode=this,this.childNodes.push(n),n}insertBefore(n,r){const o=n.RRNodeType;if((o===R.Element||o===R.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===o))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${o===R.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);if(r===null)return this.appendChild(n);const i=this.childNodes.indexOf(r);if(i==-1)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return this.childNodes.splice(i,0,n),n.parentElement=null,n.parentNode=this,n}removeChild(n){const r=this.childNodes.indexOf(n);if(r===-1)throw new Error("Failed to execute 'removeChild' on 'RRDocument': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(r,1),n.parentElement=null,n.parentNode=null,n}open(){this.childNodes=[]}close(){}write(n){let r;if(n==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":n==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const o=this.createDocumentType("html",r,"");this.open(),this.appendChild(o)}}createDocument(n,r,o){return new Xn}createDocumentType(n,r,o){const i=new(gn(oe))(n,r,o);return i.ownerDocument=this,i}createElement(n){const r=new(vn(oe))(n);return r.ownerDocument=this,r}createElementNS(n,r){return this.createElement(r)}createTextNode(n){const r=new(yn(oe))(n);return r.ownerDocument=this,r}createComment(n){const r=new(bn(oe))(n);return r.ownerDocument=this,r}createCDATASection(n){const r=new(Sn(oe))(n);return r.ownerDocument=this,r}toString(){return"RRDocument"}}}function gn(e){return class extends e{constructor(t,n,r){super(),this.nodeType=V.DOCUMENT_TYPE_NODE,this.RRNodeType=R.DocumentType,this.textContent=null,this.name=t,this.publicId=n,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}}}function vn(e){return class extends e{constructor(t){super(),this.nodeType=V.ELEMENT_NODE,this.RRNodeType=R.Element,this.attributes={},this.shadowRoot=null,this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(n=>t+=n.textContent),t}set textContent(t){this.childNodes=[this.ownerDocument.createTextNode(t)]}get classList(){return new Ao(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?Io(this.attributes.style):{},n=/\B([A-Z])/g;return t.setProperty=(r,o,i)=>{if(n.test(r))return;const a=dt(r);o?t[a]=o:delete t[a],i==="important"&&(t[a]+=" !important"),this.attributes.style=fn(t)},t.removeProperty=r=>{if(n.test(r))return"";const o=dt(r),i=t[o]||"";return delete t[o],this.attributes.style=fn(t),i},t}getAttribute(t){return this.attributes[t]||null}setAttribute(t,n){this.attributes[t]=n}setAttributeNS(t,n,r){this.setAttribute(n,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return this.childNodes.push(t),t.parentNode=this,t.parentElement=this,t}insertBefore(t,n){if(n===null)return this.appendChild(t);const r=this.childNodes.indexOf(n);if(r==-1)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return this.childNodes.splice(r,0,t),t.parentElement=this,t.parentNode=this,t}removeChild(t){const n=this.childNodes.indexOf(t);if(n===-1)throw new Error("Failed to execute 'removeChild' on 'RRElement': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(n,1),t.parentElement=null,t.parentNode=null,t}attachShadow(t){const n=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=n,n}dispatchEvent(t){return!0}toString(){let t="";for(const n in this.attributes)t+=`${n}="${this.attributes[n]}" `;return`${this.tagName} ${t}`}}}function Oo(e){return class extends e{attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}}function yn(e){return class extends e{constructor(t){super(),this.nodeType=V.TEXT_NODE,this.nodeName="#text",this.RRNodeType=R.Text,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}}function bn(e){return class extends e{constructor(t){super(),this.nodeType=V.COMMENT_NODE,this.nodeName="#comment",this.RRNodeType=R.Comment,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}}function Sn(e){return class extends e{constructor(t){super(),this.nodeName="#cdata-section",this.nodeType=V.CDATA_SECTION_NODE,this.RRNodeType=R.CDATA,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}}class Ao{constructor(t,n){if(this.classes=[],this.add=(...r)=>{for(const o of r){const i=String(o);this.classes.indexOf(i)>=0||this.classes.push(i)}this.onChange&&this.onChange(this.classes.join(" "))},this.remove=(...r)=>{this.classes=this.classes.filter(o=>r.indexOf(o)===-1),this.onChange&&this.onChange(this.classes.join(" "))},t){const r=t.trim().split(/\s+/);this.classes.push(...r)}this.onChange=n}}var V;(function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(V||(V={}));const ht={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"};function ae(e,t,n,r){const o=e.childNodes,i=t.childNodes;r=r||t.mirror||t.ownerDocument.mirror,(o.length>0||i.length>0)&&Tn(Array.from(o),i,e,n,r);let a=null,l=null;switch(t.RRNodeType){case R.Document:{l=t.scrollData;break}case R.Element:{const c=e,s=t;switch(Lo(c,s,r),l=s.scrollData,a=s.inputData,s.tagName){case"AUDIO":case"VIDEO":{const u=e,d=s;d.paused!==void 0&&(d.paused?u.pause():u.play()),d.muted!==void 0&&(u.muted=d.muted),d.volume!==void 0&&(u.volume=d.volume),d.currentTime!==void 0&&(u.currentTime=d.currentTime);break}case"CANVAS":t.canvasMutations.forEach(u=>n.applyCanvas(u.event,u.mutation,e));break;case"STYLE":Po(c,t.rules);break}if(s.shadowRoot){c.shadowRoot||c.attachShadow({mode:"open"});const u=c.shadowRoot.childNodes,d=s.shadowRoot.childNodes;(u.length>0||d.length>0)&&Tn(Array.from(u),d,c.shadowRoot,n,r)}break}case R.Text:case R.Comment:case R.CDATA:e.textContent!==t.data&&(e.textContent=t.data);break}if(l&&n.applyScroll(l,!0),a&&n.applyInput(a),t.nodeName==="IFRAME"){const c=e.contentDocument,s=t;if(c){const u=r.getMeta(s.contentDocument);u&&n.mirror.add(c,Object.assign({},u)),ae(c,s.contentDocument,n,r)}}}function Lo(e,t,n){const r=e.attributes,o=t.attributes;for(const i in o){const a=o[i],l=n.getMeta(t);if(l&&"isSVG"in l&&l.isSVG&&ht[i])e.setAttributeNS(ht[i],i,a);else if(t.tagName==="CANVAS"&&i==="rr_dataURL"){const c=document.createElement("img");c.src=a,c.onload=()=>{const s=e.getContext("2d");s&&s.drawImage(c,0,0,c.width,c.height)}}else e.setAttribute(i,a)}for(const{name:i}of Array.from(r))i in o||e.removeAttribute(i);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function Tn(e,t,n,r,o){var i;let a=0,l=e.length-1,c=0,s=t.length-1,u=e[a],d=e[l],h=t[c],m=t[s],p,g;for(;a<=l&&c<=s;){const N=r.mirror.getId(u),f=r.mirror.getId(d),b=o.getId(h),S=o.getId(m);if(u===void 0)u=e[++a];else if(d===void 0)d=e[--l];else if(N!==-1&&N===b)ae(u,h,r,o),u=e[++a],h=t[++c];else if(f!==-1&&f===S)ae(d,m,r,o),d=e[--l],m=t[--s];else if(N!==-1&&N===S)n.insertBefore(u,d.nextSibling),ae(u,m,r,o),u=e[++a],m=t[--s];else if(f!==-1&&f===b)n.insertBefore(d,u),ae(d,h,r,o),d=e[--l],h=t[++c];else{if(!p){p={};for(let y=a;y<=l;y++){const M=e[y];M&&r.mirror.hasNode(M)&&(p[r.mirror.getId(M)]=y)}}if(g=p[o.getId(h)],g){const y=e[g];n.insertBefore(y,u),ae(y,h,r,o),e[g]=void 0}else{const y=mt(h,r.mirror,o);n.nodeName==="#document"&&((i=r.mirror.getMeta(y))===null||i===void 0?void 0:i.type)===R.Element&&n.documentElement&&(n.removeChild(n.documentElement),e[a]=void 0,u=void 0),n.insertBefore(y,u||null),ae(y,h,r,o)}h=t[++c]}}if(a>l){const N=t[s+1];let f=null;for(N&&n.childNodes.forEach(b=>{r.mirror.getId(b)===o.getId(N)&&(f=b)});c<=s;++c){const b=mt(t[c],r.mirror,o);n.insertBefore(b,f),ae(b,t[c],r,o)}}else if(c>s)for(;a<=l;a++){const N=e[a];N&&(n.removeChild(N),r.mirror.removeNodeFromMap(N))}}function mt(e,t,n){const r=n.getId(e),o=n.getMeta(e);let i=null;if(r>-1&&(i=t.getNode(r)),i!==null)return i;switch(e.RRNodeType){case R.Document:i=new Document;break;case R.DocumentType:i=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case R.Element:{e.tagName.toLowerCase(),o&&"isSVG"in o&&o?.isSVG?i=document.createElementNS(ht.svg,e.tagName.toLowerCase()):i=document.createElement(e.tagName);break}case R.Text:i=document.createTextNode(e.data);break;case R.Comment:i=document.createComment(e.data);break;case R.CDATA:i=document.createCDATASection(e.data);break}return o&&t.add(i,Object.assign({},o)),i}function Fe(e,t){const n=e[t[0]];return t.length===1?n:Fe(n.cssRules[t[1]].cssRules,t.slice(2))}var ie;(function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot",e[e.SetProperty=3]="SetProperty",e[e.RemoveProperty=4]="RemoveProperty"})(ie||(ie={}));function Nn(e){const t=[...e],n=t.pop();return{positions:t,index:n}}function Po(e,t){const n=e.sheet;t.forEach(r=>{if(r.type===ie.Insert)try{if(Array.isArray(r.index)){const{positions:o,index:i}=Nn(r.index);Fe(n.cssRules,o).insertRule(r.cssText,i)}else n.insertRule(r.cssText,r.index)}catch{}else if(r.type===ie.Remove)try{if(Array.isArray(r.index)){const{positions:o,index:i}=Nn(r.index);Fe(n.cssRules,o).deleteRule(i||0)}else n.deleteRule(r.index)}catch{}else r.type===ie.SetProperty?Fe(n.cssRules,r.index).style.setProperty(r.property,r.value,r.priority):r.type===ie.RemoveProperty&&Fe(n.cssRules,r.index).style.removeProperty(r.property)})}class Ce extends Do(oe){constructor(t){super(),this._unserializedId=-1,this.mirror=Ho(),this.scrollData=null,t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,n,r){return new Ce}createDocumentType(t,n,r){const o=new _o(t,n,r);return o.ownerDocument=this,o}createElement(t){const n=t.toUpperCase();let r;switch(n){case"AUDIO":case"VIDEO":r=new Fo(n);break;case"IFRAME":r=new Vo(n,this.mirror);break;case"CANVAS":r=new Wo(n);break;case"STYLE":r=new $o(n);break;default:r=new We(n);break}return r.ownerDocument=this,r}createComment(t){const n=new jo(t);return n.ownerDocument=this,n}createCDATASection(t){const n=new Bo(t);return n.ownerDocument=this,n}createTextNode(t){const n=new Uo(t);return n.ownerDocument=this,n}destroyTree(){this.childNodes=[],this.mirror.reset()}open(){super.open(),this._unserializedId=-1}}const _o=gn(oe);class We extends vn(oe){constructor(){super(...arguments),this.inputData=null,this.scrollData=null}}class Fo extends Oo(We){}class Wo extends We{constructor(){super(...arguments),this.canvasMutations=[]}getContext(){return null}}class $o extends We{constructor(){super(...arguments),this.rules=[]}}class Vo extends We{constructor(t,n){super(t),this.contentDocument=new Ce,this.contentDocument.mirror=n}}const Uo=yn(oe),jo=bn(oe),Bo=Sn(oe);function Go(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function En(e,t,n,r){let o;switch(e.nodeType){case V.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?o=r.contentDocument:(o=t,o.compatMode=e.compatMode);break;case V.DOCUMENT_TYPE_NODE:const a=e;o=t.createDocumentType(a.name,a.publicId,a.systemId);break;case V.ELEMENT_NODE:const l=e,c=Go(l);o=t.createElement(c);const s=o;for(const{name:u,value:d}of Array.from(l.attributes))s.attributes[u]=d;l.scrollLeft&&(s.scrollLeft=l.scrollLeft),l.scrollTop&&(s.scrollTop=l.scrollTop);break;case V.TEXT_NODE:o=t.createTextNode(e.textContent||"");break;case V.CDATA_SECTION_NODE:o=t.createCDATASection(e.data);break;case V.COMMENT_NODE:o=t.createComment(e.textContent||"");break;case V.DOCUMENT_FRAGMENT_NODE:o=r.attachShadow({mode:"open"});break;default:return null}let i=n.getMeta(e);return t instanceof Ce&&(i||(i=wn(o,t.unserializedId),n.add(e,i)),t.mirror.add(o,Object.assign({},i))),o}function zo(e,t=Co(),n=new Ce){function r(o,i){const a=En(o,n,t,i);a!==null&&(i?.nodeName!=="IFRAME"&&o.nodeType!==V.DOCUMENT_FRAGMENT_NODE&&(i?.appendChild(a),a.parentNode=i,a.parentElement=i),o.nodeName==="IFRAME"?r(o.contentDocument,a):(o.nodeType===V.DOCUMENT_NODE||o.nodeType===V.ELEMENT_NODE||o.nodeType===V.DOCUMENT_FRAGMENT_NODE)&&(o.nodeType===V.ELEMENT_NODE&&o.shadowRoot&&r(o.shadowRoot,a),o.childNodes.forEach(l=>r(l,a))))}return r(e,null),n}function Ho(){return new Yo}class Yo{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){var n;if(!t)return-1;const r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function wn(e,t){switch(e.RRNodeType){case R.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case R.DocumentType:const n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId};case R.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case R.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case R.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case R.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}function Cn(e){return e=e||Object.create(null),{on:function(n,r){(e[n]||(e[n]=[])).push(r)},off:function(n,r){e[n]&&e[n].splice(e[n].indexOf(r)>>>0,1)},emit:function(n,r){(e[n]||[]).slice().map(function(o){o(r)}),(e["*"]||[]).slice().map(function(o){o(n,r)})}}}var Xo=Object.freeze({__proto__:null,default:Cn});function Zo(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const n=e.HTMLElement||e.Element,r=468,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||c,scrollIntoView:n.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function a(f){const b=["MSIE ","Trident/","Edge/"];return new RegExp(b.join("|")).test(f)}const l=a(e.navigator.userAgent)?1:0;function c(f,b){this.scrollLeft=f,this.scrollTop=b}function s(f){return .5*(1-Math.cos(Math.PI*f))}function u(f){if(f===null||typeof f!="object"||f.behavior===void 0||f.behavior==="auto"||f.behavior==="instant")return!0;if(typeof f=="object"&&f.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+f.behavior+" is not a valid value for enumeration ScrollBehavior.")}function d(f,b){if(b==="Y")return f.clientHeight+l<f.scrollHeight;if(b==="X")return f.clientWidth+l<f.scrollWidth}function h(f,b){const S=e.getComputedStyle(f,null)["overflow"+b];return S==="auto"||S==="scroll"}function m(f){const b=d(f,"Y")&&h(f,"Y"),S=d(f,"X")&&h(f,"X");return b||S}function p(f){for(;f!==t.body&&m(f)===!1;)f=f.parentNode||f.host;return f}function g(f){const b=i();let S,y,M,D=(b-f.startTime)/r;D=D>1?1:D,S=s(D),y=f.startX+(f.x-f.startX)*S,M=f.startY+(f.y-f.startY)*S,f.method.call(f.scrollable,y,M),(y!==f.x||M!==f.y)&&e.requestAnimationFrame(g.bind(e,f))}function N(f,b,S){let y,M,D,L;const P=i();f===t.body?(y=e,M=e.scrollX||e.pageXOffset,D=e.scrollY||e.pageYOffset,L=o.scroll):(y=f,M=f.scrollLeft,D=f.scrollTop,L=c),g({scrollable:y,method:L,startTime:P,startX:M,startY:D,x:b,y:S})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){o.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}N.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])){o.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}N.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},n.prototype.scroll=n.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(u(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const f=arguments[0].left,b=arguments[0].top;N.call(this,this,typeof f>"u"?this.scrollLeft:~~f,typeof b>"u"?this.scrollTop:~~b)},n.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){o.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},n.prototype.scrollIntoView=function(){if(u(arguments[0])===!0){o.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const f=p(this),b=f.getBoundingClientRect(),S=this.getBoundingClientRect();f!==t.body?(N.call(this,f,f.scrollLeft+S.left-b.left,f.scrollTop+S.top-b.top),e.getComputedStyle(f).position!=="fixed"&&e.scrollBy({left:b.left,top:b.top,behavior:"smooth"})):e.scrollBy({left:S.left,top:S.top,behavior:"smooth"})}}class Ko{constructor(t=[],n){this.timeOffset=0,this.raf=null,this.actions=t,this.speed=n}addAction(t){const n=this.findActionIndex(t);this.actions.splice(n,0,t)}addActions(t){this.actions=this.actions.concat(t)}replaceActions(t){this.actions.length=0,this.actions.splice(0,0,...t)}start(){this.timeOffset=0;let t=performance.now();const{actions:n}=this,r=this;function o(){const i=performance.now();for(r.timeOffset+=(i-t)*r.speed,t=i;n.length;){const a=n[0];if(r.timeOffset>=a.delay)n.shift(),a.doAction();else break}(n.length>0||r.liveMode)&&(r.raf=requestAnimationFrame(o))}this.raf=requestAnimationFrame(o)}clear(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}toggleLiveMode(t){this.liveMode=t}isActive(){return this.raf!==null}findActionIndex(t){let n=0,r=this.actions.length-1;for(;n<=r;){const o=Math.floor((n+r)/2);if(this.actions[o].delay<t.delay)n=o+1;else if(this.actions[o].delay>t.delay)r=o-1;else return o+1}return n}}function pt(e,t){if(e.type===w.IncrementalSnapshot&&e.data.source===x.MouseMove){const n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
4
+ or you can use record.mirror to access the mirror instance during recording.`;q.mirror={map:{},getId(){return console.error(Se),-1},getNode(){return console.error(Se),null},removeNodeFromMap(){console.error(Se)},has(){return console.error(Se),!1},reset(){console.error(Se)}},typeof window<"u"&&window.Proxy&&window.Reflect&&(q.mirror=new Proxy(q.mirror,{get(e,t,n){return t==="map"&&console.error(Se),Reflect.get(e,t,n)}}));function Te(e,t,n={}){let r=null,o=0;return function(i){const a=Date.now();!o&&n.leading===!1&&(o=a);const l=t-(a-o),c=this,s=arguments;l<=0||l>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(c,s)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,s)},l))}}function Oe(e,t,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(a){setTimeout(()=>{n.set.call(this,a)},0),i&&i.set&&i.set.call(this,a)}}),()=>Oe(e,t,i||{},!0)}function he(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}function nt(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function rt(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}const Lt=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch{return!1}return!1};function ne(e,t,n){if(!e)return!1;const r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!r)return!1;if(typeof t=="string"){if(r.classList.contains(t)||n&&r.closest("."+t)!==null)return!0}else if(Ue(r,t,n))return!0;return!1}function Pt(e,t){return t.getId(e)!==-1}function Be(e,t){return t.getId(e)===De}function ot(e,t){if(Re(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?ot(e.parentNode,t):!0:!0}function it(e){return Boolean(e.changedTouches)}function st(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(t){if(!(0 in arguments))throw new TypeError("1 argument is required");do if(this===t)return!0;while(t=t&&t.parentNode);return!1})}function _t(e){const t={},n=(o,i)=>{const a={value:o,parent:i,children:[]};return t[o.node.id]=a,a},r=[];for(const o of e){const{nextId:i,parentId:a}=o;if(i&&i in t){const l=t[i];if(l.parent){const c=l.parent.children.indexOf(l);l.parent.children.splice(c,0,n(o,l.parent))}else{const c=r.indexOf(l);r.splice(c,0,n(o,null))}continue}if(a in t){const l=t[a];l.children.push(n(o,l));continue}r.push(n(o,null))}return r}function at(e,t){t(e.value);for(let n=e.children.length-1;n>=0;n--)at(e.children[n],t)}function Ne(e,t){return Boolean(e.nodeName==="IFRAME"&&t.getMeta(e))}function lt(e,t){return Boolean(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function ct(e,t){var n,r;const o=(r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement;if(!o||o===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const i=o.getBoundingClientRect(),a=ct(o,t),l=i.height/o.clientHeight;return{x:i.x*a.relativeScale+a.x,y:i.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}}function Ae(e){return Boolean(e?.shadowRoot)}function Ee(e,t){const n=e[t[0]];return t.length===1?n:Ee(n.cssRules[t[1]].cssRules,t.slice(2))}function ut(e){const t=[...e],n=t.pop();return{positions:t,index:n}}function Ft(e){const t=new Set,n=[];for(let r=e.length;r--;){const o=e[r];t.has(o.id)||(n.push(o),t.add(o.id))}return n}var kr=Object.freeze({__proto__:null,on:te,get _mirror(){return q.mirror},throttle:Te,hookSetter:Oe,patch:he,getWindowHeight:nt,getWindowWidth:rt,isCanvasNode:Lt,isBlocked:ne,isSerialized:Pt,isIgnored:Be,isAncestorRemoved:ot,isTouchEvent:it,polyfill:st,queueToResolveTrees:_t,iterateResolveTree:at,isSerializedIframe:Ne,isSerializedStylesheet:lt,getBaseDimension:ct,hasShadowRoot:Ae,getNestedRule:Ee,getPositionsAndIndex:ut,uniqueTextMutations:Ft}),w=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(w||{}),x=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e))(x||{}),H=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(H||{}),ue=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ue||{}),me=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e))(me||{}),O=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e))(O||{});function Wt(e){return"__ln"in e}class Rr{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Wt(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Wt(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;this.length++}removeNode(t){const n=t.__ln;!this.head||(n.previous?(n.previous.next=n.next,n.next&&(n.next.previous=n.previous)):(this.head=n.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}}const $t=(e,t)=>`${e}@${t}`;class Dr{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Rr,r=l=>{let c=l,s=De;for(;s===De;)c=c&&c.nextSibling,s=c&&this.mirror.getId(c);return s},o=l=>{var c,s,u,d,h;const m=l.getRootNode?(c=l.getRootNode())==null?void 0:c.host:null;let p=m;for(;(u=(s=p?.getRootNode)==null?void 0:s.call(p))!=null&&u.host;)p=((h=(d=p?.getRootNode)==null?void 0:d.call(p))==null?void 0:h.host)||null;const g=!this.doc.contains(l)&&(!p||!this.doc.contains(p));if(!l.parentNode||g)return;const N=Re(l.parentNode)?this.mirror.getId(m):this.mirror.getId(l.parentNode),f=r(l);if(N===-1||f===-1)return n.addNode(l);const b=be(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,enableStrictPrivacy:this.enableStrictPrivacy,onSerialize:S=>{Ne(S,this.mirror)&&this.iframeManager.addIframe(S),lt(S,this.mirror)&&this.stylesheetManager.addStylesheet(S),Ae(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,document)},onIframeLoad:(S,y)=>{this.iframeManager.attachIframe(S,y,this.mirror),this.shadowDomManager.observeAttachShadow(S)},onStylesheetLoad:(S,y)=>{this.stylesheetManager.attachStylesheet(S,y,this.mirror)},newlyAddedElement:!0});b&&t.push({parentId:N,nextId:f,node:b})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of Array.from(this.movedSet.values()))Vt(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||o(l);for(const l of Array.from(this.addedSet.values()))!jt(this.droppedSet,l)&&!Vt(this.removes,l,this.mirror)||jt(this.movedSet,l)?o(l):this.droppedSet.add(l);let i=null;for(;n.length;){let l=null;if(i){const c=this.mirror.getId(i.value.parentNode),s=r(i.value);c!==-1&&s!==-1&&(l=i)}if(!l)for(let c=n.length-1;c>=0;c--){const s=n.get(c);if(s){const u=this.mirror.getId(s.value.parentNode),d=r(s.value);if(u!==-1&&d!==-1){l=s;break}}}if(!l){for(;n.head;)n.removeNode(n.head.value);break}i=l.previous,n.removeNode(l.value),o(l.value)}const a={texts:this.texts.map(l=>{let c=l.value;return this.enableStrictPrivacy&&c&&(c=Je(c)),{id:this.mirror.getId(l.node),value:c}}).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>({id:this.mirror.getId(l.node),attributes:l.attributes})).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!Be(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!ne(t.target,this.blockClass,!1)&&n!==t.oldValue&&this.texts.push({value:xt(t.target,this.maskTextClass,this.maskTextSelector)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.target.getAttribute(t.attributeName);if(t.attributeName==="value"&&(r=Qe({maskInputOptions:this.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),ne(t.target,this.blockClass,!1)||r===t.oldValue)return;let o=this.attributes.find(i=>i.node===t.target);if(n.tagName==="IFRAME"&&t.attributeName==="src"&&!this.keepIframeSrcFn(r))if(!n.contentDocument)t.attributeName="rr_src";else return;if(o||(o={node:t.target,attributes:{}},this.attributes.push(o)),t.attributeName==="style"){const i=this.doc.createElement("span");t.oldValue&&i.setAttribute("style",t.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});const a=o.attributes.style;for(const l of Array.from(n.style)){const c=n.style.getPropertyValue(l),s=n.style.getPropertyPriority(l);(c!==i.style.getPropertyValue(l)||s!==i.style.getPropertyPriority(l))&&(s===""?a[l]=c:a[l]=[c,s])}for(const l of Array.from(i.style))n.style.getPropertyValue(l)===""&&(a[l]=!1)}else{if(t.target.tagName==="INPUT"){const i=t.target;if(i.type==="password"){o.attributes.value="*".repeat(i.value.length);break}}o.attributes[t.attributeName]=Mt(this.doc,n.tagName,t.attributeName,r)}break}case"childList":{if(ne(t.target,this.blockClass,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=Re(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);ne(t.target,this.blockClass,!1)||Be(n,this.mirror)||!Pt(n,this.mirror)||(this.addedSet.has(n)?(dt(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||ot(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[$t(r,o)]?dt(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:Re(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(this.mirror.hasNode(t)){if(Be(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[$t(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ne(t,this.blockClass,!1)||t.childNodes.forEach(r=>this.genAdds(r))}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","enableStrictPrivacy"].forEach(n=>{this[n]=t[n]})}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 dt(e,t){e.delete(t),t.childNodes.forEach(n=>dt(e,n))}function Vt(e,t,n){return e.length===0?!1:Ut(e,t,n)}function Ut(e,t,n){const{parentNode:r}=t;if(!r)return!1;const o=n.getId(r);return e.some(i=>i.id===o)?!0:Ut(e,r,n)}function jt(e,t){return e.size===0?!1:Bt(e,t)}function Bt(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Bt(e,n):!1}var Or=Object.defineProperty,Ar=Object.defineProperties,Lr=Object.getOwnPropertyDescriptors,Gt=Object.getOwnPropertySymbols,Pr=Object.prototype.hasOwnProperty,_r=Object.prototype.propertyIsEnumerable,zt=(e,t,n)=>t in e?Or(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ht=(e,t)=>{for(var n in t||(t={}))Pr.call(t,n)&&zt(e,n,t[n]);if(Gt)for(var n of Gt(t))_r.call(t,n)&&zt(e,n,t[n]);return e},Fr=(e,t)=>Ar(e,Lr(t));const pe=[],Yt=typeof CSSGroupingRule<"u",Xt=typeof CSSMediaRule<"u",Zt=typeof CSSSupportsRule<"u",Kt=typeof CSSConditionRule<"u";function Le(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch{return e.target}}function Qt(e,t){var n,r;const o=new Dr;pe.push(o),o.init(e);let i=window.MutationObserver||window.__rrMutationObserver;const a=(r=(n=window?.Zone)==null?void 0:n.__symbol__)==null?void 0:r.call(n,"MutationObserver");a&&window[a]&&(i=window[a]);const l=new i(o.processMutations.bind(o));return l.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),l}function Wr({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let a=[],l;const c=Te(d=>{const h=Date.now()-l;e(a.map(m=>(m.timeOffset-=h,m)),d),a=[],l=null},i),s=Te(d=>{const h=Le(d),{clientX:m,clientY:p}=it(d)?d.changedTouches[0]:d;l||(l=Date.now()),a.push({x:m,y:p,id:r.getId(h),timeOffset:Date.now()-l}),c(typeof DragEvent<"u"&&d instanceof DragEvent?x.Drag:d instanceof MouseEvent?x.MouseMove:x.TouchMove)},o,{trailing:!1}),u=[te("mousemove",s,n),te("touchmove",s,n),te("drag",s,n)];return()=>{u.forEach(d=>d())}}function $r({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const i=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[],l=c=>s=>{const u=Le(s);if(ne(u,r,!0)||Lt(u))return;const d=it(s)?s.changedTouches[0]:s;if(!d)return;const h=n.getId(u),{clientX:m,clientY:p}=d;e({type:H[c],id:h,x:m,y:p})};return Object.keys(H).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&i[c]!==!1).forEach(c=>{const s=c.toLowerCase(),u=l(c);a.push(te(s,u,t))}),()=>{a.forEach(c=>c())}}function Jt({scrollCb:e,doc:t,mirror:n,blockClass:r,sampling:o}){const i=Te(a=>{const l=Le(a);if(!l||ne(l,r,!0))return;const c=n.getId(l);if(l===t){const s=t.scrollingElement||t.documentElement;e({id:c,x:s.scrollLeft,y:s.scrollTop})}else e({id:c,x:l.scrollLeft,y:l.scrollTop})},o.scroll||100);return te("scroll",i,t)}function Vr({viewportResizeCb:e}){let t=-1,n=-1;const r=Te(()=>{const o=nt(),i=rt();(t!==o||n!==i)&&(e({width:Number(i),height:Number(o)}),t=o,n=i)},200);return te("resize",r,window)}function qt(e,t){const n=Ht({},e);return t||delete n.userTriggered,n}const Ur=["INPUT","TEXTAREA","SELECT"],en=new WeakMap;function jr({inputCb:e,doc:t,mirror:n,blockClass:r,ignoreClass:o,maskInputOptions:i,maskInputFn:a,sampling:l,userTriggeredOnInput:c}){function s(p){let g=Le(p);const N=p.isTrusted;if(g&&g.tagName==="OPTION"&&(g=g.parentElement),!g||!g.tagName||Ur.indexOf(g.tagName)<0||ne(g,r,!0))return;const f=g.type;if(g.classList.contains(o))return;let b=g.value,S=!1;f==="radio"||f==="checkbox"?S=g.checked:(i[g.tagName.toLowerCase()]||i[f])&&(b=Qe({maskInputOptions:i,tagName:g.tagName,type:f,value:b,maskInputFn:a})),u(g,qt({text:b,isChecked:S,userTriggered:N},c));const y=g.name;f==="radio"&&y&&S&&t.querySelectorAll(`input[type="radio"][name="${y}"]`).forEach(M=>{M!==g&&u(M,qt({text:M.value,isChecked:!S,userTriggered:!1},c))})}function u(p,g){const N=en.get(p);if(!N||N.text!==g.text||N.isChecked!==g.isChecked){en.set(p,g);const f=n.getId(p);e(Fr(Ht({},g),{id:f}))}}const d=(l.input==="last"?["change"]:["input","change"]).map(p=>te(p,s,t)),h=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),m=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return h&&h.set&&d.push(...m.map(p=>Oe(p[0],p[1],{set(){s({target:this})}}))),()=>{d.forEach(p=>p())}}function Ge(e){const t=[];function n(r,o){if(Yt&&r.parentRule instanceof CSSGroupingRule||Xt&&r.parentRule instanceof CSSMediaRule||Zt&&r.parentRule instanceof CSSSupportsRule||Kt&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(i)}else{const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(i)}return o}return n(e,t)}function Br({styleSheetRuleCb:e,mirror:t},{win:n}){const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=function(l,c){const s=t.getId(this.ownerNode);return s!==-1&&e({id:s,adds:[{rule:l,index:c}]}),r.apply(this,arguments)};const o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=function(l){const c=t.getId(this.ownerNode);return c!==-1&&e({id:c,removes:[{index:l}]}),o.apply(this,arguments)};const i={};Yt?i.CSSGroupingRule=n.CSSGroupingRule:(Xt&&(i.CSSMediaRule=n.CSSMediaRule),Kt&&(i.CSSConditionRule=n.CSSConditionRule),Zt&&(i.CSSSupportsRule=n.CSSSupportsRule));const a={};return Object.entries(i).forEach(([l,c])=>{a[l]={insertRule:c.prototype.insertRule,deleteRule:c.prototype.deleteRule},c.prototype.insertRule=function(s,u){const d=t.getId(this.parentStyleSheet.ownerNode);return d!==-1&&e({id:d,adds:[{rule:s,index:[...Ge(this),u||0]}]}),a[l].insertRule.apply(this,arguments)},c.prototype.deleteRule=function(s){const u=t.getId(this.parentStyleSheet.ownerNode);return u!==-1&&e({id:u,removes:[{index:[...Ge(this),s]}]}),a[l].deleteRule.apply(this,arguments)}}),()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=o,Object.entries(i).forEach(([l,c])=>{c.prototype.insertRule=a[l].insertRule,c.prototype.deleteRule=a[l].deleteRule})}}function Gr({styleDeclarationCb:e,mirror:t},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=function(i,a,l){var c,s;const u=t.getId((s=(c=this.parentRule)==null?void 0:c.parentStyleSheet)==null?void 0:s.ownerNode);return u!==-1&&e({id:u,set:{property:i,value:a,priority:l},index:Ge(this.parentRule)}),r.apply(this,arguments)};const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=function(i){var a,l;const c=t.getId((l=(a=this.parentRule)==null?void 0:a.parentStyleSheet)==null?void 0:l.ownerNode);return c!==-1&&e({id:c,remove:{property:i},index:Ge(this.parentRule)}),o.apply(this,arguments)},()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=o}}function zr({mediaInteractionCb:e,blockClass:t,mirror:n,sampling:r}){const o=a=>Te(l=>{const c=Le(l);if(!c||ne(c,t,!0))return;const{currentTime:s,volume:u,muted:d}=c;e({type:a,id:n.getId(c),currentTime:s,volume:u,muted:d})},r.media||500),i=[te("play",o(me.Play)),te("pause",o(me.Pause)),te("seeked",o(me.Seeked)),te("volumechange",o(me.VolumeChange))];return()=>{i.forEach(a=>a())}}function Hr({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(l,c,s){const u=new i(l,c,s);return o.set(u,{family:l,buffer:typeof c!="string",descriptors:s,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),u};const a=he(t.fonts,"add",function(l){return function(c){return setTimeout(()=>{const s=o.get(c);s&&(e(s),o.delete(c))},0),l.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(a),()=>{r.forEach(l=>l())}}function Yr(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:a,inputCb:l,mediaInteractionCb:c,styleSheetRuleCb:s,styleDeclarationCb:u,canvasMutationCb:d,fontCb:h}=e;e.mutationCb=(...m)=>{t.mutation&&t.mutation(...m),n(...m)},e.mousemoveCb=(...m)=>{t.mousemove&&t.mousemove(...m),r(...m)},e.mouseInteractionCb=(...m)=>{t.mouseInteraction&&t.mouseInteraction(...m),o(...m)},e.scrollCb=(...m)=>{t.scroll&&t.scroll(...m),i(...m)},e.viewportResizeCb=(...m)=>{t.viewportResize&&t.viewportResize(...m),a(...m)},e.inputCb=(...m)=>{t.input&&t.input(...m),l(...m)},e.mediaInteractionCb=(...m)=>{t.mediaInteaction&&t.mediaInteaction(...m),c(...m)},e.styleSheetRuleCb=(...m)=>{t.styleSheetRule&&t.styleSheetRule(...m),s(...m)},e.styleDeclarationCb=(...m)=>{t.styleDeclaration&&t.styleDeclaration(...m),u(...m)},e.canvasMutationCb=(...m)=>{t.canvasMutation&&t.canvasMutation(...m),d(...m)},e.fontCb=(...m)=>{t.font&&t.font(...m),h(...m)}}function Xr(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};Yr(e,t);const r=Qt(e,e.doc),o=Wr(e),i=$r(e),a=Jt(e),l=Vr(e),c=jr(e),s=zr(e),u=Br(e,{win:n}),d=Gr(e,{win:n}),h=e.collectFonts?Hr(e):()=>{},m=[];for(const p of e.plugins)m.push(p.observer(p.callback,n,p.options));return()=>{pe.forEach(p=>p.reset()),r.disconnect(),o(),i(),a(),l(),c(),s(),u(),d(),h(),m.forEach(p=>p())}}class Zr{constructor(t){this.iframes=new WeakMap,this.mutationCb=t.mutationCb}addIframe(t){this.iframes.set(t,!0)}addLoadListener(t){this.loadListener=t}attachIframe(t,n,r){var o;this.mutationCb({adds:[{parentId:r.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(o=this.loadListener)==null||o.call(this,t)}}var Kr=Object.defineProperty,Qr=Object.defineProperties,Jr=Object.getOwnPropertyDescriptors,tn=Object.getOwnPropertySymbols,qr=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable,nn=(e,t,n)=>t in e?Kr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rn=(e,t)=>{for(var n in t||(t={}))qr.call(t,n)&&nn(e,n,t[n]);if(tn)for(var n of tn(t))eo.call(t,n)&&nn(e,n,t[n]);return e},on=(e,t)=>Qr(e,Jr(t));class to{constructor(t){this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;const n=this;this.restorePatches.push(he(HTMLElement.prototype,"attachShadow",function(r){return function(){const o=r.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),o}}))}addShadowRoot(t,n){Qt(on(rn({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),Jt(on(rn({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))}observeAttachShadow(t){if(t.contentWindow){const n=this;this.restorePatches.push(he(t.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(){const o=r.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,t.contentDocument),o}}))}}reset(){this.restorePatches.forEach(t=>t())}}for(var we="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pe=typeof Uint8Array>"u"?[]:new Uint8Array(256),ze=0;ze<we.length;ze++)Pe[we.charCodeAt(ze)]=ze;var no=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=we[t[n]>>2],o+=we[(t[n]&3)<<4|t[n+1]>>4],o+=we[(t[n+1]&15)<<2|t[n+2]>>6],o+=we[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o},ro=function(e){var t=e.length*.75,n=e.length,r,o=0,i,a,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var s=new ArrayBuffer(t),u=new Uint8Array(s);for(r=0;r<n;r+=4)i=Pe[e.charCodeAt(r)],a=Pe[e.charCodeAt(r+1)],l=Pe[e.charCodeAt(r+2)],c=Pe[e.charCodeAt(r+3)],u[o++]=i<<2|a>>4,u[o++]=(a&15)<<4|l>>2,u[o++]=(l&3)<<6|c&63;return s};const sn=new Map;function oo(e,t){let n=sn.get(e);return n||(n=new Map,sn.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const an=(e,t,n)=>{if(!e||!(cn(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=oo(n,r);let i=o.indexOf(e);return i===-1&&(i=o.length,o.push(e)),i};function He(e,t,n){if(e instanceof Array)return e.map(r=>He(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,o=no(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[He(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[He(e.data,t,n),e.width,e.height]};if(cn(e,t)||typeof e=="object"){const r=e.constructor.name,o=an(e,t,n);return{rr_type:r,index:o}}}}return e}const ln=(e,t,n)=>[...e].map(r=>He(r,t,n)),cn=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof t[r]=="function");return Boolean(n.find(r=>e instanceof t[r]))};function io(e,t,n,r){const o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=he(t.CanvasRenderingContext2D.prototype,a,function(c){return function(...s){return ne(this.canvas,n,!0)||setTimeout(()=>{const u=ln([...s],t,this);e(this.canvas,{type:ue["2D"],property:a,args:u})},0),c.apply(this,s)}});o.push(l)}catch{const c=Oe(t.CanvasRenderingContext2D.prototype,a,{set(s){e(this.canvas,{type:ue["2D"],property:a,args:[s],setter:!0})}});o.push(c)}return()=>{o.forEach(a=>a())}}function un(e,t){const n=[];try{const r=he(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(i,...a){return ne(this,t,!0)||"__context"in this||(this.__context=i),o.apply(this,[i,...a])}});n.push(r)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(r=>r())}}function dn(e,t,n,r,o,i){const a=[],l=Object.getOwnPropertyNames(e);for(const c of l)try{if(typeof e[c]!="function")continue;const s=he(e,c,function(u){return function(...d){const h=u.apply(this,d);if(an(h,i,e),!ne(this.canvas,r,!0)){const m=ln([...d],i,e),p={type:t,property:c,args:m};n(this.canvas,p)}return h}});a.push(s)}catch{const u=Oe(e,c,{set(d){n(this.canvas,{type:t,property:c,args:[d],setter:!0})}});a.push(u)}return a}function so(e,t,n,r){const o=[];return o.push(...dn(t.WebGLRenderingContext.prototype,ue.WebGL,e,n,r,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...dn(t.WebGL2RenderingContext.prototype,ue.WebGL2,e,n,r,t)),()=>{o.forEach(i=>i())}}function ao(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,i=n.length;o<i;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}function lo(e,t,n){var r=t===void 0?null:t,o=n===void 0?!1:n,i=ao(e,o),a=i.indexOf(`
5
+ `,10)+1,l=i.substring(a)+(r?"//# sourceMappingURL="+r:""),c=new Blob([l],{type:"application/javascript"});return URL.createObjectURL(c)}function co(e,t,n){var r;return function(i){return r=r||lo(e,t,n),new Worker(r,i)}}var uo=co("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixsPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylsW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgZD1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCx1PW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gcChzLGUpe2NvbnN0IG49YCR7c30tJHtlfWA7aWYodS5oYXMobikpcmV0dXJuIHUuZ2V0KG4pO2NvbnN0IGE9bmV3IE9mZnNjcmVlbkNhbnZhcyhzLGUpO2EuZ2V0Q29udGV4dCgiMmQiKTtjb25zdCB0PWF3YWl0KGF3YWl0IGEuY29udmVydFRvQmxvYigpKS5hcnJheUJ1ZmZlcigpLGc9ZCh0KTtyZXR1cm4gdS5zZXQobixnKSxnfWNvbnN0IGk9c2VsZjtpLm9ubWVzc2FnZT1hc3luYyBmdW5jdGlvbihzKXtpZighKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcykpcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOnMuZGF0YS5pZH0pO2NvbnN0e2lkOmUsYml0bWFwOm4sd2lkdGg6YSxoZWlnaHQ6dH09cy5kYXRhLGc9cChhLHQpLGg9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2guZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCB3PWF3YWl0IGguY29udmVydFRvQmxvYigpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89ZChiKTtpZighYy5oYXMoZSkmJmF3YWl0IGc9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX19KSgpOwoK",null,!1),hn=Object.getOwnPropertySymbols,ho=Object.prototype.hasOwnProperty,mo=Object.prototype.propertyIsEnumerable,po=(e,t)=>{var n={};for(var r in e)ho.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hn)for(var r of hn(e))t.indexOf(r)<0&&mo.call(e,r)&&(n[r]=e[r]);return n},fo=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{l(n.next(c))}catch(s){o(s)}},a=c=>{try{l(n.throw(c))}catch(s){o(s)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,a);l((n=n.apply(e,t)).next())});class go{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(a,l){(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(l)};const{sampling:n="all",win:r,blockClass:o,recordCanvas:i}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,i&&n==="all"&&this.initCanvasMutationObserver(r,o),i&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o)}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(t,n,r){const o=un(n,r),i=new Map,a=new uo;a.onmessage=d=>{const{id:h}=d.data;if(i.set(h,!1),!("base64"in d.data))return;const{base64:m,type:p,width:g,height:N}=d.data;this.mutationCb({id:h,type:ue["2D"],commands:[{property:"clearRect",args:[0,0,g,N]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:m}],type:p}]},0,0]}]})};const l=1e3/t;let c=0,s;const u=d=>{if(c&&d-c<l){s=requestAnimationFrame(u);return}c=d,n.document.querySelectorAll(`canvas:not(.${r} *)`).forEach(h=>fo(this,null,function*(){var m;const p=this.mirror.getId(h);if(i.get(p))return;if(i.set(p,!0),["webgl","webgl2"].includes(h.__context)){const N=h.getContext(h.__context);((m=N?.getContextAttributes())==null?void 0:m.preserveDrawingBuffer)===!1&&N?.clear(N.COLOR_BUFFER_BIT)}if(h.width===0||h.height===0)return;const g=yield createImageBitmap(h);a.postMessage({id:p,bitmap:g,width:h.width,height:h.height},[g])})),s=requestAnimationFrame(u)};s=requestAnimationFrame(u),this.resetObservers=()=>{o(),cancelAnimationFrame(s)}}initCanvasMutationObserver(t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=un(t,n),o=io(this.processMutation.bind(this),t,n,this.mirror),i=so(this.processMutation.bind(this),t,n,this.mirror);this.resetObservers=()=>{r(),o(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(a=>po(a,["type"])),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}}class vo{constructor(t){this.trackedStylesheets=new WeakSet,this.mutationCb=t.mutationCb}addStylesheet(t){this.trackedStylesheets.has(t)||(this.trackedStylesheets.add(t),this.trackStylesheet(t))}trackStylesheet(t){}attachStylesheet(t,n,r){this.mutationCb({adds:[{parentId:r.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[]}),this.addStylesheet(t)}}var yo=Object.defineProperty,bo=Object.defineProperties,So=Object.getOwnPropertyDescriptors,mn=Object.getOwnPropertySymbols,To=Object.prototype.hasOwnProperty,No=Object.prototype.propertyIsEnumerable,pn=(e,t,n)=>t in e?yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,re=(e,t)=>{for(var n in t||(t={}))To.call(t,n)&&pn(e,n,t[n]);if(mn)for(var n of mn(t))No.call(t,n)&&pn(e,n,t[n]);return e},Eo=(e,t)=>bo(e,So(t));function Z(e){return Eo(re({},e),{timestamp:Date.now()})}let G,_e;const se=wt();function fe(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="highlight-block",blockSelector:i=null,ignoreClass:a="highlight-ignore",maskTextClass:l="highlight-mask",maskTextSelector:c=null,inlineStylesheet:s=!0,maskAllInputs:u,maskInputOptions:d,slimDOMOptions:h,maskInputFn:m,maskTextFn:p=Je,hooks:g,packFn:N,sampling:f={},mousemoveWait:b,recordCanvas:S=!1,userTriggeredOnInput:y=!1,collectFonts:M=!1,inlineImages:D=!1,plugins:L,keepIframeSrcFn:P=()=>!1,enableStrictPrivacy:A=!1}=e;if(!t)throw new Error("emit function is required");b!==void 0&&f.mousemove===void 0&&(f.mousemove=b),se.reset();const z=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}:d!==void 0?d:{password:!0},$=h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:h==="all",headMetaDescKeywords:h==="all"}:h||{};st();let K,Q=0;const j=E=>{for(const C of L||[])C.eventProcessor&&(E=C.eventProcessor(E));return N&&(E=N(E)),E};G=(E,C)=>{var J;if(((J=pe[0])==null?void 0:J.isFrozen())&&E.type!==w.FullSnapshot&&!(E.type===w.IncrementalSnapshot&&E.data.source===x.Mutation)&&pe.forEach(ee=>ee.unfreeze()),t(j(E),C),E.type===w.FullSnapshot)K=E,Q=0;else if(E.type===w.IncrementalSnapshot){if(E.data.source===x.Mutation&&E.data.isAttachIframe)return;Q++;const ee=r&&Q>=r,le=n&&E.timestamp-K.timestamp>n;(ee||le)&&_e(!0)}};const Y=E=>{G(Z({type:w.IncrementalSnapshot,data:re({source:x.Mutation},E)}))},X=E=>G(Z({type:w.IncrementalSnapshot,data:re({source:x.Scroll},E)})),_=E=>G(Z({type:w.IncrementalSnapshot,data:re({source:x.CanvasMutation},E)})),B=new Zr({mutationCb:Y}),T=new vo({mutationCb:Y}),v=new go({recordCanvas:S,mutationCb:_,win:window,blockClass:o,mirror:se,sampling:f.canvas}),I=new to({mutationCb:Y,scrollCb:X,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:s,maskInputOptions:z,maskTextFn:p,maskInputFn:m,recordCanvas:S,inlineImages:D,sampling:f,slimDOMOptions:$,iframeManager:B,stylesheetManager:T,canvasManager:v,keepIframeSrcFn:P,enableStrictPrivacy:A},mirror:se});_e=(E=!1)=>{var C,J,ee,le;G(Z({type:w.Meta,data:{href:window.location.href,width:rt(),height:nt()}}),E),pe.forEach(U=>U.lock());const F=Sr(document,{mirror:se,blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:s,maskAllInputs:z,maskTextFn:p,slimDOM:$,recordCanvas:S,inlineImages:D,enableStrictPrivacy:A,onSerialize:U=>{Ne(U,se)&&B.addIframe(U),lt(U,se)&&T.addStylesheet(U),Ae(U)&&I.addShadowRoot(U.shadowRoot,document)},onIframeLoad:(U,ve)=>{B.attachIframe(U,ve,se),I.observeAttachShadow(U)},onStylesheetLoad:(U,ve)=>{T.attachStylesheet(U,ve,se)},keepIframeSrcFn:P});if(!F)return console.warn("Failed to snapshot the document");G(Z({type:w.FullSnapshot,data:{node:F,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((J=(C=document?.body)==null?void 0:C.parentElement)==null?void 0:J.scrollLeft)||document?.body.scrollLeft||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((le=(ee=document?.body)==null?void 0:ee.parentElement)==null?void 0:le.scrollTop)||document?.body.scrollTop||0}}})),pe.forEach(U=>U.unlock())};try{const E=[];E.push(te("DOMContentLoaded",()=>{G(Z({type:w.DomContentLoaded,data:{}}))}));const C=ee=>{var le;return Xr({mutationCb:Y,mousemoveCb:(F,U)=>G(Z({type:w.IncrementalSnapshot,data:{source:U,positions:F}})),mouseInteractionCb:F=>G(Z({type:w.IncrementalSnapshot,data:re({source:x.MouseInteraction},F)})),scrollCb:X,viewportResizeCb:F=>G(Z({type:w.IncrementalSnapshot,data:re({source:x.ViewportResize},F)})),inputCb:F=>G(Z({type:w.IncrementalSnapshot,data:re({source:x.Input},F)})),mediaInteractionCb:F=>G(Z({type:w.IncrementalSnapshot,data:re({source:x.MediaInteraction},F)})),styleSheetRuleCb:F=>G(Z({type:w.IncrementalSnapshot,data:re({source:x.StyleSheetRule},F)})),styleDeclarationCb:F=>G(Z({type:w.IncrementalSnapshot,data:re({source:x.StyleDeclaration},F)})),canvasMutationCb:_,fontCb:F=>G(Z({type:w.IncrementalSnapshot,data:re({source:x.Font},F)})),blockClass:o,ignoreClass:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:z,inlineStylesheet:s,sampling:f,recordCanvas:S,inlineImages:D,userTriggeredOnInput:y,collectFonts:M,doc:ee,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:P,blockSelector:i,slimDOMOptions:$,mirror:se,iframeManager:B,stylesheetManager:T,shadowDomManager:I,canvasManager:v,enableStrictPrivacy:A,plugins:((le=L?.filter(F=>F.observer))==null?void 0:le.map(F=>({observer:F.observer,options:F.options,callback:U=>G(Z({type:w.Plugin,data:{plugin:F.name,payload:U}}))})))||[]},g)};B.addLoadListener(ee=>{E.push(C(ee.contentDocument))});const J=()=>{_e(),E.push(C(document))};return document.readyState==="interactive"||document.readyState==="complete"?J():E.push(te("load",()=>{G(Z({type:w.Load,data:{}})),J()},window)),()=>{E.forEach(ee=>ee())}}catch(E){console.warn(E)}}fe.addCustomEvent=(e,t)=>{!G||G(Z({type:w.Custom,data:{tag:e,payload:t}}))},fe.freezePage=()=>{pe.forEach(e=>e.freeze())},fe.takeFullSnapshot=e=>{if(!_e)throw new Error("please take full snapshot after start recording");_e(e)},fe.mirror=se;var R;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(R||(R={}));var wo=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var n;if(!t)return-1;var r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var n=this,r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,n){var r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)},e.prototype.replace=function(t,n){this.idNodeMap.set(t,n)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Co(){return new wo}function Io(e){const t={},n=/;(?![^(]*\))/g,r=/:(.+)/,o=/\/\*.*?\*\//g;return e.replace(o,"").split(n).forEach(function(i){if(i){const a=i.split(r);a.length>1&&(t[ht(a[0].trim())]=a[1].trim())}}),t}function fn(e){const t=[];for(const n in e){const r=e[n];if(typeof r!="string")continue;const o=Ro(n);t.push(`${o}: ${r};`)}return t.join(" ")}const Mo=/-([a-z])/g,xo=/^--[a-zA-Z0-9-]+$/,ht=e=>xo.test(e)?e:e.replace(Mo,(t,n)=>n?n.toUpperCase():""),ko=/\B([A-Z])/g,Ro=e=>e.replace(ko,"-$1").toLowerCase();class oe{constructor(...t){this.childNodes=[],this.parentElement=null,this.parentNode=null,this.ELEMENT_NODE=V.ELEMENT_NODE,this.TEXT_NODE=V.TEXT_NODE}get firstChild(){return this.childNodes[0]||null}get lastChild(){return this.childNodes[this.childNodes.length-1]||null}get nextSibling(){const t=this.parentNode;if(!t)return null;const n=t.childNodes,r=n.indexOf(this);return n[r+1]||null}contains(t){if(t===this)return!0;for(const n of this.childNodes)if(n.contains(t))return!0;return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function Do(e){return class Xn extends e{constructor(){super(...arguments),this.nodeType=V.DOCUMENT_NODE,this.nodeName="#document",this.compatMode="CSS1Compat",this.RRNodeType=R.Document,this.textContent=null}get documentElement(){return this.childNodes.find(n=>n.RRNodeType===R.Element&&n.tagName==="HTML")||null}get body(){var n;return((n=this.documentElement)===null||n===void 0?void 0:n.childNodes.find(r=>r.RRNodeType===R.Element&&r.tagName==="BODY"))||null}get head(){var n;return((n=this.documentElement)===null||n===void 0?void 0:n.childNodes.find(r=>r.RRNodeType===R.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(n){const r=n.RRNodeType;if((r===R.Element||r===R.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===R.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);return n.parentElement=null,n.parentNode=this,this.childNodes.push(n),n}insertBefore(n,r){const o=n.RRNodeType;if((o===R.Element||o===R.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===o))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${o===R.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);if(r===null)return this.appendChild(n);const i=this.childNodes.indexOf(r);if(i==-1)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return this.childNodes.splice(i,0,n),n.parentElement=null,n.parentNode=this,n}removeChild(n){const r=this.childNodes.indexOf(n);if(r===-1)throw new Error("Failed to execute 'removeChild' on 'RRDocument': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(r,1),n.parentElement=null,n.parentNode=null,n}open(){this.childNodes=[]}close(){}write(n){let r;if(n==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":n==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const o=this.createDocumentType("html",r,"");this.open(),this.appendChild(o)}}createDocument(n,r,o){return new Xn}createDocumentType(n,r,o){const i=new(gn(oe))(n,r,o);return i.ownerDocument=this,i}createElement(n){const r=new(vn(oe))(n);return r.ownerDocument=this,r}createElementNS(n,r){return this.createElement(r)}createTextNode(n){const r=new(yn(oe))(n);return r.ownerDocument=this,r}createComment(n){const r=new(bn(oe))(n);return r.ownerDocument=this,r}createCDATASection(n){const r=new(Sn(oe))(n);return r.ownerDocument=this,r}toString(){return"RRDocument"}}}function gn(e){return class extends e{constructor(t,n,r){super(),this.nodeType=V.DOCUMENT_TYPE_NODE,this.RRNodeType=R.DocumentType,this.textContent=null,this.name=t,this.publicId=n,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}}}function vn(e){return class extends e{constructor(t){super(),this.nodeType=V.ELEMENT_NODE,this.RRNodeType=R.Element,this.attributes={},this.shadowRoot=null,this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(n=>t+=n.textContent),t}set textContent(t){this.childNodes=[this.ownerDocument.createTextNode(t)]}get classList(){return new Ao(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?Io(this.attributes.style):{},n=/\B([A-Z])/g;return t.setProperty=(r,o,i)=>{if(n.test(r))return;const a=ht(r);o?t[a]=o:delete t[a],i==="important"&&(t[a]+=" !important"),this.attributes.style=fn(t)},t.removeProperty=r=>{if(n.test(r))return"";const o=ht(r),i=t[o]||"";return delete t[o],this.attributes.style=fn(t),i},t}getAttribute(t){return this.attributes[t]||null}setAttribute(t,n){this.attributes[t]=n}setAttributeNS(t,n,r){this.setAttribute(n,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return this.childNodes.push(t),t.parentNode=this,t.parentElement=this,t}insertBefore(t,n){if(n===null)return this.appendChild(t);const r=this.childNodes.indexOf(n);if(r==-1)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return this.childNodes.splice(r,0,t),t.parentElement=this,t.parentNode=this,t}removeChild(t){const n=this.childNodes.indexOf(t);if(n===-1)throw new Error("Failed to execute 'removeChild' on 'RRElement': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(n,1),t.parentElement=null,t.parentNode=null,t}attachShadow(t){const n=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=n,n}dispatchEvent(t){return!0}toString(){let t="";for(const n in this.attributes)t+=`${n}="${this.attributes[n]}" `;return`${this.tagName} ${t}`}}}function Oo(e){return class extends e{attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}}function yn(e){return class extends e{constructor(t){super(),this.nodeType=V.TEXT_NODE,this.nodeName="#text",this.RRNodeType=R.Text,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}}function bn(e){return class extends e{constructor(t){super(),this.nodeType=V.COMMENT_NODE,this.nodeName="#comment",this.RRNodeType=R.Comment,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}}function Sn(e){return class extends e{constructor(t){super(),this.nodeName="#cdata-section",this.nodeType=V.CDATA_SECTION_NODE,this.RRNodeType=R.CDATA,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}}class Ao{constructor(t,n){if(this.classes=[],this.add=(...r)=>{for(const o of r){const i=String(o);this.classes.indexOf(i)>=0||this.classes.push(i)}this.onChange&&this.onChange(this.classes.join(" "))},this.remove=(...r)=>{this.classes=this.classes.filter(o=>r.indexOf(o)===-1),this.onChange&&this.onChange(this.classes.join(" "))},t){const r=t.trim().split(/\s+/);this.classes.push(...r)}this.onChange=n}}var V;(function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(V||(V={}));const mt={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"};function ae(e,t,n,r){const o=e.childNodes,i=t.childNodes;r=r||t.mirror||t.ownerDocument.mirror,(o.length>0||i.length>0)&&Tn(Array.from(o),i,e,n,r);let a=null,l=null;switch(t.RRNodeType){case R.Document:{l=t.scrollData;break}case R.Element:{const c=e,s=t;switch(Lo(c,s,r),l=s.scrollData,a=s.inputData,s.tagName){case"AUDIO":case"VIDEO":{const u=e,d=s;d.paused!==void 0&&(d.paused?u.pause():u.play()),d.muted!==void 0&&(u.muted=d.muted),d.volume!==void 0&&(u.volume=d.volume),d.currentTime!==void 0&&(u.currentTime=d.currentTime);break}case"CANVAS":t.canvasMutations.forEach(u=>n.applyCanvas(u.event,u.mutation,e));break;case"STYLE":Po(c,t.rules);break}if(s.shadowRoot){c.shadowRoot||c.attachShadow({mode:"open"});const u=c.shadowRoot.childNodes,d=s.shadowRoot.childNodes;(u.length>0||d.length>0)&&Tn(Array.from(u),d,c.shadowRoot,n,r)}break}case R.Text:case R.Comment:case R.CDATA:e.textContent!==t.data&&(e.textContent=t.data);break}if(l&&n.applyScroll(l,!0),a&&n.applyInput(a),t.nodeName==="IFRAME"){const c=e.contentDocument,s=t;if(c){const u=r.getMeta(s.contentDocument);u&&n.mirror.add(c,Object.assign({},u)),ae(c,s.contentDocument,n,r)}}}function Lo(e,t,n){const r=e.attributes,o=t.attributes;for(const i in o){const a=o[i],l=n.getMeta(t);if(l&&"isSVG"in l&&l.isSVG&&mt[i])e.setAttributeNS(mt[i],i,a);else if(t.tagName==="CANVAS"&&i==="rr_dataURL"){const c=document.createElement("img");c.src=a,c.onload=()=>{const s=e.getContext("2d");s&&s.drawImage(c,0,0,c.width,c.height)}}else e.setAttribute(i,a)}for(const{name:i}of Array.from(r))i in o||e.removeAttribute(i);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function Tn(e,t,n,r,o){var i;let a=0,l=e.length-1,c=0,s=t.length-1,u=e[a],d=e[l],h=t[c],m=t[s],p,g;for(;a<=l&&c<=s;){const N=r.mirror.getId(u),f=r.mirror.getId(d),b=o.getId(h),S=o.getId(m);if(u===void 0)u=e[++a];else if(d===void 0)d=e[--l];else if(N!==-1&&N===b)ae(u,h,r,o),u=e[++a],h=t[++c];else if(f!==-1&&f===S)ae(d,m,r,o),d=e[--l],m=t[--s];else if(N!==-1&&N===S)n.insertBefore(u,d.nextSibling),ae(u,m,r,o),u=e[++a],m=t[--s];else if(f!==-1&&f===b)n.insertBefore(d,u),ae(d,h,r,o),d=e[--l],h=t[++c];else{if(!p){p={};for(let y=a;y<=l;y++){const M=e[y];M&&r.mirror.hasNode(M)&&(p[r.mirror.getId(M)]=y)}}if(g=p[o.getId(h)],g){const y=e[g];n.insertBefore(y,u),ae(y,h,r,o),e[g]=void 0}else{const y=pt(h,r.mirror,o);n.nodeName==="#document"&&((i=r.mirror.getMeta(y))===null||i===void 0?void 0:i.type)===R.Element&&n.documentElement&&(n.removeChild(n.documentElement),e[a]=void 0,u=void 0),n.insertBefore(y,u||null),ae(y,h,r,o)}h=t[++c]}}if(a>l){const N=t[s+1];let f=null;for(N&&n.childNodes.forEach(b=>{r.mirror.getId(b)===o.getId(N)&&(f=b)});c<=s;++c){const b=pt(t[c],r.mirror,o);n.insertBefore(b,f),ae(b,t[c],r,o)}}else if(c>s)for(;a<=l;a++){const N=e[a];N&&(n.removeChild(N),r.mirror.removeNodeFromMap(N))}}function pt(e,t,n){const r=n.getId(e),o=n.getMeta(e);let i=null;if(r>-1&&(i=t.getNode(r)),i!==null)return i;switch(e.RRNodeType){case R.Document:i=new Document;break;case R.DocumentType:i=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case R.Element:{e.tagName.toLowerCase(),o&&"isSVG"in o&&o?.isSVG?i=document.createElementNS(mt.svg,e.tagName.toLowerCase()):i=document.createElement(e.tagName);break}case R.Text:i=document.createTextNode(e.data);break;case R.Comment:i=document.createComment(e.data);break;case R.CDATA:i=document.createCDATASection(e.data);break}return o&&t.add(i,Object.assign({},o)),i}function Fe(e,t){const n=e[t[0]];return t.length===1?n:Fe(n.cssRules[t[1]].cssRules,t.slice(2))}var ie;(function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot",e[e.SetProperty=3]="SetProperty",e[e.RemoveProperty=4]="RemoveProperty"})(ie||(ie={}));function Nn(e){const t=[...e],n=t.pop();return{positions:t,index:n}}function Po(e,t){const n=e.sheet;t.forEach(r=>{if(r.type===ie.Insert)try{if(Array.isArray(r.index)){const{positions:o,index:i}=Nn(r.index);Fe(n.cssRules,o).insertRule(r.cssText,i)}else n.insertRule(r.cssText,r.index)}catch{}else if(r.type===ie.Remove)try{if(Array.isArray(r.index)){const{positions:o,index:i}=Nn(r.index);Fe(n.cssRules,o).deleteRule(i||0)}else n.deleteRule(r.index)}catch{}else r.type===ie.SetProperty?Fe(n.cssRules,r.index).style.setProperty(r.property,r.value,r.priority):r.type===ie.RemoveProperty&&Fe(n.cssRules,r.index).style.removeProperty(r.property)})}class Ce extends Do(oe){constructor(t){super(),this._unserializedId=-1,this.mirror=Ho(),this.scrollData=null,t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,n,r){return new Ce}createDocumentType(t,n,r){const o=new _o(t,n,r);return o.ownerDocument=this,o}createElement(t){const n=t.toUpperCase();let r;switch(n){case"AUDIO":case"VIDEO":r=new Fo(n);break;case"IFRAME":r=new Vo(n,this.mirror);break;case"CANVAS":r=new Wo(n);break;case"STYLE":r=new $o(n);break;default:r=new We(n);break}return r.ownerDocument=this,r}createComment(t){const n=new jo(t);return n.ownerDocument=this,n}createCDATASection(t){const n=new Bo(t);return n.ownerDocument=this,n}createTextNode(t){const n=new Uo(t);return n.ownerDocument=this,n}destroyTree(){this.childNodes=[],this.mirror.reset()}open(){super.open(),this._unserializedId=-1}}const _o=gn(oe);class We extends vn(oe){constructor(){super(...arguments),this.inputData=null,this.scrollData=null}}class Fo extends Oo(We){}class Wo extends We{constructor(){super(...arguments),this.canvasMutations=[]}getContext(){return null}}class $o extends We{constructor(){super(...arguments),this.rules=[]}}class Vo extends We{constructor(t,n){super(t),this.contentDocument=new Ce,this.contentDocument.mirror=n}}const Uo=yn(oe),jo=bn(oe),Bo=Sn(oe);function Go(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function En(e,t,n,r){let o;switch(e.nodeType){case V.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?o=r.contentDocument:(o=t,o.compatMode=e.compatMode);break;case V.DOCUMENT_TYPE_NODE:const a=e;o=t.createDocumentType(a.name,a.publicId,a.systemId);break;case V.ELEMENT_NODE:const l=e,c=Go(l);o=t.createElement(c);const s=o;for(const{name:u,value:d}of Array.from(l.attributes))s.attributes[u]=d;l.scrollLeft&&(s.scrollLeft=l.scrollLeft),l.scrollTop&&(s.scrollTop=l.scrollTop);break;case V.TEXT_NODE:o=t.createTextNode(e.textContent||"");break;case V.CDATA_SECTION_NODE:o=t.createCDATASection(e.data);break;case V.COMMENT_NODE:o=t.createComment(e.textContent||"");break;case V.DOCUMENT_FRAGMENT_NODE:o=r.attachShadow({mode:"open"});break;default:return null}let i=n.getMeta(e);return t instanceof Ce&&(i||(i=wn(o,t.unserializedId),n.add(e,i)),t.mirror.add(o,Object.assign({},i))),o}function zo(e,t=Co(),n=new Ce){function r(o,i){const a=En(o,n,t,i);a!==null&&(i?.nodeName!=="IFRAME"&&o.nodeType!==V.DOCUMENT_FRAGMENT_NODE&&(i?.appendChild(a),a.parentNode=i,a.parentElement=i),o.nodeName==="IFRAME"?r(o.contentDocument,a):(o.nodeType===V.DOCUMENT_NODE||o.nodeType===V.ELEMENT_NODE||o.nodeType===V.DOCUMENT_FRAGMENT_NODE)&&(o.nodeType===V.ELEMENT_NODE&&o.shadowRoot&&r(o.shadowRoot,a),o.childNodes.forEach(l=>r(l,a))))}return r(e,null),n}function Ho(){return new Yo}class Yo{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){var n;if(!t)return-1;const r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function wn(e,t){switch(e.RRNodeType){case R.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case R.DocumentType:const n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId};case R.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case R.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case R.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case R.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}function Cn(e){return e=e||Object.create(null),{on:function(n,r){(e[n]||(e[n]=[])).push(r)},off:function(n,r){e[n]&&e[n].splice(e[n].indexOf(r)>>>0,1)},emit:function(n,r){(e[n]||[]).slice().map(function(o){o(r)}),(e["*"]||[]).slice().map(function(o){o(n,r)})}}}var Xo=Object.freeze({__proto__:null,default:Cn});function Zo(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const n=e.HTMLElement||e.Element,r=468,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||c,scrollIntoView:n.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function a(f){const b=["MSIE ","Trident/","Edge/"];return new RegExp(b.join("|")).test(f)}const l=a(e.navigator.userAgent)?1:0;function c(f,b){this.scrollLeft=f,this.scrollTop=b}function s(f){return .5*(1-Math.cos(Math.PI*f))}function u(f){if(f===null||typeof f!="object"||f.behavior===void 0||f.behavior==="auto"||f.behavior==="instant")return!0;if(typeof f=="object"&&f.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+f.behavior+" is not a valid value for enumeration ScrollBehavior.")}function d(f,b){if(b==="Y")return f.clientHeight+l<f.scrollHeight;if(b==="X")return f.clientWidth+l<f.scrollWidth}function h(f,b){const S=e.getComputedStyle(f,null)["overflow"+b];return S==="auto"||S==="scroll"}function m(f){const b=d(f,"Y")&&h(f,"Y"),S=d(f,"X")&&h(f,"X");return b||S}function p(f){for(;f!==t.body&&m(f)===!1;)f=f.parentNode||f.host;return f}function g(f){const b=i();let S,y,M,D=(b-f.startTime)/r;D=D>1?1:D,S=s(D),y=f.startX+(f.x-f.startX)*S,M=f.startY+(f.y-f.startY)*S,f.method.call(f.scrollable,y,M),(y!==f.x||M!==f.y)&&e.requestAnimationFrame(g.bind(e,f))}function N(f,b,S){let y,M,D,L;const P=i();f===t.body?(y=e,M=e.scrollX||e.pageXOffset,D=e.scrollY||e.pageYOffset,L=o.scroll):(y=f,M=f.scrollLeft,D=f.scrollTop,L=c),g({scrollable:y,method:L,startTime:P,startX:M,startY:D,x:b,y:S})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){o.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}N.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])){o.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}N.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},n.prototype.scroll=n.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(u(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const f=arguments[0].left,b=arguments[0].top;N.call(this,this,typeof f>"u"?this.scrollLeft:~~f,typeof b>"u"?this.scrollTop:~~b)},n.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){o.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},n.prototype.scrollIntoView=function(){if(u(arguments[0])===!0){o.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const f=p(this),b=f.getBoundingClientRect(),S=this.getBoundingClientRect();f!==t.body?(N.call(this,f,f.scrollLeft+S.left-b.left,f.scrollTop+S.top-b.top),e.getComputedStyle(f).position!=="fixed"&&e.scrollBy({left:b.left,top:b.top,behavior:"smooth"})):e.scrollBy({left:S.left,top:S.top,behavior:"smooth"})}}class Ko{constructor(t=[],n){this.timeOffset=0,this.raf=null,this.actions=t,this.speed=n}addAction(t){const n=this.findActionIndex(t);this.actions.splice(n,0,t)}addActions(t){this.actions=this.actions.concat(t)}replaceActions(t){this.actions.length=0,this.actions.splice(0,0,...t)}start(){this.timeOffset=0;let t=performance.now();const{actions:n}=this,r=this;function o(){const i=performance.now();for(r.timeOffset+=(i-t)*r.speed,t=i;n.length;){const a=n[0];if(r.timeOffset>=a.delay)n.shift(),a.doAction();else break}(n.length>0||r.liveMode)&&(r.raf=requestAnimationFrame(o))}this.raf=requestAnimationFrame(o)}clear(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}toggleLiveMode(t){this.liveMode=t}isActive(){return this.raf!==null}findActionIndex(t){let n=0,r=this.actions.length-1;for(;n<=r;){const o=Math.floor((n+r)/2);if(this.actions[o].delay<t.delay)n=o+1;else if(this.actions[o].delay>t.delay)r=o-1;else return o+1}return n}}function ft(e,t){if(e.type===w.IncrementalSnapshot&&e.data.source===x.MouseMove){const n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
6
6
  Copyright (c) Microsoft Corporation.
7
7
 
8
8
  Permission to use, copy, modify, and/or distribute this software for any
@@ -15,5 +15,5 @@ or you can use record.mirror to access the mirror instance during recording.`;q.
15
15
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16
16
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17
17
  PERFORMANCE OF THIS SOFTWARE.
18
- ***************************************************************************** */function In(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(l){o={error:l}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var Ie;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Ie||(Ie={}));var Mn={type:"xstate.init"};function ft(e){return e===void 0?[]:[].concat(e)}function ge(e){return{type:"xstate.assign",assignment:e}}function xn(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function Ye(e){return function(t){return e===t}}function kn(e){return typeof e=="string"?{type:e}:e}function Rn(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Ye(e)}}function Dn(e,t,n){var r=t,o=!1;return[e.filter(function(i){if(i.type==="xstate.assign"){o=!0;var a=Object.assign({},r);return typeof i.assignment=="function"?a=i.assignment(r,n):Object.keys(i.assignment).forEach(function(l){a[l]=typeof i.assignment[l]=="function"?i.assignment[l](r,n):i.assignment[l]}),r=a,!1}return!0}),r,o]}function On(e,t){t===void 0&&(t={});var n=In(Dn(ft(e.states[e.initial].entry).map(function(a){return xn(a,t.actions)}),e.context,Mn),2),r=n[0],o=n[1],i={config:e,_options:t,initialState:{value:e.initial,actions:r,context:o,matches:Ye(e.initial)},transition:function(a,l){var c,s,u=typeof a=="string"?{value:a,context:e.context}:a,d=u.value,h=u.context,m=kn(l),p=e.states[d];if(p.on){var g=ft(p.on[m.type]);try{for(var N=function(_){var B=typeof Symbol=="function"&&Symbol.iterator,T=B&&_[B],v=0;if(T)return T.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&v>=_.length&&(_=void 0),{value:_&&_[v++],done:!_}}};throw new TypeError(B?"Object is not iterable.":"Symbol.iterator is not defined.")}(g),f=N.next();!f.done;f=N.next()){var b=f.value;if(b===void 0)return Rn(d,h);var S=typeof b=="string"?{target:b}:b,y=S.target,M=S.actions,D=M===void 0?[]:M,L=S.cond,P=L===void 0?function(){return!0}:L,A=y===void 0,z=y??d,$=e.states[z];if(P(h,m)){var K=In(Dn((A?ft(D):[].concat(p.exit,D,$.entry).filter(function(_){return _})).map(function(_){return xn(_,i._options.actions)}),h,m),3),Q=K[0],j=K[1],Y=K[2],X=y??d;return{value:X,context:j,actions:Q,changed:y!==d||Q.length>0||Y,matches:Ye(X)}}}}catch(_){c={error:_}}finally{try{f&&!f.done&&(s=N.return)&&s.call(N)}finally{if(c)throw c.error}}}return Rn(d,h)}};return i}var An=function(e,t){return e.actions.forEach(function(n){var r=n.exec;return r&&r(e.context,t)})};function Ln(e){var t=e.initialState,n=Ie.NotStarted,r=new Set,o={_machine:e,send:function(i){n===Ie.Running&&(t=e.transition(t,i),An(t,kn(i)),r.forEach(function(a){return a(t)}))},subscribe:function(i){return r.add(i),i(t),{unsubscribe:function(){return r.delete(i)}}},start:function(i){if(i){var a=typeof i=="object"?i:{context:e.config.context,value:i};t={value:a.value,actions:[],context:a.context,matches:Ye(a.value)}}return n=Ie.Running,An(t,Mn),o},stop:function(){return n=Ie.Stopped,r.clear(),o},get state(){return t},get status(){return n}};return o}var Qo=Object.defineProperty,Jo=Object.defineProperties,qo=Object.getOwnPropertyDescriptors,Pn=Object.getOwnPropertySymbols,ei=Object.prototype.hasOwnProperty,ti=Object.prototype.propertyIsEnumerable,_n=(e,t,n)=>t in e?Qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xe=(e,t)=>{for(var n in t||(t={}))ei.call(t,n)&&_n(e,n,t[n]);if(Pn)for(var n of Pn(t))ti.call(t,n)&&_n(e,n,t[n]);return e},Ze=(e,t)=>Jo(e,qo(t));function ni(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.type===w.Meta&&r.timestamp<=t)return e.slice(n)}return e}function ri(e,{getCastFn:t,applyEventsSynchronously:n,emitter:r}){const o=On({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]},REPLACE_EVENTS:{target:"playing",actions:["replaceEvents"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]},REPLACE_EVENTS:{target:"paused",actions:["replaceEvents"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:ge({lastPlayedEvent:(i,a)=>a.type==="CAST_EVENT"?a.payload.event:i.lastPlayedEvent}),recordTimeOffset:ge((i,a)=>{let l=i.timeOffset;return"payload"in a&&"timeOffset"in a.payload&&(l=a.payload.timeOffset),Ze(Xe({},i),{timeOffset:l,baselineTime:i.events[0].timestamp+l})}),play(i){var a;const{timer:l,events:c,baselineTime:s,lastPlayedEvent:u}=i;l.clear();for(const g of c)pt(g,s);const d=ni(c,s);let h=u?.timestamp;u?.type===w.IncrementalSnapshot&&u.data.source===x.MouseMove&&(h=u.timestamp+((a=u.data.positions[0])==null?void 0:a.timeOffset)),s<(h||0)&&r.emit(O.PlayBack);const m=new Array,p=new Array;for(const g of d)if(!(h&&h<s&&(g.timestamp<=h||g===u)))if(g.timestamp<s)m.push(g);else{const N=t(g,!1);p.push({doAction:()=>{N()},delay:g.delay})}n(m),r.emit(O.Flush),l.addActions(p),l.start()},pause(i){i.timer.clear()},resetLastPlayedEvent:ge(i=>Ze(Xe({},i),{lastPlayedEvent:null})),startLive:ge({baselineTime:(i,a)=>(i.timer.toggleLiveMode(!0),i.timer.start(),a.type==="TO_LIVE"&&a.payload.baselineTime?a.payload.baselineTime:Date.now())}),replaceEvents:ge((i,a)=>{const{events:l,timer:c,baselineTime:s}=i;if(a.type==="REPLACE_EVENTS"){const{events:u}=a.payload;l.length=0;const d=[];for(const h of u)if(pt(h,s),l.push(h),h.timestamp>=c.timeOffset+s){const m=t(h,!1);d.push({doAction:()=>{m()},delay:h.delay})}c.isActive()&&c.replaceActions(d)}return Ze(Xe({},i),{events:l})}),addEvent:ge((i,a)=>{const{baselineTime:l,timer:c,events:s}=i;if(a.type==="ADD_EVENT"){const{event:u}=a.payload;pt(u,l);let d=s.length-1;if(!s[d]||s[d].timestamp<=u.timestamp)s.push(u);else{let p=-1,g=0;for(;g<=d;){const N=Math.floor((g+d)/2);s[N].timestamp<=u.timestamp?g=N+1:d=N-1}p===-1&&(p=g),s.splice(p,0,u)}const h=u.timestamp<l,m=t(u,h);h?m():c.isActive()&&c.addAction({doAction:()=>{m()},delay:u.delay})}return Ze(Xe({},i),{events:s})})}});return Ln(o)}function oi(e){const t=On({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(n,r)=>{"payload"in r&&n.timer.setSpeed(r.payload.speed)},recordSpeed:ge({normalSpeed:n=>n.timer.speed}),restoreSpeed:n=>{n.timer.setSpeed(n.normalSpeed)}}});return Ln(t)}const ii=e=>["noscript { display: none !important; }",`.${e} { background: currentColor; border-radius: 5px; }`,`.${e}:hover::after {content: 'Redacted'; color: white; background: black; text-align: center; width: 100%; display: block;}`];var si=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{l(n.next(c))}catch(s){o(s)}},a=c=>{try{l(n.throw(c))}catch(s){o(s)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,a);l((n=n.apply(e,t)).next())});const Fn=new Map;function Wn(e,t){let n=Fn.get(e);return n||(n=new Map,Fn.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function de(e,t,n){return r=>si(this,null,function*(){if(r&&typeof r=="object"&&"rr_type"in r)if(n&&(n.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){const o=yield de(e,t,n)(r.args);return yield createImageBitmap.apply(null,o)}else if("index"in r){if(n||t===null)return r;const{rr_type:o,index:i}=r;return Wn(t,o)[i]}else if("args"in r){const{rr_type:o,args:i}=r,a=window[o];return new a(...yield Promise.all(i.map(de(e,t,n))))}else{if("base64"in r)return ro(r.base64);if("src"in r){const o=e.get(r.src);if(o)return o;{const i=new Image;return i.src=r.src,e.set(r.src,i),i}}else if("data"in r&&r.rr_type==="Blob"){const o=yield Promise.all(r.data.map(de(e,t,n)));return new Blob(o,{type:r.type})}}else if(Array.isArray(r))return yield Promise.all(r.map(de(e,t,n)));return r})}var ai=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{l(n.next(c))}catch(s){o(s)}},a=c=>{try{l(n.throw(c))}catch(s){o(s)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,a);l((n=n.apply(e,t)).next())});function li(e,t){try{return t===ue.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch{return null}}const ci=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function ui(e,t){if(!(t!=null&&t.constructor))return;const{name:n}=t.constructor;if(!ci.includes(n))return;const r=Wn(e,n);r.includes(t)||r.push(t)}function di(e){return ai(this,arguments,function*({mutation:t,target:n,type:r,imageMap:o,errorHandler:i}){try{const a=li(n,r);if(!a)return;if(t.setter){a[t.property]=t.args[0];return}const l=a[t.property],c=yield Promise.all(t.args.map(de(o,a))),s=l.apply(a,c);ui(a,s)}catch(a){i(t,a)}})}var hi=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{l(n.next(c))}catch(s){o(s)}},a=c=>{try{l(n.throw(c))}catch(s){o(s)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,a);l((n=n.apply(e,t)).next())});function mi(e){return hi(this,arguments,function*({event:t,mutation:n,target:r,imageMap:o,errorHandler:i}){try{const a=r.getContext("2d");if(n.setter){a[n.property]=n.args[0];return}const l=a[n.property];if(n.property==="drawImage"&&typeof n.args[0]=="string"){const c=o.get(t);l.apply(a,n.args)}else{const c=yield Promise.all(n.args.map(de(o,a)));l.apply(a,c)}}catch(a){i(n,a)}})}var pi=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{l(n.next(c))}catch(s){o(s)}},a=c=>{try{l(n.throw(c))}catch(s){o(s)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,a);l((n=n.apply(e,t)).next())});function $n(e){return pi(this,arguments,function*({event:t,mutation:n,target:r,imageMap:o,canvasEventMap:i,errorHandler:a}){try{const l=i.get(t)||n,c="commands"in l?l.commands:[l];if([ue.WebGL,ue.WebGL2].includes(n.type)){for(let s=0;s<c.length;s++){const u=c[s];yield di({mutation:u,type:n.type,target:r,imageMap:o,errorHandler:a})}return}for(let s=0;s<c.length;s++){const u=c[s];yield mi({event:t,mutation:u,target:r,imageMap:o,errorHandler:a})}}catch(l){a(n,l)}})}var fi=Object.defineProperty,gi=Object.defineProperties,vi=Object.getOwnPropertyDescriptors,Vn=Object.getOwnPropertySymbols,yi=Object.prototype.hasOwnProperty,bi=Object.prototype.propertyIsEnumerable,Un=(e,t,n)=>t in e?fi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Me=(e,t)=>{for(var n in t||(t={}))yi.call(t,n)&&Un(e,n,t[n]);if(Vn)for(var n of Vn(t))bi.call(t,n)&&Un(e,n,t[n]);return e},gt=(e,t)=>gi(e,vi(t)),vt=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{l(n.next(c))}catch(s){o(s)}},a=c=>{try{l(n.throw(c))}catch(s){o(s)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,a);l((n=n.apply(e,t)).next())});const jn=10*1e3,Bn=2*1e3,Gn=1*1e3,zn=60*60*1e3,Si=Cn||Xo,yt="[replayer]",bt={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function St(e){return e.type==w.IncrementalSnapshot&&(e.data.source==x.TouchMove||e.data.source==x.MouseInteraction&&e.data.type==H.TouchStart)}class Ti{constructor(t,n){if(this.usingVirtualDom=!1,this.virtualDom=new Ce,this.mouseTail=null,this.tailPositions=[],this.emitter=Si(),this.activityIntervals=[],this.legacy_missingNodeRetryMap={},this.cache=At(),this.imageMap=new Map,this.canvasEventMap=new Map,this.mirror=Et(),this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,!(n!=null&&n.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");const r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"highlight-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:bt,useVirtualDom:!0,inactiveThreshold:.02,inactiveSkipTime:Bn};this.config=Object.assign({},r,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(O.Resize,this.handleResize),this.setupDom(),this.emitter.on(O.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(c,s,u)=>{$n({event:c,mutation:s,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this)};if(ae(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror),this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const c in this.legacy_missingNodeRetryMap)try{const s=this.legacy_missingNodeRetryMap[c],u=mt(s.node,this.mirror,this.virtualDom.mirror);ae(u,s.node,l,this.virtualDom.mirror),s.node=u}catch(s){this.config.showWarning&&console.warn(s)}}this.mousePos&&this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null}),this.emitter.on(O.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset()});const o=new Ko([],n?.speed||r.speed);this.service=ri({events:t.map(l=>n&&n.unpackFn?n.unpackFn(l):l).sort((l,c)=>l.timestamp-c.timestamp),timer:o,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(O.StateChange,{player:l})}),this.speedService=oi({normalSpeed:-1,timer:o}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(O.StateChange,{speed:l})});const i=this.service.state.context.events.find(l=>l.type===w.Meta),a=this.service.state.context.events.find(l=>l.type===w.FullSnapshot);if(i){const{width:l,height:c}=i.data;setTimeout(()=>{this.emitter.emit(O.Resize,{width:l,height:c})},0)}a&&setTimeout(()=>{this.firstFullSnapshot||(this.firstFullSnapshot=a,this.rebuildFullSnapshot(a),this.iframe.contentWindow.scrollTo(a.data.initialOffset))},1),this.service.state.context.events.find(St)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,n){return this.emitter.on(t,n),this}off(t,n){return this.emitter.off(t,n),this}setConfig(t){Object.keys(t).forEach(n=>{this.config[n]=t[n]}),this.config.skipInactive||this.backToNormal(),typeof t.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail<"u"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getActivityIntervals(){if(this.activityIntervals.length==0){const t=[],n=this.getMetaData(),r=[{timestamp:n.startTime},...this.service.state.context.events.filter(a=>this.isUserInteraction(a)),{timestamp:n.endTime}];for(let a=1;a<r.length;a++){const l=r[a-1],c=r[a];c.timestamp-l.timestamp>jn?t.push({startTime:l.timestamp,endTime:c.timestamp,duration:c.timestamp-l.timestamp,active:!1}):t.push({startTime:l.timestamp,endTime:c.timestamp,duration:c.timestamp-l.timestamp,active:!0})}const o=[];let i=t[0];for(let a=1;a<t.length;a++)t[a].active!=t[a-1].active&&(o.push({startTime:i.startTime,endTime:t[a-1].endTime,duration:t[a-1].endTime-i.startTime,active:t[a-1].active}),i=t[a]);i&&t.length>0&&o.push({startTime:i.startTime,endTime:t[t.length-1].endTime,duration:t[t.length-1].endTime-i.startTime,active:t[t.length-1].active}),i=o[0];for(let a=1;a<o.length;a++)(!o[a].active&&o[a].duration>this.config.inactiveThreshold*n.totalTime||!o[a-1].active&&o[a-1].duration>this.config.inactiveThreshold*n.totalTime)&&(this.activityIntervals.push({startTime:i.startTime,endTime:o[a-1].endTime,duration:o[a-1].endTime-i.startTime,active:o[a-1].active}),i=o[a]);i&&o.length>0&&this.activityIntervals.push({startTime:i.startTime,endTime:o[o.length-1].endTime,duration:o[o.length-1].endTime-i.startTime,active:o[o.length-1].active})}return this.activityIntervals}getMetaData(){const t=this.service.state.context.events[0],n=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:n.timestamp,totalTime:n.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:n}=this.service.state.context;return t-n[0].timestamp}getMirror(){return this.mirror}play(t=0){var n,r;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(r=(n=this.iframe.contentDocument)==null?void 0:n.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit(O.Start),this.handleInactivity(this.getMetaData().startTime+t,!0)}pause(t){var n,r;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(r=(n=this.iframe.contentDocument)==null?void 0:n.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit(O.Pause)}resume(t=0){console.warn("The 'resume' will be departed in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(O.Resume)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const n=this.config.unpackFn?this.config.unpackFn(t):t;St(n)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:n}}))}replaceEvents(t){for(const n of t)if(St(n)){this.mouse.classList.add("touch-device");break}this.service.send({type:"REPLACE_EVENTS",payload:{events:t}})}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=At()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Zo(this.iframe.contentWindow,this.iframe.contentDocument),it(this.iframe.contentWindow))}handleResize(t){this.iframe.style.display="inherit";for(const n of[this.mouseTail,this.iframe])!n||(n.setAttribute("width",String(t.width)),n.setAttribute("height",String(t.height)))}applyEventsSynchronously(t){for(const n of t){switch(n.type){case w.DomContentLoaded:case w.Load:case w.Custom:continue;case w.FullSnapshot:case w.Meta:case w.Plugin:case w.IncrementalSnapshot:break}this.getCastFn(n,!0)()}this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null}getCastFn(t,n=!1){let r;switch(t.type){case w.DomContentLoaded:case w.Load:break;case w.Custom:r=()=>{this.emitter.emit(O.CustomEvent,t)};break;case w.Meta:r=()=>this.emitter.emit(O.Resize,{width:t.data.width,height:t.data.height});break;case w.FullSnapshot:r=()=>{if(this.firstFullSnapshot){if(this.firstFullSnapshot===t){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.rebuildFullSnapshot(t,n),this.iframe.contentWindow.scrollTo(t.data.initialOffset)};break;case w.IncrementalSnapshot:r=()=>{if(this.applyIncremental(t,n),!n&&(this.handleInactivity(t.timestamp),t===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const o of this.service.state.context.events)if(!(o.timestamp<=t.timestamp)&&this.isUserInteraction(o)){o.delay-t.delay>jn*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=o);break}if(this.nextUserInteractionEvent){const o=this.nextUserInteractionEvent.delay-t.delay,i={speed:Math.min(Math.round(o/Bn),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:i}),this.emitter.emit(O.SkipStart,i)}}};break}return()=>{r&&r();for(const i of this.config.plugins||[])i.handler(t,n,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:t}});const o=this.service.state.context.events.length-1;if(t===this.service.state.context.events[o]){const i=()=>{o<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(O.Finish))};t.type===w.IncrementalSnapshot&&t.data.source===x.MouseMove&&t.data.positions.length?setTimeout(()=>{i()},Math.max(0,-t.data.positions[0].timeOffset+50)):i()}this.emitter.emit(O.EventCast,t)}}handleInactivity(t,n){if((t===this.inactiveEndTimestamp||n)&&(this.inactiveEndTimestamp=null,this.backToNormal()),this.config.skipInactive&&!this.inactiveEndTimestamp){for(const r of this.getActivityIntervals())if(t>=r.startTime&&t<r.endTime&&!r.active){this.inactiveEndTimestamp=r.endTime;break}if(this.inactiveEndTimestamp){const r=this.inactiveEndTimestamp-t,o={speed:r/zn*this.config.inactiveSkipTime<Gn?r/Gn:Math.round(Math.max(r,zn)/this.config.inactiveSkipTime)};this.speedService.send({type:"FAST_FORWARD",payload:o}),this.emitter.emit(O.SkipStart,o)}}}rebuildFullSnapshot(t,n=!1){if(!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const r=[];xr(t.data.node,{doc:this.iframe.contentDocument,afterAppend:a=>{this.collectIframeAndAttachDocument(r,a)},cache:this.cache,mirror:this.mirror});for(const{mutationInQueue:a,builtNode:l}of r)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==a);const{documentElement:o,head:i}=this.iframe.contentDocument;this.insertStyleRules(o,i),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(O.FullsnapshotRebuilded,t),n||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,n){const r=ii(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&r.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,wn(o,this.virtualDom.unserializedId)),t.insertBefore(o,n);for(let i=0;i<r.length;i++)o.rules.push({cssText:r[i],type:ie.Insert,index:i})}else{const o=document.createElement("style");t.insertBefore(o,n);for(let i=0;i<r.length;i++)o.sheet.insertRule(r[i],i)}}attachDocumentToIframe(t,n){const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,o=[];je(t.node,{doc:n.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:i=>{this.collectIframeAndAttachDocument(o,i);const a=r.getMeta(i);if(a?.type===k.Element&&a?.tagName.toUpperCase()==="HTML"){const{documentElement:l,head:c}=n.contentDocument;this.insertStyleRules(l,c)}},cache:this.cache});for(const{mutationInQueue:i,builtNode:a}of o)this.attachDocumentToIframe(i,a),this.newDocumentQueue=this.newDocumentQueue.filter(l=>l!==i)}collectIframeAndAttachDocument(t,n){if(Ne(n,this.mirror)){const r=this.newDocumentQueue.find(o=>o.parentId===this.mirror.getId(n));r&&t.push({mutationInQueue:r,builtNode:n})}}waitForStylesheetLoad(){var t;const n=(t=this.iframe.contentDocument)==null?void 0:t.head;if(n){const r=new Set;let o,i=this.service.state;const a=()=>{i=this.service.state};this.emitter.on(O.Start,a),this.emitter.on(O.Pause,a);const l=()=>{this.emitter.off(O.Start,a),this.emitter.off(O.Pause,a)};n.querySelectorAll('link[rel="stylesheet"]').forEach(c=>{c.sheet||(r.add(c),c.addEventListener("load",()=>{r.delete(c),r.size===0&&o!==-1&&(i.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(O.LoadStylesheetEnd),o&&clearTimeout(o),l())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(O.LoadStylesheetStart),o=setTimeout(()=>{i.matches("playing")&&this.play(this.getCurrentTime()),o=-1,l()},this.config.loadTimeout))}}hasImageArg(t){for(const n of t)if(!(!n||typeof n!="object")){if("rr_type"in n&&"args"in n){if(this.hasImageArg(n.args))return!0}else if("rr_type"in n&&n.rr_type==="HTMLImageElement"||n instanceof Array&&this.hasImageArg(n))return!0}return!1}getImageArgs(t){const n=[];for(const r of t)!r||typeof r!="object"||("rr_type"in r&&"args"in r?n.push(...this.getImageArgs(r.args)):"rr_type"in r&&r.rr_type==="HTMLImageElement"?n.push(r.src):r instanceof Array&&n.push(...this.getImageArgs(r)));return n}preloadAllImages(){return vt(this,null,function*(){this.service.state;const t=()=>{this.service.state};this.emitter.on(O.Start,t),this.emitter.on(O.Pause,t);const n=[];for(const r of this.service.state.context.events)r.type===w.IncrementalSnapshot&&r.data.source===x.CanvasMutation&&(n.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(o=>{this.preloadImages(o,r)}));return Promise.all(n)})}preloadImages(t,n){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(n)){const r=document.createElement("canvas"),o=r.getContext("2d"),i=o?.createImageData(r.width,r.height);i?.data,JSON.parse(t.args[0]),o?.putImageData(i,0,0)}}deserializeAndPreloadCanvasEvents(t,n){return vt(this,null,function*(){if(!this.canvasEventMap.has(n)){const r={isUnchanged:!0};if("commands"in t){const o=yield Promise.all(t.commands.map(i=>vt(this,null,function*(){const a=yield Promise.all(i.args.map(de(this.imageMap,null,r)));return gt(Me({},i),{args:a})})));r.isUnchanged===!1&&this.canvasEventMap.set(n,gt(Me({},t),{commands:o}))}else{const o=yield Promise.all(t.args.map(de(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(n,gt(Me({},t),{args:o}))}}})}applyIncremental(t,n){var r,o,i,a,l,c;const{data:s}=t;switch(s.source){case x.Mutation:{try{this.applyMutation(s,n)}catch(u){this.warn(`Exception in mutation ${u.message||u}`,s)}break}case x.Drag:case x.TouchMove:case x.MouseMove:if(n){const u=s.positions[s.positions.length-1];this.mousePos={x:u.x,y:u.y,id:u.id,debugData:s}}else s.positions.forEach(u=>{const d={doAction:()=>{this.moveAndHover(u.x,u.y,u.id,n,s)},delay:u.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(d)}),this.timer.addAction({doAction(){},delay:t.delay-((r=s.positions[0])==null?void 0:r.timeOffset)});break;case x.MouseInteraction:{if(s.id===-1||n)break;const u=new Event(H[s.type].toLowerCase()),d=this.mirror.getNode(s.id);if(!d)return this.debugNodeNotFound(s,s.id);this.emitter.emit(O.MouseInteraction,{type:s.type,target:d});const{triggerFocus:h}=this.config;switch(s.type){case H.Blur:"blur"in d&&d.blur();break;case H.Focus:h&&d.focus&&d.focus({preventScroll:!0});break;case H.Click:case H.TouchStart:case H.TouchEnd:n?(s.type===H.TouchStart?this.touchActive=!0:s.type===H.TouchEnd&&(this.touchActive=!1),this.mousePos={x:s.x,y:s.y,id:s.id,debugData:s}):(s.type===H.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(s.x,s.y,s.id,n,s),s.type===H.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):s.type===H.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):s.type===H.TouchEnd&&this.mouse.classList.remove("touch-active"));break;case H.TouchCancel:n?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:d.dispatchEvent(u)}break}case x.Scroll:{if(s.id===-1)break;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(s.id);if(!u)return this.debugNodeNotFound(s,s.id);u.scrollData=s;break}this.applyScroll(s,n);break}case x.ViewportResize:this.emitter.emit(O.Resize,{width:s.width,height:s.height});break;case x.Input:{if(s.id===-1)break;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(s.id);if(!u)return this.debugNodeNotFound(s,s.id);u.inputData=s;break}this.applyInput(s);break}case x.MediaInteraction:{const u=this.usingVirtualDom?this.virtualDom.mirror.getNode(s.id):this.mirror.getNode(s.id);if(!u)return this.debugNodeNotFound(s,s.id);const d=u;try{s.currentTime&&(d.currentTime=s.currentTime),s.volume&&(d.volume=s.volume),s.muted&&(d.muted=s.muted),s.type===me.Pause&&d.pause(),s.type===me.Play&&d.play()}catch(h){this.config.showWarning&&console.warn(`Failed to replay media interactions: ${h.message||h}`)}break}case x.StyleSheetRule:{if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(s.id);if(!u)return this.debugNodeNotFound(s,s.id);const d=u.rules;(o=s.adds)==null||o.forEach(({rule:h,index:m})=>d?.push({cssText:h,index:m,type:ie.Insert})),(i=s.removes)==null||i.forEach(({index:h})=>d?.push({index:h,type:ie.Remove}))}else{const u=this.mirror.getNode(s.id);if(!u)return this.debugNodeNotFound(s,s.id);const d=u.sheet;(a=s.adds)==null||a.forEach(({rule:h,index:m})=>{try{if(Array.isArray(m)){const{positions:p,index:g}=ct(m);Ee(d.cssRules,p).insertRule(h,g)}else{const p=m===void 0?void 0:Math.min(m,d.cssRules.length);d.insertRule(h,p)}}catch{}}),(l=s.removes)==null||l.forEach(({index:h})=>{try{if(Array.isArray(h)){const{positions:m,index:p}=ct(h);Ee(d.cssRules,m).deleteRule(p||0)}else d?.deleteRule(h)}catch{}})}break}case x.StyleDeclaration:{if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(s.id);if(!u)return this.debugNodeNotFound(s,s.id);const d=u.rules;s.set&&d.push(Me({type:ie.SetProperty,index:s.index},s.set)),s.remove&&d.push(Me({type:ie.RemoveProperty,index:s.index},s.remove))}else{const u=this.mirror.getNode(s.id);if(!u)return this.debugNodeNotFound(s,s.id);const d=u.sheet;s.set&&Ee(d.rules,s.index).style.setProperty(s.set.property,s.set.value,s.set.priority),s.remove&&Ee(d.rules,s.index).style.removeProperty(s.remove.property)}break}case x.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(s.id);if(!u)return this.debugNodeNotFound(s,s.id);u.canvasMutations.push({event:t,mutation:s})}else{const u=this.mirror.getNode(s.id);if(!u)return this.debugNodeNotFound(s,s.id);$n({event:t,mutation:s,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case x.Font:{try{const u=new FontFace(s.family,s.buffer?new Uint8Array(JSON.parse(s.fontSource)):s.fontSource,s.descriptors);(c=this.iframe.contentDocument)==null||c.fonts.add(u)}catch(u){this.config.showWarning&&console.warn(u)}break}}}applyMutation(t,n){if(this.config.useVirtualDom&&!this.usingVirtualDom&&n&&(this.usingVirtualDom=!0,zo(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const s in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[s],d=En(u.node,this.virtualDom,this.mirror);d&&(u.node=d)}catch(u){this.config.showWarning&&console.warn(u)}const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes.forEach(s=>{var u;const d=r.getNode(s.id);if(!d)return t.removes.find(m=>m.id===s.parentId)?void 0:this.warnNodeNotFound(t,s.id);let h=r.getNode(s.parentId);if(!h)return this.warnNodeNotFound(t,s.parentId);if(s.isShadow&&Ae(h)&&(h=h.shadowRoot),r.removeNodeFromMap(d),h)try{h.removeChild(d),this.usingVirtualDom&&d.nodeName==="#text"&&h.nodeName==="STYLE"&&((u=h.rules)==null?void 0:u.length)>0&&(h.rules=[])}catch(m){if(m instanceof DOMException)this.warn("parent could not remove child in mutation",h,d,t);else throw m}});const o=Me({},this.legacy_missingNodeRetryMap),i=[],a=s=>{let u=null;return s.nextId&&(u=r.getNode(s.nextId)),s.nextId!==null&&s.nextId!==void 0&&s.nextId!==-1&&!u},l=s=>{var u;if(!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");let d=r.getNode(s.parentId);if(!d)return s.node.type===k.Document?this.newDocumentQueue.push(s):i.push(s);s.node.isShadow&&(Ae(d)||d.attachShadow({mode:"open"}),d=d.shadowRoot);let h=null,m=null;if(s.previousId&&(h=r.getNode(s.previousId)),s.nextId&&(m=r.getNode(s.nextId)),a(s))return i.push(s);if(s.node.rootId&&!r.getNode(s.node.rootId))return;const p=s.node.rootId?r.getNode(s.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Ne(d,r)){this.attachDocumentToIframe(s,d);return}const g=je(s.node,{doc:p,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});if(s.previousId===-1||s.nextId===-1){o[s.node.id]={node:g,mutation:s};return}const N=r.getMeta(d);if(N&&N.type===k.Element&&N.tagName==="textarea"&&s.node.type===k.Text){const f=Array.isArray(d.childNodes)?d.childNodes:Array.from(d.childNodes);for(const b of f)b.nodeType===d.TEXT_NODE&&d.removeChild(b)}if(h&&h.nextSibling&&h.nextSibling.parentNode)d.insertBefore(g,h.nextSibling);else if(m&&m.parentNode)d.contains(m)?d.insertBefore(g,m):d.insertBefore(g,null);else{if(d===p)for(;p.firstChild;)p.removeChild(p.firstChild);d.appendChild(g)}if(this.usingVirtualDom&&g.nodeName==="#text"&&d.nodeName==="STYLE"&&((u=d.rules)==null?void 0:u.length)>0&&(d.rules=[]),Ne(g,this.mirror)){const f=this.mirror.getId(g),b=this.newDocumentQueue.find(S=>S.parentId===f);b&&(this.attachDocumentToIframe(b,g),this.newDocumentQueue=this.newDocumentQueue.filter(S=>S!==b))}(s.previousId||s.nextId)&&this.legacy_resolveMissingNode(o,d,g,s)};t.adds.forEach(s=>{l(s)});const c=Date.now();for(;i.length;){const s=_t(i);if(i.length=0,Date.now()-c>500){this.warn("Timeout in the loop, please check the resolve tree data:",s);break}for(const u of s)r.getNode(u.value.parentId)?st(u,d=>{l(d)}):this.debug("Drop resolve tree since there is no parent for the root node.",u)}Object.keys(o).length&&Object.assign(this.legacy_missingNodeRetryMap,o),Ft(t.texts).forEach(s=>{var u;const d=r.getNode(s.id);if(!d)return t.removes.find(h=>h.id===s.id)?void 0:this.warnNodeNotFound(t,s.id);if(d.textContent=s.value,this.usingVirtualDom){const h=d.parentNode;((u=h?.rules)==null?void 0:u.length)>0&&(h.rules=[])}}),t.attributes.forEach(s=>{const u=r.getNode(s.id);if(!u)return t.removes.find(d=>d.id===s.id)?void 0:this.warnNodeNotFound(t,s.id);for(const d in s.attributes)if(typeof d=="string"){const h=s.attributes[d];if(h===null)u.removeAttribute(d);else if(typeof h=="string")try{u.setAttribute(d,h)}catch(m){this.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",m)}else if(d==="style"){const m=h,p=u;for(const g in m)if(m[g]===!1)p.style.removeProperty(g);else if(m[g]instanceof Array){const N=m[g];p.style.setProperty(g,N[0],N[1])}else{const N=m[g];p.style.setProperty(g,N)}}}})}applyScroll(t,n){const r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);const o=this.mirror.getMeta(r);if(r===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:t.y,left:t.x,behavior:n?"auto":"smooth"});else if(o?.type===k.Document)r.defaultView.scrollTo({top:t.y,left:t.x,behavior:n?"auto":"smooth"});else try{r.scrollTop=t.y,r.scrollLeft=t.x}catch{}}applyInput(t){const n=this.mirror.getNode(t.id);if(!n)return this.debugNodeNotFound(t,t.id);try{n.checked=t.isChecked,n.value=t.text}catch{}}legacy_resolveMissingNode(t,n,r,o){const{previousId:i,nextId:a}=o,l=i&&t[i],c=a&&t[a];if(l){const{node:s,mutation:u}=l;n.insertBefore(s,r),delete t[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(t,n,s,u)}if(c){const{node:s,mutation:u}=c;n.insertBefore(s,r.nextSibling),delete t[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(t,n,s,u)}}moveAndHover(t,n,r,o,i){const a=this.mirror.getNode(r);if(!a)return this.debugNodeNotFound(i,r);const l=lt(a,this.iframe),c=t*l.absoluteScale+l.x,s=n*l.absoluteScale+l.y;this.mouse.style.left=`${c}px`,this.mouse.style.top=`${s}px`,o||this.drawMouseTail({x:c,y:s}),this.hoverElements(a)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:n,lineWidth:r,strokeStyle:o,duration:i}=this.config.mouseTail===!0?bt:Object.assign({},bt,this.config.mouseTail),a=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=r,l.lineCap=n,l.strokeStyle=o,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(c=>l.lineTo(c.x,c.y)),l.stroke())};this.tailPositions.push(t),a(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==t),a()},i/this.speedService.state.context.timer.speed)}hoverElements(t){var n;(n=this.iframe.contentDocument)==null||n.querySelectorAll(".\\:hover").forEach(o=>{o.classList.remove(":hover")});let r=t;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(t){return t.type!==w.IncrementalSnapshot?!1:t.data.source>x.Mutation&&t.data.source<=x.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(O.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,n){this.warn(`Node with id '${n}' not found. `,t)}warnCanvasMutationFailed(t,n){this.warn("Has error on canvas update",n,"canvas mutation:",t)}debugNodeNotFound(t,n){this.debug(yt,`Node with id '${n}' not found. `,t)}warn(...t){!this.config.showWarning||console.warn(yt,...t)}debug(...t){!this.config.showDebug||console.log(yt,...t)}}const{addCustomEvent:Ni}=fe,{freezePage:Ei}=fe;return q.EventType=w,q.IncrementalSource=x,q.MouseInteractions=H,q.Replayer=Ti,q.ReplayerEvents=O,q.addCustomEvent=Ni,q.freezePage=Ei,q.record=fe,q.utils=kr,Object.defineProperty(q,"__esModule",{value:!0}),q}({});
18
+ ***************************************************************************** */function In(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(l){o={error:l}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var Ie;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Ie||(Ie={}));var Mn={type:"xstate.init"};function gt(e){return e===void 0?[]:[].concat(e)}function ge(e){return{type:"xstate.assign",assignment:e}}function xn(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function Ye(e){return function(t){return e===t}}function kn(e){return typeof e=="string"?{type:e}:e}function Rn(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Ye(e)}}function Dn(e,t,n){var r=t,o=!1;return[e.filter(function(i){if(i.type==="xstate.assign"){o=!0;var a=Object.assign({},r);return typeof i.assignment=="function"?a=i.assignment(r,n):Object.keys(i.assignment).forEach(function(l){a[l]=typeof i.assignment[l]=="function"?i.assignment[l](r,n):i.assignment[l]}),r=a,!1}return!0}),r,o]}function On(e,t){t===void 0&&(t={});var n=In(Dn(gt(e.states[e.initial].entry).map(function(a){return xn(a,t.actions)}),e.context,Mn),2),r=n[0],o=n[1],i={config:e,_options:t,initialState:{value:e.initial,actions:r,context:o,matches:Ye(e.initial)},transition:function(a,l){var c,s,u=typeof a=="string"?{value:a,context:e.context}:a,d=u.value,h=u.context,m=kn(l),p=e.states[d];if(p.on){var g=gt(p.on[m.type]);try{for(var N=function(_){var B=typeof Symbol=="function"&&Symbol.iterator,T=B&&_[B],v=0;if(T)return T.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&v>=_.length&&(_=void 0),{value:_&&_[v++],done:!_}}};throw new TypeError(B?"Object is not iterable.":"Symbol.iterator is not defined.")}(g),f=N.next();!f.done;f=N.next()){var b=f.value;if(b===void 0)return Rn(d,h);var S=typeof b=="string"?{target:b}:b,y=S.target,M=S.actions,D=M===void 0?[]:M,L=S.cond,P=L===void 0?function(){return!0}:L,A=y===void 0,z=y??d,$=e.states[z];if(P(h,m)){var K=In(Dn((A?gt(D):[].concat(p.exit,D,$.entry).filter(function(_){return _})).map(function(_){return xn(_,i._options.actions)}),h,m),3),Q=K[0],j=K[1],Y=K[2],X=y??d;return{value:X,context:j,actions:Q,changed:y!==d||Q.length>0||Y,matches:Ye(X)}}}}catch(_){c={error:_}}finally{try{f&&!f.done&&(s=N.return)&&s.call(N)}finally{if(c)throw c.error}}}return Rn(d,h)}};return i}var An=function(e,t){return e.actions.forEach(function(n){var r=n.exec;return r&&r(e.context,t)})};function Ln(e){var t=e.initialState,n=Ie.NotStarted,r=new Set,o={_machine:e,send:function(i){n===Ie.Running&&(t=e.transition(t,i),An(t,kn(i)),r.forEach(function(a){return a(t)}))},subscribe:function(i){return r.add(i),i(t),{unsubscribe:function(){return r.delete(i)}}},start:function(i){if(i){var a=typeof i=="object"?i:{context:e.config.context,value:i};t={value:a.value,actions:[],context:a.context,matches:Ye(a.value)}}return n=Ie.Running,An(t,Mn),o},stop:function(){return n=Ie.Stopped,r.clear(),o},get state(){return t},get status(){return n}};return o}var Qo=Object.defineProperty,Jo=Object.defineProperties,qo=Object.getOwnPropertyDescriptors,Pn=Object.getOwnPropertySymbols,ei=Object.prototype.hasOwnProperty,ti=Object.prototype.propertyIsEnumerable,_n=(e,t,n)=>t in e?Qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xe=(e,t)=>{for(var n in t||(t={}))ei.call(t,n)&&_n(e,n,t[n]);if(Pn)for(var n of Pn(t))ti.call(t,n)&&_n(e,n,t[n]);return e},Ze=(e,t)=>Jo(e,qo(t));function ni(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.type===w.Meta&&r.timestamp<=t)return e.slice(n)}return e}function ri(e,{getCastFn:t,applyEventsSynchronously:n,emitter:r}){const o=On({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]},REPLACE_EVENTS:{target:"playing",actions:["replaceEvents"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]},REPLACE_EVENTS:{target:"paused",actions:["replaceEvents"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:ge({lastPlayedEvent:(i,a)=>a.type==="CAST_EVENT"?a.payload.event:i.lastPlayedEvent}),recordTimeOffset:ge((i,a)=>{let l=i.timeOffset;return"payload"in a&&"timeOffset"in a.payload&&(l=a.payload.timeOffset),Ze(Xe({},i),{timeOffset:l,baselineTime:i.events[0].timestamp+l})}),play(i){var a;const{timer:l,events:c,baselineTime:s,lastPlayedEvent:u}=i;l.clear();for(const g of c)ft(g,s);const d=ni(c,s);let h=u?.timestamp;u?.type===w.IncrementalSnapshot&&u.data.source===x.MouseMove&&(h=u.timestamp+((a=u.data.positions[0])==null?void 0:a.timeOffset)),s<(h||0)&&r.emit(O.PlayBack);const m=new Array,p=new Array;for(const g of d)if(!(h&&h<s&&(g.timestamp<=h||g===u)))if(g.timestamp<s)m.push(g);else{const N=t(g,!1);p.push({doAction:()=>{N()},delay:g.delay})}n(m),r.emit(O.Flush),l.addActions(p),l.start()},pause(i){i.timer.clear()},resetLastPlayedEvent:ge(i=>Ze(Xe({},i),{lastPlayedEvent:null})),startLive:ge({baselineTime:(i,a)=>(i.timer.toggleLiveMode(!0),i.timer.start(),a.type==="TO_LIVE"&&a.payload.baselineTime?a.payload.baselineTime:Date.now())}),replaceEvents:ge((i,a)=>{const{events:l,timer:c,baselineTime:s}=i;if(a.type==="REPLACE_EVENTS"){const{events:u}=a.payload;l.length=0;const d=[];for(const h of u)if(ft(h,s),l.push(h),h.timestamp>=c.timeOffset+s){const m=t(h,!1);d.push({doAction:()=>{m()},delay:h.delay})}c.isActive()&&c.replaceActions(d)}return Ze(Xe({},i),{events:l})}),addEvent:ge((i,a)=>{const{baselineTime:l,timer:c,events:s}=i;if(a.type==="ADD_EVENT"){const{event:u}=a.payload;ft(u,l);let d=s.length-1;if(!s[d]||s[d].timestamp<=u.timestamp)s.push(u);else{let p=-1,g=0;for(;g<=d;){const N=Math.floor((g+d)/2);s[N].timestamp<=u.timestamp?g=N+1:d=N-1}p===-1&&(p=g),s.splice(p,0,u)}const h=u.timestamp<l,m=t(u,h);h?m():c.isActive()&&c.addAction({doAction:()=>{m()},delay:u.delay})}return Ze(Xe({},i),{events:s})})}});return Ln(o)}function oi(e){const t=On({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(n,r)=>{"payload"in r&&n.timer.setSpeed(r.payload.speed)},recordSpeed:ge({normalSpeed:n=>n.timer.speed}),restoreSpeed:n=>{n.timer.setSpeed(n.normalSpeed)}}});return Ln(t)}const ii=e=>["noscript { display: none !important; }",`.${e} { background: currentColor; border-radius: 5px; }`,`.${e}:hover::after {content: 'Redacted'; color: white; background: black; text-align: center; width: 100%; display: block;}`];var si=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{l(n.next(c))}catch(s){o(s)}},a=c=>{try{l(n.throw(c))}catch(s){o(s)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,a);l((n=n.apply(e,t)).next())});const Fn=new Map;function Wn(e,t){let n=Fn.get(e);return n||(n=new Map,Fn.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function de(e,t,n){return r=>si(this,null,function*(){if(r&&typeof r=="object"&&"rr_type"in r)if(n&&(n.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){const o=yield de(e,t,n)(r.args);return yield createImageBitmap.apply(null,o)}else if("index"in r){if(n||t===null)return r;const{rr_type:o,index:i}=r;return Wn(t,o)[i]}else if("args"in r){const{rr_type:o,args:i}=r,a=window[o];return new a(...yield Promise.all(i.map(de(e,t,n))))}else{if("base64"in r)return ro(r.base64);if("src"in r){const o=e.get(r.src);if(o)return o;{const i=new Image;return i.src=r.src,e.set(r.src,i),i}}else if("data"in r&&r.rr_type==="Blob"){const o=yield Promise.all(r.data.map(de(e,t,n)));return new Blob(o,{type:r.type})}}else if(Array.isArray(r))return yield Promise.all(r.map(de(e,t,n)));return r})}var ai=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{l(n.next(c))}catch(s){o(s)}},a=c=>{try{l(n.throw(c))}catch(s){o(s)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,a);l((n=n.apply(e,t)).next())});function li(e,t){try{return t===ue.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch{return null}}const ci=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function ui(e,t){if(!(t!=null&&t.constructor))return;const{name:n}=t.constructor;if(!ci.includes(n))return;const r=Wn(e,n);r.includes(t)||r.push(t)}function di(e){return ai(this,arguments,function*({mutation:t,target:n,type:r,imageMap:o,errorHandler:i}){try{const a=li(n,r);if(!a)return;if(t.setter){a[t.property]=t.args[0];return}const l=a[t.property],c=yield Promise.all(t.args.map(de(o,a))),s=l.apply(a,c);ui(a,s)}catch(a){i(t,a)}})}var hi=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{l(n.next(c))}catch(s){o(s)}},a=c=>{try{l(n.throw(c))}catch(s){o(s)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,a);l((n=n.apply(e,t)).next())});function mi(e){return hi(this,arguments,function*({event:t,mutation:n,target:r,imageMap:o,errorHandler:i}){try{const a=r.getContext("2d");if(n.setter){a[n.property]=n.args[0];return}const l=a[n.property];if(n.property==="drawImage"&&typeof n.args[0]=="string"){const c=o.get(t);l.apply(a,n.args)}else{const c=yield Promise.all(n.args.map(de(o,a)));l.apply(a,c)}}catch(a){i(n,a)}})}var pi=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{l(n.next(c))}catch(s){o(s)}},a=c=>{try{l(n.throw(c))}catch(s){o(s)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,a);l((n=n.apply(e,t)).next())});function $n(e){return pi(this,arguments,function*({event:t,mutation:n,target:r,imageMap:o,canvasEventMap:i,errorHandler:a}){try{const l=i.get(t)||n,c="commands"in l?l.commands:[l];if([ue.WebGL,ue.WebGL2].includes(n.type)){for(let s=0;s<c.length;s++){const u=c[s];yield di({mutation:u,type:n.type,target:r,imageMap:o,errorHandler:a})}return}for(let s=0;s<c.length;s++){const u=c[s];yield mi({event:t,mutation:u,target:r,imageMap:o,errorHandler:a})}}catch(l){a(n,l)}})}var fi=Object.defineProperty,gi=Object.defineProperties,vi=Object.getOwnPropertyDescriptors,Vn=Object.getOwnPropertySymbols,yi=Object.prototype.hasOwnProperty,bi=Object.prototype.propertyIsEnumerable,Un=(e,t,n)=>t in e?fi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Me=(e,t)=>{for(var n in t||(t={}))yi.call(t,n)&&Un(e,n,t[n]);if(Vn)for(var n of Vn(t))bi.call(t,n)&&Un(e,n,t[n]);return e},vt=(e,t)=>gi(e,vi(t)),yt=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{l(n.next(c))}catch(s){o(s)}},a=c=>{try{l(n.throw(c))}catch(s){o(s)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,a);l((n=n.apply(e,t)).next())});const jn=10*1e3,Bn=2*1e3,Gn=1*1e3,zn=60*60*1e3,Si=Cn||Xo,bt="[replayer]",St={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Tt(e){return e.type==w.IncrementalSnapshot&&(e.data.source==x.TouchMove||e.data.source==x.MouseInteraction&&e.data.type==H.TouchStart)}class Ti{constructor(t,n){if(this.usingVirtualDom=!1,this.virtualDom=new Ce,this.mouseTail=null,this.tailPositions=[],this.emitter=Si(),this.activityIntervals=[],this.legacy_missingNodeRetryMap={},this.cache=At(),this.imageMap=new Map,this.canvasEventMap=new Map,this.mirror=wt(),this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,!(n!=null&&n.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");const r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"highlight-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:St,useVirtualDom:!0,inactiveThreshold:.02,inactiveSkipTime:Bn};this.config=Object.assign({},r,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(O.Resize,this.handleResize),this.setupDom(),this.emitter.on(O.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(c,s,u)=>{$n({event:c,mutation:s,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this)};if(ae(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror),this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const c in this.legacy_missingNodeRetryMap)try{const s=this.legacy_missingNodeRetryMap[c],u=pt(s.node,this.mirror,this.virtualDom.mirror);ae(u,s.node,l,this.virtualDom.mirror),s.node=u}catch(s){this.config.showWarning&&console.warn(s)}}this.mousePos&&this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null}),this.emitter.on(O.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset()});const o=new Ko([],n?.speed||r.speed);this.service=ri({events:t.map(l=>n&&n.unpackFn?n.unpackFn(l):l).sort((l,c)=>l.timestamp-c.timestamp),timer:o,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(O.StateChange,{player:l})}),this.speedService=oi({normalSpeed:-1,timer:o}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(O.StateChange,{speed:l})});const i=this.service.state.context.events.find(l=>l.type===w.Meta),a=this.service.state.context.events.find(l=>l.type===w.FullSnapshot);if(i){const{width:l,height:c}=i.data;setTimeout(()=>{this.emitter.emit(O.Resize,{width:l,height:c})},0)}a&&setTimeout(()=>{this.firstFullSnapshot||(this.firstFullSnapshot=a,this.rebuildFullSnapshot(a),this.iframe.contentWindow.scrollTo(a.data.initialOffset))},1),this.service.state.context.events.find(Tt)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,n){return this.emitter.on(t,n),this}off(t,n){return this.emitter.off(t,n),this}setConfig(t){Object.keys(t).forEach(n=>{this.config[n]=t[n]}),this.config.skipInactive||this.backToNormal(),typeof t.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail<"u"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getActivityIntervals(){if(this.activityIntervals.length==0){const t=[],n=this.getMetaData(),r=[{timestamp:n.startTime},...this.service.state.context.events.filter(a=>this.isUserInteraction(a)),{timestamp:n.endTime}];for(let a=1;a<r.length;a++){const l=r[a-1],c=r[a];c.timestamp-l.timestamp>jn?t.push({startTime:l.timestamp,endTime:c.timestamp,duration:c.timestamp-l.timestamp,active:!1}):t.push({startTime:l.timestamp,endTime:c.timestamp,duration:c.timestamp-l.timestamp,active:!0})}const o=[];let i=t[0];for(let a=1;a<t.length;a++)t[a].active!=t[a-1].active&&(o.push({startTime:i.startTime,endTime:t[a-1].endTime,duration:t[a-1].endTime-i.startTime,active:t[a-1].active}),i=t[a]);i&&t.length>0&&o.push({startTime:i.startTime,endTime:t[t.length-1].endTime,duration:t[t.length-1].endTime-i.startTime,active:t[t.length-1].active}),i=o[0];for(let a=1;a<o.length;a++)(!o[a].active&&o[a].duration>this.config.inactiveThreshold*n.totalTime||!o[a-1].active&&o[a-1].duration>this.config.inactiveThreshold*n.totalTime)&&(this.activityIntervals.push({startTime:i.startTime,endTime:o[a-1].endTime,duration:o[a-1].endTime-i.startTime,active:o[a-1].active}),i=o[a]);i&&o.length>0&&this.activityIntervals.push({startTime:i.startTime,endTime:o[o.length-1].endTime,duration:o[o.length-1].endTime-i.startTime,active:o[o.length-1].active})}return this.activityIntervals}getMetaData(){const t=this.service.state.context.events[0],n=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:n.timestamp,totalTime:n.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:n}=this.service.state.context;return t-n[0].timestamp}getMirror(){return this.mirror}play(t=0){var n,r;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(r=(n=this.iframe.contentDocument)==null?void 0:n.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit(O.Start),this.handleInactivity(this.getMetaData().startTime+t,!0)}pause(t){var n,r;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(r=(n=this.iframe.contentDocument)==null?void 0:n.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit(O.Pause)}resume(t=0){console.warn("The 'resume' will be departed in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(O.Resume)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const n=this.config.unpackFn?this.config.unpackFn(t):t;Tt(n)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:n}}))}replaceEvents(t){for(const n of t)if(Tt(n)){this.mouse.classList.add("touch-device");break}this.service.send({type:"REPLACE_EVENTS",payload:{events:t}})}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=At()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Zo(this.iframe.contentWindow,this.iframe.contentDocument),st(this.iframe.contentWindow))}handleResize(t){this.iframe.style.display="inherit";for(const n of[this.mouseTail,this.iframe])!n||(n.setAttribute("width",String(t.width)),n.setAttribute("height",String(t.height)))}applyEventsSynchronously(t){for(const n of t){switch(n.type){case w.DomContentLoaded:case w.Load:case w.Custom:continue;case w.FullSnapshot:case w.Meta:case w.Plugin:case w.IncrementalSnapshot:break}this.getCastFn(n,!0)()}this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null}getCastFn(t,n=!1){let r;switch(t.type){case w.DomContentLoaded:case w.Load:break;case w.Custom:r=()=>{this.emitter.emit(O.CustomEvent,t)};break;case w.Meta:r=()=>this.emitter.emit(O.Resize,{width:t.data.width,height:t.data.height});break;case w.FullSnapshot:r=()=>{if(this.firstFullSnapshot){if(this.firstFullSnapshot===t){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.rebuildFullSnapshot(t,n),this.iframe.contentWindow.scrollTo(t.data.initialOffset)};break;case w.IncrementalSnapshot:r=()=>{if(this.applyIncremental(t,n),!n&&(this.handleInactivity(t.timestamp),t===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const o of this.service.state.context.events)if(!(o.timestamp<=t.timestamp)&&this.isUserInteraction(o)){o.delay-t.delay>jn*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=o);break}if(this.nextUserInteractionEvent){const o=this.nextUserInteractionEvent.delay-t.delay,i={speed:Math.min(Math.round(o/Bn),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:i}),this.emitter.emit(O.SkipStart,i)}}};break}return()=>{r&&r();for(const i of this.config.plugins||[])i.handler(t,n,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:t}});const o=this.service.state.context.events.length-1;if(t===this.service.state.context.events[o]){const i=()=>{o<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(O.Finish))};t.type===w.IncrementalSnapshot&&t.data.source===x.MouseMove&&t.data.positions.length?setTimeout(()=>{i()},Math.max(0,-t.data.positions[0].timeOffset+50)):i()}this.emitter.emit(O.EventCast,t)}}handleInactivity(t,n){if((t===this.inactiveEndTimestamp||n)&&(this.inactiveEndTimestamp=null,this.backToNormal()),this.config.skipInactive&&!this.inactiveEndTimestamp){for(const r of this.getActivityIntervals())if(t>=r.startTime&&t<r.endTime&&!r.active){this.inactiveEndTimestamp=r.endTime;break}if(this.inactiveEndTimestamp){const r=this.inactiveEndTimestamp-t,o={speed:r/zn*this.config.inactiveSkipTime<Gn?r/Gn:Math.round(Math.max(r,zn)/this.config.inactiveSkipTime)};this.speedService.send({type:"FAST_FORWARD",payload:o}),this.emitter.emit(O.SkipStart,o)}}}rebuildFullSnapshot(t,n=!1){if(!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const r=[];xr(t.data.node,{doc:this.iframe.contentDocument,afterAppend:a=>{this.collectIframeAndAttachDocument(r,a)},cache:this.cache,mirror:this.mirror});for(const{mutationInQueue:a,builtNode:l}of r)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==a);const{documentElement:o,head:i}=this.iframe.contentDocument;this.insertStyleRules(o,i),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(O.FullsnapshotRebuilded,t),n||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,n){const r=ii(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&r.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,wn(o,this.virtualDom.unserializedId)),t.insertBefore(o,n);for(let i=0;i<r.length;i++)o.rules.push({cssText:r[i],type:ie.Insert,index:i})}else{const o=document.createElement("style");t.insertBefore(o,n);for(let i=0;i<r.length;i++)o.sheet.insertRule(r[i],i)}}attachDocumentToIframe(t,n){const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,o=[];je(t.node,{doc:n.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:i=>{this.collectIframeAndAttachDocument(o,i);const a=r.getMeta(i);if(a?.type===k.Element&&a?.tagName.toUpperCase()==="HTML"){const{documentElement:l,head:c}=n.contentDocument;this.insertStyleRules(l,c)}},cache:this.cache});for(const{mutationInQueue:i,builtNode:a}of o)this.attachDocumentToIframe(i,a),this.newDocumentQueue=this.newDocumentQueue.filter(l=>l!==i)}collectIframeAndAttachDocument(t,n){if(Ne(n,this.mirror)){const r=this.newDocumentQueue.find(o=>o.parentId===this.mirror.getId(n));r&&t.push({mutationInQueue:r,builtNode:n})}}waitForStylesheetLoad(){var t;const n=(t=this.iframe.contentDocument)==null?void 0:t.head;if(n){const r=new Set;let o,i=this.service.state;const a=()=>{i=this.service.state};this.emitter.on(O.Start,a),this.emitter.on(O.Pause,a);const l=()=>{this.emitter.off(O.Start,a),this.emitter.off(O.Pause,a)};n.querySelectorAll('link[rel="stylesheet"]').forEach(c=>{c.sheet||(r.add(c),c.addEventListener("load",()=>{r.delete(c),r.size===0&&o!==-1&&(i.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(O.LoadStylesheetEnd),o&&clearTimeout(o),l())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(O.LoadStylesheetStart),o=setTimeout(()=>{i.matches("playing")&&this.play(this.getCurrentTime()),o=-1,l()},this.config.loadTimeout))}}hasImageArg(t){for(const n of t)if(!(!n||typeof n!="object")){if("rr_type"in n&&"args"in n){if(this.hasImageArg(n.args))return!0}else if("rr_type"in n&&n.rr_type==="HTMLImageElement"||n instanceof Array&&this.hasImageArg(n))return!0}return!1}getImageArgs(t){const n=[];for(const r of t)!r||typeof r!="object"||("rr_type"in r&&"args"in r?n.push(...this.getImageArgs(r.args)):"rr_type"in r&&r.rr_type==="HTMLImageElement"?n.push(r.src):r instanceof Array&&n.push(...this.getImageArgs(r)));return n}preloadAllImages(){return yt(this,null,function*(){this.service.state;const t=()=>{this.service.state};this.emitter.on(O.Start,t),this.emitter.on(O.Pause,t);const n=[];for(const r of this.service.state.context.events)r.type===w.IncrementalSnapshot&&r.data.source===x.CanvasMutation&&(n.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(o=>{this.preloadImages(o,r)}));return Promise.all(n)})}preloadImages(t,n){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(n)){const r=document.createElement("canvas"),o=r.getContext("2d"),i=o?.createImageData(r.width,r.height);i?.data,JSON.parse(t.args[0]),o?.putImageData(i,0,0)}}deserializeAndPreloadCanvasEvents(t,n){return yt(this,null,function*(){if(!this.canvasEventMap.has(n)){const r={isUnchanged:!0};if("commands"in t){const o=yield Promise.all(t.commands.map(i=>yt(this,null,function*(){const a=yield Promise.all(i.args.map(de(this.imageMap,null,r)));return vt(Me({},i),{args:a})})));r.isUnchanged===!1&&this.canvasEventMap.set(n,vt(Me({},t),{commands:o}))}else{const o=yield Promise.all(t.args.map(de(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(n,vt(Me({},t),{args:o}))}}})}applyIncremental(t,n){var r,o,i,a,l,c;const{data:s}=t;switch(s.source){case x.Mutation:{try{this.applyMutation(s,n)}catch(u){this.warn(`Exception in mutation ${u.message||u}`,s)}break}case x.Drag:case x.TouchMove:case x.MouseMove:if(n){const u=s.positions[s.positions.length-1];this.mousePos={x:u.x,y:u.y,id:u.id,debugData:s}}else s.positions.forEach(u=>{const d={doAction:()=>{this.moveAndHover(u.x,u.y,u.id,n,s)},delay:u.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(d)}),this.timer.addAction({doAction(){},delay:t.delay-((r=s.positions[0])==null?void 0:r.timeOffset)});break;case x.MouseInteraction:{if(s.id===-1||n)break;const u=new Event(H[s.type].toLowerCase()),d=this.mirror.getNode(s.id);if(!d)return this.debugNodeNotFound(s,s.id);this.emitter.emit(O.MouseInteraction,{type:s.type,target:d});const{triggerFocus:h}=this.config;switch(s.type){case H.Blur:"blur"in d&&d.blur();break;case H.Focus:h&&d.focus&&d.focus({preventScroll:!0});break;case H.Click:case H.TouchStart:case H.TouchEnd:n?(s.type===H.TouchStart?this.touchActive=!0:s.type===H.TouchEnd&&(this.touchActive=!1),this.mousePos={x:s.x,y:s.y,id:s.id,debugData:s}):(s.type===H.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(s.x,s.y,s.id,n,s),s.type===H.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):s.type===H.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):s.type===H.TouchEnd&&this.mouse.classList.remove("touch-active"));break;case H.TouchCancel:n?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:d.dispatchEvent(u)}break}case x.Scroll:{if(s.id===-1)break;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(s.id);if(!u)return this.debugNodeNotFound(s,s.id);u.scrollData=s;break}this.applyScroll(s,n);break}case x.ViewportResize:this.emitter.emit(O.Resize,{width:s.width,height:s.height});break;case x.Input:{if(s.id===-1)break;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(s.id);if(!u)return this.debugNodeNotFound(s,s.id);u.inputData=s;break}this.applyInput(s);break}case x.MediaInteraction:{const u=this.usingVirtualDom?this.virtualDom.mirror.getNode(s.id):this.mirror.getNode(s.id);if(!u)return this.debugNodeNotFound(s,s.id);const d=u;try{s.currentTime&&(d.currentTime=s.currentTime),s.volume&&(d.volume=s.volume),s.muted&&(d.muted=s.muted),s.type===me.Pause&&d.pause(),s.type===me.Play&&d.play()}catch(h){this.config.showWarning&&console.warn(`Failed to replay media interactions: ${h.message||h}`)}break}case x.StyleSheetRule:{if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(s.id);if(!u)return this.debugNodeNotFound(s,s.id);const d=u.rules;(o=s.adds)==null||o.forEach(({rule:h,index:m})=>d?.push({cssText:h,index:m,type:ie.Insert})),(i=s.removes)==null||i.forEach(({index:h})=>d?.push({index:h,type:ie.Remove}))}else{const u=this.mirror.getNode(s.id);if(!u)return this.debugNodeNotFound(s,s.id);const d=u.sheet;(a=s.adds)==null||a.forEach(({rule:h,index:m})=>{try{if(Array.isArray(m)){const{positions:p,index:g}=ut(m);Ee(d.cssRules,p).insertRule(h,g)}else{const p=m===void 0?void 0:Math.min(m,d.cssRules.length);d.insertRule(h,p)}}catch{}}),(l=s.removes)==null||l.forEach(({index:h})=>{try{if(Array.isArray(h)){const{positions:m,index:p}=ut(h);Ee(d.cssRules,m).deleteRule(p||0)}else d?.deleteRule(h)}catch{}})}break}case x.StyleDeclaration:{if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(s.id);if(!u)return this.debugNodeNotFound(s,s.id);const d=u.rules;s.set&&d.push(Me({type:ie.SetProperty,index:s.index},s.set)),s.remove&&d.push(Me({type:ie.RemoveProperty,index:s.index},s.remove))}else{const u=this.mirror.getNode(s.id);if(!u)return this.debugNodeNotFound(s,s.id);const d=u.sheet;s.set&&Ee(d.rules,s.index).style.setProperty(s.set.property,s.set.value,s.set.priority),s.remove&&Ee(d.rules,s.index).style.removeProperty(s.remove.property)}break}case x.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(s.id);if(!u)return this.debugNodeNotFound(s,s.id);u.canvasMutations.push({event:t,mutation:s})}else{const u=this.mirror.getNode(s.id);if(!u)return this.debugNodeNotFound(s,s.id);$n({event:t,mutation:s,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case x.Font:{try{const u=new FontFace(s.family,s.buffer?new Uint8Array(JSON.parse(s.fontSource)):s.fontSource,s.descriptors);(c=this.iframe.contentDocument)==null||c.fonts.add(u)}catch(u){this.config.showWarning&&console.warn(u)}break}}}applyMutation(t,n){if(this.config.useVirtualDom&&!this.usingVirtualDom&&n&&(this.usingVirtualDom=!0,zo(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const s in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[s],d=En(u.node,this.virtualDom,this.mirror);d&&(u.node=d)}catch(u){this.config.showWarning&&console.warn(u)}const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes.forEach(s=>{var u;const d=r.getNode(s.id);if(!d)return t.removes.find(m=>m.id===s.parentId)?void 0:this.warnNodeNotFound(t,s.id);let h=r.getNode(s.parentId);if(!h)return this.warnNodeNotFound(t,s.parentId);if(s.isShadow&&Ae(h)&&(h=h.shadowRoot),r.removeNodeFromMap(d),h)try{h.removeChild(d),this.usingVirtualDom&&d.nodeName==="#text"&&h.nodeName==="STYLE"&&((u=h.rules)==null?void 0:u.length)>0&&(h.rules=[])}catch(m){if(m instanceof DOMException)this.warn("parent could not remove child in mutation",h,d,t);else throw m}});const o=Me({},this.legacy_missingNodeRetryMap),i=[],a=s=>{let u=null;return s.nextId&&(u=r.getNode(s.nextId)),s.nextId!==null&&s.nextId!==void 0&&s.nextId!==-1&&!u},l=s=>{var u;if(!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");let d=r.getNode(s.parentId);if(!d)return s.node.type===k.Document?this.newDocumentQueue.push(s):i.push(s);s.node.isShadow&&(Ae(d)||d.attachShadow({mode:"open"}),d=d.shadowRoot);let h=null,m=null;if(s.previousId&&(h=r.getNode(s.previousId)),s.nextId&&(m=r.getNode(s.nextId)),a(s))return i.push(s);if(s.node.rootId&&!r.getNode(s.node.rootId))return;const p=s.node.rootId?r.getNode(s.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Ne(d,r)){this.attachDocumentToIframe(s,d);return}const g=je(s.node,{doc:p,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});if(s.previousId===-1||s.nextId===-1){o[s.node.id]={node:g,mutation:s};return}const N=r.getMeta(d);if(N&&N.type===k.Element&&N.tagName==="textarea"&&s.node.type===k.Text){const f=Array.isArray(d.childNodes)?d.childNodes:Array.from(d.childNodes);for(const b of f)b.nodeType===d.TEXT_NODE&&d.removeChild(b)}if(h&&h.nextSibling&&h.nextSibling.parentNode)d.insertBefore(g,h.nextSibling);else if(m&&m.parentNode)d.contains(m)?d.insertBefore(g,m):d.insertBefore(g,null);else{if(d===p)for(;p.firstChild;)p.removeChild(p.firstChild);d.appendChild(g)}if(this.usingVirtualDom&&g.nodeName==="#text"&&d.nodeName==="STYLE"&&((u=d.rules)==null?void 0:u.length)>0&&(d.rules=[]),Ne(g,this.mirror)){const f=this.mirror.getId(g),b=this.newDocumentQueue.find(S=>S.parentId===f);b&&(this.attachDocumentToIframe(b,g),this.newDocumentQueue=this.newDocumentQueue.filter(S=>S!==b))}(s.previousId||s.nextId)&&this.legacy_resolveMissingNode(o,d,g,s)};t.adds.forEach(s=>{l(s)});const c=Date.now();for(;i.length;){const s=_t(i);if(i.length=0,Date.now()-c>500){this.warn("Timeout in the loop, please check the resolve tree data:",s);break}for(const u of s)r.getNode(u.value.parentId)?at(u,d=>{l(d)}):this.debug("Drop resolve tree since there is no parent for the root node.",u)}Object.keys(o).length&&Object.assign(this.legacy_missingNodeRetryMap,o),Ft(t.texts).forEach(s=>{var u;const d=r.getNode(s.id);if(!d)return t.removes.find(h=>h.id===s.id)?void 0:this.warnNodeNotFound(t,s.id);if(d.textContent=s.value,this.usingVirtualDom){const h=d.parentNode;((u=h?.rules)==null?void 0:u.length)>0&&(h.rules=[])}}),t.attributes.forEach(s=>{const u=r.getNode(s.id);if(!u)return t.removes.find(d=>d.id===s.id)?void 0:this.warnNodeNotFound(t,s.id);for(const d in s.attributes)if(typeof d=="string"){const h=s.attributes[d];if(h===null)u.removeAttribute(d);else if(typeof h=="string")try{u.setAttribute(d,h)}catch(m){this.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",m)}else if(d==="style"){const m=h,p=u;for(const g in m)if(m[g]===!1)p.style.removeProperty(g);else if(m[g]instanceof Array){const N=m[g];p.style.setProperty(g,N[0],N[1])}else{const N=m[g];p.style.setProperty(g,N)}}}})}applyScroll(t,n){const r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);const o=this.mirror.getMeta(r);if(r===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:t.y,left:t.x,behavior:n?"auto":"smooth"});else if(o?.type===k.Document)r.defaultView.scrollTo({top:t.y,left:t.x,behavior:n?"auto":"smooth"});else try{r.scrollTop=t.y,r.scrollLeft=t.x}catch{}}applyInput(t){const n=this.mirror.getNode(t.id);if(!n)return this.debugNodeNotFound(t,t.id);try{n.checked=t.isChecked,n.value=t.text}catch{}}legacy_resolveMissingNode(t,n,r,o){const{previousId:i,nextId:a}=o,l=i&&t[i],c=a&&t[a];if(l){const{node:s,mutation:u}=l;n.insertBefore(s,r),delete t[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(t,n,s,u)}if(c){const{node:s,mutation:u}=c;n.insertBefore(s,r.nextSibling),delete t[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(t,n,s,u)}}moveAndHover(t,n,r,o,i){const a=this.mirror.getNode(r);if(!a)return this.debugNodeNotFound(i,r);const l=ct(a,this.iframe),c=t*l.absoluteScale+l.x,s=n*l.absoluteScale+l.y;this.mouse.style.left=`${c}px`,this.mouse.style.top=`${s}px`,o||this.drawMouseTail({x:c,y:s}),this.hoverElements(a)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:n,lineWidth:r,strokeStyle:o,duration:i}=this.config.mouseTail===!0?St:Object.assign({},St,this.config.mouseTail),a=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=r,l.lineCap=n,l.strokeStyle=o,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(c=>l.lineTo(c.x,c.y)),l.stroke())};this.tailPositions.push(t),a(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==t),a()},i/this.speedService.state.context.timer.speed)}hoverElements(t){var n;(n=this.iframe.contentDocument)==null||n.querySelectorAll(".\\:hover").forEach(o=>{o.classList.remove(":hover")});let r=t;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(t){return t.type!==w.IncrementalSnapshot?!1:t.data.source>x.Mutation&&t.data.source<=x.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(O.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,n){this.warn(`Node with id '${n}' not found. `,t)}warnCanvasMutationFailed(t,n){this.warn("Has error on canvas update",n,"canvas mutation:",t)}debugNodeNotFound(t,n){this.debug(bt,`Node with id '${n}' not found. `,t)}warn(...t){!this.config.showWarning||console.warn(bt,...t)}debug(...t){!this.config.showDebug||console.log(bt,...t)}}const{addCustomEvent:Ni}=fe,{freezePage:Ei}=fe;return q.EventType=w,q.IncrementalSource=x,q.MouseInteractions=H,q.Replayer=Ti,q.ReplayerEvents=O,q.addCustomEvent=Ni,q.freezePage=Ei,q.record=fe,q.utils=kr,Object.defineProperty(q,"__esModule",{value:!0}),q}({});
19
19
  //# sourceMappingURL=rrweb.min.js.map