posthog-js 1.211.0 → 1.211.2
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/all-external-dependencies.js +1 -1
- package/dist/all-external-dependencies.js.map +1 -1
- package/dist/array.full.es5.js +1 -1
- package/dist/array.full.es5.js.map +1 -1
- package/dist/array.full.js +1 -1
- package/dist/array.full.js.map +1 -1
- package/dist/array.full.no-external.js +1 -1
- package/dist/array.full.no-external.js.map +1 -1
- package/dist/array.js +1 -1
- package/dist/array.js.map +1 -1
- package/dist/array.no-external.js +1 -1
- package/dist/array.no-external.js.map +1 -1
- package/dist/customizations.full.js +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/module.full.js +1 -1
- package/dist/module.full.js.map +1 -1
- package/dist/module.full.no-external.js +1 -1
- package/dist/module.full.no-external.js.map +1 -1
- package/dist/module.js +1 -1
- package/dist/module.js.map +1 -1
- package/dist/module.no-external.js +1 -1
- package/dist/module.no-external.js.map +1 -1
- package/dist/recorder-v2.js +1 -1
- package/dist/recorder-v2.js.map +1 -1
- package/dist/recorder.js +1 -1
- package/dist/recorder.js.map +1 -1
- package/dist/src/posthog-surveys.d.ts +1 -0
- package/dist/surveys-preview.js +1 -1
- package/dist/surveys-preview.js.map +1 -1
- package/dist/surveys.js +1 -1
- package/dist/surveys.js.map +1 -1
- package/lib/package.json +6 -6
- package/lib/src/extensions/surveys.jsx +45 -0
- package/lib/src/extensions/surveys.jsx.map +1 -1
- package/lib/src/posthog-surveys.d.ts +1 -0
- package/lib/src/posthog-surveys.js +11 -6
- package/lib/src/posthog-surveys.js.map +1 -1
- package/package.json +6 -6
package/dist/recorder.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e){"use strict";function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function n(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var i=e.apply(t,r);function s(e){n(i,o,a,s,l,"next",e)}function l(e){n(i,o,a,s,l,"throw",e)}s(void 0)}))}}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s,l=["type"],c=Object.defineProperty,d=(e,t,r)=>((e,t,r)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),u=Object.defineProperty,h=(e,t,r)=>((e,t,r)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),p=(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",e))(p||{}),m={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},f={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]};var g={};function v(e){if(g[e])return g[e];var t=function(e){var t,r,n=null===globalThis||void 0===globalThis||null===(t=globalThis.Zone)||void 0===t||null===(r=t.__symbol__)||void 0===r?void 0:r.call(t,e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],r=t.prototype,n=e in m?m[e]:void 0,o=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),a=e in f?f[e]:void 0,i=Boolean(a&&a.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(o&&i)return g[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?g[e]=c:t.prototype}catch(e){return t.prototype}}var y={};function I(e,t,r){var n,o="".concat(e,".").concat(String(r));if(y[o])return y[o].call(t);var a=v(e),i=null==(n=Object.getOwnPropertyDescriptor(a,r))?void 0:n.get;return i?(y[o]=i,i.call(t)):t[r]}var b={};function C(e,t,r){var n="".concat(e,".").concat(String(r));if(b[n])return b[n].bind(t);var o=v(e)[r];return"function"!=typeof o?t[r]:(b[n]=o,o.bind(t))}var S={childNodes:function(e){return I("Node",e,"childNodes")},parentNode:function(e){return I("Node",e,"parentNode")},parentElement:function(e){return I("Node",e,"parentElement")},textContent:function(e){return I("Node",e,"textContent")},contains:function(e,t){return C("Node",e,"contains")(t)},getRootNode:function(e){return C("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?I("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?I("Element",e,"shadowRoot"):null},querySelector:function(e,t){return I("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return I("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return v("MutationObserver").constructor}};function w(e){return e.nodeType===e.ELEMENT_NODE}function N(e){var t=e&&"host"in e&&"mode"in e&&S.host(e)||null;return Boolean(t&&"shadowRoot"in t&&S.shadowRoot(t)===e)}function M(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function A(e){try{var t=e.rules||e.cssRules;if(!t)return null;var r=e.href;!r&&e.ownerNode&&e.ownerNode.ownerDocument&&(r=e.ownerNode.ownerDocument.location.href);var n=Array.from(t,(e=>k(e,r))).join("");return(o=n).includes(" background-clip: text;")&&!o.includes(" -webkit-background-clip: text;")&&(o=o.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),o}catch(e){return null}var o}function k(e,t){if(function(e){return"styleSheet"in e}(e)){var r;try{r=A(e.styleSheet)||function(e){var{cssText:t}=e;if(t.split('"').length<3)return t;var r=["@import","url(".concat(JSON.stringify(e.href),")")];return""===e.layerName?r.push("layer"):e.layerName&&r.push("layer(".concat(e.layerName,")")),e.supportsText&&r.push("supports(".concat(e.supportsText,")")),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(t){r=e.cssText}return e.styleSheet.href?Y(r,e.styleSheet.href):r}var n,o=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(n=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,o=o.replace(n,"$1\\$2")),t?Y(o,t):o}function T(e,t){return Array.from(e.styleSheets).find((e=>e.href===t))}let R=class{constructor(){h(this,"idNodeMap",new Map),h(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){var t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function E(e){var{element:t,maskInputOptions:r,tagName:n,type:o,value:a,maskInputFn:i}=e,s=a||"",l=o&&O(o);return(r[n.toLowerCase()]||l&&r[l])&&(s=i?i(s,t):"*".repeat(s.length)),s}function O(e){return e.toLowerCase()}var x="__rrweb_original__";function D(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?O(t):null}function L(e,t){var r,n;try{n=new URL(e,null!=t?t:window.location.href)}catch(e){return null}var o=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==o?void 0:o[1])&&void 0!==r?r:null}var F=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,B=/^(?:[a-z+]+:)?\/\//i,_=/^www\..*/i,Z=/^(data:)([^,]*),(.*)/i;function Y(e,t){return(e||"").replace(F,((e,r,n,o,a,i)=>{var s,l=n||a||i,c=r||o||"";if(!l)return e;if(B.test(l)||_.test(l))return"url(".concat(c).concat(l).concat(c,")");if(Z.test(l))return"url(".concat(c).concat(l).concat(c,")");if("/"===l[0])return"url(".concat(c).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+l)).concat(c,")");var d=t.split("/"),u=l.split("/");for(var h of(d.pop(),u))"."!==h&&(".."===h?d.pop():d.push(h));return"url(".concat(c).concat(d.join("/")).concat(c,")")}))}var W=new Map,G=new Map;function V(e){if(!W.has(e)){var t=e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"");W.set(e,t)}return W.get(e)}function H(e,t){return function(e,t){var r=Array.from(t.childNodes),n=[],o=0,a=e;if(r.length>1&&e&&"string"==typeof e){if(G.has(e))return G.get(e);for(var i=V(e),s=i.length/e.length,l=1;l<r.length;l++)if(r[l].textContent&&"string"==typeof r[l].textContent){for(var c=V(r[l].textContent),d=3;d<c.length&&(c[d].match(/[a-zA-Z0-9]/)||-1!==c.indexOf(c.substring(0,d),1));d++);for(;d<c.length;d++){var u=c.substring(0,d),h=i.split(u),p=-1;if(2===h.length?p=i.indexOf(u):h.length>2&&""===h[0]&&""!==r[l-1].textContent&&(p=i.indexOf(u,1)),-1!==p){for(var m=Math.floor(p/s);m>0&&m<e.length;){if((o+=1)>50*r.length)return n.push(e),n;var f=V(e.substring(0,m));if(f.length===p){n.push(e.substring(0,m)),e=e.substring(m),i=i.substring(p);break}f.length<p?m+=Math.max(1,Math.floor((p-f.length)/s)):m-=Math.max(1,Math.floor((f.length-p)*s))}break}}}}return n.push(e),a&&G.set(a,n),n}(e,t).join("/* rr_split */")}var P,X,j=1,z=new RegExp("[^a-z0-9-_:]"),K=-2;function J(){return j++}var U=/^[^ \t\n\r\u000c]+/,q=/^[, \t\n\r\u000c]+/;var Q=new WeakMap;function $(e,t){return t&&""!==t.trim()?te(e,t):t}function ee(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function te(e,t){var r=Q.get(e);if(r||(r=e.createElement("a"),Q.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function re(e,t,r,n){return n?"src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0]?$(e,n):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,o=e.exec(t.substring(r));return o?(n=o[0],r+=n.length,n):""}for(var o=[];n(q),!(r>=t.length);){var a=n(U);if(","===a.slice(-1))a=$(e,a.substring(0,a.length-1)),o.push(a);else{var i="";a=$(e,a);for(var s=!1;;){var l=t.charAt(r);if(""===l){o.push((a+i).trim());break}if(s)")"===l&&(s=!1);else{if(","===l){r+=1,o.push((a+i).trim());break}"("===l&&(s=!0)}i+=l,r+=1}}}return o.join(", ")}(e,n):"style"===r?Y(n,te(e)):"object"===t&&"data"===r?$(e,n):n:$(e,n):n}function ne(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function oe(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&oe(S.parentNode(e),t,r);for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}return!!r&&oe(S.parentNode(e),t,r)}function ae(e,t,r,n){var o;if(w(e)){if(o=e,!S.childNodes(o).length)return!1}else{if(null===S.parentElement(e))return!1;o=S.parentElement(e)}try{if("string"==typeof t){if(n){if(o.closest(".".concat(t)))return!0}else if(o.classList.contains(t))return!0}else if(oe(o,t,n))return!0;if(r)if(n){if(o.closest(r))return!0}else if(o.matches(r))return!0}catch(e){}return!1}function ie(e,t){var{doc:r,mirror:n,blockClass:o,blockSelector:a,needsMask:i,inlineStylesheet:s,maskInputOptions:l={},maskTextFn:c,maskInputFn:d,dataURLOptions:u={},inlineImages:h,recordCanvas:m,keepIframeSrcFn:f,newlyAddedElement:g=!1,cssCaptured:v=!1}=t,y=function(e,t){if(!t.hasNode(e))return;var r=t.getId(e);return 1===r?void 0:r}(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:p.Document,childNodes:[],compatMode:e.compatMode}:{type:p.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:p.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){for(var r,{doc:n,blockClass:o,blockSelector:a,inlineStylesheet:i,maskInputOptions:s={},maskInputFn:l,dataURLOptions:c={},inlineImages:d,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:m=!1,rootId:f}=t,g=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,o,a),v=function(e){if(e instanceof HTMLFormElement)return"form";var t=O(e.tagName);return z.test(t)?"div":t}(e),y={},I=e.attributes.length,b=0;b<I;b++){var C=e.attributes[b];ne(v,C.name,C.value)||(y[C.name]=re(n,v,O(C.name),C.value))}if("link"===v&&i){var S=e.href;if(S){var w=T(n,S);if(!w&&S.includes(".css"))w=T(n,window.location.origin+"/"+S.replace(window.location.href,""));var N=null;w&&(N=A(w)),N&&(delete y.rel,delete y.href,y._cssText=N)}}if("style"===v&&e.sheet){var M=A(e.sheet);M&&(e.childNodes.length>1&&(M=H(M,e)),y._cssText=M)}if("input"===v||"textarea"===v||"select"===v){var k=e.value,R=e.checked;"radio"!==y.type&&"checkbox"!==y.type&&"submit"!==y.type&&"button"!==y.type&&k?y.value=E({element:e,type:D(e),tagName:v,value:k,maskInputOptions:s,maskInputFn:l}):R&&(y.checked=R)}"option"===v&&(e.selected&&!s.select?y.selected=!0:delete y.selected);if("dialog"===v&&e.open)try{y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(e){y.rr_open_mode="modal",y.ph_rr_could_not_detect_modal=!0}if("canvas"===v&&u)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r<e.width;r+=50)for(var n=0;n<e.height;n+=50){var o=t.getImageData,a=x in o?o[x]:o;if(new Uint32Array(a.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(y.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){var L=e.toDataURL(c.type,c.quality),F=n.createElement("canvas");F.width=e.width,F.height=e.height,L!==F.toDataURL(c.type,c.quality)&&(y.rr_dataURL=L)}if("img"===v&&d){P||(P=n.createElement("canvas"),X=P.getContext("2d"));var B=e,_=B.currentSrc||B.getAttribute("src")||"<unknown-src>",Z=B.crossOrigin,Y=()=>{B.removeEventListener("load",Y);try{P.width=B.naturalWidth,P.height=B.naturalHeight,X.drawImage(B,0,0),y.rr_dataURL=P.toDataURL(c.type,c.quality)}catch(e){if("anonymous"!==B.crossOrigin)return B.crossOrigin="anonymous",void(B.complete&&0!==B.naturalWidth?Y():B.addEventListener("load",Y));console.warn("Cannot inline img src=".concat(_,"! Error: ").concat(e))}"anonymous"===B.crossOrigin&&(Z?y.crossOrigin=Z:B.removeAttribute("crossorigin"))};B.complete&&0!==B.naturalWidth?Y():B.addEventListener("load",Y)}if("audio"===v||"video"===v){var W=y;W.rr_mediaState=e.paused?"paused":"played",W.rr_mediaCurrentTime=e.currentTime,W.rr_mediaPlaybackRate=e.playbackRate,W.rr_mediaMuted=e.muted,W.rr_mediaLoop=e.loop,W.rr_mediaVolume=e.volume}m||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop));if(g){var{width:G,height:V}=e.getBoundingClientRect();y={class:y.class,rr_width:"".concat(G,"px"),rr_height:"".concat(V,"px")}}"iframe"!==v||h(y.src)||(e.contentDocument||(y.rr_src=y.src),delete y.src);try{customElements.get(v)&&(r=!0)}catch(e){}return{type:p.Element,tagName:v,attributes:y,childNodes:[],isSVG:ee(e)||void 0,needBlock:g,rootId:f,isCustom:r}}(e,{doc:r,blockClass:o,blockSelector:a,inlineStylesheet:s,maskInputOptions:l,maskInputFn:d,dataURLOptions:u,inlineImages:h,recordCanvas:m,keepIframeSrcFn:f,newlyAddedElement:g,rootId:y});case e.TEXT_NODE:return function(e,t){var{needsMask:r,maskTextFn:n,rootId:o,cssCaptured:a}=t,i=S.parentNode(e),s=i&&i.tagName,l="",c="STYLE"===s||void 0,d="SCRIPT"===s||void 0;d?l="SCRIPT_PLACEHOLDER":a||(l=S.textContent(e),c&&l&&(l=Y(l,te(t.doc))));!c&&!d&&l&&r&&(l=n?n(l,S.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:p.Text,textContent:l||"",rootId:o}}(e,{doc:r,needsMask:i,maskTextFn:c,rootId:y,cssCaptured:v});case e.CDATA_SECTION_NODE:return{type:p.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:p.Comment,textContent:S.textContent(e)||"",rootId:y};default:return!1}}function se(e){return null==e?"":e.toLowerCase()}function le(e,t){var{doc:r,mirror:n,blockClass:o,blockSelector:a,maskTextClass:i,maskTextSelector:s,skipChild:l=!1,inlineStylesheet:c=!0,maskInputOptions:d={},maskTextFn:u,maskInputFn:h,slimDOMOptions:m,dataURLOptions:f={},inlineImages:g=!1,recordCanvas:v=!1,onSerialize:y,onIframeLoad:I,iframeLoadTimeout:b=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:A=5e3,keepIframeSrcFn:k=(()=>!1),newlyAddedElement:T=!1,cssCaptured:R=!1}=t,{needsMask:E}=t,{preserveWhiteSpace:O=!0}=t;E||(E=ae(e,i,s,void 0===E));var x,D=ie(e,{doc:r,mirror:n,blockClass:o,blockSelector:a,needsMask:E,inlineStylesheet:c,maskInputOptions:d,maskTextFn:u,maskInputFn:h,dataURLOptions:f,inlineImages:g,recordCanvas:v,keepIframeSrcFn:k,newlyAddedElement:T,cssCaptured:R});if(!D)return console.warn(e,"not serialized"),null;x=n.hasNode(e)?n.getId(e):function(e,t){if(t.comment&&e.type===p.Comment)return!0;if(e.type===p.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===L(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(se(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===se(e.attributes.name)||"icon"===se(e.attributes.rel)||"apple-touch-icon"===se(e.attributes.rel)||"shortcut icon"===se(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&se(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(se(e.attributes.property).match(/^(og|twitter|fb):/)||se(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===se(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===se(e.attributes.name)||"googlebot"===se(e.attributes.name)||"bingbot"===se(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===se(e.attributes.name)||"generator"===se(e.attributes.name)||"framework"===se(e.attributes.name)||"publisher"===se(e.attributes.name)||"progid"===se(e.attributes.name)||se(e.attributes.property).match(/^article:/)||se(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===se(e.attributes.name)||"yandex-verification"===se(e.attributes.name)||"csrf-token"===se(e.attributes.name)||"p:domain_verify"===se(e.attributes.name)||"verify-v1"===se(e.attributes.name)||"verification"===se(e.attributes.name)||"shopify-checkout-api-token"===se(e.attributes.name)))return!0}}return!1}(D,m)||!O&&D.type===p.Text&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?K:J();var F=Object.assign(D,{id:x});if(n.add(e,F),x===K)return null;y&&y(e);var B=!l;if(F.type===p.Element){B=B&&!F.needBlock,delete F.needBlock;var _=S.shadowRoot(e);_&&M(_)&&(F.isShadowHost=!0)}if((F.type===p.Document||F.type===p.Element)&&B){m.headWhitespace&&F.type===p.Element&&"head"===F.tagName&&(O=!1);var Z={doc:r,mirror:n,blockClass:o,blockSelector:a,needsMask:E,maskTextClass:i,maskTextSelector:s,skipChild:l,inlineStylesheet:c,maskInputOptions:d,maskTextFn:u,maskInputFn:h,slimDOMOptions:m,dataURLOptions:f,inlineImages:g,recordCanvas:v,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:I,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:A,keepIframeSrcFn:k,cssCaptured:!1};if(F.type===p.Element&&"textarea"===F.tagName&&void 0!==F.attributes.value);else for(var Y of(F.type===p.Element&&void 0!==F.attributes._cssText&&"string"==typeof F.attributes._cssText&&(Z.cssCaptured=!0),Array.from(S.childNodes(e)))){var W=le(Y,Z);W&&F.childNodes.push(W)}var G=null;if(w(e)&&(G=S.shadowRoot(e)))for(var V of Array.from(S.childNodes(G))){var H=le(V,Z);H&&(M(G)&&(H.isShadow=!0),F.childNodes.push(H))}}var P=S.parentNode(e);return P&&N(P)&&M(P)&&(F.isShadow=!0),F.type===p.Element&&"iframe"===F.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var o,a=!1;try{o=n.document.readyState}catch(e){return}if("complete"===o){var i="about:blank";if(n.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((()=>{a||(t(),a=!0)}),r);e.addEventListener("load",(()=>{clearTimeout(s),a=!0,t()}))}}}(e,(()=>{var t=e.contentDocument;if(t&&I){var r=le(t,{doc:t,mirror:n,blockClass:o,blockSelector:a,needsMask:E,maskTextClass:i,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:u,maskInputFn:h,slimDOMOptions:m,dataURLOptions:f,inlineImages:g,recordCanvas:v,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:I,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:A,keepIframeSrcFn:k});r&&I(e,r)}}),b),F.type===p.Element&&"link"===F.tagName&&"string"==typeof F.attributes.rel&&("stylesheet"===F.attributes.rel||"preload"===F.attributes.rel&&"string"==typeof F.attributes.href&&"css"===L(F.attributes.href))&&function(e,t,r){var n,o=!1;try{n=e.sheet}catch(e){return}if(!n){var a=setTimeout((()=>{o||(t(),o=!0)}),r);e.addEventListener("load",(()=>{clearTimeout(a),o=!0,t()}))}}(e,(()=>{if(C){var t=le(e,{doc:r,mirror:n,blockClass:o,blockSelector:a,needsMask:E,maskTextClass:i,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:u,maskInputFn:h,slimDOMOptions:m,dataURLOptions:f,inlineImages:g,recordCanvas:v,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:I,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:A,keepIframeSrcFn:k});t&&C(e,t)}}),A),F}let ce=class e{constructor(){__publicField2(this,"parentElement",null),__publicField2(this,"parentNode",null),__publicField2(this,"ownerDocument"),__publicField2(this,"firstChild",null),__publicField2(this,"lastChild",null),__publicField2(this,"previousSibling",null),__publicField2(this,"nextSibling",null),__publicField2(this,"ELEMENT_NODE",1),__publicField2(this,"TEXT_NODE",3),__publicField2(this,"nodeType"),__publicField2(this,"nodeName"),__publicField2(this,"RRNodeType")}get childNodes(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};var de={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ue={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},he={};function pe(e){if(he[e])return he[e];var t=function(e){var t,r,n=null===globalThis||void 0===globalThis||null===(t=globalThis.Zone)||void 0===t||null===(r=t.__symbol__)||void 0===r?void 0:r.call(t,e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],r=t.prototype,n=e in de?de[e]:void 0,o=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),a=e in ue?ue[e]:void 0,i=Boolean(a&&a.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(o&&i)return he[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?he[e]=c:r}catch(e){return r}}var me={};function fe(e,t,r){var n,o="".concat(e,".").concat(String(r));if(me[o])return me[o].call(t);var a=pe(e),i=null==(n=Object.getOwnPropertyDescriptor(a,r))?void 0:n.get;return i?(me[o]=i,i.call(t)):t[r]}var ge={};function ve(e,t,r){var n="".concat(e,".").concat(String(r));if(ge[n])return ge[n].bind(t);var o=pe(e)[r];return"function"!=typeof o?t[r]:(ge[n]=o,o.bind(t))}function ye(){return pe("MutationObserver").constructor}var Ie={childNodes:function(e){return fe("Node",e,"childNodes")},parentNode:function(e){return fe("Node",e,"parentNode")},parentElement:function(e){return fe("Node",e,"parentElement")},textContent:function(e){return fe("Node",e,"textContent")},contains:function(e,t){return ve("Node",e,"contains")(t)},getRootNode:function(e){return ve("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?fe("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?fe("Element",e,"shadowRoot"):null},querySelector:function(e,t){return fe("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return fe("Element",e,"querySelectorAll")(t)},mutationObserver:ye};function be(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}var Ce="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",Se={map:{},getId:()=>(console.error(Ce),-1),getNode:()=>(console.error(Ce),null),removeNodeFromMap(){console.error(Ce)},has:()=>(console.error(Ce),!1),reset(){console.error(Ce)}};function we(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=null,o=0;return function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];var l=Date.now();o||!1!==r.leading||(o=l);var c=t-(l-o),d=this;c<=0||c>t?(n&&(clearTimeout(n),n=null),o=l,e.apply(d,i)):n||!1===r.trailing||(n=setTimeout((()=>{o=!1===r.leading?0:Date.now(),n=null,e.apply(d,i)}),c))}}function Ne(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,a=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,n?r:{set(e){setTimeout((()=>{r.set.call(this,e)}),0),a&&a.set&&a.set.call(this,e)}}),()=>Ne(e,t,a||{},!0)}function Me(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],o=r(n);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,()=>{e[t]=n}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Se=new Proxy(Se,{get:(e,t,r)=>("map"===t&&console.error(Ce),Reflect.get(e,t,r))}));var Ae=Date.now;function ke(e){var t,r,n,o,a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:a.documentElement.scrollLeft||(null==a?void 0:a.body)&&(null==(t=Ie.parentElement(a.body))?void 0:t.scrollLeft)||(null==(r=null==a?void 0:a.body)?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==a?void 0:a.documentElement.scrollTop)||(null==a?void 0:a.body)&&(null==(n=Ie.parentElement(a.body))?void 0:n.scrollTop)||(null==(o=null==a?void 0:a.body)?void 0:o.scrollTop)||0}}function Te(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Re(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ee(e){return e?e.nodeType===e.ELEMENT_NODE?e:Ie.parentElement(e):null}function Oe(e,t,r,n){if(!e)return!1;var o=Ee(e);if(!o)return!1;try{if("string"==typeof t){if(o.classList.contains(t))return!0;if(n&&null!==o.closest("."+t))return!0}else if(oe(o,t,n))return!0}catch(e){}if(r){if(o.matches(r))return!0;if(n&&null!==o.closest(r))return!0}return!1}function xe(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||t.getId(e)===K}function De(e,t){if(N(e))return!1;var r=t.getId(e);if(!t.has(r))return!0;var n=Ie.parentNode(e);return(!n||n.nodeType!==e.DOCUMENT_NODE)&&(!n||De(n,t))}function Le(e){return Boolean(e.changedTouches)}function Fe(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Be(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function _e(e){return!!e&&(e instanceof ce&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Ie.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ae=()=>(new Date).getTime());let Ze=class{constructor(){d(this,"id",1),d(this,"styleIDMap",new WeakMap),d(this,"idStyleMap",new Map)}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r);var r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function Ye(e){var t,r=null;return"getRootNode"in e&&(null==(t=Ie.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Ie.host(Ie.getRootNode(e))&&(r=Ie.host(Ie.getRootNode(e))),r}function We(e){var t=e.ownerDocument;if(!t)return!1;var r=function(e){for(var t,r=e;t=Ye(r);)r=t;return r}(e);return Ie.contains(t,r)}function Ge(e){var t=e.ownerDocument;return!!t&&(Ie.contains(t,e)||We(e))}var Ve=(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))(Ve||{}),He=(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[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(He||{}),Pe=(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))(Pe||{}),Xe=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Xe||{}),je=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(je||{}),ze=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(ze||{}),Ke=(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",e))(Ke||{});function Je(e){return"__ln"in e}class Ue{constructor(){d(this,"length",0),d(this,"head",null),d(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Je(e.previousSibling)){var r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Je(e.nextSibling)&&e.nextSibling.__ln.previous){var n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}var qe,Qe=(e,t)=>"".concat(e,"@").concat(t);class $e{constructor(){d(this,"frozen",!1),d(this,"locked",!1),d(this,"texts",[]),d(this,"attributes",[]),d(this,"attributeMap",new WeakMap),d(this,"removes",[]),d(this,"mapRemoves",[]),d(this,"movedMap",{}),d(this,"addedSet",new Set),d(this,"movedSet",new Set),d(this,"droppedSet",new Set),d(this,"removesSubTreeCache",new Set),d(this,"mutationCb"),d(this,"blockClass"),d(this,"blockSelector"),d(this,"maskTextClass"),d(this,"maskTextSelector"),d(this,"inlineStylesheet"),d(this,"maskInputOptions"),d(this,"maskTextFn"),d(this,"maskInputFn"),d(this,"keepIframeSrcFn"),d(this,"recordCanvas"),d(this,"inlineImages"),d(this,"slimDOMOptions"),d(this,"dataURLOptions"),d(this,"doc"),d(this,"mirror"),d(this,"iframeManager"),d(this,"stylesheetManager"),d(this,"shadowDomManager"),d(this,"canvasManager"),d(this,"processedNodeManager"),d(this,"unattachedDoc"),d(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),d(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var e=[],t=new Set,r=new Ue,n=e=>{for(var t=e,r=K;r===K;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},o=o=>{var a=Ie.parentNode(o);if(a&&Ge(o)){var i=!1;if(o.nodeType===Node.TEXT_NODE){var s=a.tagName;if("TEXTAREA"===s)return;"STYLE"===s&&this.addedSet.has(a)&&(i=!0)}var l=N(a)?this.mirror.getId(Ye(o)):this.mirror.getId(a),c=n(o);if(-1===l||-1===c)return r.addNode(o);var d=le(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Fe(e,this.mirror)&&this.iframeManager.addIframe(e),Be(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),_e(o)&&this.shadowDomManager.addShadowRoot(Ie.shadowRoot(o),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:i});d&&(e.push({parentId:l,nextId:c,node:d}),t.add(d.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var a of this.movedSet)tt(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(Ie.parentNode(a))||o(a);for(var i of this.addedSet)rt(this.droppedSet,i)||tt(this.removesSubTreeCache,i,this.mirror)?rt(this.movedSet,i)?o(i):this.droppedSet.add(i):o(i);for(var s=null;r.length;){var l=null;if(s){var c=this.mirror.getId(Ie.parentNode(s.value)),d=n(s.value);-1!==c&&-1!==d&&(l=s)}if(!l)for(var u=r.tail;u;){var h=u;if(u=u.previous,h){var p=this.mirror.getId(Ie.parentNode(h.value));if(-1===n(h.value))continue;if(-1!==p){l=h;break}var m=h.value,f=Ie.parentNode(m);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var g=Ie.host(f);if(-1!==this.mirror.getId(g)){l=h;break}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}s=l.previous,r.removeNode(l.value),o(l.value)}var v={texts:this.texts.map((e=>{var t=e.node,r=Ie.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{var{attributes:t}=e;if("string"==typeof t.style){var r=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+n).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(v.texts.length||v.attributes.length||v.removes.length||v.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(v))}})),d(this,"genTextAreaValueMutation",(e=>{var t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(Ie.childNodes(e),(e=>Ie.textContent(e)||"")).join("")})),d(this,"processMutation",(e=>{if(!xe(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":var t=Ie.textContent(e.target);Oe(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:ae(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Ee(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break;case"attributes":var r=e.target,n=e.attributeName,o=e.target.getAttribute(n);if("value"===n){var a=D(r);o=E({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:a,value:o,maskInputFn:this.maskInputFn})}if(Oe(e.target,this.blockClass,this.blockSelector,!1)||o===e.oldValue)return;var i=this.attributeMap.get(e.target);if("IFRAME"===r.tagName&&"src"===n&&!this.keepIframeSrcFn(o)){if(r.contentDocument)return;n="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===n&&"INPUT"===r.tagName&&"password"===(e.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!ne(r.tagName,n))if(i.attributes[n]=re(this.doc,O(r.tagName),O(n),o),"style"===n){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}var s=this.unattachedDoc.createElement("span");for(var l of(e.oldValue&&s.setAttribute("style",e.oldValue),Array.from(r.style))){var c=r.style.getPropertyValue(l),d=r.style.getPropertyPriority(l);c!==s.style.getPropertyValue(l)||d!==s.style.getPropertyPriority(l)?i.styleDiff[l]=""===d?c:[c,d]:i._unchangedStyles[l]=[c,d]}for(var u of Array.from(s.style))""===r.style.getPropertyValue(u)&&(i.styleDiff[u]=!1)}else"open"===n&&"DIALOG"===r.tagName&&(r.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break;case"childList":if(Oe(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{var r=this.mirror.getId(t),n=N(e.target)?this.mirror.getId(Ie.host(e.target)):this.mirror.getId(e.target);Oe(e.target,this.blockClass,this.blockSelector,!1)||xe(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(et(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||De(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Qe(r,n)]?et(this.movedSet,t):(this.removes.push({parentId:n,id:r,isShadow:!(!N(e.target)||!M(e.target))||void 0}),function(e,t){var r=[e];for(;r.length;){var n=r.pop();t.has(n)||(t.add(n),Ie.childNodes(n).forEach((e=>r.push(e))))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))}))}})),d(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(xe(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);var r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[Qe(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Oe(e,this.blockClass,this.blockSelector,!1)||(Ie.childNodes(e).forEach((e=>this.genAdds(e))),_e(e)&&Ie.childNodes(Ie.shadowRoot(e)).forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}))}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function et(e,t){e.delete(t),Ie.childNodes(t).forEach((t=>et(e,t)))}function tt(e,t,r){return 0!==e.size&&function(e,t,r){var n=Ie.parentNode(t);return!!n&&e.has(n)}(e,t)}function rt(e,t){return 0!==e.size&&nt(e,t)}function nt(e,t){var r=Ie.parentNode(t);return!!r&&(!!e.has(r)||nt(e,r))}var ot=e=>{if(!qe)return e;return function(){try{return e(...arguments)}catch(e){if(qe&&!0===qe(e))return;throw e}}},at=[];function it(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function st(e,t){var r=new $e;at.push(r),r.init(e);var n=new(ye())(ot(r.processMutations.bind(r)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n}function lt(e){var{mouseInteractionCb:t,doc:n,mirror:o,blockClass:a,blockSelector:i,sampling:s}=e;if(!1===s.mouseInteraction)return()=>{};var l=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,c=[],d=null;return Object.keys(Pe).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==l[e])).forEach((e=>{var s=O(e),l=(e=>n=>{var s=it(n);if(!Oe(s,a,i,!0)){var l=null,c=e;if("pointerType"in n){switch(n.pointerType){case"mouse":l=Xe.Mouse;break;case"touch":l=Xe.Touch;break;case"pen":l=Xe.Pen}l===Xe.Touch?Pe[e]===Pe.MouseDown?c="TouchStart":Pe[e]===Pe.MouseUp&&(c="TouchEnd"):Xe.Pen}else Le(n)&&(l=Xe.Touch);null!==l?(d=l,(c.startsWith("Touch")&&l===Xe.Touch||c.startsWith("Mouse")&&l===Xe.Mouse)&&(l=null)):Pe[e]===Pe.Click&&(l=d,d=null);var u=Le(n)?n.changedTouches[0]:n;if(u){var h=o.getId(s),{clientX:p,clientY:m}=u;ot(t)(r({type:Pe[c],id:h,x:p,y:m},null!==l&&{pointerType:l}))}}})(e);if(window.PointerEvent)switch(Pe[e]){case Pe.MouseDown:case Pe.MouseUp:s=s.replace("mouse","pointer");break;case Pe.TouchStart:case Pe.TouchEnd:return}c.push(be(s,l,n))})),ot((()=>{c.forEach((e=>e()))}))}function ct(e){var{scrollCb:t,doc:r,mirror:n,blockClass:o,blockSelector:a,sampling:i}=e;return be("scroll",ot(we(ot((e=>{var i=it(e);if(i&&!Oe(i,o,a,!0)){var s=n.getId(i);if(i===r&&r.defaultView){var l=ke(r.defaultView);t({id:s,x:l.left,y:l.top})}else t({id:s,x:i.scrollLeft,y:i.scrollTop})}})),i.scroll||100)),r)}var dt=["INPUT","TEXTAREA","SELECT"],ut=new WeakMap;function ht(e){return function(e,t){if(gt("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||gt("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||gt("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||gt("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){var n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function pt(e,t,r){var n,o;return e?(e.ownerNode?n=t.getId(e.ownerNode):o=r.getId(e),{styleId:o,id:n}):{}}function mt(e,t){var r,n,o,{mirror:a,stylesheetManager:i}=e,s=null;s="#document"===t.nodeName?a.getId(t):a.getId(Ie.host(t));var l="#document"===t.nodeName?null==(r=t.defaultView)?void 0:r.Document:null==(o=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:o.ShadowRoot,c=(null==l?void 0:l.prototype)?Object.getOwnPropertyDescriptor(null==l?void 0:l.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&l&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var e;return null==(e=c.get)?void 0:e.call(this)},set(e){var t,r=null==(t=c.set)?void 0:t.call(this,e);if(null!==s&&-1!==s)try{i.adoptStyleSheets(e,s)}catch(e){}return r}}),ot((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))):()=>{}}function ft(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.doc.defaultView;if(!o)return()=>{};!function(e,t){var{mutationCb:r,mousemoveCb:n,mouseInteractionCb:o,scrollCb:a,viewportResizeCb:i,inputCb:s,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:d,canvasMutationCb:u,fontCb:h,selectionCb:p,customElementCb:m}=e;e.mutationCb=function(){t.mutation&&t.mutation(...arguments),r(...arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove(...arguments),n(...arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction(...arguments),o(...arguments)},e.scrollCb=function(){t.scroll&&t.scroll(...arguments),a(...arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize(...arguments),i(...arguments)},e.inputCb=function(){t.input&&t.input(...arguments),s(...arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction(...arguments),l(...arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule(...arguments),c(...arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration(...arguments),d(...arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation(...arguments),u(...arguments)},e.fontCb=function(){t.font&&t.font(...arguments),h(...arguments)},e.selectionCb=function(){t.selection&&t.selection(...arguments),p(...arguments)},e.customElementCb=function(){t.customElement&&t.customElement(...arguments),m(...arguments)}}(e,n),e.recordDOM&&(t=st(e,e.doc));var a=function(e){var{mousemoveCb:t,sampling:r,doc:n,mirror:o}=e;if(!1===r.mousemove)return()=>{};var a,i="number"==typeof r.mousemove?r.mousemove:50,s="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,l=[],c=we(ot((e=>{var r=Date.now()-a;t(l.map((e=>(e.timeOffset-=r,e))),e),l=[],a=null})),s),d=ot(we(ot((e=>{var t=it(e),{clientX:r,clientY:n}=Le(e)?e.changedTouches[0]:e;a||(a=Ae()),l.push({x:r,y:n,id:o.getId(t),timeOffset:Ae()-a}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?He.Drag:e instanceof MouseEvent?He.MouseMove:He.TouchMove)})),i,{trailing:!1})),u=[be("mousemove",d,n),be("touchmove",d,n),be("drag",d,n)];return ot((()=>{u.forEach((e=>e()))}))}(e),i=lt(e),s=ct(e),l=function(e,t){var{viewportResizeCb:r}=e,{win:n}=t,o=-1,a=-1;return be("resize",ot(we(ot((()=>{var e=Te(),t=Re();o===e&&a===t||(r({width:Number(t),height:Number(e)}),o=e,a=t)})),200)),n)}(e,{win:o}),c=function(e){var{inputCb:t,doc:n,mirror:o,blockClass:a,blockSelector:i,ignoreClass:s,ignoreSelector:l,maskInputOptions:c,maskInputFn:d,sampling:u,userTriggeredOnInput:h}=e;function p(e){var t=it(e),r=e.isTrusted,o=t&&t.tagName;if(t&&"OPTION"===o&&(t=Ie.parentElement(t)),t&&o&&!(dt.indexOf(o)<0)&&!Oe(t,a,i,!0)&&!(t.classList.contains(s)||l&&t.matches(l))){var u=t.value,p=!1,f=D(t)||"";"radio"===f||"checkbox"===f?p=t.checked:(c[o.toLowerCase()]||c[f])&&(u=E({element:t,maskInputOptions:c,tagName:o,type:f,value:u,maskInputFn:d})),m(t,h?{text:u,isChecked:p,userTriggered:r}:{text:u,isChecked:p});var g=t.name;"radio"===f&&g&&p&&n.querySelectorAll('input[type="radio"][name="'.concat(g,'"]')).forEach((e=>{if(e!==t){var r=e.value;m(e,h?{text:r,isChecked:!p,userTriggered:!1}:{text:r,isChecked:!p})}}))}}function m(e,n){var a=ut.get(e);if(!a||a.text!==n.text||a.isChecked!==n.isChecked){ut.set(e,n);var i=o.getId(e);ot(t)(r(r({},n),{},{id:i}))}}var f=("last"===u.input?["change"]:["input","change"]).map((e=>be(e,ot(p),n))),g=n.defaultView;if(!g)return()=>{f.forEach((e=>e()))};var v=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),y=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&f.push(...y.map((e=>Ne(e[0],e[1],{set(){ot(p)({target:this,isTrusted:!1})}},!1,g)))),ot((()=>{f.forEach((e=>e()))}))}(e),d=function(e){var{mediaInteractionCb:t,blockClass:r,blockSelector:n,mirror:o,sampling:a,doc:i}=e,s=ot((e=>we(ot((a=>{var i=it(a);if(i&&!Oe(i,r,n,!0)){var{currentTime:s,volume:l,muted:c,playbackRate:d,loop:u}=i;t({type:e,id:o.getId(i),currentTime:s,volume:l,muted:c,playbackRate:d,loop:u})}})),a.media||500))),l=[be("play",s(ze.Play),i),be("pause",s(ze.Pause),i),be("seeked",s(ze.Seeked),i),be("volumechange",s(ze.VolumeChange),i),be("ratechange",s(ze.RateChange),i)];return ot((()=>{l.forEach((e=>e()))}))}(e),u=()=>{},h=()=>{},p=()=>{},m=()=>{};e.recordDOM&&(u=function(e,t){var{styleSheetRuleCb:r,mirror:n,stylesheetManager:o}=e,{win:a}=t;if(!a.CSSStyleSheet||!a.CSSStyleSheet.prototype)return()=>{};var i=a.CSSStyleSheet.prototype.insertRule;a.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:ot(((e,t,a)=>{var[i,s]=a,{id:l,styleId:c}=pt(t,n,o.styleMirror);return(l&&-1!==l||c&&-1!==c)&&r({id:l,styleId:c,adds:[{rule:i,index:s}]}),e.apply(t,a)}))}),a.CSSStyleSheet.prototype.addRule=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.cssRules.length,n="".concat(e," { ").concat(t," }");return a.CSSStyleSheet.prototype.insertRule.apply(this,[n,r])};var s,l,c=a.CSSStyleSheet.prototype.deleteRule;a.CSSStyleSheet.prototype.deleteRule=new Proxy(c,{apply:ot(((e,t,a)=>{var[i]=a,{id:s,styleId:l}=pt(t,n,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&r({id:s,styleId:l,removes:[{index:i}]}),e.apply(t,a)}))}),a.CSSStyleSheet.prototype.removeRule=function(e){return a.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},a.CSSStyleSheet.prototype.replace&&(s=a.CSSStyleSheet.prototype.replace,a.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:ot(((e,t,a)=>{var[i]=a,{id:s,styleId:l}=pt(t,n,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&r({id:s,styleId:l,replace:i}),e.apply(t,a)}))})),a.CSSStyleSheet.prototype.replaceSync&&(l=a.CSSStyleSheet.prototype.replaceSync,a.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:ot(((e,t,a)=>{var[i]=a,{id:s,styleId:l}=pt(t,n,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&r({id:s,styleId:l,replaceSync:i}),e.apply(t,a)}))}));var d={};vt("CSSGroupingRule")?d.CSSGroupingRule=a.CSSGroupingRule:(vt("CSSMediaRule")&&(d.CSSMediaRule=a.CSSMediaRule),vt("CSSConditionRule")&&(d.CSSConditionRule=a.CSSConditionRule),vt("CSSSupportsRule")&&(d.CSSSupportsRule=a.CSSSupportsRule));var u={};return Object.entries(d).forEach((e=>{var[t,a]=e;u[t]={insertRule:a.prototype.insertRule,deleteRule:a.prototype.deleteRule},a.prototype.insertRule=new Proxy(u[t].insertRule,{apply:ot(((e,t,a)=>{var[i,s]=a,{id:l,styleId:c}=pt(t.parentStyleSheet,n,o.styleMirror);return(l&&-1!==l||c&&-1!==c)&&r({id:l,styleId:c,adds:[{rule:i,index:[...ht(t),s||0]}]}),e.apply(t,a)}))}),a.prototype.deleteRule=new Proxy(u[t].deleteRule,{apply:ot(((e,t,a)=>{var[i]=a,{id:s,styleId:l}=pt(t.parentStyleSheet,n,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&r({id:s,styleId:l,removes:[{index:[...ht(t),i]}]}),e.apply(t,a)}))})})),ot((()=>{a.CSSStyleSheet.prototype.insertRule=i,a.CSSStyleSheet.prototype.deleteRule=c,s&&(a.CSSStyleSheet.prototype.replace=s),l&&(a.CSSStyleSheet.prototype.replaceSync=l),Object.entries(d).forEach((e=>{var[t,r]=e;r.prototype.insertRule=u[t].insertRule,r.prototype.deleteRule=u[t].deleteRule}))}))}(e,{win:o}),h=mt(e,e.doc),p=function(e,t){var{styleDeclarationCb:r,mirror:n,ignoreCSSAttributes:o,stylesheetManager:a}=e,{win:i}=t,s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:ot(((e,t,i)=>{var l,[c,d,u]=i;if(o.has(c))return s.apply(t,[c,d,u]);var{id:h,styleId:p}=pt(null==(l=t.parentRule)?void 0:l.parentStyleSheet,n,a.styleMirror);return(h&&-1!==h||p&&-1!==p)&&r({id:h,styleId:p,set:{property:c,value:d,priority:u},index:ht(t.parentRule)}),e.apply(t,i)}))});var l=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:ot(((e,t,i)=>{var s,[c]=i;if(o.has(c))return l.apply(t,[c]);var{id:d,styleId:u}=pt(null==(s=t.parentRule)?void 0:s.parentStyleSheet,n,a.styleMirror);return(d&&-1!==d||u&&-1!==u)&&r({id:d,styleId:u,remove:{property:c},index:ht(t.parentRule)}),e.apply(t,i)}))}),ot((()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=l}))}(e,{win:o}),e.collectFonts&&(m=function(e){var{fontCb:t,doc:r}=e,n=r.defaultView;if(!n)return()=>{};var o=[],a=new WeakMap,i=n.FontFace;n.FontFace=function(e,t,r){var n=new i(e,t,r);return a.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};var s=Me(r.fonts,"add",(function(e){return function(r){return setTimeout(ot((()=>{var e=a.get(r);e&&(t(e),a.delete(r))})),0),e.apply(this,[r])}}));return o.push((()=>{n.FontFace=i})),o.push(s),ot((()=>{o.forEach((e=>e()))}))}(e)));var f=function(e){var{doc:t,mirror:r,blockClass:n,blockSelector:o,selectionCb:a}=e,i=!0,s=ot((()=>{var e=t.getSelection();if(!(!e||i&&(null==e?void 0:e.isCollapsed))){i=e.isCollapsed||!1;for(var s=[],l=e.rangeCount||0,c=0;c<l;c++){var d=e.getRangeAt(c),{startContainer:u,startOffset:h,endContainer:p,endOffset:m}=d;Oe(u,n,o,!0)||Oe(p,n,o,!0)||s.push({start:r.getId(u),startOffset:h,end:r.getId(p),endOffset:m})}a({ranges:s})}}));return s(),be("selectionchange",s)}(e),g=function(e){var{doc:t,customElementCb:r}=e,n=t.defaultView;return n&&n.customElements?Me(n.customElements,"define",(function(e){return function(t,n,o){try{r({define:{name:t}})}catch(e){console.warn("Custom element callback failed for ".concat(t))}return e.apply(this,[t,n,o])}})):()=>{}}(e),v=[];for(var y of e.plugins)v.push(y.observer(y.callback,o,y.options));return ot((()=>{at.forEach((e=>e.reset())),null==t||t.disconnect(),a(),i(),s(),l(),c(),d(),u(),h(),p(),m(),f(),g(),v.forEach((e=>e()))}))}function gt(e){return void 0!==window[e]}function vt(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class yt{constructor(e){d(this,"iframeIdToRemoteIdMap",new WeakMap),d(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,n){var o=r||this.getIdToRemoteIdMap(e),a=n||this.getRemoteIdToIdMap(e),i=o.get(t);return i||(i=this.generateIdFn(),o.set(t,i),a.set(i,t)),i}getIds(e,t){var r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,r,n)))}getRemoteId(e,t,r){var n=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;var o=n.get(t);return o||-1}getRemoteIds(e,t){var r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,r)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class It{constructor(e){d(this,"iframes",new WeakMap),d(this,"crossOriginIframeMap",new WeakMap),d(this,"crossOriginIframeMirror",new yt(J)),d(this,"crossOriginIframeStyleMirror"),d(this,"crossOriginIframeRootIdMap",new WeakMap),d(this,"mirror"),d(this,"mutationCb"),d(this,"wrappedEmit"),d(this,"loadListener"),d(this,"stylesheetManager"),d(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new yt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(n=this.loadListener)||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var r=this.crossOriginIframeMap.get(e.source);if(r){var n=this.transformCrossOriginEvent(r,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}}}transformCrossOriginEvent(e,t){var r;switch(t.type){case Ve.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Ve.IncrementalSnapshot,data:{source:He.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Ve.Meta:case Ve.Load:case Ve.DomContentLoaded:return!1;case Ve.Plugin:return t;case Ve.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Ve.IncrementalSnapshot:switch(t.data.source){case He.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);var r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case He.Drag:case He.TouchMove:case He.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case He.ViewportResize:return!1;case He.MediaInteraction:case He.MouseInteraction:case He.Scroll:case He.CanvasMutation:case He.Input:return this.replaceIds(t.data,e,["id"]),t;case He.StyleSheetRule:case He.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case He.Font:return t;case He.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case He.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,r,n){for(var o of n)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(r,t[o]):t[o]=e.getId(r,t[o]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===Ke.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class bt{constructor(e){d(this,"shadowDoms",new WeakSet),d(this,"mutationCb"),d(this,"scrollCb"),d(this,"bypassOptions"),d(this,"mirror"),d(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(M(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var n=st(r(r({},this.bypassOptions),{},{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(ct(r(r({},this.bypassOptions),{},{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(Ie.host(e))),this.restoreHandlers.push(mt({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){var r=this;this.restoreHandlers.push(Me(e.prototype,"attachShadow",(function(e){return function(n){var o=e.call(this,n),a=Ie.shadowRoot(this);return a&&Ge(this)&&r.addShadowRoot(a,t),o}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",St="undefined"==typeof Uint8Array?[]:new Uint8Array(256),wt=0;wt<64;wt++)St[Ct.charCodeAt(wt)]=wt;var Nt=new Map;var Mt=(e,t,r)=>{if(e&&(Tt(e,t)||"object"==typeof e)){var n=function(e,t){var r=Nt.get(e);return r||(r=new Map,Nt.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name),o=n.indexOf(e);return-1===o&&(o=n.length,n.push(e)),o}};function At(e,t,r){if(e instanceof Array)return e.map((e=>At(e,t,r)));if(null===e)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)return{rr_type:e.constructor.name,base64:function(e){var t,r=new Uint8Array(e),n=r.length,o="";for(t=0;t<n;t+=3)o+=Ct[r[t]>>2],o+=Ct[(3&r[t])<<4|r[t+1]>>4],o+=Ct[(15&r[t+1])<<2|r[t+2]>>6],o+=Ct[63&r[t+2]];return n%3==2?o=o.substring(0,o.length-1)+"=":n%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[At(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){var n=e.constructor.name,{src:o}=e;return{rr_type:n,src:o}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[At(e.data,t,r),e.width,e.height]}:Tt(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:Mt(e,t,r)}:e}var kt=(e,t,r)=>e.map((e=>At(e,t,r))),Tt=(e,t)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(r.find((r=>e instanceof t[r])))};function Rt(e,t,r,n){var o=[];try{var a=Me(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(o){for(var a=arguments.length,i=new Array(a>1?a-1:0),s=1;s<a;s++)i[s-1]=arguments[s];if(!Oe(this,t,r,!0)){var l=function(e){return"experimental-webgl"===e?"webgl":e}(o);if("__context"in this||(this.__context=l),n&&["webgl","webgl2"].includes(l))if(i[0]&&"object"==typeof i[0]){var c=i[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[o,...i])}}));o.push(a)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach((e=>e()))}}function Et(e,t,r,n,o,a){var i=[],s=Object.getOwnPropertyNames(e),l=function(s){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(s))return"continue";try{if("function"!=typeof e[s])return"continue";var l=Me(e,s,(function(e){return function(){for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];var d=e.apply(this,l);if(Mt(d,a,this),"tagName"in this.canvas&&!Oe(this.canvas,n,o,!0)){var u=kt(l,a,this),h={type:t,property:s,args:u};r(this.canvas,h)}return d}}));i.push(l)}catch(n){var c=Ne(e,s,{set(e){r(this.canvas,{type:t,property:s,args:[e],setter:!0})}});i.push(c)}};for(var c of s)l(c);return i}var Ot,xt,Dt,Lt,Ft="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Bt="undefined"!=typeof window&&window.Blob&&new Blob([(Ot=Ft,Uint8Array.from(atob(Ot),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});function _t(e){var t;try{if(!(t=Bt&&(window.URL||window.webkitURL).createObjectURL(Bt)))throw"";var r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",(()=>{(window.URL||window.webkitURL).revokeObjectURL(t)})),r}catch(t){return new Worker("data:text/javascript;base64,"+Ft,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Zt{constructor(e){d(this,"pendingCanvasMutations",new Map),d(this,"rafStamps",{latestId:0,invokeId:null}),d(this,"mirror"),d(this,"mutationCb"),d(this,"resetObservers"),d(this,"frozen",!1),d(this,"locked",!1),d(this,"processMutation",((e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)}));var{sampling:t="all",win:r,blockClass:n,blockSelector:o,recordCanvas:a,dataURLOptions:i}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&"all"===t&&this.initCanvasMutationObserver(r,n,o),a&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,n,o,{dataURLOptions:i})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,n,a){var i=this,s=Rt(t,r,n,!0),l=new Map,c=new _t;c.onmessage=e=>{var{id:t}=e.data;if(l.set(t,!1),"base64"in e.data){var{base64:r,type:n,width:o,height:a}=e.data;this.mutationCb({id:t,type:je["2D"],commands:[{property:"clearRect",args:[0,0,o,a]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:n}]},0,0]}]})}};var d,u=1e3/e,h=0,p=e=>{var s,m;h&&e-h<u?d=requestAnimationFrame(p):(h=e,(s=[],m=e=>{e.querySelectorAll("canvas").forEach((e=>{Oe(e,r,n,!0)||s.push(e)})),e.querySelectorAll("*").forEach((e=>{e.shadowRoot&&m(e.shadowRoot)}))},m(t.document),s).forEach(function(){var e=o((function*(e){var t,r=i.mirror.getId(e);if(!l.get(r)&&0!==e.width&&0!==e.height){if(l.set(r,!0),["webgl","webgl2"].includes(e.__context)){var n=e.getContext(e.__context);!1===(null==(t=null==n?void 0:n.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}var o=e.clientWidth||e.width,s=e.clientHeight||e.height,d=yield createImageBitmap(e,{resizeWidth:o,resizeHeight:s});c.postMessage({id:r,bitmap:d,width:o,height:s,dataURLOptions:a.dataURLOptions},[d])}}));return function(t){return e.apply(this,arguments)}}()),d=requestAnimationFrame(p))};d=requestAnimationFrame(p),this.resetObservers=()=>{s(),cancelAnimationFrame(d)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=Rt(e,t,r,!1),o=function(e,t,r,n){var o=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),i=function(a){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[a])return"continue";var i=Me(t.CanvasRenderingContext2D.prototype,a,(function(o){return function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return Oe(this.canvas,r,n,!0)||setTimeout((()=>{var r=kt(s,t,this);e(this.canvas,{type:je["2D"],property:a,args:r})}),0),o.apply(this,s)}}));o.push(i)}catch(r){var s=Ne(t.CanvasRenderingContext2D.prototype,a,{set(t){e(this.canvas,{type:je["2D"],property:a,args:[t],setter:!0})}});o.push(s)}};for(var s of a)i(s);return()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r),a=function(e,t,r,n){var o=[];return o.push(...Et(t.WebGLRenderingContext.prototype,je.WebGL,e,r,n,t)),void 0!==t.WebGL2RenderingContext&&o.push(...Et(t.WebGL2RenderingContext.prototype,je.WebGL2,e,r,n,t)),()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{n(),o(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{var r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(e);if(r&&-1!==t){var n=r.map((e=>i(e,l))),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:n}),this.pendingCanvasMutations.delete(e)}}}}class Yt{constructor(e){d(this,"trackedLinkElements",new WeakSet),d(this,"mutationCb"),d(this,"adoptedStyleSheetCb"),d(this,"styleMirror",new Ze),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){var r=this;if(0!==e.length){var n={id:t,styleIds:[]},o=[],a=function(e){var t=void 0;r.styleMirror.has(e)?t=r.styleMirror.getId(e):(t=r.styleMirror.add(e),o.push({styleId:t,rules:Array.from(e.rules||CSSRule,((t,r)=>({rule:k(t,e.href),index:r})))})),n.styleIds.push(t)};for(var i of e)a(i);o.length>0&&(n.styles=o),this.adoptedStyleSheetCb(n)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Wt{constructor(){d(this,"nodeMap",new WeakMap),d(this,"active",!1)}inOtherBuffer(e,t){var r=this.nodeMap.get(e);return r&&Array.from(r).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}var Gt=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){var Vt=document.createElement("iframe");document.body.appendChild(Vt),Array.from=(null==(s=Vt.contentWindow)?void 0:s.Array.from)||Array.from,document.body.removeChild(Vt)}}catch(e){console.debug("Unable to override Array.from",e)}var Ht,Pt,Xt=new R;function jt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{emit:t,checkoutEveryNms:n,checkoutEveryNth:o,blockClass:a="rr-block",blockSelector:i=null,ignoreClass:s="rr-ignore",ignoreSelector:l=null,maskTextClass:c="rr-mask",maskTextSelector:d=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:m,maskInputFn:f,maskTextFn:g,hooks:v,packFn:y,sampling:I={},dataURLOptions:b={},mousemoveWait:C,recordDOM:S=!0,recordCanvas:w=!1,recordCrossOriginIframes:N=!1,recordAfter:M=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:A=!1,collectFonts:k=!1,inlineImages:T=!1,plugins:E,keepIframeSrcFn:O=(()=>!1),ignoreCSSAttributes:x=new Set([]),errorHandler:D}=e;qe=D;var L=!N||window.parent===window,F=!1;if(!L)try{window.parent.document&&(F=!1)}catch(e){F=!0}if(L&&!t)throw new Error("emit function is required");if(!L&&!F)return()=>{};void 0!==C&&void 0===I.mousemove&&(I.mousemove=C),Xt.reset();var B,_=!0===h?{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}:void 0!==p?p:{password:!0},Z=!0===m||"all"===m?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===m,headMetaDescKeywords:"all"===m,headTitleMutations:"all"===m}:m||{};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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)}();var Y=0,W=e=>{for(var t of E||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!F&&(e=y(e)),e};xt=(e,r)=>{var a,i=e;if(i.timestamp=Ae(),!(null==(a=at[0])?void 0:a.isFrozen())||i.type===Ve.FullSnapshot||i.type===Ve.IncrementalSnapshot&&i.data.source===He.Mutation||at.forEach((e=>e.unfreeze())),L)null==t||t(W(i),r);else if(F){var s={type:"rrweb",event:W(i),origin:window.location.origin,isCheckout:r};window.parent.postMessage(s,"*")}if(i.type===Ve.FullSnapshot)B=i,Y=0;else if(i.type===Ve.IncrementalSnapshot){if(i.data.source===He.Mutation&&i.data.isAttachIframe)return;Y++;var l=o&&Y>=o,c=n&&i.timestamp-B.timestamp>n;(l||c)&&Dt(!0)}};var G=e=>{xt({type:Ve.IncrementalSnapshot,data:r({source:He.Mutation},e)})},V=e=>xt({type:Ve.IncrementalSnapshot,data:r({source:He.Scroll},e)}),H=e=>xt({type:Ve.IncrementalSnapshot,data:r({source:He.CanvasMutation},e)}),P=new Yt({mutationCb:G,adoptedStyleSheetCb:e=>xt({type:Ve.IncrementalSnapshot,data:r({source:He.AdoptedStyleSheet},e)})}),X=new It({mirror:Xt,mutationCb:G,stylesheetManager:P,recordCrossOriginIframes:N,wrappedEmit:xt});for(var j of E||[])j.getMirror&&j.getMirror({nodeMirror:Xt,crossOriginIframeMirror:X.crossOriginIframeMirror,crossOriginIframeStyleMirror:X.crossOriginIframeStyleMirror});var z=new Wt;Lt=new Zt({recordCanvas:w,mutationCb:H,win:window,blockClass:a,blockSelector:i,mirror:Xt,sampling:I.canvas,dataURLOptions:b});var K=new bt({mutationCb:G,scrollCb:V,bypassOptions:{blockClass:a,blockSelector:i,maskTextClass:c,maskTextSelector:d,inlineStylesheet:u,maskInputOptions:_,dataURLOptions:b,maskTextFn:g,maskInputFn:f,recordCanvas:w,inlineImages:T,sampling:I,slimDOMOptions:Z,iframeManager:X,stylesheetManager:P,canvasManager:Lt,keepIframeSrcFn:O,processedNodeManager:z},mirror:Xt});Dt=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(S){xt({type:Ve.Meta,data:{href:window.location.href,width:Re(),height:Te()}},e),P.reset(),K.init(),at.forEach((e=>e.lock()));var t=function(e,t){var{mirror:r=new R,blockClass:n="rr-block",blockSelector:o=null,maskTextClass:a="rr-mask",maskTextSelector:i=null,inlineStylesheet:s=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:d=!1,maskTextFn:u,maskInputFn:h,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:I,stylesheetLoadTimeout:b,keepIframeSrcFn:C=(()=>!1)}=t||{};return le(e,{doc:e,mirror:r,blockClass:n,blockSelector:o,maskTextClass:a,maskTextSelector:i,skipChild:!1,inlineStylesheet:s,maskInputOptions:!0===d?{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}:!1===d?{password:!0}:d,maskTextFn:u,maskInputFn:h,slimDOMOptions:!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===p,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===p?{}:p,dataURLOptions:m,inlineImages:l,recordCanvas:c,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:I,stylesheetLoadTimeout:b,keepIframeSrcFn:C,newlyAddedElement:!1})}(document,{mirror:Xt,blockClass:a,blockSelector:i,maskTextClass:c,maskTextSelector:d,inlineStylesheet:u,maskAllInputs:_,maskTextFn:g,maskInputFn:f,slimDOM:Z,dataURLOptions:b,recordCanvas:w,inlineImages:T,onSerialize:e=>{Fe(e,Xt)&&X.addIframe(e),Be(e,Xt)&&P.trackLinkElement(e),_e(e)&&K.addShadowRoot(Ie.shadowRoot(e),document)},onIframeLoad:(e,t)=>{X.attachIframe(e,t),K.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{P.attachLinkElement(e,t)},keepIframeSrcFn:O});if(!t)return console.warn("Failed to snapshot the document");xt({type:Ve.FullSnapshot,data:{node:t,initialOffset:ke(window)}},e),at.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&P.adoptStyleSheets(document.adoptedStyleSheets,Xt.getId(document))}};try{var J=[],U=e=>{var t;return ot(ft)({mutationCb:G,mousemoveCb:(e,t)=>xt({type:Ve.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>xt({type:Ve.IncrementalSnapshot,data:r({source:He.MouseInteraction},e)}),scrollCb:V,viewportResizeCb:e=>xt({type:Ve.IncrementalSnapshot,data:r({source:He.ViewportResize},e)}),inputCb:e=>xt({type:Ve.IncrementalSnapshot,data:r({source:He.Input},e)}),mediaInteractionCb:e=>xt({type:Ve.IncrementalSnapshot,data:r({source:He.MediaInteraction},e)}),styleSheetRuleCb:e=>xt({type:Ve.IncrementalSnapshot,data:r({source:He.StyleSheetRule},e)}),styleDeclarationCb:e=>xt({type:Ve.IncrementalSnapshot,data:r({source:He.StyleDeclaration},e)}),canvasMutationCb:H,fontCb:e=>xt({type:Ve.IncrementalSnapshot,data:r({source:He.Font},e)}),selectionCb:e=>{xt({type:Ve.IncrementalSnapshot,data:r({source:He.Selection},e)})},customElementCb:e=>{xt({type:Ve.IncrementalSnapshot,data:r({source:He.CustomElement},e)})},blockClass:a,ignoreClass:s,ignoreSelector:l,maskTextClass:c,maskTextSelector:d,maskInputOptions:_,inlineStylesheet:u,sampling:I,recordDOM:S,recordCanvas:w,inlineImages:T,userTriggeredOnInput:A,collectFonts:k,doc:e,maskInputFn:f,maskTextFn:g,keepIframeSrcFn:O,blockSelector:i,slimDOMOptions:Z,dataURLOptions:b,mirror:Xt,iframeManager:X,stylesheetManager:P,shadowDomManager:K,processedNodeManager:z,canvasManager:Lt,ignoreCSSAttributes:x,plugins:(null==(t=null==E?void 0:E.filter((e=>e.observer)))?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>xt({type:Ve.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},v)};X.addLoadListener((e=>{try{J.push(U(e.contentDocument))}catch(e){console.warn(e)}}));var q=()=>{Dt(),J.push(U(document)),Gt=!0};return"interactive"===document.readyState||"complete"===document.readyState?q():(J.push(be("DOMContentLoaded",(()=>{xt({type:Ve.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&q()}))),J.push(be("load",(()=>{xt({type:Ve.Load,data:{}}),"load"===M&&q()}),window))),()=>{J.forEach((e=>e())),z.destroy(),Gt=!1,qe=void 0}}catch(e){console.warn(e)}}jt.addCustomEvent=(e,t)=>{if(!Gt)throw new Error("please add custom event after start recording");xt({type:Ve.Custom,data:{tag:e,payload:t}})},jt.freezePage=()=>{at.forEach((e=>e.freeze()))},jt.takeFullSnapshot=e=>{if(!Gt)throw new Error("please take full snapshot after start recording");Dt(e)},jt.mirror=Xt,(Pt=Ht||(Ht={}))[Pt.NotStarted=0]="NotStarted",Pt[Pt.Running=1]="Running",Pt[Pt.Stopped=2]="Stopped";var zt,Kt=Object.defineProperty,Jt=(e,t,r)=>((e,t,r)=>t in e?Kt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Ut=Object.defineProperty,qt=(e,t,r)=>((e,t,r)=>t in e?Ut(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Qt=Object.defineProperty,$t=(e,t,r)=>((e,t,r)=>t in e?Qt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),er={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},tr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},rr={},nr=()=>!!globalThis.Zone;function or(e){if(rr[e])return rr[e];var t=globalThis[e],r=t.prototype,n=e in er?er[e]:void 0,o=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),a=e in tr?tr[e]:void 0,i=Boolean(a&&a.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(o&&i&&!nr())return rr[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?rr[e]=c:r}catch(e){return r}}var ar={};function ir(e,t,r){var n,o="".concat(e,".").concat(String(r));if(ar[o])return ar[o].call(t);var a=or(e),i=null==(n=Object.getOwnPropertyDescriptor(a,r))?void 0:n.get;return i?(ar[o]=i,i.call(t)):t[r]}var sr={};function lr(e,t,r){var n="".concat(e,".").concat(String(r));if(sr[n])return sr[n].bind(t);var o=or(e)[r];return"function"!=typeof o?t[r]:(sr[n]=o,o.bind(t))}var cr={childNodes:function(e){return ir("Node",e,"childNodes")},parentNode:function(e){return ir("Node",e,"parentNode")},parentElement:function(e){return ir("Node",e,"parentElement")},textContent:function(e){return ir("Node",e,"textContent")},contains:function(e,t){return lr("Node",e,"contains")(t)},getRootNode:function(e){return lr("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?ir("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?ir("Element",e,"shadowRoot"):null},querySelector:function(e,t){return ir("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return ir("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return or("MutationObserver").constructor}};class dr{constructor(){$t(this,"idNodeMap",new Map),$t(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){var t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function ur(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&ur(cr.parentNode(e),t,r);for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}return!!r&&ur(cr.parentNode(e),t,r)}class hr{constructor(){__publicField22(this,"parentElement",null),__publicField22(this,"parentNode",null),__publicField22(this,"ownerDocument"),__publicField22(this,"firstChild",null),__publicField22(this,"lastChild",null),__publicField22(this,"previousSibling",null),__publicField22(this,"nextSibling",null),__publicField22(this,"ELEMENT_NODE",1),__publicField22(this,"TEXT_NODE",3),__publicField22(this,"nodeType"),__publicField22(this,"nodeName"),__publicField22(this,"RRNodeType")}get childNodes(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof hr))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}var pr={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},mr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},fr={},gr=()=>!!globalThis.Zone;function vr(e){if(fr[e])return fr[e];var t=globalThis[e],r=t.prototype,n=e in pr?pr[e]:void 0,o=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),a=e in mr?mr[e]:void 0,i=Boolean(a&&a.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(o&&i&&!gr())return fr[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?fr[e]=c:r}catch(e){return r}}var yr={};function Ir(e,t,r){var n,o="".concat(e,".").concat(String(r));if(yr[o])return yr[o].call(t);var a=vr(e),i=null==(n=Object.getOwnPropertyDescriptor(a,r))?void 0:n.get;return i?(yr[o]=i,i.call(t)):t[r]}var br={};function Cr(e,t,r){var n="".concat(e,".").concat(String(r));if(br[n])return br[n].bind(t);var o=vr(e)[r];return"function"!=typeof o?t[r]:(br[n]=o,o.bind(t))}var Sr={childNodes:function(e){return Ir("Node",e,"childNodes")},parentNode:function(e){return Ir("Node",e,"parentNode")},parentElement:function(e){return Ir("Node",e,"parentElement")},textContent:function(e){return Ir("Node",e,"textContent")},contains:function(e,t){return Cr("Node",e,"contains")(t)},getRootNode:function(e){return Cr("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ir("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ir("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ir("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ir("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return vr("MutationObserver").constructor}};var wr="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",Nr={map:{},getId:()=>(console.error(wr),-1),getNode:()=>(console.error(wr),null),removeNodeFromMap(){console.error(wr)},has:()=>(console.error(wr),!1),reset(){console.error(wr)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Nr=new Proxy(Nr,{get:(e,t,r)=>("map"===t&&console.error(wr),Reflect.get(e,t,r))}));var Mr=Date.now;function Ar(e){return e?e.nodeType===e.ELEMENT_NODE?e:Sr.parentElement(e):null}/[1-9][0-9]{12}/.test(Date.now().toString())||(Mr=()=>(new Date).getTime());function kr(e){var t,r=null;return"getRootNode"in e&&(null==(t=Sr.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Sr.host(Sr.getRootNode(e))&&(r=Sr.host(Sr.getRootNode(e))),r}function Tr(e){for(var t,r=e;t=kr(r);)r=t;return r}function Rr(e){var t=e.ownerDocument;if(!t)return!1;var r=Tr(e);return Sr.contains(t,r)}for(var Er=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){qt(this,"id",1),qt(this,"styleIDMap",new WeakMap),qt(this,"idStyleMap",new Map)}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r);var r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},get _mirror(){return Nr},closestElementOfNode:Ar,getBaseDimension:function e(t,r){var n,o,a=null==(o=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:o.frameElement;if(!a||a===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};var i=a.getBoundingClientRect(),s=e(a,r),l=i.height/a.clientHeight;return{x:i.x*s.relativeScale+s.x,y:i.y*s.relativeScale+s.y,relativeScale:l,absoluteScale:s.absoluteScale*l}},getNestedRule:function e(t,r){var n=t[r[0]];return 1===r.length?n:e(n.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){var t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:Tr,getShadowHost:kr,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,r,n,o,a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:a.documentElement.scrollLeft||(null==a?void 0:a.body)&&(null==(t=Sr.parentElement(a.body))?void 0:t.scrollLeft)||(null==(r=null==a?void 0:a.body)?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==a?void 0:a.documentElement.scrollTop)||(null==a?void 0:a.body)&&(null==(n=Sr.parentElement(a.body))?void 0:n.scrollTop)||(null==(o=null==a?void 0:a.body)?void 0:o.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof hr&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Sr.shadowRoot(e)))},hookSetter:function e(t,r,n,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,i=a.Object.getOwnPropertyDescriptor(t,r);return a.Object.defineProperty(t,r,o?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>e(t,r,i||{},!0)},inDom:function(e){var t=e.ownerDocument;return!!t&&(Sr.contains(t,e)||Rr(e))},isAncestorRemoved:function e(t,r){if(o=(n=t)&&"host"in n&&"mode"in n&&cr.host(n)||null,Boolean(o&&"shadowRoot"in o&&cr.shadowRoot(o)===n))return!1;var n,o,a=r.getId(t);if(!r.has(a))return!0;var i=Sr.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||e(i,r))},isBlocked:function(e,t,r,n){if(!e)return!1;var o=Ar(e);if(!o)return!1;try{if("string"==typeof t){if(o.classList.contains(t))return!0;if(n&&null!==o.closest("."+t))return!0}else if(ur(o,t,n))return!0}catch(e){}if(r){if(o.matches(r))return!0;if(n&&null!==o.closest(r))return!0}return!1},isIgnored:function(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,r){r(t.value);for(var n=t.children.length-1;n>=0;n--)e(t.children[n],r)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return Mr},on:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)},patch:function(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],o=r(n);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,()=>{e[t]=n}}catch(e){return()=>{}}},polyfill:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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)},queueToResolveTrees:function(e){var t={},r=(e,r)=>{var n={value:e,parent:r,children:[]};return t[e.node.id]=n,n},n=[];for(var o of e){var{nextId:a,parentId:i}=o;if(a&&a in t){var s=t[a];if(s.parent){var l=s.parent.children.indexOf(s);s.parent.children.splice(l,0,r(o,s.parent))}else{var c=n.indexOf(s);n.splice(c,0,r(o,null))}}else if(i in t){var d=t[i];d.children.push(r(o,d))}else n.push(r(o,null))}return n},shadowHostInDom:Rr,throttle:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=null,o=0;return function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];var l=Date.now();o||!1!==r.leading||(o=l);var c=t-(l-o),d=this;c<=0||c>t?(n&&(clearTimeout(n),n=null),o=l,e.apply(d,i)):n||!1===r.trailing||(n=setTimeout((()=>{o=!1===r.leading?0:Date.now(),n=null,e.apply(d,i)}),c))}},uniqueTextMutations:function(e){for(var t=new Set,r=[],n=e.length;n--;){var o=e[n];t.has(o.id)||(r.push(o),t.add(o.id))}return r}},Symbol.toStringTag,{value:"Module"})),Or="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xr="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Dr=0;Dr<64;Dr++)xr[Or.charCodeAt(Dr)]=Dr;var Lr;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),(e=>e.charCodeAt(0))))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],(e=>2*e))[0]){var Fr=document.createElement("iframe");document.body.appendChild(Fr),Array.from=(null==(zt=Fr.contentWindow)?void 0:zt.Array.from)||Array.from,document.body.removeChild(Fr)}}catch(e){console.debug("Unable to override Array.from",e)}new dr,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Lr||(Lr={}));class Br{constructor(e){Jt(this,"fileName"),Jt(this,"functionName"),Jt(this,"lineNumber"),Jt(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?"".concat(this.functionName," (").concat(this.fileName,":").concat(e,":").concat(t,")"):"".concat(this.fileName,":").concat(e,":").concat(t)}}var _r=/(^|@)\S+:\d+/,Zr=/^\s*at .*(\S+:\d+|\(native\))/m,Yr=/^(eval@)?(\[native code])?$/,Wr={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Zr)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: ".concat(e));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(Zr)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=t.match(/ (\((.+):(\d+):(\d+)\)$)/),n=(t=r?t.replace(r[0],""):t).split(/\s+/).slice(1),o=this.extractLocation(r?r[1]:n.pop()),a=n.join(" ")||void 0,i=["eval","<anonymous>"].indexOf(o[0])>-1?void 0:o[0];return new Br({functionName:a,fileName:i,lineNumber:o[1],columnNumber:o[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(Yr)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Br({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),n=r&&r[1]?r[1]:void 0,o=this.extractLocation(e.replace(t,""));return new Br({functionName:n,fileName:o[0],lineNumber:o[1],columnNumber:o[2]})}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),n=[],o=2,a=r.length;o<a;o+=2){var i=t.exec(r[o]);i&&n.push(new Br({fileName:i[2],lineNumber:parseFloat(i[1])}))}return n},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),n=[],o=0,a=r.length;o<a;o+=2){var i=t.exec(r[o]);i&&n.push(new Br({functionName:i[3]||void 0,fileName:i[2],lineNumber:parseFloat(i[1])}))}return n},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(_r)&&!e.match(/^Error created at/)}),this).map((function(e){var t=e.split("@"),r=this.extractLocation(t.pop()),n=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Br({functionName:n,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function Gr(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var r=e.localName;if(!r)break;r=r.toLowerCase();var n=e.parentElement,o=[];if(n.children&&n.children.length>0)for(var a=0;a<n.children.length;a++){var i=n.children[a];i.localName&&i.localName.toLowerCase&&i.localName.toLowerCase()===r&&o.push(i)}o.length>1&&(r+=":eq(".concat(o.indexOf(e),")")),t=r+(t?">"+t:""),e=n}return t}function Vr(e){return"[object Object]"===Object.prototype.toString.call(e)}function Hr(e,t){if(0===t)return!0;var r=Object.keys(e);for(var n of r)if(Vr(e[n])&&Hr(e[n],t-1))return!0;return!1}function Pr(e,t){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);var n=[],o=[];return JSON.stringify(e,(function(e,t){if(n.length>0){var a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?o.splice(a,1/0,e):o.push(e),~n.indexOf(t)&&(t=n[0]===t?"[Circular ~]":"[Circular ~."+o.slice(0,n.indexOf(t)).join(".")+"]")}else n.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Vr(e)&&Object.keys(e).length>r.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Vr(e)&&Hr(e,r.depthOfLimit))return!0;return!1}(t))return function(e){var t=e.toString();r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t="".concat(t.slice(0,r.stringLengthLimit),"..."));return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){var i={};for(var s in t){var l=t[s];Array.isArray(l)?i[s]=Gr(l.length?l[0]:null):i[s]=l}return i}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t}))}var Xr={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function jr(e,t,r){var n,o=r?Object.assign({},Xr,r):Xr,a=o.logger;if(!a)return()=>{};n="string"==typeof a?t[a]:a;var i=0,s=!1,l=[];if(o.level.includes("error")){var c=t=>{var r=t.message,n=t.error,a=Wr.parse(n).map((e=>e.toString())),i=[Pr(r,o.stringifyOptions)];e({level:"error",trace:a,payload:i})};t.addEventListener("error",c),l.push((()=>{t.removeEventListener("error",c)}));var d=t=>{var r,n;t.reason instanceof Error?(r=t.reason,n=[Pr("Uncaught (in promise) ".concat(r.name,": ").concat(r.message),o.stringifyOptions)]):(r=new Error,n=[Pr("Uncaught (in promise)",o.stringifyOptions),Pr(t.reason,o.stringifyOptions)]);var a=Wr.parse(r).map((e=>e.toString()));e({level:"error",trace:a,payload:n})};t.addEventListener("unhandledrejection",d),l.push((()=>{t.removeEventListener("unhandledrejection",d)}))}for(var u of o.level)l.push(h(n,u));return()=>{l.forEach((e=>e()))};function h(t,r){var n=this;return t[r]?Er.patch(t,r,(t=>function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];if(t.apply(n,l),!("assert"===r&&l[0]||s)){s=!0;try{var d=Wr.parse(new Error).map((e=>e.toString())).splice(1),u=("assert"===r?l.slice(1):l).map((e=>Pr(e,o.stringifyOptions)));++i<o.lengthThreshold?e({level:r,trace:d,payload:u}):i===o.lengthThreshold&&e({level:"warn",trace:[],payload:[Pr("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...l)}finally{s=!1}}})):()=>{}}}var zr=e=>({name:"rrweb/console@1",observer:jr,options:e}),Kr="undefined"!=typeof window?window:void 0,Jr="undefined"!=typeof globalThis?globalThis:Kr,Ur=Array.prototype.forEach,qr=null==Jr?void 0:Jr.navigator;null==Jr||Jr.document,null==Jr||Jr.location,null==Jr||Jr.fetch,null!=Jr&&Jr.XMLHttpRequest&&"withCredentials"in new Jr.XMLHttpRequest&&Jr.XMLHttpRequest,null==Jr||Jr.AbortController,null==qr||qr.userAgent;var Qr,$r=null!=Kr?Kr:{};!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(Qr||(Qr={}));var en=Array.isArray,tn=Object.prototype,rn=tn.hasOwnProperty,nn=tn.toString,on=en||function(e){return"[object Array]"===nn.call(e)},an=e=>"function"==typeof e,sn=e=>e===Object(e)&&!on(e),ln=e=>void 0===e,cn=e=>"[object String]"==nn.call(e),dn=e=>null===e,un=e=>ln(e)||dn(e),hn=e=>"[object Boolean]"===nn.call(e),pn=e=>e instanceof Document,mn=e=>e instanceof FormData,fn=e=>{var t={_log:function(t){if(Kr&&$r.POSTHOG_DEBUG&&!ln(Kr.console)&&Kr.console){for(var r=("__rrweb_original__"in Kr.console[t]?Kr.console[t].__rrweb_original__:Kr.console[t]),n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];r(e,...o)}},info:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t._log("log",...r)},warn:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t._log("warn",...r)},error:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t._log("error",...r)},critical:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];console.error(e,...r)},uninitializedWarning:e=>{t.error("You must initialize PostHog before calling ".concat(e))},createLogger:t=>fn("".concat(e," ").concat(t))};return t},gn=fn("[PostHog.js]").createLogger,vn={};function yn(e,t,r){if(!un(e)){if(on(e))return function(e,t,r){if(on(e))if(Ur&&e.forEach===Ur)e.forEach(t,r);else if("length"in e&&e.length===+e.length)for(var n=0,o=e.length;n<o;n++)if(n in e&&t.call(r,e[n],n)===vn)return}(e,t,r);if(mn(e)){for(var n of e.entries())if(t.call(r,n[1],n[0])===vn)return}else for(var o in e)if(rn.call(e,o)&&t.call(r,e[o],o)===vn)return}}var In=function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&",o=[];return yn(e,(function(e,n){ln(e)||ln(n)||"undefined"===n||(t=encodeURIComponent(e instanceof File?e.name:e.toString()),r=encodeURIComponent(n),o[o.length]=r+"="+t)})),o.join(n)},bn={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:e=>e,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com"]};function Cn(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],o=r(n);return an(o)&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=o,()=>{e[t]=n}}catch(e){return()=>{}}}function Sn(e,t){var r,n=function(e){try{return"string"==typeof e?new URL(e).hostname:"url"in e?new URL(e.url).hostname:e.hostname}catch(e){return null}}(e),o={hostname:n,isHostDenied:!1};if(null===(r=t.payloadHostDenyList)||void 0===r||!r.length||null==n||!n.trim().length)return o;for(var a of t.payloadHostDenyList)if(n.endsWith(a))return{hostname:n,isHostDenied:!0};return o}var wn=gn("[Recorder]"),Nn=e=>"navigation"===e.entryType,Mn=e=>"resource"===e.entryType;function An(e,t){for(var r=e.length-1;r>=0;r-=1)if(t(e[r]))return e[r]}function kn(e,t,r){if(r.recordInitialRequests){var n=t.performance.getEntries().filter((e=>Nn(e)||Mn(e)&&r.initiatorTypes.includes(e.initiatorType)));e({requests:n.flatMap((e=>Ln({entry:e,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var o=new t.PerformanceObserver((t=>{var n=t.getEntries().filter((e=>Nn(e)||Mn(e)&&r.initiatorTypes.includes(e.initiatorType)&&(e=>!r.recordBody&&!r.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:n.flatMap((e=>Ln({entry:e,method:void 0,status:void 0,networkRequest:{}})))})})),a=PerformanceObserver.supportedEntryTypes.filter((e=>r.performanceEntryTypeToObserve.includes(e)));return o.observe({entryTypes:a}),()=>{o.disconnect()}}function Tn(e,t){return!!t&&(hn(t)||t[e])}function Rn(e){var{type:t,recordBody:r,headers:n}=e;function o(e){var t=Object.keys(n).find((e=>"content-type"===e.toLowerCase())),r=t&&n[t];return e.some((e=>null==r?void 0:r.includes(e)))}if(!r)return!1;if(hn(r))return!0;if(on(r))return o(r);var a=r[t];return hn(a)?a:o(a)}function En(e,t,r,n,o){return On.apply(this,arguments)}function On(){return On=o((function*(e,t,r,n,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(a>10)return wn.warn("Failed to get performance entry for request",{url:r,initiatorType:t}),null;var i=An(e.performance.getEntriesByName(r),(e=>Mn(e)&&e.initiatorType===t&&(ln(n)||e.startTime>=n)&&(ln(o)||e.startTime<=o)));return i||(yield new Promise((e=>setTimeout(e,50*a))),En(e,t,r,n,o,a+1))})),On.apply(this,arguments)}function xn(e){var{body:t,options:r,url:n}=e;if(un(t))return null;var{hostname:o,isHostDenied:a}=Sn(n,r);if(a)return o+" is in deny list";if(cn(t))return t;if(pn(t))return t.textContent;if(mn(t))return In(t);if(sn(t))try{return JSON.stringify(t)}catch(e){return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(t)}var Dn=e=>!dn(e)&&("navigation"===e.entryType||"resource"===e.entryType);function Ln(e){var{entry:t,method:n,status:o,networkRequest:a,isInitial:i,start:s,end:l,url:c,initiatorType:d}=e;s=t?t.startTime:s,l=t?t.responseEnd:l;var u=Math.floor(Date.now()-performance.now()),h=Math.floor(u+(s||0)),p=[r(r({},t?t.toJSON():{name:c}),{},{startTime:ln(s)?void 0:Math.round(s),endTime:ln(l)?void 0:Math.round(l),timeOrigin:u,timestamp:h,method:n,initiatorType:d||(t?t.initiatorType:void 0),status:o,requestHeaders:a.requestHeaders,requestBody:a.requestBody,responseHeaders:a.responseHeaders,responseBody:a.responseBody,isInitial:i})];if(Dn(t))for(var m of t.serverTiming||[])p.push({timeOrigin:u,timestamp:h,startTime:Math.round(t.startTime),name:m.name,duration:m.duration,entryType:"serverTiming"});return p}var Fn=["video/","audio/"];function Bn(e){return new Promise(((t,r)=>{var n=setTimeout((()=>t("[SessionReplay] Timeout while trying to read body")),500);try{e.clone().text().then((e=>t(e)),(e=>r(e))).finally((()=>clearTimeout(n)))}catch(e){clearTimeout(n),t("[SessionReplay] Failed to read body")}}))}function _n(){return(_n=o((function*(e){var{r:t,options:r,url:n}=e,{hostname:o,isHostDenied:a}=Sn(n,r);return a?Promise.resolve(o+" is in deny list"):Bn(t)}))).apply(this,arguments)}function Zn(){return(Zn=o((function*(e){var{r:t,options:r,url:n}=e,o=function(e){var t,{r:r,options:n,url:o}=e;if("chunked"===r.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var a=null===(t=r.headers.get("Content-Type"))||void 0===t?void 0:t.toLowerCase(),i=Fn.some((e=>null==a?void 0:a.startsWith(e)));if(a&&i)return"Content-Type ".concat(a," is not supported");var{hostname:s,isHostDenied:l}=Sn(o,n);return l?s+" is in deny list":null}({r:t,options:r,url:n});return dn(o)?Bn(t):Promise.resolve(o)}))).apply(this,arguments)}function Yn(e,t,r){if(!r.initiatorTypes.includes("fetch"))return()=>{};var n=Tn("request",r.recordHeaders),a=Tn("response",r.recordHeaders),i=Cn(t,"fetch",(i=>function(){var s=o((function*(o,s){var l,c,d,u=new Request(o,s),h={};try{var p={};u.headers.forEach(((e,t)=>{p[t]=e})),n&&(h.requestHeaders=p),Rn({type:"request",headers:p,url:o,recordBody:r.recordBody})&&(h.requestBody=yield function(e){return _n.apply(this,arguments)}({r:u,options:r,url:o})),c=t.performance.now(),l=yield i(u),d=t.performance.now();var m={};return l.headers.forEach(((e,t)=>{m[t]=e})),a&&(h.responseHeaders=m),Rn({type:"response",headers:m,url:o,recordBody:r.recordBody})&&(h.responseBody=yield function(e){return Zn.apply(this,arguments)}({r:l,options:r,url:o})),l}finally{En(t,"fetch",u.url,c,d).then((t=>{var r,n=Ln({entry:t,method:u.method,status:null===(r=l)||void 0===r?void 0:r.status,networkRequest:h,start:c,end:d,url:u.url,initiatorType:"fetch"});e({requests:n})})).catch((()=>{}))}}));return function(e,t){return s.apply(this,arguments)}}()));return()=>{i()}}var Wn=null;function Gn(e,t,n){if(!("performance"in t))return()=>{};if(Wn)return wn.warn("Network observer already initialised, doing nothing"),()=>{};var o=n?Object.assign({},bn,n):bn,a=t=>{var n=[];t.requests.forEach((e=>{var t=o.maskRequestFn(e);t&&n.push(t)})),n.length>0&&e(r(r({},t),{},{requests:n}))},i=kn(a,t,o),s=()=>{},l=()=>{};return(o.recordHeaders||o.recordBody)&&(s=function(e,t,r){if(!r.initiatorTypes.includes("xmlhttprequest"))return()=>{};var n=Tn("request",r.recordHeaders),o=Tn("response",r.recordHeaders),a=Cn(t.XMLHttpRequest.prototype,"open",(a=>function(i,s){var l,c,d=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],u=arguments.length>3?arguments[3]:void 0,h=arguments.length>4?arguments[4]:void 0,p=this,m=new Request(s),f={},g={},v=p.setRequestHeader.bind(p);p.setRequestHeader=(e,t)=>(g[e]=t,v(e,t)),n&&(f.requestHeaders=g);var y=p.send.bind(p);p.send=e=>(Rn({type:"request",headers:g,url:s,recordBody:r.recordBody})&&(f.requestBody=xn({body:e,options:r,url:s})),l=t.performance.now(),y(e)),p.addEventListener("readystatechange",(()=>{if(p.readyState===p.DONE){c=t.performance.now();var n={};p.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((e=>{var t=e.split(": "),r=t.shift(),o=t.join(": ");r&&(n[r]=o)})),o&&(f.responseHeaders=n),Rn({type:"response",headers:n,url:s,recordBody:r.recordBody})&&(f.responseBody=xn({body:p.response,options:r,url:s})),En(t,"xmlhttprequest",m.url,l,c).then((t=>{var r=Ln({entry:t,method:i,status:null==p?void 0:p.status,networkRequest:f,start:l,end:c,url:s.toString(),initiatorType:"xmlhttprequest"});e({requests:r})})).catch((()=>{}))}})),a.call(p,i,s,d,u,h)}));return()=>{a()}}(a,t,o),l=Yn(a,t,o)),Wn=()=>{i(),s(),l()}}var Vn="rrweb/network@1",Hn=e=>({name:Vn,observer:Gn,options:e});$r.__PosthogExtensions__=$r.__PosthogExtensions__||{},$r.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:zr,getRecordNetworkPlugin:Hn},$r.__PosthogExtensions__.rrweb={record:jt,version:"v2"},$r.rrweb={record:jt,version:"v2"},$r.rrwebConsoleRecord={getRecordConsolePlugin:zr},$r.getRecordNetworkPlugin=Hn,e.NETWORK_PLUGIN_NAME=Vn,e.default=jt,e.findLast=An,e.getRecordNetworkPlugin=Hn,Object.defineProperty(e,"__esModule",{value:!0})}({});
|
|
1
|
+
!function(e){"use strict";function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function n(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var i=e.apply(t,r);function s(e){n(i,o,a,s,l,"next",e)}function l(e){n(i,o,a,s,l,"throw",e)}s(void 0)}))}}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s,l=["type"],c=Object.defineProperty,d=(e,t,r)=>((e,t,r)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),u=Object.defineProperty,h=(e,t,r)=>((e,t,r)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),p=(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",e))(p||{}),m={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},f={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]};var g={};function v(e){if(g[e])return g[e];var t=function(e){var t,r,n=null===globalThis||void 0===globalThis||null===(t=globalThis.Zone)||void 0===t||null===(r=t.__symbol__)||void 0===r?void 0:r.call(t,e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],r=t.prototype,n=e in m?m[e]:void 0,o=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),a=e in f?f[e]:void 0,i=Boolean(a&&a.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(o&&i)return g[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?g[e]=c:t.prototype}catch(e){return t.prototype}}var y={};function I(e,t,r){var n,o="".concat(e,".").concat(String(r));if(y[o])return y[o].call(t);var a=v(e),i=null==(n=Object.getOwnPropertyDescriptor(a,r))?void 0:n.get;return i?(y[o]=i,i.call(t)):t[r]}var b={};function C(e,t,r){var n="".concat(e,".").concat(String(r));if(b[n])return b[n].bind(t);var o=v(e)[r];return"function"!=typeof o?t[r]:(b[n]=o,o.bind(t))}var S={childNodes:function(e){return I("Node",e,"childNodes")},parentNode:function(e){return I("Node",e,"parentNode")},parentElement:function(e){return I("Node",e,"parentElement")},textContent:function(e){return I("Node",e,"textContent")},contains:function(e,t){return C("Node",e,"contains")(t)},getRootNode:function(e){return C("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?I("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?I("Element",e,"shadowRoot"):null},querySelector:function(e,t){return I("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return I("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return v("MutationObserver").constructor}};function w(e){return e.nodeType===e.ELEMENT_NODE}function N(e){var t=e&&"host"in e&&"mode"in e&&S.host(e)||null;return Boolean(t&&"shadowRoot"in t&&S.shadowRoot(t)===e)}function M(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function A(e){try{var t=e.rules||e.cssRules;if(!t)return null;var r=Array.from(t,(t=>k(t,e.href))).join("");return(n=r).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}catch(e){return null}var n}function k(e,t){if(function(e){return"styleSheet"in e}(e)){var r;try{r=A(e.styleSheet)||function(e){var{cssText:t}=e;if(t.split('"').length<3)return t;var r=["@import","url(".concat(JSON.stringify(e.href),")")];return""===e.layerName?r.push("layer"):e.layerName&&r.push("layer(".concat(e.layerName,")")),e.supportsText&&r.push("supports(".concat(e.supportsText,")")),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(t){r=e.cssText}return e.styleSheet.href?Y(r,e.styleSheet.href):r}var n,o=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(n=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,o=o.replace(n,"$1\\$2")),t?Y(o,t):o}function R(e,t){return Array.from(e.styleSheets).find((e=>e.href===t))}let T=class{constructor(){h(this,"idNodeMap",new Map),h(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){var t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function E(e){var{element:t,maskInputOptions:r,tagName:n,type:o,value:a,maskInputFn:i}=e,s=a||"",l=o&&O(o);return(r[n.toLowerCase()]||l&&r[l])&&(s=i?i(s,t):"*".repeat(s.length)),s}function O(e){return e.toLowerCase()}var x="__rrweb_original__";function L(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?O(t):null}function D(e,t){var r,n;try{n=new URL(e,null!=t?t:window.location.href)}catch(e){return null}var o=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==o?void 0:o[1])&&void 0!==r?r:null}var F=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,B=/^(?:[a-z+]+:)?\/\//i,_=/^www\..*/i,Z=/^(data:)([^,]*),(.*)/i;function Y(e,t){return(e||"").replace(F,((e,r,n,o,a,i)=>{var s,l=n||a||i,c=r||o||"";if(!l)return e;if(B.test(l)||_.test(l))return"url(".concat(c).concat(l).concat(c,")");if(Z.test(l))return"url(".concat(c).concat(l).concat(c,")");if("/"===l[0])return"url(".concat(c).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+l)).concat(c,")");var d=t.split("/"),u=l.split("/");for(var h of(d.pop(),u))"."!==h&&(".."===h?d.pop():d.push(h));return"url(".concat(c).concat(d.join("/")).concat(c,")")}))}var W,G,V=1,H=new RegExp("[^a-z0-9-_:]"),P=-2;function X(){return V++}var j=/^[^ \t\n\r\u000c]+/,z=/^[, \t\n\r\u000c]+/;var K=new WeakMap;function J(e,t){return t&&""!==t.trim()?q(e,t):t}function U(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function q(e,t){var r=K.get(e);if(r||(r=e.createElement("a"),K.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function Q(e,t,r,n){return n?"src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0]?J(e,n):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,o=e.exec(t.substring(r));return o?(n=o[0],r+=n.length,n):""}for(var o=[];n(z),!(r>=t.length);){var a=n(j);if(","===a.slice(-1))a=J(e,a.substring(0,a.length-1)),o.push(a);else{var i="";a=J(e,a);for(var s=!1;;){var l=t.charAt(r);if(""===l){o.push((a+i).trim());break}if(s)")"===l&&(s=!1);else{if(","===l){r+=1,o.push((a+i).trim());break}"("===l&&(s=!0)}i+=l,r+=1}}}return o.join(", ")}(e,n):"style"===r?Y(n,q(e)):"object"===t&&"data"===r?J(e,n):n:J(e,n):n}function $(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function ee(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&ee(S.parentNode(e),t,r);for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}return!!r&&ee(S.parentNode(e),t,r)}function te(e,t,r,n){var o;if(w(e)){if(o=e,!S.childNodes(o).length)return!1}else{if(null===S.parentElement(e))return!1;o=S.parentElement(e)}try{if("string"==typeof t){if(n){if(o.closest(".".concat(t)))return!0}else if(o.classList.contains(t))return!0}else if(ee(o,t,n))return!0;if(r)if(n){if(o.closest(r))return!0}else if(o.matches(r))return!0}catch(e){}return!1}function re(e,t){var{doc:r,mirror:n,blockClass:o,blockSelector:a,needsMask:i,inlineStylesheet:s,maskInputOptions:l={},maskTextFn:c,maskInputFn:d,dataURLOptions:u={},inlineImages:h,recordCanvas:m,keepIframeSrcFn:f,newlyAddedElement:g=!1}=t,v=function(e,t){if(!t.hasNode(e))return;var r=t.getId(e);return 1===r?void 0:r}(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:p.Document,childNodes:[],compatMode:e.compatMode}:{type:p.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:p.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return function(e,t){for(var r,{doc:n,blockClass:o,blockSelector:a,inlineStylesheet:i,maskInputOptions:s={},maskInputFn:l,dataURLOptions:c={},inlineImages:d,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:m=!1,rootId:f}=t,g=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,o,a),v=function(e){if(e instanceof HTMLFormElement)return"form";var t=O(e.tagName);return H.test(t)?"div":t}(e),y={},I=e.attributes.length,b=0;b<I;b++){var C=e.attributes[b];$(v,C.name,C.value)||(y[C.name]=Q(n,v,O(C.name),C.value))}if("link"===v&&i){var w=function(e){return null==e?void 0:e.href}(e);if(w){var N=R(n,w);if(!N&&w.includes(".css"))N=R(n,window.location.origin+"/"+w.replace(window.location.href,""));var M=null;N&&(M=A(N)),M&&(delete y.rel,delete y.href,y._cssText=M)}}if("style"===v&&e.sheet&&!(e.innerText||S.textContent(e)||"").trim().length){var k=A(e.sheet);k&&(y._cssText=k)}if("input"===v||"textarea"===v||"select"===v){var T=e.value,D=e.checked;"radio"!==y.type&&"checkbox"!==y.type&&"submit"!==y.type&&"button"!==y.type&&T?y.value=E({element:e,type:L(e),tagName:v,value:T,maskInputOptions:s,maskInputFn:l}):D&&(y.checked=D)}"option"===v&&(e.selected&&!s.select?y.selected=!0:delete y.selected);if("dialog"===v&&e.open)try{y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(e){y.rr_open_mode="modal",y.ph_rr_could_not_detect_modal=!0}if("canvas"===v&&u)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r<e.width;r+=50)for(var n=0;n<e.height;n+=50){var o=t.getImageData,a=x in o?o[x]:o;if(new Uint32Array(a.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(y.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){var F=e.toDataURL(c.type,c.quality),B=n.createElement("canvas");B.width=e.width,B.height=e.height,F!==B.toDataURL(c.type,c.quality)&&(y.rr_dataURL=F)}if("img"===v&&d){W||(W=n.createElement("canvas"),G=W.getContext("2d"));var _=e,Z=_.currentSrc||_.getAttribute("src")||"<unknown-src>",Y=_.crossOrigin,V=()=>{_.removeEventListener("load",V);try{W.width=_.naturalWidth,W.height=_.naturalHeight,G.drawImage(_,0,0),y.rr_dataURL=W.toDataURL(c.type,c.quality)}catch(e){if("anonymous"!==_.crossOrigin)return _.crossOrigin="anonymous",void(_.complete&&0!==_.naturalWidth?V():_.addEventListener("load",V));console.warn("Cannot inline img src=".concat(Z,"! Error: ").concat(e))}"anonymous"===_.crossOrigin&&(Y?y.crossOrigin=Y:_.removeAttribute("crossorigin"))};_.complete&&0!==_.naturalWidth?V():_.addEventListener("load",V)}if("audio"===v||"video"===v){var P=y;P.rr_mediaState=e.paused?"paused":"played",P.rr_mediaCurrentTime=e.currentTime,P.rr_mediaPlaybackRate=e.playbackRate,P.rr_mediaMuted=e.muted,P.rr_mediaLoop=e.loop,P.rr_mediaVolume=e.volume}m||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop));if(g){var{width:X,height:j}=e.getBoundingClientRect();y={class:y.class,rr_width:"".concat(X,"px"),rr_height:"".concat(j,"px")}}"iframe"!==v||h(y.src)||(e.contentDocument||(y.rr_src=y.src),delete y.src);try{customElements.get(v)&&(r=!0)}catch(e){}return{type:p.Element,tagName:v,attributes:y,childNodes:[],isSVG:U(e)||void 0,needBlock:g,rootId:f,isCustom:r}}(e,{doc:r,blockClass:o,blockSelector:a,inlineStylesheet:s,maskInputOptions:l,maskInputFn:d,dataURLOptions:u,inlineImages:h,recordCanvas:m,keepIframeSrcFn:f,newlyAddedElement:g,rootId:v});case e.TEXT_NODE:return function(e,t){var r,{needsMask:n,maskTextFn:o,rootId:a}=t,i=S.parentNode(e),s=i&&i.tagName,l=S.textContent(e),c="STYLE"===s||void 0,d="SCRIPT"===s||void 0;if(c&&l){try{e.nextSibling||e.previousSibling||(null==(r=i.sheet)?void 0:r.cssRules)&&(l=A(i.sheet))}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(t),e)}l=Y(l,q(t.doc))}d&&(l="SCRIPT_PLACEHOLDER");!c&&!d&&l&&n&&(l=o?o(l,S.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:p.Text,textContent:l||"",isStyle:c,rootId:a}}(e,{doc:r,needsMask:i,maskTextFn:c,rootId:v});case e.CDATA_SECTION_NODE:return{type:p.CDATA,textContent:"",rootId:v};case e.COMMENT_NODE:return{type:p.Comment,textContent:S.textContent(e)||"",rootId:v};default:return!1}}function ne(e){return null==e?"":e.toLowerCase()}function oe(e,t){var{doc:r,mirror:n,blockClass:o,blockSelector:a,maskTextClass:i,maskTextSelector:s,skipChild:l=!1,inlineStylesheet:c=!0,maskInputOptions:d={},maskTextFn:u,maskInputFn:h,slimDOMOptions:m,dataURLOptions:f={},inlineImages:g=!1,recordCanvas:v=!1,onSerialize:y,onIframeLoad:I,iframeLoadTimeout:b=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:A=5e3,keepIframeSrcFn:k=(()=>!1),newlyAddedElement:R=!1}=t,{needsMask:T}=t,{preserveWhiteSpace:E=!0}=t;T||(T=te(e,i,s,void 0===T));var O,x=re(e,{doc:r,mirror:n,blockClass:o,blockSelector:a,needsMask:T,inlineStylesheet:c,maskInputOptions:d,maskTextFn:u,maskInputFn:h,dataURLOptions:f,inlineImages:g,recordCanvas:v,keepIframeSrcFn:k,newlyAddedElement:R});if(!x)return console.warn(e,"not serialized"),null;O=n.hasNode(e)?n.getId(e):!function(e,t){if(t.comment&&e.type===p.Comment)return!0;if(e.type===p.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===D(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ne(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ne(e.attributes.name)||"icon"===ne(e.attributes.rel)||"apple-touch-icon"===ne(e.attributes.rel)||"shortcut icon"===ne(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ne(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ne(e.attributes.property).match(/^(og|twitter|fb):/)||ne(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ne(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===ne(e.attributes.name)||"googlebot"===ne(e.attributes.name)||"bingbot"===ne(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===ne(e.attributes.name)||"generator"===ne(e.attributes.name)||"framework"===ne(e.attributes.name)||"publisher"===ne(e.attributes.name)||"progid"===ne(e.attributes.name)||ne(e.attributes.property).match(/^article:/)||ne(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===ne(e.attributes.name)||"yandex-verification"===ne(e.attributes.name)||"csrf-token"===ne(e.attributes.name)||"p:domain_verify"===ne(e.attributes.name)||"verify-v1"===ne(e.attributes.name)||"verification"===ne(e.attributes.name)||"shopify-checkout-api-token"===ne(e.attributes.name)))return!0}}return!1}(x,m)&&(E||x.type!==p.Text||x.isStyle||x.textContent.replace(/^\s+|\s+$/gm,"").length)?X():P;var L=Object.assign(x,{id:O});if(n.add(e,L),O===P)return null;y&&y(e);var F=!l;if(L.type===p.Element){F=F&&!L.needBlock,delete L.needBlock;var B=S.shadowRoot(e);B&&M(B)&&(L.isShadowHost=!0)}if((L.type===p.Document||L.type===p.Element)&&F){m.headWhitespace&&L.type===p.Element&&"head"===L.tagName&&(E=!1);var _={doc:r,mirror:n,blockClass:o,blockSelector:a,needsMask:T,maskTextClass:i,maskTextSelector:s,skipChild:l,inlineStylesheet:c,maskInputOptions:d,maskTextFn:u,maskInputFn:h,slimDOMOptions:m,dataURLOptions:f,inlineImages:g,recordCanvas:v,preserveWhiteSpace:E,onSerialize:y,onIframeLoad:I,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:A,keepIframeSrcFn:k};if(L.type===p.Element&&"textarea"===L.tagName&&void 0!==L.attributes.value);else for(var Z of Array.from(S.childNodes(e))){var Y=oe(Z,_);Y&&L.childNodes.push(Y)}var W=null;if(w(e)&&(W=S.shadowRoot(e)))for(var G of Array.from(S.childNodes(W))){var V=oe(G,_);V&&(M(W)&&(V.isShadow=!0),L.childNodes.push(V))}}var H=S.parentNode(e);return H&&N(H)&&M(H)&&(L.isShadow=!0),L.type===p.Element&&"iframe"===L.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var o,a=!1;try{o=n.document.readyState}catch(e){return}if("complete"===o){var i="about:blank";if(n.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((()=>{a||(t(),a=!0)}),r);e.addEventListener("load",(()=>{clearTimeout(s),a=!0,t()}))}}}(e,(()=>{var t=e.contentDocument;if(t&&I){var r=oe(t,{doc:t,mirror:n,blockClass:o,blockSelector:a,needsMask:T,maskTextClass:i,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:u,maskInputFn:h,slimDOMOptions:m,dataURLOptions:f,inlineImages:g,recordCanvas:v,preserveWhiteSpace:E,onSerialize:y,onIframeLoad:I,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:A,keepIframeSrcFn:k});r&&I(e,r)}}),b),L.type===p.Element&&"link"===L.tagName&&"string"==typeof L.attributes.rel&&("stylesheet"===L.attributes.rel||"preload"===L.attributes.rel&&"string"==typeof L.attributes.href&&"css"===D(L.attributes.href))&&function(e,t,r){var n,o=!1;try{n=e.sheet}catch(e){return}if(!n){var a=setTimeout((()=>{o||(t(),o=!0)}),r);e.addEventListener("load",(()=>{clearTimeout(a),o=!0,t()}))}}(e,(()=>{if(C){var t=oe(e,{doc:r,mirror:n,blockClass:o,blockSelector:a,needsMask:T,maskTextClass:i,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:u,maskInputFn:h,slimDOMOptions:m,dataURLOptions:f,inlineImages:g,recordCanvas:v,preserveWhiteSpace:E,onSerialize:y,onIframeLoad:I,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:A,keepIframeSrcFn:k});t&&C(e,t)}}),A),L}let ae=class e{constructor(){__publicField2(this,"parentElement",null),__publicField2(this,"parentNode",null),__publicField2(this,"ownerDocument"),__publicField2(this,"firstChild",null),__publicField2(this,"lastChild",null),__publicField2(this,"previousSibling",null),__publicField2(this,"nextSibling",null),__publicField2(this,"ELEMENT_NODE",1),__publicField2(this,"TEXT_NODE",3),__publicField2(this,"nodeType"),__publicField2(this,"nodeName"),__publicField2(this,"RRNodeType")}get childNodes(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};var ie={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},se={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]};var le={};function ce(e){if(le[e])return le[e];var t=function(e){var t,r,n=null===globalThis||void 0===globalThis||null===(t=globalThis.Zone)||void 0===t||null===(r=t.__symbol__)||void 0===r?void 0:r.call(t,e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],r=t.prototype,n=e in ie?ie[e]:void 0,o=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),a=e in se?se[e]:void 0,i=Boolean(a&&a.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(o&&i)return le[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?le[e]=c:r}catch(e){return r}}var de={};function ue(e,t,r){var n,o="".concat(e,".").concat(String(r));if(de[o])return de[o].call(t);var a=ce(e),i=null==(n=Object.getOwnPropertyDescriptor(a,r))?void 0:n.get;return i?(de[o]=i,i.call(t)):t[r]}var he={};function pe(e,t,r){var n="".concat(e,".").concat(String(r));if(he[n])return he[n].bind(t);var o=ce(e)[r];return"function"!=typeof o?t[r]:(he[n]=o,o.bind(t))}function me(){return ce("MutationObserver").constructor}var fe={childNodes:function(e){return ue("Node",e,"childNodes")},parentNode:function(e){return ue("Node",e,"parentNode")},parentElement:function(e){return ue("Node",e,"parentElement")},textContent:function(e){return ue("Node",e,"textContent")},contains:function(e,t){return pe("Node",e,"contains")(t)},getRootNode:function(e){return pe("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?ue("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?ue("Element",e,"shadowRoot"):null},querySelector:function(e,t){return ue("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return ue("Element",e,"querySelectorAll")(t)},mutationObserver:me};function ge(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}var ve="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",ye={map:{},getId:()=>(console.error(ve),-1),getNode:()=>(console.error(ve),null),removeNodeFromMap(){console.error(ve)},has:()=>(console.error(ve),!1),reset(){console.error(ve)}};function Ie(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=null,o=0;return function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];var l=Date.now();o||!1!==r.leading||(o=l);var c=t-(l-o),d=this;c<=0||c>t?(n&&(clearTimeout(n),n=null),o=l,e.apply(d,i)):n||!1===r.trailing||(n=setTimeout((()=>{o=!1===r.leading?0:Date.now(),n=null,e.apply(d,i)}),c))}}function be(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,a=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,n?r:{set(e){setTimeout((()=>{r.set.call(this,e)}),0),a&&a.set&&a.set.call(this,e)}}),()=>be(e,t,a||{},!0)}function Ce(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],o=r(n);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,()=>{e[t]=n}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ye=new Proxy(ye,{get:(e,t,r)=>("map"===t&&console.error(ve),Reflect.get(e,t,r))}));var Se=Date.now;function we(e){var t,r,n,o,a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:a.documentElement.scrollLeft||(null==a?void 0:a.body)&&(null==(t=fe.parentElement(a.body))?void 0:t.scrollLeft)||(null==(r=null==a?void 0:a.body)?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==a?void 0:a.documentElement.scrollTop)||(null==a?void 0:a.body)&&(null==(n=fe.parentElement(a.body))?void 0:n.scrollTop)||(null==(o=null==a?void 0:a.body)?void 0:o.scrollTop)||0}}function Ne(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Me(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ae(e){return e?e.nodeType===e.ELEMENT_NODE?e:fe.parentElement(e):null}function ke(e,t,r,n){if(!e)return!1;var o=Ae(e);if(!o)return!1;try{if("string"==typeof t){if(o.classList.contains(t))return!0;if(n&&null!==o.closest("."+t))return!0}else if(ee(o,t,n))return!0}catch(e){}if(r){if(o.matches(r))return!0;if(n&&null!==o.closest(r))return!0}return!1}function Re(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||t.getId(e)===P}function Te(e,t){if(N(e))return!1;var r=t.getId(e);if(!t.has(r))return!0;var n=fe.parentNode(e);return(!n||n.nodeType!==e.DOCUMENT_NODE)&&(!n||Te(n,t))}function Ee(e){return Boolean(e.changedTouches)}function Oe(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function xe(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Le(e){return!!e&&(e instanceof ae&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(fe.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Se=()=>(new Date).getTime());let De=class{constructor(){d(this,"id",1),d(this,"styleIDMap",new WeakMap),d(this,"idStyleMap",new Map)}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r);var r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function Fe(e){var t,r=null;return"getRootNode"in e&&(null==(t=fe.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&fe.host(fe.getRootNode(e))&&(r=fe.host(fe.getRootNode(e))),r}function Be(e){var t=e.ownerDocument;if(!t)return!1;var r=function(e){for(var t,r=e;t=Fe(r);)r=t;return r}(e);return fe.contains(t,r)}function _e(e){var t=e.ownerDocument;return!!t&&(fe.contains(t,e)||Be(e))}var Ze=(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))(Ze||{}),Ye=(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[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Ye||{}),We=(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))(We||{}),Ge=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ge||{}),Ve=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ve||{}),He=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(He||{});function Pe(e){return"__ln"in e}class Xe{constructor(){d(this,"length",0),d(this,"head",null),d(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Pe(e.previousSibling)){var r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Pe(e.nextSibling)&&e.nextSibling.__ln.previous){var n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}var je,ze=(e,t)=>"".concat(e,"@").concat(t);class Ke{constructor(){d(this,"frozen",!1),d(this,"locked",!1),d(this,"texts",[]),d(this,"attributes",[]),d(this,"attributeMap",new WeakMap),d(this,"removes",[]),d(this,"mapRemoves",[]),d(this,"movedMap",{}),d(this,"addedSet",new Set),d(this,"movedSet",new Set),d(this,"droppedSet",new Set),d(this,"mutationCb"),d(this,"blockClass"),d(this,"blockSelector"),d(this,"maskTextClass"),d(this,"maskTextSelector"),d(this,"inlineStylesheet"),d(this,"maskInputOptions"),d(this,"maskTextFn"),d(this,"maskInputFn"),d(this,"keepIframeSrcFn"),d(this,"recordCanvas"),d(this,"inlineImages"),d(this,"slimDOMOptions"),d(this,"dataURLOptions"),d(this,"doc"),d(this,"mirror"),d(this,"iframeManager"),d(this,"stylesheetManager"),d(this,"shadowDomManager"),d(this,"canvasManager"),d(this,"processedNodeManager"),d(this,"unattachedDoc"),d(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),d(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var e=[],t=new Set,r=new Xe,n=e=>{for(var t=e,r=P;r===P;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},o=o=>{var a=fe.parentNode(o);if(a&&_e(o)&&"TEXTAREA"!==a.tagName){var i=N(a)?this.mirror.getId(Fe(o)):this.mirror.getId(a),s=n(o);if(-1===i||-1===s)return r.addNode(o);var l=oe(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Oe(e,this.mirror)&&this.iframeManager.addIframe(e),xe(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Le(o)&&this.shadowDomManager.addShadowRoot(fe.shadowRoot(o),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});l&&(e.push({parentId:i,nextId:s,node:l}),t.add(l.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var a of this.movedSet)Ue(this.removes,a,this.mirror)&&!this.movedSet.has(fe.parentNode(a))||o(a);for(var i of this.addedSet)qe(this.droppedSet,i)||Ue(this.removes,i,this.mirror)?qe(this.movedSet,i)?o(i):this.droppedSet.add(i):o(i);for(var s=null;r.length;){var l=null;if(s){var c=this.mirror.getId(fe.parentNode(s.value)),d=n(s.value);-1!==c&&-1!==d&&(l=s)}if(!l)for(var u=r.tail;u;){var h=u;if(u=u.previous,h){var p=this.mirror.getId(fe.parentNode(h.value));if(-1===n(h.value))continue;if(-1!==p){l=h;break}var m=h.value,f=fe.parentNode(m);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var g=fe.host(f);if(-1!==this.mirror.getId(g)){l=h;break}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}s=l.previous,r.removeNode(l.value),o(l.value)}var v={texts:this.texts.map((e=>{var t=e.node,r=fe.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{var{attributes:t}=e;if("string"==typeof t.style){var r=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+n).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(v.texts.length||v.attributes.length||v.removes.length||v.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(v))}})),d(this,"genTextAreaValueMutation",(e=>{var t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(fe.childNodes(e),(e=>fe.textContent(e)||"")).join("")})),d(this,"processMutation",(e=>{if(!Re(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":var t=fe.textContent(e.target);ke(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:te(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Ae(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break;case"attributes":var r=e.target,n=e.attributeName,o=e.target.getAttribute(n);if("value"===n){var a=L(r);o=E({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:a,value:o,maskInputFn:this.maskInputFn})}if(ke(e.target,this.blockClass,this.blockSelector,!1)||o===e.oldValue)return;var i=this.attributeMap.get(e.target);if("IFRAME"===r.tagName&&"src"===n&&!this.keepIframeSrcFn(o)){if(r.contentDocument)return;n="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===n&&"INPUT"===r.tagName&&"password"===(e.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!$(r.tagName,n))if(i.attributes[n]=Q(this.doc,O(r.tagName),O(n),o),"style"===n){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}var s=this.unattachedDoc.createElement("span");for(var l of(e.oldValue&&s.setAttribute("style",e.oldValue),Array.from(r.style))){var c=r.style.getPropertyValue(l),d=r.style.getPropertyPriority(l);c!==s.style.getPropertyValue(l)||d!==s.style.getPropertyPriority(l)?i.styleDiff[l]=""===d?c:[c,d]:i._unchangedStyles[l]=[c,d]}for(var u of Array.from(s.style))""===r.style.getPropertyValue(u)&&(i.styleDiff[u]=!1)}else"open"===n&&"DIALOG"===r.tagName&&(r.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break;case"childList":if(ke(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{var r=this.mirror.getId(t),n=N(e.target)?this.mirror.getId(fe.host(e.target)):this.mirror.getId(e.target);ke(e.target,this.blockClass,this.blockSelector,!1)||Re(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Je(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||Te(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ze(r,n)]?Je(this.movedSet,t):this.removes.push({parentId:n,id:r,isShadow:!(!N(e.target)||!M(e.target))||void 0})),this.mapRemoves.push(t))}))}})),d(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Re(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);var r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[ze(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);ke(e,this.blockClass,this.blockSelector,!1)||(fe.childNodes(e).forEach((e=>this.genAdds(e))),Le(e)&&fe.childNodes(fe.shadowRoot(e)).forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}))}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Je(e,t){e.delete(t),fe.childNodes(t).forEach((t=>Je(e,t)))}function Ue(e,t,r){return 0!==e.length&&function(e,t,r){var n=fe.parentNode(t),o=function(){var t=r.getId(n);if(e.some((e=>e.id===t)))return{v:!0};n=fe.parentNode(n)};for(;n;){var a=o();if("object"==typeof a)return a.v}return!1}(e,t,r)}function qe(e,t){return 0!==e.size&&Qe(e,t)}function Qe(e,t){var r=fe.parentNode(t);return!!r&&(!!e.has(r)||Qe(e,r))}var $e=e=>{if(!je)return e;return function(){try{return e(...arguments)}catch(e){if(je&&!0===je(e))return;throw e}}},et=[];function tt(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function rt(e,t){var r=new Ke;et.push(r),r.init(e);var n=new(me())($e(r.processMutations.bind(r)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n}function nt(e){var{mouseInteractionCb:t,doc:n,mirror:o,blockClass:a,blockSelector:i,sampling:s}=e;if(!1===s.mouseInteraction)return()=>{};var l=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,c=[],d=null;return Object.keys(We).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==l[e])).forEach((e=>{var s=O(e),l=(e=>n=>{var s=tt(n);if(!ke(s,a,i,!0)){var l=null,c=e;if("pointerType"in n){switch(n.pointerType){case"mouse":l=Ge.Mouse;break;case"touch":l=Ge.Touch;break;case"pen":l=Ge.Pen}l===Ge.Touch?We[e]===We.MouseDown?c="TouchStart":We[e]===We.MouseUp&&(c="TouchEnd"):Ge.Pen}else Ee(n)&&(l=Ge.Touch);null!==l?(d=l,(c.startsWith("Touch")&&l===Ge.Touch||c.startsWith("Mouse")&&l===Ge.Mouse)&&(l=null)):We[e]===We.Click&&(l=d,d=null);var u=Ee(n)?n.changedTouches[0]:n;if(u){var h=o.getId(s),{clientX:p,clientY:m}=u;$e(t)(r({type:We[c],id:h,x:p,y:m},null!==l&&{pointerType:l}))}}})(e);if(window.PointerEvent)switch(We[e]){case We.MouseDown:case We.MouseUp:s=s.replace("mouse","pointer");break;case We.TouchStart:case We.TouchEnd:return}c.push(ge(s,l,n))})),$e((()=>{c.forEach((e=>e()))}))}function ot(e){var{scrollCb:t,doc:r,mirror:n,blockClass:o,blockSelector:a,sampling:i}=e;return ge("scroll",$e(Ie($e((e=>{var i=tt(e);if(i&&!ke(i,o,a,!0)){var s=n.getId(i);if(i===r&&r.defaultView){var l=we(r.defaultView);t({id:s,x:l.left,y:l.top})}else t({id:s,x:i.scrollLeft,y:i.scrollTop})}})),i.scroll||100)),r)}var at=["INPUT","TEXTAREA","SELECT"],it=new WeakMap;function st(e){return function(e,t){if(ut("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||ut("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||ut("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||ut("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){var n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function lt(e,t,r){var n,o;return e?(e.ownerNode?n=t.getId(e.ownerNode):o=r.getId(e),{styleId:o,id:n}):{}}function ct(e,t){var r,n,o,{mirror:a,stylesheetManager:i}=e,s=null;s="#document"===t.nodeName?a.getId(t):a.getId(fe.host(t));var l="#document"===t.nodeName?null==(r=t.defaultView)?void 0:r.Document:null==(o=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:o.ShadowRoot,c=(null==l?void 0:l.prototype)?Object.getOwnPropertyDescriptor(null==l?void 0:l.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&l&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var e;return null==(e=c.get)?void 0:e.call(this)},set(e){var t,r=null==(t=c.set)?void 0:t.call(this,e);if(null!==s&&-1!==s)try{i.adoptStyleSheets(e,s)}catch(e){}return r}}),$e((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))):()=>{}}function dt(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.doc.defaultView;if(!o)return()=>{};!function(e,t){var{mutationCb:r,mousemoveCb:n,mouseInteractionCb:o,scrollCb:a,viewportResizeCb:i,inputCb:s,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:d,canvasMutationCb:u,fontCb:h,selectionCb:p,customElementCb:m}=e;e.mutationCb=function(){t.mutation&&t.mutation(...arguments),r(...arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove(...arguments),n(...arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction(...arguments),o(...arguments)},e.scrollCb=function(){t.scroll&&t.scroll(...arguments),a(...arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize(...arguments),i(...arguments)},e.inputCb=function(){t.input&&t.input(...arguments),s(...arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction(...arguments),l(...arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule(...arguments),c(...arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration(...arguments),d(...arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation(...arguments),u(...arguments)},e.fontCb=function(){t.font&&t.font(...arguments),h(...arguments)},e.selectionCb=function(){t.selection&&t.selection(...arguments),p(...arguments)},e.customElementCb=function(){t.customElement&&t.customElement(...arguments),m(...arguments)}}(e,n),e.recordDOM&&(t=rt(e,e.doc));var a=function(e){var{mousemoveCb:t,sampling:r,doc:n,mirror:o}=e;if(!1===r.mousemove)return()=>{};var a,i="number"==typeof r.mousemove?r.mousemove:50,s="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,l=[],c=Ie($e((e=>{var r=Date.now()-a;t(l.map((e=>(e.timeOffset-=r,e))),e),l=[],a=null})),s),d=$e(Ie($e((e=>{var t=tt(e),{clientX:r,clientY:n}=Ee(e)?e.changedTouches[0]:e;a||(a=Se()),l.push({x:r,y:n,id:o.getId(t),timeOffset:Se()-a}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?Ye.Drag:e instanceof MouseEvent?Ye.MouseMove:Ye.TouchMove)})),i,{trailing:!1})),u=[ge("mousemove",d,n),ge("touchmove",d,n),ge("drag",d,n)];return $e((()=>{u.forEach((e=>e()))}))}(e),i=nt(e),s=ot(e),l=function(e,t){var{viewportResizeCb:r}=e,{win:n}=t,o=-1,a=-1;return ge("resize",$e(Ie($e((()=>{var e=Ne(),t=Me();o===e&&a===t||(r({width:Number(t),height:Number(e)}),o=e,a=t)})),200)),n)}(e,{win:o}),c=function(e){var{inputCb:t,doc:n,mirror:o,blockClass:a,blockSelector:i,ignoreClass:s,ignoreSelector:l,maskInputOptions:c,maskInputFn:d,sampling:u,userTriggeredOnInput:h}=e;function p(e){var t=tt(e),r=e.isTrusted,o=t&&t.tagName;if(t&&"OPTION"===o&&(t=fe.parentElement(t)),t&&o&&!(at.indexOf(o)<0)&&!ke(t,a,i,!0)&&!(t.classList.contains(s)||l&&t.matches(l))){var u=t.value,p=!1,f=L(t)||"";"radio"===f||"checkbox"===f?p=t.checked:(c[o.toLowerCase()]||c[f])&&(u=E({element:t,maskInputOptions:c,tagName:o,type:f,value:u,maskInputFn:d})),m(t,h?{text:u,isChecked:p,userTriggered:r}:{text:u,isChecked:p});var g=t.name;"radio"===f&&g&&p&&n.querySelectorAll('input[type="radio"][name="'.concat(g,'"]')).forEach((e=>{if(e!==t){var r=e.value;m(e,h?{text:r,isChecked:!p,userTriggered:!1}:{text:r,isChecked:!p})}}))}}function m(e,n){var a=it.get(e);if(!a||a.text!==n.text||a.isChecked!==n.isChecked){it.set(e,n);var i=o.getId(e);$e(t)(r(r({},n),{},{id:i}))}}var f=("last"===u.input?["change"]:["input","change"]).map((e=>ge(e,$e(p),n))),g=n.defaultView;if(!g)return()=>{f.forEach((e=>e()))};var v=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),y=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&f.push(...y.map((e=>be(e[0],e[1],{set(){$e(p)({target:this,isTrusted:!1})}},!1,g)))),$e((()=>{f.forEach((e=>e()))}))}(e),d=function(e){var{mediaInteractionCb:t,blockClass:r,blockSelector:n,mirror:o,sampling:a,doc:i}=e,s=$e((e=>Ie($e((a=>{var i=tt(a);if(i&&!ke(i,r,n,!0)){var{currentTime:s,volume:l,muted:c,playbackRate:d,loop:u}=i;t({type:e,id:o.getId(i),currentTime:s,volume:l,muted:c,playbackRate:d,loop:u})}})),a.media||500))),l=[ge("play",s(He.Play),i),ge("pause",s(He.Pause),i),ge("seeked",s(He.Seeked),i),ge("volumechange",s(He.VolumeChange),i),ge("ratechange",s(He.RateChange),i)];return $e((()=>{l.forEach((e=>e()))}))}(e),u=()=>{},h=()=>{},p=()=>{},m=()=>{};e.recordDOM&&(u=function(e,t){var{styleSheetRuleCb:r,mirror:n,stylesheetManager:o}=e,{win:a}=t;if(!a.CSSStyleSheet||!a.CSSStyleSheet.prototype)return()=>{};var i=a.CSSStyleSheet.prototype.insertRule;a.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:$e(((e,t,a)=>{var[i,s]=a,{id:l,styleId:c}=lt(t,n,o.styleMirror);return(l&&-1!==l||c&&-1!==c)&&r({id:l,styleId:c,adds:[{rule:i,index:s}]}),e.apply(t,a)}))}),a.CSSStyleSheet.prototype.addRule=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.cssRules.length,n="".concat(e," { ").concat(t," }");return a.CSSStyleSheet.prototype.insertRule.apply(this,[n,r])};var s,l,c=a.CSSStyleSheet.prototype.deleteRule;a.CSSStyleSheet.prototype.deleteRule=new Proxy(c,{apply:$e(((e,t,a)=>{var[i]=a,{id:s,styleId:l}=lt(t,n,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&r({id:s,styleId:l,removes:[{index:i}]}),e.apply(t,a)}))}),a.CSSStyleSheet.prototype.removeRule=function(e){return a.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},a.CSSStyleSheet.prototype.replace&&(s=a.CSSStyleSheet.prototype.replace,a.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:$e(((e,t,a)=>{var[i]=a,{id:s,styleId:l}=lt(t,n,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&r({id:s,styleId:l,replace:i}),e.apply(t,a)}))})),a.CSSStyleSheet.prototype.replaceSync&&(l=a.CSSStyleSheet.prototype.replaceSync,a.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:$e(((e,t,a)=>{var[i]=a,{id:s,styleId:l}=lt(t,n,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&r({id:s,styleId:l,replaceSync:i}),e.apply(t,a)}))}));var d={};ht("CSSGroupingRule")?d.CSSGroupingRule=a.CSSGroupingRule:(ht("CSSMediaRule")&&(d.CSSMediaRule=a.CSSMediaRule),ht("CSSConditionRule")&&(d.CSSConditionRule=a.CSSConditionRule),ht("CSSSupportsRule")&&(d.CSSSupportsRule=a.CSSSupportsRule));var u={};return Object.entries(d).forEach((e=>{var[t,a]=e;u[t]={insertRule:a.prototype.insertRule,deleteRule:a.prototype.deleteRule},a.prototype.insertRule=new Proxy(u[t].insertRule,{apply:$e(((e,t,a)=>{var[i,s]=a,{id:l,styleId:c}=lt(t.parentStyleSheet,n,o.styleMirror);return(l&&-1!==l||c&&-1!==c)&&r({id:l,styleId:c,adds:[{rule:i,index:[...st(t),s||0]}]}),e.apply(t,a)}))}),a.prototype.deleteRule=new Proxy(u[t].deleteRule,{apply:$e(((e,t,a)=>{var[i]=a,{id:s,styleId:l}=lt(t.parentStyleSheet,n,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&r({id:s,styleId:l,removes:[{index:[...st(t),i]}]}),e.apply(t,a)}))})})),$e((()=>{a.CSSStyleSheet.prototype.insertRule=i,a.CSSStyleSheet.prototype.deleteRule=c,s&&(a.CSSStyleSheet.prototype.replace=s),l&&(a.CSSStyleSheet.prototype.replaceSync=l),Object.entries(d).forEach((e=>{var[t,r]=e;r.prototype.insertRule=u[t].insertRule,r.prototype.deleteRule=u[t].deleteRule}))}))}(e,{win:o}),h=ct(e,e.doc),p=function(e,t){var{styleDeclarationCb:r,mirror:n,ignoreCSSAttributes:o,stylesheetManager:a}=e,{win:i}=t,s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:$e(((e,t,i)=>{var l,[c,d,u]=i;if(o.has(c))return s.apply(t,[c,d,u]);var{id:h,styleId:p}=lt(null==(l=t.parentRule)?void 0:l.parentStyleSheet,n,a.styleMirror);return(h&&-1!==h||p&&-1!==p)&&r({id:h,styleId:p,set:{property:c,value:d,priority:u},index:st(t.parentRule)}),e.apply(t,i)}))});var l=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:$e(((e,t,i)=>{var s,[c]=i;if(o.has(c))return l.apply(t,[c]);var{id:d,styleId:u}=lt(null==(s=t.parentRule)?void 0:s.parentStyleSheet,n,a.styleMirror);return(d&&-1!==d||u&&-1!==u)&&r({id:d,styleId:u,remove:{property:c},index:st(t.parentRule)}),e.apply(t,i)}))}),$e((()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=l}))}(e,{win:o}),e.collectFonts&&(m=function(e){var{fontCb:t,doc:r}=e,n=r.defaultView;if(!n)return()=>{};var o=[],a=new WeakMap,i=n.FontFace;n.FontFace=function(e,t,r){var n=new i(e,t,r);return a.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};var s=Ce(r.fonts,"add",(function(e){return function(r){return setTimeout($e((()=>{var e=a.get(r);e&&(t(e),a.delete(r))})),0),e.apply(this,[r])}}));return o.push((()=>{n.FontFace=i})),o.push(s),$e((()=>{o.forEach((e=>e()))}))}(e)));var f=function(e){var{doc:t,mirror:r,blockClass:n,blockSelector:o,selectionCb:a}=e,i=!0,s=$e((()=>{var e=t.getSelection();if(!(!e||i&&(null==e?void 0:e.isCollapsed))){i=e.isCollapsed||!1;for(var s=[],l=e.rangeCount||0,c=0;c<l;c++){var d=e.getRangeAt(c),{startContainer:u,startOffset:h,endContainer:p,endOffset:m}=d;ke(u,n,o,!0)||ke(p,n,o,!0)||s.push({start:r.getId(u),startOffset:h,end:r.getId(p),endOffset:m})}a({ranges:s})}}));return s(),ge("selectionchange",s)}(e),g=function(e){var{doc:t,customElementCb:r}=e,n=t.defaultView;return n&&n.customElements?Ce(n.customElements,"define",(function(e){return function(t,n,o){try{r({define:{name:t}})}catch(e){console.warn("Custom element callback failed for ".concat(t))}return e.apply(this,[t,n,o])}})):()=>{}}(e),v=[];for(var y of e.plugins)v.push(y.observer(y.callback,o,y.options));return $e((()=>{et.forEach((e=>e.reset())),null==t||t.disconnect(),a(),i(),s(),l(),c(),d(),u(),h(),p(),m(),f(),g(),v.forEach((e=>e()))}))}function ut(e){return void 0!==window[e]}function ht(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class pt{constructor(e){d(this,"iframeIdToRemoteIdMap",new WeakMap),d(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,n){var o=r||this.getIdToRemoteIdMap(e),a=n||this.getRemoteIdToIdMap(e),i=o.get(t);return i||(i=this.generateIdFn(),o.set(t,i),a.set(i,t)),i}getIds(e,t){var r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,r,n)))}getRemoteId(e,t,r){var n=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;var o=n.get(t);return o||-1}getRemoteIds(e,t){var r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,r)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class mt{constructor(e){d(this,"iframes",new WeakMap),d(this,"crossOriginIframeMap",new WeakMap),d(this,"crossOriginIframeMirror",new pt(X)),d(this,"crossOriginIframeStyleMirror"),d(this,"crossOriginIframeRootIdMap",new WeakMap),d(this,"mirror"),d(this,"mutationCb"),d(this,"wrappedEmit"),d(this,"loadListener"),d(this,"stylesheetManager"),d(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new pt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(n=this.loadListener)||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var r=this.crossOriginIframeMap.get(e.source);if(r){var n=this.transformCrossOriginEvent(r,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}}}transformCrossOriginEvent(e,t){var r;switch(t.type){case Ze.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Ze.IncrementalSnapshot,data:{source:Ye.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Ze.Meta:case Ze.Load:case Ze.DomContentLoaded:return!1;case Ze.Plugin:return t;case Ze.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Ze.IncrementalSnapshot:switch(t.data.source){case Ye.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);var r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case Ye.Drag:case Ye.TouchMove:case Ye.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case Ye.ViewportResize:return!1;case Ye.MediaInteraction:case Ye.MouseInteraction:case Ye.Scroll:case Ye.CanvasMutation:case Ye.Input:return this.replaceIds(t.data,e,["id"]),t;case Ye.StyleSheetRule:case Ye.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Ye.Font:return t;case Ye.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case Ye.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,r,n){for(var o of n)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(r,t[o]):t[o]=e.getId(r,t[o]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===p.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class ft{constructor(e){d(this,"shadowDoms",new WeakSet),d(this,"mutationCb"),d(this,"scrollCb"),d(this,"bypassOptions"),d(this,"mirror"),d(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(M(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var n=rt(r(r({},this.bypassOptions),{},{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(ot(r(r({},this.bypassOptions),{},{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(fe.host(e))),this.restoreHandlers.push(ct({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){var r=this;this.restoreHandlers.push(Ce(e.prototype,"attachShadow",(function(e){return function(n){var o=e.call(this,n),a=fe.shadowRoot(this);return a&&_e(this)&&r.addShadowRoot(a,t),o}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var gt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vt="undefined"==typeof Uint8Array?[]:new Uint8Array(256),yt=0;yt<64;yt++)vt[gt.charCodeAt(yt)]=yt;var It=new Map;var bt=(e,t,r)=>{if(e&&(wt(e,t)||"object"==typeof e)){var n=function(e,t){var r=It.get(e);return r||(r=new Map,It.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name),o=n.indexOf(e);return-1===o&&(o=n.length,n.push(e)),o}};function Ct(e,t,r){if(e instanceof Array)return e.map((e=>Ct(e,t,r)));if(null===e)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)return{rr_type:e.constructor.name,base64:function(e){var t,r=new Uint8Array(e),n=r.length,o="";for(t=0;t<n;t+=3)o+=gt[r[t]>>2],o+=gt[(3&r[t])<<4|r[t+1]>>4],o+=gt[(15&r[t+1])<<2|r[t+2]>>6],o+=gt[63&r[t+2]];return n%3==2?o=o.substring(0,o.length-1)+"=":n%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Ct(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){var n=e.constructor.name,{src:o}=e;return{rr_type:n,src:o}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[Ct(e.data,t,r),e.width,e.height]}:wt(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:bt(e,t,r)}:e}var St=(e,t,r)=>e.map((e=>Ct(e,t,r))),wt=(e,t)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(r.find((r=>e instanceof t[r])))};function Nt(e,t,r,n){var o=[];try{var a=Ce(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(o){for(var a=arguments.length,i=new Array(a>1?a-1:0),s=1;s<a;s++)i[s-1]=arguments[s];if(!ke(this,t,r,!0)){var l=function(e){return"experimental-webgl"===e?"webgl":e}(o);if("__context"in this||(this.__context=l),n&&["webgl","webgl2"].includes(l))if(i[0]&&"object"==typeof i[0]){var c=i[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[o,...i])}}));o.push(a)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach((e=>e()))}}function Mt(e,t,r,n,o,a){var i=[],s=Object.getOwnPropertyNames(e),l=function(s){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(s))return"continue";try{if("function"!=typeof e[s])return"continue";var l=Ce(e,s,(function(e){return function(){for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];var d=e.apply(this,l);if(bt(d,a,this),"tagName"in this.canvas&&!ke(this.canvas,n,o,!0)){var u=St(l,a,this),h={type:t,property:s,args:u};r(this.canvas,h)}return d}}));i.push(l)}catch(n){var c=be(e,s,{set(e){r(this.canvas,{type:t,property:s,args:[e],setter:!0})}});i.push(c)}};for(var c of s)l(c);return i}var At,kt,Rt,Tt,Et="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Ot="undefined"!=typeof window&&window.Blob&&new Blob([(At=Et,Uint8Array.from(atob(At),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});function xt(e){var t;try{if(!(t=Ot&&(window.URL||window.webkitURL).createObjectURL(Ot)))throw"";var r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",(()=>{(window.URL||window.webkitURL).revokeObjectURL(t)})),r}catch(t){return new Worker("data:text/javascript;base64,"+Et,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Lt{constructor(e){d(this,"pendingCanvasMutations",new Map),d(this,"rafStamps",{latestId:0,invokeId:null}),d(this,"mirror"),d(this,"mutationCb"),d(this,"resetObservers"),d(this,"frozen",!1),d(this,"locked",!1),d(this,"processMutation",((e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)}));var{sampling:t="all",win:r,blockClass:n,blockSelector:o,recordCanvas:a,dataURLOptions:i}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&"all"===t&&this.initCanvasMutationObserver(r,n,o),a&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,n,o,{dataURLOptions:i})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,n,a){var i=this,s=Nt(t,r,n,!0),l=new Map,c=new xt;c.onmessage=e=>{var{id:t}=e.data;if(l.set(t,!1),"base64"in e.data){var{base64:r,type:n,width:o,height:a}=e.data;this.mutationCb({id:t,type:Ve["2D"],commands:[{property:"clearRect",args:[0,0,o,a]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:n}]},0,0]}]})}};var d,u=1e3/e,h=0,p=e=>{var s,m;h&&e-h<u?d=requestAnimationFrame(p):(h=e,(s=[],m=e=>{e.querySelectorAll("canvas").forEach((e=>{ke(e,r,n,!0)||s.push(e)})),e.querySelectorAll("*").forEach((e=>{e.shadowRoot&&m(e.shadowRoot)}))},m(t.document),s).forEach(function(){var e=o((function*(e){var t,r=i.mirror.getId(e);if(!l.get(r)&&0!==e.width&&0!==e.height){if(l.set(r,!0),["webgl","webgl2"].includes(e.__context)){var n=e.getContext(e.__context);!1===(null==(t=null==n?void 0:n.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}var o=e.clientWidth||e.width,s=e.clientHeight||e.height,d=yield createImageBitmap(e,{resizeWidth:o,resizeHeight:s});c.postMessage({id:r,bitmap:d,width:o,height:s,dataURLOptions:a.dataURLOptions},[d])}}));return function(t){return e.apply(this,arguments)}}()),d=requestAnimationFrame(p))};d=requestAnimationFrame(p),this.resetObservers=()=>{s(),cancelAnimationFrame(d)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=Nt(e,t,r,!1),o=function(e,t,r,n){var o=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),i=function(a){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[a])return"continue";var i=Ce(t.CanvasRenderingContext2D.prototype,a,(function(o){return function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return ke(this.canvas,r,n,!0)||setTimeout((()=>{var r=St(s,t,this);e(this.canvas,{type:Ve["2D"],property:a,args:r})}),0),o.apply(this,s)}}));o.push(i)}catch(r){var s=be(t.CanvasRenderingContext2D.prototype,a,{set(t){e(this.canvas,{type:Ve["2D"],property:a,args:[t],setter:!0})}});o.push(s)}};for(var s of a)i(s);return()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r),a=function(e,t,r,n){var o=[];return o.push(...Mt(t.WebGLRenderingContext.prototype,Ve.WebGL,e,r,n,t)),void 0!==t.WebGL2RenderingContext&&o.push(...Mt(t.WebGL2RenderingContext.prototype,Ve.WebGL2,e,r,n,t)),()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{n(),o(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{var r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(e);if(r&&-1!==t){var n=r.map((e=>i(e,l))),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:n}),this.pendingCanvasMutations.delete(e)}}}}class Dt{constructor(e){d(this,"trackedLinkElements",new WeakSet),d(this,"mutationCb"),d(this,"adoptedStyleSheetCb"),d(this,"styleMirror",new De),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){var r=this;if(0!==e.length){var n={id:t,styleIds:[]},o=[],a=function(e){var t=void 0;r.styleMirror.has(e)?t=r.styleMirror.getId(e):(t=r.styleMirror.add(e),o.push({styleId:t,rules:Array.from(e.rules||CSSRule,((t,r)=>({rule:k(t,e.href),index:r})))})),n.styleIds.push(t)};for(var i of e)a(i);o.length>0&&(n.styles=o),this.adoptedStyleSheetCb(n)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Ft{constructor(){d(this,"nodeMap",new WeakMap),d(this,"active",!1)}inOtherBuffer(e,t){var r=this.nodeMap.get(e);return r&&Array.from(r).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}var Bt=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){var _t=document.createElement("iframe");document.body.appendChild(_t),Array.from=(null==(s=_t.contentWindow)?void 0:s.Array.from)||Array.from,document.body.removeChild(_t)}}catch(e){console.debug("Unable to override Array.from",e)}var Zt,Yt,Wt=new T;function Gt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{emit:t,checkoutEveryNms:n,checkoutEveryNth:o,blockClass:a="rr-block",blockSelector:i=null,ignoreClass:s="rr-ignore",ignoreSelector:l=null,maskTextClass:c="rr-mask",maskTextSelector:d=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:m,maskInputFn:f,maskTextFn:g,hooks:v,packFn:y,sampling:I={},dataURLOptions:b={},mousemoveWait:C,recordDOM:S=!0,recordCanvas:w=!1,recordCrossOriginIframes:N=!1,recordAfter:M=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:A=!1,collectFonts:k=!1,inlineImages:R=!1,plugins:E,keepIframeSrcFn:O=(()=>!1),ignoreCSSAttributes:x=new Set([]),errorHandler:L}=e;je=L;var D=!N||window.parent===window,F=!1;if(!D)try{window.parent.document&&(F=!1)}catch(e){F=!0}if(D&&!t)throw new Error("emit function is required");if(!D&&!F)return()=>{};void 0!==C&&void 0===I.mousemove&&(I.mousemove=C),Wt.reset();var B,_=!0===h?{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}:void 0!==p?p:{password:!0},Z=!0===m||"all"===m?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===m,headMetaDescKeywords:"all"===m,headTitleMutations:"all"===m}:m||{};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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)}();var Y=0,W=e=>{for(var t of E||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!F&&(e=y(e)),e};kt=(e,r)=>{var a,i=e;if(i.timestamp=Se(),!(null==(a=et[0])?void 0:a.isFrozen())||i.type===Ze.FullSnapshot||i.type===Ze.IncrementalSnapshot&&i.data.source===Ye.Mutation||et.forEach((e=>e.unfreeze())),D)null==t||t(W(i),r);else if(F){var s={type:"rrweb",event:W(i),origin:window.location.origin,isCheckout:r};window.parent.postMessage(s,"*")}if(i.type===Ze.FullSnapshot)B=i,Y=0;else if(i.type===Ze.IncrementalSnapshot){if(i.data.source===Ye.Mutation&&i.data.isAttachIframe)return;Y++;var l=o&&Y>=o,c=n&&i.timestamp-B.timestamp>n;(l||c)&&Rt(!0)}};var G=e=>{kt({type:Ze.IncrementalSnapshot,data:r({source:Ye.Mutation},e)})},V=e=>kt({type:Ze.IncrementalSnapshot,data:r({source:Ye.Scroll},e)}),H=e=>kt({type:Ze.IncrementalSnapshot,data:r({source:Ye.CanvasMutation},e)}),P=new Dt({mutationCb:G,adoptedStyleSheetCb:e=>kt({type:Ze.IncrementalSnapshot,data:r({source:Ye.AdoptedStyleSheet},e)})}),X=new mt({mirror:Wt,mutationCb:G,stylesheetManager:P,recordCrossOriginIframes:N,wrappedEmit:kt});for(var j of E||[])j.getMirror&&j.getMirror({nodeMirror:Wt,crossOriginIframeMirror:X.crossOriginIframeMirror,crossOriginIframeStyleMirror:X.crossOriginIframeStyleMirror});var z=new Ft;Tt=new Lt({recordCanvas:w,mutationCb:H,win:window,blockClass:a,blockSelector:i,mirror:Wt,sampling:I.canvas,dataURLOptions:b});var K=new ft({mutationCb:G,scrollCb:V,bypassOptions:{blockClass:a,blockSelector:i,maskTextClass:c,maskTextSelector:d,inlineStylesheet:u,maskInputOptions:_,dataURLOptions:b,maskTextFn:g,maskInputFn:f,recordCanvas:w,inlineImages:R,sampling:I,slimDOMOptions:Z,iframeManager:X,stylesheetManager:P,canvasManager:Tt,keepIframeSrcFn:O,processedNodeManager:z},mirror:Wt});Rt=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(S){kt({type:Ze.Meta,data:{href:window.location.href,width:Me(),height:Ne()}},e),P.reset(),K.init(),et.forEach((e=>e.lock()));var t=function(e,t){var{mirror:r=new T,blockClass:n="rr-block",blockSelector:o=null,maskTextClass:a="rr-mask",maskTextSelector:i=null,inlineStylesheet:s=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:d=!1,maskTextFn:u,maskInputFn:h,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:I,stylesheetLoadTimeout:b,keepIframeSrcFn:C=(()=>!1)}=t||{};return oe(e,{doc:e,mirror:r,blockClass:n,blockSelector:o,maskTextClass:a,maskTextSelector:i,skipChild:!1,inlineStylesheet:s,maskInputOptions:!0===d?{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}:!1===d?{password:!0}:d,maskTextFn:u,maskInputFn:h,slimDOMOptions:!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===p,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===p?{}:p,dataURLOptions:m,inlineImages:l,recordCanvas:c,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:I,stylesheetLoadTimeout:b,keepIframeSrcFn:C,newlyAddedElement:!1})}(document,{mirror:Wt,blockClass:a,blockSelector:i,maskTextClass:c,maskTextSelector:d,inlineStylesheet:u,maskAllInputs:_,maskTextFn:g,maskInputFn:f,slimDOM:Z,dataURLOptions:b,recordCanvas:w,inlineImages:R,onSerialize:e=>{Oe(e,Wt)&&X.addIframe(e),xe(e,Wt)&&P.trackLinkElement(e),Le(e)&&K.addShadowRoot(fe.shadowRoot(e),document)},onIframeLoad:(e,t)=>{X.attachIframe(e,t),K.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{P.attachLinkElement(e,t)},keepIframeSrcFn:O});if(!t)return console.warn("Failed to snapshot the document");kt({type:Ze.FullSnapshot,data:{node:t,initialOffset:we(window)}},e),et.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&P.adoptStyleSheets(document.adoptedStyleSheets,Wt.getId(document))}};try{var J=[],U=e=>{var t;return $e(dt)({mutationCb:G,mousemoveCb:(e,t)=>kt({type:Ze.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>kt({type:Ze.IncrementalSnapshot,data:r({source:Ye.MouseInteraction},e)}),scrollCb:V,viewportResizeCb:e=>kt({type:Ze.IncrementalSnapshot,data:r({source:Ye.ViewportResize},e)}),inputCb:e=>kt({type:Ze.IncrementalSnapshot,data:r({source:Ye.Input},e)}),mediaInteractionCb:e=>kt({type:Ze.IncrementalSnapshot,data:r({source:Ye.MediaInteraction},e)}),styleSheetRuleCb:e=>kt({type:Ze.IncrementalSnapshot,data:r({source:Ye.StyleSheetRule},e)}),styleDeclarationCb:e=>kt({type:Ze.IncrementalSnapshot,data:r({source:Ye.StyleDeclaration},e)}),canvasMutationCb:H,fontCb:e=>kt({type:Ze.IncrementalSnapshot,data:r({source:Ye.Font},e)}),selectionCb:e=>{kt({type:Ze.IncrementalSnapshot,data:r({source:Ye.Selection},e)})},customElementCb:e=>{kt({type:Ze.IncrementalSnapshot,data:r({source:Ye.CustomElement},e)})},blockClass:a,ignoreClass:s,ignoreSelector:l,maskTextClass:c,maskTextSelector:d,maskInputOptions:_,inlineStylesheet:u,sampling:I,recordDOM:S,recordCanvas:w,inlineImages:R,userTriggeredOnInput:A,collectFonts:k,doc:e,maskInputFn:f,maskTextFn:g,keepIframeSrcFn:O,blockSelector:i,slimDOMOptions:Z,dataURLOptions:b,mirror:Wt,iframeManager:X,stylesheetManager:P,shadowDomManager:K,processedNodeManager:z,canvasManager:Tt,ignoreCSSAttributes:x,plugins:(null==(t=null==E?void 0:E.filter((e=>e.observer)))?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>kt({type:Ze.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},v)};X.addLoadListener((e=>{try{J.push(U(e.contentDocument))}catch(e){console.warn(e)}}));var q=()=>{Rt(),J.push(U(document)),Bt=!0};return"interactive"===document.readyState||"complete"===document.readyState?q():(J.push(ge("DOMContentLoaded",(()=>{kt({type:Ze.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&q()}))),J.push(ge("load",(()=>{kt({type:Ze.Load,data:{}}),"load"===M&&q()}),window))),()=>{J.forEach((e=>e())),z.destroy(),Bt=!1,je=void 0}}catch(e){console.warn(e)}}Gt.addCustomEvent=(e,t)=>{if(!Bt)throw new Error("please add custom event after start recording");kt({type:Ze.Custom,data:{tag:e,payload:t}})},Gt.freezePage=()=>{et.forEach((e=>e.freeze()))},Gt.takeFullSnapshot=e=>{if(!Bt)throw new Error("please take full snapshot after start recording");Rt(e)},Gt.mirror=Wt,(Yt=Zt||(Zt={}))[Yt.NotStarted=0]="NotStarted",Yt[Yt.Running=1]="Running",Yt[Yt.Stopped=2]="Stopped";var Vt,Ht=Object.defineProperty,Pt=(e,t,r)=>((e,t,r)=>t in e?Ht(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Xt=Object.defineProperty,jt=(e,t,r)=>((e,t,r)=>t in e?Xt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),zt=Object.defineProperty,Kt=(e,t,r)=>((e,t,r)=>t in e?zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Jt={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ut={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},qt={};function Qt(e){if(qt[e])return qt[e];var t=globalThis[e],r=t.prototype,n=e in Jt?Jt[e]:void 0,o=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),a=e in Ut?Ut[e]:void 0,i=Boolean(a&&a.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(o&&i)return qt[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?qt[e]=c:r}catch(e){return r}}var $t={};function er(e,t,r){var n,o="".concat(e,".").concat(String(r));if($t[o])return $t[o].call(t);var a=Qt(e),i=null==(n=Object.getOwnPropertyDescriptor(a,r))?void 0:n.get;return i?($t[o]=i,i.call(t)):t[r]}var tr={};function rr(e,t,r){var n="".concat(e,".").concat(String(r));if(tr[n])return tr[n].bind(t);var o=Qt(e)[r];return"function"!=typeof o?t[r]:(tr[n]=o,o.bind(t))}var nr={childNodes:function(e){return er("Node",e,"childNodes")},parentNode:function(e){return er("Node",e,"parentNode")},parentElement:function(e){return er("Node",e,"parentElement")},textContent:function(e){return er("Node",e,"textContent")},contains:function(e,t){return rr("Node",e,"contains")(t)},getRootNode:function(e){return rr("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?er("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?er("Element",e,"shadowRoot"):null},querySelector:function(e,t){return er("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return er("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Qt("MutationObserver").constructor}};class or{constructor(){Kt(this,"idNodeMap",new Map),Kt(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){var t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function ar(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&ar(nr.parentNode(e),t,r);for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}return!!r&&ar(nr.parentNode(e),t,r)}class ir{constructor(){__publicField22(this,"parentElement",null),__publicField22(this,"parentNode",null),__publicField22(this,"ownerDocument"),__publicField22(this,"firstChild",null),__publicField22(this,"lastChild",null),__publicField22(this,"previousSibling",null),__publicField22(this,"nextSibling",null),__publicField22(this,"ELEMENT_NODE",1),__publicField22(this,"TEXT_NODE",3),__publicField22(this,"nodeType"),__publicField22(this,"nodeName"),__publicField22(this,"RRNodeType")}get childNodes(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof ir))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}var sr={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},lr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},cr={};function dr(e){if(cr[e])return cr[e];var t=globalThis[e],r=t.prototype,n=e in sr?sr[e]:void 0,o=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),a=e in lr?lr[e]:void 0,i=Boolean(a&&a.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(o&&i)return cr[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?cr[e]=c:r}catch(e){return r}}var ur={};function hr(e,t,r){var n,o="".concat(e,".").concat(String(r));if(ur[o])return ur[o].call(t);var a=dr(e),i=null==(n=Object.getOwnPropertyDescriptor(a,r))?void 0:n.get;return i?(ur[o]=i,i.call(t)):t[r]}var pr={};function mr(e,t,r){var n="".concat(e,".").concat(String(r));if(pr[n])return pr[n].bind(t);var o=dr(e)[r];return"function"!=typeof o?t[r]:(pr[n]=o,o.bind(t))}var fr={childNodes:function(e){return hr("Node",e,"childNodes")},parentNode:function(e){return hr("Node",e,"parentNode")},parentElement:function(e){return hr("Node",e,"parentElement")},textContent:function(e){return hr("Node",e,"textContent")},contains:function(e,t){return mr("Node",e,"contains")(t)},getRootNode:function(e){return mr("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?hr("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?hr("Element",e,"shadowRoot"):null},querySelector:function(e,t){return hr("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return hr("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return dr("MutationObserver").constructor}};var gr="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",vr={map:{},getId:()=>(console.error(gr),-1),getNode:()=>(console.error(gr),null),removeNodeFromMap(){console.error(gr)},has:()=>(console.error(gr),!1),reset(){console.error(gr)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(vr=new Proxy(vr,{get:(e,t,r)=>("map"===t&&console.error(gr),Reflect.get(e,t,r))}));var yr=Date.now;function Ir(e){return e?e.nodeType===e.ELEMENT_NODE?e:fr.parentElement(e):null}/[1-9][0-9]{12}/.test(Date.now().toString())||(yr=()=>(new Date).getTime());function br(e){var t,r=null;return"getRootNode"in e&&(null==(t=fr.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&fr.host(fr.getRootNode(e))&&(r=fr.host(fr.getRootNode(e))),r}function Cr(e){for(var t,r=e;t=br(r);)r=t;return r}function Sr(e){var t=e.ownerDocument;if(!t)return!1;var r=Cr(e);return fr.contains(t,r)}for(var wr=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){jt(this,"id",1),jt(this,"styleIDMap",new WeakMap),jt(this,"idStyleMap",new Map)}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r);var r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},get _mirror(){return vr},closestElementOfNode:Ir,getBaseDimension:function e(t,r){var n,o,a=null==(o=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:o.frameElement;if(!a||a===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};var i=a.getBoundingClientRect(),s=e(a,r),l=i.height/a.clientHeight;return{x:i.x*s.relativeScale+s.x,y:i.y*s.relativeScale+s.y,relativeScale:l,absoluteScale:s.absoluteScale*l}},getNestedRule:function e(t,r){var n=t[r[0]];return 1===r.length?n:e(n.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){var t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:Cr,getShadowHost:br,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,r,n,o,a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:a.documentElement.scrollLeft||(null==a?void 0:a.body)&&(null==(t=fr.parentElement(a.body))?void 0:t.scrollLeft)||(null==(r=null==a?void 0:a.body)?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==a?void 0:a.documentElement.scrollTop)||(null==a?void 0:a.body)&&(null==(n=fr.parentElement(a.body))?void 0:n.scrollTop)||(null==(o=null==a?void 0:a.body)?void 0:o.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof ir&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(fr.shadowRoot(e)))},hookSetter:function e(t,r,n,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,i=a.Object.getOwnPropertyDescriptor(t,r);return a.Object.defineProperty(t,r,o?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>e(t,r,i||{},!0)},inDom:function(e){var t=e.ownerDocument;return!!t&&(fr.contains(t,e)||Sr(e))},isAncestorRemoved:function e(t,r){if(o=(n=t)&&"host"in n&&"mode"in n&&nr.host(n)||null,Boolean(o&&"shadowRoot"in o&&nr.shadowRoot(o)===n))return!1;var n,o,a=r.getId(t);if(!r.has(a))return!0;var i=fr.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||e(i,r))},isBlocked:function(e,t,r,n){if(!e)return!1;var o=Ir(e);if(!o)return!1;try{if("string"==typeof t){if(o.classList.contains(t))return!0;if(n&&null!==o.closest("."+t))return!0}else if(ar(o,t,n))return!0}catch(e){}if(r){if(o.matches(r))return!0;if(n&&null!==o.closest(r))return!0}return!1},isIgnored:function(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,r){r(t.value);for(var n=t.children.length-1;n>=0;n--)e(t.children[n],r)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return yr},on:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)},patch:function(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],o=r(n);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,()=>{e[t]=n}}catch(e){return()=>{}}},polyfill:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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)},queueToResolveTrees:function(e){var t={},r=(e,r)=>{var n={value:e,parent:r,children:[]};return t[e.node.id]=n,n},n=[];for(var o of e){var{nextId:a,parentId:i}=o;if(a&&a in t){var s=t[a];if(s.parent){var l=s.parent.children.indexOf(s);s.parent.children.splice(l,0,r(o,s.parent))}else{var c=n.indexOf(s);n.splice(c,0,r(o,null))}}else if(i in t){var d=t[i];d.children.push(r(o,d))}else n.push(r(o,null))}return n},shadowHostInDom:Sr,throttle:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=null,o=0;return function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];var l=Date.now();o||!1!==r.leading||(o=l);var c=t-(l-o),d=this;c<=0||c>t?(n&&(clearTimeout(n),n=null),o=l,e.apply(d,i)):n||!1===r.trailing||(n=setTimeout((()=>{o=!1===r.leading?0:Date.now(),n=null,e.apply(d,i)}),c))}},uniqueTextMutations:function(e){for(var t=new Set,r=[],n=e.length;n--;){var o=e[n];t.has(o.id)||(r.push(o),t.add(o.id))}return r}},Symbol.toStringTag,{value:"Module"})),Nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mr="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ar=0;Ar<64;Ar++)Mr[Nr.charCodeAt(Ar)]=Ar;var kr;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),(e=>e.charCodeAt(0))))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],(e=>2*e))[0]){var Rr=document.createElement("iframe");document.body.appendChild(Rr),Array.from=(null==(Vt=Rr.contentWindow)?void 0:Vt.Array.from)||Array.from,document.body.removeChild(Rr)}}catch(e){console.debug("Unable to override Array.from",e)}new or,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(kr||(kr={}));class Tr{constructor(e){Pt(this,"fileName"),Pt(this,"functionName"),Pt(this,"lineNumber"),Pt(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?"".concat(this.functionName," (").concat(this.fileName,":").concat(e,":").concat(t,")"):"".concat(this.fileName,":").concat(e,":").concat(t)}}var Er=/(^|@)\S+:\d+/,Or=/^\s*at .*(\S+:\d+|\(native\))/m,xr=/^(eval@)?(\[native code])?$/,Lr={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Or)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: ".concat(e));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(Or)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=t.match(/ (\((.+):(\d+):(\d+)\)$)/),n=(t=r?t.replace(r[0],""):t).split(/\s+/).slice(1),o=this.extractLocation(r?r[1]:n.pop()),a=n.join(" ")||void 0,i=["eval","<anonymous>"].indexOf(o[0])>-1?void 0:o[0];return new Tr({functionName:a,fileName:i,lineNumber:o[1],columnNumber:o[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(xr)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Tr({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),n=r&&r[1]?r[1]:void 0,o=this.extractLocation(e.replace(t,""));return new Tr({functionName:n,fileName:o[0],lineNumber:o[1],columnNumber:o[2]})}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),n=[],o=2,a=r.length;o<a;o+=2){var i=t.exec(r[o]);i&&n.push(new Tr({fileName:i[2],lineNumber:parseFloat(i[1])}))}return n},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),n=[],o=0,a=r.length;o<a;o+=2){var i=t.exec(r[o]);i&&n.push(new Tr({functionName:i[3]||void 0,fileName:i[2],lineNumber:parseFloat(i[1])}))}return n},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(Er)&&!e.match(/^Error created at/)}),this).map((function(e){var t=e.split("@"),r=this.extractLocation(t.pop()),n=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Tr({functionName:n,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function Dr(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var r=e.localName;if(!r)break;r=r.toLowerCase();var n=e.parentElement,o=[];if(n.children&&n.children.length>0)for(var a=0;a<n.children.length;a++){var i=n.children[a];i.localName&&i.localName.toLowerCase&&i.localName.toLowerCase()===r&&o.push(i)}o.length>1&&(r+=":eq(".concat(o.indexOf(e),")")),t=r+(t?">"+t:""),e=n}return t}function Fr(e){return"[object Object]"===Object.prototype.toString.call(e)}function Br(e,t){if(0===t)return!0;var r=Object.keys(e);for(var n of r)if(Fr(e[n])&&Br(e[n],t-1))return!0;return!1}function _r(e,t){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);var n=[],o=[];return JSON.stringify(e,(function(e,t){if(n.length>0){var a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?o.splice(a,1/0,e):o.push(e),~n.indexOf(t)&&(t=n[0]===t?"[Circular ~]":"[Circular ~."+o.slice(0,n.indexOf(t)).join(".")+"]")}else n.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Fr(e)&&Object.keys(e).length>r.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Fr(e)&&Br(e,r.depthOfLimit))return!0;return!1}(t))return function(e){var t=e.toString();r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t="".concat(t.slice(0,r.stringLengthLimit),"..."));return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){var i={};for(var s in t){var l=t[s];Array.isArray(l)?i[s]=Dr(l.length?l[0]:null):i[s]=l}return i}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t}))}var Zr={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Yr(e,t,r){var n,o=r?Object.assign({},Zr,r):Zr,a=o.logger;if(!a)return()=>{};n="string"==typeof a?t[a]:a;var i=0,s=!1,l=[];if(o.level.includes("error")){var c=t=>{var r=t.message,n=t.error,a=Lr.parse(n).map((e=>e.toString())),i=[_r(r,o.stringifyOptions)];e({level:"error",trace:a,payload:i})};t.addEventListener("error",c),l.push((()=>{t.removeEventListener("error",c)}));var d=t=>{var r,n;t.reason instanceof Error?(r=t.reason,n=[_r("Uncaught (in promise) ".concat(r.name,": ").concat(r.message),o.stringifyOptions)]):(r=new Error,n=[_r("Uncaught (in promise)",o.stringifyOptions),_r(t.reason,o.stringifyOptions)]);var a=Lr.parse(r).map((e=>e.toString()));e({level:"error",trace:a,payload:n})};t.addEventListener("unhandledrejection",d),l.push((()=>{t.removeEventListener("unhandledrejection",d)}))}for(var u of o.level)l.push(h(n,u));return()=>{l.forEach((e=>e()))};function h(t,r){var n=this;return t[r]?wr.patch(t,r,(t=>function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];if(t.apply(n,l),!("assert"===r&&l[0]||s)){s=!0;try{var d=Lr.parse(new Error).map((e=>e.toString())).splice(1),u=("assert"===r?l.slice(1):l).map((e=>_r(e,o.stringifyOptions)));++i<o.lengthThreshold?e({level:r,trace:d,payload:u}):i===o.lengthThreshold&&e({level:"warn",trace:[],payload:[_r("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...l)}finally{s=!1}}})):()=>{}}}var Wr=e=>({name:"rrweb/console@1",observer:Yr,options:e}),Gr="undefined"!=typeof window?window:void 0,Vr="undefined"!=typeof globalThis?globalThis:Gr,Hr=Array.prototype.forEach,Pr=null==Vr?void 0:Vr.navigator;null==Vr||Vr.document,null==Vr||Vr.location,null==Vr||Vr.fetch,null!=Vr&&Vr.XMLHttpRequest&&"withCredentials"in new Vr.XMLHttpRequest&&Vr.XMLHttpRequest,null==Vr||Vr.AbortController,null==Pr||Pr.userAgent;var Xr,jr=null!=Gr?Gr:{};!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(Xr||(Xr={}));var zr=Array.isArray,Kr=Object.prototype,Jr=Kr.hasOwnProperty,Ur=Kr.toString,qr=zr||function(e){return"[object Array]"===Ur.call(e)},Qr=e=>"function"==typeof e,$r=e=>e===Object(e)&&!qr(e),en=e=>void 0===e,tn=e=>"[object String]"==Ur.call(e),rn=e=>null===e,nn=e=>en(e)||rn(e),on=e=>"[object Boolean]"===Ur.call(e),an=e=>e instanceof Document,sn=e=>e instanceof FormData,ln=e=>{var t={_log:function(t){if(Gr&&jr.POSTHOG_DEBUG&&!en(Gr.console)&&Gr.console){for(var r=("__rrweb_original__"in Gr.console[t]?Gr.console[t].__rrweb_original__:Gr.console[t]),n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];r(e,...o)}},info:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t._log("log",...r)},warn:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t._log("warn",...r)},error:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t._log("error",...r)},critical:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];console.error(e,...r)},uninitializedWarning:e=>{t.error("You must initialize PostHog before calling ".concat(e))},createLogger:t=>ln("".concat(e," ").concat(t))};return t},cn=ln("[PostHog.js]").createLogger,dn={};function un(e,t,r){if(!nn(e)){if(qr(e))return function(e,t,r){if(qr(e))if(Hr&&e.forEach===Hr)e.forEach(t,r);else if("length"in e&&e.length===+e.length)for(var n=0,o=e.length;n<o;n++)if(n in e&&t.call(r,e[n],n)===dn)return}(e,t,r);if(sn(e)){for(var n of e.entries())if(t.call(r,n[1],n[0])===dn)return}else for(var o in e)if(Jr.call(e,o)&&t.call(r,e[o],o)===dn)return}}var hn=function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&",o=[];return un(e,(function(e,n){en(e)||en(n)||"undefined"===n||(t=encodeURIComponent(e instanceof File?e.name:e.toString()),r=encodeURIComponent(n),o[o.length]=r+"="+t)})),o.join(n)},pn={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:e=>e,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com"]};function mn(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],o=r(n);return Qr(o)&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=o,()=>{e[t]=n}}catch(e){return()=>{}}}function fn(e,t){var r,n=function(e){try{return"string"==typeof e?new URL(e).hostname:"url"in e?new URL(e.url).hostname:e.hostname}catch(e){return null}}(e),o={hostname:n,isHostDenied:!1};if(null===(r=t.payloadHostDenyList)||void 0===r||!r.length||null==n||!n.trim().length)return o;for(var a of t.payloadHostDenyList)if(n.endsWith(a))return{hostname:n,isHostDenied:!0};return o}var gn=cn("[Recorder]"),vn=e=>"navigation"===e.entryType,yn=e=>"resource"===e.entryType;function In(e,t){for(var r=e.length-1;r>=0;r-=1)if(t(e[r]))return e[r]}function bn(e,t,r){if(r.recordInitialRequests){var n=t.performance.getEntries().filter((e=>vn(e)||yn(e)&&r.initiatorTypes.includes(e.initiatorType)));e({requests:n.flatMap((e=>kn({entry:e,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var o=new t.PerformanceObserver((t=>{var n=t.getEntries().filter((e=>vn(e)||yn(e)&&r.initiatorTypes.includes(e.initiatorType)&&(e=>!r.recordBody&&!r.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:n.flatMap((e=>kn({entry:e,method:void 0,status:void 0,networkRequest:{}})))})})),a=PerformanceObserver.supportedEntryTypes.filter((e=>r.performanceEntryTypeToObserve.includes(e)));return o.observe({entryTypes:a}),()=>{o.disconnect()}}function Cn(e,t){return!!t&&(on(t)||t[e])}function Sn(e){var{type:t,recordBody:r,headers:n}=e;function o(e){var t=Object.keys(n).find((e=>"content-type"===e.toLowerCase())),r=t&&n[t];return e.some((e=>null==r?void 0:r.includes(e)))}if(!r)return!1;if(on(r))return!0;if(qr(r))return o(r);var a=r[t];return on(a)?a:o(a)}function wn(e,t,r,n,o){return Nn.apply(this,arguments)}function Nn(){return Nn=o((function*(e,t,r,n,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(a>10)return gn.warn("Failed to get performance entry for request",{url:r,initiatorType:t}),null;var i=In(e.performance.getEntriesByName(r),(e=>yn(e)&&e.initiatorType===t&&(en(n)||e.startTime>=n)&&(en(o)||e.startTime<=o)));return i||(yield new Promise((e=>setTimeout(e,50*a))),wn(e,t,r,n,o,a+1))})),Nn.apply(this,arguments)}function Mn(e){var{body:t,options:r,url:n}=e;if(nn(t))return null;var{hostname:o,isHostDenied:a}=fn(n,r);if(a)return o+" is in deny list";if(tn(t))return t;if(an(t))return t.textContent;if(sn(t))return hn(t);if($r(t))try{return JSON.stringify(t)}catch(e){return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(t)}var An=e=>!rn(e)&&("navigation"===e.entryType||"resource"===e.entryType);function kn(e){var{entry:t,method:n,status:o,networkRequest:a,isInitial:i,start:s,end:l,url:c,initiatorType:d}=e;s=t?t.startTime:s,l=t?t.responseEnd:l;var u=Math.floor(Date.now()-performance.now()),h=Math.floor(u+(s||0)),p=[r(r({},t?t.toJSON():{name:c}),{},{startTime:en(s)?void 0:Math.round(s),endTime:en(l)?void 0:Math.round(l),timeOrigin:u,timestamp:h,method:n,initiatorType:d||(t?t.initiatorType:void 0),status:o,requestHeaders:a.requestHeaders,requestBody:a.requestBody,responseHeaders:a.responseHeaders,responseBody:a.responseBody,isInitial:i})];if(An(t))for(var m of t.serverTiming||[])p.push({timeOrigin:u,timestamp:h,startTime:Math.round(t.startTime),name:m.name,duration:m.duration,entryType:"serverTiming"});return p}var Rn=["video/","audio/"];function Tn(e){return new Promise(((t,r)=>{var n=setTimeout((()=>t("[SessionReplay] Timeout while trying to read body")),500);try{e.clone().text().then((e=>t(e)),(e=>r(e))).finally((()=>clearTimeout(n)))}catch(e){clearTimeout(n),t("[SessionReplay] Failed to read body")}}))}function En(){return(En=o((function*(e){var{r:t,options:r,url:n}=e,{hostname:o,isHostDenied:a}=fn(n,r);return a?Promise.resolve(o+" is in deny list"):Tn(t)}))).apply(this,arguments)}function On(){return(On=o((function*(e){var{r:t,options:r,url:n}=e,o=function(e){var t,{r:r,options:n,url:o}=e;if("chunked"===r.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var a=null===(t=r.headers.get("Content-Type"))||void 0===t?void 0:t.toLowerCase(),i=Rn.some((e=>null==a?void 0:a.startsWith(e)));if(a&&i)return"Content-Type ".concat(a," is not supported");var{hostname:s,isHostDenied:l}=fn(o,n);return l?s+" is in deny list":null}({r:t,options:r,url:n});return rn(o)?Tn(t):Promise.resolve(o)}))).apply(this,arguments)}function xn(e,t,r){if(!r.initiatorTypes.includes("fetch"))return()=>{};var n=Cn("request",r.recordHeaders),a=Cn("response",r.recordHeaders),i=mn(t,"fetch",(i=>function(){var s=o((function*(o,s){var l,c,d,u=new Request(o,s),h={};try{var p={};u.headers.forEach(((e,t)=>{p[t]=e})),n&&(h.requestHeaders=p),Sn({type:"request",headers:p,url:o,recordBody:r.recordBody})&&(h.requestBody=yield function(e){return En.apply(this,arguments)}({r:u,options:r,url:o})),c=t.performance.now(),l=yield i(u),d=t.performance.now();var m={};return l.headers.forEach(((e,t)=>{m[t]=e})),a&&(h.responseHeaders=m),Sn({type:"response",headers:m,url:o,recordBody:r.recordBody})&&(h.responseBody=yield function(e){return On.apply(this,arguments)}({r:l,options:r,url:o})),l}finally{wn(t,"fetch",u.url,c,d).then((t=>{var r,n=kn({entry:t,method:u.method,status:null===(r=l)||void 0===r?void 0:r.status,networkRequest:h,start:c,end:d,url:u.url,initiatorType:"fetch"});e({requests:n})})).catch((()=>{}))}}));return function(e,t){return s.apply(this,arguments)}}()));return()=>{i()}}var Ln=null;function Dn(e,t,n){if(!("performance"in t))return()=>{};if(Ln)return gn.warn("Network observer already initialised, doing nothing"),()=>{};var o=n?Object.assign({},pn,n):pn,a=t=>{var n=[];t.requests.forEach((e=>{var t=o.maskRequestFn(e);t&&n.push(t)})),n.length>0&&e(r(r({},t),{},{requests:n}))},i=bn(a,t,o),s=()=>{},l=()=>{};return(o.recordHeaders||o.recordBody)&&(s=function(e,t,r){if(!r.initiatorTypes.includes("xmlhttprequest"))return()=>{};var n=Cn("request",r.recordHeaders),o=Cn("response",r.recordHeaders),a=mn(t.XMLHttpRequest.prototype,"open",(a=>function(i,s){var l,c,d=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],u=arguments.length>3?arguments[3]:void 0,h=arguments.length>4?arguments[4]:void 0,p=this,m=new Request(s),f={},g={},v=p.setRequestHeader.bind(p);p.setRequestHeader=(e,t)=>(g[e]=t,v(e,t)),n&&(f.requestHeaders=g);var y=p.send.bind(p);p.send=e=>(Sn({type:"request",headers:g,url:s,recordBody:r.recordBody})&&(f.requestBody=Mn({body:e,options:r,url:s})),l=t.performance.now(),y(e)),p.addEventListener("readystatechange",(()=>{if(p.readyState===p.DONE){c=t.performance.now();var n={};p.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((e=>{var t=e.split(": "),r=t.shift(),o=t.join(": ");r&&(n[r]=o)})),o&&(f.responseHeaders=n),Sn({type:"response",headers:n,url:s,recordBody:r.recordBody})&&(f.responseBody=Mn({body:p.response,options:r,url:s})),wn(t,"xmlhttprequest",m.url,l,c).then((t=>{var r=kn({entry:t,method:i,status:null==p?void 0:p.status,networkRequest:f,start:l,end:c,url:s.toString(),initiatorType:"xmlhttprequest"});e({requests:r})})).catch((()=>{}))}})),a.call(p,i,s,d,u,h)}));return()=>{a()}}(a,t,o),l=xn(a,t,o)),Ln=()=>{i(),s(),l()}}var Fn="rrweb/network@1",Bn=e=>({name:Fn,observer:Dn,options:e});jr.__PosthogExtensions__=jr.__PosthogExtensions__||{},jr.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:Wr,getRecordNetworkPlugin:Bn},jr.__PosthogExtensions__.rrweb={record:Gt,version:"v2"},jr.rrweb={record:Gt,version:"v2"},jr.rrwebConsoleRecord={getRecordConsolePlugin:Wr},jr.getRecordNetworkPlugin=Bn,e.NETWORK_PLUGIN_NAME=Fn,e.default=Gt,e.findLast=In,e.getRecordNetworkPlugin=Bn,Object.defineProperty(e,"__esModule",{value:!0})}({});
|
|
2
2
|
//# sourceMappingURL=recorder.js.map
|