Socket
Socket
Sign inDemoInstall

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.2 to 1.0.3

es/rrweb/packages/rrweb-snapshot/es/rrweb-snapshot.js

479

dist/plugins/console-record.js

@@ -54,103 +54,138 @@ var rrwebConsoleRecord = (function (exports) {

function pathToSelector(node) {
if (!node || !node.outerHTML) {
return '';
}
var path = '';
while (node.parentElement) {
var name = node.localName;
if (!name) {
break;
}
name = name.toLowerCase();
var parent = 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 (sibling.localName && sibling.localName.toLowerCase) {
if (sibling.localName.toLowerCase() === name) {
domSiblings.push(sibling);
}
}
var EventType;
(function (EventType) {
EventType[EventType["DomContentLoaded"] = 0] = "DomContentLoaded";
EventType[EventType["Load"] = 1] = "Load";
EventType[EventType["FullSnapshot"] = 2] = "FullSnapshot";
EventType[EventType["IncrementalSnapshot"] = 3] = "IncrementalSnapshot";
EventType[EventType["Meta"] = 4] = "Meta";
EventType[EventType["Custom"] = 5] = "Custom";
EventType[EventType["Plugin"] = 6] = "Plugin";
})(EventType || (EventType = {}));
var IncrementalSource;
(function (IncrementalSource) {
IncrementalSource[IncrementalSource["Mutation"] = 0] = "Mutation";
IncrementalSource[IncrementalSource["MouseMove"] = 1] = "MouseMove";
IncrementalSource[IncrementalSource["MouseInteraction"] = 2] = "MouseInteraction";
IncrementalSource[IncrementalSource["Scroll"] = 3] = "Scroll";
IncrementalSource[IncrementalSource["ViewportResize"] = 4] = "ViewportResize";
IncrementalSource[IncrementalSource["Input"] = 5] = "Input";
IncrementalSource[IncrementalSource["TouchMove"] = 6] = "TouchMove";
IncrementalSource[IncrementalSource["MediaInteraction"] = 7] = "MediaInteraction";
IncrementalSource[IncrementalSource["StyleSheetRule"] = 8] = "StyleSheetRule";
IncrementalSource[IncrementalSource["CanvasMutation"] = 9] = "CanvasMutation";
IncrementalSource[IncrementalSource["Font"] = 10] = "Font";
IncrementalSource[IncrementalSource["Log"] = 11] = "Log";
IncrementalSource[IncrementalSource["Drag"] = 12] = "Drag";
IncrementalSource[IncrementalSource["StyleDeclaration"] = 13] = "StyleDeclaration";
})(IncrementalSource || (IncrementalSource = {}));
var MouseInteractions;
(function (MouseInteractions) {
MouseInteractions[MouseInteractions["MouseUp"] = 0] = "MouseUp";
MouseInteractions[MouseInteractions["MouseDown"] = 1] = "MouseDown";
MouseInteractions[MouseInteractions["Click"] = 2] = "Click";
MouseInteractions[MouseInteractions["ContextMenu"] = 3] = "ContextMenu";
MouseInteractions[MouseInteractions["DblClick"] = 4] = "DblClick";
MouseInteractions[MouseInteractions["Focus"] = 5] = "Focus";
MouseInteractions[MouseInteractions["Blur"] = 6] = "Blur";
MouseInteractions[MouseInteractions["TouchStart"] = 7] = "TouchStart";
MouseInteractions[MouseInteractions["TouchMove_Departed"] = 8] = "TouchMove_Departed";
MouseInteractions[MouseInteractions["TouchEnd"] = 9] = "TouchEnd";
MouseInteractions[MouseInteractions["TouchCancel"] = 10] = "TouchCancel";
})(MouseInteractions || (MouseInteractions = {}));
var MediaInteractions;
(function (MediaInteractions) {
MediaInteractions[MediaInteractions["Play"] = 0] = "Play";
MediaInteractions[MediaInteractions["Pause"] = 1] = "Pause";
MediaInteractions[MediaInteractions["Seeked"] = 2] = "Seeked";
})(MediaInteractions || (MediaInteractions = {}));
var ReplayerEvents;
(function (ReplayerEvents) {
ReplayerEvents["Start"] = "start";
ReplayerEvents["Pause"] = "pause";
ReplayerEvents["Resume"] = "resume";
ReplayerEvents["Resize"] = "resize";
ReplayerEvents["Finish"] = "finish";
ReplayerEvents["FullsnapshotRebuilded"] = "fullsnapshot-rebuilded";
ReplayerEvents["LoadStylesheetStart"] = "load-stylesheet-start";
ReplayerEvents["LoadStylesheetEnd"] = "load-stylesheet-end";
ReplayerEvents["SkipStart"] = "skip-start";
ReplayerEvents["SkipEnd"] = "skip-end";
ReplayerEvents["MouseInteraction"] = "mouse-interaction";
ReplayerEvents["EventCast"] = "event-cast";
ReplayerEvents["CustomEvent"] = "custom-event";
ReplayerEvents["Flush"] = "flush";
ReplayerEvents["StateChange"] = "state-change";
ReplayerEvents["PlayBack"] = "play-back";
})(ReplayerEvents || (ReplayerEvents = {}));
var NodeType;
(function (NodeType) {
NodeType[NodeType["Document"] = 0] = "Document";
NodeType[NodeType["DocumentType"] = 1] = "DocumentType";
NodeType[NodeType["Element"] = 2] = "Element";
NodeType[NodeType["Text"] = 3] = "Text";
NodeType[NodeType["CDATA"] = 4] = "CDATA";
NodeType[NodeType["Comment"] = 5] = "Comment";
})(NodeType || (NodeType = {}));
var DEPARTED_MIRROR_ACCESS_WARNING = 'Please stop import mirror directly. Instead of that,' +
'\r\n' +
'now you can use replayer.getMirror() to access the mirror instance of a replayer,' +
'\r\n' +
'or you can use record.mirror to access the mirror instance during recording.';
var _mirror = {
map: {},
getId: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
return -1;
},
getNode: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
return null;
},
removeNodeFromMap: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
},
has: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
return false;
},
reset: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
},
};
if (typeof window !== 'undefined' && window.Proxy && window.Reflect) {
_mirror = new Proxy(_mirror, {
get: function (target, prop, receiver) {
if (prop === 'map') {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
}
}
if (domSiblings.length > 1) {
name += ':eq(' + domSiblings.indexOf(node) + ')';
}
path = name + (path ? '>' + path : '');
node = parent;
}
return path;
return Reflect.get(target, prop, receiver);
},
});
}
function stringify(obj, stringifyOptions) {
var options = {
numOfKeysLimit: 50,
};
Object.assign(options, stringifyOptions);
var stack = [];
var keys = [];
return JSON.stringify(obj, function (key, value) {
if (stack.length > 0) {
var thisPos = stack.indexOf(this);
~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
if (~stack.indexOf(value)) {
if (stack[0] === value) {
value = '[Circular ~]';
}
else {
value =
'[Circular ~.' +
keys.slice(0, stack.indexOf(value)).join('.') +
']';
}
}
function patch(source, name, replacement) {
try {
if (!(name in source)) {
return function () { };
}
else {
stack.push(value);
var original_1 = source[name];
var wrapped = replacement(original_1);
if (typeof wrapped === 'function') {
wrapped.prototype = wrapped.prototype || {};
Object.defineProperties(wrapped, {
__rrweb_original__: {
enumerable: false,
value: original_1,
},
});
}
if (value === null || value === undefined) {
return value;
}
if (shouldToString(value)) {
return toString(value);
}
if (value instanceof Event) {
var eventResult = {};
for (var eventKey in value) {
var eventValue = value[eventKey];
if (Array.isArray(eventValue)) {
eventResult[eventKey] = pathToSelector(eventValue.length ? eventValue[0] : null);
}
else {
eventResult[eventKey] = eventValue;
}
}
return eventResult;
}
else if (value instanceof Node) {
if (value instanceof HTMLElement) {
return value ? value.outerHTML : '';
}
return value.nodeName;
}
return value;
});
function shouldToString(_obj) {
if (typeof _obj === 'object' &&
Object.keys(_obj).length > options.numOfKeysLimit) {
return true;
}
if (typeof _obj === 'function') {
return true;
}
return false;
source[name] = wrapped;
return function () {
source[name] = original_1;
};
}
function toString(_obj) {
var str = _obj.toString();
if (options.stringLengthLimit && str.length > options.stringLengthLimit) {
str = str.slice(0, options.stringLengthLimit) + "...";
}
return str;
catch (_a) {
return function () { };
}

@@ -334,137 +369,133 @@ }

var EventType;
(function (EventType) {
EventType[EventType["DomContentLoaded"] = 0] = "DomContentLoaded";
EventType[EventType["Load"] = 1] = "Load";
EventType[EventType["FullSnapshot"] = 2] = "FullSnapshot";
EventType[EventType["IncrementalSnapshot"] = 3] = "IncrementalSnapshot";
EventType[EventType["Meta"] = 4] = "Meta";
EventType[EventType["Custom"] = 5] = "Custom";
EventType[EventType["Plugin"] = 6] = "Plugin";
})(EventType || (EventType = {}));
var IncrementalSource;
(function (IncrementalSource) {
IncrementalSource[IncrementalSource["Mutation"] = 0] = "Mutation";
IncrementalSource[IncrementalSource["MouseMove"] = 1] = "MouseMove";
IncrementalSource[IncrementalSource["MouseInteraction"] = 2] = "MouseInteraction";
IncrementalSource[IncrementalSource["Scroll"] = 3] = "Scroll";
IncrementalSource[IncrementalSource["ViewportResize"] = 4] = "ViewportResize";
IncrementalSource[IncrementalSource["Input"] = 5] = "Input";
IncrementalSource[IncrementalSource["TouchMove"] = 6] = "TouchMove";
IncrementalSource[IncrementalSource["MediaInteraction"] = 7] = "MediaInteraction";
IncrementalSource[IncrementalSource["StyleSheetRule"] = 8] = "StyleSheetRule";
IncrementalSource[IncrementalSource["CanvasMutation"] = 9] = "CanvasMutation";
IncrementalSource[IncrementalSource["Font"] = 10] = "Font";
IncrementalSource[IncrementalSource["Log"] = 11] = "Log";
IncrementalSource[IncrementalSource["Drag"] = 12] = "Drag";
})(IncrementalSource || (IncrementalSource = {}));
var MouseInteractions;
(function (MouseInteractions) {
MouseInteractions[MouseInteractions["MouseUp"] = 0] = "MouseUp";
MouseInteractions[MouseInteractions["MouseDown"] = 1] = "MouseDown";
MouseInteractions[MouseInteractions["Click"] = 2] = "Click";
MouseInteractions[MouseInteractions["ContextMenu"] = 3] = "ContextMenu";
MouseInteractions[MouseInteractions["DblClick"] = 4] = "DblClick";
MouseInteractions[MouseInteractions["Focus"] = 5] = "Focus";
MouseInteractions[MouseInteractions["Blur"] = 6] = "Blur";
MouseInteractions[MouseInteractions["TouchStart"] = 7] = "TouchStart";
MouseInteractions[MouseInteractions["TouchMove_Departed"] = 8] = "TouchMove_Departed";
MouseInteractions[MouseInteractions["TouchEnd"] = 9] = "TouchEnd";
})(MouseInteractions || (MouseInteractions = {}));
var MediaInteractions;
(function (MediaInteractions) {
MediaInteractions[MediaInteractions["Play"] = 0] = "Play";
MediaInteractions[MediaInteractions["Pause"] = 1] = "Pause";
MediaInteractions[MediaInteractions["Seeked"] = 2] = "Seeked";
})(MediaInteractions || (MediaInteractions = {}));
var ReplayerEvents;
(function (ReplayerEvents) {
ReplayerEvents["Start"] = "start";
ReplayerEvents["Pause"] = "pause";
ReplayerEvents["Resume"] = "resume";
ReplayerEvents["Resize"] = "resize";
ReplayerEvents["Finish"] = "finish";
ReplayerEvents["FullsnapshotRebuilded"] = "fullsnapshot-rebuilded";
ReplayerEvents["LoadStylesheetStart"] = "load-stylesheet-start";
ReplayerEvents["LoadStylesheetEnd"] = "load-stylesheet-end";
ReplayerEvents["SkipStart"] = "skip-start";
ReplayerEvents["SkipEnd"] = "skip-end";
ReplayerEvents["MouseInteraction"] = "mouse-interaction";
ReplayerEvents["EventCast"] = "event-cast";
ReplayerEvents["CustomEvent"] = "custom-event";
ReplayerEvents["Flush"] = "flush";
ReplayerEvents["StateChange"] = "state-change";
ReplayerEvents["PlayBack"] = "play-back";
})(ReplayerEvents || (ReplayerEvents = {}));
var NodeType;
(function (NodeType) {
NodeType[NodeType["Document"] = 0] = "Document";
NodeType[NodeType["DocumentType"] = 1] = "DocumentType";
NodeType[NodeType["Element"] = 2] = "Element";
NodeType[NodeType["Text"] = 3] = "Text";
NodeType[NodeType["CDATA"] = 4] = "CDATA";
NodeType[NodeType["Comment"] = 5] = "Comment";
})(NodeType || (NodeType = {}));
var DEPARTED_MIRROR_ACCESS_WARNING = 'Please stop import mirror directly. Instead of that,' +
'\r\n' +
'now you can use replayer.getMirror() to access the mirror instance of a replayer,' +
'\r\n' +
'or you can use record.mirror to access the mirror instance during recording.';
var _mirror = {
map: {},
getId: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
return -1;
},
getNode: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
return null;
},
removeNodeFromMap: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
},
has: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
return false;
},
reset: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
},
};
if (typeof window !== 'undefined' && window.Proxy && window.Reflect) {
_mirror = new Proxy(_mirror, {
get: function (target, prop, receiver) {
if (prop === 'map') {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
function pathToSelector(node) {
if (!node || !node.outerHTML) {
return '';
}
var path = '';
while (node.parentElement) {
var name = node.localName;
if (!name) {
break;
}
name = name.toLowerCase();
var parent = 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 (sibling.localName && sibling.localName.toLowerCase) {
if (sibling.localName.toLowerCase() === name) {
domSiblings.push(sibling);
}
}
}
return Reflect.get(target, prop, receiver);
},
});
}
if (domSiblings.length > 1) {
name += ':eq(' + domSiblings.indexOf(node) + ')';
}
path = name + (path ? '>' + path : '');
node = parent;
}
return path;
}
function patch(source, name, replacement) {
function isObject(obj) {
return Object.prototype.toString.call(obj) === '[object Object]';
}
function isObjTooDeep(obj, limit) {
var e_1, _a;
if (limit === 0) {
return true;
}
var keys = Object.keys(obj);
try {
if (!(name in source)) {
return function () { };
for (var keys_1 = __values(keys), keys_1_1 = keys_1.next(); !keys_1_1.done; keys_1_1 = keys_1.next()) {
var key = keys_1_1.value;
if (isObject(obj[key]) && isObjTooDeep(obj[key], limit - 1)) {
return true;
}
}
var original_1 = source[name];
var wrapped = replacement(original_1);
if (typeof wrapped === 'function') {
wrapped.prototype = wrapped.prototype || {};
Object.defineProperties(wrapped, {
__rrweb_original__: {
enumerable: false,
value: original_1,
},
});
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (keys_1_1 && !keys_1_1.done && (_a = keys_1.return)) _a.call(keys_1);
}
source[name] = wrapped;
return function () {
source[name] = original_1;
};
finally { if (e_1) throw e_1.error; }
}
catch (_a) {
return function () { };
return false;
}
function stringify(obj, stringifyOptions) {
var options = {
numOfKeysLimit: 50,
depthOfLimit: 4,
};
Object.assign(options, stringifyOptions);
var stack = [];
var keys = [];
return JSON.stringify(obj, function (key, value) {
if (stack.length > 0) {
var thisPos = stack.indexOf(this);
~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
if (~stack.indexOf(value)) {
if (stack[0] === value) {
value = '[Circular ~]';
}
else {
value =
'[Circular ~.' +
keys.slice(0, stack.indexOf(value)).join('.') +
']';
}
}
}
else {
stack.push(value);
}
if (value === null || value === undefined) {
return value;
}
if (shouldIgnore(value)) {
return toString(value);
}
if (value instanceof Event) {
var eventResult = {};
for (var eventKey in value) {
var eventValue = value[eventKey];
if (Array.isArray(eventValue)) {
eventResult[eventKey] = pathToSelector(eventValue.length ? eventValue[0] : null);
}
else {
eventResult[eventKey] = eventValue;
}
}
return eventResult;
}
else if (value instanceof Node) {
if (value instanceof HTMLElement) {
return value ? value.outerHTML : '';
}
return value.nodeName;
}
return value;
});
function shouldIgnore(_obj) {
if (isObject(_obj) && Object.keys(_obj).length > options.numOfKeysLimit) {
return true;
}
if (typeof _obj === 'function') {
return true;
}
if (isObject(_obj) && isObjTooDeep(_obj, options.depthOfLimit)) {
return true;
}
return false;
}
function toString(_obj) {
var str = _obj.toString();
if (options.stringLengthLimit && str.length > options.stringLengthLimit) {
str = str.slice(0, options.stringLengthLimit) + "...";
}
return str;
}
}

@@ -471,0 +502,0 @@

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

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

@@ -79,2 +79,3 @@ var rrwebConsoleReplay = (function (exports) {

IncrementalSource[IncrementalSource["Drag"] = 12] = "Drag";
IncrementalSource[IncrementalSource["StyleDeclaration"] = 13] = "StyleDeclaration";
})(IncrementalSource || (IncrementalSource = {}));

@@ -93,2 +94,3 @@ var MouseInteractions;

MouseInteractions[MouseInteractions["TouchEnd"] = 9] = "TouchEnd";
MouseInteractions[MouseInteractions["TouchCancel"] = 10] = "TouchCancel";
})(MouseInteractions || (MouseInteractions = {}));

@@ -95,0 +97,0 @@ var MediaInteractions;

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

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function o(e,o){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,r,a=t.call(e),l=[];try{for(;(void 0===o||o-- >0)&&!(n=a.next()).done;)l.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(t=a.return)&&t.call(a)}finally{if(r)throw r.error}}return l}function t(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}var n,r,a,l,u,i;!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"}(n||(n={})),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"}(r||(r={})),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"}(a||(a={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked"}(l||(l={})),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"}(u||(u={})),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"}(i||(i={}));var c="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.",s={map:{},getId:function(){return console.error(c),-1},getNode:function(){return console.error(c),null},removeNodeFromMap:function(){console.error(c)},has:function(){return console.error(c),!1},reset:function(){console.error(c)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(s=new Proxy(s,{get:function(e,o,t){return"map"===o&&console.error(c),Reflect.get(e,o,t)}}));var d={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],replayLogger:void 0},f=function(){function e(e){this.config=Object.assign(d,e)}return e.prototype.getConsoleLogger=function(){var e,o,n=this,r={},a=function(e){r[e]="trace"===e?function(e){(console.log.__rrweb_original__?console.log.__rrweb_original__:console.log).apply(void 0,t(e.payload.map((function(e){return JSON.parse(e)})),[n.formatMessage(e)]))}:function(o){(console[e].__rrweb_original__?console[e].__rrweb_original__:console[e]).apply(void 0,t(o.payload.map((function(e){return JSON.parse(e)})),[n.formatMessage(o)]))}};try{for(var l=function(e){var o="function"==typeof Symbol&&Symbol.iterator,t=o&&e[o],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(o?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.config.level),u=l.next();!u.done;u=l.next()){a(u.value)}}catch(o){e={error:o}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(e)throw e.error}}return r},e.prototype.formatMessage=function(e){if(0===e.trace.length)return"";var o="\n\tat ";return o+=e.trace.join("\n\tat ")},e}();return e.getReplayConsolePlugin=function(e){var o=(null==e?void 0:e.replayLogger)||new f(e).getConsoleLogger();return{handler:function(e,t,a){var l=null;if(e.type===n.IncrementalSnapshot&&e.data.source===r.Log?l=e.data:e.type===n.Plugin&&"rrweb/console@1"===e.data.plugin&&(l=e.data.payload),l)try{"function"==typeof o[l.level]&&o[l.level](l)}catch(e){a.replayer.config.showWarning&&console.warn(e)}}}},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
***************************************************************************** */function o(e,o){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,r,a=t.call(e),l=[];try{for(;(void 0===o||o-- >0)&&!(n=a.next()).done;)l.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(t=a.return)&&t.call(a)}finally{if(r)throw r.error}}return l}function t(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}var n,r,a,l,u,i;!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"}(n||(n={})),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"}(r||(r={})),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"}(l||(l={})),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"}(u||(u={})),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"}(i||(i={}));var c="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.",s={map:{},getId:function(){return console.error(c),-1},getNode:function(){return console.error(c),null},removeNodeFromMap:function(){console.error(c)},has:function(){return console.error(c),!1},reset:function(){console.error(c)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(s=new Proxy(s,{get:function(e,o,t){return"map"===o&&console.error(c),Reflect.get(e,o,t)}}));var d={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],replayLogger:void 0},f=function(){function e(e){this.config=Object.assign(d,e)}return e.prototype.getConsoleLogger=function(){var e,o,n=this,r={},a=function(e){r[e]="trace"===e?function(e){(console.log.__rrweb_original__?console.log.__rrweb_original__:console.log).apply(void 0,t(e.payload.map((function(e){return JSON.parse(e)})),[n.formatMessage(e)]))}:function(o){(console[e].__rrweb_original__?console[e].__rrweb_original__:console[e]).apply(void 0,t(o.payload.map((function(e){return JSON.parse(e)})),[n.formatMessage(o)]))}};try{for(var l=function(e){var o="function"==typeof Symbol&&Symbol.iterator,t=o&&e[o],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(o?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.config.level),u=l.next();!u.done;u=l.next()){a(u.value)}}catch(o){e={error:o}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(e)throw e.error}}return r},e.prototype.formatMessage=function(e){if(0===e.trace.length)return"";var o="\n\tat ";return o+=e.trace.join("\n\tat ")},e}();return e.getReplayConsolePlugin=function(e){var o=(null==e?void 0:e.replayLogger)||new f(e).getConsoleLogger();return{handler:function(e,t,a){var l=null;if(e.type===n.IncrementalSnapshot&&e.data.source===r.Log?l=e.data:e.type===n.Plugin&&"rrweb/console@1"===e.data.plugin&&(l=e.data.payload),l)try{"function"==typeof o[l.level]&&o[l.level](l)}catch(e){a.replayer.config.showWarning&&console.warn(e)}}}},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
//# sourceMappingURL=console-replay.min.js.map

@@ -65,2 +65,3 @@ var rrwebRecord = (function (exports) {

IncrementalSource[IncrementalSource["Drag"] = 12] = "Drag";
IncrementalSource[IncrementalSource["StyleDeclaration"] = 13] = "StyleDeclaration";
})(IncrementalSource || (IncrementalSource = {}));

@@ -79,2 +80,3 @@ var MouseInteractions;

MouseInteractions[MouseInteractions["TouchEnd"] = 9] = "TouchEnd";
MouseInteractions[MouseInteractions["TouchCancel"] = 10] = "TouchCancel";
})(MouseInteractions || (MouseInteractions = {}));

@@ -245,5 +247,5 @@ var MediaInteractions;

// fixed length map
var flm = hMap(flt, 9, 0), flrm = hMap(flt, 9, 1);
var flm = /*#__PURE__*/ hMap(flt, 9, 0);
// fixed distance map
var fdm = hMap(fdt, 5, 0), fdrm = hMap(fdt, 5, 1);
var fdm = /*#__PURE__*/ hMap(fdt, 5, 0);
// get end of byte

@@ -487,5 +489,5 @@ var shft = function (p) { return ((p / 8) >> 0) + (p & 7 && 1); };

// deflate options (nice << 13) | chain
var deo = new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);
var deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);
// empty
var et = new u8(0);
var et = /*#__PURE__*/ new u8(0);
// compresses data into a raw DEFLATE buffer

@@ -612,10 +614,2 @@ var dflt = function (dat, lvl, plvl, pre, post, lst) {

};
// CRC32 table
var crct = new u32(256);
for (var i = 0; i < 256; ++i) {
var c = i, k = 9;
while (--k)
c = ((c & 1) && 0xEDB88320) ^ (c >>> 1);
crct[i] = c;
}
// Alder32

@@ -622,0 +616,0 @@ var adler = function () {

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

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var r,n,t,o,a,u,f=function(){return(f=Object.assign||function(e){for(var r,n=1,t=arguments.length;n<t;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)};!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"}(r||(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"}(n||(n={})),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"}(t||(t={})),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"}(o||(o={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked"}(a||(a={})),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"}(u||(u={}));var i="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.",s={map:{},getId:function(){return console.error(i),-1},getNode:function(){return console.error(i),null},removeNodeFromMap:function(){console.error(i)},has:function(){return console.error(i),!1},reset:function(){console.error(i)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(s=new Proxy(s,{get:function(e,r,n){return"map"===r&&console.error(i),Reflect.get(e,r,n)}}));var c=Uint8Array,l=Uint16Array,v=Uint32Array,h=new c([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),d=new c([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),m=new c([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),w=function(e,r){for(var n=new l(31),t=0;t<31;++t)n[t]=r+=1<<e[t-1];var o=new v(n[30]);for(t=1;t<30;++t)for(var a=n[t];a<n[t+1];++a)o[a]=a-n[t]<<5|t;return[n,o]},g=w(h,2),p=g[0],M=g[1];p[28]=258,M[258]=28;for(var y=w(d,0)[1],C=new l(32768),S=0;S<32768;++S){var D=(43690&S)>>>1|(21845&S)<<1;D=(61680&(D=(52428&D)>>>2|(13107&D)<<2))>>>4|(3855&D)<<4,C[S]=((65280&D)>>>8|(255&D)<<8)>>>1}var T=function(e,r,n){for(var t=e.length,o=0,a=new l(r);o<t;++o)++a[e[o]-1];var u,f=new l(r);for(o=0;o<r;++o)f[o]=f[o-1]+a[o-1]<<1;if(n){u=new l(1<<r);var i=15-r;for(o=0;o<t;++o)if(e[o])for(var s=o<<4|e[o],c=r-e[o],v=f[e[o]-1]++<<c,h=v|(1<<c)-1;v<=h;++v)u[C[v]>>>i]=s}else for(u=new l(t),o=0;o<t;++o)u[o]=C[f[e[o]-1]++]>>>15-e[o];return u},b=new c(288);for(S=0;S<144;++S)b[S]=8;for(S=144;S<256;++S)b[S]=9;for(S=256;S<280;++S)b[S]=7;for(S=280;S<288;++S)b[S]=8;var k=new c(32);for(S=0;S<32;++S)k[S]=5;var P=T(b,9,0),x=(T(b,9,1),T(k,5,0)),I=(T(k,5,1),function(e){return(e/8>>0)+(7&e&&1)}),E=function(e,r,n){(null==r||r<0)&&(r=0),(null==n||n>e.length)&&(n=e.length);var t=new(e instanceof l?l:e instanceof v?v:c)(n-r);return t.set(e.subarray(r,n)),t},F=function(e,r,n){n<<=7&r;var t=r/8>>0;e[t]|=n,e[t+1]|=n>>>8},R=function(e,r,n){n<<=7&r;var t=r/8>>0;e[t]|=n,e[t+1]|=n>>>8,e[t+2]|=n>>>16},A=function(e,r){for(var n=[],t=0;t<e.length;++t)e[t]&&n.push({s:t,f:e[t]});var o=n.length,a=n.slice();if(!o)return[new c(0),0];if(1==o){var u=new c(n[0].s+1);return u[n[0].s]=1,[u,1]}n.sort((function(e,r){return e.f-r.f})),n.push({s:-1,f:25001});var f=n[0],i=n[1],s=0,v=1,h=2;for(n[0]={s:-1,f:f.f+i.f,l:f,r:i};v!=o-1;)f=n[n[s].f<n[h].f?s++:h++],i=n[s!=v&&n[s].f<n[h].f?s++:h++],n[v++]={s:-1,f:f.f+i.f,l:f,r:i};var d=a[0].s;for(t=1;t<o;++t)a[t].s>d&&(d=a[t].s);var m=new l(d+1),w=L(n[v-1],m,0);if(w>r){t=0;var g=0,p=w-r,M=1<<p;for(a.sort((function(e,r){return m[r.s]-m[e.s]||e.f-r.f}));t<o;++t){var y=a[t].s;if(!(m[y]>r))break;g+=M-(1<<w-m[y]),m[y]=r}for(g>>>=p;g>0;){var C=a[t].s;m[C]<r?g-=1<<r-m[C]++-1:++t}for(;t>=0&&g;--t){var S=a[t].s;m[S]==r&&(--m[S],++g)}w=r}return[new c(m),w]},L=function(e,r,n){return-1==e.s?Math.max(L(e.l,r,n+1),L(e.r,r,n+1)):r[e.s]=n},O=function(e){for(var r=e.length;r&&!e[--r];);for(var n=new l(++r),t=0,o=e[0],a=1,u=function(e){n[t++]=e},f=1;f<=r;++f)if(e[f]==o&&f!=r)++a;else{if(!o&&a>2){for(;a>138;a-=138)u(32754);a>2&&(u(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(u(o),--a;a>6;a-=6)u(8304);a>2&&(u(a-3<<5|8208),a=0)}for(;a--;)u(o);a=1,o=e[f]}return[n.subarray(0,t),r]},U=function(e,r){for(var n=0,t=0;t<r.length;++t)n+=e[t]*r[t];return n},z=function(e,r,n){var t=n.length,o=I(r+2);e[o]=255&t,e[o+1]=t>>>8,e[o+2]=255^e[o],e[o+3]=255^e[o+1];for(var a=0;a<t;++a)e[o+a+4]=n[a];return 8*(o+4+t)},_=function(e,r,n,t,o,a,u,f,i,s,c){F(r,c++,n),++o[256];for(var v=A(o,15),w=v[0],g=v[1],p=A(a,15),M=p[0],y=p[1],C=O(w),S=C[0],D=C[1],I=O(M),E=I[0],L=I[1],_=new l(19),j=0;j<S.length;++j)_[31&S[j]]++;for(j=0;j<E.length;++j)_[31&E[j]]++;for(var B=A(_,7),N=B[0],V=B[1],J=19;J>4&&!N[m[J-1]];--J);var q,G,H,K,Q=s+5<<3,W=U(o,b)+U(a,k)+u,X=U(o,w)+U(a,M)+u+14+3*J+U(_,N)+(2*_[16]+3*_[17]+7*_[18]);if(Q<=W&&Q<=X)return z(r,c,e.subarray(i,i+s));if(F(r,c,1+(X<W)),c+=2,X<W){q=T(w,g,0),G=w,H=T(M,y,0),K=M;var Y=T(N,V,0);F(r,c,D-257),F(r,c+5,L-1),F(r,c+10,J-4),c+=14;for(j=0;j<J;++j)F(r,c+3*j,N[m[j]]);c+=3*J;for(var Z=[S,E],$=0;$<2;++$){var ee=Z[$];for(j=0;j<ee.length;++j){var re=31&ee[j];F(r,c,Y[re]),c+=N[re],re>15&&(F(r,c,ee[j]>>>5&127),c+=ee[j]>>>12)}}}else q=P,G=b,H=x,K=k;for(j=0;j<f;++j)if(t[j]>255){re=t[j]>>>18&31;R(r,c,q[re+257]),c+=G[re+257],re>7&&(F(r,c,t[j]>>>23&31),c+=h[re]);var ne=31&t[j];R(r,c,H[ne]),c+=K[ne],ne>3&&(R(r,c,t[j]>>>5&8191),c+=d[ne])}else R(r,c,q[t[j]]),c+=G[t[j]];return R(r,c,q[256]),c+G[256]},j=new v([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),B=new c(0),N=new v(256);for(S=0;S<256;++S){for(var V=S,J=9;--J;)V=(1&V&&3988292384)^V>>>1;N[S]=V}var q=function(e,r,n,t,o){return function(e,r,n,t,o,a){var u=e.length,f=new c(t+u+5*(1+Math.floor(u/7e3))+o),i=f.subarray(t,f.length-o),s=0;if(!r||u<8)for(var m=0;m<=u;m+=65535){var w=m+65535;w<u?s=z(i,s,e.subarray(m,w)):(i[m]=a,s=z(i,s,e.subarray(m,u)))}else{for(var g=j[r-1],p=g>>>13,C=8191&g,S=(1<<n)-1,D=new l(32768),T=new l(S+1),b=Math.ceil(n/3),k=2*b,P=function(r){return(e[r]^e[r+1]<<b^e[r+2]<<k)&S},x=new v(25e3),F=new l(288),R=new l(32),A=0,L=0,O=(m=0,0),U=0,N=0;m<u;++m){var V=P(m),J=32767&m,q=T[V];if(D[J]=q,T[V]=J,U<=m){var G=u-m;if((A>7e3||O>24576)&&G>423){s=_(e,i,0,x,F,R,L,O,N,m-N,s),O=A=L=0,N=m;for(var H=0;H<286;++H)F[H]=0;for(H=0;H<30;++H)R[H]=0}var K=2,Q=0,W=C,X=J-q&32767;if(G>2&&V==P(m-X))for(var Y=Math.min(p,G)-1,Z=Math.min(32767,m),$=Math.min(258,G);X<=Z&&--W&&J!=q;){if(e[m+K]==e[m+K-X]){for(var ee=0;ee<$&&e[m+ee]==e[m+ee-X];++ee);if(ee>K){if(K=ee,Q=X,ee>Y)break;var re=Math.min(X,ee-2),ne=0;for(H=0;H<re;++H){var te=m-X+H+32768&32767,oe=te-D[te]+32768&32767;oe>ne&&(ne=oe,q=te)}}}X+=(J=q)-(q=D[J])+32768&32767}if(Q){x[O++]=268435456|M[K]<<18|y[Q];var ae=31&M[K],ue=31&y[Q];L+=h[ae]+d[ue],++F[257+ae],++R[ue],U=m+K,++A}else x[O++]=e[m],++F[e[m]]}}s=_(e,i,a,x,F,R,L,O,N,m-N,s),a||(s=z(i,s,B))}return E(f,0,t+I(s)+o)}(e,null==r.level?6:r.level,null==r.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+r.mem,n,t,!o)};function G(e,r){void 0===r&&(r={});var n=function(){var e=1,r=0;return{p:function(n){for(var t=e,o=r,a=n.length,u=0;u!=a;){for(var f=Math.min(u+5552,a);u<f;++u)o+=t+=n[u];t%=65521,o%=65521}e=t,r=o},d:function(){return(e>>>8<<16|(255&r)<<8|r>>>8)+2*((255&e)<<23)}}}();n.p(e);var t=q(e,r,2,4);return function(e,r){var n=r.level,t=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=t<<6|(t?32-2*t:1)}(t,r),function(e,r,n){for(;n;++r)e[r]=n,n>>>=8}(t,t.length-4,n.d()),t}return e.pack=function(e){var r=f(f({},e),{v:"v1"});return function(e,r){var n="";if(!r&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var t=0;t<e.length;){var o=e[t++];o<128||r?n+=String.fromCharCode(o):o<224?n+=String.fromCharCode((31&o)<<6|63&e[t++]):o<240?n+=String.fromCharCode((15&o)<<12|(63&e[t++])<<6|63&e[t++]):(o=((15&o)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,n+=String.fromCharCode(55296|o>>10,56320|1023&o))}return n}(G(function(e,r){var n=e.length;if(!r&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var t=new c(e.length+(e.length>>>1)),o=0,a=function(e){t[o++]=e},u=0;u<n;++u){if(o+5>t.length){var f=new c(o+8+(n-u<<1));f.set(t),t=f}var i=e.charCodeAt(u);i<128||r?a(i):i<2048?(a(192|i>>>6),a(128|63&i)):i>55295&&i<57344?(a(240|(i=65536+(1047552&i)|1023&e.charCodeAt(++u))>>>18),a(128|i>>>12&63),a(128|i>>>6&63),a(128|63&i)):(a(224|i>>>12),a(128|i>>>6&63),a(128|63&i))}return E(t,0,o)}(JSON.stringify(r))),!0)},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
***************************************************************************** */var r,n,t,o,a,u,f=function(){return(f=Object.assign||function(e){for(var r,n=1,t=arguments.length;n<t;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)};!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"}(r||(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"}(n||(n={})),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"}(t||(t={})),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"}(o||(o={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked"}(a||(a={})),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"}(u||(u={}));var i="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.",c={map:{},getId:function(){return console.error(i),-1},getNode:function(){return console.error(i),null},removeNodeFromMap:function(){console.error(i)},has:function(){return console.error(i),!1},reset:function(){console.error(i)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(c=new Proxy(c,{get:function(e,r,n){return"map"===r&&console.error(i),Reflect.get(e,r,n)}}));var l=Uint8Array,s=Uint16Array,v=Uint32Array,h=new l([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),d=new l([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),m=new l([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),w=function(e,r){for(var n=new s(31),t=0;t<31;++t)n[t]=r+=1<<e[t-1];var o=new v(n[30]);for(t=1;t<30;++t)for(var a=n[t];a<n[t+1];++a)o[a]=a-n[t]<<5|t;return[n,o]},g=w(h,2),p=g[0],M=g[1];p[28]=258,M[258]=28;for(var y=w(d,0)[1],C=new s(32768),S=0;S<32768;++S){var D=(43690&S)>>>1|(21845&S)<<1;D=(61680&(D=(52428&D)>>>2|(13107&D)<<2))>>>4|(3855&D)<<4,C[S]=((65280&D)>>>8|(255&D)<<8)>>>1}var T=function(e,r,n){for(var t=e.length,o=0,a=new s(r);o<t;++o)++a[e[o]-1];var u,f=new s(r);for(o=0;o<r;++o)f[o]=f[o-1]+a[o-1]<<1;if(n){u=new s(1<<r);var i=15-r;for(o=0;o<t;++o)if(e[o])for(var c=o<<4|e[o],l=r-e[o],v=f[e[o]-1]++<<l,h=v|(1<<l)-1;v<=h;++v)u[C[v]>>>i]=c}else for(u=new s(t),o=0;o<t;++o)u[o]=C[f[e[o]-1]++]>>>15-e[o];return u},b=new l(288);for(S=0;S<144;++S)b[S]=8;for(S=144;S<256;++S)b[S]=9;for(S=256;S<280;++S)b[S]=7;for(S=280;S<288;++S)b[S]=8;var k=new l(32);for(S=0;S<32;++S)k[S]=5;var P=T(b,9,0),x=T(k,5,0),I=function(e){return(e/8>>0)+(7&e&&1)},E=function(e,r,n){(null==r||r<0)&&(r=0),(null==n||n>e.length)&&(n=e.length);var t=new(e instanceof s?s:e instanceof v?v:l)(n-r);return t.set(e.subarray(r,n)),t},F=function(e,r,n){n<<=7&r;var t=r/8>>0;e[t]|=n,e[t+1]|=n>>>8},R=function(e,r,n){n<<=7&r;var t=r/8>>0;e[t]|=n,e[t+1]|=n>>>8,e[t+2]|=n>>>16},A=function(e,r){for(var n=[],t=0;t<e.length;++t)e[t]&&n.push({s:t,f:e[t]});var o=n.length,a=n.slice();if(!o)return[new l(0),0];if(1==o){var u=new l(n[0].s+1);return u[n[0].s]=1,[u,1]}n.sort((function(e,r){return e.f-r.f})),n.push({s:-1,f:25001});var f=n[0],i=n[1],c=0,v=1,h=2;for(n[0]={s:-1,f:f.f+i.f,l:f,r:i};v!=o-1;)f=n[n[c].f<n[h].f?c++:h++],i=n[c!=v&&n[c].f<n[h].f?c++:h++],n[v++]={s:-1,f:f.f+i.f,l:f,r:i};var d=a[0].s;for(t=1;t<o;++t)a[t].s>d&&(d=a[t].s);var m=new s(d+1),w=L(n[v-1],m,0);if(w>r){t=0;var g=0,p=w-r,M=1<<p;for(a.sort((function(e,r){return m[r.s]-m[e.s]||e.f-r.f}));t<o;++t){var y=a[t].s;if(!(m[y]>r))break;g+=M-(1<<w-m[y]),m[y]=r}for(g>>>=p;g>0;){var C=a[t].s;m[C]<r?g-=1<<r-m[C]++-1:++t}for(;t>=0&&g;--t){var S=a[t].s;m[S]==r&&(--m[S],++g)}w=r}return[new l(m),w]},L=function(e,r,n){return-1==e.s?Math.max(L(e.l,r,n+1),L(e.r,r,n+1)):r[e.s]=n},O=function(e){for(var r=e.length;r&&!e[--r];);for(var n=new s(++r),t=0,o=e[0],a=1,u=function(e){n[t++]=e},f=1;f<=r;++f)if(e[f]==o&&f!=r)++a;else{if(!o&&a>2){for(;a>138;a-=138)u(32754);a>2&&(u(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(u(o),--a;a>6;a-=6)u(8304);a>2&&(u(a-3<<5|8208),a=0)}for(;a--;)u(o);a=1,o=e[f]}return[n.subarray(0,t),r]},U=function(e,r){for(var n=0,t=0;t<r.length;++t)n+=e[t]*r[t];return n},z=function(e,r,n){var t=n.length,o=I(r+2);e[o]=255&t,e[o+1]=t>>>8,e[o+2]=255^e[o],e[o+3]=255^e[o+1];for(var a=0;a<t;++a)e[o+a+4]=n[a];return 8*(o+4+t)},_=function(e,r,n,t,o,a,u,f,i,c,l){F(r,l++,n),++o[256];for(var v=A(o,15),w=v[0],g=v[1],p=A(a,15),M=p[0],y=p[1],C=O(w),S=C[0],D=C[1],I=O(M),E=I[0],L=I[1],_=new s(19),j=0;j<S.length;++j)_[31&S[j]]++;for(j=0;j<E.length;++j)_[31&E[j]]++;for(var B=A(_,7),N=B[0],V=B[1],J=19;J>4&&!N[m[J-1]];--J);var q,G,H,K,Q=c+5<<3,W=U(o,b)+U(a,k)+u,X=U(o,w)+U(a,M)+u+14+3*J+U(_,N)+(2*_[16]+3*_[17]+7*_[18]);if(Q<=W&&Q<=X)return z(r,l,e.subarray(i,i+c));if(F(r,l,1+(X<W)),l+=2,X<W){q=T(w,g,0),G=w,H=T(M,y,0),K=M;var Y=T(N,V,0);F(r,l,D-257),F(r,l+5,L-1),F(r,l+10,J-4),l+=14;for(j=0;j<J;++j)F(r,l+3*j,N[m[j]]);l+=3*J;for(var Z=[S,E],$=0;$<2;++$){var ee=Z[$];for(j=0;j<ee.length;++j){var re=31&ee[j];F(r,l,Y[re]),l+=N[re],re>15&&(F(r,l,ee[j]>>>5&127),l+=ee[j]>>>12)}}}else q=P,G=b,H=x,K=k;for(j=0;j<f;++j)if(t[j]>255){re=t[j]>>>18&31;R(r,l,q[re+257]),l+=G[re+257],re>7&&(F(r,l,t[j]>>>23&31),l+=h[re]);var ne=31&t[j];R(r,l,H[ne]),l+=K[ne],ne>3&&(R(r,l,t[j]>>>5&8191),l+=d[ne])}else R(r,l,q[t[j]]),l+=G[t[j]];return R(r,l,q[256]),l+G[256]},j=new v([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),B=new l(0),N=function(e,r,n,t,o){return function(e,r,n,t,o,a){var u=e.length,f=new l(t+u+5*(1+Math.floor(u/7e3))+o),i=f.subarray(t,f.length-o),c=0;if(!r||u<8)for(var m=0;m<=u;m+=65535){var w=m+65535;w<u?c=z(i,c,e.subarray(m,w)):(i[m]=a,c=z(i,c,e.subarray(m,u)))}else{for(var g=j[r-1],p=g>>>13,C=8191&g,S=(1<<n)-1,D=new s(32768),T=new s(S+1),b=Math.ceil(n/3),k=2*b,P=function(r){return(e[r]^e[r+1]<<b^e[r+2]<<k)&S},x=new v(25e3),F=new s(288),R=new s(32),A=0,L=0,O=(m=0,0),U=0,N=0;m<u;++m){var V=P(m),J=32767&m,q=T[V];if(D[J]=q,T[V]=J,U<=m){var G=u-m;if((A>7e3||O>24576)&&G>423){c=_(e,i,0,x,F,R,L,O,N,m-N,c),O=A=L=0,N=m;for(var H=0;H<286;++H)F[H]=0;for(H=0;H<30;++H)R[H]=0}var K=2,Q=0,W=C,X=J-q&32767;if(G>2&&V==P(m-X))for(var Y=Math.min(p,G)-1,Z=Math.min(32767,m),$=Math.min(258,G);X<=Z&&--W&&J!=q;){if(e[m+K]==e[m+K-X]){for(var ee=0;ee<$&&e[m+ee]==e[m+ee-X];++ee);if(ee>K){if(K=ee,Q=X,ee>Y)break;var re=Math.min(X,ee-2),ne=0;for(H=0;H<re;++H){var te=m-X+H+32768&32767,oe=te-D[te]+32768&32767;oe>ne&&(ne=oe,q=te)}}}X+=(J=q)-(q=D[J])+32768&32767}if(Q){x[O++]=268435456|M[K]<<18|y[Q];var ae=31&M[K],ue=31&y[Q];L+=h[ae]+d[ue],++F[257+ae],++R[ue],U=m+K,++A}else x[O++]=e[m],++F[e[m]]}}c=_(e,i,a,x,F,R,L,O,N,m-N,c),a||(c=z(i,c,B))}return E(f,0,t+I(c)+o)}(e,null==r.level?6:r.level,null==r.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+r.mem,n,t,!o)};function V(e,r){void 0===r&&(r={});var n=function(){var e=1,r=0;return{p:function(n){for(var t=e,o=r,a=n.length,u=0;u!=a;){for(var f=Math.min(u+5552,a);u<f;++u)o+=t+=n[u];t%=65521,o%=65521}e=t,r=o},d:function(){return(e>>>8<<16|(255&r)<<8|r>>>8)+2*((255&e)<<23)}}}();n.p(e);var t=N(e,r,2,4);return function(e,r){var n=r.level,t=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=t<<6|(t?32-2*t:1)}(t,r),function(e,r,n){for(;n;++r)e[r]=n,n>>>=8}(t,t.length-4,n.d()),t}return e.pack=function(e){var r=f(f({},e),{v:"v1"});return function(e,r){var n="";if(!r&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var t=0;t<e.length;){var o=e[t++];o<128||r?n+=String.fromCharCode(o):o<224?n+=String.fromCharCode((31&o)<<6|63&e[t++]):o<240?n+=String.fromCharCode((15&o)<<12|(63&e[t++])<<6|63&e[t++]):(o=((15&o)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,n+=String.fromCharCode(55296|o>>10,56320|1023&o))}return n}(V(function(e,r){var n=e.length;if(!r&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var t=new l(e.length+(e.length>>>1)),o=0,a=function(e){t[o++]=e},u=0;u<n;++u){if(o+5>t.length){var f=new l(o+8+(n-u<<1));f.set(t),t=f}var i=e.charCodeAt(u);i<128||r?a(i):i<2048?(a(192|i>>>6),a(128|63&i)):i>55295&&i<57344?(a(240|(i=65536+(1047552&i)|1023&e.charCodeAt(++u))>>>18),a(128|i>>>12&63),a(128|i>>>6&63),a(128|63&i)):(a(224|i>>>12),a(128|i>>>6&63),a(128|63&i))}return E(t,0,o)}(JSON.stringify(r))),!0)},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
//# sourceMappingURL=rrweb-record-pack.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,b,g,k=/^[^ \t\n\r\u000c]+/,S=/^[, \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(S),!(n>=t.length);){var a=r(k);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,b=n.maskInputFn,g=n.recordCanvas,k=n.keepIframeSrcFn;if(a.__sn){var S=a.__sn.id;r=1===S?void 0:S}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],_=N.name,D=N.value;E[_]=w(a,x,_,D)}if("link"===x&&m){var F,L=Array.from(a.styleSheets).find((function(e){return e.href===t.href}));(F=l(L))&&(delete E.rel,delete E.href,E._cssText=f(F,L.href))}if("style"===x&&t.sheet&&!(t.innerText||t.textContent||"").trim().length)(F=l(t.sheet))&&(E._cssText=f(F,I()));if("input"===x||"textarea"===x||"select"===x){D=t.value;"radio"!==E.type&&"checkbox"!==E.type&&"submit"!==E.type&&"button"!==E.type&&D?E.value=i({type:E.type,tagName:x,value:D,maskInputOptions:v,maskInputFn:b}):t.checked&&(E.checked=t.checked)}if("option"===x){var R=t.parentElement;E.value===R.value&&(E.selected=t.selected)}if("canvas"===x&&g&&(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 A=t.getBoundingClientRect(),P=A.width,z=A.height;E={class:E.class,rr_width:P+"px",rr_height:z+"px"}}return"iframe"!==x||k(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 V=t.parentNode&&t.parentNode.tagName,W=t.textContent,H="STYLE"===V||void 0,j="SCRIPT"===V||void 0;return H&&W&&(W=f(W,I())),j&&(W="SCRIPT_PLACEHOLDER"),!H&&!j&&T(t,d,p)&&W&&(W=y?y(W):W.replace(/[\S]/g,"*")),{type:e.Text,textContent:W||"",isStyle:H,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,b=n.maskTextFn,g=n.maskInputFn,k=n.slimDOMOptions,S=n.recordCanvas,C=void 0!==S&&S,I=n.onSerialize,w=n.onIframeLoad,T=n.iframeLoadTimeout,O=void 0===T?5e3:T,N=n.keepIframeSrcFn,_=void 0===N?function(){return!1}:N,D=n.preserveWhiteSpace,F=void 0===D||D,L=x(t,{doc:o,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,inlineStylesheet:h,maskInputOptions:y,maskTextFn:b,maskInputFn:g,recordCanvas:C,keepIframeSrcFn:_});if(!L)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}(L,k)&&(F||L.type!==e.Text||L.isStyle||L.textContent.replace(/^\s+|\s+$/gm,"").length)?s++:-2;var R=Object.assign(L,{id:r});if(t.__sn=R,-2===r)return null;i[r]=t,I&&I(t);var A=!m;if(R.type===e.Element&&(A=A&&!R.needBlock,delete R.needBlock),(R.type===e.Document||R.type===e.Element)&&A){k.headWhitespace&&L.type===e.Element&&"head"===L.tagName&&(F=!1);for(var P={doc:o,map:i,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,skipChild:m,inlineStylesheet:h,maskInputOptions:y,maskTextFn:b,maskInputFn:g,slimDOMOptions:k,recordCanvas:C,preserveWhiteSpace:F,onSerialize:I,onIframeLoad:w,iframeLoadTimeout:O,keepIframeSrcFn:_},z=0,V=Array.from(t.childNodes);z<V.length;z++){(j=M(V[z],P))&&R.childNodes.push(j)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(t)&&t.shadowRoot){R.isShadowHost=!0;for(var W=0,H=Array.from(t.shadowRoot.childNodes);W<H.length;W++){var j;(j=M(H[W],P))&&(j.isShadow=!0,R.childNodes.push(j))}}}return t.parentNode&&a(t.parentNode)&&(R.isShadow=!0),R.type===e.Element&&"iframe"===R.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:b,maskInputFn:g,slimDOMOptions:k,recordCanvas:C,preserveWhiteSpace:F,onSerialize:I,onIframeLoad:w,iframeLoadTimeout:O,keepIframeSrcFn:_});n&&w(t,n)}}),O),R}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"}(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"}(y||(y={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked"}(b||(b={})),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.",_={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 D(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 F(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 F(e,t,a||{},!0)}}function L(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 R(){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){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&&(_=new Proxy(_,{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}(),U=function(e,t){return e+"@"+t};function X(e){return"__sn"in e}var q=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&&P(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)&&!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;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 b=e.mirror.getId(v.value.parentNode),g=l(v.value);-1!==b&&-1!==g&&(y=v)}if(!y)for(var k=u.length-1;k>=0;k--){var S=u.get(k);b=e.mirror.getId(S.value.parentNode),g=l(S.value);if(-1!==b&&-1!==g){y=S;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;P(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})),P(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);P(n,e.blockClass)||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||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[U(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(!(P(t,e.blockClass)||n&&P(n,e.blockClass))){if(X(t)){if(z(t))return;e.movedSet.add(t);var r=null;n&&X(n)&&(r=n.__sn.id),r&&(e.movedMap[U(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 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 G=[];function J(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 Z(e,t,n,r,o,a,i,s,u,l,c,d,p,m,f,h){var v,y,b,g=new q;G.push(g),g.init(e,n,r,o,a,i,s,u,l,c,d,t,p,m,f);var k=window.MutationObserver||window.__rrMutationObserver,S=null===(b=null===(y=null===(v=window)||void 0===v?void 0:v.Zone)||void 0===y?void 0:y.__symbol__)||void 0===b?void 0:b.call(y,"MutationObserver");S&&window[S]&&(k=window[S]);var C=new k(g.processMutations.bind(g));return C.observe(h,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),C}function Q(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=J(o);if(!P(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 ee(e,t,n,r,o){return O("scroll",D((function(o){var a=J(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 te(e,n){var r=t({},e);return n||delete r.userTriggered,r}var ne=["INPUT","TEXTAREA","SELECT"],re=new WeakMap;function oe(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.canvasMutationCb,p=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.canvasMutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.canvasMutation&&t.canvasMutation.apply(t,o(e)),d.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)),p.apply(void 0,o(e))}}(e,r);var u,l,c,d=Z(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=D((function(t){var n=Date.now()-o;e(s.map((function(e){return e.timeOffset-=n,e})),t),s=[],o=null}),i),l=D((function(e){var t=J(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(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=Q(e.mouseInteractionCb,e.doc,e.mirror,e.blockClass,e.sampling),f=ee(e.scrollCb,e.doc,e.mirror,e.blockClass,e.sampling),h=(u=e.viewportResizeCb,l=-1,c=-1,O("resize",D((function(){var e=R(),t=A();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=J(e),r=e.isTrusted;if(t&&t.tagName&&!(ne.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,te({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,te({text:e.value,isChecked:!p,userTriggered:!1},d))}))}}}function m(n,o){var a=re.get(n);if(!a||a.text!==o.text||a.isChecked!==o.isChecked){re.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 F(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),g=function(e,t,n){var r=function(r){return function(o){var a=J(o);a&&!P(a,t)&&e({type:r,id:n.getId(a),currentTime:a.currentTime})}},o=[O("play",r(b.Play)),O("pause",r(b.Pause)),O("seeked",r(b.Seeked))];return function(){o.forEach((function(e){return e()}))}}(e.mediaInteractionCb,e.blockClass,e.mirror),k=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;return CSSStyleSheet.prototype.deleteRule=function(n){var o=t.getId(this.ownerNode);return-1!==o&&e({id:o,removes:[{index:n}]}),r.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=n,CSSStyleSheet.prototype.deleteRule=r}}(e.styleSheetRuleCb,e.mirror),S=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=L(CanvasRenderingContext2D.prototype,n,(function(a){return function(){for(var i=this,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];return P(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=F(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(){},C=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=L(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(){},I=[];try{for(var w=n(e.plugins),T=w.next();!T.done;T=w.next()){var x=T.value;I.push(x.observer(x.callback,x.options))}}catch(e){a={error:e}}finally{try{T&&!T.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}return function(){d.disconnect(),p(),m(),f(),h(),y(),g(),k(),S(),C(),I.forEach((function(e){return e()}))}}var ae,ie,se=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}(),ue=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){Z(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),ee(this.scrollCb,e,this.mirror,this.bypassOptions.blockClass,this.bypassOptions.sampling)},e}();function le(e){return t(t({},e),{timestamp:Date.now()})}var ce={map:{},getId:function(e){return 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 de(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,b=e.inlineStylesheet,g=void 0===b||b,k=e.maskAllInputs,S=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,_=e.mousemoveWait,D=e.recordCanvas,F=void 0!==D&&D,L=e.userTriggeredOnInput,P=void 0!==L&&L,z=e.collectFonts,V=void 0!==z&&z,j=e.plugins,B=e.keepIframeSrcFn,U=void 0===B?function(){return!1}:B;if(!n)throw new Error("emit function is required");void 0!==_&&void 0===N.mousemove&&(N.mousemove=_);var X,q,Y=!0===k?{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!==S?S:{password:!0},K=!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 $=0;ae=function(e,t){var r;if(!(null===(r=G[0])||void 0===r?void 0:r.isFrozen())||e.type===h.FullSnapshot||e.type===h.IncrementalSnapshot&&e.data.source===v.Mutation||G.forEach((function(e){return e.unfreeze()})),n(x?x(e):e,t),e.type===h.FullSnapshot)q=e,$=0;else if(e.type===h.IncrementalSnapshot){if(e.data.source===v.Mutation&&e.data.isAttachIframe)return;$++;var i=a&&$>=a,s=o&&e.timestamp-q.timestamp>o;(i||s)&&ie(!0)}};var J=function(e){ae(le({type:h.IncrementalSnapshot,data:t({source:v.Mutation},e)}))},Z=function(e){return ae(le({type:h.IncrementalSnapshot,data:t({source:v.Scroll},e)}))},Q=new se({mutationCb:J}),ee=new ue({mutationCb:J,scrollCb:Z,bypassOptions:{blockClass:s,blockSelector:l,maskTextClass:m,maskTextSelector:y,inlineStylesheet:g,maskInputOptions:Y,maskTextFn:w,maskInputFn:I,recordCanvas:F,sampling:N,slimDOMOptions:K,iframeManager:Q},mirror:ce});ie=function(e){var t,n,o,a;void 0===e&&(e=!1),ae(le({type:h.Meta,data:{href:window.location.href,width:A(),height:R()}}),e),G.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,b=n.maskInputFn,g=n.slimDOM,k=void 0!==g&&g,S=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:b,slimDOMOptions:!0===k||"all"===k?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===k,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===k?{}:k,recordCanvas:f,preserveWhiteSpace:S,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:Y,maskTextFn:w,slimDOM:K,recordCanvas:F,onSerialize:function(e){W(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");ce.map=c,ae(le({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}}})),G.forEach((function(e){return e.unlock()}))};try{var te=[];te.push(O("DOMContentLoaded",(function(){ae(le({type:h.DomContentLoaded,data:{}}))})));var ne=function(e){return oe({mutationCb:J,mousemoveCb:function(e,t){return ae(le({type:h.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return ae(le({type:h.IncrementalSnapshot,data:t({source:v.MouseInteraction},e)}))},scrollCb:Z,viewportResizeCb:function(e){return ae(le({type:h.IncrementalSnapshot,data:t({source:v.ViewportResize},e)}))},inputCb:function(e){return ae(le({type:h.IncrementalSnapshot,data:t({source:v.Input},e)}))},mediaInteractionCb:function(e){return ae(le({type:h.IncrementalSnapshot,data:t({source:v.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return ae(le({type:h.IncrementalSnapshot,data:t({source:v.StyleSheetRule},e)}))},canvasMutationCb:function(e){return ae(le({type:h.IncrementalSnapshot,data:t({source:v.CanvasMutation},e)}))},fontCb:function(e){return ae(le({type:h.IncrementalSnapshot,data:t({source:v.Font},e)}))},blockClass:s,ignoreClass:d,maskTextClass:m,maskTextSelector:y,maskInputOptions:Y,inlineStylesheet:g,sampling:N,recordCanvas:F,userTriggeredOnInput:P,collectFonts:V,doc:e,maskInputFn:I,maskTextFn:w,blockSelector:l,slimDOMOptions:K,mirror:ce,iframeManager:Q,shadowDomManager:ee,plugins:(null==j?void 0:j.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return ae(le({type:h.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},T)};Q.addLoadListener((function(e){te.push(ne(e.contentDocument))}));var re=function(){ie(),te.push(ne(document))};return"interactive"===document.readyState||"complete"===document.readyState?re():te.push(O("load",(function(){ae(le({type:h.Load,data:{}})),re()}),window)),function(){te.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}return de.addCustomEvent=function(e,t){if(!ae)throw new Error("please add custom event after start recording");ae(le({type:h.Custom,data:{tag:e,payload:t}}))},de.freezePage=function(){G.forEach((function(e){return e.freeze()}))},de.takeFullSnapshot=function(e){if(!ie)throw new Error("please take full snapshot after start recording");ie(e)},de.mirror=ce,de}();
***************************************************************************** */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 F,R=Array.from(a.styleSheets).find((function(e){return e.href===t.href}));(F=l(R))&&(delete E.rel,delete E.href,E._cssText=f(F,R.href))}if("style"===x&&t.sheet&&!(t.innerText||t.textContent||"").trim().length)(F=l(t.sheet))&&(E._cssText=f(F,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,F=void 0===_||_,R=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(!R)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}(R,S)&&(F||R.type!==e.Text||R.isStyle||R.textContent.replace(/^\s+|\s+$/gm,"").length)?s++:-2;var L=Object.assign(R,{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&&R.type===e.Element&&"head"===R.tagName&&(F=!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:F,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:F,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 F(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 F(e,t,a||{},!0)}}function R(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 $=[];function J(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 Z(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 Q(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=J(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 ee(e,t,n,r,o){return O("scroll",_((function(o){var a=J(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 te(e,n){var r=t({},e);return n||delete r.userTriggered,r}var ne=["INPUT","TEXTAREA","SELECT"],re=new WeakMap;function oe(e){return function(e,t){if(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 ae(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=Z(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=J(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=Q(e.mouseInteractionCb,e.doc,e.mirror,e.blockClass,e.sampling),f=ee(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=J(e),r=e.isTrusted;if(t&&t.tagName&&!(ne.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,te({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,te({text:e.value,isChecked:!p,userTriggered:!1},d))}))}}}function m(n,o){var a=re.get(n);if(!a||a.text!==o.text||a.isChecked!==o.isChecked){re.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 F(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=J(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;CSSStyleSheet.prototype.deleteRule=function(n){var o=t.getId(this.ownerNode);return-1!==o&&e({id:o,removes:[{index:n}]}),r.apply(this,arguments)};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(oe(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(oe(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:oe(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:oe(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=R(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=F(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=R(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 ie,se,ue=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}(),le=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){Z(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),ee(this.scrollCb,e,this.mirror,this.bypassOptions.blockClass,this.bypassOptions.sampling)},e}();function ce(e){return t(t({},e),{timestamp:Date.now()})}var de={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 pe(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,F=void 0!==_&&_,R=e.userTriggeredOnInput,A=void 0!==R&&R,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;ie=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)&&se(!0)}};var J=function(e){ie(ce({type:h.IncrementalSnapshot,data:t({source:v.Mutation},e)}))},Z=function(e){return ie(ce({type:h.IncrementalSnapshot,data:t({source:v.Scroll},e)}))},Q=new ue({mutationCb:J}),ee=new le({mutationCb:J,scrollCb:Z,bypassOptions:{blockClass:s,blockSelector:l,maskTextClass:m,maskTextSelector:y,inlineStylesheet:b,maskInputOptions:q,maskTextFn:w,maskInputFn:I,recordCanvas:F,sampling:N,slimDOMOptions:Y,iframeManager:Q},mirror:de});se=function(e){var t,n,o,a;void 0===e&&(e=!1),ie(ce({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:F,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");de.map=c,ie(ce({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(){ie(ce({type:h.DomContentLoaded,data:{}}))})));var ne=function(e){return ae({mutationCb:J,mousemoveCb:function(e,t){return ie(ce({type:h.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return ie(ce({type:h.IncrementalSnapshot,data:t({source:v.MouseInteraction},e)}))},scrollCb:Z,viewportResizeCb:function(e){return ie(ce({type:h.IncrementalSnapshot,data:t({source:v.ViewportResize},e)}))},inputCb:function(e){return ie(ce({type:h.IncrementalSnapshot,data:t({source:v.Input},e)}))},mediaInteractionCb:function(e){return ie(ce({type:h.IncrementalSnapshot,data:t({source:v.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return ie(ce({type:h.IncrementalSnapshot,data:t({source:v.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return ie(ce({type:h.IncrementalSnapshot,data:t({source:v.StyleDeclaration},e)}))},canvasMutationCb:function(e){return ie(ce({type:h.IncrementalSnapshot,data:t({source:v.CanvasMutation},e)}))},fontCb:function(e){return ie(ce({type:h.IncrementalSnapshot,data:t({source:v.Font},e)}))},blockClass:s,ignoreClass:d,maskTextClass:m,maskTextSelector:y,maskInputOptions:q,inlineStylesheet:b,sampling:N,recordCanvas:F,userTriggeredOnInput:A,collectFonts:V,doc:e,maskInputFn:I,maskTextFn:w,blockSelector:l,slimDOMOptions:Y,mirror:de,iframeManager:Q,shadowDomManager:ee,plugins:(null==j?void 0:j.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return ie(ce({type:h.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},T)};Q.addLoadListener((function(e){te.push(ne(e.contentDocument))}));var re=function(){se(),te.push(ne(document))};return"interactive"===document.readyState||"complete"===document.readyState?re():te.push(O("load",(function(){ie(ce({type:h.Load,data:{}})),re()}),window)),function(){te.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}return pe.addCustomEvent=function(e,t){if(!ie)throw new Error("please add custom event after start recording");ie(ce({type:h.Custom,data:{tag:e,payload:t}}))},pe.freezePage=function(){$.forEach((function(e){return e.freeze()}))},pe.takeFullSnapshot=function(e){if(!se)throw new Error("please take full snapshot after start recording");se(e)},pe.mirror=de,pe}();
//# sourceMappingURL=rrweb-record.min.js.map

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

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var t,n=function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function r(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 i(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.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 n=1,r=1;function i(e){var t=e.match(/\n/g);t&&(n+=t.length);var i=e.lastIndexOf("\n");r=-1===i?r+e.length:e.length-i}function o(){var e={line:n,column:r};return function(t){return t.position=new a(e),m(),t}}var a=function(e){this.start=e,this.end={line:n,column:r},this.source=t.source};a.prototype.content=e;var l=[];function u(i){var o=new Error(t.source+":"+n+":"+r+": "+i);if(o.reason=i,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o;l.push(o)}function d(){return h(/^{\s*/)}function f(){return h(/^}/)}function p(){var t,n=[];for(m(),v(n);e.length&&"}"!==e.charAt(0)&&(t=I()||C());)!1!==t&&(n.push(t),v(n));return n}function h(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function m(){h(/^\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 n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return u("End of comment missing");var a=e.slice(2,n-2);return r+=2,i(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function g(){var e=h(/^([^{]+)/);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=h(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=c(t[0]);if(!h(/^:\s*/))return u("property missing ':'");var r=h(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:n.replace(s,""),value:r?c(r[0]).replace(s,""):""});return h(/^[;\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 w(){for(var e,t=[],n=o();e=h(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),h(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:b()})}var x,E=N("import"),T=N("charset"),M=N("namespace");function N(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=o(),r=h(t);if(r){var i={type:e};return i[e]=r[1].trim(),n(i)}}}function I(){if("@"===e[0])return function(){var e=o(),t=h(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=h(/^([-\w]+)\s*/)))return u("@keyframes missing name");var r,i=t[1];if(!d())return u("@keyframes missing '{'");for(var a=v();r=w();)a.push(r),a=a.concat(v());return f()?e({type:"keyframes",name:i,vendor:n,keyframes:a}):u("@keyframes missing '}'")}}()||function(){var e=o(),t=h(/^@media *([^{]+)/);if(t){var n=c(t[1]);if(!d())return u("@media missing '{'");var r=v().concat(p());return f()?e({type:"media",media:n,rules:r}):u("@media missing '}'")}}()||function(){var e=o(),t=h(/^@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=h(/^@supports *([^{]+)/);if(t){var n=c(t[1]);if(!d())return u("@supports missing '{'");var r=v().concat(p());return f()?e({type:"supports",supports:n,rules:r}):u("@supports missing '}'")}}()||E()||T()||M()||function(){var e=o(),t=h(/^@([-\w]+)?document *([^{]+)/);if(t){var n=c(t[1]),r=c(t[2]);if(!d())return u("@document missing '{'");var i=v().concat(p());return f()?e({type:"document",document:r,vendor:n,rules:i}):u("@document missing '}'")}}()||function(){var e=o();if(h(/^@page */)){var t=g()||[];if(!d())return u("@page missing '{'");for(var n,r=v();n=S();)r.push(n),r=r.concat(v());return f()?e({type:"page",selectors:t,declarations:r}):u("@page missing '}'")}}()||function(){var e=o();if(h(/^@host\s*/)){if(!d())return u("@host missing '{'");var t=v().concat(p());return f()?e({type:"host",rules:t}):u("@host missing '}'")}}()||function(){var e=o();if(h(/^@font-face\s*/)){if(!d())return u("@font-face missing '{'");for(var t,n=v();t=S();)n.push(t),n=n.concat(v());return f()?e({type:"font-face",declarations:n}):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,n){for(var r=t&&"string"==typeof t.type,i=r?t:n,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)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((x=p(),{type:"stylesheet",stylesheet:{source:t.source,rules:x,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 p(e){var t=l(e,{silent:!0});if(!t.stylesheet)return e;var n=[];if(t.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){d.test(e)&&n.push(e)}))})),0===n.length)return e;var r=new RegExp(n.filter((function(e,t){return n.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g");return e.replace(r,(function(e){var t=e.replace(f,"$1.\\:hover");return e+", "+t}))}function h(e,n){var r=n.doc,i=n.hackCss;switch(e.type){case t.Document:return r.implementation.createDocument(null,"",null);case t.DocumentType:return r.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case t.Element:var o,a=function(e){var t=u[e.tagName]?u[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);o=e.isSVG?r.createElementNS("http://www.w3.org/2000/svg",a):r.createElement(a);var s=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var n=e.attributes[t];if(n="boolean"==typeof n||"number"==typeof n?"":n,t.startsWith("rr_")){if("canvas"===a&&"rr_dataURL"===t){var s=document.createElement("img");s.src=n,s.onload=function(){var e=o.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(o.style.width=n),"rr_height"===t&&(o.style.height=n),"rr_mediaCurrentTime"===t&&(o.currentTime=e.attributes.rr_mediaCurrentTime),"rr_mediaState"===t)switch(n){case"played":o.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":o.pause()}}else{var l="textarea"===a&&"value"===t,c="style"===a&&"_cssText"===t;if(c&&i&&(n=p(n)),l||c){for(var u=r.createTextNode(n),d=0,f=Array.from(o.childNodes);d<f.length;d++){var h=f[d];h.nodeType===o.TEXT_NODE&&o.removeChild(h)}return o.appendChild(u),"continue"}try{if(e.isSVG&&"xlink:href"===t)o.setAttributeNS("http://www.w3.org/1999/xlink",t,n);else if("onload"===t||"onclick"===t||"onmouse"===t.substring(0,7))o.setAttribute("_"+t,n);else{if("meta"===a&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===t)return o.setAttribute("csp-content",n),"continue";"link"===a&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===a&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")||o.setAttribute(t,n)}}catch(e){}}};for(var l in e.attributes)s(l);if(e.isShadowHost)if(o.shadowRoot)for(;o.shadowRoot.firstChild;)o.shadowRoot.removeChild(o.shadowRoot.firstChild);else o.attachShadow({mode:"open"});return o;case t.Text:return r.createTextNode(e.isStyle&&i?p(e.textContent):e.textContent);case t.CDATA:return r.createCDATASection(e.textContent);case t.Comment:return r.createComment(e.textContent);default:return null}}function m(e,n){var r=n.doc,i=n.map,o=n.skipChild,s=void 0!==o&&o,l=n.hackCss,c=void 0===l||l,u=n.afterAppend,d=h(e,{doc:r,hackCss:c});if(!d)return null;if(e.rootId&&console.assert(i[e.rootId]===r,"Target document should has the same root id."),e.type===t.Document&&(r.close(),r.open(),d=r),d.__sn=e,i[e.id]=d,(e.type===t.Document||e.type===t.Element)&&!s)for(var f=0,p=e.childNodes;f<p.length;f++){var v=p[f],y=m(v,{doc:r,map:i,skipChild:!1,hackCss:c,afterAppend:u});y?(v.isShadow&&a(d)&&d.shadowRoot?d.shadowRoot.appendChild(y):d.appendChild(y),u&&u(y)):console.warn("Failed to rebuild",v)}return d}function v(e,n){var r=n.doc,i=n.onVisit,o=n.hackCss,a={},s=m(e,{doc:r,map:a,skipChild:!1,hackCss:void 0===o||o,afterAppend:n.afterAppend});return function(e,t){for(var n in e)e[n]&&(r=e[n],t(r));var r}(a,(function(e){i&&i(e),function(e){var n=e.__sn;if(n.type===t.Element){var r=e;for(var i in n.attributes)if(n.attributes.hasOwnProperty(i)&&i.startsWith("rr_")){var o=n.attributes[i];"rr_scrollLeft"===i&&(r.scrollLeft=o),"rr_scrollTop"===i&&(r.scrollTop=o)}}}(e)})),[s,a]}function y(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map((function(e){e(n)})),(e["*"]||[]).slice().map((function(e){e(t,n)}))}}}var g,S,b,w,x,E=Object.freeze({__proto__:null,default:y});function T(e,t){if(void 0===e&&(e=window),void 0===t&&(t=document),!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||s,scrollIntoView:r.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?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)))},r.prototype.scroll=r.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)}},r.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))},r.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=f(this),r=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(h.call(this,n,n.scrollLeft+o.left-r.left,n.scrollTop+o.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.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,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function d(e){var t=c(e,"Y")&&u(e,"Y"),n=c(e,"X")&&u(e,"X");return t||n}function f(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}function p(t){var n,r,i,a,s=(o()-t.startTime)/468;a=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*a)),r=t.startX+(t.x-t.startX)*n,i=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,i),r===t.x&&i===t.y||e.requestAnimationFrame(p.bind(e,t))}function h(n,r,a){var l,c,u,d,f=o();n===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(l=n,c=n.scrollLeft,u=n.scrollTop,d=s),p({scrollable:l,method:d,startTime:f,startX:c,startY:u,x:r,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"}(g||(g={})),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"}(S||(S={})),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"}(b||(b={})),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"}(x||(x={}));var M,N=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,n=this;this.raf=requestAnimationFrame((function r(){var i=performance.now();for(n.timeOffset+=(i-e)*n.speed,e=i;t.length;){var o=t[0];if(!(n.timeOffset>=o.delay))break;t.shift(),o.doAction()}(t.length>0||n.liveMode)&&(n.raf=requestAnimationFrame(r))}))},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,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r;n=r-1}}return t},e}();function I(e,t){if(e.type===g.IncrementalSnapshot&&e.data.source===S.MouseMove){var n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-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),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}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
Copyright (c) Microsoft Corporation.
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(M||(M={}));var C={type:"xstate.init"};function D(e){return void 0===e?[]:[].concat(e)}function A(e){return{type:"xstate.assign",assignment:e}}function k(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 _(e){return function(t){return e===t}}function R(e){return"string"==typeof e?{type:e}:e}function F(e,t){return{value:e,context:t,actions:[],changed:!1,matches:_(e)}}function O(e,t){void 0===t&&(t={});var n={config:e,_options:t,initialState:{value:e.initial,actions:D(e.states[e.initial].entry).map((function(e){return k(e,t.actions)})),context:e.context,matches:_(e.initial)},transition:function(t,r){var i,o,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,l=a.context,c=R(r),u=e.states[s];if(u.on){var d=D(u.on[c.type]),f=function(t){if(void 0===t)return{value:F(s,l)};var r="string"==typeof t?{target:t}:t,i=r.target,o=void 0===i?s:i,a=r.actions,d=void 0===a?[]:a,f=r.cond,p=l;if((void 0===f?function(){return!0}:f)(l,c)){var h=e.states[o],m=!1,v=[].concat(u.exit,d,h.entry).filter((function(e){return e})).map((function(e){return k(e,n._options.actions)})).filter((function(e){if("xstate.assign"===e.type){m=!0;var t=Object.assign({},p);return"function"==typeof e.assignment?t=e.assignment(p,c):Object.keys(e.assignment).forEach((function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](p,c):e.assignment[n]})),p=t,!1}return!0}));return{value:{value:o,context:p,actions:v,changed:o!==s||v.length>0||m,matches:_(o)}}}};try{for(var p=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}(d),h=p.next();!h.done;h=p.next()){var m=f(h.value);if("object"==typeof m)return m.value}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}}return F(s,l)}};return n}var P=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function L(e){var t=e.initialState,n=M.NotStarted,r=new Set,i={_machine:e,send:function(i){n===M.Running&&(t=e.transition(t,i),P(t,R(i)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(r){if(r){var o="object"==typeof r?r:{context:e.config.context,value:r};t={value:o.value,actions:[],context:o.context,matches:_(o.value)}}return n=M.Running,P(t,C),i},stop:function(){return n=M.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}var j="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.",B={map:{},getId:function(){return console.error(j),-1},getNode:function(){return console.error(j),null},removeNodeFromMap:function(){console.error(j)},has:function(){return console.error(j),!1},reset:function(){console.error(j)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(B=new Proxy(B,{get:function(e,t,n){return"map"===t&&console.error(j),Reflect.get(e,t,n)}}));var V=function(){function e(){this.reset()}return e.prototype.add=function(e){var t=this.indexes.get(e.parentId),n={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(n.parent=t,t.children[n.id]=n):this.tree[n.id]=n,this.indexes.set(n.id,n)},e.prototype.remove=function(e,t){var n=this,r=this.indexes.get(e.parentId),i=this.indexes.get(e.id),o=function(e){n.removeIdSet.add(e);var r=t.getNode(e);null==r||r.childNodes.forEach((function(e){"__sn"in e&&o(e.__sn.id)}))},a=function(t){n.removeIdSet.add(t.id),Object.values(t.children).forEach((function(e){return a(e)}));var r=n.indexes.get(t.id);if(r){var i=r.parent;i&&(delete r.parent,delete i.children[r.id],n.indexes.delete(e.id))}};i?r?(delete i.parent,delete r.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,n,i,o=this,a=this.tree,s=this.removeNodeMutations,l=this.textMutations,c=this.attributeMutations,u={source:S.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=r(this.scrollMap.keys()),p=f.next();!p.done;p=f.next()){var h=p.value;this.removeIdSet.has(h)&&this.scrollMap.delete(h)}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}try{for(var m=r(this.inputMap.keys()),v=m.next();!v.done;v=m.next()){h=v.value;this.removeIdSet.has(h)&&this.inputMap.delete(h)}}catch(e){n={error:e}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.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}();function U(e){var t,n,i={},o=function(e,t){var n={value:e,parent:t,children:[]};return i[e.node.id]=n,n},a=[];try{for(var s=r(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&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a}function W(e,t){t(e.value);for(var n=e.children.length-1;n>=0;n--)W(e.children[n],t)}function z(e){return"__sn"in e&&(e.__sn.type===t.Element&&"iframe"===e.__sn.tagName)}function Y(e){var t;return Boolean(null===(t=e)||void 0===t?void 0:t.shadowRoot)}function X(e,t){var i=t.getCastFn,o=t.emitter;return L(O({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:A({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:A((function(e,t){var r=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(r=t.payload.timeOffset),n(n({},e),{timeOffset:r,baselineTime:e.events[0].timestamp+r})})),play:function(e){var t,n,a,s,l,c=e.timer,u=e.events,d=e.baselineTime,f=e.lastPlayedEvent;c.clear();try{for(var p=r(u),h=p.next();!h.done;h=p.next()){I(h.value,d)}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}var m=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===g.Meta&&r.timestamp<=t)return e.slice(n)}return e}(u,d),v=null==f?void 0:f.timestamp;(null==f?void 0:f.type)===g.IncrementalSnapshot&&f.data.source===S.MouseMove&&(v=f.timestamp+(null===(l=f.data.positions[0])||void 0===l?void 0:l.timeOffset)),d<(v||0)&&o.emit(x.PlayBack);var y=new Array,b=function(e){if(v&&v<d&&(e.timestamp<=v||e===f))return"continue";var t=e.timestamp<d;if(t&&!function(e){switch(e.type){case g.DomContentLoaded:case g.Load:case g.Custom:return!1;case g.FullSnapshot:case g.Meta:case g.Plugin:return!0}switch(e.data.source){case S.MouseMove:case S.MouseInteraction:case S.TouchMove:case S.MediaInteraction:return!1;case S.ViewportResize:case S.StyleSheetRule:case S.Scroll:case S.Input:return!0}return!0}(e))return"continue";var n=i(e,t);t?n():y.push({doAction:function(){n(),o.emit(x.EventCast,e)},delay:e.delay})};try{for(var w=r(m),E=w.next();!E.done;E=w.next()){b(E.value)}}catch(e){a={error:e}}finally{try{E&&!E.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}o.emit(x.Flush),c.addActions(y),c.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:A((function(e){return n(n({},e),{lastPlayedEvent:null})})),startLive:A({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:A((function(e,t){var r=e.baselineTime,a=e.timer,s=e.events;if("ADD_EVENT"===t.type){var l=t.payload.event;I(l,r);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<r,h=i(l,p);p?h():a.isActive()&&a.addAction({doAction:function(){h(),o.emit(x.EventCast,l)},delay:l.delay})}return n(n({},e),{events:s})}))}}))}var Q;function H(e,t){e.forEach((function(e){var n,r;if(e.type===Q.Insert)try{null===(n=t.sheet)||void 0===n||n.insertRule(e.cssText,e.index)}catch(e){}else if(e.type===Q.Remove)try{null===(r=t.sheet)||void 0===r||r.deleteRule(e.index)}catch(e){}else e.type===Q.Snapshot&&function(e,t){var n;try{var r=Array.from((null===(n=t.sheet)||void 0===n?void 0:n.cssRules)||[]).map((function(e){return e.cssText})),o=Object.entries(r).reverse(),a=r.length;o.forEach((function(n){var r,o=i(n,2),s=o[0],l=o[1],c=e.indexOf(l);if(-1===c||c>a)try{null===(r=t.sheet)||void 0===r||r.deleteRule(Number(s))}catch(e){}a=c})),e.forEach((function(e,n){var r,i,o;try{(null===(i=null===(r=t.sheet)||void 0===r?void 0:r.cssRules[n])||void 0===i?void 0:i.cssText)!==e&&(null===(o=t.sheet)||void 0===o||o.insertRule(e,n))}catch(e){}}))}catch(e){}}(e.cssTexts,t)}))}!function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot"}(Q||(Q={}));var G=y||E,q={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"},$=function(){function e(e,t){var n=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=G(),this.legacy_missingNodeRetryMap={},this.imageMap=new Map,this.mirror={map:{},getId:function(e){return 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={}}},this.firstFullSnapshot=null,this.newDocumentQueue=[],!(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:q};this.config=Object.assign({},i,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on(x.Resize,this.handleResize),this.setupDom(),this.treeIndex=new V,this.fragmentParentMap=new Map,this.elementStateMap=new Map,this.virtualStyleRulesMap=new Map,this.emitter.on(x.Flush,(function(){var e,t,i,o,a,s,l=n.treeIndex.flush(),c=l.scrollMap,u=l.inputMap;n.fragmentParentMap.forEach((function(e,t){return n.restoreRealParent(t,e)}));try{for(var d=r(n.virtualStyleRulesMap.keys()),f=d.next();!f.done;f=d.next()){var p=f.value;n.restoreNodeSheet(p)}}catch(t){e={error:t}}finally{try{f&&!f.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}n.fragmentParentMap.clear(),n.elementStateMap.clear(),n.virtualStyleRulesMap.clear();try{for(var h=r(c.values()),m=h.next();!m.done;m=h.next()){var v=m.value;n.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=r(u.values()),g=y.next();!g.done;g=y.next()){v=g.value;n.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(x.PlayBack,(function(){n.firstFullSnapshot=null,n.mirror.reset()}));var o=new N([],(null==t?void 0:t.speed)||i.speed);this.service=X({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,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){n.emitter.emit(x.StateChange,{player:e})})),this.speedService=L(O({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:A({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(e){n.emitter.emit(x.StateChange,{speed:e})}));var a=this.service.state.context.events.find((function(e){return e.type===g.Meta})),s=this.service.state.context.events.find((function(e){return e.type===g.FullSnapshot}));if(a){var l=a.data,c=l.width,u=l.height;setTimeout((function(){n.emitter.emit(x.Resize,{width:c,height:u})}),0)}s&&setTimeout((function(){n.firstFullSnapshot||(n.firstFullSnapshot=s,n.rebuildFullSnapshot(s),n.iframe.contentWindow.scrollTo(s.data.initialOffset))}),1)}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(n){t.config[n]=e[n]})),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(x.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(x.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(x.Resume)},e.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},e.prototype.addEvent=function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))},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.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&&(T(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,n;this.iframe.style.display="inherit";try{for(var i=r([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&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.getCastFn=function(e,t){var n,i=this;switch(void 0===t&&(t=!1),e.type){case g.DomContentLoaded:case g.Load:break;case g.Custom:n=function(){i.emitter.emit(x.CustomEvent,e)};break;case g.Meta:n=function(){return i.emitter.emit(x.Resize,{width:e.data.width,height:e.data.height})};break;case g.FullSnapshot:n=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 g.IncrementalSnapshot:n=function(){var n,o;if(i.applyIncremental(e,t),!t&&(e===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.backToNormal()),i.config.skipInactive&&!i.nextUserInteractionEvent)){try{for(var a=r(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){n={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.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(x.SkipStart,u)}}}}return function(){var o,a;n&&n();try{for(var s=r(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(x.Finish))};e.type===g.IncrementalSnapshot&&e.data.source===S.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 n,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=v(e.data.node,{doc:this.iframe.contentDocument,afterAppend:function(e){o.collectIframeAndAttachDocument(a,e)}})[1];var s=function(e,t){if(l.attachDocumentToIframe(e,t),l.newDocumentQueue=l.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var n=t.contentDocument,r=n.documentElement,i=n.head;l.insertStyleRules(r,i)}},l=this;try{for(var c=r(a),u=c.next();!u.done;u=c.next()){var d=u.value;s(d.mutationInQueue,d.builtNode)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.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(x.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()},e.prototype.insertStyleRules=function(e,t){var n=document.createElement("style");e.insertBefore(n,t);var r,i=(r=this.config.blockClass,["."+r+" { 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++)n.sheet.insertRule(i[o],o)},e.prototype.attachDocumentToIframe=function(e,t){var n,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}m(e.node,{doc:t.contentDocument,map:this.mirror.map,hackCss:!0,skipChild:!1,afterAppend:function(e){o.collectIframeAndAttachDocument(a,e)}});var u=function(e,t){if(d.attachDocumentToIframe(e,t),d.newDocumentQueue=d.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var n=t.contentDocument,r=n.documentElement,i=n.head;d.insertStyleRules(r,i)}},d=this;try{for(var f=r(a),p=f.next();!p.done;p=f.next()){var h=p.value;u(h.mutationInQueue,h.builtNode)}}catch(e){n={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}},e.prototype.collectIframeAndAttachDocument=function(e,t){if(z(t)){var n=this.newDocumentQueue.find((function(e){return e.parentId===t.__sn.id}));n&&e.push({mutationInQueue:n,builtNode:t})}},e.prototype.waitForStylesheetLoad=function(){var e,t=this,n=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(n){var r,i=new Set,o=this.service.state,a=function(){o=t.service.state};this.emitter.on(x.Start,a),this.emitter.on(x.Pause,a);var s=function(){t.emitter.off(x.Start,a),t.emitter.off(x.Pause,a)};n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(i.add(e),e.addEventListener("load",(function(){i.delete(e),0===i.size&&-1!==r&&(o.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(x.LoadStylesheetEnd),r&&window.clearTimeout(r),s())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(x.LoadStylesheetStart),r=window.setTimeout((function(){o.matches("playing")&&t.play(t.getCurrentTime()),r=-1,s()}),this.config.loadTimeout))}},e.prototype.preloadAllImages=function(){var e,t,n=this,i=(this.service.state,function(){n.service.state});this.emitter.on(x.Start,i),this.emitter.on(x.Pause,i);var o=0;try{for(var a=r(this.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(l.type===g.IncrementalSnapshot&&l.data.source===S.CanvasMutation&&"drawImage"===l.data.property&&"string"==typeof l.data.args[0]&&!this.imageMap.has(l)){o++;var c=document.createElement("canvas"),u=c.getContext("2d"),d=null==u?void 0:u.createImageData(c.width,c.height);null==d||d.data;JSON.parse(l.data.args[0]),null==u||u.putImageData(d,0,0)}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}0!==o&&this.service.send({type:"PAUSE"})},e.prototype.applyIncremental=function(e,t){var n,r,i=this,o=e.data;switch(o.source){case S.Mutation:t&&(o.adds.forEach((function(e){return i.treeIndex.add(e)})),o.texts.forEach((function(e){return i.treeIndex.text(e)})),o.attributes.forEach((function(e){return i.treeIndex.attribute(e)})),o.removes.forEach((function(e){return i.treeIndex.remove(e,i.mirror)})));try{this.applyMutation(o,t)}catch(e){this.warn("Exception in mutation "+(e.message||e),o)}break;case S.Drag:case S.TouchMove:case S.MouseMove:if(t){var a=o.positions[o.positions.length-1];this.moveAndHover(o,a.x,a.y,a.id)}else o.positions.forEach((function(t){var n={doAction:function(){i.moveAndHover(o,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-i.service.state.context.baselineTime};i.timer.addAction(n)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(n=o.positions[0])||void 0===n?void 0:n.timeOffset)});break;case S.MouseInteraction:if(-1===o.id)break;var s=new Event(b[o.type].toLowerCase());if(!(m=this.mirror.getNode(o.id)))return this.debugNodeNotFound(o,o.id);this.emitter.emit(x.MouseInteraction,{type:o.type,target:m});var l=this.config.triggerFocus;switch(o.type){case b.Blur:"blur"in m&&m.blur();break;case b.Focus:l&&m.focus&&m.focus({preventScroll:!0});break;case b.Click:case b.TouchStart:case b.TouchEnd:t||(this.moveAndHover(o,o.x,o.y,o.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:m.dispatchEvent(s)}break;case S.Scroll:if(-1===o.id)break;if(t){this.treeIndex.scroll(o);break}this.applyScroll(o);break;case S.ViewportResize:this.emitter.emit(x.Resize,{width:o.width,height:o.height});break;case S.Input:if(-1===o.id)break;if(t){this.treeIndex.input(o);break}this.applyInput(o);break;case S.MediaInteraction:if(!(m=this.mirror.getNode(o.id)))return this.debugNodeNotFound(o,o.id);var c=m;try{o.currentTime&&(c.currentTime=o.currentTime),o.type===w.Pause&&c.pause(),o.type===w.Play&&c.play()}catch(e){this.config.showWarning&&console.warn("Failed to replay media interactions: "+(e.message||e))}break;case S.StyleSheetRule:if(!(m=this.mirror.getNode(o.id)))return this.debugNodeNotFound(o,o.id);var u,d=m,f=m.parentNode,p=this.fragmentParentMap.has(f),h=p?null:d.sheet;h||(this.virtualStyleRulesMap.has(m)?u=this.virtualStyleRulesMap.get(m):(u=[],this.virtualStyleRulesMap.set(m,u))),o.adds&&o.adds.forEach((function(e){var t=e.rule,n=e.index;if(h)try{var r=void 0===n?void 0:Math.min(n,h.cssRules.length);try{h.insertRule(t,r)}catch(e){}}catch(e){}else null==u||u.push({cssText:t,index:n,type:Q.Insert})})),o.removes&&o.removes.forEach((function(e){var t=e.index;if(p)null==u||u.push({index:t,type:Q.Remove});else try{null==h||h.deleteRule(t)}catch(e){}}));break;case S.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var m;if(!(m=this.mirror.getNode(o.id)))return this.debugNodeNotFound(o,o.id);try{var v=m.getContext("2d");if(o.setter)return void(v[o.property]=o.args[0]);var y=v[o.property];if("drawImage"===o.property&&"string"==typeof o.args[0]){var g=this.imageMap.get(e);o.args[0]=g,y.apply(v,o.args)}else y.apply(v,o.args)}catch(e){this.warnCanvasMutationFailed(o,o.id,e)}break;case S.Font:try{var E=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);null===(r=this.iframe.contentDocument)||void 0===r||r.fonts.add(E)}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 n=s.mirror.getNode(t.id);if(!n){if(e.removes.find((function(e){return e.id===t.parentId})))return;return s.warnNodeNotFound(e,t.id)}var r=s.mirror.getNode(t.parentId);if(!r)return s.warnNodeNotFound(e,t.parentId);if(t.isShadow&&Y(r)&&(r=r.shadowRoot),s.mirror.removeNodeFromMap(n),r){var i=null,o="__sn"in r?s.fragmentParentMap.get(r):void 0;o&&o.contains(n)?r=o:s.fragmentParentMap.has(n)&&(i=s.fragmentParentMap.get(n),s.fragmentParentMap.delete(n),n=i);try{r.removeChild(n)}catch(t){if(!(t instanceof DOMException))throw t;s.warn("parent could not remove child in mutation",r,o,n,i,e)}}}));var l=n({},this.legacy_missingNodeRetryMap),c=[],u=function(e){var n,r;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===(r=(n=o).getElementsByTagName)||void 0===r?void 0:r.call(n,"iframe").length)>0;if(i&&a&&!z(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&&Y(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(z(o))s.attachDocumentToIframe(e,o);else{var v=m(e.node,{doc:h,map:s.mirror.map,skipChild:!0,hackCss:!0});if(-1!==e.previousId&&-1!==e.nextId){if(f&&f.nextSibling&&f.nextSibling.parentNode)o.insertBefore(v,f.nextSibling);else if(p&&p.parentNode)o.contains(p)?o.insertBefore(v,p):o.insertBefore(v,null);else{if(o===h)for(;h.firstChild;)h.removeChild(h.firstChild);o.appendChild(v)}if(z(v)){var y=s.newDocumentQueue.find((function(e){return e.parentId===v.__sn.id}));if(y&&(s.attachDocumentToIframe(y,v),s.newDocumentQueue=s.newDocumentQueue.filter((function(e){return e!==y}))),v.contentDocument){var g=v.contentDocument,S=g.documentElement,b=g.head;s.insertStyleRules(S,b)}}(e.previousId||e.nextId)&&s.legacy_resolveMissingNode(l,o,v,e)}else l[e.node.id]={node:v,mutation:e}}}};e.adds.forEach((function(e){u(e)}));for(var d=Date.now();c.length;){var f=U(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,r(f)),h=p.next();!h.done;h=p.next()){var v=h.value;this.mirror.getNode(v.value.parentId)?W(v,(function(e){u(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",v)}}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 n=s.mirror.getNode(t.id);if(!n){if(e.removes.find((function(e){return e.id===t.id})))return;return s.warnNodeNotFound(e,t.id)}s.fragmentParentMap.has(n)&&(n=s.fragmentParentMap.get(n)),n.textContent=t.value})),e.attributes.forEach((function(t){var n=s.mirror.getNode(t.id);if(!n){if(e.removes.find((function(e){return e.id===t.id})))return;return s.warnNodeNotFound(e,t.id)}for(var r in s.fragmentParentMap.has(n)&&(n=s.fragmentParentMap.get(n)),t.attributes)if("string"==typeof r){var i=t.attributes[r];if(null===i)n.removeAttribute(r);else if("string"==typeof i)try{n.setAttribute(r,i)}catch(e){s.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",e)}else if("style"===r){var o=i,a=n;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,n,r){var i=r.previousId,o=r.nextId,a=i&&e[i],s=o&&e[o];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,n),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,n.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,n,r){var i=this.mirror.getNode(r);if(!i)return this.debugNodeNotFound(e,r);var o=function e(t,n){var r,i,o=null===(i=null===(r=t.ownerDocument)||void 0===r?void 0:r.defaultView)||void 0===i?void 0:i.frameElement;if(!o||o===n)return{x:0,y:0,relativeScale:1,absoluteScale:1};var a=o.getBoundingClientRect(),s=e(o,n),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}}(i,this.iframe),a=t*o.absoluteScale+o.x,s=n*o.absoluteScale+o.y;this.mouse.style.left=a+"px",this.mouse.style.top=s+"px",this.drawMouseTail({x:a,y:s}),this.hoverElements(i)},e.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?q:Object.assign({},q,this.config.mouseTail),r=n.lineCap,i=n.lineWidth,o=n.strokeStyle,a=n.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=r,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 n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement},e.prototype.isUserInteraction=function(e){return e.type===g.IncrementalSnapshot&&(e.data.source>S.Mutation&&e.data.source<=S.Input)},e.prototype.backToNormal=function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(x.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},e.prototype.restoreRealParent=function(e,n){this.mirror.map[n.__sn.id]=n,n.__sn.type===t.Element&&"textarea"===n.__sn.tagName&&e.textContent&&(n.value=e.textContent),n.appendChild(e),this.restoreState(n)},e.prototype.storeState=function(e){var t,n;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 n;try{var r=Array.from((null===(n=e.sheet)||void 0===n?void 0:n.cssRules)||[]).map((function(e){return e.cssText}));t.set(e,[{type:Q.Snapshot,cssTexts:r}])}catch(e){}}(i,this.virtualStyleRulesMap);var o=i.children;try{for(var a=r(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&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}},e.prototype.restoreState=function(e){var t,n;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=r(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&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}}},e.prototype.restoreNodeSheet=function(e){var t=this.virtualStyleRulesMap.get(e);"STYLE"===e.nodeName&&(t&&H(t,e))},e.prototype.warnNodeNotFound=function(e,t){this.treeIndex.removeIdSet.has(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,n){this.warn("Has error on update canvas '"+t+"'",e,n)},e.prototype.debugNodeNotFound=function(e,t){this.treeIndex.removeIdSet.has(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=$,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function 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 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 _(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:_(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 P(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:_(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 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:_(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:_(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);var o=0;try{for(var a=n(this.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(l.type===S.IncrementalSnapshot&&l.data.source===b.CanvasMutation&&"drawImage"===l.data.property&&"string"==typeof l.data.args[0]&&!this.imageMap.has(l)){o++;var c=document.createElement("canvas"),u=c.getContext("2d"),d=null==u?void 0:u.createImageData(c.width,c.height);null==d||d.data;JSON.parse(l.data.args[0]),null==u||u.putImageData(d,0,0)}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}0!==o&&this.service.send({type:"PAUSE"})},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}({});
//# sourceMappingURL=rrweb-replay.min.js.map
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
Copyright (c) Microsoft Corporation.
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var t;!function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped";}(t||(t={}));var n={type:"xstate.init"};function e(t){return void 0===t?[]:[].concat(t)}function r(t){return {type:"xstate.assign",assignment:t}}function i(t,n){return "string"==typeof(t="string"==typeof t&&n&&n[t]?n[t]:t)?{type:t}:"function"==typeof t?{type:t.name,exec:t}:t}function o(t){return function(n){return t===n}}function a(t){return "string"==typeof t?{type:t}:t}function u(t,n){return {value:t,context:n,actions:[],changed:!1,matches:o(t)}}function c(t,n){void 0===n&&(n={});var r={config:t,_options:n,initialState:{value:t.initial,actions:e(t.states[t.initial].entry).map((function(t){return i(t,n.actions)})),context:t.context,matches:o(t.initial)},transition:function(n,c){var s,f,v="string"==typeof n?{value:n,context:t.context}:n,l=v.value,p=v.context,g=a(c),y=t.states[l];if(y.on){var d=e(y.on[g.type]),x=function(n){if(void 0===n)return {value:u(l,p)};var e="string"==typeof n?{target:n}:n,a=e.target,c=void 0===a?l:a,s=e.actions,f=void 0===s?[]:s,v=e.cond,d=p;if((void 0===v?function(){return !0}:v)(p,g)){var x=t.states[c],m=!1,h=[].concat(y.exit,f,x.entry).filter((function(t){return t})).map((function(t){return i(t,r._options.actions)})).filter((function(t){if("xstate.assign"===t.type){m=!0;var n=Object.assign({},d);return "function"==typeof t.assignment?n=t.assignment(d,g):Object.keys(t.assignment).forEach((function(e){n[e]="function"==typeof t.assignment[e]?t.assignment[e](d,g):t.assignment[e];})),d=n,!1}return !0}));return {value:{value:c,context:d,actions:h,changed:c!==l||h.length>0||m,matches:o(c)}}}};try{for(var m=function(t){var n="function"==typeof Symbol&&t[Symbol.iterator],e=0;return n?n.call(t):{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}}}(d),h=m.next();!h.done;h=m.next()){var S=x(h.value);if("object"==typeof S)return S.value}}catch(t){s={error:t};}finally{try{h&&!h.done&&(f=m.return)&&f.call(m);}finally{if(s)throw s.error}}}return u(l,p)}};return r}var s=function(t,n){return t.actions.forEach((function(e){var r=e.exec;return r&&r(t.context,n)}))};function f(e){var r=e.initialState,i=t.NotStarted,u=new Set,c={_machine:e,send:function(n){i===t.Running&&(r=e.transition(r,n),s(r,a(n)),u.forEach((function(t){return t(r)})));},subscribe:function(t){return u.add(t),t(r),{unsubscribe:function(){return u.delete(t)}}},start:function(a){if(a){var u="object"==typeof a?a:{context:e.config.context,value:a};r={value:u.value,actions:[],context:u.context,matches:o(u.value)};}return i=t.Running,s(r,n),c},stop:function(){return i=t.Stopped,u.clear(),c},get state(){return r},get status(){return i}};return c}
function t(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,o,i=e.call(t),a=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)a.push(r.value);}catch(t){o={error:t};}finally{try{r&&!r.done&&(e=i.return)&&e.call(i);}finally{if(o)throw o.error}}return a}var n;!function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped";}(n||(n={}));var e={type:"xstate.init"};function r(t){return void 0===t?[]:[].concat(t)}function o(t){return {type:"xstate.assign",assignment:t}}function i(t,n){return "string"==typeof(t="string"==typeof t&&n&&n[t]?n[t]:t)?{type:t}:"function"==typeof t?{type:t.name,exec:t}:t}function a(t){return function(n){return t===n}}function u(t){return "string"==typeof t?{type:t}:t}function c(t,n){return {value:t,context:n,actions:[],changed:!1,matches:a(t)}}function f(t,n,e){var r=n,o=!1;return [t.filter((function(t){if("xstate.assign"===t.type){o=!0;var n=Object.assign({},r);return "function"==typeof t.assignment?n=t.assignment(r,e):Object.keys(t.assignment).forEach((function(o){n[o]="function"==typeof t.assignment[o]?t.assignment[o](r,e):t.assignment[o];})),r=n,!1}return !0})),r,o]}function s(n,o){void 0===o&&(o={});var s=t(f(r(n.states[n.initial].entry).map((function(t){return i(t,o.actions)})),n.context,e),2),l=s[0],v=s[1],y={config:n,_options:o,initialState:{value:n.initial,actions:l,context:v,matches:a(n.initial)},transition:function(e,o){var s,l,v="string"==typeof e?{value:e,context:n.context}:e,p=v.value,g=v.context,d=u(o),x=n.states[p];if(x.on){var m=r(x.on[d.type]);try{for(var h=function(t){var n="function"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return {next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}(m),b=h.next();!b.done;b=h.next()){var S=b.value;if(void 0===S)return c(p,g);var w="string"==typeof S?{target:S}:S,j=w.target,E=w.actions,R=void 0===E?[]:E,N=w.cond,O=void 0===N?function(){return !0}:N,_=void 0===j,k=null!=j?j:p,T=n.states[k];if(O(g,d)){var q=t(f((_?r(R):[].concat(x.exit,R,T.entry).filter((function(t){return t}))).map((function(t){return i(t,y._options.actions)})),g,d),3),z=q[0],A=q[1],B=q[2],C=null!=j?j:p;return {value:C,context:A,actions:z,changed:j!==p||z.length>0||B,matches:a(C)}}}}catch(t){s={error:t};}finally{try{b&&!b.done&&(l=h.return)&&l.call(h);}finally{if(s)throw s.error}}}return c(p,g)}};return y}var l=function(t,n){return t.actions.forEach((function(e){var r=e.exec;return r&&r(t.context,n)}))};function v(t){var r=t.initialState,o=n.NotStarted,i=new Set,c={_machine:t,send:function(e){o===n.Running&&(r=t.transition(r,e),l(r,u(e)),i.forEach((function(t){return t(r)})));},subscribe:function(t){return i.add(t),t(r),{unsubscribe:function(){return i.delete(t)}}},start:function(i){if(i){var u="object"==typeof i?i:{context:t.config.context,value:i};r={value:u.value,actions:[],context:u.context,matches:a(u.value)};}return o=n.Running,l(r,e),c},stop:function(){return o=n.Stopped,i.clear(),c},get state(){return r},get status(){return o}};return c}
export { t as InterpreterStatus, r as assign, c as createMachine, f as interpret };
export { n as InterpreterStatus, o as assign, s as createMachine, v as interpret };

@@ -102,5 +102,5 @@ // DEFLATE is a complex format; to read this code, you should probably check the RFC first:

// fixed length map
var flm = hMap(flt, 9, 0), flrm = hMap(flt, 9, 1);
var flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);
// fixed distance map
var fdm = hMap(fdt, 5, 0), fdrm = hMap(fdt, 5, 1);
var fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);
// find max of array

@@ -165,4 +165,2 @@ var max = function (a) {

var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;
if (final && !lm)
return buf;
// total bits

@@ -254,3 +252,3 @@ var tbts = sl * 8;

// Make sure the buffer can hold this + the largest possible addition
// maximum chunk size (practically, theoretically infinite) is 2^17;
// Maximum chunk size (practically, theoretically infinite) is 2^17;
if (noBuf)

@@ -537,5 +535,5 @@ cbuf(bt + 131072);

// deflate options (nice << 13) | chain
var deo = new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);
var deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);
// empty
var et = new u8(0);
var et = /*#__PURE__*/ new u8(0);
// compresses data into a raw DEFLATE buffer

@@ -662,10 +660,2 @@ var dflt = function (dat, lvl, plvl, pre, post, lst) {

};
// CRC32 table
var crct = new u32(256);
for (var i = 0; i < 256; ++i) {
var c = i, k = 9;
while (--k)
c = ((c & 1) && 0xEDB88320) ^ (c >>> 1);
crct[i] = c;
}
// Alder32

@@ -672,0 +662,0 @@ var adler = function () {

@@ -55,103 +55,138 @@ 'use strict';

function pathToSelector(node) {
if (!node || !node.outerHTML) {
return '';
}
var path = '';
while (node.parentElement) {
var name = node.localName;
if (!name) {
break;
}
name = name.toLowerCase();
var parent = 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 (sibling.localName && sibling.localName.toLowerCase) {
if (sibling.localName.toLowerCase() === name) {
domSiblings.push(sibling);
}
}
var EventType;
(function (EventType) {
EventType[EventType["DomContentLoaded"] = 0] = "DomContentLoaded";
EventType[EventType["Load"] = 1] = "Load";
EventType[EventType["FullSnapshot"] = 2] = "FullSnapshot";
EventType[EventType["IncrementalSnapshot"] = 3] = "IncrementalSnapshot";
EventType[EventType["Meta"] = 4] = "Meta";
EventType[EventType["Custom"] = 5] = "Custom";
EventType[EventType["Plugin"] = 6] = "Plugin";
})(EventType || (EventType = {}));
var IncrementalSource;
(function (IncrementalSource) {
IncrementalSource[IncrementalSource["Mutation"] = 0] = "Mutation";
IncrementalSource[IncrementalSource["MouseMove"] = 1] = "MouseMove";
IncrementalSource[IncrementalSource["MouseInteraction"] = 2] = "MouseInteraction";
IncrementalSource[IncrementalSource["Scroll"] = 3] = "Scroll";
IncrementalSource[IncrementalSource["ViewportResize"] = 4] = "ViewportResize";
IncrementalSource[IncrementalSource["Input"] = 5] = "Input";
IncrementalSource[IncrementalSource["TouchMove"] = 6] = "TouchMove";
IncrementalSource[IncrementalSource["MediaInteraction"] = 7] = "MediaInteraction";
IncrementalSource[IncrementalSource["StyleSheetRule"] = 8] = "StyleSheetRule";
IncrementalSource[IncrementalSource["CanvasMutation"] = 9] = "CanvasMutation";
IncrementalSource[IncrementalSource["Font"] = 10] = "Font";
IncrementalSource[IncrementalSource["Log"] = 11] = "Log";
IncrementalSource[IncrementalSource["Drag"] = 12] = "Drag";
IncrementalSource[IncrementalSource["StyleDeclaration"] = 13] = "StyleDeclaration";
})(IncrementalSource || (IncrementalSource = {}));
var MouseInteractions;
(function (MouseInteractions) {
MouseInteractions[MouseInteractions["MouseUp"] = 0] = "MouseUp";
MouseInteractions[MouseInteractions["MouseDown"] = 1] = "MouseDown";
MouseInteractions[MouseInteractions["Click"] = 2] = "Click";
MouseInteractions[MouseInteractions["ContextMenu"] = 3] = "ContextMenu";
MouseInteractions[MouseInteractions["DblClick"] = 4] = "DblClick";
MouseInteractions[MouseInteractions["Focus"] = 5] = "Focus";
MouseInteractions[MouseInteractions["Blur"] = 6] = "Blur";
MouseInteractions[MouseInteractions["TouchStart"] = 7] = "TouchStart";
MouseInteractions[MouseInteractions["TouchMove_Departed"] = 8] = "TouchMove_Departed";
MouseInteractions[MouseInteractions["TouchEnd"] = 9] = "TouchEnd";
MouseInteractions[MouseInteractions["TouchCancel"] = 10] = "TouchCancel";
})(MouseInteractions || (MouseInteractions = {}));
var MediaInteractions;
(function (MediaInteractions) {
MediaInteractions[MediaInteractions["Play"] = 0] = "Play";
MediaInteractions[MediaInteractions["Pause"] = 1] = "Pause";
MediaInteractions[MediaInteractions["Seeked"] = 2] = "Seeked";
})(MediaInteractions || (MediaInteractions = {}));
var ReplayerEvents;
(function (ReplayerEvents) {
ReplayerEvents["Start"] = "start";
ReplayerEvents["Pause"] = "pause";
ReplayerEvents["Resume"] = "resume";
ReplayerEvents["Resize"] = "resize";
ReplayerEvents["Finish"] = "finish";
ReplayerEvents["FullsnapshotRebuilded"] = "fullsnapshot-rebuilded";
ReplayerEvents["LoadStylesheetStart"] = "load-stylesheet-start";
ReplayerEvents["LoadStylesheetEnd"] = "load-stylesheet-end";
ReplayerEvents["SkipStart"] = "skip-start";
ReplayerEvents["SkipEnd"] = "skip-end";
ReplayerEvents["MouseInteraction"] = "mouse-interaction";
ReplayerEvents["EventCast"] = "event-cast";
ReplayerEvents["CustomEvent"] = "custom-event";
ReplayerEvents["Flush"] = "flush";
ReplayerEvents["StateChange"] = "state-change";
ReplayerEvents["PlayBack"] = "play-back";
})(ReplayerEvents || (ReplayerEvents = {}));
var NodeType;
(function (NodeType) {
NodeType[NodeType["Document"] = 0] = "Document";
NodeType[NodeType["DocumentType"] = 1] = "DocumentType";
NodeType[NodeType["Element"] = 2] = "Element";
NodeType[NodeType["Text"] = 3] = "Text";
NodeType[NodeType["CDATA"] = 4] = "CDATA";
NodeType[NodeType["Comment"] = 5] = "Comment";
})(NodeType || (NodeType = {}));
var DEPARTED_MIRROR_ACCESS_WARNING = 'Please stop import mirror directly. Instead of that,' +
'\r\n' +
'now you can use replayer.getMirror() to access the mirror instance of a replayer,' +
'\r\n' +
'or you can use record.mirror to access the mirror instance during recording.';
var _mirror = {
map: {},
getId: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
return -1;
},
getNode: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
return null;
},
removeNodeFromMap: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
},
has: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
return false;
},
reset: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
},
};
if (typeof window !== 'undefined' && window.Proxy && window.Reflect) {
_mirror = new Proxy(_mirror, {
get: function (target, prop, receiver) {
if (prop === 'map') {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
}
}
if (domSiblings.length > 1) {
name += ':eq(' + domSiblings.indexOf(node) + ')';
}
path = name + (path ? '>' + path : '');
node = parent;
}
return path;
return Reflect.get(target, prop, receiver);
},
});
}
function stringify(obj, stringifyOptions) {
var options = {
numOfKeysLimit: 50,
};
Object.assign(options, stringifyOptions);
var stack = [];
var keys = [];
return JSON.stringify(obj, function (key, value) {
if (stack.length > 0) {
var thisPos = stack.indexOf(this);
~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
if (~stack.indexOf(value)) {
if (stack[0] === value) {
value = '[Circular ~]';
}
else {
value =
'[Circular ~.' +
keys.slice(0, stack.indexOf(value)).join('.') +
']';
}
}
function patch(source, name, replacement) {
try {
if (!(name in source)) {
return function () { };
}
else {
stack.push(value);
var original_1 = source[name];
var wrapped = replacement(original_1);
if (typeof wrapped === 'function') {
wrapped.prototype = wrapped.prototype || {};
Object.defineProperties(wrapped, {
__rrweb_original__: {
enumerable: false,
value: original_1,
},
});
}
if (value === null || value === undefined) {
return value;
}
if (shouldToString(value)) {
return toString(value);
}
if (value instanceof Event) {
var eventResult = {};
for (var eventKey in value) {
var eventValue = value[eventKey];
if (Array.isArray(eventValue)) {
eventResult[eventKey] = pathToSelector(eventValue.length ? eventValue[0] : null);
}
else {
eventResult[eventKey] = eventValue;
}
}
return eventResult;
}
else if (value instanceof Node) {
if (value instanceof HTMLElement) {
return value ? value.outerHTML : '';
}
return value.nodeName;
}
return value;
});
function shouldToString(_obj) {
if (typeof _obj === 'object' &&
Object.keys(_obj).length > options.numOfKeysLimit) {
return true;
}
if (typeof _obj === 'function') {
return true;
}
return false;
source[name] = wrapped;
return function () {
source[name] = original_1;
};
}
function toString(_obj) {
var str = _obj.toString();
if (options.stringLengthLimit && str.length > options.stringLengthLimit) {
str = str.slice(0, options.stringLengthLimit) + "...";
}
return str;
catch (_a) {
return function () { };
}

@@ -335,137 +370,133 @@ }

var EventType;
(function (EventType) {
EventType[EventType["DomContentLoaded"] = 0] = "DomContentLoaded";
EventType[EventType["Load"] = 1] = "Load";
EventType[EventType["FullSnapshot"] = 2] = "FullSnapshot";
EventType[EventType["IncrementalSnapshot"] = 3] = "IncrementalSnapshot";
EventType[EventType["Meta"] = 4] = "Meta";
EventType[EventType["Custom"] = 5] = "Custom";
EventType[EventType["Plugin"] = 6] = "Plugin";
})(EventType || (EventType = {}));
var IncrementalSource;
(function (IncrementalSource) {
IncrementalSource[IncrementalSource["Mutation"] = 0] = "Mutation";
IncrementalSource[IncrementalSource["MouseMove"] = 1] = "MouseMove";
IncrementalSource[IncrementalSource["MouseInteraction"] = 2] = "MouseInteraction";
IncrementalSource[IncrementalSource["Scroll"] = 3] = "Scroll";
IncrementalSource[IncrementalSource["ViewportResize"] = 4] = "ViewportResize";
IncrementalSource[IncrementalSource["Input"] = 5] = "Input";
IncrementalSource[IncrementalSource["TouchMove"] = 6] = "TouchMove";
IncrementalSource[IncrementalSource["MediaInteraction"] = 7] = "MediaInteraction";
IncrementalSource[IncrementalSource["StyleSheetRule"] = 8] = "StyleSheetRule";
IncrementalSource[IncrementalSource["CanvasMutation"] = 9] = "CanvasMutation";
IncrementalSource[IncrementalSource["Font"] = 10] = "Font";
IncrementalSource[IncrementalSource["Log"] = 11] = "Log";
IncrementalSource[IncrementalSource["Drag"] = 12] = "Drag";
})(IncrementalSource || (IncrementalSource = {}));
var MouseInteractions;
(function (MouseInteractions) {
MouseInteractions[MouseInteractions["MouseUp"] = 0] = "MouseUp";
MouseInteractions[MouseInteractions["MouseDown"] = 1] = "MouseDown";
MouseInteractions[MouseInteractions["Click"] = 2] = "Click";
MouseInteractions[MouseInteractions["ContextMenu"] = 3] = "ContextMenu";
MouseInteractions[MouseInteractions["DblClick"] = 4] = "DblClick";
MouseInteractions[MouseInteractions["Focus"] = 5] = "Focus";
MouseInteractions[MouseInteractions["Blur"] = 6] = "Blur";
MouseInteractions[MouseInteractions["TouchStart"] = 7] = "TouchStart";
MouseInteractions[MouseInteractions["TouchMove_Departed"] = 8] = "TouchMove_Departed";
MouseInteractions[MouseInteractions["TouchEnd"] = 9] = "TouchEnd";
})(MouseInteractions || (MouseInteractions = {}));
var MediaInteractions;
(function (MediaInteractions) {
MediaInteractions[MediaInteractions["Play"] = 0] = "Play";
MediaInteractions[MediaInteractions["Pause"] = 1] = "Pause";
MediaInteractions[MediaInteractions["Seeked"] = 2] = "Seeked";
})(MediaInteractions || (MediaInteractions = {}));
var ReplayerEvents;
(function (ReplayerEvents) {
ReplayerEvents["Start"] = "start";
ReplayerEvents["Pause"] = "pause";
ReplayerEvents["Resume"] = "resume";
ReplayerEvents["Resize"] = "resize";
ReplayerEvents["Finish"] = "finish";
ReplayerEvents["FullsnapshotRebuilded"] = "fullsnapshot-rebuilded";
ReplayerEvents["LoadStylesheetStart"] = "load-stylesheet-start";
ReplayerEvents["LoadStylesheetEnd"] = "load-stylesheet-end";
ReplayerEvents["SkipStart"] = "skip-start";
ReplayerEvents["SkipEnd"] = "skip-end";
ReplayerEvents["MouseInteraction"] = "mouse-interaction";
ReplayerEvents["EventCast"] = "event-cast";
ReplayerEvents["CustomEvent"] = "custom-event";
ReplayerEvents["Flush"] = "flush";
ReplayerEvents["StateChange"] = "state-change";
ReplayerEvents["PlayBack"] = "play-back";
})(ReplayerEvents || (ReplayerEvents = {}));
var NodeType;
(function (NodeType) {
NodeType[NodeType["Document"] = 0] = "Document";
NodeType[NodeType["DocumentType"] = 1] = "DocumentType";
NodeType[NodeType["Element"] = 2] = "Element";
NodeType[NodeType["Text"] = 3] = "Text";
NodeType[NodeType["CDATA"] = 4] = "CDATA";
NodeType[NodeType["Comment"] = 5] = "Comment";
})(NodeType || (NodeType = {}));
var DEPARTED_MIRROR_ACCESS_WARNING = 'Please stop import mirror directly. Instead of that,' +
'\r\n' +
'now you can use replayer.getMirror() to access the mirror instance of a replayer,' +
'\r\n' +
'or you can use record.mirror to access the mirror instance during recording.';
var _mirror = {
map: {},
getId: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
return -1;
},
getNode: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
return null;
},
removeNodeFromMap: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
},
has: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
return false;
},
reset: function () {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
},
};
if (typeof window !== 'undefined' && window.Proxy && window.Reflect) {
_mirror = new Proxy(_mirror, {
get: function (target, prop, receiver) {
if (prop === 'map') {
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
function pathToSelector(node) {
if (!node || !node.outerHTML) {
return '';
}
var path = '';
while (node.parentElement) {
var name = node.localName;
if (!name) {
break;
}
name = name.toLowerCase();
var parent = 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 (sibling.localName && sibling.localName.toLowerCase) {
if (sibling.localName.toLowerCase() === name) {
domSiblings.push(sibling);
}
}
}
return Reflect.get(target, prop, receiver);
},
});
}
if (domSiblings.length > 1) {
name += ':eq(' + domSiblings.indexOf(node) + ')';
}
path = name + (path ? '>' + path : '');
node = parent;
}
return path;
}
function patch(source, name, replacement) {
function isObject(obj) {
return Object.prototype.toString.call(obj) === '[object Object]';
}
function isObjTooDeep(obj, limit) {
var e_1, _a;
if (limit === 0) {
return true;
}
var keys = Object.keys(obj);
try {
if (!(name in source)) {
return function () { };
for (var keys_1 = __values(keys), keys_1_1 = keys_1.next(); !keys_1_1.done; keys_1_1 = keys_1.next()) {
var key = keys_1_1.value;
if (isObject(obj[key]) && isObjTooDeep(obj[key], limit - 1)) {
return true;
}
}
var original_1 = source[name];
var wrapped = replacement(original_1);
if (typeof wrapped === 'function') {
wrapped.prototype = wrapped.prototype || {};
Object.defineProperties(wrapped, {
__rrweb_original__: {
enumerable: false,
value: original_1,
},
});
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (keys_1_1 && !keys_1_1.done && (_a = keys_1.return)) _a.call(keys_1);
}
source[name] = wrapped;
return function () {
source[name] = original_1;
};
finally { if (e_1) throw e_1.error; }
}
catch (_a) {
return function () { };
return false;
}
function stringify(obj, stringifyOptions) {
var options = {
numOfKeysLimit: 50,
depthOfLimit: 4,
};
Object.assign(options, stringifyOptions);
var stack = [];
var keys = [];
return JSON.stringify(obj, function (key, value) {
if (stack.length > 0) {
var thisPos = stack.indexOf(this);
~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
if (~stack.indexOf(value)) {
if (stack[0] === value) {
value = '[Circular ~]';
}
else {
value =
'[Circular ~.' +
keys.slice(0, stack.indexOf(value)).join('.') +
']';
}
}
}
else {
stack.push(value);
}
if (value === null || value === undefined) {
return value;
}
if (shouldIgnore(value)) {
return toString(value);
}
if (value instanceof Event) {
var eventResult = {};
for (var eventKey in value) {
var eventValue = value[eventKey];
if (Array.isArray(eventValue)) {
eventResult[eventKey] = pathToSelector(eventValue.length ? eventValue[0] : null);
}
else {
eventResult[eventKey] = eventValue;
}
}
return eventResult;
}
else if (value instanceof Node) {
if (value instanceof HTMLElement) {
return value ? value.outerHTML : '';
}
return value.nodeName;
}
return value;
});
function shouldIgnore(_obj) {
if (isObject(_obj) && Object.keys(_obj).length > options.numOfKeysLimit) {
return true;
}
if (typeof _obj === 'function') {
return true;
}
if (isObject(_obj) && isObjTooDeep(_obj, options.depthOfLimit)) {
return true;
}
return false;
}
function toString(_obj) {
var str = _obj.toString();
if (options.stringLengthLimit && str.length > options.stringLengthLimit) {
str = str.slice(0, options.stringLengthLimit) + "...";
}
return str;
}
}

@@ -472,0 +503,0 @@

@@ -80,2 +80,3 @@ 'use strict';

IncrementalSource[IncrementalSource["Drag"] = 12] = "Drag";
IncrementalSource[IncrementalSource["StyleDeclaration"] = 13] = "StyleDeclaration";
})(IncrementalSource || (IncrementalSource = {}));

@@ -94,2 +95,3 @@ var MouseInteractions;

MouseInteractions[MouseInteractions["TouchEnd"] = 9] = "TouchEnd";
MouseInteractions[MouseInteractions["TouchCancel"] = 10] = "TouchCancel";
})(MouseInteractions || (MouseInteractions = {}));

@@ -96,0 +98,0 @@ var MediaInteractions;

@@ -66,2 +66,3 @@ 'use strict';

IncrementalSource[IncrementalSource["Drag"] = 12] = "Drag";
IncrementalSource[IncrementalSource["StyleDeclaration"] = 13] = "StyleDeclaration";
})(IncrementalSource || (IncrementalSource = {}));

@@ -80,2 +81,3 @@ var MouseInteractions;

MouseInteractions[MouseInteractions["TouchEnd"] = 9] = "TouchEnd";
MouseInteractions[MouseInteractions["TouchCancel"] = 10] = "TouchCancel";
})(MouseInteractions || (MouseInteractions = {}));

@@ -246,5 +248,5 @@ var MediaInteractions;

// fixed length map
var flm = hMap(flt, 9, 0), flrm = hMap(flt, 9, 1);
var flm = /*#__PURE__*/ hMap(flt, 9, 0);
// fixed distance map
var fdm = hMap(fdt, 5, 0), fdrm = hMap(fdt, 5, 1);
var fdm = /*#__PURE__*/ hMap(fdt, 5, 0);
// get end of byte

@@ -488,5 +490,5 @@ var shft = function (p) { return ((p / 8) >> 0) + (p & 7 && 1); };

// deflate options (nice << 13) | chain
var deo = new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);
var deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);
// empty
var et = new u8(0);
var et = /*#__PURE__*/ new u8(0);
// compresses data into a raw DEFLATE buffer

@@ -613,10 +615,2 @@ var dflt = function (dat, lvl, plvl, pre, post, lst) {

};
// CRC32 table
var crct = new u32(256);
for (var i = 0; i < 256; ++i) {
var c = i, k = 9;
while (--k)
c = ((c & 1) && 0xEDB88320) ^ (c >>> 1);
crct[i] = c;
}
// Alder32

@@ -623,0 +617,0 @@ var adler = function () {

{
"name": "rrweb",
"version": "1.0.2",
"version": "1.0.3",
"description": "record and replay the web",

@@ -15,3 +15,4 @@ "scripts": {

"typings": "tsc -d --declarationDir typings",
"check-types": "tsc -noEmit"
"check-types": "tsc -noEmit",
"prepublish": "npm run typings && npm run bundle"
},

@@ -56,3 +57,3 @@ "repository": {

"jest-snapshot": "^23.6.0",
"jsdom": "^16.6.0",
"jsdom": "^17.0.0",
"jsdom-global": "^3.0.2",

@@ -79,4 +80,4 @@ "mocha": "^5.2.0",

"mitt": "^1.1.3",
"rrweb-snapshot": "^1.1.7"
"rrweb-snapshot": "^1.1.8"
}
}

@@ -5,2 +5,3 @@ import { RecordPlugin } from '../../../types';

numOfKeysLimit: number;
depthOfLimit: number;
};

@@ -7,0 +8,0 @@ declare type LogRecordOptions = {

@@ -22,2 +22,3 @@ import { Timer } from './timer';

private virtualStyleRulesMap;
private cache;
private imageMap;

@@ -27,2 +28,4 @@ private mirror;

private newDocumentQueue;
private mousePos;
private touchActive;
constructor(events: Array<eventWithTime | string>, config?: Partial<playerConfig>);

@@ -43,4 +46,6 @@ on(event: string, handler: Handler): this;

disableInteract(): void;
resetCache(): void;
private setupDom;
private handleResize;
private applyEventsSynchronously;
private getCastFn;

@@ -47,0 +52,0 @@ private rebuildFullSnapshot;

@@ -49,5 +49,6 @@ import { StateMachine } from '@xstate/fsm';

emitter: Emitter;
applyEventsSynchronously(events: Array<eventWithTime>): void;
getCastFn(event: eventWithTime, isSync: boolean): () => void;
};
export declare function createPlayerService(context: PlayerContext, { getCastFn, emitter }: PlayerAssets): StateMachine.Service<PlayerContext, PlayerEvent, PlayerState>;
export declare function createPlayerService(context: PlayerContext, { getCastFn, applyEventsSynchronously, emitter }: PlayerAssets): StateMachine.Service<PlayerContext, PlayerEvent, PlayerState>;
export declare type SpeedContext = {

@@ -54,0 +55,0 @@ normalSpeed: playerConfig['speed'];

@@ -5,3 +5,5 @@ import { INode } from 'rrweb-snapshot';

Remove = 1,
Snapshot = 2
Snapshot = 2,
SetProperty = 3,
RemoveProperty = 4
}

@@ -11,7 +13,7 @@ declare type InsertRule = {

type: StyleRuleType.Insert;
index?: number;
index?: number | number[];
};
declare type RemoveRule = {
type: StyleRuleType.Remove;
index: number;
index: number | number[];
};

@@ -22,6 +24,23 @@ declare type SnapshotRule = {

};
export declare type VirtualStyleRules = Array<InsertRule | RemoveRule | SnapshotRule>;
declare type SetPropertyRule = {
type: StyleRuleType.SetProperty;
index: number[];
property: string;
value: string | null;
priority: string | undefined;
};
declare type RemovePropertyRule = {
type: StyleRuleType.RemoveProperty;
index: number[];
property: string;
};
export declare type VirtualStyleRules = Array<InsertRule | RemoveRule | SnapshotRule | SetPropertyRule | RemovePropertyRule>;
export declare type VirtualStyleRulesMap = Map<INode, VirtualStyleRules>;
export declare function getNestedRule(rules: CSSRuleList, position: number[]): CSSGroupingRule;
export declare function getPositionsAndIndex(nestedIndex: number[]): {
positions: number[];
index: number | undefined;
};
export declare function applyVirtualStyleRulesToNode(storedRules: VirtualStyleRules, styleNode: HTMLStyleElement): void;
export declare function storeCSSRules(parentElement: HTMLStyleElement, virtualStyleRulesMap: VirtualStyleRulesMap): void;
export {};

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

Log = 11,
Drag = 12
Drag = 12,
StyleDeclaration = 13
}

@@ -103,2 +104,5 @@ export declare type mutationData = {

} & styleSheetRuleParam;
export declare type styleDeclarationData = {
source: IncrementalSource.StyleDeclaration;
} & styleDeclarationParam;
export declare type canvasMutationData = {

@@ -110,3 +114,3 @@ source: IncrementalSource.CanvasMutation;

} & fontParam;
export declare type incrementalData = mutationData | mousemoveData | mouseInteractionData | scrollData | viewportResizeData | inputData | mediaInteractionData | styleSheetRuleData | canvasMutationData | fontData;
export declare type incrementalData = mutationData | mousemoveData | mouseInteractionData | scrollData | viewportResizeData | inputData | mediaInteractionData | styleSheetRuleData | canvasMutationData | fontData | styleDeclarationData;
export declare type event = domContentLoadedEvent | loadedEvent | fullSnapshotEvent | incrementalSnapshotEvent | metaEvent | customEvent | pluginEvent;

@@ -174,2 +178,3 @@ export declare type eventWithTime = event & {

styleSheetRuleCb: styleSheetRuleCallback;
styleDeclarationCb: styleDeclarationCallback;
canvasMutationCb: canvasMutationCallback;

@@ -201,2 +206,3 @@ fontCb: fontCallback;

styleSheetRule?: styleSheetRuleCallback;
styleDeclaration?: styleDeclarationCallback;
canvasMutation?: canvasMutationCallback;

@@ -263,2 +269,8 @@ font?: fontCallback;

};
export declare type mouseMovePos = {
x: number;
y: number;
id: number;
debugData: incrementalData;
};
export declare enum MouseInteractions {

@@ -274,3 +286,4 @@ MouseUp = 0,

TouchMove_Departed = 8,
TouchEnd = 9
TouchEnd = 9,
TouchCancel = 10
}

@@ -292,6 +305,6 @@ declare type mouseInteractionParam = {

rule: string;
index?: number;
index?: number | number[];
};
export declare type styleSheetDeleteRule = {
index: number;
index: number | number[];
};

@@ -304,2 +317,15 @@ export declare type styleSheetRuleParam = {

export declare type styleSheetRuleCallback = (s: styleSheetRuleParam) => void;
export declare type styleDeclarationParam = {
id: number;
index: number[];
set?: {
property: string;
value: string | null;
priority: string | undefined;
};
remove?: {
property: string;
};
};
export declare type styleDeclarationCallback = (s: styleDeclarationParam) => void;
export declare type canvasMutationCallback = (p: canvasMutationParam) => void;

@@ -306,0 +332,0 @@ export declare type canvasMutationParam = {

@@ -1,2 +0,2 @@

import { Mirror, throttleOptions, listenerHandler, hookResetter, blockClass, eventWithTime, addedNodeMutation, removedNodeMutation, textMutation, attributeMutation, mutationData, scrollData, inputData, DocumentDimension } from './types';
import { Mirror, throttleOptions, listenerHandler, hookResetter, blockClass, addedNodeMutation, removedNodeMutation, textMutation, attributeMutation, mutationData, scrollData, inputData, DocumentDimension } from './types';
import { INode, serializedNodeWithId } from 'rrweb-snapshot';

@@ -18,3 +18,2 @@ export declare function on(type: string, fn: EventListenerOrEventListenerObject, target?: Document | Window): listenerHandler;

export declare function polyfill(win?: Window & typeof globalThis): void;
export declare function needCastInSyncMode(event: eventWithTime): boolean;
export declare type TreeNode = {

@@ -50,2 +49,3 @@ id: number;

private reset;
idRemoved(id: number): boolean;
}

@@ -52,0 +52,0 @@ declare type ResolveTree = {

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 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 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 not supported yet

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 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 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 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