@highlight-run/rrweb 2.1.6 → 2.1.7
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/plugins/console-record.min.js.map +1 -1
- package/dist/plugins/console-replay.min.js.map +1 -1
- package/dist/record/rrweb-record-pack.min.js.map +1 -1
- package/dist/record/rrweb-record.js +1 -1
- package/dist/record/rrweb-record.min.js +1 -1
- package/dist/record/rrweb-record.min.js.map +1 -1
- package/dist/replay/rrweb-replay-unpack.min.js.map +1 -1
- package/dist/replay/rrweb-replay.min.js.map +1 -1
- package/dist/rrweb-all.js +1 -1
- package/dist/rrweb-all.min.js +1 -1
- package/dist/rrweb-all.min.js.map +1 -1
- package/dist/rrweb.js +1 -1
- package/dist/rrweb.min.js +1 -1
- package/dist/rrweb.min.js.map +1 -1
- package/es/rrweb/packages/rrweb-snapshot/es/rrweb-snapshot.js +5 -1
- package/lib/record/rrweb-record.js +5 -1
- package/lib/rrweb-all.js +5 -1
- package/lib/rrweb.js +5 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var rrwebRecord=function(){"use strict";var N;(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"})(N||(N={}));function Et(e){return e.nodeType===e.ELEMENT_NODE}function de(e){var t=e?.host;return Boolean(t?.shadowRoot===e)}function pe(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}var Pe=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 Nt(){return new Pe}function Te(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,s=e.maskInputFn,l=o||"";return(t[n.toLowerCase()]||t[r])&&(s?l=s(l):l="*".repeat(l.length)),l}var Ae="__rrweb_original__";function Rt(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 s=t.getImageData,l=Ae in s?s[Ae]:s,a=new Uint32Array(l.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer);if(a.some(function(i){return i!==0}))return!1}return!0}function Oe(e){return e=e.replace(/[^ -~]+/g,""),e=e?.split(" ").map(function(t){return Math.random().toString(20).substr(2,t.length)}).join(" ")||"",e}var Dt=1,Ft=new RegExp("[^a-z0-9-_:]"),he=-2;function Pt(){return Dt++}function At(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return Ft.test(t)?"div":t}function xe(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(_t).join(""):null}catch{return null}}function _t(e){var t=e.cssText;if(Wt(e))try{t=xe(e.styleSheet)||t}catch{}return t}function Wt(e){return"styleSheet"in e}function Gt(e){return e.cssRules?Array.from(e.cssRules).map(function(t){return t.cssText||""}).join(""):""}function zt(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var ae,_e,Vt=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,jt=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Zt=/^(data:)([^,]*),(.*)/i;function be(e,t){return(e||"").replace(Vt,function(n,r,o,s,l,a){var i=o||l||a,c=r||s||"";if(!i)return n;if(!jt.test(i)||Zt.test(i))return"url(".concat(c).concat(i).concat(c,")");if(i[0]==="/")return"url(".concat(c).concat(zt(t)+i).concat(c,")");var p=t.split("/"),d=i.split("/");p.pop();for(var m=0,u=d;m<u.length;m++){var h=u[m];h!=="."&&(h===".."?p.pop():p.push(h))}return"url(".concat(c).concat(p.join("/")).concat(c,")")})}var Ut=/^[^ \t\n\r\u000c]+/,Yt=/^[, \t\n\r\u000c]+/;function Ht(e,t){if(t.trim()==="")return t;var n=0;function r(c){var p,d=c.exec(t.substring(n));return d?(p=d[0],n+=p.length,p):""}for(var o=[];r(Yt),!(n>=t.length);){var s=r(Ut);if(s.slice(-1)===",")s=Se(e,s.substring(0,s.length-1)),o.push(s);else{var l="";s=Se(e,s);for(var a=!1;;){var i=t.charAt(n);if(i===""){o.push((s+l).trim());break}else if(a)i===")"&&(a=!1);else if(i===","){n+=1,o.push((s+l).trim());break}else i==="("&&(a=!0);l+=i,n+=1}}}return o.join(", ")}function Se(e,t){if(!t||t.trim()==="")return t;var n=e.createElement("a");return n.href=t,n.href}function Xt(e){return Boolean(e.tagName==="svg"||e.ownerSVGElement)}function Le(){var e=document.createElement("a");return e.href="",e.href}function We(e,t,n,r){return n==="src"||n==="href"&&r&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r&&r[0]!=="#"||n==="background"&&r&&(t==="table"||t==="td"||t==="th")?Se(e,r):n==="srcset"&&r?Ht(e,r):n==="style"&&r?be(r,Le()):t==="object"&&n==="data"&&r?Se(e,r):r}function Ge(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 Ce(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?Ce(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?Ce(e.parentNode,t,n):!1}function ze(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(Ce(r,t,!0))return!0;return!!(n&&(r.matches(n)||r.closest(n)))}function Bt(e,t,n){var r=e.contentWindow;if(r){var o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){var l=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(l),o=!0,t()});return}var a="about:blank";if(r.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function Ve(e){return e.getAttribute("href")?e.sheet!==null:!0}function je(e,t,n){var r=!1,o;try{o=e.sheet}catch{return}if(!o){var s=setTimeout(function(){r||(t(),r=!0)},n);e.addEventListener("load",function(){clearTimeout(s),r=!0,t()})}}function Kt(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,s=t.blockSelector,l=t.maskTextClass,a=t.maskTextSelector,i=t.inlineStylesheet,c=t.maskInputOptions,p=c===void 0?{}:c,d=t.maskTextFn,m=t.maskInputFn,u=t.dataURLOptions,h=u===void 0?{}:u,f=t.inlineImages,S=t.recordCanvas,k=t.keepIframeSrcFn,O=t.newlyAddedElement,C=O===void 0?!1:O,M=t.enableStrictPrivacy,b=$t(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:N.Document,childNodes:[],compatMode:e.compatMode,rootId:b}:{type:N.Document,childNodes:[],rootId:b};case e.DOCUMENT_TYPE_NODE:return{type:N.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return Qt(e,{doc:n,blockClass:o,blockSelector:s,inlineStylesheet:i,maskInputOptions:p,maskInputFn:m,maskTextClass:l,dataURLOptions:h,inlineImages:f,recordCanvas:S,keepIframeSrcFn:k,newlyAddedElement:C,enableStrictPrivacy:M,rootId:b});case e.TEXT_NODE:return Jt(e,{maskTextClass:l,maskTextSelector:a,maskTextFn:d,enableStrictPrivacy:M,rootId:b});case e.CDATA_SECTION_NODE:return{type:N.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:N.Comment,textContent:e.textContent||"",rootId:b};default:return!1}}function $t(e,t){if(t.hasNode(e)){var n=t.getId(e);return n===1?void 0:n}}function Jt(e,t){var n,r=t.maskTextClass,o=t.maskTextSelector,s=t.maskTextFn,l=t.enableStrictPrivacy,a=t.rootId,i=e.parentNode&&e.parentNode.tagName,c=e.textContent,p=i==="STYLE"?!0:void 0,d=i==="SCRIPT"?!0:void 0,m=!1;if(p&&c){try{e.nextSibling||e.previousSibling||!((n=e.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(c=Gt(e.parentNode.sheet))}catch(h){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(h),e)}c=be(c,Le()),m=!0}if(d?(c="SCRIPT_PLACEHOLDER",m=!0):i==="NOSCRIPT"&&(c="",m=!0),!p&&!d&&c&&ze(e,r,o)&&(c=s?s(c):c.replace(/[\S]/g,"*")),l&&!m&&i){var u=new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]);!u.has(i)&&c&&(c=Oe(c))}return{type:N.Text,textContent:c||"",isStyle:p,rootId:a}}function Qt(e,t){for(var n=t.doc,r=t.blockClass,o=t.blockSelector,s=t.inlineStylesheet,l=t.maskInputOptions,a=l===void 0?{}:l,i=t.maskInputFn,c=t.maskTextClass,p=t.dataURLOptions,d=p===void 0?{}:p,m=t.inlineImages,u=t.recordCanvas,h=t.keepIframeSrcFn,f=t.newlyAddedElement,S=f===void 0?!1:f,k=t.enableStrictPrivacy,O=t.rootId,C=Ge(e,r,o),M=Ge(e,c,null),b=At(e),v={},W=e.attributes.length,E=0;E<W;E++){var H=e.attributes[E];v[H.name]=We(n,b,H.name,H.value)}if(b==="link"&&s){var G=Array.from(n.styleSheets).find(function(y){return y.href===e.href}),L=null;G&&(L=xe(G)),L&&(delete v.rel,delete v.href,v._cssText=be(L,G.href))}if(b==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var L=xe(e.sheet);L&&(v._cssText=be(L,Le()))}if(b==="input"||b==="textarea"||b==="select"){var J=e.value;v.type!=="radio"&&v.type!=="checkbox"&&v.type!=="submit"&&v.type!=="button"&&J?v.value=Te({type:v.type,tagName:b,value:J,maskInputOptions:a,maskInputFn:i}):e.checked&&(v.checked=e.checked)}if(b==="option"&&(e.selected&&!a.select?v.selected=!0:delete v.selected),b==="canvas"&&u){if(e.__context==="2d")Rt(e)||(v.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){var z=e.toDataURL(d.type,d.quality),Q=document.createElement("canvas");Q.width=e.width,Q.height=e.height;var V=Q.toDataURL(d.type,d.quality);z!==V&&(v.rr_dataURL=z)}}if(b==="img"&&m&&!C&&!M){ae||(ae=n.createElement("canvas"),_e=ae.getContext("2d"));var D=e,ee=D.crossOrigin;D.crossOrigin="anonymous";var F=function(){try{ae.width=D.naturalWidth,ae.height=D.naturalHeight,_e.drawImage(D,0,0),v.rr_dataURL=ae.toDataURL(d.type,d.quality)}catch(y){console.warn("Cannot inline img src=".concat(D.currentSrc,"! Error: ").concat(y))}ee?v.crossOrigin=ee:D.removeAttribute("crossorigin")};D.complete&&D.naturalWidth!==0?F():D.onload=F}if((b==="audio"||b==="video")&&(v.rr_mediaState=e.paused?"paused":"played",v.rr_mediaCurrentTime=e.currentTime),S||(e.scrollLeft&&(v.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(v.rr_scrollTop=e.scrollTop)),C||M||b==="img"&&k){var X=e.getBoundingClientRect(),U=X.width,j=X.height;v={class:v.class,rr_width:"".concat(U,"px"),rr_height:"".concat(j,"px")},k&&(C=!0)}return b==="iframe"&&!h(v.src)&&(e.contentDocument||(v.rr_src=v.src),delete v.src),{type:N.Element,tagName:b,attributes:v,childNodes:[],isSVG:Xt(e)||void 0,needBlock:C,needMask:M,rootId:O}}function w(e){return e===void 0?"":e.toLowerCase()}function qt(e,t){return!!(t.comment&&e.type===N.Comment||e.type===N.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 ne(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,s=t.blockSelector,l=t.maskTextClass,a=t.maskTextSelector,i=t.skipChild,c=i===void 0?!1:i,p=t.inlineStylesheet,d=p===void 0?!0:p,m=t.maskInputOptions,u=m===void 0?{}:m,h=t.maskTextFn,f=t.maskInputFn,S=t.slimDOMOptions,k=t.dataURLOptions,O=k===void 0?{}:k,C=t.inlineImages,M=C===void 0?!1:C,b=t.recordCanvas,v=b===void 0?!1:b,W=t.onSerialize,E=t.onIframeLoad,H=t.iframeLoadTimeout,G=H===void 0?5e3:H,L=t.onStylesheetLoad,J=t.stylesheetLoadTimeout,z=J===void 0?5e3:J,Q=t.keepIframeSrcFn,V=Q===void 0?function(){return!1}:Q,D=t.newlyAddedElement,ee=D===void 0?!1:D,F=t.enableStrictPrivacy,X=t.preserveWhiteSpace,U=X===void 0?!0:X,j=Kt(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,dataURLOptions:O,inlineImages:M,recordCanvas:v,keepIframeSrcFn:V,newlyAddedElement:ee,enableStrictPrivacy:F});if(!j)return console.warn(e,"not serialized"),null;var y;if(r.hasNode(e)?y=r.getId(e):qt(j,S)||!U&&j.type===N.Text&&!j.isStyle&&!j.textContent.replace(/^\s+|\s+$/gm,"").length?y=he:y=Pt(),y===he)return null;var g=Object.assign(j,{id:y});r.add(e,g),W&&W(e);var B=!c,_=F;if(g.type===N.Element){if(B=B&&!g.needBlock,_=F||!!g.needBlock||!!g.needMask,_&&g.tagName==="img"){var q=e.cloneNode();q.src="",r.add(q,g)}delete g.needBlock,delete g.needMask;var I=e.shadowRoot;I&&pe(I)&&(g.isShadowHost=!0)}if((g.type===N.Document||g.type===N.Element)&&B){S.headWhitespace&&g.type===N.Element&&g.tagName==="head"&&(U=!1);for(var x={doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:c,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:S,dataURLOptions:O,inlineImages:M,recordCanvas:v,preserveWhiteSpace:U,onSerialize:W,onIframeLoad:E,iframeLoadTimeout:G,onStylesheetLoad:L,stylesheetLoadTimeout:z,keepIframeSrcFn:V,enableStrictPrivacy:_},oe=0,Ot=Array.from(e.childNodes);oe<Ot.length;oe++){var De=Ot[oe],ue=ne(De,x);ue&&g.childNodes.push(ue)}if(Et(e)&&e.shadowRoot)for(var Fe=0,xt=Array.from(e.shadowRoot.childNodes);Fe<xt.length;Fe++){var De=xt[Fe],ue=ne(De,x);ue&&(pe(e.shadowRoot)&&(ue.isShadow=!0),g.childNodes.push(ue))}}return e.parentNode&&de(e.parentNode)&&pe(e.parentNode)&&(g.isShadow=!0),g.type===N.Element&&g.tagName==="iframe"&&Bt(e,function(){var te=e.contentDocument;if(te&&E){var Lt=ne(te,{doc:te,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:S,dataURLOptions:O,inlineImages:M,recordCanvas:v,preserveWhiteSpace:U,onSerialize:W,onIframeLoad:E,iframeLoadTimeout:G,onStylesheetLoad:L,stylesheetLoadTimeout:z,keepIframeSrcFn:V,enableStrictPrivacy:F});Lt&&E(e,Lt)}},G),g.type===N.Element&&g.tagName==="link"&&g.attributes.rel==="stylesheet"&&(je(e,function(){if(L){var te=ne(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:S,dataURLOptions:O,inlineImages:M,recordCanvas:v,preserveWhiteSpace:U,onSerialize:W,onIframeLoad:E,iframeLoadTimeout:G,onStylesheetLoad:L,stylesheetLoadTimeout:z,keepIframeSrcFn:V,enableStrictPrivacy:F});te&&L(e,te)}},z),Ve(e)===!1)||g.type===N.Element&&g.tagName==="link"&&g.attributes.rel==="stylesheet"&&(je(e,function(){if(L){var te=ne(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:S,dataURLOptions:O,inlineImages:M,recordCanvas:v,preserveWhiteSpace:U,onSerialize:W,onIframeLoad:E,iframeLoadTimeout:G,enableStrictPrivacy:F,onStylesheetLoad:L,stylesheetLoadTimeout:z,keepIframeSrcFn:V});te&&L(e,te)}},z),Ve(e)===!1)?null:g}function en(e,t){var n=t||{},r=n.mirror,o=r===void 0?new Pe:r,s=n.blockClass,l=s===void 0?"highlight-block":s,a=n.blockSelector,i=a===void 0?null:a,c=n.maskTextClass,p=c===void 0?"highlight-mask":c,d=n.maskTextSelector,m=d===void 0?null:d,u=n.inlineStylesheet,h=u===void 0?!0:u,f=n.inlineImages,S=f===void 0?!1:f,k=n.recordCanvas,O=k===void 0?!1:k,C=n.maskAllInputs,M=C===void 0?!1:C,b=n.maskTextFn,v=n.maskInputFn,W=n.slimDOM,E=W===void 0?!1:W,H=n.dataURLOptions,G=n.preserveWhiteSpace,L=n.onSerialize,J=n.onIframeLoad,z=n.iframeLoadTimeout,Q=n.onStylesheetLoad,V=n.stylesheetLoadTimeout,D=n.keepIframeSrcFn,ee=D===void 0?function(){return!1}:D,F=n.enableStrictPrivacy,X=F===void 0?!1:F,U=M===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:M===!1?{password:!0}:M,j=E===!0||E==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:E==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:E===!1?{}:E;return ne(e,{doc:e,mirror:o,blockClass:l,blockSelector:i,maskTextClass:p,maskTextSelector:m,skipChild:!1,inlineStylesheet:h,maskInputOptions:U,maskTextFn:b,maskInputFn:v,slimDOMOptions:j,dataURLOptions:H,inlineImages:S,recordCanvas:O,preserveWhiteSpace:G,onSerialize:L,onIframeLoad:J,iframeLoadTimeout:z,onStylesheetLoad:Q,stylesheetLoadTimeout:V,keepIframeSrcFn:ee,newlyAddedElement:!1,enableStrictPrivacy:X})}function Z(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 rrwebRecord=function(){"use strict";var N;(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"})(N||(N={}));function Et(e){return e.nodeType===e.ELEMENT_NODE}function de(e){var t=e?.host;return Boolean(t?.shadowRoot===e)}function pe(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}var Pe=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 Nt(){return new Pe}function Te(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,s=e.maskInputFn,l=o||"";return(t[n.toLowerCase()]||t[r])&&(s?l=s(l):l="*".repeat(l.length)),l}var Ae="__rrweb_original__";function Rt(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 s=t.getImageData,l=Ae in s?s[Ae]:s,a=new Uint32Array(l.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer);if(a.some(function(i){return i!==0}))return!1}return!0}function Oe(e){return e=e.replace(/[^ -~]+/g,""),e=e?.split(" ").map(function(t){return Math.random().toString(20).substr(2,t.length)}).join(" ")||"",e}var Dt=1,Ft=new RegExp("[^a-z0-9-_:]"),he=-2;function Pt(){return Dt++}function At(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return Ft.test(t)?"div":t}function xe(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(_t).join(""):null}catch{return null}}function _t(e){var t=e.cssText;if(Wt(e))try{t=xe(e.styleSheet)||t}catch{}return t}function Wt(e){return"styleSheet"in e}function Gt(e){return e.cssRules?Array.from(e.cssRules).map(function(t){return t.cssText||""}).join(""):""}function zt(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var ae,_e,Vt=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,jt=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Zt=/^(data:)([^,]*),(.*)/i;function be(e,t){return(e||"").replace(Vt,function(n,r,o,s,l,a){var i=o||l||a,c=r||s||"";if(!i)return n;if(!jt.test(i)||Zt.test(i))return"url(".concat(c).concat(i).concat(c,")");if(i[0]==="/")return"url(".concat(c).concat(zt(t)+i).concat(c,")");var p=t.split("/"),d=i.split("/");p.pop();for(var m=0,u=d;m<u.length;m++){var h=u[m];h!=="."&&(h===".."?p.pop():p.push(h))}return"url(".concat(c).concat(p.join("/")).concat(c,")")})}var Ut=/^[^ \t\n\r\u000c]+/,Yt=/^[, \t\n\r\u000c]+/;function Ht(e,t){if(t.trim()==="")return t;var n=0;function r(c){var p,d=c.exec(t.substring(n));return d?(p=d[0],n+=p.length,p):""}for(var o=[];r(Yt),!(n>=t.length);){var s=r(Ut);if(s.slice(-1)===",")s=Se(e,s.substring(0,s.length-1)),o.push(s);else{var l="";s=Se(e,s);for(var a=!1;;){var i=t.charAt(n);if(i===""){o.push((s+l).trim());break}else if(a)i===")"&&(a=!1);else if(i===","){n+=1,o.push((s+l).trim());break}else i==="("&&(a=!0);l+=i,n+=1}}}return o.join(", ")}function Se(e,t){if(!t||t.trim()==="")return t;var n=e.createElement("a");return n.href=t,n.href}function Xt(e){return Boolean(e.tagName==="svg"||e.ownerSVGElement)}function Le(){var e=document.createElement("a");return e.href="",e.href}function We(e,t,n,r){return n==="src"||n==="href"&&r&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r&&r[0]!=="#"||n==="background"&&r&&(t==="table"||t==="td"||t==="th")?Se(e,r):n==="srcset"&&r?Ht(e,r):n==="style"&&r?be(r,Le()):t==="object"&&n==="data"&&r?Se(e,r):r}function Ge(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 Ce(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?Ce(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?Ce(e.parentNode,t,n):!1}function ze(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(Ce(r,t,!0))return!0;return!!(n&&(r.matches(n)||r.closest(n)))}function Bt(e,t,n){var r=e.contentWindow;if(r){var o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){var l=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(l),o=!0,t()});return}var a="about:blank";if(r.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function Ve(e){return e.getAttribute("href")?e.sheet!==null:!0}function je(e,t,n){var r=!1,o;try{o=e.sheet}catch{return}if(!o){var s=setTimeout(function(){r||(t(),r=!0)},n);e.addEventListener("load",function(){clearTimeout(s),r=!0,t()})}}function Kt(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,s=t.blockSelector,l=t.maskTextClass,a=t.maskTextSelector,i=t.inlineStylesheet,c=t.maskInputOptions,p=c===void 0?{}:c,d=t.maskTextFn,m=t.maskInputFn,u=t.dataURLOptions,h=u===void 0?{}:u,f=t.inlineImages,S=t.recordCanvas,k=t.keepIframeSrcFn,O=t.newlyAddedElement,C=O===void 0?!1:O,M=t.enableStrictPrivacy,b=$t(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:N.Document,childNodes:[],compatMode:e.compatMode,rootId:b}:{type:N.Document,childNodes:[],rootId:b};case e.DOCUMENT_TYPE_NODE:return{type:N.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return Qt(e,{doc:n,blockClass:o,blockSelector:s,inlineStylesheet:i,maskInputOptions:p,maskInputFn:m,maskTextClass:l,dataURLOptions:h,inlineImages:f,recordCanvas:S,keepIframeSrcFn:k,newlyAddedElement:C,enableStrictPrivacy:M,rootId:b});case e.TEXT_NODE:return Jt(e,{maskTextClass:l,maskTextSelector:a,maskTextFn:d,enableStrictPrivacy:M,rootId:b});case e.CDATA_SECTION_NODE:return{type:N.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:N.Comment,textContent:e.textContent||"",rootId:b};default:return!1}}function $t(e,t){if(t.hasNode(e)){var n=t.getId(e);return n===1?void 0:n}}function Jt(e,t){var n,r=t.maskTextClass,o=t.maskTextSelector,s=t.maskTextFn,l=t.enableStrictPrivacy,a=t.rootId,i=e.parentNode&&e.parentNode.tagName,c=e.textContent,p=i==="STYLE"?!0:void 0,d=i==="SCRIPT"?!0:void 0,m=!1;if(p&&c){try{e.nextSibling||e.previousSibling||!((n=e.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(c=Gt(e.parentNode.sheet))}catch(h){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(h),e)}c=be(c,Le()),m=!0}if(d?(c="SCRIPT_PLACEHOLDER",m=!0):i==="NOSCRIPT"&&(c="",m=!0),!p&&!d&&c&&ze(e,r,o)&&(c=s?s(c):c.replace(/[\S]/g,"*")),l&&!m&&i){var u=new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]);!u.has(i)&&c&&(c=Oe(c))}return{type:N.Text,textContent:c||"",isStyle:p,rootId:a}}function Qt(e,t){for(var n=t.doc,r=t.blockClass,o=t.blockSelector,s=t.inlineStylesheet,l=t.maskInputOptions,a=l===void 0?{}:l,i=t.maskInputFn,c=t.maskTextClass,p=t.dataURLOptions,d=p===void 0?{}:p,m=t.inlineImages,u=t.recordCanvas,h=t.keepIframeSrcFn,f=t.newlyAddedElement,S=f===void 0?!1:f,k=t.enableStrictPrivacy,O=t.rootId,C=Ge(e,r,o),M=Ge(e,c,null),b=At(e),v={},W=e.attributes.length,E=0;E<W;E++){var H=e.attributes[E];v[H.name]=We(n,b,H.name,H.value)}if(b==="link"&&s){var G=Array.from(n.styleSheets).find(function(y){return y.href===e.href}),L=null;G&&(L=xe(G)),L&&(delete v.rel,delete v.href,v._cssText=be(L,G.href))}if(b==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var L=xe(e.sheet);L&&(v._cssText=be(L,Le()))}if(b==="input"||b==="textarea"||b==="select"){var J=e.value;v.type!=="radio"&&v.type!=="checkbox"&&v.type!=="submit"&&v.type!=="button"&&J?v.value=Te({type:v.type,tagName:b,value:J,maskInputOptions:a,maskInputFn:i}):e.checked&&(v.checked=e.checked)}if(b==="option"&&(e.selected&&!a.select?v.selected=!0:delete v.selected),b==="canvas"&&u){if(e.__context==="2d")Rt(e)||(v.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){var z=e.toDataURL(d.type,d.quality),Q=document.createElement("canvas");Q.width=e.width,Q.height=e.height;var V=Q.toDataURL(d.type,d.quality);z!==V&&(v.rr_dataURL=z)}}if(b==="img"&&m&&!C&&!M&&!k){ae||(ae=n.createElement("canvas"),_e=ae.getContext("2d"));var D=e,ee=D.crossOrigin;D.crossOrigin="anonymous";var F=function(){try{ae.width=D.naturalWidth,ae.height=D.naturalHeight,_e.drawImage(D,0,0),v.rr_dataURL=ae.toDataURL(d.type,d.quality)}catch(y){console.warn("Cannot inline img src=".concat(D.currentSrc,"! Error: ").concat(y))}ee?v.crossOrigin=ee:D.removeAttribute("crossorigin")};D.complete&&D.naturalWidth!==0?F():D.onload=F}if((b==="audio"||b==="video")&&(v.rr_mediaState=e.paused?"paused":"played",v.rr_mediaCurrentTime=e.currentTime),S||(e.scrollLeft&&(v.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(v.rr_scrollTop=e.scrollTop)),C||M||b==="img"&&k){var X=e.getBoundingClientRect(),U=X.width,j=X.height;v={class:v.class,rr_width:"".concat(U,"px"),rr_height:"".concat(j,"px")},k&&(C=!0)}return b==="iframe"&&!h(v.src)&&(e.contentDocument||(v.rr_src=v.src),delete v.src),{type:N.Element,tagName:b,attributes:v,childNodes:[],isSVG:Xt(e)||void 0,needBlock:C,needMask:M,rootId:O}}function w(e){return e===void 0?"":e.toLowerCase()}function qt(e,t){return!!(t.comment&&e.type===N.Comment||e.type===N.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 ne(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,s=t.blockSelector,l=t.maskTextClass,a=t.maskTextSelector,i=t.skipChild,c=i===void 0?!1:i,p=t.inlineStylesheet,d=p===void 0?!0:p,m=t.maskInputOptions,u=m===void 0?{}:m,h=t.maskTextFn,f=t.maskInputFn,S=t.slimDOMOptions,k=t.dataURLOptions,O=k===void 0?{}:k,C=t.inlineImages,M=C===void 0?!1:C,b=t.recordCanvas,v=b===void 0?!1:b,W=t.onSerialize,E=t.onIframeLoad,H=t.iframeLoadTimeout,G=H===void 0?5e3:H,L=t.onStylesheetLoad,J=t.stylesheetLoadTimeout,z=J===void 0?5e3:J,Q=t.keepIframeSrcFn,V=Q===void 0?function(){return!1}:Q,D=t.newlyAddedElement,ee=D===void 0?!1:D,F=t.enableStrictPrivacy,X=t.preserveWhiteSpace,U=X===void 0?!0:X,j=Kt(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,dataURLOptions:O,inlineImages:M,recordCanvas:v,keepIframeSrcFn:V,newlyAddedElement:ee,enableStrictPrivacy:F});if(!j)return console.warn(e,"not serialized"),null;var y;if(r.hasNode(e)?y=r.getId(e):qt(j,S)||!U&&j.type===N.Text&&!j.isStyle&&!j.textContent.replace(/^\s+|\s+$/gm,"").length?y=he:y=Pt(),y===he)return null;var g=Object.assign(j,{id:y});r.add(e,g),W&&W(e);var B=!c,_=F;if(g.type===N.Element){if(B=B&&!g.needBlock,_=F||!!g.needBlock||!!g.needMask,_&&g.tagName==="img"){var q=e.cloneNode();q.src="",r.add(q,g)}delete g.needBlock,delete g.needMask;var I=e.shadowRoot;I&&pe(I)&&(g.isShadowHost=!0)}if((g.type===N.Document||g.type===N.Element)&&B){S.headWhitespace&&g.type===N.Element&&g.tagName==="head"&&(U=!1);for(var x={doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:c,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:S,dataURLOptions:O,inlineImages:M,recordCanvas:v,preserveWhiteSpace:U,onSerialize:W,onIframeLoad:E,iframeLoadTimeout:G,onStylesheetLoad:L,stylesheetLoadTimeout:z,keepIframeSrcFn:V,enableStrictPrivacy:_},oe=0,Ot=Array.from(e.childNodes);oe<Ot.length;oe++){var De=Ot[oe],ue=ne(De,x);ue&&g.childNodes.push(ue)}if(Et(e)&&e.shadowRoot)for(var Fe=0,xt=Array.from(e.shadowRoot.childNodes);Fe<xt.length;Fe++){var De=xt[Fe],ue=ne(De,x);ue&&(pe(e.shadowRoot)&&(ue.isShadow=!0),g.childNodes.push(ue))}}return e.parentNode&&de(e.parentNode)&&pe(e.parentNode)&&(g.isShadow=!0),g.type===N.Element&&g.tagName==="iframe"&&Bt(e,function(){var te=e.contentDocument;if(te&&E){var Lt=ne(te,{doc:te,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:S,dataURLOptions:O,inlineImages:M,recordCanvas:v,preserveWhiteSpace:U,onSerialize:W,onIframeLoad:E,iframeLoadTimeout:G,onStylesheetLoad:L,stylesheetLoadTimeout:z,keepIframeSrcFn:V,enableStrictPrivacy:F});Lt&&E(e,Lt)}},G),g.type===N.Element&&g.tagName==="link"&&g.attributes.rel==="stylesheet"&&(je(e,function(){if(L){var te=ne(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:S,dataURLOptions:O,inlineImages:M,recordCanvas:v,preserveWhiteSpace:U,onSerialize:W,onIframeLoad:E,iframeLoadTimeout:G,onStylesheetLoad:L,stylesheetLoadTimeout:z,keepIframeSrcFn:V,enableStrictPrivacy:F});te&&L(e,te)}},z),Ve(e)===!1)||g.type===N.Element&&g.tagName==="link"&&g.attributes.rel==="stylesheet"&&(je(e,function(){if(L){var te=ne(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:S,dataURLOptions:O,inlineImages:M,recordCanvas:v,preserveWhiteSpace:U,onSerialize:W,onIframeLoad:E,iframeLoadTimeout:G,enableStrictPrivacy:F,onStylesheetLoad:L,stylesheetLoadTimeout:z,keepIframeSrcFn:V});te&&L(e,te)}},z),Ve(e)===!1)?null:g}function en(e,t){var n=t||{},r=n.mirror,o=r===void 0?new Pe:r,s=n.blockClass,l=s===void 0?"highlight-block":s,a=n.blockSelector,i=a===void 0?null:a,c=n.maskTextClass,p=c===void 0?"highlight-mask":c,d=n.maskTextSelector,m=d===void 0?null:d,u=n.inlineStylesheet,h=u===void 0?!0:u,f=n.inlineImages,S=f===void 0?!1:f,k=n.recordCanvas,O=k===void 0?!1:k,C=n.maskAllInputs,M=C===void 0?!1:C,b=n.maskTextFn,v=n.maskInputFn,W=n.slimDOM,E=W===void 0?!1:W,H=n.dataURLOptions,G=n.preserveWhiteSpace,L=n.onSerialize,J=n.onIframeLoad,z=n.iframeLoadTimeout,Q=n.onStylesheetLoad,V=n.stylesheetLoadTimeout,D=n.keepIframeSrcFn,ee=D===void 0?function(){return!1}:D,F=n.enableStrictPrivacy,X=F===void 0?!1:F,U=M===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:M===!1?{password:!0}:M,j=E===!0||E==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:E==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:E===!1?{}:E;return ne(e,{doc:e,mirror:o,blockClass:l,blockSelector:i,maskTextClass:p,maskTextSelector:m,skipChild:!1,inlineStylesheet:h,maskInputOptions:U,maskTextFn:b,maskInputFn:v,slimDOMOptions:j,dataURLOptions:H,inlineImages:S,recordCanvas:O,preserveWhiteSpace:G,onSerialize:L,onIframeLoad:J,iframeLoadTimeout:z,onStylesheetLoad:Q,stylesheetLoadTimeout:V,keepIframeSrcFn:ee,newlyAddedElement:!1,enableStrictPrivacy:X})}function Z(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
|
|
2
2
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
3
3
|
or you can use record.mirror to access the mirror instance during recording.`;let Ze={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&&(Ze=new Proxy(Ze,{get(e,t,n){return t==="map"&&console.error(se),Reflect.get(e,t,n)}}));function me(e,t,n={}){let r=null,o=0;return function(...s){const l=Date.now();!o&&n.leading===!1&&(o=l);const a=t-(l-o),i=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),o=l,e.apply(i,s)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(i,s)},a))}}function ke(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(l){setTimeout(()=>{n.set.call(this,l)},0),s&&s.set&&s.set.call(this,l)}}),()=>ke(e,t,s||{},!0)}function ie(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 Ue(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ye(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}const tn=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch{return!1}return!1};function Y(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(Ce(r,t,n))return!0;return!1}function nn(e,t){return t.getId(e)!==-1}function Ee(e,t){return t.getId(e)===he}function He(e,t){if(de(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?He(e.parentNode,t):!0:!0}function Xe(e){return Boolean(e.changedTouches)}function rn(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=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function Be(e,t){return Boolean(e.nodeName==="IFRAME"&&t.getMeta(e))}function Ke(e,t){return Boolean(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function $e(e){return Boolean(e?.shadowRoot)}var T=(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))(T||{}),A=(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))(A||{}),Ne=(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))(Ne||{}),le=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(le||{}),fe=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e))(fe||{}),on=(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))(on||{});function Je(e){return"__ln"in e}class an{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&&Je(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&&Je(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 Qe=(e,t)=>`${e}@${t}`;class sn{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 an,r=a=>{let i=a,c=he;for(;c===he;)i=i&&i.nextSibling,c=i&&this.mirror.getId(i);return c},o=a=>{var i,c,p,d,m;const u=a.getRootNode?(i=a.getRootNode())==null?void 0:i.host:null;let h=u;for(;(p=(c=h?.getRootNode)==null?void 0:c.call(h))!=null&&p.host;)h=((m=(d=h?.getRootNode)==null?void 0:d.call(h))==null?void 0:m.host)||null;const f=!this.doc.contains(a)&&(!h||!this.doc.contains(h));if(!a.parentNode||f)return;const S=de(a.parentNode)?this.mirror.getId(u):this.mirror.getId(a.parentNode),k=r(a);if(S===-1||k===-1)return n.addNode(a);const O=ne(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,enableStrictPrivacy:this.enableStrictPrivacy,onSerialize:C=>{Be(C,this.mirror)&&this.iframeManager.addIframe(C),Ke(C,this.mirror)&&this.stylesheetManager.addStylesheet(C),$e(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,document)},onIframeLoad:(C,M)=>{this.iframeManager.attachIframe(C,M,this.mirror),this.shadowDomManager.observeAttachShadow(C)},onStylesheetLoad:(C,M)=>{this.stylesheetManager.attachStylesheet(C,M,this.mirror)}});O&&t.push({parentId:S,nextId:k,node:O})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of Array.from(this.movedSet.values()))qe(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||o(a);for(const a of Array.from(this.addedSet.values()))!tt(this.droppedSet,a)&&!qe(this.removes,a,this.mirror)||tt(this.movedSet,a)?o(a):this.droppedSet.add(a);let s=null;for(;n.length;){let a=null;if(s){const i=this.mirror.getId(s.value.parentNode),c=r(s.value);i!==-1&&c!==-1&&(a=s)}if(!a)for(let i=n.length-1;i>=0;i--){const c=n.get(i);if(c){const p=this.mirror.getId(c.value.parentNode),d=r(c.value);if(p!==-1&&d!==-1){a=c;break}}}if(!a){for(;n.head;)n.removeNode(n.head.value);break}s=a.previous,n.removeNode(a.value),o(a.value)}const l={texts:this.texts.map(a=>{let i=a.value;return this.enableStrictPrivacy&&i&&(i=Oe(i)),{id:this.mirror.getId(a.node),value:i}}).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>({id:this.mirror.getId(a.node),attributes:a.attributes})).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(l))},this.processMutation=t=>{if(!Ee(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Y(t.target,this.blockClass,!1)&&n!==t.oldValue&&this.texts.push({value:ze(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=Te({maskInputOptions:this.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),Y(t.target,this.blockClass,!1)||r===t.oldValue)return;let o=this.attributes.find(s=>s.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 s=this.doc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});const l=o.attributes.style;for(const a of Array.from(n.style)){const i=n.style.getPropertyValue(a),c=n.style.getPropertyPriority(a);(i!==s.style.getPropertyValue(a)||c!==s.style.getPropertyPriority(a))&&(c===""?l[a]=i:l[a]=[i,c])}for(const a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(l[a]=!1)}else{if(t.target.tagName==="INPUT"){const s=t.target;if(s.type==="password"){o.attributes.value="*".repeat(s.value.length);break}}o.attributes[t.attributeName]=We(this.doc,n.tagName,t.attributeName,r)}break}case"childList":{if(Y(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=de(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Y(t.target,this.blockClass,!1)||Ee(n,this.mirror)||!nn(n,this.mirror)||(this.addedSet.has(n)?(Re(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||He(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Qe(r,o)]?Re(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:de(t.target)&&pe(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(this.mirror.hasNode(t)){if(Ee(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[Qe(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Y(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 Re(e,t){e.delete(t),t.childNodes.forEach(n=>Re(e,n))}function qe(e,t,n){return e.length===0?!1:et(e,t,n)}function et(e,t,n){const{parentNode:r}=t;if(!r)return!1;const o=n.getId(r);return e.some(s=>s.id===o)?!0:et(e,r,n)}function tt(e,t){return e.size===0?!1:nt(e,t)}function nt(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:nt(e,n):!1}var ln=Object.defineProperty,cn=Object.defineProperties,un=Object.getOwnPropertyDescriptors,rt=Object.getOwnPropertySymbols,dn=Object.prototype.hasOwnProperty,pn=Object.prototype.propertyIsEnumerable,ot=(e,t,n)=>t in e?ln(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,at=(e,t)=>{for(var n in t||(t={}))dn.call(t,n)&&ot(e,n,t[n]);if(rt)for(var n of rt(t))pn.call(t,n)&&ot(e,n,t[n]);return e},hn=(e,t)=>cn(e,un(t));const re=[],st=typeof CSSGroupingRule<"u",it=typeof CSSMediaRule<"u",lt=typeof CSSSupportsRule<"u",ct=typeof CSSConditionRule<"u";function ye(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 ut(e,t){var n,r;const o=new sn;re.push(o),o.init(e);let s=window.MutationObserver||window.__rrMutationObserver;const l=(r=(n=window?.Zone)==null?void 0:n.__symbol__)==null?void 0:r.call(n,"MutationObserver");l&&window[l]&&(s=window[l]);const a=new s(o.processMutations.bind(o));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function mn({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let l=[],a;const i=me(d=>{const m=Date.now()-a;e(l.map(u=>(u.timeOffset-=m,u)),d),l=[],a=null},s),c=me(d=>{const m=ye(d),{clientX:u,clientY:h}=Xe(d)?d.changedTouches[0]:d;a||(a=Date.now()),l.push({x:u,y:h,id:r.getId(m),timeOffset:Date.now()-a}),i(typeof DragEvent<"u"&&d instanceof DragEvent?A.Drag:d instanceof MouseEvent?A.MouseMove:A.TouchMove)},o,{trailing:!1}),p=[Z("mousemove",c,n),Z("touchmove",c,n),Z("drag",c,n)];return()=>{p.forEach(d=>d())}}function fn({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,l=[],a=i=>c=>{const p=ye(c);if(Y(p,r,!0)||tn(p))return;const d=Xe(c)?c.changedTouches[0]:c;if(!d)return;const m=n.getId(p),{clientX:u,clientY:h}=d;e({type:Ne[i],id:m,x:u,y:h})};return Object.keys(Ne).filter(i=>Number.isNaN(Number(i))&&!i.endsWith("_Departed")&&s[i]!==!1).forEach(i=>{const c=i.toLowerCase(),p=a(i);l.push(Z(c,p,t))}),()=>{l.forEach(i=>i())}}function dt({scrollCb:e,doc:t,mirror:n,blockClass:r,sampling:o}){const s=me(l=>{const a=ye(l);if(!a||Y(a,r,!0))return;const i=n.getId(a);if(a===t){const c=t.scrollingElement||t.documentElement;e({id:i,x:c.scrollLeft,y:c.scrollTop})}else e({id:i,x:a.scrollLeft,y:a.scrollTop})},o.scroll||100);return Z("scroll",s,t)}function yn({viewportResizeCb:e}){let t=-1,n=-1;const r=me(()=>{const o=Ue(),s=Ye();(t!==o||n!==s)&&(e({width:Number(s),height:Number(o)}),t=o,n=s)},200);return Z("resize",r,window)}function pt(e,t){const n=at({},e);return t||delete n.userTriggered,n}const vn=["INPUT","TEXTAREA","SELECT"],ht=new WeakMap;function gn({inputCb:e,doc:t,mirror:n,blockClass:r,ignoreClass:o,maskInputOptions:s,maskInputFn:l,sampling:a,userTriggeredOnInput:i}){function c(h){let f=ye(h);const S=h.isTrusted;if(f&&f.tagName==="OPTION"&&(f=f.parentElement),!f||!f.tagName||vn.indexOf(f.tagName)<0||Y(f,r,!0))return;const k=f.type;if(f.classList.contains(o))return;let O=f.value,C=!1;k==="radio"||k==="checkbox"?C=f.checked:(s[f.tagName.toLowerCase()]||s[k])&&(O=Te({maskInputOptions:s,tagName:f.tagName,type:k,value:O,maskInputFn:l})),p(f,pt({text:O,isChecked:C,userTriggered:S},i));const M=f.name;k==="radio"&&M&&C&&t.querySelectorAll(`input[type="radio"][name="${M}"]`).forEach(b=>{b!==f&&p(b,pt({text:b.value,isChecked:!C,userTriggered:!1},i))})}function p(h,f){const S=ht.get(h);if(!S||S.text!==f.text||S.isChecked!==f.isChecked){ht.set(h,f);const k=n.getId(h);e(hn(at({},f),{id:k}))}}const d=(a.input==="last"?["change"]:["input","change"]).map(h=>Z(h,c,t)),m=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),u=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return m&&m.set&&d.push(...u.map(h=>ke(h[0],h[1],{set(){c({target:this})}}))),()=>{d.forEach(h=>h())}}function Ie(e){const t=[];function n(r,o){if(st&&r.parentRule instanceof CSSGroupingRule||it&&r.parentRule instanceof CSSMediaRule||lt&&r.parentRule instanceof CSSSupportsRule||ct&&r.parentRule instanceof CSSConditionRule){const s=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(s)}else{const s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(s)}return o}return n(e,t)}function bn({styleSheetRuleCb:e,mirror:t},{win:n}){const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=function(a,i){const c=t.getId(this.ownerNode);return c!==-1&&e({id:c,adds:[{rule:a,index:i}]}),r.apply(this,[a,i])};const o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=function(a){const i=t.getId(this.ownerNode);return i!==-1&&e({id:i,removes:[{index:a}]}),o.apply(this,[a])};const s={};st?s.CSSGroupingRule=n.CSSGroupingRule:(it&&(s.CSSMediaRule=n.CSSMediaRule),ct&&(s.CSSConditionRule=n.CSSConditionRule),lt&&(s.CSSSupportsRule=n.CSSSupportsRule));const l={};return Object.entries(s).forEach(([a,i])=>{l[a]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=function(c,p){const d=t.getId(this.parentStyleSheet.ownerNode);return d!==-1&&e({id:d,adds:[{rule:c,index:[...Ie(this),p||0]}]}),l[a].insertRule.apply(this,[c,p])},i.prototype.deleteRule=function(c){const p=t.getId(this.parentStyleSheet.ownerNode);return p!==-1&&e({id:p,removes:[{index:[...Ie(this),c]}]}),l[a].deleteRule.apply(this,[c])}}),()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=o,Object.entries(s).forEach(([a,i])=>{i.prototype.insertRule=l[a].insertRule,i.prototype.deleteRule=l[a].deleteRule})}}function Sn({styleDeclarationCb:e,mirror:t},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=function(s,l,a){var i,c;const p=t.getId((c=(i=this.parentRule)==null?void 0:i.parentStyleSheet)==null?void 0:c.ownerNode);return p!==-1&&e({id:p,set:{property:s,value:l,priority:a},index:Ie(this.parentRule)}),r.apply(this,[s,l,a])};const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=function(s){var l,a;const i=t.getId((a=(l=this.parentRule)==null?void 0:l.parentStyleSheet)==null?void 0:a.ownerNode);return i!==-1&&e({id:i,remove:{property:s},index:Ie(this.parentRule)}),o.apply(this,[s])},()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=o}}function Cn({mediaInteractionCb:e,blockClass:t,mirror:n,sampling:r}){const o=l=>me(a=>{const i=ye(a);if(!i||Y(i,t,!0))return;const{currentTime:c,volume:p,muted:d}=i;e({type:l,id:n.getId(i),currentTime:c,volume:p,muted:d})},r.media||500),s=[Z("play",o(fe.Play)),Z("pause",o(fe.Pause)),Z("seeked",o(fe.Seeked)),Z("volumechange",o(fe.VolumeChange))];return()=>{s.forEach(l=>l())}}function kn({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(a,i,c){const p=new s(a,i,c);return o.set(p,{family:a,buffer:typeof i!="string",descriptors:c,fontSource:typeof i=="string"?i:JSON.stringify(Array.from(new Uint8Array(i)))}),p};const l=ie(t.fonts,"add",function(a){return function(i){return setTimeout(()=>{const c=o.get(i);c&&(e(c),o.delete(i))},0),a.apply(this,[i])}});return r.push(()=>{n.FontFace=s}),r.push(l),()=>{r.forEach(a=>a())}}function In(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:s,viewportResizeCb:l,inputCb:a,mediaInteractionCb:i,styleSheetRuleCb:c,styleDeclarationCb:p,canvasMutationCb:d,fontCb:m}=e;e.mutationCb=(...u)=>{t.mutation&&t.mutation(...u),n(...u)},e.mousemoveCb=(...u)=>{t.mousemove&&t.mousemove(...u),r(...u)},e.mouseInteractionCb=(...u)=>{t.mouseInteraction&&t.mouseInteraction(...u),o(...u)},e.scrollCb=(...u)=>{t.scroll&&t.scroll(...u),s(...u)},e.viewportResizeCb=(...u)=>{t.viewportResize&&t.viewportResize(...u),l(...u)},e.inputCb=(...u)=>{t.input&&t.input(...u),a(...u)},e.mediaInteractionCb=(...u)=>{t.mediaInteaction&&t.mediaInteaction(...u),i(...u)},e.styleSheetRuleCb=(...u)=>{t.styleSheetRule&&t.styleSheetRule(...u),c(...u)},e.styleDeclarationCb=(...u)=>{t.styleDeclaration&&t.styleDeclaration(...u),p(...u)},e.canvasMutationCb=(...u)=>{t.canvasMutation&&t.canvasMutation(...u),d(...u)},e.fontCb=(...u)=>{t.font&&t.font(...u),m(...u)}}function wn(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};In(e,t);const r=ut(e,e.doc),o=mn(e),s=fn(e),l=dt(e),a=yn(e),i=gn(e),c=Cn(e),p=bn(e,{win:n}),d=Sn(e,{win:n}),m=e.collectFonts?kn(e):()=>{},u=[];for(const h of e.plugins)u.push(h.observer(h.callback,n,h.options));return()=>{re.forEach(h=>h.reset()),r.disconnect(),o(),s(),l(),a(),i(),c(),p(),d(),m(),u.forEach(h=>h())}}class Mn{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 Tn=Object.defineProperty,On=Object.defineProperties,xn=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,Ln=Object.prototype.hasOwnProperty,En=Object.prototype.propertyIsEnumerable,ft=(e,t,n)=>t in e?Tn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yt=(e,t)=>{for(var n in t||(t={}))Ln.call(t,n)&&ft(e,n,t[n]);if(mt)for(var n of mt(t))En.call(t,n)&&ft(e,n,t[n]);return e},vt=(e,t)=>On(e,xn(t));class Nn{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(ie(HTMLElement.prototype,"attachShadow",function(r){return function(o){const s=r.call(this,o);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),s}}))}addShadowRoot(t,n){!pe(t)||(ut(vt(yt({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),dt(vt(yt({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror})))}observeAttachShadow(t){if(t.contentWindow){const n=this;this.restorePatches.push(ie(t.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(o){const s=r.call(this,o);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,t.contentDocument),s}}))}}reset(){this.restorePatches.forEach(t=>t())}}for(var ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Rn=typeof Uint8Array>"u"?[]:new Uint8Array(256),we=0;we<ce.length;we++)Rn[ce.charCodeAt(we)]=we;var Dn=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=ce[t[n]>>2],o+=ce[(t[n]&3)<<4|t[n+1]>>4],o+=ce[(t[n+1]&15)<<2|t[n+2]>>6],o+=ce[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};const gt=new Map;function Fn(e,t){let n=gt.get(e);return n||(n=new Map,gt.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const bt=(e,t,n)=>{if(!e||!(Ct(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=Fn(n,r);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function Me(e,t,n){if(e instanceof Array)return e.map(r=>Me(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=Dn(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Me(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:[Me(e.data,t,n),e.width,e.height]};if(Ct(e,t)||typeof e=="object"){const r=e.constructor.name,o=bt(e,t,n);return{rr_type:r,index:o}}}}return e}const St=(e,t,n)=>[...e].map(r=>Me(r,t,n)),Ct=(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 Pn(e,t,n,r){const o=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const l of s)try{if(typeof t.CanvasRenderingContext2D.prototype[l]!="function")continue;const a=ie(t.CanvasRenderingContext2D.prototype,l,function(i){return function(...c){return Y(this.canvas,n,!0)||setTimeout(()=>{const p=St([...c],t,this);e(this.canvas,{type:le["2D"],property:l,args:p})},0),i.apply(this,c)}});o.push(a)}catch{const i=ke(t.CanvasRenderingContext2D.prototype,l,{set(c){e(this.canvas,{type:le["2D"],property:l,args:[c],setter:!0})}});o.push(i)}return()=>{o.forEach(l=>l())}}function kt(e,t){const n=[];try{const r=ie(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(s,...l){return Y(this,t,!0)||"__context"in this||(this.__context=s),o.apply(this,[s,...l])}});n.push(r)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(r=>r())}}function It(e,t,n,r,o,s){const l=[],a=Object.getOwnPropertyNames(e);for(const i of a)try{if(typeof e[i]!="function")continue;const c=ie(e,i,function(p){return function(...d){const m=p.apply(this,d);if(bt(m,s,e),!Y(this.canvas,r,!0)){const u=St([...d],s,e),h={type:t,property:i,args:u};n(this.canvas,h)}return m}});l.push(c)}catch{const p=ke(e,i,{set(d){n(this.canvas,{type:t,property:i,args:[d],setter:!0})}});l.push(p)}return l}function An(e,t,n,r){const o=[];return o.push(...It(t.WebGLRenderingContext.prototype,le.WebGL,e,n,r,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...It(t.WebGL2RenderingContext.prototype,le.WebGL2,e,n,r,t)),()=>{o.forEach(s=>s())}}function _n(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,s=n.length;o<s;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}function Wn(e,t,n){var r=t===void 0?null:t,o=n===void 0?!1:n,s=_n(e,o),l=s.indexOf(`
|
|
4
4
|
`,10)+1,a=s.substring(l)+(r?"//# sourceMappingURL="+r:""),i=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(i)}function Gn(e,t,n){var r;return function(s){return r=r||Wn(e,t,n),new Worker(r,s)}}var zn=Gn("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixsPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylsW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgZD1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCx1PW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gcChzLGUpe2NvbnN0IG49YCR7c30tJHtlfWA7aWYodS5oYXMobikpcmV0dXJuIHUuZ2V0KG4pO2NvbnN0IGE9bmV3IE9mZnNjcmVlbkNhbnZhcyhzLGUpO2EuZ2V0Q29udGV4dCgiMmQiKTtjb25zdCB0PWF3YWl0KGF3YWl0IGEuY29udmVydFRvQmxvYigpKS5hcnJheUJ1ZmZlcigpLGc9ZCh0KTtyZXR1cm4gdS5zZXQobixnKSxnfWNvbnN0IGk9c2VsZjtpLm9ubWVzc2FnZT1hc3luYyBmdW5jdGlvbihzKXtpZighKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcykpcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOnMuZGF0YS5pZH0pO2NvbnN0e2lkOmUsYml0bWFwOm4sd2lkdGg6YSxoZWlnaHQ6dH09cy5kYXRhLGc9cChhLHQpLGg9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2guZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCB3PWF3YWl0IGguY29udmVydFRvQmxvYigpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89ZChiKTtpZighYy5oYXMoZSkmJmF3YWl0IGc9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX19KSgpOwoK",null,!1),wt=Object.getOwnPropertySymbols,Vn=Object.prototype.hasOwnProperty,jn=Object.prototype.propertyIsEnumerable,Zn=(e,t)=>{var n={};for(var r in e)Vn.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&wt)for(var r of wt(e))t.indexOf(r)<0&&jn.call(e,r)&&(n[r]=e[r]);return n},Un=(e,t,n)=>new Promise((r,o)=>{var s=i=>{try{a(n.next(i))}catch(c){o(c)}},l=i=>{try{a(n.throw(i))}catch(c){o(c)}},a=i=>i.done?r(i.value):Promise.resolve(i.value).then(s,l);a((n=n.apply(e,t)).next())});class Yn{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(l,a)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(a)};const{sampling:n="all",win:r,blockClass:o,recordCanvas:s}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&n==="all"&&this.initCanvasMutationObserver(r,o),s&&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=kt(n,r),s=new Map,l=new zn;l.onmessage=d=>{const{id:m}=d.data;if(s.set(m,!1),!("base64"in d.data))return;const{base64:u,type:h,width:f,height:S}=d.data;this.mutationCb({id:m,type:le["2D"],commands:[{property:"clearRect",args:[0,0,f,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:u}],type:h}]},0,0]}]})};const a=1e3/t;let i=0,c;const p=d=>{if(i&&d-i<a){c=requestAnimationFrame(p);return}i=d,n.document.querySelectorAll(`canvas:not(.${r} *)`).forEach(m=>Un(this,null,function*(){var u;const h=this.mirror.getId(m);if(s.get(h))return;if(s.set(h,!0),["webgl","webgl2"].includes(m.__context)){const S=m.getContext(m.__context);((u=S?.getContextAttributes())==null?void 0:u.preserveDrawingBuffer)===!1&&S?.clear(S.COLOR_BUFFER_BIT)}if(m.width===0||m.height===0)return;const f=yield createImageBitmap(m);l.postMessage({id:h,bitmap:f,width:m.width,height:m.height},[f])})),c=requestAnimationFrame(p)};c=requestAnimationFrame(p),this.resetObservers=()=>{o(),cancelAnimationFrame(c)}}initCanvasMutationObserver(t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=kt(t,n),o=Pn(this.processMutation.bind(this),t,n,this.mirror),s=An(this.processMutation.bind(this),t,n,this.mirror);this.resetObservers=()=>{r(),o(),s()}}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(l=>Zn(l,["type"])),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(t)}}class Hn{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 Xn=Object.defineProperty,Bn=Object.defineProperties,Kn=Object.getOwnPropertyDescriptors,Mt=Object.getOwnPropertySymbols,$n=Object.prototype.hasOwnProperty,Jn=Object.prototype.propertyIsEnumerable,Tt=(e,t,n)=>t in e?Xn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K=(e,t)=>{for(var n in t||(t={}))$n.call(t,n)&&Tt(e,n,t[n]);if(Mt)for(var n of Mt(t))Jn.call(t,n)&&Tt(e,n,t[n]);return e},Qn=(e,t)=>Bn(e,Kn(t));function P(e){return Qn(K({},e),{timestamp:Date.now()})}let R,ve;const $=Nt();function ge(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="highlight-block",blockSelector:s=null,ignoreClass:l="highlight-ignore",maskTextClass:a="highlight-mask",maskTextSelector:i=null,inlineStylesheet:c=!0,maskAllInputs:p,maskInputOptions:d,slimDOMOptions:m,maskInputFn:u,maskTextFn:h=Oe,hooks:f,packFn:S,sampling:k={},mousemoveWait:O,recordCanvas:C=!1,userTriggeredOnInput:M=!1,collectFonts:b=!1,inlineImages:v=!1,plugins:W,keepIframeSrcFn:E=()=>!1,enableStrictPrivacy:H=!1}=e;if(!t)throw new Error("emit function is required");O!==void 0&&k.mousemove===void 0&&(k.mousemove=O),$.reset();const G=p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d!==void 0?d:{password:!0},L=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all"}:m||{};rn();let J,z=0;const Q=y=>{for(const g of W||[])g.eventProcessor&&(y=g.eventProcessor(y));return S&&(y=S(y)),y};R=(y,g)=>{var B;if(((B=re[0])==null?void 0:B.isFrozen())&&y.type!==T.FullSnapshot&&!(y.type===T.IncrementalSnapshot&&y.data.source===A.Mutation)&&re.forEach(_=>_.unfreeze()),t(Q(y),g),y.type===T.FullSnapshot)J=y,z=0;else if(y.type===T.IncrementalSnapshot){if(y.data.source===A.Mutation&&y.data.isAttachIframe)return;z++;const _=r&&z>=r,q=n&&y.timestamp-J.timestamp>n;(_||q)&&ve(!0)}};const V=y=>{R(P({type:T.IncrementalSnapshot,data:K({source:A.Mutation},y)}))},D=y=>R(P({type:T.IncrementalSnapshot,data:K({source:A.Scroll},y)})),ee=y=>R(P({type:T.IncrementalSnapshot,data:K({source:A.CanvasMutation},y)})),F=new Mn({mutationCb:V}),X=new Hn({mutationCb:V}),U=new Yn({recordCanvas:C,mutationCb:ee,win:window,blockClass:o,mirror:$,sampling:k.canvas}),j=new Nn({mutationCb:V,scrollCb:D,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:i,inlineStylesheet:c,maskInputOptions:G,maskTextFn:h,maskInputFn:u,recordCanvas:C,inlineImages:v,sampling:k,slimDOMOptions:L,iframeManager:F,stylesheetManager:X,canvasManager:U,keepIframeSrcFn:E,enableStrictPrivacy:H},mirror:$});ve=(y=!1)=>{var g,B,_,q;R(P({type:T.Meta,data:{href:window.location.href,width:Ye(),height:Ue()}}),y),re.forEach(x=>x.lock());const I=en(document,{mirror:$,blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:i,inlineStylesheet:c,maskAllInputs:G,maskTextFn:h,slimDOM:L,recordCanvas:C,inlineImages:v,enableStrictPrivacy:H,onSerialize:x=>{Be(x,$)&&F.addIframe(x),Ke(x,$)&&X.addStylesheet(x),$e(x)&&j.addShadowRoot(x.shadowRoot,document)},onIframeLoad:(x,oe)=>{F.attachIframe(x,oe,$),j.observeAttachShadow(x)},onStylesheetLoad:(x,oe)=>{X.attachStylesheet(x,oe,$)},keepIframeSrcFn:E});if(!I)return console.warn("Failed to snapshot the document");R(P({type:T.FullSnapshot,data:{node:I,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((B=(g=document?.body)==null?void 0:g.parentElement)==null?void 0:B.scrollLeft)||document?.body.scrollLeft||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((q=(_=document?.body)==null?void 0:_.parentElement)==null?void 0:q.scrollTop)||document?.body.scrollTop||0}}})),re.forEach(x=>x.unlock())};try{const y=[];y.push(Z("DOMContentLoaded",()=>{R(P({type:T.DomContentLoaded,data:{}}))}));const g=_=>{var q;return wn({mutationCb:V,mousemoveCb:(I,x)=>R(P({type:T.IncrementalSnapshot,data:{source:x,positions:I}})),mouseInteractionCb:I=>R(P({type:T.IncrementalSnapshot,data:K({source:A.MouseInteraction},I)})),scrollCb:D,viewportResizeCb:I=>R(P({type:T.IncrementalSnapshot,data:K({source:A.ViewportResize},I)})),inputCb:I=>R(P({type:T.IncrementalSnapshot,data:K({source:A.Input},I)})),mediaInteractionCb:I=>R(P({type:T.IncrementalSnapshot,data:K({source:A.MediaInteraction},I)})),styleSheetRuleCb:I=>R(P({type:T.IncrementalSnapshot,data:K({source:A.StyleSheetRule},I)})),styleDeclarationCb:I=>R(P({type:T.IncrementalSnapshot,data:K({source:A.StyleDeclaration},I)})),canvasMutationCb:ee,fontCb:I=>R(P({type:T.IncrementalSnapshot,data:K({source:A.Font},I)})),blockClass:o,ignoreClass:l,maskTextClass:a,maskTextSelector:i,maskInputOptions:G,inlineStylesheet:c,sampling:k,recordCanvas:C,inlineImages:v,userTriggeredOnInput:M,collectFonts:b,doc:_,maskInputFn:u,maskTextFn:h,keepIframeSrcFn:E,blockSelector:s,slimDOMOptions:L,mirror:$,iframeManager:F,stylesheetManager:X,shadowDomManager:j,canvasManager:U,enableStrictPrivacy:H,plugins:((q=W?.filter(I=>I.observer))==null?void 0:q.map(I=>({observer:I.observer,options:I.options,callback:x=>R(P({type:T.Plugin,data:{plugin:I.name,payload:x}}))})))||[]},f)};F.addLoadListener(_=>{y.push(g(_.contentDocument))});const B=()=>{ve(),y.push(g(document))};return document.readyState==="interactive"||document.readyState==="complete"?B():y.push(Z("load",()=>{R(P({type:T.Load,data:{}})),B()},window)),()=>{y.forEach(_=>_())}}catch(y){console.warn(y)}}return ge.addCustomEvent=(e,t)=>{!R||R(P({type:T.Custom,data:{tag:e,payload:t}}))},ge.freezePage=()=>{re.forEach(e=>e.freeze())},ge.takeFullSnapshot=e=>{if(!ve)throw new Error("please take full snapshot after start recording");ve(e)},ge.mirror=$,ge}();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var rrwebRecord=function(){"use strict";var N;(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"})(N||(N={}));function Et(e){return e.nodeType===e.ELEMENT_NODE}function de(e){var t=e?.host;return Boolean(t?.shadowRoot===e)}function pe(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}var Pe=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 Nt(){return new Pe}function Te(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,s=e.maskInputFn,l=o||"";return(t[n.toLowerCase()]||t[r])&&(s?l=s(l):l="*".repeat(l.length)),l}var Ae="__rrweb_original__";function Rt(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 s=t.getImageData,l=Ae in s?s[Ae]:s,a=new Uint32Array(l.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer);if(a.some(function(i){return i!==0}))return!1}return!0}function Oe(e){return e=e.replace(/[^ -~]+/g,""),e=e?.split(" ").map(function(t){return Math.random().toString(20).substr(2,t.length)}).join(" ")||"",e}var Dt=1,Ft=new RegExp("[^a-z0-9-_:]"),he=-2;function Pt(){return Dt++}function At(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return Ft.test(t)?"div":t}function xe(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(_t).join(""):null}catch{return null}}function _t(e){var t=e.cssText;if(Wt(e))try{t=xe(e.styleSheet)||t}catch{}return t}function Wt(e){return"styleSheet"in e}function Gt(e){return e.cssRules?Array.from(e.cssRules).map(function(t){return t.cssText||""}).join(""):""}function zt(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var ae,_e,Vt=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,jt=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Zt=/^(data:)([^,]*),(.*)/i;function be(e,t){return(e||"").replace(Vt,function(n,r,o,s,l,a){var i=o||l||a,c=r||s||"";if(!i)return n;if(!jt.test(i)||Zt.test(i))return"url(".concat(c).concat(i).concat(c,")");if(i[0]==="/")return"url(".concat(c).concat(zt(t)+i).concat(c,")");var p=t.split("/"),d=i.split("/");p.pop();for(var m=0,u=d;m<u.length;m++){var h=u[m];h!=="."&&(h===".."?p.pop():p.push(h))}return"url(".concat(c).concat(p.join("/")).concat(c,")")})}var Ut=/^[^ \t\n\r\u000c]+/,Yt=/^[, \t\n\r\u000c]+/;function Ht(e,t){if(t.trim()==="")return t;var n=0;function r(c){var p,d=c.exec(t.substring(n));return d?(p=d[0],n+=p.length,p):""}for(var o=[];r(Yt),!(n>=t.length);){var s=r(Ut);if(s.slice(-1)===",")s=Se(e,s.substring(0,s.length-1)),o.push(s);else{var l="";s=Se(e,s);for(var a=!1;;){var i=t.charAt(n);if(i===""){o.push((s+l).trim());break}else if(a)i===")"&&(a=!1);else if(i===","){n+=1,o.push((s+l).trim());break}else i==="("&&(a=!0);l+=i,n+=1}}}return o.join(", ")}function Se(e,t){if(!t||t.trim()==="")return t;var n=e.createElement("a");return n.href=t,n.href}function Xt(e){return Boolean(e.tagName==="svg"||e.ownerSVGElement)}function Le(){var e=document.createElement("a");return e.href="",e.href}function We(e,t,n,r){return n==="src"||n==="href"&&r&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r&&r[0]!=="#"||n==="background"&&r&&(t==="table"||t==="td"||t==="th")?Se(e,r):n==="srcset"&&r?Ht(e,r):n==="style"&&r?be(r,Le()):t==="object"&&n==="data"&&r?Se(e,r):r}function Ge(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 Ce(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?Ce(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?Ce(e.parentNode,t,n):!1}function ze(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(Ce(r,t,!0))return!0;return!!(n&&(r.matches(n)||r.closest(n)))}function Bt(e,t,n){var r=e.contentWindow;if(r){var o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){var l=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(l),o=!0,t()});return}var a="about:blank";if(r.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function Ve(e){return e.getAttribute("href")?e.sheet!==null:!0}function je(e,t,n){var r=!1,o;try{o=e.sheet}catch{return}if(!o){var s=setTimeout(function(){r||(t(),r=!0)},n);e.addEventListener("load",function(){clearTimeout(s),r=!0,t()})}}function Kt(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,s=t.blockSelector,l=t.maskTextClass,a=t.maskTextSelector,i=t.inlineStylesheet,c=t.maskInputOptions,p=c===void 0?{}:c,d=t.maskTextFn,m=t.maskInputFn,u=t.dataURLOptions,h=u===void 0?{}:u,f=t.inlineImages,S=t.recordCanvas,k=t.keepIframeSrcFn,O=t.newlyAddedElement,C=O===void 0?!1:O,M=t.enableStrictPrivacy,b=$t(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:N.Document,childNodes:[],compatMode:e.compatMode,rootId:b}:{type:N.Document,childNodes:[],rootId:b};case e.DOCUMENT_TYPE_NODE:return{type:N.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return Qt(e,{doc:n,blockClass:o,blockSelector:s,inlineStylesheet:i,maskInputOptions:p,maskInputFn:m,maskTextClass:l,dataURLOptions:h,inlineImages:f,recordCanvas:S,keepIframeSrcFn:k,newlyAddedElement:C,enableStrictPrivacy:M,rootId:b});case e.TEXT_NODE:return Jt(e,{maskTextClass:l,maskTextSelector:a,maskTextFn:d,enableStrictPrivacy:M,rootId:b});case e.CDATA_SECTION_NODE:return{type:N.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:N.Comment,textContent:e.textContent||"",rootId:b};default:return!1}}function $t(e,t){if(t.hasNode(e)){var n=t.getId(e);return n===1?void 0:n}}function Jt(e,t){var n,r=t.maskTextClass,o=t.maskTextSelector,s=t.maskTextFn,l=t.enableStrictPrivacy,a=t.rootId,i=e.parentNode&&e.parentNode.tagName,c=e.textContent,p=i==="STYLE"?!0:void 0,d=i==="SCRIPT"?!0:void 0,m=!1;if(p&&c){try{e.nextSibling||e.previousSibling||!((n=e.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(c=Gt(e.parentNode.sheet))}catch(h){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(h),e)}c=be(c,Le()),m=!0}if(d?(c="SCRIPT_PLACEHOLDER",m=!0):i==="NOSCRIPT"&&(c="",m=!0),!p&&!d&&c&&ze(e,r,o)&&(c=s?s(c):c.replace(/[\S]/g,"*")),l&&!m&&i){var u=new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]);!u.has(i)&&c&&(c=Oe(c))}return{type:N.Text,textContent:c||"",isStyle:p,rootId:a}}function Qt(e,t){for(var n=t.doc,r=t.blockClass,o=t.blockSelector,s=t.inlineStylesheet,l=t.maskInputOptions,a=l===void 0?{}:l,i=t.maskInputFn,c=t.maskTextClass,p=t.dataURLOptions,d=p===void 0?{}:p,m=t.inlineImages,u=t.recordCanvas,h=t.keepIframeSrcFn,f=t.newlyAddedElement,S=f===void 0?!1:f,k=t.enableStrictPrivacy,O=t.rootId,C=Ge(e,r,o),M=Ge(e,c,null),b=At(e),v={},W=e.attributes.length,E=0;E<W;E++){var H=e.attributes[E];v[H.name]=We(n,b,H.name,H.value)}if(b==="link"&&s){var G=Array.from(n.styleSheets).find(function(y){return y.href===e.href}),L=null;G&&(L=xe(G)),L&&(delete v.rel,delete v.href,v._cssText=be(L,G.href))}if(b==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var L=xe(e.sheet);L&&(v._cssText=be(L,Le()))}if(b==="input"||b==="textarea"||b==="select"){var J=e.value;v.type!=="radio"&&v.type!=="checkbox"&&v.type!=="submit"&&v.type!=="button"&&J?v.value=Te({type:v.type,tagName:b,value:J,maskInputOptions:a,maskInputFn:i}):e.checked&&(v.checked=e.checked)}if(b==="option"&&(e.selected&&!a.select?v.selected=!0:delete v.selected),b==="canvas"&&u){if(e.__context==="2d")Rt(e)||(v.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){var z=e.toDataURL(d.type,d.quality),Q=document.createElement("canvas");Q.width=e.width,Q.height=e.height;var V=Q.toDataURL(d.type,d.quality);z!==V&&(v.rr_dataURL=z)}}if(b==="img"&&m&&!C&&!M){ae||(ae=n.createElement("canvas"),_e=ae.getContext("2d"));var D=e,ee=D.crossOrigin;D.crossOrigin="anonymous";var F=function(){try{ae.width=D.naturalWidth,ae.height=D.naturalHeight,_e.drawImage(D,0,0),v.rr_dataURL=ae.toDataURL(d.type,d.quality)}catch(y){console.warn("Cannot inline img src=".concat(D.currentSrc,"! Error: ").concat(y))}ee?v.crossOrigin=ee:D.removeAttribute("crossorigin")};D.complete&&D.naturalWidth!==0?F():D.onload=F}if((b==="audio"||b==="video")&&(v.rr_mediaState=e.paused?"paused":"played",v.rr_mediaCurrentTime=e.currentTime),S||(e.scrollLeft&&(v.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(v.rr_scrollTop=e.scrollTop)),C||M||b==="img"&&k){var X=e.getBoundingClientRect(),U=X.width,j=X.height;v={class:v.class,rr_width:"".concat(U,"px"),rr_height:"".concat(j,"px")},k&&(C=!0)}return b==="iframe"&&!h(v.src)&&(e.contentDocument||(v.rr_src=v.src),delete v.src),{type:N.Element,tagName:b,attributes:v,childNodes:[],isSVG:Xt(e)||void 0,needBlock:C,needMask:M,rootId:O}}function w(e){return e===void 0?"":e.toLowerCase()}function qt(e,t){return!!(t.comment&&e.type===N.Comment||e.type===N.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 ne(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,s=t.blockSelector,l=t.maskTextClass,a=t.maskTextSelector,i=t.skipChild,c=i===void 0?!1:i,p=t.inlineStylesheet,d=p===void 0?!0:p,m=t.maskInputOptions,u=m===void 0?{}:m,h=t.maskTextFn,f=t.maskInputFn,S=t.slimDOMOptions,k=t.dataURLOptions,O=k===void 0?{}:k,C=t.inlineImages,M=C===void 0?!1:C,b=t.recordCanvas,v=b===void 0?!1:b,W=t.onSerialize,E=t.onIframeLoad,H=t.iframeLoadTimeout,G=H===void 0?5e3:H,L=t.onStylesheetLoad,J=t.stylesheetLoadTimeout,z=J===void 0?5e3:J,Q=t.keepIframeSrcFn,V=Q===void 0?function(){return!1}:Q,D=t.newlyAddedElement,ee=D===void 0?!1:D,F=t.enableStrictPrivacy,X=t.preserveWhiteSpace,U=X===void 0?!0:X,j=Kt(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,dataURLOptions:O,inlineImages:M,recordCanvas:v,keepIframeSrcFn:V,newlyAddedElement:ee,enableStrictPrivacy:F});if(!j)return console.warn(e,"not serialized"),null;var y;if(r.hasNode(e)?y=r.getId(e):qt(j,S)||!U&&j.type===N.Text&&!j.isStyle&&!j.textContent.replace(/^\s+|\s+$/gm,"").length?y=he:y=Pt(),y===he)return null;var g=Object.assign(j,{id:y});r.add(e,g),W&&W(e);var B=!c,_=F;if(g.type===N.Element){if(B=B&&!g.needBlock,_=F||!!g.needBlock||!!g.needMask,_&&g.tagName==="img"){var q=e.cloneNode();q.src="",r.add(q,g)}delete g.needBlock,delete g.needMask;var I=e.shadowRoot;I&&pe(I)&&(g.isShadowHost=!0)}if((g.type===N.Document||g.type===N.Element)&&B){S.headWhitespace&&g.type===N.Element&&g.tagName==="head"&&(U=!1);for(var x={doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:c,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:S,dataURLOptions:O,inlineImages:M,recordCanvas:v,preserveWhiteSpace:U,onSerialize:W,onIframeLoad:E,iframeLoadTimeout:G,onStylesheetLoad:L,stylesheetLoadTimeout:z,keepIframeSrcFn:V,enableStrictPrivacy:_},oe=0,Ot=Array.from(e.childNodes);oe<Ot.length;oe++){var De=Ot[oe],ue=ne(De,x);ue&&g.childNodes.push(ue)}if(Et(e)&&e.shadowRoot)for(var Fe=0,xt=Array.from(e.shadowRoot.childNodes);Fe<xt.length;Fe++){var De=xt[Fe],ue=ne(De,x);ue&&(pe(e.shadowRoot)&&(ue.isShadow=!0),g.childNodes.push(ue))}}return e.parentNode&&de(e.parentNode)&&pe(e.parentNode)&&(g.isShadow=!0),g.type===N.Element&&g.tagName==="iframe"&&Bt(e,function(){var te=e.contentDocument;if(te&&E){var Lt=ne(te,{doc:te,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:S,dataURLOptions:O,inlineImages:M,recordCanvas:v,preserveWhiteSpace:U,onSerialize:W,onIframeLoad:E,iframeLoadTimeout:G,onStylesheetLoad:L,stylesheetLoadTimeout:z,keepIframeSrcFn:V,enableStrictPrivacy:F});Lt&&E(e,Lt)}},G),g.type===N.Element&&g.tagName==="link"&&g.attributes.rel==="stylesheet"&&(je(e,function(){if(L){var te=ne(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:S,dataURLOptions:O,inlineImages:M,recordCanvas:v,preserveWhiteSpace:U,onSerialize:W,onIframeLoad:E,iframeLoadTimeout:G,onStylesheetLoad:L,stylesheetLoadTimeout:z,keepIframeSrcFn:V,enableStrictPrivacy:F});te&&L(e,te)}},z),Ve(e)===!1)||g.type===N.Element&&g.tagName==="link"&&g.attributes.rel==="stylesheet"&&(je(e,function(){if(L){var te=ne(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:S,dataURLOptions:O,inlineImages:M,recordCanvas:v,preserveWhiteSpace:U,onSerialize:W,onIframeLoad:E,iframeLoadTimeout:G,enableStrictPrivacy:F,onStylesheetLoad:L,stylesheetLoadTimeout:z,keepIframeSrcFn:V});te&&L(e,te)}},z),Ve(e)===!1)?null:g}function en(e,t){var n=t||{},r=n.mirror,o=r===void 0?new Pe:r,s=n.blockClass,l=s===void 0?"highlight-block":s,a=n.blockSelector,i=a===void 0?null:a,c=n.maskTextClass,p=c===void 0?"highlight-mask":c,d=n.maskTextSelector,m=d===void 0?null:d,u=n.inlineStylesheet,h=u===void 0?!0:u,f=n.inlineImages,S=f===void 0?!1:f,k=n.recordCanvas,O=k===void 0?!1:k,C=n.maskAllInputs,M=C===void 0?!1:C,b=n.maskTextFn,v=n.maskInputFn,W=n.slimDOM,E=W===void 0?!1:W,H=n.dataURLOptions,G=n.preserveWhiteSpace,L=n.onSerialize,J=n.onIframeLoad,z=n.iframeLoadTimeout,Q=n.onStylesheetLoad,V=n.stylesheetLoadTimeout,D=n.keepIframeSrcFn,ee=D===void 0?function(){return!1}:D,F=n.enableStrictPrivacy,X=F===void 0?!1:F,U=M===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:M===!1?{password:!0}:M,j=E===!0||E==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:E==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:E===!1?{}:E;return ne(e,{doc:e,mirror:o,blockClass:l,blockSelector:i,maskTextClass:p,maskTextSelector:m,skipChild:!1,inlineStylesheet:h,maskInputOptions:U,maskTextFn:b,maskInputFn:v,slimDOMOptions:j,dataURLOptions:H,inlineImages:S,recordCanvas:O,preserveWhiteSpace:G,onSerialize:L,onIframeLoad:J,iframeLoadTimeout:z,onStylesheetLoad:Q,stylesheetLoadTimeout:V,keepIframeSrcFn:ee,newlyAddedElement:!1,enableStrictPrivacy:X})}function Z(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 rrwebRecord=function(){"use strict";var N;(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"})(N||(N={}));function Et(e){return e.nodeType===e.ELEMENT_NODE}function de(e){var t=e?.host;return Boolean(t?.shadowRoot===e)}function pe(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}var Pe=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 Nt(){return new Pe}function Te(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,s=e.maskInputFn,l=o||"";return(t[n.toLowerCase()]||t[r])&&(s?l=s(l):l="*".repeat(l.length)),l}var Ae="__rrweb_original__";function Rt(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 s=t.getImageData,l=Ae in s?s[Ae]:s,a=new Uint32Array(l.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer);if(a.some(function(i){return i!==0}))return!1}return!0}function Oe(e){return e=e.replace(/[^ -~]+/g,""),e=e?.split(" ").map(function(t){return Math.random().toString(20).substr(2,t.length)}).join(" ")||"",e}var Dt=1,Ft=new RegExp("[^a-z0-9-_:]"),he=-2;function Pt(){return Dt++}function At(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return Ft.test(t)?"div":t}function xe(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(_t).join(""):null}catch{return null}}function _t(e){var t=e.cssText;if(Wt(e))try{t=xe(e.styleSheet)||t}catch{}return t}function Wt(e){return"styleSheet"in e}function Gt(e){return e.cssRules?Array.from(e.cssRules).map(function(t){return t.cssText||""}).join(""):""}function zt(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var ae,_e,Vt=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,jt=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Zt=/^(data:)([^,]*),(.*)/i;function be(e,t){return(e||"").replace(Vt,function(n,r,o,s,l,a){var i=o||l||a,c=r||s||"";if(!i)return n;if(!jt.test(i)||Zt.test(i))return"url(".concat(c).concat(i).concat(c,")");if(i[0]==="/")return"url(".concat(c).concat(zt(t)+i).concat(c,")");var p=t.split("/"),d=i.split("/");p.pop();for(var m=0,u=d;m<u.length;m++){var h=u[m];h!=="."&&(h===".."?p.pop():p.push(h))}return"url(".concat(c).concat(p.join("/")).concat(c,")")})}var Ut=/^[^ \t\n\r\u000c]+/,Yt=/^[, \t\n\r\u000c]+/;function Ht(e,t){if(t.trim()==="")return t;var n=0;function r(c){var p,d=c.exec(t.substring(n));return d?(p=d[0],n+=p.length,p):""}for(var o=[];r(Yt),!(n>=t.length);){var s=r(Ut);if(s.slice(-1)===",")s=Se(e,s.substring(0,s.length-1)),o.push(s);else{var l="";s=Se(e,s);for(var a=!1;;){var i=t.charAt(n);if(i===""){o.push((s+l).trim());break}else if(a)i===")"&&(a=!1);else if(i===","){n+=1,o.push((s+l).trim());break}else i==="("&&(a=!0);l+=i,n+=1}}}return o.join(", ")}function Se(e,t){if(!t||t.trim()==="")return t;var n=e.createElement("a");return n.href=t,n.href}function Xt(e){return Boolean(e.tagName==="svg"||e.ownerSVGElement)}function Le(){var e=document.createElement("a");return e.href="",e.href}function We(e,t,n,r){return n==="src"||n==="href"&&r&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r&&r[0]!=="#"||n==="background"&&r&&(t==="table"||t==="td"||t==="th")?Se(e,r):n==="srcset"&&r?Ht(e,r):n==="style"&&r?be(r,Le()):t==="object"&&n==="data"&&r?Se(e,r):r}function Ge(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 Ce(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?Ce(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?Ce(e.parentNode,t,n):!1}function ze(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(Ce(r,t,!0))return!0;return!!(n&&(r.matches(n)||r.closest(n)))}function Bt(e,t,n){var r=e.contentWindow;if(r){var o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){var l=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(l),o=!0,t()});return}var a="about:blank";if(r.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function Ve(e){return e.getAttribute("href")?e.sheet!==null:!0}function je(e,t,n){var r=!1,o;try{o=e.sheet}catch{return}if(!o){var s=setTimeout(function(){r||(t(),r=!0)},n);e.addEventListener("load",function(){clearTimeout(s),r=!0,t()})}}function Kt(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,s=t.blockSelector,l=t.maskTextClass,a=t.maskTextSelector,i=t.inlineStylesheet,c=t.maskInputOptions,p=c===void 0?{}:c,d=t.maskTextFn,m=t.maskInputFn,u=t.dataURLOptions,h=u===void 0?{}:u,f=t.inlineImages,S=t.recordCanvas,k=t.keepIframeSrcFn,O=t.newlyAddedElement,C=O===void 0?!1:O,M=t.enableStrictPrivacy,b=$t(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:N.Document,childNodes:[],compatMode:e.compatMode,rootId:b}:{type:N.Document,childNodes:[],rootId:b};case e.DOCUMENT_TYPE_NODE:return{type:N.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return Qt(e,{doc:n,blockClass:o,blockSelector:s,inlineStylesheet:i,maskInputOptions:p,maskInputFn:m,maskTextClass:l,dataURLOptions:h,inlineImages:f,recordCanvas:S,keepIframeSrcFn:k,newlyAddedElement:C,enableStrictPrivacy:M,rootId:b});case e.TEXT_NODE:return Jt(e,{maskTextClass:l,maskTextSelector:a,maskTextFn:d,enableStrictPrivacy:M,rootId:b});case e.CDATA_SECTION_NODE:return{type:N.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:N.Comment,textContent:e.textContent||"",rootId:b};default:return!1}}function $t(e,t){if(t.hasNode(e)){var n=t.getId(e);return n===1?void 0:n}}function Jt(e,t){var n,r=t.maskTextClass,o=t.maskTextSelector,s=t.maskTextFn,l=t.enableStrictPrivacy,a=t.rootId,i=e.parentNode&&e.parentNode.tagName,c=e.textContent,p=i==="STYLE"?!0:void 0,d=i==="SCRIPT"?!0:void 0,m=!1;if(p&&c){try{e.nextSibling||e.previousSibling||!((n=e.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(c=Gt(e.parentNode.sheet))}catch(h){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(h),e)}c=be(c,Le()),m=!0}if(d?(c="SCRIPT_PLACEHOLDER",m=!0):i==="NOSCRIPT"&&(c="",m=!0),!p&&!d&&c&&ze(e,r,o)&&(c=s?s(c):c.replace(/[\S]/g,"*")),l&&!m&&i){var u=new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]);!u.has(i)&&c&&(c=Oe(c))}return{type:N.Text,textContent:c||"",isStyle:p,rootId:a}}function Qt(e,t){for(var n=t.doc,r=t.blockClass,o=t.blockSelector,s=t.inlineStylesheet,l=t.maskInputOptions,a=l===void 0?{}:l,i=t.maskInputFn,c=t.maskTextClass,p=t.dataURLOptions,d=p===void 0?{}:p,m=t.inlineImages,u=t.recordCanvas,h=t.keepIframeSrcFn,f=t.newlyAddedElement,S=f===void 0?!1:f,k=t.enableStrictPrivacy,O=t.rootId,C=Ge(e,r,o),M=Ge(e,c,null),b=At(e),v={},W=e.attributes.length,E=0;E<W;E++){var H=e.attributes[E];v[H.name]=We(n,b,H.name,H.value)}if(b==="link"&&s){var G=Array.from(n.styleSheets).find(function(y){return y.href===e.href}),L=null;G&&(L=xe(G)),L&&(delete v.rel,delete v.href,v._cssText=be(L,G.href))}if(b==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var L=xe(e.sheet);L&&(v._cssText=be(L,Le()))}if(b==="input"||b==="textarea"||b==="select"){var J=e.value;v.type!=="radio"&&v.type!=="checkbox"&&v.type!=="submit"&&v.type!=="button"&&J?v.value=Te({type:v.type,tagName:b,value:J,maskInputOptions:a,maskInputFn:i}):e.checked&&(v.checked=e.checked)}if(b==="option"&&(e.selected&&!a.select?v.selected=!0:delete v.selected),b==="canvas"&&u){if(e.__context==="2d")Rt(e)||(v.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){var z=e.toDataURL(d.type,d.quality),Q=document.createElement("canvas");Q.width=e.width,Q.height=e.height;var V=Q.toDataURL(d.type,d.quality);z!==V&&(v.rr_dataURL=z)}}if(b==="img"&&m&&!C&&!M&&!k){ae||(ae=n.createElement("canvas"),_e=ae.getContext("2d"));var D=e,ee=D.crossOrigin;D.crossOrigin="anonymous";var F=function(){try{ae.width=D.naturalWidth,ae.height=D.naturalHeight,_e.drawImage(D,0,0),v.rr_dataURL=ae.toDataURL(d.type,d.quality)}catch(y){console.warn("Cannot inline img src=".concat(D.currentSrc,"! Error: ").concat(y))}ee?v.crossOrigin=ee:D.removeAttribute("crossorigin")};D.complete&&D.naturalWidth!==0?F():D.onload=F}if((b==="audio"||b==="video")&&(v.rr_mediaState=e.paused?"paused":"played",v.rr_mediaCurrentTime=e.currentTime),S||(e.scrollLeft&&(v.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(v.rr_scrollTop=e.scrollTop)),C||M||b==="img"&&k){var X=e.getBoundingClientRect(),U=X.width,j=X.height;v={class:v.class,rr_width:"".concat(U,"px"),rr_height:"".concat(j,"px")},k&&(C=!0)}return b==="iframe"&&!h(v.src)&&(e.contentDocument||(v.rr_src=v.src),delete v.src),{type:N.Element,tagName:b,attributes:v,childNodes:[],isSVG:Xt(e)||void 0,needBlock:C,needMask:M,rootId:O}}function w(e){return e===void 0?"":e.toLowerCase()}function qt(e,t){return!!(t.comment&&e.type===N.Comment||e.type===N.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 ne(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,s=t.blockSelector,l=t.maskTextClass,a=t.maskTextSelector,i=t.skipChild,c=i===void 0?!1:i,p=t.inlineStylesheet,d=p===void 0?!0:p,m=t.maskInputOptions,u=m===void 0?{}:m,h=t.maskTextFn,f=t.maskInputFn,S=t.slimDOMOptions,k=t.dataURLOptions,O=k===void 0?{}:k,C=t.inlineImages,M=C===void 0?!1:C,b=t.recordCanvas,v=b===void 0?!1:b,W=t.onSerialize,E=t.onIframeLoad,H=t.iframeLoadTimeout,G=H===void 0?5e3:H,L=t.onStylesheetLoad,J=t.stylesheetLoadTimeout,z=J===void 0?5e3:J,Q=t.keepIframeSrcFn,V=Q===void 0?function(){return!1}:Q,D=t.newlyAddedElement,ee=D===void 0?!1:D,F=t.enableStrictPrivacy,X=t.preserveWhiteSpace,U=X===void 0?!0:X,j=Kt(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,dataURLOptions:O,inlineImages:M,recordCanvas:v,keepIframeSrcFn:V,newlyAddedElement:ee,enableStrictPrivacy:F});if(!j)return console.warn(e,"not serialized"),null;var y;if(r.hasNode(e)?y=r.getId(e):qt(j,S)||!U&&j.type===N.Text&&!j.isStyle&&!j.textContent.replace(/^\s+|\s+$/gm,"").length?y=he:y=Pt(),y===he)return null;var g=Object.assign(j,{id:y});r.add(e,g),W&&W(e);var B=!c,_=F;if(g.type===N.Element){if(B=B&&!g.needBlock,_=F||!!g.needBlock||!!g.needMask,_&&g.tagName==="img"){var q=e.cloneNode();q.src="",r.add(q,g)}delete g.needBlock,delete g.needMask;var I=e.shadowRoot;I&&pe(I)&&(g.isShadowHost=!0)}if((g.type===N.Document||g.type===N.Element)&&B){S.headWhitespace&&g.type===N.Element&&g.tagName==="head"&&(U=!1);for(var x={doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:c,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:S,dataURLOptions:O,inlineImages:M,recordCanvas:v,preserveWhiteSpace:U,onSerialize:W,onIframeLoad:E,iframeLoadTimeout:G,onStylesheetLoad:L,stylesheetLoadTimeout:z,keepIframeSrcFn:V,enableStrictPrivacy:_},oe=0,Ot=Array.from(e.childNodes);oe<Ot.length;oe++){var De=Ot[oe],ue=ne(De,x);ue&&g.childNodes.push(ue)}if(Et(e)&&e.shadowRoot)for(var Fe=0,xt=Array.from(e.shadowRoot.childNodes);Fe<xt.length;Fe++){var De=xt[Fe],ue=ne(De,x);ue&&(pe(e.shadowRoot)&&(ue.isShadow=!0),g.childNodes.push(ue))}}return e.parentNode&&de(e.parentNode)&&pe(e.parentNode)&&(g.isShadow=!0),g.type===N.Element&&g.tagName==="iframe"&&Bt(e,function(){var te=e.contentDocument;if(te&&E){var Lt=ne(te,{doc:te,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:S,dataURLOptions:O,inlineImages:M,recordCanvas:v,preserveWhiteSpace:U,onSerialize:W,onIframeLoad:E,iframeLoadTimeout:G,onStylesheetLoad:L,stylesheetLoadTimeout:z,keepIframeSrcFn:V,enableStrictPrivacy:F});Lt&&E(e,Lt)}},G),g.type===N.Element&&g.tagName==="link"&&g.attributes.rel==="stylesheet"&&(je(e,function(){if(L){var te=ne(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:S,dataURLOptions:O,inlineImages:M,recordCanvas:v,preserveWhiteSpace:U,onSerialize:W,onIframeLoad:E,iframeLoadTimeout:G,onStylesheetLoad:L,stylesheetLoadTimeout:z,keepIframeSrcFn:V,enableStrictPrivacy:F});te&&L(e,te)}},z),Ve(e)===!1)||g.type===N.Element&&g.tagName==="link"&&g.attributes.rel==="stylesheet"&&(je(e,function(){if(L){var te=ne(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:S,dataURLOptions:O,inlineImages:M,recordCanvas:v,preserveWhiteSpace:U,onSerialize:W,onIframeLoad:E,iframeLoadTimeout:G,enableStrictPrivacy:F,onStylesheetLoad:L,stylesheetLoadTimeout:z,keepIframeSrcFn:V});te&&L(e,te)}},z),Ve(e)===!1)?null:g}function en(e,t){var n=t||{},r=n.mirror,o=r===void 0?new Pe:r,s=n.blockClass,l=s===void 0?"highlight-block":s,a=n.blockSelector,i=a===void 0?null:a,c=n.maskTextClass,p=c===void 0?"highlight-mask":c,d=n.maskTextSelector,m=d===void 0?null:d,u=n.inlineStylesheet,h=u===void 0?!0:u,f=n.inlineImages,S=f===void 0?!1:f,k=n.recordCanvas,O=k===void 0?!1:k,C=n.maskAllInputs,M=C===void 0?!1:C,b=n.maskTextFn,v=n.maskInputFn,W=n.slimDOM,E=W===void 0?!1:W,H=n.dataURLOptions,G=n.preserveWhiteSpace,L=n.onSerialize,J=n.onIframeLoad,z=n.iframeLoadTimeout,Q=n.onStylesheetLoad,V=n.stylesheetLoadTimeout,D=n.keepIframeSrcFn,ee=D===void 0?function(){return!1}:D,F=n.enableStrictPrivacy,X=F===void 0?!1:F,U=M===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:M===!1?{password:!0}:M,j=E===!0||E==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:E==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:E===!1?{}:E;return ne(e,{doc:e,mirror:o,blockClass:l,blockSelector:i,maskTextClass:p,maskTextSelector:m,skipChild:!1,inlineStylesheet:h,maskInputOptions:U,maskTextFn:b,maskInputFn:v,slimDOMOptions:j,dataURLOptions:H,inlineImages:S,recordCanvas:O,preserveWhiteSpace:G,onSerialize:L,onIframeLoad:J,iframeLoadTimeout:z,onStylesheetLoad:Q,stylesheetLoadTimeout:V,keepIframeSrcFn:ee,newlyAddedElement:!1,enableStrictPrivacy:X})}function Z(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
|
|
2
2
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
3
3
|
or you can use record.mirror to access the mirror instance during recording.`;let Ze={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&&(Ze=new Proxy(Ze,{get(e,t,n){return t==="map"&&console.error(se),Reflect.get(e,t,n)}}));function me(e,t,n={}){let r=null,o=0;return function(...s){const l=Date.now();!o&&n.leading===!1&&(o=l);const a=t-(l-o),i=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),o=l,e.apply(i,s)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(i,s)},a))}}function ke(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(l){setTimeout(()=>{n.set.call(this,l)},0),s&&s.set&&s.set.call(this,l)}}),()=>ke(e,t,s||{},!0)}function ie(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 Ue(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ye(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}const tn=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch{return!1}return!1};function Y(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(Ce(r,t,n))return!0;return!1}function nn(e,t){return t.getId(e)!==-1}function Ee(e,t){return t.getId(e)===he}function He(e,t){if(de(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?He(e.parentNode,t):!0:!0}function Xe(e){return Boolean(e.changedTouches)}function rn(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=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function Be(e,t){return Boolean(e.nodeName==="IFRAME"&&t.getMeta(e))}function Ke(e,t){return Boolean(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function $e(e){return Boolean(e?.shadowRoot)}var T=(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))(T||{}),A=(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))(A||{}),Ne=(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))(Ne||{}),le=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(le||{}),fe=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e))(fe||{}),on=(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))(on||{});function Je(e){return"__ln"in e}class an{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&&Je(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&&Je(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 Qe=(e,t)=>`${e}@${t}`;class sn{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 an,r=a=>{let i=a,c=he;for(;c===he;)i=i&&i.nextSibling,c=i&&this.mirror.getId(i);return c},o=a=>{var i,c,p,d,m;const u=a.getRootNode?(i=a.getRootNode())==null?void 0:i.host:null;let h=u;for(;(p=(c=h?.getRootNode)==null?void 0:c.call(h))!=null&&p.host;)h=((m=(d=h?.getRootNode)==null?void 0:d.call(h))==null?void 0:m.host)||null;const f=!this.doc.contains(a)&&(!h||!this.doc.contains(h));if(!a.parentNode||f)return;const S=de(a.parentNode)?this.mirror.getId(u):this.mirror.getId(a.parentNode),k=r(a);if(S===-1||k===-1)return n.addNode(a);const O=ne(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,enableStrictPrivacy:this.enableStrictPrivacy,onSerialize:C=>{Be(C,this.mirror)&&this.iframeManager.addIframe(C),Ke(C,this.mirror)&&this.stylesheetManager.addStylesheet(C),$e(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,document)},onIframeLoad:(C,M)=>{this.iframeManager.attachIframe(C,M,this.mirror),this.shadowDomManager.observeAttachShadow(C)},onStylesheetLoad:(C,M)=>{this.stylesheetManager.attachStylesheet(C,M,this.mirror)}});O&&t.push({parentId:S,nextId:k,node:O})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of Array.from(this.movedSet.values()))qe(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||o(a);for(const a of Array.from(this.addedSet.values()))!tt(this.droppedSet,a)&&!qe(this.removes,a,this.mirror)||tt(this.movedSet,a)?o(a):this.droppedSet.add(a);let s=null;for(;n.length;){let a=null;if(s){const i=this.mirror.getId(s.value.parentNode),c=r(s.value);i!==-1&&c!==-1&&(a=s)}if(!a)for(let i=n.length-1;i>=0;i--){const c=n.get(i);if(c){const p=this.mirror.getId(c.value.parentNode),d=r(c.value);if(p!==-1&&d!==-1){a=c;break}}}if(!a){for(;n.head;)n.removeNode(n.head.value);break}s=a.previous,n.removeNode(a.value),o(a.value)}const l={texts:this.texts.map(a=>{let i=a.value;return this.enableStrictPrivacy&&i&&(i=Oe(i)),{id:this.mirror.getId(a.node),value:i}}).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>({id:this.mirror.getId(a.node),attributes:a.attributes})).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(l))},this.processMutation=t=>{if(!Ee(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Y(t.target,this.blockClass,!1)&&n!==t.oldValue&&this.texts.push({value:ze(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=Te({maskInputOptions:this.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),Y(t.target,this.blockClass,!1)||r===t.oldValue)return;let o=this.attributes.find(s=>s.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 s=this.doc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});const l=o.attributes.style;for(const a of Array.from(n.style)){const i=n.style.getPropertyValue(a),c=n.style.getPropertyPriority(a);(i!==s.style.getPropertyValue(a)||c!==s.style.getPropertyPriority(a))&&(c===""?l[a]=i:l[a]=[i,c])}for(const a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(l[a]=!1)}else{if(t.target.tagName==="INPUT"){const s=t.target;if(s.type==="password"){o.attributes.value="*".repeat(s.value.length);break}}o.attributes[t.attributeName]=We(this.doc,n.tagName,t.attributeName,r)}break}case"childList":{if(Y(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=de(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Y(t.target,this.blockClass,!1)||Ee(n,this.mirror)||!nn(n,this.mirror)||(this.addedSet.has(n)?(Re(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||He(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Qe(r,o)]?Re(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:de(t.target)&&pe(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(this.mirror.hasNode(t)){if(Ee(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[Qe(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Y(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 Re(e,t){e.delete(t),t.childNodes.forEach(n=>Re(e,n))}function qe(e,t,n){return e.length===0?!1:et(e,t,n)}function et(e,t,n){const{parentNode:r}=t;if(!r)return!1;const o=n.getId(r);return e.some(s=>s.id===o)?!0:et(e,r,n)}function tt(e,t){return e.size===0?!1:nt(e,t)}function nt(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:nt(e,n):!1}var ln=Object.defineProperty,cn=Object.defineProperties,un=Object.getOwnPropertyDescriptors,rt=Object.getOwnPropertySymbols,dn=Object.prototype.hasOwnProperty,pn=Object.prototype.propertyIsEnumerable,ot=(e,t,n)=>t in e?ln(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,at=(e,t)=>{for(var n in t||(t={}))dn.call(t,n)&&ot(e,n,t[n]);if(rt)for(var n of rt(t))pn.call(t,n)&&ot(e,n,t[n]);return e},hn=(e,t)=>cn(e,un(t));const re=[],st=typeof CSSGroupingRule<"u",it=typeof CSSMediaRule<"u",lt=typeof CSSSupportsRule<"u",ct=typeof CSSConditionRule<"u";function ye(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 ut(e,t){var n,r;const o=new sn;re.push(o),o.init(e);let s=window.MutationObserver||window.__rrMutationObserver;const l=(r=(n=window?.Zone)==null?void 0:n.__symbol__)==null?void 0:r.call(n,"MutationObserver");l&&window[l]&&(s=window[l]);const a=new s(o.processMutations.bind(o));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function mn({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let l=[],a;const i=me(d=>{const m=Date.now()-a;e(l.map(u=>(u.timeOffset-=m,u)),d),l=[],a=null},s),c=me(d=>{const m=ye(d),{clientX:u,clientY:h}=Xe(d)?d.changedTouches[0]:d;a||(a=Date.now()),l.push({x:u,y:h,id:r.getId(m),timeOffset:Date.now()-a}),i(typeof DragEvent<"u"&&d instanceof DragEvent?A.Drag:d instanceof MouseEvent?A.MouseMove:A.TouchMove)},o,{trailing:!1}),p=[Z("mousemove",c,n),Z("touchmove",c,n),Z("drag",c,n)];return()=>{p.forEach(d=>d())}}function fn({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,l=[],a=i=>c=>{const p=ye(c);if(Y(p,r,!0)||tn(p))return;const d=Xe(c)?c.changedTouches[0]:c;if(!d)return;const m=n.getId(p),{clientX:u,clientY:h}=d;e({type:Ne[i],id:m,x:u,y:h})};return Object.keys(Ne).filter(i=>Number.isNaN(Number(i))&&!i.endsWith("_Departed")&&s[i]!==!1).forEach(i=>{const c=i.toLowerCase(),p=a(i);l.push(Z(c,p,t))}),()=>{l.forEach(i=>i())}}function dt({scrollCb:e,doc:t,mirror:n,blockClass:r,sampling:o}){const s=me(l=>{const a=ye(l);if(!a||Y(a,r,!0))return;const i=n.getId(a);if(a===t){const c=t.scrollingElement||t.documentElement;e({id:i,x:c.scrollLeft,y:c.scrollTop})}else e({id:i,x:a.scrollLeft,y:a.scrollTop})},o.scroll||100);return Z("scroll",s,t)}function yn({viewportResizeCb:e}){let t=-1,n=-1;const r=me(()=>{const o=Ue(),s=Ye();(t!==o||n!==s)&&(e({width:Number(s),height:Number(o)}),t=o,n=s)},200);return Z("resize",r,window)}function pt(e,t){const n=at({},e);return t||delete n.userTriggered,n}const vn=["INPUT","TEXTAREA","SELECT"],ht=new WeakMap;function gn({inputCb:e,doc:t,mirror:n,blockClass:r,ignoreClass:o,maskInputOptions:s,maskInputFn:l,sampling:a,userTriggeredOnInput:i}){function c(h){let f=ye(h);const S=h.isTrusted;if(f&&f.tagName==="OPTION"&&(f=f.parentElement),!f||!f.tagName||vn.indexOf(f.tagName)<0||Y(f,r,!0))return;const k=f.type;if(f.classList.contains(o))return;let O=f.value,C=!1;k==="radio"||k==="checkbox"?C=f.checked:(s[f.tagName.toLowerCase()]||s[k])&&(O=Te({maskInputOptions:s,tagName:f.tagName,type:k,value:O,maskInputFn:l})),p(f,pt({text:O,isChecked:C,userTriggered:S},i));const M=f.name;k==="radio"&&M&&C&&t.querySelectorAll(`input[type="radio"][name="${M}"]`).forEach(b=>{b!==f&&p(b,pt({text:b.value,isChecked:!C,userTriggered:!1},i))})}function p(h,f){const S=ht.get(h);if(!S||S.text!==f.text||S.isChecked!==f.isChecked){ht.set(h,f);const k=n.getId(h);e(hn(at({},f),{id:k}))}}const d=(a.input==="last"?["change"]:["input","change"]).map(h=>Z(h,c,t)),m=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),u=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return m&&m.set&&d.push(...u.map(h=>ke(h[0],h[1],{set(){c({target:this})}}))),()=>{d.forEach(h=>h())}}function Ie(e){const t=[];function n(r,o){if(st&&r.parentRule instanceof CSSGroupingRule||it&&r.parentRule instanceof CSSMediaRule||lt&&r.parentRule instanceof CSSSupportsRule||ct&&r.parentRule instanceof CSSConditionRule){const s=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(s)}else{const s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(s)}return o}return n(e,t)}function bn({styleSheetRuleCb:e,mirror:t},{win:n}){const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=function(a,i){const c=t.getId(this.ownerNode);return c!==-1&&e({id:c,adds:[{rule:a,index:i}]}),r.apply(this,[a,i])};const o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=function(a){const i=t.getId(this.ownerNode);return i!==-1&&e({id:i,removes:[{index:a}]}),o.apply(this,[a])};const s={};st?s.CSSGroupingRule=n.CSSGroupingRule:(it&&(s.CSSMediaRule=n.CSSMediaRule),ct&&(s.CSSConditionRule=n.CSSConditionRule),lt&&(s.CSSSupportsRule=n.CSSSupportsRule));const l={};return Object.entries(s).forEach(([a,i])=>{l[a]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=function(c,p){const d=t.getId(this.parentStyleSheet.ownerNode);return d!==-1&&e({id:d,adds:[{rule:c,index:[...Ie(this),p||0]}]}),l[a].insertRule.apply(this,[c,p])},i.prototype.deleteRule=function(c){const p=t.getId(this.parentStyleSheet.ownerNode);return p!==-1&&e({id:p,removes:[{index:[...Ie(this),c]}]}),l[a].deleteRule.apply(this,[c])}}),()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=o,Object.entries(s).forEach(([a,i])=>{i.prototype.insertRule=l[a].insertRule,i.prototype.deleteRule=l[a].deleteRule})}}function Sn({styleDeclarationCb:e,mirror:t},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=function(s,l,a){var i,c;const p=t.getId((c=(i=this.parentRule)==null?void 0:i.parentStyleSheet)==null?void 0:c.ownerNode);return p!==-1&&e({id:p,set:{property:s,value:l,priority:a},index:Ie(this.parentRule)}),r.apply(this,[s,l,a])};const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=function(s){var l,a;const i=t.getId((a=(l=this.parentRule)==null?void 0:l.parentStyleSheet)==null?void 0:a.ownerNode);return i!==-1&&e({id:i,remove:{property:s},index:Ie(this.parentRule)}),o.apply(this,[s])},()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=o}}function Cn({mediaInteractionCb:e,blockClass:t,mirror:n,sampling:r}){const o=l=>me(a=>{const i=ye(a);if(!i||Y(i,t,!0))return;const{currentTime:c,volume:p,muted:d}=i;e({type:l,id:n.getId(i),currentTime:c,volume:p,muted:d})},r.media||500),s=[Z("play",o(fe.Play)),Z("pause",o(fe.Pause)),Z("seeked",o(fe.Seeked)),Z("volumechange",o(fe.VolumeChange))];return()=>{s.forEach(l=>l())}}function kn({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(a,i,c){const p=new s(a,i,c);return o.set(p,{family:a,buffer:typeof i!="string",descriptors:c,fontSource:typeof i=="string"?i:JSON.stringify(Array.from(new Uint8Array(i)))}),p};const l=ie(t.fonts,"add",function(a){return function(i){return setTimeout(()=>{const c=o.get(i);c&&(e(c),o.delete(i))},0),a.apply(this,[i])}});return r.push(()=>{n.FontFace=s}),r.push(l),()=>{r.forEach(a=>a())}}function In(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:s,viewportResizeCb:l,inputCb:a,mediaInteractionCb:i,styleSheetRuleCb:c,styleDeclarationCb:p,canvasMutationCb:d,fontCb:m}=e;e.mutationCb=(...u)=>{t.mutation&&t.mutation(...u),n(...u)},e.mousemoveCb=(...u)=>{t.mousemove&&t.mousemove(...u),r(...u)},e.mouseInteractionCb=(...u)=>{t.mouseInteraction&&t.mouseInteraction(...u),o(...u)},e.scrollCb=(...u)=>{t.scroll&&t.scroll(...u),s(...u)},e.viewportResizeCb=(...u)=>{t.viewportResize&&t.viewportResize(...u),l(...u)},e.inputCb=(...u)=>{t.input&&t.input(...u),a(...u)},e.mediaInteractionCb=(...u)=>{t.mediaInteaction&&t.mediaInteaction(...u),i(...u)},e.styleSheetRuleCb=(...u)=>{t.styleSheetRule&&t.styleSheetRule(...u),c(...u)},e.styleDeclarationCb=(...u)=>{t.styleDeclaration&&t.styleDeclaration(...u),p(...u)},e.canvasMutationCb=(...u)=>{t.canvasMutation&&t.canvasMutation(...u),d(...u)},e.fontCb=(...u)=>{t.font&&t.font(...u),m(...u)}}function wn(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};In(e,t);const r=ut(e,e.doc),o=mn(e),s=fn(e),l=dt(e),a=yn(e),i=gn(e),c=Cn(e),p=bn(e,{win:n}),d=Sn(e,{win:n}),m=e.collectFonts?kn(e):()=>{},u=[];for(const h of e.plugins)u.push(h.observer(h.callback,n,h.options));return()=>{re.forEach(h=>h.reset()),r.disconnect(),o(),s(),l(),a(),i(),c(),p(),d(),m(),u.forEach(h=>h())}}class Mn{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 Tn=Object.defineProperty,On=Object.defineProperties,xn=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,Ln=Object.prototype.hasOwnProperty,En=Object.prototype.propertyIsEnumerable,ft=(e,t,n)=>t in e?Tn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yt=(e,t)=>{for(var n in t||(t={}))Ln.call(t,n)&&ft(e,n,t[n]);if(mt)for(var n of mt(t))En.call(t,n)&&ft(e,n,t[n]);return e},vt=(e,t)=>On(e,xn(t));class Nn{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(ie(HTMLElement.prototype,"attachShadow",function(r){return function(o){const s=r.call(this,o);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),s}}))}addShadowRoot(t,n){!pe(t)||(ut(vt(yt({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),dt(vt(yt({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror})))}observeAttachShadow(t){if(t.contentWindow){const n=this;this.restorePatches.push(ie(t.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(o){const s=r.call(this,o);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,t.contentDocument),s}}))}}reset(){this.restorePatches.forEach(t=>t())}}for(var ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Rn=typeof Uint8Array>"u"?[]:new Uint8Array(256),we=0;we<ce.length;we++)Rn[ce.charCodeAt(we)]=we;var Dn=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=ce[t[n]>>2],o+=ce[(t[n]&3)<<4|t[n+1]>>4],o+=ce[(t[n+1]&15)<<2|t[n+2]>>6],o+=ce[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};const gt=new Map;function Fn(e,t){let n=gt.get(e);return n||(n=new Map,gt.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const bt=(e,t,n)=>{if(!e||!(Ct(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=Fn(n,r);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function Me(e,t,n){if(e instanceof Array)return e.map(r=>Me(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=Dn(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Me(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:[Me(e.data,t,n),e.width,e.height]};if(Ct(e,t)||typeof e=="object"){const r=e.constructor.name,o=bt(e,t,n);return{rr_type:r,index:o}}}}return e}const St=(e,t,n)=>[...e].map(r=>Me(r,t,n)),Ct=(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 Pn(e,t,n,r){const o=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const l of s)try{if(typeof t.CanvasRenderingContext2D.prototype[l]!="function")continue;const a=ie(t.CanvasRenderingContext2D.prototype,l,function(i){return function(...c){return Y(this.canvas,n,!0)||setTimeout(()=>{const p=St([...c],t,this);e(this.canvas,{type:le["2D"],property:l,args:p})},0),i.apply(this,c)}});o.push(a)}catch{const i=ke(t.CanvasRenderingContext2D.prototype,l,{set(c){e(this.canvas,{type:le["2D"],property:l,args:[c],setter:!0})}});o.push(i)}return()=>{o.forEach(l=>l())}}function kt(e,t){const n=[];try{const r=ie(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(s,...l){return Y(this,t,!0)||"__context"in this||(this.__context=s),o.apply(this,[s,...l])}});n.push(r)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(r=>r())}}function It(e,t,n,r,o,s){const l=[],a=Object.getOwnPropertyNames(e);for(const i of a)try{if(typeof e[i]!="function")continue;const c=ie(e,i,function(p){return function(...d){const m=p.apply(this,d);if(bt(m,s,e),!Y(this.canvas,r,!0)){const u=St([...d],s,e),h={type:t,property:i,args:u};n(this.canvas,h)}return m}});l.push(c)}catch{const p=ke(e,i,{set(d){n(this.canvas,{type:t,property:i,args:[d],setter:!0})}});l.push(p)}return l}function An(e,t,n,r){const o=[];return o.push(...It(t.WebGLRenderingContext.prototype,le.WebGL,e,n,r,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...It(t.WebGL2RenderingContext.prototype,le.WebGL2,e,n,r,t)),()=>{o.forEach(s=>s())}}function _n(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,s=n.length;o<s;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}function Wn(e,t,n){var r=t===void 0?null:t,o=n===void 0?!1:n,s=_n(e,o),l=s.indexOf(`
|
|
4
4
|
`,10)+1,a=s.substring(l)+(r?"//# sourceMappingURL="+r:""),i=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(i)}function Gn(e,t,n){var r;return function(s){return r=r||Wn(e,t,n),new Worker(r,s)}}var zn=Gn("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixsPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylsW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgZD1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCx1PW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gcChzLGUpe2NvbnN0IG49YCR7c30tJHtlfWA7aWYodS5oYXMobikpcmV0dXJuIHUuZ2V0KG4pO2NvbnN0IGE9bmV3IE9mZnNjcmVlbkNhbnZhcyhzLGUpO2EuZ2V0Q29udGV4dCgiMmQiKTtjb25zdCB0PWF3YWl0KGF3YWl0IGEuY29udmVydFRvQmxvYigpKS5hcnJheUJ1ZmZlcigpLGc9ZCh0KTtyZXR1cm4gdS5zZXQobixnKSxnfWNvbnN0IGk9c2VsZjtpLm9ubWVzc2FnZT1hc3luYyBmdW5jdGlvbihzKXtpZighKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcykpcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOnMuZGF0YS5pZH0pO2NvbnN0e2lkOmUsYml0bWFwOm4sd2lkdGg6YSxoZWlnaHQ6dH09cy5kYXRhLGc9cChhLHQpLGg9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2guZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCB3PWF3YWl0IGguY29udmVydFRvQmxvYigpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89ZChiKTtpZighYy5oYXMoZSkmJmF3YWl0IGc9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX19KSgpOwoK",null,!1),wt=Object.getOwnPropertySymbols,Vn=Object.prototype.hasOwnProperty,jn=Object.prototype.propertyIsEnumerable,Zn=(e,t)=>{var n={};for(var r in e)Vn.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&wt)for(var r of wt(e))t.indexOf(r)<0&&jn.call(e,r)&&(n[r]=e[r]);return n},Un=(e,t,n)=>new Promise((r,o)=>{var s=i=>{try{a(n.next(i))}catch(c){o(c)}},l=i=>{try{a(n.throw(i))}catch(c){o(c)}},a=i=>i.done?r(i.value):Promise.resolve(i.value).then(s,l);a((n=n.apply(e,t)).next())});class Yn{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(l,a)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(a)};const{sampling:n="all",win:r,blockClass:o,recordCanvas:s}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&n==="all"&&this.initCanvasMutationObserver(r,o),s&&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=kt(n,r),s=new Map,l=new zn;l.onmessage=d=>{const{id:m}=d.data;if(s.set(m,!1),!("base64"in d.data))return;const{base64:u,type:h,width:f,height:S}=d.data;this.mutationCb({id:m,type:le["2D"],commands:[{property:"clearRect",args:[0,0,f,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:u}],type:h}]},0,0]}]})};const a=1e3/t;let i=0,c;const p=d=>{if(i&&d-i<a){c=requestAnimationFrame(p);return}i=d,n.document.querySelectorAll(`canvas:not(.${r} *)`).forEach(m=>Un(this,null,function*(){var u;const h=this.mirror.getId(m);if(s.get(h))return;if(s.set(h,!0),["webgl","webgl2"].includes(m.__context)){const S=m.getContext(m.__context);((u=S?.getContextAttributes())==null?void 0:u.preserveDrawingBuffer)===!1&&S?.clear(S.COLOR_BUFFER_BIT)}if(m.width===0||m.height===0)return;const f=yield createImageBitmap(m);l.postMessage({id:h,bitmap:f,width:m.width,height:m.height},[f])})),c=requestAnimationFrame(p)};c=requestAnimationFrame(p),this.resetObservers=()=>{o(),cancelAnimationFrame(c)}}initCanvasMutationObserver(t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=kt(t,n),o=Pn(this.processMutation.bind(this),t,n,this.mirror),s=An(this.processMutation.bind(this),t,n,this.mirror);this.resetObservers=()=>{r(),o(),s()}}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(l=>Zn(l,["type"])),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(t)}}class Hn{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 Xn=Object.defineProperty,Bn=Object.defineProperties,Kn=Object.getOwnPropertyDescriptors,Mt=Object.getOwnPropertySymbols,$n=Object.prototype.hasOwnProperty,Jn=Object.prototype.propertyIsEnumerable,Tt=(e,t,n)=>t in e?Xn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K=(e,t)=>{for(var n in t||(t={}))$n.call(t,n)&&Tt(e,n,t[n]);if(Mt)for(var n of Mt(t))Jn.call(t,n)&&Tt(e,n,t[n]);return e},Qn=(e,t)=>Bn(e,Kn(t));function P(e){return Qn(K({},e),{timestamp:Date.now()})}let R,ve;const $=Nt();function ge(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="highlight-block",blockSelector:s=null,ignoreClass:l="highlight-ignore",maskTextClass:a="highlight-mask",maskTextSelector:i=null,inlineStylesheet:c=!0,maskAllInputs:p,maskInputOptions:d,slimDOMOptions:m,maskInputFn:u,maskTextFn:h=Oe,hooks:f,packFn:S,sampling:k={},mousemoveWait:O,recordCanvas:C=!1,userTriggeredOnInput:M=!1,collectFonts:b=!1,inlineImages:v=!1,plugins:W,keepIframeSrcFn:E=()=>!1,enableStrictPrivacy:H=!1}=e;if(!t)throw new Error("emit function is required");O!==void 0&&k.mousemove===void 0&&(k.mousemove=O),$.reset();const G=p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d!==void 0?d:{password:!0},L=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all"}:m||{};rn();let J,z=0;const Q=y=>{for(const g of W||[])g.eventProcessor&&(y=g.eventProcessor(y));return S&&(y=S(y)),y};R=(y,g)=>{var B;if(((B=re[0])==null?void 0:B.isFrozen())&&y.type!==T.FullSnapshot&&!(y.type===T.IncrementalSnapshot&&y.data.source===A.Mutation)&&re.forEach(_=>_.unfreeze()),t(Q(y),g),y.type===T.FullSnapshot)J=y,z=0;else if(y.type===T.IncrementalSnapshot){if(y.data.source===A.Mutation&&y.data.isAttachIframe)return;z++;const _=r&&z>=r,q=n&&y.timestamp-J.timestamp>n;(_||q)&&ve(!0)}};const V=y=>{R(P({type:T.IncrementalSnapshot,data:K({source:A.Mutation},y)}))},D=y=>R(P({type:T.IncrementalSnapshot,data:K({source:A.Scroll},y)})),ee=y=>R(P({type:T.IncrementalSnapshot,data:K({source:A.CanvasMutation},y)})),F=new Mn({mutationCb:V}),X=new Hn({mutationCb:V}),U=new Yn({recordCanvas:C,mutationCb:ee,win:window,blockClass:o,mirror:$,sampling:k.canvas}),j=new Nn({mutationCb:V,scrollCb:D,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:i,inlineStylesheet:c,maskInputOptions:G,maskTextFn:h,maskInputFn:u,recordCanvas:C,inlineImages:v,sampling:k,slimDOMOptions:L,iframeManager:F,stylesheetManager:X,canvasManager:U,keepIframeSrcFn:E,enableStrictPrivacy:H},mirror:$});ve=(y=!1)=>{var g,B,_,q;R(P({type:T.Meta,data:{href:window.location.href,width:Ye(),height:Ue()}}),y),re.forEach(x=>x.lock());const I=en(document,{mirror:$,blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:i,inlineStylesheet:c,maskAllInputs:G,maskTextFn:h,slimDOM:L,recordCanvas:C,inlineImages:v,enableStrictPrivacy:H,onSerialize:x=>{Be(x,$)&&F.addIframe(x),Ke(x,$)&&X.addStylesheet(x),$e(x)&&j.addShadowRoot(x.shadowRoot,document)},onIframeLoad:(x,oe)=>{F.attachIframe(x,oe,$),j.observeAttachShadow(x)},onStylesheetLoad:(x,oe)=>{X.attachStylesheet(x,oe,$)},keepIframeSrcFn:E});if(!I)return console.warn("Failed to snapshot the document");R(P({type:T.FullSnapshot,data:{node:I,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((B=(g=document?.body)==null?void 0:g.parentElement)==null?void 0:B.scrollLeft)||document?.body.scrollLeft||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((q=(_=document?.body)==null?void 0:_.parentElement)==null?void 0:q.scrollTop)||document?.body.scrollTop||0}}})),re.forEach(x=>x.unlock())};try{const y=[];y.push(Z("DOMContentLoaded",()=>{R(P({type:T.DomContentLoaded,data:{}}))}));const g=_=>{var q;return wn({mutationCb:V,mousemoveCb:(I,x)=>R(P({type:T.IncrementalSnapshot,data:{source:x,positions:I}})),mouseInteractionCb:I=>R(P({type:T.IncrementalSnapshot,data:K({source:A.MouseInteraction},I)})),scrollCb:D,viewportResizeCb:I=>R(P({type:T.IncrementalSnapshot,data:K({source:A.ViewportResize},I)})),inputCb:I=>R(P({type:T.IncrementalSnapshot,data:K({source:A.Input},I)})),mediaInteractionCb:I=>R(P({type:T.IncrementalSnapshot,data:K({source:A.MediaInteraction},I)})),styleSheetRuleCb:I=>R(P({type:T.IncrementalSnapshot,data:K({source:A.StyleSheetRule},I)})),styleDeclarationCb:I=>R(P({type:T.IncrementalSnapshot,data:K({source:A.StyleDeclaration},I)})),canvasMutationCb:ee,fontCb:I=>R(P({type:T.IncrementalSnapshot,data:K({source:A.Font},I)})),blockClass:o,ignoreClass:l,maskTextClass:a,maskTextSelector:i,maskInputOptions:G,inlineStylesheet:c,sampling:k,recordCanvas:C,inlineImages:v,userTriggeredOnInput:M,collectFonts:b,doc:_,maskInputFn:u,maskTextFn:h,keepIframeSrcFn:E,blockSelector:s,slimDOMOptions:L,mirror:$,iframeManager:F,stylesheetManager:X,shadowDomManager:j,canvasManager:U,enableStrictPrivacy:H,plugins:((q=W?.filter(I=>I.observer))==null?void 0:q.map(I=>({observer:I.observer,options:I.options,callback:x=>R(P({type:T.Plugin,data:{plugin:I.name,payload:x}}))})))||[]},f)};F.addLoadListener(_=>{y.push(g(_.contentDocument))});const B=()=>{ve(),y.push(g(document))};return document.readyState==="interactive"||document.readyState==="complete"?B():y.push(Z("load",()=>{R(P({type:T.Load,data:{}})),B()},window)),()=>{y.forEach(_=>_())}}catch(y){console.warn(y)}}return ge.addCustomEvent=(e,t)=>{!R||R(P({type:T.Custom,data:{tag:e,payload:t}}))},ge.freezePage=()=>{re.forEach(e=>e.freeze())},ge.takeFullSnapshot=e=>{if(!ve)throw new Error("please take full snapshot after start recording");ve(e)},ge.mirror=$,ge}();
|