!function(){"use strict";var e;function t(){ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ t=function(){return e};var e={},n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof p?t:p,a=Object.create(o.prototype),i=new k(r||[]);return a._invoke=function(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return M()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=b(i,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=l(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,i),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d={};function p(){}function f(){}function h(){}var g={};c(g,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(w([])));v&&v!==n&&r.call(v,a)&&(g=v);var y=h.prototype=p.prototype=Object.create(g);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(o,a,i,s){var c=l(e[o],e,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,s)}),(function(e){n("throw",e,i,s)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,s)}))}s(c.arg)}var o;this._invoke=function(e,r){function a(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(a,a):a()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function w(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:w(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}function d(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function p(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function f(e){try{var t=e.rules||e.cssRules;return t?((n=Array.from(t).map(h).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 h(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=f(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 g=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 r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function m(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,o=e.type,a=e.value,i=e.maskInputFn,s=a||"",c=o&&o.toLowerCase();return(n[r.toLowerCase()]||c&&n[c])&&(s=i?i(s,t):"*".repeat(s.length)),s}var v="__rrweb_original__";function y(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?t.toLowerCase():null}var I,C,b=1,S=new RegExp("[^a-z0-9-_:]"),A=-2;function k(){return b++}var w=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,M=/^(?:[a-z+]+:)?\/\//i,N=/^www\..*/i,T=/^(data:)([^,]*),(.*)/i;function O(e,t){return(e||"").replace(w,(function(e,n,r,o,a,i){var s,c=r||a||i,u=n||o||"";if(!c)return e;if(M.test(c)||N.test(c))return"url(".concat(u).concat(c).concat(u,")");if(T.test(c))return"url(".concat(u).concat(c).concat(u,")");if("/"===c[0])return"url(".concat(u).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+c)).concat(u,")");var l=t.split("/"),d=c.split("/");l.pop();for(var p=0,f=d;p=t.length);){var a=r(E);if(","===a.slice(-1))a=x(e,a.substring(0,a.length-1)),o.push(a);else{var i="";a=x(e,a);for(var s=!1;;){var c=t.charAt(n);if(""===c){o.push((a+i).trim());break}if(s)")"===c&&(s=!1);else{if(","===c){n+=1,o.push((a+i).trim());break}"("===c&&(s=!0)}i+=c,n+=1}}}return o.join(", ")}(e,r):"style"===n?O(r,F()):"object"===t&&"data"===n?x(e,r):r:x(e,r):r}function W(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function G(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&G(e.parentNode,t,n);for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return!!n&&G(e.parentNode,t,n)}function B(e,t,n){try{var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===r)return!1;if("string"==typeof t){if(r.classList.contains(t))return!0;if(r.closest(".".concat(t)))return!0}else if(G(r,t,!0))return!0;if(n){if(r.matches(n))return!0;if(r.closest(n))return!0}}catch(e){}return!1}function V(t,n){var r=n.doc,o=n.mirror,a=n.blockClass,i=n.blockSelector,s=n.maskTextClass,c=n.maskTextSelector,u=n.inlineStylesheet,l=n.maskInputOptions,d=void 0===l?{}:l,p=n.maskTextFn,h=n.maskInputFn,g=n.dataURLOptions,b=void 0===g?{}:g,A=n.inlineImages,k=n.recordCanvas,w=n.keepIframeSrcFn,M=n.newlyAddedElement,N=void 0!==M&&M,T=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(r,o);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:T};case t.ELEMENT_NODE:return function(t,n){for(var r=n.doc,o=n.blockClass,a=n.blockSelector,i=n.inlineStylesheet,s=n.maskInputOptions,c=void 0===s?{}:s,u=n.maskInputFn,l=n.dataURLOptions,d=void 0===l?{}:l,p=n.inlineImages,h=n.recordCanvas,g=n.keepIframeSrcFn,b=n.newlyAddedElement,A=void 0!==b&&b,k=n.rootId,w=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}if(n)return e.matches(n)}catch(e){}return!1}(t,o,a),M=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return S.test(t)?"div":t}(t),N={},T=t.attributes.length,E=0;E2&&void 0!==arguments[2]?arguments[2]:document,r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var Y="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.",j={map:{},getId:function(){return console.error(Y),-1},getNode:function(){return console.error(Y),null},removeNodeFromMap:function(){console.error(Y)},has:function(){return console.error(Y),!1},reset:function(){console.error(Y)}};function _(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,o=0;return function(){for(var a=arguments.length,i=new Array(a),s=0;st?(r&&(clearTimeout(r),r=null),o=c,e.apply(l,i)):r||!1===n.trailing||(r=setTimeout((function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(l,i)}),u))}}function J(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,a=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),a&&a.set&&a.set.call(this,e)}}),function(){return J(e,t,a||{},!0)}}function z(e,t,n){try{if(!(t in e))return function(){};var r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,function(){e[t]=r}}catch(e){return function(){}}}function P(e){var t,n,r,o,a,i,s=e.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null==s?void 0:s.documentElement.scrollLeft)||(null===(n=null===(t=null==s?void 0:s.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===(r=null==s?void 0:s.body)||void 0===r?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==s?void 0:s.documentElement.scrollTop)||(null===(a=null===(o=null==s?void 0:s.body)||void 0===o?void 0:o.parentElement)||void 0===a?void 0:a.scrollTop)||(null===(i=null==s?void 0:s.body)||void 0===i?void 0:i.scrollTop)||0}}function Q(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function H(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function X(e,t,n,r){if(!e)return!1;var o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!o)return!1;try{if("string"==typeof t){if(o.classList.contains(t))return!0;if(r&&null!==o.closest("."+t))return!0}else if(G(o,t,r))return!0}catch(e){}if(n){if(o.matches(n))return!0;if(r&&null!==o.closest(n))return!0}return!1}function q(e,t){return t.getId(e)===A}function $(e,t){if(d(e))return!1;var n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||$(e.parentNode,t))}function ee(e){return Boolean(e.changedTouches)}function te(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function ne(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function re(e){return Boolean(null==e?void 0:e.shadowRoot)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(j=new Proxy(j,{get:function(e,t,n){return"map"===t&&console.error(Y),Reflect.get(e,t,n)}}));var oe=function(){function e(){r(this,e),this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}return a(e,[{key:"getId",value:function(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]),e}();function ae(e){var t,n,r=null;return(null===(n=null===(t=e.getRootNode)||void 0===t?void 0:t.call(e))||void 0===n?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(r=e.getRootNode().host),r}function ie(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=ae(n);)n=t;return n}(e);return t.contains(n)}function se(e){var t=e.ownerDocument;return!!t&&(t.contains(e)||ie(e))}var ce=function(e){return 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}(ce||{}),ue=function(e){return 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}(ue||{}),le=function(e){return 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}(le||{}),de=function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e}(de||{}),pe=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(pe||{});function fe(e){return"__ln"in e}var he,ge=function(){function e(){r(this,e),this.length=0,this.head=null}return a(e,[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n=0;v--){var y=n.get(v);if(y){var I=t.mirror.getId(y.value.parentNode);if(-1===r(y.value))continue;if(-1!==I){h=y;break}var C=y.value;if(C.parentNode&&C.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var b=C.parentNode.host;if(-1!==t.mirror.getId(b)){h=y;break}}}}if(!h){for(;n.head;)n.removeNode(n.head.value);break}f=h.previous,n.removeNode(h.value),o(h.value)}var S={texts:t.texts.map((function(e){return{id:t.mirror.getId(e.node),value:e.value}})).filter((function(e){return t.mirror.has(e.id)})),attributes:t.attributes.map((function(e){return{id:t.mirror.getId(e.node),attributes:e.attributes}})).filter((function(e){return t.mirror.has(e.id)})),removes:t.removes,adds:e};(S.texts.length||S.attributes.length||S.removes.length||S.adds.length)&&(t.texts=[],t.attributes=[],t.removes=[],t.addedSet=new Set,t.movedSet=new Set,t.droppedSet=new Set,t.movedMap={},t.mutationCb(S))}},this.processMutation=function(e){if(!q(e.target,t.mirror))switch(e.type){case"characterData":var n=e.target.textContent;X(e.target,t.blockClass,t.blockSelector,!1)||n===e.oldValue||t.texts.push({value:B(e.target,t.maskTextClass,t.maskTextSelector)&&n?t.maskTextFn?t.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:e.target});break;case"attributes":var r=e.target,o=e.attributeName,a=e.target.getAttribute(o);if("value"===o){var i=y(r);a=m({element:r,maskInputOptions:t.maskInputOptions,tagName:r.tagName,type:i,value:a,maskInputFn:t.maskInputFn})}if(X(e.target,t.blockClass,t.blockSelector,!1)||a===e.oldValue)return;var s=t.attributes.find((function(t){return t.node===e.target}));if("IFRAME"===r.tagName&&"src"===o&&!t.keepIframeSrcFn(a)){if(r.contentDocument)return;o="rr_src"}if(s||(s={node:e.target,attributes:{}},t.attributes.push(s)),"type"===o&&"INPUT"===r.tagName&&"password"===(e.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),"style"===o){var c=t.doc.createElement("span");e.oldValue&&c.setAttribute("style",e.oldValue),void 0!==s.attributes.style&&null!==s.attributes.style||(s.attributes.style={});for(var u=s.attributes.style,l=0,f=Array.from(r.style);l1&&void 0!==arguments[1]?arguments[1]:{},n=e.doc.defaultView;if(!n)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,o=e.mouseInteractionCb,a=e.scrollCb,i=e.viewportResizeCb,s=e.inputCb,c=e.mediaInteractionCb,u=e.styleSheetRuleCb,l=e.styleDeclarationCb,d=e.canvasMutationCb,p=e.fontCb,f=e.selectionCb;e.mutationCb=function(){t.mutation&&t.mutation.apply(t,arguments),n.apply(void 0,arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove.apply(t,arguments),r.apply(void 0,arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction.apply(t,arguments),o.apply(void 0,arguments)},e.scrollCb=function(){t.scroll&&t.scroll.apply(t,arguments),a.apply(void 0,arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize.apply(t,arguments),i.apply(void 0,arguments)},e.inputCb=function(){t.input&&t.input.apply(t,arguments),s.apply(void 0,arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction.apply(t,arguments),c.apply(void 0,arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule.apply(t,arguments),u.apply(void 0,arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration.apply(t,arguments),l.apply(void 0,arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation.apply(t,arguments),d.apply(void 0,arguments)},e.fontCb=function(){t.font&&t.font.apply(t,arguments),p.apply(void 0,arguments)},e.selectionCb=function(){t.selection&&t.selection.apply(t,arguments),f.apply(void 0,arguments)}}(e,t);var r,o,a,c,u=Te(e,e.doc),d=function(e){var t=e.mousemoveCb,n=e.sampling,r=e.doc,o=e.mirror;if(!1===n.mousemove)return function(){};var a,i="number"==typeof n.mousemove?n.mousemove:50,s="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,c=[],u=_(we((function(e){var n=Date.now()-a;t(c.map((function(e){return e.timeOffset-=n,e})),e),c=[],a=null})),s),l=we(_(we((function(e){var t=Ne(e),n=ee(e)?e.changedTouches[0]:e,r=n.clientX,i=n.clientY;a||(a=Date.now()),c.push({x:r,y:i,id:o.getId(t),timeOffset:Date.now()-a}),u("undefined"!=typeof DragEvent&&e instanceof DragEvent?ue.Drag:e instanceof MouseEvent?ue.MouseMove:ue.TouchMove)})),i,{trailing:!1})),d=[K("mousemove",l,r),K("touchmove",l,r),K("drag",l,r)];return we((function(){d.forEach((function(e){return e()}))}))}(e),p=Oe(e),f=Ee(e),h=(r=e.viewportResizeCb,o=-1,a=-1,K("resize",we(_(we((function(){var e=Q(),t=H();o===e&&a===t||(r({width:Number(t),height:Number(e)}),o=e,a=t)})),200)),window)),g=function(e){var t=e.inputCb,n=e.doc,r=e.mirror,o=e.blockClass,a=e.blockSelector,i=e.ignoreClass,c=e.maskInputOptions,u=e.maskInputFn,l=e.sampling,d=e.userTriggeredOnInput;function p(e){var t=Ne(e),r=e.isTrusted,s=t&&t.tagName;if(t&&"OPTION"===s&&(t=t.parentElement),t&&s&&!(xe.indexOf(s)<0)&&!X(t,o,a,!0)&&!t.classList.contains(i)){var l=t.value,p=!1,h=y(t)||"";"radio"===h||"checkbox"===h?p=t.checked:(c[s.toLowerCase()]||c[h])&&(l=m({element:t,maskInputOptions:c,tagName:s,type:h,value:l,maskInputFn:u})),f(t,we(Re)({text:l,isChecked:p,userTriggered:r},d));var g=t.name;"radio"===h&&g&&p&&n.querySelectorAll('input[type="radio"][name="'.concat(g,'"]')).forEach((function(e){e!==t&&f(e,we(Re)({text:e.value,isChecked:!p,userTriggered:!1},d))}))}}function f(e,n){var o=Le.get(e);if(!o||o.text!==n.text||o.isChecked!==n.isChecked){Le.set(e,n);var a=r.getId(e);we(t)(Object.assign(Object.assign({},n),{id:a}))}}var h=("last"===l.input?["change"]:["input","change"]).map((function(e){return K(e,we(p),n)})),g=n.defaultView;if(!g)return function(){h.forEach((function(e){return e()}))};var v=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 v&&v.set&&h.push.apply(h,s(I.map((function(e){return J(e[0],e[1],{set:function(){we(p)({target:this,isTrusted:!1})}},!1,g)})))),we((function(){h.forEach((function(e){return e()}))}))}(e),v=function(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.blockSelector,o=e.mirror,a=e.sampling,i=we((function(e){return _(we((function(a){var i=Ne(a);if(i&&!X(i,n,r,!0)){var s=i.currentTime,c=i.volume,u=i.muted,l=i.playbackRate;t({type:e,id:o.getId(i),currentTime:s,volume:c,muted:u,playbackRate:l})}})),a.media||500)})),s=[K("play",i(0)),K("pause",i(1)),K("seeked",i(2)),K("volumechange",i(3)),K("ratechange",i(4))];return we((function(){s.forEach((function(e){return e()}))}))}(e),I=function(e,t){var n=e.styleSheetRuleCb,r=e.mirror,o=e.stylesheetManager,a=t.win;if(!a.CSSStyleSheet||!a.CSSStyleSheet.prototype)return function(){};var c=a.CSSStyleSheet.prototype.insertRule;a.CSSStyleSheet.prototype.insertRule=new Proxy(c,{apply:we((function(e,t,a){var s=i(a,2),c=s[0],u=s[1],l=De(t,r,o.styleMirror),d=l.id,p=l.styleId;return(d&&-1!==d||p&&-1!==p)&&n({id:d,styleId:p,adds:[{rule:c,index:u}]}),e.apply(t,a)}))});var u,l,d=a.CSSStyleSheet.prototype.deleteRule;a.CSSStyleSheet.prototype.deleteRule=new Proxy(d,{apply:we((function(e,t,a){var s=i(a,1)[0],c=De(t,r,o.styleMirror),u=c.id,l=c.styleId;return(u&&-1!==u||l&&-1!==l)&&n({id:u,styleId:l,removes:[{index:s}]}),e.apply(t,a)}))}),a.CSSStyleSheet.prototype.replace&&(u=a.CSSStyleSheet.prototype.replace,a.CSSStyleSheet.prototype.replace=new Proxy(u,{apply:we((function(e,t,a){var s=i(a,1)[0],c=De(t,r,o.styleMirror),u=c.id,l=c.styleId;return(u&&-1!==u||l&&-1!==l)&&n({id:u,styleId:l,replace:s}),e.apply(t,a)}))})),a.CSSStyleSheet.prototype.replaceSync&&(l=a.CSSStyleSheet.prototype.replaceSync,a.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:we((function(e,t,a){var s=i(a,1)[0],c=De(t,r,o.styleMirror),u=c.id,l=c.styleId;return(u&&-1!==u||l&&-1!==l)&&n({id:u,styleId:l,replaceSync:s}),e.apply(t,a)}))}));var p={};Ve("CSSGroupingRule")?p.CSSGroupingRule=a.CSSGroupingRule:(Ve("CSSMediaRule")&&(p.CSSMediaRule=a.CSSMediaRule),Ve("CSSConditionRule")&&(p.CSSConditionRule=a.CSSConditionRule),Ve("CSSSupportsRule")&&(p.CSSSupportsRule=a.CSSSupportsRule));var f={};return Object.entries(p).forEach((function(e){var t=i(e,2),a=t[0],c=t[1];f[a]={insertRule:c.prototype.insertRule,deleteRule:c.prototype.deleteRule},c.prototype.insertRule=new Proxy(f[a].insertRule,{apply:we((function(e,t,a){var c=i(a,2),u=c[0],l=c[1],d=De(t.parentStyleSheet,r,o.styleMirror),p=d.id,f=d.styleId;return(p&&-1!==p||f&&-1!==f)&&n({id:p,styleId:f,adds:[{rule:u,index:[].concat(s(Fe(t)),[l||0])}]}),e.apply(t,a)}))}),c.prototype.deleteRule=new Proxy(f[a].deleteRule,{apply:we((function(e,t,a){var c=i(a,1)[0],u=De(t.parentStyleSheet,r,o.styleMirror),l=u.id,d=u.styleId;return(l&&-1!==l||d&&-1!==d)&&n({id:l,styleId:d,removes:[{index:[].concat(s(Fe(t)),[c])}]}),e.apply(t,a)}))})})),we((function(){a.CSSStyleSheet.prototype.insertRule=c,a.CSSStyleSheet.prototype.deleteRule=d,u&&(a.CSSStyleSheet.prototype.replace=u),l&&(a.CSSStyleSheet.prototype.replaceSync=l),Object.entries(p).forEach((function(e){var t=i(e,2),n=t[0],r=t[1];r.prototype.insertRule=f[n].insertRule,r.prototype.deleteRule=f[n].deleteRule}))}))}(e,{win:n}),C=We(e,e.doc),b=function(e,t){var n=e.styleDeclarationCb,r=e.mirror,o=e.ignoreCSSAttributes,a=e.stylesheetManager,s=t.win,c=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(c,{apply:we((function(e,t,s){var u,l=i(s,3),d=l[0],p=l[1],f=l[2];if(o.has(d))return c.apply(t,[d,p,f]);var h=De(null===(u=t.parentRule)||void 0===u?void 0:u.parentStyleSheet,r,a.styleMirror),g=h.id,m=h.styleId;return(g&&-1!==g||m&&-1!==m)&&n({id:g,styleId:m,set:{property:d,value:p,priority:f},index:Fe(t.parentRule)}),e.apply(t,s)}))});var u=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:we((function(e,t,s){var c,l=i(s,1)[0];if(o.has(l))return u.apply(t,[l]);var d=De(null===(c=t.parentRule)||void 0===c?void 0:c.parentStyleSheet,r,a.styleMirror),p=d.id,f=d.styleId;return(p&&-1!==p||f&&-1!==f)&&n({id:p,styleId:f,remove:{property:l},index:Fe(t.parentRule)}),e.apply(t,s)}))}),we((function(){s.CSSStyleDeclaration.prototype.setProperty=c,s.CSSStyleDeclaration.prototype.removeProperty=u}))}(e,{win:n}),S=e.collectFonts?function(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var o=[],a=new WeakMap,i=r.FontFace;r.FontFace=function(e,t,n){var r=new i(e,t,n);return a.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var s=z(n.fonts,"add",(function(e){return function(n){return setTimeout(we((function(){var e=a.get(n);e&&(t(e),a.delete(n))})),0),e.apply(this,[n])}}));return o.push((function(){r.FontFace=i})),o.push(s),we((function(){o.forEach((function(e){return e()}))}))}(e):function(){},A=function(e){var t=e.doc,n=e.mirror,r=e.blockClass,o=e.blockSelector,a=e.selectionCb,i=!0,s=we((function(){var e=t.getSelection();if(!(!e||i&&(null==e?void 0:e.isCollapsed))){i=e.isCollapsed||!1;for(var s=[],c=e.rangeCount||0,u=0;u0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var n=this.crossOriginIframeMap.get(e.source);if(n){var r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}}}},{key:"transformCrossOriginEvent",value:function(e,t){var n,r=this;switch(t.type){case ce.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var o=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,o),this.patchRootIdOnNode(t.data.node,o),{timestamp:t.timestamp,type:ce.IncrementalSnapshot,data:{source:ue.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case ce.Meta:case ce.Load:case ce.DomContentLoaded:return!1;case ce.Plugin:return t;case ce.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case ce.IncrementalSnapshot:switch(t.data.source){case ue.Mutation:return t.data.adds.forEach((function(t){r.replaceIds(t,e,["parentId","nextId","previousId"]),r.replaceIdOnNode(t.node,e);var n=r.crossOriginIframeRootIdMap.get(e);n&&r.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((function(t){r.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((function(t){r.replaceIds(t,e,["id"])})),t.data.texts.forEach((function(t){r.replaceIds(t,e,["id"])})),t;case ue.Drag:case ue.TouchMove:case ue.MouseMove:return t.data.positions.forEach((function(t){r.replaceIds(t,e,["id"])})),t;case ue.ViewportResize:return!1;case ue.MediaInteraction:case ue.MouseInteraction:case ue.Scroll:case ue.CanvasMutation:case ue.Input:return this.replaceIds(t.data,e,["id"]),t;case ue.StyleSheetRule:case ue.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case ue.Font:return t;case ue.Selection:return t.data.ranges.forEach((function(t){r.replaceIds(t,e,["start","end"])})),t;case ue.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(n=t.data.styles)||void 0===n||n.forEach((function(t){r.replaceStyleIds(t,e,["styleId"])})),t}}}},{key:"replace",value:function(e,t,n,r){var o,a=l(r);try{for(a.s();!(o=a.n()).done;){var i=o.value;(Array.isArray(t[i])||"number"==typeof t[i])&&(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]))}}catch(e){a.e(e)}finally{a.f()}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((function(e){n.replaceIdOnNode(e,t)}))}},{key:"patchRootIdOnNode",value:function(t,n){var r=this;t.type===e.Document||t.rootId||(t.rootId=n),"childNodes"in t&&t.childNodes.forEach((function(e){r.patchRootIdOnNode(e,n)}))}}]),t}(),Ke=function(){function e(t){r(this,e),this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}return a(e,[{key:"init",value:function(){this.reset(),this.patchAttachShadow(Element,document)}},{key:"addShadowRoot",value:function(e,t){var n=this;if(p(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=Te(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((function(){return r.disconnect()})),this.restoreHandlers.push(Ee(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout((function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(e.host)),n.restoreHandlers.push(We({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e))}),0)}}},{key:"observeAttachShadow",value:function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}},{key:"patchAttachShadow",value:function(e,t){var n=this;this.restoreHandlers.push(z(e.prototype,"attachShadow",(function(e){return function(r){var o=e.call(this,r);return this.shadowRoot&&se(this)&&n.addShadowRoot(this.shadowRoot,t),o}})))}},{key:"reset",value:function(){this.restoreHandlers.forEach((function(e){try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}]),e}();function Ye(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((r=r.apply(e,t||[])).next())}))}for(var je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_e="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Je=0;Je>2],o+=je[(3&n[t])<<4|n[t+1]>>4],o+=je[(15&n[t+1])<<2|n[t+2]>>6],o+=je[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o},Pe=new Map;var Qe=function(e,t,r){if(e&&(qe(e,t)||"object"===n(e))){var o=function(e,t){var n=Pe.get(e);return n||(n=new Map,Pe.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(r,e.constructor.name),a=o.indexOf(e);return-1===a&&(a=o.length,o.push(e)),a}};function He(e,t,r){if(e instanceof Array)return e.map((function(e){return He(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:ze(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[He(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement)return{rr_type:e.constructor.name,src:e.src};if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[He(e.data,t,r),e.width,e.height]}:qe(e,t)||"object"===n(e)?{rr_type:e.constructor.name,index:Qe(e,t,r)}:e}var Xe=function(e,t,n){return s(e).map((function(e){return He(e,t,n)}))},qe=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"==typeof t[e]}));return Boolean(n.find((function(n){return e instanceof t[n]})))};function $e(e,t,n){var r=[];try{var o=z(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(r){X(this,t,n,!0)||"__context"in this||(this.__context=r);for(var o=arguments.length,a=new Array(o>1?o-1:0),i=1;i0&&(r.styles=o),this.adoptedStyleSheetCb(r)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),e}(),pt=function(){function e(){r(this,e),this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}return a(e,[{key:"periodicallyClear",value:function(){var e=this;requestAnimationFrame((function(){e.clear(),e.loop&&e.periodicallyClear()}))}},{key:"inOtherBuffer",value:function(e,t){var n=this.nodeMap.get(e);return n&&Array.from(n).some((function(e){return e!==t}))}},{key:"add",value:function(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}},{key:"clear",value:function(){this.nodeMap=new WeakMap}},{key:"destroy",value:function(){this.loop=!1}}]),e}();function ft(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}var ht=!1,gt=new g;function mt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.emit,n=e.checkoutEveryNms,r=e.checkoutEveryNth,o=e.blockClass,a=void 0===o?"rr-block":o,i=e.blockSelector,s=void 0===i?null:i,c=e.ignoreClass,u=void 0===c?"rr-ignore":c,d=e.maskTextClass,p=void 0===d?"rr-mask":d,f=e.maskTextSelector,h=void 0===f?null:f,m=e.inlineStylesheet,v=void 0===m||m,y=e.maskAllInputs,I=e.maskInputOptions,C=e.slimDOMOptions,b=e.maskInputFn,S=e.maskTextFn,A=e.hooks,k=e.packFn,w=e.sampling,M=void 0===w?{}:w,N=e.dataURLOptions,T=void 0===N?{}:N,O=e.mousemoveWait,E=e.recordCanvas,R=void 0!==E&&E,x=e.recordCrossOriginIframes,L=void 0!==x&&x,F=e.recordAfter,D=void 0===F?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":F,W=e.userTriggeredOnInput,G=void 0!==W&&W,B=e.collectFonts,V=void 0!==B&&B,Z=e.inlineImages,Y=void 0!==Z&&Z,j=e.plugins,_=e.keepIframeSrcFn,J=void 0===_?function(){return!1}:_,z=e.ignoreCSSAttributes,X=void 0===z?new Set([]):z;Ae(e.errorHandler);var q=!L||window.parent===window,$=!1;if(!q)try{window.parent.document&&($=!1)}catch(e){$=!0}if(q&&!t)throw new Error("emit function is required");void 0!==O&&void 0===M.mousemove&&(M.mousemove=O),gt.reset();var ee,oe=!0===y?{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!==I?I:{password:!0},ae=!0===C||"all"===C?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===C,headMetaDescKeywords:"all"===C}:C||{};!function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(){for(var t=arguments.length,n=new Array(t),r=0;r=r,c=n&&e.timestamp-ee.timestamp>n;(s||c)&&st(!0)}};var le,de=function(e){it(ft({type:ce.IncrementalSnapshot,data:Object.assign({source:ue.Mutation},e)}))},pe=function(e){return it(ft({type:ce.IncrementalSnapshot,data:Object.assign({source:ue.Scroll},e)}))},fe=function(e){return it(ft({type:ce.IncrementalSnapshot,data:Object.assign({source:ue.CanvasMutation},e)}))},he=new dt({mutationCb:de,adoptedStyleSheetCb:function(e){return it(ft({type:ce.IncrementalSnapshot,data:Object.assign({source:ue.AdoptedStyleSheet},e)}))}}),ge=new Ue({mirror:gt,mutationCb:de,stylesheetManager:he,recordCrossOriginIframes:L,wrappedEmit:it}),me=l(j||[]);try{for(me.s();!(le=me.n()).done;){var ve=le.value;ve.getMirror&&ve.getMirror({nodeMirror:gt,crossOriginIframeMirror:ge.crossOriginIframeMirror,crossOriginIframeStyleMirror:ge.crossOriginIframeStyleMirror})}}catch(e){me.e(e)}finally{me.f()}var ye=new pt;ct=new lt({recordCanvas:R,mutationCb:fe,win:window,blockClass:a,blockSelector:s,mirror:gt,sampling:M.canvas,dataURLOptions:T});var Ie=new Ke({mutationCb:de,scrollCb:pe,bypassOptions:{blockClass:a,blockSelector:s,maskTextClass:p,maskTextSelector:h,inlineStylesheet:v,maskInputOptions:oe,dataURLOptions:T,maskTextFn:S,maskInputFn:b,recordCanvas:R,inlineImages:Y,sampling:M,slimDOMOptions:ae,iframeManager:ge,stylesheetManager:he,canvasManager:ct,keepIframeSrcFn:J,processedNodeManager:ye},mirror:gt});st=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];it(ft({type:ce.Meta,data:{href:window.location.href,width:H(),height:Q()}}),e),he.reset(),Ie.init(),Me.forEach((function(e){return e.lock()}));var t=function(e,t){var n=t||{},r=n.mirror,o=void 0===r?new g:r,a=n.blockClass,i=void 0===a?"rr-block":a,s=n.blockSelector,c=void 0===s?null:s,u=n.maskTextClass,l=void 0===u?"rr-mask":u,d=n.maskTextSelector,p=void 0===d?null:d,f=n.inlineStylesheet,h=void 0===f||f,m=n.inlineImages,v=void 0!==m&&m,y=n.recordCanvas,I=void 0!==y&&y,C=n.maskAllInputs,b=void 0!==C&&C,S=n.maskTextFn,A=n.maskInputFn,k=n.slimDOM,w=void 0!==k&&k,M=n.dataURLOptions,N=n.preserveWhiteSpace,T=n.onSerialize,O=n.onIframeLoad,E=n.iframeLoadTimeout,R=n.onStylesheetLoad,x=n.stylesheetLoadTimeout,L=n.keepIframeSrcFn;return U(e,{doc:e,mirror:o,blockClass:i,blockSelector:c,maskTextClass:l,maskTextSelector:p,skipChild:!1,inlineStylesheet:h,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:S,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:v,recordCanvas:I,preserveWhiteSpace:N,onSerialize:T,onIframeLoad:O,iframeLoadTimeout:E,onStylesheetLoad:R,stylesheetLoadTimeout:x,keepIframeSrcFn:void 0===L?function(){return!1}:L,newlyAddedElement:!1})}(document,{mirror:gt,blockClass:a,blockSelector:s,maskTextClass:p,maskTextSelector:h,inlineStylesheet:v,maskAllInputs:oe,maskTextFn:S,slimDOM:ae,dataURLOptions:T,recordCanvas:R,inlineImages:Y,onSerialize:function(e){te(e,gt)&&ge.addIframe(e),ne(e,gt)&&he.trackLinkElement(e),re(e)&&Ie.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){ge.attachIframe(e,t),Ie.observeAttachShadow(e)},onStylesheetLoad:function(e,t){he.attachLinkElement(e,t)},keepIframeSrcFn:J});if(!t)return console.warn("Failed to snapshot the document");it(ft({type:ce.FullSnapshot,data:{node:t,initialOffset:P(window)}}),e),Me.forEach((function(e){return e.unlock()})),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&he.adoptStyleSheets(document.adoptedStyleSheets,gt.getId(document))};try{var Ce=[],be=function(e){var t;return we(Ge)({mutationCb:de,mousemoveCb:function(e,t){return it(ft({type:ce.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return it(ft({type:ce.IncrementalSnapshot,data:Object.assign({source:ue.MouseInteraction},e)}))},scrollCb:pe,viewportResizeCb:function(e){return it(ft({type:ce.IncrementalSnapshot,data:Object.assign({source:ue.ViewportResize},e)}))},inputCb:function(e){return it(ft({type:ce.IncrementalSnapshot,data:Object.assign({source:ue.Input},e)}))},mediaInteractionCb:function(e){return it(ft({type:ce.IncrementalSnapshot,data:Object.assign({source:ue.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return it(ft({type:ce.IncrementalSnapshot,data:Object.assign({source:ue.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return it(ft({type:ce.IncrementalSnapshot,data:Object.assign({source:ue.StyleDeclaration},e)}))},canvasMutationCb:fe,fontCb:function(e){return it(ft({type:ce.IncrementalSnapshot,data:Object.assign({source:ue.Font},e)}))},selectionCb:function(e){it(ft({type:ce.IncrementalSnapshot,data:Object.assign({source:ue.Selection},e)}))},blockClass:a,ignoreClass:u,maskTextClass:p,maskTextSelector:h,maskInputOptions:oe,inlineStylesheet:v,sampling:M,recordCanvas:R,inlineImages:Y,userTriggeredOnInput:G,collectFonts:V,doc:e,maskInputFn:b,maskTextFn:S,keepIframeSrcFn:J,blockSelector:s,slimDOMOptions:ae,dataURLOptions:T,mirror:gt,iframeManager:ge,stylesheetManager:he,shadowDomManager:Ie,processedNodeManager:ye,canvasManager:ct,ignoreCSSAttributes:X,plugins:(null===(t=null==j?void 0:j.filter((function(e){return e.observer})))||void 0===t?void 0:t.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return it(ft({type:ce.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},A)};ge.addLoadListener((function(e){try{Ce.push(be(e.contentDocument))}catch(e){console.warn(e)}}));var Se=function(){st(),Ce.push(be(document)),ht=!0};return"interactive"===document.readyState||"complete"===document.readyState?Se():(Ce.push(K("DOMContentLoaded",(function(){it(ft({type:ce.DomContentLoaded,data:{}})),"DOMContentLoaded"===D&&Se()}))),Ce.push(K("load",(function(){it(ft({type:ce.Load,data:{}})),"load"===D&&Se()}),window))),function(){Ce.forEach((function(e){return e()})),ye.destroy(),ht=!1,ke()}}catch(e){console.warn(e)}}mt.addCustomEvent=function(e,t){if(!ht)throw new Error("please add custom event after start recording");it(ft({type:ce.Custom,data:{tag:e,payload:t}}))},mt.freezePage=function(){Me.forEach((function(e){return e.freeze()}))},mt.takeFullSnapshot=function(e){if(!ht)throw new Error("please take full snapshot after start recording");st(e)},mt.mirror=gt;var vt=function(){function e(t){r(this,e),this.fileName=t.fileName||"",this.functionName=t.functionName||"",this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber}return a(e,[{key:"toString",value:function(){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)}}]),e}(),yt=/(^|@)\S+:\d+/,It=/^\s*at .*(\S+:\d+|\(native\))/m,Ct=/^(eval@)?(\[native code])?$/,bt={parse:function(e){if(!e)return[];if(void 0!==e.stacktrace||void 0!==e["opera#sourceloc"])return this.parseOpera(e);if(e.stack&&e.stack.match(It))return this.parseV8OrIE(e);if(e.stack)return this.parseFFOrSafari(e);throw new Error("Cannot parse given Error object")},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(It)}),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,"("),n=t.match(/ (\((.+):(\d+):(\d+)\)$)/),r=(t=n?t.replace(n[0],""):t).split(/\s+/).slice(1),o=this.extractLocation(n?n[1]:r.pop()),a=r.join(" ")||void 0,i=["eval",""].indexOf(o[0])>-1?void 0:o[0];return new vt({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(Ct)}),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 vt({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,o=this.extractLocation(e.replace(t,""));return new vt({functionName:r,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,n=e.message.split("\n"),r=[],o=2,a=n.length;o/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new vt({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)}};function St(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var n=e.localName;if(!n)break;n=n.toLowerCase();var r=e.parentElement,o=[];if(r.children&&r.children.length>0)for(var a=0;a1&&(n+=":eq(".concat(o.indexOf(e),")")),t=n+(t?">"+t:""),e=r}return t}function At(e){return"[object Object]"===Object.prototype.toString.call(e)}function kt(e,t){if(0===t)return!0;for(var n=0,r=Object.keys(e);n0){var a=r.indexOf(this);~a?r.splice(a+1):r.push(this),~a?o.splice(a,1/0,e):o.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+o.slice(0,r.indexOf(t)).join(".")+"]")}else r.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(At(e)&&Object.keys(e).length>n.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(At(e)&&kt(e,n.depthOfLimit))return!0;return!1}(t))return function(e){var t=e.toString();n.stringLengthLimit&&t.length>n.stringLengthLimit&&(t="".concat(t.slice(0,n.stringLengthLimit),"..."));return t}(t);if(t instanceof Event){var i={};for(var s in t){var c=t[s];Array.isArray(c)?i[s]=St(c.length?c[0]:null):i[s]=c}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 Mt={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 Nt(e,t,n){var r,o=n?Object.assign({},Mt,n):Mt,a=o.logger;if(!a)return function(){};r="string"==typeof a?t[a]:a;var i=0,s=!1,c=[];if(o.level.includes("error")){var u=function(t){var n=t.message,r=t.error,a=bt.parse(r).map((function(e){return e.toString()})),i=[wt(n,o.stringifyOptions)];e({level:"error",trace:a,payload:i})};t.addEventListener("error",u),c.push((function(){t.removeEventListener("error",u)}));var d=function(t){var n,r;t.reason instanceof Error?(n=t.reason,r=[wt("Uncaught (in promise) ".concat(n.name,": ").concat(n.message),o.stringifyOptions)]):(n=new Error,r=[wt("Uncaught (in promise)",o.stringifyOptions),wt(t.reason,o.stringifyOptions)]);var a=bt.parse(n).map((function(e){return e.toString()}));e({level:"error",trace:a,payload:r})};t.addEventListener("unhandledrejection",d),c.push((function(){t.removeEventListener("unhandledrejection",d)}))}var p,f=l(o.level);try{for(f.s();!(p=f.n()).done;){var h=p.value;c.push(g(r,h))}}catch(e){f.e(e)}finally{f.f()}return function(){c.forEach((function(e){return e()}))};function g(t,n){var r=this;return t[n]?z(t,n,(function(t){return function(){for(var a=arguments.length,c=new Array(a),u=0;u