Socket
Socket
Sign inDemoInstall

rrweb

Package Overview
Dependencies
5
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.7.31 to 0.7.32

es/rrweb/_virtual/_commonjsHelpers.js

6

dist/record/rrweb-record.js

@@ -674,4 +674,2 @@ var rrwebRecord = (function () {

}
default:
break;
}

@@ -1118,3 +1116,3 @@ });

if (options === void 0) { options = {}; }
var emit = options.emit, checkoutEveryNms = options.checkoutEveryNms, checkoutEveryNth = options.checkoutEveryNth, _a = options.blockClass, blockClass = _a === void 0 ? 'rr-block' : _a, _b = options.ignoreClass, ignoreClass = _b === void 0 ? 'rr-ignore' : _b, _c = options.inlineStylesheet, inlineStylesheet = _c === void 0 ? true : _c, _d = options.maskAllInputs, maskAllInputs = _d === void 0 ? false : _d, hooks = options.hooks, _e = options.mousemoveWait, mousemoveWait = _e === void 0 ? 50 : _e;
var emit = options.emit, checkoutEveryNms = options.checkoutEveryNms, checkoutEveryNth = options.checkoutEveryNth, _a = options.blockClass, blockClass = _a === void 0 ? 'rr-block' : _a, _b = options.ignoreClass, ignoreClass = _b === void 0 ? 'rr-ignore' : _b, _c = options.inlineStylesheet, inlineStylesheet = _c === void 0 ? true : _c, _d = options.maskAllInputs, maskAllInputs = _d === void 0 ? false : _d, hooks = options.hooks, _e = options.mousemoveWait, mousemoveWait = _e === void 0 ? 50 : _e, packFn = options.packFn;
if (!emit) {

@@ -1127,3 +1125,3 @@ throw new Error('emit function is required');

wrappedEmit = function (e, isCheckout) {
emit(e, isCheckout);
emit((packFn ? packFn(e) : e), isCheckout);
if (e.type === EventType.FullSnapshot) {

@@ -1130,0 +1128,0 @@ lastFullSnapshotEvent = e;

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

var rrwebRecord=function(){"use strict";var e,t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function n(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function o(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(e||(e={}));var a=1,i=RegExp("[^a-z1-6]");function u(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)?u(n.styleSheet)||"":n.cssText);var n},""):null}catch(e){return null}}var c=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,l=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,s=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function d(e,t){return(e||"").replace(c,function(e,n,r,o){var a,i=n||r||o;if(!i)return e;if(!l.test(i))return"url('"+i+"')";if(s.test(i))return"url("+i+")";if("/"===i[0])return"url('"+(((a=t).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+i)+"')";var u=t.split("/"),c=i.split("/");u.pop();for(var d=0,p=c;d<p.length;d++){var f=p[d];"."!==f&&(".."===f?u.pop():u.push(f))}return"url('"+u.join("/")+"')"})}function p(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function f(e,t,n){return"src"===t||"href"===t&&n?p(e,n):"srcset"===t&&n?function(e,t){return""===t.trim()?t:t.split(",").map(function(t){var n=t.trimLeft().trimRight().split(" ");return 2===n.length?p(e,n[0])+" "+n[1]:1===n.length?""+p(e,n[0]):""}).join(",")}(e,n):"style"===t&&n?d(n,location.href):n}function h(t,n,r,o,a){switch(t.nodeType){case t.DOCUMENT_NODE:return{type:e.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId};case t.ELEMENT_NODE:var c=!1;"string"==typeof r?c=t.classList.contains(r):t.classList.forEach(function(e){r.test(e)&&(c=!0)});for(var l=function(e){var t=e.toLowerCase().trim();return i.test(t)?"div":t}(t.tagName),s={},p=0,h=Array.from(t.attributes);p<h.length;p++){var m=h[p],v=m.name,y=m.value;s[v]=f(n,v,y)}if("link"===l&&o){var g,b=Array.from(n.styleSheets).find(function(e){return e.href===t.href});(g=u(b))&&(delete s.rel,delete s.href,s._cssText=d(g,b.href))}if("style"===l&&t.sheet&&!(t.innerText||t.textContent||"").trim().length)(g=u(t.sheet))&&(s._cssText=d(g,location.href));if("input"===l||"textarea"===l||"select"===l){y=t.value;"radio"!==s.type&&"checkbox"!==s.type&&y?s.value=a?"*".repeat(y.length):y:t.checked&&(s.checked=t.checked)}if("option"===l){var S=t.parentElement;s.value===S.value&&(s.selected=t.selected)}if("canvas"===l&&(s.rr_dataURL=t.toDataURL()),"audio"!==l&&"video"!==l||(s.rr_mediaState=t.paused?"paused":"played"),c){var C=t.getBoundingClientRect(),E=C.width,w=C.height;s.rr_width=E+"px",s.rr_height=w+"px"}return{type:e.Element,tagName:l,attributes:s,childNodes:[],isSVG:(x=t,"svg"===x.tagName||x instanceof SVGElement||void 0),needBlock:c};case t.TEXT_NODE:var I=t.parentNode&&t.parentNode.tagName,N=t.textContent,T="STYLE"===I||void 0;return T&&N&&(N=d(N,location.href)),"SCRIPT"===I&&(N="SCRIPT_PLACEHOLDER"),{type:e.Text,textContent:N||"",isStyle:T};case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:""};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||""};default:return!1}var x}function m(t,n,r,o,i,u,c){void 0===i&&(i=!1),void 0===u&&(u=!0),void 0===c&&(c=!1);var l,s=h(t,n,o,u,c);if(!s)return console.warn(t,"not serialized"),null;l="__sn"in t?t.__sn.id:a++;var d=Object.assign(s,{id:l});t.__sn=d,r[l]=t;var p=!i;if(d.type===e.Element&&(p=p&&!d.needBlock,delete d.needBlock),(d.type===e.Document||d.type===e.Element)&&p)for(var f=0,v=Array.from(t.childNodes);f<v.length;f++){var y=m(v[f],n,r,o,i,u,c);y&&d.childNodes.push(y)}return d}function v(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 y,g,b,S,C,E={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return E.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete E.map[t],e.childNodes&&e.childNodes.forEach(function(e){return E.removeNodeFromMap(e)})},has:function(e){return E.map.hasOwnProperty(e)}};function w(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,l=arguments;u<=0||u>t?(r&&(window.clearTimeout(r),r=null),o=i,e.apply(c,l)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(c,l)},u))}}function I(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function N(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function T(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||T(e.parentNode,t)}return T(e.parentNode,t)}function x(e){return Boolean(e.changedTouches)}function M(e,t){e.delete(t),t.childNodes.forEach(function(t){return M(e,t)})}function D(e,t){var n=t.parentNode;if(!n)return!1;var r=E.getId(n);return!!e.some(function(e){return e.id===r})||D(e,n)}function k(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||k(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"}(y||(y={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule"}(g||(g={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(b||(b={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(S||(S={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast"}(C||(C={}));var L=function(e,t){return e+"@"+t};function _(e){return"__sn"in e}function R(e,t,r,o){var a=new MutationObserver(function(a){var i,u,c,l,s=[],d=[],p=[],h=[],v=new Set,y=new Set,g=new Set,b={},S=function(e,n){if(!T(e,t)){if(_(e)){y.add(e);var r=null;n&&_(n)&&(r=n.__sn.id),r&&(b[L(e.__sn.id,r)]=!0)}else v.add(e),g.delete(e);e.childNodes.forEach(function(e){return S(e)})}};a.forEach(function(e){var n=e.type,r=e.target,o=e.oldValue,a=e.addedNodes,i=e.removedNodes,u=e.attributeName;switch(n){case"characterData":var c=r.textContent;T(r,t)||c===o||s.push({value:c,node:r});break;case"attributes":c=r.getAttribute(u);if(T(r,t)||c===o)return;var l=d.find(function(e){return e.node===r});l||(l={node:r,attributes:{}},d.push(l)),l.attributes[u]=f(document,u,c);break;case"childList":a.forEach(function(e){return S(e,r)}),i.forEach(function(e){var n=E.getId(e),o=E.getId(r);T(e,t)||(v.has(e)?(M(v,e),g.add(e)):v.has(r)&&-1===n||function e(t){var n=E.getId(t);return!E.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode))}(r)||(y.has(e)&&b[L(n,o)]?M(y,e):p.push({parentId:o,id:n})),E.removeNodeFromMap(e))})}});var C=[],w=function(e){var n=E.getId(e.parentNode);if(-1===n)return C.push(e);h.push({parentId:n,previousId:e.previousSibling?E.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?E.getId(e.nextSibling):e.nextSibling,node:m(e,document,E.map,t,!0,r,o)})};try{for(var I=n(y),N=I.next();!N.done;N=I.next()){w(O=N.value)}}catch(e){i={error:e}}finally{try{N&&!N.done&&(u=I.return)&&u.call(I)}finally{if(i)throw i.error}}try{for(var x=n(v),R=x.next();!R.done;R=x.next()){var O=R.value;k(g,O)||D(p,O)?k(y,O)?w(O):g.add(O):w(O)}}catch(e){c={error:e}}finally{try{R&&!R.done&&(l=x.return)&&l.call(x)}finally{if(c)throw c.error}}for(;C.length&&!C.every(function(e){return-1===E.getId(e.parentNode)});)w(C.shift());var A={texts:s.map(function(e){return{id:E.getId(e.node),value:e.value}}).filter(function(e){return E.has(e.id)}),attributes:d.map(function(e){return{id:E.getId(e.node),attributes:e.attributes}}).filter(function(e){return E.has(e.id)}),removes:p,adds:h};(A.texts.length||A.attributes.length||A.removes.length||A.adds.length)&&e(A)});return a.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function O(e,t){var n=[];return Object.keys(b).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(!T(r.target,t)){var o=E.getId(r.target),a=x(r)?r.changedTouches[0]:r,i=a.clientX,u=a.clientY;e({type:b[n],id:o,x:i,y:u})}}}(r);n.push(v(o,a))}),function(){n.forEach(function(e){return e()})}}var A,P=["INPUT","TEXTAREA","SELECT"],z=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],F=new WeakMap;function j(e,n,r,a){function i(e){var t=e.target;if(t&&t.tagName&&!(P.indexOf(t.tagName)<0)&&!T(t,n)){var o=t.type;if("password"!==o&&!t.classList.contains(r)){var i=t.value,c=!1,l=z.includes(o)||"TEXTAREA"===t.tagName;"radio"===o||"checkbox"===o?c=t.checked:l&&a&&(i="*".repeat(i.length)),u(t,{text:i,isChecked:c});var s=t.name;"radio"===o&&s&&c&&document.querySelectorAll('input[type="radio"][name="'+s+'"]').forEach(function(e){e!==t&&u(e,{text:e.value,isChecked:!c})})}}}function u(n,r){var o=F.get(n);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){F.set(n,r);var a=E.getId(n);e(t({},r,{id:a}))}}var c=["input","change"].map(function(e){return v(e,i)}),l=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),s=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return l&&l.set&&c.push.apply(c,o(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(){i({target:this})}})}))),function(){c.forEach(function(e){return e()})}}function H(e,t){void 0===t&&(t={}),function(e,t){var n=e.mutationCb,r=e.mousemoveCb,a=e.mouseInteractionCb,i=e.scrollCb,u=e.viewportResizeCb,c=e.inputCb,l=e.mediaInteractionCb,s=e.styleSheetRuleCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,o(e)),n.apply(void 0,o(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,o(e)),r.apply(void 0,o(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,o(e)),a.apply(void 0,o(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,o(e)),i.apply(void 0,o(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,o(e)),u.apply(void 0,o(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,o(e)),c.apply(void 0,o(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,o(e)),l.apply(void 0,o(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,o(e)),s.apply(void 0,o(e))}}(e,t);var n,r,a,i,u,c,l,s=R(e.mutationCb,e.blockClass,e.inlineStylesheet,e.maskAllInputs),d=(n=e.mousemoveCb,r=e.mousemoveWait,i=[],u=w(function(e){var t=Date.now()-a;n(i.map(function(e){return e.timeOffset-=t,e}),e?g.TouchMove:g.MouseMove),i=[],a=null},500),c=w(function(e){var t=e.target,n=x(e)?e.changedTouches[0]:e,r=n.clientX,o=n.clientY;a||(a=Date.now()),i.push({x:r,y:o,id:E.getId(t),timeOffset:Date.now()-a}),u(x(e))},r,{trailing:!1}),l=[v("mousemove",c),v("touchmove",c)],function(){l.forEach(function(e){return e()})}),p=O(e.mouseInteractionCb,e.blockClass),f=function(e,t){return v("scroll",w(function(n){if(n.target&&!T(n.target,t)){var r=E.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),h=function(e){return v("resize",w(function(){var t=I(),n=N();e({width:Number(n),height:Number(t)})},200),window)}(e.viewportResizeCb),m=j(e.inputCb,e.blockClass,e.ignoreClass,e.maskAllInputs),y=function(e,t){var n=function(n){return function(r){var o=r.target;o&&!T(o,t)&&e({type:"play"===n?S.Play:S.Pause,id:E.getId(o)})}},r=[v("play",n("play")),v("pause",n("pause"))];return function(){r.forEach(function(e){return e()})}}(e.mediaInteractionCb,e.blockClass),b=function(e){var t=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(n,r){var o=E.getId(this.ownerNode);return-1!==o&&e({id:o,adds:[{rule:n,index:r}]}),t.apply(this,arguments)};var n=CSSStyleSheet.prototype.deleteRule;return CSSStyleSheet.prototype.deleteRule=function(t){var r=E.getId(this.ownerNode);return-1!==r&&e({id:r,removes:[{index:t}]}),n.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=t,CSSStyleSheet.prototype.deleteRule=n}}(e.styleSheetRuleCb);return function(){s.disconnect(),d(),p(),f(),h(),m(),y(),b()}}function U(e){return t({},e,{timestamp:Date.now()})}function V(e){void 0===e&&(e={});var n,o=e.emit,a=e.checkoutEveryNms,i=e.checkoutEveryNth,u=e.blockClass,c=void 0===u?"rr-block":u,l=e.ignoreClass,s=void 0===l?"rr-ignore":l,d=e.inlineStylesheet,p=void 0===d||d,f=e.maskAllInputs,h=void 0!==f&&f,b=e.hooks,S=e.mousemoveWait,C=void 0===S?50:S;if(!o)throw new Error("emit function is required");"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach);var w=0;function T(e){void 0===e&&(e=!1),A(U({type:y.Meta,data:{href:window.location.href,width:N(),height:I()}}),e);var t=r(function(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[m(e,e,o,t,!1,n,r),o]}(document,c,p,h),2),n=t[0],o=t[1];if(!n)return console.warn("Failed to snapshot the document");E.map=o,A(U({type:y.FullSnapshot,data:{node:n,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}A=function(e,t){if(o(e,t),e.type===y.FullSnapshot)n=e,w=0;else if(e.type===y.IncrementalSnapshot){w++;var r=i&&w>=i,u=a&&e.timestamp-n.timestamp>a;(r||u)&&T(!0)}};try{var x=[];x.push(v("DOMContentLoaded",function(){A(U({type:y.DomContentLoaded,data:{}}))}));var M=function(){T(),x.push(H({mutationCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.Mutation},e)}))},mousemoveCb:function(e,t){return A(U({type:y.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.MouseInteraction},e)}))},scrollCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.Scroll},e)}))},viewportResizeCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.ViewportResize},e)}))},inputCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.Input},e)}))},mediaInteractionCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.StyleSheetRule},e)}))},blockClass:c,ignoreClass:s,maskAllInputs:h,inlineStylesheet:p,mousemoveWait:C},b))};return"interactive"===document.readyState||"complete"===document.readyState?M():x.push(v("load",function(){A(U({type:y.Load,data:{}})),M()},window)),function(){x.forEach(function(e){return e()})}}catch(e){console.warn(e)}}return V.addCustomEvent=function(e,t){if(!A)throw new Error("please add custom event after start recording");A(U({type:y.Custom,data:{tag:e,payload:t}}))},V}();
var rrwebRecord=function(){"use strict";var e,t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function n(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function o(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(e||(e={}));var a=1,i=RegExp("[^a-z1-6]");function u(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)?u(n.styleSheet)||"":n.cssText);var n},""):null}catch(e){return null}}var c=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,l=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,s=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function d(e,t){return(e||"").replace(c,function(e,n,r,o){var a,i=n||r||o;if(!i)return e;if(!l.test(i))return"url('"+i+"')";if(s.test(i))return"url("+i+")";if("/"===i[0])return"url('"+(((a=t).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+i)+"')";var u=t.split("/"),c=i.split("/");u.pop();for(var d=0,p=c;d<p.length;d++){var f=p[d];"."!==f&&(".."===f?u.pop():u.push(f))}return"url('"+u.join("/")+"')"})}function p(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function f(e,t,n){return"src"===t||"href"===t&&n?p(e,n):"srcset"===t&&n?function(e,t){return""===t.trim()?t:t.split(",").map(function(t){var n=t.trimLeft().trimRight().split(" ");return 2===n.length?p(e,n[0])+" "+n[1]:1===n.length?""+p(e,n[0]):""}).join(",")}(e,n):"style"===t&&n?d(n,location.href):n}function h(t,n,r,o,a){switch(t.nodeType){case t.DOCUMENT_NODE:return{type:e.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId};case t.ELEMENT_NODE:var c=!1;"string"==typeof r?c=t.classList.contains(r):t.classList.forEach(function(e){r.test(e)&&(c=!0)});for(var l=function(e){var t=e.toLowerCase().trim();return i.test(t)?"div":t}(t.tagName),s={},p=0,h=Array.from(t.attributes);p<h.length;p++){var m=h[p],v=m.name,y=m.value;s[v]=f(n,v,y)}if("link"===l&&o){var g,b=Array.from(n.styleSheets).find(function(e){return e.href===t.href});(g=u(b))&&(delete s.rel,delete s.href,s._cssText=d(g,b.href))}if("style"===l&&t.sheet&&!(t.innerText||t.textContent||"").trim().length)(g=u(t.sheet))&&(s._cssText=d(g,location.href));if("input"===l||"textarea"===l||"select"===l){y=t.value;"radio"!==s.type&&"checkbox"!==s.type&&y?s.value=a?"*".repeat(y.length):y:t.checked&&(s.checked=t.checked)}if("option"===l){var S=t.parentElement;s.value===S.value&&(s.selected=t.selected)}if("canvas"===l&&(s.rr_dataURL=t.toDataURL()),"audio"!==l&&"video"!==l||(s.rr_mediaState=t.paused?"paused":"played"),c){var C=t.getBoundingClientRect(),E=C.width,w=C.height;s.rr_width=E+"px",s.rr_height=w+"px"}return{type:e.Element,tagName:l,attributes:s,childNodes:[],isSVG:(x=t,"svg"===x.tagName||x instanceof SVGElement||void 0),needBlock:c};case t.TEXT_NODE:var I=t.parentNode&&t.parentNode.tagName,N=t.textContent,T="STYLE"===I||void 0;return T&&N&&(N=d(N,location.href)),"SCRIPT"===I&&(N="SCRIPT_PLACEHOLDER"),{type:e.Text,textContent:N||"",isStyle:T};case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:""};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||""};default:return!1}var x}function m(t,n,r,o,i,u,c){void 0===i&&(i=!1),void 0===u&&(u=!0),void 0===c&&(c=!1);var l,s=h(t,n,o,u,c);if(!s)return console.warn(t,"not serialized"),null;l="__sn"in t?t.__sn.id:a++;var d=Object.assign(s,{id:l});t.__sn=d,r[l]=t;var p=!i;if(d.type===e.Element&&(p=p&&!d.needBlock,delete d.needBlock),(d.type===e.Document||d.type===e.Element)&&p)for(var f=0,v=Array.from(t.childNodes);f<v.length;f++){var y=m(v[f],n,r,o,i,u,c);y&&d.childNodes.push(y)}return d}function v(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 y,g,b,S,C,E={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return E.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete E.map[t],e.childNodes&&e.childNodes.forEach(function(e){return E.removeNodeFromMap(e)})},has:function(e){return E.map.hasOwnProperty(e)}};function w(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,l=arguments;u<=0||u>t?(r&&(window.clearTimeout(r),r=null),o=i,e.apply(c,l)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(c,l)},u))}}function I(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function N(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function T(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||T(e.parentNode,t)}return T(e.parentNode,t)}function x(e){return Boolean(e.changedTouches)}function M(e,t){e.delete(t),t.childNodes.forEach(function(t){return M(e,t)})}function D(e,t){var n=t.parentNode;if(!n)return!1;var r=E.getId(n);return!!e.some(function(e){return e.id===r})||D(e,n)}function k(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||k(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"}(y||(y={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule"}(g||(g={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(b||(b={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(S||(S={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast"}(C||(C={}));var L=function(e,t){return e+"@"+t};function _(e){return"__sn"in e}function R(e,t,r,o){var a=new MutationObserver(function(a){var i,u,c,l,s=[],d=[],p=[],h=[],v=new Set,y=new Set,g=new Set,b={},S=function(e,n){if(!T(e,t)){if(_(e)){y.add(e);var r=null;n&&_(n)&&(r=n.__sn.id),r&&(b[L(e.__sn.id,r)]=!0)}else v.add(e),g.delete(e);e.childNodes.forEach(function(e){return S(e)})}};a.forEach(function(e){var n=e.type,r=e.target,o=e.oldValue,a=e.addedNodes,i=e.removedNodes,u=e.attributeName;switch(n){case"characterData":var c=r.textContent;T(r,t)||c===o||s.push({value:c,node:r});break;case"attributes":c=r.getAttribute(u);if(T(r,t)||c===o)return;var l=d.find(function(e){return e.node===r});l||(l={node:r,attributes:{}},d.push(l)),l.attributes[u]=f(document,u,c);break;case"childList":a.forEach(function(e){return S(e,r)}),i.forEach(function(e){var n=E.getId(e),o=E.getId(r);T(e,t)||(v.has(e)?(M(v,e),g.add(e)):v.has(r)&&-1===n||function e(t){var n=E.getId(t);return!E.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode))}(r)||(y.has(e)&&b[L(n,o)]?M(y,e):p.push({parentId:o,id:n})),E.removeNodeFromMap(e))})}});var C=[],w=function(e){var n=E.getId(e.parentNode);if(-1===n)return C.push(e);h.push({parentId:n,previousId:e.previousSibling?E.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?E.getId(e.nextSibling):e.nextSibling,node:m(e,document,E.map,t,!0,r,o)})};try{for(var I=n(y),N=I.next();!N.done;N=I.next()){w(O=N.value)}}catch(e){i={error:e}}finally{try{N&&!N.done&&(u=I.return)&&u.call(I)}finally{if(i)throw i.error}}try{for(var x=n(v),R=x.next();!R.done;R=x.next()){var O=R.value;k(g,O)||D(p,O)?k(y,O)?w(O):g.add(O):w(O)}}catch(e){c={error:e}}finally{try{R&&!R.done&&(l=x.return)&&l.call(x)}finally{if(c)throw c.error}}for(;C.length&&!C.every(function(e){return-1===E.getId(e.parentNode)});)w(C.shift());var A={texts:s.map(function(e){return{id:E.getId(e.node),value:e.value}}).filter(function(e){return E.has(e.id)}),attributes:d.map(function(e){return{id:E.getId(e.node),attributes:e.attributes}}).filter(function(e){return E.has(e.id)}),removes:p,adds:h};(A.texts.length||A.attributes.length||A.removes.length||A.adds.length)&&e(A)});return a.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function O(e,t){var n=[];return Object.keys(b).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(!T(r.target,t)){var o=E.getId(r.target),a=x(r)?r.changedTouches[0]:r,i=a.clientX,u=a.clientY;e({type:b[n],id:o,x:i,y:u})}}}(r);n.push(v(o,a))}),function(){n.forEach(function(e){return e()})}}var A,P=["INPUT","TEXTAREA","SELECT"],z=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],F=new WeakMap;function j(e,n,r,a){function i(e){var t=e.target;if(t&&t.tagName&&!(P.indexOf(t.tagName)<0)&&!T(t,n)){var o=t.type;if("password"!==o&&!t.classList.contains(r)){var i=t.value,c=!1,l=z.includes(o)||"TEXTAREA"===t.tagName;"radio"===o||"checkbox"===o?c=t.checked:l&&a&&(i="*".repeat(i.length)),u(t,{text:i,isChecked:c});var s=t.name;"radio"===o&&s&&c&&document.querySelectorAll('input[type="radio"][name="'+s+'"]').forEach(function(e){e!==t&&u(e,{text:e.value,isChecked:!c})})}}}function u(n,r){var o=F.get(n);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){F.set(n,r);var a=E.getId(n);e(t({},r,{id:a}))}}var c=["input","change"].map(function(e){return v(e,i)}),l=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),s=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return l&&l.set&&c.push.apply(c,o(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(){i({target:this})}})}))),function(){c.forEach(function(e){return e()})}}function H(e,t){void 0===t&&(t={}),function(e,t){var n=e.mutationCb,r=e.mousemoveCb,a=e.mouseInteractionCb,i=e.scrollCb,u=e.viewportResizeCb,c=e.inputCb,l=e.mediaInteractionCb,s=e.styleSheetRuleCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,o(e)),n.apply(void 0,o(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,o(e)),r.apply(void 0,o(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,o(e)),a.apply(void 0,o(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,o(e)),i.apply(void 0,o(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,o(e)),u.apply(void 0,o(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,o(e)),c.apply(void 0,o(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,o(e)),l.apply(void 0,o(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,o(e)),s.apply(void 0,o(e))}}(e,t);var n,r,a,i,u,c,l,s=R(e.mutationCb,e.blockClass,e.inlineStylesheet,e.maskAllInputs),d=(n=e.mousemoveCb,r=e.mousemoveWait,i=[],u=w(function(e){var t=Date.now()-a;n(i.map(function(e){return e.timeOffset-=t,e}),e?g.TouchMove:g.MouseMove),i=[],a=null},500),c=w(function(e){var t=e.target,n=x(e)?e.changedTouches[0]:e,r=n.clientX,o=n.clientY;a||(a=Date.now()),i.push({x:r,y:o,id:E.getId(t),timeOffset:Date.now()-a}),u(x(e))},r,{trailing:!1}),l=[v("mousemove",c),v("touchmove",c)],function(){l.forEach(function(e){return e()})}),p=O(e.mouseInteractionCb,e.blockClass),f=function(e,t){return v("scroll",w(function(n){if(n.target&&!T(n.target,t)){var r=E.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),h=function(e){return v("resize",w(function(){var t=I(),n=N();e({width:Number(n),height:Number(t)})},200),window)}(e.viewportResizeCb),m=j(e.inputCb,e.blockClass,e.ignoreClass,e.maskAllInputs),y=function(e,t){var n=function(n){return function(r){var o=r.target;o&&!T(o,t)&&e({type:"play"===n?S.Play:S.Pause,id:E.getId(o)})}},r=[v("play",n("play")),v("pause",n("pause"))];return function(){r.forEach(function(e){return e()})}}(e.mediaInteractionCb,e.blockClass),b=function(e){var t=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(n,r){var o=E.getId(this.ownerNode);return-1!==o&&e({id:o,adds:[{rule:n,index:r}]}),t.apply(this,arguments)};var n=CSSStyleSheet.prototype.deleteRule;return CSSStyleSheet.prototype.deleteRule=function(t){var r=E.getId(this.ownerNode);return-1!==r&&e({id:r,removes:[{index:t}]}),n.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=t,CSSStyleSheet.prototype.deleteRule=n}}(e.styleSheetRuleCb);return function(){s.disconnect(),d(),p(),f(),h(),m(),y(),b()}}function U(e){return t({},e,{timestamp:Date.now()})}function V(e){void 0===e&&(e={});var n,o=e.emit,a=e.checkoutEveryNms,i=e.checkoutEveryNth,u=e.blockClass,c=void 0===u?"rr-block":u,l=e.ignoreClass,s=void 0===l?"rr-ignore":l,d=e.inlineStylesheet,p=void 0===d||d,f=e.maskAllInputs,h=void 0!==f&&f,b=e.hooks,S=e.mousemoveWait,C=void 0===S?50:S,w=e.packFn;if(!o)throw new Error("emit function is required");"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach);var T=0;function x(e){void 0===e&&(e=!1),A(U({type:y.Meta,data:{href:window.location.href,width:N(),height:I()}}),e);var t=r(function(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[m(e,e,o,t,!1,n,r),o]}(document,c,p,h),2),n=t[0],o=t[1];if(!n)return console.warn("Failed to snapshot the document");E.map=o,A(U({type:y.FullSnapshot,data:{node:n,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}A=function(e,t){if(o(w?w(e):e,t),e.type===y.FullSnapshot)n=e,T=0;else if(e.type===y.IncrementalSnapshot){T++;var r=i&&T>=i,u=a&&e.timestamp-n.timestamp>a;(r||u)&&x(!0)}};try{var M=[];M.push(v("DOMContentLoaded",function(){A(U({type:y.DomContentLoaded,data:{}}))}));var D=function(){x(),M.push(H({mutationCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.Mutation},e)}))},mousemoveCb:function(e,t){return A(U({type:y.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.MouseInteraction},e)}))},scrollCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.Scroll},e)}))},viewportResizeCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.ViewportResize},e)}))},inputCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.Input},e)}))},mediaInteractionCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.StyleSheetRule},e)}))},blockClass:c,ignoreClass:s,maskAllInputs:h,inlineStylesheet:p,mousemoveWait:C},b))};return"interactive"===document.readyState||"complete"===document.readyState?D():M.push(v("load",function(){A(U({type:y.Load,data:{}})),D()},window)),function(){M.forEach(function(e){return e()})}}catch(e){console.warn(e)}}return V.addCustomEvent=function(e,t){if(!A)throw new Error("please add custom event after start recording");A(U({type:y.Custom,data:{tag:e,payload:t}}))},V}();
//# sourceMappingURL=rrweb-record.min.js.map

@@ -673,4 +673,2 @@ 'use strict';

}
default:
break;
}

@@ -1117,3 +1115,3 @@ });

if (options === void 0) { options = {}; }
var emit = options.emit, checkoutEveryNms = options.checkoutEveryNms, checkoutEveryNth = options.checkoutEveryNth, _a = options.blockClass, blockClass = _a === void 0 ? 'rr-block' : _a, _b = options.ignoreClass, ignoreClass = _b === void 0 ? 'rr-ignore' : _b, _c = options.inlineStylesheet, inlineStylesheet = _c === void 0 ? true : _c, _d = options.maskAllInputs, maskAllInputs = _d === void 0 ? false : _d, hooks = options.hooks, _e = options.mousemoveWait, mousemoveWait = _e === void 0 ? 50 : _e;
var emit = options.emit, checkoutEveryNms = options.checkoutEveryNms, checkoutEveryNth = options.checkoutEveryNth, _a = options.blockClass, blockClass = _a === void 0 ? 'rr-block' : _a, _b = options.ignoreClass, ignoreClass = _b === void 0 ? 'rr-ignore' : _b, _c = options.inlineStylesheet, inlineStylesheet = _c === void 0 ? true : _c, _d = options.maskAllInputs, maskAllInputs = _d === void 0 ? false : _d, hooks = options.hooks, _e = options.mousemoveWait, mousemoveWait = _e === void 0 ? 50 : _e, packFn = options.packFn;
if (!emit) {

@@ -1126,3 +1124,3 @@ throw new Error('emit function is required');

wrappedEmit = function (e, isCheckout) {
emit(e, isCheckout);
emit((packFn ? packFn(e) : e), isCheckout);
if (e.type === EventType.FullSnapshot) {

@@ -1129,0 +1127,0 @@ lastFullSnapshotEvent = e;

{
"name": "rrweb",
"version": "0.7.31",
"version": "0.7.32",
"description": "record and replay the web",

@@ -21,4 +21,5 @@ "scripts": {

"main": "lib/rrweb.js",
"module": "es/rrweb.js",
"module": "es/rrweb/src/index.js",
"unpkg": "dist/rrweb.js",
"sideEffects": false,
"typings": "typings/index.d.ts",

@@ -49,3 +50,3 @@ "files": [

"puppeteer": "^1.11.0",
"rollup": "^0.66.6",
"rollup": "^2.3.3",
"rollup-plugin-commonjs": "^9.2.0",

@@ -64,2 +65,3 @@ "rollup-plugin-node-resolve": "^3.4.0",

"mitt": "^1.1.3",
"pako": "^1.0.11",
"rrweb-snapshot": "^0.7.26",

@@ -66,0 +68,0 @@ "smoothscroll-polyfill": "^0.4.3"

@@ -5,3 +5,4 @@ import record from './record';

export { EventType, IncrementalSource, MouseInteractions, ReplayerEvents, } from './types';
export { pack, unpack } from './packer';
declare const addCustomEvent: <T>(tag: string, payload: T) => void;
export { record, addCustomEvent, Replayer, mirror };

@@ -1,3 +0,3 @@

import { recordOptions, listenerHandler } from '../types';
declare function record(options?: recordOptions): listenerHandler | undefined;
import { eventWithTime, recordOptions, listenerHandler } from '../types';
declare function record<T = eventWithTime>(options?: recordOptions<T>): listenerHandler | undefined;
declare namespace record {

@@ -4,0 +4,0 @@ var addCustomEvent: <T>(tag: string, payload: T) => void;

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

private playing;
constructor(events: eventWithTime[], config?: Partial<playerConfig>);
constructor(events: Array<eventWithTime | string>, config?: Partial<playerConfig>);
on(event: string, handler: Handler): void;

@@ -28,3 +28,3 @@ setConfig(config: Partial<playerConfig>): void;

resume(timeOffset?: number): void;
addEvent(event: eventWithTime): void;
addEvent(rawEvent: eventWithTime | string): void;
private setupDom;

@@ -31,0 +31,0 @@ private handleResize;

import { serializedNodeWithId, idNodeMap, INode } from 'rrweb-snapshot';
import { PackFn, UnpackFn } from './packer/base';
export declare enum EventType {

@@ -92,4 +93,4 @@ DomContentLoaded = 0,

export declare type blockClass = string | RegExp;
export declare type recordOptions = {
emit?: (e: eventWithTime, isCheckout?: boolean) => void;
export declare type recordOptions<T> = {
emit?: (e: T, isCheckout?: boolean) => void;
checkoutEveryNth?: number;

@@ -103,2 +104,3 @@ checkoutEveryNms?: number;

mousemoveWait?: number;
packFn?: PackFn;
};

@@ -257,2 +259,3 @@ export declare type observerParam = {

triggerFocus: boolean;
unpackFn?: UnpackFn;
};

@@ -259,0 +262,0 @@ export declare type playerMetaData = {

Sorry, the diff of this file is not supported yet

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

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

Sorry, the diff of this file is not supported yet

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

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