Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rrweb

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rrweb - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

2

dist/plugins/console-record.min.js

@@ -15,3 +15,3 @@ var rrwebConsoleRecord=function(e){"use strict";

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function r(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function t(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function n(){for(var e=[],r=0;r<arguments.length;r++)e=e.concat(t(arguments[r]));return e}var o,i,a,u,c,l;!function(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"}(o||(o={})),function(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"}(i||(i={})),function(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"}(a||(a={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked"}(u||(u={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back"}(c||(c={})),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"}(l||(l={}));var s="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.",f={map:{},getId:function(){return console.error(s),-1},getNode:function(){return console.error(s),null},removeNodeFromMap:function(){console.error(s)},has:function(){return console.error(s),!1},reset:function(){console.error(s)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(f=new Proxy(f,{get:function(e,r,t){return"map"===r&&console.error(s),Reflect.get(e,r,t)}}));var p=function(){function e(e){this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}return e.prototype.toString=function(){var e=this.lineNumber||"",r=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+e+":"+r+")":this.fileName+":"+e+":"+r},e}(),h=/(^|@)\S+:\d+/,d=/^\s*at .*(\S+:\d+|\(native\))/m,m=/^(eval@)?(\[native code])?$/,v={parse:function(e){if(void 0!==e.stacktrace||void 0!==e["opera#sourceloc"])return this.parseOpera(e);if(e.stack&&e.stack.match(d))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 r=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!r)throw new Error("Cannot parse given url: "+e);return[r[1],r[2]||void 0,r[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(d)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),t=r.match(/ (\((.+):(\d+):(\d+)\)$)/),n=(r=t?r.replace(t[0],""):r).split(/\s+/).slice(1),o=this.extractLocation(t?t[1]:n.pop()),i=n.join(" ")||void 0,a=["eval","<anonymous>"].indexOf(o[0])>-1?void 0:o[0];return new p({functionName:i,fileName:a,lineNumber:o[1],columnNumber:o[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(m)}),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 p({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,t=e.match(r),n=t&&t[1]?t[1]:void 0,o=this.extractLocation(e.replace(r,""));return new p({functionName:n,fileName:o[0],lineNumber:o[1],columnNumber:o[2]})}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,t=e.message.split("\n"),n=[],o=2,i=t.length;o<i;o+=2){var a=r.exec(t[o]);a&&n.push(new p({fileName:a[2],lineNumber:parseFloat(a[1])}))}return n},parseOpera10:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,t=e.stacktrace.split("\n"),n=[],o=0,i=t.length;o<i;o+=2){var a=r.exec(t[o]);a&&n.push(new p({functionName:a[3]||void 0,fileName:a[2],lineNumber:parseFloat(a[1])}))}return n},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(h)&&!e.match(/^Error created at/)}),this).map((function(e){var r=e.split("@"),t=this.extractLocation(r.pop()),n=(r.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new p({functionName:n,fileName:t[0],lineNumber:t[1],columnNumber:t[2]})}),this)}};function g(e){if(!e||!e.outerHTML)return"";for(var r="";e.parentElement;){var t=e.localName;if(!t)break;t=t.toLowerCase();var n=e.parentElement,o=[];if(n.children&&n.children.length>0)for(var i=0;i<n.children.length;i++){var a=n.children[i];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===t&&o.push(a)}o.length>1&&(t+=":eq("+o.indexOf(e)+")"),r=t+(r?">"+r:""),e=n}return r}function y(e){return"[object Object]"===Object.prototype.toString.call(e)}function b(e,t){var n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);var o=[],i=[];return JSON.stringify(e,(function(e,t){if(o.length>0){var a=o.indexOf(this);~a?o.splice(a+1):o.push(this),~a?i.splice(a,1/0,e):i.push(e),~o.indexOf(t)&&(t=o[0]===t?"[Circular ~]":"[Circular ~."+i.slice(0,o.indexOf(t)).join(".")+"]")}else o.push(t);if(null==t)return t;if(function(e){if(y(e)&&Object.keys(e).length>n.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(y(e)&&function e(t,n){var o,i;if(0===n)return!0;var a=Object.keys(t);try{for(var u=r(a),c=u.next();!c.done;c=u.next()){var l=c.value;if(y(t[l])&&e(t[l],n-1))return!0}}catch(e){o={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return!1}(e,n.depthOfLimit))return!0;return!1}(t))return function(e){var r=e.toString();n.stringLengthLimit&&r.length>n.stringLengthLimit&&(r=r.slice(0,n.stringLengthLimit)+"...");return r}(t);if(t instanceof Event){var u={};for(var c in t){var l=t[c];Array.isArray(l)?u[c]=g(l.length?l[0]:null):u[c]=l}return u}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t}))}var w={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 N(e,t){var o,i,a=this,u=t.logger;if(!u)return function(){};var c=0,l=[];if(t.level.includes("error")&&window){var s=window.onerror;window.onerror=function(r,n,o,i,u){s&&s.apply(a,[r,n,o,i,u]);var c=v.parse(u).map((function(e){return e.toString()})),l=[b(r,t.stringifyOptions)];e({level:"error",trace:c,payload:l})},l.push((function(){window.onerror=s}))}try{for(var f=r(t.level),p=f.next();!p.done;p=f.next()){var h=p.value;l.push(d(u,h))}}catch(e){o={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}return function(){l.forEach((function(e){return e()}))};function d(r,o){var i=this;return r[o]?function(e,r,t){try{if(!(r in e))return function(){};var n=e[r],o=t(n);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[r]=o,function(){e[r]=n}}catch(e){return function(){}}}(r,o,(function(r){return function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];r.apply(i,a);try{var l=v.parse(new Error).map((function(e){return e.toString()})).splice(1),s=a.map((function(e){return b(e,t.stringifyOptions)}));++c<t.lengthThreshold?e({level:o,trace:l,payload:s}):c===t.lengthThreshold&&e({level:"warn",trace:[],payload:[b("The number of log records reached the threshold.")]})}catch(e){r.apply(void 0,n(["rrweb logger error:",e],a))}}})):function(){}}}return e.PLUGIN_NAME="rrweb/console@1",e.getRecordConsolePlugin=function(e){return{name:"rrweb/console@1",observer:N,options:e?Object.assign({},w,e):w}},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
***************************************************************************** */function r(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function t(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function n(){for(var e=[],r=0;r<arguments.length;r++)e=e.concat(t(arguments[r]));return e}var o,i,a,u,c,l;!function(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"}(o||(o={})),function(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"}(i||(i={})),function(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"}(a||(a={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked"}(u||(u={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back"}(c||(c={})),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"}(l||(l={}));var s="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.",f={map:{},getId:function(){return console.error(s),-1},getNode:function(){return console.error(s),null},removeNodeFromMap:function(){console.error(s)},has:function(){return console.error(s),!1},reset:function(){console.error(s)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(f=new Proxy(f,{get:function(e,r,t){return"map"===r&&console.error(s),Reflect.get(e,r,t)}}));var p=function(){function e(e){this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}return e.prototype.toString=function(){var e=this.lineNumber||"",r=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+e+":"+r+")":this.fileName+":"+e+":"+r},e}(),h=/(^|@)\S+:\d+/,d=/^\s*at .*(\S+:\d+|\(native\))/m,m=/^(eval@)?(\[native code])?$/,v={parse:function(e){if(void 0!==e.stacktrace||void 0!==e["opera#sourceloc"])return this.parseOpera(e);if(e.stack&&e.stack.match(d))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 r=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!r)throw new Error("Cannot parse given url: "+e);return[r[1],r[2]||void 0,r[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(d)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),t=r.match(/ (\((.+):(\d+):(\d+)\)$)/),n=(r=t?r.replace(t[0],""):r).split(/\s+/).slice(1),o=this.extractLocation(t?t[1]:n.pop()),i=n.join(" ")||void 0,a=["eval","<anonymous>"].indexOf(o[0])>-1?void 0:o[0];return new p({functionName:i,fileName:a,lineNumber:o[1],columnNumber:o[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(m)}),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 p({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,t=e.match(r),n=t&&t[1]?t[1]:void 0,o=this.extractLocation(e.replace(r,""));return new p({functionName:n,fileName:o[0],lineNumber:o[1],columnNumber:o[2]})}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,t=e.message.split("\n"),n=[],o=2,i=t.length;o<i;o+=2){var a=r.exec(t[o]);a&&n.push(new p({fileName:a[2],lineNumber:parseFloat(a[1])}))}return n},parseOpera10:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,t=e.stacktrace.split("\n"),n=[],o=0,i=t.length;o<i;o+=2){var a=r.exec(t[o]);a&&n.push(new p({functionName:a[3]||void 0,fileName:a[2],lineNumber:parseFloat(a[1])}))}return n},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(h)&&!e.match(/^Error created at/)}),this).map((function(e){var r=e.split("@"),t=this.extractLocation(r.pop()),n=(r.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new p({functionName:n,fileName:t[0],lineNumber:t[1],columnNumber:t[2]})}),this)}};function g(e){if(!e||!e.outerHTML)return"";for(var r="";e.parentElement;){var t=e.localName;if(!t)break;t=t.toLowerCase();var n=e.parentElement,o=[];if(n.children&&n.children.length>0)for(var i=0;i<n.children.length;i++){var a=n.children[i];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===t&&o.push(a)}o.length>1&&(t+=":eq("+o.indexOf(e)+")"),r=t+(r?">"+r:""),e=n}return r}function y(e){return"[object Object]"===Object.prototype.toString.call(e)}function b(e,t){var n,o;if(0===t)return!0;var i=Object.keys(e);try{for(var a=r(i),u=a.next();!u.done;u=a.next()){var c=u.value;if(y(e[c])&&b(e[c],t-1))return!0}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return!1}function w(e,r){var t={numOfKeysLimit:50,depthOfLimit:4};Object.assign(t,r);var n=[],o=[];return JSON.stringify(e,(function(e,r){if(n.length>0){var i=n.indexOf(this);~i?n.splice(i+1):n.push(this),~i?o.splice(i,1/0,e):o.push(e),~n.indexOf(r)&&(r=n[0]===r?"[Circular ~]":"[Circular ~."+o.slice(0,n.indexOf(r)).join(".")+"]")}else n.push(r);if(null==r)return r;if(function(e){if(y(e)&&Object.keys(e).length>t.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(y(e)&&b(e,t.depthOfLimit))return!0;return!1}(r))return function(e){var r=e.toString();t.stringLengthLimit&&r.length>t.stringLengthLimit&&(r=r.slice(0,t.stringLengthLimit)+"...");return r}(r);if(r instanceof Event){var a={};for(var u in r){var c=r[u];Array.isArray(c)?a[u]=g(c.length?c[0]:null):a[u]=c}return a}return r instanceof Node?r instanceof HTMLElement?r?r.outerHTML:"":r.nodeName:r}))}var N={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 S(e,t,o){var i,a,u,c=this,l=o.logger;if(!l)return function(){};u="string"==typeof l?t[l]:l;var s=0,f=[];if(o.level.includes("error")&&window){var p=window.onerror;window.onerror=function(r,t,n,i,a){p&&p.apply(c,[r,t,n,i,a]);var u=v.parse(a).map((function(e){return e.toString()})),l=[w(r,o.stringifyOptions)];e({level:"error",trace:u,payload:l})},f.push((function(){window.onerror=p}))}try{for(var h=r(o.level),d=h.next();!d.done;d=h.next()){var m=d.value;f.push(g(u,m))}}catch(e){i={error:e}}finally{try{d&&!d.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}return function(){f.forEach((function(e){return e()}))};function g(r,t){var i=this;return r[t]?function(e,r,t){try{if(!(r in e))return function(){};var n=e[r],o=t(n);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[r]=o,function(){e[r]=n}}catch(e){return function(){}}}(r,t,(function(r){return function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];r.apply(i,a);try{var c=v.parse(new Error).map((function(e){return e.toString()})).splice(1),l=a.map((function(e){return w(e,o.stringifyOptions)}));++s<o.lengthThreshold?e({level:t,trace:c,payload:l}):s===o.lengthThreshold&&e({level:"warn",trace:[],payload:[w("The number of log records reached the threshold.")]})}catch(e){r.apply(void 0,n(["rrweb logger error:",e],a))}}})):function(){}}}var O="rrweb/console@1";return e.PLUGIN_NAME=O,e.getRecordConsolePlugin=function(e){return{name:O,observer:S,options:e?Object.assign({},N,e):N}},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
//# sourceMappingURL=console-record.min.js.map

@@ -15,3 +15,3 @@ var rrwebRecord=function(){"use strict";

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var e,t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function n(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function o(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e}function a(e){var t,n=null===(t=e)||void 0===t?void 0:t.host;return Boolean(n&&n.shadowRoot&&n.shadowRoot===e)}function i(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,a=e.maskInputFn,i=o||"";return(t[n.toLowerCase()]||t[r])&&(i=a?a(i):"*".repeat(i.length)),i}!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 s=1,u=RegExp("[^a-z0-9-_:]");function l(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(c).join(""):null}catch(e){return null}}function c(e){return function(e){return"styleSheet"in e}(e)?l(e.styleSheet)||"":e.cssText}var d=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,p=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,m=/^(data:)([^,]*),(.*)/i;function f(e,t){return(e||"").replace(d,(function(e,n,r,o,a,i){var s,u=r||a||i,l=n||o||"";if(!u)return e;if(!p.test(u))return"url("+l+u+l+")";if(m.test(u))return"url("+l+u+l+")";if("/"===u[0])return"url("+l+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+u)+l+")";var c=t.split("/"),d=u.split("/");c.pop();for(var f=0,h=d;f<h.length;f++){var v=h[f];"."!==v&&(".."===v?c.pop():c.push(v))}return"url("+l+c.join("/")+l+")"}))}var h,v,y,g,b,S=/^[^ \t\n\r\u000c]+/,k=/^[, \t\n\r\u000c]+/;function C(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function I(){var e=document.createElement("a");return e.href="",e.href}function w(e,t,n,r){return"src"===n||("href"===n||"xlink:href"===n)&&r?C(e,r):"background"!==n||!r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n&&r?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}for(var o=[];r(k),!(n>=t.length);){var a=r(S);if(","===a.slice(-1))a=C(e,a.substring(0,a.length-1)),o.push(a);else{var i="";a=C(e,a);for(var s=!1;;){var u=t.charAt(n);if(""===u){o.push((a+i).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,o.push((a+i).trim());break}"("===u&&(s=!0)}i+=u,n+=1}}}return o.join(", ")}(e,r):"style"===n&&r?f(r,I()):r:C(e,r)}function T(e,t,n){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){if("string"==typeof t){if(e.classList.contains(t))return!0}else e.classList.forEach((function(e){if(t.test(e))return!0}));return!(!n||!e.matches(n))||T(e.parentNode,t,n)}return e.nodeType,e.TEXT_NODE,T(e.parentNode,t,n)}function x(t,n){var r,o,a=n.doc,s=n.blockClass,c=n.blockSelector,d=n.maskTextClass,p=n.maskTextSelector,m=n.inlineStylesheet,h=n.maskInputOptions,v=void 0===h?{}:h,y=n.maskTextFn,g=n.maskInputFn,b=n.recordCanvas,S=n.keepIframeSrcFn;if(a.__sn){var k=a.__sn.id;r=1===k?void 0:k}switch(t.nodeType){case t.DOCUMENT_NODE:return{type:e.Document,childNodes:[],rootId:r};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:r};case t.ELEMENT_NODE:for(var C=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=0;r<e.classList.length;r++){var o=e.classList[r];if(t.test(o))return!0}return!!n&&e.matches(n)}(t,s,c),x=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return u.test(t)?"div":t}(t),E={},M=0,O=Array.from(t.attributes);M<O.length;M++){var N=O[M],D=N.name,_=N.value;E[D]=w(a,x,D,_)}if("link"===x&&m){var R,F=Array.from(a.styleSheets).find((function(e){return e.href===t.href}));(R=l(F))&&(delete E.rel,delete E.href,E._cssText=f(R,F.href))}if("style"===x&&t.sheet&&!(t.innerText||t.textContent||"").trim().length)(R=l(t.sheet))&&(E._cssText=f(R,I()));if("input"===x||"textarea"===x||"select"===x){_=t.value;"radio"!==E.type&&"checkbox"!==E.type&&"submit"!==E.type&&"button"!==E.type&&_?E.value=i({type:E.type,tagName:x,value:_,maskInputOptions:v,maskInputFn:g}):t.checked&&(E.checked=t.checked)}if("option"===x&&(t.selected?E.selected=!0:delete E.selected),"canvas"===x&&b&&(E.rr_dataURL=t.toDataURL()),"audio"!==x&&"video"!==x||(E.rr_mediaState=t.paused?"paused":"played",E.rr_mediaCurrentTime=t.currentTime),t.scrollLeft&&(E.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(E.rr_scrollTop=t.scrollTop),C){var L=t.getBoundingClientRect(),P=L.width,A=L.height;E={class:E.class,rr_width:P+"px",rr_height:A+"px"}}return"iframe"!==x||S(E.src)||delete E.src,{type:e.Element,tagName:x,attributes:E,childNodes:[],isSVG:(o=t,"svg"===o.tagName||o instanceof SVGElement||void 0),needBlock:C,rootId:r};case t.TEXT_NODE:var z=t.parentNode&&t.parentNode.tagName,V=t.textContent,W="STYLE"===z||void 0,H="SCRIPT"===z||void 0;return W&&V&&(V=f(V,I())),H&&(V="SCRIPT_PLACEHOLDER"),!W&&!H&&T(t,d,p)&&V&&(V=y?y(V):V.replace(/[\S]/g,"*")),{type:e.Text,textContent:V||"",isStyle:W,rootId:r};case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:"",rootId:r};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||"",rootId:r};default:return!1}}function E(e){return void 0===e?"":e.toLowerCase()}function M(t,n){var r,o=n.doc,i=n.map,u=n.blockClass,l=n.blockSelector,c=n.maskTextClass,d=n.maskTextSelector,p=n.skipChild,m=void 0!==p&&p,f=n.inlineStylesheet,h=void 0===f||f,v=n.maskInputOptions,y=void 0===v?{}:v,g=n.maskTextFn,b=n.maskInputFn,S=n.slimDOMOptions,k=n.recordCanvas,C=void 0!==k&&k,I=n.onSerialize,w=n.onIframeLoad,T=n.iframeLoadTimeout,O=void 0===T?5e3:T,N=n.keepIframeSrcFn,D=void 0===N?function(){return!1}:N,_=n.preserveWhiteSpace,R=void 0===_||_,F=x(t,{doc:o,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,inlineStylesheet:h,maskInputOptions:y,maskTextFn:g,maskInputFn:b,recordCanvas:C,keepIframeSrcFn:D});if(!F)return console.warn(t,"not serialized"),null;r="__sn"in t?t.__sn.id:!function(t,n){if(n.comment&&t.type===e.Comment)return!0;if(t.type===e.Element){if(n.script&&("script"===t.tagName||"link"===t.tagName&&"preload"===t.attributes.rel&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")))return!0;if(n.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(E(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===E(t.attributes.name)||"icon"===E(t.attributes.rel)||"apple-touch-icon"===E(t.attributes.rel)||"shortcut icon"===E(t.attributes.rel))))return!0;if("meta"===t.tagName){if(n.headMetaDescKeywords&&E(t.attributes.name).match(/^description|keywords$/))return!0;if(n.headMetaSocial&&(E(t.attributes.property).match(/^(og|twitter|fb):/)||E(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===E(t.attributes.name)))return!0;if(n.headMetaRobots&&("robots"===E(t.attributes.name)||"googlebot"===E(t.attributes.name)||"bingbot"===E(t.attributes.name)))return!0;if(n.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(n.headMetaAuthorship&&("author"===E(t.attributes.name)||"generator"===E(t.attributes.name)||"framework"===E(t.attributes.name)||"publisher"===E(t.attributes.name)||"progid"===E(t.attributes.name)||E(t.attributes.property).match(/^article:/)||E(t.attributes.property).match(/^product:/)))return!0;if(n.headMetaVerification&&("google-site-verification"===E(t.attributes.name)||"yandex-verification"===E(t.attributes.name)||"csrf-token"===E(t.attributes.name)||"p:domain_verify"===E(t.attributes.name)||"verify-v1"===E(t.attributes.name)||"verification"===E(t.attributes.name)||"shopify-checkout-api-token"===E(t.attributes.name)))return!0}}return!1}(F,S)&&(R||F.type!==e.Text||F.isStyle||F.textContent.replace(/^\s+|\s+$/gm,"").length)?s++:-2;var L=Object.assign(F,{id:r});if(t.__sn=L,-2===r)return null;i[r]=t,I&&I(t);var P=!m;if(L.type===e.Element&&(P=P&&!L.needBlock,delete L.needBlock),(L.type===e.Document||L.type===e.Element)&&P){S.headWhitespace&&F.type===e.Element&&"head"===F.tagName&&(R=!1);for(var A={doc:o,map:i,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,skipChild:m,inlineStylesheet:h,maskInputOptions:y,maskTextFn:g,maskInputFn:b,slimDOMOptions:S,recordCanvas:C,preserveWhiteSpace:R,onSerialize:I,onIframeLoad:w,iframeLoadTimeout:O,keepIframeSrcFn:D},z=0,V=Array.from(t.childNodes);z<V.length;z++){(j=M(V[z],A))&&L.childNodes.push(j)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(t)&&t.shadowRoot){L.isShadowHost=!0;for(var W=0,H=Array.from(t.shadowRoot.childNodes);W<H.length;W++){var j;(j=M(H[W],A))&&(j.isShadow=!0,L.childNodes.push(j))}}}return t.parentNode&&a(t.parentNode)&&(L.isShadow=!0),L.type===e.Element&&"iframe"===L.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var o,a=!1;try{o=r.document.readyState}catch(e){return}if("complete"===o){"about:blank"===r.location.href&&"about:blank"!==e.src&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}else{var i=setTimeout((function(){a||(t(),a=!0)}),n);e.addEventListener("load",(function(){clearTimeout(i),a=!0,t()}))}}}(t,(function(){var e=t.contentDocument;if(e&&w){var n=M(e,{doc:e,map:i,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:y,maskTextFn:g,maskInputFn:b,slimDOMOptions:S,recordCanvas:C,preserveWhiteSpace:R,onSerialize:I,onIframeLoad:w,iframeLoadTimeout:O,keepIframeSrcFn:D});n&&w(t,n)}}),O),L}function O(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}!function(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"}(h||(h={})),function(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"}(v||(v={})),function(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"}(y||(y={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked"}(g||(g={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back"}(b||(b={}));var N="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.",D={map:{},getId:function(){return console.error(N),-1},getNode:function(){return console.error(N),null},removeNodeFromMap:function(){console.error(N)},has:function(){return console.error(N),!1},reset:function(){console.error(N)}};function _(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(a){var i=Date.now();o||!1!==n.leading||(o=i);var s=t-(i-o),u=this,l=arguments;s<=0||s>t?(r&&(window.clearTimeout(r),r=null),o=i,e.apply(u,l)):r||!1===n.trailing||(r=window.setTimeout((function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(u,l)}),s))}}function R(e,t,n,r,o){void 0===o&&(o=window);var 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 R(e,t,a||{},!0)}}function F(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 L(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function P(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function A(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var n=!1;return"string"==typeof t?n=e.classList.contains(t):e.classList.forEach((function(e){t.test(e)&&(n=!0)})),n||A(e.parentNode,t)}return e.nodeType,e.TEXT_NODE,A(e.parentNode,t)}function z(e){return"__sn"in e&&-2===e.__sn.id}function V(e){return Boolean(e.changedTouches)}function W(t){return"__sn"in t&&(t.__sn.type===e.Element&&"iframe"===t.__sn.tagName)}function H(e){var t;return Boolean(null===(t=e)||void 0===t?void 0:t.shadowRoot)}function j(e){return"__ln"in e}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(D=new Proxy(D,{get:function(e,t,n){return"map"===t&&console.error(N),Reflect.get(e,t,n)}}));var B=function(){function e(){this.length=0,this.head=null}return e.prototype.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t},e.prototype.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&j(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&j(e.nextSibling)&&e.nextSibling.__ln.previous){n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++},e.prototype.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)},e}(),G=function(e,t){return e+"@"+t};function U(e){return"__sn"in e}var X=function(){function e(){var e=this;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=function(t){t.forEach(e.processMutation),e.emit()},this.emit=function(){var t,r,o,i;if(!e.frozen&&!e.locked){for(var s=[],u=new B,l=function(t){for(var n=t,r=-2;-2===r;)r=(n=n&&n.nextSibling)&&e.mirror.getId(n);return-1===r&&A(t.nextSibling,e.blockClass)&&(r=null),r},c=function(t){var n,r=t.getRootNode?null===(n=t.getRootNode())||void 0===n?void 0:n.host:null,o=!(e.doc.contains(t)||r instanceof Node&&e.doc.contains(r));if(t.parentNode&&!o){var i=a(t.parentNode)?e.mirror.getId(r):e.mirror.getId(t.parentNode),c=l(t);if(-1===i||-1===c)return u.addNode(t);var d=M(t,{doc:e.doc,map:e.mirror.map,blockClass:e.blockClass,blockSelector:e.blockSelector,maskTextClass:e.maskTextClass,maskTextSelector:e.maskTextSelector,skipChild:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:e.slimDOMOptions,recordCanvas:e.recordCanvas,onSerialize:function(n){W(n)&&e.iframeManager.addIframe(n),H(t)&&e.shadowDomManager.addShadowRoot(t.shadowRoot,document)},onIframeLoad:function(t,n){e.iframeManager.attachIframe(t,n)}});d&&s.push({parentId:i,nextId:c,node:d})}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());try{for(var d=n(e.movedSet),p=d.next();!p.done;p=d.next()){var m=p.value;Y(e.removes,m,e.mirror)&&!e.movedSet.has(m.parentNode)||c(m)}}catch(e){t={error:e}}finally{try{p&&!p.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}try{for(var f=n(e.addedSet),h=f.next();!h.done;h=f.next()){m=h.value;K(e.droppedSet,m)||Y(e.removes,m,e.mirror)?K(e.movedSet,m)?c(m):e.droppedSet.add(m):c(m)}}catch(e){o={error:e}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}for(var v=null;u.length;){var y=null;if(v){var g=e.mirror.getId(v.value.parentNode),b=l(v.value);-1!==g&&-1!==b&&(y=v)}if(!y)for(var S=u.length-1;S>=0;S--){var k=u.get(S);if(k){g=e.mirror.getId(k.value.parentNode),b=l(k.value);if(-1!==g&&-1!==b){y=k;break}}}if(!y){for(;u.head;)u.removeNode(u.head.value);break}v=y.previous,u.removeNode(y.value),c(y.value)}var C={texts:e.texts.map((function(t){return{id:e.mirror.getId(t.node),value:t.value}})).filter((function(t){return e.mirror.has(t.id)})),attributes:e.attributes.map((function(t){return{id:e.mirror.getId(t.node),attributes:t.attributes}})).filter((function(t){return e.mirror.has(t.id)})),removes:e.removes,adds:s};(C.texts.length||C.attributes.length||C.removes.length||C.adds.length)&&(e.texts=[],e.attributes=[],e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.movedMap={},e.emissionCallback(C))}},this.processMutation=function(t){if(!z(t.target))switch(t.type){case"characterData":var n=t.target.textContent;A(t.target,e.blockClass)||n===t.oldValue||e.texts.push({value:T(t.target,e.maskTextClass,e.maskTextSelector)&&n?e.maskTextFn?e.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break;case"attributes":var r=t.target;n=t.target.getAttribute(t.attributeName);if("value"===t.attributeName&&(n=i({maskInputOptions:e.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:n,maskInputFn:e.maskInputFn})),A(t.target,e.blockClass)||n===t.oldValue)return;var o=e.attributes.find((function(e){return e.node===t.target}));if(o||(o={node:t.target,attributes:{}},e.attributes.push(o)),"style"===t.attributeName){var s=e.doc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue),void 0!==o.attributes.style&&null!==o.attributes.style||(o.attributes.style={});for(var u=o.attributes.style,l=0;l<r.style.length;l++){var c=r.style[l],d=r.style.getPropertyValue(c),p=r.style.getPropertyPriority(c);d==s.style.getPropertyValue(c)&&p==s.style.getPropertyPriority(c)||(u[c]=""==p?d:[d,p])}for(l=0;l<s.style.length;l++){c=s.style[l];""!==r.style.getPropertyValue(c)&&r.style.getPropertyValue(c)||(u[c]=!1)}}else o.attributes[t.attributeName]=w(e.doc,t.target.tagName,t.attributeName,n);break;case"childList":t.addedNodes.forEach((function(n){return e.genAdds(n,t.target)})),t.removedNodes.forEach((function(n){var r=e.mirror.getId(n),o=a(t.target)?e.mirror.getId(t.target.host):e.mirror.getId(t.target);A(n,e.blockClass)||A(t.target,e.blockClass)||z(n)||(e.addedSet.has(n)?(q(e.addedSet,n),e.droppedSet.add(n)):e.addedSet.has(t.target)&&-1===r||function e(t,n){if(a(t))return!1;var r=n.getId(t);return!n.has(r)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode,n))}(t.target,e.mirror)||(e.movedSet.has(n)&&e.movedMap[G(r,o)]?q(e.movedSet,n):e.removes.push({parentId:o,id:r,isShadow:!!a(t.target)||void 0})),e.mapRemoves.push(n))}))}},this.genAdds=function(t,n){if(!(A(t,e.blockClass)||n&&A(n,e.blockClass))){if(U(t)){if(z(t))return;e.movedSet.add(t);var r=null;n&&U(n)&&(r=n.__sn.id),r&&(e.movedMap[G(t.__sn.id,r)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);t.childNodes.forEach((function(t){return e.genAdds(t)}))}}}return e.prototype.init=function(e,t,n,r,o,a,i,s,u,l,c,d,p,m,f){this.blockClass=t,this.blockSelector=n,this.maskTextClass=r,this.maskTextSelector=o,this.inlineStylesheet=a,this.maskInputOptions=i,this.maskTextFn=s,this.maskInputFn=u,this.recordCanvas=l,this.slimDOMOptions=c,this.emissionCallback=e,this.doc=d,this.mirror=p,this.iframeManager=m,this.shadowDomManager=f},e.prototype.freeze=function(){this.frozen=!0},e.prototype.unfreeze=function(){this.frozen=!1,this.emit()},e.prototype.isFrozen=function(){return this.frozen},e.prototype.lock=function(){this.locked=!0},e.prototype.unlock=function(){this.locked=!1,this.emit()},e}();function q(e,t){e.delete(t),t.childNodes.forEach((function(t){return q(e,t)}))}function Y(e,t,n){var r=t.parentNode;if(!r)return!1;var o=n.getId(r);return!!e.some((function(e){return e.id===o}))||Y(e,r,n)}function K(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||K(e,n))}var $=[],J="undefined"!=typeof CSSGroupingRule;function Z(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(t){return e.target}}function Q(e,t,n,r,o,a,i,s,u,l,c,d,p,m,f,h){var v,y,g,b=new X;$.push(b),b.init(e,n,r,o,a,i,s,u,l,c,d,t,p,m,f);var S=window.MutationObserver||window.__rrMutationObserver,k=null===(g=null===(y=null===(v=window)||void 0===v?void 0:v.Zone)||void 0===y?void 0:y.__symbol__)||void 0===g?void 0:g.call(y,"MutationObserver");k&&window[k]&&(S=window[k]);var C=new S(b.processMutations.bind(b));return C.observe(h,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),C}function ee(e,t,n,r,o){if(!1===o.mouseInteraction)return function(){};var a=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,i=[];return Object.keys(y).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]})).forEach((function(o){var a=o.toLowerCase(),s=function(t){return function(o){var a=Z(o);if(!A(a,r)){var i=V(o)?o.changedTouches[0]:o;if(i){var s=n.getId(a),u=i.clientX,l=i.clientY;e({type:y[t],id:s,x:u,y:l})}}}}(o);i.push(O(a,s,t))})),function(){i.forEach((function(e){return e()}))}}function te(e,t,n,r,o){return O("scroll",_((function(o){var a=Z(o);if(a&&!A(a,r)){var i=n.getId(a);if(a===t){var s=t.scrollingElement||t.documentElement;e({id:i,x:s.scrollLeft,y:s.scrollTop})}else e({id:i,x:a.scrollLeft,y:a.scrollTop})}}),o.scroll||100),t)}function ne(e,n){var r=t({},e);return n||delete r.userTriggered,r}var re=["INPUT","TEXTAREA","SELECT"],oe=new WeakMap;function ae(e){return function(e,t){if(J&&e.parentRule instanceof CSSGroupingRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else{n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function ie(e,r){var a,s;void 0===r&&(r={}),function(e,t){var n=e.mutationCb,r=e.mousemoveCb,a=e.mouseInteractionCb,i=e.scrollCb,s=e.viewportResizeCb,u=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb,d=e.styleDeclarationCb,p=e.canvasMutationCb,m=e.fontCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,o(e)),n.apply(void 0,o(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,o(e)),r.apply(void 0,o(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,o(e)),a.apply(void 0,o(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,o(e)),i.apply(void 0,o(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,o(e)),s.apply(void 0,o(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,o(e)),u.apply(void 0,o(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,o(e)),l.apply(void 0,o(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,o(e)),c.apply(void 0,o(e))},e.styleDeclarationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleDeclaration&&t.styleDeclaration.apply(t,o(e)),d.apply(void 0,o(e))},e.canvasMutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.canvasMutation&&t.canvasMutation.apply(t,o(e)),p.apply(void 0,o(e))},e.fontCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.font&&t.font.apply(t,o(e)),m.apply(void 0,o(e))}}(e,r);var u,l,c,d=Q(e.mutationCb,e.doc,e.blockClass,e.blockSelector,e.maskTextClass,e.maskTextSelector,e.inlineStylesheet,e.maskInputOptions,e.maskTextFn,e.maskInputFn,e.recordCanvas,e.slimDOMOptions,e.mirror,e.iframeManager,e.shadowDomManager,e.doc),p=function(e,t,n,r){if(!1===t.mousemove)return function(){};var o,a="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,s=[],u=_((function(t){var n=Date.now()-o;e(s.map((function(e){return e.timeOffset-=n,e})),t),s=[],o=null}),i),l=_((function(e){var t=Z(e),n=V(e)?e.changedTouches[0]:e,a=n.clientX,i=n.clientY;o||(o=Date.now()),s.push({x:a,y:i,id:r.getId(t),timeOffset:Date.now()-o}),u("undefined"!=typeof DragEvent&&e instanceof DragEvent?v.Drag:e instanceof MouseEvent?v.MouseMove:v.TouchMove)}),a,{trailing:!1}),c=[O("mousemove",l,n),O("touchmove",l,n),O("drag",l,n)];return function(){c.forEach((function(e){return e()}))}}(e.mousemoveCb,e.sampling,e.doc,e.mirror),m=ee(e.mouseInteractionCb,e.doc,e.mirror,e.blockClass,e.sampling),f=te(e.scrollCb,e.doc,e.mirror,e.blockClass,e.sampling),h=(u=e.viewportResizeCb,l=-1,c=-1,O("resize",_((function(){var e=L(),t=P();l===e&&c===t||(u({width:Number(t),height:Number(e)}),l=e,c=t)}),200),window)),y=function(e,n,r,a,s,u,l,c,d){function p(e){var t=Z(e),r=e.isTrusted;if(t&&t.tagName&&!(re.indexOf(t.tagName)<0)&&!A(t,a)){var o=t.type;if(!t.classList.contains(s)){var c=t.value,p=!1;"radio"===o||"checkbox"===o?p=t.checked:(u[t.tagName.toLowerCase()]||u[o])&&(c=i({maskInputOptions:u,tagName:t.tagName,type:o,value:c,maskInputFn:l})),m(t,ne({text:c,isChecked:p,userTriggered:r},d));var f=t.name;"radio"===o&&f&&p&&n.querySelectorAll('input[type="radio"][name="'+f+'"]').forEach((function(e){e!==t&&m(e,ne({text:e.value,isChecked:!p,userTriggered:!1},d))}))}}}function m(n,o){var a=oe.get(n);if(!a||a.text!==o.text||a.isChecked!==o.isChecked){oe.set(n,o);var i=r.getId(n);e(t(t({},o),{id:i}))}}var f=("last"===c.input?["change"]:["input","change"]).map((function(e){return O(e,p,n)})),h=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),v=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"]];return h&&h.set&&f.push.apply(f,o(v.map((function(e){return R(e[0],e[1],{set:function(){p({target:this})}})})))),function(){f.forEach((function(e){return e()}))}}(e.inputCb,e.doc,e.mirror,e.blockClass,e.ignoreClass,e.maskInputOptions,e.maskInputFn,e.sampling,e.userTriggeredOnInput),b=function(e,t,n){var r=function(r){return function(o){var a=Z(o);a&&!A(a,t)&&e({type:r,id:n.getId(a),currentTime:a.currentTime})}},o=[O("play",r(g.Play)),O("pause",r(g.Pause)),O("seeked",r(g.Seeked))];return function(){o.forEach((function(e){return e()}))}}(e.mediaInteractionCb,e.blockClass,e.mirror),S=function(e,t){var n=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(r,o){var a=t.getId(this.ownerNode);return-1!==a&&e({id:a,adds:[{rule:r,index:o}]}),n.apply(this,arguments)};var r=CSSStyleSheet.prototype.deleteRule;if(CSSStyleSheet.prototype.deleteRule=function(n){var o=t.getId(this.ownerNode);return-1!==o&&e({id:o,removes:[{index:n}]}),r.apply(this,arguments)},!J)return function(){CSSStyleSheet.prototype.insertRule=n,CSSStyleSheet.prototype.deleteRule=r};var a=CSSGroupingRule.prototype.insertRule;CSSGroupingRule.prototype.insertRule=function(n,r){var i=t.getId(this.parentStyleSheet.ownerNode);return-1!==i&&e({id:i,adds:[{rule:n,index:o(ae(this),[r||0])}]}),a.apply(this,arguments)};var i=CSSGroupingRule.prototype.deleteRule;return CSSGroupingRule.prototype.deleteRule=function(n){var r=t.getId(this.parentStyleSheet.ownerNode);return-1!==r&&e({id:r,removes:[{index:o(ae(this),[n])}]}),i.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=n,CSSStyleSheet.prototype.deleteRule=r,CSSGroupingRule.prototype.insertRule=a,CSSGroupingRule.prototype.deleteRule=i}}(e.styleSheetRuleCb,e.mirror),k=function(e,t){var n=CSSStyleDeclaration.prototype.setProperty;CSSStyleDeclaration.prototype.setProperty=function(r,o,a){var i,s,u=t.getId(null===(s=null===(i=this.parentRule)||void 0===i?void 0:i.parentStyleSheet)||void 0===s?void 0:s.ownerNode);return-1!==u&&e({id:u,set:{property:r,value:o,priority:a},index:ae(this.parentRule)}),n.apply(this,arguments)};var r=CSSStyleDeclaration.prototype.removeProperty;return CSSStyleDeclaration.prototype.removeProperty=function(n){var o,a,i=t.getId(null===(a=null===(o=this.parentRule)||void 0===o?void 0:o.parentStyleSheet)||void 0===a?void 0:a.ownerNode);return-1!==i&&e({id:i,remove:{property:n},index:ae(this.parentRule)}),r.apply(this,arguments)},function(){CSSStyleDeclaration.prototype.setProperty=n,CSSStyleDeclaration.prototype.removeProperty=r}}(e.styleDeclarationCb,e.mirror),C=e.recordCanvas?function(e,t,r){var a,i,s=Object.getOwnPropertyNames(CanvasRenderingContext2D.prototype),u=[],l=function(n){try{if("function"!=typeof CanvasRenderingContext2D.prototype[n])return"continue";var a=F(CanvasRenderingContext2D.prototype,n,(function(a){return function(){for(var i=this,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];return A(this.canvas,t)||setTimeout((function(){var t=o(s);if("drawImage"===n&&t[0]&&t[0]instanceof HTMLCanvasElement){var a=t[0],u=a.getContext("2d"),l=null==u?void 0:u.getImageData(0,0,a.width,a.height),c=null==l?void 0:l.data;t[0]=JSON.stringify(c)}e({id:r.getId(i.canvas),property:n,args:t})}),0),a.apply(this,s)}}));u.push(a)}catch(t){var i=R(CanvasRenderingContext2D.prototype,n,{set:function(t){e({id:r.getId(this.canvas),property:n,args:[t],setter:!0})}});u.push(i)}};try{for(var c=n(s),d=c.next();!d.done;d=c.next()){l(d.value)}}catch(e){a={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(a)throw a.error}}return function(){u.forEach((function(e){return e()}))}}(e.canvasMutationCb,e.blockClass,e.mirror):function(){},I=e.collectFonts?function(e){var t=[],n=new WeakMap,r=FontFace;window.FontFace=function(e,t,o){var a=new r(e,t,o);return n.set(a,{family:e,buffer:"string"!=typeof t,descriptors:o,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),a};var o=F(document.fonts,"add",(function(t){return function(r){return setTimeout((function(){var t=n.get(r);t&&(e(t),n.delete(r))}),0),t.apply(this,[r])}}));return t.push((function(){window.FonFace=r})),t.push(o),function(){t.forEach((function(e){return e()}))}}(e.fontCb):function(){},w=[];try{for(var T=n(e.plugins),x=T.next();!x.done;x=T.next()){var E=x.value;w.push(E.observer(E.callback,E.options))}}catch(e){a={error:e}}finally{try{x&&!x.done&&(s=T.return)&&s.call(T)}finally{if(a)throw a.error}}return function(){d.disconnect(),p(),m(),f(),h(),y(),b(),S(),k(),C(),I(),w.forEach((function(e){return e()}))}}var se,ue,le=function(){function e(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}return e.prototype.addIframe=function(e){this.iframes.set(e,!0)},e.prototype.addLoadListener=function(e){this.loadListener=e},e.prototype.attachIframe=function(e,t){var n;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e)},e}(),ce=function(){function e(e){this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror}return e.prototype.addShadowRoot=function(e,t){Q(this.mutationCb,t,this.bypassOptions.blockClass,this.bypassOptions.blockSelector,this.bypassOptions.maskTextClass,this.bypassOptions.maskTextSelector,this.bypassOptions.inlineStylesheet,this.bypassOptions.maskInputOptions,this.bypassOptions.maskTextFn,this.bypassOptions.maskInputFn,this.bypassOptions.recordCanvas,this.bypassOptions.slimDOMOptions,this.mirror,this.bypassOptions.iframeManager,this,e),te(this.scrollCb,e,this.mirror,this.bypassOptions.blockClass,this.bypassOptions.sampling)},e}();function de(e){return t(t({},e),{timestamp:Date.now()})}var pe={map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,n=e.__sn&&e.__sn.id;delete this.map[n],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}};function me(e){void 0===e&&(e={});var n=e.emit,o=e.checkoutEveryNms,a=e.checkoutEveryNth,i=e.blockClass,s=void 0===i?"rr-block":i,u=e.blockSelector,l=void 0===u?null:u,c=e.ignoreClass,d=void 0===c?"rr-ignore":c,p=e.maskTextClass,m=void 0===p?"rr-mask":p,f=e.maskTextSelector,y=void 0===f?null:f,g=e.inlineStylesheet,b=void 0===g||g,S=e.maskAllInputs,k=e.maskInputOptions,C=e.slimDOMOptions,I=e.maskInputFn,w=e.maskTextFn,T=e.hooks,x=e.packFn,E=e.sampling,N=void 0===E?{}:E,D=e.mousemoveWait,_=e.recordCanvas,R=void 0!==_&&_,F=e.userTriggeredOnInput,A=void 0!==F&&F,z=e.collectFonts,V=void 0!==z&&z,j=e.plugins,B=e.keepIframeSrcFn,G=void 0===B?function(){return!1}:B;if(!n)throw new Error("emit function is required");void 0!==D&&void 0===N.mousemove&&(N.mousemove=D);var U,X,q=!0===S?{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!==k?k:{password:!0},Y=!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||{};void 0===U&&(U=window),"NodeList"in U&&!U.NodeList.prototype.forEach&&(U.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in U&&!U.DOMTokenList.prototype.forEach&&(U.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1});var K=0;se=function(e,t){var r;if(!(null===(r=$[0])||void 0===r?void 0:r.isFrozen())||e.type===h.FullSnapshot||e.type===h.IncrementalSnapshot&&e.data.source===v.Mutation||$.forEach((function(e){return e.unfreeze()})),n(x?x(e):e,t),e.type===h.FullSnapshot)X=e,K=0;else if(e.type===h.IncrementalSnapshot){if(e.data.source===v.Mutation&&e.data.isAttachIframe)return;K++;var i=a&&K>=a,s=o&&e.timestamp-X.timestamp>o;(i||s)&&ue(!0)}};var J=function(e){se(de({type:h.IncrementalSnapshot,data:t({source:v.Mutation},e)}))},Z=function(e){return se(de({type:h.IncrementalSnapshot,data:t({source:v.Scroll},e)}))},Q=new le({mutationCb:J}),ee=new ce({mutationCb:J,scrollCb:Z,bypassOptions:{blockClass:s,blockSelector:l,maskTextClass:m,maskTextSelector:y,inlineStylesheet:b,maskInputOptions:q,maskTextFn:w,maskInputFn:I,recordCanvas:R,sampling:N,slimDOMOptions:Y,iframeManager:Q},mirror:pe});ue=function(e){var t,n,o,a;void 0===e&&(e=!1),se(de({type:h.Meta,data:{href:window.location.href,width:P(),height:L()}}),e),$.forEach((function(e){return e.lock()}));var i=r(function(e,t){var n=t||{},r=n.blockClass,o=void 0===r?"rr-block":r,a=n.blockSelector,i=void 0===a?null:a,s=n.maskTextClass,u=void 0===s?"rr-mask":s,l=n.maskTextSelector,c=void 0===l?null:l,d=n.inlineStylesheet,p=void 0===d||d,m=n.recordCanvas,f=void 0!==m&&m,h=n.maskAllInputs,v=void 0!==h&&h,y=n.maskTextFn,g=n.maskInputFn,b=n.slimDOM,S=void 0!==b&&b,k=n.preserveWhiteSpace,C=n.onSerialize,I=n.onIframeLoad,w=n.iframeLoadTimeout,T=n.keepIframeSrcFn,x={};return[M(e,{doc:e,map:x,blockClass:o,blockSelector:i,maskTextClass:u,maskTextSelector:c,skipChild:!1,inlineStylesheet:p,maskInputOptions:!0===v?{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===v?{password:!0}:v,maskTextFn:y,maskInputFn:g,slimDOMOptions:!0===S||"all"===S?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===S,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===S?{}:S,recordCanvas:f,preserveWhiteSpace:k,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:w,keepIframeSrcFn:void 0===T?function(){return!1}:T}),x]}(document,{blockClass:s,blockSelector:l,maskTextClass:m,maskTextSelector:y,inlineStylesheet:b,maskAllInputs:q,maskTextFn:w,slimDOM:Y,recordCanvas:R,onSerialize:function(e){W(e)&&Q.addIframe(e),H(e)&&ee.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){Q.attachIframe(e,t)},keepIframeSrcFn:G}),2),u=i[0],c=i[1];if(!u)return console.warn("Failed to snapshot the document");pe.map=c,se(de({type:h.FullSnapshot,data:{node:u,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===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(a=null===(o=null===document||void 0===document?void 0:document.body)||void 0===o?void 0:o.parentElement)||void 0===a?void 0:a.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),$.forEach((function(e){return e.unlock()}))};try{var te=[];te.push(O("DOMContentLoaded",(function(){se(de({type:h.DomContentLoaded,data:{}}))})));var ne=function(e){return ie({mutationCb:J,mousemoveCb:function(e,t){return se(de({type:h.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return se(de({type:h.IncrementalSnapshot,data:t({source:v.MouseInteraction},e)}))},scrollCb:Z,viewportResizeCb:function(e){return se(de({type:h.IncrementalSnapshot,data:t({source:v.ViewportResize},e)}))},inputCb:function(e){return se(de({type:h.IncrementalSnapshot,data:t({source:v.Input},e)}))},mediaInteractionCb:function(e){return se(de({type:h.IncrementalSnapshot,data:t({source:v.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return se(de({type:h.IncrementalSnapshot,data:t({source:v.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return se(de({type:h.IncrementalSnapshot,data:t({source:v.StyleDeclaration},e)}))},canvasMutationCb:function(e){return se(de({type:h.IncrementalSnapshot,data:t({source:v.CanvasMutation},e)}))},fontCb:function(e){return se(de({type:h.IncrementalSnapshot,data:t({source:v.Font},e)}))},blockClass:s,ignoreClass:d,maskTextClass:m,maskTextSelector:y,maskInputOptions:q,inlineStylesheet:b,sampling:N,recordCanvas:R,userTriggeredOnInput:A,collectFonts:V,doc:e,maskInputFn:I,maskTextFn:w,blockSelector:l,slimDOMOptions:Y,mirror:pe,iframeManager:Q,shadowDomManager:ee,plugins:(null==j?void 0:j.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return se(de({type:h.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},T)};Q.addLoadListener((function(e){te.push(ne(e.contentDocument))}));var re=function(){ue(),te.push(ne(document))};return"interactive"===document.readyState||"complete"===document.readyState?re():te.push(O("load",(function(){se(de({type:h.Load,data:{}})),re()}),window)),function(){te.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}return me.addCustomEvent=function(e,t){if(!se)throw new Error("please add custom event after start recording");se(de({type:h.Custom,data:{tag:e,payload:t}}))},me.freezePage=function(){$.forEach((function(e){return e.freeze()}))},me.takeFullSnapshot=function(e){if(!ue)throw new Error("please take full snapshot after start recording");ue(e)},me.mirror=pe,me}();
***************************************************************************** */var e,t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function n(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function o(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e}function a(e){var t,n=null===(t=e)||void 0===t?void 0:t.host;return Boolean(n&&n.shadowRoot&&n.shadowRoot===e)}function i(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,a=e.maskInputFn,i=o||"";return(t[n.toLowerCase()]||t[r])&&(i=a?a(i):"*".repeat(i.length)),i}!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 s=1,u=RegExp("[^a-z0-9-_:]");function l(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(c).join(""):null}catch(e){return null}}function c(e){return function(e){return"styleSheet"in e}(e)?l(e.styleSheet)||"":e.cssText}var d=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,p=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,m=/^(data:)([^,]*),(.*)/i;function f(e,t){return(e||"").replace(d,(function(e,n,r,o,a,i){var s,u=r||a||i,l=n||o||"";if(!u)return e;if(!p.test(u))return"url("+l+u+l+")";if(m.test(u))return"url("+l+u+l+")";if("/"===u[0])return"url("+l+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+u)+l+")";var c=t.split("/"),d=u.split("/");c.pop();for(var f=0,h=d;f<h.length;f++){var v=h[f];"."!==v&&(".."===v?c.pop():c.push(v))}return"url("+l+c.join("/")+l+")"}))}var h,v,y,S,g,b=/^[^ \t\n\r\u000c]+/,k=/^[, \t\n\r\u000c]+/;function C(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function I(){var e=document.createElement("a");return e.href="",e.href}function w(e,t,n,r){return"src"===n||("href"===n||"xlink:href"===n)&&r?C(e,r):"background"!==n||!r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n&&r?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}for(var o=[];r(k),!(n>=t.length);){var a=r(b);if(","===a.slice(-1))a=C(e,a.substring(0,a.length-1)),o.push(a);else{var i="";a=C(e,a);for(var s=!1;;){var u=t.charAt(n);if(""===u){o.push((a+i).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,o.push((a+i).trim());break}"("===u&&(s=!0)}i+=u,n+=1}}}return o.join(", ")}(e,r):"style"===n&&r?f(r,I()):r:C(e,r)}function T(e,t,n){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){if("string"==typeof t){if(e.classList.contains(t))return!0}else e.classList.forEach((function(e){if(t.test(e))return!0}));return!(!n||!e.matches(n))||T(e.parentNode,t,n)}return e.nodeType,e.TEXT_NODE,T(e.parentNode,t,n)}function x(t,n){var r,o,a=n.doc,s=n.blockClass,c=n.blockSelector,d=n.maskTextClass,p=n.maskTextSelector,m=n.inlineStylesheet,h=n.maskInputOptions,v=void 0===h?{}:h,y=n.maskTextFn,S=n.maskInputFn,g=n.recordCanvas,b=n.keepIframeSrcFn;if(a.__sn){var k=a.__sn.id;r=1===k?void 0:k}switch(t.nodeType){case t.DOCUMENT_NODE:return{type:e.Document,childNodes:[],rootId:r};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:r};case t.ELEMENT_NODE:for(var C=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=0;r<e.classList.length;r++){var o=e.classList[r];if(t.test(o))return!0}return!!n&&e.matches(n)}(t,s,c),x=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return u.test(t)?"div":t}(t),M={},E=0,O=Array.from(t.attributes);E<O.length;E++){var N=O[E],D=N.name,R=N.value;M[D]=w(a,x,D,R)}if("link"===x&&m){var _,F=Array.from(a.styleSheets).find((function(e){return e.href===t.href}));(_=l(F))&&(delete M.rel,delete M.href,M._cssText=f(_,F.href))}if("style"===x&&t.sheet&&!(t.innerText||t.textContent||"").trim().length)(_=l(t.sheet))&&(M._cssText=f(_,I()));if("input"===x||"textarea"===x||"select"===x){R=t.value;"radio"!==M.type&&"checkbox"!==M.type&&"submit"!==M.type&&"button"!==M.type&&R?M.value=i({type:M.type,tagName:x,value:R,maskInputOptions:v,maskInputFn:S}):t.checked&&(M.checked=t.checked)}if("option"===x&&(t.selected?M.selected=!0:delete M.selected),"canvas"===x&&g&&(M.rr_dataURL=t.toDataURL()),"audio"!==x&&"video"!==x||(M.rr_mediaState=t.paused?"paused":"played",M.rr_mediaCurrentTime=t.currentTime),t.scrollLeft&&(M.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(M.rr_scrollTop=t.scrollTop),C){var L=t.getBoundingClientRect(),A=L.width,P=L.height;M={class:M.class,rr_width:A+"px",rr_height:P+"px"}}return"iframe"!==x||b(M.src)||delete M.src,{type:e.Element,tagName:x,attributes:M,childNodes:[],isSVG:(o=t,"svg"===o.tagName||o instanceof SVGElement||void 0),needBlock:C,rootId:r};case t.TEXT_NODE:var z=t.parentNode&&t.parentNode.tagName,V=t.textContent,W="STYLE"===z||void 0,j="SCRIPT"===z||void 0;return W&&V&&(V=f(V,I())),j&&(V="SCRIPT_PLACEHOLDER"),!W&&!j&&T(t,d,p)&&V&&(V=y?y(V):V.replace(/[\S]/g,"*")),{type:e.Text,textContent:V||"",isStyle:W,rootId:r};case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:"",rootId:r};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||"",rootId:r};default:return!1}}function M(e){return void 0===e?"":e.toLowerCase()}function E(t,n){var r,o=n.doc,i=n.map,u=n.blockClass,l=n.blockSelector,c=n.maskTextClass,d=n.maskTextSelector,p=n.skipChild,m=void 0!==p&&p,f=n.inlineStylesheet,h=void 0===f||f,v=n.maskInputOptions,y=void 0===v?{}:v,S=n.maskTextFn,g=n.maskInputFn,b=n.slimDOMOptions,k=n.recordCanvas,C=void 0!==k&&k,I=n.onSerialize,w=n.onIframeLoad,T=n.iframeLoadTimeout,O=void 0===T?5e3:T,N=n.keepIframeSrcFn,D=void 0===N?function(){return!1}:N,R=n.preserveWhiteSpace,_=void 0===R||R,F=x(t,{doc:o,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,inlineStylesheet:h,maskInputOptions:y,maskTextFn:S,maskInputFn:g,recordCanvas:C,keepIframeSrcFn:D});if(!F)return console.warn(t,"not serialized"),null;r="__sn"in t?t.__sn.id:!function(t,n){if(n.comment&&t.type===e.Comment)return!0;if(t.type===e.Element){if(n.script&&("script"===t.tagName||"link"===t.tagName&&"preload"===t.attributes.rel&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")))return!0;if(n.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(M(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===M(t.attributes.name)||"icon"===M(t.attributes.rel)||"apple-touch-icon"===M(t.attributes.rel)||"shortcut icon"===M(t.attributes.rel))))return!0;if("meta"===t.tagName){if(n.headMetaDescKeywords&&M(t.attributes.name).match(/^description|keywords$/))return!0;if(n.headMetaSocial&&(M(t.attributes.property).match(/^(og|twitter|fb):/)||M(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===M(t.attributes.name)))return!0;if(n.headMetaRobots&&("robots"===M(t.attributes.name)||"googlebot"===M(t.attributes.name)||"bingbot"===M(t.attributes.name)))return!0;if(n.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(n.headMetaAuthorship&&("author"===M(t.attributes.name)||"generator"===M(t.attributes.name)||"framework"===M(t.attributes.name)||"publisher"===M(t.attributes.name)||"progid"===M(t.attributes.name)||M(t.attributes.property).match(/^article:/)||M(t.attributes.property).match(/^product:/)))return!0;if(n.headMetaVerification&&("google-site-verification"===M(t.attributes.name)||"yandex-verification"===M(t.attributes.name)||"csrf-token"===M(t.attributes.name)||"p:domain_verify"===M(t.attributes.name)||"verify-v1"===M(t.attributes.name)||"verification"===M(t.attributes.name)||"shopify-checkout-api-token"===M(t.attributes.name)))return!0}}return!1}(F,b)&&(_||F.type!==e.Text||F.isStyle||F.textContent.replace(/^\s+|\s+$/gm,"").length)?s++:-2;var L=Object.assign(F,{id:r});if(t.__sn=L,-2===r)return null;i[r]=t,I&&I(t);var A=!m;if(L.type===e.Element&&(A=A&&!L.needBlock,delete L.needBlock),(L.type===e.Document||L.type===e.Element)&&A){b.headWhitespace&&F.type===e.Element&&"head"===F.tagName&&(_=!1);for(var P={doc:o,map:i,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,skipChild:m,inlineStylesheet:h,maskInputOptions:y,maskTextFn:S,maskInputFn:g,slimDOMOptions:b,recordCanvas:C,preserveWhiteSpace:_,onSerialize:I,onIframeLoad:w,iframeLoadTimeout:O,keepIframeSrcFn:D},z=0,V=Array.from(t.childNodes);z<V.length;z++){(H=E(V[z],P))&&L.childNodes.push(H)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(t)&&t.shadowRoot){L.isShadowHost=!0;for(var W=0,j=Array.from(t.shadowRoot.childNodes);W<j.length;W++){var H;(H=E(j[W],P))&&(H.isShadow=!0,L.childNodes.push(H))}}}return t.parentNode&&a(t.parentNode)&&(L.isShadow=!0),L.type===e.Element&&"iframe"===L.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var o,a=!1;try{o=r.document.readyState}catch(e){return}if("complete"===o){var i="about:blank";r.location.href===i&&e.src!==i&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}else{var s=setTimeout((function(){a||(t(),a=!0)}),n);e.addEventListener("load",(function(){clearTimeout(s),a=!0,t()}))}}}(t,(function(){var e=t.contentDocument;if(e&&w){var n=E(e,{doc:e,map:i,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:y,maskTextFn:S,maskInputFn:g,slimDOMOptions:b,recordCanvas:C,preserveWhiteSpace:_,onSerialize:I,onIframeLoad:w,iframeLoadTimeout:O,keepIframeSrcFn:D});n&&w(t,n)}}),O),L}function O(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}!function(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"}(h||(h={})),function(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"}(v||(v={})),function(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"}(y||(y={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked"}(S||(S={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back"}(g||(g={}));var N="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.",D={map:{},getId:function(){return console.error(N),-1},getNode:function(){return console.error(N),null},removeNodeFromMap:function(){console.error(N)},has:function(){return console.error(N),!1},reset:function(){console.error(N)}};function R(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(a){var i=Date.now();o||!1!==n.leading||(o=i);var s=t-(i-o),u=this,l=arguments;s<=0||s>t?(r&&(clearTimeout(r),r=null),o=i,e.apply(u,l)):r||!1===n.trailing||(r=setTimeout((function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(u,l)}),s))}}function _(e,t,n,r,o){void 0===o&&(o=window);var 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 _(e,t,a||{},!0)}}function F(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 L(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function A(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function P(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var n=!1;return"string"==typeof t?n=e.classList.contains(t):e.classList.forEach((function(e){t.test(e)&&(n=!0)})),n||P(e.parentNode,t)}return e.nodeType,e.TEXT_NODE,P(e.parentNode,t)}function z(e){return"__sn"in e&&-2===e.__sn.id}function V(e,t){if(a(e))return!1;var n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||V(e.parentNode,t))}function W(e){return Boolean(e.changedTouches)}function j(t){return"__sn"in t&&(t.__sn.type===e.Element&&"iframe"===t.__sn.tagName)}function H(e){var t;return Boolean(null===(t=e)||void 0===t?void 0:t.shadowRoot)}function B(e){return"__ln"in e}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(D=new Proxy(D,{get:function(e,t,n){return"map"===t&&console.error(N),Reflect.get(e,t,n)}}));var U=function(){function e(){this.length=0,this.head=null}return e.prototype.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t},e.prototype.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&B(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&B(e.nextSibling)&&e.nextSibling.__ln.previous){n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++},e.prototype.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)},e}(),X=function(e,t){return e+"@"+t};function q(e){return"__sn"in e}var G=function(){function e(){var e=this;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=function(t){t.forEach(e.processMutation),e.emit()},this.emit=function(){var t,r,o,i;if(!e.frozen&&!e.locked){for(var s=[],u=new U,l=function(t){for(var n=t,r=-2;-2===r;)r=(n=n&&n.nextSibling)&&e.mirror.getId(n);return r},c=function(t){var n,r=t.getRootNode?null===(n=t.getRootNode())||void 0===n?void 0:n.host:null,o=!(e.doc.contains(t)||r instanceof Node&&e.doc.contains(r));if(t.parentNode&&!o){var i=a(t.parentNode)?e.mirror.getId(r):e.mirror.getId(t.parentNode),c=l(t);if(-1===i||-1===c)return u.addNode(t);var d=E(t,{doc:e.doc,map:e.mirror.map,blockClass:e.blockClass,blockSelector:e.blockSelector,maskTextClass:e.maskTextClass,maskTextSelector:e.maskTextSelector,skipChild:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:e.slimDOMOptions,recordCanvas:e.recordCanvas,onSerialize:function(n){j(n)&&e.iframeManager.addIframe(n),H(t)&&e.shadowDomManager.addShadowRoot(t.shadowRoot,document)},onIframeLoad:function(t,n){e.iframeManager.attachIframe(t,n)}});d&&s.push({parentId:i,nextId:c,node:d})}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());try{for(var d=n(e.movedSet),p=d.next();!p.done;p=d.next()){var m=p.value;K(e.removes,m,e.mirror)&&!e.movedSet.has(m.parentNode)||c(m)}}catch(e){t={error:e}}finally{try{p&&!p.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}try{for(var f=n(e.addedSet),h=f.next();!h.done;h=f.next()){m=h.value;$(e.droppedSet,m)||K(e.removes,m,e.mirror)?$(e.movedSet,m)?c(m):e.droppedSet.add(m):c(m)}}catch(e){o={error:e}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}for(var v=null;u.length;){var y=null;if(v){var S=e.mirror.getId(v.value.parentNode),g=l(v.value);-1!==S&&-1!==g&&(y=v)}if(!y)for(var b=u.length-1;b>=0;b--){var k=u.get(b);if(k){S=e.mirror.getId(k.value.parentNode),g=l(k.value);if(-1!==S&&-1!==g){y=k;break}}}if(!y){for(;u.head;)u.removeNode(u.head.value);break}v=y.previous,u.removeNode(y.value),c(y.value)}var C={texts:e.texts.map((function(t){return{id:e.mirror.getId(t.node),value:t.value}})).filter((function(t){return e.mirror.has(t.id)})),attributes:e.attributes.map((function(t){return{id:e.mirror.getId(t.node),attributes:t.attributes}})).filter((function(t){return e.mirror.has(t.id)})),removes:e.removes,adds:s};(C.texts.length||C.attributes.length||C.removes.length||C.adds.length)&&(e.texts=[],e.attributes=[],e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.movedMap={},e.emissionCallback(C))}},this.processMutation=function(t){var r,o,s,u;if(!z(t.target))switch(t.type){case"characterData":var l=t.target.textContent;P(t.target,e.blockClass)||l===t.oldValue||e.texts.push({value:T(t.target,e.maskTextClass,e.maskTextSelector)&&l?e.maskTextFn?e.maskTextFn(l):l.replace(/[\S]/g,"*"):l,node:t.target});break;case"attributes":var c=t.target;l=t.target.getAttribute(t.attributeName);if("value"===t.attributeName&&(l=i({maskInputOptions:e.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:l,maskInputFn:e.maskInputFn})),P(t.target,e.blockClass)||l===t.oldValue)return;var d=e.attributes.find((function(e){return e.node===t.target}));if(d||(d={node:t.target,attributes:{}},e.attributes.push(d)),"style"===t.attributeName){var p=e.doc.createElement("span");t.oldValue&&p.setAttribute("style",t.oldValue),void 0!==d.attributes.style&&null!==d.attributes.style||(d.attributes.style={});var m=d.attributes.style;try{for(var f=n(Array.from(c.style)),h=f.next();!h.done;h=f.next()){var v=h.value,y=c.style.getPropertyValue(v),S=c.style.getPropertyPriority(v);y===p.style.getPropertyValue(v)&&S===p.style.getPropertyPriority(v)||(m[v]=""===S?y:[y,S])}}catch(e){r={error:e}}finally{try{h&&!h.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}try{for(var g=n(Array.from(p.style)),b=g.next();!b.done;b=g.next()){v=b.value;""!==c.style.getPropertyValue(v)&&c.style.getPropertyValue(v)||(m[v]=!1)}}catch(e){s={error:e}}finally{try{b&&!b.done&&(u=g.return)&&u.call(g)}finally{if(s)throw s.error}}}else d.attributes[t.attributeName]=w(e.doc,t.target.tagName,t.attributeName,l);break;case"childList":t.addedNodes.forEach((function(n){return e.genAdds(n,t.target)})),t.removedNodes.forEach((function(n){var r=e.mirror.getId(n),o=a(t.target)?e.mirror.getId(t.target.host):e.mirror.getId(t.target);P(t.target,e.blockClass)||z(n)||(e.addedSet.has(n)?(Y(e.addedSet,n),e.droppedSet.add(n)):e.addedSet.has(t.target)&&-1===r||V(t.target,e.mirror)||(e.movedSet.has(n)&&e.movedMap[X(r,o)]?Y(e.movedSet,n):e.removes.push({parentId:o,id:r,isShadow:!!a(t.target)||void 0})),e.mapRemoves.push(n))}))}},this.genAdds=function(t,n){if(!n||!P(n,e.blockClass)){if(q(t)){if(z(t))return;e.movedSet.add(t);var r=null;n&&q(n)&&(r=n.__sn.id),r&&(e.movedMap[X(t.__sn.id,r)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);P(t,e.blockClass)||t.childNodes.forEach((function(t){return e.genAdds(t)}))}}}return e.prototype.init=function(e,t,n,r,o,a,i,s,u,l,c,d,p,m,f){this.blockClass=t,this.blockSelector=n,this.maskTextClass=r,this.maskTextSelector=o,this.inlineStylesheet=a,this.maskInputOptions=i,this.maskTextFn=s,this.maskInputFn=u,this.recordCanvas=l,this.slimDOMOptions=c,this.emissionCallback=e,this.doc=d,this.mirror=p,this.iframeManager=m,this.shadowDomManager=f},e.prototype.freeze=function(){this.frozen=!0},e.prototype.unfreeze=function(){this.frozen=!1,this.emit()},e.prototype.isFrozen=function(){return this.frozen},e.prototype.lock=function(){this.locked=!0},e.prototype.unlock=function(){this.locked=!1,this.emit()},e}();function Y(e,t){e.delete(t),t.childNodes.forEach((function(t){return Y(e,t)}))}function K(e,t,n){var r=t.parentNode;if(!r)return!1;var o=n.getId(r);return!!e.some((function(e){return e.id===o}))||K(e,r,n)}function $(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||$(e,n))}var J=[],Z="undefined"!=typeof CSSGroupingRule,Q="undefined"!=typeof CSSMediaRule,ee="undefined"!=typeof CSSSupportsRule,te="undefined"!=typeof CSSConditionRule;function ne(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(t){return e.target}}function re(e,t,n,r,o,a,i,s,u,l,c,d,p,m,f,h){var v,y,S,g=new G;J.push(g),g.init(e,n,r,o,a,i,s,u,l,c,d,t,p,m,f);var b=window.MutationObserver||window.__rrMutationObserver,k=null===(S=null===(y=null===(v=window)||void 0===v?void 0:v.Zone)||void 0===y?void 0:y.__symbol__)||void 0===S?void 0:S.call(y,"MutationObserver");k&&window[k]&&(b=window[k]);var C=new b(g.processMutations.bind(g));return C.observe(h,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),C}function oe(e,t,n,r,o){if(!1===o.mouseInteraction)return function(){};var a=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,i=[];return Object.keys(y).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]})).forEach((function(o){var a=o.toLowerCase(),s=function(t){return function(o){var a=ne(o);if(!P(a,r)){var i=W(o)?o.changedTouches[0]:o;if(i){var s=n.getId(a),u=i.clientX,l=i.clientY;e({type:y[t],id:s,x:u,y:l})}}}}(o);i.push(O(a,s,t))})),function(){i.forEach((function(e){return e()}))}}function ae(e,t,n,r,o){return O("scroll",R((function(o){var a=ne(o);if(a&&!P(a,r)){var i=n.getId(a);if(a===t){var s=t.scrollingElement||t.documentElement;e({id:i,x:s.scrollLeft,y:s.scrollTop})}else e({id:i,x:a.scrollLeft,y:a.scrollTop})}}),o.scroll||100),t)}function ie(e,n){var r=t({},e);return n||delete r.userTriggered,r}var se=["INPUT","TEXTAREA","SELECT"],ue=new WeakMap;function le(e){return function(e,t){if(Z&&e.parentRule instanceof CSSGroupingRule||Q&&e.parentRule instanceof CSSMediaRule||ee&&e.parentRule instanceof CSSSupportsRule||te&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else{n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function ce(e,a){var s,u;void 0===a&&(a={});var l=e.doc.defaultView;if(!l)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,a=e.mouseInteractionCb,i=e.scrollCb,s=e.viewportResizeCb,u=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb,d=e.styleDeclarationCb,p=e.canvasMutationCb,m=e.fontCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,o(e)),n.apply(void 0,o(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,o(e)),r.apply(void 0,o(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,o(e)),a.apply(void 0,o(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,o(e)),i.apply(void 0,o(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,o(e)),s.apply(void 0,o(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,o(e)),u.apply(void 0,o(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,o(e)),l.apply(void 0,o(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,o(e)),c.apply(void 0,o(e))},e.styleDeclarationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleDeclaration&&t.styleDeclaration.apply(t,o(e)),d.apply(void 0,o(e))},e.canvasMutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.canvasMutation&&t.canvasMutation.apply(t,o(e)),p.apply(void 0,o(e))},e.fontCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.font&&t.font.apply(t,o(e)),m.apply(void 0,o(e))}}(e,a);var c,d,p,m=re(e.mutationCb,e.doc,e.blockClass,e.blockSelector,e.maskTextClass,e.maskTextSelector,e.inlineStylesheet,e.maskInputOptions,e.maskTextFn,e.maskInputFn,e.recordCanvas,e.slimDOMOptions,e.mirror,e.iframeManager,e.shadowDomManager,e.doc),f=function(e,t,n,r){if(!1===t.mousemove)return function(){};var o,a="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,s=[],u=R((function(t){var n=Date.now()-o;e(s.map((function(e){return e.timeOffset-=n,e})),t),s=[],o=null}),i),l=R((function(e){var t=ne(e),n=W(e)?e.changedTouches[0]:e,a=n.clientX,i=n.clientY;o||(o=Date.now()),s.push({x:a,y:i,id:r.getId(t),timeOffset:Date.now()-o}),u("undefined"!=typeof DragEvent&&e instanceof DragEvent?v.Drag:e instanceof MouseEvent?v.MouseMove:v.TouchMove)}),a,{trailing:!1}),c=[O("mousemove",l,n),O("touchmove",l,n),O("drag",l,n)];return function(){c.forEach((function(e){return e()}))}}(e.mousemoveCb,e.sampling,e.doc,e.mirror),h=oe(e.mouseInteractionCb,e.doc,e.mirror,e.blockClass,e.sampling),y=ae(e.scrollCb,e.doc,e.mirror,e.blockClass,e.sampling),S=(c=e.viewportResizeCb,d=-1,p=-1,O("resize",R((function(){var e=L(),t=A();d===e&&p===t||(c({width:Number(t),height:Number(e)}),d=e,p=t)}),200),window)),g=function(e,n,r,a,s,u,l,c,d){function p(e){var t=ne(e),r=e.isTrusted;if(t&&t.tagName&&!(se.indexOf(t.tagName)<0)&&!P(t,a)){var o=t.type;if(!t.classList.contains(s)){var c=t.value,p=!1;"radio"===o||"checkbox"===o?p=t.checked:(u[t.tagName.toLowerCase()]||u[o])&&(c=i({maskInputOptions:u,tagName:t.tagName,type:o,value:c,maskInputFn:l})),m(t,ie({text:c,isChecked:p,userTriggered:r},d));var f=t.name;"radio"===o&&f&&p&&n.querySelectorAll('input[type="radio"][name="'+f+'"]').forEach((function(e){e!==t&&m(e,ie({text:e.value,isChecked:!p,userTriggered:!1},d))}))}}}function m(n,o){var a=ue.get(n);if(!a||a.text!==o.text||a.isChecked!==o.isChecked){ue.set(n,o);var i=r.getId(n);e(t(t({},o),{id:i}))}}var f=("last"===c.input?["change"]:["input","change"]).map((function(e){return O(e,p,n)})),h=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),v=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"]];return h&&h.set&&f.push.apply(f,o(v.map((function(e){return _(e[0],e[1],{set:function(){p({target:this})}})})))),function(){f.forEach((function(e){return e()}))}}(e.inputCb,e.doc,e.mirror,e.blockClass,e.ignoreClass,e.maskInputOptions,e.maskInputFn,e.sampling,e.userTriggeredOnInput),b=function(e,t,n){var r=function(r){return function(o){var a=ne(o);a&&!P(a,t)&&e({type:r,id:n.getId(a),currentTime:a.currentTime})}},o=[O("play",r(0)),O("pause",r(1)),O("seeked",r(2))];return function(){o.forEach((function(e){return e()}))}}(e.mediaInteractionCb,e.blockClass,e.mirror),k=function(e,t,n){var a=t.CSSStyleSheet.prototype.insertRule;t.CSSStyleSheet.prototype.insertRule=function(t,r){var o=n.getId(this.ownerNode);return-1!==o&&e({id:o,adds:[{rule:t,index:r}]}),a.apply(this,arguments)};var i=t.CSSStyleSheet.prototype.deleteRule;t.CSSStyleSheet.prototype.deleteRule=function(t){var r=n.getId(this.ownerNode);return-1!==r&&e({id:r,removes:[{index:t}]}),i.apply(this,arguments)};var s={};Z?s.CSSGroupingRule=t.CSSGroupingRule:(Q&&(s.CSSMediaRule=t.CSSMediaRule),te&&(s.CSSConditionRule=t.CSSConditionRule),ee&&(s.CSSSupportsRule=t.CSSSupportsRule));var u={};return Object.entries(s).forEach((function(t){var a=r(t,2),i=a[0],s=a[1];u[i]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=function(t,r){var a=n.getId(this.parentStyleSheet.ownerNode);return-1!==a&&e({id:a,adds:[{rule:t,index:o(le(this),[r||0])}]}),u[i].insertRule.apply(this,arguments)},s.prototype.deleteRule=function(t){var r=n.getId(this.parentStyleSheet.ownerNode);return-1!==r&&e({id:r,removes:[{index:o(le(this),[t])}]}),u[i].deleteRule.apply(this,arguments)}})),function(){t.CSSStyleSheet.prototype.insertRule=a,t.CSSStyleSheet.prototype.deleteRule=i,Object.entries(s).forEach((function(e){var t=r(e,2),n=t[0],o=t[1];o.prototype.insertRule=u[n].insertRule,o.prototype.deleteRule=u[n].deleteRule}))}}(e.styleSheetRuleCb,l,e.mirror),C=function(e,t,n){var r=t.CSSStyleDeclaration.prototype.setProperty;t.CSSStyleDeclaration.prototype.setProperty=function(t,o,a){var i,s,u=n.getId(null===(s=null===(i=this.parentRule)||void 0===i?void 0:i.parentStyleSheet)||void 0===s?void 0:s.ownerNode);return-1!==u&&e({id:u,set:{property:t,value:o,priority:a},index:le(this.parentRule)}),r.apply(this,arguments)};var o=t.CSSStyleDeclaration.prototype.removeProperty;return t.CSSStyleDeclaration.prototype.removeProperty=function(t){var r,a,i=n.getId(null===(a=null===(r=this.parentRule)||void 0===r?void 0:r.parentStyleSheet)||void 0===a?void 0:a.ownerNode);return-1!==i&&e({id:i,remove:{property:t},index:le(this.parentRule)}),o.apply(this,arguments)},function(){t.CSSStyleDeclaration.prototype.setProperty=r,t.CSSStyleDeclaration.prototype.removeProperty=o}}(e.styleDeclarationCb,l,e.mirror),I=e.recordCanvas?function(e,t,r,a){var i,s,u=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),l=[],c=function(n){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[n])return"continue";var i=F(t.CanvasRenderingContext2D.prototype,n,(function(t){return function(){for(var i=this,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];return P(this.canvas,r)||setTimeout((function(){var t=o(s);if("drawImage"===n&&t[0]&&t[0]instanceof HTMLCanvasElement){var r=t[0],u=r.getContext("2d"),l=null==u?void 0:u.getImageData(0,0,r.width,r.height),c=null==l?void 0:l.data;t[0]=JSON.stringify(c)}e({id:a.getId(i.canvas),property:n,args:t})}),0),t.apply(this,s)}}));l.push(i)}catch(r){var s=_(t.CanvasRenderingContext2D.prototype,n,{set:function(t){e({id:a.getId(this.canvas),property:n,args:[t],setter:!0})}});l.push(s)}};try{for(var d=n(u),p=d.next();!p.done;p=d.next())c(p.value)}catch(e){i={error:e}}finally{try{p&&!p.done&&(s=d.return)&&s.call(d)}finally{if(i)throw i.error}}return function(){l.forEach((function(e){return e()}))}}(e.canvasMutationCb,l,e.blockClass,e.mirror):function(){},w=e.collectFonts?function(e,t){var n=t.defaultView;if(!n)return function(){};var r=[],o=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,n){var r=new a(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var i=F(t.fonts,"add",(function(t){return function(n){return setTimeout((function(){var t=o.get(n);t&&(e(t),o.delete(n))}),0),t.apply(this,[n])}}));return r.push((function(){n.FontFace=a})),r.push(i),function(){r.forEach((function(e){return e()}))}}(e.fontCb,e.doc):function(){},T=[];try{for(var x=n(e.plugins),M=x.next();!M.done;M=x.next()){var E=M.value;T.push(E.observer(E.callback,l,E.options))}}catch(e){s={error:e}}finally{try{M&&!M.done&&(u=x.return)&&u.call(x)}finally{if(s)throw s.error}}return function(){m.disconnect(),f(),h(),y(),S(),g(),b(),k(),C(),I(),w(),T.forEach((function(e){return e()}))}}var de,pe,me=function(){function e(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}return e.prototype.addIframe=function(e){this.iframes.set(e,!0)},e.prototype.addLoadListener=function(e){this.loadListener=e},e.prototype.attachIframe=function(e,t){var n;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e)},e}(),fe=function(){function e(e){this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror}return e.prototype.addShadowRoot=function(e,t){re(this.mutationCb,t,this.bypassOptions.blockClass,this.bypassOptions.blockSelector,this.bypassOptions.maskTextClass,this.bypassOptions.maskTextSelector,this.bypassOptions.inlineStylesheet,this.bypassOptions.maskInputOptions,this.bypassOptions.maskTextFn,this.bypassOptions.maskInputFn,this.bypassOptions.recordCanvas,this.bypassOptions.slimDOMOptions,this.mirror,this.bypassOptions.iframeManager,this,e),ae(this.scrollCb,e,this.mirror,this.bypassOptions.blockClass,this.bypassOptions.sampling)},e}();function he(e){return t(t({},e),{timestamp:Date.now()})}var ve={map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,n=e.__sn&&e.__sn.id;delete this.map[n],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}};function ye(e){void 0===e&&(e={});var n=e.emit,o=e.checkoutEveryNms,a=e.checkoutEveryNth,i=e.blockClass,s=void 0===i?"rr-block":i,u=e.blockSelector,l=void 0===u?null:u,c=e.ignoreClass,d=void 0===c?"rr-ignore":c,p=e.maskTextClass,m=void 0===p?"rr-mask":p,f=e.maskTextSelector,y=void 0===f?null:f,S=e.inlineStylesheet,g=void 0===S||S,b=e.maskAllInputs,k=e.maskInputOptions,C=e.slimDOMOptions,I=e.maskInputFn,w=e.maskTextFn,T=e.hooks,x=e.packFn,M=e.sampling,N=void 0===M?{}:M,D=e.mousemoveWait,R=e.recordCanvas,_=void 0!==R&&R,F=e.userTriggeredOnInput,P=void 0!==F&&F,z=e.collectFonts,V=void 0!==z&&z,W=e.plugins,B=e.keepIframeSrcFn,U=void 0===B?function(){return!1}:B;if(!n)throw new Error("emit function is required");void 0!==D&&void 0===N.mousemove&&(N.mousemove=D);var X,q,G=!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}:void 0!==k?k:{password:!0},Y=!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||{};void 0===X&&(X=window),"NodeList"in X&&!X.NodeList.prototype.forEach&&(X.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in X&&!X.DOMTokenList.prototype.forEach&&(X.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1});var K=0;de=function(e,t){var r;if(!(null===(r=J[0])||void 0===r?void 0:r.isFrozen())||e.type===h.FullSnapshot||e.type===h.IncrementalSnapshot&&e.data.source===v.Mutation||J.forEach((function(e){return e.unfreeze()})),n(x?x(e):e,t),e.type===h.FullSnapshot)q=e,K=0;else if(e.type===h.IncrementalSnapshot){if(e.data.source===v.Mutation&&e.data.isAttachIframe)return;K++;var i=a&&K>=a,s=o&&e.timestamp-q.timestamp>o;(i||s)&&pe(!0)}};var $=function(e){de(he({type:h.IncrementalSnapshot,data:t({source:v.Mutation},e)}))},Z=function(e){return de(he({type:h.IncrementalSnapshot,data:t({source:v.Scroll},e)}))},Q=new me({mutationCb:$}),ee=new fe({mutationCb:$,scrollCb:Z,bypassOptions:{blockClass:s,blockSelector:l,maskTextClass:m,maskTextSelector:y,inlineStylesheet:g,maskInputOptions:G,maskTextFn:w,maskInputFn:I,recordCanvas:_,sampling:N,slimDOMOptions:Y,iframeManager:Q},mirror:ve});pe=function(e){var t,n,o,a;void 0===e&&(e=!1),de(he({type:h.Meta,data:{href:window.location.href,width:A(),height:L()}}),e),J.forEach((function(e){return e.lock()}));var i=r(function(e,t){var n=t||{},r=n.blockClass,o=void 0===r?"rr-block":r,a=n.blockSelector,i=void 0===a?null:a,s=n.maskTextClass,u=void 0===s?"rr-mask":s,l=n.maskTextSelector,c=void 0===l?null:l,d=n.inlineStylesheet,p=void 0===d||d,m=n.recordCanvas,f=void 0!==m&&m,h=n.maskAllInputs,v=void 0!==h&&h,y=n.maskTextFn,S=n.maskInputFn,g=n.slimDOM,b=void 0!==g&&g,k=n.preserveWhiteSpace,C=n.onSerialize,I=n.onIframeLoad,w=n.iframeLoadTimeout,T=n.keepIframeSrcFn,x={};return[E(e,{doc:e,map:x,blockClass:o,blockSelector:i,maskTextClass:u,maskTextSelector:c,skipChild:!1,inlineStylesheet:p,maskInputOptions:!0===v?{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===v?{password:!0}:v,maskTextFn:y,maskInputFn:S,slimDOMOptions:!0===b||"all"===b?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===b,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===b?{}:b,recordCanvas:f,preserveWhiteSpace:k,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:w,keepIframeSrcFn:void 0===T?function(){return!1}:T}),x]}(document,{blockClass:s,blockSelector:l,maskTextClass:m,maskTextSelector:y,inlineStylesheet:g,maskAllInputs:G,maskTextFn:w,slimDOM:Y,recordCanvas:_,onSerialize:function(e){j(e)&&Q.addIframe(e),H(e)&&ee.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){Q.attachIframe(e,t)},keepIframeSrcFn:U}),2),u=i[0],c=i[1];if(!u)return console.warn("Failed to snapshot the document");ve.map=c,de(he({type:h.FullSnapshot,data:{node:u,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===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(a=null===(o=null===document||void 0===document?void 0:document.body)||void 0===o?void 0:o.parentElement)||void 0===a?void 0:a.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),J.forEach((function(e){return e.unlock()}))};try{var te=[];te.push(O("DOMContentLoaded",(function(){de(he({type:h.DomContentLoaded,data:{}}))})));var ne=function(e){return ce({mutationCb:$,mousemoveCb:function(e,t){return de(he({type:h.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return de(he({type:h.IncrementalSnapshot,data:t({source:v.MouseInteraction},e)}))},scrollCb:Z,viewportResizeCb:function(e){return de(he({type:h.IncrementalSnapshot,data:t({source:v.ViewportResize},e)}))},inputCb:function(e){return de(he({type:h.IncrementalSnapshot,data:t({source:v.Input},e)}))},mediaInteractionCb:function(e){return de(he({type:h.IncrementalSnapshot,data:t({source:v.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return de(he({type:h.IncrementalSnapshot,data:t({source:v.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return de(he({type:h.IncrementalSnapshot,data:t({source:v.StyleDeclaration},e)}))},canvasMutationCb:function(e){return de(he({type:h.IncrementalSnapshot,data:t({source:v.CanvasMutation},e)}))},fontCb:function(e){return de(he({type:h.IncrementalSnapshot,data:t({source:v.Font},e)}))},blockClass:s,ignoreClass:d,maskTextClass:m,maskTextSelector:y,maskInputOptions:G,inlineStylesheet:g,sampling:N,recordCanvas:_,userTriggeredOnInput:P,collectFonts:V,doc:e,maskInputFn:I,maskTextFn:w,blockSelector:l,slimDOMOptions:Y,mirror:ve,iframeManager:Q,shadowDomManager:ee,plugins:(null==W?void 0:W.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return de(he({type:h.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},T)};Q.addLoadListener((function(e){te.push(ne(e.contentDocument))}));var re=function(){pe(),te.push(ne(document))};return"interactive"===document.readyState||"complete"===document.readyState?re():te.push(O("load",(function(){de(he({type:h.Load,data:{}})),re()}),window)),function(){te.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}return ye.addCustomEvent=function(e,t){if(!de)throw new Error("please add custom event after start recording");de(he({type:h.Custom,data:{tag:e,payload:t}}))},ye.freezePage=function(){J.forEach((function(e){return e.freeze()}))},ye.takeFullSnapshot=function(e){if(!pe)throw new Error("please take full snapshot after start recording");pe(e)},ye.mirror=ve,ye}();
//# sourceMappingURL=rrweb-record.min.js.map

@@ -15,3 +15,3 @@ var rrwebReplay=function(e){"use strict";

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var t,r=function(){return(r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function n(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function i(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function o(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}function a(e){return e.nodeType===e.ELEMENT_NODE}!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"}(t||(t={}));var s=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function l(e,t){void 0===t&&(t={});var r=1,n=1;function i(e){var t=e.match(/\n/g);t&&(r+=t.length);var i=e.lastIndexOf("\n");n=-1===i?n+e.length:e.length-i}function o(){var e={line:r,column:n};return function(t){return t.position=new a(e),m(),t}}var a=function(e){this.start=e,this.end={line:r,column:n},this.source=t.source};a.prototype.content=e;var l=[];function u(i){var o=new Error(t.source+":"+r+":"+n+": "+i);if(o.reason=i,o.filename=t.source,o.line=r,o.column=n,o.source=e,!t.silent)throw o;l.push(o)}function d(){return p(/^{\s*/)}function f(){return p(/^}/)}function h(){var t,r=[];for(m(),v(r);e.length&&"}"!==e.charAt(0)&&(t=I()||C());)!1!==t&&(r.push(t),v(r));return r}function p(t){var r=t.exec(e);if(r){var n=r[0];return i(n),e=e.slice(n.length),r}}function m(){p(/^\s*/)}function v(e){var t;for(void 0===e&&(e=[]);t=y();)!1!==t&&e.push(t),t=y();return e}function y(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var r=2;""!==e.charAt(r)&&("*"!==e.charAt(r)||"/"!==e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return u("End of comment missing");var a=e.slice(2,r-2);return n+=2,i(a),e=e.slice(r),n+=2,t({type:"comment",comment:a})}}function g(){var e=p(/^([^{]+)/);if(e)return c(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function S(){var e=o(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=c(t[0]);if(!p(/^:\s*/))return u("property missing ':'");var n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:r.replace(s,""),value:n?c(n[0]).replace(s,""):""});return p(/^[;\s]*/),i}}function b(){var e,t=[];if(!d())return u("missing '{'");for(v(t);e=S();)!1!==e&&(t.push(e),v(t)),e=S();return f()?t:u("missing '}'")}function x(){for(var e,t=[],r=o();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:b()})}var w,T=N("import"),E=N("charset"),M=N("namespace");function N(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=o(),n=p(t);if(n){var i={type:e};return i[e]=n[1].trim(),r(i)}}}function I(){if("@"===e[0])return function(){var e=o(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=p(/^([-\w]+)\s*/)))return u("@keyframes missing name");var n,i=t[1];if(!d())return u("@keyframes missing '{'");for(var a=v();n=x();)a.push(n),a=a.concat(v());return f()?e({type:"keyframes",name:i,vendor:r,keyframes:a}):u("@keyframes missing '}'")}}()||function(){var e=o(),t=p(/^@media *([^{]+)/);if(t){var r=c(t[1]);if(!d())return u("@media missing '{'");var n=v().concat(h());return f()?e({type:"media",media:r,rules:n}):u("@media missing '}'")}}()||function(){var e=o(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:c(t[1]),media:c(t[2])})}()||function(){var e=o(),t=p(/^@supports *([^{]+)/);if(t){var r=c(t[1]);if(!d())return u("@supports missing '{'");var n=v().concat(h());return f()?e({type:"supports",supports:r,rules:n}):u("@supports missing '}'")}}()||T()||E()||M()||function(){var e=o(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var r=c(t[1]),n=c(t[2]);if(!d())return u("@document missing '{'");var i=v().concat(h());return f()?e({type:"document",document:n,vendor:r,rules:i}):u("@document missing '}'")}}()||function(){var e=o();if(p(/^@page */)){var t=g()||[];if(!d())return u("@page missing '{'");for(var r,n=v();r=S();)n.push(r),n=n.concat(v());return f()?e({type:"page",selectors:t,declarations:n}):u("@page missing '}'")}}()||function(){var e=o();if(p(/^@host\s*/)){if(!d())return u("@host missing '{'");var t=v().concat(h());return f()?e({type:"host",rules:t}):u("@host missing '}'")}}()||function(){var e=o();if(p(/^@font-face\s*/)){if(!d())return u("@font-face missing '{'");for(var t,r=v();t=S();)r.push(t),r=r.concat(v());return f()?e({type:"font-face",declarations:r}):u("@font-face missing '}'")}}()}function C(){var e=o(),t=g();return t?(v(),e({type:"rule",selectors:t,declarations:b()})):u("selector missing")}return function e(t,r){for(var n=t&&"string"==typeof t.type,i=n?t:r,o=0,a=Object.keys(t);o<a.length;o++){var s=a[o],l=t[s];Array.isArray(l)?l.forEach((function(t){e(t,i)})):l&&"object"==typeof l&&e(l,i)}n&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:r||null});return t}((w=h(),{type:"stylesheet",stylesheet:{source:t.source,rules:w,parsingErrors:l}}))}function c(e){return e?e.replace(/^\s+|\s+$/g,""):""}var u={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var d=/([^\\]):hover/,f=new RegExp(d,"g");function h(e,t){var r=null==t?void 0:t.stylesWithHoverClass.get(e);if(r)return r;var n=l(e,{silent:!0});if(!n.stylesheet)return e;var i=[];if(n.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){d.test(e)&&i.push(e)}))})),0===i.length)return e;var o=new RegExp(i.filter((function(e,t){return i.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),a=e.replace(o,(function(e){var t=e.replace(f,"$1.\\:hover");return e+", "+t}));return null==t||t.stylesWithHoverClass.set(e,a),a}function p(){return{stylesWithHoverClass:new Map}}function m(e,r){var n=r.doc,i=r.hackCss,o=r.cache;switch(e.type){case t.Document:return n.implementation.createDocument(null,"",null);case t.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case t.Element:var a,s=function(e){var t=u[e.tagName]?u[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);a=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",s):n.createElement(s);var l=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var r=e.attributes[t];if("option"===s&&"selected"===t&&!1===r)return"continue";if(r="boolean"==typeof r||"number"==typeof r?"":r,t.startsWith("rr_")){if("canvas"===s&&"rr_dataURL"===t){var l=document.createElement("img");l.src=r,l.onload=function(){var e=a.getContext("2d");e&&e.drawImage(l,0,0,l.width,l.height)}}if("rr_width"===t&&(a.style.width=r),"rr_height"===t&&(a.style.height=r),"rr_mediaCurrentTime"===t&&(a.currentTime=e.attributes.rr_mediaCurrentTime),"rr_mediaState"===t)switch(r){case"played":a.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":a.pause()}}else{var c="textarea"===s&&"value"===t,u="style"===s&&"_cssText"===t;if(u&&i&&(r=h(r,o)),c||u){for(var d=n.createTextNode(r),f=0,p=Array.from(a.childNodes);f<p.length;f++){var m=p[f];m.nodeType===a.TEXT_NODE&&a.removeChild(m)}return a.appendChild(d),"continue"}try{if(e.isSVG&&"xlink:href"===t)a.setAttributeNS("http://www.w3.org/1999/xlink",t,r);else if("onload"===t||"onclick"===t||"onmouse"===t.substring(0,7))a.setAttribute("_"+t,r);else{if("meta"===s&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===t)return a.setAttribute("csp-content",r),"continue";"link"===s&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===s&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")||a.setAttribute(t,r)}}catch(e){}}};for(var c in e.attributes)l(c);if(e.isShadowHost)if(a.shadowRoot)for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);else a.attachShadow({mode:"open"});return a;case t.Text:return n.createTextNode(e.isStyle&&i?h(e.textContent,o):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function v(e,r){var n=r.doc,i=r.map,o=r.skipChild,s=void 0!==o&&o,l=r.hackCss,c=void 0===l||l,u=r.afterAppend,d=r.cache,f=m(e,{doc:n,hackCss:c,cache:d});if(!f)return null;if(e.rootId&&console.assert(i[e.rootId]===n,"Target document should has the same root id."),e.type===t.Document&&(n.close(),n.open(),f=n),f.__sn=e,i[e.id]=f,(e.type===t.Document||e.type===t.Element)&&!s)for(var h=0,p=e.childNodes;h<p.length;h++){var y=p[h],g=v(y,{doc:n,map:i,skipChild:!1,hackCss:c,afterAppend:u,cache:d});g?(y.isShadow&&a(f)&&f.shadowRoot?f.shadowRoot.appendChild(g):f.appendChild(g),u&&u(g)):console.warn("Failed to rebuild",y)}return f}function y(e,r){var n=r.doc,i=r.onVisit,o=r.hackCss,a={},s=v(e,{doc:n,map:a,skipChild:!1,hackCss:void 0===o||o,afterAppend:r.afterAppend,cache:r.cache});return function(e,t){for(var r in e)e[r]&&(n=e[r],t(n));var n}(a,(function(e){i&&i(e),function(e){var r=e.__sn;if(r.type===t.Element){var n=e;for(var i in r.attributes)if(r.attributes.hasOwnProperty(i)&&i.startsWith("rr_")){var o=r.attributes[i];"rr_scrollLeft"===i&&(n.scrollLeft=o),"rr_scrollTop"===i&&(n.scrollTop=o)}}}(e)})),[s,a]}function g(e){return e=e||Object.create(null),{on:function(t,r){(e[t]||(e[t]=[])).push(r)},off:function(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit:function(t,r){(e[t]||[]).slice().map((function(e){e(r)})),(e["*"]||[]).slice().map((function(e){e(t,r)}))}}}var S,b,x,w,T,E=Object.freeze({__proto__:null,default:g});function M(e,t){if(void 0===e&&(e=window),void 0===t&&(t=document),!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var r,n=e.HTMLElement||e.Element,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||s,scrollIntoView:n.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(r=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?p.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):i.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?i.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):p.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},n.prototype.scroll=n.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;p.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},n.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},n.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var r=f(this),n=r.getBoundingClientRect(),o=this.getBoundingClientRect();r!==t.body?(p.call(this,r,r.scrollLeft+o.left-n.left,r.scrollTop+o.top-n.top),"fixed"!==e.getComputedStyle(r).position&&e.scrollBy({left:n.left,top:n.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function u(t,r){var n=e.getComputedStyle(t,null)["overflow"+r];return"auto"===n||"scroll"===n}function d(e){var t=c(e,"Y")&&u(e,"Y"),r=c(e,"X")&&u(e,"X");return t||r}function f(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}function h(t){var r,n,i,a,s=(o()-t.startTime)/468;a=s=s>1?1:s,r=.5*(1-Math.cos(Math.PI*a)),n=t.startX+(t.x-t.startX)*r,i=t.startY+(t.y-t.startY)*r,t.method.call(t.scrollable,n,i),n===t.x&&i===t.y||e.requestAnimationFrame(h.bind(e,t))}function p(r,n,a){var l,c,u,d,f=o();r===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(l=r,c=r.scrollLeft,u=r.scrollTop,d=s),h({scrollable:l,method:d,startTime:f,startX:c,startY:u,x:n,y:a})}}!function(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"}(S||(S={})),function(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"}(b||(b={})),function(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"}(x||(x={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked"}(w||(w={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back"}(T||(T={}));var N,I=function(){function e(e,t){void 0===e&&(e=[]),this.timeOffset=0,this.raf=null,this.actions=e,this.speed=t}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){this.actions=this.actions.concat(e)},e.prototype.start=function(){this.timeOffset=0;var e=performance.now(),t=this.actions,r=this;this.raf=requestAnimationFrame((function n(){var i=performance.now();for(r.timeOffset+=(i-e)*r.speed,e=i;t.length;){var o=t[0];if(!(r.timeOffset>=o.delay))break;t.shift(),o.doAction()}(t.length>0||r.liveMode)&&(r.raf=requestAnimationFrame(n))}))},e.prototype.clear=function(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0},e.prototype.setSpeed=function(e){this.speed=e},e.prototype.toggleLiveMode=function(e){this.liveMode=e},e.prototype.isActive=function(){return null!==this.raf},e.prototype.findActionIndex=function(e){for(var t=0,r=this.actions.length-1;t<=r;){var n=Math.floor((t+r)/2);if(this.actions[n].delay<e.delay)t=n+1;else{if(!(this.actions[n].delay>e.delay))return n+1;r=n-1}}return t},e}();function C(e,t){if(e.type===S.IncrementalSnapshot&&e.data.source===b.MouseMove){var r=e.data.positions[0].timeOffset,n=e.timestamp+r;return e.delay=n-t,n-t}return e.delay=e.timestamp-t,e.delay}
***************************************************************************** */var t,r=function(){return(r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function n(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function i(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function o(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}function a(e){return e.nodeType===e.ELEMENT_NODE}!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"}(t||(t={}));var s=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function l(e,t){void 0===t&&(t={});var r=1,n=1;function i(e){var t=e.match(/\n/g);t&&(r+=t.length);var i=e.lastIndexOf("\n");n=-1===i?n+e.length:e.length-i}function o(){var e={line:r,column:n};return function(t){return t.position=new a(e),v(),t}}var a=function(e){this.start=e,this.end={line:r,column:n},this.source=t.source};a.prototype.content=e;var l=[];function d(i){var o=new Error(t.source+":"+r+":"+n+": "+i);if(o.reason=i,o.filename=t.source,o.line=r,o.column=n,o.source=e,!t.silent)throw o;l.push(o)}function f(){return m(/^{\s*/)}function p(){return m(/^}/)}function h(){var t,r=[];for(v(),y(r);e.length&&"}"!==e.charAt(0)&&(t=C()||A());)!1!==t&&(r.push(t),y(r));return r}function m(t){var r=t.exec(e);if(r){var n=r[0];return i(n),e=e.slice(n.length),r}}function v(){m(/^\s*/)}function y(e){var t;for(void 0===e&&(e=[]);t=g();)!1!==t&&e.push(t),t=g();return e}function g(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var r=2;""!==e.charAt(r)&&("*"!==e.charAt(r)||"/"!==e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return d("End of comment missing");var a=e.slice(2,r-2);return n+=2,i(a),e=e.slice(r),n+=2,t({type:"comment",comment:a})}}function S(){var e=m(/^([^{]+)/);if(e)return c(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function b(){var e=o(),t=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=c(t[0]);if(!m(/^:\s*/))return d("property missing ':'");var n=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:r.replace(s,""),value:n?c(n[0]).replace(s,""):""});return m(/^[;\s]*/),i}}function x(){var e,t=[];if(!f())return d("missing '{'");for(y(t);e=b();)!1!==e&&(t.push(e),y(t)),e=b();return p()?t:d("missing '}'")}function w(){for(var e,t=[],r=o();e=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),m(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:x()})}var T,E=I("import"),M=I("charset"),N=I("namespace");function I(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=o(),n=m(t);if(n){var i={type:e};return i[e]=n[1].trim(),r(i)}}}function C(){if("@"===e[0])return function(){var e=o(),t=m(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=m(/^([-\w]+)\s*/)))return d("@keyframes missing name");var n,i=t[1];if(!f())return d("@keyframes missing '{'");for(var a=y();n=w();)a.push(n),a=a.concat(y());return p()?e({type:"keyframes",name:i,vendor:r,keyframes:a}):d("@keyframes missing '}'")}}()||function(){var e=o(),t=m(/^@media *([^{]+)/);if(t){var r=c(t[1]);if(!f())return d("@media missing '{'");var n=y().concat(h());return p()?e({type:"media",media:r,rules:n}):d("@media missing '}'")}}()||function(){var e=o(),t=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:c(t[1]),media:c(t[2])})}()||function(){var e=o(),t=m(/^@supports *([^{]+)/);if(t){var r=c(t[1]);if(!f())return d("@supports missing '{'");var n=y().concat(h());return p()?e({type:"supports",supports:r,rules:n}):d("@supports missing '}'")}}()||E()||M()||N()||function(){var e=o(),t=m(/^@([-\w]+)?document *([^{]+)/);if(t){var r=c(t[1]),n=c(t[2]);if(!f())return d("@document missing '{'");var i=y().concat(h());return p()?e({type:"document",document:n,vendor:r,rules:i}):d("@document missing '}'")}}()||function(){var e=o();if(m(/^@page */)){var t=S()||[];if(!f())return d("@page missing '{'");for(var r,n=y();r=b();)n.push(r),n=n.concat(y());return p()?e({type:"page",selectors:t,declarations:n}):d("@page missing '}'")}}()||function(){var e=o();if(m(/^@host\s*/)){if(!f())return d("@host missing '{'");var t=y().concat(h());return p()?e({type:"host",rules:t}):d("@host missing '}'")}}()||function(){var e=o();if(m(/^@font-face\s*/)){if(!f())return d("@font-face missing '{'");for(var t,r=y();t=b();)r.push(t),r=r.concat(y());return p()?e({type:"font-face",declarations:r}):d("@font-face missing '}'")}}()}function A(){var e=o(),t=S();return t?(y(),e({type:"rule",selectors:t,declarations:x()})):d("selector missing")}return u((T=h(),{type:"stylesheet",stylesheet:{source:t.source,rules:T,parsingErrors:l}}))}function c(e){return e?e.replace(/^\s+|\s+$/g,""):""}function u(e,t){for(var r=e&&"string"==typeof e.type,n=r?e:t,i=0,o=Object.keys(e);i<o.length;i++){var a=e[o[i]];Array.isArray(a)?a.forEach((function(e){u(e,n)})):a&&"object"==typeof a&&u(a,n)}return r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var d={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var f=/([^\\]):hover/,p=new RegExp(f,"g");function h(e,t){var r=null==t?void 0:t.stylesWithHoverClass.get(e);if(r)return r;var n=l(e,{silent:!0});if(!n.stylesheet)return e;var i=[];if(n.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){f.test(e)&&i.push(e)}))})),0===i.length)return e;var o=new RegExp(i.filter((function(e,t){return i.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),a=e.replace(o,(function(e){var t=e.replace(p,"$1.\\:hover");return e+", "+t}));return null==t||t.stylesWithHoverClass.set(e,a),a}function m(){return{stylesWithHoverClass:new Map}}function v(e,r){var n=r.doc,i=r.hackCss,o=r.cache;switch(e.type){case t.Document:return n.implementation.createDocument(null,"",null);case t.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case t.Element:var a,s=function(e){var t=d[e.tagName]?d[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);a=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",s):n.createElement(s);var l=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var r=e.attributes[t];if("option"===s&&"selected"===t&&!1===r)return"continue";if(r="boolean"==typeof r||"number"==typeof r?"":r,t.startsWith("rr_")){if("canvas"===s&&"rr_dataURL"===t){var l=document.createElement("img");l.src=r,l.onload=function(){var e=a.getContext("2d");e&&e.drawImage(l,0,0,l.width,l.height)}}if("rr_width"===t&&(a.style.width=r),"rr_height"===t&&(a.style.height=r),"rr_mediaCurrentTime"===t&&(a.currentTime=e.attributes.rr_mediaCurrentTime),"rr_mediaState"===t)switch(r){case"played":a.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":a.pause()}}else{var c="textarea"===s&&"value"===t,u="style"===s&&"_cssText"===t;if(u&&i&&(r=h(r,o)),c||u){for(var d=n.createTextNode(r),f=0,p=Array.from(a.childNodes);f<p.length;f++){var m=p[f];m.nodeType===a.TEXT_NODE&&a.removeChild(m)}return a.appendChild(d),"continue"}try{if(e.isSVG&&"xlink:href"===t)a.setAttributeNS("http://www.w3.org/1999/xlink",t,r);else if("onload"===t||"onclick"===t||"onmouse"===t.substring(0,7))a.setAttribute("_"+t,r);else{if("meta"===s&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===t)return a.setAttribute("csp-content",r),"continue";"link"===s&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===s&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")||a.setAttribute(t,r)}}catch(e){}}};for(var c in e.attributes)l(c);if(e.isShadowHost)if(a.shadowRoot)for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);else a.attachShadow({mode:"open"});return a;case t.Text:return n.createTextNode(e.isStyle&&i?h(e.textContent,o):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function y(e,r){var n=r.doc,i=r.map,o=r.skipChild,s=void 0!==o&&o,l=r.hackCss,c=void 0===l||l,u=r.afterAppend,d=r.cache,f=v(e,{doc:n,hackCss:c,cache:d});if(!f)return null;if(e.rootId&&console.assert(i[e.rootId]===n,"Target document should has the same root id."),e.type===t.Document&&(n.close(),n.open(),f=n),f.__sn=e,i[e.id]=f,(e.type===t.Document||e.type===t.Element)&&!s)for(var p=0,h=e.childNodes;p<h.length;p++){var m=h[p],g=y(m,{doc:n,map:i,skipChild:!1,hackCss:c,afterAppend:u,cache:d});g?(m.isShadow&&a(f)&&f.shadowRoot?f.shadowRoot.appendChild(g):f.appendChild(g),u&&u(g)):console.warn("Failed to rebuild",m)}return f}function g(e,r){var n=r.doc,i=r.onVisit,o=r.hackCss,a={},s=y(e,{doc:n,map:a,skipChild:!1,hackCss:void 0===o||o,afterAppend:r.afterAppend,cache:r.cache});return function(e,t){for(var r in e)e[r]&&(n=e[r],t(n));var n}(a,(function(e){i&&i(e),function(e){var r=e.__sn;if(r.type===t.Element){var n=e;for(var i in r.attributes)if(r.attributes.hasOwnProperty(i)&&i.startsWith("rr_")){var o=r.attributes[i];"rr_scrollLeft"===i&&(n.scrollLeft=o),"rr_scrollTop"===i&&(n.scrollTop=o)}}}(e)})),[s,a]}function S(e){return e=e||Object.create(null),{on:function(t,r){(e[t]||(e[t]=[])).push(r)},off:function(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit:function(t,r){(e[t]||[]).slice().map((function(e){e(r)})),(e["*"]||[]).slice().map((function(e){e(t,r)}))}}}var b,x,w,T,E,M=Object.freeze({__proto__:null,default:S});function N(e,t){if(void 0===e&&(e=window),void 0===t&&(t=document),!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var r,n=e.HTMLElement||e.Element,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||s,scrollIntoView:n.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(r=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):i.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?i.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},n.prototype.scroll=n.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},n.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},n.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var r=f(this),n=r.getBoundingClientRect(),o=this.getBoundingClientRect();r!==t.body?(h.call(this,r,r.scrollLeft+o.left-n.left,r.scrollTop+o.top-n.top),"fixed"!==e.getComputedStyle(r).position&&e.scrollBy({left:n.left,top:n.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function u(t,r){var n=e.getComputedStyle(t,null)["overflow"+r];return"auto"===n||"scroll"===n}function d(e){var t=c(e,"Y")&&u(e,"Y"),r=c(e,"X")&&u(e,"X");return t||r}function f(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}function p(t){var r,n,i,a,s=(o()-t.startTime)/468;a=s=s>1?1:s,r=.5*(1-Math.cos(Math.PI*a)),n=t.startX+(t.x-t.startX)*r,i=t.startY+(t.y-t.startY)*r,t.method.call(t.scrollable,n,i),n===t.x&&i===t.y||e.requestAnimationFrame(p.bind(e,t))}function h(r,n,a){var l,c,u,d,f=o();r===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(l=r,c=r.scrollLeft,u=r.scrollTop,d=s),p({scrollable:l,method:d,startTime:f,startX:c,startY:u,x:n,y:a})}}!function(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"}(b||(b={})),function(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"}(x||(x={})),function(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"}(w||(w={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked"}(T||(T={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back"}(E||(E={}));var I,C=function(){function e(e,t){void 0===e&&(e=[]),this.timeOffset=0,this.raf=null,this.actions=e,this.speed=t}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){this.actions=this.actions.concat(e)},e.prototype.start=function(){this.timeOffset=0;var e=performance.now(),t=this.actions,r=this;this.raf=requestAnimationFrame((function n(){var i=performance.now();for(r.timeOffset+=(i-e)*r.speed,e=i;t.length;){var o=t[0];if(!(r.timeOffset>=o.delay))break;t.shift(),o.doAction()}(t.length>0||r.liveMode)&&(r.raf=requestAnimationFrame(n))}))},e.prototype.clear=function(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0},e.prototype.setSpeed=function(e){this.speed=e},e.prototype.toggleLiveMode=function(e){this.liveMode=e},e.prototype.isActive=function(){return null!==this.raf},e.prototype.findActionIndex=function(e){for(var t=0,r=this.actions.length-1;t<=r;){var n=Math.floor((t+r)/2);if(this.actions[n].delay<e.delay)t=n+1;else{if(!(this.actions[n].delay>e.delay))return n+1;r=n-1}}return t},e}();function A(e,t){if(e.type===b.IncrementalSnapshot&&e.data.source===x.MouseMove){var r=e.data.positions[0].timeOffset,n=e.timestamp+r;return e.delay=n-t,n-t}return e.delay=e.timestamp-t,e.delay}
/*! *****************************************************************************

@@ -30,3 +30,3 @@ Copyright (c) Microsoft Corporation.

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function A(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(N||(N={}));var D={type:"xstate.init"};function R(e){return void 0===e?[]:[].concat(e)}function k(e){return{type:"xstate.assign",assignment:e}}function _(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function P(e){return function(t){return e===t}}function F(e){return"string"==typeof e?{type:e}:e}function L(e,t){return{value:e,context:t,actions:[],changed:!1,matches:P(e)}}function O(e,t,r){var n=t,i=!1;return[e.filter((function(e){if("xstate.assign"===e.type){i=!0;var t=Object.assign({},n);return"function"==typeof e.assignment?t=e.assignment(n,r):Object.keys(e.assignment).forEach((function(i){t[i]="function"==typeof e.assignment[i]?e.assignment[i](n,r):e.assignment[i]})),n=t,!1}return!0})),n,i]}function j(e,t){void 0===t&&(t={});var r=A(O(R(e.states[e.initial].entry).map((function(e){return _(e,t.actions)})),e.context,D),2),n=r[0],i=r[1],o={config:e,_options:t,initialState:{value:e.initial,actions:n,context:i,matches:P(e.initial)},transition:function(t,r){var n,i,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,l=a.context,c=F(r),u=e.states[s];if(u.on){var d=R(u.on[c.type]);try{for(var f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),h=f.next();!h.done;h=f.next()){var p=h.value;if(void 0===p)return L(s,l);var m="string"==typeof p?{target:p}:p,v=m.target,y=m.actions,g=void 0===y?[]:y,S=m.cond,b=void 0===S?function(){return!0}:S,x=void 0===v,w=null!=v?v:s,T=e.states[w];if(b(l,c)){var E=A(O((x?R(g):[].concat(u.exit,g,T.entry).filter((function(e){return e}))).map((function(e){return _(e,o._options.actions)})),l,c),3),M=E[0],N=E[1],I=E[2],C=null!=v?v:s;return{value:C,context:N,actions:M,changed:v!==s||M.length>0||I,matches:P(C)}}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}}return L(s,l)}};return o}var B=function(e,t){return e.actions.forEach((function(r){var n=r.exec;return n&&n(e.context,t)}))};function W(e){var t=e.initialState,r=N.NotStarted,n=new Set,i={_machine:e,send:function(i){r===N.Running&&(t=e.transition(t,i),B(t,F(i)),n.forEach((function(e){return e(t)})))},subscribe:function(e){return n.add(e),e(t),{unsubscribe:function(){return n.delete(e)}}},start:function(n){if(n){var o="object"==typeof n?n:{context:e.config.context,value:n};t={value:o.value,actions:[],context:o.context,matches:P(o.value)}}return r=N.Running,B(t,D),i},stop:function(){return r=N.Stopped,n.clear(),i},get state(){return t},get status(){return r}};return i}function V(e,t){var i=t.getCastFn,o=t.applyEventsSynchronously,a=t.emitter;return W(j({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:k({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:k((function(e,t){var n=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(n=t.payload.timeOffset),r(r({},e),{timeOffset:n,baselineTime:e.events[0].timestamp+n})})),play:function(e){var t,r,s,l,c,u=e.timer,d=e.events,f=e.baselineTime,h=e.lastPlayedEvent;u.clear();try{for(var p=n(d),m=p.next();!m.done;m=p.next()){C(m.value,f)}}catch(e){t={error:e}}finally{try{m&&!m.done&&(r=p.return)&&r.call(p)}finally{if(t)throw t.error}}var v=function(e,t){for(var r=e.length-1;r>=0;r--){var n=e[r];if(n.type===S.Meta&&n.timestamp<=t)return e.slice(r)}return e}(d,f),y=null==h?void 0:h.timestamp;(null==h?void 0:h.type)===S.IncrementalSnapshot&&h.data.source===b.MouseMove&&(y=h.timestamp+(null===(c=h.data.positions[0])||void 0===c?void 0:c.timeOffset)),f<(y||0)&&a.emit(T.PlayBack);var g=new Array,x=new Array,w=function(e){if(y&&y<f&&(e.timestamp<=y||e===h))return"continue";if(e.timestamp<f)g.push(e);else{var t=i(e,!1);x.push({doAction:function(){t(),a.emit(T.EventCast,e)},delay:e.delay})}};try{for(var E=n(v),M=E.next();!M.done;M=E.next()){w(M.value)}}catch(e){s={error:e}}finally{try{M&&!M.done&&(l=E.return)&&l.call(E)}finally{if(s)throw s.error}}o(g),a.emit(T.Flush),u.addActions(x),u.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:k((function(e){return r(r({},e),{lastPlayedEvent:null})})),startLive:k({baselineTime:function(e,t){return e.timer.toggleLiveMode(!0),e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:k((function(e,t){var n=e.baselineTime,o=e.timer,s=e.events;if("ADD_EVENT"===t.type){var l=t.payload.event;C(l,n);var c=s.length-1;if(!s[c]||s[c].timestamp<=l.timestamp)s.push(l);else{for(var u=-1,d=0;d<=c;){var f=Math.floor((d+c)/2);s[f].timestamp<=l.timestamp?d=f+1:c=f-1}-1===u&&(u=d),s.splice(u,0,l)}var h=l.timestamp<n,p=i(l,h);h?p():o.isActive()&&o.addAction({doAction:function(){p(),a.emit(T.EventCast,l)},delay:l.delay})}return r(r({},e),{events:s})}))}}))}var U="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.",z={map:{},getId:function(){return console.error(U),-1},getNode:function(){return console.error(U),null},removeNodeFromMap:function(){console.error(U)},has:function(){return console.error(U),!1},reset:function(){console.error(U)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(z=new Proxy(z,{get:function(e,t,r){return"map"===t&&console.error(U),Reflect.get(e,t,r)}}));var Y=function(){function e(){this.reset()}return e.prototype.add=function(e){var t=this.indexes.get(e.parentId),r={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(r.parent=t,t.children[r.id]=r):this.tree[r.id]=r,this.indexes.set(r.id,r)},e.prototype.remove=function(e,t){var r=this,n=this.indexes.get(e.parentId),i=this.indexes.get(e.id),o=function(e){r.removeIdSet.add(e);var n=t.getNode(e);null==n||n.childNodes.forEach((function(e){"__sn"in e&&o(e.__sn.id)}))},a=function(t){r.removeIdSet.add(t.id),Object.values(t.children).forEach((function(e){return a(e)}));var n=r.indexes.get(t.id);if(n){var i=n.parent;i&&(delete n.parent,delete i.children[n.id],r.indexes.delete(e.id))}};i?n?(delete i.parent,delete n.children[i.id],this.indexes.delete(e.id),a(i)):(delete this.tree[i.id],this.indexes.delete(i.id),a(i)):(this.removeNodeMutations.push(e),o(e.id))},e.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},e.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},e.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},e.prototype.input=function(e){this.inputMap.set(e.id,e)},e.prototype.flush=function(){var e,t,r,i,o=this,a=this.tree,s=this.removeNodeMutations,l=this.textMutations,c=this.attributeMutations,u={source:b.Mutation,removes:s,texts:l,attributes:c,adds:[]},d=function(e,t){t&&o.removeIdSet.add(e.id),u.texts=u.texts.concat(t?[]:e.texts).filter((function(e){return!o.removeIdSet.has(e.id)})),u.attributes=u.attributes.concat(t?[]:e.attributes).filter((function(e){return!o.removeIdSet.has(e.id)})),o.removeIdSet.has(e.id)||o.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return d(e,!0)})):(u.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return d(e,!1)})))};Object.values(a).forEach((function(e){return d(e,!1)}));try{for(var f=n(this.scrollMap.keys()),h=f.next();!h.done;h=f.next()){var p=h.value;this.removeIdSet.has(p)&&this.scrollMap.delete(p)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}try{for(var m=n(this.inputMap.keys()),v=m.next();!v.done;v=m.next()){p=v.value;this.removeIdSet.has(p)&&this.inputMap.delete(p)}}catch(e){r={error:e}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}var y=new Map(this.scrollMap),g=new Map(this.inputMap);return this.reset(),{mutationData:u,scrollMap:y,inputMap:g}},e.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},e.prototype.idRemoved=function(e){return this.removeIdSet.has(e)},e}();function X(e){var t,r,i={},o=function(e,t){var r={value:e,parent:t,children:[]};return i[e.node.id]=r,r},a=[];try{for(var s=n(e),l=s.next();!l.done;l=s.next()){var c=l.value,u=c.nextId,d=c.parentId;if(u&&u in i){var f=i[u];if(f.parent){var h=f.parent.children.indexOf(f);f.parent.children.splice(h,0,o(c,f.parent))}else{h=a.indexOf(f);a.splice(h,0,o(c,null))}}else if(d in i){var p=i[d];p.children.push(o(c,p))}else a.push(o(c,null))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return a}function H(e,t){t(e.value);for(var r=e.children.length-1;r>=0;r--)H(e.children[r],t)}function Q(e){return"__sn"in e&&(e.__sn.type===t.Element&&"iframe"===e.__sn.tagName)}function G(e){var t;return Boolean(null===(t=e)||void 0===t?void 0:t.shadowRoot)}var q;function $(e,t){var r=e[t[0]];return 1===t.length?r:$(r.cssRules[t[1]].cssRules,t.slice(2))}function J(e){var t=o(e),r=t.pop();return{positions:t,index:r}}function K(e,t){e.forEach((function(e){var r,n;if(e.type===q.Insert)try{if(Array.isArray(e.index)){var o=J(e.index),a=o.positions,s=o.index;$(t.sheet.cssRules,a).insertRule(e.cssText,s)}else null===(r=t.sheet)||void 0===r||r.insertRule(e.cssText,e.index)}catch(e){}else if(e.type===q.Remove)try{if(Array.isArray(e.index)){var l=J(e.index);a=l.positions,s=l.index;$(t.sheet.cssRules,a).deleteRule(s||0)}else null===(n=t.sheet)||void 0===n||n.deleteRule(e.index)}catch(e){}else if(e.type===q.Snapshot)!function(e,t){var r;try{var n=Array.from((null===(r=t.sheet)||void 0===r?void 0:r.cssRules)||[]).map((function(e){return e.cssText})),o=Object.entries(n).reverse(),a=n.length;o.forEach((function(r){var n,o=i(r,2),s=o[0],l=o[1],c=e.indexOf(l);if(-1===c||c>a)try{null===(n=t.sheet)||void 0===n||n.deleteRule(Number(s))}catch(e){}a=c})),e.forEach((function(e,r){var n,i,o;try{(null===(i=null===(n=t.sheet)||void 0===n?void 0:n.cssRules[r])||void 0===i?void 0:i.cssText)!==e&&(null===(o=t.sheet)||void 0===o||o.insertRule(e,r))}catch(e){}}))}catch(e){}}(e.cssTexts,t);else if(e.type===q.SetProperty){$(t.sheet.cssRules,e.index).style.setProperty(e.property,e.value,e.priority)}else if(e.type===q.RemoveProperty){$(t.sheet.cssRules,e.index).style.removeProperty(e.property)}}))}!function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot",e[e.SetProperty=3]="SetProperty",e[e.RemoveProperty=4]="RemoveProperty"}(q||(q={}));var Z=g||E,ee={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function te(e){return e.type==S.IncrementalSnapshot&&(e.data.source==b.TouchMove||e.data.source==b.MouseInteraction&&e.data.type==x.TouchStart)}var re=function(){function e(e,t){var r=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=Z(),this.legacy_missingNodeRetryMap={},this.cache=p(),this.imageMap=new Map,this.mirror={map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,r=e.__sn&&e.__sn.id;delete this.map[r],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}},this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,!(null==t?void 0:t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");var i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:ee};this.config=Object.assign({},i,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(T.Resize,this.handleResize),this.setupDom(),this.treeIndex=new Y,this.fragmentParentMap=new Map,this.elementStateMap=new Map,this.virtualStyleRulesMap=new Map,this.emitter.on(T.Flush,(function(){var e,t,i,o,a,s,l=r.treeIndex.flush(),c=l.scrollMap,u=l.inputMap;r.fragmentParentMap.forEach((function(e,t){return r.restoreRealParent(t,e)}));try{for(var d=n(r.virtualStyleRulesMap.keys()),f=d.next();!f.done;f=d.next()){var h=f.value;r.restoreNodeSheet(h)}}catch(t){e={error:t}}finally{try{f&&!f.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}r.fragmentParentMap.clear(),r.elementStateMap.clear(),r.virtualStyleRulesMap.clear();try{for(var p=n(c.values()),m=p.next();!m.done;m=p.next()){var v=m.value;r.applyScroll(v)}}catch(e){i={error:e}}finally{try{m&&!m.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}try{for(var y=n(u.values()),g=y.next();!g.done;g=y.next()){v=g.value;r.applyInput(v)}}catch(e){a={error:e}}finally{try{g&&!g.done&&(s=y.return)&&s.call(y)}finally{if(a)throw a.error}}})),this.emitter.on(T.PlayBack,(function(){r.firstFullSnapshot=null,r.mirror.reset()}));var o=new I([],(null==t?void 0:t.speed)||i.speed);this.service=V({events:e.map((function(e){return t&&t.unpackFn?t.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:o,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){r.emitter.emit(T.StateChange,{player:e})})),this.speedService=W(j({id:"speed",context:{normalSpeed:-1,timer:o},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:k({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(e){r.emitter.emit(T.StateChange,{speed:e})}));var a=this.service.state.context.events.find((function(e){return e.type===S.Meta})),s=this.service.state.context.events.find((function(e){return e.type===S.FullSnapshot}));if(a){var l=a.data,c=l.width,u=l.height;setTimeout((function(){r.emitter.emit(T.Resize,{width:c,height:u})}),0)}s&&setTimeout((function(){r.firstFullSnapshot||(r.firstFullSnapshot=s,r.rebuildFullSnapshot(s),r.iframe.contentWindow.scrollTo(s.data.initialOffset))}),1),this.service.state.context.events.find(te)&&this.mouse.classList.add("touch-device")}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){return this.emitter.on(e,t),this},e.prototype.off=function(e,t){return this.emitter.off(e,t),this},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(r){t.config[r]=e[r]})),this.config.skipInactive||this.backToNormal(),void 0!==e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),void 0!==e.mouseTail&&(!1===e.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))},e.prototype.getMetaData=function(){var e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},e.prototype.getMirror=function(){return this.mirror},e.prototype.play=function(e){var t;void 0===e&&(e=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}}),null===(t=this.iframe.contentDocument)||void 0===t||t.getElementsByTagName("html")[0].classList.remove("rrweb-paused"),this.emitter.emit(T.Start)},e.prototype.pause=function(e){var t;void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),null===(t=this.iframe.contentDocument)||void 0===t||t.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(T.Pause)},e.prototype.resume=function(e){void 0===e&&(e=0),console.warn("The 'resume' will be departed in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(T.Resume)},e.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},e.prototype.addEvent=function(e){var t=this,r=this.config.unpackFn?this.config.unpackFn(e):e;te(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:r}})}))},e.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},e.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},e.prototype.resetCache=function(){this.cache=p()},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var e,t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(M(this.iframe.contentWindow,this.iframe.contentDocument),void 0===(e=this.iframe.contentWindow)&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1}))},e.prototype.handleResize=function(e){var t,r;this.iframe.style.display="inherit";try{for(var i=n([this.mouseTail,this.iframe]),o=i.next();!o.done;o=i.next()){var a=o.value;a&&(a.setAttribute("width",String(e.width)),a.setAttribute("height",String(e.height)))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}},e.prototype.applyEventsSynchronously=function(e){var t,r;try{for(var i=n(e),o=i.next();!o.done;o=i.next()){var a=o.value;switch(a.type){case S.DomContentLoaded:case S.Load:case S.Custom:continue;case S.FullSnapshot:case S.Meta:case S.Plugin:break;case S.IncrementalSnapshot:switch(a.data.source){case b.MediaInteraction:continue}}this.getCastFn(a,!0)()}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}this.mousePos&&this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null,!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null},e.prototype.getCastFn=function(e,t){var r,i=this;switch(void 0===t&&(t=!1),e.type){case S.DomContentLoaded:case S.Load:break;case S.Custom:r=function(){i.emitter.emit(T.CustomEvent,e)};break;case S.Meta:r=function(){return i.emitter.emit(T.Resize,{width:e.data.width,height:e.data.height})};break;case S.FullSnapshot:r=function(){if(i.firstFullSnapshot){if(i.firstFullSnapshot===e)return void(i.firstFullSnapshot=!0)}else i.firstFullSnapshot=!0;i.rebuildFullSnapshot(e,t),i.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case S.IncrementalSnapshot:r=function(){var r,o;if(i.applyIncremental(e,t),!t&&(e===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.backToNormal()),i.config.skipInactive&&!i.nextUserInteractionEvent)){try{for(var a=n(i.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(!(l.timestamp<=e.timestamp)&&i.isUserInteraction(l)){l.delay-e.delay>1e4*i.speedService.state.context.timer.speed&&(i.nextUserInteractionEvent=l);break}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}if(i.nextUserInteractionEvent){var c=i.nextUserInteractionEvent.delay-e.delay,u={speed:Math.min(Math.round(c/5e3),i.config.maxSpeed)};i.speedService.send({type:"FAST_FORWARD",payload:u}),i.emitter.emit(T.SkipStart,u)}}}}return function(){var o,a;r&&r();try{for(var s=n(i.config.plugins||[]),l=s.next();!l.done;l=s.next()){l.value.handler(e,t,{replayer:i})}}catch(e){o={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}i.service.send({type:"CAST_EVENT",payload:{event:e}});var c=i.service.state.context.events.length-1;if(e===i.service.state.context.events[c]){var u=function(){c<i.service.state.context.events.length-1||(i.backToNormal(),i.service.send("END"),i.emitter.emit(T.Finish))};e.type===S.IncrementalSnapshot&&e.data.source===b.MouseMove&&e.data.positions.length?setTimeout((function(){u()}),Math.max(0,50-e.data.positions[0].timeOffset)):u()}}},e.prototype.rebuildFullSnapshot=function(e,t){var r,i,o=this;if(void 0===t&&(t=!1),!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};var a=[];this.mirror.map=y(e.data.node,{doc:this.iframe.contentDocument,afterAppend:function(e){o.collectIframeAndAttachDocument(a,e)},cache:this.cache})[1];var s=function(e,t){if(l.attachDocumentToIframe(e,t),l.newDocumentQueue=l.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var r=t.contentDocument,n=r.documentElement,i=r.head;l.insertStyleRules(n,i)}},l=this;try{for(var c=n(a),u=c.next();!u.done;u=c.next()){var d=u.value;s(d.mutationInQueue,d.builtNode)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}var f=this.iframe.contentDocument,h=f.documentElement,p=f.head;this.insertStyleRules(h,p),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(T.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()},e.prototype.insertStyleRules=function(e,t){var r=document.createElement("style");e.insertBefore(r,t);var n,i=(n=this.config.blockClass,["."+n+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules);this.config.pauseAnimation&&i.push("html.rrweb-paused * { animation-play-state: paused !important; }");for(var o=0;o<i.length;o++)r.sheet.insertRule(i[o],o)},e.prototype.attachDocumentToIframe=function(e,t){var r,i,o=this,a=[];if(!t.contentDocument)for(var s=t.parentNode;s;){if(this.fragmentParentMap.has(s)){var l=s,c=this.fragmentParentMap.get(l);this.restoreRealParent(l,c);break}s=s.parentNode}v(e.node,{doc:t.contentDocument,map:this.mirror.map,hackCss:!0,skipChild:!1,afterAppend:function(e){o.collectIframeAndAttachDocument(a,e)},cache:this.cache});var u=function(e,t){if(d.attachDocumentToIframe(e,t),d.newDocumentQueue=d.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var r=t.contentDocument,n=r.documentElement,i=r.head;d.insertStyleRules(n,i)}},d=this;try{for(var f=n(a),h=f.next();!h.done;h=f.next()){var p=h.value;u(p.mutationInQueue,p.builtNode)}}catch(e){r={error:e}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}},e.prototype.collectIframeAndAttachDocument=function(e,t){if(Q(t)){var r=this.newDocumentQueue.find((function(e){return e.parentId===t.__sn.id}));r&&e.push({mutationInQueue:r,builtNode:t})}},e.prototype.waitForStylesheetLoad=function(){var e,t=this,r=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(r){var n,i=new Set,o=this.service.state,a=function(){o=t.service.state};this.emitter.on(T.Start,a),this.emitter.on(T.Pause,a);var s=function(){t.emitter.off(T.Start,a),t.emitter.off(T.Pause,a)};r.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(i.add(e),e.addEventListener("load",(function(){i.delete(e),0===i.size&&-1!==n&&(o.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(T.LoadStylesheetEnd),n&&window.clearTimeout(n),s())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(T.LoadStylesheetStart),n=window.setTimeout((function(){o.matches("playing")&&t.play(t.getCurrentTime()),n=-1,s()}),this.config.loadTimeout))}},e.prototype.preloadAllImages=function(){var e,t,r=this;this.service.state;var i=function(){r.service.state};this.emitter.on(T.Start,i),this.emitter.on(T.Pause,i);try{for(var o=n(this.service.state.context.events),a=o.next();!a.done;a=o.next()){var s=a.value;if(s.type===S.IncrementalSnapshot&&s.data.source===b.CanvasMutation&&"drawImage"===s.data.property&&"string"==typeof s.data.args[0]&&!this.imageMap.has(s)){var l=document.createElement("canvas"),c=l.getContext("2d"),u=null==c?void 0:c.createImageData(l.width,l.height);null==u||u.data;JSON.parse(s.data.args[0]),null==c||c.putImageData(u,0,0)}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}},e.prototype.applyIncremental=function(e,t){var n,i,o=this,a=e.data;switch(a.source){case b.Mutation:t&&(a.adds.forEach((function(e){return o.treeIndex.add(e)})),a.texts.forEach((function(e){return o.treeIndex.text(e)})),a.attributes.forEach((function(e){return o.treeIndex.attribute(e)})),a.removes.forEach((function(e){return o.treeIndex.remove(e,o.mirror)})));try{this.applyMutation(a,t)}catch(e){this.warn("Exception in mutation "+(e.message||e),a)}break;case b.Drag:case b.TouchMove:case b.MouseMove:if(t){var s=a.positions[a.positions.length-1];this.mousePos={x:s.x,y:s.y,id:s.id,debugData:a}}else a.positions.forEach((function(r){var n={doAction:function(){o.moveAndHover(r.x,r.y,r.id,t,a)},delay:r.timeOffset+e.timestamp-o.service.state.context.baselineTime};o.timer.addAction(n)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(n=a.positions[0])||void 0===n?void 0:n.timeOffset)});break;case b.MouseInteraction:if(-1===a.id)break;var l=new Event(x[a.type].toLowerCase());if(!(g=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);this.emitter.emit(T.MouseInteraction,{type:a.type,target:g});var c=this.config.triggerFocus;switch(a.type){case x.Blur:"blur"in g&&g.blur();break;case x.Focus:c&&g.focus&&g.focus({preventScroll:!0});break;case x.Click:case x.TouchStart:case x.TouchEnd:t?(a.type===x.TouchStart?this.touchActive=!0:a.type===x.TouchEnd&&(this.touchActive=!1),this.mousePos={x:a.x,y:a.y,id:a.id,debugData:a}):(a.type===x.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x,a.y,a.id,t,a),a.type===x.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===x.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===x.TouchEnd&&this.mouse.classList.remove("touch-active"));break;case x.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:g.dispatchEvent(l)}break;case b.Scroll:if(-1===a.id)break;if(t){this.treeIndex.scroll(a);break}this.applyScroll(a);break;case b.ViewportResize:this.emitter.emit(T.Resize,{width:a.width,height:a.height});break;case b.Input:if(-1===a.id)break;if(t){this.treeIndex.input(a);break}this.applyInput(a);break;case b.MediaInteraction:if(!(g=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);var u=g;try{a.currentTime&&(u.currentTime=a.currentTime),a.type===w.Pause&&u.pause(),a.type===w.Play&&u.play()}catch(e){this.config.showWarning&&console.warn("Failed to replay media interactions: "+(e.message||e))}break;case b.StyleSheetRule:if(!(g=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);var d,f=g,h=g.parentNode,p=this.fragmentParentMap.has(h),m=p?null:f.sheet;m||(this.virtualStyleRulesMap.has(g)?d=this.virtualStyleRulesMap.get(g):(d=[],this.virtualStyleRulesMap.set(g,d))),a.adds&&a.adds.forEach((function(e){var t=e.rule,r=e.index;if(m)try{if(Array.isArray(r)){var n=J(r),i=n.positions,o=n.index;$(m.cssRules,i).insertRule(t,o)}else{o=void 0===r?void 0:Math.min(r,m.cssRules.length);m.insertRule(t,o)}}catch(e){}else null==d||d.push({cssText:t,index:r,type:q.Insert})})),a.removes&&a.removes.forEach((function(e){var t=e.index;if(p)null==d||d.push({index:t,type:q.Remove});else try{if(Array.isArray(t)){var r=J(t),n=r.positions,i=r.index;$(m.cssRules,n).deleteRule(i||0)}else null==m||m.deleteRule(t)}catch(e){}}));break;case b.StyleDeclaration:if(!(g=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);f=g,h=g.parentNode;var v=this.fragmentParentMap.has(h)?null:f.sheet,y=[];if(v||(this.virtualStyleRulesMap.has(g)?y=this.virtualStyleRulesMap.get(g):(y=[],this.virtualStyleRulesMap.set(g,y))),a.set)if(v)$(v.rules,a.index).style.setProperty(a.set.property,a.set.value,a.set.priority);else y.push(r({type:q.SetProperty,index:a.index},a.set));if(a.remove)if(v)$(v.rules,a.index).style.removeProperty(a.remove.property);else y.push(r({type:q.RemoveProperty,index:a.index},a.remove));break;case b.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var g;if(!(g=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);try{var S=g.getContext("2d");if(a.setter)return void(S[a.property]=a.args[0]);var E=S[a.property];if("drawImage"===a.property&&"string"==typeof a.args[0]){var M=this.imageMap.get(e);a.args[0]=M,E.apply(S,a.args)}else E.apply(S,a.args)}catch(e){this.warnCanvasMutationFailed(a,a.id,e)}break;case b.Font:try{var N=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);null===(i=this.iframe.contentDocument)||void 0===i||i.fonts.add(N)}catch(e){this.config.showWarning&&console.warn(e)}}},e.prototype.applyMutation=function(e,i){var o,a,s=this;e.removes.forEach((function(t){var r=s.mirror.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.parentId})))return;return s.warnNodeNotFound(e,t.id)}var n=s.mirror.getNode(t.parentId);if(!n)return s.warnNodeNotFound(e,t.parentId);if(t.isShadow&&G(n)&&(n=n.shadowRoot),s.mirror.removeNodeFromMap(r),n){var i=null,o="__sn"in n?s.fragmentParentMap.get(n):void 0;o&&o.contains(r)?n=o:s.fragmentParentMap.has(r)&&(i=s.fragmentParentMap.get(r),s.fragmentParentMap.delete(r),r=i);try{n.removeChild(r)}catch(t){if(!(t instanceof DOMException))throw t;s.warn("parent could not remove child in mutation",n,o,r,i,e)}}}));var l=r({},this.legacy_missingNodeRetryMap),c=[],u=function(e){var r,n;if(!s.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var o=s.mirror.getNode(e.parentId);if(!o)return e.node.type===t.Document?s.newDocumentQueue.push(e):c.push(e);var a=null;s.iframe.contentDocument.contains?a=s.iframe.contentDocument.contains(o):s.iframe.contentDocument.body.contains&&(a=s.iframe.contentDocument.body.contains(o));var u=(null===(n=(r=o).getElementsByTagName)||void 0===n?void 0:n.call(r,"iframe").length)>0;if(i&&a&&!Q(o)&&!u){var d=document.createDocumentFragment();for(s.mirror.map[e.parentId]=d,s.fragmentParentMap.set(d,o),s.storeState(o);o.firstChild;)d.appendChild(o.firstChild);o=d}e.node.isShadow&&G(o)&&(o=o.shadowRoot);var f=null,h=null;if(e.previousId&&(f=s.mirror.getNode(e.previousId)),e.nextId&&(h=s.mirror.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=s.mirror.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return c.push(e);if(!e.node.rootId||s.mirror.getNode(e.node.rootId)){var p=e.node.rootId?s.mirror.getNode(e.node.rootId):s.iframe.contentDocument;if(Q(o))s.attachDocumentToIframe(e,o);else{var m=v(e.node,{doc:p,map:s.mirror.map,skipChild:!0,hackCss:!0,cache:s.cache});if(-1!==e.previousId&&-1!==e.nextId){if(f&&f.nextSibling&&f.nextSibling.parentNode)o.insertBefore(m,f.nextSibling);else if(h&&h.parentNode)o.contains(h)?o.insertBefore(m,h):o.insertBefore(m,null);else{if(o===p)for(;p.firstChild;)p.removeChild(p.firstChild);o.appendChild(m)}if(Q(m)){var y=s.newDocumentQueue.find((function(e){return e.parentId===m.__sn.id}));if(y&&(s.attachDocumentToIframe(y,m),s.newDocumentQueue=s.newDocumentQueue.filter((function(e){return e!==y}))),m.contentDocument){var g=m.contentDocument,S=g.documentElement,b=g.head;s.insertStyleRules(S,b)}}(e.previousId||e.nextId)&&s.legacy_resolveMissingNode(l,o,m,e)}else l[e.node.id]={node:m,mutation:e}}}};e.adds.forEach((function(e){u(e)}));for(var d=Date.now();c.length;){var f=X(c);if(c.length=0,Date.now()-d>500){this.warn("Timeout in the loop, please check the resolve tree data:",f);break}try{for(var h=(o=void 0,n(f)),p=h.next();!p.done;p=h.next()){var m=p.value;this.mirror.getNode(m.value.parentId)?H(m,(function(e){u(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",m)}}catch(e){o={error:e}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}}Object.keys(l).length&&Object.assign(this.legacy_missingNodeRetryMap,l),e.texts.forEach((function(t){var r=s.mirror.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.id})))return;return s.warnNodeNotFound(e,t.id)}s.fragmentParentMap.has(r)&&(r=s.fragmentParentMap.get(r)),r.textContent=t.value})),e.attributes.forEach((function(t){var r=s.mirror.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.id})))return;return s.warnNodeNotFound(e,t.id)}for(var n in s.fragmentParentMap.has(r)&&(r=s.fragmentParentMap.get(r)),t.attributes)if("string"==typeof n){var i=t.attributes[n];if(null===i)r.removeAttribute(n);else if("string"==typeof i)try{r.setAttribute(n,i)}catch(e){s.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",e)}else if("style"===n){var o=i,a=r;for(var l in o)if(!1===o[l])a.style.removeProperty(l);else if(o[l]instanceof Array){var c=o[l];a.style.setProperty(l,c[0],c[1])}else{var u=o[l];a.style.setProperty(l,u)}}}}))},e.prototype.applyScroll=function(e){var t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);if(t===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:e.y,left:e.x,behavior:"smooth"});else try{t.scrollTop=e.y,t.scrollLeft=e.x}catch(e){}},e.prototype.applyInput=function(e){var t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}},e.prototype.legacy_resolveMissingNode=function(e,t,r,n){var i=n.previousId,o=n.nextId,a=i&&e[i],s=o&&e[o];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,r),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}if(s){var d=s;c=d.node,u=d.mutation;t.insertBefore(c,r.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}},e.prototype.moveAndHover=function(e,t,r,n,i){var o=this.mirror.getNode(r);if(!o)return this.debugNodeNotFound(i,r);var a=function e(t,r){var n,i,o=null===(i=null===(n=t.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===i?void 0:i.frameElement;if(!o||o===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};var a=o.getBoundingClientRect(),s=e(o,r),l=a.height/o.clientHeight;return{x:a.x*s.relativeScale+s.x,y:a.y*s.relativeScale+s.y,relativeScale:l,absoluteScale:s.absoluteScale*l}}(o,this.iframe),s=e*a.absoluteScale+a.x,l=t*a.absoluteScale+a.y;this.mouse.style.left=s+"px",this.mouse.style.top=l+"px",n||this.drawMouseTail({x:s,y:l}),this.hoverElements(o)},e.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var r=!0===this.config.mouseTail?ee:Object.assign({},ee,this.config.mouseTail),n=r.lineCap,i=r.lineWidth,o=r.strokeStyle,a=r.duration,s=function(){if(t.mouseTail){var e=t.mouseTail.getContext("2d");e&&t.tailPositions.length&&(e.clearRect(0,0,t.mouseTail.width,t.mouseTail.height),e.beginPath(),e.lineWidth=i,e.lineCap=n,e.strokeStyle=o,e.moveTo(t.tailPositions[0].x,t.tailPositions[0].y),t.tailPositions.forEach((function(t){return e.lineTo(t.x,t.y)})),e.stroke())}};this.tailPositions.push(e),s(),setTimeout((function(){t.tailPositions=t.tailPositions.filter((function(t){return t!==e})),s()}),a/this.speedService.state.context.timer.speed)}},e.prototype.hoverElements=function(e){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")}));for(var r=e;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement},e.prototype.isUserInteraction=function(e){return e.type===S.IncrementalSnapshot&&(e.data.source>b.Mutation&&e.data.source<=b.Input)},e.prototype.backToNormal=function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(T.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},e.prototype.restoreRealParent=function(e,r){this.mirror.map[r.__sn.id]=r,r.__sn.type===t.Element&&"textarea"===r.__sn.tagName&&e.textContent&&(r.value=e.textContent),r.appendChild(e),this.restoreState(r)},e.prototype.storeState=function(e){var t,r;if(e&&e.nodeType===e.ELEMENT_NODE){var i=e;(i.scrollLeft||i.scrollTop)&&this.elementStateMap.set(e,{scroll:[i.scrollLeft,i.scrollTop]}),"STYLE"===i.tagName&&function(e,t){var r;try{var n=Array.from((null===(r=e.sheet)||void 0===r?void 0:r.cssRules)||[]).map((function(e){return e.cssText}));t.set(e,[{type:q.Snapshot,cssTexts:n}])}catch(e){}}(i,this.virtualStyleRulesMap);var o=i.children;try{for(var a=n(Array.from(o)),s=a.next();!s.done;s=a.next()){var l=s.value;this.storeState(l)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}}},e.prototype.restoreState=function(e){var t,r;if(e.nodeType===e.ELEMENT_NODE){var i=e;if(this.elementStateMap.has(e)){var o=this.elementStateMap.get(e);o.scroll&&(i.scrollLeft=o.scroll[0],i.scrollTop=o.scroll[1]),this.elementStateMap.delete(e)}var a=i.children;try{for(var s=n(Array.from(a)),l=s.next();!l.done;l=s.next()){var c=l.value;this.restoreState(c)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}}},e.prototype.restoreNodeSheet=function(e){var t=this.virtualStyleRulesMap.get(e);"STYLE"===e.nodeName&&(t&&K(t,e))},e.prototype.warnNodeNotFound=function(e,t){this.treeIndex.idRemoved(t)?this.warn("Node with id '"+t+"' was previously removed. ",e):this.warn("Node with id '"+t+"' not found. ",e)},e.prototype.warnCanvasMutationFailed=function(e,t,r){this.warn("Has error on update canvas '"+t+"'",e,r)},e.prototype.debugNodeNotFound=function(e,t){this.treeIndex.idRemoved(t)?this.debug("[replayer]","Node with id '"+t+"' was previously removed. ",e):this.debug("[replayer]","Node with id '"+t+"' not found. ",e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showWarning&&console.warn.apply(console,o(["[replayer]"],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showDebug&&console.log.apply(console,o(["[replayer]"],e))},e}();return e.Replayer=re,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
***************************************************************************** */function D(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(I||(I={}));var R={type:"xstate.init"};function k(e){return void 0===e?[]:[].concat(e)}function _(e){return{type:"xstate.assign",assignment:e}}function P(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function F(e){return function(t){return e===t}}function L(e){return"string"==typeof e?{type:e}:e}function O(e,t){return{value:e,context:t,actions:[],changed:!1,matches:F(e)}}function j(e,t,r){var n=t,i=!1;return[e.filter((function(e){if("xstate.assign"===e.type){i=!0;var t=Object.assign({},n);return"function"==typeof e.assignment?t=e.assignment(n,r):Object.keys(e.assignment).forEach((function(i){t[i]="function"==typeof e.assignment[i]?e.assignment[i](n,r):e.assignment[i]})),n=t,!1}return!0})),n,i]}function B(e,t){void 0===t&&(t={});var r=D(j(k(e.states[e.initial].entry).map((function(e){return P(e,t.actions)})),e.context,R),2),n=r[0],i=r[1],o={config:e,_options:t,initialState:{value:e.initial,actions:n,context:i,matches:F(e.initial)},transition:function(t,r){var n,i,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,l=a.context,c=L(r),u=e.states[s];if(u.on){var d=k(u.on[c.type]);try{for(var f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),p=f.next();!p.done;p=f.next()){var h=p.value;if(void 0===h)return O(s,l);var m="string"==typeof h?{target:h}:h,v=m.target,y=m.actions,g=void 0===y?[]:y,S=m.cond,b=void 0===S?function(){return!0}:S,x=void 0===v,w=null!=v?v:s,T=e.states[w];if(b(l,c)){var E=D(j((x?k(g):[].concat(u.exit,g,T.entry).filter((function(e){return e}))).map((function(e){return P(e,o._options.actions)})),l,c),3),M=E[0],N=E[1],I=E[2],C=null!=v?v:s;return{value:C,context:N,actions:M,changed:v!==s||M.length>0||I,matches:F(C)}}}}catch(e){n={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}}return O(s,l)}};return o}var W=function(e,t){return e.actions.forEach((function(r){var n=r.exec;return n&&n(e.context,t)}))};function V(e){var t=e.initialState,r=I.NotStarted,n=new Set,i={_machine:e,send:function(i){r===I.Running&&(t=e.transition(t,i),W(t,L(i)),n.forEach((function(e){return e(t)})))},subscribe:function(e){return n.add(e),e(t),{unsubscribe:function(){return n.delete(e)}}},start:function(n){if(n){var o="object"==typeof n?n:{context:e.config.context,value:n};t={value:o.value,actions:[],context:o.context,matches:F(o.value)}}return r=I.Running,W(t,R),i},stop:function(){return r=I.Stopped,n.clear(),i},get state(){return t},get status(){return r}};return i}function U(e,t){var i=t.getCastFn,o=t.applyEventsSynchronously,a=t.emitter;return V(B({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:_({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:_((function(e,t){var n=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(n=t.payload.timeOffset),r(r({},e),{timeOffset:n,baselineTime:e.events[0].timestamp+n})})),play:function(e){var t,r,s,l,c,u=e.timer,d=e.events,f=e.baselineTime,p=e.lastPlayedEvent;u.clear();try{for(var h=n(d),m=h.next();!m.done;m=h.next()){A(m.value,f)}}catch(e){t={error:e}}finally{try{m&&!m.done&&(r=h.return)&&r.call(h)}finally{if(t)throw t.error}}var v=function(e,t){for(var r=e.length-1;r>=0;r--){var n=e[r];if(n.type===b.Meta&&n.timestamp<=t)return e.slice(r)}return e}(d,f),y=null==p?void 0:p.timestamp;(null==p?void 0:p.type)===b.IncrementalSnapshot&&p.data.source===x.MouseMove&&(y=p.timestamp+(null===(c=p.data.positions[0])||void 0===c?void 0:c.timeOffset)),f<(y||0)&&a.emit(E.PlayBack);var g=new Array,S=new Array,w=function(e){if(y&&y<f&&(e.timestamp<=y||e===p))return"continue";if(e.timestamp<f)g.push(e);else{var t=i(e,!1);S.push({doAction:function(){t(),a.emit(E.EventCast,e)},delay:e.delay})}};try{for(var T=n(v),M=T.next();!M.done;M=T.next()){w(M.value)}}catch(e){s={error:e}}finally{try{M&&!M.done&&(l=T.return)&&l.call(T)}finally{if(s)throw s.error}}o(g),a.emit(E.Flush),u.addActions(S),u.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:_((function(e){return r(r({},e),{lastPlayedEvent:null})})),startLive:_({baselineTime:function(e,t){return e.timer.toggleLiveMode(!0),e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:_((function(e,t){var n=e.baselineTime,o=e.timer,s=e.events;if("ADD_EVENT"===t.type){var l=t.payload.event;A(l,n);var c=s.length-1;if(!s[c]||s[c].timestamp<=l.timestamp)s.push(l);else{for(var u=-1,d=0;d<=c;){var f=Math.floor((d+c)/2);s[f].timestamp<=l.timestamp?d=f+1:c=f-1}-1===u&&(u=d),s.splice(u,0,l)}var p=l.timestamp<n,h=i(l,p);p?h():o.isActive()&&o.addAction({doAction:function(){h(),a.emit(E.EventCast,l)},delay:l.delay})}return r(r({},e),{events:s})}))}}))}var z="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.",Y={map:{},getId:function(){return console.error(z),-1},getNode:function(){return console.error(z),null},removeNodeFromMap:function(){console.error(z)},has:function(){return console.error(z),!1},reset:function(){console.error(z)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Y=new Proxy(Y,{get:function(e,t,r){return"map"===t&&console.error(z),Reflect.get(e,t,r)}}));var X=function(){function e(){this.reset()}return e.prototype.add=function(e){var t=this.indexes.get(e.parentId),r={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(r.parent=t,t.children[r.id]=r):this.tree[r.id]=r,this.indexes.set(r.id,r)},e.prototype.remove=function(e,t){var r=this,n=this.indexes.get(e.parentId),i=this.indexes.get(e.id),o=function(e){r.removeIdSet.add(e);var n=t.getNode(e);null==n||n.childNodes.forEach((function(e){"__sn"in e&&o(e.__sn.id)}))},a=function(t){r.removeIdSet.add(t.id),Object.values(t.children).forEach((function(e){return a(e)}));var n=r.indexes.get(t.id);if(n){var i=n.parent;i&&(delete n.parent,delete i.children[n.id],r.indexes.delete(e.id))}};i?n?(delete i.parent,delete n.children[i.id],this.indexes.delete(e.id),a(i)):(delete this.tree[i.id],this.indexes.delete(i.id),a(i)):(this.removeNodeMutations.push(e),o(e.id))},e.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},e.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},e.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},e.prototype.input=function(e){this.inputMap.set(e.id,e)},e.prototype.flush=function(){var e,t,r,i,o=this,a=this,s=a.tree,l=a.removeNodeMutations,c=a.textMutations,u=a.attributeMutations,d={source:x.Mutation,removes:l,texts:c,attributes:u,adds:[]},f=function(e,t){t&&o.removeIdSet.add(e.id),d.texts=d.texts.concat(t?[]:e.texts).filter((function(e){return!o.removeIdSet.has(e.id)})),d.attributes=d.attributes.concat(t?[]:e.attributes).filter((function(e){return!o.removeIdSet.has(e.id)})),o.removeIdSet.has(e.id)||o.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return f(e,!0)})):(d.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return f(e,!1)})))};Object.values(s).forEach((function(e){return f(e,!1)}));try{for(var p=n(this.scrollMap.keys()),h=p.next();!h.done;h=p.next()){var m=h.value;this.removeIdSet.has(m)&&this.scrollMap.delete(m)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(t=p.return)&&t.call(p)}finally{if(e)throw e.error}}try{for(var v=n(this.inputMap.keys()),y=v.next();!y.done;y=v.next()){m=y.value;this.removeIdSet.has(m)&&this.inputMap.delete(m)}}catch(e){r={error:e}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}var g=new Map(this.scrollMap),S=new Map(this.inputMap);return this.reset(),{mutationData:d,scrollMap:g,inputMap:S}},e.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},e.prototype.idRemoved=function(e){return this.removeIdSet.has(e)},e}();function H(e){var t,r,i={},o=function(e,t){var r={value:e,parent:t,children:[]};return i[e.node.id]=r,r},a=[];try{for(var s=n(e),l=s.next();!l.done;l=s.next()){var c=l.value,u=c.nextId,d=c.parentId;if(u&&u in i){var f=i[u];if(f.parent){var p=f.parent.children.indexOf(f);f.parent.children.splice(p,0,o(c,f.parent))}else{p=a.indexOf(f);a.splice(p,0,o(c,null))}}else if(d in i){var h=i[d];h.children.push(o(c,h))}else a.push(o(c,null))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return a}function Q(e,t){t(e.value);for(var r=e.children.length-1;r>=0;r--)Q(e.children[r],t)}function G(e){return"__sn"in e&&(e.__sn.type===t.Element&&"iframe"===e.__sn.tagName)}function q(e,t){var r,n,i=null===(n=null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView)||void 0===n?void 0:n.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};var o=i.getBoundingClientRect(),a=q(i,t),s=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:s,absoluteScale:a.absoluteScale*s}}function $(e){var t;return Boolean(null===(t=e)||void 0===t?void 0:t.shadowRoot)}var J;function K(e,t){var r=e[t[0]];return 1===t.length?r:K(r.cssRules[t[1]].cssRules,t.slice(2))}function Z(e){var t=o(e),r=t.pop();return{positions:t,index:r}}function ee(e,t){var r=t.sheet;r&&e.forEach((function(e){if(e.type===J.Insert)try{if(Array.isArray(e.index)){var n=Z(e.index),o=n.positions,a=n.index;K(r.cssRules,o).insertRule(e.cssText,a)}else r.insertRule(e.cssText,e.index)}catch(e){}else if(e.type===J.Remove)try{if(Array.isArray(e.index)){var s=Z(e.index);o=s.positions,a=s.index;K(r.cssRules,o).deleteRule(a||0)}else r.deleteRule(e.index)}catch(e){}else if(e.type===J.Snapshot)!function(e,t){var r;try{var n=Array.from((null===(r=t.sheet)||void 0===r?void 0:r.cssRules)||[]).map((function(e){return e.cssText})),o=Object.entries(n).reverse(),a=n.length;o.forEach((function(r){var n,o=i(r,2),s=o[0],l=o[1],c=e.indexOf(l);if(-1===c||c>a)try{null===(n=t.sheet)||void 0===n||n.deleteRule(Number(s))}catch(e){}a=c})),e.forEach((function(e,r){var n,i,o;try{(null===(i=null===(n=t.sheet)||void 0===n?void 0:n.cssRules[r])||void 0===i?void 0:i.cssText)!==e&&(null===(o=t.sheet)||void 0===o||o.insertRule(e,r))}catch(e){}}))}catch(e){}}(e.cssTexts,t);else if(e.type===J.SetProperty){K(r.cssRules,e.index).style.setProperty(e.property,e.value,e.priority)}else if(e.type===J.RemoveProperty){K(r.cssRules,e.index).style.removeProperty(e.property)}}))}!function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot",e[e.SetProperty=3]="SetProperty",e[e.RemoveProperty=4]="RemoveProperty"}(J||(J={}));var te=S||M,re="[replayer]",ne={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function ie(e){return e.type==b.IncrementalSnapshot&&(e.data.source==x.TouchMove||e.data.source==x.MouseInteraction&&e.data.type==w.TouchStart)}var oe=function(){function e(e,t){var r=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=te(),this.legacy_missingNodeRetryMap={},this.cache=m(),this.imageMap=new Map,this.mirror={map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,r=e.__sn&&e.__sn.id;delete this.map[r],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}},this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,!(null==t?void 0:t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");var i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:ne};this.config=Object.assign({},i,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(E.Resize,this.handleResize),this.setupDom(),this.treeIndex=new X,this.fragmentParentMap=new Map,this.elementStateMap=new Map,this.virtualStyleRulesMap=new Map,this.emitter.on(E.Flush,(function(){var e,t,i,o,a,s,l=r.treeIndex.flush(),c=l.scrollMap,u=l.inputMap;r.fragmentParentMap.forEach((function(e,t){return r.restoreRealParent(t,e)}));try{for(var d=n(r.virtualStyleRulesMap.keys()),f=d.next();!f.done;f=d.next()){var p=f.value;r.restoreNodeSheet(p)}}catch(t){e={error:t}}finally{try{f&&!f.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}r.fragmentParentMap.clear(),r.elementStateMap.clear(),r.virtualStyleRulesMap.clear();try{for(var h=n(c.values()),m=h.next();!m.done;m=h.next()){var v=m.value;r.applyScroll(v)}}catch(e){i={error:e}}finally{try{m&&!m.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}try{for(var y=n(u.values()),g=y.next();!g.done;g=y.next()){v=g.value;r.applyInput(v)}}catch(e){a={error:e}}finally{try{g&&!g.done&&(s=y.return)&&s.call(y)}finally{if(a)throw a.error}}})),this.emitter.on(E.PlayBack,(function(){r.firstFullSnapshot=null,r.mirror.reset()}));var o=new C([],(null==t?void 0:t.speed)||i.speed);this.service=U({events:e.map((function(e){return t&&t.unpackFn?t.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:o,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){r.emitter.emit(E.StateChange,{player:e})})),this.speedService=V(B({id:"speed",context:{normalSpeed:-1,timer:o},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:_({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(e){r.emitter.emit(E.StateChange,{speed:e})}));var a=this.service.state.context.events.find((function(e){return e.type===b.Meta})),s=this.service.state.context.events.find((function(e){return e.type===b.FullSnapshot}));if(a){var l=a.data,c=l.width,u=l.height;setTimeout((function(){r.emitter.emit(E.Resize,{width:c,height:u})}),0)}s&&setTimeout((function(){r.firstFullSnapshot||(r.firstFullSnapshot=s,r.rebuildFullSnapshot(s),r.iframe.contentWindow.scrollTo(s.data.initialOffset))}),1),this.service.state.context.events.find(ie)&&this.mouse.classList.add("touch-device")}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){return this.emitter.on(e,t),this},e.prototype.off=function(e,t){return this.emitter.off(e,t),this},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(r){t.config[r]=e[r]})),this.config.skipInactive||this.backToNormal(),void 0!==e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),void 0!==e.mouseTail&&(!1===e.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))},e.prototype.getMetaData=function(){var e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},e.prototype.getMirror=function(){return this.mirror},e.prototype.play=function(e){var t;void 0===e&&(e=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}}),null===(t=this.iframe.contentDocument)||void 0===t||t.getElementsByTagName("html")[0].classList.remove("rrweb-paused"),this.emitter.emit(E.Start)},e.prototype.pause=function(e){var t;void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),null===(t=this.iframe.contentDocument)||void 0===t||t.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(E.Pause)},e.prototype.resume=function(e){void 0===e&&(e=0),console.warn("The 'resume' will be departed in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(E.Resume)},e.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},e.prototype.addEvent=function(e){var t=this,r=this.config.unpackFn?this.config.unpackFn(e):e;ie(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:r}})}))},e.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},e.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},e.prototype.resetCache=function(){this.cache=m()},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var e,t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(N(this.iframe.contentWindow,this.iframe.contentDocument),void 0===(e=this.iframe.contentWindow)&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1}))},e.prototype.handleResize=function(e){var t,r;this.iframe.style.display="inherit";try{for(var i=n([this.mouseTail,this.iframe]),o=i.next();!o.done;o=i.next()){var a=o.value;a&&(a.setAttribute("width",String(e.width)),a.setAttribute("height",String(e.height)))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}},e.prototype.applyEventsSynchronously=function(e){var t,r;try{for(var i=n(e),o=i.next();!o.done;o=i.next()){var a=o.value;switch(a.type){case b.DomContentLoaded:case b.Load:case b.Custom:continue;case b.FullSnapshot:case b.Meta:case b.Plugin:break;case b.IncrementalSnapshot:switch(a.data.source){case x.MediaInteraction:continue}}this.getCastFn(a,!0)()}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}this.mousePos&&this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null,!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null},e.prototype.getCastFn=function(e,t){var r,i=this;switch(void 0===t&&(t=!1),e.type){case b.DomContentLoaded:case b.Load:break;case b.Custom:r=function(){i.emitter.emit(E.CustomEvent,e)};break;case b.Meta:r=function(){return i.emitter.emit(E.Resize,{width:e.data.width,height:e.data.height})};break;case b.FullSnapshot:r=function(){if(i.firstFullSnapshot){if(i.firstFullSnapshot===e)return void(i.firstFullSnapshot=!0)}else i.firstFullSnapshot=!0;i.rebuildFullSnapshot(e,t),i.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case b.IncrementalSnapshot:r=function(){var r,o;if(i.applyIncremental(e,t),!t&&(e===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.backToNormal()),i.config.skipInactive&&!i.nextUserInteractionEvent)){try{for(var a=n(i.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(!(l.timestamp<=e.timestamp)&&i.isUserInteraction(l)){l.delay-e.delay>1e4*i.speedService.state.context.timer.speed&&(i.nextUserInteractionEvent=l);break}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}if(i.nextUserInteractionEvent){var c=i.nextUserInteractionEvent.delay-e.delay,u={speed:Math.min(Math.round(c/5e3),i.config.maxSpeed)};i.speedService.send({type:"FAST_FORWARD",payload:u}),i.emitter.emit(E.SkipStart,u)}}}}return function(){var o,a;r&&r();try{for(var s=n(i.config.plugins||[]),l=s.next();!l.done;l=s.next()){l.value.handler(e,t,{replayer:i})}}catch(e){o={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}i.service.send({type:"CAST_EVENT",payload:{event:e}});var c=i.service.state.context.events.length-1;if(e===i.service.state.context.events[c]){var u=function(){c<i.service.state.context.events.length-1||(i.backToNormal(),i.service.send("END"),i.emitter.emit(E.Finish))};e.type===b.IncrementalSnapshot&&e.data.source===x.MouseMove&&e.data.positions.length?setTimeout((function(){u()}),Math.max(0,50-e.data.positions[0].timeOffset)):u()}}},e.prototype.rebuildFullSnapshot=function(e,t){var r,i,o=this;if(void 0===t&&(t=!1),!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};var a=[];this.mirror.map=g(e.data.node,{doc:this.iframe.contentDocument,afterAppend:function(e){o.collectIframeAndAttachDocument(a,e)},cache:this.cache})[1];var s=function(e,t){if(l.attachDocumentToIframe(e,t),l.newDocumentQueue=l.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var r=t.contentDocument,n=r.documentElement,i=r.head;l.insertStyleRules(n,i)}},l=this;try{for(var c=n(a),u=c.next();!u.done;u=c.next()){var d=u.value;s(d.mutationInQueue,d.builtNode)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}var f=this.iframe.contentDocument,p=f.documentElement,h=f.head;this.insertStyleRules(p,h),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(E.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()},e.prototype.insertStyleRules=function(e,t){var r=document.createElement("style");e.insertBefore(r,t);var n,i=(n=this.config.blockClass,["."+n+" { background: currentColor }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules);this.config.pauseAnimation&&i.push("html.rrweb-paused * { animation-play-state: paused !important; }");for(var o=0;o<i.length;o++)r.sheet.insertRule(i[o],o)},e.prototype.attachDocumentToIframe=function(e,t){var r,i,o=this,a=[];if(!t.contentDocument)for(var s=t.parentNode;s;){if(this.fragmentParentMap.has(s)){var l=s,c=this.fragmentParentMap.get(l);this.restoreRealParent(l,c);break}s=s.parentNode}y(e.node,{doc:t.contentDocument,map:this.mirror.map,hackCss:!0,skipChild:!1,afterAppend:function(e){o.collectIframeAndAttachDocument(a,e)},cache:this.cache});var u=function(e,t){if(d.attachDocumentToIframe(e,t),d.newDocumentQueue=d.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var r=t.contentDocument,n=r.documentElement,i=r.head;d.insertStyleRules(n,i)}},d=this;try{for(var f=n(a),p=f.next();!p.done;p=f.next()){var h=p.value;u(h.mutationInQueue,h.builtNode)}}catch(e){r={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}},e.prototype.collectIframeAndAttachDocument=function(e,t){if(G(t)){var r=this.newDocumentQueue.find((function(e){return e.parentId===t.__sn.id}));r&&e.push({mutationInQueue:r,builtNode:t})}},e.prototype.waitForStylesheetLoad=function(){var e,t=this,r=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(r){var n,i=new Set,o=this.service.state,a=function(){o=t.service.state};this.emitter.on(E.Start,a),this.emitter.on(E.Pause,a);var s=function(){t.emitter.off(E.Start,a),t.emitter.off(E.Pause,a)};r.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(i.add(e),e.addEventListener("load",(function(){i.delete(e),0===i.size&&-1!==n&&(o.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(E.LoadStylesheetEnd),n&&clearTimeout(n),s())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(E.LoadStylesheetStart),n=setTimeout((function(){o.matches("playing")&&t.play(t.getCurrentTime()),n=-1,s()}),this.config.loadTimeout))}},e.prototype.preloadAllImages=function(){var e,t,r=this;this.service.state;var i=function(){r.service.state};this.emitter.on(E.Start,i),this.emitter.on(E.Pause,i);try{for(var o=n(this.service.state.context.events),a=o.next();!a.done;a=o.next()){var s=a.value;if(s.type===b.IncrementalSnapshot&&s.data.source===x.CanvasMutation&&"drawImage"===s.data.property&&"string"==typeof s.data.args[0]&&!this.imageMap.has(s)){var l=document.createElement("canvas"),c=l.getContext("2d"),u=null==c?void 0:c.createImageData(l.width,l.height);null==u||u.data;JSON.parse(s.data.args[0]),null==c||c.putImageData(u,0,0)}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}},e.prototype.applyIncremental=function(e,t){var n,i,o=this,a=e.data;switch(a.source){case x.Mutation:t&&(a.adds.forEach((function(e){return o.treeIndex.add(e)})),a.texts.forEach((function(e){return o.treeIndex.text(e)})),a.attributes.forEach((function(e){return o.treeIndex.attribute(e)})),a.removes.forEach((function(e){return o.treeIndex.remove(e,o.mirror)})));try{this.applyMutation(a,t)}catch(e){this.warn("Exception in mutation "+(e.message||e),a)}break;case x.Drag:case x.TouchMove:case x.MouseMove:if(t){var s=a.positions[a.positions.length-1];this.mousePos={x:s.x,y:s.y,id:s.id,debugData:a}}else a.positions.forEach((function(r){var n={doAction:function(){o.moveAndHover(r.x,r.y,r.id,t,a)},delay:r.timeOffset+e.timestamp-o.service.state.context.baselineTime};o.timer.addAction(n)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(n=a.positions[0])||void 0===n?void 0:n.timeOffset)});break;case x.MouseInteraction:if(-1===a.id)break;var l=new Event(w[a.type].toLowerCase());if(!(S=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);this.emitter.emit(E.MouseInteraction,{type:a.type,target:S});var c=this.config.triggerFocus;switch(a.type){case w.Blur:"blur"in S&&S.blur();break;case w.Focus:c&&S.focus&&S.focus({preventScroll:!0});break;case w.Click:case w.TouchStart:case w.TouchEnd:t?(a.type===w.TouchStart?this.touchActive=!0:a.type===w.TouchEnd&&(this.touchActive=!1),this.mousePos={x:a.x,y:a.y,id:a.id,debugData:a}):(a.type===w.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x,a.y,a.id,t,a),a.type===w.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===w.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===w.TouchEnd&&this.mouse.classList.remove("touch-active"));break;case w.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:S.dispatchEvent(l)}break;case x.Scroll:if(-1===a.id)break;if(t){this.treeIndex.scroll(a);break}this.applyScroll(a);break;case x.ViewportResize:this.emitter.emit(E.Resize,{width:a.width,height:a.height});break;case x.Input:if(-1===a.id)break;if(t){this.treeIndex.input(a);break}this.applyInput(a);break;case x.MediaInteraction:if(!(S=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);var u=S;try{a.currentTime&&(u.currentTime=a.currentTime),1===a.type&&u.pause(),0===a.type&&u.play()}catch(e){this.config.showWarning&&console.warn("Failed to replay media interactions: "+(e.message||e))}break;case x.StyleSheetRule:if(!(S=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);var d,f=S,p=S.parentNode,h=this.fragmentParentMap.has(p),m=h?null:f.sheet;m||(this.virtualStyleRulesMap.has(S)?d=this.virtualStyleRulesMap.get(S):(d=[],this.virtualStyleRulesMap.set(S,d))),a.adds&&a.adds.forEach((function(e){var t=e.rule,r=e.index;if(m)try{if(Array.isArray(r)){var n=Z(r),i=n.positions,o=n.index;K(m.cssRules,i).insertRule(t,o)}else{o=void 0===r?void 0:Math.min(r,m.cssRules.length);m.insertRule(t,o)}}catch(e){}else null==d||d.push({cssText:t,index:r,type:J.Insert})})),a.removes&&a.removes.forEach((function(e){var t=e.index;if(h)null==d||d.push({index:t,type:J.Remove});else try{if(Array.isArray(t)){var r=Z(t),n=r.positions,i=r.index;K(m.cssRules,n).deleteRule(i||0)}else null==m||m.deleteRule(t)}catch(e){}}));break;case x.StyleDeclaration:if(!(S=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);f=S;var v=S.parentNode,y=this.fragmentParentMap.has(v)?null:f.sheet,g=[];if(y||(this.virtualStyleRulesMap.has(S)?g=this.virtualStyleRulesMap.get(S):(g=[],this.virtualStyleRulesMap.set(S,g))),a.set)if(y)K(y.rules,a.index).style.setProperty(a.set.property,a.set.value,a.set.priority);else g.push(r({type:J.SetProperty,index:a.index},a.set));if(a.remove)if(y)K(y.rules,a.index).style.removeProperty(a.remove.property);else g.push(r({type:J.RemoveProperty,index:a.index},a.remove));break;case x.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var S;if(!(S=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);try{var b=S.getContext("2d");if(a.setter)return void(b[a.property]=a.args[0]);var T=b[a.property];if("drawImage"===a.property&&"string"==typeof a.args[0]){var M=this.imageMap.get(e);a.args[0]=M,T.apply(b,a.args)}else T.apply(b,a.args)}catch(e){this.warnCanvasMutationFailed(a,a.id,e)}break;case x.Font:try{var N=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);null===(i=this.iframe.contentDocument)||void 0===i||i.fonts.add(N)}catch(e){this.config.showWarning&&console.warn(e)}}},e.prototype.applyMutation=function(e,i){var o,a,s=this;e.removes.forEach((function(t){var r=s.mirror.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.parentId})))return;return s.warnNodeNotFound(e,t.id)}s.virtualStyleRulesMap.has(r)&&s.virtualStyleRulesMap.delete(r);var n=s.mirror.getNode(t.parentId);if(!n)return s.warnNodeNotFound(e,t.parentId);if(t.isShadow&&$(n)&&(n=n.shadowRoot),s.mirror.removeNodeFromMap(r),n){var i=null,o="__sn"in n?s.fragmentParentMap.get(n):void 0;o&&o.contains(r)?n=o:s.fragmentParentMap.has(r)&&(i=s.fragmentParentMap.get(r),s.fragmentParentMap.delete(r),r=i);try{n.removeChild(r)}catch(t){if(!(t instanceof DOMException))throw t;s.warn("parent could not remove child in mutation",n,o,r,i,e)}}}));var l=r({},this.legacy_missingNodeRetryMap),c=[],u=function(e){var r,n;if(!s.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var o=s.mirror.getNode(e.parentId);if(!o)return e.node.type===t.Document?s.newDocumentQueue.push(e):c.push(e);var a=null;s.iframe.contentDocument.contains?a=s.iframe.contentDocument.contains(o):s.iframe.contentDocument.body.contains&&(a=s.iframe.contentDocument.body.contains(o));var u=(null===(n=(r=o).getElementsByTagName)||void 0===n?void 0:n.call(r,"iframe").length)>0;if(i&&a&&!G(o)&&!u){var d=document.createDocumentFragment();for(s.mirror.map[e.parentId]=d,s.fragmentParentMap.set(d,o),s.storeState(o);o.firstChild;)d.appendChild(o.firstChild);o=d}e.node.isShadow&&$(o)&&(o=o.shadowRoot);var f=null,p=null;if(e.previousId&&(f=s.mirror.getNode(e.previousId)),e.nextId&&(p=s.mirror.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=s.mirror.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return c.push(e);if(!e.node.rootId||s.mirror.getNode(e.node.rootId)){var h=e.node.rootId?s.mirror.getNode(e.node.rootId):s.iframe.contentDocument;if(G(o))s.attachDocumentToIframe(e,o);else{var m=y(e.node,{doc:h,map:s.mirror.map,skipChild:!0,hackCss:!0,cache:s.cache});if(-1!==e.previousId&&-1!==e.nextId){if(f&&f.nextSibling&&f.nextSibling.parentNode)o.insertBefore(m,f.nextSibling);else if(p&&p.parentNode)o.contains(p)?o.insertBefore(m,p):o.insertBefore(m,null);else{if(o===h)for(;h.firstChild;)h.removeChild(h.firstChild);o.appendChild(m)}if(G(m)){var v=s.newDocumentQueue.find((function(e){return e.parentId===m.__sn.id}));if(v&&(s.attachDocumentToIframe(v,m),s.newDocumentQueue=s.newDocumentQueue.filter((function(e){return e!==v}))),m.contentDocument){var g=m.contentDocument,S=g.documentElement,b=g.head;s.insertStyleRules(S,b)}}(e.previousId||e.nextId)&&s.legacy_resolveMissingNode(l,o,m,e)}else l[e.node.id]={node:m,mutation:e}}}};e.adds.forEach((function(e){u(e)}));for(var d=Date.now();c.length;){var f=H(c);if(c.length=0,Date.now()-d>500){this.warn("Timeout in the loop, please check the resolve tree data:",f);break}try{for(var p=(o=void 0,n(f)),h=p.next();!h.done;h=p.next()){var m=h.value;this.mirror.getNode(m.value.parentId)?Q(m,(function(e){u(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",m)}}catch(e){o={error:e}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(o)throw o.error}}}Object.keys(l).length&&Object.assign(this.legacy_missingNodeRetryMap,l),e.texts.forEach((function(t){var r=s.mirror.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.id})))return;return s.warnNodeNotFound(e,t.id)}s.fragmentParentMap.has(r)&&(r=s.fragmentParentMap.get(r)),r.textContent=t.value})),e.attributes.forEach((function(t){var r=s.mirror.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.id})))return;return s.warnNodeNotFound(e,t.id)}for(var n in s.fragmentParentMap.has(r)&&(r=s.fragmentParentMap.get(r)),t.attributes)if("string"==typeof n){var i=t.attributes[n];if(null===i)r.removeAttribute(n);else if("string"==typeof i)try{r.setAttribute(n,i)}catch(e){s.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",e)}else if("style"===n){var o=i,a=r;for(var l in o)if(!1===o[l])a.style.removeProperty(l);else if(o[l]instanceof Array){var c=o[l];a.style.setProperty(l,c[0],c[1])}else{var u=o[l];a.style.setProperty(l,u)}}}}))},e.prototype.applyScroll=function(e){var t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);if(t===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:e.y,left:e.x,behavior:"smooth"});else try{t.scrollTop=e.y,t.scrollLeft=e.x}catch(e){}},e.prototype.applyInput=function(e){var t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}},e.prototype.legacy_resolveMissingNode=function(e,t,r,n){var i=n.previousId,o=n.nextId,a=i&&e[i],s=o&&e[o];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,r),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}if(s){var d=s;c=d.node,u=d.mutation;t.insertBefore(c,r.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}},e.prototype.moveAndHover=function(e,t,r,n,i){var o=this.mirror.getNode(r);if(!o)return this.debugNodeNotFound(i,r);var a=q(o,this.iframe),s=e*a.absoluteScale+a.x,l=t*a.absoluteScale+a.y;this.mouse.style.left=s+"px",this.mouse.style.top=l+"px",n||this.drawMouseTail({x:s,y:l}),this.hoverElements(o)},e.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var r=!0===this.config.mouseTail?ne:Object.assign({},ne,this.config.mouseTail),n=r.lineCap,i=r.lineWidth,o=r.strokeStyle,a=r.duration,s=function(){if(t.mouseTail){var e=t.mouseTail.getContext("2d");e&&t.tailPositions.length&&(e.clearRect(0,0,t.mouseTail.width,t.mouseTail.height),e.beginPath(),e.lineWidth=i,e.lineCap=n,e.strokeStyle=o,e.moveTo(t.tailPositions[0].x,t.tailPositions[0].y),t.tailPositions.forEach((function(t){return e.lineTo(t.x,t.y)})),e.stroke())}};this.tailPositions.push(e),s(),setTimeout((function(){t.tailPositions=t.tailPositions.filter((function(t){return t!==e})),s()}),a/this.speedService.state.context.timer.speed)}},e.prototype.hoverElements=function(e){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")}));for(var r=e;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement},e.prototype.isUserInteraction=function(e){return e.type===b.IncrementalSnapshot&&(e.data.source>x.Mutation&&e.data.source<=x.Input)},e.prototype.backToNormal=function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(E.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},e.prototype.restoreRealParent=function(e,r){this.mirror.map[r.__sn.id]=r,r.__sn.type===t.Element&&"textarea"===r.__sn.tagName&&e.textContent&&(r.value=e.textContent),r.appendChild(e),this.restoreState(r)},e.prototype.storeState=function(e){var t,r;if(e&&e.nodeType===e.ELEMENT_NODE){var i=e;(i.scrollLeft||i.scrollTop)&&this.elementStateMap.set(e,{scroll:[i.scrollLeft,i.scrollTop]}),"STYLE"===i.tagName&&function(e,t){var r;try{var n=Array.from((null===(r=e.sheet)||void 0===r?void 0:r.cssRules)||[]).map((function(e){return e.cssText}));t.set(e,[{type:J.Snapshot,cssTexts:n}])}catch(e){}}(i,this.virtualStyleRulesMap);var o=i.children;try{for(var a=n(Array.from(o)),s=a.next();!s.done;s=a.next()){var l=s.value;this.storeState(l)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}}},e.prototype.restoreState=function(e){var t,r;if(e.nodeType===e.ELEMENT_NODE){var i=e;if(this.elementStateMap.has(e)){var o=this.elementStateMap.get(e);o.scroll&&(i.scrollLeft=o.scroll[0],i.scrollTop=o.scroll[1]),this.elementStateMap.delete(e)}var a=i.children;try{for(var s=n(Array.from(a)),l=s.next();!l.done;l=s.next()){var c=l.value;this.restoreState(c)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}}},e.prototype.restoreNodeSheet=function(e){var t=this.virtualStyleRulesMap.get(e);"STYLE"===e.nodeName&&(t&&ee(t,e))},e.prototype.warnNodeNotFound=function(e,t){this.treeIndex.idRemoved(t)?this.warn("Node with id '"+t+"' was previously removed. ",e):this.warn("Node with id '"+t+"' not found. ",e)},e.prototype.warnCanvasMutationFailed=function(e,t,r){this.warn("Has error on update canvas '"+t+"'",e,r)},e.prototype.debugNodeNotFound=function(e,t){this.treeIndex.idRemoved(t)?this.debug(re,"Node with id '"+t+"' was previously removed. ",e):this.debug(re,"Node with id '"+t+"' not found. ",e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showWarning&&console.warn.apply(console,o([re],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showDebug&&console.log.apply(console,o([re],e))},e}();return e.Replayer=oe,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
//# sourceMappingURL=rrweb-replay.min.js.map

@@ -60,5 +60,10 @@ var NodeType;

function getCssRuleString(rule) {
return isCSSImportRule(rule)
? getCssRulesString(rule.styleSheet) || ''
: rule.cssText;
var cssStringified = rule.cssText;
if (isCSSImportRule(rule)) {
try {
cssStringified = getCssRulesString(rule.styleSheet) || cssStringified;
}
catch (_a) { }
}
return cssStringified;
}

@@ -303,7 +308,17 @@ function isCSSImportRule(rule) {

case n.DOCUMENT_NODE:
return {
type: NodeType.Document,
childNodes: [],
rootId: rootId,
};
if (n.compatMode !== 'CSS1Compat') {
return {
type: NodeType.Document,
childNodes: [],
compatMode: n.compatMode,
rootId: rootId
};
}
else {
return {
type: NodeType.Document,
childNodes: [],
rootId: rootId
};
}
case n.DOCUMENT_TYPE_NODE:

@@ -315,3 +330,3 @@ return {

systemId: n.systemId,
rootId: rootId,
rootId: rootId
};

@@ -321,6 +336,6 @@ case n.ELEMENT_NODE:

var tagName = getValidTagName(n);
var attributes_1 = {};
var attributes = {};
for (var _i = 0, _b = Array.from(n.attributes); _i < _b.length; _i++) {
var _c = _b[_i], name = _c.name, value = _c.value;
attributes_1[name] = transformAttribute(doc, tagName, name, value);
var _c = _b[_i], name_1 = _c.name, value = _c.value;
attributes[name_1] = transformAttribute(doc, tagName, name_1, value);
}

@@ -333,5 +348,5 @@ if (tagName === 'link' && inlineStylesheet) {

if (cssText) {
delete attributes_1.rel;
delete attributes_1.href;
attributes_1._cssText = absoluteToStylesheet(cssText, stylesheet.href);
delete attributes.rel;
delete attributes.href;
attributes._cssText = absoluteToStylesheet(cssText, stylesheet.href);
}

@@ -346,3 +361,3 @@ }

if (cssText) {
attributes_1._cssText = absoluteToStylesheet(cssText, getHref());
attributes._cssText = absoluteToStylesheet(cssText, getHref());
}

@@ -354,17 +369,17 @@ }

var value = n.value;
if (attributes_1.type !== 'radio' &&
attributes_1.type !== 'checkbox' &&
attributes_1.type !== 'submit' &&
attributes_1.type !== 'button' &&
if (attributes.type !== 'radio' &&
attributes.type !== 'checkbox' &&
attributes.type !== 'submit' &&
attributes.type !== 'button' &&
value) {
attributes_1.value = maskInputValue({
type: attributes_1.type,
attributes.value = maskInputValue({
type: attributes.type,
tagName: tagName,
value: value,
maskInputOptions: maskInputOptions,
maskInputFn: maskInputFn,
maskInputFn: maskInputFn
});
}
else if (n.checked) {
attributes_1.checked = n.checked;
attributes.checked = n.checked;
}

@@ -374,33 +389,33 @@ }

if (n.selected) {
attributes_1.selected = true;
attributes.selected = true;
}
else {
delete attributes_1.selected;
delete attributes.selected;
}
}
if (tagName === 'canvas' && recordCanvas) {
attributes_1.rr_dataURL = n.toDataURL();
attributes.rr_dataURL = n.toDataURL();
}
if (tagName === 'audio' || tagName === 'video') {
attributes_1.rr_mediaState = n.paused
attributes.rr_mediaState = n.paused
? 'paused'
: 'played';
attributes_1.rr_mediaCurrentTime = n.currentTime;
attributes.rr_mediaCurrentTime = n.currentTime;
}
if (n.scrollLeft) {
attributes_1.rr_scrollLeft = n.scrollLeft;
attributes.rr_scrollLeft = n.scrollLeft;
}
if (n.scrollTop) {
attributes_1.rr_scrollTop = n.scrollTop;
attributes.rr_scrollTop = n.scrollTop;
}
if (needBlock) {
var _d = n.getBoundingClientRect(), width = _d.width, height = _d.height;
attributes_1 = {
class: attributes_1.class,
attributes = {
"class": attributes["class"],
rr_width: width + "px",
rr_height: height + "px",
rr_height: height + "px"
};
}
if (tagName === 'iframe' && !keepIframeSrcFn(attributes_1.src)) {
delete attributes_1.src;
if (tagName === 'iframe' && !keepIframeSrcFn(attributes.src)) {
delete attributes.src;
}

@@ -410,7 +425,7 @@ return {

tagName: tagName,
attributes: attributes_1,
attributes: attributes,
childNodes: [],
isSVG: isSVGElement(n) || undefined,
needBlock: needBlock,
rootId: rootId,
rootId: rootId
};

@@ -440,3 +455,3 @@ case n.TEXT_NODE:

isStyle: isStyle,
rootId: rootId,
rootId: rootId
};

@@ -447,3 +462,3 @@ case n.CDATA_SECTION_NODE:

textContent: '',
rootId: rootId,
rootId: rootId
};

@@ -454,3 +469,3 @@ case n.COMMENT_NODE:

textContent: n.textContent || '',
rootId: rootId,
rootId: rootId
};

@@ -554,3 +569,3 @@ default:

recordCanvas: recordCanvas,
keepIframeSrcFn: keepIframeSrcFn,
keepIframeSrcFn: keepIframeSrcFn
});

@@ -615,3 +630,3 @@ if (!_serializedNode) {

iframeLoadTimeout: iframeLoadTimeout,
keepIframeSrcFn: keepIframeSrcFn,
keepIframeSrcFn: keepIframeSrcFn
};

@@ -663,3 +678,3 @@ for (var _i = 0, _h = Array.from(n.childNodes); _i < _h.length; _i++) {

iframeLoadTimeout: iframeLoadTimeout,
keepIframeSrcFn: keepIframeSrcFn,
keepIframeSrcFn: keepIframeSrcFn
});

@@ -694,7 +709,7 @@ if (serializedIframeNode) {

select: true,
password: true,
password: true
}
: maskAllInputs === false
? {
password: true,
password: true
}

@@ -714,3 +729,3 @@ : maskAllInputs;

headMetaAuthorship: true,
headMetaVerification: true,
headMetaVerification: true
}

@@ -739,3 +754,3 @@ : slimDOM === false

iframeLoadTimeout: iframeLoadTimeout,
keepIframeSrcFn: keepIframeSrcFn,
keepIframeSrcFn: keepIframeSrcFn
}),

@@ -798,4 +813,4 @@ idNodeMap,

rules: rulesList,
parsingErrors: errorsList,
},
parsingErrors: errorsList
}
};

@@ -867,3 +882,3 @@ }

type: 'comment',
comment: str,
comment: str
});

@@ -900,3 +915,3 @@ }

property: prop.replace(commentre, ''),
value: val ? trim(val[0]).replace(commentre, '') : '',
value: val ? trim(val[0]).replace(commentre, '') : ''
});

@@ -939,3 +954,3 @@ match(/^[;\s]*/);

values: vals,
declarations: declarations(),
declarations: declarations()
});

@@ -971,3 +986,3 @@ }

vendor: vendor,
keyframes: frames,
keyframes: frames
});

@@ -992,3 +1007,3 @@ }

supports: supports,
rules: style,
rules: style
});

@@ -1011,3 +1026,3 @@ }

type: 'host',
rules: style,
rules: style
});

@@ -1032,3 +1047,3 @@ }

media: media,
rules: style,
rules: style
});

@@ -1045,3 +1060,3 @@ }

name: trim(m[1]),
media: trim(m[2]),
media: trim(m[2])
});

@@ -1071,3 +1086,3 @@ }

selectors: sel,
declarations: decls,
declarations: decls
});

@@ -1094,3 +1109,3 @@ }

vendor: vendor,
rules: style,
rules: style
});

@@ -1118,3 +1133,3 @@ }

type: 'font-face',
declarations: decls,
declarations: decls
});

@@ -1164,3 +1179,3 @@ }

selectors: sel,
declarations: declarations(),
declarations: declarations()
});

@@ -1193,3 +1208,3 @@ }

enumerable: false,
value: parent || null,
value: parent || null
});

@@ -1237,3 +1252,3 @@ }

lineargradient: 'linearGradient',
radialgradient: 'radialGradient',
radialgradient: 'radialGradient'
};

@@ -1257,3 +1272,3 @@ function getTagName(n) {

var ast = parse(cssText, {
silent: true,
silent: true
});

@@ -1293,3 +1308,3 @@ if (!ast.stylesheet) {

return {
stylesWithHoverClass: stylesWithHoverClass,
stylesWithHoverClass: stylesWithHoverClass
};

@@ -1313,8 +1328,8 @@ }

}
var _loop_1 = function (name) {
if (!n.attributes.hasOwnProperty(name)) {
var _loop_1 = function (name_1) {
if (!n.attributes.hasOwnProperty(name_1)) {
return "continue";
}
var value = n.attributes[name];
if (tagName === 'option' && name === 'selected' && value === false) {
var value = n.attributes[name_1];
if (tagName === 'option' && name_1 === 'selected' && value === false) {
return "continue";

@@ -1324,5 +1339,5 @@ }

typeof value === 'boolean' || typeof value === 'number' ? '' : value;
if (!name.startsWith('rr_')) {
var isTextarea = tagName === 'textarea' && name === 'value';
var isRemoteOrDynamicCss = tagName === 'style' && name === '_cssText';
if (!name_1.startsWith('rr_')) {
var isTextarea = tagName === 'textarea' && name_1 === 'value';
var isRemoteOrDynamicCss = tagName === 'style' && name_1 === '_cssText';
if (isRemoteOrDynamicCss && hackCss) {

@@ -1343,13 +1358,13 @@ value = addHoverClass(value, cache);

try {
if (n.isSVG && name === 'xlink:href') {
node_1.setAttributeNS('http://www.w3.org/1999/xlink', name, value);
if (n.isSVG && name_1 === 'xlink:href') {
node_1.setAttributeNS('http://www.w3.org/1999/xlink', name_1, value);
}
else if (name === 'onload' ||
name === 'onclick' ||
name.substring(0, 7) === 'onmouse') {
node_1.setAttribute('_' + name, value);
else if (name_1 === 'onload' ||
name_1 === 'onclick' ||
name_1.substring(0, 7) === 'onmouse') {
node_1.setAttribute('_' + name_1, value);
}
else if (tagName === 'meta' &&
n.attributes['http-equiv'] === 'Content-Security-Policy' &&
name === 'content') {
name_1 === 'content') {
node_1.setAttribute('csp-content', value);

@@ -1360,9 +1375,11 @@ return "continue";

n.attributes.rel === 'preload' &&
n.attributes.as === 'script') ;
n.attributes.as === 'script') {
}
else if (tagName === 'link' &&
n.attributes.rel === 'prefetch' &&
typeof n.attributes.href === 'string' &&
n.attributes.href.endsWith('.js')) ;
n.attributes.href.endsWith('.js')) {
}
else {
node_1.setAttribute(name, value);
node_1.setAttribute(name_1, value);
}

@@ -1374,3 +1391,3 @@ }

else {
if (tagName === 'canvas' && name === 'rr_dataURL') {
if (tagName === 'canvas' && name_1 === 'rr_dataURL') {
var image_1 = document.createElement('img');

@@ -1385,18 +1402,17 @@ image_1.src = value;

}
if (name === 'rr_width') {
if (name_1 === 'rr_width') {
node_1.style.width = value;
}
if (name === 'rr_height') {
if (name_1 === 'rr_height') {
node_1.style.height = value;
}
if (name === 'rr_mediaCurrentTime') {
if (name_1 === 'rr_mediaCurrentTime') {
node_1.currentTime = n.attributes
.rr_mediaCurrentTime;
}
if (name === 'rr_mediaState') {
if (name_1 === 'rr_mediaState') {
switch (value) {
case 'played':
node_1
.play()
.catch(function (e) { return console.warn('media playback error', e); });
.play()["catch"](function (e) { return console.warn('media playback error', e); });
break;

@@ -1410,4 +1426,4 @@ case 'paused':

};
for (var name in n.attributes) {
_loop_1(name);
for (var name_1 in n.attributes) {
_loop_1(name_1);
}

@@ -1449,2 +1465,13 @@ if (n.isShadowHost) {

doc.open();
if (n.compatMode === 'BackCompat' &&
(n.childNodes && n.childNodes[0].type !== NodeType.DocumentType)) {
if (n.childNodes[0].type === NodeType.Element &&
'xmlns' in n.childNodes[0].attributes &&
n.childNodes[0].attributes.xmlns === 'http://www.w3.org/1999/xhtml') {
doc.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">');
}
else {
doc.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">');
}
}
node = doc;

@@ -1464,3 +1491,3 @@ }

afterAppend: afterAppend,
cache: cache,
cache: cache
});

@@ -1500,11 +1527,11 @@ if (!childNode) {

var el = node;
for (var name in n.attributes) {
if (!(n.attributes.hasOwnProperty(name) && name.startsWith('rr_'))) {
for (var name_2 in n.attributes) {
if (!(n.attributes.hasOwnProperty(name_2) && name_2.startsWith('rr_'))) {
continue;
}
var value = n.attributes[name];
if (name === 'rr_scrollLeft') {
var value = n.attributes[name_2];
if (name_2 === 'rr_scrollLeft') {
el.scrollLeft = value;
}
if (name === 'rr_scrollTop') {
if (name_2 === 'rr_scrollTop') {
el.scrollTop = value;

@@ -1523,3 +1550,3 @@ }

afterAppend: afterAppend,
cache: cache,
cache: cache
});

@@ -1526,0 +1553,0 @@ visit(idNodeMap, function (visitedNode) {

@@ -29,11 +29,18 @@ import { __values, __spread } from '../../../../../../ext/tslib/tslib.es6.js';

lengthThreshold: 1000,
logger: console,
logger: 'console',
};
function initLogObserver(cb, logOptions) {
function initLogObserver(cb, win, logOptions) {
var e_1, _a;
var _this = this;
var logger = logOptions.logger;
if (!logger) {
var loggerType = logOptions.logger;
if (!loggerType) {
return function () { };
}
var logger;
if (typeof loggerType === 'string') {
logger = win[loggerType];
}
else {
logger = loggerType;
}
var logCount = 0;

@@ -40,0 +47,0 @@ var cancelHandlers = [];

@@ -9,14 +9,14 @@ import { __values } from '../../../../../../ext/tslib/tslib.es6.js';

while (node.parentElement) {
var name = node.localName;
if (!name) {
var name_1 = node.localName;
if (!name_1) {
break;
}
name = name.toLowerCase();
var parent = node.parentElement;
name_1 = name_1.toLowerCase();
var parent_1 = node.parentElement;
var domSiblings = [];
if (parent.children && parent.children.length > 0) {
for (var i = 0; i < parent.children.length; i++) {
var sibling = parent.children[i];
if (parent_1.children && parent_1.children.length > 0) {
for (var i = 0; i < parent_1.children.length; i++) {
var sibling = parent_1.children[i];
if (sibling.localName && sibling.localName.toLowerCase) {
if (sibling.localName.toLowerCase() === name) {
if (sibling.localName.toLowerCase() === name_1) {
domSiblings.push(sibling);

@@ -28,6 +28,6 @@ }

if (domSiblings.length > 1) {
name += ':eq(' + domSiblings.indexOf(node) + ')';
name_1 += ':eq(' + domSiblings.indexOf(node) + ')';
}
path = name + (path ? '>' + path : '');
node = parent;
path = name_1 + (path ? '>' + path : '');
node = parent_1;
}

@@ -34,0 +34,0 @@ return path;

@@ -118,5 +118,2 @@ import { __values } from '../../../../ext/tslib/tslib.es6.js';

}
if (nextId === -1 && isBlocked(n.nextSibling, _this.blockClass)) {
nextId = null;
}
return nextId;

@@ -281,2 +278,3 @@ };

this.processMutation = function (m) {
var e_3, _a, e_4, _b;
if (isIgnored(m.target)) {

@@ -328,27 +326,45 @@ return;

}
if (item.attributes['style'] === undefined ||
item.attributes['style'] === null) {
item.attributes['style'] = {};
if (item.attributes.style === undefined ||
item.attributes.style === null) {
item.attributes.style = {};
}
var styleObj = item.attributes['style'];
for (var i = 0; i < target.style.length; i++) {
var pname = target.style[i];
var newValue = target.style.getPropertyValue(pname);
var newPriority = target.style.getPropertyPriority(pname);
if (newValue != old.style.getPropertyValue(pname) ||
newPriority != old.style.getPropertyPriority(pname)) {
if (newPriority == '') {
styleObj[pname] = newValue;
var styleObj = item.attributes.style;
try {
for (var _c = __values(Array.from(target.style)), _d = _c.next(); !_d.done; _d = _c.next()) {
var pname = _d.value;
var newValue = target.style.getPropertyValue(pname);
var newPriority = target.style.getPropertyPriority(pname);
if (newValue !== old.style.getPropertyValue(pname) ||
newPriority !== old.style.getPropertyPriority(pname)) {
if (newPriority === '') {
styleObj[pname] = newValue;
}
else {
styleObj[pname] = [newValue, newPriority];
}
}
else {
styleObj[pname] = [newValue, newPriority];
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
}
finally { if (e_3) throw e_3.error; }
}
try {
for (var _e = __values(Array.from(old.style)), _f = _e.next(); !_f.done; _f = _e.next()) {
var pname = _f.value;
if (target.style.getPropertyValue(pname) === '' ||
!target.style.getPropertyValue(pname)) {
styleObj[pname] = false;
}
}
}
for (var i = 0; i < old.style.length; i++) {
var pname = old.style[i];
if (target.style.getPropertyValue(pname) === '' ||
!target.style.getPropertyValue(pname)) {
styleObj[pname] = false;
catch (e_4_1) { e_4 = { error: e_4_1 }; }
finally {
try {
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
}
finally { if (e_4) throw e_4.error; }
}

@@ -368,5 +384,3 @@ }

: _this.mirror.getId(m.target);
if (isBlocked(n, _this.blockClass) ||
isBlocked(m.target, _this.blockClass) ||
isIgnored(n)) {
if (isBlocked(m.target, _this.blockClass) || isIgnored(n)) {
return;

@@ -398,5 +412,2 @@ }

this.genAdds = function (n, target) {
if (isBlocked(n, _this.blockClass)) {
return;
}
if (target && isBlocked(target, _this.blockClass)) {

@@ -422,3 +433,4 @@ return;

}
n.childNodes.forEach(function (childN) { return _this.genAdds(childN); });
if (!isBlocked(n, _this.blockClass))
n.childNodes.forEach(function (childN) { return _this.genAdds(childN); });
};

@@ -425,0 +437,0 @@ }

@@ -1,9 +0,12 @@

import { __values, __spread, __assign } from '../../../../ext/tslib/tslib.es6.js';
import { __read, __values, __spread, __assign } from '../../../../ext/tslib/tslib.es6.js';
import { maskInputValue } from '../../../rrweb-snapshot/es/rrweb-snapshot.js';
import { on, throttle, isTouchEvent, isBlocked, getWindowHeight, getWindowWidth, hookSetter, patch } from '../utils.js';
import { IncrementalSource, MouseInteractions, MediaInteractions } from '../types.js';
import { IncrementalSource, MouseInteractions } from '../types.js';
import MutationBuffer from './mutation.js';
var mutationBuffers = [];
var isCSSGroupingRuleSupported = typeof CSSGroupingRule !== "undefined";
var isCSSGroupingRuleSupported = typeof CSSGroupingRule !== 'undefined';
var isCSSMediaRuleSupported = typeof CSSMediaRule !== 'undefined';
var isCSSSupportsRuleSupported = typeof CSSSupportsRule !== 'undefined';
var isCSSConditionRuleSupported = typeof CSSConditionRule !== 'undefined';
function getEventTarget(event) {

@@ -275,3 +278,10 @@ try {

function recurse(childRule, pos) {
if (isCSSGroupingRuleSupported && childRule.parentRule instanceof CSSGroupingRule) {
if ((isCSSGroupingRuleSupported &&
childRule.parentRule instanceof CSSGroupingRule) ||
(isCSSMediaRuleSupported &&
childRule.parentRule instanceof CSSMediaRule) ||
(isCSSSupportsRuleSupported &&
childRule.parentRule instanceof CSSSupportsRule) ||
(isCSSConditionRuleSupported &&
childRule.parentRule instanceof CSSConditionRule)) {
var rules = Array.from(childRule.parentRule.cssRules);

@@ -290,5 +300,5 @@ var index = rules.indexOf(childRule);

}
function initStyleSheetObserver(cb, mirror) {
var insertRule = CSSStyleSheet.prototype.insertRule;
CSSStyleSheet.prototype.insertRule = function (rule, index) {
function initStyleSheetObserver(cb, win, mirror) {
var insertRule = win.CSSStyleSheet.prototype.insertRule;
win.CSSStyleSheet.prototype.insertRule = function (rule, index) {
var id = mirror.getId(this.ownerNode);

@@ -303,4 +313,4 @@ if (id !== -1) {

};
var deleteRule = CSSStyleSheet.prototype.deleteRule;
CSSStyleSheet.prototype.deleteRule = function (index) {
var deleteRule = win.CSSStyleSheet.prototype.deleteRule;
win.CSSStyleSheet.prototype.deleteRule = function (index) {
var id = mirror.getId(this.ownerNode);

@@ -315,47 +325,65 @@ if (id !== -1) {

};
if (!isCSSGroupingRuleSupported) {
return function () {
CSSStyleSheet.prototype.insertRule = insertRule;
CSSStyleSheet.prototype.deleteRule = deleteRule;
};
var supportedNestedCSSRuleTypes = {};
if (isCSSGroupingRuleSupported) {
supportedNestedCSSRuleTypes.CSSGroupingRule = win.CSSGroupingRule;
}
var groupingInsertRule = CSSGroupingRule.prototype.insertRule;
CSSGroupingRule.prototype.insertRule = function (rule, index) {
var id = mirror.getId(this.parentStyleSheet.ownerNode);
if (id !== -1) {
cb({
id: id,
adds: [
{
rule: rule,
index: __spread(getNestedCSSRulePositions(this), [
index || 0,
]),
},
],
});
else {
if (isCSSMediaRuleSupported) {
supportedNestedCSSRuleTypes.CSSMediaRule = win.CSSMediaRule;
}
return groupingInsertRule.apply(this, arguments);
};
var groupingDeleteRule = CSSGroupingRule.prototype.deleteRule;
CSSGroupingRule.prototype.deleteRule = function (index) {
var id = mirror.getId(this.parentStyleSheet.ownerNode);
if (id !== -1) {
cb({
id: id,
removes: [{ index: __spread(getNestedCSSRulePositions(this), [index]) }],
});
if (isCSSConditionRuleSupported) {
supportedNestedCSSRuleTypes.CSSConditionRule = win.CSSConditionRule;
}
return groupingDeleteRule.apply(this, arguments);
};
if (isCSSSupportsRuleSupported) {
supportedNestedCSSRuleTypes.CSSSupportsRule = win.CSSSupportsRule;
}
}
var unmodifiedFunctions = {};
Object.entries(supportedNestedCSSRuleTypes).forEach(function (_a) {
var _b = __read(_a, 2), typeKey = _b[0], type = _b[1];
unmodifiedFunctions[typeKey] = {
insertRule: type.prototype.insertRule,
deleteRule: type.prototype.deleteRule,
};
type.prototype.insertRule = function (rule, index) {
var id = mirror.getId(this.parentStyleSheet.ownerNode);
if (id !== -1) {
cb({
id: id,
adds: [
{
rule: rule,
index: __spread(getNestedCSSRulePositions(this), [
index || 0,
]),
},
],
});
}
return unmodifiedFunctions[typeKey].insertRule.apply(this, arguments);
};
type.prototype.deleteRule = function (index) {
var id = mirror.getId(this.parentStyleSheet.ownerNode);
if (id !== -1) {
cb({
id: id,
removes: [{ index: __spread(getNestedCSSRulePositions(this), [index]) }],
});
}
return unmodifiedFunctions[typeKey].deleteRule.apply(this, arguments);
};
});
return function () {
CSSStyleSheet.prototype.insertRule = insertRule;
CSSStyleSheet.prototype.deleteRule = deleteRule;
CSSGroupingRule.prototype.insertRule = groupingInsertRule;
CSSGroupingRule.prototype.deleteRule = groupingDeleteRule;
win.CSSStyleSheet.prototype.insertRule = insertRule;
win.CSSStyleSheet.prototype.deleteRule = deleteRule;
Object.entries(supportedNestedCSSRuleTypes).forEach(function (_a) {
var _b = __read(_a, 2), typeKey = _b[0], type = _b[1];
type.prototype.insertRule = unmodifiedFunctions[typeKey].insertRule;
type.prototype.deleteRule = unmodifiedFunctions[typeKey].deleteRule;
});
};
}
function initStyleDeclarationObserver(cb, mirror) {
var setProperty = CSSStyleDeclaration.prototype.setProperty;
CSSStyleDeclaration.prototype.setProperty = function (property, value, priority) {
function initStyleDeclarationObserver(cb, win, mirror) {
var setProperty = win.CSSStyleDeclaration.prototype.setProperty;
win.CSSStyleDeclaration.prototype.setProperty = function (property, value, priority) {
var _a, _b;

@@ -376,4 +404,4 @@ var id = mirror.getId((_b = (_a = this.parentRule) === null || _a === void 0 ? void 0 : _a.parentStyleSheet) === null || _b === void 0 ? void 0 : _b.ownerNode);

};
var removeProperty = CSSStyleDeclaration.prototype.removeProperty;
CSSStyleDeclaration.prototype.removeProperty = function (property) {
var removeProperty = win.CSSStyleDeclaration.prototype.removeProperty;
win.CSSStyleDeclaration.prototype.removeProperty = function (property) {
var _a, _b;

@@ -393,4 +421,4 @@ var id = mirror.getId((_b = (_a = this.parentRule) === null || _a === void 0 ? void 0 : _a.parentStyleSheet) === null || _b === void 0 ? void 0 : _b.ownerNode);

return function () {
CSSStyleDeclaration.prototype.setProperty = setProperty;
CSSStyleDeclaration.prototype.removeProperty = removeProperty;
win.CSSStyleDeclaration.prototype.setProperty = setProperty;
win.CSSStyleDeclaration.prototype.removeProperty = removeProperty;
};

@@ -411,5 +439,5 @@ }

var handlers = [
on('play', handler(MediaInteractions.Play)),
on('pause', handler(MediaInteractions.Pause)),
on('seeked', handler(MediaInteractions.Seeked)),
on('play', handler(0)),
on('pause', handler(1)),
on('seeked', handler(2)),
];

@@ -420,12 +448,12 @@ return function () {

}
function initCanvasMutationObserver(cb, blockClass, mirror) {
function initCanvasMutationObserver(cb, win, blockClass, mirror) {
var e_1, _a;
var props = Object.getOwnPropertyNames(CanvasRenderingContext2D.prototype);
var props = Object.getOwnPropertyNames(win.CanvasRenderingContext2D.prototype);
var handlers = [];
var _loop_1 = function (prop) {
try {
if (typeof CanvasRenderingContext2D.prototype[prop] !== 'function') {
if (typeof win.CanvasRenderingContext2D.prototype[prop] !== 'function') {
return "continue";
}
var restoreHandler = patch(CanvasRenderingContext2D.prototype, prop, function (original) {
var restoreHandler = patch(win.CanvasRenderingContext2D.prototype, prop, function (original) {
return function () {

@@ -463,3 +491,3 @@ var _this = this;

catch (_a) {
var hookHandler = hookSetter(CanvasRenderingContext2D.prototype, prop, {
var hookHandler = hookSetter(win.CanvasRenderingContext2D.prototype, prop, {
set: function (v) {

@@ -494,7 +522,11 @@ cb({

}
function initFontObserver(cb) {
function initFontObserver(cb, doc) {
var win = doc.defaultView;
if (!win) {
return function () { };
}
var handlers = [];
var fontMap = new WeakMap();
var originalFontFace = FontFace;
window.FontFace = function FontFace(family, source, descriptors) {
var originalFontFace = win.FontFace;
win.FontFace = function FontFace(family, source, descriptors) {
var fontFace = new originalFontFace(family, source, descriptors);

@@ -512,3 +544,3 @@ fontMap.set(fontFace, {

};
var restoreHandler = patch(document.fonts, 'add', function (original) {
var restoreHandler = patch(doc.fonts, 'add', function (original) {
return function (fontFace) {

@@ -526,3 +558,3 @@ setTimeout(function () {

handlers.push(function () {
window.FonFace = originalFontFace;
win.FontFace = originalFontFace;
});

@@ -650,2 +682,6 @@ handlers.push(restoreHandler);

if (hooks === void 0) { hooks = {}; }
var currentWindow = o.doc.defaultView;
if (!currentWindow) {
return function () { };
}
mergeHooks(o, hooks);

@@ -659,8 +695,10 @@ var mutationObserver = initMutationObserver(o.mutationCb, o.doc, o.blockClass, o.blockSelector, o.maskTextClass, o.maskTextSelector, o.inlineStylesheet, o.maskInputOptions, o.maskTextFn, o.maskInputFn, o.recordCanvas, o.slimDOMOptions, o.mirror, o.iframeManager, o.shadowDomManager, o.doc);

var mediaInteractionHandler = initMediaInteractionObserver(o.mediaInteractionCb, o.blockClass, o.mirror);
var styleSheetObserver = initStyleSheetObserver(o.styleSheetRuleCb, o.mirror);
var styleDeclarationObserver = initStyleDeclarationObserver(o.styleDeclarationCb, o.mirror);
var styleSheetObserver = initStyleSheetObserver(o.styleSheetRuleCb, currentWindow, o.mirror);
var styleDeclarationObserver = initStyleDeclarationObserver(o.styleDeclarationCb, currentWindow, o.mirror);
var canvasMutationObserver = o.recordCanvas
? initCanvasMutationObserver(o.canvasMutationCb, o.blockClass, o.mirror)
? initCanvasMutationObserver(o.canvasMutationCb, currentWindow, o.blockClass, o.mirror)
: function () { };
var fontObserver = o.collectFonts ? initFontObserver(o.fontCb) : function () { };
var fontObserver = o.collectFonts
? initFontObserver(o.fontCb, o.doc)
: function () { };
var pluginHandlers = [];

@@ -670,3 +708,3 @@ try {

var plugin = _c.value;
pluginHandlers.push(plugin.observer(plugin.callback, plugin.options));
pluginHandlers.push(plugin.observer(plugin.callback, currentWindow, plugin.options));
}

@@ -673,0 +711,0 @@ }

@@ -8,5 +8,5 @@ import { __assign, __values } from '../../../../ext/tslib/tslib.es6.js';

for (var idx = events.length - 1; idx >= 0; idx--) {
var event = events[idx];
if (event.type === EventType.Meta) {
if (event.timestamp <= baselineTime) {
var event_1 = events[idx];
if (event_1.type === EventType.Meta) {
if (event_1.timestamp <= baselineTime) {
return events.slice(idx);

@@ -102,4 +102,4 @@ }

for (var events_1 = __values(events), events_1_1 = events_1.next(); !events_1_1.done; events_1_1 = events_1.next()) {
var event = events_1_1.value;
addDelay(event, baselineTime);
var event_2 = events_1_1.value;
addDelay(event_2, baselineTime);
}

@@ -126,20 +126,20 @@ }

var actions = new Array();
var _loop_1 = function (event) {
var _loop_1 = function (event_3) {
if (lastPlayedTimestamp &&
lastPlayedTimestamp < baselineTime &&
(event.timestamp <= lastPlayedTimestamp ||
event === lastPlayedEvent)) {
(event_3.timestamp <= lastPlayedTimestamp ||
event_3 === lastPlayedEvent)) {
return "continue";
}
if (event.timestamp < baselineTime) {
syncEvents.push(event);
if (event_3.timestamp < baselineTime) {
syncEvents.push(event_3);
}
else {
var castFn_1 = getCastFn(event, false);
var castFn_1 = getCastFn(event_3, false);
actions.push({
doAction: function () {
castFn_1();
emitter.emit(ReplayerEvents.EventCast, event);
emitter.emit(ReplayerEvents.EventCast, event_3);
},
delay: event.delay,
delay: event_3.delay,
});

@@ -150,4 +150,4 @@ }

for (var neededEvents_1 = __values(neededEvents), neededEvents_1_1 = neededEvents_1.next(); !neededEvents_1_1.done; neededEvents_1_1 = neededEvents_1.next()) {
var event = neededEvents_1_1.value;
_loop_1(event);
var event_3 = neededEvents_1_1.value;
_loop_1(event_3);
}

@@ -186,7 +186,7 @@ }

if (machineEvent.type === 'ADD_EVENT') {
var event_1 = machineEvent.payload.event;
addDelay(event_1, baselineTime);
var event_4 = machineEvent.payload.event;
addDelay(event_4, baselineTime);
var end = events.length - 1;
if (!events[end] || events[end].timestamp <= event_1.timestamp) {
events.push(event_1);
if (!events[end] || events[end].timestamp <= event_4.timestamp) {
events.push(event_4);
}

@@ -198,3 +198,3 @@ else {

var mid = Math.floor((start + end) / 2);
if (events[mid].timestamp <= event_1.timestamp) {
if (events[mid].timestamp <= event_4.timestamp) {
start = mid + 1;

@@ -209,6 +209,6 @@ }

}
events.splice(insertionIndex, 0, event_1);
events.splice(insertionIndex, 0, event_4);
}
var isSync = event_1.timestamp < baselineTime;
var castFn_2 = getCastFn(event_1, isSync);
var isSync = event_4.timestamp < baselineTime;
var castFn_2 = getCastFn(event_4, isSync);
if (isSync) {

@@ -221,5 +221,5 @@ castFn_2();

castFn_2();
emitter.emit(ReplayerEvents.EventCast, event_1);
emitter.emit(ReplayerEvents.EventCast, event_4);
},
delay: event_1.delay,
delay: event_4.delay,
});

@@ -226,0 +226,0 @@ }

var rules = function (blockClass) { return [
"." + blockClass + " { background: #ccc }",
"." + blockClass + " { background: currentColor }",
'noscript { display: none !important; }',

@@ -4,0 +4,0 @@ ]; };

@@ -27,13 +27,16 @@ import { __spread, __read } from '../../../../ext/tslib/tslib.es6.js';

function applyVirtualStyleRulesToNode(storedRules, styleNode) {
var sheet = styleNode.sheet;
if (!sheet) {
return;
}
storedRules.forEach(function (rule) {
var _a, _b;
if (rule.type === StyleRuleType.Insert) {
try {
if (Array.isArray(rule.index)) {
var _c = getPositionsAndIndex(rule.index), positions = _c.positions, index = _c.index;
var nestedRule = getNestedRule(styleNode.sheet.cssRules, positions);
var _a = getPositionsAndIndex(rule.index), positions = _a.positions, index = _a.index;
var nestedRule = getNestedRule(sheet.cssRules, positions);
nestedRule.insertRule(rule.cssText, index);
}
else {
(_a = styleNode.sheet) === null || _a === void 0 ? void 0 : _a.insertRule(rule.cssText, rule.index);
sheet.insertRule(rule.cssText, rule.index);
}

@@ -47,8 +50,8 @@ }

if (Array.isArray(rule.index)) {
var _d = getPositionsAndIndex(rule.index), positions = _d.positions, index = _d.index;
var nestedRule = getNestedRule(styleNode.sheet.cssRules, positions);
var _b = getPositionsAndIndex(rule.index), positions = _b.positions, index = _b.index;
var nestedRule = getNestedRule(sheet.cssRules, positions);
nestedRule.deleteRule(index || 0);
}
else {
(_b = styleNode.sheet) === null || _b === void 0 ? void 0 : _b.deleteRule(rule.index);
sheet.deleteRule(rule.index);
}

@@ -63,7 +66,7 @@ }

else if (rule.type === StyleRuleType.SetProperty) {
var nativeRule = getNestedRule(styleNode.sheet.cssRules, rule.index);
var nativeRule = getNestedRule(sheet.cssRules, rule.index);
nativeRule.style.setProperty(rule.property, rule.value, rule.priority);
}
else if (rule.type === StyleRuleType.RemoveProperty) {
var nativeRule = getNestedRule(styleNode.sheet.cssRules, rule.index);
var nativeRule = getNestedRule(sheet.cssRules, rule.index);
nativeRule.style.removeProperty(rule.property);

@@ -70,0 +73,0 @@ }

@@ -91,3 +91,3 @@ import { __values } from '../../../ext/tslib/tslib.es6.js';

if (timeout) {
window.clearTimeout(timeout);
clearTimeout(timeout);
timeout = null;

@@ -99,3 +99,3 @@ }

else if (!timeout && options.trailing !== false) {
timeout = window.setTimeout(function () {
timeout = setTimeout(function () {
previous = options.leading === false ? 0 : Date.now();

@@ -102,0 +102,0 @@ timeout = null;

{
"name": "rrweb",
"version": "1.0.5",
"version": "1.0.6",
"description": "record and replay the web",

@@ -8,6 +8,6 @@ "scripts": {

"prepack": "npm run bundle",
"test": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register -r ignore-styles -r jsdom-global/register test/**.test.ts",
"test:headless": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true PUPPETEER_HEADLESS=true mocha -r ts-node/register -r ignore-styles -r jsdom-global/register test/**.test.ts",
"test:watch": "PUPPETEER_HEADLESS=true npm run test -- --watch --watch-extensions js,ts",
"repl": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true ts-node scripts/repl.ts",
"test": "npm run bundle:browser && jest",
"test:headless": "npm run bundle:browser && PUPPETEER_HEADLESS=true jest",
"test:watch": "PUPPETEER_HEADLESS=true npm run test -- --watch",
"repl": "npm run bundle:browser && node scripts/repl.js",
"bundle:browser": "cross-env BROWSER_ONLY=true rollup --config",

@@ -44,10 +44,11 @@ "bundle": "rollup --config",

"devDependencies": {
"@rollup/plugin-node-resolve": "^7.0.0",
"@rollup/plugin-typescript": "^8.2.5",
"@types/chai": "^4.1.6",
"@types/inquirer": "0.0.43",
"@types/jest": "^27.0.2",
"@types/jsdom": "^16.2.12",
"@types/mocha": "^5.2.5",
"@types/node": "^12.20.16",
"@types/prettier": "^2.3.2",
"@types/puppeteer": "^5.4.3",
"chai": "^4.2.0",
"cross-env": "^5.2.0",

@@ -57,15 +58,13 @@ "fast-mhtml": "^1.1.9",

"inquirer": "^6.2.1",
"jest": "^27.2.4",
"jest-snapshot": "^23.6.0",
"jsdom": "^17.0.0",
"jsdom-global": "^3.0.2",
"mocha": "^5.2.0",
"prettier": "2.2.1",
"puppeteer": "^9.1.1",
"rollup": "^2.3.3",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-resolve": "^3.4.0",
"rollup": "^2.45.2",
"rollup-plugin-postcss": "^3.1.1",
"rollup-plugin-rename-node-modules": "^1.1.0",
"rollup-plugin-terser": "^5.3.0",
"rollup-plugin-typescript": "^1.0.0",
"rollup-plugin-terser": "^7.0.2",
"ts-jest": "^27.0.5",
"ts-node": "^7.0.1",

@@ -81,5 +80,5 @@ "tslib": "^1.9.3",

"mitt": "^1.1.3",
"rrweb-snapshot": "^1.1.8"
"rrweb-snapshot": "^1.1.9"
},
"gitHead": "c864e5b0e9de1a18296dde2ef39d896cf4acae69"
"gitHead": "cabd5eb157175dbb6c9fc4e0b60e82cb246f7d3f"
}

@@ -8,6 +8,6 @@ import { RecordPlugin } from '../../../types';

declare type LogRecordOptions = {
level?: LogLevel[] | undefined;
level?: LogLevel[];
lengthThreshold?: number;
stringifyOptions?: StringifyOptions;
logger?: Logger;
logger?: Logger | 'console';
};

@@ -14,0 +14,0 @@ export declare type LogData = {

@@ -5,6 +5,6 @@ import { LogLevel, LogData } from '../record';

declare type LogReplayConfig = {
level?: LogLevel[] | undefined;
replayLogger: ReplayLogger | undefined;
level?: LogLevel[];
replayLogger?: ReplayLogger;
};
export declare const getReplayConsolePlugin: (options?: LogReplayConfig) => ReplayPlugin;
export {};

@@ -129,3 +129,3 @@ import { serializedNodeWithId, idNodeMap, INode, MaskInputOptions, SlimDOMOptions, MaskInputFn, MaskTextFn } from 'rrweb-snapshot';

name: string;
observer: (cb: Function, options: TOptions) => listenerHandler;
observer: (cb: Function, win: IWindow, options: TOptions) => listenerHandler;
options: TOptions;

@@ -454,2 +454,8 @@ };

export declare type KeepIframeSrcFn = (src: string) => boolean;
declare global {
interface Window {
FontFace: typeof FontFace;
}
}
export declare type IWindow = Window & typeof globalThis;
export {};

@@ -1,4 +0,4 @@

import { Mirror, throttleOptions, listenerHandler, hookResetter, blockClass, addedNodeMutation, removedNodeMutation, textMutation, attributeMutation, mutationData, scrollData, inputData, DocumentDimension } from './types';
import { Mirror, throttleOptions, listenerHandler, hookResetter, blockClass, addedNodeMutation, removedNodeMutation, textMutation, attributeMutation, mutationData, scrollData, inputData, DocumentDimension, IWindow } from './types';
import { INode, serializedNodeWithId } from 'rrweb-snapshot';
export declare function on(type: string, fn: EventListenerOrEventListenerObject, target?: Document | Window): listenerHandler;
export declare function on(type: string, fn: EventListenerOrEventListenerObject, target?: Document | IWindow): listenerHandler;
export declare function createMirror(): Mirror;

@@ -5,0 +5,0 @@ export declare let _mirror: Mirror;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc