!function(){"use strict";var e;function t(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function n(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function o(e){try{var t=e.rules||e.cssRules;return t?((n=Array.from(t).map(r).join("")).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),n):null}catch(e){return null}var n}function r(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=o(e.styleSheet)||t}catch(e){}return t}!function(e){e[e["Document"]=0]="Document",e[e["DocumentType"]=1]="DocumentType",e[e["Element"]=2]="Element",e[e["Text"]=3]="Text",e[e["CDATA"]=4]="CDATA",e[e["Comment"]=5]="Comment"}(e||(e={}));var a=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=n?n:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap["delete"](n),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var n=this.getNode(e);if(n){var o=this.nodeMetaMap.get(n);o&&this.nodeMetaMap.set(t,o)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function s(e){var t=e.maskInputOptions,n=e.tagName,o=e.type,r=e.value,a=e.maskInputFn,s=r||"";return(t[n.toLowerCase()]||t[o])&&(s=a?a(s):"*".repeat(s.length)),s}var i="__rrweb_original__";var c,l,d=1,u=new RegExp("[^a-z0-9-_:]"),h=-2;function p(){return d++}var g=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,m=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,I=/^(data:)([^,]*),(.*)/i;function C(e,t){return(e||"").replace(g,function(e,n,o,r,a,s){var i,c=o||a||s,l=n||r||"";if(!c)return e;if(!m.test(c))return"url(".concat(l).concat(c).concat(l,")");if(I.test(c))return"url(".concat(l).concat(c).concat(l,")");if("/"===c[0])return"url(".concat(l).concat((i=t,(i.indexOf("//")>-1?i.split("/").slice(0,3).join("/"):i.split("/")[0]).split("?")[0]+c)).concat(l,")");var d=t.split("/"),u=c.split("/");d.pop();for(var h=0,p=u;h
=t.length));){var a=o(f);if(","===a.slice(-1))a=S(e,a.substring(0,a.length-1)),r.push(a);else{var s="";a=S(e,a);for(var i=!1;1;){var c=t.charAt(n);if(""===c){r.push((a+s).trim());break}if(i)")"===c&&(i=!1);else{if(","===c){n+=1,r.push((a+s).trim());break}"("===c&&(i=!0)}s+=c,n+=1}}}return r.join(", ")}(e,o):"style"===n&&o?C(o,v()):"object"===t&&"data"===n&&o?S(e,o):o:S(e,o)}function k(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&k(e.parentNode,t,n);for(var o=e.classList.length;o--;){var r=e.classList[o];if(t.test(r))return!0}return!!n&&k(e.parentNode,t,n)}function w(e,t,n){var o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===o)return!1;if("string"==typeof t){if(o.classList.contains(t))return!0;if(o.closest(".".concat(t)))return!0}else if(k(o,t,!0))return!0;if(n){if(o.matches(n))return!0;if(o.closest(n))return!0}return!1}function M(t,n){var r=n.doc,a=n.mirror,d=n.blockClass,h=n.blockSelector,p=n.maskTextClass,g=n.maskTextSelector,m=n.inlineStylesheet,I=n.maskInputOptions,f=void 0===I?{}:I,y=n.maskTextFn,S=n.maskInputFn,k=n.dataURLOptions,M=void 0===k?{}:k,T=n.inlineImages,N=n.recordCanvas,R=n.keepIframeSrcFn,E=n.newlyAddedElement,O=void 0!==E&&E,F=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(r,a);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:e.Document,childNodes:[],compatMode:t.compatMode}:{type:e.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:F};case t.ELEMENT_NODE:return function(t,n){for(var r=n.doc,a=n.blockClass,d=n.blockSelector,h=n.inlineStylesheet,p=n.maskInputOptions,g=void 0===p?{}:p,m=n.maskInputFn,I=n.dataURLOptions,f=void 0===I?{}:I,y=n.inlineImages,S=n.recordCanvas,k=n.keepIframeSrcFn,w=n.newlyAddedElement,M=void 0!==w&&w,T=n.rootId,N=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var o=e.classList.length;o--;){var r=e.classList[o];if(t.test(r))return!0}return!!n&&e.matches(n)}(t,a,d),R=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return u.test(t)?"div":t}(t),E={},O=t.attributes.length,F=0;Fn.removeEventListener(e,t,o)}const E="Please stop import mirror directly. Instead of that,"+"\r\n"+"now you can use replayer.getMirror() to access the mirror instance of a replayer,"+"\r\n"+"or you can use record.mirror to access the mirror instance during recording.";let O={map:{},getId:()=>(console.error(E),-1),getNode:()=>(console.error(E),null),removeNodeFromMap(){console.error(E)},has:()=>(console.error(E),!1),reset(){console.error(E)}};function F(e,t,n={}){let o=null,r=0;return function(...a){const s=Date.now();r||!1!==n.leading||(r=s);const i=t-(s-r),c=this;i<=0||i>t?(o&&(clearTimeout(o),o=null),r=s,e.apply(c,a)):o||!1===n.trailing||(o=setTimeout(()=>{r=!1===n.leading?0:Date.now(),o=null,e.apply(c,a)},i))}}function x(e,t,n,o,r=window){const a=r.Object.getOwnPropertyDescriptor(e,t);return r.Object.defineProperty(e,t,o?n:{set(e){setTimeout(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>x(e,t,a||{},!0)}function L(e,t,n){try{if(!(t in e))return()=>{};const o=e[t],r=n(o);return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=r,()=>{e[t]=o}}catch(e){return()=>{}}}function D(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function W(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Z(e,t,n,o){if(!e)return!1;const r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!r)return!1;if("string"==typeof t){if(r.classList.contains(t))return!0;if(o&&null!==r.closest("."+t))return!0}else if(k(r,t,o))return!0;if(n){if(e.matches(n))return!0;if(o&&null!==r.closest(n))return!0}return!1}function B(e,t){return t.getId(e)===h}function G(e,n){if(t(e))return!1;const o=n.getId(e);return!n.has(o)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||G(e.parentNode,n))}function V(e){return Boolean(e.changedTouches)}function U(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function K(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Y(e){return Boolean(null==e?void 0:e.shadowRoot)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(O=new Proxy(O,{get:(e,t,n)=>("map"===t&&console.error(E),Reflect.get(e,t,n))}));class _{constructor(){this.id=1,this.styleIDMap=new WeakMap,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){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}var J=(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))(J||{}),z=(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))(z||{}),Q=(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))(Q||{}),H=(e=>(e[e["2D"]=0]="2D",e[e["WebGL"]=1]="WebGL",e[e["WebGL2"]=2]="WebGL2",e))(H||{});function X(e){return"__ln"in e}class j{constructor(){this.length=0,this.head=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n`${e}@${t}`;class q{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],n=new j,o=e=>{let t=e,n=h;for(;n===h;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},r=r=>{var a,s,i,c;let l=null;(null===(s=null===(a=r.getRootNode)||void 0===a?void 0:a.call(r))||void 0===s?void 0:s.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&r.getRootNode().host&&(l=r.getRootNode().host);let d=l;for(;(null===(c=null===(i=null==d?void 0:d.getRootNode)||void 0===i?void 0:i.call(d))||void 0===c?void 0:c.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&d.getRootNode().host;)d=d.getRootNode().host;const u=!(this.doc.contains(r)||d&&this.doc.contains(d));if(!r.parentNode||u)return;const h=t(r.parentNode)?this.mirror.getId(l):this.mirror.getId(r.parentNode),p=o(r);if(-1===h||-1===p)return n.addNode(r);const g=N(r,{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=>{U(e,this.mirror)&&this.iframeManager.addIframe(e),K(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Y(r)&&this.shadowDomManager.addShadowRoot(r.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});g&&e.push({parentId:h,nextId:p,node:g})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of Array.from(this.movedSet.values()))ee(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||r(e);for(const e of Array.from(this.addedSet.values()))ne(this.droppedSet,e)||ee(this.removes,e,this.mirror)?ne(this.movedSet,e)?r(e):this.droppedSet.add(e):r(e);let a=null;for(;n.length;){let e=null;if(a){const t=this.mirror.getId(a.value.parentNode),n=o(a.value);-1!==t&&-1!==n&&(e=a)}if(!e)for(let t=n.length-1;t>=0;t--){const r=n.get(t);if(r){const t=this.mirror.getId(r.value.parentNode);if(-1===o(r.value))continue;if(-1!==t){e=r;break}{const t=r.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const n=t.parentNode.host;if(-1!==this.mirror.getId(n)){e=r;break}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}a=e.previous,n.removeNode(e.value),r(e.value)}const s={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>({id:this.mirror.getId(e.node),attributes:e.attributes})).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(s.texts.length||s.attributes.length||s.removes.length||s.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=e=>{if(!B(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;Z(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:w(e.target,this.maskTextClass,this.maskTextSelector)&&t?this.maskTextFn?this.maskTextFn(t):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.target.getAttribute(e.attributeName);if("value"===e.attributeName&&(n=s({maskInputOptions:this.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),Z(e.target,this.blockClass,this.blockSelector,!1)||n===e.oldValue)return;let o=this.attributes.find(t=>t.node===e.target);if("IFRAME"===t.tagName&&"src"===e.attributeName&&!this.keepIframeSrcFn(n)){if(t.contentDocument)return;e.attributeName="rr_src"}if(o||(o={node:e.target,attributes:{}},this.attributes.push(o)),"style"===e.attributeName){const n=this.doc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue),void 0!==o.attributes.style&&null!==o.attributes.style||(o.attributes.style={});const r=o.attributes.style;for(const e of Array.from(t.style)){const o=t.style.getPropertyValue(e),a=t.style.getPropertyPriority(e);o===n.style.getPropertyValue(e)&&a===n.style.getPropertyPriority(e)||(r[e]=""===a?o:[o,a])}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(r[e]=!1)}else o.attributes[e.attributeName]=A(this.doc,t.tagName,e.attributeName,n);break}case"childList":if(Z(e.target,this.blockClass,this.blockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(o=>{const r=this.mirror.getId(o),a=t(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Z(e.target,this.blockClass,this.blockSelector,!1)||B(o,this.mirror)||!function(e,t){return-1!==t.getId(e)}(o,this.mirror)||(this.addedSet.has(o)?($(this.addedSet,o),this.droppedSet.add(o)):this.addedSet.has(e.target)&&-1===r||G(e.target,this.mirror)||(this.movedSet.has(o)&&this.movedMap[P(r,a)]?$(this.movedSet,o):this.removes.push({parentId:a,id:r,isShadow:!(!t(e.target)||!n(e.target))||void 0})),this.mapRemoves.push(o))})}},this.genAdds=(e,t)=>{if(this.mirror.hasNode(e)){if(B(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[P(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Z(e,this.blockClass,this.blockSelector,!1)||e.childNodes.forEach(e=>this.genAdds(e))}}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].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 $(e,t){e.delete(t),t.childNodes.forEach(t=>$(e,t))}function ee(e,t,n){return 0!==e.length&&te(e,t,n)}function te(e,t,n){const{parentNode:o}=t;if(!o)return!1;const r=n.getId(o);return!!e.some(e=>e.id===r)||te(e,o,n)}function ne(e,t){return 0!==e.size&&oe(e,t)}function oe(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||oe(e,n))}const re=[],ae="undefined"!=typeof CSSGroupingRule,se="undefined"!=typeof CSSMediaRule,ie="undefined"!=typeof CSSSupportsRule,ce="undefined"!=typeof CSSConditionRule;function le(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(t){return e.target}}function de(e,t){var n,o;const r=new q;re.push(r),r.init(e);let a=window.MutationObserver||window.__rrMutationObserver;const s=null===(o=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===o?void 0:o.call(n,"MutationObserver");s&&window[s]&&(a=window[s]);const i=new a(r.processMutations.bind(r));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function ue({mouseInteractionCb:e,doc:t,mirror:n,blockClass:o,blockSelector:r,sampling:a}){if(!1===a.mouseInteraction)return()=>{};const s=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,i=[];return Object.keys(Q).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]).forEach(a=>{const s=a.toLowerCase(),c=(t=>a=>{const s=le(a);if(Z(s,o,r,!0))return;const i=V(a)?a.changedTouches[0]:a;if(!i)return;const c=n.getId(s),{clientX:l,clientY:d}=i;e({type:Q[t],id:c,x:l,y:d})})(a);i.push(R(s,c,t))}),()=>{i.forEach(e=>e())}}function he({scrollCb:e,doc:t,mirror:n,blockClass:o,blockSelector:r,sampling:a}){return R("scroll",F(a=>{const s=le(a);if(!s||Z(s,o,r,!0))return;const i=n.getId(s);if(s===t){const n=t.scrollingElement||t.documentElement;e({id:i,x:n.scrollLeft,y:n.scrollTop})}else e({id:i,x:s.scrollLeft,y:s.scrollTop})},a.scroll||100),t)}function pe(e,t){const n=Object.assign({},e);return t||delete n.userTriggered,n}const ge=["INPUT","TEXTAREA","SELECT"],me=new WeakMap;function Ie(e){return function(e,t){if(ae&&e.parentRule instanceof CSSGroupingRule||se&&e.parentRule instanceof CSSMediaRule||ie&&e.parentRule instanceof CSSSupportsRule||ce&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function Ce(e,t,n){let o,r;return e?(e.ownerNode?o=t.getId(e.ownerNode):r=n.getId(e),{styleId:r,id:o}):{}}function fe({mirror:e,stylesheetManager:t},n){var o,r,a;let s=null;s="#document"===n.nodeName?e.getId(n):e.getId(n.host);const i="#document"===n.nodeName?null===(o=n.defaultView)||void 0===o?void 0:o.Document:null===(a=null===(r=n.ownerDocument)||void 0===r?void 0:r.defaultView)||void 0===a?void 0:a.ShadowRoot,c=Object.getOwnPropertyDescriptor(null==i?void 0:i.prototype,"adoptedStyleSheets");return null!==s&&-1!==s&&i&&c?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var e;return null===(e=c.get)||void 0===e?void 0:e.call(this)},set(e){var n;const o=null===(n=c.set)||void 0===n?void 0:n.call(this,e);if(null!==s&&-1!==s)try{t.adoptStyleSheets(e,s)}catch(e){}return o}}),()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}):()=>{}}function ye(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};!function(e,t){const{mutationCb:n,mousemoveCb:o,mouseInteractionCb:r,scrollCb:a,viewportResizeCb:s,inputCb:i,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:d,canvasMutationCb:u,fontCb:h,selectionCb:p}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),n(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),o(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),r(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),a(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),s(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),i(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),c(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),l(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),d(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),u(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),h(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),p(...e)}}(e,t);const o=de(e,e.doc),r=function({mousemoveCb:e,sampling:t,doc:n,mirror:o}){if(!1===t.mousemove)return()=>{};const r="number"==typeof t.mousemove?t.mousemove:50,a="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let s,i=[];const c=F(t=>{const n=Date.now()-s;e(i.map(e=>(e.timeOffset-=n,e)),t),i=[],s=null},a),l=F(e=>{const t=le(e),{clientX:n,clientY:r}=V(e)?e.changedTouches[0]:e;s||(s=Date.now()),i.push({x:n,y:r,id:o.getId(t),timeOffset:Date.now()-s}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?z.Drag:e instanceof MouseEvent?z.MouseMove:z.TouchMove)},r,{trailing:!1}),d=[R("mousemove",l,n),R("touchmove",l,n),R("drag",l,n)];return()=>{d.forEach(e=>e())}}(e),a=ue(e),i=he(e),c=function({viewportResizeCb:e}){let t=-1,n=-1;return R("resize",F(()=>{const o=D(),r=W();t===o&&n===r||(e({width:Number(r),height:Number(o)}),t=o,n=r)},200),window)}(e),l=function({inputCb:e,doc:t,mirror:n,blockClass:o,blockSelector:r,ignoreClass:a,maskInputOptions:i,maskInputFn:c,sampling:l,userTriggeredOnInput:d}){function u(e){let n=le(e);const l=e.isTrusted;if(n&&"OPTION"===n.tagName&&(n=n.parentElement),!n||!n.tagName||ge.indexOf(n.tagName)<0||Z(n,o,r,!0))return;const u=n.type;if(n.classList.contains(a))return;let p=n.value,g=!1;"radio"===u||"checkbox"===u?g=n.checked:(i[n.tagName.toLowerCase()]||i[u])&&(p=s({maskInputOptions:i,tagName:n.tagName,type:u,value:p,maskInputFn:c})),h(n,pe({text:p,isChecked:g,userTriggered:l},d));const m=n.name;"radio"===u&&m&&g&&t.querySelectorAll(`input[type="radio"][name="${m}"]`).forEach(e=>{e!==n&&h(e,pe({text:e.value,isChecked:!g,userTriggered:!1},d))})}function h(t,o){const r=me.get(t);if(!r||r.text!==o.text||r.isChecked!==o.isChecked){me.set(t,o);const r=n.getId(t);e(Object.assign(Object.assign({},o),{id:r}))}}const p=("last"===l.input?["change"]:["input","change"]).map(e=>R(e,u,t)),g=t.defaultView;if(!g)return()=>{p.forEach(e=>e())};const m=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),I=[[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 m&&m.set&&p.push(...I.map(e=>x(e[0],e[1],{set(){u({target:this})}},!1,g))),()=>{p.forEach(e=>e())}}(e),d=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:o,sampling:r}){const a=a=>F(r=>{const s=le(r);if(!s||Z(s,t,n,!0))return;const{currentTime:i,volume:c,muted:l,playbackRate:d}=s;e({type:a,id:o.getId(s),currentTime:i,volume:c,muted:l,playbackRate:d})},r.media||500),s=[R("play",a(0)),R("pause",a(1)),R("seeked",a(2)),R("volumechange",a(3)),R("ratechange",a(4))];return()=>{s.forEach(e=>e())}}(e),u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:o}){const r=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=function(o,a){const{id:s,styleId:i}=Ce(this,t,n.styleMirror);return(s&&-1!==s||i&&-1!==i)&&e({id:s,styleId:i,adds:[{rule:o,index:a}]}),r.apply(this,[o,a])};const a=o.CSSStyleSheet.prototype.deleteRule;let s,i;o.CSSStyleSheet.prototype.deleteRule=function(o){const{id:r,styleId:s}=Ce(this,t,n.styleMirror);return(r&&-1!==r||s&&-1!==s)&&e({id:r,styleId:s,removes:[{index:o}]}),a.apply(this,[o])},o.CSSStyleSheet.prototype.replace&&(s=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=function(o){const{id:r,styleId:a}=Ce(this,t,n.styleMirror);return(r&&-1!==r||a&&-1!==a)&&e({id:r,styleId:a,replace:o}),s.apply(this,[o])}),o.CSSStyleSheet.prototype.replaceSync&&(i=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=function(o){const{id:r,styleId:a}=Ce(this,t,n.styleMirror);return(r&&-1!==r||a&&-1!==a)&&e({id:r,styleId:a,replaceSync:o}),i.apply(this,[o])});const c={};ae?c.CSSGroupingRule=o.CSSGroupingRule:(se&&(c.CSSMediaRule=o.CSSMediaRule),ce&&(c.CSSConditionRule=o.CSSConditionRule),ie&&(c.CSSSupportsRule=o.CSSSupportsRule));const l={};return Object.entries(c).forEach(([o,r])=>{l[o]={insertRule:r.prototype.insertRule,deleteRule:r.prototype.deleteRule},r.prototype.insertRule=function(r,a){const{id:s,styleId:i}=Ce(this.parentStyleSheet,t,n.styleMirror);return(s&&-1!==s||i&&-1!==i)&&e({id:s,styleId:i,adds:[{rule:r,index:[...Ie(this),a||0]}]}),l[o].insertRule.apply(this,[r,a])},r.prototype.deleteRule=function(r){const{id:a,styleId:s}=Ce(this.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||s&&-1!==s)&&e({id:a,styleId:s,removes:[{index:[...Ie(this),r]}]}),l[o].deleteRule.apply(this,[r])}}),()=>{o.CSSStyleSheet.prototype.insertRule=r,o.CSSStyleSheet.prototype.deleteRule=a,s&&(o.CSSStyleSheet.prototype.replace=s),i&&(o.CSSStyleSheet.prototype.replaceSync=i),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})}}(e,{win:n}),h=fe(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:o},{win:r}){const a=r.CSSStyleDeclaration.prototype.setProperty;r.CSSStyleDeclaration.prototype.setProperty=function(r,s,i){var c;if(n.has(r))return a.apply(this,[r,s,i]);const{id:l,styleId:d}=Ce(null===(c=this.parentRule)||void 0===c?void 0:c.parentStyleSheet,t,o.styleMirror);return(l&&-1!==l||d&&-1!==d)&&e({id:l,styleId:d,set:{property:r,value:s,priority:i},index:Ie(this.parentRule)}),a.apply(this,[r,s,i])};const s=r.CSSStyleDeclaration.prototype.removeProperty;return r.CSSStyleDeclaration.prototype.removeProperty=function(r){var a;if(n.has(r))return s.apply(this,[r]);const{id:i,styleId:c}=Ce(null===(a=this.parentRule)||void 0===a?void 0:a.parentStyleSheet,t,o.styleMirror);return(i&&-1!==i||c&&-1!==c)&&e({id:i,styleId:c,remove:{property:r},index:Ie(this.parentRule)}),s.apply(this,[r])},()=>{r.CSSStyleDeclaration.prototype.setProperty=a,r.CSSStyleDeclaration.prototype.removeProperty=s}}(e,{win:n}),g=e.collectFonts?function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const o=[],r=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,n){const o=new a(e,t,n);return r.set(o,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),o};const s=L(t.fonts,"add",function(t){return function(n){return setTimeout(()=>{const t=r.get(n);t&&(e(t),r.delete(n))},0),t.apply(this,[n])}});return o.push(()=>{n.FontFace=a}),o.push(s),()=>{o.forEach(e=>e())}}(e):()=>{},m=function(e){const{doc:t,mirror:n,blockClass:o,blockSelector:r,selectionCb:a}=e;let s=!0;const i=()=>{const e=t.getSelection();if(!e||s&&(null==e?void 0:e.isCollapsed))return;s=e.isCollapsed||!1;const i=[],c=e.rangeCount||0;for(let t=0;t{re.forEach(e=>e.reset()),o.disconnect(),r(),a(),i(),c(),l(),d(),u(),h(),p(),g(),m(),I.forEach(e=>e())}}class Se{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,o){const r=n||this.getIdToRemoteIdMap(e),a=o||this.getRemoteIdToIdMap(e);let s=r.get(t);return s||(s=this.generateIdFn(),r.set(t,s),a.set(s,t)),s}getIds(e,t){const n=this.getIdToRemoteIdMap(e),o=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,o))}getRemoteId(e,t,n){const o=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const r=o.get(t);return r||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class be{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Se(p),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Se(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 n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||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){if("rrweb"===e.data.type){if(!e.source)return;const t=this.crossOriginIframeMap.get(e.source);if(!t)return;const n=this.transformCrossOriginEvent(t,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}}transformCrossOriginEvent(e,t){var n;switch(t.type){case J.FullSnapshot:return this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e),{timestamp:t.timestamp,type:J.IncrementalSnapshot,data:{source:z.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case J.Meta:case J.Load:case J.DomContentLoaded:return!1;case J.Plugin:return t;case J.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case J.IncrementalSnapshot:switch(t.data.source){case z.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e)}),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 z.Drag:case z.TouchMove:case z.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case z.ViewportResize:return!1;case z.MediaInteraction:case z.MouseInteraction:case z.Scroll:case z.CanvasMutation:case z.Input:return this.replaceIds(t.data,e,["id"]),t;case z.StyleSheetRule:case z.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case z.Font:return t;case z.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case z.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(n=t.data.styles)||void 0===n||n.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}}replace(e,t,n,o){for(const r of o)(Array.isArray(t[r])||"number"==typeof t[r])&&(Array.isArray(t[r])?t[r]=e.getIds(n,t[r]):t[r]=e.getId(n,t[r]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}}class ve{constructor(e){this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;const t=this;this.restorePatches.push(L(Element.prototype,"attachShadow",function(e){return function(n){const o=e.call(this,n);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,this.ownerDocument),o}}))}addShadowRoot(e,t){n(e)&&(this.shadowDoms.has(e)||(this.shadowDoms.add(e),de(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),he(Object.assign(Object.assign({},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(e.host)),fe({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)},0)))}observeAttachShadow(e){if(e.contentWindow){const t=this;this.restorePatches.push(L(e.contentWindow.HTMLElement.prototype,"attachShadow",function(n){return function(o){const r=n.call(this,o);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),r}}))}}reset(){this.restorePatches.forEach(e=>e()),this.shadowDoms=new WeakSet}}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function Ae(e,t,n,o){return new(n||(n=Promise))(function(t,r){function a(e){try{i(o.next(e))}catch(e){r(e)}}function s(e){try{i(o["throw"](e))}catch(e){r(e)}}function i(e){var o;e.done?t(e.value):(o=e.value,o instanceof n?o:new n(function(e){e(o)})).then(a,s)}i((o=o.apply(e,[])).next())})}for(var ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",we="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Me=0;Me{if(!e||!Oe(e,t)&&"object"!=typeof e)return;const o=function(e,t){let n=Te.get(e);return n||(n=new Map,Te.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name);let r=o.indexOf(e);return-1===r&&(r=o.length,o.push(e)),r};function Re(e,t,n){if(e instanceof Array)return e.map(e=>Re(e,t,n));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){const t=e.constructor.name,n=function(e){var t,n=new Uint8Array(e),o=n.length,r="";for(t=0;t>2],r+=ke[(3&n[t])<<4|n[t+1]>>4],r+=ke[(15&n[t+1])<<2|n[t+2]>>6],r+=ke[63&n[t+2]];return o%3==2?r=r.substring(0,r.length-1)+"=":o%3==1&&(r=r.substring(0,r.length-2)+"=="),r}(e);return{rr_type:t,base64:n}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Re(e.buffer,t,n),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Re(e.data,t,n),e.width,e.height]}}if(Oe(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Ne(e,t,n)}}return e}const Ee=(e,t,n)=>[...e].map(e=>Re(e,t,n)),Oe=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(n.find(n=>e instanceof t[n]))};function Fe(e,t,n){const o=[];try{const r=L(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(o,...r){return Z(this,t,n,!0)||"__context"in this||(this.__context=o),e.apply(this,[o,...r])}});o.push(r)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(e=>e())}}function xe(e,t,n,o,r,a,s){const i=[],c=Object.getOwnPropertyNames(e);for(const a of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if("function"!=typeof e[a])continue;const c=L(e,a,function(e){return function(...i){const c=e.apply(this,i);if(Ne(c,s,this),!Z(this.canvas,o,r,!0)){const e=Ee([...i],s,this),o={type:t,property:a,args:e};n(this.canvas,o)}return c}});i.push(c)}catch(o){const r=x(e,a,{set(e){n(this.canvas,{type:t,property:a,args:[e],setter:!0})}});i.push(r)}return i}var Le=null;try{var De="undefined"!=typeof module&&"function"==typeof module.require&&module.require("worker_threads")||"function"==typeof __non_webpack_require__&&__non_webpack_require__("worker_threads")||"function"==typeof require&&require("worker_threads");Le=De.Worker}catch(e){}function We(e,t,n){var o=function(e){return Buffer.from(e,"base64").toString("utf8")}(e),r=o.indexOf("\n",10)+1,a=o.substring(r)+"";return function(e){return new Le(a,Object.assign({},e,{eval:!0}))}}function Ze(e,t,n){var o=function(e){return atob(e)}(e),r=o.indexOf("\n",10)+1,a=o.substring(r)+"",s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}var Be="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0);var Ge,Ve=(Ge="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICB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b25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",Be?We(Ge):function(e){var t;return function(n){return t=t||Ze(e),new Worker(t,n)}}(Ge));class Ue{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,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)};const{sampling:t="all",win:n,blockClass:o,blockSelector:r,recordCanvas:a,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&"all"===t&&this.initCanvasMutationObserver(n,o,r),a&&"number"==typeof t&&this.initCanvasFPSObserver(t,n,o,r,{dataURLOptions:s})}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,n,o,r){const a=Fe(t,n,o),s=new Map,i=new Ve;i.onmessage=e=>{const{id:t}=e.data;if(s.set(t,!1),!("base64"in e.data))return;const{base64:n,type:o,width:r,height:a}=e.data;this.mutationCb({id:t,type:H["2D"],commands:[{property:"clearRect",args:[0,0,r,a]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:o}]},0,0]}]})};const c=1e3/e;let l,d=0;const u=e=>{d&&e-d{const e=[];return t.document.querySelectorAll("canvas").forEach(t=>{Z(t,n,o,!0)||e.push(t)}),e})().forEach(e=>Ae(this,0,void 0,function*(){var t;const n=this.mirror.getId(e);if(s.get(n))return;if(s.set(n,!0),["webgl","webgl2"].includes(e.__context)){const n=e.getContext(e.__context);!1===(null===(t=null==n?void 0:n.getContextAttributes())||void 0===t?void 0:t.preserveDrawingBuffer)&&(null==n||n.clear(n.COLOR_BUFFER_BIT))}const o=yield createImageBitmap(e);i.postMessage({id:n,bitmap:o,width:e.width,height:e.height,dataURLOptions:r.dataURLOptions},[o])}))),l=requestAnimationFrame(u)};l=requestAnimationFrame(u),this.resetObservers=()=>{a(),cancelAnimationFrame(l)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const o=Fe(e,t,n),r=function(e,t,n,o){const r=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const s of a)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[s])continue;const a=L(t.CanvasRenderingContext2D.prototype,s,function(r){return function(...a){return Z(this.canvas,n,o,!0)||setTimeout(()=>{const n=Ee([...a],t,this);e(this.canvas,{type:H["2D"],property:s,args:n})},0),r.apply(this,a)}});r.push(a)}catch(n){const o=x(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:H["2D"],property:s,args:[t],setter:!0})}});r.push(o)}return()=>{r.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n),a=function(e,t,n,o){const r=[];return r.push(...xe(t.WebGLRenderingContext.prototype,H.WebGL,e,n,o,0,t)),void 0!==t.WebGL2RenderingContext&&r.push(...xe(t.WebGL2RenderingContext.prototype,H.WebGL2,e,n,o,0,t)),()=>{r.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=()=>{o(),r(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;const o=n.map(e=>{const t=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r({rule:r(e),index:t}))})}n.styleIds.push(e)}o.length>0&&(n.styles=o),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}function Ye(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}let _e,Je,ze,Qe=!1;const He=new a;function Xe(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:o,blockClass:r="rr-block",blockSelector:s=null,ignoreClass:i="rr-ignore",maskTextClass:c="rr-mask",maskTextSelector:l=null,inlineStylesheet:d=!0,maskAllInputs:u,maskInputOptions:h,slimDOMOptions:p,maskInputFn:g,maskTextFn:m,hooks:I,packFn:C,sampling:f={},dataURLOptions:y={},mousemoveWait:S,recordCanvas:b=!1,recordCrossOriginIframes:v=!1,userTriggeredOnInput:A=!1,collectFonts:k=!1,inlineImages:w=!1,plugins:M,keepIframeSrcFn:T=()=>!1,ignoreCSSAttributes:E=new Set([])}=e,O=!v||window.parent===window;let F=!1;if(!O)try{window.parent.document,F=!1}catch(e){F=!0}if(O&&!t)throw new Error("emit function is required");void 0!==S&&void 0===f.mousemove&&(f.mousemove=S),He.reset();const x=!0===u?{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!==h?h:{password:!0},L=!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===p,headMetaDescKeywords:"all"===p}:p||{};let Z;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let B=0;const G=e=>{for(const t of M||[])t.eventProcessor&&(e=t.eventProcessor(e));return C&&(e=C(e)),e};_e=(e,r)=>{var a;if(!(null===(a=re[0])||void 0===a?void 0:a.isFrozen())||e.type===J.FullSnapshot||e.type===J.IncrementalSnapshot&&e.data.source===z.Mutation||re.forEach(e=>e.unfreeze()),O)null==t||t(G(e),r);else if(F){const t={type:"rrweb",event:G(e),isCheckout:r};window.parent.postMessage(t,"*")}if(e.type===J.FullSnapshot)Z=e,B=0;else if(e.type===J.IncrementalSnapshot){if(e.data.source===z.Mutation&&e.data.isAttachIframe)return;B++;const t=o&&B>=o,r=n&&e.timestamp-Z.timestamp>n;(t||r)&&Je(!0)}};const V=e=>{_e(Ye({type:J.IncrementalSnapshot,data:Object.assign({source:z.Mutation},e)}))},_=e=>_e(Ye({type:J.IncrementalSnapshot,data:Object.assign({source:z.Scroll},e)})),Q=e=>_e(Ye({type:J.IncrementalSnapshot,data:Object.assign({source:z.CanvasMutation},e)})),H=new Ke({mutationCb:V,adoptedStyleSheetCb:e=>_e(Ye({type:J.IncrementalSnapshot,data:Object.assign({source:z.AdoptedStyleSheet},e)}))}),X=new be({mirror:He,mutationCb:V,stylesheetManager:H,recordCrossOriginIframes:v,wrappedEmit:_e});for(const e of M||[])e.getMirror&&e.getMirror({nodeMirror:He,crossOriginIframeMirror:X.crossOriginIframeMirror,crossOriginIframeStyleMirror:X.crossOriginIframeStyleMirror});ze=new Ue({recordCanvas:b,mutationCb:Q,win:window,blockClass:r,blockSelector:s,mirror:He,sampling:f.canvas,dataURLOptions:y});const j=new ve({mutationCb:V,scrollCb:_,bypassOptions:{blockClass:r,blockSelector:s,maskTextClass:c,maskTextSelector:l,inlineStylesheet:d,maskInputOptions:x,dataURLOptions:y,maskTextFn:m,maskInputFn:g,recordCanvas:b,inlineImages:w,sampling:f,slimDOMOptions:L,iframeManager:X,stylesheetManager:H,canvasManager:ze,keepIframeSrcFn:T},mirror:He});Je=(e=!1)=>{var t,n,o,i,u,h;_e(Ye({type:J.Meta,data:{href:window.location.href,width:W(),height:D()}}),e),H.reset(),re.forEach(e=>e.lock());const p=function(e,t){var n=t||{},o=n.mirror,r=void 0===o?new a:o,s=n.blockClass,i=void 0===s?"rr-block":s,c=n.blockSelector,l=void 0===c?null:c,d=n.maskTextClass,u=void 0===d?"rr-mask":d,h=n.maskTextSelector,p=void 0===h?null:h,g=n.inlineStylesheet,m=void 0===g||g,I=n.inlineImages,C=void 0!==I&&I,f=n.recordCanvas,y=void 0!==f&&f,S=n.maskAllInputs,b=void 0!==S&&S,v=n.maskTextFn,A=n.maskInputFn,k=n.slimDOM,w=void 0!==k&&k,M=n.dataURLOptions,T=n.preserveWhiteSpace,R=n.onSerialize,E=n.onIframeLoad,O=n.iframeLoadTimeout,F=n.onStylesheetLoad,x=n.stylesheetLoadTimeout,L=n.keepIframeSrcFn;return N(e,{doc:e,mirror:r,blockClass:i,blockSelector:l,maskTextClass:u,maskTextSelector:p,skipChild:!1,inlineStylesheet:m,maskInputOptions:!0===b?{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===b?{password:!0}:b,maskTextFn:v,maskInputFn:A,slimDOMOptions:!0===w||"all"===w?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===w,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===w?{}:w,dataURLOptions:M,inlineImages:C,recordCanvas:y,preserveWhiteSpace:T,onSerialize:R,onIframeLoad:E,iframeLoadTimeout:O,onStylesheetLoad:F,stylesheetLoadTimeout:x,keepIframeSrcFn:void 0===L?function(){return!1}:L,newlyAddedElement:!1})}(document,{mirror:He,blockClass:r,blockSelector:s,maskTextClass:c,maskTextSelector:l,inlineStylesheet:d,maskAllInputs:x,maskTextFn:m,slimDOM:L,dataURLOptions:y,recordCanvas:b,inlineImages:w,onSerialize:e=>{U(e,He)&&X.addIframe(e),K(e,He)&&H.trackLinkElement(e),Y(e)&&j.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{X.attachIframe(e,t),j.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{H.attachLinkElement(e,t)},keepIframeSrcFn:T});if(!p)return console.warn("Failed to snapshot the document");_e(Ye({type:J.FullSnapshot,data:{node:p,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===(o=null===document||void 0===document?void 0:document.body)||void 0===o?void 0:o.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(u=null===(i=null===document||void 0===document?void 0:document.body)||void 0===i?void 0:i.parentElement)||void 0===u?void 0:u.scrollTop)||(null===(h=null===document||void 0===document?void 0:document.body)||void 0===h?void 0:h.scrollTop)||0}}})),re.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&H.adoptStyleSheets(document.adoptedStyleSheets,He.getId(document))};try{const e=[];e.push(R("DOMContentLoaded",()=>{_e(Ye({type:J.DomContentLoaded,data:{}}))}));const t=e=>{var t;return ye({mutationCb:V,mousemoveCb:(e,t)=>_e(Ye({type:J.IncrementalSnapshot,data:{source:t,positions:e}})),mouseInteractionCb:e=>_e(Ye({type:J.IncrementalSnapshot,data:Object.assign({source:z.MouseInteraction},e)})),scrollCb:_,viewportResizeCb:e=>_e(Ye({type:J.IncrementalSnapshot,data:Object.assign({source:z.ViewportResize},e)})),inputCb:e=>_e(Ye({type:J.IncrementalSnapshot,data:Object.assign({source:z.Input},e)})),mediaInteractionCb:e=>_e(Ye({type:J.IncrementalSnapshot,data:Object.assign({source:z.MediaInteraction},e)})),styleSheetRuleCb:e=>_e(Ye({type:J.IncrementalSnapshot,data:Object.assign({source:z.StyleSheetRule},e)})),styleDeclarationCb:e=>_e(Ye({type:J.IncrementalSnapshot,data:Object.assign({source:z.StyleDeclaration},e)})),canvasMutationCb:Q,fontCb:e=>_e(Ye({type:J.IncrementalSnapshot,data:Object.assign({source:z.Font},e)})),selectionCb:e=>{_e(Ye({type:J.IncrementalSnapshot,data:Object.assign({source:z.Selection},e)}))},blockClass:r,ignoreClass:i,maskTextClass:c,maskTextSelector:l,maskInputOptions:x,inlineStylesheet:d,sampling:f,recordCanvas:b,inlineImages:w,userTriggeredOnInput:A,collectFonts:k,doc:e,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:T,blockSelector:s,slimDOMOptions:L,dataURLOptions:y,mirror:He,iframeManager:X,stylesheetManager:H,shadowDomManager:j,canvasManager:ze,ignoreCSSAttributes:E,plugins:(null===(t=null==M?void 0:M.filter(e=>e.observer))||void 0===t?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>_e(Ye({type:J.Plugin,data:{plugin:e.name,payload:t}}))})))||[]},I)};X.addLoadListener(n=>{e.push(t(n.contentDocument))});const n=()=>{Je(),e.push(t(document)),Qe=!0};return"interactive"===document.readyState||"complete"===document.readyState?n():e.push(R("load",()=>{_e(Ye({type:J.Load,data:{}})),n()},window)),()=>{e.forEach(e=>e()),Qe=!1}}catch(e){console.warn(e)}}Xe.addCustomEvent=(e,t)=>{if(!Qe)throw new Error("please add custom event after start recording");_e(Ye({type:J.Custom,data:{tag:e,payload:t}}))},Xe.freezePage=()=>{re.forEach(e=>e.freeze())},Xe.takeFullSnapshot=e=>{if(!Qe)throw new Error("please take full snapshot after start recording");Je(e)},Xe.mirror=He,(e=>{const{document:t}=e,{currentScript:n}=t;if(!n)return;const o="data-",r=n.getAttribute.bind(n),a=e=>r(`${o}${e}`),s=a(`website-id`),i=a(`host-url`),c=parseFloat(a(`sample-rate`)||"0.15"),l=a(`mask-level`)||"moderate",d=parseInt(a(`max-duration`)||"300000",10),u=a(`block-selector`)||"";if(!s)return;if(c<1&&Math.random()>c)return;const h=`${(i||""||n.src.split("/").slice(0,-1).join("/")).replace(/\/$/,"")}/api/record`,p=100,g=1e4;let m=[],I=null,C=null,f=null,y=!1;const S=(t=!1)=>{if(!m.length)return;const n=m;m=[],((t,n=!1)=>{const o=e.umami?.getSession?.();if(!o?.cache)return;const r=JSON.stringify({type:"record",payload:{website:s,events:t,timestamp:Math.floor(Date.now()/1e3)}}),a=n&&r.length<6e4;fetch(h,{keepalive:a,method:"POST",body:r,headers:{"Content-Type":"application/json","x-umami-cache":o.cache},credentials:"omit"}).catch(()=>{})})(n,t)},b=(t=0)=>{if(t>50)return;const n=e.umami?.getSession?.();n?.cache?v():setTimeout(()=>b(t+1),100)},v=()=>{f=Date.now();const n="strict"===l?{maskAllInputs:!0,maskTextSelector:"*"}:{maskAllInputs:!0};I=Xe({emit(e){y||(Date.now()-f>d?y||(y=!0,C&&clearTimeout(C),S(),I&&I()):(m.push(e),m.length>=p&&S(),C&&clearTimeout(C),C=setTimeout(S,g)))},...n,inlineStylesheet:!0,slimDOMOptions:{script:!0,comment:!0,headMetaDescKeywords:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0},recordCanvas:!1,recordCrossOriginIframes:!1,checkoutEveryNms:3e4,...u&&{blockSelector:u}}),t.addEventListener("visibilitychange",()=>{"hidden"===t.visibilityState&&S(!0)}),e.addEventListener("beforeunload",()=>S(!0))};"complete"===t.readyState?b():t.addEventListener("readystatechange",()=>{"complete"===t.readyState&&b()})})(window)}();