Socket
Socket
Sign inDemoInstall

rrweb

Package Overview
Dependencies
4
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.7.19 to 0.7.20

43

dist/record/rrweb-record.js

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

var previous = 0;
return function () {
return function (args) {
var now = Date.now();

@@ -334,3 +334,2 @@ if (!previous && options.leading === false) {

var context = this;
var args = arguments;
if (remaining <= 0 || remaining > wait) {

@@ -355,13 +354,15 @@ if (timeout) {

var original = Object.getOwnPropertyDescriptor(target, key);
Object.defineProperty(target, key, isRevoked ? d : {
set: function (value) {
var _this = this;
setTimeout(function () {
d.set.call(_this, value);
}, 0);
if (original && original.set) {
original.set.call(this, value);
Object.defineProperty(target, key, isRevoked
? d
: {
set: function (value) {
var _this = this;
setTimeout(function () {
d.set.call(_this, value);
}, 0);
if (original && original.set) {
original.set.call(this, value);
}
}
}
});
});
return function () { return hookSetter(target, key, original || {}, true); };

@@ -416,2 +417,8 @@ }

}
function polyfill() {
if ('NodeList' in window && !NodeList.prototype.forEach) {
NodeList.prototype.forEach = Array.prototype
.forEach;
}
}

@@ -435,2 +442,3 @@ var EventType;

IncrementalSource[IncrementalSource["Input"] = 5] = "Input";
IncrementalSource[IncrementalSource["TouchMove"] = 6] = "TouchMove";
})(IncrementalSource || (IncrementalSource = {}));

@@ -657,3 +665,3 @@ var MouseInteractions;

var timeBaseline;
var wrappedCb = throttle(function () {
var wrappedCb = throttle(function (isTouch) {
var totalOffset = Date.now() - timeBaseline;

@@ -663,3 +671,3 @@ cb(positions.map(function (p) {

return p;
}));
}), isTouch ? IncrementalSource.TouchMove : IncrementalSource.MouseMove);
positions = [];

@@ -682,3 +690,3 @@ timeBaseline = null;

});
wrappedCb();
wrappedCb(isTouchEvent(evt));
}, 50, {

@@ -888,2 +896,3 @@ trailing: false

}
polyfill();
var lastFullSnapshotEvent;

@@ -950,7 +959,7 @@ var incrementalSnapshotCount = 0;

},
mousemoveCb: function (positions) {
mousemoveCb: function (positions, source) {
return wrappedEmit(wrapEvent({
type: EventType.IncrementalSnapshot,
data: {
source: IncrementalSource.MouseMove,
source: source,
positions: positions

@@ -957,0 +966,0 @@ }

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

var rrwebRecord=function(e){"use strict";var t,n=function(){return(n=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(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 r=1;function o(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+(function(e){return"styleSheet"in e}(n=t)?o(n.styleSheet)||"":n.cssText);var n},""):null}catch(e){return null}}var a=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,i=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,u=/^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;function c(e,t){return e.replace(a,function(e,n,r,o){var a,c=n||r||o;if(!c)return e;if(!i.test(c))return"url('"+c+"')";if(u.test(c))return"url("+c+")";if("/"===c[0])return"url('"+(((a=t).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+c)+"')";var s=t.split("/"),l=c.split("/");s.pop();for(var d=0,f=l;d<f.length;d++){var p=f[d];"."!==p&&(".."===p?s.pop():s.push(p))}return"url('"+s.join("/")+"')"})}function s(e,t){var n=e.createElement("a");return n.href=t,n.href}function l(e,n,a,i,u,d,f){void 0===u&&(u=!1),void 0===d&&(d=!0),void 0===f&&(f=!1);var p,h=function(e,n,r,a,i){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:t.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:t.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:var u=!1;"string"==typeof r?u=e.classList.contains(r):e.classList.forEach(function(e){r.test(e)&&(u=!0)});for(var l=e.tagName.toLowerCase(),d={},f=0,p=Array.from(e.attributes);f<p.length;f++){var h=p[f],m=h.name,v=h.value;d[m]="src"===m||"href"===m?s(n,v):"style"===m?c(v,location.href):v}if("link"===l&&a){var y,g=Array.from(n.styleSheets).find(function(t){return t.href===e.href});(y=o(g))&&(delete d.rel,delete d.href,d._cssText=c(y,g.href))}if("style"===l&&e.sheet&&!(e.innerText||e.textContent||"").trim().length&&(y=o(e.sheet))&&(d._cssText=c(y,location.href)),"input"!==l&&"textarea"!==l&&"select"!==l||(v=e.value,"radio"!==d.type&&"checkbox"!==d.type&&v?d.value=i?"*".repeat(v.length):v:e.checked&&(d.checked=e.checked)),"option"===l){var E=e.parentElement;d.value===E.value&&(d.selected=e.selected)}if(u){var b=e.getBoundingClientRect(),C=b.width,w=b.height;d.rr_width=C+"px",d.rr_height=w+"px"}return{type:t.Element,tagName:l,attributes:d,childNodes:[],isSVG:(S=e,"svg"===S.tagName||S instanceof SVGElement||void 0),needBlock:u};case e.TEXT_NODE:var N=e.parentNode&&e.parentNode.tagName,T=e.textContent,I="STYLE"===N||void 0;return I&&T&&(T=c(T,location.href)),"SCRIPT"===N&&(T="SCRIPT_PLACEHOLDER"),{type:t.Text,textContent:T||"",isStyle:I};case e.CDATA_SECTION_NODE:return{type:t.CDATA,textContent:""};case e.COMMENT_NODE:return{type:t.Comment,textContent:e.textContent||""};default:return!1}var S}(e,n,i,d,f);if(!h)return console.warn(e,"not serialized"),null;p="__sn"in e?e.__sn.id:r++;var m=Object.assign(h,{id:p});e.__sn=m,a[p]=e;var v=!u;if(m.type===t.Element&&(v=v&&!m.needBlock,delete m.needBlock),(m.type===t.Document||m.type===t.Element)&&v)for(var y=0,g=Array.from(e.childNodes);y<g.length;y++){var E=l(g[y],n,a,i,u,d);E&&m.childNodes.push(E)}return m}function d(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)}}var f,p,h,m,v={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return v.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete v.map[t],e.childNodes&&e.childNodes.forEach(function(e){return v.removeNodeFromMap(e)})},has:function(e){return v.map.hasOwnProperty(e)}};function y(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(){var a=Date.now();o||!1!==n.leading||(o=a);var i=t-(a-o),u=this,c=arguments;i<=0||i>t?(r&&(window.clearTimeout(r),r=null),o=a,e.apply(u,c)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(u,c)},i))}}function g(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function E(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function b(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||b(e.parentNode,t)}return b(e.parentNode,t)}function C(e){return Boolean(e.changedTouches)}function w(e,t){e.delete(t),t.childNodes.forEach(function(t){return w(e,t)})}function N(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||N(e,n))}!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"}(f||(f={})),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"}(p||(p={})),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"}(h||(h={})),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"}(m||(m={}));var T=function(e,t){return e+"@"+t};function I(e){return"__sn"in e}function S(e,t,n,r){var o=new MutationObserver(function(o){var a=[],i=[],u=[],c=[],s=new Set,d=new Set,f=new Set,p={},h=function(e,n){if(!b(e,t)){if(I(e)){d.add(e);var r=null;n&&I(n)&&(r=n.__sn.id),r&&(p[T(e.__sn.id,r)]=!0)}else s.add(e),f.delete(e);e.childNodes.forEach(function(e){return h(e)})}};o.forEach(function(e){var n=e.type,r=e.target,o=e.oldValue,c=e.addedNodes,l=e.removedNodes,m=e.attributeName;switch(n){case"characterData":var y=r.textContent;b(r,t)||y===o||a.push({value:y,node:r});break;case"attributes":y=r.getAttribute(m);if(b(r,t)||y===o)return;var g=i.find(function(e){return e.node===r});g||(g={node:r,attributes:{}},i.push(g)),g.attributes[m]=y;break;case"childList":c.forEach(function(e){return h(e,r)}),l.forEach(function(e){var n=v.getId(e),o=v.getId(r);b(e,t)||(s.has(e)?(w(s,e),f.add(e)):s.has(r)&&-1===n||function e(t){var n=v.getId(t);return!v.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode))}(r)||(d.has(e)&&p[T(n,o)]?w(d,e):u.push({parentId:o,id:n})),v.removeNodeFromMap(e))})}});var m=[],y=function(e){var o=v.getId(e.parentNode);if(-1===o)return m.push(e);c.push({parentId:o,previousId:e.previousSibling?v.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?v.getId(e.nextSibling):e.nextSibling,node:l(e,document,v.map,t,!0,n,r)})};for(Array.from(d).forEach(y),Array.from(s).forEach(function(e){N(f,e)||function e(t,n){var r=n.parentNode;if(!r)return!1;var o=v.getId(r);return!!t.some(function(e){return e.id===o})||e(t,r)}(u,e)?N(d,e)?y(e):f.add(e):y(e)});m.length&&!m.every(function(e){return-1===v.getId(e.parentNode)});)y(m.shift());var g={texts:a.map(function(e){return{id:v.getId(e.node),value:e.value}}).filter(function(e){return v.has(e.id)}),attributes:i.map(function(e){return{id:v.getId(e.node),attributes:e.attributes}}).filter(function(e){return v.has(e.id)}),removes:u,adds:c};(g.texts.length||g.attributes.length||g.removes.length||g.adds.length)&&e(g)});return o.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function D(e,t){var n=[];return Object.keys(h).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(r){var o=r.toLowerCase(),a=function(n){return function(r){if(!b(r.target,t)){var o=v.getId(r.target),a=C(r)?r.changedTouches[0]:r,i=a.clientX,u=a.clientY;e({type:h[n],id:o,x:i,y:u})}}}(r);n.push(d(o,a))}),function(){n.forEach(function(e){return e()})}}var k,M=["INPUT","TEXTAREA","SELECT"],x=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],_=new WeakMap;function L(e,t,r,o){function a(e){var n=e.target;if(n&&n.tagName&&!(M.indexOf(n.tagName)<0)&&!b(n,t)){var a=n.type;if("password"!==a&&!n.classList.contains(r)){var u=n.value,c=!1,s=x.includes(a)||"TEXTAREA"===n.tagName;"radio"===a||"checkbox"===a?c=n.checked:s&&o&&(u="*".repeat(u.length)),i(n,{text:u,isChecked:c});var l=n.name;"radio"===a&&l&&c&&document.querySelectorAll('input[type="radio"][name="'+l+'"]').forEach(function(e){e!==n&&i(e,{text:e.value,isChecked:!c})})}}}function i(t,r){var o=_.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){_.set(t,r);var a=v.getId(t);e(n({},r,{id:a}))}}var u=["input","change"].map(function(e){return d(e,a)}),c=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),s=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return c&&c.set&&u.push.apply(u,s.map(function(e){return function e(t,n,r,o){var a=Object.getOwnPropertyDescriptor(t,n);return Object.defineProperty(t,n,o?r:{set:function(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),a&&a.set&&a.set.call(this,e)}}),function(){return e(t,n,a||{},!0)}}(e[0],e[1],{set:function(){a({target:this})}})})),function(){u.forEach(function(e){return e()})}}function O(e){var t,n,r,o,a,i,u=S(e.mutationCb,e.blockClass,e.inlineStylesheet,e.maskAllInputs),c=(t=e.mousemoveCb,r=[],o=y(function(){var e=Date.now()-n;t(r.map(function(t){return t.timeOffset-=e,t})),r=[],n=null},500),a=y(function(e){var t=e.target,a=C(e)?e.changedTouches[0]:e,i=a.clientX,u=a.clientY;n||(n=Date.now()),r.push({x:i,y:u,id:v.getId(t),timeOffset:Date.now()-n}),o()},50,{trailing:!1}),i=[d("mousemove",a),d("touchmove",a)],function(){i.forEach(function(e){return e()})}),s=D(e.mouseInteractionCb,e.blockClass),l=function(e,t){return d("scroll",y(function(n){if(n.target&&!b(n.target,t)){var r=v.getId(n.target);if(n.target===document){var o=document.scrollingElement||document.documentElement;e({id:r,x:o.scrollLeft,y:o.scrollTop})}else e({id:r,x:n.target.scrollLeft,y:n.target.scrollTop})}},100))}(e.scrollCb,e.blockClass),f=function(e){return d("resize",y(function(){var t=g(),n=E();e({width:Number(n),height:Number(t)})},200),window)}(e.viewportResizeCb),p=L(e.inputCb,e.blockClass,e.ignoreClass,e.maskAllInputs);return function(){u.disconnect(),c(),s(),l(),f(),p()}}function A(e){return n({},e,{timestamp:Date.now()})}return e.addCustomEvent=function(e,t){if(!k)throw new Error("please add custom event after start recording");k(A({type:f.Custom,data:{tag:e,payload:t}}))},e.default=function(e){void 0===e&&(e={});var t,r=e.emit,o=e.checkoutEveryNms,a=e.checkoutEveryNth,i=e.blockClass,u=void 0===i?"rr-block":i,c=e.ignoreClass,s=void 0===c?"rr-ignore":c,h=e.inlineStylesheet,m=void 0===h||h,y=e.maskAllInputs,b=void 0!==y&&y;if(!r)throw new Error("emit function is required");var C=0;function w(e){void 0===e&&(e=!1),k(A({type:f.Meta,data:{href:window.location.href,width:E(),height:g()}}),e);var t=function(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[l(e,e,o,t,!1,n,r),o]}(document,u,m,b),n=t[0],r=t[1];if(!n)return console.warn("Failed to snapshot the document");v.map=r,k(A({type:f.FullSnapshot,data:{node:n,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}k=function(e,n){if(r(e,n),e.type===f.FullSnapshot)t=e,C=0;else if(e.type===f.IncrementalSnapshot){C++;var i=a&&C>=a,u=o&&e.timestamp-t.timestamp>o;(i||u)&&w(!0)}};try{var N=[];N.push(d("DOMContentLoaded",function(){k(A({type:f.DomContentLoaded,data:{}}))}));var T=function(){w(),N.push(O({mutationCb:function(e){return k(A({type:f.IncrementalSnapshot,data:n({source:p.Mutation},e)}))},mousemoveCb:function(e){return k(A({type:f.IncrementalSnapshot,data:{source:p.MouseMove,positions:e}}))},mouseInteractionCb:function(e){return k(A({type:f.IncrementalSnapshot,data:n({source:p.MouseInteraction},e)}))},scrollCb:function(e){return k(A({type:f.IncrementalSnapshot,data:n({source:p.Scroll},e)}))},viewportResizeCb:function(e){return k(A({type:f.IncrementalSnapshot,data:n({source:p.ViewportResize},e)}))},inputCb:function(e){return k(A({type:f.IncrementalSnapshot,data:n({source:p.Input},e)}))},blockClass:u,ignoreClass:s,maskAllInputs:b,inlineStylesheet:m}))};return"interactive"===document.readyState||"complete"===document.readyState?T():N.push(d("load",function(){k(A({type:f.Load,data:{}})),T()},window)),function(){N.forEach(function(e){return e()})}}catch(e){console.warn(e)}},e}({});
var rrwebRecord=function(e){"use strict";var t,n=function(){return(n=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(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 r=1;function o(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+(function(e){return"styleSheet"in e}(n=t)?o(n.styleSheet)||"":n.cssText);var n},""):null}catch(e){return null}}var a=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,i=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,u=/^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;function c(e,t){return e.replace(a,function(e,n,r,o){var a,c=n||r||o;if(!c)return e;if(!i.test(c))return"url('"+c+"')";if(u.test(c))return"url("+c+")";if("/"===c[0])return"url('"+(((a=t).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+c)+"')";var s=t.split("/"),l=c.split("/");s.pop();for(var d=0,f=l;d<f.length;d++){var p=f[d];"."!==p&&(".."===p?s.pop():s.push(p))}return"url('"+s.join("/")+"')"})}function s(e,t){var n=e.createElement("a");return n.href=t,n.href}function l(e,n,a,i,u,d,f){void 0===u&&(u=!1),void 0===d&&(d=!0),void 0===f&&(f=!1);var p,h=function(e,n,r,a,i){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:t.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:t.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:var u=!1;"string"==typeof r?u=e.classList.contains(r):e.classList.forEach(function(e){r.test(e)&&(u=!0)});for(var l=e.tagName.toLowerCase(),d={},f=0,p=Array.from(e.attributes);f<p.length;f++){var h=p[f],m=h.name,v=h.value;d[m]="src"===m||"href"===m?s(n,v):"style"===m?c(v,location.href):v}if("link"===l&&a){var y,g=Array.from(n.styleSheets).find(function(t){return t.href===e.href});(y=o(g))&&(delete d.rel,delete d.href,d._cssText=c(y,g.href))}if("style"===l&&e.sheet&&!(e.innerText||e.textContent||"").trim().length&&(y=o(e.sheet))&&(d._cssText=c(y,location.href)),"input"!==l&&"textarea"!==l&&"select"!==l||(v=e.value,"radio"!==d.type&&"checkbox"!==d.type&&v?d.value=i?"*".repeat(v.length):v:e.checked&&(d.checked=e.checked)),"option"===l){var E=e.parentElement;d.value===E.value&&(d.selected=e.selected)}if(u){var b=e.getBoundingClientRect(),C=b.width,w=b.height;d.rr_width=C+"px",d.rr_height=w+"px"}return{type:t.Element,tagName:l,attributes:d,childNodes:[],isSVG:(S=e,"svg"===S.tagName||S instanceof SVGElement||void 0),needBlock:u};case e.TEXT_NODE:var N=e.parentNode&&e.parentNode.tagName,T=e.textContent,I="STYLE"===N||void 0;return I&&T&&(T=c(T,location.href)),"SCRIPT"===N&&(T="SCRIPT_PLACEHOLDER"),{type:t.Text,textContent:T||"",isStyle:I};case e.CDATA_SECTION_NODE:return{type:t.CDATA,textContent:""};case e.COMMENT_NODE:return{type:t.Comment,textContent:e.textContent||""};default:return!1}var S}(e,n,i,d,f);if(!h)return console.warn(e,"not serialized"),null;p="__sn"in e?e.__sn.id:r++;var m=Object.assign(h,{id:p});e.__sn=m,a[p]=e;var v=!u;if(m.type===t.Element&&(v=v&&!m.needBlock,delete m.needBlock),(m.type===t.Document||m.type===t.Element)&&v)for(var y=0,g=Array.from(e.childNodes);y<g.length;y++){var E=l(g[y],n,a,i,u,d);E&&m.childNodes.push(E)}return m}function d(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)}}var f,p,h,m,v={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return v.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete v.map[t],e.childNodes&&e.childNodes.forEach(function(e){return v.removeNodeFromMap(e)})},has:function(e){return v.map.hasOwnProperty(e)}};function y(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 u=t-(i-o),c=this;u<=0||u>t?(r&&(window.clearTimeout(r),r=null),o=i,e.apply(c,a)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(c,a)},u))}}function g(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function E(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function b(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||b(e.parentNode,t)}return b(e.parentNode,t)}function C(e){return Boolean(e.changedTouches)}function w(e,t){e.delete(t),t.childNodes.forEach(function(t){return w(e,t)})}function N(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||N(e,n))}!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"}(f||(f={})),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"}(p||(p={})),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"}(h||(h={})),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"}(m||(m={}));var T=function(e,t){return e+"@"+t};function I(e){return"__sn"in e}function S(e,t,n,r){var o=new MutationObserver(function(o){var a=[],i=[],u=[],c=[],s=new Set,d=new Set,f=new Set,p={},h=function(e,n){if(!b(e,t)){if(I(e)){d.add(e);var r=null;n&&I(n)&&(r=n.__sn.id),r&&(p[T(e.__sn.id,r)]=!0)}else s.add(e),f.delete(e);e.childNodes.forEach(function(e){return h(e)})}};o.forEach(function(e){var n=e.type,r=e.target,o=e.oldValue,c=e.addedNodes,l=e.removedNodes,m=e.attributeName;switch(n){case"characterData":var y=r.textContent;b(r,t)||y===o||a.push({value:y,node:r});break;case"attributes":y=r.getAttribute(m);if(b(r,t)||y===o)return;var g=i.find(function(e){return e.node===r});g||(g={node:r,attributes:{}},i.push(g)),g.attributes[m]=y;break;case"childList":c.forEach(function(e){return h(e,r)}),l.forEach(function(e){var n=v.getId(e),o=v.getId(r);b(e,t)||(s.has(e)?(w(s,e),f.add(e)):s.has(r)&&-1===n||function e(t){var n=v.getId(t);return!v.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode))}(r)||(d.has(e)&&p[T(n,o)]?w(d,e):u.push({parentId:o,id:n})),v.removeNodeFromMap(e))})}});var m=[],y=function(e){var o=v.getId(e.parentNode);if(-1===o)return m.push(e);c.push({parentId:o,previousId:e.previousSibling?v.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?v.getId(e.nextSibling):e.nextSibling,node:l(e,document,v.map,t,!0,n,r)})};for(Array.from(d).forEach(y),Array.from(s).forEach(function(e){N(f,e)||function e(t,n){var r=n.parentNode;if(!r)return!1;var o=v.getId(r);return!!t.some(function(e){return e.id===o})||e(t,r)}(u,e)?N(d,e)?y(e):f.add(e):y(e)});m.length&&!m.every(function(e){return-1===v.getId(e.parentNode)});)y(m.shift());var g={texts:a.map(function(e){return{id:v.getId(e.node),value:e.value}}).filter(function(e){return v.has(e.id)}),attributes:i.map(function(e){return{id:v.getId(e.node),attributes:e.attributes}}).filter(function(e){return v.has(e.id)}),removes:u,adds:c};(g.texts.length||g.attributes.length||g.removes.length||g.adds.length)&&e(g)});return o.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function D(e,t){var n=[];return Object.keys(h).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(r){var o=r.toLowerCase(),a=function(n){return function(r){if(!b(r.target,t)){var o=v.getId(r.target),a=C(r)?r.changedTouches[0]:r,i=a.clientX,u=a.clientY;e({type:h[n],id:o,x:i,y:u})}}}(r);n.push(d(o,a))}),function(){n.forEach(function(e){return e()})}}var M,k=["INPUT","TEXTAREA","SELECT"],x=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],_=new WeakMap;function L(e,t,r,o){function a(e){var n=e.target;if(n&&n.tagName&&!(k.indexOf(n.tagName)<0)&&!b(n,t)){var a=n.type;if("password"!==a&&!n.classList.contains(r)){var u=n.value,c=!1,s=x.includes(a)||"TEXTAREA"===n.tagName;"radio"===a||"checkbox"===a?c=n.checked:s&&o&&(u="*".repeat(u.length)),i(n,{text:u,isChecked:c});var l=n.name;"radio"===a&&l&&c&&document.querySelectorAll('input[type="radio"][name="'+l+'"]').forEach(function(e){e!==n&&i(e,{text:e.value,isChecked:!c})})}}}function i(t,r){var o=_.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){_.set(t,r);var a=v.getId(t);e(n({},r,{id:a}))}}var u=["input","change"].map(function(e){return d(e,a)}),c=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),s=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return c&&c.set&&u.push.apply(u,s.map(function(e){return function e(t,n,r,o){var a=Object.getOwnPropertyDescriptor(t,n);return Object.defineProperty(t,n,o?r:{set:function(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),a&&a.set&&a.set.call(this,e)}}),function(){return e(t,n,a||{},!0)}}(e[0],e[1],{set:function(){a({target:this})}})})),function(){u.forEach(function(e){return e()})}}function O(e){var t,n,r,o,a,i,u=S(e.mutationCb,e.blockClass,e.inlineStylesheet,e.maskAllInputs),c=(t=e.mousemoveCb,r=[],o=y(function(e){var o=Date.now()-n;t(r.map(function(e){return e.timeOffset-=o,e}),e?p.TouchMove:p.MouseMove),r=[],n=null},500),a=y(function(e){var t=e.target,a=C(e)?e.changedTouches[0]:e,i=a.clientX,u=a.clientY;n||(n=Date.now()),r.push({x:i,y:u,id:v.getId(t),timeOffset:Date.now()-n}),o(C(e))},50,{trailing:!1}),i=[d("mousemove",a),d("touchmove",a)],function(){i.forEach(function(e){return e()})}),s=D(e.mouseInteractionCb,e.blockClass),l=function(e,t){return d("scroll",y(function(n){if(n.target&&!b(n.target,t)){var r=v.getId(n.target);if(n.target===document){var o=document.scrollingElement||document.documentElement;e({id:r,x:o.scrollLeft,y:o.scrollTop})}else e({id:r,x:n.target.scrollLeft,y:n.target.scrollTop})}},100))}(e.scrollCb,e.blockClass),f=function(e){return d("resize",y(function(){var t=g(),n=E();e({width:Number(n),height:Number(t)})},200),window)}(e.viewportResizeCb),h=L(e.inputCb,e.blockClass,e.ignoreClass,e.maskAllInputs);return function(){u.disconnect(),c(),s(),l(),f(),h()}}function A(e){return n({},e,{timestamp:Date.now()})}return e.addCustomEvent=function(e,t){if(!M)throw new Error("please add custom event after start recording");M(A({type:f.Custom,data:{tag:e,payload:t}}))},e.default=function(e){void 0===e&&(e={});var t,r=e.emit,o=e.checkoutEveryNms,a=e.checkoutEveryNth,i=e.blockClass,u=void 0===i?"rr-block":i,c=e.ignoreClass,s=void 0===c?"rr-ignore":c,h=e.inlineStylesheet,m=void 0===h||h,y=e.maskAllInputs,b=void 0!==y&&y;if(!r)throw new Error("emit function is required");"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach);var C=0;function w(e){void 0===e&&(e=!1),M(A({type:f.Meta,data:{href:window.location.href,width:E(),height:g()}}),e);var t=function(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[l(e,e,o,t,!1,n,r),o]}(document,u,m,b),n=t[0],r=t[1];if(!n)return console.warn("Failed to snapshot the document");v.map=r,M(A({type:f.FullSnapshot,data:{node:n,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}M=function(e,n){if(r(e,n),e.type===f.FullSnapshot)t=e,C=0;else if(e.type===f.IncrementalSnapshot){C++;var i=a&&C>=a,u=o&&e.timestamp-t.timestamp>o;(i||u)&&w(!0)}};try{var N=[];N.push(d("DOMContentLoaded",function(){M(A({type:f.DomContentLoaded,data:{}}))}));var T=function(){w(),N.push(O({mutationCb:function(e){return M(A({type:f.IncrementalSnapshot,data:n({source:p.Mutation},e)}))},mousemoveCb:function(e,t){return M(A({type:f.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return M(A({type:f.IncrementalSnapshot,data:n({source:p.MouseInteraction},e)}))},scrollCb:function(e){return M(A({type:f.IncrementalSnapshot,data:n({source:p.Scroll},e)}))},viewportResizeCb:function(e){return M(A({type:f.IncrementalSnapshot,data:n({source:p.ViewportResize},e)}))},inputCb:function(e){return M(A({type:f.IncrementalSnapshot,data:n({source:p.Input},e)}))},blockClass:u,ignoreClass:s,maskAllInputs:b,inlineStylesheet:m}))};return"interactive"===document.readyState||"complete"===document.readyState?T():N.push(d("load",function(){M(A({type:f.Load,data:{}})),T()},window)),function(){N.forEach(function(e){return e()})}}catch(e){console.warn(e)}},e}({});
//# sourceMappingURL=rrweb-record.min.js.map

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

var rrweb=function(e){"use strict";var t,n=function(){return(n=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(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 r=1;function o(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+(function(e){return"styleSheet"in e}(n=t)?o(n.styleSheet)||"":n.cssText);var n},""):null}catch(e){return null}}var i=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,a=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,s=/^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;function c(e,t){return e.replace(i,function(e,n,r,o){var i,c=n||r||o;if(!c)return e;if(!a.test(c))return"url('"+c+"')";if(s.test(c))return"url("+c+")";if("/"===c[0])return"url('"+(((i=t).indexOf("//")>-1?i.split("/").slice(0,3).join("/"):i.split("/")[0]).split("?")[0]+c)+"')";var l=t.split("/"),u=c.split("/");l.pop();for(var f=0,d=u;f<d.length;f++){var p=d[f];"."!==p&&(".."===p?l.pop():l.push(p))}return"url('"+l.join("/")+"')"})}function l(e,t){var n=e.createElement("a");return n.href=t,n.href}function u(e,n,i,a,s,f,d){void 0===s&&(s=!1),void 0===f&&(f=!0),void 0===d&&(d=!1);var p,h=function(e,n,r,i,a){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:t.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:t.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:var s=!1;"string"==typeof r?s=e.classList.contains(r):e.classList.forEach(function(e){r.test(e)&&(s=!0)});for(var u=e.tagName.toLowerCase(),f={},d=0,p=Array.from(e.attributes);d<p.length;d++){var h=p[d],m=h.name,v=h.value;f[m]="src"===m||"href"===m?l(n,v):"style"===m?c(v,location.href):v}if("link"===u&&i){var y,g=Array.from(n.styleSheets).find(function(t){return t.href===e.href});(y=o(g))&&(delete f.rel,delete f.href,f._cssText=c(y,g.href))}if("style"===u&&e.sheet&&!(e.innerText||e.textContent||"").trim().length&&(y=o(e.sheet))&&(f._cssText=c(y,location.href)),"input"!==u&&"textarea"!==u&&"select"!==u||(v=e.value,"radio"!==f.type&&"checkbox"!==f.type&&v?f.value=a?"*".repeat(v.length):v:e.checked&&(f.checked=e.checked)),"option"===u){var b=e.parentElement;f.value===b.value&&(f.selected=e.selected)}if(s){var E=e.getBoundingClientRect(),w=E.width,I=E.height;f.rr_width=w+"px",f.rr_height=I+"px"}return{type:t.Element,tagName:u,attributes:f,childNodes:[],isSVG:(C=e,"svg"===C.tagName||C instanceof SVGElement||void 0),needBlock:s};case e.TEXT_NODE:var T=e.parentNode&&e.parentNode.tagName,S=e.textContent,N="STYLE"===T||void 0;return N&&S&&(S=c(S,location.href)),"SCRIPT"===T&&(S="SCRIPT_PLACEHOLDER"),{type:t.Text,textContent:S||"",isStyle:N};case e.CDATA_SECTION_NODE:return{type:t.CDATA,textContent:""};case e.COMMENT_NODE:return{type:t.Comment,textContent:e.textContent||""};default:return!1}var C}(e,n,a,f,d);if(!h)return console.warn(e,"not serialized"),null;p="__sn"in e?e.__sn.id:r++;var m=Object.assign(h,{id:p});e.__sn=m,i[p]=e;var v=!s;if(m.type===t.Element&&(v=v&&!m.needBlock,delete m.needBlock),(m.type===t.Document||m.type===t.Element)&&v)for(var y=0,g=Array.from(e.childNodes);y<g.length;y++){var b=u(g[y],n,i,a,s,f);b&&m.childNodes.push(b)}return m}var f=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g;function d(e,t){void 0===t&&(t={});var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=-1===o?r+e.length:e.length-o}function i(){var e={line:n,column:r};return function(t){return t.position=new a(e),m(),t}}var a=function(){return function(e){this.start=e,this.end={line:n,column:r},this.source=t.source}}();a.prototype.content=e;var s=[];function c(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;s.push(i)}function l(){return h(/^{\s*/)}function u(){return h(/^}/)}function d(){var t,n=[];for(m(),v(n);e.length&&"}"!==e.charAt(0)&&(t=x()||M());)!1!==t&&(n.push(t),v(n));return n}function h(t){var n=t.exec(e);if(n){var r=n[0];return o(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=i();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 c("End of comment missing");var a=e.slice(2,n-2);return r+=2,o(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function g(){var e=h(/^([^{]+)/);if(e)return p(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(e){return e.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(e){return e.replace(/\u200C/g,",")})}function b(){var e=i(),t=h(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=p(t[0]);if(!h(/^:\s*/))return c("property missing ':'");var r=h(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:n.replace(f,""),value:r?p(r[0]).replace(f,""):""});return h(/^[;\s]*/),o}}function E(){var e,t=[];if(!l())return c("missing '{'");for(v(t);e=b();)!1!==e&&(t.push(e),v(t)),e=b();return u()?t:c("missing '}'")}function w(){for(var e,t=[],n=i();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:E()})}var I,T=C("import"),S=C("charset"),N=C("namespace");function C(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=i(),r=h(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function x(){if("@"===e[0])return function(){var e=i(),t=h(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=h(/^([-\w]+)\s*/)))return c("@keyframes missing name");var r,o=t[1];if(!l())return c("@keyframes missing '{'");for(var a=v();r=w();)a.push(r),a=a.concat(v());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:a}):c("@keyframes missing '}'")}}()||function(){var e=i(),t=h(/^@media *([^{]+)/);if(t){var n=p(t[1]);if(!l())return c("@media missing '{'");var r=v().concat(d());return u()?e({type:"media",media:n,rules:r}):c("@media missing '}'")}}()||function(){var e=i(),t=h(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:p(t[1]),media:p(t[2])})}()||function(){var e=i(),t=h(/^@supports *([^{]+)/);if(t){var n=p(t[1]);if(!l())return c("@supports missing '{'");var r=v().concat(d());return u()?e({type:"supports",supports:n,rules:r}):c("@supports missing '}'")}}()||T()||S()||N()||function(){var e=i(),t=h(/^@([-\w]+)?document *([^{]+)/);if(t){var n=p(t[1]),r=p(t[2]);if(!l())return c("@document missing '{'");var o=v().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):c("@document missing '}'")}}()||function(){var e=i();if(h(/^@page */)){var t=g()||[];if(!l())return c("@page missing '{'");for(var n,r=v();n=b();)r.push(n),r=r.concat(v());return u()?e({type:"page",selectors:t,declarations:r}):c("@page missing '}'")}}()||function(){var e=i();if(h(/^@host\s*/)){if(!l())return c("@host missing '{'");var t=v().concat(d());return u()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=i();if(h(/^@font-face\s*/)){if(!l())return c("@font-face missing '{'");for(var t,n=v();t=b();)n.push(t),n=n.concat(v());return u()?e({type:"font-face",declarations:n}):c("@font-face missing '}'")}}()}function M(){var e=i(),t=g();return t?(v(),e({type:"rule",selectors:t,declarations:E()})):c("selector missing")}return function e(t,n){var r=t&&"string"==typeof t.type;var o=r?t:n;for(var i=0,a=Object.keys(t);i<a.length;i++){var s=a[i],c=t[s];Array.isArray(c)?c.forEach(function(t){e(t,o)}):c&&"object"==typeof c&&e(c,o)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((I=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:I,parsingErrors:s}}))}function p(e){return e?e.replace(/^\s+|\s+$/g,""):""}var h={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 m=/([^\\]):hover/g;function v(e){var t=d(e);return t.stylesheet?(t.stylesheet.rules.forEach(function(t){"selectors"in t&&(t.selectors||[]).forEach(function(t){if(m.test(t)){var n=t.replace(m,"$1.\\:hover");e=e.replace(t,t+", "+n)}})}),e):e}function y(e,n){switch(e.type){case t.Document:return n.implementation.createDocument(null,"",null);case t.DocumentType:return n.implementation.createDocumentType(e.name,e.publicId,e.systemId);case t.Element:var r=function(e){var t=h[e.tagName]?h[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e),o=void 0;for(var i in o=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",r):n.createElement(r),e.attributes)if(e.attributes.hasOwnProperty(i)&&!i.startsWith("rr_")){var a=e.attributes[i];a="boolean"==typeof a?"":a;var s="textarea"===r&&"value"===i,c="style"===r&&"_cssText"===i;if(c&&(a=v(a)),s||c){var l=n.createTextNode(a);o.appendChild(l);continue}if("iframe"===r&&"src"===i)continue;try{e.isSVG&&"xlink:href"===i?o.setAttributeNS("http://www.w3.org/1999/xlink",i,a):o.setAttribute(i,a)}catch(e){}}else e.attributes.rr_width&&(o.style.width=e.attributes.rr_width),e.attributes.rr_height&&(o.style.height=e.attributes.rr_height);return o;case t.Text:return n.createTextNode(e.isStyle?v(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function g(e,n,r,o){void 0===o&&(o=!1);var i=y(e,n);if(!i)return null;if(e.type===t.Document&&(n.close(),n.open(),i=n),i.__sn=e,r[e.id]=i,(e.type===t.Document||e.type===t.Element)&&!o)for(var a=0,s=e.childNodes;a<s.length;a++){var c=s[a],l=g(c,n,r);l?i.appendChild(l):console.warn("Failed to rebuild",c)}return i}function b(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)}}var E,w,I,T,S={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return S.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete S.map[t],e.childNodes&&e.childNodes.forEach(function(e){return S.removeNodeFromMap(e)})},has:function(e){return S.map.hasOwnProperty(e)}};function N(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(){var i=Date.now();o||!1!==n.leading||(o=i);var a=t-(i-o),s=this,c=arguments;a<=0||a>t?(r&&(window.clearTimeout(r),r=null),o=i,e.apply(s,c)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(s,c)},a))}}function C(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function x(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function M(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||M(e.parentNode,t)}return M(e.parentNode,t)}function k(e){return Boolean(e.changedTouches)}function D(e,t){e.delete(t),t.childNodes.forEach(function(t){return D(e,t)})}function A(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||A(e,n))}(E=e.EventType||(e.EventType={}))[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",(w=e.IncrementalSource||(e.IncrementalSource={}))[w.Mutation=0]="Mutation",w[w.MouseMove=1]="MouseMove",w[w.MouseInteraction=2]="MouseInteraction",w[w.Scroll=3]="Scroll",w[w.ViewportResize=4]="ViewportResize",w[w.Input=5]="Input",(I=e.MouseInteractions||(e.MouseInteractions={}))[I.MouseUp=0]="MouseUp",I[I.MouseDown=1]="MouseDown",I[I.Click=2]="Click",I[I.ContextMenu=3]="ContextMenu",I[I.DblClick=4]="DblClick",I[I.Focus=5]="Focus",I[I.Blur=6]="Blur",I[I.TouchStart=7]="TouchStart",I[I.TouchMove_Departed=8]="TouchMove_Departed",I[I.TouchEnd=9]="TouchEnd",(T=e.ReplayerEvents||(e.ReplayerEvents={})).Start="start",T.Pause="pause",T.Resume="resume",T.Resize="resize",T.Finish="finish",T.FullsnapshotRebuilded="fullsnapshot-rebuilded",T.LoadStylesheetStart="load-stylesheet-start",T.LoadStylesheetEnd="load-stylesheet-end",T.SkipStart="skip-start",T.SkipEnd="skip-end",T.MouseInteraction="mouse-interaction";var O=function(e,t){return e+"@"+t};function L(e){return"__sn"in e}function R(e,t,n,r){var o=new MutationObserver(function(o){var i=[],a=[],s=[],c=[],l=new Set,f=new Set,d=new Set,p={},h=function(e,n){if(!M(e,t)){if(L(e)){f.add(e);var r=null;n&&L(n)&&(r=n.__sn.id),r&&(p[O(e.__sn.id,r)]=!0)}else l.add(e),d.delete(e);e.childNodes.forEach(function(e){return h(e)})}};o.forEach(function(e){var n=e.type,r=e.target,o=e.oldValue,c=e.addedNodes,u=e.removedNodes,m=e.attributeName;switch(n){case"characterData":var v=r.textContent;M(r,t)||v===o||i.push({value:v,node:r});break;case"attributes":v=r.getAttribute(m);if(M(r,t)||v===o)return;var y=a.find(function(e){return e.node===r});y||(y={node:r,attributes:{}},a.push(y)),y.attributes[m]=v;break;case"childList":c.forEach(function(e){return h(e,r)}),u.forEach(function(e){var n=S.getId(e),o=S.getId(r);M(e,t)||(l.has(e)?(D(l,e),d.add(e)):l.has(r)&&-1===n||function e(t){var n=S.getId(t);return!S.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode))}(r)||(f.has(e)&&p[O(n,o)]?D(f,e):s.push({parentId:o,id:n})),S.removeNodeFromMap(e))})}});var m=[],v=function(e){var o=S.getId(e.parentNode);if(-1===o)return m.push(e);c.push({parentId:o,previousId:e.previousSibling?S.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?S.getId(e.nextSibling):e.nextSibling,node:u(e,document,S.map,t,!0,n,r)})};for(Array.from(f).forEach(v),Array.from(l).forEach(function(e){A(d,e)||function e(t,n){var r=n.parentNode;if(!r)return!1;var o=S.getId(r);return!!t.some(function(e){return e.id===o})||e(t,r)}(s,e)?A(f,e)?v(e):d.add(e):v(e)});m.length&&!m.every(function(e){return-1===S.getId(e.parentNode)});)v(m.shift());var y={texts:i.map(function(e){return{id:S.getId(e.node),value:e.value}}).filter(function(e){return S.has(e.id)}),attributes:a.map(function(e){return{id:S.getId(e.node),attributes:e.attributes}}).filter(function(e){return S.has(e.id)}),removes:s,adds:c};(y.texts.length||y.attributes.length||y.removes.length||y.adds.length)&&e(y)});return o.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function _(t,n){var r=[];return Object.keys(e.MouseInteractions).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(o){var i=o.toLowerCase(),a=function(r){return function(o){if(!M(o.target,n)){var i=S.getId(o.target),a=k(o)?o.changedTouches[0]:o,s=a.clientX,c=a.clientY;t({type:e.MouseInteractions[r],id:i,x:s,y:c})}}}(o);r.push(b(i,a))}),function(){r.forEach(function(e){return e()})}}var F,B=["INPUT","TEXTAREA","SELECT"],j=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],z=new WeakMap;function P(e,t,r,o){function i(e){var n=e.target;if(n&&n.tagName&&!(B.indexOf(n.tagName)<0)&&!M(n,t)){var i=n.type;if("password"!==i&&!n.classList.contains(r)){var s=n.value,c=!1,l=j.includes(i)||"TEXTAREA"===n.tagName;"radio"===i||"checkbox"===i?c=n.checked:l&&o&&(s="*".repeat(s.length)),a(n,{text:s,isChecked:c});var u=n.name;"radio"===i&&u&&c&&document.querySelectorAll('input[type="radio"][name="'+u+'"]').forEach(function(e){e!==n&&a(e,{text:e.value,isChecked:!c})})}}}function a(t,r){var o=z.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){z.set(t,r);var i=S.getId(t);e(n({},r,{id:i}))}}var s=["input","change"].map(function(e){return b(e,i)}),c=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),l=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return c&&c.set&&s.push.apply(s,l.map(function(e){return function e(t,n,r,o){var i=Object.getOwnPropertyDescriptor(t,n);return Object.defineProperty(t,n,o?r:{set:function(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),i&&i.set&&i.set.call(this,e)}}),function(){return e(t,n,i||{},!0)}}(e[0],e[1],{set:function(){i({target:this})}})})),function(){s.forEach(function(e){return e()})}}function X(e){var t,n,r,o,i,a,s=R(e.mutationCb,e.blockClass,e.inlineStylesheet,e.maskAllInputs),c=(t=e.mousemoveCb,r=[],o=N(function(){var e=Date.now()-n;t(r.map(function(t){return t.timeOffset-=e,t})),r=[],n=null},500),i=N(function(e){var t=e.target,i=k(e)?e.changedTouches[0]:e,a=i.clientX,s=i.clientY;n||(n=Date.now()),r.push({x:a,y:s,id:S.getId(t),timeOffset:Date.now()-n}),o()},50,{trailing:!1}),a=[b("mousemove",i),b("touchmove",i)],function(){a.forEach(function(e){return e()})}),l=_(e.mouseInteractionCb,e.blockClass),u=function(e,t){return b("scroll",N(function(n){if(n.target&&!M(n.target,t)){var r=S.getId(n.target);if(n.target===document){var o=document.scrollingElement||document.documentElement;e({id:r,x:o.scrollLeft,y:o.scrollTop})}else e({id:r,x:n.target.scrollLeft,y:n.target.scrollTop})}},100))}(e.scrollCb,e.blockClass),f=function(e){return b("resize",N(function(){var t=C(),n=x();e({width:Number(n),height:Number(t)})},200),window)}(e.viewportResizeCb),d=P(e.inputCb,e.blockClass,e.ignoreClass,e.maskAllInputs);return function(){s.disconnect(),c(),l(),u(),f(),d()}}function Y(e){return n({},e,{timestamp:Date.now()})}function H(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 V=Object.freeze({default:H});var U,W=(function(e,t){!function(){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)){var n,r=e.HTMLElement||e.Element,o=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||c,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(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=function(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}(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 c(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 u(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function f(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function d(e){var t=u(e,"Y")&&f(e,"Y"),n=u(e,"X")&&f(e,"X");return t||n}function p(t){var n,r,i,s,c=(a()-t.startTime)/o;s=c=c>1?1:c,n=.5*(1-Math.cos(Math.PI*s)),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,o){var s,l,u,f,d=a();n===t.body?(s=e,l=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,f=i.scroll):(s=n,l=n.scrollLeft,u=n.scrollTop,f=c),p({scrollable:s,method:f,startTime:d,startX:l,startY:u,x:r,y:o})}}}}()}(U={exports:{}},U.exports),U.exports).polyfill,G=function(){function e(e,t){void 0===t&&(t=[]),this.timeOffset=0,this.actions=t,this.config=e}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){var t;(t=this.actions).push.apply(t,e)},e.prototype.start=function(){this.actions.sort(function(e,t){return e.delay-t.delay}),this.timeOffset=0;var e=performance.now(),t=this.actions,n=this.config,r=this;this.raf=requestAnimationFrame(function o(i){for(r.timeOffset+=(i-e)*n.speed,e=i;t.length;){var a=t[0];if(!(r.timeOffset>=a.delay))break;t.shift(),a.doAction()}(t.length>0||r.config.liveMode)&&(r.raf=requestAnimationFrame(o))})},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},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}(),q=H||V,$=function(){function t(e,t){if(this.events=[],this.emitter=q(),this.baselineTime=0,this.noramlSpeed=-1,this.missingNodeRetryMap={},e.length<2)throw new Error("Replayer need at least 2 events.");this.events=e,this.handleResize=this.handleResize.bind(this);var n={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[]};this.config=Object.assign({},n,t),this.timer=new G(this.config),W(),this.setupDom(),this.emitter.on("resize",this.handleResize)}return t.prototype.on=function(e,t){this.emitter.on(e,t)},t.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach(function(n){t.config[n]=e[n]}),this.config.skipInactive||(this.noramlSpeed=-1)},t.prototype.getMetaData=function(){var e=this.events[0];return{totalTime:this.events[this.events.length-1].timestamp-e.timestamp}},t.prototype.getTimeOffset=function(){return this.baselineTime-this.events[0].timestamp},t.prototype.play=function(t){void 0===t&&(t=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+t;for(var n=new Array,r=0,o=this.events;r<o.length;r++){var i=o[r],a=i.timestamp<this.baselineTime,s=this.getCastFn(i,a);a?s():n.push({doAction:s,delay:this.getDelay(i)})}this.timer.addActions(n),this.timer.start(),this.emitter.emit(e.ReplayerEvents.Start)},t.prototype.pause=function(){this.timer.clear(),this.emitter.emit(e.ReplayerEvents.Pause)},t.prototype.resume=function(t){void 0===t&&(t=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+t;for(var n=new Array,r=0,o=this.events;r<o.length;r++){var i=o[r];if(!(i.timestamp<=this.lastPlayedEvent.timestamp||i===this.lastPlayedEvent)){var a=this.getCastFn(i);n.push({doAction:a,delay:this.getDelay(i)})}}this.timer.addActions(n),this.timer.start(),this.emitter.emit(e.ReplayerEvents.Resume)},t.prototype.addEvent=function(e){this.getCastFn(e,!0)()},t.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),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.iframe.setAttribute("scrolling","no"),this.iframe.setAttribute("style","pointer-events: none"),this.wrapper.appendChild(this.iframe)},t.prototype.handleResize=function(e){this.iframe.width=e.width+"px",this.iframe.height=e.height+"px"},t.prototype.getDelay=function(t){if(t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.MouseMove){var n=t.data.positions[0].timeOffset,r=t.timestamp+n;return t.delay=r-this.baselineTime,r-this.baselineTime}return t.delay=t.timestamp-this.baselineTime,t.timestamp-this.baselineTime},t.prototype.getCastFn=function(t,n){var r,o=this;switch(void 0===n&&(n=!1),t.type){case e.EventType.DomContentLoaded:case e.EventType.Load:break;case e.EventType.Meta:r=function(){return o.emitter.emit(e.ReplayerEvents.Resize,{width:t.data.width,height:t.data.height})};break;case e.EventType.FullSnapshot:r=function(){o.rebuildFullSnapshot(t),o.iframe.contentWindow.scrollTo(t.data.initialOffset)};break;case e.EventType.IncrementalSnapshot:r=function(){if(o.applyIncremental(t,n),t===o.nextUserInteractionEvent&&(o.nextUserInteractionEvent=null,o.restoreSpeed()),o.config.skipInactive&&!o.nextUserInteractionEvent){for(var r=0,i=o.events;r<i.length;r++){var a=i[r];if(!(a.timestamp<=t.timestamp)&&o.isUserInteraction(a)){a.delay-t.delay>1e4*o.config.speed&&(o.nextUserInteractionEvent=a);break}}if(o.nextUserInteractionEvent){o.noramlSpeed=o.config.speed;var s=o.nextUserInteractionEvent.delay-t.delay,c={speed:Math.min(Math.round(s/5e3),360)};o.setConfig(c),o.emitter.emit(e.ReplayerEvents.SkipStart,c)}}}}return function(){r&&r(),o.lastPlayedEvent=t,t===o.events[o.events.length-1]&&(o.restoreSpeed(),o.emitter.emit(e.ReplayerEvents.Finish))}},t.prototype.rebuildFullSnapshot=function(t){var n,r,o;Object.keys(this.missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.missingNodeRetryMap),this.missingNodeRetryMap={},S.map=(n=t.data.node,r=this.iframe.contentDocument,o={},[g(n,r,o),o])[1];var i=document.createElement("style"),a=this.iframe.contentDocument,s=a.documentElement,c=a.head;s.insertBefore(i,c);for(var l,u=(l=this.config.blockClass,["iframe, ."+l+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules),f=0;f<u.length;f++)i.sheet.insertRule(u[f],f);this.emitter.emit(e.ReplayerEvents.FullsnapshotRebuilded),this.waitForStylesheetLoad()},t.prototype.waitForStylesheetLoad=function(){var t=this,n=this.iframe.contentDocument.head;if(n){var r,o=new Set;n.querySelectorAll('link[rel="stylesheet"]').forEach(function(n){n.sheet||(0===o.size&&(t.pause(),t.emitter.emit(e.ReplayerEvents.LoadStylesheetStart),r=window.setTimeout(function(){t.resume(t.timer.timeOffset),r=-1},t.config.loadTimeout)),o.add(n),n.addEventListener("load",function(){o.delete(n),0===o.size&&-1!==r&&(t.resume(t.timer.timeOffset),t.emitter.emit(e.ReplayerEvents.LoadStylesheetEnd),r&&window.clearTimeout(r))}))})}},t.prototype.applyIncremental=function(t,r){var o=this,i=t.data;switch(i.source){case e.IncrementalSource.Mutation:i.removes.forEach(function(e){var t=S.getNode(e.id);if(!t)return o.warnNodeNotFound(i,e.id);var n=S.getNode(e.parentId);if(!n)return o.warnNodeNotFound(i,e.parentId);S.removeNodeFromMap(t),n&&n.removeChild(t)});var a=n({},this.missingNodeRetryMap),s=[],c=function(e){var t=S.getNode(e.parentId);if(!t)return s.push(e);var n=g(e.node,o.iframe.contentDocument,S.map,!0),r=null,i=null;e.previousId&&(r=S.getNode(e.previousId)),e.nextId&&(i=S.getNode(e.nextId)),-1!==e.previousId&&-1!==e.nextId?(r&&r.nextSibling&&r.nextSibling.parentNode?t.insertBefore(n,r.nextSibling):i&&i.parentNode?t.insertBefore(n,i):t.appendChild(n),(e.previousId||e.nextId)&&o.resolveMissingNode(a,t,n,e)):a[e.node.id]={node:n,mutation:e}};for(i.adds.forEach(function(e){c(e)});s.length;){if(s.every(function(e){return!Boolean(S.getNode(e.parentId))}))return s.forEach(function(e){return o.warnNodeNotFound(i,e.node.id)});var l=s.shift();c(l)}Object.keys(a).length&&Object.assign(this.missingNodeRetryMap,a),i.texts.forEach(function(e){var t=S.getNode(e.id);if(!t)return o.warnNodeNotFound(i,e.id);t.textContent=e.value}),i.attributes.forEach(function(e){var t=S.getNode(e.id);if(!t)return o.warnNodeNotFound(i,e.id);for(var n in e.attributes)if("string"==typeof n){var r=e.attributes[n];null!==r?t.setAttribute(n,r):t.removeAttribute(n)}});break;case e.IncrementalSource.MouseMove:if(r){var u=i.positions[i.positions.length-1];this.moveAndHover(i,u.x,u.y,u.id)}else i.positions.forEach(function(e){var n={doAction:function(){o.moveAndHover(i,e.x,e.y,e.id)},delay:e.timeOffset+t.timestamp-o.baselineTime};o.timer.addAction(n)});break;case e.IncrementalSource.MouseInteraction:if(-1===i.id)break;var f=new Event(e.MouseInteractions[i.type].toLowerCase());if(!(d=S.getNode(i.id)))return this.debugNodeNotFound(i,i.id);switch(this.emitter.emit(e.ReplayerEvents.MouseInteraction,{type:i.type,target:d}),i.type){case e.MouseInteractions.Blur:d.blur&&d.blur();break;case e.MouseInteractions.Focus:d.focus&&d.focus({preventScroll:!0});break;case e.MouseInteractions.Click:case e.MouseInteractions.TouchStart:case e.MouseInteractions.TouchEnd:r||(this.moveAndHover(i,i.x,i.y,i.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:d.dispatchEvent(f)}break;case e.IncrementalSource.Scroll:if(-1===i.id)break;if(!(d=S.getNode(i.id)))return this.debugNodeNotFound(i,i.id);if(d===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:i.y,left:i.x,behavior:r?"auto":"smooth"});else try{d.scrollTop=i.y,d.scrollLeft=i.x}catch(e){}break;case e.IncrementalSource.ViewportResize:this.emitter.emit(e.ReplayerEvents.Resize,{width:i.width,height:i.height});break;case e.IncrementalSource.Input:if(-1===i.id)break;var d;if(!(d=S.getNode(i.id)))return this.debugNodeNotFound(i,i.id);try{d.checked=i.isChecked,d.value=i.text}catch(e){}}},t.prototype.resolveMissingNode=function(e,t,n,r){var o=r.previousId,i=r.nextId,a=o&&e[o],s=i&&e[i];if(a){var c=a,l=c.node,u=c.mutation;t.insertBefore(l,n),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,l,u)}if(s){var f=s;l=f.node,u=f.mutation;t.insertBefore(l,n.nextSibling),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,l,u)}},t.prototype.moveAndHover=function(e,t,n,r){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px";var o=S.getNode(r);if(!o)return this.debugNodeNotFound(e,r);this.hoverElements(o)},t.prototype.hoverElements=function(e){this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach(function(e){e.classList.remove(":hover")});for(var t=e;t;)t.classList.add(":hover"),t=t.parentElement},t.prototype.isUserInteraction=function(t){return t.type===e.EventType.IncrementalSnapshot&&(t.data.source>e.IncrementalSource.Mutation&&t.data.source<=e.IncrementalSource.Input)},t.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var t={speed:this.noramlSpeed};this.setConfig(t),this.emitter.emit(e.ReplayerEvents.SkipEnd,t),this.noramlSpeed=-1}},t.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn("[replayer]","Node with id '"+t+"' not found in",e)},t.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log("[replayer]","Node with id '"+t+"' not found in",e)},t}();return e.record=function(t){void 0===t&&(t={});var r,o=t.emit,i=t.checkoutEveryNms,a=t.checkoutEveryNth,s=t.blockClass,c=void 0===s?"rr-block":s,l=t.ignoreClass,f=void 0===l?"rr-ignore":l,d=t.inlineStylesheet,p=void 0===d||d,h=t.maskAllInputs,m=void 0!==h&&h;if(!o)throw new Error("emit function is required");var v=0;function y(t){void 0===t&&(t=!1),F(Y({type:e.EventType.Meta,data:{href:window.location.href,width:x(),height:C()}}),t);var n=function(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[u(e,e,o,t,!1,n,r),o]}(document,c,p,m),r=n[0],o=n[1];if(!r)return console.warn("Failed to snapshot the document");S.map=o,F(Y({type:e.EventType.FullSnapshot,data:{node:r,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}F=function(t,n){if(o(t,n),t.type===e.EventType.FullSnapshot)r=t,v=0;else if(t.type===e.EventType.IncrementalSnapshot){v++;var s=a&&v>=a,c=i&&t.timestamp-r.timestamp>i;(s||c)&&y(!0)}};try{var g=[];g.push(b("DOMContentLoaded",function(){F(Y({type:e.EventType.DomContentLoaded,data:{}}))}));var E=function(){y(),g.push(X({mutationCb:function(t){return F(Y({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Mutation},t)}))},mousemoveCb:function(t){return F(Y({type:e.EventType.IncrementalSnapshot,data:{source:e.IncrementalSource.MouseMove,positions:t}}))},mouseInteractionCb:function(t){return F(Y({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.MouseInteraction},t)}))},scrollCb:function(t){return F(Y({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Scroll},t)}))},viewportResizeCb:function(t){return F(Y({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.ViewportResize},t)}))},inputCb:function(t){return F(Y({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Input},t)}))},blockClass:c,ignoreClass:f,maskAllInputs:m,inlineStylesheet:p}))};return"interactive"===document.readyState||"complete"===document.readyState?E():g.push(b("load",function(){F(Y({type:e.EventType.Load,data:{}})),E()},window)),function(){g.forEach(function(e){return e()})}}catch(e){console.warn(e)}},e.addCustomEvent=function(t,n){if(!F)throw new Error("please add custom event after start recording");F(Y({type:e.EventType.Custom,data:{tag:t,payload:n}}))},e.Replayer=$,e.mirror=S,e}({});
var rrweb=function(e){"use strict";var t,n=function(){return(n=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(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 r=1;function o(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+(function(e){return"styleSheet"in e}(n=t)?o(n.styleSheet)||"":n.cssText);var n},""):null}catch(e){return null}}var i=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,a=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,s=/^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;function c(e,t){return e.replace(i,function(e,n,r,o){var i,c=n||r||o;if(!c)return e;if(!a.test(c))return"url('"+c+"')";if(s.test(c))return"url("+c+")";if("/"===c[0])return"url('"+(((i=t).indexOf("//")>-1?i.split("/").slice(0,3).join("/"):i.split("/")[0]).split("?")[0]+c)+"')";var l=t.split("/"),u=c.split("/");l.pop();for(var f=0,d=u;f<d.length;f++){var p=d[f];"."!==p&&(".."===p?l.pop():l.push(p))}return"url('"+l.join("/")+"')"})}function l(e,t){var n=e.createElement("a");return n.href=t,n.href}function u(e,n,i,a,s,f,d){void 0===s&&(s=!1),void 0===f&&(f=!0),void 0===d&&(d=!1);var p,h=function(e,n,r,i,a){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:t.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:t.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:var s=!1;"string"==typeof r?s=e.classList.contains(r):e.classList.forEach(function(e){r.test(e)&&(s=!0)});for(var u=e.tagName.toLowerCase(),f={},d=0,p=Array.from(e.attributes);d<p.length;d++){var h=p[d],m=h.name,v=h.value;f[m]="src"===m||"href"===m?l(n,v):"style"===m?c(v,location.href):v}if("link"===u&&i){var y,g=Array.from(n.styleSheets).find(function(t){return t.href===e.href});(y=o(g))&&(delete f.rel,delete f.href,f._cssText=c(y,g.href))}if("style"===u&&e.sheet&&!(e.innerText||e.textContent||"").trim().length&&(y=o(e.sheet))&&(f._cssText=c(y,location.href)),"input"!==u&&"textarea"!==u&&"select"!==u||(v=e.value,"radio"!==f.type&&"checkbox"!==f.type&&v?f.value=a?"*".repeat(v.length):v:e.checked&&(f.checked=e.checked)),"option"===u){var b=e.parentElement;f.value===b.value&&(f.selected=e.selected)}if(s){var E=e.getBoundingClientRect(),w=E.width,T=E.height;f.rr_width=w+"px",f.rr_height=T+"px"}return{type:t.Element,tagName:u,attributes:f,childNodes:[],isSVG:(C=e,"svg"===C.tagName||C instanceof SVGElement||void 0),needBlock:s};case e.TEXT_NODE:var I=e.parentNode&&e.parentNode.tagName,S=e.textContent,N="STYLE"===I||void 0;return N&&S&&(S=c(S,location.href)),"SCRIPT"===I&&(S="SCRIPT_PLACEHOLDER"),{type:t.Text,textContent:S||"",isStyle:N};case e.CDATA_SECTION_NODE:return{type:t.CDATA,textContent:""};case e.COMMENT_NODE:return{type:t.Comment,textContent:e.textContent||""};default:return!1}var C}(e,n,a,f,d);if(!h)return console.warn(e,"not serialized"),null;p="__sn"in e?e.__sn.id:r++;var m=Object.assign(h,{id:p});e.__sn=m,i[p]=e;var v=!s;if(m.type===t.Element&&(v=v&&!m.needBlock,delete m.needBlock),(m.type===t.Document||m.type===t.Element)&&v)for(var y=0,g=Array.from(e.childNodes);y<g.length;y++){var b=u(g[y],n,i,a,s,f);b&&m.childNodes.push(b)}return m}var f=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g;function d(e,t){void 0===t&&(t={});var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=-1===o?r+e.length:e.length-o}function i(){var e={line:n,column:r};return function(t){return t.position=new a(e),m(),t}}var a=function(){return function(e){this.start=e,this.end={line:n,column:r},this.source=t.source}}();a.prototype.content=e;var s=[];function c(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;s.push(i)}function l(){return h(/^{\s*/)}function u(){return h(/^}/)}function d(){var t,n=[];for(m(),v(n);e.length&&"}"!==e.charAt(0)&&(t=x()||M());)!1!==t&&(n.push(t),v(n));return n}function h(t){var n=t.exec(e);if(n){var r=n[0];return o(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=i();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 c("End of comment missing");var a=e.slice(2,n-2);return r+=2,o(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function g(){var e=h(/^([^{]+)/);if(e)return p(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(e){return e.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(e){return e.replace(/\u200C/g,",")})}function b(){var e=i(),t=h(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=p(t[0]);if(!h(/^:\s*/))return c("property missing ':'");var r=h(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:n.replace(f,""),value:r?p(r[0]).replace(f,""):""});return h(/^[;\s]*/),o}}function E(){var e,t=[];if(!l())return c("missing '{'");for(v(t);e=b();)!1!==e&&(t.push(e),v(t)),e=b();return u()?t:c("missing '}'")}function w(){for(var e,t=[],n=i();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:E()})}var T,I=C("import"),S=C("charset"),N=C("namespace");function C(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=i(),r=h(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function x(){if("@"===e[0])return function(){var e=i(),t=h(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=h(/^([-\w]+)\s*/)))return c("@keyframes missing name");var r,o=t[1];if(!l())return c("@keyframes missing '{'");for(var a=v();r=w();)a.push(r),a=a.concat(v());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:a}):c("@keyframes missing '}'")}}()||function(){var e=i(),t=h(/^@media *([^{]+)/);if(t){var n=p(t[1]);if(!l())return c("@media missing '{'");var r=v().concat(d());return u()?e({type:"media",media:n,rules:r}):c("@media missing '}'")}}()||function(){var e=i(),t=h(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:p(t[1]),media:p(t[2])})}()||function(){var e=i(),t=h(/^@supports *([^{]+)/);if(t){var n=p(t[1]);if(!l())return c("@supports missing '{'");var r=v().concat(d());return u()?e({type:"supports",supports:n,rules:r}):c("@supports missing '}'")}}()||I()||S()||N()||function(){var e=i(),t=h(/^@([-\w]+)?document *([^{]+)/);if(t){var n=p(t[1]),r=p(t[2]);if(!l())return c("@document missing '{'");var o=v().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):c("@document missing '}'")}}()||function(){var e=i();if(h(/^@page */)){var t=g()||[];if(!l())return c("@page missing '{'");for(var n,r=v();n=b();)r.push(n),r=r.concat(v());return u()?e({type:"page",selectors:t,declarations:r}):c("@page missing '}'")}}()||function(){var e=i();if(h(/^@host\s*/)){if(!l())return c("@host missing '{'");var t=v().concat(d());return u()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=i();if(h(/^@font-face\s*/)){if(!l())return c("@font-face missing '{'");for(var t,n=v();t=b();)n.push(t),n=n.concat(v());return u()?e({type:"font-face",declarations:n}):c("@font-face missing '}'")}}()}function M(){var e=i(),t=g();return t?(v(),e({type:"rule",selectors:t,declarations:E()})):c("selector missing")}return function e(t,n){var r=t&&"string"==typeof t.type;var o=r?t:n;for(var i=0,a=Object.keys(t);i<a.length;i++){var s=a[i],c=t[s];Array.isArray(c)?c.forEach(function(t){e(t,o)}):c&&"object"==typeof c&&e(c,o)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((T=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:T,parsingErrors:s}}))}function p(e){return e?e.replace(/^\s+|\s+$/g,""):""}var h={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 m=/([^\\]):hover/g;function v(e){var t=d(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach(function(t){"selectors"in t&&(t.selectors||[]).forEach(function(t){if(m.test(t)){var n=t.replace(m,"$1.\\:hover");e=e.replace(t,t+", "+n)}})}),e):e}function y(e,n){switch(e.type){case t.Document:return n.implementation.createDocument(null,"",null);case t.DocumentType:return n.implementation.createDocumentType(e.name,e.publicId,e.systemId);case t.Element:var r=function(e){var t=h[e.tagName]?h[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e),o=void 0;for(var i in o=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",r):n.createElement(r),e.attributes)if(e.attributes.hasOwnProperty(i)&&!i.startsWith("rr_")){var a=e.attributes[i];a="boolean"==typeof a?"":a;var s="textarea"===r&&"value"===i,c="style"===r&&"_cssText"===i;if(c&&(a=v(a)),s||c){for(var l=n.createTextNode(a),u=0,f=Array.from(o.childNodes);u<f.length;u++){var d=f[u];d.nodeType===o.TEXT_NODE&&o.removeChild(d)}o.appendChild(l);continue}if("iframe"===r&&"src"===i)continue;try{e.isSVG&&"xlink:href"===i?o.setAttributeNS("http://www.w3.org/1999/xlink",i,a):o.setAttribute(i,a)}catch(e){}}else e.attributes.rr_width&&(o.style.width=e.attributes.rr_width),e.attributes.rr_height&&(o.style.height=e.attributes.rr_height);return o;case t.Text:return n.createTextNode(e.isStyle?v(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function g(e,n,r,o){void 0===o&&(o=!1);var i=y(e,n);if(!i)return null;if(e.type===t.Document&&(n.close(),n.open(),i=n),i.__sn=e,r[e.id]=i,(e.type===t.Document||e.type===t.Element)&&!o)for(var a=0,s=e.childNodes;a<s.length;a++){var c=s[a],l=g(c,n,r);l?i.appendChild(l):console.warn("Failed to rebuild",c)}return i}function b(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)}}var E,w,T,I,S={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return S.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete S.map[t],e.childNodes&&e.childNodes.forEach(function(e){return S.removeNodeFromMap(e)})},has:function(e){return S.map.hasOwnProperty(e)}};function N(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(i){var a=Date.now();o||!1!==n.leading||(o=a);var s=t-(a-o),c=this;s<=0||s>t?(r&&(window.clearTimeout(r),r=null),o=a,e.apply(c,i)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(c,i)},s))}}function C(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function x(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function M(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||M(e.parentNode,t)}return M(e.parentNode,t)}function k(e){return Boolean(e.changedTouches)}function D(){"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)}function A(e,t){e.delete(t),t.childNodes.forEach(function(t){return A(e,t)})}function O(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||O(e,n))}(E=e.EventType||(e.EventType={}))[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",(w=e.IncrementalSource||(e.IncrementalSource={}))[w.Mutation=0]="Mutation",w[w.MouseMove=1]="MouseMove",w[w.MouseInteraction=2]="MouseInteraction",w[w.Scroll=3]="Scroll",w[w.ViewportResize=4]="ViewportResize",w[w.Input=5]="Input",w[w.TouchMove=6]="TouchMove",(T=e.MouseInteractions||(e.MouseInteractions={}))[T.MouseUp=0]="MouseUp",T[T.MouseDown=1]="MouseDown",T[T.Click=2]="Click",T[T.ContextMenu=3]="ContextMenu",T[T.DblClick=4]="DblClick",T[T.Focus=5]="Focus",T[T.Blur=6]="Blur",T[T.TouchStart=7]="TouchStart",T[T.TouchMove_Departed=8]="TouchMove_Departed",T[T.TouchEnd=9]="TouchEnd",(I=e.ReplayerEvents||(e.ReplayerEvents={})).Start="start",I.Pause="pause",I.Resume="resume",I.Resize="resize",I.Finish="finish",I.FullsnapshotRebuilded="fullsnapshot-rebuilded",I.LoadStylesheetStart="load-stylesheet-start",I.LoadStylesheetEnd="load-stylesheet-end",I.SkipStart="skip-start",I.SkipEnd="skip-end",I.MouseInteraction="mouse-interaction";var L=function(e,t){return e+"@"+t};function R(e){return"__sn"in e}function _(e,t,n,r){var o=new MutationObserver(function(o){var i=[],a=[],s=[],c=[],l=new Set,f=new Set,d=new Set,p={},h=function(e,n){if(!M(e,t)){if(R(e)){f.add(e);var r=null;n&&R(n)&&(r=n.__sn.id),r&&(p[L(e.__sn.id,r)]=!0)}else l.add(e),d.delete(e);e.childNodes.forEach(function(e){return h(e)})}};o.forEach(function(e){var n=e.type,r=e.target,o=e.oldValue,c=e.addedNodes,u=e.removedNodes,m=e.attributeName;switch(n){case"characterData":var v=r.textContent;M(r,t)||v===o||i.push({value:v,node:r});break;case"attributes":v=r.getAttribute(m);if(M(r,t)||v===o)return;var y=a.find(function(e){return e.node===r});y||(y={node:r,attributes:{}},a.push(y)),y.attributes[m]=v;break;case"childList":c.forEach(function(e){return h(e,r)}),u.forEach(function(e){var n=S.getId(e),o=S.getId(r);M(e,t)||(l.has(e)?(A(l,e),d.add(e)):l.has(r)&&-1===n||function e(t){var n=S.getId(t);return!S.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode))}(r)||(f.has(e)&&p[L(n,o)]?A(f,e):s.push({parentId:o,id:n})),S.removeNodeFromMap(e))})}});var m=[],v=function(e){var o=S.getId(e.parentNode);if(-1===o)return m.push(e);c.push({parentId:o,previousId:e.previousSibling?S.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?S.getId(e.nextSibling):e.nextSibling,node:u(e,document,S.map,t,!0,n,r)})};for(Array.from(f).forEach(v),Array.from(l).forEach(function(e){O(d,e)||function e(t,n){var r=n.parentNode;if(!r)return!1;var o=S.getId(r);return!!t.some(function(e){return e.id===o})||e(t,r)}(s,e)?O(f,e)?v(e):d.add(e):v(e)});m.length&&!m.every(function(e){return-1===S.getId(e.parentNode)});)v(m.shift());var y={texts:i.map(function(e){return{id:S.getId(e.node),value:e.value}}).filter(function(e){return S.has(e.id)}),attributes:a.map(function(e){return{id:S.getId(e.node),attributes:e.attributes}}).filter(function(e){return S.has(e.id)}),removes:s,adds:c};(y.texts.length||y.attributes.length||y.removes.length||y.adds.length)&&e(y)});return o.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function F(t,n){var r=[];return Object.keys(e.MouseInteractions).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(o){var i=o.toLowerCase(),a=function(r){return function(o){if(!M(o.target,n)){var i=S.getId(o.target),a=k(o)?o.changedTouches[0]:o,s=a.clientX,c=a.clientY;t({type:e.MouseInteractions[r],id:i,x:s,y:c})}}}(o);r.push(b(i,a))}),function(){r.forEach(function(e){return e()})}}var B,j=["INPUT","TEXTAREA","SELECT"],z=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],P=new WeakMap;function X(e,t,r,o){function i(e){var n=e.target;if(n&&n.tagName&&!(j.indexOf(n.tagName)<0)&&!M(n,t)){var i=n.type;if("password"!==i&&!n.classList.contains(r)){var s=n.value,c=!1,l=z.includes(i)||"TEXTAREA"===n.tagName;"radio"===i||"checkbox"===i?c=n.checked:l&&o&&(s="*".repeat(s.length)),a(n,{text:s,isChecked:c});var u=n.name;"radio"===i&&u&&c&&document.querySelectorAll('input[type="radio"][name="'+u+'"]').forEach(function(e){e!==n&&a(e,{text:e.value,isChecked:!c})})}}}function a(t,r){var o=P.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){P.set(t,r);var i=S.getId(t);e(n({},r,{id:i}))}}var s=["input","change"].map(function(e){return b(e,i)}),c=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),l=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return c&&c.set&&s.push.apply(s,l.map(function(e){return function e(t,n,r,o){var i=Object.getOwnPropertyDescriptor(t,n);return Object.defineProperty(t,n,o?r:{set:function(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),i&&i.set&&i.set.call(this,e)}}),function(){return e(t,n,i||{},!0)}}(e[0],e[1],{set:function(){i({target:this})}})})),function(){s.forEach(function(e){return e()})}}function Y(t){var n,r,o,i,a,s,c=_(t.mutationCb,t.blockClass,t.inlineStylesheet,t.maskAllInputs),l=(n=t.mousemoveCb,o=[],i=N(function(t){var i=Date.now()-r;n(o.map(function(e){return e.timeOffset-=i,e}),t?e.IncrementalSource.TouchMove:e.IncrementalSource.MouseMove),o=[],r=null},500),a=N(function(e){var t=e.target,n=k(e)?e.changedTouches[0]:e,a=n.clientX,s=n.clientY;r||(r=Date.now()),o.push({x:a,y:s,id:S.getId(t),timeOffset:Date.now()-r}),i(k(e))},50,{trailing:!1}),s=[b("mousemove",a),b("touchmove",a)],function(){s.forEach(function(e){return e()})}),u=F(t.mouseInteractionCb,t.blockClass),f=function(e,t){return b("scroll",N(function(n){if(n.target&&!M(n.target,t)){var r=S.getId(n.target);if(n.target===document){var o=document.scrollingElement||document.documentElement;e({id:r,x:o.scrollLeft,y:o.scrollTop})}else e({id:r,x:n.target.scrollLeft,y:n.target.scrollTop})}},100))}(t.scrollCb,t.blockClass),d=function(e){return b("resize",N(function(){var t=C(),n=x();e({width:Number(n),height:Number(t)})},200),window)}(t.viewportResizeCb),p=X(t.inputCb,t.blockClass,t.ignoreClass,t.maskAllInputs);return function(){c.disconnect(),l(),u(),f(),d(),p()}}function H(e){return n({},e,{timestamp:Date.now()})}function V(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 U=Object.freeze({default:V});var W,G=(function(e,t){!function(){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)){var n,r=e.HTMLElement||e.Element,o=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||c,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(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=function(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}(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 c(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 u(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function f(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function d(e){var t=u(e,"Y")&&f(e,"Y"),n=u(e,"X")&&f(e,"X");return t||n}function p(t){var n,r,i,s,c=(a()-t.startTime)/o;s=c=c>1?1:c,n=.5*(1-Math.cos(Math.PI*s)),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,o){var s,l,u,f,d=a();n===t.body?(s=e,l=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,f=i.scroll):(s=n,l=n.scrollLeft,u=n.scrollTop,f=c),p({scrollable:s,method:f,startTime:d,startX:l,startY:u,x:r,y:o})}}}}()}(W={exports:{}},W.exports),W.exports).polyfill,q=function(){function e(e,t){void 0===t&&(t=[]),this.timeOffset=0,this.actions=t,this.config=e}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){var t;(t=this.actions).push.apply(t,e)},e.prototype.start=function(){this.actions.sort(function(e,t){return e.delay-t.delay}),this.timeOffset=0;var e=performance.now(),t=this.actions,n=this.config,r=this;this.raf=requestAnimationFrame(function o(i){for(r.timeOffset+=(i-e)*n.speed,e=i;t.length;){var a=t[0];if(!(r.timeOffset>=a.delay))break;t.shift(),a.doAction()}(t.length>0||r.config.liveMode)&&(r.raf=requestAnimationFrame(o))})},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},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}(),$=V||U,Z=function(){function t(e,t){if(this.events=[],this.emitter=$(),this.baselineTime=0,this.noramlSpeed=-1,this.missingNodeRetryMap={},e.length<2)throw new Error("Replayer need at least 2 events.");this.events=e,this.handleResize=this.handleResize.bind(this);var n={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[]};this.config=Object.assign({},n,t),this.timer=new q(this.config),G(),D(),this.setupDom(),this.emitter.on("resize",this.handleResize)}return t.prototype.on=function(e,t){this.emitter.on(e,t)},t.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach(function(n){t.config[n]=e[n]}),this.config.skipInactive||(this.noramlSpeed=-1)},t.prototype.getMetaData=function(){var e=this.events[0];return{totalTime:this.events[this.events.length-1].timestamp-e.timestamp}},t.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},t.prototype.getTimeOffset=function(){return this.baselineTime-this.events[0].timestamp},t.prototype.play=function(t){void 0===t&&(t=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+t;for(var n=new Array,r=0,o=this.events;r<o.length;r++){var i=o[r],a=i.timestamp<this.baselineTime,s=this.getCastFn(i,a);a?s():n.push({doAction:s,delay:this.getDelay(i)})}this.timer.addActions(n),this.timer.start(),this.emitter.emit(e.ReplayerEvents.Start)},t.prototype.pause=function(){this.timer.clear(),this.emitter.emit(e.ReplayerEvents.Pause)},t.prototype.resume=function(t){void 0===t&&(t=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+t;for(var n=new Array,r=0,o=this.events;r<o.length;r++){var i=o[r];if(!(i.timestamp<=this.lastPlayedEvent.timestamp||i===this.lastPlayedEvent)){var a=this.getCastFn(i);n.push({doAction:a,delay:this.getDelay(i)})}}this.timer.addActions(n),this.timer.start(),this.emitter.emit(e.ReplayerEvents.Resume)},t.prototype.addEvent=function(e){this.getCastFn(e,!0)()},t.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),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.iframe.setAttribute("scrolling","no"),this.iframe.setAttribute("style","pointer-events: none"),this.wrapper.appendChild(this.iframe)},t.prototype.handleResize=function(e){this.iframe.width=e.width+"px",this.iframe.height=e.height+"px"},t.prototype.getDelay=function(t){if(t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.MouseMove){var n=t.data.positions[0].timeOffset,r=t.timestamp+n;return t.delay=r-this.baselineTime,r-this.baselineTime}return t.delay=t.timestamp-this.baselineTime,t.timestamp-this.baselineTime},t.prototype.getCastFn=function(t,n){var r,o=this;switch(void 0===n&&(n=!1),t.type){case e.EventType.DomContentLoaded:case e.EventType.Load:break;case e.EventType.Meta:r=function(){return o.emitter.emit(e.ReplayerEvents.Resize,{width:t.data.width,height:t.data.height})};break;case e.EventType.FullSnapshot:r=function(){o.rebuildFullSnapshot(t),o.iframe.contentWindow.scrollTo(t.data.initialOffset)};break;case e.EventType.IncrementalSnapshot:r=function(){if(o.applyIncremental(t,n),t===o.nextUserInteractionEvent&&(o.nextUserInteractionEvent=null,o.restoreSpeed()),o.config.skipInactive&&!o.nextUserInteractionEvent){for(var r=0,i=o.events;r<i.length;r++){var a=i[r];if(!(a.timestamp<=t.timestamp)&&o.isUserInteraction(a)){a.delay-t.delay>1e4*o.config.speed&&(o.nextUserInteractionEvent=a);break}}if(o.nextUserInteractionEvent){o.noramlSpeed=o.config.speed;var s=o.nextUserInteractionEvent.delay-t.delay,c={speed:Math.min(Math.round(s/5e3),360)};o.setConfig(c),o.emitter.emit(e.ReplayerEvents.SkipStart,c)}}}}return function(){r&&r(),o.lastPlayedEvent=t,t===o.events[o.events.length-1]&&(o.restoreSpeed(),o.emitter.emit(e.ReplayerEvents.Finish))}},t.prototype.rebuildFullSnapshot=function(t){var n,r,o;Object.keys(this.missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.missingNodeRetryMap),this.missingNodeRetryMap={},S.map=(n=t.data.node,r=this.iframe.contentDocument,o={},[g(n,r,o),o])[1];var i=document.createElement("style"),a=this.iframe.contentDocument,s=a.documentElement,c=a.head;s.insertBefore(i,c);for(var l,u=(l=this.config.blockClass,["iframe, ."+l+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules),f=0;f<u.length;f++)i.sheet.insertRule(u[f],f);this.emitter.emit(e.ReplayerEvents.FullsnapshotRebuilded),this.waitForStylesheetLoad()},t.prototype.waitForStylesheetLoad=function(){var t=this,n=this.iframe.contentDocument.head;if(n){var r,o=new Set;n.querySelectorAll('link[rel="stylesheet"]').forEach(function(n){n.sheet||(0===o.size&&(t.pause(),t.emitter.emit(e.ReplayerEvents.LoadStylesheetStart),r=window.setTimeout(function(){t.resume(t.getCurrentTime()),r=-1},t.config.loadTimeout)),o.add(n),n.addEventListener("load",function(){o.delete(n),0===o.size&&-1!==r&&(t.resume(t.getCurrentTime()),t.emitter.emit(e.ReplayerEvents.LoadStylesheetEnd),r&&window.clearTimeout(r))}))})}},t.prototype.applyIncremental=function(t,r){var o=this,i=t.data;switch(i.source){case e.IncrementalSource.Mutation:i.removes.forEach(function(e){var t=S.getNode(e.id);if(!t)return o.warnNodeNotFound(i,e.id);var n=S.getNode(e.parentId);if(!n)return o.warnNodeNotFound(i,e.parentId);S.removeNodeFromMap(t),n&&n.removeChild(t)});var a=n({},this.missingNodeRetryMap),s=[],c=function(e){var t=S.getNode(e.parentId);if(!t)return s.push(e);var n=g(e.node,o.iframe.contentDocument,S.map,!0),r=null,i=null;e.previousId&&(r=S.getNode(e.previousId)),e.nextId&&(i=S.getNode(e.nextId)),-1!==e.previousId&&-1!==e.nextId?(r&&r.nextSibling&&r.nextSibling.parentNode?t.insertBefore(n,r.nextSibling):i&&i.parentNode?t.insertBefore(n,i):t.appendChild(n),(e.previousId||e.nextId)&&o.resolveMissingNode(a,t,n,e)):a[e.node.id]={node:n,mutation:e}};for(i.adds.forEach(function(e){c(e)});s.length;){if(s.every(function(e){return!Boolean(S.getNode(e.parentId))}))return s.forEach(function(e){return o.warnNodeNotFound(i,e.node.id)});var l=s.shift();c(l)}Object.keys(a).length&&Object.assign(this.missingNodeRetryMap,a),i.texts.forEach(function(e){var t=S.getNode(e.id);if(!t)return o.warnNodeNotFound(i,e.id);t.textContent=e.value}),i.attributes.forEach(function(e){var t=S.getNode(e.id);if(!t)return o.warnNodeNotFound(i,e.id);for(var n in e.attributes)if("string"==typeof n){var r=e.attributes[n];null!==r?t.setAttribute(n,r):t.removeAttribute(n)}});break;case e.IncrementalSource.MouseMove:if(r){var u=i.positions[i.positions.length-1];this.moveAndHover(i,u.x,u.y,u.id)}else i.positions.forEach(function(e){var n={doAction:function(){o.moveAndHover(i,e.x,e.y,e.id)},delay:e.timeOffset+t.timestamp-o.baselineTime};o.timer.addAction(n)});break;case e.IncrementalSource.MouseInteraction:if(-1===i.id)break;var f=new Event(e.MouseInteractions[i.type].toLowerCase());if(!(d=S.getNode(i.id)))return this.debugNodeNotFound(i,i.id);switch(this.emitter.emit(e.ReplayerEvents.MouseInteraction,{type:i.type,target:d}),i.type){case e.MouseInteractions.Blur:d.blur&&d.blur();break;case e.MouseInteractions.Focus:d.focus&&d.focus({preventScroll:!0});break;case e.MouseInteractions.Click:case e.MouseInteractions.TouchStart:case e.MouseInteractions.TouchEnd:r||(this.moveAndHover(i,i.x,i.y,i.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:d.dispatchEvent(f)}break;case e.IncrementalSource.Scroll:if(-1===i.id)break;if(!(d=S.getNode(i.id)))return this.debugNodeNotFound(i,i.id);if(d===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:i.y,left:i.x,behavior:r?"auto":"smooth"});else try{d.scrollTop=i.y,d.scrollLeft=i.x}catch(e){}break;case e.IncrementalSource.ViewportResize:this.emitter.emit(e.ReplayerEvents.Resize,{width:i.width,height:i.height});break;case e.IncrementalSource.Input:if(-1===i.id)break;var d;if(!(d=S.getNode(i.id)))return this.debugNodeNotFound(i,i.id);try{d.checked=i.isChecked,d.value=i.text}catch(e){}}},t.prototype.resolveMissingNode=function(e,t,n,r){var o=r.previousId,i=r.nextId,a=o&&e[o],s=i&&e[i];if(a){var c=a,l=c.node,u=c.mutation;t.insertBefore(l,n),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,l,u)}if(s){var f=s;l=f.node,u=f.mutation;t.insertBefore(l,n.nextSibling),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,l,u)}},t.prototype.moveAndHover=function(e,t,n,r){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px";var o=S.getNode(r);if(!o)return this.debugNodeNotFound(e,r);this.hoverElements(o)},t.prototype.hoverElements=function(e){this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach(function(e){e.classList.remove(":hover")});for(var t=e;t;)t.classList.add(":hover"),t=t.parentElement},t.prototype.isUserInteraction=function(t){return t.type===e.EventType.IncrementalSnapshot&&(t.data.source>e.IncrementalSource.Mutation&&t.data.source<=e.IncrementalSource.Input)},t.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var t={speed:this.noramlSpeed};this.setConfig(t),this.emitter.emit(e.ReplayerEvents.SkipEnd,t),this.noramlSpeed=-1}},t.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn("[replayer]","Node with id '"+t+"' not found in",e)},t.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log("[replayer]","Node with id '"+t+"' not found in",e)},t}();return e.record=function(t){void 0===t&&(t={});var r,o=t.emit,i=t.checkoutEveryNms,a=t.checkoutEveryNth,s=t.blockClass,c=void 0===s?"rr-block":s,l=t.ignoreClass,f=void 0===l?"rr-ignore":l,d=t.inlineStylesheet,p=void 0===d||d,h=t.maskAllInputs,m=void 0!==h&&h;if(!o)throw new Error("emit function is required");D();var v=0;function y(t){void 0===t&&(t=!1),B(H({type:e.EventType.Meta,data:{href:window.location.href,width:x(),height:C()}}),t);var n=function(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[u(e,e,o,t,!1,n,r),o]}(document,c,p,m),r=n[0],o=n[1];if(!r)return console.warn("Failed to snapshot the document");S.map=o,B(H({type:e.EventType.FullSnapshot,data:{node:r,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}B=function(t,n){if(o(t,n),t.type===e.EventType.FullSnapshot)r=t,v=0;else if(t.type===e.EventType.IncrementalSnapshot){v++;var s=a&&v>=a,c=i&&t.timestamp-r.timestamp>i;(s||c)&&y(!0)}};try{var g=[];g.push(b("DOMContentLoaded",function(){B(H({type:e.EventType.DomContentLoaded,data:{}}))}));var E=function(){y(),g.push(Y({mutationCb:function(t){return B(H({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Mutation},t)}))},mousemoveCb:function(t,n){return B(H({type:e.EventType.IncrementalSnapshot,data:{source:n,positions:t}}))},mouseInteractionCb:function(t){return B(H({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.MouseInteraction},t)}))},scrollCb:function(t){return B(H({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Scroll},t)}))},viewportResizeCb:function(t){return B(H({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.ViewportResize},t)}))},inputCb:function(t){return B(H({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Input},t)}))},blockClass:c,ignoreClass:f,maskAllInputs:m,inlineStylesheet:p}))};return"interactive"===document.readyState||"complete"===document.readyState?E():g.push(b("load",function(){B(H({type:e.EventType.Load,data:{}})),E()},window)),function(){g.forEach(function(e){return e()})}}catch(e){console.warn(e)}},e.addCustomEvent=function(t,n){if(!B)throw new Error("please add custom event after start recording");B(H({type:e.EventType.Custom,data:{tag:t,payload:n}}))},e.Replayer=Z,e.mirror=S,e}({});
//# sourceMappingURL=rrweb.min.js.map

@@ -323,3 +323,3 @@ /*! *****************************************************************************

var previous = 0;
return function () {
return function (args) {
var now = Date.now();

@@ -331,3 +331,2 @@ if (!previous && options.leading === false) {

var context = this;
var args = arguments;
if (remaining <= 0 || remaining > wait) {

@@ -352,13 +351,15 @@ if (timeout) {

var original = Object.getOwnPropertyDescriptor(target, key);
Object.defineProperty(target, key, isRevoked ? d : {
set: function (value) {
var _this = this;
setTimeout(function () {
d.set.call(_this, value);
}, 0);
if (original && original.set) {
original.set.call(this, value);
Object.defineProperty(target, key, isRevoked
? d
: {
set: function (value) {
var _this = this;
setTimeout(function () {
d.set.call(_this, value);
}, 0);
if (original && original.set) {
original.set.call(this, value);
}
}
}
});
});
return function () { return hookSetter(target, key, original || {}, true); };

@@ -413,2 +414,8 @@ }

}
function polyfill() {
if ('NodeList' in window && !NodeList.prototype.forEach) {
NodeList.prototype.forEach = Array.prototype
.forEach;
}
}

@@ -432,2 +439,3 @@ var EventType;

IncrementalSource[IncrementalSource["Input"] = 5] = "Input";
IncrementalSource[IncrementalSource["TouchMove"] = 6] = "TouchMove";
})(IncrementalSource || (IncrementalSource = {}));

@@ -654,3 +662,3 @@ var MouseInteractions;

var timeBaseline;
var wrappedCb = throttle(function () {
var wrappedCb = throttle(function (isTouch) {
var totalOffset = Date.now() - timeBaseline;

@@ -660,3 +668,3 @@ cb(positions.map(function (p) {

return p;
}));
}), isTouch ? IncrementalSource.TouchMove : IncrementalSource.MouseMove);
positions = [];

@@ -679,3 +687,3 @@ timeBaseline = null;

});
wrappedCb();
wrappedCb(isTouchEvent(evt));
}, 50, {

@@ -885,2 +893,3 @@ trailing: false

}
polyfill();
var lastFullSnapshotEvent;

@@ -947,7 +956,7 @@ var incrementalSnapshotCount = 0;

},
mousemoveCb: function (positions) {
mousemoveCb: function (positions, source) {
return wrappedEmit(wrapEvent({
type: EventType.IncrementalSnapshot,
data: {
source: IncrementalSource.MouseMove,
source: source,
positions: positions

@@ -954,0 +963,0 @@ }

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

var NodeType,__assign=function(){return(__assign=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(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"}(NodeType||(NodeType={}));var _id=1;function genId(){return _id++}function getCssRulesString(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+getCssRuleString(t)},""):null}catch(e){return null}}function getCssRuleString(e){return isCSSImportRule(e)?getCssRulesString(e.styleSheet)||"":e.cssText}function isCSSImportRule(e){return"styleSheet"in e}function extractOrigin(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}var URL_IN_CSS_REF=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,RELATIVE_PATH=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,DATA_URI=/^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;function absoluteToStylesheet(e,t){return e.replace(URL_IN_CSS_REF,function(e,n,r,o){var i=n||r||o;if(!i)return e;if(!RELATIVE_PATH.test(i))return"url('"+i+"')";if(DATA_URI.test(i))return"url("+i+")";if("/"===i[0])return"url('"+(extractOrigin(t)+i)+"')";var a=t.split("/"),s=i.split("/");a.pop();for(var u=0,c=s;u<c.length;u++){var l=c[u];"."!==l&&(".."===l?a.pop():a.push(l))}return"url('"+a.join("/")+"')"})}function absoluteToDoc(e,t){var n=e.createElement("a");return n.href=t,n.href}function isSVGElement(e){return"svg"===e.tagName||e instanceof SVGElement}function serializeNode(e,t,n,r,o){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:NodeType.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:var i=!1;"string"==typeof n?i=e.classList.contains(n):e.classList.forEach(function(e){n.test(e)&&(i=!0)});for(var a=e.tagName.toLowerCase(),s={},u=0,c=Array.from(e.attributes);u<c.length;u++){var l=c[u],d=l.name,p=l.value;s[d]="src"===d||"href"===d?absoluteToDoc(t,p):"style"===d?absoluteToStylesheet(p,location.href):p}if("link"===a&&r){var m,f=Array.from(t.styleSheets).find(function(t){return t.href===e.href});(m=getCssRulesString(f))&&(delete s.rel,delete s.href,s._cssText=absoluteToStylesheet(m,f.href))}if("style"===a&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(m=getCssRulesString(e.sheet))&&(s._cssText=absoluteToStylesheet(m,location.href));if("input"===a||"textarea"===a||"select"===a){p=e.value;"radio"!==s.type&&"checkbox"!==s.type&&p?s.value=o?"*".repeat(p.length):p:e.checked&&(s.checked=e.checked)}if("option"===a){var h=e.parentElement;s.value===h.value&&(s.selected=e.selected)}if(i){var v=e.getBoundingClientRect(),E=v.width,y=v.height;s.rr_width=E+"px",s.rr_height=y+"px"}return{type:NodeType.Element,tagName:a,attributes:s,childNodes:[],isSVG:isSVGElement(e)||void 0,needBlock:i};case e.TEXT_NODE:var g=e.parentNode&&e.parentNode.tagName,T=e.textContent,S="STYLE"===g||void 0;return S&&T&&(T=absoluteToStylesheet(T,location.href)),"SCRIPT"===g&&(T="SCRIPT_PLACEHOLDER"),{type:NodeType.Text,textContent:T||"",isStyle:S};case e.CDATA_SECTION_NODE:return{type:NodeType.CDATA,textContent:""};case e.COMMENT_NODE:return{type:NodeType.Comment,textContent:e.textContent||""};default:return!1}}function serializeNodeWithId(e,t,n,r,o,i,a){void 0===o&&(o=!1),void 0===i&&(i=!0),void 0===a&&(a=!1);var s,u=serializeNode(e,t,r,i,a);if(!u)return console.warn(e,"not serialized"),null;s="__sn"in e?e.__sn.id:genId();var c=Object.assign(u,{id:s});e.__sn=c,n[s]=e;var l=!o;if(c.type===NodeType.Element&&(l=l&&!c.needBlock,delete c.needBlock),(c.type===NodeType.Document||c.type===NodeType.Element)&&l)for(var d=0,p=Array.from(e.childNodes);d<p.length;d++){var m=serializeNodeWithId(p[d],t,n,r,o,i);m&&c.childNodes.push(m)}return c}function snapshot(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[serializeNodeWithId(e,e,o,t,!1,n,r),o]}function on(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)}}var EventType,IncrementalSource,MouseInteractions,ReplayerEvents,mirror={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return mirror.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete mirror.map[t],e.childNodes&&e.childNodes.forEach(function(e){return mirror.removeNodeFromMap(e)})},has:function(e){return mirror.map.hasOwnProperty(e)}};function throttle(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(){var i=Date.now();o||!1!==n.leading||(o=i);var a=t-(i-o),s=this,u=arguments;a<=0||a>t?(r&&(window.clearTimeout(r),r=null),o=i,e.apply(s,u)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(s,u)},a))}}function hookSetter(e,t,n,r){var o=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return hookSetter(e,t,o||{},!0)}}function getWindowHeight(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function getWindowWidth(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function isBlocked(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||isBlocked(e.parentNode,t)}return isBlocked(e.parentNode,t)}function isAncestorRemoved(e){var t=mirror.getId(e);return!mirror.has(t)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||isAncestorRemoved(e.parentNode))}function isTouchEvent(e){return Boolean(e.changedTouches)}function deepDelete(e,t){e.delete(t),t.childNodes.forEach(function(t){return deepDelete(e,t)})}function isParentRemoved(e,t){var n=t.parentNode;if(!n)return!1;var r=mirror.getId(n);return!!e.some(function(e){return e.id===r})||isParentRemoved(e,n)}function isAncestorInSet(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||isAncestorInSet(e,n))}!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"}(EventType||(EventType={})),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"}(IncrementalSource||(IncrementalSource={})),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"}(MouseInteractions||(MouseInteractions={})),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"}(ReplayerEvents||(ReplayerEvents={}));var moveKey=function(e,t){return e+"@"+t};function isINode(e){return"__sn"in e}function initMutationObserver(e,t,n,r){var o=new MutationObserver(function(o){var i=[],a=[],s=[],u=[],c=new Set,l=new Set,d=new Set,p={},m=function(e,n){if(!isBlocked(e,t)){if(isINode(e)){l.add(e);var r=null;n&&isINode(n)&&(r=n.__sn.id),r&&(p[moveKey(e.__sn.id,r)]=!0)}else c.add(e),d.delete(e);e.childNodes.forEach(function(e){return m(e)})}};o.forEach(function(e){var n=e.type,r=e.target,o=e.oldValue,u=e.addedNodes,f=e.removedNodes,h=e.attributeName;switch(n){case"characterData":var v=r.textContent;isBlocked(r,t)||v===o||i.push({value:v,node:r});break;case"attributes":v=r.getAttribute(h);if(isBlocked(r,t)||v===o)return;var E=a.find(function(e){return e.node===r});E||(E={node:r,attributes:{}},a.push(E)),E.attributes[h]=v;break;case"childList":u.forEach(function(e){return m(e,r)}),f.forEach(function(e){var n=mirror.getId(e),o=mirror.getId(r);isBlocked(e,t)||(c.has(e)?(deepDelete(c,e),d.add(e)):c.has(r)&&-1===n||isAncestorRemoved(r)||(l.has(e)&&p[moveKey(n,o)]?deepDelete(l,e):s.push({parentId:o,id:n})),mirror.removeNodeFromMap(e))})}});var f=[],h=function(e){var o=mirror.getId(e.parentNode);if(-1===o)return f.push(e);u.push({parentId:o,previousId:e.previousSibling?mirror.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?mirror.getId(e.nextSibling):e.nextSibling,node:serializeNodeWithId(e,document,mirror.map,t,!0,n,r)})};for(Array.from(l).forEach(h),Array.from(c).forEach(function(e){isAncestorInSet(d,e)||isParentRemoved(s,e)?isAncestorInSet(l,e)?h(e):d.add(e):h(e)});f.length&&!f.every(function(e){return-1===mirror.getId(e.parentNode)});)h(f.shift());var v={texts:i.map(function(e){return{id:mirror.getId(e.node),value:e.value}}).filter(function(e){return mirror.has(e.id)}),attributes:a.map(function(e){return{id:mirror.getId(e.node),attributes:e.attributes}}).filter(function(e){return mirror.has(e.id)}),removes:s,adds:u};(v.texts.length||v.attributes.length||v.removes.length||v.adds.length)&&e(v)});return o.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function initMoveObserver(e){var t,n=[],r=throttle(function(){var r=Date.now()-t;e(n.map(function(e){return e.timeOffset-=r,e})),n=[],t=null},500),o=throttle(function(e){var o=e.target,i=isTouchEvent(e)?e.changedTouches[0]:e,a=i.clientX,s=i.clientY;t||(t=Date.now()),n.push({x:a,y:s,id:mirror.getId(o),timeOffset:Date.now()-t}),r()},50,{trailing:!1}),i=[on("mousemove",o),on("touchmove",o)];return function(){i.forEach(function(e){return e()})}}function initMouseInteractionObserver(e,t){var n=[];return Object.keys(MouseInteractions).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(r){var o=r.toLowerCase(),i=function(n){return function(r){if(!isBlocked(r.target,t)){var o=mirror.getId(r.target),i=isTouchEvent(r)?r.changedTouches[0]:r,a=i.clientX,s=i.clientY;e({type:MouseInteractions[n],id:o,x:a,y:s})}}}(r);n.push(on(o,i))}),function(){n.forEach(function(e){return e()})}}function initScrollObserver(e,t){return on("scroll",throttle(function(n){if(n.target&&!isBlocked(n.target,t)){var r=mirror.getId(n.target);if(n.target===document){var o=document.scrollingElement||document.documentElement;e({id:r,x:o.scrollLeft,y:o.scrollTop})}else e({id:r,x:n.target.scrollLeft,y:n.target.scrollTop})}},100))}function initViewportResizeObserver(e){return on("resize",throttle(function(){var t=getWindowHeight(),n=getWindowWidth();e({width:Number(n),height:Number(t)})},200),window)}var wrappedEmit,INPUT_TAGS=["INPUT","TEXTAREA","SELECT"],MASK_TYPES=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],lastInputValueMap=new WeakMap;function initInputObserver(e,t,n,r){function o(e){var o=e.target;if(o&&o.tagName&&!(INPUT_TAGS.indexOf(o.tagName)<0)&&!isBlocked(o,t)){var a=o.type;if("password"!==a&&!o.classList.contains(n)){var s=o.value,u=!1,c=MASK_TYPES.includes(a)||"TEXTAREA"===o.tagName;"radio"===a||"checkbox"===a?u=o.checked:c&&r&&(s="*".repeat(s.length)),i(o,{text:s,isChecked:u});var l=o.name;"radio"===a&&l&&u&&document.querySelectorAll('input[type="radio"][name="'+l+'"]').forEach(function(e){e!==o&&i(e,{text:e.value,isChecked:!u})})}}}function i(t,n){var r=lastInputValueMap.get(t);if(!r||r.text!==n.text||r.isChecked!==n.isChecked){lastInputValueMap.set(t,n);var o=mirror.getId(t);e(__assign({},n,{id:o}))}}var a=["input","change"].map(function(e){return on(e,o)}),s=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),u=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return s&&s.set&&a.push.apply(a,u.map(function(e){return hookSetter(e[0],e[1],{set:function(){o({target:this})}})})),function(){a.forEach(function(e){return e()})}}function initObservers(e){var t=initMutationObserver(e.mutationCb,e.blockClass,e.inlineStylesheet,e.maskAllInputs),n=initMoveObserver(e.mousemoveCb),r=initMouseInteractionObserver(e.mouseInteractionCb,e.blockClass),o=initScrollObserver(e.scrollCb,e.blockClass),i=initViewportResizeObserver(e.viewportResizeCb),a=initInputObserver(e.inputCb,e.blockClass,e.ignoreClass,e.maskAllInputs);return function(){t.disconnect(),n(),r(),o(),i(),a()}}function wrapEvent(e){return __assign({},e,{timestamp:Date.now()})}function addCustomEvent(e,t){if(!wrappedEmit)throw new Error("please add custom event after start recording");wrappedEmit(wrapEvent({type:EventType.Custom,data:{tag:e,payload:t}}))}function record(e){void 0===e&&(e={});var t,n=e.emit,r=e.checkoutEveryNms,o=e.checkoutEveryNth,i=e.blockClass,a=void 0===i?"rr-block":i,s=e.ignoreClass,u=void 0===s?"rr-ignore":s,c=e.inlineStylesheet,l=void 0===c||c,d=e.maskAllInputs,p=void 0!==d&&d;if(!n)throw new Error("emit function is required");var m=0;function f(e){void 0===e&&(e=!1),wrappedEmit(wrapEvent({type:EventType.Meta,data:{href:window.location.href,width:getWindowWidth(),height:getWindowHeight()}}),e);var t=snapshot(document,a,l,p),n=t[0],r=t[1];if(!n)return console.warn("Failed to snapshot the document");mirror.map=r,wrappedEmit(wrapEvent({type:EventType.FullSnapshot,data:{node:n,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}wrappedEmit=function(e,i){if(n(e,i),e.type===EventType.FullSnapshot)t=e,m=0;else if(e.type===EventType.IncrementalSnapshot){m++;var a=o&&m>=o,s=r&&e.timestamp-t.timestamp>r;(a||s)&&f(!0)}};try{var h=[];h.push(on("DOMContentLoaded",function(){wrappedEmit(wrapEvent({type:EventType.DomContentLoaded,data:{}}))}));var v=function(){f(),h.push(initObservers({mutationCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Mutation},e)}))},mousemoveCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:{source:IncrementalSource.MouseMove,positions:e}}))},mouseInteractionCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.MouseInteraction},e)}))},scrollCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Scroll},e)}))},viewportResizeCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.ViewportResize},e)}))},inputCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Input},e)}))},blockClass:a,ignoreClass:u,maskAllInputs:p,inlineStylesheet:l}))};return"interactive"===document.readyState||"complete"===document.readyState?v():h.push(on("load",function(){wrappedEmit(wrapEvent({type:EventType.Load,data:{}})),v()},window)),function(){h.forEach(function(e){return e()})}}catch(e){console.warn(e)}}export default record;export{addCustomEvent};
var NodeType,__assign=function(){return(__assign=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(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"}(NodeType||(NodeType={}));var _id=1;function genId(){return _id++}function getCssRulesString(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+getCssRuleString(t)},""):null}catch(e){return null}}function getCssRuleString(e){return isCSSImportRule(e)?getCssRulesString(e.styleSheet)||"":e.cssText}function isCSSImportRule(e){return"styleSheet"in e}function extractOrigin(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}var URL_IN_CSS_REF=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,RELATIVE_PATH=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,DATA_URI=/^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;function absoluteToStylesheet(e,t){return e.replace(URL_IN_CSS_REF,function(e,n,r,o){var i=n||r||o;if(!i)return e;if(!RELATIVE_PATH.test(i))return"url('"+i+"')";if(DATA_URI.test(i))return"url("+i+")";if("/"===i[0])return"url('"+(extractOrigin(t)+i)+"')";var a=t.split("/"),s=i.split("/");a.pop();for(var u=0,c=s;u<c.length;u++){var l=c[u];"."!==l&&(".."===l?a.pop():a.push(l))}return"url('"+a.join("/")+"')"})}function absoluteToDoc(e,t){var n=e.createElement("a");return n.href=t,n.href}function isSVGElement(e){return"svg"===e.tagName||e instanceof SVGElement}function serializeNode(e,t,n,r,o){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:NodeType.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:var i=!1;"string"==typeof n?i=e.classList.contains(n):e.classList.forEach(function(e){n.test(e)&&(i=!0)});for(var a=e.tagName.toLowerCase(),s={},u=0,c=Array.from(e.attributes);u<c.length;u++){var l=c[u],d=l.name,p=l.value;s[d]="src"===d||"href"===d?absoluteToDoc(t,p):"style"===d?absoluteToStylesheet(p,location.href):p}if("link"===a&&r){var m,f=Array.from(t.styleSheets).find(function(t){return t.href===e.href});(m=getCssRulesString(f))&&(delete s.rel,delete s.href,s._cssText=absoluteToStylesheet(m,f.href))}if("style"===a&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(m=getCssRulesString(e.sheet))&&(s._cssText=absoluteToStylesheet(m,location.href));if("input"===a||"textarea"===a||"select"===a){p=e.value;"radio"!==s.type&&"checkbox"!==s.type&&p?s.value=o?"*".repeat(p.length):p:e.checked&&(s.checked=e.checked)}if("option"===a){var h=e.parentElement;s.value===h.value&&(s.selected=e.selected)}if(i){var v=e.getBoundingClientRect(),E=v.width,y=v.height;s.rr_width=E+"px",s.rr_height=y+"px"}return{type:NodeType.Element,tagName:a,attributes:s,childNodes:[],isSVG:isSVGElement(e)||void 0,needBlock:i};case e.TEXT_NODE:var g=e.parentNode&&e.parentNode.tagName,T=e.textContent,S="STYLE"===g||void 0;return S&&T&&(T=absoluteToStylesheet(T,location.href)),"SCRIPT"===g&&(T="SCRIPT_PLACEHOLDER"),{type:NodeType.Text,textContent:T||"",isStyle:S};case e.CDATA_SECTION_NODE:return{type:NodeType.CDATA,textContent:""};case e.COMMENT_NODE:return{type:NodeType.Comment,textContent:e.textContent||""};default:return!1}}function serializeNodeWithId(e,t,n,r,o,i,a){void 0===o&&(o=!1),void 0===i&&(i=!0),void 0===a&&(a=!1);var s,u=serializeNode(e,t,r,i,a);if(!u)return console.warn(e,"not serialized"),null;s="__sn"in e?e.__sn.id:genId();var c=Object.assign(u,{id:s});e.__sn=c,n[s]=e;var l=!o;if(c.type===NodeType.Element&&(l=l&&!c.needBlock,delete c.needBlock),(c.type===NodeType.Document||c.type===NodeType.Element)&&l)for(var d=0,p=Array.from(e.childNodes);d<p.length;d++){var m=serializeNodeWithId(p[d],t,n,r,o,i);m&&c.childNodes.push(m)}return c}function snapshot(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[serializeNodeWithId(e,e,o,t,!1,n,r),o]}function on(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)}}var EventType,IncrementalSource,MouseInteractions,ReplayerEvents,mirror={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return mirror.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete mirror.map[t],e.childNodes&&e.childNodes.forEach(function(e){return mirror.removeNodeFromMap(e)})},has:function(e){return mirror.map.hasOwnProperty(e)}};function throttle(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(i){var a=Date.now();o||!1!==n.leading||(o=a);var s=t-(a-o),u=this;s<=0||s>t?(r&&(window.clearTimeout(r),r=null),o=a,e.apply(u,i)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(u,i)},s))}}function hookSetter(e,t,n,r){var o=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return hookSetter(e,t,o||{},!0)}}function getWindowHeight(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function getWindowWidth(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function isBlocked(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||isBlocked(e.parentNode,t)}return isBlocked(e.parentNode,t)}function isAncestorRemoved(e){var t=mirror.getId(e);return!mirror.has(t)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||isAncestorRemoved(e.parentNode))}function isTouchEvent(e){return Boolean(e.changedTouches)}function polyfill(){"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)}function deepDelete(e,t){e.delete(t),t.childNodes.forEach(function(t){return deepDelete(e,t)})}function isParentRemoved(e,t){var n=t.parentNode;if(!n)return!1;var r=mirror.getId(n);return!!e.some(function(e){return e.id===r})||isParentRemoved(e,n)}function isAncestorInSet(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||isAncestorInSet(e,n))}!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"}(EventType||(EventType={})),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"}(IncrementalSource||(IncrementalSource={})),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"}(MouseInteractions||(MouseInteractions={})),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"}(ReplayerEvents||(ReplayerEvents={}));var moveKey=function(e,t){return e+"@"+t};function isINode(e){return"__sn"in e}function initMutationObserver(e,t,n,r){var o=new MutationObserver(function(o){var i=[],a=[],s=[],u=[],c=new Set,l=new Set,d=new Set,p={},m=function(e,n){if(!isBlocked(e,t)){if(isINode(e)){l.add(e);var r=null;n&&isINode(n)&&(r=n.__sn.id),r&&(p[moveKey(e.__sn.id,r)]=!0)}else c.add(e),d.delete(e);e.childNodes.forEach(function(e){return m(e)})}};o.forEach(function(e){var n=e.type,r=e.target,o=e.oldValue,u=e.addedNodes,f=e.removedNodes,h=e.attributeName;switch(n){case"characterData":var v=r.textContent;isBlocked(r,t)||v===o||i.push({value:v,node:r});break;case"attributes":v=r.getAttribute(h);if(isBlocked(r,t)||v===o)return;var E=a.find(function(e){return e.node===r});E||(E={node:r,attributes:{}},a.push(E)),E.attributes[h]=v;break;case"childList":u.forEach(function(e){return m(e,r)}),f.forEach(function(e){var n=mirror.getId(e),o=mirror.getId(r);isBlocked(e,t)||(c.has(e)?(deepDelete(c,e),d.add(e)):c.has(r)&&-1===n||isAncestorRemoved(r)||(l.has(e)&&p[moveKey(n,o)]?deepDelete(l,e):s.push({parentId:o,id:n})),mirror.removeNodeFromMap(e))})}});var f=[],h=function(e){var o=mirror.getId(e.parentNode);if(-1===o)return f.push(e);u.push({parentId:o,previousId:e.previousSibling?mirror.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?mirror.getId(e.nextSibling):e.nextSibling,node:serializeNodeWithId(e,document,mirror.map,t,!0,n,r)})};for(Array.from(l).forEach(h),Array.from(c).forEach(function(e){isAncestorInSet(d,e)||isParentRemoved(s,e)?isAncestorInSet(l,e)?h(e):d.add(e):h(e)});f.length&&!f.every(function(e){return-1===mirror.getId(e.parentNode)});)h(f.shift());var v={texts:i.map(function(e){return{id:mirror.getId(e.node),value:e.value}}).filter(function(e){return mirror.has(e.id)}),attributes:a.map(function(e){return{id:mirror.getId(e.node),attributes:e.attributes}}).filter(function(e){return mirror.has(e.id)}),removes:s,adds:u};(v.texts.length||v.attributes.length||v.removes.length||v.adds.length)&&e(v)});return o.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function initMoveObserver(e){var t,n=[],r=throttle(function(r){var o=Date.now()-t;e(n.map(function(e){return e.timeOffset-=o,e}),r?IncrementalSource.TouchMove:IncrementalSource.MouseMove),n=[],t=null},500),o=throttle(function(e){var o=e.target,i=isTouchEvent(e)?e.changedTouches[0]:e,a=i.clientX,s=i.clientY;t||(t=Date.now()),n.push({x:a,y:s,id:mirror.getId(o),timeOffset:Date.now()-t}),r(isTouchEvent(e))},50,{trailing:!1}),i=[on("mousemove",o),on("touchmove",o)];return function(){i.forEach(function(e){return e()})}}function initMouseInteractionObserver(e,t){var n=[];return Object.keys(MouseInteractions).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(r){var o=r.toLowerCase(),i=function(n){return function(r){if(!isBlocked(r.target,t)){var o=mirror.getId(r.target),i=isTouchEvent(r)?r.changedTouches[0]:r,a=i.clientX,s=i.clientY;e({type:MouseInteractions[n],id:o,x:a,y:s})}}}(r);n.push(on(o,i))}),function(){n.forEach(function(e){return e()})}}function initScrollObserver(e,t){return on("scroll",throttle(function(n){if(n.target&&!isBlocked(n.target,t)){var r=mirror.getId(n.target);if(n.target===document){var o=document.scrollingElement||document.documentElement;e({id:r,x:o.scrollLeft,y:o.scrollTop})}else e({id:r,x:n.target.scrollLeft,y:n.target.scrollTop})}},100))}function initViewportResizeObserver(e){return on("resize",throttle(function(){var t=getWindowHeight(),n=getWindowWidth();e({width:Number(n),height:Number(t)})},200),window)}var wrappedEmit,INPUT_TAGS=["INPUT","TEXTAREA","SELECT"],MASK_TYPES=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],lastInputValueMap=new WeakMap;function initInputObserver(e,t,n,r){function o(e){var o=e.target;if(o&&o.tagName&&!(INPUT_TAGS.indexOf(o.tagName)<0)&&!isBlocked(o,t)){var a=o.type;if("password"!==a&&!o.classList.contains(n)){var s=o.value,u=!1,c=MASK_TYPES.includes(a)||"TEXTAREA"===o.tagName;"radio"===a||"checkbox"===a?u=o.checked:c&&r&&(s="*".repeat(s.length)),i(o,{text:s,isChecked:u});var l=o.name;"radio"===a&&l&&u&&document.querySelectorAll('input[type="radio"][name="'+l+'"]').forEach(function(e){e!==o&&i(e,{text:e.value,isChecked:!u})})}}}function i(t,n){var r=lastInputValueMap.get(t);if(!r||r.text!==n.text||r.isChecked!==n.isChecked){lastInputValueMap.set(t,n);var o=mirror.getId(t);e(__assign({},n,{id:o}))}}var a=["input","change"].map(function(e){return on(e,o)}),s=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),u=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return s&&s.set&&a.push.apply(a,u.map(function(e){return hookSetter(e[0],e[1],{set:function(){o({target:this})}})})),function(){a.forEach(function(e){return e()})}}function initObservers(e){var t=initMutationObserver(e.mutationCb,e.blockClass,e.inlineStylesheet,e.maskAllInputs),n=initMoveObserver(e.mousemoveCb),r=initMouseInteractionObserver(e.mouseInteractionCb,e.blockClass),o=initScrollObserver(e.scrollCb,e.blockClass),i=initViewportResizeObserver(e.viewportResizeCb),a=initInputObserver(e.inputCb,e.blockClass,e.ignoreClass,e.maskAllInputs);return function(){t.disconnect(),n(),r(),o(),i(),a()}}function wrapEvent(e){return __assign({},e,{timestamp:Date.now()})}function addCustomEvent(e,t){if(!wrappedEmit)throw new Error("please add custom event after start recording");wrappedEmit(wrapEvent({type:EventType.Custom,data:{tag:e,payload:t}}))}function record(e){void 0===e&&(e={});var t,n=e.emit,r=e.checkoutEveryNms,o=e.checkoutEveryNth,i=e.blockClass,a=void 0===i?"rr-block":i,s=e.ignoreClass,u=void 0===s?"rr-ignore":s,c=e.inlineStylesheet,l=void 0===c||c,d=e.maskAllInputs,p=void 0!==d&&d;if(!n)throw new Error("emit function is required");polyfill();var m=0;function f(e){void 0===e&&(e=!1),wrappedEmit(wrapEvent({type:EventType.Meta,data:{href:window.location.href,width:getWindowWidth(),height:getWindowHeight()}}),e);var t=snapshot(document,a,l,p),n=t[0],r=t[1];if(!n)return console.warn("Failed to snapshot the document");mirror.map=r,wrappedEmit(wrapEvent({type:EventType.FullSnapshot,data:{node:n,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}wrappedEmit=function(e,i){if(n(e,i),e.type===EventType.FullSnapshot)t=e,m=0;else if(e.type===EventType.IncrementalSnapshot){m++;var a=o&&m>=o,s=r&&e.timestamp-t.timestamp>r;(a||s)&&f(!0)}};try{var h=[];h.push(on("DOMContentLoaded",function(){wrappedEmit(wrapEvent({type:EventType.DomContentLoaded,data:{}}))}));var v=function(){f(),h.push(initObservers({mutationCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Mutation},e)}))},mousemoveCb:function(e,t){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.MouseInteraction},e)}))},scrollCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Scroll},e)}))},viewportResizeCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.ViewportResize},e)}))},inputCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Input},e)}))},blockClass:a,ignoreClass:u,maskAllInputs:p,inlineStylesheet:l}))};return"interactive"===document.readyState||"complete"===document.readyState?v():h.push(on("load",function(){wrappedEmit(wrapEvent({type:EventType.Load,data:{}})),v()},window)),function(){h.forEach(function(e){return e()})}}catch(e){console.warn(e)}}export default record;export{addCustomEvent};
//# sourceMappingURL=rrweb-record.min.js.map

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

var NodeType,__assign=function(){return(__assign=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(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"}(NodeType||(NodeType={}));var _id=1;function genId(){return _id++}function getCssRulesString(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+getCssRuleString(t)},""):null}catch(e){return null}}function getCssRuleString(e){return isCSSImportRule(e)?getCssRulesString(e.styleSheet)||"":e.cssText}function isCSSImportRule(e){return"styleSheet"in e}function extractOrigin(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}var URL_IN_CSS_REF=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,RELATIVE_PATH=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,DATA_URI=/^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;function absoluteToStylesheet(e,t){return e.replace(URL_IN_CSS_REF,function(e,n,r,o){var i=n||r||o;if(!i)return e;if(!RELATIVE_PATH.test(i))return"url('"+i+"')";if(DATA_URI.test(i))return"url("+i+")";if("/"===i[0])return"url('"+(extractOrigin(t)+i)+"')";var a=t.split("/"),s=i.split("/");a.pop();for(var c=0,l=s;c<l.length;c++){var u=l[c];"."!==u&&(".."===u?a.pop():a.push(u))}return"url('"+a.join("/")+"')"})}function absoluteToDoc(e,t){var n=e.createElement("a");return n.href=t,n.href}function isSVGElement(e){return"svg"===e.tagName||e instanceof SVGElement}function serializeNode(e,t,n,r,o){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:NodeType.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:var i=!1;"string"==typeof n?i=e.classList.contains(n):e.classList.forEach(function(e){n.test(e)&&(i=!0)});for(var a=e.tagName.toLowerCase(),s={},c=0,l=Array.from(e.attributes);c<l.length;c++){var u=l[c],d=u.name,p=u.value;s[d]="src"===d||"href"===d?absoluteToDoc(t,p):"style"===d?absoluteToStylesheet(p,location.href):p}if("link"===a&&r){var f,m=Array.from(t.styleSheets).find(function(t){return t.href===e.href});(f=getCssRulesString(m))&&(delete s.rel,delete s.href,s._cssText=absoluteToStylesheet(f,m.href))}if("style"===a&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(f=getCssRulesString(e.sheet))&&(s._cssText=absoluteToStylesheet(f,location.href));if("input"===a||"textarea"===a||"select"===a){p=e.value;"radio"!==s.type&&"checkbox"!==s.type&&p?s.value=o?"*".repeat(p.length):p:e.checked&&(s.checked=e.checked)}if("option"===a){var h=e.parentElement;s.value===h.value&&(s.selected=e.selected)}if(i){var v=e.getBoundingClientRect(),y=v.width,g=v.height;s.rr_width=y+"px",s.rr_height=g+"px"}return{type:NodeType.Element,tagName:a,attributes:s,childNodes:[],isSVG:isSVGElement(e)||void 0,needBlock:i};case e.TEXT_NODE:var E=e.parentNode&&e.parentNode.tagName,b=e.textContent,T="STYLE"===E||void 0;return T&&b&&(b=absoluteToStylesheet(b,location.href)),"SCRIPT"===E&&(b="SCRIPT_PLACEHOLDER"),{type:NodeType.Text,textContent:b||"",isStyle:T};case e.CDATA_SECTION_NODE:return{type:NodeType.CDATA,textContent:""};case e.COMMENT_NODE:return{type:NodeType.Comment,textContent:e.textContent||""};default:return!1}}function serializeNodeWithId(e,t,n,r,o,i,a){void 0===o&&(o=!1),void 0===i&&(i=!0),void 0===a&&(a=!1);var s,c=serializeNode(e,t,r,i,a);if(!c)return console.warn(e,"not serialized"),null;s="__sn"in e?e.__sn.id:genId();var l=Object.assign(c,{id:s});e.__sn=l,n[s]=e;var u=!o;if(l.type===NodeType.Element&&(u=u&&!l.needBlock,delete l.needBlock),(l.type===NodeType.Document||l.type===NodeType.Element)&&u)for(var d=0,p=Array.from(e.childNodes);d<p.length;d++){var f=serializeNodeWithId(p[d],t,n,r,o,i);f&&l.childNodes.push(f)}return l}function snapshot(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[serializeNodeWithId(e,e,o,t,!1,n,r),o]}var commentre=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g;function parse(e,t){void 0===t&&(t={});var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=-1===o?r+e.length:e.length-o}function i(){var e={line:n,column:r};return function(t){return t.position=new a(e),f(),t}}var a=function(){return function(e){this.start=e,this.end={line:n,column:r},this.source=t.source}}();a.prototype.content=e;var s=[];function c(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;s.push(i)}function l(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){var t,n=[];for(f(),m(n);e.length&&"}"!==e.charAt(0)&&(t=N()||C());)!1!==t&&(n.push(t),m(n));return n}function p(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function f(){p(/^\s*/)}function m(e){var t;for(void 0===e&&(e=[]);t=h();)!1!==t&&e.push(t),t=h();return e}function h(){var t=i();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 c("End of comment missing");var a=e.slice(2,n-2);return r+=2,o(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function v(){var e=p(/^([^{]+)/);if(e)return trim(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 y(){var e=i(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=trim(t[0]);if(!p(/^:\s*/))return c("property missing ':'");var r=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:n.replace(commentre,""),value:r?trim(r[0]).replace(commentre,""):""});return p(/^[;\s]*/),o}}function g(){var e,t=[];if(!l())return c("missing '{'");for(m(t);e=y();)!1!==e&&(t.push(e),m(t)),e=y();return u()?t:c("missing '}'")}function E(){for(var e,t=[],n=i();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:g()})}var b,T=I("import"),w=I("charset"),S=I("namespace");function I(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=i(),r=p(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function N(){if("@"===e[0])return function(){var e=i(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=p(/^([-\w]+)\s*/)))return c("@keyframes missing name");var r,o=t[1];if(!l())return c("@keyframes missing '{'");for(var a=m();r=E();)a.push(r),a=a.concat(m());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:a}):c("@keyframes missing '}'")}}()||function(){var e=i(),t=p(/^@media *([^{]+)/);if(t){var n=trim(t[1]);if(!l())return c("@media missing '{'");var r=m().concat(d());return u()?e({type:"media",media:n,rules:r}):c("@media missing '}'")}}()||function(){var e=i(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:trim(t[1]),media:trim(t[2])})}()||function(){var e=i(),t=p(/^@supports *([^{]+)/);if(t){var n=trim(t[1]);if(!l())return c("@supports missing '{'");var r=m().concat(d());return u()?e({type:"supports",supports:n,rules:r}):c("@supports missing '}'")}}()||T()||w()||S()||function(){var e=i(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var n=trim(t[1]),r=trim(t[2]);if(!l())return c("@document missing '{'");var o=m().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):c("@document missing '}'")}}()||function(){var e=i();if(p(/^@page */)){var t=v()||[];if(!l())return c("@page missing '{'");for(var n,r=m();n=y();)r.push(n),r=r.concat(m());return u()?e({type:"page",selectors:t,declarations:r}):c("@page missing '}'")}}()||function(){var e=i();if(p(/^@host\s*/)){if(!l())return c("@host missing '{'");var t=m().concat(d());return u()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=i();if(p(/^@font-face\s*/)){if(!l())return c("@font-face missing '{'");for(var t,n=m();t=y();)n.push(t),n=n.concat(m());return u()?e({type:"font-face",declarations:n}):c("@font-face missing '}'")}}()}function C(){var e=i(),t=v();return t?(m(),e({type:"rule",selectors:t,declarations:g()})):c("selector missing")}return addParent((b=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:b,parsingErrors:s}}))}function trim(e){return e?e.replace(/^\s+|\s+$/g,""):""}function addParent(e,t){for(var n=e&&"string"==typeof e.type,r=n?e:t,o=0,i=Object.keys(e);o<i.length;o++){var a=e[i[o]];Array.isArray(a)?a.forEach(function(e){addParent(e,r)}):a&&"object"==typeof a&&addParent(a,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var tagMap={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"};function getTagName(e){var t=tagMap[e.tagName]?tagMap[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}var HOVER_SELECTOR=/([^\\]):hover/g;function addHoverClass(e){var t=parse(e);return t.stylesheet?(t.stylesheet.rules.forEach(function(t){"selectors"in t&&(t.selectors||[]).forEach(function(t){if(HOVER_SELECTOR.test(t)){var n=t.replace(HOVER_SELECTOR,"$1.\\:hover");e=e.replace(t,t+", "+n)}})}),e):e}function buildNode(e,t){switch(e.type){case NodeType.Document:return t.implementation.createDocument(null,"",null);case NodeType.DocumentType:return t.implementation.createDocumentType(e.name,e.publicId,e.systemId);case NodeType.Element:var n=getTagName(e),r=void 0;for(var o in r=e.isSVG?t.createElementNS("http://www.w3.org/2000/svg",n):t.createElement(n),e.attributes)if(e.attributes.hasOwnProperty(o)&&!o.startsWith("rr_")){var i=e.attributes[o];i="boolean"==typeof i?"":i;var a="textarea"===n&&"value"===o,s="style"===n&&"_cssText"===o;if(s&&(i=addHoverClass(i)),a||s){var c=t.createTextNode(i);r.appendChild(c);continue}if("iframe"===n&&"src"===o)continue;try{e.isSVG&&"xlink:href"===o?r.setAttributeNS("http://www.w3.org/1999/xlink",o,i):r.setAttribute(o,i)}catch(e){}}else e.attributes.rr_width&&(r.style.width=e.attributes.rr_width),e.attributes.rr_height&&(r.style.height=e.attributes.rr_height);return r;case NodeType.Text:return t.createTextNode(e.isStyle?addHoverClass(e.textContent):e.textContent);case NodeType.CDATA:return t.createCDATASection(e.textContent);case NodeType.Comment:return t.createComment(e.textContent);default:return null}}function buildNodeWithSN(e,t,n,r){void 0===r&&(r=!1);var o=buildNode(e,t);if(!o)return null;if(e.type===NodeType.Document&&(t.close(),t.open(),o=t),o.__sn=e,n[e.id]=o,(e.type===NodeType.Document||e.type===NodeType.Element)&&!r)for(var i=0,a=e.childNodes;i<a.length;i++){var s=a[i],c=buildNodeWithSN(s,t,n);c?o.appendChild(c):console.warn("Failed to rebuild",s)}return o}function rebuild(e,t){var n={};return[buildNodeWithSN(e,t,n),n]}function on(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)}}var EventType,IncrementalSource,MouseInteractions,ReplayerEvents,mirror={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return mirror.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete mirror.map[t],e.childNodes&&e.childNodes.forEach(function(e){return mirror.removeNodeFromMap(e)})},has:function(e){return mirror.map.hasOwnProperty(e)}};function throttle(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(){var i=Date.now();o||!1!==n.leading||(o=i);var a=t-(i-o),s=this,c=arguments;a<=0||a>t?(r&&(window.clearTimeout(r),r=null),o=i,e.apply(s,c)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(s,c)},a))}}function hookSetter(e,t,n,r){var o=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return hookSetter(e,t,o||{},!0)}}function getWindowHeight(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function getWindowWidth(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function isBlocked(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||isBlocked(e.parentNode,t)}return isBlocked(e.parentNode,t)}function isAncestorRemoved(e){var t=mirror.getId(e);return!mirror.has(t)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||isAncestorRemoved(e.parentNode))}function isTouchEvent(e){return Boolean(e.changedTouches)}function deepDelete(e,t){e.delete(t),t.childNodes.forEach(function(t){return deepDelete(e,t)})}function isParentRemoved(e,t){var n=t.parentNode;if(!n)return!1;var r=mirror.getId(n);return!!e.some(function(e){return e.id===r})||isParentRemoved(e,n)}function isAncestorInSet(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||isAncestorInSet(e,n))}!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"}(EventType||(EventType={})),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"}(IncrementalSource||(IncrementalSource={})),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"}(MouseInteractions||(MouseInteractions={})),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"}(ReplayerEvents||(ReplayerEvents={}));var moveKey=function(e,t){return e+"@"+t};function isINode(e){return"__sn"in e}function initMutationObserver(e,t,n,r){var o=new MutationObserver(function(o){var i=[],a=[],s=[],c=[],l=new Set,u=new Set,d=new Set,p={},f=function(e,n){if(!isBlocked(e,t)){if(isINode(e)){u.add(e);var r=null;n&&isINode(n)&&(r=n.__sn.id),r&&(p[moveKey(e.__sn.id,r)]=!0)}else l.add(e),d.delete(e);e.childNodes.forEach(function(e){return f(e)})}};o.forEach(function(e){var n=e.type,r=e.target,o=e.oldValue,c=e.addedNodes,m=e.removedNodes,h=e.attributeName;switch(n){case"characterData":var v=r.textContent;isBlocked(r,t)||v===o||i.push({value:v,node:r});break;case"attributes":v=r.getAttribute(h);if(isBlocked(r,t)||v===o)return;var y=a.find(function(e){return e.node===r});y||(y={node:r,attributes:{}},a.push(y)),y.attributes[h]=v;break;case"childList":c.forEach(function(e){return f(e,r)}),m.forEach(function(e){var n=mirror.getId(e),o=mirror.getId(r);isBlocked(e,t)||(l.has(e)?(deepDelete(l,e),d.add(e)):l.has(r)&&-1===n||isAncestorRemoved(r)||(u.has(e)&&p[moveKey(n,o)]?deepDelete(u,e):s.push({parentId:o,id:n})),mirror.removeNodeFromMap(e))})}});var m=[],h=function(e){var o=mirror.getId(e.parentNode);if(-1===o)return m.push(e);c.push({parentId:o,previousId:e.previousSibling?mirror.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?mirror.getId(e.nextSibling):e.nextSibling,node:serializeNodeWithId(e,document,mirror.map,t,!0,n,r)})};for(Array.from(u).forEach(h),Array.from(l).forEach(function(e){isAncestorInSet(d,e)||isParentRemoved(s,e)?isAncestorInSet(u,e)?h(e):d.add(e):h(e)});m.length&&!m.every(function(e){return-1===mirror.getId(e.parentNode)});)h(m.shift());var v={texts:i.map(function(e){return{id:mirror.getId(e.node),value:e.value}}).filter(function(e){return mirror.has(e.id)}),attributes:a.map(function(e){return{id:mirror.getId(e.node),attributes:e.attributes}}).filter(function(e){return mirror.has(e.id)}),removes:s,adds:c};(v.texts.length||v.attributes.length||v.removes.length||v.adds.length)&&e(v)});return o.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function initMoveObserver(e){var t,n=[],r=throttle(function(){var r=Date.now()-t;e(n.map(function(e){return e.timeOffset-=r,e})),n=[],t=null},500),o=throttle(function(e){var o=e.target,i=isTouchEvent(e)?e.changedTouches[0]:e,a=i.clientX,s=i.clientY;t||(t=Date.now()),n.push({x:a,y:s,id:mirror.getId(o),timeOffset:Date.now()-t}),r()},50,{trailing:!1}),i=[on("mousemove",o),on("touchmove",o)];return function(){i.forEach(function(e){return e()})}}function initMouseInteractionObserver(e,t){var n=[];return Object.keys(MouseInteractions).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(r){var o=r.toLowerCase(),i=function(n){return function(r){if(!isBlocked(r.target,t)){var o=mirror.getId(r.target),i=isTouchEvent(r)?r.changedTouches[0]:r,a=i.clientX,s=i.clientY;e({type:MouseInteractions[n],id:o,x:a,y:s})}}}(r);n.push(on(o,i))}),function(){n.forEach(function(e){return e()})}}function initScrollObserver(e,t){return on("scroll",throttle(function(n){if(n.target&&!isBlocked(n.target,t)){var r=mirror.getId(n.target);if(n.target===document){var o=document.scrollingElement||document.documentElement;e({id:r,x:o.scrollLeft,y:o.scrollTop})}else e({id:r,x:n.target.scrollLeft,y:n.target.scrollTop})}},100))}function initViewportResizeObserver(e){return on("resize",throttle(function(){var t=getWindowHeight(),n=getWindowWidth();e({width:Number(n),height:Number(t)})},200),window)}var wrappedEmit,INPUT_TAGS=["INPUT","TEXTAREA","SELECT"],MASK_TYPES=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],lastInputValueMap=new WeakMap;function initInputObserver(e,t,n,r){function o(e){var o=e.target;if(o&&o.tagName&&!(INPUT_TAGS.indexOf(o.tagName)<0)&&!isBlocked(o,t)){var a=o.type;if("password"!==a&&!o.classList.contains(n)){var s=o.value,c=!1,l=MASK_TYPES.includes(a)||"TEXTAREA"===o.tagName;"radio"===a||"checkbox"===a?c=o.checked:l&&r&&(s="*".repeat(s.length)),i(o,{text:s,isChecked:c});var u=o.name;"radio"===a&&u&&c&&document.querySelectorAll('input[type="radio"][name="'+u+'"]').forEach(function(e){e!==o&&i(e,{text:e.value,isChecked:!c})})}}}function i(t,n){var r=lastInputValueMap.get(t);if(!r||r.text!==n.text||r.isChecked!==n.isChecked){lastInputValueMap.set(t,n);var o=mirror.getId(t);e(__assign({},n,{id:o}))}}var a=["input","change"].map(function(e){return on(e,o)}),s=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),c=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return s&&s.set&&a.push.apply(a,c.map(function(e){return hookSetter(e[0],e[1],{set:function(){o({target:this})}})})),function(){a.forEach(function(e){return e()})}}function initObservers(e){var t=initMutationObserver(e.mutationCb,e.blockClass,e.inlineStylesheet,e.maskAllInputs),n=initMoveObserver(e.mousemoveCb),r=initMouseInteractionObserver(e.mouseInteractionCb,e.blockClass),o=initScrollObserver(e.scrollCb,e.blockClass),i=initViewportResizeObserver(e.viewportResizeCb),a=initInputObserver(e.inputCb,e.blockClass,e.ignoreClass,e.maskAllInputs);return function(){t.disconnect(),n(),r(),o(),i(),a()}}function wrapEvent(e){return __assign({},e,{timestamp:Date.now()})}function addCustomEvent(e,t){if(!wrappedEmit)throw new Error("please add custom event after start recording");wrappedEmit(wrapEvent({type:EventType.Custom,data:{tag:e,payload:t}}))}function record(e){void 0===e&&(e={});var t,n=e.emit,r=e.checkoutEveryNms,o=e.checkoutEveryNth,i=e.blockClass,a=void 0===i?"rr-block":i,s=e.ignoreClass,c=void 0===s?"rr-ignore":s,l=e.inlineStylesheet,u=void 0===l||l,d=e.maskAllInputs,p=void 0!==d&&d;if(!n)throw new Error("emit function is required");var f=0;function m(e){void 0===e&&(e=!1),wrappedEmit(wrapEvent({type:EventType.Meta,data:{href:window.location.href,width:getWindowWidth(),height:getWindowHeight()}}),e);var t=snapshot(document,a,u,p),n=t[0],r=t[1];if(!n)return console.warn("Failed to snapshot the document");mirror.map=r,wrappedEmit(wrapEvent({type:EventType.FullSnapshot,data:{node:n,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}wrappedEmit=function(e,i){if(n(e,i),e.type===EventType.FullSnapshot)t=e,f=0;else if(e.type===EventType.IncrementalSnapshot){f++;var a=o&&f>=o,s=r&&e.timestamp-t.timestamp>r;(a||s)&&m(!0)}};try{var h=[];h.push(on("DOMContentLoaded",function(){wrappedEmit(wrapEvent({type:EventType.DomContentLoaded,data:{}}))}));var v=function(){m(),h.push(initObservers({mutationCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Mutation},e)}))},mousemoveCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:{source:IncrementalSource.MouseMove,positions:e}}))},mouseInteractionCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.MouseInteraction},e)}))},scrollCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Scroll},e)}))},viewportResizeCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.ViewportResize},e)}))},inputCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Input},e)}))},blockClass:a,ignoreClass:c,maskAllInputs:p,inlineStylesheet:u}))};return"interactive"===document.readyState||"complete"===document.readyState?v():h.push(on("load",function(){wrappedEmit(wrapEvent({type:EventType.Load,data:{}})),v()},window)),function(){h.forEach(function(e){return e()})}}catch(e){console.warn(e)}}function mitt(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 mittProxy=Object.freeze({default:mitt});function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var smoothscroll=createCommonjsModule(function(e,t){!function(){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)){var n,r=e.HTMLElement||e.Element,o=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||c,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(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])?m.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):m.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;m.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=function(e){for(;e!==t.body&&!1===p(e);)e=e.parentNode||e.host;return e}(this),r=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(m.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 c(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 u(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function p(e){var t=u(e,"Y")&&d(e,"Y"),n=u(e,"X")&&d(e,"X");return t||n}function f(t){var n,r,i,s,c=(a()-t.startTime)/o;s=c=c>1?1:c,n=.5*(1-Math.cos(Math.PI*s)),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(f.bind(e,t))}function m(n,r,o){var s,l,u,d,p=a();n===t.body?(s=e,l=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(s=n,l=n.scrollLeft,u=n.scrollTop,d=c),f({scrollable:s,method:d,startTime:p,startX:l,startY:u,x:r,y:o})}}}}()}),smoothscroll_1=smoothscroll.polyfill,Timer=function(){function e(e,t){void 0===t&&(t=[]),this.timeOffset=0,this.actions=t,this.config=e}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){var t;(t=this.actions).push.apply(t,e)},e.prototype.start=function(){this.actions.sort(function(e,t){return e.delay-t.delay}),this.timeOffset=0;var e=performance.now(),t=this.actions,n=this.config,r=this;this.raf=requestAnimationFrame(function o(i){for(r.timeOffset+=(i-e)*n.speed,e=i;t.length;){var a=t[0];if(!(r.timeOffset>=a.delay))break;t.shift(),a.doAction()}(t.length>0||r.config.liveMode)&&(r.raf=requestAnimationFrame(o))})},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},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}(),rules=function(e){return["iframe, ."+e+" { background: #ccc }","noscript { display: none !important; }"]},SKIP_TIME_THRESHOLD=1e4,SKIP_TIME_INTERVAL=5e3,mitt$1=mitt||mittProxy,REPLAY_CONSOLE_PREFIX="[replayer]",Replayer=function(){function e(e,t){if(this.events=[],this.emitter=mitt$1(),this.baselineTime=0,this.noramlSpeed=-1,this.missingNodeRetryMap={},e.length<2)throw new Error("Replayer need at least 2 events.");this.events=e,this.handleResize=this.handleResize.bind(this);var n={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[]};this.config=Object.assign({},n,t),this.timer=new Timer(this.config),smoothscroll_1(),this.setupDom(),this.emitter.on("resize",this.handleResize)}return e.prototype.on=function(e,t){this.emitter.on(e,t)},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach(function(n){t.config[n]=e[n]}),this.config.skipInactive||(this.noramlSpeed=-1)},e.prototype.getMetaData=function(){var e=this.events[0];return{totalTime:this.events[this.events.length-1].timestamp-e.timestamp}},e.prototype.getTimeOffset=function(){return this.baselineTime-this.events[0].timestamp},e.prototype.play=function(e){void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;for(var t=new Array,n=0,r=this.events;n<r.length;n++){var o=r[n],i=o.timestamp<this.baselineTime,a=this.getCastFn(o,i);i?a():t.push({doAction:a,delay:this.getDelay(o)})}this.timer.addActions(t),this.timer.start(),this.emitter.emit(ReplayerEvents.Start)},e.prototype.pause=function(){this.timer.clear(),this.emitter.emit(ReplayerEvents.Pause)},e.prototype.resume=function(e){void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;for(var t=new Array,n=0,r=this.events;n<r.length;n++){var o=r[n];if(!(o.timestamp<=this.lastPlayedEvent.timestamp||o===this.lastPlayedEvent)){var i=this.getCastFn(o);t.push({doAction:i,delay:this.getDelay(o)})}}this.timer.addActions(t),this.timer.start(),this.emitter.emit(ReplayerEvents.Resume)},e.prototype.addEvent=function(e){this.getCastFn(e,!0)()},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),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.iframe.setAttribute("scrolling","no"),this.iframe.setAttribute("style","pointer-events: none"),this.wrapper.appendChild(this.iframe)},e.prototype.handleResize=function(e){this.iframe.width=e.width+"px",this.iframe.height=e.height+"px"},e.prototype.getDelay=function(e){if(e.type===EventType.IncrementalSnapshot&&e.data.source===IncrementalSource.MouseMove){var t=e.data.positions[0].timeOffset,n=e.timestamp+t;return e.delay=n-this.baselineTime,n-this.baselineTime}return e.delay=e.timestamp-this.baselineTime,e.timestamp-this.baselineTime},e.prototype.getCastFn=function(e,t){var n,r=this;switch(void 0===t&&(t=!1),e.type){case EventType.DomContentLoaded:case EventType.Load:break;case EventType.Meta:n=function(){return r.emitter.emit(ReplayerEvents.Resize,{width:e.data.width,height:e.data.height})};break;case EventType.FullSnapshot:n=function(){r.rebuildFullSnapshot(e),r.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case EventType.IncrementalSnapshot:n=function(){if(r.applyIncremental(e,t),e===r.nextUserInteractionEvent&&(r.nextUserInteractionEvent=null,r.restoreSpeed()),r.config.skipInactive&&!r.nextUserInteractionEvent){for(var n=0,o=r.events;n<o.length;n++){var i=o[n];if(!(i.timestamp<=e.timestamp)&&r.isUserInteraction(i)){i.delay-e.delay>SKIP_TIME_THRESHOLD*r.config.speed&&(r.nextUserInteractionEvent=i);break}}if(r.nextUserInteractionEvent){r.noramlSpeed=r.config.speed;var a=r.nextUserInteractionEvent.delay-e.delay,s={speed:Math.min(Math.round(a/SKIP_TIME_INTERVAL),360)};r.setConfig(s),r.emitter.emit(ReplayerEvents.SkipStart,s)}}}}return function(){n&&n(),r.lastPlayedEvent=e,e===r.events[r.events.length-1]&&(r.restoreSpeed(),r.emitter.emit(ReplayerEvents.Finish))}},e.prototype.rebuildFullSnapshot=function(e){Object.keys(this.missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.missingNodeRetryMap),this.missingNodeRetryMap={},mirror.map=rebuild(e.data.node,this.iframe.contentDocument)[1];var t=document.createElement("style"),n=this.iframe.contentDocument,r=n.documentElement,o=n.head;r.insertBefore(t,o);for(var i=rules(this.config.blockClass).concat(this.config.insertStyleRules),a=0;a<i.length;a++)t.sheet.insertRule(i[a],a);this.emitter.emit(ReplayerEvents.FullsnapshotRebuilded),this.waitForStylesheetLoad()},e.prototype.waitForStylesheetLoad=function(){var e=this,t=this.iframe.contentDocument.head;if(t){var n,r=new Set;t.querySelectorAll('link[rel="stylesheet"]').forEach(function(t){t.sheet||(0===r.size&&(e.pause(),e.emitter.emit(ReplayerEvents.LoadStylesheetStart),n=window.setTimeout(function(){e.resume(e.timer.timeOffset),n=-1},e.config.loadTimeout)),r.add(t),t.addEventListener("load",function(){r.delete(t),0===r.size&&-1!==n&&(e.resume(e.timer.timeOffset),e.emitter.emit(ReplayerEvents.LoadStylesheetEnd),n&&window.clearTimeout(n))}))})}},e.prototype.applyIncremental=function(e,t){var n=this,r=e.data;switch(r.source){case IncrementalSource.Mutation:r.removes.forEach(function(e){var t=mirror.getNode(e.id);if(!t)return n.warnNodeNotFound(r,e.id);var o=mirror.getNode(e.parentId);if(!o)return n.warnNodeNotFound(r,e.parentId);mirror.removeNodeFromMap(t),o&&o.removeChild(t)});var o=__assign({},this.missingNodeRetryMap),i=[],a=function(e){var t=mirror.getNode(e.parentId);if(!t)return i.push(e);var r=buildNodeWithSN(e.node,n.iframe.contentDocument,mirror.map,!0),a=null,s=null;e.previousId&&(a=mirror.getNode(e.previousId)),e.nextId&&(s=mirror.getNode(e.nextId)),-1!==e.previousId&&-1!==e.nextId?(a&&a.nextSibling&&a.nextSibling.parentNode?t.insertBefore(r,a.nextSibling):s&&s.parentNode?t.insertBefore(r,s):t.appendChild(r),(e.previousId||e.nextId)&&n.resolveMissingNode(o,t,r,e)):o[e.node.id]={node:r,mutation:e}};for(r.adds.forEach(function(e){a(e)});i.length;){if(i.every(function(e){return!Boolean(mirror.getNode(e.parentId))}))return i.forEach(function(e){return n.warnNodeNotFound(r,e.node.id)});var s=i.shift();a(s)}Object.keys(o).length&&Object.assign(this.missingNodeRetryMap,o),r.texts.forEach(function(e){var t=mirror.getNode(e.id);if(!t)return n.warnNodeNotFound(r,e.id);t.textContent=e.value}),r.attributes.forEach(function(e){var t=mirror.getNode(e.id);if(!t)return n.warnNodeNotFound(r,e.id);for(var o in e.attributes)if("string"==typeof o){var i=e.attributes[o];null!==i?t.setAttribute(o,i):t.removeAttribute(o)}});break;case IncrementalSource.MouseMove:if(t){var c=r.positions[r.positions.length-1];this.moveAndHover(r,c.x,c.y,c.id)}else r.positions.forEach(function(t){var o={doAction:function(){n.moveAndHover(r,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-n.baselineTime};n.timer.addAction(o)});break;case IncrementalSource.MouseInteraction:if(-1===r.id)break;var l=new Event(MouseInteractions[r.type].toLowerCase());if(!(u=mirror.getNode(r.id)))return this.debugNodeNotFound(r,r.id);switch(this.emitter.emit(ReplayerEvents.MouseInteraction,{type:r.type,target:u}),r.type){case MouseInteractions.Blur:u.blur&&u.blur();break;case MouseInteractions.Focus:u.focus&&u.focus({preventScroll:!0});break;case MouseInteractions.Click:case MouseInteractions.TouchStart:case MouseInteractions.TouchEnd:t||(this.moveAndHover(r,r.x,r.y,r.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:u.dispatchEvent(l)}break;case IncrementalSource.Scroll:if(-1===r.id)break;if(!(u=mirror.getNode(r.id)))return this.debugNodeNotFound(r,r.id);if(u===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:r.y,left:r.x,behavior:t?"auto":"smooth"});else try{u.scrollTop=r.y,u.scrollLeft=r.x}catch(e){}break;case IncrementalSource.ViewportResize:this.emitter.emit(ReplayerEvents.Resize,{width:r.width,height:r.height});break;case IncrementalSource.Input:if(-1===r.id)break;var u;if(!(u=mirror.getNode(r.id)))return this.debugNodeNotFound(r,r.id);try{u.checked=r.isChecked,u.value=r.text}catch(e){}}},e.prototype.resolveMissingNode=function(e,t,n,r){var o=r.previousId,i=r.nextId,a=o&&e[o],s=i&&e[i];if(a){var c=a,l=c.node,u=c.mutation;t.insertBefore(l,n),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,l,u)}if(s){var d=s;l=d.node,u=d.mutation;t.insertBefore(l,n.nextSibling),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,l,u)}},e.prototype.moveAndHover=function(e,t,n,r){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px";var o=mirror.getNode(r);if(!o)return this.debugNodeNotFound(e,r);this.hoverElements(o)},e.prototype.hoverElements=function(e){this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach(function(e){e.classList.remove(":hover")});for(var t=e;t;)t.classList.add(":hover"),t=t.parentElement},e.prototype.isUserInteraction=function(e){return e.type===EventType.IncrementalSnapshot&&(e.data.source>IncrementalSource.Mutation&&e.data.source<=IncrementalSource.Input)},e.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var e={speed:this.noramlSpeed};this.setConfig(e),this.emitter.emit(ReplayerEvents.SkipEnd,e),this.noramlSpeed=-1}},e.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn(REPLAY_CONSOLE_PREFIX,"Node with id '"+t+"' not found in",e)},e.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log(REPLAY_CONSOLE_PREFIX,"Node with id '"+t+"' not found in",e)},e}();export{record,addCustomEvent,Replayer,mirror,EventType,IncrementalSource,MouseInteractions,ReplayerEvents};
var NodeType,__assign=function(){return(__assign=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(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"}(NodeType||(NodeType={}));var _id=1;function genId(){return _id++}function getCssRulesString(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+getCssRuleString(t)},""):null}catch(e){return null}}function getCssRuleString(e){return isCSSImportRule(e)?getCssRulesString(e.styleSheet)||"":e.cssText}function isCSSImportRule(e){return"styleSheet"in e}function extractOrigin(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}var URL_IN_CSS_REF=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,RELATIVE_PATH=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,DATA_URI=/^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;function absoluteToStylesheet(e,t){return e.replace(URL_IN_CSS_REF,function(e,n,r,o){var i=n||r||o;if(!i)return e;if(!RELATIVE_PATH.test(i))return"url('"+i+"')";if(DATA_URI.test(i))return"url("+i+")";if("/"===i[0])return"url('"+(extractOrigin(t)+i)+"')";var a=t.split("/"),s=i.split("/");a.pop();for(var c=0,l=s;c<l.length;c++){var u=l[c];"."!==u&&(".."===u?a.pop():a.push(u))}return"url('"+a.join("/")+"')"})}function absoluteToDoc(e,t){var n=e.createElement("a");return n.href=t,n.href}function isSVGElement(e){return"svg"===e.tagName||e instanceof SVGElement}function serializeNode(e,t,n,r,o){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:NodeType.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:var i=!1;"string"==typeof n?i=e.classList.contains(n):e.classList.forEach(function(e){n.test(e)&&(i=!0)});for(var a=e.tagName.toLowerCase(),s={},c=0,l=Array.from(e.attributes);c<l.length;c++){var u=l[c],d=u.name,p=u.value;s[d]="src"===d||"href"===d?absoluteToDoc(t,p):"style"===d?absoluteToStylesheet(p,location.href):p}if("link"===a&&r){var f,m=Array.from(t.styleSheets).find(function(t){return t.href===e.href});(f=getCssRulesString(m))&&(delete s.rel,delete s.href,s._cssText=absoluteToStylesheet(f,m.href))}if("style"===a&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(f=getCssRulesString(e.sheet))&&(s._cssText=absoluteToStylesheet(f,location.href));if("input"===a||"textarea"===a||"select"===a){p=e.value;"radio"!==s.type&&"checkbox"!==s.type&&p?s.value=o?"*".repeat(p.length):p:e.checked&&(s.checked=e.checked)}if("option"===a){var h=e.parentElement;s.value===h.value&&(s.selected=e.selected)}if(i){var v=e.getBoundingClientRect(),y=v.width,g=v.height;s.rr_width=y+"px",s.rr_height=g+"px"}return{type:NodeType.Element,tagName:a,attributes:s,childNodes:[],isSVG:isSVGElement(e)||void 0,needBlock:i};case e.TEXT_NODE:var E=e.parentNode&&e.parentNode.tagName,b=e.textContent,T="STYLE"===E||void 0;return T&&b&&(b=absoluteToStylesheet(b,location.href)),"SCRIPT"===E&&(b="SCRIPT_PLACEHOLDER"),{type:NodeType.Text,textContent:b||"",isStyle:T};case e.CDATA_SECTION_NODE:return{type:NodeType.CDATA,textContent:""};case e.COMMENT_NODE:return{type:NodeType.Comment,textContent:e.textContent||""};default:return!1}}function serializeNodeWithId(e,t,n,r,o,i,a){void 0===o&&(o=!1),void 0===i&&(i=!0),void 0===a&&(a=!1);var s,c=serializeNode(e,t,r,i,a);if(!c)return console.warn(e,"not serialized"),null;s="__sn"in e?e.__sn.id:genId();var l=Object.assign(c,{id:s});e.__sn=l,n[s]=e;var u=!o;if(l.type===NodeType.Element&&(u=u&&!l.needBlock,delete l.needBlock),(l.type===NodeType.Document||l.type===NodeType.Element)&&u)for(var d=0,p=Array.from(e.childNodes);d<p.length;d++){var f=serializeNodeWithId(p[d],t,n,r,o,i);f&&l.childNodes.push(f)}return l}function snapshot(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[serializeNodeWithId(e,e,o,t,!1,n,r),o]}var commentre=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g;function parse(e,t){void 0===t&&(t={});var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=-1===o?r+e.length:e.length-o}function i(){var e={line:n,column:r};return function(t){return t.position=new a(e),f(),t}}var a=function(){return function(e){this.start=e,this.end={line:n,column:r},this.source=t.source}}();a.prototype.content=e;var s=[];function c(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;s.push(i)}function l(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){var t,n=[];for(f(),m(n);e.length&&"}"!==e.charAt(0)&&(t=N()||C());)!1!==t&&(n.push(t),m(n));return n}function p(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function f(){p(/^\s*/)}function m(e){var t;for(void 0===e&&(e=[]);t=h();)!1!==t&&e.push(t),t=h();return e}function h(){var t=i();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 c("End of comment missing");var a=e.slice(2,n-2);return r+=2,o(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function v(){var e=p(/^([^{]+)/);if(e)return trim(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 y(){var e=i(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=trim(t[0]);if(!p(/^:\s*/))return c("property missing ':'");var r=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:n.replace(commentre,""),value:r?trim(r[0]).replace(commentre,""):""});return p(/^[;\s]*/),o}}function g(){var e,t=[];if(!l())return c("missing '{'");for(m(t);e=y();)!1!==e&&(t.push(e),m(t)),e=y();return u()?t:c("missing '}'")}function E(){for(var e,t=[],n=i();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:g()})}var b,T=I("import"),w=I("charset"),S=I("namespace");function I(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=i(),r=p(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function N(){if("@"===e[0])return function(){var e=i(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=p(/^([-\w]+)\s*/)))return c("@keyframes missing name");var r,o=t[1];if(!l())return c("@keyframes missing '{'");for(var a=m();r=E();)a.push(r),a=a.concat(m());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:a}):c("@keyframes missing '}'")}}()||function(){var e=i(),t=p(/^@media *([^{]+)/);if(t){var n=trim(t[1]);if(!l())return c("@media missing '{'");var r=m().concat(d());return u()?e({type:"media",media:n,rules:r}):c("@media missing '}'")}}()||function(){var e=i(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:trim(t[1]),media:trim(t[2])})}()||function(){var e=i(),t=p(/^@supports *([^{]+)/);if(t){var n=trim(t[1]);if(!l())return c("@supports missing '{'");var r=m().concat(d());return u()?e({type:"supports",supports:n,rules:r}):c("@supports missing '}'")}}()||T()||w()||S()||function(){var e=i(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var n=trim(t[1]),r=trim(t[2]);if(!l())return c("@document missing '{'");var o=m().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):c("@document missing '}'")}}()||function(){var e=i();if(p(/^@page */)){var t=v()||[];if(!l())return c("@page missing '{'");for(var n,r=m();n=y();)r.push(n),r=r.concat(m());return u()?e({type:"page",selectors:t,declarations:r}):c("@page missing '}'")}}()||function(){var e=i();if(p(/^@host\s*/)){if(!l())return c("@host missing '{'");var t=m().concat(d());return u()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=i();if(p(/^@font-face\s*/)){if(!l())return c("@font-face missing '{'");for(var t,n=m();t=y();)n.push(t),n=n.concat(m());return u()?e({type:"font-face",declarations:n}):c("@font-face missing '}'")}}()}function C(){var e=i(),t=v();return t?(m(),e({type:"rule",selectors:t,declarations:g()})):c("selector missing")}return addParent((b=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:b,parsingErrors:s}}))}function trim(e){return e?e.replace(/^\s+|\s+$/g,""):""}function addParent(e,t){for(var n=e&&"string"==typeof e.type,r=n?e:t,o=0,i=Object.keys(e);o<i.length;o++){var a=e[i[o]];Array.isArray(a)?a.forEach(function(e){addParent(e,r)}):a&&"object"==typeof a&&addParent(a,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var tagMap={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"};function getTagName(e){var t=tagMap[e.tagName]?tagMap[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}var HOVER_SELECTOR=/([^\\]):hover/g;function addHoverClass(e){var t=parse(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach(function(t){"selectors"in t&&(t.selectors||[]).forEach(function(t){if(HOVER_SELECTOR.test(t)){var n=t.replace(HOVER_SELECTOR,"$1.\\:hover");e=e.replace(t,t+", "+n)}})}),e):e}function buildNode(e,t){switch(e.type){case NodeType.Document:return t.implementation.createDocument(null,"",null);case NodeType.DocumentType:return t.implementation.createDocumentType(e.name,e.publicId,e.systemId);case NodeType.Element:var n=getTagName(e),r=void 0;for(var o in r=e.isSVG?t.createElementNS("http://www.w3.org/2000/svg",n):t.createElement(n),e.attributes)if(e.attributes.hasOwnProperty(o)&&!o.startsWith("rr_")){var i=e.attributes[o];i="boolean"==typeof i?"":i;var a="textarea"===n&&"value"===o,s="style"===n&&"_cssText"===o;if(s&&(i=addHoverClass(i)),a||s){for(var c=t.createTextNode(i),l=0,u=Array.from(r.childNodes);l<u.length;l++){var d=u[l];d.nodeType===r.TEXT_NODE&&r.removeChild(d)}r.appendChild(c);continue}if("iframe"===n&&"src"===o)continue;try{e.isSVG&&"xlink:href"===o?r.setAttributeNS("http://www.w3.org/1999/xlink",o,i):r.setAttribute(o,i)}catch(e){}}else e.attributes.rr_width&&(r.style.width=e.attributes.rr_width),e.attributes.rr_height&&(r.style.height=e.attributes.rr_height);return r;case NodeType.Text:return t.createTextNode(e.isStyle?addHoverClass(e.textContent):e.textContent);case NodeType.CDATA:return t.createCDATASection(e.textContent);case NodeType.Comment:return t.createComment(e.textContent);default:return null}}function buildNodeWithSN(e,t,n,r){void 0===r&&(r=!1);var o=buildNode(e,t);if(!o)return null;if(e.type===NodeType.Document&&(t.close(),t.open(),o=t),o.__sn=e,n[e.id]=o,(e.type===NodeType.Document||e.type===NodeType.Element)&&!r)for(var i=0,a=e.childNodes;i<a.length;i++){var s=a[i],c=buildNodeWithSN(s,t,n);c?o.appendChild(c):console.warn("Failed to rebuild",s)}return o}function rebuild(e,t){var n={};return[buildNodeWithSN(e,t,n),n]}function on(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)}}var EventType,IncrementalSource,MouseInteractions,ReplayerEvents,mirror={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return mirror.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete mirror.map[t],e.childNodes&&e.childNodes.forEach(function(e){return mirror.removeNodeFromMap(e)})},has:function(e){return mirror.map.hasOwnProperty(e)}};function throttle(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(i){var a=Date.now();o||!1!==n.leading||(o=a);var s=t-(a-o),c=this;s<=0||s>t?(r&&(window.clearTimeout(r),r=null),o=a,e.apply(c,i)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(c,i)},s))}}function hookSetter(e,t,n,r){var o=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return hookSetter(e,t,o||{},!0)}}function getWindowHeight(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function getWindowWidth(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function isBlocked(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||isBlocked(e.parentNode,t)}return isBlocked(e.parentNode,t)}function isAncestorRemoved(e){var t=mirror.getId(e);return!mirror.has(t)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||isAncestorRemoved(e.parentNode))}function isTouchEvent(e){return Boolean(e.changedTouches)}function polyfill(){"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)}function deepDelete(e,t){e.delete(t),t.childNodes.forEach(function(t){return deepDelete(e,t)})}function isParentRemoved(e,t){var n=t.parentNode;if(!n)return!1;var r=mirror.getId(n);return!!e.some(function(e){return e.id===r})||isParentRemoved(e,n)}function isAncestorInSet(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||isAncestorInSet(e,n))}!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"}(EventType||(EventType={})),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"}(IncrementalSource||(IncrementalSource={})),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"}(MouseInteractions||(MouseInteractions={})),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"}(ReplayerEvents||(ReplayerEvents={}));var moveKey=function(e,t){return e+"@"+t};function isINode(e){return"__sn"in e}function initMutationObserver(e,t,n,r){var o=new MutationObserver(function(o){var i=[],a=[],s=[],c=[],l=new Set,u=new Set,d=new Set,p={},f=function(e,n){if(!isBlocked(e,t)){if(isINode(e)){u.add(e);var r=null;n&&isINode(n)&&(r=n.__sn.id),r&&(p[moveKey(e.__sn.id,r)]=!0)}else l.add(e),d.delete(e);e.childNodes.forEach(function(e){return f(e)})}};o.forEach(function(e){var n=e.type,r=e.target,o=e.oldValue,c=e.addedNodes,m=e.removedNodes,h=e.attributeName;switch(n){case"characterData":var v=r.textContent;isBlocked(r,t)||v===o||i.push({value:v,node:r});break;case"attributes":v=r.getAttribute(h);if(isBlocked(r,t)||v===o)return;var y=a.find(function(e){return e.node===r});y||(y={node:r,attributes:{}},a.push(y)),y.attributes[h]=v;break;case"childList":c.forEach(function(e){return f(e,r)}),m.forEach(function(e){var n=mirror.getId(e),o=mirror.getId(r);isBlocked(e,t)||(l.has(e)?(deepDelete(l,e),d.add(e)):l.has(r)&&-1===n||isAncestorRemoved(r)||(u.has(e)&&p[moveKey(n,o)]?deepDelete(u,e):s.push({parentId:o,id:n})),mirror.removeNodeFromMap(e))})}});var m=[],h=function(e){var o=mirror.getId(e.parentNode);if(-1===o)return m.push(e);c.push({parentId:o,previousId:e.previousSibling?mirror.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?mirror.getId(e.nextSibling):e.nextSibling,node:serializeNodeWithId(e,document,mirror.map,t,!0,n,r)})};for(Array.from(u).forEach(h),Array.from(l).forEach(function(e){isAncestorInSet(d,e)||isParentRemoved(s,e)?isAncestorInSet(u,e)?h(e):d.add(e):h(e)});m.length&&!m.every(function(e){return-1===mirror.getId(e.parentNode)});)h(m.shift());var v={texts:i.map(function(e){return{id:mirror.getId(e.node),value:e.value}}).filter(function(e){return mirror.has(e.id)}),attributes:a.map(function(e){return{id:mirror.getId(e.node),attributes:e.attributes}}).filter(function(e){return mirror.has(e.id)}),removes:s,adds:c};(v.texts.length||v.attributes.length||v.removes.length||v.adds.length)&&e(v)});return o.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function initMoveObserver(e){var t,n=[],r=throttle(function(r){var o=Date.now()-t;e(n.map(function(e){return e.timeOffset-=o,e}),r?IncrementalSource.TouchMove:IncrementalSource.MouseMove),n=[],t=null},500),o=throttle(function(e){var o=e.target,i=isTouchEvent(e)?e.changedTouches[0]:e,a=i.clientX,s=i.clientY;t||(t=Date.now()),n.push({x:a,y:s,id:mirror.getId(o),timeOffset:Date.now()-t}),r(isTouchEvent(e))},50,{trailing:!1}),i=[on("mousemove",o),on("touchmove",o)];return function(){i.forEach(function(e){return e()})}}function initMouseInteractionObserver(e,t){var n=[];return Object.keys(MouseInteractions).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(r){var o=r.toLowerCase(),i=function(n){return function(r){if(!isBlocked(r.target,t)){var o=mirror.getId(r.target),i=isTouchEvent(r)?r.changedTouches[0]:r,a=i.clientX,s=i.clientY;e({type:MouseInteractions[n],id:o,x:a,y:s})}}}(r);n.push(on(o,i))}),function(){n.forEach(function(e){return e()})}}function initScrollObserver(e,t){return on("scroll",throttle(function(n){if(n.target&&!isBlocked(n.target,t)){var r=mirror.getId(n.target);if(n.target===document){var o=document.scrollingElement||document.documentElement;e({id:r,x:o.scrollLeft,y:o.scrollTop})}else e({id:r,x:n.target.scrollLeft,y:n.target.scrollTop})}},100))}function initViewportResizeObserver(e){return on("resize",throttle(function(){var t=getWindowHeight(),n=getWindowWidth();e({width:Number(n),height:Number(t)})},200),window)}var wrappedEmit,INPUT_TAGS=["INPUT","TEXTAREA","SELECT"],MASK_TYPES=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],lastInputValueMap=new WeakMap;function initInputObserver(e,t,n,r){function o(e){var o=e.target;if(o&&o.tagName&&!(INPUT_TAGS.indexOf(o.tagName)<0)&&!isBlocked(o,t)){var a=o.type;if("password"!==a&&!o.classList.contains(n)){var s=o.value,c=!1,l=MASK_TYPES.includes(a)||"TEXTAREA"===o.tagName;"radio"===a||"checkbox"===a?c=o.checked:l&&r&&(s="*".repeat(s.length)),i(o,{text:s,isChecked:c});var u=o.name;"radio"===a&&u&&c&&document.querySelectorAll('input[type="radio"][name="'+u+'"]').forEach(function(e){e!==o&&i(e,{text:e.value,isChecked:!c})})}}}function i(t,n){var r=lastInputValueMap.get(t);if(!r||r.text!==n.text||r.isChecked!==n.isChecked){lastInputValueMap.set(t,n);var o=mirror.getId(t);e(__assign({},n,{id:o}))}}var a=["input","change"].map(function(e){return on(e,o)}),s=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),c=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return s&&s.set&&a.push.apply(a,c.map(function(e){return hookSetter(e[0],e[1],{set:function(){o({target:this})}})})),function(){a.forEach(function(e){return e()})}}function initObservers(e){var t=initMutationObserver(e.mutationCb,e.blockClass,e.inlineStylesheet,e.maskAllInputs),n=initMoveObserver(e.mousemoveCb),r=initMouseInteractionObserver(e.mouseInteractionCb,e.blockClass),o=initScrollObserver(e.scrollCb,e.blockClass),i=initViewportResizeObserver(e.viewportResizeCb),a=initInputObserver(e.inputCb,e.blockClass,e.ignoreClass,e.maskAllInputs);return function(){t.disconnect(),n(),r(),o(),i(),a()}}function wrapEvent(e){return __assign({},e,{timestamp:Date.now()})}function addCustomEvent(e,t){if(!wrappedEmit)throw new Error("please add custom event after start recording");wrappedEmit(wrapEvent({type:EventType.Custom,data:{tag:e,payload:t}}))}function record(e){void 0===e&&(e={});var t,n=e.emit,r=e.checkoutEveryNms,o=e.checkoutEveryNth,i=e.blockClass,a=void 0===i?"rr-block":i,s=e.ignoreClass,c=void 0===s?"rr-ignore":s,l=e.inlineStylesheet,u=void 0===l||l,d=e.maskAllInputs,p=void 0!==d&&d;if(!n)throw new Error("emit function is required");polyfill();var f=0;function m(e){void 0===e&&(e=!1),wrappedEmit(wrapEvent({type:EventType.Meta,data:{href:window.location.href,width:getWindowWidth(),height:getWindowHeight()}}),e);var t=snapshot(document,a,u,p),n=t[0],r=t[1];if(!n)return console.warn("Failed to snapshot the document");mirror.map=r,wrappedEmit(wrapEvent({type:EventType.FullSnapshot,data:{node:n,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}wrappedEmit=function(e,i){if(n(e,i),e.type===EventType.FullSnapshot)t=e,f=0;else if(e.type===EventType.IncrementalSnapshot){f++;var a=o&&f>=o,s=r&&e.timestamp-t.timestamp>r;(a||s)&&m(!0)}};try{var h=[];h.push(on("DOMContentLoaded",function(){wrappedEmit(wrapEvent({type:EventType.DomContentLoaded,data:{}}))}));var v=function(){m(),h.push(initObservers({mutationCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Mutation},e)}))},mousemoveCb:function(e,t){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.MouseInteraction},e)}))},scrollCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Scroll},e)}))},viewportResizeCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.ViewportResize},e)}))},inputCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Input},e)}))},blockClass:a,ignoreClass:c,maskAllInputs:p,inlineStylesheet:u}))};return"interactive"===document.readyState||"complete"===document.readyState?v():h.push(on("load",function(){wrappedEmit(wrapEvent({type:EventType.Load,data:{}})),v()},window)),function(){h.forEach(function(e){return e()})}}catch(e){console.warn(e)}}function mitt(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 mittProxy=Object.freeze({default:mitt});function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var smoothscroll=createCommonjsModule(function(e,t){!function(){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)){var n,r=e.HTMLElement||e.Element,o=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||c,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(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])?m.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):m.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;m.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=function(e){for(;e!==t.body&&!1===p(e);)e=e.parentNode||e.host;return e}(this),r=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(m.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 c(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 u(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function p(e){var t=u(e,"Y")&&d(e,"Y"),n=u(e,"X")&&d(e,"X");return t||n}function f(t){var n,r,i,s,c=(a()-t.startTime)/o;s=c=c>1?1:c,n=.5*(1-Math.cos(Math.PI*s)),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(f.bind(e,t))}function m(n,r,o){var s,l,u,d,p=a();n===t.body?(s=e,l=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(s=n,l=n.scrollLeft,u=n.scrollTop,d=c),f({scrollable:s,method:d,startTime:p,startX:l,startY:u,x:r,y:o})}}}}()}),smoothscroll_1=smoothscroll.polyfill,Timer=function(){function e(e,t){void 0===t&&(t=[]),this.timeOffset=0,this.actions=t,this.config=e}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){var t;(t=this.actions).push.apply(t,e)},e.prototype.start=function(){this.actions.sort(function(e,t){return e.delay-t.delay}),this.timeOffset=0;var e=performance.now(),t=this.actions,n=this.config,r=this;this.raf=requestAnimationFrame(function o(i){for(r.timeOffset+=(i-e)*n.speed,e=i;t.length;){var a=t[0];if(!(r.timeOffset>=a.delay))break;t.shift(),a.doAction()}(t.length>0||r.config.liveMode)&&(r.raf=requestAnimationFrame(o))})},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},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}(),rules=function(e){return["iframe, ."+e+" { background: #ccc }","noscript { display: none !important; }"]},SKIP_TIME_THRESHOLD=1e4,SKIP_TIME_INTERVAL=5e3,mitt$1=mitt||mittProxy,REPLAY_CONSOLE_PREFIX="[replayer]",Replayer=function(){function e(e,t){if(this.events=[],this.emitter=mitt$1(),this.baselineTime=0,this.noramlSpeed=-1,this.missingNodeRetryMap={},e.length<2)throw new Error("Replayer need at least 2 events.");this.events=e,this.handleResize=this.handleResize.bind(this);var n={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[]};this.config=Object.assign({},n,t),this.timer=new Timer(this.config),smoothscroll_1(),polyfill(),this.setupDom(),this.emitter.on("resize",this.handleResize)}return e.prototype.on=function(e,t){this.emitter.on(e,t)},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach(function(n){t.config[n]=e[n]}),this.config.skipInactive||(this.noramlSpeed=-1)},e.prototype.getMetaData=function(){var e=this.events[0];return{totalTime:this.events[this.events.length-1].timestamp-e.timestamp}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){return this.baselineTime-this.events[0].timestamp},e.prototype.play=function(e){void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;for(var t=new Array,n=0,r=this.events;n<r.length;n++){var o=r[n],i=o.timestamp<this.baselineTime,a=this.getCastFn(o,i);i?a():t.push({doAction:a,delay:this.getDelay(o)})}this.timer.addActions(t),this.timer.start(),this.emitter.emit(ReplayerEvents.Start)},e.prototype.pause=function(){this.timer.clear(),this.emitter.emit(ReplayerEvents.Pause)},e.prototype.resume=function(e){void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;for(var t=new Array,n=0,r=this.events;n<r.length;n++){var o=r[n];if(!(o.timestamp<=this.lastPlayedEvent.timestamp||o===this.lastPlayedEvent)){var i=this.getCastFn(o);t.push({doAction:i,delay:this.getDelay(o)})}}this.timer.addActions(t),this.timer.start(),this.emitter.emit(ReplayerEvents.Resume)},e.prototype.addEvent=function(e){this.getCastFn(e,!0)()},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),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.iframe.setAttribute("scrolling","no"),this.iframe.setAttribute("style","pointer-events: none"),this.wrapper.appendChild(this.iframe)},e.prototype.handleResize=function(e){this.iframe.width=e.width+"px",this.iframe.height=e.height+"px"},e.prototype.getDelay=function(e){if(e.type===EventType.IncrementalSnapshot&&e.data.source===IncrementalSource.MouseMove){var t=e.data.positions[0].timeOffset,n=e.timestamp+t;return e.delay=n-this.baselineTime,n-this.baselineTime}return e.delay=e.timestamp-this.baselineTime,e.timestamp-this.baselineTime},e.prototype.getCastFn=function(e,t){var n,r=this;switch(void 0===t&&(t=!1),e.type){case EventType.DomContentLoaded:case EventType.Load:break;case EventType.Meta:n=function(){return r.emitter.emit(ReplayerEvents.Resize,{width:e.data.width,height:e.data.height})};break;case EventType.FullSnapshot:n=function(){r.rebuildFullSnapshot(e),r.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case EventType.IncrementalSnapshot:n=function(){if(r.applyIncremental(e,t),e===r.nextUserInteractionEvent&&(r.nextUserInteractionEvent=null,r.restoreSpeed()),r.config.skipInactive&&!r.nextUserInteractionEvent){for(var n=0,o=r.events;n<o.length;n++){var i=o[n];if(!(i.timestamp<=e.timestamp)&&r.isUserInteraction(i)){i.delay-e.delay>SKIP_TIME_THRESHOLD*r.config.speed&&(r.nextUserInteractionEvent=i);break}}if(r.nextUserInteractionEvent){r.noramlSpeed=r.config.speed;var a=r.nextUserInteractionEvent.delay-e.delay,s={speed:Math.min(Math.round(a/SKIP_TIME_INTERVAL),360)};r.setConfig(s),r.emitter.emit(ReplayerEvents.SkipStart,s)}}}}return function(){n&&n(),r.lastPlayedEvent=e,e===r.events[r.events.length-1]&&(r.restoreSpeed(),r.emitter.emit(ReplayerEvents.Finish))}},e.prototype.rebuildFullSnapshot=function(e){Object.keys(this.missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.missingNodeRetryMap),this.missingNodeRetryMap={},mirror.map=rebuild(e.data.node,this.iframe.contentDocument)[1];var t=document.createElement("style"),n=this.iframe.contentDocument,r=n.documentElement,o=n.head;r.insertBefore(t,o);for(var i=rules(this.config.blockClass).concat(this.config.insertStyleRules),a=0;a<i.length;a++)t.sheet.insertRule(i[a],a);this.emitter.emit(ReplayerEvents.FullsnapshotRebuilded),this.waitForStylesheetLoad()},e.prototype.waitForStylesheetLoad=function(){var e=this,t=this.iframe.contentDocument.head;if(t){var n,r=new Set;t.querySelectorAll('link[rel="stylesheet"]').forEach(function(t){t.sheet||(0===r.size&&(e.pause(),e.emitter.emit(ReplayerEvents.LoadStylesheetStart),n=window.setTimeout(function(){e.resume(e.getCurrentTime()),n=-1},e.config.loadTimeout)),r.add(t),t.addEventListener("load",function(){r.delete(t),0===r.size&&-1!==n&&(e.resume(e.getCurrentTime()),e.emitter.emit(ReplayerEvents.LoadStylesheetEnd),n&&window.clearTimeout(n))}))})}},e.prototype.applyIncremental=function(e,t){var n=this,r=e.data;switch(r.source){case IncrementalSource.Mutation:r.removes.forEach(function(e){var t=mirror.getNode(e.id);if(!t)return n.warnNodeNotFound(r,e.id);var o=mirror.getNode(e.parentId);if(!o)return n.warnNodeNotFound(r,e.parentId);mirror.removeNodeFromMap(t),o&&o.removeChild(t)});var o=__assign({},this.missingNodeRetryMap),i=[],a=function(e){var t=mirror.getNode(e.parentId);if(!t)return i.push(e);var r=buildNodeWithSN(e.node,n.iframe.contentDocument,mirror.map,!0),a=null,s=null;e.previousId&&(a=mirror.getNode(e.previousId)),e.nextId&&(s=mirror.getNode(e.nextId)),-1!==e.previousId&&-1!==e.nextId?(a&&a.nextSibling&&a.nextSibling.parentNode?t.insertBefore(r,a.nextSibling):s&&s.parentNode?t.insertBefore(r,s):t.appendChild(r),(e.previousId||e.nextId)&&n.resolveMissingNode(o,t,r,e)):o[e.node.id]={node:r,mutation:e}};for(r.adds.forEach(function(e){a(e)});i.length;){if(i.every(function(e){return!Boolean(mirror.getNode(e.parentId))}))return i.forEach(function(e){return n.warnNodeNotFound(r,e.node.id)});var s=i.shift();a(s)}Object.keys(o).length&&Object.assign(this.missingNodeRetryMap,o),r.texts.forEach(function(e){var t=mirror.getNode(e.id);if(!t)return n.warnNodeNotFound(r,e.id);t.textContent=e.value}),r.attributes.forEach(function(e){var t=mirror.getNode(e.id);if(!t)return n.warnNodeNotFound(r,e.id);for(var o in e.attributes)if("string"==typeof o){var i=e.attributes[o];null!==i?t.setAttribute(o,i):t.removeAttribute(o)}});break;case IncrementalSource.MouseMove:if(t){var c=r.positions[r.positions.length-1];this.moveAndHover(r,c.x,c.y,c.id)}else r.positions.forEach(function(t){var o={doAction:function(){n.moveAndHover(r,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-n.baselineTime};n.timer.addAction(o)});break;case IncrementalSource.MouseInteraction:if(-1===r.id)break;var l=new Event(MouseInteractions[r.type].toLowerCase());if(!(u=mirror.getNode(r.id)))return this.debugNodeNotFound(r,r.id);switch(this.emitter.emit(ReplayerEvents.MouseInteraction,{type:r.type,target:u}),r.type){case MouseInteractions.Blur:u.blur&&u.blur();break;case MouseInteractions.Focus:u.focus&&u.focus({preventScroll:!0});break;case MouseInteractions.Click:case MouseInteractions.TouchStart:case MouseInteractions.TouchEnd:t||(this.moveAndHover(r,r.x,r.y,r.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:u.dispatchEvent(l)}break;case IncrementalSource.Scroll:if(-1===r.id)break;if(!(u=mirror.getNode(r.id)))return this.debugNodeNotFound(r,r.id);if(u===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:r.y,left:r.x,behavior:t?"auto":"smooth"});else try{u.scrollTop=r.y,u.scrollLeft=r.x}catch(e){}break;case IncrementalSource.ViewportResize:this.emitter.emit(ReplayerEvents.Resize,{width:r.width,height:r.height});break;case IncrementalSource.Input:if(-1===r.id)break;var u;if(!(u=mirror.getNode(r.id)))return this.debugNodeNotFound(r,r.id);try{u.checked=r.isChecked,u.value=r.text}catch(e){}}},e.prototype.resolveMissingNode=function(e,t,n,r){var o=r.previousId,i=r.nextId,a=o&&e[o],s=i&&e[i];if(a){var c=a,l=c.node,u=c.mutation;t.insertBefore(l,n),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,l,u)}if(s){var d=s;l=d.node,u=d.mutation;t.insertBefore(l,n.nextSibling),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,l,u)}},e.prototype.moveAndHover=function(e,t,n,r){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px";var o=mirror.getNode(r);if(!o)return this.debugNodeNotFound(e,r);this.hoverElements(o)},e.prototype.hoverElements=function(e){this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach(function(e){e.classList.remove(":hover")});for(var t=e;t;)t.classList.add(":hover"),t=t.parentElement},e.prototype.isUserInteraction=function(e){return e.type===EventType.IncrementalSnapshot&&(e.data.source>IncrementalSource.Mutation&&e.data.source<=IncrementalSource.Input)},e.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var e={speed:this.noramlSpeed};this.setConfig(e),this.emitter.emit(ReplayerEvents.SkipEnd,e),this.noramlSpeed=-1}},e.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn(REPLAY_CONSOLE_PREFIX,"Node with id '"+t+"' not found in",e)},e.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log(REPLAY_CONSOLE_PREFIX,"Node with id '"+t+"' not found in",e)},e}();export{record,addCustomEvent,Replayer,mirror,EventType,IncrementalSource,MouseInteractions,ReplayerEvents};
//# sourceMappingURL=rrweb.min.js.map

@@ -327,3 +327,3 @@ 'use strict';

var previous = 0;
return function () {
return function (args) {
var now = Date.now();

@@ -335,3 +335,2 @@ if (!previous && options.leading === false) {

var context = this;
var args = arguments;
if (remaining <= 0 || remaining > wait) {

@@ -356,13 +355,15 @@ if (timeout) {

var original = Object.getOwnPropertyDescriptor(target, key);
Object.defineProperty(target, key, isRevoked ? d : {
set: function (value) {
var _this = this;
setTimeout(function () {
d.set.call(_this, value);
}, 0);
if (original && original.set) {
original.set.call(this, value);
Object.defineProperty(target, key, isRevoked
? d
: {
set: function (value) {
var _this = this;
setTimeout(function () {
d.set.call(_this, value);
}, 0);
if (original && original.set) {
original.set.call(this, value);
}
}
}
});
});
return function () { return hookSetter(target, key, original || {}, true); };

@@ -417,2 +418,8 @@ }

}
function polyfill() {
if ('NodeList' in window && !NodeList.prototype.forEach) {
NodeList.prototype.forEach = Array.prototype
.forEach;
}
}

@@ -436,2 +443,3 @@ var EventType;

IncrementalSource[IncrementalSource["Input"] = 5] = "Input";
IncrementalSource[IncrementalSource["TouchMove"] = 6] = "TouchMove";
})(IncrementalSource || (IncrementalSource = {}));

@@ -658,3 +666,3 @@ var MouseInteractions;

var timeBaseline;
var wrappedCb = throttle(function () {
var wrappedCb = throttle(function (isTouch) {
var totalOffset = Date.now() - timeBaseline;

@@ -664,3 +672,3 @@ cb(positions.map(function (p) {

return p;
}));
}), isTouch ? IncrementalSource.TouchMove : IncrementalSource.MouseMove);
positions = [];

@@ -683,3 +691,3 @@ timeBaseline = null;

});
wrappedCb();
wrappedCb(isTouchEvent(evt));
}, 50, {

@@ -889,2 +897,3 @@ trailing: false

}
polyfill();
var lastFullSnapshotEvent;

@@ -951,7 +960,7 @@ var incrementalSnapshotCount = 0;

},
mousemoveCb: function (positions) {
mousemoveCb: function (positions, source) {
return wrappedEmit(wrapEvent({
type: EventType.IncrementalSnapshot,
data: {
source: IncrementalSource.MouseMove,
source: source,
positions: positions

@@ -958,0 +967,0 @@ }

{
"name": "rrweb",
"version": "0.7.19",
"version": "0.7.20",
"description": "record and replay the web",

@@ -61,5 +61,5 @@ "scripts": {

"mitt": "^1.1.3",
"rrweb-snapshot": "^0.7.13",
"rrweb-snapshot": "^0.7.15",
"smoothscroll-polyfill": "^0.4.3"
}
}

@@ -21,2 +21,3 @@ import Timer from './timer';

getMetaData(): playerMetaData;
getCurrentTime(): number;
getTimeOffset(): number;

@@ -23,0 +24,0 @@ play(timeOffset?: number): void;

@@ -53,3 +53,4 @@ import { serializedNodeWithId, idNodeMap, INode } from 'rrweb-snapshot';

ViewportResize = 4,
Input = 5
Input = 5,
TouchMove = 6
}

@@ -60,3 +61,3 @@ export declare type mutationData = {

export declare type mousemoveData = {
source: IncrementalSource.MouseMove;
source: IncrementalSource.MouseMove | IncrementalSource.TouchMove;
positions: mousePosition[];

@@ -142,3 +143,3 @@ };

export declare type mutationCallBack = (m: mutationCallbackParam) => void;
export declare type mousemoveCallBack = (p: mousePosition[]) => void;
export declare type mousemoveCallBack = (p: mousePosition[], source: IncrementalSource.MouseMove | IncrementalSource.TouchMove) => void;
export declare type mousePosition = {

@@ -145,0 +146,0 @@ x: number;

@@ -5,3 +5,3 @@ import { Mirror, throttleOptions, listenerHandler, hookResetter, blockClass } from './types';

export declare const mirror: Mirror;
export declare function throttle<T>(func: (arg: T) => void, wait: number, options?: throttleOptions): () => void;
export declare function throttle<T>(func: (arg: T) => void, wait: number, options?: throttleOptions): (args: T) => void;
export declare function hookSetter<T>(target: T, key: string | number | symbol, d: PropertyDescriptor, isRevoked?: boolean): hookResetter;

@@ -13,1 +13,2 @@ export declare function getWindowHeight(): number;

export declare function isTouchEvent(event: MouseEvent | TouchEvent): event is TouchEvent;
export declare function polyfill(): void;

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc