Socket
Socket
Sign inDemoInstall

rrweb

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rrweb - npm Package Compare versions

Comparing version 0.8.2 to 0.8.3

2

dist/record/rrweb-record-pack.min.js

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

and limitations under the License.
***************************************************************************** */var e,a,n,r,i,s,o=function(){return(o=Object.assign||function(t){for(var e,a=1,n=arguments.length;a<n;a++)for(var r in e=arguments[a])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function h(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(e||(e={})),function(t){t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom"}(a||(a={})),function(t){t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule"}(n||(n={})),function(t){t[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"}(r||(r={})),function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause"}(i||(i={})),function(t){t.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",t.EventCast="event-cast",t.CustomEvent="custom-event"}(s||(s={}));var l=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t,e){t.exports=function t(e,a,n){function r(s,o){if(!a[s]){if(!e[s]){if(!o&&h)return h();if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var _=a[s]={exports:{}};e[s][0].call(_.exports,(function(t){return r(e[s][1][t]||t)}),_,_.exports,t,e,a,n)}return a[s].exports}for(var i=h,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(t,e,a){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}a.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(var n in a)r(a,n)&&(t[n]=a[n])}}return t},a.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,a,n,r){if(e.subarray&&t.subarray)t.set(e.subarray(a,a+n),r);else for(var i=0;i<n;i++)t[r+i]=e[a+i]},flattenChunks:function(t){var e,a,n,r,i,s;for(n=0,e=0,a=t.length;e<a;e++)n+=t[e].length;for(s=new Uint8Array(n),r=0,e=0,a=t.length;e<a;e++)i=t[e],s.set(i,r),r+=i.length;return s}},s={arraySet:function(t,e,a,n,r){for(var i=0;i<n;i++)t[r+i]=e[a+i]},flattenChunks:function(t){return[].concat.apply([],t)}};a.setTyped=function(t){t?(a.Buf8=Uint8Array,a.Buf16=Uint16Array,a.Buf32=Int32Array,a.assign(a,i)):(a.Buf8=Array,a.Buf16=Array,a.Buf32=Array,a.assign(a,s))},a.setTyped(n)},{}],2:[function(t,e,a){var n=t("./common"),r=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch(t){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){i=!1}for(var s=new n.Buf8(256),o=0;o<256;o++)s[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function h(t,e){if(e<65534&&(t.subarray&&i||!t.subarray&&r))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var a="",s=0;s<e;s++)a+=String.fromCharCode(t[s]);return a}s[254]=s[254]=1,a.string2buf=function(t){var e,a,r,i,s,o=t.length,h=0;for(i=0;i<o;i++)55296==(64512&(a=t.charCodeAt(i)))&&i+1<o&&56320==(64512&(r=t.charCodeAt(i+1)))&&(a=65536+(a-55296<<10)+(r-56320),i++),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new n.Buf8(h),s=0,i=0;s<h;i++)55296==(64512&(a=t.charCodeAt(i)))&&i+1<o&&56320==(64512&(r=t.charCodeAt(i+1)))&&(a=65536+(a-55296<<10)+(r-56320),i++),a<128?e[s++]=a:a<2048?(e[s++]=192|a>>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},a.buf2binstring=function(t){return h(t,t.length)},a.binstring2buf=function(t){for(var e=new n.Buf8(t.length),a=0,r=e.length;a<r;a++)e[a]=t.charCodeAt(a);return e},a.buf2string=function(t,e){var a,n,r,i,o=e||t.length,l=new Array(2*o);for(n=0,a=0;a<o;)if((r=t[a++])<128)l[n++]=r;else if((i=s[r])>4)l[n++]=65533,a+=i-1;else{for(r&=2===i?31:3===i?15:7;i>1&&a<o;)r=r<<6|63&t[a++],i--;i>1?l[n++]=65533:r<65536?l[n++]=r:(r-=65536,l[n++]=55296|r>>10&1023,l[n++]=56320|1023&r)}return h(l,n)},a.utf8border=function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+s[t[a]]>e?a:e}},{"./common":1}],3:[function(t,e,a){e.exports=function(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16|0}},{}],4:[function(t,e,a){var n=function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}();e.exports=function(t,e,a,r){var i=n,s=r+a;t^=-1;for(var o=r;o<s;o++)t=t>>>8^i[255&(t^e[o])];return-1^t}},{}],5:[function(t,e,a){var n,r=t("../utils/common"),i=t("./trees"),s=t("./adler32"),o=t("./crc32"),h=t("./messages");function l(t,e){return t.msg=h[e],e}function _(t){return(t<<1)-(t>4?9:0)}function d(t){for(var e=t.length;--e>=0;)t[e]=0}function u(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(r.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function f(t,e){i._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,u(t.strm)}function c(t,e){t.pending_buf[t.pending++]=e}function p(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function g(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,o=t.nice_match,h=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,l=t.window,_=t.w_mask,d=t.prev,u=t.strstart+258,f=l[i+s-1],c=l[i+s];t.prev_length>=t.good_match&&(r>>=2),o>t.lookahead&&(o=t.lookahead);do{if(l[(a=e)+s]===c&&l[a+s-1]===f&&l[a]===l[i]&&l[++a]===l[i+1]){i+=2,a++;do{}while(l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&i<u);if(n=258-(u-i),i=u-258,n>s){if(t.match_start=e,s=n,n>=o)break;f=l[i+s-1],c=l[i+s]}}}while((e=d[e&_])>h&&0!=--r);return s<=t.lookahead?s:t.lookahead}function m(t){var e,a,n,i,h,l,_,d,u,f,c=t.w_size;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=c+(c-262)){r.arraySet(t.window,t.window,c,c,0),t.match_start-=c,t.strstart-=c,t.block_start-=c,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=c?n-c:0}while(--a);e=a=c;do{n=t.prev[--e],t.prev[e]=n>=c?n-c:0}while(--a);i+=c}if(0===t.strm.avail_in)break;if(l=t.strm,_=t.window,d=t.strstart+t.lookahead,u=i,f=void 0,(f=l.avail_in)>u&&(f=u),a=0===f?0:(l.avail_in-=f,r.arraySet(_,l.input,l.next_in,f,d),1===l.state.wrap?l.adler=s(l.adler,_,f,d):2===l.state.wrap&&(l.adler=o(l.adler,_,f,d)),l.next_in+=f,l.total_in+=f,f),t.lookahead+=a,t.lookahead+t.insert>=3)for(h=t.strstart-t.insert,t.ins_h=t.window[h],t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+3-1])&t.hash_mask,t.prev[h&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=h,h++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)}function b(t,e){for(var a,n;;){if(t.lookahead<262){if(m(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=g(t,a)),t.match_length>=3)if(n=i._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=i._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(f(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(f(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(f(t,!1),0===t.strm.avail_out)?1:2}function v(t,e){for(var a,n,r;;){if(t.lookahead<262){if(m(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-262&&(t.match_length=g(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=i._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(f(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=i._tr_tally(t,0,t.window[t.strstart-1]))&&f(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=i._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(f(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(f(t,!1),0===t.strm.avail_out)?1:2}function w(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}function y(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new r.Buf16(1146),this.dyn_dtree=new r.Buf16(122),this.bl_tree=new r.Buf16(78),d(this.dyn_ltree),d(this.dyn_dtree),d(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(16),this.heap=new r.Buf16(573),d(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(573),d(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function k(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=0,i._tr_init(e),0):l(t,-2)}function z(t){var e,a=k(t);return 0===a&&((e=t.state).window_size=2*e.w_size,d(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a}function x(t,e,a,n,i,s){if(!t)return-2;var o=1;if(-1===e&&(e=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),i<1||i>9||8!==a||n<8||n>15||e<0||e>9||s<0||s>4)return l(t,-2);8===n&&(n=9);var h=new y;return t.state=h,h.strm=t,h.wrap=o,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=i+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new r.Buf8(2*h.w_size),h.head=new r.Buf16(h.hash_size),h.prev=new r.Buf16(h.w_size),h.lit_bufsize=1<<i+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new r.Buf8(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=s,h.method=a,z(t)}n=[new w(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(m(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,f(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(f(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(f(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(f(t,!1),t.strm.avail_out),1)})),new w(4,4,8,4,b),new w(4,5,16,8,b),new w(4,6,32,32,b),new w(4,4,16,16,v),new w(8,16,32,32,v),new w(8,16,128,128,v),new w(8,32,128,256,v),new w(32,128,258,1024,v),new w(32,258,258,4096,v)],a.deflateInit=function(t,e){return x(t,e,8,15,8,0)},a.deflateInit2=x,a.deflateReset=z,a.deflateResetKeep=k,a.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?-2:(t.state.gzhead=e,0):-2},a.deflate=function(t,e){var a,r,s,h;if(!t||!t.state||e>5||e<0)return t?l(t,-2):-2;if(r=t.state,!t.output||!t.input&&0!==t.avail_in||666===r.status&&4!==e)return l(t,0===t.avail_out?-5:-2);if(r.strm=t,a=r.last_flush,r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,c(r,31),c(r,139),c(r,8),r.gzhead?(c(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),c(r,255&r.gzhead.time),c(r,r.gzhead.time>>8&255),c(r,r.gzhead.time>>16&255),c(r,r.gzhead.time>>24&255),c(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),c(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(c(r,255&r.gzhead.extra.length),c(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=o(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(c(r,0),c(r,0),c(r,0),c(r,0),c(r,0),c(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),c(r,3),r.status=113);else{var g=8+(r.w_bits-8<<4)<<8;g|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(g|=32),g+=31-g%31,r.status=113,p(r,g),0!==r.strstart&&(p(r,t.adler>>>16),p(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(s=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>s&&(t.adler=o(t.adler,r.pending_buf,r.pending-s,s)),u(t),s=r.pending,r.pending!==r.pending_buf_size));)c(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>s&&(t.adler=o(t.adler,r.pending_buf,r.pending-s,s)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(t.adler=o(t.adler,r.pending_buf,r.pending-s,s)),u(t),s=r.pending,r.pending===r.pending_buf_size)){h=1;break}h=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,c(r,h)}while(0!==h);r.gzhead.hcrc&&r.pending>s&&(t.adler=o(t.adler,r.pending_buf,r.pending-s,s)),0===h&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(t.adler=o(t.adler,r.pending_buf,r.pending-s,s)),u(t),s=r.pending,r.pending===r.pending_buf_size)){h=1;break}h=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,c(r,h)}while(0!==h);r.gzhead.hcrc&&r.pending>s&&(t.adler=o(t.adler,r.pending_buf,r.pending-s,s)),0===h&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&u(t),r.pending+2<=r.pending_buf_size&&(c(r,255&t.adler),c(r,t.adler>>8&255),t.adler=0,r.status=113)):r.status=113),0!==r.pending){if(u(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&_(e)<=_(a)&&4!==e)return l(t,-5);if(666===r.status&&0!==t.avail_in)return l(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&666!==r.status){var b=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(m(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=i._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(f(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(f(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(f(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,s,o=t.window;;){if(t.lookahead<=258){if(m(t),t.lookahead<=258&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=o[r=t.strstart-1])===o[++r]&&n===o[++r]&&n===o[++r]){s=t.strstart+258;do{}while(n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&r<s);t.match_length=258-(s-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=i._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=i._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(f(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(f(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(f(t,!1),0===t.strm.avail_out)?1:2}(r,e):n[r.level].func(r,e);if(3!==b&&4!==b||(r.status=666),1===b||3===b)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===b&&(1===e?i._tr_align(r):5!==e&&(i._tr_stored_block(r,0,0,!1),3===e&&(d(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),u(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(c(r,255&t.adler),c(r,t.adler>>8&255),c(r,t.adler>>16&255),c(r,t.adler>>24&255),c(r,255&t.total_in),c(r,t.total_in>>8&255),c(r,t.total_in>>16&255),c(r,t.total_in>>24&255)):(p(r,t.adler>>>16),p(r,65535&t.adler)),u(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},a.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?l(t,-2):(t.state=null,113===e?l(t,-3):0):-2},a.deflateSetDictionary=function(t,e){var a,n,i,o,h,l,_,u,f=e.length;if(!t||!t.state)return-2;if(2===(o=(a=t.state).wrap)||1===o&&42!==a.status||a.lookahead)return-2;for(1===o&&(t.adler=s(t.adler,e,f,0)),a.wrap=0,f>=a.w_size&&(0===o&&(d(a.head),a.strstart=0,a.block_start=0,a.insert=0),u=new r.Buf8(a.w_size),r.arraySet(u,e,f-a.w_size,a.w_size,0),e=u,f=a.w_size),h=t.avail_in,l=t.next_in,_=t.input,t.avail_in=f,t.next_in=0,t.input=e,m(a);a.lookahead>=3;){n=a.strstart,i=a.lookahead-2;do{a.ins_h=(a.ins_h<<a.hash_shift^a.window[n+3-1])&a.hash_mask,a.prev[n&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=n,n++}while(--i);a.strstart=n,a.lookahead=2,m(a)}return a.strstart+=a.lookahead,a.block_start=a.strstart,a.insert=a.lookahead,a.lookahead=0,a.match_length=a.prev_length=2,a.match_available=0,t.next_in=l,t.input=_,t.avail_in=h,a.wrap=o,0},a.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":4,"./messages":6,"./trees":7}],6:[function(t,e,a){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],7:[function(t,e,a){var n=t("../utils/common");function r(t){for(var e=t.length;--e>=0;)t[e]=0}var i=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],s=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l=new Array(576);r(l);var _=new Array(60);r(_);var d=new Array(512);r(d);var u=new Array(256);r(u);var f=new Array(29);r(f);var c,p,g,m=new Array(30);function b(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function v(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function w(t){return t<256?d[t]:d[256+(t>>>7)]}function y(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function k(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,y(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)}function z(t,e,a){k(t,a[2*e],a[2*e+1])}function x(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1}function S(t,e,a){var n,r,i=new Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var o=t[2*r+1];0!==o&&(t[2*r]=x(i[o]++,o))}}function A(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function B(t){t.bi_valid>8?y(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function C(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]}function M(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&C(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!C(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n}function D(t,e,a){var n,r,o,h,l=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*l]<<8|t.pending_buf[t.d_buf+2*l+1],r=t.pending_buf[t.l_buf+l],l++,0===n?z(t,r,e):(z(t,(o=u[r])+256+1,e),0!==(h=i[o])&&k(t,r-=f[o],h),z(t,o=w(--n),a),0!==(h=s[o])&&k(t,n-=m[o],h))}while(l<t.last_lit);z(t,256,e)}function E(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,o=e.stat_desc.has_stree,h=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<h;a++)0!==i[2*a]?(t.heap[++t.heap_len]=l=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[r]=0,t.opt_len--,o&&(t.static_len-=s[2*r+1]);for(e.max_code=l,a=t.heap_len>>1;a>=1;a--)M(t,i,a);r=h;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],M(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,M(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,o,h=e.dyn_tree,l=e.max_code,_=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(h[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=h[2*h[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),h[2*n+1]=i,n>l||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),o=h[2*n],t.opt_len+=o*(i+s),d&&(t.static_len+=o*(_[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>l||(h[2*r+1]!==i&&(t.opt_len+=(i-h[2*r+1])*h[2*r],h[2*r+1]=i),n--)}}(t,e),S(i,l,t.bl_count)}function T(t,e,a){var n,r,i=-1,s=e[1],o=0,h=7,l=4;for(0===s&&(h=138,l=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++o<h&&r===s||(o<l?t.bl_tree[2*r]+=o:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4))}function I(t,e,a){var n,r,i=-1,s=e[1],o=0,h=7,l=4;for(0===s&&(h=138,l=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++o<h&&r===s)){if(o<l)do{z(t,r,t.bl_tree)}while(0!=--o);else 0!==r?(r!==i&&(z(t,r,t.bl_tree),o--),z(t,16,t.bl_tree),k(t,o-3,2)):o<=10?(z(t,17,t.bl_tree),k(t,o-3,3)):(z(t,18,t.bl_tree),k(t,o-11,7));o=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4)}}r(m);var j=!1;function U(t,e,a,r){k(t,0+(r?1:0),3),function(t,e,a,r){B(t),r&&(y(t,a),y(t,~a)),n.arraySet(t.pending_buf,t.window,e,a,t.pending),t.pending+=a}(t,e,a,!0)}a._tr_init=function(t){j||(function(){var t,e,a,n,r,h=new Array(16);for(a=0,n=0;n<28;n++)for(f[n]=a,t=0;t<1<<i[n];t++)u[a++]=n;for(u[a-1]=n,r=0,n=0;n<16;n++)for(m[n]=r,t=0;t<1<<s[n];t++)d[r++]=n;for(r>>=7;n<30;n++)for(m[n]=r<<7,t=0;t<1<<s[n]-7;t++)d[256+r++]=n;for(e=0;e<=15;e++)h[e]=0;for(t=0;t<=143;)l[2*t+1]=8,t++,h[8]++;for(;t<=255;)l[2*t+1]=9,t++,h[9]++;for(;t<=279;)l[2*t+1]=7,t++,h[7]++;for(;t<=287;)l[2*t+1]=8,t++,h[8]++;for(S(l,287,h),t=0;t<30;t++)_[2*t+1]=5,_[2*t]=x(t,5);c=new b(l,i,257,286,15),p=new b(_,s,0,30,15),g=new b(new Array(0),o,0,19,7)}(),j=!0),t.l_desc=new v(t.dyn_ltree,c),t.d_desc=new v(t.dyn_dtree,p),t.bl_desc=new v(t.bl_tree,g),t.bi_buf=0,t.bi_valid=0,A(t)},a._tr_stored_block=U,a._tr_flush_block=function(t,e,a,n){var r,i,s=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),E(t,t.l_desc),E(t,t.d_desc),s=function(t){var e;for(T(t,t.dyn_ltree,t.l_desc.max_code),T(t,t.dyn_dtree,t.d_desc.max_code),E(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(i=t.static_len+3+7>>>3)<=r&&(r=i)):r=i=a+5,a+4<=r&&-1!==e?U(t,e,a,n):4===t.strategy||i===r?(k(t,2+(n?1:0),3),D(t,l,_)):(k(t,4+(n?1:0),3),function(t,e,a,n){var r;for(k(t,e-257,5),k(t,a-1,5),k(t,n-4,4),r=0;r<n;r++)k(t,t.bl_tree[2*h[r]+1],3);I(t,t.dyn_ltree,e-1),I(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),D(t,t.dyn_ltree,t.dyn_dtree)),A(t),n&&B(t)},a._tr_tally=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(u[a]+256+1)]++,t.dyn_dtree[2*w(e)]++),t.last_lit===t.lit_bufsize-1},a._tr_align=function(t){k(t,2,3),z(t,256,l),function(t){16===t.bi_valid?(y(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":1}],8:[function(t,e,a){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/deflate.js":[function(t,e,a){var n=t("./zlib/deflate"),r=t("./utils/common"),i=t("./utils/strings"),s=t("./zlib/messages"),o=t("./zlib/zstream"),h=Object.prototype.toString;function l(t){if(!(this instanceof l))return new l(t);this.options=r.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var a=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==a)throw new Error(s[a]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var _;if(_="string"==typeof e.dictionary?i.string2buf(e.dictionary):"[object ArrayBuffer]"===h.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(a=n.deflateSetDictionary(this.strm,_)))throw new Error(s[a]);this._dict_set=!0}}function _(t,e){var a=new l(e);if(a.push(t,!0),a.err)throw a.msg||s[a.err];return a.result}l.prototype.push=function(t,e){var a,s,o=this.strm,l=this.options.chunkSize;if(this.ended)return!1;s=e===~~e?e:!0===e?4:0,"string"==typeof t?o.input=i.string2buf(t):"[object ArrayBuffer]"===h.call(t)?o.input=new Uint8Array(t):o.input=t,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new r.Buf8(l),o.next_out=0,o.avail_out=l),1!==(a=n.deflate(o,s))&&0!==a)return this.onEnd(a),this.ended=!0,!1;0!==o.avail_out&&(0!==o.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(i.buf2binstring(r.shrinkBuf(o.output,o.next_out))):this.onData(r.shrinkBuf(o.output,o.next_out)))}while((o.avail_in>0||0===o.avail_out)&&1!==a);return 4===s?(a=n.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,0===a):2!==s||(this.onEnd(0),o.avail_out=0,!0)},l.prototype.onData=function(t){this.chunks.push(t)},l.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Deflate=l,a.deflate=_,a.deflateRaw=function(t,e){return(e=e||{}).raw=!0,_(t,e)},a.gzip=function(t,e){return(e=e||{}).gzip=!0,_(t,e)}},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js")})).deflate;return t.pack=function(t){var e=o(o({},t),{v:"v1"});return l(JSON.stringify(e),{to:"string"})},t}({});
***************************************************************************** */var e,a,n,r,i,s,o=function(){return(o=Object.assign||function(t){for(var e,a=1,n=arguments.length;a<n;a++)for(var r in e=arguments[a])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function h(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(e||(e={})),function(t){t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom"}(a||(a={})),function(t){t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule"}(n||(n={})),function(t){t[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"}(r||(r={})),function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause"}(i||(i={})),function(t){t.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",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush"}(s||(s={}));var l=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t,e){t.exports=function t(e,a,n){function r(s,o){if(!a[s]){if(!e[s]){if(!o&&h)return h();if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var _=a[s]={exports:{}};e[s][0].call(_.exports,(function(t){return r(e[s][1][t]||t)}),_,_.exports,t,e,a,n)}return a[s].exports}for(var i=h,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(t,e,a){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}a.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(var n in a)r(a,n)&&(t[n]=a[n])}}return t},a.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,a,n,r){if(e.subarray&&t.subarray)t.set(e.subarray(a,a+n),r);else for(var i=0;i<n;i++)t[r+i]=e[a+i]},flattenChunks:function(t){var e,a,n,r,i,s;for(n=0,e=0,a=t.length;e<a;e++)n+=t[e].length;for(s=new Uint8Array(n),r=0,e=0,a=t.length;e<a;e++)i=t[e],s.set(i,r),r+=i.length;return s}},s={arraySet:function(t,e,a,n,r){for(var i=0;i<n;i++)t[r+i]=e[a+i]},flattenChunks:function(t){return[].concat.apply([],t)}};a.setTyped=function(t){t?(a.Buf8=Uint8Array,a.Buf16=Uint16Array,a.Buf32=Int32Array,a.assign(a,i)):(a.Buf8=Array,a.Buf16=Array,a.Buf32=Array,a.assign(a,s))},a.setTyped(n)},{}],2:[function(t,e,a){var n=t("./common"),r=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch(t){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){i=!1}for(var s=new n.Buf8(256),o=0;o<256;o++)s[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function h(t,e){if(e<65534&&(t.subarray&&i||!t.subarray&&r))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var a="",s=0;s<e;s++)a+=String.fromCharCode(t[s]);return a}s[254]=s[254]=1,a.string2buf=function(t){var e,a,r,i,s,o=t.length,h=0;for(i=0;i<o;i++)55296==(64512&(a=t.charCodeAt(i)))&&i+1<o&&56320==(64512&(r=t.charCodeAt(i+1)))&&(a=65536+(a-55296<<10)+(r-56320),i++),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new n.Buf8(h),s=0,i=0;s<h;i++)55296==(64512&(a=t.charCodeAt(i)))&&i+1<o&&56320==(64512&(r=t.charCodeAt(i+1)))&&(a=65536+(a-55296<<10)+(r-56320),i++),a<128?e[s++]=a:a<2048?(e[s++]=192|a>>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},a.buf2binstring=function(t){return h(t,t.length)},a.binstring2buf=function(t){for(var e=new n.Buf8(t.length),a=0,r=e.length;a<r;a++)e[a]=t.charCodeAt(a);return e},a.buf2string=function(t,e){var a,n,r,i,o=e||t.length,l=new Array(2*o);for(n=0,a=0;a<o;)if((r=t[a++])<128)l[n++]=r;else if((i=s[r])>4)l[n++]=65533,a+=i-1;else{for(r&=2===i?31:3===i?15:7;i>1&&a<o;)r=r<<6|63&t[a++],i--;i>1?l[n++]=65533:r<65536?l[n++]=r:(r-=65536,l[n++]=55296|r>>10&1023,l[n++]=56320|1023&r)}return h(l,n)},a.utf8border=function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+s[t[a]]>e?a:e}},{"./common":1}],3:[function(t,e,a){e.exports=function(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16|0}},{}],4:[function(t,e,a){var n=function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}();e.exports=function(t,e,a,r){var i=n,s=r+a;t^=-1;for(var o=r;o<s;o++)t=t>>>8^i[255&(t^e[o])];return-1^t}},{}],5:[function(t,e,a){var n,r=t("../utils/common"),i=t("./trees"),s=t("./adler32"),o=t("./crc32"),h=t("./messages");function l(t,e){return t.msg=h[e],e}function _(t){return(t<<1)-(t>4?9:0)}function d(t){for(var e=t.length;--e>=0;)t[e]=0}function u(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(r.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function f(t,e){i._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,u(t.strm)}function c(t,e){t.pending_buf[t.pending++]=e}function p(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function g(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,o=t.nice_match,h=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,l=t.window,_=t.w_mask,d=t.prev,u=t.strstart+258,f=l[i+s-1],c=l[i+s];t.prev_length>=t.good_match&&(r>>=2),o>t.lookahead&&(o=t.lookahead);do{if(l[(a=e)+s]===c&&l[a+s-1]===f&&l[a]===l[i]&&l[++a]===l[i+1]){i+=2,a++;do{}while(l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&i<u);if(n=258-(u-i),i=u-258,n>s){if(t.match_start=e,s=n,n>=o)break;f=l[i+s-1],c=l[i+s]}}}while((e=d[e&_])>h&&0!=--r);return s<=t.lookahead?s:t.lookahead}function m(t){var e,a,n,i,h,l,_,d,u,f,c=t.w_size;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=c+(c-262)){r.arraySet(t.window,t.window,c,c,0),t.match_start-=c,t.strstart-=c,t.block_start-=c,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=c?n-c:0}while(--a);e=a=c;do{n=t.prev[--e],t.prev[e]=n>=c?n-c:0}while(--a);i+=c}if(0===t.strm.avail_in)break;if(l=t.strm,_=t.window,d=t.strstart+t.lookahead,u=i,f=void 0,(f=l.avail_in)>u&&(f=u),a=0===f?0:(l.avail_in-=f,r.arraySet(_,l.input,l.next_in,f,d),1===l.state.wrap?l.adler=s(l.adler,_,f,d):2===l.state.wrap&&(l.adler=o(l.adler,_,f,d)),l.next_in+=f,l.total_in+=f,f),t.lookahead+=a,t.lookahead+t.insert>=3)for(h=t.strstart-t.insert,t.ins_h=t.window[h],t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+3-1])&t.hash_mask,t.prev[h&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=h,h++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)}function b(t,e){for(var a,n;;){if(t.lookahead<262){if(m(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=g(t,a)),t.match_length>=3)if(n=i._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=i._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(f(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(f(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(f(t,!1),0===t.strm.avail_out)?1:2}function v(t,e){for(var a,n,r;;){if(t.lookahead<262){if(m(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-262&&(t.match_length=g(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=i._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(f(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=i._tr_tally(t,0,t.window[t.strstart-1]))&&f(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=i._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(f(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(f(t,!1),0===t.strm.avail_out)?1:2}function w(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}function y(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new r.Buf16(1146),this.dyn_dtree=new r.Buf16(122),this.bl_tree=new r.Buf16(78),d(this.dyn_ltree),d(this.dyn_dtree),d(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(16),this.heap=new r.Buf16(573),d(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(573),d(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function k(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=0,i._tr_init(e),0):l(t,-2)}function z(t){var e,a=k(t);return 0===a&&((e=t.state).window_size=2*e.w_size,d(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a}function x(t,e,a,n,i,s){if(!t)return-2;var o=1;if(-1===e&&(e=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),i<1||i>9||8!==a||n<8||n>15||e<0||e>9||s<0||s>4)return l(t,-2);8===n&&(n=9);var h=new y;return t.state=h,h.strm=t,h.wrap=o,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=i+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new r.Buf8(2*h.w_size),h.head=new r.Buf16(h.hash_size),h.prev=new r.Buf16(h.w_size),h.lit_bufsize=1<<i+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new r.Buf8(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=s,h.method=a,z(t)}n=[new w(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(m(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,f(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(f(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(f(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(f(t,!1),t.strm.avail_out),1)})),new w(4,4,8,4,b),new w(4,5,16,8,b),new w(4,6,32,32,b),new w(4,4,16,16,v),new w(8,16,32,32,v),new w(8,16,128,128,v),new w(8,32,128,256,v),new w(32,128,258,1024,v),new w(32,258,258,4096,v)],a.deflateInit=function(t,e){return x(t,e,8,15,8,0)},a.deflateInit2=x,a.deflateReset=z,a.deflateResetKeep=k,a.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?-2:(t.state.gzhead=e,0):-2},a.deflate=function(t,e){var a,r,s,h;if(!t||!t.state||e>5||e<0)return t?l(t,-2):-2;if(r=t.state,!t.output||!t.input&&0!==t.avail_in||666===r.status&&4!==e)return l(t,0===t.avail_out?-5:-2);if(r.strm=t,a=r.last_flush,r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,c(r,31),c(r,139),c(r,8),r.gzhead?(c(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),c(r,255&r.gzhead.time),c(r,r.gzhead.time>>8&255),c(r,r.gzhead.time>>16&255),c(r,r.gzhead.time>>24&255),c(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),c(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(c(r,255&r.gzhead.extra.length),c(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=o(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(c(r,0),c(r,0),c(r,0),c(r,0),c(r,0),c(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),c(r,3),r.status=113);else{var g=8+(r.w_bits-8<<4)<<8;g|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(g|=32),g+=31-g%31,r.status=113,p(r,g),0!==r.strstart&&(p(r,t.adler>>>16),p(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(s=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>s&&(t.adler=o(t.adler,r.pending_buf,r.pending-s,s)),u(t),s=r.pending,r.pending!==r.pending_buf_size));)c(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>s&&(t.adler=o(t.adler,r.pending_buf,r.pending-s,s)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(t.adler=o(t.adler,r.pending_buf,r.pending-s,s)),u(t),s=r.pending,r.pending===r.pending_buf_size)){h=1;break}h=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,c(r,h)}while(0!==h);r.gzhead.hcrc&&r.pending>s&&(t.adler=o(t.adler,r.pending_buf,r.pending-s,s)),0===h&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(t.adler=o(t.adler,r.pending_buf,r.pending-s,s)),u(t),s=r.pending,r.pending===r.pending_buf_size)){h=1;break}h=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,c(r,h)}while(0!==h);r.gzhead.hcrc&&r.pending>s&&(t.adler=o(t.adler,r.pending_buf,r.pending-s,s)),0===h&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&u(t),r.pending+2<=r.pending_buf_size&&(c(r,255&t.adler),c(r,t.adler>>8&255),t.adler=0,r.status=113)):r.status=113),0!==r.pending){if(u(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&_(e)<=_(a)&&4!==e)return l(t,-5);if(666===r.status&&0!==t.avail_in)return l(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&666!==r.status){var b=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(m(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=i._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(f(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(f(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(f(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,s,o=t.window;;){if(t.lookahead<=258){if(m(t),t.lookahead<=258&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=o[r=t.strstart-1])===o[++r]&&n===o[++r]&&n===o[++r]){s=t.strstart+258;do{}while(n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&r<s);t.match_length=258-(s-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=i._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=i._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(f(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(f(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(f(t,!1),0===t.strm.avail_out)?1:2}(r,e):n[r.level].func(r,e);if(3!==b&&4!==b||(r.status=666),1===b||3===b)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===b&&(1===e?i._tr_align(r):5!==e&&(i._tr_stored_block(r,0,0,!1),3===e&&(d(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),u(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(c(r,255&t.adler),c(r,t.adler>>8&255),c(r,t.adler>>16&255),c(r,t.adler>>24&255),c(r,255&t.total_in),c(r,t.total_in>>8&255),c(r,t.total_in>>16&255),c(r,t.total_in>>24&255)):(p(r,t.adler>>>16),p(r,65535&t.adler)),u(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},a.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?l(t,-2):(t.state=null,113===e?l(t,-3):0):-2},a.deflateSetDictionary=function(t,e){var a,n,i,o,h,l,_,u,f=e.length;if(!t||!t.state)return-2;if(2===(o=(a=t.state).wrap)||1===o&&42!==a.status||a.lookahead)return-2;for(1===o&&(t.adler=s(t.adler,e,f,0)),a.wrap=0,f>=a.w_size&&(0===o&&(d(a.head),a.strstart=0,a.block_start=0,a.insert=0),u=new r.Buf8(a.w_size),r.arraySet(u,e,f-a.w_size,a.w_size,0),e=u,f=a.w_size),h=t.avail_in,l=t.next_in,_=t.input,t.avail_in=f,t.next_in=0,t.input=e,m(a);a.lookahead>=3;){n=a.strstart,i=a.lookahead-2;do{a.ins_h=(a.ins_h<<a.hash_shift^a.window[n+3-1])&a.hash_mask,a.prev[n&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=n,n++}while(--i);a.strstart=n,a.lookahead=2,m(a)}return a.strstart+=a.lookahead,a.block_start=a.strstart,a.insert=a.lookahead,a.lookahead=0,a.match_length=a.prev_length=2,a.match_available=0,t.next_in=l,t.input=_,t.avail_in=h,a.wrap=o,0},a.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":4,"./messages":6,"./trees":7}],6:[function(t,e,a){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],7:[function(t,e,a){var n=t("../utils/common");function r(t){for(var e=t.length;--e>=0;)t[e]=0}var i=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],s=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l=new Array(576);r(l);var _=new Array(60);r(_);var d=new Array(512);r(d);var u=new Array(256);r(u);var f=new Array(29);r(f);var c,p,g,m=new Array(30);function b(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function v(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function w(t){return t<256?d[t]:d[256+(t>>>7)]}function y(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function k(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,y(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)}function z(t,e,a){k(t,a[2*e],a[2*e+1])}function x(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1}function S(t,e,a){var n,r,i=new Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var o=t[2*r+1];0!==o&&(t[2*r]=x(i[o]++,o))}}function A(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function B(t){t.bi_valid>8?y(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function C(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]}function M(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&C(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!C(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n}function D(t,e,a){var n,r,o,h,l=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*l]<<8|t.pending_buf[t.d_buf+2*l+1],r=t.pending_buf[t.l_buf+l],l++,0===n?z(t,r,e):(z(t,(o=u[r])+256+1,e),0!==(h=i[o])&&k(t,r-=f[o],h),z(t,o=w(--n),a),0!==(h=s[o])&&k(t,n-=m[o],h))}while(l<t.last_lit);z(t,256,e)}function E(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,o=e.stat_desc.has_stree,h=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<h;a++)0!==i[2*a]?(t.heap[++t.heap_len]=l=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[r]=0,t.opt_len--,o&&(t.static_len-=s[2*r+1]);for(e.max_code=l,a=t.heap_len>>1;a>=1;a--)M(t,i,a);r=h;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],M(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,M(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,o,h=e.dyn_tree,l=e.max_code,_=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(h[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=h[2*h[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),h[2*n+1]=i,n>l||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),o=h[2*n],t.opt_len+=o*(i+s),d&&(t.static_len+=o*(_[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>l||(h[2*r+1]!==i&&(t.opt_len+=(i-h[2*r+1])*h[2*r],h[2*r+1]=i),n--)}}(t,e),S(i,l,t.bl_count)}function T(t,e,a){var n,r,i=-1,s=e[1],o=0,h=7,l=4;for(0===s&&(h=138,l=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++o<h&&r===s||(o<l?t.bl_tree[2*r]+=o:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4))}function I(t,e,a){var n,r,i=-1,s=e[1],o=0,h=7,l=4;for(0===s&&(h=138,l=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++o<h&&r===s)){if(o<l)do{z(t,r,t.bl_tree)}while(0!=--o);else 0!==r?(r!==i&&(z(t,r,t.bl_tree),o--),z(t,16,t.bl_tree),k(t,o-3,2)):o<=10?(z(t,17,t.bl_tree),k(t,o-3,3)):(z(t,18,t.bl_tree),k(t,o-11,7));o=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4)}}r(m);var j=!1;function U(t,e,a,r){k(t,0+(r?1:0),3),function(t,e,a,r){B(t),r&&(y(t,a),y(t,~a)),n.arraySet(t.pending_buf,t.window,e,a,t.pending),t.pending+=a}(t,e,a,!0)}a._tr_init=function(t){j||(function(){var t,e,a,n,r,h=new Array(16);for(a=0,n=0;n<28;n++)for(f[n]=a,t=0;t<1<<i[n];t++)u[a++]=n;for(u[a-1]=n,r=0,n=0;n<16;n++)for(m[n]=r,t=0;t<1<<s[n];t++)d[r++]=n;for(r>>=7;n<30;n++)for(m[n]=r<<7,t=0;t<1<<s[n]-7;t++)d[256+r++]=n;for(e=0;e<=15;e++)h[e]=0;for(t=0;t<=143;)l[2*t+1]=8,t++,h[8]++;for(;t<=255;)l[2*t+1]=9,t++,h[9]++;for(;t<=279;)l[2*t+1]=7,t++,h[7]++;for(;t<=287;)l[2*t+1]=8,t++,h[8]++;for(S(l,287,h),t=0;t<30;t++)_[2*t+1]=5,_[2*t]=x(t,5);c=new b(l,i,257,286,15),p=new b(_,s,0,30,15),g=new b(new Array(0),o,0,19,7)}(),j=!0),t.l_desc=new v(t.dyn_ltree,c),t.d_desc=new v(t.dyn_dtree,p),t.bl_desc=new v(t.bl_tree,g),t.bi_buf=0,t.bi_valid=0,A(t)},a._tr_stored_block=U,a._tr_flush_block=function(t,e,a,n){var r,i,s=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),E(t,t.l_desc),E(t,t.d_desc),s=function(t){var e;for(T(t,t.dyn_ltree,t.l_desc.max_code),T(t,t.dyn_dtree,t.d_desc.max_code),E(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(i=t.static_len+3+7>>>3)<=r&&(r=i)):r=i=a+5,a+4<=r&&-1!==e?U(t,e,a,n):4===t.strategy||i===r?(k(t,2+(n?1:0),3),D(t,l,_)):(k(t,4+(n?1:0),3),function(t,e,a,n){var r;for(k(t,e-257,5),k(t,a-1,5),k(t,n-4,4),r=0;r<n;r++)k(t,t.bl_tree[2*h[r]+1],3);I(t,t.dyn_ltree,e-1),I(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),D(t,t.dyn_ltree,t.dyn_dtree)),A(t),n&&B(t)},a._tr_tally=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(u[a]+256+1)]++,t.dyn_dtree[2*w(e)]++),t.last_lit===t.lit_bufsize-1},a._tr_align=function(t){k(t,2,3),z(t,256,l),function(t){16===t.bi_valid?(y(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":1}],8:[function(t,e,a){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/deflate.js":[function(t,e,a){var n=t("./zlib/deflate"),r=t("./utils/common"),i=t("./utils/strings"),s=t("./zlib/messages"),o=t("./zlib/zstream"),h=Object.prototype.toString;function l(t){if(!(this instanceof l))return new l(t);this.options=r.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var a=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==a)throw new Error(s[a]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var _;if(_="string"==typeof e.dictionary?i.string2buf(e.dictionary):"[object ArrayBuffer]"===h.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(a=n.deflateSetDictionary(this.strm,_)))throw new Error(s[a]);this._dict_set=!0}}function _(t,e){var a=new l(e);if(a.push(t,!0),a.err)throw a.msg||s[a.err];return a.result}l.prototype.push=function(t,e){var a,s,o=this.strm,l=this.options.chunkSize;if(this.ended)return!1;s=e===~~e?e:!0===e?4:0,"string"==typeof t?o.input=i.string2buf(t):"[object ArrayBuffer]"===h.call(t)?o.input=new Uint8Array(t):o.input=t,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new r.Buf8(l),o.next_out=0,o.avail_out=l),1!==(a=n.deflate(o,s))&&0!==a)return this.onEnd(a),this.ended=!0,!1;0!==o.avail_out&&(0!==o.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(i.buf2binstring(r.shrinkBuf(o.output,o.next_out))):this.onData(r.shrinkBuf(o.output,o.next_out)))}while((o.avail_in>0||0===o.avail_out)&&1!==a);return 4===s?(a=n.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,0===a):2!==s||(this.onEnd(0),o.avail_out=0,!0)},l.prototype.onData=function(t){this.chunks.push(t)},l.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Deflate=l,a.deflate=_,a.deflateRaw=function(t,e){return(e=e||{}).raw=!0,_(t,e)},a.gzip=function(t,e){return(e=e||{}).gzip=!0,_(t,e)}},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js")})).deflate;return t.pack=function(t){var e=o(o({},t),{v:"v1"});return l(JSON.stringify(e),{to:"string"})},t}({});
//# sourceMappingURL=rrweb-record-pack.min.js.map

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

var _id = 1;
var symbolAndNumberRegex = RegExp('[^a-z1-6\-]');
var symbolAndNumberRegex = RegExp('[^a-z1-6-]');
function genId() {

@@ -109,6 +109,3 @@ return _id++;

if (url.indexOf('//') > -1) {
origin = url
.split('/')
.slice(0, 3)
.join('/');
origin = url.split('/').slice(0, 3).join('/');
}

@@ -204,3 +201,4 @@ else {

}
function serializeNode(n, doc, blockClass, inlineStylesheet, maskAllInputs) {
function serializeNode(n, doc, blockClass, inlineStylesheet, maskInputOptions) {
if (maskInputOptions === void 0) { maskInputOptions = {}; }
switch (n.nodeType) {

@@ -264,4 +262,10 @@ case n.DOCUMENT_NODE:

attributes_1.type !== 'checkbox' &&
attributes_1.type !== 'submit' &&
attributes_1.type !== 'button' &&
value) {
attributes_1.value = maskAllInputs ? '*'.repeat(value.length) : value;
attributes_1.value =
maskInputOptions[attributes_1.type] ||
maskInputOptions[tagName]
? '*'.repeat(value.length)
: value;
}

@@ -328,7 +332,6 @@ else if (n.checked) {

}
function serializeNodeWithId(n, doc, map, blockClass, skipChild, inlineStylesheet, maskAllInputs) {
function serializeNodeWithId(n, doc, map, blockClass, skipChild, inlineStylesheet, maskInputOptions) {
if (skipChild === void 0) { skipChild = false; }
if (inlineStylesheet === void 0) { inlineStylesheet = true; }
if (maskAllInputs === void 0) { maskAllInputs = false; }
var _serializedNode = serializeNode(n, doc, blockClass, inlineStylesheet, maskAllInputs);
var _serializedNode = serializeNode(n, doc, blockClass, inlineStylesheet, maskInputOptions);
if (!_serializedNode) {

@@ -358,3 +361,3 @@ console.warn(n, 'not serialized');

var childN = _a[_i];
var serializedChildNode = serializeNodeWithId(childN, doc, map, blockClass, skipChild, inlineStylesheet, maskAllInputs);
var serializedChildNode = serializeNodeWithId(childN, doc, map, blockClass, skipChild, inlineStylesheet, maskInputOptions);
if (serializedChildNode) {

@@ -367,9 +370,27 @@ serializedNode.childNodes.push(serializedChildNode);

}
function snapshot(n, blockClass, inlineStylesheet, maskAllInputs) {
function snapshot(n, blockClass, inlineStylesheet, maskAllInputsOrOptions) {
if (blockClass === void 0) { blockClass = 'rr-block'; }
if (inlineStylesheet === void 0) { inlineStylesheet = true; }
if (maskAllInputs === void 0) { maskAllInputs = false; }
var idNodeMap = {};
var maskInputOptions = maskAllInputsOrOptions === true
? {
color: true,
date: true,
'datetime-local': true,
email: true,
month: true,
number: true,
range: true,
search: true,
tel: true,
text: true,
time: true,
url: true,
week: true
}
: maskAllInputsOrOptions === false
? {}
: maskAllInputsOrOptions;
return [
serializeNodeWithId(n, n, idNodeMap, blockClass, false, inlineStylesheet, maskAllInputs),
serializeNodeWithId(n, n, idNodeMap, blockClass, false, inlineStylesheet, maskInputOptions),
idNodeMap,

@@ -379,2 +400,59 @@ ];

var EventType;
(function (EventType) {
EventType[EventType["DomContentLoaded"] = 0] = "DomContentLoaded";
EventType[EventType["Load"] = 1] = "Load";
EventType[EventType["FullSnapshot"] = 2] = "FullSnapshot";
EventType[EventType["IncrementalSnapshot"] = 3] = "IncrementalSnapshot";
EventType[EventType["Meta"] = 4] = "Meta";
EventType[EventType["Custom"] = 5] = "Custom";
})(EventType || (EventType = {}));
var IncrementalSource;
(function (IncrementalSource) {
IncrementalSource[IncrementalSource["Mutation"] = 0] = "Mutation";
IncrementalSource[IncrementalSource["MouseMove"] = 1] = "MouseMove";
IncrementalSource[IncrementalSource["MouseInteraction"] = 2] = "MouseInteraction";
IncrementalSource[IncrementalSource["Scroll"] = 3] = "Scroll";
IncrementalSource[IncrementalSource["ViewportResize"] = 4] = "ViewportResize";
IncrementalSource[IncrementalSource["Input"] = 5] = "Input";
IncrementalSource[IncrementalSource["TouchMove"] = 6] = "TouchMove";
IncrementalSource[IncrementalSource["MediaInteraction"] = 7] = "MediaInteraction";
IncrementalSource[IncrementalSource["StyleSheetRule"] = 8] = "StyleSheetRule";
})(IncrementalSource || (IncrementalSource = {}));
var MouseInteractions;
(function (MouseInteractions) {
MouseInteractions[MouseInteractions["MouseUp"] = 0] = "MouseUp";
MouseInteractions[MouseInteractions["MouseDown"] = 1] = "MouseDown";
MouseInteractions[MouseInteractions["Click"] = 2] = "Click";
MouseInteractions[MouseInteractions["ContextMenu"] = 3] = "ContextMenu";
MouseInteractions[MouseInteractions["DblClick"] = 4] = "DblClick";
MouseInteractions[MouseInteractions["Focus"] = 5] = "Focus";
MouseInteractions[MouseInteractions["Blur"] = 6] = "Blur";
MouseInteractions[MouseInteractions["TouchStart"] = 7] = "TouchStart";
MouseInteractions[MouseInteractions["TouchMove_Departed"] = 8] = "TouchMove_Departed";
MouseInteractions[MouseInteractions["TouchEnd"] = 9] = "TouchEnd";
})(MouseInteractions || (MouseInteractions = {}));
var MediaInteractions;
(function (MediaInteractions) {
MediaInteractions[MediaInteractions["Play"] = 0] = "Play";
MediaInteractions[MediaInteractions["Pause"] = 1] = "Pause";
})(MediaInteractions || (MediaInteractions = {}));
var ReplayerEvents;
(function (ReplayerEvents) {
ReplayerEvents["Start"] = "start";
ReplayerEvents["Pause"] = "pause";
ReplayerEvents["Resume"] = "resume";
ReplayerEvents["Resize"] = "resize";
ReplayerEvents["Finish"] = "finish";
ReplayerEvents["FullsnapshotRebuilded"] = "fullsnapshot-rebuilded";
ReplayerEvents["LoadStylesheetStart"] = "load-stylesheet-start";
ReplayerEvents["LoadStylesheetEnd"] = "load-stylesheet-end";
ReplayerEvents["SkipStart"] = "skip-start";
ReplayerEvents["SkipEnd"] = "skip-end";
ReplayerEvents["MouseInteraction"] = "mouse-interaction";
ReplayerEvents["EventCast"] = "event-cast";
ReplayerEvents["CustomEvent"] = "custom-event";
ReplayerEvents["Flush"] = "flush";
})(ReplayerEvents || (ReplayerEvents = {}));
function on(type, fn, target) {

@@ -511,58 +589,2 @@ if (target === void 0) { target = document; }

var EventType;
(function (EventType) {
EventType[EventType["DomContentLoaded"] = 0] = "DomContentLoaded";
EventType[EventType["Load"] = 1] = "Load";
EventType[EventType["FullSnapshot"] = 2] = "FullSnapshot";
EventType[EventType["IncrementalSnapshot"] = 3] = "IncrementalSnapshot";
EventType[EventType["Meta"] = 4] = "Meta";
EventType[EventType["Custom"] = 5] = "Custom";
})(EventType || (EventType = {}));
var IncrementalSource;
(function (IncrementalSource) {
IncrementalSource[IncrementalSource["Mutation"] = 0] = "Mutation";
IncrementalSource[IncrementalSource["MouseMove"] = 1] = "MouseMove";
IncrementalSource[IncrementalSource["MouseInteraction"] = 2] = "MouseInteraction";
IncrementalSource[IncrementalSource["Scroll"] = 3] = "Scroll";
IncrementalSource[IncrementalSource["ViewportResize"] = 4] = "ViewportResize";
IncrementalSource[IncrementalSource["Input"] = 5] = "Input";
IncrementalSource[IncrementalSource["TouchMove"] = 6] = "TouchMove";
IncrementalSource[IncrementalSource["MediaInteraction"] = 7] = "MediaInteraction";
IncrementalSource[IncrementalSource["StyleSheetRule"] = 8] = "StyleSheetRule";
})(IncrementalSource || (IncrementalSource = {}));
var MouseInteractions;
(function (MouseInteractions) {
MouseInteractions[MouseInteractions["MouseUp"] = 0] = "MouseUp";
MouseInteractions[MouseInteractions["MouseDown"] = 1] = "MouseDown";
MouseInteractions[MouseInteractions["Click"] = 2] = "Click";
MouseInteractions[MouseInteractions["ContextMenu"] = 3] = "ContextMenu";
MouseInteractions[MouseInteractions["DblClick"] = 4] = "DblClick";
MouseInteractions[MouseInteractions["Focus"] = 5] = "Focus";
MouseInteractions[MouseInteractions["Blur"] = 6] = "Blur";
MouseInteractions[MouseInteractions["TouchStart"] = 7] = "TouchStart";
MouseInteractions[MouseInteractions["TouchMove_Departed"] = 8] = "TouchMove_Departed";
MouseInteractions[MouseInteractions["TouchEnd"] = 9] = "TouchEnd";
})(MouseInteractions || (MouseInteractions = {}));
var MediaInteractions;
(function (MediaInteractions) {
MediaInteractions[MediaInteractions["Play"] = 0] = "Play";
MediaInteractions[MediaInteractions["Pause"] = 1] = "Pause";
})(MediaInteractions || (MediaInteractions = {}));
var ReplayerEvents;
(function (ReplayerEvents) {
ReplayerEvents["Start"] = "start";
ReplayerEvents["Pause"] = "pause";
ReplayerEvents["Resume"] = "resume";
ReplayerEvents["Resize"] = "resize";
ReplayerEvents["Finish"] = "finish";
ReplayerEvents["FullsnapshotRebuilded"] = "fullsnapshot-rebuilded";
ReplayerEvents["LoadStylesheetStart"] = "load-stylesheet-start";
ReplayerEvents["LoadStylesheetEnd"] = "load-stylesheet-end";
ReplayerEvents["SkipStart"] = "skip-start";
ReplayerEvents["SkipEnd"] = "skip-end";
ReplayerEvents["MouseInteraction"] = "mouse-interaction";
ReplayerEvents["EventCast"] = "event-cast";
ReplayerEvents["CustomEvent"] = "custom-event";
})(ReplayerEvents || (ReplayerEvents = {}));
var moveKey = function (id, parentId) { return id + "@" + parentId; };

@@ -573,3 +595,3 @@ function isINode(n) {

var MutationBuffer = (function () {
function MutationBuffer(cb, blockClass, inlineStylesheet, maskAllInputs) {
function MutationBuffer(cb, blockClass, inlineStylesheet, maskInputOptions) {
var _this = this;

@@ -597,3 +619,3 @@ this.texts = [];

nextId: nextId,
node: serializeNodeWithId(n, document, mirror.map, _this.blockClass, true, _this.inlineStylesheet, _this.maskAllInputs),
node: serializeNodeWithId(n, document, mirror.map, _this.blockClass, true, _this.inlineStylesheet, _this.maskInputOptions),
});

@@ -644,2 +666,35 @@ };

};
this.emit = function () {
var payload = {
texts: _this.texts
.map(function (text) { return ({
id: mirror.getId(text.node),
value: text.value,
}); })
.filter(function (text) { return mirror.has(text.id); }),
attributes: _this.attributes
.map(function (attribute) { return ({
id: mirror.getId(attribute.node),
attributes: attribute.attributes,
}); })
.filter(function (attribute) { return mirror.has(attribute.id); }),
removes: _this.removes,
adds: _this.adds,
};
if (!payload.texts.length &&
!payload.attributes.length &&
!payload.removes.length &&
!payload.adds.length) {
return;
}
_this.emissionCallback(payload);
_this.texts = [];
_this.attributes = [];
_this.removes = [];
_this.adds = [];
_this.addedSet = new Set();
_this.movedSet = new Set();
_this.droppedSet = new Set();
_this.movedMap = {};
};
this.processMutation = function (m) {

@@ -723,38 +778,5 @@ switch (m.type) {

};
this.emit = function () {
var payload = {
texts: _this.texts
.map(function (text) { return ({
id: mirror.getId(text.node),
value: text.value,
}); })
.filter(function (text) { return mirror.has(text.id); }),
attributes: _this.attributes
.map(function (attribute) { return ({
id: mirror.getId(attribute.node),
attributes: attribute.attributes,
}); })
.filter(function (attribute) { return mirror.has(attribute.id); }),
removes: _this.removes,
adds: _this.adds,
};
if (!payload.texts.length &&
!payload.attributes.length &&
!payload.removes.length &&
!payload.adds.length) {
return;
}
_this.emissionCallback(payload);
_this.texts = [];
_this.attributes = [];
_this.removes = [];
_this.adds = [];
_this.addedSet = new Set();
_this.movedSet = new Set();
_this.droppedSet = new Set();
_this.movedMap = {};
};
this.blockClass = blockClass;
this.inlineStylesheet = inlineStylesheet;
this.maskAllInputs = maskAllInputs;
this.maskInputOptions = maskInputOptions;
this.emissionCallback = cb;

@@ -790,4 +812,4 @@ }

function initMutationObserver(cb, blockClass, inlineStylesheet, maskAllInputs) {
var mutationBuffer = new MutationBuffer(cb, blockClass, inlineStylesheet, maskAllInputs);
function initMutationObserver(cb, blockClass, inlineStylesheet, maskInputOptions) {
var mutationBuffer = new MutationBuffer(cb, blockClass, inlineStylesheet, maskInputOptions);
var observer = new MutationObserver(mutationBuffer.processMutations);

@@ -804,3 +826,7 @@ observer.observe(document, {

}
function initMoveObserver(cb, mousemoveWait) {
function initMoveObserver(cb, sampling) {
if (sampling.mousemove === false) {
return function () { };
}
var threshold = typeof sampling.mousemove === 'number' ? sampling.mousemove : 50;
var positions = [];

@@ -832,3 +858,3 @@ var timeBaseline;

wrappedCb(isTouchEvent(evt));
}, mousemoveWait, {
}, threshold, {
trailing: false,

@@ -844,3 +870,10 @@ });

}
function initMouseInteractionObserver(cb, blockClass) {
function initMouseInteractionObserver(cb, blockClass, sampling) {
if (sampling.mouseInteraction === false) {
return function () { };
}
var disableMap = sampling.mouseInteraction === true ||
sampling.mouseInteraction === undefined
? {}
: sampling.mouseInteraction;
var handlers = [];

@@ -865,3 +898,7 @@ var getHandler = function (eventKey) {

Object.keys(MouseInteractions)
.filter(function (key) { return Number.isNaN(Number(key)) && !key.endsWith('_Departed'); })
.filter(function (key) {
return Number.isNaN(Number(key)) &&
!key.endsWith('_Departed') &&
disableMap[key] !== false;
})
.forEach(function (eventKey) {

@@ -876,3 +913,3 @@ var eventName = eventKey.toLowerCase();

}
function initScrollObserver(cb, blockClass) {
function initScrollObserver(cb, blockClass, sampling) {
var updatePosition = throttle(function (evt) {

@@ -898,3 +935,3 @@ if (!evt.target || isBlocked(evt.target, blockClass)) {

}
}, 100);
}, sampling.scroll || 100);
return on('scroll', updatePosition);

@@ -914,19 +951,4 @@ }

var INPUT_TAGS = ['INPUT', 'TEXTAREA', 'SELECT'];
var MASK_TYPES = [
'color',
'date',
'datetime-local',
'email',
'month',
'number',
'range',
'search',
'tel',
'text',
'time',
'url',
'week',
];
var lastInputValueMap = new WeakMap();
function initInputObserver(cb, blockClass, ignoreClass, maskAllInputs) {
function initInputObserver(cb, blockClass, ignoreClass, maskInputOptions, sampling) {
function eventHandler(event) {

@@ -947,7 +969,7 @@ var target = event.target;

var isChecked = false;
var hasTextInput = MASK_TYPES.includes(type) || target.tagName === 'TEXTAREA';
if (type === 'radio' || type === 'checkbox') {
isChecked = target.checked;
}
else if (hasTextInput && maskAllInputs) {
else if (maskInputOptions[target.tagName.toLowerCase()] ||
maskInputOptions[type]) {
text = '*'.repeat(text.length);

@@ -980,6 +1002,4 @@ }

}
var handlers = [
'input',
'change',
].map(function (eventName) { return on(eventName, eventHandler); });
var events = sampling.input === 'last' ? ['change'] : ['input', 'change'];
var handlers = events.map(function (eventName) { return on(eventName, eventHandler); });
var propertyDescriptor = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value');

@@ -1135,8 +1155,8 @@ var hookProperties = [

mergeHooks(o, hooks);
var mutationObserver = initMutationObserver(o.mutationCb, o.blockClass, o.inlineStylesheet, o.maskAllInputs);
var mousemoveHandler = initMoveObserver(o.mousemoveCb, o.mousemoveWait);
var mouseInteractionHandler = initMouseInteractionObserver(o.mouseInteractionCb, o.blockClass);
var scrollHandler = initScrollObserver(o.scrollCb, o.blockClass);
var mutationObserver = initMutationObserver(o.mutationCb, o.blockClass, o.inlineStylesheet, o.maskInputOptions);
var mousemoveHandler = initMoveObserver(o.mousemoveCb, o.sampling);
var mouseInteractionHandler = initMouseInteractionObserver(o.mouseInteractionCb, o.blockClass, o.sampling);
var scrollHandler = initScrollObserver(o.scrollCb, o.blockClass, o.sampling);
var viewportResizeHandler = initViewportResizeObserver(o.viewportResizeCb);
var inputHandler = initInputObserver(o.inputCb, o.blockClass, o.ignoreClass, o.maskAllInputs);
var inputHandler = initInputObserver(o.inputCb, o.blockClass, o.ignoreClass, o.maskInputOptions, o.sampling);
var mediaInteractionHandler = initMediaInteractionObserver(o.mediaInteractionCb, o.blockClass);

@@ -1162,6 +1182,30 @@ var styleSheetObserver = initStyleSheetObserver(o.styleSheetRuleCb);

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, packFn = options.packFn;
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, maskAllInputs = options.maskAllInputs, _maskInputOptions = options.maskInputOptions, hooks = options.hooks, packFn = options.packFn, _d = options.sampling, sampling = _d === void 0 ? {} : _d, mousemoveWait = options.mousemoveWait;
if (!emit) {
throw new Error('emit function is required');
}
if (mousemoveWait !== undefined && sampling.mousemove === undefined) {
sampling.mousemove = mousemoveWait;
}
var maskInputOptions = maskAllInputs === true
? {
color: true,
date: true,
'datetime-local': true,
email: true,
month: true,
number: true,
range: true,
search: true,
tel: true,
text: true,
time: true,
url: true,
week: true,
textarea: true,
select: true,
}
: _maskInputOptions !== undefined
? _maskInputOptions
: {};
polyfill();

@@ -1197,3 +1241,3 @@ var lastFullSnapshotEvent;

}), isCheckout);
var _e = __read(snapshot(document, blockClass, inlineStylesheet, maskAllInputs), 2), node = _e[0], idNodeMap = _e[1];
var _e = __read(snapshot(document, blockClass, inlineStylesheet, maskInputOptions), 2), node = _e[0], idNodeMap = _e[1];
if (!node) {

@@ -1284,5 +1328,5 @@ return console.warn('Failed to snapshot the document');

ignoreClass: ignoreClass,
maskAllInputs: maskAllInputs,
maskInputOptions: maskInputOptions,
inlineStylesheet: inlineStylesheet,
mousemoveWait: mousemoveWait,
sampling: sampling,
}, hooks));

@@ -1289,0 +1333,0 @@ };

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

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

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

and limitations under the License.
***************************************************************************** */var t,n=function(){return(n=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function i(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 i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}!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 o=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function a(e,t){void 0===t&&(t={});var n=1,i=1;function r(e){var t=e.match(/\n/g);t&&(n+=t.length);var r=e.lastIndexOf("\n");i=-1===r?i+e.length:e.length-r}function a(){var e={line:n,column:i};return function(t){return t.position=new l(e),m(),t}}var l=function(e){this.start=e,this.end={line:n,column:i},this.source=t.source};l.prototype.content=e;var c=[];function f(r){var o=new Error(t.source+":"+n+":"+i+": "+r);if(o.reason=r,o.filename=t.source,o.line=n,o.column=i,o.source=e,!t.silent)throw o;c.push(o)}function u(){return p(/^{\s*/)}function d(){return p(/^}/)}function h(){var t,n=[];for(m(),v(n);e.length&&"}"!==e.charAt(0)&&(t=T()||A());)!1!==t&&(n.push(t),v(n));return n}function p(t){var n=t.exec(e);if(n){var i=n[0];return r(i),e=e.slice(i.length),n}}function m(){p(/^\s*/)}function v(e){var t;for(void 0===e&&(e=[]);t=g();)!1!==t&&e.push(t),t=g();return e}function g(){var t=a();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 f("End of comment missing");var o=e.slice(2,n-2);return i+=2,r(o),e=e.slice(n),i+=2,t({type:"comment",comment:o})}}function y(){var e=p(/^([^{]+)/);if(e)return s(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=a(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=s(t[0]);if(!p(/^:\s*/))return f("property missing ':'");var i=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:n.replace(o,""),value:i?s(i[0]).replace(o,""):""});return p(/^[;\s]*/),r}}function w(){var e,t=[];if(!u())return f("missing '{'");for(v(t);e=b();)!1!==e&&(t.push(e),v(t)),e=b();return d()?t:f("missing '}'")}function k(){for(var e,t=[],n=a();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:w()})}var _,x=N("import"),E=N("charset"),S=N("namespace");function N(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=a(),i=p(t);if(i){var r={type:e};return r[e]=i[1].trim(),n(r)}}}function T(){if("@"===e[0])return function(){var e=a(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=p(/^([-\w]+)\s*/)))return f("@keyframes missing name");var i,r=t[1];if(!u())return f("@keyframes missing '{'");for(var o=v();i=k();)o.push(i),o=o.concat(v());return d()?e({type:"keyframes",name:r,vendor:n,keyframes:o}):f("@keyframes missing '}'")}}()||function(){var e=a(),t=p(/^@media *([^{]+)/);if(t){var n=s(t[1]);if(!u())return f("@media missing '{'");var i=v().concat(h());return d()?e({type:"media",media:n,rules:i}):f("@media missing '}'")}}()||function(){var e=a(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:s(t[1]),media:s(t[2])})}()||function(){var e=a(),t=p(/^@supports *([^{]+)/);if(t){var n=s(t[1]);if(!u())return f("@supports missing '{'");var i=v().concat(h());return d()?e({type:"supports",supports:n,rules:i}):f("@supports missing '}'")}}()||x()||E()||S()||function(){var e=a(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var n=s(t[1]),i=s(t[2]);if(!u())return f("@document missing '{'");var r=v().concat(h());return d()?e({type:"document",document:i,vendor:n,rules:r}):f("@document missing '}'")}}()||function(){var e=a();if(p(/^@page */)){var t=y()||[];if(!u())return f("@page missing '{'");for(var n,i=v();n=b();)i.push(n),i=i.concat(v());return d()?e({type:"page",selectors:t,declarations:i}):f("@page missing '}'")}}()||function(){var e=a();if(p(/^@host\s*/)){if(!u())return f("@host missing '{'");var t=v().concat(h());return d()?e({type:"host",rules:t}):f("@host missing '}'")}}()||function(){var e=a();if(p(/^@font-face\s*/)){if(!u())return f("@font-face missing '{'");for(var t,n=v();t=b();)n.push(t),n=n.concat(v());return d()?e({type:"font-face",declarations:n}):f("@font-face missing '}'")}}()}function A(){var e=a(),t=y();return t?(v(),e({type:"rule",selectors:t,declarations:w()})):f("selector missing")}return function e(t,n){for(var i=t&&"string"==typeof t.type,r=i?t:n,o=0,a=Object.keys(t);o<a.length;o++){var s=a[o],l=t[s];Array.isArray(l)?l.forEach((function(t){e(t,r)})):l&&"object"==typeof l&&e(l,r)}i&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((_=h(),{type:"stylesheet",stylesheet:{source:t.source,rules:_,parsingErrors:c}}))}function s(e){return e?e.replace(/^\s+|\s+$/g,""):""}var l={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 c=/([^\\]):hover/g;function f(e){var t=a(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach((function(t){"selectors"in t&&(t.selectors||[]).forEach((function(t){if(c.test(t)){var n=t.replace(c,"$1.\\:hover");e=e.replace(t,t+", "+n)}}))})),e):e}function u(e,n,i){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,o=function(e){var t=l[e.tagName]?l[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);r=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",o):n.createElement(o);var a=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var a=e.attributes[t];if(a="boolean"==typeof a?"":a,t.startsWith("rr_")){if("canvas"===o&&"rr_dataURL"===t){var s=document.createElement("img");s.src=a,s.onload=function(){var e=r.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(r.style.width=a),"rr_height"===t&&(r.style.height=a),"rr_mediaState"===t)switch(a){case"played":r.play();case"paused":r.pause()}}else{var l="textarea"===o&&"value"===t,c="style"===o&&"_cssText"===t;if(c&&i&&(a=f(a)),l||c){for(var u=n.createTextNode(a),d=0,h=Array.from(r.childNodes);d<h.length;d++){var p=h[d];p.nodeType===r.TEXT_NODE&&r.removeChild(p)}return r.appendChild(u),"continue"}if("iframe"===o&&"src"===t)return"continue";try{e.isSVG&&"xlink:href"===t?r.setAttributeNS("http://www.w3.org/1999/xlink",t,a):"onload"==t||"onclick"==t||"onmouse"==t.substring(0,7)?r.setAttribute("_"+t,a):r.setAttribute(t,a)}catch(e){}}};for(var s in e.attributes)a(s);return r;case t.Text:return n.createTextNode(e.isStyle&&i?f(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function d(e,n,i,r,o){void 0===r&&(r=!1),void 0===o&&(o=!0);var a=u(e,n,o);if(!a)return null;if(e.type===t.Document&&(n.close(),n.open(),a=n),a.__sn=e,i[e.id]=a,(e.type===t.Document||e.type===t.Element)&&!r)for(var s=0,l=e.childNodes;s<l.length;s++){var c=l[s],f=d(c,n,i,!1,o);f?a.appendChild(f):console.warn("Failed to rebuild",c)}return a}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 p=Object.freeze({__proto__:null,default:h});function m(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function v(e,t){return e(t={exports:{}},t.exports),t.exports}var g,y,b,w,k,_=v((function(e,t){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,i=e.HTMLElement||e.Element,r={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:i.prototype.scroll||s,scrollIntoView:i.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?p.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):r.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])?r.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):p.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;p.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");r.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)}},i.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}):r.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))},i.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=d(this),i=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(p.call(this,n,n.scrollLeft+o.left-i.left,n.scrollTop+o.top-i.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else r.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function f(t,n){var i=e.getComputedStyle(t,null)["overflow"+n];return"auto"===i||"scroll"===i}function u(e){var t=c(e,"Y")&&f(e,"Y"),n=c(e,"X")&&f(e,"X");return t||n}function d(e){for(;e!==t.body&&!1===u(e);)e=e.parentNode||e.host;return e}function h(t){var n,i,r,a,s=(o()-t.startTime)/468;a=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*a)),i=t.startX+(t.x-t.startX)*n,r=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,i,r),i===t.x&&r===t.y||e.requestAnimationFrame(h.bind(e,t))}function p(n,i,a){var l,c,f,u,d=o();n===t.body?(l=e,c=e.scrollX||e.pageXOffset,f=e.scrollY||e.pageYOffset,u=r.scroll):(l=n,c=n.scrollLeft,f=n.scrollTop,u=s),h({scrollable:l,method:u,startTime:d,startX:c,startY:f,x:i,y:a})}}}})).polyfill;!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"}(g||(g={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule"}(y||(y={})),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"}(w||(w={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event"}(k||(k={}));var x,E=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,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e}(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,i=this;this.raf=requestAnimationFrame((function r(o){for(i.timeOffset+=(o-e)*n.speed,e=o;t.length;){var a=t[0];if(!(i.timeOffset>=a.delay))break;t.shift(),a.doAction()}(t.length>0||i.config.liveMode)&&(i.raf=requestAnimationFrame(r))}))},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 i=Math.floor((t+n)/2);if(this.actions[i].delay<e.delay)t=i+1;else{if(!(this.actions[i].delay>e.delay))return i;n=i-1}}return t},e}();function S(e,t){if(e.type===g.IncrementalSnapshot&&e.data.source===y.MouseMove){var n=e.data.positions[0].timeOffset,i=e.timestamp+n;return e.delay=i-t,i-t}return e.delay=e.timestamp-t,e.timestamp-t}
***************************************************************************** */var t,n=function(){return(n=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function i(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 i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}!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 o=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function a(e,t){void 0===t&&(t={});var n=1,i=1;function r(e){var t=e.match(/\n/g);t&&(n+=t.length);var r=e.lastIndexOf("\n");i=-1===r?i+e.length:e.length-r}function a(){var e={line:n,column:i};return function(t){return t.position=new l(e),m(),t}}var l=function(e){this.start=e,this.end={line:n,column:i},this.source=t.source};l.prototype.content=e;var c=[];function u(r){var o=new Error(t.source+":"+n+":"+i+": "+r);if(o.reason=r,o.filename=t.source,o.line=n,o.column=i,o.source=e,!t.silent)throw o;c.push(o)}function f(){return p(/^{\s*/)}function d(){return p(/^}/)}function h(){var t,n=[];for(m(),v(n);e.length&&"}"!==e.charAt(0)&&(t=N()||I());)!1!==t&&(n.push(t),v(n));return n}function p(t){var n=t.exec(e);if(n){var i=n[0];return r(i),e=e.slice(i.length),n}}function m(){p(/^\s*/)}function v(e){var t;for(void 0===e&&(e=[]);t=y();)!1!==t&&e.push(t),t=y();return e}function y(){var t=a();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return u("End of comment missing");var o=e.slice(2,n-2);return i+=2,r(o),e=e.slice(n),i+=2,t({type:"comment",comment:o})}}function g(){var e=p(/^([^{]+)/);if(e)return s(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=a(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=s(t[0]);if(!p(/^:\s*/))return u("property missing ':'");var i=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:n.replace(o,""),value:i?s(i[0]).replace(o,""):""});return p(/^[;\s]*/),r}}function w(){var e,t=[];if(!f())return u("missing '{'");for(v(t);e=b();)!1!==e&&(t.push(e),v(t)),e=b();return d()?t:u("missing '}'")}function k(){for(var e,t=[],n=a();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:w()})}var x,_=M("import"),S=M("charset"),E=M("namespace");function M(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=a(),i=p(t);if(i){var r={type:e};return r[e]=i[1].trim(),n(r)}}}function N(){if("@"===e[0])return function(){var e=a(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=p(/^([-\w]+)\s*/)))return u("@keyframes missing name");var i,r=t[1];if(!f())return u("@keyframes missing '{'");for(var o=v();i=k();)o.push(i),o=o.concat(v());return d()?e({type:"keyframes",name:r,vendor:n,keyframes:o}):u("@keyframes missing '}'")}}()||function(){var e=a(),t=p(/^@media *([^{]+)/);if(t){var n=s(t[1]);if(!f())return u("@media missing '{'");var i=v().concat(h());return d()?e({type:"media",media:n,rules:i}):u("@media missing '}'")}}()||function(){var e=a(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:s(t[1]),media:s(t[2])})}()||function(){var e=a(),t=p(/^@supports *([^{]+)/);if(t){var n=s(t[1]);if(!f())return u("@supports missing '{'");var i=v().concat(h());return d()?e({type:"supports",supports:n,rules:i}):u("@supports missing '}'")}}()||_()||S()||E()||function(){var e=a(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var n=s(t[1]),i=s(t[2]);if(!f())return u("@document missing '{'");var r=v().concat(h());return d()?e({type:"document",document:i,vendor:n,rules:r}):u("@document missing '}'")}}()||function(){var e=a();if(p(/^@page */)){var t=g()||[];if(!f())return u("@page missing '{'");for(var n,i=v();n=b();)i.push(n),i=i.concat(v());return d()?e({type:"page",selectors:t,declarations:i}):u("@page missing '}'")}}()||function(){var e=a();if(p(/^@host\s*/)){if(!f())return u("@host missing '{'");var t=v().concat(h());return d()?e({type:"host",rules:t}):u("@host missing '}'")}}()||function(){var e=a();if(p(/^@font-face\s*/)){if(!f())return u("@font-face missing '{'");for(var t,n=v();t=b();)n.push(t),n=n.concat(v());return d()?e({type:"font-face",declarations:n}):u("@font-face missing '}'")}}()}function I(){var e=a(),t=g();return t?(v(),e({type:"rule",selectors:t,declarations:w()})):u("selector missing")}return function e(t,n){for(var i=t&&"string"==typeof t.type,r=i?t:n,o=0,a=Object.keys(t);o<a.length;o++){var s=a[o],l=t[s];Array.isArray(l)?l.forEach((function(t){e(t,r)})):l&&"object"==typeof l&&e(l,r)}i&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((x=h(),{type:"stylesheet",stylesheet:{source:t.source,rules:x,parsingErrors:c}}))}function s(e){return e?e.replace(/^\s+|\s+$/g,""):""}var l={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 c=/([^\\]):hover/g;function u(e){var t=a(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach((function(t){"selectors"in t&&(t.selectors||[]).forEach((function(t){if(c.test(t)){var n=t.replace(c,"$1.\\:hover");e=e.replace(t,t+", "+n)}}))})),e):e}function f(e,n,i){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,o=function(e){var t=l[e.tagName]?l[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);r=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",o):n.createElement(o);var a=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var a=e.attributes[t];if(a="boolean"==typeof a?"":a,t.startsWith("rr_")){if("canvas"===o&&"rr_dataURL"===t){var s=document.createElement("img");s.src=a,s.onload=function(){var e=r.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(r.style.width=a),"rr_height"===t&&(r.style.height=a),"rr_mediaState"===t)switch(a){case"played":r.play();case"paused":r.pause()}}else{var l="textarea"===o&&"value"===t,c="style"===o&&"_cssText"===t;if(c&&i&&(a=u(a)),l||c){for(var f=n.createTextNode(a),d=0,h=Array.from(r.childNodes);d<h.length;d++){var p=h[d];p.nodeType===r.TEXT_NODE&&r.removeChild(p)}return r.appendChild(f),"continue"}if("iframe"===o&&"src"===t)return"continue";try{e.isSVG&&"xlink:href"===t?r.setAttributeNS("http://www.w3.org/1999/xlink",t,a):"onload"==t||"onclick"==t||"onmouse"==t.substring(0,7)?r.setAttribute("_"+t,a):r.setAttribute(t,a)}catch(e){}}};for(var s in e.attributes)a(s);return r;case t.Text:return n.createTextNode(e.isStyle&&i?u(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function d(e,n,i,r,o){void 0===r&&(r=!1),void 0===o&&(o=!0);var a=f(e,n,o);if(!a)return null;if(e.type===t.Document&&(n.close(),n.open(),a=n),a.__sn=e,i[e.id]=a,(e.type===t.Document||e.type===t.Element)&&!r)for(var s=0,l=e.childNodes;s<l.length;s++){var c=l[s],u=d(c,n,i,!1,o);u?a.appendChild(u):console.warn("Failed to rebuild",c)}return a}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 p=Object.freeze({__proto__:null,default:h});function m(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function v(e,t){return e(t={exports:{}},t.exports),t.exports}var y,g,b,w,k,x=v((function(e,t){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,i=e.HTMLElement||e.Element,r={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:i.prototype.scroll||s,scrollIntoView:i.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?p.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):r.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])?r.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):p.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;p.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");r.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)}},i.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}):r.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))},i.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=d(this),i=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(p.call(this,n,n.scrollLeft+o.left-i.left,n.scrollTop+o.top-i.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else r.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function u(t,n){var i=e.getComputedStyle(t,null)["overflow"+n];return"auto"===i||"scroll"===i}function f(e){var t=c(e,"Y")&&u(e,"Y"),n=c(e,"X")&&u(e,"X");return t||n}function d(e){for(;e!==t.body&&!1===f(e);)e=e.parentNode||e.host;return e}function h(t){var n,i,r,a,s=(o()-t.startTime)/468;a=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*a)),i=t.startX+(t.x-t.startX)*n,r=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,i,r),i===t.x&&r===t.y||e.requestAnimationFrame(h.bind(e,t))}function p(n,i,a){var l,c,u,f,d=o();n===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,f=r.scroll):(l=n,c=n.scrollLeft,u=n.scrollTop,f=s),h({scrollable:l,method:f,startTime:d,startX:c,startY:u,x:i,y:a})}}}})).polyfill;!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"}(w||(w={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush"}(k||(k={}));var _,S=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,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e}(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,i=this;this.raf=requestAnimationFrame((function r(o){for(i.timeOffset+=(o-e)*n.speed,e=o;t.length;){var a=t[0];if(!(i.timeOffset>=a.delay))break;t.shift(),a.doAction()}(t.length>0||i.config.liveMode)&&(i.raf=requestAnimationFrame(r))}))},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 i=Math.floor((t+n)/2);if(this.actions[i].delay<e.delay)t=i+1;else{if(!(this.actions[i].delay>e.delay))return i;n=i-1}}return t},e}();function E(e,t){if(e.type===y.IncrementalSnapshot&&e.data.source===g.MouseMove){var n=e.data.positions[0].timeOffset,i=e.timestamp+n;return e.delay=i-t,i-t}return e.delay=e.timestamp-t,e.timestamp-t}
/*! *****************************************************************************

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

and limitations under the License.
***************************************************************************** */!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(x||(x={}));var N={type:"xstate.init"};function T(e){return void 0===e?[]:[].concat(e)}function A(e){return{type:"xstate.assign",assignment:e}}function C(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function I(e){return function(t){return e===t}}function O(e){return"string"==typeof e?{type:e}:e}function R(e,t){return{value:e,context:t,actions:[],changed:!1,matches:I(e)}}var M=function(e,t){return e.actions.forEach((function(n){var i=n.exec;return i&&i(e.context,t)}))};function F(e,t){var r=t.getCastFn,o=t.emitter;return function(e){var t=e.initialState,n=x.NotStarted,i=new Set,r={_machine:e,send:function(r){n===x.Running&&(t=e.transition(t,r),M(t,O(r)),i.forEach((function(e){return e(t)})))},subscribe:function(e){return i.add(e),e(t),{unsubscribe:function(){return i.delete(e)}}},start:function(){return n=x.Running,M(t,N),r},stop:function(){return n=x.Stopped,i.clear(),r},get state(){return t},get status(){return n}};return r}(function(e,t){void 0===t&&(t={});var n={config:e,_options:t,initialState:{value:e.initial,actions:T(e.states[e.initial].entry).map((function(e){return C(e,t.actions)})),context:e.context,matches:I(e.initial)},transition:function(t,i){var r,o,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,l=a.context,c=O(i),f=e.states[s];if(f.on){var u=T(f.on[c.type]),d=function(t){if(void 0===t)return{value:R(s,l)};var i="string"==typeof t?{target:t}:t,r=i.target,o=void 0===r?s:r,a=i.actions,u=void 0===a?[]:a,d=i.cond,h=l;if((void 0===d?function(){return!0}:d)(l,c)){var p=e.states[o],m=!1,v=[].concat(f.exit,u,p.entry).filter((function(e){return e})).map((function(e){return C(e,n._options.actions)})).filter((function(e){if("xstate.assign"===e.type){m=!0;var t=Object.assign({},h);return"function"==typeof e.assignment?t=e.assignment(h,c):Object.keys(e.assignment).forEach((function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](h,c):e.assignment[n]})),h=t,!1}return!0}));return{value:{value:o,context:h,actions:v,changed:o!==s||v.length>0||m,matches:I(o)}}}};try{for(var h=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}(u),p=h.next();!p.done;p=h.next()){var m=d(p.value);if("object"==typeof m)return m.value}}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}}return R(s,l)}};return n}({id:"player",context:e,initial:"inited",states:{inited:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},TO_LIVE:{target:"live",actions:["startLive"]}}},playing:{on:{PAUSE:{target:"paused",actions:["pause"]},END:"ended",FAST_FORWARD:"skipping",CAST_EVENT:{target:"playing",actions:"castEvent"}}},paused:{on:{RESUME:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"}}},skipping:{on:{BACK_TO_NORMAL:"playing"}},ended:{on:{REPLAY:"playing"}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]}}}}},{actions:{castEvent:A({lastPlayedEvent:function(t,n){return"CAST_EVENT"===n.type?n.payload.event:e.lastPlayedEvent}}),recordTimeOffset:A((function(e,t){var i=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(i=t.payload.timeOffset),n(n({},e),{timeOffset:i,baselineTime:e.events[0].timestamp+i})})),play:function(e){var t,n,a=e.timer,s=e.events,l=e.baselineTime,c=e.lastPlayedEvent;a.clear();var f=new Array,u=function(e){if(c&&(e.timestamp<=c.timestamp||e===c))return"continue";var t=e.timestamp<l,n=r(e,t);t?n():f.push({doAction:function(){n(),o.emit(k.EventCast,e)},delay:S(e,l)})};try{for(var d=i(s),h=d.next();!h.done;h=d.next()){u(h.value)}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}a.addActions(f),a.start()},pause:function(e){e.timer.clear()},startLive:A({baselineTime:function(e,t){return e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:A((function(e,t){var i=e.baselineTime,a=e.timer,s=e.events;if("ADD_EVENT"===t.type){var l=t.payload.event;s.push(l);var c=l.timestamp<i,f=r(l,c);c?f():a.addAction({doAction:function(){f(),o.emit(k.EventCast,l)},delay:S(l,i)})}return n(n({},e),{events:s})}))}}))}var D={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return D.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete D.map[t],e.childNodes&&e.childNodes.forEach((function(e){return D.removeNodeFromMap(e)}))},has:function(e){return D.map.hasOwnProperty(e)}};var B=h||p,L={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0},z=function(){function e(e,t){if(this.emitter=B(),this.noramlSpeed=-1,this.legacy_missingNodeRetryMap={},!(null==t?void 0:t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");this.config=Object.assign({},L,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on("resize",this.handleResize),_(),"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),this.setupDom(),this.service=F({events:e.map((function(e){return t&&t.unpackFn?t.unpackFn(e):e})),timer:new E(this.config),speed:(null==t?void 0:t.speed)||L.speed,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){e.changed}));var n=this.service.state.context.events,i=n.find((function(e){return e.type===g.Meta})),r=n.find((function(e){return e.type===g.FullSnapshot}));if(i){var o=i.data,a=o.width,s=o.height;this.emitter.emit(k.Resize,{width:a,height:s})}r&&this.rebuildFullSnapshot(r)}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),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.service.state.context.events,t=e[0];return{totalTime:e[e.length-1].timestamp-t.timestamp}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},e.prototype.play=function(e){void 0===e&&(e=0),this.service.send({type:"PLAY",payload:{timeOffset:e}}),this.emitter.emit(k.Start)},e.prototype.pause=function(){this.service.send({type:"PAUSE"}),this.emitter.emit(k.Pause)},e.prototype.resume=function(e){void 0===e&&(e=0),this.service.send({type:"RESUME",payload:{timeOffset:e}}),this.emitter.emit(k.Resume)},e.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},e.prototype.addEvent=function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))},e.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},e.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.disableInteract(),this.wrapper.appendChild(this.iframe)},e.prototype.handleResize=function(e){this.iframe.setAttribute("width",String(e.width)),this.iframe.setAttribute("height",String(e.height))},e.prototype.getCastFn=function(e,t){var n=this;void 0===t&&(t=!1);var r,o=this.service.state.context.events;switch(e.type){case g.DomContentLoaded:case g.Load:break;case g.Custom:r=function(){n.emitter.emit(k.CustomEvent,e)};break;case g.Meta:r=function(){return n.emitter.emit(k.Resize,{width:e.data.width,height:e.data.height})};break;case g.FullSnapshot:r=function(){n.rebuildFullSnapshot(e),n.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case g.IncrementalSnapshot:r=function(){var r,a;if(n.applyIncremental(e,t),e===n.nextUserInteractionEvent&&(n.nextUserInteractionEvent=null,n.restoreSpeed()),n.config.skipInactive&&!n.nextUserInteractionEvent){try{for(var s=i(o),l=s.next();!l.done;l=s.next()){var c=l.value;if(!(c.timestamp<=e.timestamp)&&n.isUserInteraction(c)){c.delay-e.delay>1e4*n.config.speed&&(n.nextUserInteractionEvent=c);break}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(r)throw r.error}}if(n.nextUserInteractionEvent){n.noramlSpeed=n.config.speed;var f=n.nextUserInteractionEvent.delay-e.delay,u={speed:Math.min(Math.round(f/5e3),360)};n.setConfig(u),n.emitter.emit(k.SkipStart,u)}}}}return function(){r&&r(),n.service.send({type:"CAST_EVENT",payload:{event:e}}),e===o[o.length-1]&&(n.restoreSpeed(),n.service.send("END"),n.emitter.emit(k.Finish))}},e.prototype.rebuildFullSnapshot=function(e){Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={},D.map=function(e,t,n){void 0===n&&(n=!0);var i={};return[d(e,t,i,!1,n),i]}(e.data.node,this.iframe.contentDocument)[1];var t=document.createElement("style"),n=this.iframe.contentDocument,i=n.documentElement,r=n.head;i.insertBefore(t,r);for(var o,a=(o=this.config.blockClass,["iframe, ."+o+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules),s=0;s<a.length;s++)t.sheet.insertRule(a[s],s);this.emitter.emit(k.FullsnapshotRebuilded),this.waitForStylesheetLoad()},e.prototype.waitForStylesheetLoad=function(){var e=this,t=this.iframe.contentDocument.head;if(t){var n,i=new Set,r=this.service.state;t.querySelectorAll('link[rel="stylesheet"]').forEach((function(t){t.sheet||(i.add(t),t.addEventListener("load",(function(){i.delete(t),0===i.size&&-1!==n&&(r.matches("playing")&&e.resume(e.getCurrentTime()),e.emitter.emit(k.LoadStylesheetEnd),n&&window.clearTimeout(n))})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(k.LoadStylesheetStart),n=window.setTimeout((function(){r.matches("playing")&&e.resume(e.getCurrentTime()),n=-1}),this.config.loadTimeout))}},e.prototype.applyIncremental=function(e,t){var i=this,r=this.service.state.context.baselineTime,o=e.data;switch(o.source){case y.Mutation:o.removes.forEach((function(e){var t=D.getNode(e.id);if(!t)return i.warnNodeNotFound(o,e.id);var n=D.getNode(e.parentId);if(!n)return i.warnNodeNotFound(o,e.parentId);D.removeNodeFromMap(t),n&&n.removeChild(t)}));var a=n({},this.legacy_missingNodeRetryMap),s=[],l=function(e){var t=D.getNode(e.parentId);if(!t)return s.push(e);var n=null,r=null;if(e.previousId&&(n=D.getNode(e.previousId)),e.nextId&&(r=D.getNode(e.nextId)),null!==e.nextId&&-1!==e.nextId&&!r)return s.push(e);var o=d(e.node,i.iframe.contentDocument,D.map,!0);-1!==e.previousId&&-1!==e.nextId?(n&&n.nextSibling&&n.nextSibling.parentNode?t.insertBefore(o,n.nextSibling):r&&r.parentNode?t.contains(r)?t.insertBefore(o,r):t.insertBefore(o,null):t.appendChild(o),(e.previousId||e.nextId)&&i.legacy_resolveMissingNode(a,t,o,e)):a[e.node.id]={node:o,mutation:e}};for(o.adds.forEach((function(e){l(e)}));s.length;){if(s.every((function(e){return!Boolean(D.getNode(e.parentId))})))return s.forEach((function(e){return i.warnNodeNotFound(o,e.node.id)}));var c=s.shift();l(c)}Object.keys(a).length&&Object.assign(this.legacy_missingNodeRetryMap,a),o.texts.forEach((function(e){var t=D.getNode(e.id);if(!t)return i.warnNodeNotFound(o,e.id);t.textContent=e.value})),o.attributes.forEach((function(e){var t=D.getNode(e.id);if(!t)return i.warnNodeNotFound(o,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 y.MouseMove:if(t){var f=o.positions[o.positions.length-1];this.moveAndHover(o,f.x,f.y,f.id)}else o.positions.forEach((function(t){var n={doAction:function(){i.moveAndHover(o,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-r};i.timer.addAction(n)}));break;case y.MouseInteraction:if(-1===o.id)break;var u=new Event(b[o.type].toLowerCase());if(!(m=D.getNode(o.id)))return this.debugNodeNotFound(o,o.id);this.emitter.emit(k.MouseInteraction,{type:o.type,target:m});var h=this.config.triggerFocus;switch(o.type){case b.Blur:"blur"in m&&m.blur();break;case b.Focus:h&&m.focus&&m.focus({preventScroll:!0});break;case b.Click:case b.TouchStart:case b.TouchEnd:t||(this.moveAndHover(o,o.x,o.y,o.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:m.dispatchEvent(u)}break;case y.Scroll:if(-1===o.id)break;if(!(m=D.getNode(o.id)))return this.debugNodeNotFound(o,o.id);if(m===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:o.y,left:o.x,behavior:t?"auto":"smooth"});else try{m.scrollTop=o.y,m.scrollLeft=o.x}catch(e){}break;case y.ViewportResize:this.emitter.emit(k.Resize,{width:o.width,height:o.height});break;case y.Input:if(-1===o.id)break;if(!(m=D.getNode(o.id)))return this.debugNodeNotFound(o,o.id);try{m.checked=o.isChecked,m.value=o.text}catch(e){}break;case y.MediaInteraction:if(!(m=D.getNode(o.id)))return this.debugNodeNotFound(o,o.id);var p=m;o.type===w.Pause&&p.pause(),o.type===w.Play&&(p.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?p.play():p.addEventListener("canplay",(function(){p.play()})));break;case y.StyleSheetRule:var m;if(!(m=D.getNode(o.id)))return this.debugNodeNotFound(o,o.id);var v=m.sheet;o.adds&&o.adds.forEach((function(e){var t=e.rule,n=e.index,i=void 0===n?void 0:Math.min(n,v.rules.length);try{v.insertRule(t,i)}catch(e){}})),o.removes&&o.removes.forEach((function(e){var t=e.index;v.deleteRule(t)}))}},e.prototype.legacy_resolveMissingNode=function(e,t,n,i){var r=i.previousId,o=i.nextId,a=r&&e[r],s=o&&e[o];if(a){var l=a,c=l.node,f=l.mutation;t.insertBefore(c,n),delete e[f.node.id],delete this.legacy_missingNodeRetryMap[f.node.id],(f.previousId||f.nextId)&&this.legacy_resolveMissingNode(e,t,c,f)}if(s){var u=s;c=u.node,f=u.mutation;t.insertBefore(c,n.nextSibling),delete e[f.node.id],delete this.legacy_missingNodeRetryMap[f.node.id],(f.previousId||f.nextId)&&this.legacy_resolveMissingNode(e,t,c,f)}},e.prototype.moveAndHover=function(e,t,n,i){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px";var r=D.getNode(i);if(!r)return this.debugNodeNotFound(e,i);this.hoverElements(r)},e.prototype.hoverElements=function(e){this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")}));for(var t=e;t;)t.classList&&t.classList.add(":hover"),t=t.parentElement},e.prototype.isUserInteraction=function(e){return e.type===g.IncrementalSnapshot&&(e.data.source>y.Mutation&&e.data.source<=y.Input)},e.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var e={speed:this.noramlSpeed};this.setConfig(e),this.emitter.emit(k.SkipEnd,e),this.noramlSpeed=-1}},e.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn("[replayer]","Node with id '"+t+"' not found in",e)},e.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log("[replayer]","Node with id '"+t+"' not found in",e)},e}(),Z=v((function(e,t){e.exports=function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){if(!s&&m)return m();if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return r(t[a][1][e]||e)}),c,c.exports,e,t,n,i)}return n[a].exports}for(var o=m,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,n,i,r){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+i),r);else for(var o=0;o<i;o++)e[r+o]=t[n+o]},flattenChunks:function(e){var t,n,i,r,o,a;for(i=0,t=0,n=e.length;t<n;t++)i+=e[t].length;for(a=new Uint8Array(i),r=0,t=0,n=e.length;t<n;t++)o=e[t],a.set(o,r),r+=o.length;return a}},a={arraySet:function(e,t,n,i,r){for(var o=0;o<i;o++)e[r+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,o)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,a))},n.setTyped(i)},{}],2:[function(e,t,n){var i=e("./common"),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var a=new i.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&o||!e.subarray&&r))return String.fromCharCode.apply(null,i.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,n.string2buf=function(e){var t,n,r,o,a,s=e.length,l=0;for(o=0;o<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new i.Buf8(l),a=0,o=0;a<l;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new i.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,i,r,o,s=t||e.length,c=new Array(2*s);for(i=0,n=0;n<s;)if((r=e[n++])<128)c[i++]=r;else if((o=a[r])>4)c[i++]=65533,n+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&n<s;)r=r<<6|63&e[n++],o--;o>1?c[i++]=65533:r<65536?c[i++]=r:(r-=65536,c[i++]=55296|r>>10&1023,c[i++]=56320|1023&r)}return l(c,i)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":1}],3:[function(e,t,n){t.exports=function(e,t,n,i){for(var r=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(r=r+t[i++]|0)|0}while(--a);r%=65521,o%=65521}return r|o<<16|0}},{}],4:[function(e,t,n){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,n){var i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,r){var o=i,a=r+n;e^=-1;for(var s=r;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}},{}],6:[function(e,t,n){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],7:[function(e,t,n){t.exports=function(e,t){var n,i,r,o,a,s,l,c,f,u,d,h,p,m,v,g,y,b,w,k,_,x,E,S,N;n=e.state,i=e.next_in,S=e.input,r=i+(e.avail_in-5),o=e.next_out,N=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),l=n.dmax,c=n.wsize,f=n.whave,u=n.wnext,d=n.window,h=n.hold,p=n.bits,m=n.lencode,v=n.distcode,g=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;e:do{p<15&&(h+=S[i++]<<p,p+=8,h+=S[i++]<<p,p+=8),b=m[h&g];t:for(;;){if(h>>>=w=b>>>24,p-=w,0==(w=b>>>16&255))N[o++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=m[(65535&b)+(h&(1<<w)-1)];continue t}if(32&w){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}k=65535&b,(w&=15)&&(p<w&&(h+=S[i++]<<p,p+=8),k+=h&(1<<w)-1,h>>>=w,p-=w),p<15&&(h+=S[i++]<<p,p+=8,h+=S[i++]<<p,p+=8),b=v[h&y];n:for(;;){if(h>>>=w=b>>>24,p-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=v[(65535&b)+(h&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(_=65535&b,p<(w&=15)&&(h+=S[i++]<<p,(p+=8)<w&&(h+=S[i++]<<p,p+=8)),(_+=h&(1<<w)-1)>l){e.msg="invalid distance too far back",n.mode=30;break e}if(h>>>=w,p-=w,_>(w=o-a)){if((w=_-w)>f&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(x=0,E=d,0===u){if(x+=c-w,w<k){k-=w;do{N[o++]=d[x++]}while(--w);x=o-_,E=N}}else if(u<w){if(x+=c+u-w,(w-=u)<k){k-=w;do{N[o++]=d[x++]}while(--w);if(x=0,u<k){k-=w=u;do{N[o++]=d[x++]}while(--w);x=o-_,E=N}}}else if(x+=u-w,w<k){k-=w;do{N[o++]=d[x++]}while(--w);x=o-_,E=N}for(;k>2;)N[o++]=E[x++],N[o++]=E[x++],N[o++]=E[x++],k-=3;k&&(N[o++]=E[x++],k>1&&(N[o++]=E[x++]))}else{x=o-_;do{N[o++]=N[x++],N[o++]=N[x++],N[o++]=N[x++],k-=3}while(k>2);k&&(N[o++]=N[x++],k>1&&(N[o++]=N[x++]))}break}}break}}while(i<r&&o<s);i-=k=p>>3,h&=(1<<(p-=k<<3))-1,e.next_in=i,e.next_out=o,e.avail_in=i<r?r-i+5:5-(i-r),e.avail_out=o<s?s-o+257:257-(o-s),n.hold=h,n.bits=p}},{}],8:[function(e,t,n){var i=e("../utils/common"),r=e("./adler32"),o=e("./crc32"),a=e("./inffast"),s=e("./inftrees");function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new i.Buf32(852),t.distcode=t.distdyn=new i.Buf32(592),t.sane=1,t.back=-1,0):-2}function u(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,f(e)):-2}function d(e,t){var n,i;return e&&e.state?(i=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,u(e))):-2}function h(e,t){var n,i;return e?(i=new c,e.state=i,i.window=null,0!==(n=d(e,t))&&(e.state=null),n):-2}var p,m,v=!0;function g(e){if(v){var t;for(p=new i.Buf32(512),m=new i.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,p,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,m,0,e.work,{bits:5}),v=!1}e.lencode=p,e.lenbits=9,e.distcode=m,e.distbits=5}function y(e,t,n,r){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new i.Buf8(a.wsize)),r>=a.wsize?(i.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>r&&(o=r),i.arraySet(a.window,t,n-r,o,a.wnext),(r-=o)?(i.arraySet(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}n.inflateReset=u,n.inflateReset2=d,n.inflateResetKeep=f,n.inflateInit=function(e){return h(e,15)},n.inflateInit2=h,n.inflate=function(e,t){var n,c,f,u,d,h,p,m,v,b,w,k,_,x,E,S,N,T,A,C,I,O,R,M,F=0,D=new i.Buf8(4),B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(n=e.state).mode&&(n.mode=13),d=e.next_out,f=e.output,p=e.avail_out,u=e.next_in,c=e.input,h=e.avail_in,m=n.hold,v=n.bits,b=h,w=p,O=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;v<16;){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}if(2&n.wrap&&35615===m){n.check=0,D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0),m=0,v=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&m)){e.msg="unknown compression method",n.mode=30;break}if(v-=4,I=8+(15&(m>>>=4)),0===n.wbits)n.wbits=I;else if(I>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<I,e.adler=n.check=1,n.mode=512&m?10:12,m=0,v=0;break;case 2:for(;v<16;){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}if(n.flags=m,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=m>>8&1),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0)),m=0,v=0,n.mode=3;case 3:for(;v<32;){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}n.head&&(n.head.time=m),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,D[2]=m>>>16&255,D[3]=m>>>24&255,n.check=o(n.check,D,4,0)),m=0,v=0,n.mode=4;case 4:for(;v<16;){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}n.head&&(n.head.xflags=255&m,n.head.os=m>>8),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0)),m=0,v=0,n.mode=5;case 5:if(1024&n.flags){for(;v<16;){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}n.length=m,n.head&&(n.head.extra_len=m),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0)),m=0,v=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((k=n.length)>h&&(k=h),k&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,c,u,k,I)),512&n.flags&&(n.check=o(n.check,c,k,u)),h-=k,u+=k,n.length-=k),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===h)break e;k=0;do{I=c[u+k++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I))}while(I&&k<h);if(512&n.flags&&(n.check=o(n.check,c,k,u)),h-=k,u+=k,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===h)break e;k=0;do{I=c[u+k++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I))}while(I&&k<h);if(512&n.flags&&(n.check=o(n.check,c,k,u)),h-=k,u+=k,I)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;v<16;){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}if(m!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}m=0,v=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;v<32;){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}e.adler=n.check=l(m),m=0,v=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=d,e.avail_out=p,e.next_in=u,e.avail_in=h,n.hold=m,n.bits=v,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){m>>>=7&v,v-=7&v,n.mode=27;break}for(;v<3;){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}switch(n.last=1&m,v-=1,3&(m>>>=1)){case 0:n.mode=14;break;case 1:if(g(n),n.mode=20,6===t){m>>>=2,v-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}m>>>=2,v-=2;break;case 14:for(m>>>=7&v,v-=7&v;v<32;){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}if((65535&m)!=(m>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&m,m=0,v=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(k=n.length){if(k>h&&(k=h),k>p&&(k=p),0===k)break e;i.arraySet(f,c,u,k,d),h-=k,u+=k,p-=k,d+=k,n.length-=k;break}n.mode=12;break;case 17:for(;v<14;){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}if(n.nlen=257+(31&m),m>>>=5,v-=5,n.ndist=1+(31&m),m>>>=5,v-=5,n.ncode=4+(15&m),m>>>=4,v-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;v<3;){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}n.lens[B[n.have++]]=7&m,m>>>=3,v-=3}for(;n.have<19;)n.lens[B[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,R={bits:n.lenbits},O=s(0,n.lens,0,19,n.lencode,0,n.work,R),n.lenbits=R.bits,O){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;S=(F=n.lencode[m&(1<<n.lenbits)-1])>>>16&255,N=65535&F,!((E=F>>>24)<=v);){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}if(N<16)m>>>=E,v-=E,n.lens[n.have++]=N;else{if(16===N){for(M=E+2;v<M;){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}if(m>>>=E,v-=E,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}I=n.lens[n.have-1],k=3+(3&m),m>>>=2,v-=2}else if(17===N){for(M=E+3;v<M;){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}v-=E,I=0,k=3+(7&(m>>>=E)),m>>>=3,v-=3}else{for(M=E+7;v<M;){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}v-=E,I=0,k=11+(127&(m>>>=E)),m>>>=7,v-=7}if(n.have+k>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;k--;)n.lens[n.have++]=I}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,R={bits:n.lenbits},O=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,R),n.lenbits=R.bits,O){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,R={bits:n.distbits},O=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,R),n.distbits=R.bits,O){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(h>=6&&p>=258){e.next_out=d,e.avail_out=p,e.next_in=u,e.avail_in=h,n.hold=m,n.bits=v,a(e,w),d=e.next_out,f=e.output,p=e.avail_out,u=e.next_in,c=e.input,h=e.avail_in,m=n.hold,v=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;S=(F=n.lencode[m&(1<<n.lenbits)-1])>>>16&255,N=65535&F,!((E=F>>>24)<=v);){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}if(S&&0==(240&S)){for(T=E,A=S,C=N;S=(F=n.lencode[C+((m&(1<<T+A)-1)>>T)])>>>16&255,N=65535&F,!(T+(E=F>>>24)<=v);){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}m>>>=T,v-=T,n.back+=T}if(m>>>=E,v-=E,n.back+=E,n.length=N,0===S){n.mode=26;break}if(32&S){n.back=-1,n.mode=12;break}if(64&S){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&S,n.mode=22;case 22:if(n.extra){for(M=n.extra;v<M;){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}n.length+=m&(1<<n.extra)-1,m>>>=n.extra,v-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;S=(F=n.distcode[m&(1<<n.distbits)-1])>>>16&255,N=65535&F,!((E=F>>>24)<=v);){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}if(0==(240&S)){for(T=E,A=S,C=N;S=(F=n.distcode[C+((m&(1<<T+A)-1)>>T)])>>>16&255,N=65535&F,!(T+(E=F>>>24)<=v);){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}m>>>=T,v-=T,n.back+=T}if(m>>>=E,v-=E,n.back+=E,64&S){e.msg="invalid distance code",n.mode=30;break}n.offset=N,n.extra=15&S,n.mode=24;case 24:if(n.extra){for(M=n.extra;v<M;){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}n.offset+=m&(1<<n.extra)-1,m>>>=n.extra,v-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===p)break e;if(k=w-p,n.offset>k){if((k=n.offset-k)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}k>n.wnext?(k-=n.wnext,_=n.wsize-k):_=n.wnext-k,k>n.length&&(k=n.length),x=n.window}else x=f,_=d-n.offset,k=n.length;k>p&&(k=p),p-=k,n.length-=k;do{f[d++]=x[_++]}while(--k);0===n.length&&(n.mode=21);break;case 26:if(0===p)break e;f[d++]=n.length,p--,n.mode=21;break;case 27:if(n.wrap){for(;v<32;){if(0===h)break e;h--,m|=c[u++]<<v,v+=8}if(w-=p,e.total_out+=w,n.total+=w,w&&(e.adler=n.check=n.flags?o(n.check,f,w,d-w):r(n.check,f,w,d-w)),w=p,(n.flags?m:l(m))!==n.check){e.msg="incorrect data check",n.mode=30;break}m=0,v=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;v<32;){if(0===h)break e;h--,m+=c[u++]<<v,v+=8}if(m!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}m=0,v=0}n.mode=29;case 29:O=1;break e;case 30:O=-3;break e;case 31:return-4;case 32:default:return-2}return e.next_out=d,e.avail_out=p,e.next_in=u,e.avail_in=h,n.hold=m,n.bits=v,(n.wsize||w!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&y(e,e.output,e.next_out,w-e.avail_out),b-=e.avail_in,w-=e.avail_out,e.total_in+=b,e.total_out+=w,n.total+=w,n.wrap&&w&&(e.adler=n.check=n.flags?o(n.check,f,w,e.next_out-w):r(n.check,f,w,e.next_out-w)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0===b&&0===w||4===t)&&0===O&&(O=-5),O},n.inflateEnd=function(e){if(!e||!e.state)return-2;var t=e.state;return t.window&&(t.window=null),e.state=null,0},n.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?-2:(n.head=t,t.done=!1,0):-2},n.inflateSetDictionary=function(e,t){var n,i=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?-2:11===n.mode&&r(1,t,i,0)!==n.check?-3:y(e,t,i,i)?(n.mode=31,-4):(n.havedict=1,0):-2},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,n){var i=e("../utils/common"),r=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,l,c,f,u,d){var h,p,m,v,g,y,b,w,k,_=d.bits,x=0,E=0,S=0,N=0,T=0,A=0,C=0,I=0,O=0,R=0,M=null,F=0,D=new i.Buf16(16),B=new i.Buf16(16),L=null,z=0;for(x=0;x<=15;x++)D[x]=0;for(E=0;E<l;E++)D[t[n+E]]++;for(T=_,N=15;N>=1&&0===D[N];N--);if(T>N&&(T=N),0===N)return c[f++]=20971520,c[f++]=20971520,d.bits=1,0;for(S=1;S<N&&0===D[S];S++);for(T<S&&(T=S),I=1,x=1;x<=15;x++)if(I<<=1,(I-=D[x])<0)return-1;if(I>0&&(0===e||1!==N))return-1;for(B[1]=0,x=1;x<15;x++)B[x+1]=B[x]+D[x];for(E=0;E<l;E++)0!==t[n+E]&&(u[B[t[n+E]]++]=E);if(0===e?(M=L=u,y=19):1===e?(M=r,F-=257,L=o,z-=257,y=256):(M=a,L=s,y=-1),R=0,E=0,x=S,g=f,A=T,C=0,m=-1,v=(O=1<<T)-1,1===e&&O>852||2===e&&O>592)return 1;for(;;){b=x-C,u[E]<y?(w=0,k=u[E]):u[E]>y?(w=L[z+u[E]],k=M[F+u[E]]):(w=96,k=0),h=1<<x-C,S=p=1<<A;do{c[g+(R>>C)+(p-=h)]=b<<24|w<<16|k|0}while(0!==p);for(h=1<<x-1;R&h;)h>>=1;if(0!==h?(R&=h-1,R+=h):R=0,E++,0==--D[x]){if(x===N)break;x=t[n+u[E]]}if(x>T&&(R&v)!==m){for(0===C&&(C=T),g+=S,I=1<<(A=x-C);A+C<N&&!((I-=D[A+C])<=0);)A++,I<<=1;if(O+=1<<A,1===e&&O>852||2===e&&O>592)return 1;c[m=R&v]=T<<24|A<<16|g-f|0}}return 0!==R&&(c[g+R]=x-C<<24|64<<16|0),d.bits=T,0}},{"../utils/common":1}],10:[function(e,t,n){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/inflate.js":[function(e,t,n){var i=e("./zlib/inflate"),r=e("./utils/common"),o=e("./utils/strings"),a=e("./zlib/constants"),s=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),f=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=i.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(s[n]);if(this.header=new c,i.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===f.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=i.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(s[n])}function d(e,t){var n=new u(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}u.prototype.push=function(e,t){var n,s,l,c,u,d=this.strm,h=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?d.input=o.binstring2buf(e):"[object ArrayBuffer]"===f.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new r.Buf8(h),d.next_out=0,d.avail_out=h),(n=i.inflate(d,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&p&&(n=i.inflateSetDictionary(this.strm,p)),n===a.Z_BUF_ERROR&&!0===m&&(n=a.Z_OK,m=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&n!==a.Z_STREAM_END&&(0!==d.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(d.output,d.next_out),c=d.next_out-l,u=o.buf2string(d.output,l),d.next_out=c,d.avail_out=h-c,c&&r.arraySet(d.output,d.output,l,c,0),this.onData(u)):this.onData(r.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(m=!0)}while((d.avail_in>0||0===d.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(n=i.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),d.avail_out=0,!0)},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=u,n.inflate=d,n.inflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},n.ungzip=d},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")})).inflate;return e.Replayer=z,e.unpack=function(e){if("string"!=typeof e)return e;try{if((t=JSON.parse(e)).timestamp)return t}catch(e){}try{var t;if("v1"===(t=JSON.parse(Z(e,{to:"string"}))).v)return t;throw new Error("These events were packed with packer "+t.v+" which is incompatible with current packer v1.")}catch(e){throw console.error(e),new Error("Unknown data format.")}},e}({});
***************************************************************************** */!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(_||(_={}));var M={type:"xstate.init"};function N(e){return void 0===e?[]:[].concat(e)}function I(e){return{type:"xstate.assign",assignment:e}}function T(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function A(e){return function(t){return e===t}}function C(e){return"string"==typeof e?{type:e}:e}function O(e,t){return{value:e,context:t,actions:[],changed:!1,matches:A(e)}}var R=function(e,t){return e.actions.forEach((function(n){var i=n.exec;return i&&i(e.context,t)}))};var F={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return F.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete F.map[t],e.childNodes&&e.childNodes.forEach((function(e){return F.removeNodeFromMap(e)}))},has:function(e){return F.map.hasOwnProperty(e)}};var D=function(){function e(){this.reset()}return e.prototype.add=function(e){var t=this.indexes.get(e.parentId),n={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(n.parent=t,t.children[n.id]=n):this.tree[n.id]=n,this.indexes.set(n.id,n)},e.prototype.remove=function(e){var t=this,n=this.indexes.get(e.parentId),i=this.indexes.get(e.id),r=function(e){t.removeIdSet.add(e);var n=F.getNode(e);null==n||n.childNodes.forEach((function(e){return r(e.__sn.id)}))},o=function(n){t.removeIdSet.add(n.id),Object.values(n.children).forEach((function(e){return o(e)}));var i=t.indexes.get(n.id);if(i){var r=i.parent;r&&(delete i.parent,delete r.children[i.id],t.indexes.delete(e.id))}};i?n?(delete i.parent,delete n.children[i.id],this.indexes.delete(e.id),o(i)):(delete this.tree[i.id],this.indexes.delete(i.id),o(i)):(this.removeNodeMutations.push(e),r(e.id))},e.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},e.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},e.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},e.prototype.input=function(e){this.inputMap.set(e.id,e)},e.prototype.flush=function(){var e,t,n,r,o=this,a=this.tree,s=this.removeNodeMutations,l=this.textMutations,c=this.attributeMutations,u={source:g.Mutation,removes:s,texts:l,attributes:c,adds:[]},f=function(e,t){t&&o.removeIdSet.add(e.id),u.texts=u.texts.concat(t?[]:e.texts).filter((function(e){return!o.removeIdSet.has(e.id)})),u.attributes=u.attributes.concat(t?[]:e.attributes).filter((function(e){return!o.removeIdSet.has(e.id)})),o.removeIdSet.has(e.id)||o.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return f(e,!0)})):(u.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return f(e,!1)})))};Object.values(a).forEach((function(e){return f(e,!1)}));try{for(var d=i(this.scrollMap.keys()),h=d.next();!h.done;h=d.next()){var p=h.value;this.removeIdSet.has(p)&&this.scrollMap.delete(p)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var m=i(this.inputMap.keys()),v=m.next();!v.done;v=m.next()){p=v.value;this.removeIdSet.has(p)&&this.inputMap.delete(p)}}catch(e){n={error:e}}finally{try{v&&!v.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}var y=new Map(this.scrollMap),b=new Map(this.inputMap);return this.reset(),{mutationData:u,scrollMap:y,inputMap:b}},e.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},e}();function L(e,t){var r=t.getCastFn,o=t.emitter;return function(e){var t=e.initialState,n=_.NotStarted,i=new Set,r={_machine:e,send:function(r){n===_.Running&&(t=e.transition(t,r),R(t,C(r)),i.forEach((function(e){return e(t)})))},subscribe:function(e){return i.add(e),e(t),{unsubscribe:function(){return i.delete(e)}}},start:function(){return n=_.Running,R(t,M),r},stop:function(){return n=_.Stopped,i.clear(),r},get state(){return t},get status(){return n}};return r}(function(e,t){void 0===t&&(t={});var n={config:e,_options:t,initialState:{value:e.initial,actions:N(e.states[e.initial].entry).map((function(e){return T(e,t.actions)})),context:e.context,matches:A(e.initial)},transition:function(t,i){var r,o,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,l=a.context,c=C(i),u=e.states[s];if(u.on){var f=N(u.on[c.type]),d=function(t){if(void 0===t)return{value:O(s,l)};var i="string"==typeof t?{target:t}:t,r=i.target,o=void 0===r?s:r,a=i.actions,f=void 0===a?[]:a,d=i.cond,h=l;if((void 0===d?function(){return!0}:d)(l,c)){var p=e.states[o],m=!1,v=[].concat(u.exit,f,p.entry).filter((function(e){return e})).map((function(e){return T(e,n._options.actions)})).filter((function(e){if("xstate.assign"===e.type){m=!0;var t=Object.assign({},h);return"function"==typeof e.assignment?t=e.assignment(h,c):Object.keys(e.assignment).forEach((function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](h,c):e.assignment[n]})),h=t,!1}return!0}));return{value:{value:o,context:h,actions:v,changed:o!==s||v.length>0||m,matches:A(o)}}}};try{for(var h=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}(f),p=h.next();!p.done;p=h.next()){var m=d(p.value);if("object"==typeof m)return m.value}}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}}return O(s,l)}};return n}({id:"player",context:e,initial:"inited",states:{inited:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},TO_LIVE:{target:"live",actions:["startLive"]}}},playing:{on:{PAUSE:{target:"paused",actions:["pause"]},END:"ended",FAST_FORWARD:"skipping",CAST_EVENT:{target:"playing",actions:"castEvent"}}},paused:{on:{RESUME:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"}}},skipping:{on:{BACK_TO_NORMAL:"playing"}},ended:{on:{REPLAY:"playing"}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]}}}}},{actions:{castEvent:I({lastPlayedEvent:function(t,n){return"CAST_EVENT"===n.type?n.payload.event:e.lastPlayedEvent}}),recordTimeOffset:I((function(e,t){var i=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(i=t.payload.timeOffset),n(n({},e),{timeOffset:i,baselineTime:e.events[0].timestamp+i})})),play:function(e){var t,n,a=e.timer,s=e.events,l=e.baselineTime,c=e.lastPlayedEvent;a.clear();var u=function(e,t){for(var n=e.length-1;n>=0;n--){var i=e[n];if(i.type===y.Meta&&i.timestamp<=t)return e.slice(n)}return e}(s,l),f=new Array,d=function(e){if(c&&c.timestamp>l&&(e.timestamp<=c.timestamp||e===c))return"continue";var t=e.timestamp<l;if(t&&!function(e){switch(e.type){case y.DomContentLoaded:case y.Load:case y.Custom:return!1;case y.FullSnapshot:case y.Meta:return!0}switch(e.data.source){case g.MouseMove:case g.MouseInteraction:case g.TouchMove:case g.MediaInteraction:return!1;case g.ViewportResize:case g.StyleSheetRule:case g.Scroll:case g.Input:return!0}return!0}(e))return"continue";var n=r(e,t);t?n():f.push({doAction:function(){n(),o.emit(k.EventCast,e)},delay:E(e,l)})};try{for(var h=i(u),p=h.next();!p.done;p=h.next()){d(p.value)}}catch(e){t={error:e}}finally{try{p&&!p.done&&(n=h.return)&&n.call(h)}finally{if(t)throw t.error}}o.emit(k.Flush),a.addActions(f),a.start()},pause:function(e){e.timer.clear()},startLive:I({baselineTime:function(e,t){return e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:I((function(e,t){var i=e.baselineTime,a=e.timer,s=e.events;if("ADD_EVENT"===t.type){var l=t.payload.event;s.push(l);var c=l.timestamp<i,u=r(l,c);c?u():a.addAction({doAction:function(){u(),o.emit(k.EventCast,l)},delay:E(l,i)})}return n(n({},e),{events:s})}))}}))}var B=h||p,z={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0},Z=function(){function e(e,n){var o=this;if(this.emitter=B(),this.noramlSpeed=-1,this.legacy_missingNodeRetryMap={},!(null==n?void 0:n.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");this.config=Object.assign({},z,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on(k.Resize,this.handleResize),x(),"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),this.setupDom(),this.treeIndex=new D,this.fragmentParentMap=new Map,this.emitter.on(k.Flush,(function(){var e,n,a,s,l,c,u=o.treeIndex.flush(),f=u.scrollMap,d=u.inputMap;try{for(var h=i(f.values()),p=h.next();!p.done;p=h.next()){var m=p.value;o.applyScroll(m)}}catch(t){e={error:t}}finally{try{p&&!p.done&&(n=h.return)&&n.call(h)}finally{if(e)throw e.error}}try{for(var v=i(d.values()),y=v.next();!y.done;y=v.next()){m=y.value;o.applyInput(m)}}catch(e){a={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}try{for(var g=i(o.fragmentParentMap.entries()),b=g.next();!b.done;b=g.next()){var w=r(b.value,2),k=w[0],x=w[1];F.map[x.__sn.id]=x,x.__sn.type===t.Element&&"textarea"===x.__sn.tagName&&k.textContent&&(x.value=k.textContent),x.appendChild(k)}}catch(e){l={error:e}}finally{try{b&&!b.done&&(c=g.return)&&c.call(g)}finally{if(l)throw l.error}}o.fragmentParentMap.clear()})),this.service=L({events:e.map((function(e){return n&&n.unpackFn?n.unpackFn(e):e})),timer:new S(this.config),speed:(null==n?void 0:n.speed)||z.speed,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){e.changed}));var a=this.service.state.context.events,s=a.find((function(e){return e.type===y.Meta})),l=a.find((function(e){return e.type===y.FullSnapshot}));if(s){var c=s.data,u=c.width,f=c.height;this.emitter.emit(k.Resize,{width:u,height:f})}l&&this.rebuildFullSnapshot(l)}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),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.service.state.context.events,t=e[0],n=e[e.length-1];return{startTime:t.timestamp,endTime:n.timestamp,totalTime:n.timestamp-t.timestamp}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},e.prototype.play=function(e){void 0===e&&(e=0),"ended"===this.service.state.value&&this.service.send({type:"REPLAY"}),"paused"===this.service.state.value?this.service.send({type:"RESUME",payload:{timeOffset:e}}):this.service.send({type:"PLAY",payload:{timeOffset:e}}),this.emitter.emit(k.Start)},e.prototype.pause=function(){this.service.send({type:"PAUSE"}),this.emitter.emit(k.Pause)},e.prototype.resume=function(e){void 0===e&&(e=0),this.service.send({type:"RESUME",payload:{timeOffset:e}}),this.emitter.emit(k.Resume)},e.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},e.prototype.addEvent=function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))},e.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},e.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.disableInteract(),this.wrapper.appendChild(this.iframe)},e.prototype.handleResize=function(e){this.iframe.setAttribute("width",String(e.width)),this.iframe.setAttribute("height",String(e.height))},e.prototype.getCastFn=function(e,t){var n=this;void 0===t&&(t=!1);var r,o=this.service.state.context.events;switch(e.type){case y.DomContentLoaded:case y.Load:break;case y.Custom:r=function(){n.emitter.emit(k.CustomEvent,e)};break;case y.Meta:r=function(){return n.emitter.emit(k.Resize,{width:e.data.width,height:e.data.height})};break;case y.FullSnapshot:r=function(){n.rebuildFullSnapshot(e),n.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case y.IncrementalSnapshot:r=function(){var r,a;if(n.applyIncremental(e,t),e===n.nextUserInteractionEvent&&(n.nextUserInteractionEvent=null,n.restoreSpeed()),n.config.skipInactive&&!n.nextUserInteractionEvent){try{for(var s=i(o),l=s.next();!l.done;l=s.next()){var c=l.value;if(!(c.timestamp<=e.timestamp)&&n.isUserInteraction(c)){c.delay-e.delay>1e4*n.config.speed&&(n.nextUserInteractionEvent=c);break}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(r)throw r.error}}if(n.nextUserInteractionEvent){n.noramlSpeed=n.config.speed;var u=n.nextUserInteractionEvent.delay-e.delay,f={speed:Math.min(Math.round(u/5e3),360)};n.setConfig(f),n.emitter.emit(k.SkipStart,f)}}}}return function(){r&&r(),n.service.send({type:"CAST_EVENT",payload:{event:e}}),e===o[o.length-1]&&(n.restoreSpeed(),n.service.send("END"),n.emitter.emit(k.Finish))}},e.prototype.rebuildFullSnapshot=function(e){if(!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={},F.map=function(e,t,n){void 0===n&&(n=!0);var i={};return[d(e,t,i,!1,n),i]}(e.data.node,this.iframe.contentDocument)[1];var t=document.createElement("style"),n=this.iframe.contentDocument,i=n.documentElement,r=n.head;i.insertBefore(t,r);for(var o,a=(o=this.config.blockClass,["iframe, ."+o+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules),s=0;s<a.length;s++)t.sheet.insertRule(a[s],s);this.emitter.emit(k.FullsnapshotRebuilded,e),this.waitForStylesheetLoad()},e.prototype.waitForStylesheetLoad=function(){var e,t=this,n=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(n){var i,r=new Set,o=this.service.state;n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(r.add(e),e.addEventListener("load",(function(){r.delete(e),0===r.size&&-1!==i&&(o.matches("playing")&&t.resume(t.getCurrentTime()),t.emitter.emit(k.LoadStylesheetEnd),i&&window.clearTimeout(i))})))})),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(k.LoadStylesheetStart),i=window.setTimeout((function(){o.matches("playing")&&t.resume(t.getCurrentTime()),i=-1}),this.config.loadTimeout))}},e.prototype.applyIncremental=function(e,t){var n=this,i=this.service.state.context.baselineTime,r=e.data;switch(r.source){case g.Mutation:t&&(r.adds.forEach((function(e){return n.treeIndex.add(e)})),r.texts.forEach((function(e){return n.treeIndex.text(e)})),r.attributes.forEach((function(e){return n.treeIndex.attribute(e)})),r.removes.forEach((function(e){return n.treeIndex.remove(e)}))),this.applyMutation(r,!0);break;case g.MouseMove:if(t){var o=r.positions[r.positions.length-1];this.moveAndHover(r,o.x,o.y,o.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-i};n.timer.addAction(o)}));break;case g.MouseInteraction:if(-1===r.id)break;var a=new Event(b[r.type].toLowerCase());if(!(c=F.getNode(r.id)))return this.debugNodeNotFound(r,r.id);this.emitter.emit(k.MouseInteraction,{type:r.type,target:c});var s=this.config.triggerFocus;switch(r.type){case b.Blur:"blur"in c&&c.blur();break;case b.Focus:s&&c.focus&&c.focus({preventScroll:!0});break;case b.Click:case b.TouchStart:case b.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:c.dispatchEvent(a)}break;case g.Scroll:if(-1===r.id)break;if(t){this.treeIndex.scroll(r);break}this.applyScroll(r);break;case g.ViewportResize:this.emitter.emit(k.Resize,{width:r.width,height:r.height});break;case g.Input:if(-1===r.id)break;if(t){this.treeIndex.input(r);break}this.applyInput(r);break;case g.MediaInteraction:if(!(c=F.getNode(r.id)))return this.debugNodeNotFound(r,r.id);var l=c;r.type===w.Pause&&l.pause(),r.type===w.Play&&(l.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?l.play():l.addEventListener("canplay",(function(){l.play()})));break;case g.StyleSheetRule:var c;if(!(c=F.getNode(r.id)))return this.debugNodeNotFound(r,r.id);var u=c.sheet;r.adds&&r.adds.forEach((function(e){var t=e.rule,n=e.index,i=void 0===n?void 0:Math.min(n,u.rules.length);try{u.insertRule(t,i)}catch(e){}})),r.removes&&r.removes.forEach((function(e){var t=e.index;u.deleteRule(t)}))}},e.prototype.applyMutation=function(e,t){var i=this;e.removes.forEach((function(t){var n=F.getNode(t.id);if(!n)return i.warnNodeNotFound(e,t.id);var r=F.getNode(t.parentId);if(!r)return i.warnNodeNotFound(e,t.parentId);if(F.removeNodeFromMap(n),r){var o=i.fragmentParentMap.get(r);o&&o.contains(n)?o.removeChild(n):r.removeChild(n)}}));var r=n({},this.legacy_missingNodeRetryMap),o=[],a=function(e){if(!i.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var n=F.getNode(e.parentId);if(!n)return o.push(e);var a=i.iframe.contentDocument.contains(n);if(t&&a){var s=document.createDocumentFragment();for(F.map[e.parentId]=s,i.fragmentParentMap.set(s,n);n.firstChild;)s.appendChild(n.firstChild);n=s}var l=null,c=null;if(e.previousId&&(l=F.getNode(e.previousId)),e.nextId&&(c=F.getNode(e.nextId)),null!==e.nextId&&-1!==e.nextId&&!c)return o.push(e);var u=d(e.node,i.iframe.contentDocument,F.map,!0);-1!==e.previousId&&-1!==e.nextId?(l&&l.nextSibling&&l.nextSibling.parentNode?n.insertBefore(u,l.nextSibling):c&&c.parentNode?n.contains(c)?n.insertBefore(u,c):n.insertBefore(u,null):n.appendChild(u),(e.previousId||e.nextId)&&i.legacy_resolveMissingNode(r,n,u,e)):r[e.node.id]={node:u,mutation:e}};for(e.adds.forEach((function(e){a(e)}));o.length;){if(o.every((function(e){return!Boolean(F.getNode(e.parentId))})))return o.forEach((function(t){return i.warnNodeNotFound(e,t.node.id)}));var s=o.shift();a(s)}Object.keys(r).length&&Object.assign(this.legacy_missingNodeRetryMap,r),e.texts.forEach((function(t){var n=F.getNode(t.id);if(!n)return i.warnNodeNotFound(e,t.id);i.fragmentParentMap.has(n)&&(n=i.fragmentParentMap.get(n)),n.textContent=t.value})),e.attributes.forEach((function(t){var n=F.getNode(t.id);if(!n)return i.warnNodeNotFound(e,t.id);for(var r in i.fragmentParentMap.has(n)&&(n=i.fragmentParentMap.get(n)),t.attributes)if("string"==typeof r){var o=t.attributes[r];null!==o?n.setAttribute(r,o):n.removeAttribute(r)}}))},e.prototype.applyScroll=function(e){var t=F.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);if(t===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:e.y,left:e.x,behavior:"smooth"});else try{t.scrollTop=e.y,t.scrollLeft=e.x}catch(e){}},e.prototype.applyInput=function(e){var t=F.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}},e.prototype.legacy_resolveMissingNode=function(e,t,n,i){var r=i.previousId,o=i.nextId,a=r&&e[r],s=o&&e[o];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,n),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}if(s){var f=s;c=f.node,u=f.mutation;t.insertBefore(c,n.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}},e.prototype.moveAndHover=function(e,t,n,i){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px";var r=F.getNode(i);if(!r)return this.debugNodeNotFound(e,i);this.hoverElements(r)},e.prototype.hoverElements=function(e){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")}));for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement},e.prototype.isUserInteraction=function(e){return e.type===y.IncrementalSnapshot&&(e.data.source>g.Mutation&&e.data.source<=g.Input)},e.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var e={speed:this.noramlSpeed};this.setConfig(e),this.emitter.emit(k.SkipEnd,e),this.noramlSpeed=-1}},e.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn("[replayer]","Node with id '"+t+"' not found in",e)},e.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log("[replayer]","Node with id '"+t+"' not found in",e)},e}(),P=v((function(e,t){e.exports=function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){if(!s&&m)return m();if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return r(t[a][1][e]||e)}),c,c.exports,e,t,n,i)}return n[a].exports}for(var o=m,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,n,i,r){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+i),r);else for(var o=0;o<i;o++)e[r+o]=t[n+o]},flattenChunks:function(e){var t,n,i,r,o,a;for(i=0,t=0,n=e.length;t<n;t++)i+=e[t].length;for(a=new Uint8Array(i),r=0,t=0,n=e.length;t<n;t++)o=e[t],a.set(o,r),r+=o.length;return a}},a={arraySet:function(e,t,n,i,r){for(var o=0;o<i;o++)e[r+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,o)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,a))},n.setTyped(i)},{}],2:[function(e,t,n){var i=e("./common"),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var a=new i.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&o||!e.subarray&&r))return String.fromCharCode.apply(null,i.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,n.string2buf=function(e){var t,n,r,o,a,s=e.length,l=0;for(o=0;o<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new i.Buf8(l),a=0,o=0;a<l;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new i.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,i,r,o,s=t||e.length,c=new Array(2*s);for(i=0,n=0;n<s;)if((r=e[n++])<128)c[i++]=r;else if((o=a[r])>4)c[i++]=65533,n+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&n<s;)r=r<<6|63&e[n++],o--;o>1?c[i++]=65533:r<65536?c[i++]=r:(r-=65536,c[i++]=55296|r>>10&1023,c[i++]=56320|1023&r)}return l(c,i)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":1}],3:[function(e,t,n){t.exports=function(e,t,n,i){for(var r=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(r=r+t[i++]|0)|0}while(--a);r%=65521,o%=65521}return r|o<<16|0}},{}],4:[function(e,t,n){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,n){var i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,r){var o=i,a=r+n;e^=-1;for(var s=r;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}},{}],6:[function(e,t,n){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],7:[function(e,t,n){t.exports=function(e,t){var n,i,r,o,a,s,l,c,u,f,d,h,p,m,v,y,g,b,w,k,x,_,S,E,M;n=e.state,i=e.next_in,E=e.input,r=i+(e.avail_in-5),o=e.next_out,M=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),l=n.dmax,c=n.wsize,u=n.whave,f=n.wnext,d=n.window,h=n.hold,p=n.bits,m=n.lencode,v=n.distcode,y=(1<<n.lenbits)-1,g=(1<<n.distbits)-1;e:do{p<15&&(h+=E[i++]<<p,p+=8,h+=E[i++]<<p,p+=8),b=m[h&y];t:for(;;){if(h>>>=w=b>>>24,p-=w,0==(w=b>>>16&255))M[o++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=m[(65535&b)+(h&(1<<w)-1)];continue t}if(32&w){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}k=65535&b,(w&=15)&&(p<w&&(h+=E[i++]<<p,p+=8),k+=h&(1<<w)-1,h>>>=w,p-=w),p<15&&(h+=E[i++]<<p,p+=8,h+=E[i++]<<p,p+=8),b=v[h&g];n:for(;;){if(h>>>=w=b>>>24,p-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=v[(65535&b)+(h&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(x=65535&b,p<(w&=15)&&(h+=E[i++]<<p,(p+=8)<w&&(h+=E[i++]<<p,p+=8)),(x+=h&(1<<w)-1)>l){e.msg="invalid distance too far back",n.mode=30;break e}if(h>>>=w,p-=w,x>(w=o-a)){if((w=x-w)>u&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(_=0,S=d,0===f){if(_+=c-w,w<k){k-=w;do{M[o++]=d[_++]}while(--w);_=o-x,S=M}}else if(f<w){if(_+=c+f-w,(w-=f)<k){k-=w;do{M[o++]=d[_++]}while(--w);if(_=0,f<k){k-=w=f;do{M[o++]=d[_++]}while(--w);_=o-x,S=M}}}else if(_+=f-w,w<k){k-=w;do{M[o++]=d[_++]}while(--w);_=o-x,S=M}for(;k>2;)M[o++]=S[_++],M[o++]=S[_++],M[o++]=S[_++],k-=3;k&&(M[o++]=S[_++],k>1&&(M[o++]=S[_++]))}else{_=o-x;do{M[o++]=M[_++],M[o++]=M[_++],M[o++]=M[_++],k-=3}while(k>2);k&&(M[o++]=M[_++],k>1&&(M[o++]=M[_++]))}break}}break}}while(i<r&&o<s);i-=k=p>>3,h&=(1<<(p-=k<<3))-1,e.next_in=i,e.next_out=o,e.avail_in=i<r?r-i+5:5-(i-r),e.avail_out=o<s?s-o+257:257-(o-s),n.hold=h,n.bits=p}},{}],8:[function(e,t,n){var i=e("../utils/common"),r=e("./adler32"),o=e("./crc32"),a=e("./inffast"),s=e("./inftrees");function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function u(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new i.Buf32(852),t.distcode=t.distdyn=new i.Buf32(592),t.sane=1,t.back=-1,0):-2}function f(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,u(e)):-2}function d(e,t){var n,i;return e&&e.state?(i=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,f(e))):-2}function h(e,t){var n,i;return e?(i=new c,e.state=i,i.window=null,0!==(n=d(e,t))&&(e.state=null),n):-2}var p,m,v=!0;function y(e){if(v){var t;for(p=new i.Buf32(512),m=new i.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,p,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,m,0,e.work,{bits:5}),v=!1}e.lencode=p,e.lenbits=9,e.distcode=m,e.distbits=5}function g(e,t,n,r){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new i.Buf8(a.wsize)),r>=a.wsize?(i.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>r&&(o=r),i.arraySet(a.window,t,n-r,o,a.wnext),(r-=o)?(i.arraySet(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}n.inflateReset=f,n.inflateReset2=d,n.inflateResetKeep=u,n.inflateInit=function(e){return h(e,15)},n.inflateInit2=h,n.inflate=function(e,t){var n,c,u,f,d,h,p,m,v,b,w,k,x,_,S,E,M,N,I,T,A,C,O,R,F=0,D=new i.Buf8(4),L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(n=e.state).mode&&(n.mode=13),d=e.next_out,u=e.output,p=e.avail_out,f=e.next_in,c=e.input,h=e.avail_in,m=n.hold,v=n.bits,b=h,w=p,C=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;v<16;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(2&n.wrap&&35615===m){n.check=0,D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0),m=0,v=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&m)){e.msg="unknown compression method",n.mode=30;break}if(v-=4,A=8+(15&(m>>>=4)),0===n.wbits)n.wbits=A;else if(A>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<A,e.adler=n.check=1,n.mode=512&m?10:12,m=0,v=0;break;case 2:for(;v<16;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(n.flags=m,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=m>>8&1),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0)),m=0,v=0,n.mode=3;case 3:for(;v<32;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}n.head&&(n.head.time=m),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,D[2]=m>>>16&255,D[3]=m>>>24&255,n.check=o(n.check,D,4,0)),m=0,v=0,n.mode=4;case 4:for(;v<16;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}n.head&&(n.head.xflags=255&m,n.head.os=m>>8),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0)),m=0,v=0,n.mode=5;case 5:if(1024&n.flags){for(;v<16;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}n.length=m,n.head&&(n.head.extra_len=m),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0)),m=0,v=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((k=n.length)>h&&(k=h),k&&(n.head&&(A=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,c,f,k,A)),512&n.flags&&(n.check=o(n.check,c,k,f)),h-=k,f+=k,n.length-=k),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===h)break e;k=0;do{A=c[f+k++],n.head&&A&&n.length<65536&&(n.head.name+=String.fromCharCode(A))}while(A&&k<h);if(512&n.flags&&(n.check=o(n.check,c,k,f)),h-=k,f+=k,A)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===h)break e;k=0;do{A=c[f+k++],n.head&&A&&n.length<65536&&(n.head.comment+=String.fromCharCode(A))}while(A&&k<h);if(512&n.flags&&(n.check=o(n.check,c,k,f)),h-=k,f+=k,A)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;v<16;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(m!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}m=0,v=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;v<32;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}e.adler=n.check=l(m),m=0,v=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=d,e.avail_out=p,e.next_in=f,e.avail_in=h,n.hold=m,n.bits=v,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){m>>>=7&v,v-=7&v,n.mode=27;break}for(;v<3;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}switch(n.last=1&m,v-=1,3&(m>>>=1)){case 0:n.mode=14;break;case 1:if(y(n),n.mode=20,6===t){m>>>=2,v-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}m>>>=2,v-=2;break;case 14:for(m>>>=7&v,v-=7&v;v<32;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if((65535&m)!=(m>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&m,m=0,v=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(k=n.length){if(k>h&&(k=h),k>p&&(k=p),0===k)break e;i.arraySet(u,c,f,k,d),h-=k,f+=k,p-=k,d+=k,n.length-=k;break}n.mode=12;break;case 17:for(;v<14;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(n.nlen=257+(31&m),m>>>=5,v-=5,n.ndist=1+(31&m),m>>>=5,v-=5,n.ncode=4+(15&m),m>>>=4,v-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;v<3;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}n.lens[L[n.have++]]=7&m,m>>>=3,v-=3}for(;n.have<19;)n.lens[L[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,O={bits:n.lenbits},C=s(0,n.lens,0,19,n.lencode,0,n.work,O),n.lenbits=O.bits,C){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;E=(F=n.lencode[m&(1<<n.lenbits)-1])>>>16&255,M=65535&F,!((S=F>>>24)<=v);){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(M<16)m>>>=S,v-=S,n.lens[n.have++]=M;else{if(16===M){for(R=S+2;v<R;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(m>>>=S,v-=S,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}A=n.lens[n.have-1],k=3+(3&m),m>>>=2,v-=2}else if(17===M){for(R=S+3;v<R;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}v-=S,A=0,k=3+(7&(m>>>=S)),m>>>=3,v-=3}else{for(R=S+7;v<R;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}v-=S,A=0,k=11+(127&(m>>>=S)),m>>>=7,v-=7}if(n.have+k>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;k--;)n.lens[n.have++]=A}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,O={bits:n.lenbits},C=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,O),n.lenbits=O.bits,C){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,O={bits:n.distbits},C=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,O),n.distbits=O.bits,C){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(h>=6&&p>=258){e.next_out=d,e.avail_out=p,e.next_in=f,e.avail_in=h,n.hold=m,n.bits=v,a(e,w),d=e.next_out,u=e.output,p=e.avail_out,f=e.next_in,c=e.input,h=e.avail_in,m=n.hold,v=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;E=(F=n.lencode[m&(1<<n.lenbits)-1])>>>16&255,M=65535&F,!((S=F>>>24)<=v);){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(E&&0==(240&E)){for(N=S,I=E,T=M;E=(F=n.lencode[T+((m&(1<<N+I)-1)>>N)])>>>16&255,M=65535&F,!(N+(S=F>>>24)<=v);){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}m>>>=N,v-=N,n.back+=N}if(m>>>=S,v-=S,n.back+=S,n.length=M,0===E){n.mode=26;break}if(32&E){n.back=-1,n.mode=12;break}if(64&E){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&E,n.mode=22;case 22:if(n.extra){for(R=n.extra;v<R;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}n.length+=m&(1<<n.extra)-1,m>>>=n.extra,v-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;E=(F=n.distcode[m&(1<<n.distbits)-1])>>>16&255,M=65535&F,!((S=F>>>24)<=v);){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(0==(240&E)){for(N=S,I=E,T=M;E=(F=n.distcode[T+((m&(1<<N+I)-1)>>N)])>>>16&255,M=65535&F,!(N+(S=F>>>24)<=v);){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}m>>>=N,v-=N,n.back+=N}if(m>>>=S,v-=S,n.back+=S,64&E){e.msg="invalid distance code",n.mode=30;break}n.offset=M,n.extra=15&E,n.mode=24;case 24:if(n.extra){for(R=n.extra;v<R;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}n.offset+=m&(1<<n.extra)-1,m>>>=n.extra,v-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===p)break e;if(k=w-p,n.offset>k){if((k=n.offset-k)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}k>n.wnext?(k-=n.wnext,x=n.wsize-k):x=n.wnext-k,k>n.length&&(k=n.length),_=n.window}else _=u,x=d-n.offset,k=n.length;k>p&&(k=p),p-=k,n.length-=k;do{u[d++]=_[x++]}while(--k);0===n.length&&(n.mode=21);break;case 26:if(0===p)break e;u[d++]=n.length,p--,n.mode=21;break;case 27:if(n.wrap){for(;v<32;){if(0===h)break e;h--,m|=c[f++]<<v,v+=8}if(w-=p,e.total_out+=w,n.total+=w,w&&(e.adler=n.check=n.flags?o(n.check,u,w,d-w):r(n.check,u,w,d-w)),w=p,(n.flags?m:l(m))!==n.check){e.msg="incorrect data check",n.mode=30;break}m=0,v=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;v<32;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(m!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}m=0,v=0}n.mode=29;case 29:C=1;break e;case 30:C=-3;break e;case 31:return-4;case 32:default:return-2}return e.next_out=d,e.avail_out=p,e.next_in=f,e.avail_in=h,n.hold=m,n.bits=v,(n.wsize||w!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&g(e,e.output,e.next_out,w-e.avail_out),b-=e.avail_in,w-=e.avail_out,e.total_in+=b,e.total_out+=w,n.total+=w,n.wrap&&w&&(e.adler=n.check=n.flags?o(n.check,u,w,e.next_out-w):r(n.check,u,w,e.next_out-w)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0===b&&0===w||4===t)&&0===C&&(C=-5),C},n.inflateEnd=function(e){if(!e||!e.state)return-2;var t=e.state;return t.window&&(t.window=null),e.state=null,0},n.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?-2:(n.head=t,t.done=!1,0):-2},n.inflateSetDictionary=function(e,t){var n,i=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?-2:11===n.mode&&r(1,t,i,0)!==n.check?-3:g(e,t,i,i)?(n.mode=31,-4):(n.havedict=1,0):-2},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,n){var i=e("../utils/common"),r=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,l,c,u,f,d){var h,p,m,v,y,g,b,w,k,x=d.bits,_=0,S=0,E=0,M=0,N=0,I=0,T=0,A=0,C=0,O=0,R=null,F=0,D=new i.Buf16(16),L=new i.Buf16(16),B=null,z=0;for(_=0;_<=15;_++)D[_]=0;for(S=0;S<l;S++)D[t[n+S]]++;for(N=x,M=15;M>=1&&0===D[M];M--);if(N>M&&(N=M),0===M)return c[u++]=20971520,c[u++]=20971520,d.bits=1,0;for(E=1;E<M&&0===D[E];E++);for(N<E&&(N=E),A=1,_=1;_<=15;_++)if(A<<=1,(A-=D[_])<0)return-1;if(A>0&&(0===e||1!==M))return-1;for(L[1]=0,_=1;_<15;_++)L[_+1]=L[_]+D[_];for(S=0;S<l;S++)0!==t[n+S]&&(f[L[t[n+S]]++]=S);if(0===e?(R=B=f,g=19):1===e?(R=r,F-=257,B=o,z-=257,g=256):(R=a,B=s,g=-1),O=0,S=0,_=E,y=u,I=N,T=0,m=-1,v=(C=1<<N)-1,1===e&&C>852||2===e&&C>592)return 1;for(;;){b=_-T,f[S]<g?(w=0,k=f[S]):f[S]>g?(w=B[z+f[S]],k=R[F+f[S]]):(w=96,k=0),h=1<<_-T,E=p=1<<I;do{c[y+(O>>T)+(p-=h)]=b<<24|w<<16|k|0}while(0!==p);for(h=1<<_-1;O&h;)h>>=1;if(0!==h?(O&=h-1,O+=h):O=0,S++,0==--D[_]){if(_===M)break;_=t[n+f[S]]}if(_>N&&(O&v)!==m){for(0===T&&(T=N),y+=E,A=1<<(I=_-T);I+T<M&&!((A-=D[I+T])<=0);)I++,A<<=1;if(C+=1<<I,1===e&&C>852||2===e&&C>592)return 1;c[m=O&v]=N<<24|I<<16|y-u|0}}return 0!==O&&(c[y+O]=_-T<<24|64<<16|0),d.bits=N,0}},{"../utils/common":1}],10:[function(e,t,n){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/inflate.js":[function(e,t,n){var i=e("./zlib/inflate"),r=e("./utils/common"),o=e("./utils/strings"),a=e("./zlib/constants"),s=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),u=Object.prototype.toString;function f(e){if(!(this instanceof f))return new f(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=i.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(s[n]);if(this.header=new c,i.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=i.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(s[n])}function d(e,t){var n=new f(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}f.prototype.push=function(e,t){var n,s,l,c,f,d=this.strm,h=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?d.input=o.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new r.Buf8(h),d.next_out=0,d.avail_out=h),(n=i.inflate(d,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&p&&(n=i.inflateSetDictionary(this.strm,p)),n===a.Z_BUF_ERROR&&!0===m&&(n=a.Z_OK,m=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&n!==a.Z_STREAM_END&&(0!==d.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(d.output,d.next_out),c=d.next_out-l,f=o.buf2string(d.output,l),d.next_out=c,d.avail_out=h-c,c&&r.arraySet(d.output,d.output,l,c,0),this.onData(f)):this.onData(r.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(m=!0)}while((d.avail_in>0||0===d.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(n=i.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),d.avail_out=0,!0)},f.prototype.onData=function(e){this.chunks.push(e)},f.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=f,n.inflate=d,n.inflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},n.ungzip=d},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")})).inflate;return e.Replayer=Z,e.unpack=function(e){if("string"!=typeof e)return e;try{if((t=JSON.parse(e)).timestamp)return t}catch(e){}try{var t;if("v1"===(t=JSON.parse(P(e,{to:"string"}))).v)return t;throw new Error("These events were packed with packer "+t.v+" which is incompatible with current packer v1.")}catch(e){throw console.error(e),new Error("Unknown data format.")}},e}({});
//# sourceMappingURL=rrweb-replay-unpack.min.js.map

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

and limitations under the License.
***************************************************************************** */var t,n=function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function r(e){var t="function"==typeof Symbol&&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 i(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}!function(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 o=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function a(e,t){void 0===t&&(t={});var n=1,r=1;function i(e){var t=e.match(/\n/g);t&&(n+=t.length);var i=e.lastIndexOf("\n");r=-1===i?r+e.length:e.length-i}function a(){var e={line:n,column:r};return function(t){return t.position=new c(e),m(),t}}var c=function(e){this.start=e,this.end={line:n,column:r},this.source=t.source};c.prototype.content=e;var l=[];function u(i){var o=new Error(t.source+":"+n+":"+r+": "+i);if(o.reason=i,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o;l.push(o)}function f(){return h(/^{\s*/)}function d(){return h(/^}/)}function p(){var t,n=[];for(m(),v(n);e.length&&"}"!==e.charAt(0)&&(t=M()||C());)!1!==t&&(n.push(t),v(n));return n}function h(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function m(){h(/^\s*/)}function v(e){var t;for(void 0===e&&(e=[]);t=y();)!1!==t&&e.push(t),t=y();return e}function y(){var t=a();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return u("End of comment missing");var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:"comment",comment:o})}}function g(){var e=h(/^([^{]+)/);if(e)return s(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=a(),t=h(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=s(t[0]);if(!h(/^:\s*/))return u("property missing ':'");var r=h(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:n.replace(o,""),value:r?s(r[0]).replace(o,""):""});return h(/^[;\s]*/),i}}function E(){var e,t=[];if(!f())return u("missing '{'");for(v(t);e=b();)!1!==e&&(t.push(e),v(t)),e=b();return d()?t:u("missing '}'")}function S(){for(var e,t=[],n=a();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 w,x=A("import"),T=A("charset"),N=A("namespace");function A(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=a(),r=h(t);if(r){var i={type:e};return i[e]=r[1].trim(),n(i)}}}function M(){if("@"===e[0])return function(){var e=a(),t=h(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=h(/^([-\w]+)\s*/)))return u("@keyframes missing name");var r,i=t[1];if(!f())return u("@keyframes missing '{'");for(var o=v();r=S();)o.push(r),o=o.concat(v());return d()?e({type:"keyframes",name:i,vendor:n,keyframes:o}):u("@keyframes missing '}'")}}()||function(){var e=a(),t=h(/^@media *([^{]+)/);if(t){var n=s(t[1]);if(!f())return u("@media missing '{'");var r=v().concat(p());return d()?e({type:"media",media:n,rules:r}):u("@media missing '}'")}}()||function(){var e=a(),t=h(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:s(t[1]),media:s(t[2])})}()||function(){var e=a(),t=h(/^@supports *([^{]+)/);if(t){var n=s(t[1]);if(!f())return u("@supports missing '{'");var r=v().concat(p());return d()?e({type:"supports",supports:n,rules:r}):u("@supports missing '}'")}}()||x()||T()||N()||function(){var e=a(),t=h(/^@([-\w]+)?document *([^{]+)/);if(t){var n=s(t[1]),r=s(t[2]);if(!f())return u("@document missing '{'");var i=v().concat(p());return d()?e({type:"document",document:r,vendor:n,rules:i}):u("@document missing '}'")}}()||function(){var e=a();if(h(/^@page */)){var t=g()||[];if(!f())return u("@page missing '{'");for(var n,r=v();n=b();)r.push(n),r=r.concat(v());return d()?e({type:"page",selectors:t,declarations:r}):u("@page missing '}'")}}()||function(){var e=a();if(h(/^@host\s*/)){if(!f())return u("@host missing '{'");var t=v().concat(p());return d()?e({type:"host",rules:t}):u("@host missing '}'")}}()||function(){var e=a();if(h(/^@font-face\s*/)){if(!f())return u("@font-face missing '{'");for(var t,n=v();t=b();)n.push(t),n=n.concat(v());return d()?e({type:"font-face",declarations:n}):u("@font-face missing '}'")}}()}function C(){var e=a(),t=g();return t?(v(),e({type:"rule",selectors:t,declarations:E()})):u("selector missing")}return function e(t,n){for(var r=t&&"string"==typeof t.type,i=r?t:n,o=0,a=Object.keys(t);o<a.length;o++){var s=a[o],c=t[s];Array.isArray(c)?c.forEach((function(t){e(t,i)})):c&&"object"==typeof c&&e(c,i)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((w=p(),{type:"stylesheet",stylesheet:{source:t.source,rules:w,parsingErrors:l}}))}function s(e){return e?e.replace(/^\s+|\s+$/g,""):""}var c={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 l=/([^\\]):hover/g;function u(e){var t=a(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach((function(t){"selectors"in t&&(t.selectors||[]).forEach((function(t){if(l.test(t)){var n=t.replace(l,"$1.\\:hover");e=e.replace(t,t+", "+n)}}))})),e):e}function f(e,n,r){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 i,o=function(e){var t=c[e.tagName]?c[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);i=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",o):n.createElement(o);var a=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var a=e.attributes[t];if(a="boolean"==typeof a?"":a,t.startsWith("rr_")){if("canvas"===o&&"rr_dataURL"===t){var s=document.createElement("img");s.src=a,s.onload=function(){var e=i.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(i.style.width=a),"rr_height"===t&&(i.style.height=a),"rr_mediaState"===t)switch(a){case"played":i.play();case"paused":i.pause()}}else{var c="textarea"===o&&"value"===t,l="style"===o&&"_cssText"===t;if(l&&r&&(a=u(a)),c||l){for(var f=n.createTextNode(a),d=0,p=Array.from(i.childNodes);d<p.length;d++){var h=p[d];h.nodeType===i.TEXT_NODE&&i.removeChild(h)}return i.appendChild(f),"continue"}if("iframe"===o&&"src"===t)return"continue";try{e.isSVG&&"xlink:href"===t?i.setAttributeNS("http://www.w3.org/1999/xlink",t,a):"onload"==t||"onclick"==t||"onmouse"==t.substring(0,7)?i.setAttribute("_"+t,a):i.setAttribute(t,a)}catch(e){}}};for(var s in e.attributes)a(s);return i;case t.Text:return n.createTextNode(e.isStyle&&r?u(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function d(e,n,r,i,o){void 0===i&&(i=!1),void 0===o&&(o=!0);var a=f(e,n,o);if(!a)return null;if(e.type===t.Document&&(n.close(),n.open(),a=n),a.__sn=e,r[e.id]=a,(e.type===t.Document||e.type===t.Element)&&!i)for(var s=0,c=e.childNodes;s<c.length;s++){var l=c[s],u=d(l,n,r,!1,o);u?a.appendChild(u):console.warn("Failed to rebuild",l)}return a}function p(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 h=Object.freeze({__proto__:null,default:p});var m,v,y,g,b,E=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){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,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||s,scrollIntoView:r.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(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]&&(c(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!==c(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!==c(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!==c(arguments[0])){var n=d(this),r=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(h.call(this,n,n.scrollLeft+o.left-r.left,n.scrollTop+o.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function c(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 l(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function u(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function f(e){var t=l(e,"Y")&&u(e,"Y"),n=l(e,"X")&&u(e,"X");return t||n}function d(e){for(;e!==t.body&&!1===f(e);)e=e.parentNode||e.host;return e}function p(t){var n,r,i,a,s=(o()-t.startTime)/468;a=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*a)),r=t.startX+(t.x-t.startX)*n,i=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,i),r===t.x&&i===t.y||e.requestAnimationFrame(p.bind(e,t))}function h(n,r,a){var c,l,u,f,d=o();n===t.body?(c=e,l=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,f=i.scroll):(c=n,l=n.scrollLeft,u=n.scrollTop,f=s),p({scrollable:c,method:f,startTime:d,startX:l,startY:u,x:r,y:a})}}}})).polyfill;!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"}(m||(m={})),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"}(v||(v={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(y||(y={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(g||(g={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event"}(b||(b={}));var S,w=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,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}(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 i(o){for(r.timeOffset+=(o-e)*n.speed,e=o;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(i))}))},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}();function x(e,t){if(e.type===m.IncrementalSnapshot&&e.data.source===v.MouseMove){var n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.timestamp-t}
***************************************************************************** */var t,n=function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function r(e){var t="function"==typeof Symbol&&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 i(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}!function(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 o=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function a(e,t){void 0===t&&(t={});var n=1,r=1;function i(e){var t=e.match(/\n/g);t&&(n+=t.length);var i=e.lastIndexOf("\n");r=-1===i?r+e.length:e.length-i}function a(){var e={line:n,column:r};return function(t){return t.position=new c(e),m(),t}}var c=function(e){this.start=e,this.end={line:n,column:r},this.source=t.source};c.prototype.content=e;var l=[];function u(i){var o=new Error(t.source+":"+n+":"+r+": "+i);if(o.reason=i,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o;l.push(o)}function f(){return h(/^{\s*/)}function d(){return h(/^}/)}function p(){var t,n=[];for(m(),v(n);e.length&&"}"!==e.charAt(0)&&(t=T()||C());)!1!==t&&(n.push(t),v(n));return n}function h(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function m(){h(/^\s*/)}function v(e){var t;for(void 0===e&&(e=[]);t=y();)!1!==t&&e.push(t),t=y();return e}function y(){var t=a();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return u("End of comment missing");var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:"comment",comment:o})}}function g(){var e=h(/^([^{]+)/);if(e)return s(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=a(),t=h(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=s(t[0]);if(!h(/^:\s*/))return u("property missing ':'");var r=h(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:n.replace(o,""),value:r?s(r[0]).replace(o,""):""});return h(/^[;\s]*/),i}}function x(){var e,t=[];if(!f())return u("missing '{'");for(v(t);e=b();)!1!==e&&(t.push(e),v(t)),e=b();return d()?t:u("missing '}'")}function E(){for(var e,t=[],n=a();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:x()})}var S,w=N("import"),M=N("charset"),I=N("namespace");function N(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=a(),r=h(t);if(r){var i={type:e};return i[e]=r[1].trim(),n(i)}}}function T(){if("@"===e[0])return function(){var e=a(),t=h(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=h(/^([-\w]+)\s*/)))return u("@keyframes missing name");var r,i=t[1];if(!f())return u("@keyframes missing '{'");for(var o=v();r=E();)o.push(r),o=o.concat(v());return d()?e({type:"keyframes",name:i,vendor:n,keyframes:o}):u("@keyframes missing '}'")}}()||function(){var e=a(),t=h(/^@media *([^{]+)/);if(t){var n=s(t[1]);if(!f())return u("@media missing '{'");var r=v().concat(p());return d()?e({type:"media",media:n,rules:r}):u("@media missing '}'")}}()||function(){var e=a(),t=h(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:s(t[1]),media:s(t[2])})}()||function(){var e=a(),t=h(/^@supports *([^{]+)/);if(t){var n=s(t[1]);if(!f())return u("@supports missing '{'");var r=v().concat(p());return d()?e({type:"supports",supports:n,rules:r}):u("@supports missing '}'")}}()||w()||M()||I()||function(){var e=a(),t=h(/^@([-\w]+)?document *([^{]+)/);if(t){var n=s(t[1]),r=s(t[2]);if(!f())return u("@document missing '{'");var i=v().concat(p());return d()?e({type:"document",document:r,vendor:n,rules:i}):u("@document missing '}'")}}()||function(){var e=a();if(h(/^@page */)){var t=g()||[];if(!f())return u("@page missing '{'");for(var n,r=v();n=b();)r.push(n),r=r.concat(v());return d()?e({type:"page",selectors:t,declarations:r}):u("@page missing '}'")}}()||function(){var e=a();if(h(/^@host\s*/)){if(!f())return u("@host missing '{'");var t=v().concat(p());return d()?e({type:"host",rules:t}):u("@host missing '}'")}}()||function(){var e=a();if(h(/^@font-face\s*/)){if(!f())return u("@font-face missing '{'");for(var t,n=v();t=b();)n.push(t),n=n.concat(v());return d()?e({type:"font-face",declarations:n}):u("@font-face missing '}'")}}()}function C(){var e=a(),t=g();return t?(v(),e({type:"rule",selectors:t,declarations:x()})):u("selector missing")}return function e(t,n){for(var r=t&&"string"==typeof t.type,i=r?t:n,o=0,a=Object.keys(t);o<a.length;o++){var s=a[o],c=t[s];Array.isArray(c)?c.forEach((function(t){e(t,i)})):c&&"object"==typeof c&&e(c,i)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((S=p(),{type:"stylesheet",stylesheet:{source:t.source,rules:S,parsingErrors:l}}))}function s(e){return e?e.replace(/^\s+|\s+$/g,""):""}var c={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 l=/([^\\]):hover/g;function u(e){var t=a(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach((function(t){"selectors"in t&&(t.selectors||[]).forEach((function(t){if(l.test(t)){var n=t.replace(l,"$1.\\:hover");e=e.replace(t,t+", "+n)}}))})),e):e}function f(e,n,r){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 i,o=function(e){var t=c[e.tagName]?c[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);i=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",o):n.createElement(o);var a=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var a=e.attributes[t];if(a="boolean"==typeof a?"":a,t.startsWith("rr_")){if("canvas"===o&&"rr_dataURL"===t){var s=document.createElement("img");s.src=a,s.onload=function(){var e=i.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(i.style.width=a),"rr_height"===t&&(i.style.height=a),"rr_mediaState"===t)switch(a){case"played":i.play();case"paused":i.pause()}}else{var c="textarea"===o&&"value"===t,l="style"===o&&"_cssText"===t;if(l&&r&&(a=u(a)),c||l){for(var f=n.createTextNode(a),d=0,p=Array.from(i.childNodes);d<p.length;d++){var h=p[d];h.nodeType===i.TEXT_NODE&&i.removeChild(h)}return i.appendChild(f),"continue"}if("iframe"===o&&"src"===t)return"continue";try{e.isSVG&&"xlink:href"===t?i.setAttributeNS("http://www.w3.org/1999/xlink",t,a):"onload"==t||"onclick"==t||"onmouse"==t.substring(0,7)?i.setAttribute("_"+t,a):i.setAttribute(t,a)}catch(e){}}};for(var s in e.attributes)a(s);return i;case t.Text:return n.createTextNode(e.isStyle&&r?u(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function d(e,n,r,i,o){void 0===i&&(i=!1),void 0===o&&(o=!0);var a=f(e,n,o);if(!a)return null;if(e.type===t.Document&&(n.close(),n.open(),a=n),a.__sn=e,r[e.id]=a,(e.type===t.Document||e.type===t.Element)&&!i)for(var s=0,c=e.childNodes;s<c.length;s++){var l=c[s],u=d(l,n,r,!1,o);u?a.appendChild(u):console.warn("Failed to rebuild",l)}return a}function p(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 h=Object.freeze({__proto__:null,default:p});var m,v,y,g,b,x=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){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,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||s,scrollIntoView:r.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(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]&&(c(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!==c(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!==c(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!==c(arguments[0])){var n=d(this),r=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(h.call(this,n,n.scrollLeft+o.left-r.left,n.scrollTop+o.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function c(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 l(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function u(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function f(e){var t=l(e,"Y")&&u(e,"Y"),n=l(e,"X")&&u(e,"X");return t||n}function d(e){for(;e!==t.body&&!1===f(e);)e=e.parentNode||e.host;return e}function p(t){var n,r,i,a,s=(o()-t.startTime)/468;a=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*a)),r=t.startX+(t.x-t.startX)*n,i=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,i),r===t.x&&i===t.y||e.requestAnimationFrame(p.bind(e,t))}function h(n,r,a){var c,l,u,f,d=o();n===t.body?(c=e,l=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,f=i.scroll):(c=n,l=n.scrollLeft,u=n.scrollTop,f=s),p({scrollable:c,method:f,startTime:d,startX:l,startY:u,x:r,y:a})}}}})).polyfill;!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"}(m||(m={})),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"}(v||(v={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(y||(y={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(g||(g={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush"}(b||(b={}));var E,S=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,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}(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 i(o){for(r.timeOffset+=(o-e)*n.speed,e=o;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(i))}))},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}();function w(e,t){if(e.type===m.IncrementalSnapshot&&e.data.source===v.MouseMove){var n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.timestamp-t}
/*! *****************************************************************************

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

and limitations under the License.
***************************************************************************** */!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(S||(S={}));var T={type:"xstate.init"};function N(e){return void 0===e?[]:[].concat(e)}function A(e){return{type:"xstate.assign",assignment:e}}function M(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function C(e){return function(t){return e===t}}function I(e){return"string"==typeof e?{type:e}:e}function k(e,t){return{value:e,context:t,actions:[],changed:!1,matches:C(e)}}var _=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function F(e,t){var i=t.getCastFn,o=t.emitter;return function(e){var t=e.initialState,n=S.NotStarted,r=new Set,i={_machine:e,send:function(i){n===S.Running&&(t=e.transition(t,i),_(t,I(i)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(){return n=S.Running,_(t,T),i},stop:function(){return n=S.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}(function(e,t){void 0===t&&(t={});var n={config:e,_options:t,initialState:{value:e.initial,actions:N(e.states[e.initial].entry).map((function(e){return M(e,t.actions)})),context:e.context,matches:C(e.initial)},transition:function(t,r){var i,o,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,c=a.context,l=I(r),u=e.states[s];if(u.on){var f=N(u.on[l.type]),d=function(t){if(void 0===t)return{value:k(s,c)};var r="string"==typeof t?{target:t}:t,i=r.target,o=void 0===i?s:i,a=r.actions,f=void 0===a?[]:a,d=r.cond,p=c;if((void 0===d?function(){return!0}:d)(c,l)){var h=e.states[o],m=!1,v=[].concat(u.exit,f,h.entry).filter((function(e){return e})).map((function(e){return M(e,n._options.actions)})).filter((function(e){if("xstate.assign"===e.type){m=!0;var t=Object.assign({},p);return"function"==typeof e.assignment?t=e.assignment(p,l):Object.keys(e.assignment).forEach((function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](p,l):e.assignment[n]})),p=t,!1}return!0}));return{value:{value:o,context:p,actions:v,changed:o!==s||v.length>0||m,matches:C(o)}}}};try{for(var p=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}(f),h=p.next();!h.done;h=p.next()){var m=d(h.value);if("object"==typeof m)return m.value}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}}return k(s,c)}};return n}({id:"player",context:e,initial:"inited",states:{inited:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},TO_LIVE:{target:"live",actions:["startLive"]}}},playing:{on:{PAUSE:{target:"paused",actions:["pause"]},END:"ended",FAST_FORWARD:"skipping",CAST_EVENT:{target:"playing",actions:"castEvent"}}},paused:{on:{RESUME:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"}}},skipping:{on:{BACK_TO_NORMAL:"playing"}},ended:{on:{REPLAY:"playing"}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]}}}}},{actions:{castEvent:A({lastPlayedEvent:function(t,n){return"CAST_EVENT"===n.type?n.payload.event:e.lastPlayedEvent}}),recordTimeOffset:A((function(e,t){var r=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(r=t.payload.timeOffset),n(n({},e),{timeOffset:r,baselineTime:e.events[0].timestamp+r})})),play:function(e){var t,n,a=e.timer,s=e.events,c=e.baselineTime,l=e.lastPlayedEvent;a.clear();var u=new Array,f=function(e){if(l&&(e.timestamp<=l.timestamp||e===l))return"continue";var t=e.timestamp<c,n=i(e,t);t?n():u.push({doAction:function(){n(),o.emit(b.EventCast,e)},delay:x(e,c)})};try{for(var d=r(s),p=d.next();!p.done;p=d.next()){f(p.value)}}catch(e){t={error:e}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}a.addActions(u),a.start()},pause:function(e){e.timer.clear()},startLive:A({baselineTime:function(e,t){return e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:A((function(e,t){var r=e.baselineTime,a=e.timer,s=e.events;if("ADD_EVENT"===t.type){var c=t.payload.event;s.push(c);var l=c.timestamp<r,u=i(c,l);l?u():a.addAction({doAction:function(){u(),o.emit(b.EventCast,c)},delay:x(c,r)})}return n(n({},e),{events:s})}))}}))}var O={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return O.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete O.map[t],e.childNodes&&e.childNodes.forEach((function(e){return O.removeNodeFromMap(e)}))},has:function(e){return O.map.hasOwnProperty(e)}};var R=p||h,D={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0},L=function(){function e(e,t){if(this.emitter=R(),this.noramlSpeed=-1,this.legacy_missingNodeRetryMap={},!(null==t?void 0:t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");this.config=Object.assign({},D,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on("resize",this.handleResize),E(),"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),this.setupDom(),this.service=F({events:e.map((function(e){return t&&t.unpackFn?t.unpackFn(e):e})),timer:new w(this.config),speed:(null==t?void 0:t.speed)||D.speed,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){e.changed}));var n=this.service.state.context.events,r=n.find((function(e){return e.type===m.Meta})),i=n.find((function(e){return e.type===m.FullSnapshot}));if(r){var o=r.data,a=o.width,s=o.height;this.emitter.emit(b.Resize,{width:a,height:s})}i&&this.rebuildFullSnapshot(i)}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),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.service.state.context.events,t=e[0];return{totalTime:e[e.length-1].timestamp-t.timestamp}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},e.prototype.play=function(e){void 0===e&&(e=0),this.service.send({type:"PLAY",payload:{timeOffset:e}}),this.emitter.emit(b.Start)},e.prototype.pause=function(){this.service.send({type:"PAUSE"}),this.emitter.emit(b.Pause)},e.prototype.resume=function(e){void 0===e&&(e=0),this.service.send({type:"RESUME",payload:{timeOffset:e}}),this.emitter.emit(b.Resume)},e.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},e.prototype.addEvent=function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))},e.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},e.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.disableInteract(),this.wrapper.appendChild(this.iframe)},e.prototype.handleResize=function(e){this.iframe.setAttribute("width",String(e.width)),this.iframe.setAttribute("height",String(e.height))},e.prototype.getCastFn=function(e,t){var n=this;void 0===t&&(t=!1);var i,o=this.service.state.context.events;switch(e.type){case m.DomContentLoaded:case m.Load:break;case m.Custom:i=function(){n.emitter.emit(b.CustomEvent,e)};break;case m.Meta:i=function(){return n.emitter.emit(b.Resize,{width:e.data.width,height:e.data.height})};break;case m.FullSnapshot:i=function(){n.rebuildFullSnapshot(e),n.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case m.IncrementalSnapshot:i=function(){var i,a;if(n.applyIncremental(e,t),e===n.nextUserInteractionEvent&&(n.nextUserInteractionEvent=null,n.restoreSpeed()),n.config.skipInactive&&!n.nextUserInteractionEvent){try{for(var s=r(o),c=s.next();!c.done;c=s.next()){var l=c.value;if(!(l.timestamp<=e.timestamp)&&n.isUserInteraction(l)){l.delay-e.delay>1e4*n.config.speed&&(n.nextUserInteractionEvent=l);break}}}catch(e){i={error:e}}finally{try{c&&!c.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}if(n.nextUserInteractionEvent){n.noramlSpeed=n.config.speed;var u=n.nextUserInteractionEvent.delay-e.delay,f={speed:Math.min(Math.round(u/5e3),360)};n.setConfig(f),n.emitter.emit(b.SkipStart,f)}}}}return function(){i&&i(),n.service.send({type:"CAST_EVENT",payload:{event:e}}),e===o[o.length-1]&&(n.restoreSpeed(),n.service.send("END"),n.emitter.emit(b.Finish))}},e.prototype.rebuildFullSnapshot=function(e){Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={},O.map=function(e,t,n){void 0===n&&(n=!0);var r={};return[d(e,t,r,!1,n),r]}(e.data.node,this.iframe.contentDocument)[1];var t=document.createElement("style"),n=this.iframe.contentDocument,r=n.documentElement,i=n.head;r.insertBefore(t,i);for(var o,a=(o=this.config.blockClass,["iframe, ."+o+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules),s=0;s<a.length;s++)t.sheet.insertRule(a[s],s);this.emitter.emit(b.FullsnapshotRebuilded),this.waitForStylesheetLoad()},e.prototype.waitForStylesheetLoad=function(){var e=this,t=this.iframe.contentDocument.head;if(t){var n,r=new Set,i=this.service.state;t.querySelectorAll('link[rel="stylesheet"]').forEach((function(t){t.sheet||(r.add(t),t.addEventListener("load",(function(){r.delete(t),0===r.size&&-1!==n&&(i.matches("playing")&&e.resume(e.getCurrentTime()),e.emitter.emit(b.LoadStylesheetEnd),n&&window.clearTimeout(n))})))})),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(b.LoadStylesheetStart),n=window.setTimeout((function(){i.matches("playing")&&e.resume(e.getCurrentTime()),n=-1}),this.config.loadTimeout))}},e.prototype.applyIncremental=function(e,t){var r=this,i=this.service.state.context.baselineTime,o=e.data;switch(o.source){case v.Mutation:o.removes.forEach((function(e){var t=O.getNode(e.id);if(!t)return r.warnNodeNotFound(o,e.id);var n=O.getNode(e.parentId);if(!n)return r.warnNodeNotFound(o,e.parentId);O.removeNodeFromMap(t),n&&n.removeChild(t)}));var a=n({},this.legacy_missingNodeRetryMap),s=[],c=function(e){var t=O.getNode(e.parentId);if(!t)return s.push(e);var n=null,i=null;if(e.previousId&&(n=O.getNode(e.previousId)),e.nextId&&(i=O.getNode(e.nextId)),null!==e.nextId&&-1!==e.nextId&&!i)return s.push(e);var o=d(e.node,r.iframe.contentDocument,O.map,!0);-1!==e.previousId&&-1!==e.nextId?(n&&n.nextSibling&&n.nextSibling.parentNode?t.insertBefore(o,n.nextSibling):i&&i.parentNode?t.contains(i)?t.insertBefore(o,i):t.insertBefore(o,null):t.appendChild(o),(e.previousId||e.nextId)&&r.legacy_resolveMissingNode(a,t,o,e)):a[e.node.id]={node:o,mutation:e}};for(o.adds.forEach((function(e){c(e)}));s.length;){if(s.every((function(e){return!Boolean(O.getNode(e.parentId))})))return s.forEach((function(e){return r.warnNodeNotFound(o,e.node.id)}));var l=s.shift();c(l)}Object.keys(a).length&&Object.assign(this.legacy_missingNodeRetryMap,a),o.texts.forEach((function(e){var t=O.getNode(e.id);if(!t)return r.warnNodeNotFound(o,e.id);t.textContent=e.value})),o.attributes.forEach((function(e){var t=O.getNode(e.id);if(!t)return r.warnNodeNotFound(o,e.id);for(var n in e.attributes)if("string"==typeof n){var i=e.attributes[n];null!==i?t.setAttribute(n,i):t.removeAttribute(n)}}));break;case v.MouseMove:if(t){var u=o.positions[o.positions.length-1];this.moveAndHover(o,u.x,u.y,u.id)}else o.positions.forEach((function(t){var n={doAction:function(){r.moveAndHover(o,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-i};r.timer.addAction(n)}));break;case v.MouseInteraction:if(-1===o.id)break;var f=new Event(y[o.type].toLowerCase());if(!(m=O.getNode(o.id)))return this.debugNodeNotFound(o,o.id);this.emitter.emit(b.MouseInteraction,{type:o.type,target:m});var p=this.config.triggerFocus;switch(o.type){case y.Blur:"blur"in m&&m.blur();break;case y.Focus:p&&m.focus&&m.focus({preventScroll:!0});break;case y.Click:case y.TouchStart:case y.TouchEnd:t||(this.moveAndHover(o,o.x,o.y,o.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:m.dispatchEvent(f)}break;case v.Scroll:if(-1===o.id)break;if(!(m=O.getNode(o.id)))return this.debugNodeNotFound(o,o.id);if(m===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:o.y,left:o.x,behavior:t?"auto":"smooth"});else try{m.scrollTop=o.y,m.scrollLeft=o.x}catch(e){}break;case v.ViewportResize:this.emitter.emit(b.Resize,{width:o.width,height:o.height});break;case v.Input:if(-1===o.id)break;if(!(m=O.getNode(o.id)))return this.debugNodeNotFound(o,o.id);try{m.checked=o.isChecked,m.value=o.text}catch(e){}break;case v.MediaInteraction:if(!(m=O.getNode(o.id)))return this.debugNodeNotFound(o,o.id);var h=m;o.type===g.Pause&&h.pause(),o.type===g.Play&&(h.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?h.play():h.addEventListener("canplay",(function(){h.play()})));break;case v.StyleSheetRule:var m;if(!(m=O.getNode(o.id)))return this.debugNodeNotFound(o,o.id);var E=m.sheet;o.adds&&o.adds.forEach((function(e){var t=e.rule,n=e.index,r=void 0===n?void 0:Math.min(n,E.rules.length);try{E.insertRule(t,r)}catch(e){}})),o.removes&&o.removes.forEach((function(e){var t=e.index;E.deleteRule(t)}))}},e.prototype.legacy_resolveMissingNode=function(e,t,n,r){var i=r.previousId,o=r.nextId,a=i&&e[i],s=o&&e[o];if(a){var c=a,l=c.node,u=c.mutation;t.insertBefore(l,n),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_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.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_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 i=O.getNode(r);if(!i)return this.debugNodeNotFound(e,r);this.hoverElements(i)},e.prototype.hoverElements=function(e){this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")}));for(var t=e;t;)t.classList&&t.classList.add(":hover"),t=t.parentElement},e.prototype.isUserInteraction=function(e){return e.type===m.IncrementalSnapshot&&(e.data.source>v.Mutation&&e.data.source<=v.Input)},e.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var e={speed:this.noramlSpeed};this.setConfig(e),this.emitter.emit(b.SkipEnd,e),this.noramlSpeed=-1}},e.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn("[replayer]","Node with id '"+t+"' not found in",e)},e.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log("[replayer]","Node with id '"+t+"' not found in",e)},e}();return e.Replayer=L,e}({});
***************************************************************************** */!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(E||(E={}));var M={type:"xstate.init"};function I(e){return void 0===e?[]:[].concat(e)}function N(e){return{type:"xstate.assign",assignment:e}}function T(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function C(e){return function(t){return e===t}}function A(e){return"string"==typeof e?{type:e}:e}function k(e,t){return{value:e,context:t,actions:[],changed:!1,matches:C(e)}}var _=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};var F={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return F.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete F.map[t],e.childNodes&&e.childNodes.forEach((function(e){return F.removeNodeFromMap(e)}))},has:function(e){return F.map.hasOwnProperty(e)}};var O=function(){function e(){this.reset()}return e.prototype.add=function(e){var t=this.indexes.get(e.parentId),n={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(n.parent=t,t.children[n.id]=n):this.tree[n.id]=n,this.indexes.set(n.id,n)},e.prototype.remove=function(e){var t=this,n=this.indexes.get(e.parentId),r=this.indexes.get(e.id),i=function(e){t.removeIdSet.add(e);var n=F.getNode(e);null==n||n.childNodes.forEach((function(e){return i(e.__sn.id)}))},o=function(n){t.removeIdSet.add(n.id),Object.values(n.children).forEach((function(e){return o(e)}));var r=t.indexes.get(n.id);if(r){var i=r.parent;i&&(delete r.parent,delete i.children[r.id],t.indexes.delete(e.id))}};r?n?(delete r.parent,delete n.children[r.id],this.indexes.delete(e.id),o(r)):(delete this.tree[r.id],this.indexes.delete(r.id),o(r)):(this.removeNodeMutations.push(e),i(e.id))},e.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},e.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},e.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},e.prototype.input=function(e){this.inputMap.set(e.id,e)},e.prototype.flush=function(){var e,t,n,i,o=this,a=this.tree,s=this.removeNodeMutations,c=this.textMutations,l=this.attributeMutations,u={source:v.Mutation,removes:s,texts:c,attributes:l,adds:[]},f=function(e,t){t&&o.removeIdSet.add(e.id),u.texts=u.texts.concat(t?[]:e.texts).filter((function(e){return!o.removeIdSet.has(e.id)})),u.attributes=u.attributes.concat(t?[]:e.attributes).filter((function(e){return!o.removeIdSet.has(e.id)})),o.removeIdSet.has(e.id)||o.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return f(e,!0)})):(u.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return f(e,!1)})))};Object.values(a).forEach((function(e){return f(e,!1)}));try{for(var d=r(this.scrollMap.keys()),p=d.next();!p.done;p=d.next()){var h=p.value;this.removeIdSet.has(h)&&this.scrollMap.delete(h)}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var m=r(this.inputMap.keys()),y=m.next();!y.done;y=m.next()){h=y.value;this.removeIdSet.has(h)&&this.inputMap.delete(h)}}catch(e){n={error:e}}finally{try{y&&!y.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}var g=new Map(this.scrollMap),b=new Map(this.inputMap);return this.reset(),{mutationData:u,scrollMap:g,inputMap:b}},e.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},e}();function D(e,t){var i=t.getCastFn,o=t.emitter;return function(e){var t=e.initialState,n=E.NotStarted,r=new Set,i={_machine:e,send:function(i){n===E.Running&&(t=e.transition(t,i),_(t,A(i)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(){return n=E.Running,_(t,M),i},stop:function(){return n=E.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}(function(e,t){void 0===t&&(t={});var n={config:e,_options:t,initialState:{value:e.initial,actions:I(e.states[e.initial].entry).map((function(e){return T(e,t.actions)})),context:e.context,matches:C(e.initial)},transition:function(t,r){var i,o,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,c=a.context,l=A(r),u=e.states[s];if(u.on){var f=I(u.on[l.type]),d=function(t){if(void 0===t)return{value:k(s,c)};var r="string"==typeof t?{target:t}:t,i=r.target,o=void 0===i?s:i,a=r.actions,f=void 0===a?[]:a,d=r.cond,p=c;if((void 0===d?function(){return!0}:d)(c,l)){var h=e.states[o],m=!1,v=[].concat(u.exit,f,h.entry).filter((function(e){return e})).map((function(e){return T(e,n._options.actions)})).filter((function(e){if("xstate.assign"===e.type){m=!0;var t=Object.assign({},p);return"function"==typeof e.assignment?t=e.assignment(p,l):Object.keys(e.assignment).forEach((function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](p,l):e.assignment[n]})),p=t,!1}return!0}));return{value:{value:o,context:p,actions:v,changed:o!==s||v.length>0||m,matches:C(o)}}}};try{for(var p=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}(f),h=p.next();!h.done;h=p.next()){var m=d(h.value);if("object"==typeof m)return m.value}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}}return k(s,c)}};return n}({id:"player",context:e,initial:"inited",states:{inited:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},TO_LIVE:{target:"live",actions:["startLive"]}}},playing:{on:{PAUSE:{target:"paused",actions:["pause"]},END:"ended",FAST_FORWARD:"skipping",CAST_EVENT:{target:"playing",actions:"castEvent"}}},paused:{on:{RESUME:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"}}},skipping:{on:{BACK_TO_NORMAL:"playing"}},ended:{on:{REPLAY:"playing"}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]}}}}},{actions:{castEvent:N({lastPlayedEvent:function(t,n){return"CAST_EVENT"===n.type?n.payload.event:e.lastPlayedEvent}}),recordTimeOffset:N((function(e,t){var r=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(r=t.payload.timeOffset),n(n({},e),{timeOffset:r,baselineTime:e.events[0].timestamp+r})})),play:function(e){var t,n,a=e.timer,s=e.events,c=e.baselineTime,l=e.lastPlayedEvent;a.clear();var u=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===m.Meta&&r.timestamp<=t)return e.slice(n)}return e}(s,c),f=new Array,d=function(e){if(l&&l.timestamp>c&&(e.timestamp<=l.timestamp||e===l))return"continue";var t=e.timestamp<c;if(t&&!function(e){switch(e.type){case m.DomContentLoaded:case m.Load:case m.Custom:return!1;case m.FullSnapshot:case m.Meta:return!0}switch(e.data.source){case v.MouseMove:case v.MouseInteraction:case v.TouchMove:case v.MediaInteraction:return!1;case v.ViewportResize:case v.StyleSheetRule:case v.Scroll:case v.Input:return!0}return!0}(e))return"continue";var n=i(e,t);t?n():f.push({doAction:function(){n(),o.emit(b.EventCast,e)},delay:w(e,c)})};try{for(var p=r(u),h=p.next();!h.done;h=p.next()){d(h.value)}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}o.emit(b.Flush),a.addActions(f),a.start()},pause:function(e){e.timer.clear()},startLive:N({baselineTime:function(e,t){return e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:N((function(e,t){var r=e.baselineTime,a=e.timer,s=e.events;if("ADD_EVENT"===t.type){var c=t.payload.event;s.push(c);var l=c.timestamp<r,u=i(c,l);l?u():a.addAction({doAction:function(){u(),o.emit(b.EventCast,c)},delay:w(c,r)})}return n(n({},e),{events:s})}))}}))}var R=p||h,L={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0},P=function(){function e(e,n){var o=this;if(this.emitter=R(),this.noramlSpeed=-1,this.legacy_missingNodeRetryMap={},!(null==n?void 0:n.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");this.config=Object.assign({},L,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on(b.Resize,this.handleResize),x(),"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),this.setupDom(),this.treeIndex=new O,this.fragmentParentMap=new Map,this.emitter.on(b.Flush,(function(){var e,n,a,s,c,l,u=o.treeIndex.flush(),f=u.scrollMap,d=u.inputMap;try{for(var p=r(f.values()),h=p.next();!h.done;h=p.next()){var m=h.value;o.applyScroll(m)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(e)throw e.error}}try{for(var v=r(d.values()),y=v.next();!y.done;y=v.next()){m=y.value;o.applyInput(m)}}catch(e){a={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}try{for(var g=r(o.fragmentParentMap.entries()),b=g.next();!b.done;b=g.next()){var x=i(b.value,2),E=x[0],S=x[1];F.map[S.__sn.id]=S,S.__sn.type===t.Element&&"textarea"===S.__sn.tagName&&E.textContent&&(S.value=E.textContent),S.appendChild(E)}}catch(e){c={error:e}}finally{try{b&&!b.done&&(l=g.return)&&l.call(g)}finally{if(c)throw c.error}}o.fragmentParentMap.clear()})),this.service=D({events:e.map((function(e){return n&&n.unpackFn?n.unpackFn(e):e})),timer:new S(this.config),speed:(null==n?void 0:n.speed)||L.speed,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){e.changed}));var a=this.service.state.context.events,s=a.find((function(e){return e.type===m.Meta})),c=a.find((function(e){return e.type===m.FullSnapshot}));if(s){var l=s.data,u=l.width,f=l.height;this.emitter.emit(b.Resize,{width:u,height:f})}c&&this.rebuildFullSnapshot(c)}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),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.service.state.context.events,t=e[0],n=e[e.length-1];return{startTime:t.timestamp,endTime:n.timestamp,totalTime:n.timestamp-t.timestamp}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},e.prototype.play=function(e){void 0===e&&(e=0),"ended"===this.service.state.value&&this.service.send({type:"REPLAY"}),"paused"===this.service.state.value?this.service.send({type:"RESUME",payload:{timeOffset:e}}):this.service.send({type:"PLAY",payload:{timeOffset:e}}),this.emitter.emit(b.Start)},e.prototype.pause=function(){this.service.send({type:"PAUSE"}),this.emitter.emit(b.Pause)},e.prototype.resume=function(e){void 0===e&&(e=0),this.service.send({type:"RESUME",payload:{timeOffset:e}}),this.emitter.emit(b.Resume)},e.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},e.prototype.addEvent=function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))},e.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},e.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.disableInteract(),this.wrapper.appendChild(this.iframe)},e.prototype.handleResize=function(e){this.iframe.setAttribute("width",String(e.width)),this.iframe.setAttribute("height",String(e.height))},e.prototype.getCastFn=function(e,t){var n=this;void 0===t&&(t=!1);var i,o=this.service.state.context.events;switch(e.type){case m.DomContentLoaded:case m.Load:break;case m.Custom:i=function(){n.emitter.emit(b.CustomEvent,e)};break;case m.Meta:i=function(){return n.emitter.emit(b.Resize,{width:e.data.width,height:e.data.height})};break;case m.FullSnapshot:i=function(){n.rebuildFullSnapshot(e),n.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case m.IncrementalSnapshot:i=function(){var i,a;if(n.applyIncremental(e,t),e===n.nextUserInteractionEvent&&(n.nextUserInteractionEvent=null,n.restoreSpeed()),n.config.skipInactive&&!n.nextUserInteractionEvent){try{for(var s=r(o),c=s.next();!c.done;c=s.next()){var l=c.value;if(!(l.timestamp<=e.timestamp)&&n.isUserInteraction(l)){l.delay-e.delay>1e4*n.config.speed&&(n.nextUserInteractionEvent=l);break}}}catch(e){i={error:e}}finally{try{c&&!c.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}if(n.nextUserInteractionEvent){n.noramlSpeed=n.config.speed;var u=n.nextUserInteractionEvent.delay-e.delay,f={speed:Math.min(Math.round(u/5e3),360)};n.setConfig(f),n.emitter.emit(b.SkipStart,f)}}}}return function(){i&&i(),n.service.send({type:"CAST_EVENT",payload:{event:e}}),e===o[o.length-1]&&(n.restoreSpeed(),n.service.send("END"),n.emitter.emit(b.Finish))}},e.prototype.rebuildFullSnapshot=function(e){if(!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={},F.map=function(e,t,n){void 0===n&&(n=!0);var r={};return[d(e,t,r,!1,n),r]}(e.data.node,this.iframe.contentDocument)[1];var t=document.createElement("style"),n=this.iframe.contentDocument,r=n.documentElement,i=n.head;r.insertBefore(t,i);for(var o,a=(o=this.config.blockClass,["iframe, ."+o+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules),s=0;s<a.length;s++)t.sheet.insertRule(a[s],s);this.emitter.emit(b.FullsnapshotRebuilded,e),this.waitForStylesheetLoad()},e.prototype.waitForStylesheetLoad=function(){var e,t=this,n=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(n){var r,i=new Set,o=this.service.state;n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(i.add(e),e.addEventListener("load",(function(){i.delete(e),0===i.size&&-1!==r&&(o.matches("playing")&&t.resume(t.getCurrentTime()),t.emitter.emit(b.LoadStylesheetEnd),r&&window.clearTimeout(r))})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(b.LoadStylesheetStart),r=window.setTimeout((function(){o.matches("playing")&&t.resume(t.getCurrentTime()),r=-1}),this.config.loadTimeout))}},e.prototype.applyIncremental=function(e,t){var n=this,r=this.service.state.context.baselineTime,i=e.data;switch(i.source){case v.Mutation:t&&(i.adds.forEach((function(e){return n.treeIndex.add(e)})),i.texts.forEach((function(e){return n.treeIndex.text(e)})),i.attributes.forEach((function(e){return n.treeIndex.attribute(e)})),i.removes.forEach((function(e){return n.treeIndex.remove(e)}))),this.applyMutation(i,!0);break;case v.MouseMove:if(t){var o=i.positions[i.positions.length-1];this.moveAndHover(i,o.x,o.y,o.id)}else i.positions.forEach((function(t){var o={doAction:function(){n.moveAndHover(i,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-r};n.timer.addAction(o)}));break;case v.MouseInteraction:if(-1===i.id)break;var a=new Event(y[i.type].toLowerCase());if(!(l=F.getNode(i.id)))return this.debugNodeNotFound(i,i.id);this.emitter.emit(b.MouseInteraction,{type:i.type,target:l});var s=this.config.triggerFocus;switch(i.type){case y.Blur:"blur"in l&&l.blur();break;case y.Focus:s&&l.focus&&l.focus({preventScroll:!0});break;case y.Click:case y.TouchStart:case y.TouchEnd:t||(this.moveAndHover(i,i.x,i.y,i.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:l.dispatchEvent(a)}break;case v.Scroll:if(-1===i.id)break;if(t){this.treeIndex.scroll(i);break}this.applyScroll(i);break;case v.ViewportResize:this.emitter.emit(b.Resize,{width:i.width,height:i.height});break;case v.Input:if(-1===i.id)break;if(t){this.treeIndex.input(i);break}this.applyInput(i);break;case v.MediaInteraction:if(!(l=F.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var c=l;i.type===g.Pause&&c.pause(),i.type===g.Play&&(c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?c.play():c.addEventListener("canplay",(function(){c.play()})));break;case v.StyleSheetRule:var l;if(!(l=F.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var u=l.sheet;i.adds&&i.adds.forEach((function(e){var t=e.rule,n=e.index,r=void 0===n?void 0:Math.min(n,u.rules.length);try{u.insertRule(t,r)}catch(e){}})),i.removes&&i.removes.forEach((function(e){var t=e.index;u.deleteRule(t)}))}},e.prototype.applyMutation=function(e,t){var r=this;e.removes.forEach((function(t){var n=F.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);var i=F.getNode(t.parentId);if(!i)return r.warnNodeNotFound(e,t.parentId);if(F.removeNodeFromMap(n),i){var o=r.fragmentParentMap.get(i);o&&o.contains(n)?o.removeChild(n):i.removeChild(n)}}));var i=n({},this.legacy_missingNodeRetryMap),o=[],a=function(e){if(!r.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var n=F.getNode(e.parentId);if(!n)return o.push(e);var a=r.iframe.contentDocument.contains(n);if(t&&a){var s=document.createDocumentFragment();for(F.map[e.parentId]=s,r.fragmentParentMap.set(s,n);n.firstChild;)s.appendChild(n.firstChild);n=s}var c=null,l=null;if(e.previousId&&(c=F.getNode(e.previousId)),e.nextId&&(l=F.getNode(e.nextId)),null!==e.nextId&&-1!==e.nextId&&!l)return o.push(e);var u=d(e.node,r.iframe.contentDocument,F.map,!0);-1!==e.previousId&&-1!==e.nextId?(c&&c.nextSibling&&c.nextSibling.parentNode?n.insertBefore(u,c.nextSibling):l&&l.parentNode?n.contains(l)?n.insertBefore(u,l):n.insertBefore(u,null):n.appendChild(u),(e.previousId||e.nextId)&&r.legacy_resolveMissingNode(i,n,u,e)):i[e.node.id]={node:u,mutation:e}};for(e.adds.forEach((function(e){a(e)}));o.length;){if(o.every((function(e){return!Boolean(F.getNode(e.parentId))})))return o.forEach((function(t){return r.warnNodeNotFound(e,t.node.id)}));var s=o.shift();a(s)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),e.texts.forEach((function(t){var n=F.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);r.fragmentParentMap.has(n)&&(n=r.fragmentParentMap.get(n)),n.textContent=t.value})),e.attributes.forEach((function(t){var n=F.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);for(var i in r.fragmentParentMap.has(n)&&(n=r.fragmentParentMap.get(n)),t.attributes)if("string"==typeof i){var o=t.attributes[i];null!==o?n.setAttribute(i,o):n.removeAttribute(i)}}))},e.prototype.applyScroll=function(e){var t=F.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);if(t===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:e.y,left:e.x,behavior:"smooth"});else try{t.scrollTop=e.y,t.scrollLeft=e.x}catch(e){}},e.prototype.applyInput=function(e){var t=F.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}},e.prototype.legacy_resolveMissingNode=function(e,t,n,r){var i=r.previousId,o=r.nextId,a=i&&e[i],s=o&&e[o];if(a){var c=a,l=c.node,u=c.mutation;t.insertBefore(l,n),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_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.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_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 i=F.getNode(r);if(!i)return this.debugNodeNotFound(e,r);this.hoverElements(i)},e.prototype.hoverElements=function(e){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")}));for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement},e.prototype.isUserInteraction=function(e){return e.type===m.IncrementalSnapshot&&(e.data.source>v.Mutation&&e.data.source<=v.Input)},e.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var e={speed:this.noramlSpeed};this.setConfig(e),this.emitter.emit(b.SkipEnd,e),this.noramlSpeed=-1}},e.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn("[replayer]","Node with id '"+t+"' not found in",e)},e.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log("[replayer]","Node with id '"+t+"' not found in",e)},e}();return e.Replayer=P,e}({});
//# sourceMappingURL=rrweb-replay.min.js.map

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

and limitations under the License.
***************************************************************************** */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 r(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 o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function i(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(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"}(t||(t={}));var a=1,s=RegExp("[^a-z1-6-]");function c(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)?c(n.styleSheet)||"":n.cssText);var n}),""):null}catch(e){return null}}var u=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,l=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,d=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function f(e,t){return(e||"").replace(u,(function(e,n,r,o){var i,a=n||r||o;if(!a)return e;if(!l.test(a))return"url('"+a+"')";if(d.test(a))return"url("+a+")";if("/"===a[0])return"url('"+(((i=t).indexOf("//")>-1?i.split("/").slice(0,3).join("/"):i.split("/")[0]).split("?")[0]+a+"')");var s=t.split("/"),c=a.split("/");s.pop();for(var u=0,f=c;u<f.length;u++){var p=f[u];"."!==p&&(".."===p?s.pop():s.push(p))}return"url('"+s.join("/")+"')"}))}function p(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function m(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?f(n,location.href):n}function h(e,n,r,o,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 a=!1;"string"==typeof r?a=e.classList.contains(r):e.classList.forEach((function(e){r.test(e)&&(a=!0)}));for(var u=function(e){var t=e.toLowerCase().trim();return s.test(t)?"div":t}(e.tagName),l={},d=0,p=Array.from(e.attributes);d<p.length;d++){var h=p[d],v=h.name,y=h.value;l[v]=m(n,v,y)}if("link"===u&&o){var g,b=Array.from(n.styleSheets).find((function(t){return t.href===e.href}));(g=c(b))&&(delete l.rel,delete l.href,l._cssText=f(g,b.href))}if("style"===u&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(g=c(e.sheet))&&(l._cssText=f(g,location.href));if("input"===u||"textarea"===u||"select"===u){y=e.value;"radio"!==l.type&&"checkbox"!==l.type&&y?l.value=i?"*".repeat(y.length):y:e.checked&&(l.checked=e.checked)}if("option"===u){var E=e.parentElement;l.value===E.value&&(l.selected=e.selected)}if("canvas"===u&&(l.rr_dataURL=e.toDataURL()),"audio"!==u&&"video"!==u||(l.rr_mediaState=e.paused?"paused":"played"),a){var S=e.getBoundingClientRect(),w=S.width,T=S.height;l.rr_width=w+"px",l.rr_height=T+"px"}return{type:t.Element,tagName:u,attributes:l,childNodes:[],isSVG:(x=e,"svg"===x.tagName||x instanceof SVGElement||void 0),needBlock:a};case e.TEXT_NODE:var I=e.parentNode&&e.parentNode.tagName,C=e.textContent,N="STYLE"===I||void 0;return N&&C&&(C=f(C,location.href)),"SCRIPT"===I&&(C="SCRIPT_PLACEHOLDER"),{type:t.Text,textContent:C||"",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 x}function v(e,n,r,o,i,s,c){void 0===i&&(i=!1),void 0===s&&(s=!0),void 0===c&&(c=!1);var u,l=h(e,n,o,s,c);if(!l)return console.warn(e,"not serialized"),null;u="__sn"in e?e.__sn.id:a++;var d=Object.assign(l,{id:u});e.__sn=d,r[u]=e;var f=!i;if(d.type===t.Element&&(f=f&&!d.needBlock,delete d.needBlock),(d.type===t.Document||d.type===t.Element)&&f)for(var p=0,m=Array.from(e.childNodes);p<m.length;p++){var y=v(m[p],n,r,o,i,s,c);y&&d.childNodes.push(y)}return d}var y=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function g(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),p(),t}}var a=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 u(){return f(/^{\s*/)}function l(){return f(/^}/)}function d(){var t,n=[];for(p(),m(n);e.length&&"}"!==e.charAt(0)&&(t=x()||M());)!1!==t&&(n.push(t),m(n));return n}function f(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function p(){f(/^\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=f(/^([^{]+)/);if(e)return b(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 g(){var e=i(),t=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=b(t[0]);if(!f(/^:\s*/))return c("property missing ':'");var r=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:n.replace(y,""),value:r?b(r[0]).replace(y,""):""});return f(/^[;\s]*/),o}}function E(){var e,t=[];if(!u())return c("missing '{'");for(m(t);e=g();)!1!==e&&(t.push(e),m(t)),e=g();return l()?t:c("missing '}'")}function S(){for(var e,t=[],n=i();e=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),f(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:E()})}var w,T=N("import"),I=N("charset"),C=N("namespace");function N(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=i(),r=f(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=f(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=f(/^([-\w]+)\s*/)))return c("@keyframes missing name");var r,o=t[1];if(!u())return c("@keyframes missing '{'");for(var a=m();r=S();)a.push(r),a=a.concat(m());return l()?e({type:"keyframes",name:o,vendor:n,keyframes:a}):c("@keyframes missing '}'")}}()||function(){var e=i(),t=f(/^@media *([^{]+)/);if(t){var n=b(t[1]);if(!u())return c("@media missing '{'");var r=m().concat(d());return l()?e({type:"media",media:n,rules:r}):c("@media missing '}'")}}()||function(){var e=i(),t=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:b(t[1]),media:b(t[2])})}()||function(){var e=i(),t=f(/^@supports *([^{]+)/);if(t){var n=b(t[1]);if(!u())return c("@supports missing '{'");var r=m().concat(d());return l()?e({type:"supports",supports:n,rules:r}):c("@supports missing '}'")}}()||T()||I()||C()||function(){var e=i(),t=f(/^@([-\w]+)?document *([^{]+)/);if(t){var n=b(t[1]),r=b(t[2]);if(!u())return c("@document missing '{'");var o=m().concat(d());return l()?e({type:"document",document:r,vendor:n,rules:o}):c("@document missing '}'")}}()||function(){var e=i();if(f(/^@page */)){var t=v()||[];if(!u())return c("@page missing '{'");for(var n,r=m();n=g();)r.push(n),r=r.concat(m());return l()?e({type:"page",selectors:t,declarations:r}):c("@page missing '}'")}}()||function(){var e=i();if(f(/^@host\s*/)){if(!u())return c("@host missing '{'");var t=m().concat(d());return l()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=i();if(f(/^@font-face\s*/)){if(!u())return c("@font-face missing '{'");for(var t,n=m();t=g();)n.push(t),n=n.concat(m());return l()?e({type:"font-face",declarations:n}):c("@font-face missing '}'")}}()}function M(){var e=i(),t=v();return t?(m(),e({type:"rule",selectors:t,declarations:E()})):c("selector missing")}return function e(t,n){for(var r=t&&"string"==typeof t.type,o=r?t:n,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}((w=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:w,parsingErrors:s}}))}function b(e){return e?e.replace(/^\s+|\s+$/g,""):""}var E={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 S=/([^\\]):hover/g;function w(e){var t=g(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach((function(t){"selectors"in t&&(t.selectors||[]).forEach((function(t){if(S.test(t)){var n=t.replace(S,"$1.\\:hover");e=e.replace(t,t+", "+n)}}))})),e):e}function T(e,n,r){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 o,i=function(e){var t=E[e.tagName]?E[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);o=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",i):n.createElement(i);var a=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var a=e.attributes[t];if(a="boolean"==typeof a?"":a,t.startsWith("rr_")){if("canvas"===i&&"rr_dataURL"===t){var s=document.createElement("img");s.src=a,s.onload=function(){var e=o.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(o.style.width=a),"rr_height"===t&&(o.style.height=a),"rr_mediaState"===t)switch(a){case"played":o.play();case"paused":o.pause()}}else{var c="textarea"===i&&"value"===t,u="style"===i&&"_cssText"===t;if(u&&r&&(a=w(a)),c||u){for(var l=n.createTextNode(a),d=0,f=Array.from(o.childNodes);d<f.length;d++){var p=f[d];p.nodeType===o.TEXT_NODE&&o.removeChild(p)}return o.appendChild(l),"continue"}if("iframe"===i&&"src"===t)return"continue";try{e.isSVG&&"xlink:href"===t?o.setAttributeNS("http://www.w3.org/1999/xlink",t,a):"onload"==t||"onclick"==t||"onmouse"==t.substring(0,7)?o.setAttribute("_"+t,a):o.setAttribute(t,a)}catch(e){}}};for(var s in e.attributes)a(s);return o;case t.Text:return n.createTextNode(e.isStyle&&r?w(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function I(e,n,r,o,i){void 0===o&&(o=!1),void 0===i&&(i=!0);var a=T(e,n,i);if(!a)return null;if(e.type===t.Document&&(n.close(),n.open(),a=n),a.__sn=e,r[e.id]=a,(e.type===t.Document||e.type===t.Element)&&!o)for(var s=0,c=e.childNodes;s<c.length;s++){var u=c[s],l=I(u,n,r,!1,i);l?a.appendChild(l):console.warn("Failed to rebuild",u)}return a}function C(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 N={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return N.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete N.map[t],e.childNodes&&e.childNodes.forEach((function(e){return N.removeNodeFromMap(e)}))},has:function(e){return N.map.hasOwnProperty(e)}};function x(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,u=arguments;s<=0||s>t?(r&&(window.clearTimeout(r),r=null),o=a,e.apply(c,u)):r||!1===n.trailing||(r=window.setTimeout((function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(c,u)}),s))}}function M(e,t,n,r,o){void 0===o&&(o=window);var i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),i&&i.set&&i.set.call(this,e)}}),function(){return M(e,t,i||{},!0)}}function k(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function R(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function A(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var n=!1;return"string"==typeof t?n=e.classList.contains(t):e.classList.forEach((function(e){t.test(e)&&(n=!0)})),n||A(e.parentNode,t)}return A(e.parentNode,t)}function _(e){var t=N.getId(e);return!N.has(t)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||_(e.parentNode))}function O(e){return Boolean(e.changedTouches)}function L(){"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)}var D,F,P,j,B,z=Object.freeze({__proto__:null,on:C,mirror:N,throttle:x,hookSetter:M,getWindowHeight:k,getWindowWidth:R,isBlocked:A,isAncestorRemoved:_,isTouchEvent:O,polyfill:L});(D=e.EventType||(e.EventType={}))[D.DomContentLoaded=0]="DomContentLoaded",D[D.Load=1]="Load",D[D.FullSnapshot=2]="FullSnapshot",D[D.IncrementalSnapshot=3]="IncrementalSnapshot",D[D.Meta=4]="Meta",D[D.Custom=5]="Custom",(F=e.IncrementalSource||(e.IncrementalSource={}))[F.Mutation=0]="Mutation",F[F.MouseMove=1]="MouseMove",F[F.MouseInteraction=2]="MouseInteraction",F[F.Scroll=3]="Scroll",F[F.ViewportResize=4]="ViewportResize",F[F.Input=5]="Input",F[F.TouchMove=6]="TouchMove",F[F.MediaInteraction=7]="MediaInteraction",F[F.StyleSheetRule=8]="StyleSheetRule",(P=e.MouseInteractions||(e.MouseInteractions={}))[P.MouseUp=0]="MouseUp",P[P.MouseDown=1]="MouseDown",P[P.Click=2]="Click",P[P.ContextMenu=3]="ContextMenu",P[P.DblClick=4]="DblClick",P[P.Focus=5]="Focus",P[P.Blur=6]="Blur",P[P.TouchStart=7]="TouchStart",P[P.TouchMove_Departed=8]="TouchMove_Departed",P[P.TouchEnd=9]="TouchEnd",function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(j||(j={})),(B=e.ReplayerEvents||(e.ReplayerEvents={})).Start="start",B.Pause="pause",B.Resume="resume",B.Resize="resize",B.Finish="finish",B.FullsnapshotRebuilded="fullsnapshot-rebuilded",B.LoadStylesheetStart="load-stylesheet-start",B.LoadStylesheetEnd="load-stylesheet-end",B.SkipStart="skip-start",B.SkipEnd="skip-end",B.MouseInteraction="mouse-interaction",B.EventCast="event-cast",B.CustomEvent="custom-event";var V=function(e,t){return e+"@"+t};function U(e){return"__sn"in e}var Y=function(e,t,n,o){var i=this;this.texts=[],this.attributes=[],this.removes=[],this.adds=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(e){var t,n,o,a;e.forEach(i.processMutation);var s=[],c=function(e){var t=N.getId(e.parentNode),n=e.nextSibling&&N.getId(e.nextSibling);if(-1===t||-1===n)return s.push(e);i.adds.push({parentId:t,nextId:n,node:v(e,document,N.map,i.blockClass,!0,i.inlineStylesheet,i.maskAllInputs)})};try{for(var u=r(i.movedSet),l=u.next();!l.done;l=u.next())c(p=l.value)}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}try{for(var d=r(i.addedSet),f=d.next();!f.done;f=d.next()){var p=f.value;H(i.droppedSet,p)||W(i.removes,p)?H(i.movedSet,p)?c(p):i.droppedSet.add(p):c(p)}}catch(e){o={error:e}}finally{try{f&&!f.done&&(a=d.return)&&a.call(d)}finally{if(o)throw o.error}}for(;s.length&&!s.every((function(e){return-1===N.getId(e.parentNode)}));)c(s.shift());i.emit()},this.processMutation=function(e){switch(e.type){case"characterData":var t=e.target.textContent;A(e.target,i.blockClass)||t===e.oldValue||i.texts.push({value:t,node:e.target});break;case"attributes":if(t=e.target.getAttribute(e.attributeName),A(e.target,i.blockClass)||t===e.oldValue)return;var n=i.attributes.find((function(t){return t.node===e.target}));n||(n={node:e.target,attributes:{}},i.attributes.push(n)),n.attributes[e.attributeName]=m(document,e.attributeName,t);break;case"childList":e.addedNodes.forEach((function(t){return i.genAdds(t,e.target)})),e.removedNodes.forEach((function(t){var n=N.getId(t),r=N.getId(e.target);A(t,i.blockClass)||(i.addedSet.has(t)?(X(i.addedSet,t),i.droppedSet.add(t)):i.addedSet.has(e.target)&&-1===n||_(e.target)||(i.movedSet.has(t)&&i.movedMap[V(n,r)]?X(i.movedSet,t):i.removes.push({parentId:r,id:n})),N.removeNodeFromMap(t))}))}},this.genAdds=function(e,t){if(!A(e,i.blockClass)){if(U(e)){i.movedSet.add(e);var n=null;t&&U(t)&&(n=t.__sn.id),n&&(i.movedMap[V(e.__sn.id,n)]=!0)}else i.addedSet.add(e),i.droppedSet.delete(e);e.childNodes.forEach((function(e){return i.genAdds(e)}))}},this.emit=function(){var e={texts:i.texts.map((function(e){return{id:N.getId(e.node),value:e.value}})).filter((function(e){return N.has(e.id)})),attributes:i.attributes.map((function(e){return{id:N.getId(e.node),attributes:e.attributes}})).filter((function(e){return N.has(e.id)})),removes:i.removes,adds:i.adds};(e.texts.length||e.attributes.length||e.removes.length||e.adds.length)&&(i.emissionCallback(e),i.texts=[],i.attributes=[],i.removes=[],i.adds=[],i.addedSet=new Set,i.movedSet=new Set,i.droppedSet=new Set,i.movedMap={})},this.blockClass=t,this.inlineStylesheet=n,this.maskAllInputs=o,this.emissionCallback=e};function X(e,t){e.delete(t),t.childNodes.forEach((function(t){return X(e,t)}))}function W(e,t){var n=t.parentNode;if(!n)return!1;var r=N.getId(n);return!!e.some((function(e){return e.id===r}))||W(e,n)}function H(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||H(e,n))}function G(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(!A(o.target,n)){var i=N.getId(o.target),a=O(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(C(i,a))})),function(){r.forEach((function(e){return e()}))}}var q,$=["INPUT","TEXTAREA","SELECT"],K=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],Z=new WeakMap;function J(t,r){void 0===r&&(r={}),function(e,t){var n=e.mutationCb,r=e.mousemoveCb,o=e.mouseInteractionCb,a=e.scrollCb,s=e.viewportResizeCb,c=e.inputCb,u=e.mediaInteractionCb,l=e.styleSheetRuleCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,i(e)),n.apply(void 0,i(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,i(e)),r.apply(void 0,i(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,i(e)),o.apply(void 0,i(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,i(e)),a.apply(void 0,i(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,i(e)),s.apply(void 0,i(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,i(e)),c.apply(void 0,i(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,i(e)),u.apply(void 0,i(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,i(e)),l.apply(void 0,i(e))}}(t,r);var o,a,s,c,u,l,d=(o=t.mutationCb,a=t.blockClass,s=t.inlineStylesheet,c=t.maskAllInputs,u=new Y(o,a,s,c),(l=new MutationObserver(u.processMutations)).observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),l),f=function(t,n){var r,o=[],i=x((function(n){var i=Date.now()-r;t(o.map((function(e){return e.timeOffset-=i,e})),n?e.IncrementalSource.TouchMove:e.IncrementalSource.MouseMove),o=[],r=null}),500),a=x((function(e){var t=e.target,n=O(e)?e.changedTouches[0]:e,a=n.clientX,s=n.clientY;r||(r=Date.now()),o.push({x:a,y:s,id:N.getId(t),timeOffset:Date.now()-r}),i(O(e))}),n,{trailing:!1}),s=[C("mousemove",a),C("touchmove",a)];return function(){s.forEach((function(e){return e()}))}}(t.mousemoveCb,t.mousemoveWait),p=G(t.mouseInteractionCb,t.blockClass),m=function(e,t){return C("scroll",x((function(n){if(n.target&&!A(n.target,t)){var r=N.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),h=function(e){return C("resize",x((function(){var t=k(),n=R();e({width:Number(n),height:Number(t)})}),200),window)}(t.viewportResizeCb),v=function(e,t,r,o){function a(e){var n=e.target;if(n&&n.tagName&&!($.indexOf(n.tagName)<0)&&!A(n,t)){var i=n.type;if("password"!==i&&!n.classList.contains(r)){var a=n.value,c=!1,u=K.includes(i)||"TEXTAREA"===n.tagName;"radio"===i||"checkbox"===i?c=n.checked:u&&o&&(a="*".repeat(a.length)),s(n,{text:a,isChecked:c});var l=n.name;"radio"===i&&l&&c&&document.querySelectorAll('input[type="radio"][name="'+l+'"]').forEach((function(e){e!==n&&s(e,{text:e.value,isChecked:!c})}))}}}function s(t,r){var o=Z.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){Z.set(t,r);var i=N.getId(t);e(n(n({},r),{id:i}))}}var c=["input","change"].map((function(e){return C(e,a)})),u=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),l=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return u&&u.set&&c.push.apply(c,i(l.map((function(e){return M(e[0],e[1],{set:function(){a({target:this})}})})))),function(){c.forEach((function(e){return e()}))}}(t.inputCb,t.blockClass,t.ignoreClass,t.maskAllInputs),y=function(e,t){var n=function(n){return function(r){var o=r.target;o&&!A(o,t)&&e({type:"play"===n?j.Play:j.Pause,id:N.getId(o)})}},r=[C("play",n("play")),C("pause",n("pause"))];return function(){r.forEach((function(e){return e()}))}}(t.mediaInteractionCb,t.blockClass),g=function(e){var t=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(n,r){var o=N.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=N.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}}(t.styleSheetRuleCb);return function(){d.disconnect(),f(),p(),m(),h(),v(),y(),g()}}function Q(e){return n(n({},e),{timestamp:Date.now()})}function ee(t){void 0===t&&(t={});var r,i=t.emit,a=t.checkoutEveryNms,s=t.checkoutEveryNth,c=t.blockClass,u=void 0===c?"rr-block":c,l=t.ignoreClass,d=void 0===l?"rr-ignore":l,f=t.inlineStylesheet,p=void 0===f||f,m=t.maskAllInputs,h=void 0!==m&&m,y=t.hooks,g=t.mousemoveWait,b=void 0===g?50:g,E=t.packFn;if(!i)throw new Error("emit function is required");L();var S=0;function w(t){var n,r,i,a;void 0===t&&(t=!1),q(Q({type:e.EventType.Meta,data:{href:window.location.href,width:R(),height:k()}}),t);var s=o(function(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[v(e,e,o,t,!1,n,r),o]}(document,u,p,h),2),c=s[0],l=s[1];if(!c)return console.warn("Failed to snapshot the document");N.map=l,q(Q({type:e.EventType.FullSnapshot,data:{node:c,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(r=null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.parentElement)||void 0===r?void 0:r.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(a=null===(i=null===document||void 0===document?void 0:document.body)||void 0===i?void 0:i.parentElement)||void 0===a?void 0:a.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}}))}q=function(t,n){if(i(E?E(t):t,n),t.type===e.EventType.FullSnapshot)r=t,S=0;else if(t.type===e.EventType.IncrementalSnapshot){S++;var o=s&&S>=s,c=a&&t.timestamp-r.timestamp>a;(o||c)&&w(!0)}};try{var T=[];T.push(C("DOMContentLoaded",(function(){q(Q({type:e.EventType.DomContentLoaded,data:{}}))})));var I=function(){w(),T.push(J({mutationCb:function(t){return q(Q({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Mutation},t)}))},mousemoveCb:function(t,n){return q(Q({type:e.EventType.IncrementalSnapshot,data:{source:n,positions:t}}))},mouseInteractionCb:function(t){return q(Q({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.MouseInteraction},t)}))},scrollCb:function(t){return q(Q({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Scroll},t)}))},viewportResizeCb:function(t){return q(Q({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.ViewportResize},t)}))},inputCb:function(t){return q(Q({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Input},t)}))},mediaInteractionCb:function(t){return q(Q({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.MediaInteraction},t)}))},styleSheetRuleCb:function(t){return q(Q({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.StyleSheetRule},t)}))},blockClass:u,ignoreClass:d,maskAllInputs:h,inlineStylesheet:p,mousemoveWait:b},y))};return"interactive"===document.readyState||"complete"===document.readyState?I():T.push(C("load",(function(){q(Q({type:e.EventType.Load,data:{}})),I()}),window)),function(){T.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}function te(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)}))}}}ee.addCustomEvent=function(t,n){if(!q)throw new Error("please add custom event after start recording");q(Q({type:e.EventType.Custom,data:{tag:t,payload:n}}))};var ne=Object.freeze({__proto__:null,default:te});var re,oe=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){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={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||s,scrollIntoView:r.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(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):o.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]&&(c(arguments[0])?o.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!==c(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");o.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!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.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!==c(arguments[0])){var n=f(this),r=n.getBoundingClientRect(),i=this.getBoundingClientRect();n!==t.body?(m.call(this,n,n.scrollLeft+i.left-r.left,n.scrollTop+i.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function c(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+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function l(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function d(e){var t=u(e,"Y")&&l(e,"Y"),n=u(e,"X")&&l(e,"X");return t||n}function f(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}function p(t){var n,r,o,a,s=(i()-t.startTime)/468;a=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*a)),r=t.startX+(t.x-t.startX)*n,o=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,o),r===t.x&&o===t.y||e.requestAnimationFrame(p.bind(e,t))}function m(n,r,a){var c,u,l,d,f=i();n===t.body?(c=e,u=e.scrollX||e.pageXOffset,l=e.scrollY||e.pageYOffset,d=o.scroll):(c=n,u=n.scrollLeft,l=n.scrollTop,d=s),p({scrollable:c,method:d,startTime:f,startX:u,startY:l,x:r,y:a})}}}})).polyfill,ie=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,i(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}();function ae(t,n){if(t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.MouseMove){var r=t.data.positions[0].timeOffset,o=t.timestamp+r;return t.delay=o-n,o-n}return t.delay=t.timestamp-n,t.timestamp-n}
***************************************************************************** */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 r(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 o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function i(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(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"}(t||(t={}));var a=1,s=RegExp("[^a-z1-6-]");function c(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)?c(n.styleSheet)||"":n.cssText);var n}),""):null}catch(e){return null}}var u=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,l=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,d=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function p(e,t){return(e||"").replace(u,(function(e,n,r,o){var i,a=n||r||o;if(!a)return e;if(!l.test(a))return"url('"+a+"')";if(d.test(a))return"url("+a+")";if("/"===a[0])return"url('"+(((i=t).indexOf("//")>-1?i.split("/").slice(0,3).join("/"):i.split("/")[0]).split("?")[0]+a+"')");var s=t.split("/"),c=a.split("/");s.pop();for(var u=0,p=c;u<p.length;u++){var f=p[u];"."!==f&&(".."===f?s.pop():s.push(f))}return"url('"+s.join("/")+"')"}))}function f(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function h(e,t,n){return"src"===t||"href"===t&&n?f(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?f(e,n[0])+" "+n[1]:1===n.length?""+f(e,n[0]):""})).join(",")}(e,n):"style"===t&&n?p(n,location.href):n}function m(e,n,r,o,i){switch(void 0===i&&(i={}),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 a=!1;"string"==typeof r?a=e.classList.contains(r):e.classList.forEach((function(e){r.test(e)&&(a=!0)}));for(var u=function(e){var t=e.toLowerCase().trim();return s.test(t)?"div":t}(e.tagName),l={},d=0,f=Array.from(e.attributes);d<f.length;d++){var m=f[d],v=m.name,y=m.value;l[v]=h(n,v,y)}if("link"===u&&o){var g,b=Array.from(n.styleSheets).find((function(t){return t.href===e.href}));(g=c(b))&&(delete l.rel,delete l.href,l._cssText=p(g,b.href))}if("style"===u&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(g=c(e.sheet))&&(l._cssText=p(g,location.href));if("input"===u||"textarea"===u||"select"===u){y=e.value;"radio"!==l.type&&"checkbox"!==l.type&&"submit"!==l.type&&"button"!==l.type&&y?l.value=i[l.type]||i[u]?"*".repeat(y.length):y:e.checked&&(l.checked=e.checked)}if("option"===u){var E=e.parentElement;l.value===E.value&&(l.selected=e.selected)}if("canvas"===u&&(l.rr_dataURL=e.toDataURL()),"audio"!==u&&"video"!==u||(l.rr_mediaState=e.paused?"paused":"played"),a){var S=e.getBoundingClientRect(),I=S.width,w=S.height;l.rr_width=I+"px",l.rr_height=w+"px"}return{type:t.Element,tagName:u,attributes:l,childNodes:[],isSVG:(M=e,"svg"===M.tagName||M instanceof SVGElement||void 0),needBlock:a};case e.TEXT_NODE:var x=e.parentNode&&e.parentNode.tagName,T=e.textContent,C="STYLE"===x||void 0;return C&&T&&(T=p(T,location.href)),"SCRIPT"===x&&(T="SCRIPT_PLACEHOLDER"),{type:t.Text,textContent:T||"",isStyle:C};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 M}function v(e,n,r,o,i,s,c){void 0===i&&(i=!1),void 0===s&&(s=!0);var u,l=m(e,n,o,s,c);if(!l)return console.warn(e,"not serialized"),null;u="__sn"in e?e.__sn.id:a++;var d=Object.assign(l,{id:u});e.__sn=d,r[u]=e;var p=!i;if(d.type===t.Element&&(p=p&&!d.needBlock,delete d.needBlock),(d.type===t.Document||d.type===t.Element)&&p)for(var f=0,h=Array.from(e.childNodes);f<h.length;f++){var y=v(h[f],n,r,o,i,s,c);y&&d.childNodes.push(y)}return d}var y=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function g(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(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 u(){return p(/^{\s*/)}function l(){return p(/^}/)}function d(){var t,n=[];for(f(),h(n);e.length&&"}"!==e.charAt(0)&&(t=M()||N());)!1!==t&&(n.push(t),h(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 h(e){var t;for(void 0===e&&(e=[]);t=m();)!1!==t&&e.push(t),t=m();return e}function m(){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 b(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 g(){var e=i(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=b(t[0]);if(!p(/^:\s*/))return c("property missing ':'");var r=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:n.replace(y,""),value:r?b(r[0]).replace(y,""):""});return p(/^[;\s]*/),o}}function E(){var e,t=[];if(!u())return c("missing '{'");for(h(t);e=g();)!1!==e&&(t.push(e),h(t)),e=g();return l()?t:c("missing '}'")}function S(){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:E()})}var I,w=C("import"),x=C("charset"),T=C("namespace");function C(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 M(){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(!u())return c("@keyframes missing '{'");for(var a=h();r=S();)a.push(r),a=a.concat(h());return l()?e({type:"keyframes",name:o,vendor:n,keyframes:a}):c("@keyframes missing '}'")}}()||function(){var e=i(),t=p(/^@media *([^{]+)/);if(t){var n=b(t[1]);if(!u())return c("@media missing '{'");var r=h().concat(d());return l()?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:b(t[1]),media:b(t[2])})}()||function(){var e=i(),t=p(/^@supports *([^{]+)/);if(t){var n=b(t[1]);if(!u())return c("@supports missing '{'");var r=h().concat(d());return l()?e({type:"supports",supports:n,rules:r}):c("@supports missing '}'")}}()||w()||x()||T()||function(){var e=i(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var n=b(t[1]),r=b(t[2]);if(!u())return c("@document missing '{'");var o=h().concat(d());return l()?e({type:"document",document:r,vendor:n,rules:o}):c("@document missing '}'")}}()||function(){var e=i();if(p(/^@page */)){var t=v()||[];if(!u())return c("@page missing '{'");for(var n,r=h();n=g();)r.push(n),r=r.concat(h());return l()?e({type:"page",selectors:t,declarations:r}):c("@page missing '}'")}}()||function(){var e=i();if(p(/^@host\s*/)){if(!u())return c("@host missing '{'");var t=h().concat(d());return l()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=i();if(p(/^@font-face\s*/)){if(!u())return c("@font-face missing '{'");for(var t,n=h();t=g();)n.push(t),n=n.concat(h());return l()?e({type:"font-face",declarations:n}):c("@font-face missing '}'")}}()}function N(){var e=i(),t=v();return t?(h(),e({type:"rule",selectors:t,declarations:E()})):c("selector missing")}return function e(t,n){for(var r=t&&"string"==typeof t.type,o=r?t:n,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 b(e){return e?e.replace(/^\s+|\s+$/g,""):""}var E={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 S,I,w,x,T,C=/([^\\]):hover/g;function M(e){var t=g(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach((function(t){"selectors"in t&&(t.selectors||[]).forEach((function(t){if(C.test(t)){var n=t.replace(C,"$1.\\:hover");e=e.replace(t,t+", "+n)}}))})),e):e}function N(e,n,r){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 o,i=function(e){var t=E[e.tagName]?E[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);o=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",i):n.createElement(i);var a=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var a=e.attributes[t];if(a="boolean"==typeof a?"":a,t.startsWith("rr_")){if("canvas"===i&&"rr_dataURL"===t){var s=document.createElement("img");s.src=a,s.onload=function(){var e=o.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(o.style.width=a),"rr_height"===t&&(o.style.height=a),"rr_mediaState"===t)switch(a){case"played":o.play();case"paused":o.pause()}}else{var c="textarea"===i&&"value"===t,u="style"===i&&"_cssText"===t;if(u&&r&&(a=M(a)),c||u){for(var l=n.createTextNode(a),d=0,p=Array.from(o.childNodes);d<p.length;d++){var f=p[d];f.nodeType===o.TEXT_NODE&&o.removeChild(f)}return o.appendChild(l),"continue"}if("iframe"===i&&"src"===t)return"continue";try{e.isSVG&&"xlink:href"===t?o.setAttributeNS("http://www.w3.org/1999/xlink",t,a):"onload"==t||"onclick"==t||"onmouse"==t.substring(0,7)?o.setAttribute("_"+t,a):o.setAttribute(t,a)}catch(e){}}};for(var s in e.attributes)a(s);return o;case t.Text:return n.createTextNode(e.isStyle&&r?M(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function k(e,n,r,o,i){void 0===o&&(o=!1),void 0===i&&(i=!0);var a=N(e,n,i);if(!a)return null;if(e.type===t.Document&&(n.close(),n.open(),a=n),a.__sn=e,r[e.id]=a,(e.type===t.Document||e.type===t.Element)&&!o)for(var s=0,c=e.childNodes;s<c.length;s++){var u=c[s],l=k(u,n,r,!1,i);l?a.appendChild(l):console.warn("Failed to rebuild",u)}return a}function R(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)}}(S=e.EventType||(e.EventType={}))[S.DomContentLoaded=0]="DomContentLoaded",S[S.Load=1]="Load",S[S.FullSnapshot=2]="FullSnapshot",S[S.IncrementalSnapshot=3]="IncrementalSnapshot",S[S.Meta=4]="Meta",S[S.Custom=5]="Custom",(I=e.IncrementalSource||(e.IncrementalSource={}))[I.Mutation=0]="Mutation",I[I.MouseMove=1]="MouseMove",I[I.MouseInteraction=2]="MouseInteraction",I[I.Scroll=3]="Scroll",I[I.ViewportResize=4]="ViewportResize",I[I.Input=5]="Input",I[I.TouchMove=6]="TouchMove",I[I.MediaInteraction=7]="MediaInteraction",I[I.StyleSheetRule=8]="StyleSheetRule",(w=e.MouseInteractions||(e.MouseInteractions={}))[w.MouseUp=0]="MouseUp",w[w.MouseDown=1]="MouseDown",w[w.Click=2]="Click",w[w.ContextMenu=3]="ContextMenu",w[w.DblClick=4]="DblClick",w[w.Focus=5]="Focus",w[w.Blur=6]="Blur",w[w.TouchStart=7]="TouchStart",w[w.TouchMove_Departed=8]="TouchMove_Departed",w[w.TouchEnd=9]="TouchEnd",function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(x||(x={})),(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",T.EventCast="event-cast",T.CustomEvent="custom-event",T.Flush="flush";var _={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return _.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete _.map[t],e.childNodes&&e.childNodes.forEach((function(e){return _.removeNodeFromMap(e)}))},has:function(e){return _.map.hasOwnProperty(e)}};function O(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,u=arguments;s<=0||s>t?(r&&(window.clearTimeout(r),r=null),o=a,e.apply(c,u)):r||!1===n.trailing||(r=window.setTimeout((function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(c,u)}),s))}}function A(e,t,n,r,o){void 0===o&&(o=window);var i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),i&&i.set&&i.set.call(this,e)}}),function(){return A(e,t,i||{},!0)}}function L(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function D(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function F(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||F(e.parentNode,t)}return F(e.parentNode,t)}function P(e){var t=_.getId(e);return!_.has(t)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||P(e.parentNode))}function j(e){return Boolean(e.changedTouches)}function z(){"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)}function B(t){switch(t.type){case e.EventType.DomContentLoaded:case e.EventType.Load:case e.EventType.Custom:return!1;case e.EventType.FullSnapshot:case e.EventType.Meta:return!0}switch(t.data.source){case e.IncrementalSource.MouseMove:case e.IncrementalSource.MouseInteraction:case e.IncrementalSource.TouchMove:case e.IncrementalSource.MediaInteraction:return!1;case e.IncrementalSource.ViewportResize:case e.IncrementalSource.StyleSheetRule:case e.IncrementalSource.Scroll:case e.IncrementalSource.Input:return!0}return!0}var V=function(){function t(){this.reset()}return t.prototype.add=function(e){var t=this.indexes.get(e.parentId),n={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(n.parent=t,t.children[n.id]=n):this.tree[n.id]=n,this.indexes.set(n.id,n)},t.prototype.remove=function(e){var t=this,n=this.indexes.get(e.parentId),r=this.indexes.get(e.id),o=function(e){t.removeIdSet.add(e);var n=_.getNode(e);null==n||n.childNodes.forEach((function(e){return o(e.__sn.id)}))},i=function(n){t.removeIdSet.add(n.id),Object.values(n.children).forEach((function(e){return i(e)}));var r=t.indexes.get(n.id);if(r){var o=r.parent;o&&(delete r.parent,delete o.children[r.id],t.indexes.delete(e.id))}};r?n?(delete r.parent,delete n.children[r.id],this.indexes.delete(e.id),i(r)):(delete this.tree[r.id],this.indexes.delete(r.id),i(r)):(this.removeNodeMutations.push(e),o(e.id))},t.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},t.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},t.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},t.prototype.input=function(e){this.inputMap.set(e.id,e)},t.prototype.flush=function(){var t,n,o,i,a=this,s=this.tree,c=this.removeNodeMutations,u=this.textMutations,l=this.attributeMutations,d={source:e.IncrementalSource.Mutation,removes:c,texts:u,attributes:l,adds:[]},p=function(e,t){t&&a.removeIdSet.add(e.id),d.texts=d.texts.concat(t?[]:e.texts).filter((function(e){return!a.removeIdSet.has(e.id)})),d.attributes=d.attributes.concat(t?[]:e.attributes).filter((function(e){return!a.removeIdSet.has(e.id)})),a.removeIdSet.has(e.id)||a.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return p(e,!0)})):(d.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return p(e,!1)})))};Object.values(s).forEach((function(e){return p(e,!1)}));try{for(var f=r(this.scrollMap.keys()),h=f.next();!h.done;h=f.next()){var m=h.value;this.removeIdSet.has(m)&&this.scrollMap.delete(m)}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}try{for(var v=r(this.inputMap.keys()),y=v.next();!y.done;y=v.next()){m=y.value;this.removeIdSet.has(m)&&this.inputMap.delete(m)}}catch(e){o={error:e}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}var g=new Map(this.scrollMap),b=new Map(this.inputMap);return this.reset(),{mutationData:d,scrollMap:g,inputMap:b}},t.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},t}(),U=Object.freeze({__proto__:null,on:R,mirror:_,throttle:O,hookSetter:A,patch:function(e,t,n){if(!(t in e))return function(){};var r=e[t],o=n(r);if("function"==typeof o)try{o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})}catch(e){}return e[t]=o,function(){e[t]=r}},getWindowHeight:L,getWindowWidth:D,isBlocked:F,isAncestorRemoved:P,isTouchEvent:j,polyfill:z,needCastInSyncMode:B,TreeIndex:V}),Y=function(e,t){return e+"@"+t};function X(e){return"__sn"in e}var H=function(e,t,n,o){var i=this;this.texts=[],this.attributes=[],this.removes=[],this.adds=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(e){var t,n,o,a;e.forEach(i.processMutation);var s=[],c=function(e){var t=_.getId(e.parentNode),n=e.nextSibling&&_.getId(e.nextSibling);if(-1===t||-1===n)return s.push(e);i.adds.push({parentId:t,nextId:n,node:v(e,document,_.map,i.blockClass,!0,i.inlineStylesheet,i.maskInputOptions)})};try{for(var u=r(i.movedSet),l=u.next();!l.done;l=u.next())c(f=l.value)}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}try{for(var d=r(i.addedSet),p=d.next();!p.done;p=d.next()){var f=p.value;q(i.droppedSet,f)||G(i.removes,f)?q(i.movedSet,f)?c(f):i.droppedSet.add(f):c(f)}}catch(e){o={error:e}}finally{try{p&&!p.done&&(a=d.return)&&a.call(d)}finally{if(o)throw o.error}}for(;s.length&&!s.every((function(e){return-1===_.getId(e.parentNode)}));)c(s.shift());i.emit()},this.emit=function(){var e={texts:i.texts.map((function(e){return{id:_.getId(e.node),value:e.value}})).filter((function(e){return _.has(e.id)})),attributes:i.attributes.map((function(e){return{id:_.getId(e.node),attributes:e.attributes}})).filter((function(e){return _.has(e.id)})),removes:i.removes,adds:i.adds};(e.texts.length||e.attributes.length||e.removes.length||e.adds.length)&&(i.emissionCallback(e),i.texts=[],i.attributes=[],i.removes=[],i.adds=[],i.addedSet=new Set,i.movedSet=new Set,i.droppedSet=new Set,i.movedMap={})},this.processMutation=function(e){switch(e.type){case"characterData":var t=e.target.textContent;F(e.target,i.blockClass)||t===e.oldValue||i.texts.push({value:t,node:e.target});break;case"attributes":if(t=e.target.getAttribute(e.attributeName),F(e.target,i.blockClass)||t===e.oldValue)return;var n=i.attributes.find((function(t){return t.node===e.target}));n||(n={node:e.target,attributes:{}},i.attributes.push(n)),n.attributes[e.attributeName]=h(document,e.attributeName,t);break;case"childList":e.addedNodes.forEach((function(t){return i.genAdds(t,e.target)})),e.removedNodes.forEach((function(t){var n=_.getId(t),r=_.getId(e.target);F(t,i.blockClass)||(i.addedSet.has(t)?(W(i.addedSet,t),i.droppedSet.add(t)):i.addedSet.has(e.target)&&-1===n||P(e.target)||(i.movedSet.has(t)&&i.movedMap[Y(n,r)]?W(i.movedSet,t):i.removes.push({parentId:r,id:n})),_.removeNodeFromMap(t))}))}},this.genAdds=function(e,t){if(!F(e,i.blockClass)){if(X(e)){i.movedSet.add(e);var n=null;t&&X(t)&&(n=t.__sn.id),n&&(i.movedMap[Y(e.__sn.id,n)]=!0)}else i.addedSet.add(e),i.droppedSet.delete(e);e.childNodes.forEach((function(e){return i.genAdds(e)}))}},this.blockClass=t,this.inlineStylesheet=n,this.maskInputOptions=o,this.emissionCallback=e};function W(e,t){e.delete(t),t.childNodes.forEach((function(t){return W(e,t)}))}function G(e,t){var n=t.parentNode;if(!n)return!1;var r=_.getId(n);return!!e.some((function(e){return e.id===r}))||G(e,n)}function q(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||q(e,n))}function $(t,n,r){if(!1===r.mouseInteraction)return function(){};var o=!0===r.mouseInteraction||void 0===r.mouseInteraction?{}:r.mouseInteraction,i=[];return Object.keys(e.MouseInteractions).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]})).forEach((function(r){var o=r.toLowerCase(),a=function(r){return function(o){if(!F(o.target,n)){var i=_.getId(o.target),a=j(o)?o.changedTouches[0]:o,s=a.clientX,c=a.clientY;t({type:e.MouseInteractions[r],id:i,x:s,y:c})}}}(r);i.push(R(o,a))})),function(){i.forEach((function(e){return e()}))}}var K,Z=["INPUT","TEXTAREA","SELECT"],J=new WeakMap;function Q(t,r){void 0===r&&(r={}),function(e,t){var n=e.mutationCb,r=e.mousemoveCb,o=e.mouseInteractionCb,a=e.scrollCb,s=e.viewportResizeCb,c=e.inputCb,u=e.mediaInteractionCb,l=e.styleSheetRuleCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,i(e)),n.apply(void 0,i(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,i(e)),r.apply(void 0,i(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,i(e)),o.apply(void 0,i(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,i(e)),a.apply(void 0,i(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,i(e)),s.apply(void 0,i(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,i(e)),c.apply(void 0,i(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,i(e)),u.apply(void 0,i(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,i(e)),l.apply(void 0,i(e))}}(t,r);var o,a,s,c,u,l,d=(o=t.mutationCb,a=t.blockClass,s=t.inlineStylesheet,c=t.maskInputOptions,u=new H(o,a,s,c),(l=new MutationObserver(u.processMutations)).observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),l),p=function(t,n){if(!1===n.mousemove)return function(){};var r,o="number"==typeof n.mousemove?n.mousemove:50,i=[],a=O((function(n){var o=Date.now()-r;t(i.map((function(e){return e.timeOffset-=o,e})),n?e.IncrementalSource.TouchMove:e.IncrementalSource.MouseMove),i=[],r=null}),500),s=O((function(e){var t=e.target,n=j(e)?e.changedTouches[0]:e,o=n.clientX,s=n.clientY;r||(r=Date.now()),i.push({x:o,y:s,id:_.getId(t),timeOffset:Date.now()-r}),a(j(e))}),o,{trailing:!1}),c=[R("mousemove",s),R("touchmove",s)];return function(){c.forEach((function(e){return e()}))}}(t.mousemoveCb,t.sampling),f=$(t.mouseInteractionCb,t.blockClass,t.sampling),h=function(e,t,n){return R("scroll",O((function(n){if(n.target&&!F(n.target,t)){var r=_.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})}}),n.scroll||100))}(t.scrollCb,t.blockClass,t.sampling),m=function(e){return R("resize",O((function(){var t=L(),n=D();e({width:Number(n),height:Number(t)})}),200),window)}(t.viewportResizeCb),v=function(e,t,r,o,a){function s(e){var n=e.target;if(n&&n.tagName&&!(Z.indexOf(n.tagName)<0)&&!F(n,t)){var i=n.type;if("password"!==i&&!n.classList.contains(r)){var a=n.value,s=!1;"radio"===i||"checkbox"===i?s=n.checked:(o[n.tagName.toLowerCase()]||o[i])&&(a="*".repeat(a.length)),c(n,{text:a,isChecked:s});var u=n.name;"radio"===i&&u&&s&&document.querySelectorAll('input[type="radio"][name="'+u+'"]').forEach((function(e){e!==n&&c(e,{text:e.value,isChecked:!s})}))}}}function c(t,r){var o=J.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){J.set(t,r);var i=_.getId(t);e(n(n({},r),{id:i}))}}var u=("last"===a.input?["change"]:["input","change"]).map((function(e){return R(e,s)})),l=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),d=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return l&&l.set&&u.push.apply(u,i(d.map((function(e){return A(e[0],e[1],{set:function(){s({target:this})}})})))),function(){u.forEach((function(e){return e()}))}}(t.inputCb,t.blockClass,t.ignoreClass,t.maskInputOptions,t.sampling),y=function(e,t){var n=function(n){return function(r){var o=r.target;o&&!F(o,t)&&e({type:"play"===n?x.Play:x.Pause,id:_.getId(o)})}},r=[R("play",n("play")),R("pause",n("pause"))];return function(){r.forEach((function(e){return e()}))}}(t.mediaInteractionCb,t.blockClass),g=function(e){var t=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(n,r){var o=_.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=_.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}}(t.styleSheetRuleCb);return function(){d.disconnect(),p(),f(),h(),m(),v(),y(),g()}}function ee(e){return n(n({},e),{timestamp:Date.now()})}function te(t){void 0===t&&(t={});var r=t.emit,i=t.checkoutEveryNms,a=t.checkoutEveryNth,s=t.blockClass,c=void 0===s?"rr-block":s,u=t.ignoreClass,l=void 0===u?"rr-ignore":u,d=t.inlineStylesheet,p=void 0===d||d,f=t.maskAllInputs,h=t.maskInputOptions,m=t.hooks,y=t.packFn,g=t.sampling,b=void 0===g?{}:g,E=t.mousemoveWait;if(!r)throw new Error("emit function is required");void 0!==E&&void 0===b.mousemove&&(b.mousemove=E);var S,I=!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:void 0!==h?h:{};z();var w=0;function x(t){var n,r,i,a;void 0===t&&(t=!1),K(ee({type:e.EventType.Meta,data:{href:window.location.href,width:D(),height:L()}}),t);var s=o(function(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0);var o={};return[v(e,e,o,t,!1,n,!0===r?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0}:!1===r?{}:r),o]}(document,c,p,I),2),u=s[0],l=s[1];if(!u)return console.warn("Failed to snapshot the document");_.map=l,K(ee({type:e.EventType.FullSnapshot,data:{node:u,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(r=null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.parentElement)||void 0===r?void 0:r.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(a=null===(i=null===document||void 0===document?void 0:document.body)||void 0===i?void 0:i.parentElement)||void 0===a?void 0:a.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}}))}K=function(t,n){if(r(y?y(t):t,n),t.type===e.EventType.FullSnapshot)S=t,w=0;else if(t.type===e.EventType.IncrementalSnapshot){w++;var o=a&&w>=a,s=i&&t.timestamp-S.timestamp>i;(o||s)&&x(!0)}};try{var T=[];T.push(R("DOMContentLoaded",(function(){K(ee({type:e.EventType.DomContentLoaded,data:{}}))})));var C=function(){x(),T.push(Q({mutationCb:function(t){return K(ee({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Mutation},t)}))},mousemoveCb:function(t,n){return K(ee({type:e.EventType.IncrementalSnapshot,data:{source:n,positions:t}}))},mouseInteractionCb:function(t){return K(ee({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.MouseInteraction},t)}))},scrollCb:function(t){return K(ee({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Scroll},t)}))},viewportResizeCb:function(t){return K(ee({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.ViewportResize},t)}))},inputCb:function(t){return K(ee({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Input},t)}))},mediaInteractionCb:function(t){return K(ee({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.MediaInteraction},t)}))},styleSheetRuleCb:function(t){return K(ee({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.StyleSheetRule},t)}))},blockClass:c,ignoreClass:l,maskInputOptions:I,inlineStylesheet:p,sampling:b},m))};return"interactive"===document.readyState||"complete"===document.readyState?C():T.push(R("load",(function(){K(ee({type:e.EventType.Load,data:{}})),C()}),window)),function(){T.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}function ne(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)}))}}}te.addCustomEvent=function(t,n){if(!K)throw new Error("please add custom event after start recording");K(ee({type:e.EventType.Custom,data:{tag:t,payload:n}}))};var re=Object.freeze({__proto__:null,default:ne});var oe,ie=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){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={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||s,scrollIntoView:r.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(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):o.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]&&(c(arguments[0])?o.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!==c(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");o.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!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.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!==c(arguments[0])){var n=p(this),r=n.getBoundingClientRect(),i=this.getBoundingClientRect();n!==t.body?(h.call(this,n,n.scrollLeft+i.left-r.left,n.scrollTop+i.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function c(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+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function l(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function d(e){var t=u(e,"Y")&&l(e,"Y"),n=u(e,"X")&&l(e,"X");return t||n}function p(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}function f(t){var n,r,o,a,s=(i()-t.startTime)/468;a=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*a)),r=t.startX+(t.x-t.startX)*n,o=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,o),r===t.x&&o===t.y||e.requestAnimationFrame(f.bind(e,t))}function h(n,r,a){var c,u,l,d,p=i();n===t.body?(c=e,u=e.scrollX||e.pageXOffset,l=e.scrollY||e.pageYOffset,d=o.scroll):(c=n,u=n.scrollLeft,l=n.scrollTop,d=s),f({scrollable:c,method:d,startTime:p,startX:u,startY:l,x:r,y:a})}}}})).polyfill,ae=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,i(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}();function se(t,n){if(t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.MouseMove){var r=t.data.positions[0].timeOffset,o=t.timestamp+r;return t.delay=o-n,o-n}return t.delay=t.timestamp-n,t.timestamp-n}
/*! *****************************************************************************

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

and limitations under the License.
***************************************************************************** */!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(re||(re={}));var se={type:"xstate.init"};function ce(e){return void 0===e?[]:[].concat(e)}function ue(e){return{type:"xstate.assign",assignment:e}}function le(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function de(e){return function(t){return e===t}}function fe(e){return"string"==typeof e?{type:e}:e}function pe(e,t){return{value:e,context:t,actions:[],changed:!1,matches:de(e)}}var me=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function he(t,o){var i=o.getCastFn,a=o.emitter;return function(e){var t=e.initialState,n=re.NotStarted,r=new Set,o={_machine:e,send:function(o){n===re.Running&&(t=e.transition(t,o),me(t,fe(o)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(){return n=re.Running,me(t,se),o},stop:function(){return n=re.Stopped,r.clear(),o},get state(){return t},get status(){return n}};return o}(function(e,t){void 0===t&&(t={});var n={config:e,_options:t,initialState:{value:e.initial,actions:ce(e.states[e.initial].entry).map((function(e){return le(e,t.actions)})),context:e.context,matches:de(e.initial)},transition:function(t,r){var o,i,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,c=a.context,u=fe(r),l=e.states[s];if(l.on){var d=ce(l.on[u.type]),f=function(t){if(void 0===t)return{value:pe(s,c)};var r="string"==typeof t?{target:t}:t,o=r.target,i=void 0===o?s:o,a=r.actions,d=void 0===a?[]:a,f=r.cond,p=c;if((void 0===f?function(){return!0}:f)(c,u)){var m=e.states[i],h=!1,v=[].concat(l.exit,d,m.entry).filter((function(e){return e})).map((function(e){return le(e,n._options.actions)})).filter((function(e){if("xstate.assign"===e.type){h=!0;var t=Object.assign({},p);return"function"==typeof e.assignment?t=e.assignment(p,u):Object.keys(e.assignment).forEach((function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](p,u):e.assignment[n]})),p=t,!1}return!0}));return{value:{value:i,context:p,actions:v,changed:i!==s||v.length>0||h,matches:de(i)}}}};try{for(var p=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}(d),m=p.next();!m.done;m=p.next()){var h=f(m.value);if("object"==typeof h)return h.value}}catch(e){o={error:e}}finally{try{m&&!m.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}}return pe(s,c)}};return n}({id:"player",context:t,initial:"inited",states:{inited:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},TO_LIVE:{target:"live",actions:["startLive"]}}},playing:{on:{PAUSE:{target:"paused",actions:["pause"]},END:"ended",FAST_FORWARD:"skipping",CAST_EVENT:{target:"playing",actions:"castEvent"}}},paused:{on:{RESUME:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"}}},skipping:{on:{BACK_TO_NORMAL:"playing"}},ended:{on:{REPLAY:"playing"}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]}}}}},{actions:{castEvent:ue({lastPlayedEvent:function(e,n){return"CAST_EVENT"===n.type?n.payload.event:t.lastPlayedEvent}}),recordTimeOffset:ue((function(e,t){var r=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(r=t.payload.timeOffset),n(n({},e),{timeOffset:r,baselineTime:e.events[0].timestamp+r})})),play:function(t){var n,o,s=t.timer,c=t.events,u=t.baselineTime,l=t.lastPlayedEvent;s.clear();var d=new Array,f=function(t){if(l&&(t.timestamp<=l.timestamp||t===l))return"continue";var n=t.timestamp<u,r=i(t,n);n?r():d.push({doAction:function(){r(),a.emit(e.ReplayerEvents.EventCast,t)},delay:ae(t,u)})};try{for(var p=r(c),m=p.next();!m.done;m=p.next()){f(m.value)}}catch(e){n={error:e}}finally{try{m&&!m.done&&(o=p.return)&&o.call(p)}finally{if(n)throw n.error}}s.addActions(d),s.start()},pause:function(e){e.timer.clear()},startLive:ue({baselineTime:function(e,t){return e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:ue((function(t,r){var o=t.baselineTime,s=t.timer,c=t.events;if("ADD_EVENT"===r.type){var u=r.payload.event;c.push(u);var l=u.timestamp<o,d=i(u,l);l?d():s.addAction({doAction:function(){d(),a.emit(e.ReplayerEvents.EventCast,u)},delay:ae(u,o)})}return n(n({},t),{events:c})}))}}))}var ve=te||ne,ye={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0},ge=function(){function t(t,n){if(this.emitter=ve(),this.noramlSpeed=-1,this.legacy_missingNodeRetryMap={},!(null==n?void 0:n.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");this.config=Object.assign({},ye,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on("resize",this.handleResize),oe(),L(),this.setupDom(),this.service=he({events:t.map((function(e){return n&&n.unpackFn?n.unpackFn(e):e})),timer:new ie(this.config),speed:(null==n?void 0:n.speed)||ye.speed,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){e.changed}));var r=this.service.state.context.events,o=r.find((function(t){return t.type===e.EventType.Meta})),i=r.find((function(t){return t.type===e.EventType.FullSnapshot}));if(o){var a=o.data,s=a.width,c=a.height;this.emitter.emit(e.ReplayerEvents.Resize,{width:s,height:c})}i&&this.rebuildFullSnapshot(i)}return Object.defineProperty(t.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),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.service.state.context.events,t=e[0];return{totalTime:e[e.length-1].timestamp-t.timestamp}},t.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},t.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},t.prototype.play=function(t){void 0===t&&(t=0),this.service.send({type:"PLAY",payload:{timeOffset:t}}),this.emitter.emit(e.ReplayerEvents.Start)},t.prototype.pause=function(){this.service.send({type:"PAUSE"}),this.emitter.emit(e.ReplayerEvents.Pause)},t.prototype.resume=function(t){void 0===t&&(t=0),this.service.send({type:"RESUME",payload:{timeOffset:t}}),this.emitter.emit(e.ReplayerEvents.Resume)},t.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},t.prototype.addEvent=function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))},t.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},t.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},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.disableInteract(),this.wrapper.appendChild(this.iframe)},t.prototype.handleResize=function(e){this.iframe.setAttribute("width",String(e.width)),this.iframe.setAttribute("height",String(e.height))},t.prototype.getCastFn=function(t,n){var o=this;void 0===n&&(n=!1);var i,a=this.service.state.context.events;switch(t.type){case e.EventType.DomContentLoaded:case e.EventType.Load:break;case e.EventType.Custom:i=function(){o.emitter.emit(e.ReplayerEvents.CustomEvent,t)};break;case e.EventType.Meta:i=function(){return o.emitter.emit(e.ReplayerEvents.Resize,{width:t.data.width,height:t.data.height})};break;case e.EventType.FullSnapshot:i=function(){o.rebuildFullSnapshot(t),o.iframe.contentWindow.scrollTo(t.data.initialOffset)};break;case e.EventType.IncrementalSnapshot:i=function(){var i,s;if(o.applyIncremental(t,n),t===o.nextUserInteractionEvent&&(o.nextUserInteractionEvent=null,o.restoreSpeed()),o.config.skipInactive&&!o.nextUserInteractionEvent){try{for(var c=r(a),u=c.next();!u.done;u=c.next()){var l=u.value;if(!(l.timestamp<=t.timestamp)&&o.isUserInteraction(l)){l.delay-t.delay>1e4*o.config.speed&&(o.nextUserInteractionEvent=l);break}}}catch(e){i={error:e}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(i)throw i.error}}if(o.nextUserInteractionEvent){o.noramlSpeed=o.config.speed;var d=o.nextUserInteractionEvent.delay-t.delay,f={speed:Math.min(Math.round(d/5e3),360)};o.setConfig(f),o.emitter.emit(e.ReplayerEvents.SkipStart,f)}}}}return function(){i&&i(),o.service.send({type:"CAST_EVENT",payload:{event:t}}),t===a[a.length-1]&&(o.restoreSpeed(),o.service.send("END"),o.emitter.emit(e.ReplayerEvents.Finish))}},t.prototype.rebuildFullSnapshot=function(t){Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={},N.map=function(e,t,n){void 0===n&&(n=!0);var r={};return[I(e,t,r,!1,n),r]}(t.data.node,this.iframe.contentDocument)[1];var n=document.createElement("style"),r=this.iframe.contentDocument,o=r.documentElement,i=r.head;o.insertBefore(n,i);for(var a,s=(a=this.config.blockClass,["iframe, ."+a+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules),c=0;c<s.length;c++)n.sheet.insertRule(s[c],c);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,i=this.service.state;n.querySelectorAll('link[rel="stylesheet"]').forEach((function(n){n.sheet||(o.add(n),n.addEventListener("load",(function(){o.delete(n),0===o.size&&-1!==r&&(i.matches("playing")&&t.resume(t.getCurrentTime()),t.emitter.emit(e.ReplayerEvents.LoadStylesheetEnd),r&&window.clearTimeout(r))})))})),o.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(e.ReplayerEvents.LoadStylesheetStart),r=window.setTimeout((function(){i.matches("playing")&&t.resume(t.getCurrentTime()),r=-1}),this.config.loadTimeout))}},t.prototype.applyIncremental=function(t,r){var o=this,i=this.service.state.context.baselineTime,a=t.data;switch(a.source){case e.IncrementalSource.Mutation:a.removes.forEach((function(e){var t=N.getNode(e.id);if(!t)return o.warnNodeNotFound(a,e.id);var n=N.getNode(e.parentId);if(!n)return o.warnNodeNotFound(a,e.parentId);N.removeNodeFromMap(t),n&&n.removeChild(t)}));var s=n({},this.legacy_missingNodeRetryMap),c=[],u=function(e){var t=N.getNode(e.parentId);if(!t)return c.push(e);var n=null,r=null;if(e.previousId&&(n=N.getNode(e.previousId)),e.nextId&&(r=N.getNode(e.nextId)),null!==e.nextId&&-1!==e.nextId&&!r)return c.push(e);var i=I(e.node,o.iframe.contentDocument,N.map,!0);-1!==e.previousId&&-1!==e.nextId?(n&&n.nextSibling&&n.nextSibling.parentNode?t.insertBefore(i,n.nextSibling):r&&r.parentNode?t.contains(r)?t.insertBefore(i,r):t.insertBefore(i,null):t.appendChild(i),(e.previousId||e.nextId)&&o.legacy_resolveMissingNode(s,t,i,e)):s[e.node.id]={node:i,mutation:e}};for(a.adds.forEach((function(e){u(e)}));c.length;){if(c.every((function(e){return!Boolean(N.getNode(e.parentId))})))return c.forEach((function(e){return o.warnNodeNotFound(a,e.node.id)}));var l=c.shift();u(l)}Object.keys(s).length&&Object.assign(this.legacy_missingNodeRetryMap,s),a.texts.forEach((function(e){var t=N.getNode(e.id);if(!t)return o.warnNodeNotFound(a,e.id);t.textContent=e.value})),a.attributes.forEach((function(e){var t=N.getNode(e.id);if(!t)return o.warnNodeNotFound(a,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 d=a.positions[a.positions.length-1];this.moveAndHover(a,d.x,d.y,d.id)}else a.positions.forEach((function(e){var n={doAction:function(){o.moveAndHover(a,e.x,e.y,e.id)},delay:e.timeOffset+t.timestamp-i};o.timer.addAction(n)}));break;case e.IncrementalSource.MouseInteraction:if(-1===a.id)break;var f=new Event(e.MouseInteractions[a.type].toLowerCase());if(!(h=N.getNode(a.id)))return this.debugNodeNotFound(a,a.id);this.emitter.emit(e.ReplayerEvents.MouseInteraction,{type:a.type,target:h});var p=this.config.triggerFocus;switch(a.type){case e.MouseInteractions.Blur:"blur"in h&&h.blur();break;case e.MouseInteractions.Focus:p&&h.focus&&h.focus({preventScroll:!0});break;case e.MouseInteractions.Click:case e.MouseInteractions.TouchStart:case e.MouseInteractions.TouchEnd:r||(this.moveAndHover(a,a.x,a.y,a.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:h.dispatchEvent(f)}break;case e.IncrementalSource.Scroll:if(-1===a.id)break;if(!(h=N.getNode(a.id)))return this.debugNodeNotFound(a,a.id);if(h===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:a.y,left:a.x,behavior:r?"auto":"smooth"});else try{h.scrollTop=a.y,h.scrollLeft=a.x}catch(e){}break;case e.IncrementalSource.ViewportResize:this.emitter.emit(e.ReplayerEvents.Resize,{width:a.width,height:a.height});break;case e.IncrementalSource.Input:if(-1===a.id)break;if(!(h=N.getNode(a.id)))return this.debugNodeNotFound(a,a.id);try{h.checked=a.isChecked,h.value=a.text}catch(e){}break;case e.IncrementalSource.MediaInteraction:if(!(h=N.getNode(a.id)))return this.debugNodeNotFound(a,a.id);var m=h;a.type===j.Pause&&m.pause(),a.type===j.Play&&(m.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?m.play():m.addEventListener("canplay",(function(){m.play()})));break;case e.IncrementalSource.StyleSheetRule:var h;if(!(h=N.getNode(a.id)))return this.debugNodeNotFound(a,a.id);var v=h.sheet;a.adds&&a.adds.forEach((function(e){var t=e.rule,n=e.index,r=void 0===n?void 0:Math.min(n,v.rules.length);try{v.insertRule(t,r)}catch(e){}})),a.removes&&a.removes.forEach((function(e){var t=e.index;v.deleteRule(t)}))}},t.prototype.legacy_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,u=c.node,l=c.mutation;t.insertBefore(u,n),delete e[l.node.id],delete this.legacy_missingNodeRetryMap[l.node.id],(l.previousId||l.nextId)&&this.legacy_resolveMissingNode(e,t,u,l)}if(s){var d=s;u=d.node,l=d.mutation;t.insertBefore(u,n.nextSibling),delete e[l.node.id],delete this.legacy_missingNodeRetryMap[l.node.id],(l.previousId||l.nextId)&&this.legacy_resolveMissingNode(e,t,u,l)}},t.prototype.moveAndHover=function(e,t,n,r){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px";var o=N.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&&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}(),be=ee.addCustomEvent;return e.Replayer=ge,e.addCustomEvent=be,e.mirror=N,e.record=ee,e.utils=z,e}({});
***************************************************************************** */!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(oe||(oe={}));var ce={type:"xstate.init"};function ue(e){return void 0===e?[]:[].concat(e)}function le(e){return{type:"xstate.assign",assignment:e}}function de(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function pe(e){return function(t){return e===t}}function fe(e){return"string"==typeof e?{type:e}:e}function he(e,t){return{value:e,context:t,actions:[],changed:!1,matches:pe(e)}}var me=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function ve(t,o){var i=o.getCastFn,a=o.emitter;return function(e){var t=e.initialState,n=oe.NotStarted,r=new Set,o={_machine:e,send:function(o){n===oe.Running&&(t=e.transition(t,o),me(t,fe(o)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(){return n=oe.Running,me(t,ce),o},stop:function(){return n=oe.Stopped,r.clear(),o},get state(){return t},get status(){return n}};return o}(function(e,t){void 0===t&&(t={});var n={config:e,_options:t,initialState:{value:e.initial,actions:ue(e.states[e.initial].entry).map((function(e){return de(e,t.actions)})),context:e.context,matches:pe(e.initial)},transition:function(t,r){var o,i,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,c=a.context,u=fe(r),l=e.states[s];if(l.on){var d=ue(l.on[u.type]),p=function(t){if(void 0===t)return{value:he(s,c)};var r="string"==typeof t?{target:t}:t,o=r.target,i=void 0===o?s:o,a=r.actions,d=void 0===a?[]:a,p=r.cond,f=c;if((void 0===p?function(){return!0}:p)(c,u)){var h=e.states[i],m=!1,v=[].concat(l.exit,d,h.entry).filter((function(e){return e})).map((function(e){return de(e,n._options.actions)})).filter((function(e){if("xstate.assign"===e.type){m=!0;var t=Object.assign({},f);return"function"==typeof e.assignment?t=e.assignment(f,u):Object.keys(e.assignment).forEach((function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](f,u):e.assignment[n]})),f=t,!1}return!0}));return{value:{value:i,context:f,actions:v,changed:i!==s||v.length>0||m,matches:pe(i)}}}};try{for(var f=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}(d),h=f.next();!h.done;h=f.next()){var m=p(h.value);if("object"==typeof m)return m.value}}catch(e){o={error:e}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}}return he(s,c)}};return n}({id:"player",context:t,initial:"inited",states:{inited:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},TO_LIVE:{target:"live",actions:["startLive"]}}},playing:{on:{PAUSE:{target:"paused",actions:["pause"]},END:"ended",FAST_FORWARD:"skipping",CAST_EVENT:{target:"playing",actions:"castEvent"}}},paused:{on:{RESUME:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"}}},skipping:{on:{BACK_TO_NORMAL:"playing"}},ended:{on:{REPLAY:"playing"}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]}}}}},{actions:{castEvent:le({lastPlayedEvent:function(e,n){return"CAST_EVENT"===n.type?n.payload.event:t.lastPlayedEvent}}),recordTimeOffset:le((function(e,t){var r=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(r=t.payload.timeOffset),n(n({},e),{timeOffset:r,baselineTime:e.events[0].timestamp+r})})),play:function(t){var n,o,s=t.timer,c=t.events,u=t.baselineTime,l=t.lastPlayedEvent;s.clear();var d=function(t,n){for(var r=t.length-1;r>=0;r--){var o=t[r];if(o.type===e.EventType.Meta&&o.timestamp<=n)return t.slice(r)}return t}(c,u),p=new Array,f=function(t){if(l&&l.timestamp>u&&(t.timestamp<=l.timestamp||t===l))return"continue";var n=t.timestamp<u;if(n&&!B(t))return"continue";var r=i(t,n);n?r():p.push({doAction:function(){r(),a.emit(e.ReplayerEvents.EventCast,t)},delay:se(t,u)})};try{for(var h=r(d),m=h.next();!m.done;m=h.next()){f(m.value)}}catch(e){n={error:e}}finally{try{m&&!m.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}a.emit(e.ReplayerEvents.Flush),s.addActions(p),s.start()},pause:function(e){e.timer.clear()},startLive:le({baselineTime:function(e,t){return e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:le((function(t,r){var o=t.baselineTime,s=t.timer,c=t.events;if("ADD_EVENT"===r.type){var u=r.payload.event;c.push(u);var l=u.timestamp<o,d=i(u,l);l?d():s.addAction({doAction:function(){d(),a.emit(e.ReplayerEvents.EventCast,u)},delay:se(u,o)})}return n(n({},t),{events:c})}))}}))}var ye=ne||re,ge={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0},be=function(){function i(n,i){var a=this;if(this.emitter=ye(),this.noramlSpeed=-1,this.legacy_missingNodeRetryMap={},!(null==i?void 0:i.liveMode)&&n.length<2)throw new Error("Replayer need at least 2 events.");this.config=Object.assign({},ge,i),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on(e.ReplayerEvents.Resize,this.handleResize),ie(),z(),this.setupDom(),this.treeIndex=new V,this.fragmentParentMap=new Map,this.emitter.on(e.ReplayerEvents.Flush,(function(){var e,n,i,s,c,u,l=a.treeIndex.flush(),d=l.scrollMap,p=l.inputMap;try{for(var f=r(d.values()),h=f.next();!h.done;h=f.next()){var m=h.value;a.applyScroll(m)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(n=f.return)&&n.call(f)}finally{if(e)throw e.error}}try{for(var v=r(p.values()),y=v.next();!y.done;y=v.next()){m=y.value;a.applyInput(m)}}catch(e){i={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(i)throw i.error}}try{for(var g=r(a.fragmentParentMap.entries()),b=g.next();!b.done;b=g.next()){var E=o(b.value,2),S=E[0],I=E[1];_.map[I.__sn.id]=I,I.__sn.type===t.Element&&"textarea"===I.__sn.tagName&&S.textContent&&(I.value=S.textContent),I.appendChild(S)}}catch(e){c={error:e}}finally{try{b&&!b.done&&(u=g.return)&&u.call(g)}finally{if(c)throw c.error}}a.fragmentParentMap.clear()})),this.service=ve({events:n.map((function(e){return i&&i.unpackFn?i.unpackFn(e):e})),timer:new ae(this.config),speed:(null==i?void 0:i.speed)||ge.speed,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){e.changed}));var s=this.service.state.context.events,c=s.find((function(t){return t.type===e.EventType.Meta})),u=s.find((function(t){return t.type===e.EventType.FullSnapshot}));if(c){var l=c.data,d=l.width,p=l.height;this.emitter.emit(e.ReplayerEvents.Resize,{width:d,height:p})}u&&this.rebuildFullSnapshot(u)}return Object.defineProperty(i.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),i.prototype.on=function(e,t){this.emitter.on(e,t)},i.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(n){t.config[n]=e[n]})),this.config.skipInactive||(this.noramlSpeed=-1)},i.prototype.getMetaData=function(){var e=this.service.state.context.events,t=e[0],n=e[e.length-1];return{startTime:t.timestamp,endTime:n.timestamp,totalTime:n.timestamp-t.timestamp}},i.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},i.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},i.prototype.play=function(t){void 0===t&&(t=0),"ended"===this.service.state.value&&this.service.send({type:"REPLAY"}),"paused"===this.service.state.value?this.service.send({type:"RESUME",payload:{timeOffset:t}}):this.service.send({type:"PLAY",payload:{timeOffset:t}}),this.emitter.emit(e.ReplayerEvents.Start)},i.prototype.pause=function(){this.service.send({type:"PAUSE"}),this.emitter.emit(e.ReplayerEvents.Pause)},i.prototype.resume=function(t){void 0===t&&(t=0),this.service.send({type:"RESUME",payload:{timeOffset:t}}),this.emitter.emit(e.ReplayerEvents.Resume)},i.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},i.prototype.addEvent=function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))},i.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},i.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},i.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.disableInteract(),this.wrapper.appendChild(this.iframe)},i.prototype.handleResize=function(e){this.iframe.setAttribute("width",String(e.width)),this.iframe.setAttribute("height",String(e.height))},i.prototype.getCastFn=function(t,n){var o=this;void 0===n&&(n=!1);var i,a=this.service.state.context.events;switch(t.type){case e.EventType.DomContentLoaded:case e.EventType.Load:break;case e.EventType.Custom:i=function(){o.emitter.emit(e.ReplayerEvents.CustomEvent,t)};break;case e.EventType.Meta:i=function(){return o.emitter.emit(e.ReplayerEvents.Resize,{width:t.data.width,height:t.data.height})};break;case e.EventType.FullSnapshot:i=function(){o.rebuildFullSnapshot(t),o.iframe.contentWindow.scrollTo(t.data.initialOffset)};break;case e.EventType.IncrementalSnapshot:i=function(){var i,s;if(o.applyIncremental(t,n),t===o.nextUserInteractionEvent&&(o.nextUserInteractionEvent=null,o.restoreSpeed()),o.config.skipInactive&&!o.nextUserInteractionEvent){try{for(var c=r(a),u=c.next();!u.done;u=c.next()){var l=u.value;if(!(l.timestamp<=t.timestamp)&&o.isUserInteraction(l)){l.delay-t.delay>1e4*o.config.speed&&(o.nextUserInteractionEvent=l);break}}}catch(e){i={error:e}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(i)throw i.error}}if(o.nextUserInteractionEvent){o.noramlSpeed=o.config.speed;var d=o.nextUserInteractionEvent.delay-t.delay,p={speed:Math.min(Math.round(d/5e3),360)};o.setConfig(p),o.emitter.emit(e.ReplayerEvents.SkipStart,p)}}}}return function(){i&&i(),o.service.send({type:"CAST_EVENT",payload:{event:t}}),t===a[a.length-1]&&(o.restoreSpeed(),o.service.send("END"),o.emitter.emit(e.ReplayerEvents.Finish))}},i.prototype.rebuildFullSnapshot=function(t){if(!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={},_.map=function(e,t,n){void 0===n&&(n=!0);var r={};return[k(e,t,r,!1,n),r]}(t.data.node,this.iframe.contentDocument)[1];var n=document.createElement("style"),r=this.iframe.contentDocument,o=r.documentElement,i=r.head;o.insertBefore(n,i);for(var a,s=(a=this.config.blockClass,["iframe, ."+a+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules),c=0;c<s.length;c++)n.sheet.insertRule(s[c],c);this.emitter.emit(e.ReplayerEvents.FullsnapshotRebuilded,t),this.waitForStylesheetLoad()},i.prototype.waitForStylesheetLoad=function(){var t,n=this,r=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.head;if(r){var o,i=new Set,a=this.service.state;r.querySelectorAll('link[rel="stylesheet"]').forEach((function(t){t.sheet||(i.add(t),t.addEventListener("load",(function(){i.delete(t),0===i.size&&-1!==o&&(a.matches("playing")&&n.resume(n.getCurrentTime()),n.emitter.emit(e.ReplayerEvents.LoadStylesheetEnd),o&&window.clearTimeout(o))})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(e.ReplayerEvents.LoadStylesheetStart),o=window.setTimeout((function(){a.matches("playing")&&n.resume(n.getCurrentTime()),o=-1}),this.config.loadTimeout))}},i.prototype.applyIncremental=function(t,n){var r=this,o=this.service.state.context.baselineTime,i=t.data;switch(i.source){case e.IncrementalSource.Mutation:n&&(i.adds.forEach((function(e){return r.treeIndex.add(e)})),i.texts.forEach((function(e){return r.treeIndex.text(e)})),i.attributes.forEach((function(e){return r.treeIndex.attribute(e)})),i.removes.forEach((function(e){return r.treeIndex.remove(e)}))),this.applyMutation(i,!0);break;case e.IncrementalSource.MouseMove:if(n){var a=i.positions[i.positions.length-1];this.moveAndHover(i,a.x,a.y,a.id)}else i.positions.forEach((function(e){var n={doAction:function(){r.moveAndHover(i,e.x,e.y,e.id)},delay:e.timeOffset+t.timestamp-o};r.timer.addAction(n)}));break;case e.IncrementalSource.MouseInteraction:if(-1===i.id)break;var s=new Event(e.MouseInteractions[i.type].toLowerCase());if(!(l=_.getNode(i.id)))return this.debugNodeNotFound(i,i.id);this.emitter.emit(e.ReplayerEvents.MouseInteraction,{type:i.type,target:l});var c=this.config.triggerFocus;switch(i.type){case e.MouseInteractions.Blur:"blur"in l&&l.blur();break;case e.MouseInteractions.Focus:c&&l.focus&&l.focus({preventScroll:!0});break;case e.MouseInteractions.Click:case e.MouseInteractions.TouchStart:case e.MouseInteractions.TouchEnd:n||(this.moveAndHover(i,i.x,i.y,i.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:l.dispatchEvent(s)}break;case e.IncrementalSource.Scroll:if(-1===i.id)break;if(n){this.treeIndex.scroll(i);break}this.applyScroll(i);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;if(n){this.treeIndex.input(i);break}this.applyInput(i);break;case e.IncrementalSource.MediaInteraction:if(!(l=_.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var u=l;i.type===x.Pause&&u.pause(),i.type===x.Play&&(u.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?u.play():u.addEventListener("canplay",(function(){u.play()})));break;case e.IncrementalSource.StyleSheetRule:var l;if(!(l=_.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var d=l.sheet;i.adds&&i.adds.forEach((function(e){var t=e.rule,n=e.index,r=void 0===n?void 0:Math.min(n,d.rules.length);try{d.insertRule(t,r)}catch(e){}})),i.removes&&i.removes.forEach((function(e){var t=e.index;d.deleteRule(t)}))}},i.prototype.applyMutation=function(e,t){var r=this;e.removes.forEach((function(t){var n=_.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);var o=_.getNode(t.parentId);if(!o)return r.warnNodeNotFound(e,t.parentId);if(_.removeNodeFromMap(n),o){var i=r.fragmentParentMap.get(o);i&&i.contains(n)?i.removeChild(n):o.removeChild(n)}}));var o=n({},this.legacy_missingNodeRetryMap),i=[],a=function(e){if(!r.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var n=_.getNode(e.parentId);if(!n)return i.push(e);var a=r.iframe.contentDocument.contains(n);if(t&&a){var s=document.createDocumentFragment();for(_.map[e.parentId]=s,r.fragmentParentMap.set(s,n);n.firstChild;)s.appendChild(n.firstChild);n=s}var c=null,u=null;if(e.previousId&&(c=_.getNode(e.previousId)),e.nextId&&(u=_.getNode(e.nextId)),null!==e.nextId&&-1!==e.nextId&&!u)return i.push(e);var l=k(e.node,r.iframe.contentDocument,_.map,!0);-1!==e.previousId&&-1!==e.nextId?(c&&c.nextSibling&&c.nextSibling.parentNode?n.insertBefore(l,c.nextSibling):u&&u.parentNode?n.contains(u)?n.insertBefore(l,u):n.insertBefore(l,null):n.appendChild(l),(e.previousId||e.nextId)&&r.legacy_resolveMissingNode(o,n,l,e)):o[e.node.id]={node:l,mutation:e}};for(e.adds.forEach((function(e){a(e)}));i.length;){if(i.every((function(e){return!Boolean(_.getNode(e.parentId))})))return i.forEach((function(t){return r.warnNodeNotFound(e,t.node.id)}));var s=i.shift();a(s)}Object.keys(o).length&&Object.assign(this.legacy_missingNodeRetryMap,o),e.texts.forEach((function(t){var n=_.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);r.fragmentParentMap.has(n)&&(n=r.fragmentParentMap.get(n)),n.textContent=t.value})),e.attributes.forEach((function(t){var n=_.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);for(var o in r.fragmentParentMap.has(n)&&(n=r.fragmentParentMap.get(n)),t.attributes)if("string"==typeof o){var i=t.attributes[o];null!==i?n.setAttribute(o,i):n.removeAttribute(o)}}))},i.prototype.applyScroll=function(e){var t=_.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);if(t===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:e.y,left:e.x,behavior:"smooth"});else try{t.scrollTop=e.y,t.scrollLeft=e.x}catch(e){}},i.prototype.applyInput=function(e){var t=_.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}},i.prototype.legacy_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,u=c.node,l=c.mutation;t.insertBefore(u,n),delete e[l.node.id],delete this.legacy_missingNodeRetryMap[l.node.id],(l.previousId||l.nextId)&&this.legacy_resolveMissingNode(e,t,u,l)}if(s){var d=s;u=d.node,l=d.mutation;t.insertBefore(u,n.nextSibling),delete e[l.node.id],delete this.legacy_missingNodeRetryMap[l.node.id],(l.previousId||l.nextId)&&this.legacy_resolveMissingNode(e,t,u,l)}},i.prototype.moveAndHover=function(e,t,n,r){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px";var o=_.getNode(r);if(!o)return this.debugNodeNotFound(e,r);this.hoverElements(o)},i.prototype.hoverElements=function(e){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")}));for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement},i.prototype.isUserInteraction=function(t){return t.type===e.EventType.IncrementalSnapshot&&(t.data.source>e.IncrementalSource.Mutation&&t.data.source<=e.IncrementalSource.Input)},i.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}},i.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn("[replayer]","Node with id '"+t+"' not found in",e)},i.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log("[replayer]","Node with id '"+t+"' not found in",e)},i}(),Ee=te.addCustomEvent;return e.Replayer=be,e.addCustomEvent=Ee,e.mirror=_,e.record=te,e.utils=U,e}({});
//# sourceMappingURL=rrweb.min.js.map

@@ -12,3 +12,3 @@ var NodeType;

var _id = 1;
var symbolAndNumberRegex = RegExp('[^a-z1-6\-]');
var symbolAndNumberRegex = RegExp('[^a-z1-6-]');
function genId() {

@@ -46,6 +46,3 @@ return _id++;

if (url.indexOf('//') > -1) {
origin = url
.split('/')
.slice(0, 3)
.join('/');
origin = url.split('/').slice(0, 3).join('/');
}

@@ -141,3 +138,4 @@ else {

}
function serializeNode(n, doc, blockClass, inlineStylesheet, maskAllInputs) {
function serializeNode(n, doc, blockClass, inlineStylesheet, maskInputOptions) {
if (maskInputOptions === void 0) { maskInputOptions = {}; }
switch (n.nodeType) {

@@ -201,4 +199,10 @@ case n.DOCUMENT_NODE:

attributes_1.type !== 'checkbox' &&
attributes_1.type !== 'submit' &&
attributes_1.type !== 'button' &&
value) {
attributes_1.value = maskAllInputs ? '*'.repeat(value.length) : value;
attributes_1.value =
maskInputOptions[attributes_1.type] ||
maskInputOptions[tagName]
? '*'.repeat(value.length)
: value;
}

@@ -265,7 +269,6 @@ else if (n.checked) {

}
function serializeNodeWithId(n, doc, map, blockClass, skipChild, inlineStylesheet, maskAllInputs) {
function serializeNodeWithId(n, doc, map, blockClass, skipChild, inlineStylesheet, maskInputOptions) {
if (skipChild === void 0) { skipChild = false; }
if (inlineStylesheet === void 0) { inlineStylesheet = true; }
if (maskAllInputs === void 0) { maskAllInputs = false; }
var _serializedNode = serializeNode(n, doc, blockClass, inlineStylesheet, maskAllInputs);
var _serializedNode = serializeNode(n, doc, blockClass, inlineStylesheet, maskInputOptions);
if (!_serializedNode) {

@@ -295,3 +298,3 @@ console.warn(n, 'not serialized');

var childN = _a[_i];
var serializedChildNode = serializeNodeWithId(childN, doc, map, blockClass, skipChild, inlineStylesheet, maskAllInputs);
var serializedChildNode = serializeNodeWithId(childN, doc, map, blockClass, skipChild, inlineStylesheet, maskInputOptions);
if (serializedChildNode) {

@@ -304,9 +307,27 @@ serializedNode.childNodes.push(serializedChildNode);

}
function snapshot(n, blockClass, inlineStylesheet, maskAllInputs) {
function snapshot(n, blockClass, inlineStylesheet, maskAllInputsOrOptions) {
if (blockClass === void 0) { blockClass = 'rr-block'; }
if (inlineStylesheet === void 0) { inlineStylesheet = true; }
if (maskAllInputs === void 0) { maskAllInputs = false; }
var idNodeMap = {};
var maskInputOptions = maskAllInputsOrOptions === true
? {
color: true,
date: true,
'datetime-local': true,
email: true,
month: true,
number: true,
range: true,
search: true,
tel: true,
text: true,
time: true,
url: true,
week: true
}
: maskAllInputsOrOptions === false
? {}
: maskAllInputsOrOptions;
return [
serializeNodeWithId(n, n, idNodeMap, blockClass, false, inlineStylesheet, maskAllInputs),
serializeNodeWithId(n, n, idNodeMap, blockClass, false, inlineStylesheet, maskInputOptions),
idNodeMap,

@@ -313,0 +334,0 @@ ];

@@ -0,5 +1,5 @@

export { EventType, IncrementalSource, MouseInteractions, ReplayerEvents } from '../types.js';
import * as utils from '../utils.js';
export { utils };
export { mirror } from '../utils.js';
export { EventType, IncrementalSource, MouseInteractions, ReplayerEvents } from '../types.js';
export { default as record } from '../record/index.js';

@@ -6,0 +6,0 @@ export { Replayer } from '../replay/index.js';

@@ -0,5 +1,5 @@

export { EventType, IncrementalSource, MouseInteractions, ReplayerEvents } from './types.js';
import * as utils from './utils.js';
export { utils };
export { mirror } from './utils.js';
export { EventType, IncrementalSource, MouseInteractions, ReplayerEvents } from './types.js';
import record from './record/index.js';

@@ -6,0 +6,0 @@ export { default as record } from './record/index.js';

import { __assign, __read } from '../../node_modules/tslib/tslib.es6.js';
import { snapshot } from '../../node_modules/rrweb-snapshot/es/rrweb-snapshot.js';
import { EventType, IncrementalSource } from '../types.js';
import { polyfill, on, getWindowWidth, getWindowHeight, mirror } from '../utils.js';
import { EventType, IncrementalSource } from '../types.js';
import initObservers from './observer.js';

@@ -13,6 +13,30 @@

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, packFn = options.packFn;
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, maskAllInputs = options.maskAllInputs, _maskInputOptions = options.maskInputOptions, hooks = options.hooks, packFn = options.packFn, _d = options.sampling, sampling = _d === void 0 ? {} : _d, mousemoveWait = options.mousemoveWait;
if (!emit) {
throw new Error('emit function is required');
}
if (mousemoveWait !== undefined && sampling.mousemove === undefined) {
sampling.mousemove = mousemoveWait;
}
var maskInputOptions = maskAllInputs === true
? {
color: true,
date: true,
'datetime-local': true,
email: true,
month: true,
number: true,
range: true,
search: true,
tel: true,
text: true,
time: true,
url: true,
week: true,
textarea: true,
select: true,
}
: _maskInputOptions !== undefined
? _maskInputOptions
: {};
polyfill();

@@ -48,3 +72,3 @@ var lastFullSnapshotEvent;

}), isCheckout);
var _e = __read(snapshot(document, blockClass, inlineStylesheet, maskAllInputs), 2), node = _e[0], idNodeMap = _e[1];
var _e = __read(snapshot(document, blockClass, inlineStylesheet, maskInputOptions), 2), node = _e[0], idNodeMap = _e[1];
if (!node) {

@@ -135,5 +159,5 @@ return console.warn('Failed to snapshot the document');

ignoreClass: ignoreClass,
maskAllInputs: maskAllInputs,
maskInputOptions: maskInputOptions,
inlineStylesheet: inlineStylesheet,
mousemoveWait: mousemoveWait,
sampling: sampling,
}, hooks));

@@ -140,0 +164,0 @@ };

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

var MutationBuffer = (function () {
function MutationBuffer(cb, blockClass, inlineStylesheet, maskAllInputs) {
function MutationBuffer(cb, blockClass, inlineStylesheet, maskInputOptions) {
var _this = this;

@@ -34,3 +34,3 @@ this.texts = [];

nextId: nextId,
node: serializeNodeWithId(n, document, mirror.map, _this.blockClass, true, _this.inlineStylesheet, _this.maskAllInputs),
node: serializeNodeWithId(n, document, mirror.map, _this.blockClass, true, _this.inlineStylesheet, _this.maskInputOptions),
});

@@ -81,2 +81,35 @@ };

};
this.emit = function () {
var payload = {
texts: _this.texts
.map(function (text) { return ({
id: mirror.getId(text.node),
value: text.value,
}); })
.filter(function (text) { return mirror.has(text.id); }),
attributes: _this.attributes
.map(function (attribute) { return ({
id: mirror.getId(attribute.node),
attributes: attribute.attributes,
}); })
.filter(function (attribute) { return mirror.has(attribute.id); }),
removes: _this.removes,
adds: _this.adds,
};
if (!payload.texts.length &&
!payload.attributes.length &&
!payload.removes.length &&
!payload.adds.length) {
return;
}
_this.emissionCallback(payload);
_this.texts = [];
_this.attributes = [];
_this.removes = [];
_this.adds = [];
_this.addedSet = new Set();
_this.movedSet = new Set();
_this.droppedSet = new Set();
_this.movedMap = {};
};
this.processMutation = function (m) {

@@ -160,38 +193,5 @@ switch (m.type) {

};
this.emit = function () {
var payload = {
texts: _this.texts
.map(function (text) { return ({
id: mirror.getId(text.node),
value: text.value,
}); })
.filter(function (text) { return mirror.has(text.id); }),
attributes: _this.attributes
.map(function (attribute) { return ({
id: mirror.getId(attribute.node),
attributes: attribute.attributes,
}); })
.filter(function (attribute) { return mirror.has(attribute.id); }),
removes: _this.removes,
adds: _this.adds,
};
if (!payload.texts.length &&
!payload.attributes.length &&
!payload.removes.length &&
!payload.adds.length) {
return;
}
_this.emissionCallback(payload);
_this.texts = [];
_this.attributes = [];
_this.removes = [];
_this.adds = [];
_this.addedSet = new Set();
_this.movedSet = new Set();
_this.droppedSet = new Set();
_this.movedMap = {};
};
this.blockClass = blockClass;
this.inlineStylesheet = inlineStylesheet;
this.maskAllInputs = maskAllInputs;
this.maskInputOptions = maskInputOptions;
this.emissionCallback = cb;

@@ -198,0 +198,0 @@ }

import { __spread, __assign } from '../../node_modules/tslib/tslib.es6.js';
import { IncrementalSource, MouseInteractions, MediaInteractions } from '../types.js';
import { on, throttle, isTouchEvent, mirror, isBlocked, getWindowHeight, getWindowWidth, hookSetter } from '../utils.js';
import { IncrementalSource, MouseInteractions, MediaInteractions } from '../types.js';
import MutationBuffer from './mutation.js';
function initMutationObserver(cb, blockClass, inlineStylesheet, maskAllInputs) {
var mutationBuffer = new MutationBuffer(cb, blockClass, inlineStylesheet, maskAllInputs);
function initMutationObserver(cb, blockClass, inlineStylesheet, maskInputOptions) {
var mutationBuffer = new MutationBuffer(cb, blockClass, inlineStylesheet, maskInputOptions);
var observer = new MutationObserver(mutationBuffer.processMutations);

@@ -19,3 +19,7 @@ observer.observe(document, {

}
function initMoveObserver(cb, mousemoveWait) {
function initMoveObserver(cb, sampling) {
if (sampling.mousemove === false) {
return function () { };
}
var threshold = typeof sampling.mousemove === 'number' ? sampling.mousemove : 50;
var positions = [];

@@ -47,3 +51,3 @@ var timeBaseline;

wrappedCb(isTouchEvent(evt));
}, mousemoveWait, {
}, threshold, {
trailing: false,

@@ -59,3 +63,10 @@ });

}
function initMouseInteractionObserver(cb, blockClass) {
function initMouseInteractionObserver(cb, blockClass, sampling) {
if (sampling.mouseInteraction === false) {
return function () { };
}
var disableMap = sampling.mouseInteraction === true ||
sampling.mouseInteraction === undefined
? {}
: sampling.mouseInteraction;
var handlers = [];

@@ -80,3 +91,7 @@ var getHandler = function (eventKey) {

Object.keys(MouseInteractions)
.filter(function (key) { return Number.isNaN(Number(key)) && !key.endsWith('_Departed'); })
.filter(function (key) {
return Number.isNaN(Number(key)) &&
!key.endsWith('_Departed') &&
disableMap[key] !== false;
})
.forEach(function (eventKey) {

@@ -91,3 +106,3 @@ var eventName = eventKey.toLowerCase();

}
function initScrollObserver(cb, blockClass) {
function initScrollObserver(cb, blockClass, sampling) {
var updatePosition = throttle(function (evt) {

@@ -113,3 +128,3 @@ if (!evt.target || isBlocked(evt.target, blockClass)) {

}
}, 100);
}, sampling.scroll || 100);
return on('scroll', updatePosition);

@@ -129,19 +144,4 @@ }

var INPUT_TAGS = ['INPUT', 'TEXTAREA', 'SELECT'];
var MASK_TYPES = [
'color',
'date',
'datetime-local',
'email',
'month',
'number',
'range',
'search',
'tel',
'text',
'time',
'url',
'week',
];
var lastInputValueMap = new WeakMap();
function initInputObserver(cb, blockClass, ignoreClass, maskAllInputs) {
function initInputObserver(cb, blockClass, ignoreClass, maskInputOptions, sampling) {
function eventHandler(event) {

@@ -162,7 +162,7 @@ var target = event.target;

var isChecked = false;
var hasTextInput = MASK_TYPES.includes(type) || target.tagName === 'TEXTAREA';
if (type === 'radio' || type === 'checkbox') {
isChecked = target.checked;
}
else if (hasTextInput && maskAllInputs) {
else if (maskInputOptions[target.tagName.toLowerCase()] ||
maskInputOptions[type]) {
text = '*'.repeat(text.length);

@@ -195,6 +195,4 @@ }

}
var handlers = [
'input',
'change',
].map(function (eventName) { return on(eventName, eventHandler); });
var events = sampling.input === 'last' ? ['change'] : ['input', 'change'];
var handlers = events.map(function (eventName) { return on(eventName, eventHandler); });
var propertyDescriptor = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value');

@@ -350,8 +348,8 @@ var hookProperties = [

mergeHooks(o, hooks);
var mutationObserver = initMutationObserver(o.mutationCb, o.blockClass, o.inlineStylesheet, o.maskAllInputs);
var mousemoveHandler = initMoveObserver(o.mousemoveCb, o.mousemoveWait);
var mouseInteractionHandler = initMouseInteractionObserver(o.mouseInteractionCb, o.blockClass);
var scrollHandler = initScrollObserver(o.scrollCb, o.blockClass);
var mutationObserver = initMutationObserver(o.mutationCb, o.blockClass, o.inlineStylesheet, o.maskInputOptions);
var mousemoveHandler = initMoveObserver(o.mousemoveCb, o.sampling);
var mouseInteractionHandler = initMouseInteractionObserver(o.mouseInteractionCb, o.blockClass, o.sampling);
var scrollHandler = initScrollObserver(o.scrollCb, o.blockClass, o.sampling);
var viewportResizeHandler = initViewportResizeObserver(o.viewportResizeCb);
var inputHandler = initInputObserver(o.inputCb, o.blockClass, o.ignoreClass, o.maskAllInputs);
var inputHandler = initInputObserver(o.inputCb, o.blockClass, o.ignoreClass, o.maskInputOptions, o.sampling);
var mediaInteractionHandler = initMediaInteractionObserver(o.mediaInteractionCb, o.blockClass);

@@ -372,2 +370,2 @@ var styleSheetObserver = initStyleSheetObserver(o.styleSheetRuleCb);

export default initObservers;
export { INPUT_TAGS, MASK_TYPES };
export { INPUT_TAGS };

@@ -1,5 +0,5 @@

import { __assign, __values } from '../../node_modules/tslib/tslib.es6.js';
import { rebuild, buildNodeWithSN } from '../../node_modules/rrweb-snapshot/es/rrweb-snapshot.js';
import { mirror, polyfill } from '../utils.js';
import { __assign, __values, __read } from '../../node_modules/tslib/tslib.es6.js';
import { rebuild, NodeType, buildNodeWithSN } from '../../node_modules/rrweb-snapshot/es/rrweb-snapshot.js';
import { ReplayerEvents, EventType, IncrementalSource, MediaInteractions, MouseInteractions } from '../types.js';
import { mirror, polyfill, TreeIndex } from '../utils.js';
import * as mittProxy from '../../node_modules/mitt/dist/mitt.es.js';

@@ -30,2 +30,3 @@ import mitt$1 from '../../node_modules/mitt/dist/mitt.es.js';

function Replayer(events, config) {
var _this = this;
this.emitter = mitt();

@@ -40,6 +41,58 @@ this.noramlSpeed = -1;

this.getCastFn = this.getCastFn.bind(this);
this.emitter.on('resize', this.handleResize);
this.emitter.on(ReplayerEvents.Resize, this.handleResize);
smoothscroll_1();
polyfill();
this.setupDom();
this.treeIndex = new TreeIndex();
this.fragmentParentMap = new Map();
this.emitter.on(ReplayerEvents.Flush, function () {
var e_1, _a, e_2, _b, e_3, _c;
var _d = _this.treeIndex.flush(), scrollMap = _d.scrollMap, inputMap = _d.inputMap;
try {
for (var _e = __values(scrollMap.values()), _f = _e.next(); !_f.done; _f = _e.next()) {
var d = _f.value;
_this.applyScroll(d);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_f && !_f.done && (_a = _e.return)) _a.call(_e);
}
finally { if (e_1) throw e_1.error; }
}
try {
for (var _g = __values(inputMap.values()), _h = _g.next(); !_h.done; _h = _g.next()) {
var d = _h.value;
_this.applyInput(d);
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
}
finally { if (e_2) throw e_2.error; }
}
try {
for (var _j = __values(_this.fragmentParentMap.entries()), _k = _j.next(); !_k.done; _k = _j.next()) {
var _l = __read(_k.value, 2), frag = _l[0], parent = _l[1];
mirror.map[parent.__sn.id] = parent;
if (parent.__sn.type === NodeType.Element &&
parent.__sn.tagName === 'textarea' &&
frag.textContent) {
parent.value = frag.textContent;
}
parent.appendChild(frag);
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (_k && !_k.done && (_c = _j.return)) _c.call(_j);
}
finally { if (e_3) throw e_3.error; }
}
_this.fragmentParentMap.clear();
});
this.service = createPlayerService({

@@ -105,2 +158,4 @@ events: events.map(function (e) {

return {
startTime: firstEvent.timestamp,
endTime: lastEvent.timestamp,
totalTime: lastEvent.timestamp - firstEvent.timestamp,

@@ -118,3 +173,11 @@ };

if (timeOffset === void 0) { timeOffset = 0; }
this.service.send({ type: 'PLAY', payload: { timeOffset: timeOffset } });
if (this.service.state.value === 'ended') {
this.service.send({ type: 'REPLAY' });
}
if (this.service.state.value === 'paused') {
this.service.send({ type: 'RESUME', payload: { timeOffset: timeOffset } });
}
else {
this.service.send({ type: 'PLAY', payload: { timeOffset: timeOffset } });
}
this.emitter.emit(ReplayerEvents.Start);

@@ -197,3 +260,3 @@ };

castFn = function () {
var e_1, _a;
var e_4, _a;
_this.applyIncremental(event, isSync);

@@ -220,3 +283,3 @@ if (event === _this.nextUserInteractionEvent) {

}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
catch (e_4_1) { e_4 = { error: e_4_1 }; }
finally {

@@ -226,3 +289,3 @@ try {

}
finally { if (e_1) throw e_1.error; }
finally { if (e_4) throw e_4.error; }
}

@@ -256,2 +319,5 @@ if (_this.nextUserInteractionEvent) {

Replayer.prototype.rebuildFullSnapshot = function (event) {
if (!this.iframe.contentDocument) {
return console.warn('Looks like your replayer has been destroyed.');
}
if (Object.keys(this.legacy_missingNodeRetryMap).length) {

@@ -269,3 +335,3 @@ console.warn('Found unresolved missing node map', this.legacy_missingNodeRetryMap);

}
this.emitter.emit(ReplayerEvents.FullsnapshotRebuilded);
this.emitter.emit(ReplayerEvents.FullsnapshotRebuilded, event);
this.waitForStylesheetLoad();

@@ -275,3 +341,4 @@ };

var _this = this;
var head = this.iframe.contentDocument.head;
var _a;
var head = (_a = this.iframe.contentDocument) === null || _a === void 0 ? void 0 : _a.head;
if (head) {

@@ -318,96 +385,9 @@ var unloadSheets_1 = new Set();

case IncrementalSource.Mutation: {
d.removes.forEach(function (mutation) {
var target = mirror.getNode(mutation.id);
if (!target) {
return _this.warnNodeNotFound(d, mutation.id);
}
var parent = mirror.getNode(mutation.parentId);
if (!parent) {
return _this.warnNodeNotFound(d, mutation.parentId);
}
mirror.removeNodeFromMap(target);
if (parent) {
parent.removeChild(target);
}
});
var legacy_missingNodeMap_1 = __assign({}, this.legacy_missingNodeRetryMap);
var queue_1 = [];
var appendNode_1 = function (mutation) {
var parent = mirror.getNode(mutation.parentId);
if (!parent) {
return queue_1.push(mutation);
}
var previous = null;
var next = null;
if (mutation.previousId) {
previous = mirror.getNode(mutation.previousId);
}
if (mutation.nextId) {
next = mirror.getNode(mutation.nextId);
}
if (mutation.nextId !== null && mutation.nextId !== -1 && !next) {
return queue_1.push(mutation);
}
var target = buildNodeWithSN(mutation.node, _this.iframe.contentDocument, mirror.map, true);
if (mutation.previousId === -1 || mutation.nextId === -1) {
legacy_missingNodeMap_1[mutation.node.id] = {
node: target,
mutation: mutation,
};
return;
}
if (previous &&
previous.nextSibling &&
previous.nextSibling.parentNode) {
parent.insertBefore(target, previous.nextSibling);
}
else if (next && next.parentNode) {
parent.contains(next)
? parent.insertBefore(target, next)
: parent.insertBefore(target, null);
}
else {
parent.appendChild(target);
}
if (mutation.previousId || mutation.nextId) {
_this.legacy_resolveMissingNode(legacy_missingNodeMap_1, parent, target, mutation);
}
};
d.adds.forEach(function (mutation) {
appendNode_1(mutation);
});
while (queue_1.length) {
if (queue_1.every(function (m) { return !Boolean(mirror.getNode(m.parentId)); })) {
return queue_1.forEach(function (m) { return _this.warnNodeNotFound(d, m.node.id); });
}
var mutation = queue_1.shift();
appendNode_1(mutation);
if (isSync) {
d.adds.forEach(function (m) { return _this.treeIndex.add(m); });
d.texts.forEach(function (m) { return _this.treeIndex.text(m); });
d.attributes.forEach(function (m) { return _this.treeIndex.attribute(m); });
d.removes.forEach(function (m) { return _this.treeIndex.remove(m); });
}
if (Object.keys(legacy_missingNodeMap_1).length) {
Object.assign(this.legacy_missingNodeRetryMap, legacy_missingNodeMap_1);
}
d.texts.forEach(function (mutation) {
var target = mirror.getNode(mutation.id);
if (!target) {
return _this.warnNodeNotFound(d, mutation.id);
}
target.textContent = mutation.value;
});
d.attributes.forEach(function (mutation) {
var target = mirror.getNode(mutation.id);
if (!target) {
return _this.warnNodeNotFound(d, mutation.id);
}
for (var attributeName in mutation.attributes) {
if (typeof attributeName === 'string') {
var value = mutation.attributes[attributeName];
if (value !== null) {
target.setAttribute(attributeName, value);
}
else {
target.removeAttribute(attributeName);
}
}
}
});
this.applyMutation(d, true);
break;

@@ -478,21 +458,7 @@ }

}
var target = mirror.getNode(d.id);
if (!target) {
return this.debugNodeNotFound(d, d.id);
if (isSync) {
this.treeIndex.scroll(d);
break;
}
if (target === this.iframe.contentDocument) {
this.iframe.contentWindow.scrollTo({
top: d.y,
left: d.x,
behavior: isSync ? 'auto' : 'smooth',
});
}
else {
try {
target.scrollTop = d.y;
target.scrollLeft = d.x;
}
catch (error) {
}
}
this.applyScroll(d);
break;

@@ -510,12 +476,7 @@ }

}
var target = mirror.getNode(d.id);
if (!target) {
return this.debugNodeNotFound(d, d.id);
if (isSync) {
this.treeIndex.input(d);
break;
}
try {
target.checked = d.isChecked;
target.value = d.text;
}
catch (error) {
}
this.applyInput(d);
break;

@@ -574,2 +535,155 @@ }

};
Replayer.prototype.applyMutation = function (d, useVirtualParent) {
var _this = this;
d.removes.forEach(function (mutation) {
var target = mirror.getNode(mutation.id);
if (!target) {
return _this.warnNodeNotFound(d, mutation.id);
}
var parent = mirror.getNode(mutation.parentId);
if (!parent) {
return _this.warnNodeNotFound(d, mutation.parentId);
}
mirror.removeNodeFromMap(target);
if (parent) {
var realParent = _this.fragmentParentMap.get(parent);
if (realParent && realParent.contains(target)) {
realParent.removeChild(target);
}
else {
parent.removeChild(target);
}
}
});
var legacy_missingNodeMap = __assign({}, this.legacy_missingNodeRetryMap);
var queue = [];
var appendNode = function (mutation) {
if (!_this.iframe.contentDocument) {
return console.warn('Looks like your replayer has been destroyed.');
}
var parent = mirror.getNode(mutation.parentId);
if (!parent) {
return queue.push(mutation);
}
var parentInDocument = _this.iframe.contentDocument.contains(parent);
if (useVirtualParent && parentInDocument) {
var virtualParent = document.createDocumentFragment();
mirror.map[mutation.parentId] = virtualParent;
_this.fragmentParentMap.set(virtualParent, parent);
while (parent.firstChild) {
virtualParent.appendChild(parent.firstChild);
}
parent = virtualParent;
}
var previous = null;
var next = null;
if (mutation.previousId) {
previous = mirror.getNode(mutation.previousId);
}
if (mutation.nextId) {
next = mirror.getNode(mutation.nextId);
}
if (mutation.nextId !== null && mutation.nextId !== -1 && !next) {
return queue.push(mutation);
}
var target = buildNodeWithSN(mutation.node, _this.iframe.contentDocument, mirror.map, true);
if (mutation.previousId === -1 || mutation.nextId === -1) {
legacy_missingNodeMap[mutation.node.id] = {
node: target,
mutation: mutation,
};
return;
}
if (previous && previous.nextSibling && previous.nextSibling.parentNode) {
parent.insertBefore(target, previous.nextSibling);
}
else if (next && next.parentNode) {
parent.contains(next)
? parent.insertBefore(target, next)
: parent.insertBefore(target, null);
}
else {
parent.appendChild(target);
}
if (mutation.previousId || mutation.nextId) {
_this.legacy_resolveMissingNode(legacy_missingNodeMap, parent, target, mutation);
}
};
d.adds.forEach(function (mutation) {
appendNode(mutation);
});
while (queue.length) {
if (queue.every(function (m) { return !Boolean(mirror.getNode(m.parentId)); })) {
return queue.forEach(function (m) { return _this.warnNodeNotFound(d, m.node.id); });
}
var mutation = queue.shift();
appendNode(mutation);
}
if (Object.keys(legacy_missingNodeMap).length) {
Object.assign(this.legacy_missingNodeRetryMap, legacy_missingNodeMap);
}
d.texts.forEach(function (mutation) {
var target = mirror.getNode(mutation.id);
if (!target) {
return _this.warnNodeNotFound(d, mutation.id);
}
if (_this.fragmentParentMap.has(target)) {
target = _this.fragmentParentMap.get(target);
}
target.textContent = mutation.value;
});
d.attributes.forEach(function (mutation) {
var target = mirror.getNode(mutation.id);
if (!target) {
return _this.warnNodeNotFound(d, mutation.id);
}
if (_this.fragmentParentMap.has(target)) {
target = _this.fragmentParentMap.get(target);
}
for (var attributeName in mutation.attributes) {
if (typeof attributeName === 'string') {
var value = mutation.attributes[attributeName];
if (value !== null) {
target.setAttribute(attributeName, value);
}
else {
target.removeAttribute(attributeName);
}
}
}
});
};
Replayer.prototype.applyScroll = function (d) {
var target = mirror.getNode(d.id);
if (!target) {
return this.debugNodeNotFound(d, d.id);
}
if (target === this.iframe.contentDocument) {
this.iframe.contentWindow.scrollTo({
top: d.y,
left: d.x,
behavior: 'smooth',
});
}
else {
try {
target.scrollTop = d.y;
target.scrollLeft = d.x;
}
catch (error) {
}
}
};
Replayer.prototype.applyInput = function (d) {
var target = mirror.getNode(d.id);
if (!target) {
return this.debugNodeNotFound(d, d.id);
}
try {
target.checked = d.isChecked;
target.value = d.text;
}
catch (error) {
}
};
Replayer.prototype.legacy_resolveMissingNode = function (map, parent, target, targetMutation) {

@@ -608,5 +722,4 @@ var previousId = targetMutation.previousId, nextId = targetMutation.nextId;

Replayer.prototype.hoverElements = function (el) {
this.iframe
.contentDocument.querySelectorAll('.\\:hover')
.forEach(function (hoveredEl) {
var _a;
(_a = this.iframe.contentDocument) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.\\:hover').forEach(function (hoveredEl) {
hoveredEl.classList.remove(':hover');

@@ -613,0 +726,0 @@ });

import { __assign, __values } from '../../node_modules/tslib/tslib.es6.js';
import { ReplayerEvents } from '../types.js';
import { ReplayerEvents, EventType } from '../types.js';
import { needCastInSyncMode } from '../utils.js';
import { getDelay } from './timer.js';
import { interpret as f, createMachine as c, assign as r } from '../../node_modules/@xstate/fsm/es/index.js';
function discardPriorSnapshots(events, baselineTime) {
for (var idx = events.length - 1; idx >= 0; idx--) {
var event = events[idx];
if (event.type === EventType.Meta) {
if (event.timestamp <= baselineTime) {
return events.slice(idx);
}
}
}
return events;
}
function createPlayerService(context, _a) {

@@ -91,5 +103,7 @@ var getCastFn = _a.getCastFn, emitter = _a.emitter;

timer.clear();
var neededEvents = discardPriorSnapshots(events, baselineTime);
var actions = new Array();
var _loop_1 = function (event) {
if (lastPlayedEvent &&
lastPlayedEvent.timestamp > baselineTime &&
(event.timestamp <= lastPlayedEvent.timestamp ||

@@ -100,2 +114,5 @@ event === lastPlayedEvent)) {

var isSync = event.timestamp < baselineTime;
if (isSync && !needCastInSyncMode(event)) {
return "continue";
}
var castFn = getCastFn(event, isSync);

@@ -116,4 +133,4 @@ if (isSync) {

try {
for (var events_1 = __values(events), events_1_1 = events_1.next(); !events_1_1.done; events_1_1 = events_1.next()) {
var event = events_1_1.value;
for (var neededEvents_1 = __values(neededEvents), neededEvents_1_1 = neededEvents_1.next(); !neededEvents_1_1.done; neededEvents_1_1 = neededEvents_1.next()) {
var event = neededEvents_1_1.value;
_loop_1(event);

@@ -125,6 +142,7 @@ }

try {
if (events_1_1 && !events_1_1.done && (_a = events_1.return)) _a.call(events_1);
if (neededEvents_1_1 && !neededEvents_1_1.done && (_a = neededEvents_1.return)) _a.call(neededEvents_1);
}
finally { if (e_1) throw e_1.error; }
}
emitter.emit(ReplayerEvents.Flush);
timer.addActions(actions);

@@ -172,2 +190,2 @@ timer.start();

export { createPlayerService };
export { createPlayerService, discardPriorSnapshots };

@@ -55,4 +55,5 @@ var EventType;

ReplayerEvents["CustomEvent"] = "custom-event";
ReplayerEvents["Flush"] = "flush";
})(ReplayerEvents || (ReplayerEvents = {}));
export { EventType, IncrementalSource, MediaInteractions, MouseInteractions, ReplayerEvents };

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

import { __values } from '../node_modules/tslib/tslib.es6.js';
import { EventType, IncrementalSource } from './types.js';
function on(type, fn, target) {

@@ -78,2 +81,26 @@ if (target === void 0) { target = document; }

}
function patch(source, name, replacement) {
if (!(name in source)) {
return function () { };
}
var original = source[name];
var wrapped = replacement(original);
if (typeof wrapped === 'function') {
try {
wrapped.prototype = wrapped.prototype || {};
Object.defineProperties(wrapped, {
__rrweb_original__: {
enumerable: false,
value: original,
},
});
}
catch (_a) {
}
}
source[name] = wrapped;
return function () {
source[name] = original;
};
}
function getWindowHeight() {

@@ -132,3 +159,198 @@ return (window.innerHeight ||

}
function needCastInSyncMode(event) {
switch (event.type) {
case EventType.DomContentLoaded:
case EventType.Load:
case EventType.Custom:
return false;
case EventType.FullSnapshot:
case EventType.Meta:
return true;
}
switch (event.data.source) {
case IncrementalSource.MouseMove:
case IncrementalSource.MouseInteraction:
case IncrementalSource.TouchMove:
case IncrementalSource.MediaInteraction:
return false;
case IncrementalSource.ViewportResize:
case IncrementalSource.StyleSheetRule:
case IncrementalSource.Scroll:
case IncrementalSource.Input:
return true;
}
return true;
}
var TreeIndex = (function () {
function TreeIndex() {
this.reset();
}
TreeIndex.prototype.add = function (mutation) {
var parentTreeNode = this.indexes.get(mutation.parentId);
var treeNode = {
id: mutation.node.id,
mutation: mutation,
children: [],
texts: [],
attributes: [],
};
if (!parentTreeNode) {
this.tree[treeNode.id] = treeNode;
}
else {
treeNode.parent = parentTreeNode;
parentTreeNode.children[treeNode.id] = treeNode;
}
this.indexes.set(treeNode.id, treeNode);
};
TreeIndex.prototype.remove = function (mutation) {
var _this = this;
var parentTreeNode = this.indexes.get(mutation.parentId);
var treeNode = this.indexes.get(mutation.id);
var deepRemoveFromMirror = function (id) {
_this.removeIdSet.add(id);
var node = mirror.getNode(id);
node === null || node === void 0 ? void 0 : node.childNodes.forEach(function (childNode) {
return deepRemoveFromMirror(childNode.__sn.id);
});
};
var deepRemoveFromTreeIndex = function (node) {
_this.removeIdSet.add(node.id);
Object.values(node.children).forEach(function (n) { return deepRemoveFromTreeIndex(n); });
var _treeNode = _this.indexes.get(node.id);
if (_treeNode) {
var _parentTreeNode = _treeNode.parent;
if (_parentTreeNode) {
delete _treeNode.parent;
delete _parentTreeNode.children[_treeNode.id];
_this.indexes.delete(mutation.id);
}
}
};
if (!treeNode) {
this.removeNodeMutations.push(mutation);
deepRemoveFromMirror(mutation.id);
}
else if (!parentTreeNode) {
delete this.tree[treeNode.id];
this.indexes.delete(treeNode.id);
deepRemoveFromTreeIndex(treeNode);
}
else {
delete treeNode.parent;
delete parentTreeNode.children[treeNode.id];
this.indexes.delete(mutation.id);
deepRemoveFromTreeIndex(treeNode);
}
};
TreeIndex.prototype.text = function (mutation) {
var treeNode = this.indexes.get(mutation.id);
if (treeNode) {
treeNode.texts.push(mutation);
}
else {
this.textMutations.push(mutation);
}
};
TreeIndex.prototype.attribute = function (mutation) {
var treeNode = this.indexes.get(mutation.id);
if (treeNode) {
treeNode.attributes.push(mutation);
}
else {
this.attributeMutations.push(mutation);
}
};
TreeIndex.prototype.scroll = function (d) {
this.scrollMap.set(d.id, d);
};
TreeIndex.prototype.input = function (d) {
this.inputMap.set(d.id, d);
};
TreeIndex.prototype.flush = function () {
var e_1, _a, e_2, _b;
var _this = this;
var _c = this, tree = _c.tree, removeNodeMutations = _c.removeNodeMutations, textMutations = _c.textMutations, attributeMutations = _c.attributeMutations;
var batchMutationData = {
source: IncrementalSource.Mutation,
removes: removeNodeMutations,
texts: textMutations,
attributes: attributeMutations,
adds: [],
};
var walk = function (treeNode, removed) {
if (removed) {
_this.removeIdSet.add(treeNode.id);
}
batchMutationData.texts = batchMutationData.texts
.concat(removed ? [] : treeNode.texts)
.filter(function (m) { return !_this.removeIdSet.has(m.id); });
batchMutationData.attributes = batchMutationData.attributes
.concat(removed ? [] : treeNode.attributes)
.filter(function (m) { return !_this.removeIdSet.has(m.id); });
if (!_this.removeIdSet.has(treeNode.id) &&
!_this.removeIdSet.has(treeNode.mutation.parentId) &&
!removed) {
batchMutationData.adds.push(treeNode.mutation);
if (treeNode.children) {
Object.values(treeNode.children).forEach(function (n) { return walk(n, false); });
}
}
else {
Object.values(treeNode.children).forEach(function (n) { return walk(n, true); });
}
};
Object.values(tree).forEach(function (n) { return walk(n, false); });
try {
for (var _d = __values(this.scrollMap.keys()), _e = _d.next(); !_e.done; _e = _d.next()) {
var id = _e.value;
if (this.removeIdSet.has(id)) {
this.scrollMap.delete(id);
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
}
finally { if (e_1) throw e_1.error; }
}
try {
for (var _f = __values(this.inputMap.keys()), _g = _f.next(); !_g.done; _g = _f.next()) {
var id = _g.value;
if (this.removeIdSet.has(id)) {
this.inputMap.delete(id);
}
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
}
finally { if (e_2) throw e_2.error; }
}
var scrollMap = new Map(this.scrollMap);
var inputMap = new Map(this.inputMap);
this.reset();
return {
mutationData: batchMutationData,
scrollMap: scrollMap,
inputMap: inputMap,
};
};
TreeIndex.prototype.reset = function () {
this.tree = [];
this.indexes = new Map();
this.removeNodeMutations = [];
this.textMutations = [];
this.attributeMutations = [];
this.removeIdSet = new Set();
this.scrollMap = new Map();
this.inputMap = new Map();
};
return TreeIndex;
}());
export { getWindowHeight, getWindowWidth, hookSetter, isAncestorRemoved, isBlocked, isTouchEvent, mirror, on, polyfill, throttle };
export { TreeIndex, getWindowHeight, getWindowWidth, hookSetter, isAncestorRemoved, isBlocked, isTouchEvent, mirror, needCastInSyncMode, on, patch, polyfill, throttle };

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

var _id = 1;
var symbolAndNumberRegex = RegExp('[^a-z1-6\-]');
var symbolAndNumberRegex = RegExp('[^a-z1-6-]');
function genId() {

@@ -108,6 +108,3 @@ return _id++;

if (url.indexOf('//') > -1) {
origin = url
.split('/')
.slice(0, 3)
.join('/');
origin = url.split('/').slice(0, 3).join('/');
}

@@ -203,3 +200,4 @@ else {

}
function serializeNode(n, doc, blockClass, inlineStylesheet, maskAllInputs) {
function serializeNode(n, doc, blockClass, inlineStylesheet, maskInputOptions) {
if (maskInputOptions === void 0) { maskInputOptions = {}; }
switch (n.nodeType) {

@@ -263,4 +261,10 @@ case n.DOCUMENT_NODE:

attributes_1.type !== 'checkbox' &&
attributes_1.type !== 'submit' &&
attributes_1.type !== 'button' &&
value) {
attributes_1.value = maskAllInputs ? '*'.repeat(value.length) : value;
attributes_1.value =
maskInputOptions[attributes_1.type] ||
maskInputOptions[tagName]
? '*'.repeat(value.length)
: value;
}

@@ -327,7 +331,6 @@ else if (n.checked) {

}
function serializeNodeWithId(n, doc, map, blockClass, skipChild, inlineStylesheet, maskAllInputs) {
function serializeNodeWithId(n, doc, map, blockClass, skipChild, inlineStylesheet, maskInputOptions) {
if (skipChild === void 0) { skipChild = false; }
if (inlineStylesheet === void 0) { inlineStylesheet = true; }
if (maskAllInputs === void 0) { maskAllInputs = false; }
var _serializedNode = serializeNode(n, doc, blockClass, inlineStylesheet, maskAllInputs);
var _serializedNode = serializeNode(n, doc, blockClass, inlineStylesheet, maskInputOptions);
if (!_serializedNode) {

@@ -357,3 +360,3 @@ console.warn(n, 'not serialized');

var childN = _a[_i];
var serializedChildNode = serializeNodeWithId(childN, doc, map, blockClass, skipChild, inlineStylesheet, maskAllInputs);
var serializedChildNode = serializeNodeWithId(childN, doc, map, blockClass, skipChild, inlineStylesheet, maskInputOptions);
if (serializedChildNode) {

@@ -366,9 +369,27 @@ serializedNode.childNodes.push(serializedChildNode);

}
function snapshot(n, blockClass, inlineStylesheet, maskAllInputs) {
function snapshot(n, blockClass, inlineStylesheet, maskAllInputsOrOptions) {
if (blockClass === void 0) { blockClass = 'rr-block'; }
if (inlineStylesheet === void 0) { inlineStylesheet = true; }
if (maskAllInputs === void 0) { maskAllInputs = false; }
var idNodeMap = {};
var maskInputOptions = maskAllInputsOrOptions === true
? {
color: true,
date: true,
'datetime-local': true,
email: true,
month: true,
number: true,
range: true,
search: true,
tel: true,
text: true,
time: true,
url: true,
week: true
}
: maskAllInputsOrOptions === false
? {}
: maskAllInputsOrOptions;
return [
serializeNodeWithId(n, n, idNodeMap, blockClass, false, inlineStylesheet, maskAllInputs),
serializeNodeWithId(n, n, idNodeMap, blockClass, false, inlineStylesheet, maskInputOptions),
idNodeMap,

@@ -378,2 +399,59 @@ ];

var EventType;
(function (EventType) {
EventType[EventType["DomContentLoaded"] = 0] = "DomContentLoaded";
EventType[EventType["Load"] = 1] = "Load";
EventType[EventType["FullSnapshot"] = 2] = "FullSnapshot";
EventType[EventType["IncrementalSnapshot"] = 3] = "IncrementalSnapshot";
EventType[EventType["Meta"] = 4] = "Meta";
EventType[EventType["Custom"] = 5] = "Custom";
})(EventType || (EventType = {}));
var IncrementalSource;
(function (IncrementalSource) {
IncrementalSource[IncrementalSource["Mutation"] = 0] = "Mutation";
IncrementalSource[IncrementalSource["MouseMove"] = 1] = "MouseMove";
IncrementalSource[IncrementalSource["MouseInteraction"] = 2] = "MouseInteraction";
IncrementalSource[IncrementalSource["Scroll"] = 3] = "Scroll";
IncrementalSource[IncrementalSource["ViewportResize"] = 4] = "ViewportResize";
IncrementalSource[IncrementalSource["Input"] = 5] = "Input";
IncrementalSource[IncrementalSource["TouchMove"] = 6] = "TouchMove";
IncrementalSource[IncrementalSource["MediaInteraction"] = 7] = "MediaInteraction";
IncrementalSource[IncrementalSource["StyleSheetRule"] = 8] = "StyleSheetRule";
})(IncrementalSource || (IncrementalSource = {}));
var MouseInteractions;
(function (MouseInteractions) {
MouseInteractions[MouseInteractions["MouseUp"] = 0] = "MouseUp";
MouseInteractions[MouseInteractions["MouseDown"] = 1] = "MouseDown";
MouseInteractions[MouseInteractions["Click"] = 2] = "Click";
MouseInteractions[MouseInteractions["ContextMenu"] = 3] = "ContextMenu";
MouseInteractions[MouseInteractions["DblClick"] = 4] = "DblClick";
MouseInteractions[MouseInteractions["Focus"] = 5] = "Focus";
MouseInteractions[MouseInteractions["Blur"] = 6] = "Blur";
MouseInteractions[MouseInteractions["TouchStart"] = 7] = "TouchStart";
MouseInteractions[MouseInteractions["TouchMove_Departed"] = 8] = "TouchMove_Departed";
MouseInteractions[MouseInteractions["TouchEnd"] = 9] = "TouchEnd";
})(MouseInteractions || (MouseInteractions = {}));
var MediaInteractions;
(function (MediaInteractions) {
MediaInteractions[MediaInteractions["Play"] = 0] = "Play";
MediaInteractions[MediaInteractions["Pause"] = 1] = "Pause";
})(MediaInteractions || (MediaInteractions = {}));
var ReplayerEvents;
(function (ReplayerEvents) {
ReplayerEvents["Start"] = "start";
ReplayerEvents["Pause"] = "pause";
ReplayerEvents["Resume"] = "resume";
ReplayerEvents["Resize"] = "resize";
ReplayerEvents["Finish"] = "finish";
ReplayerEvents["FullsnapshotRebuilded"] = "fullsnapshot-rebuilded";
ReplayerEvents["LoadStylesheetStart"] = "load-stylesheet-start";
ReplayerEvents["LoadStylesheetEnd"] = "load-stylesheet-end";
ReplayerEvents["SkipStart"] = "skip-start";
ReplayerEvents["SkipEnd"] = "skip-end";
ReplayerEvents["MouseInteraction"] = "mouse-interaction";
ReplayerEvents["EventCast"] = "event-cast";
ReplayerEvents["CustomEvent"] = "custom-event";
ReplayerEvents["Flush"] = "flush";
})(ReplayerEvents || (ReplayerEvents = {}));
function on(type, fn, target) {

@@ -510,58 +588,2 @@ if (target === void 0) { target = document; }

var EventType;
(function (EventType) {
EventType[EventType["DomContentLoaded"] = 0] = "DomContentLoaded";
EventType[EventType["Load"] = 1] = "Load";
EventType[EventType["FullSnapshot"] = 2] = "FullSnapshot";
EventType[EventType["IncrementalSnapshot"] = 3] = "IncrementalSnapshot";
EventType[EventType["Meta"] = 4] = "Meta";
EventType[EventType["Custom"] = 5] = "Custom";
})(EventType || (EventType = {}));
var IncrementalSource;
(function (IncrementalSource) {
IncrementalSource[IncrementalSource["Mutation"] = 0] = "Mutation";
IncrementalSource[IncrementalSource["MouseMove"] = 1] = "MouseMove";
IncrementalSource[IncrementalSource["MouseInteraction"] = 2] = "MouseInteraction";
IncrementalSource[IncrementalSource["Scroll"] = 3] = "Scroll";
IncrementalSource[IncrementalSource["ViewportResize"] = 4] = "ViewportResize";
IncrementalSource[IncrementalSource["Input"] = 5] = "Input";
IncrementalSource[IncrementalSource["TouchMove"] = 6] = "TouchMove";
IncrementalSource[IncrementalSource["MediaInteraction"] = 7] = "MediaInteraction";
IncrementalSource[IncrementalSource["StyleSheetRule"] = 8] = "StyleSheetRule";
})(IncrementalSource || (IncrementalSource = {}));
var MouseInteractions;
(function (MouseInteractions) {
MouseInteractions[MouseInteractions["MouseUp"] = 0] = "MouseUp";
MouseInteractions[MouseInteractions["MouseDown"] = 1] = "MouseDown";
MouseInteractions[MouseInteractions["Click"] = 2] = "Click";
MouseInteractions[MouseInteractions["ContextMenu"] = 3] = "ContextMenu";
MouseInteractions[MouseInteractions["DblClick"] = 4] = "DblClick";
MouseInteractions[MouseInteractions["Focus"] = 5] = "Focus";
MouseInteractions[MouseInteractions["Blur"] = 6] = "Blur";
MouseInteractions[MouseInteractions["TouchStart"] = 7] = "TouchStart";
MouseInteractions[MouseInteractions["TouchMove_Departed"] = 8] = "TouchMove_Departed";
MouseInteractions[MouseInteractions["TouchEnd"] = 9] = "TouchEnd";
})(MouseInteractions || (MouseInteractions = {}));
var MediaInteractions;
(function (MediaInteractions) {
MediaInteractions[MediaInteractions["Play"] = 0] = "Play";
MediaInteractions[MediaInteractions["Pause"] = 1] = "Pause";
})(MediaInteractions || (MediaInteractions = {}));
var ReplayerEvents;
(function (ReplayerEvents) {
ReplayerEvents["Start"] = "start";
ReplayerEvents["Pause"] = "pause";
ReplayerEvents["Resume"] = "resume";
ReplayerEvents["Resize"] = "resize";
ReplayerEvents["Finish"] = "finish";
ReplayerEvents["FullsnapshotRebuilded"] = "fullsnapshot-rebuilded";
ReplayerEvents["LoadStylesheetStart"] = "load-stylesheet-start";
ReplayerEvents["LoadStylesheetEnd"] = "load-stylesheet-end";
ReplayerEvents["SkipStart"] = "skip-start";
ReplayerEvents["SkipEnd"] = "skip-end";
ReplayerEvents["MouseInteraction"] = "mouse-interaction";
ReplayerEvents["EventCast"] = "event-cast";
ReplayerEvents["CustomEvent"] = "custom-event";
})(ReplayerEvents || (ReplayerEvents = {}));
var moveKey = function (id, parentId) { return id + "@" + parentId; };

@@ -572,3 +594,3 @@ function isINode(n) {

var MutationBuffer = (function () {
function MutationBuffer(cb, blockClass, inlineStylesheet, maskAllInputs) {
function MutationBuffer(cb, blockClass, inlineStylesheet, maskInputOptions) {
var _this = this;

@@ -596,3 +618,3 @@ this.texts = [];

nextId: nextId,
node: serializeNodeWithId(n, document, mirror.map, _this.blockClass, true, _this.inlineStylesheet, _this.maskAllInputs),
node: serializeNodeWithId(n, document, mirror.map, _this.blockClass, true, _this.inlineStylesheet, _this.maskInputOptions),
});

@@ -643,2 +665,35 @@ };

};
this.emit = function () {
var payload = {
texts: _this.texts
.map(function (text) { return ({
id: mirror.getId(text.node),
value: text.value,
}); })
.filter(function (text) { return mirror.has(text.id); }),
attributes: _this.attributes
.map(function (attribute) { return ({
id: mirror.getId(attribute.node),
attributes: attribute.attributes,
}); })
.filter(function (attribute) { return mirror.has(attribute.id); }),
removes: _this.removes,
adds: _this.adds,
};
if (!payload.texts.length &&
!payload.attributes.length &&
!payload.removes.length &&
!payload.adds.length) {
return;
}
_this.emissionCallback(payload);
_this.texts = [];
_this.attributes = [];
_this.removes = [];
_this.adds = [];
_this.addedSet = new Set();
_this.movedSet = new Set();
_this.droppedSet = new Set();
_this.movedMap = {};
};
this.processMutation = function (m) {

@@ -722,38 +777,5 @@ switch (m.type) {

};
this.emit = function () {
var payload = {
texts: _this.texts
.map(function (text) { return ({
id: mirror.getId(text.node),
value: text.value,
}); })
.filter(function (text) { return mirror.has(text.id); }),
attributes: _this.attributes
.map(function (attribute) { return ({
id: mirror.getId(attribute.node),
attributes: attribute.attributes,
}); })
.filter(function (attribute) { return mirror.has(attribute.id); }),
removes: _this.removes,
adds: _this.adds,
};
if (!payload.texts.length &&
!payload.attributes.length &&
!payload.removes.length &&
!payload.adds.length) {
return;
}
_this.emissionCallback(payload);
_this.texts = [];
_this.attributes = [];
_this.removes = [];
_this.adds = [];
_this.addedSet = new Set();
_this.movedSet = new Set();
_this.droppedSet = new Set();
_this.movedMap = {};
};
this.blockClass = blockClass;
this.inlineStylesheet = inlineStylesheet;
this.maskAllInputs = maskAllInputs;
this.maskInputOptions = maskInputOptions;
this.emissionCallback = cb;

@@ -789,4 +811,4 @@ }

function initMutationObserver(cb, blockClass, inlineStylesheet, maskAllInputs) {
var mutationBuffer = new MutationBuffer(cb, blockClass, inlineStylesheet, maskAllInputs);
function initMutationObserver(cb, blockClass, inlineStylesheet, maskInputOptions) {
var mutationBuffer = new MutationBuffer(cb, blockClass, inlineStylesheet, maskInputOptions);
var observer = new MutationObserver(mutationBuffer.processMutations);

@@ -803,3 +825,7 @@ observer.observe(document, {

}
function initMoveObserver(cb, mousemoveWait) {
function initMoveObserver(cb, sampling) {
if (sampling.mousemove === false) {
return function () { };
}
var threshold = typeof sampling.mousemove === 'number' ? sampling.mousemove : 50;
var positions = [];

@@ -831,3 +857,3 @@ var timeBaseline;

wrappedCb(isTouchEvent(evt));
}, mousemoveWait, {
}, threshold, {
trailing: false,

@@ -843,3 +869,10 @@ });

}
function initMouseInteractionObserver(cb, blockClass) {
function initMouseInteractionObserver(cb, blockClass, sampling) {
if (sampling.mouseInteraction === false) {
return function () { };
}
var disableMap = sampling.mouseInteraction === true ||
sampling.mouseInteraction === undefined
? {}
: sampling.mouseInteraction;
var handlers = [];

@@ -864,3 +897,7 @@ var getHandler = function (eventKey) {

Object.keys(MouseInteractions)
.filter(function (key) { return Number.isNaN(Number(key)) && !key.endsWith('_Departed'); })
.filter(function (key) {
return Number.isNaN(Number(key)) &&
!key.endsWith('_Departed') &&
disableMap[key] !== false;
})
.forEach(function (eventKey) {

@@ -875,3 +912,3 @@ var eventName = eventKey.toLowerCase();

}
function initScrollObserver(cb, blockClass) {
function initScrollObserver(cb, blockClass, sampling) {
var updatePosition = throttle(function (evt) {

@@ -897,3 +934,3 @@ if (!evt.target || isBlocked(evt.target, blockClass)) {

}
}, 100);
}, sampling.scroll || 100);
return on('scroll', updatePosition);

@@ -913,19 +950,4 @@ }

var INPUT_TAGS = ['INPUT', 'TEXTAREA', 'SELECT'];
var MASK_TYPES = [
'color',
'date',
'datetime-local',
'email',
'month',
'number',
'range',
'search',
'tel',
'text',
'time',
'url',
'week',
];
var lastInputValueMap = new WeakMap();
function initInputObserver(cb, blockClass, ignoreClass, maskAllInputs) {
function initInputObserver(cb, blockClass, ignoreClass, maskInputOptions, sampling) {
function eventHandler(event) {

@@ -946,7 +968,7 @@ var target = event.target;

var isChecked = false;
var hasTextInput = MASK_TYPES.includes(type) || target.tagName === 'TEXTAREA';
if (type === 'radio' || type === 'checkbox') {
isChecked = target.checked;
}
else if (hasTextInput && maskAllInputs) {
else if (maskInputOptions[target.tagName.toLowerCase()] ||
maskInputOptions[type]) {
text = '*'.repeat(text.length);

@@ -979,6 +1001,4 @@ }

}
var handlers = [
'input',
'change',
].map(function (eventName) { return on(eventName, eventHandler); });
var events = sampling.input === 'last' ? ['change'] : ['input', 'change'];
var handlers = events.map(function (eventName) { return on(eventName, eventHandler); });
var propertyDescriptor = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value');

@@ -1134,8 +1154,8 @@ var hookProperties = [

mergeHooks(o, hooks);
var mutationObserver = initMutationObserver(o.mutationCb, o.blockClass, o.inlineStylesheet, o.maskAllInputs);
var mousemoveHandler = initMoveObserver(o.mousemoveCb, o.mousemoveWait);
var mouseInteractionHandler = initMouseInteractionObserver(o.mouseInteractionCb, o.blockClass);
var scrollHandler = initScrollObserver(o.scrollCb, o.blockClass);
var mutationObserver = initMutationObserver(o.mutationCb, o.blockClass, o.inlineStylesheet, o.maskInputOptions);
var mousemoveHandler = initMoveObserver(o.mousemoveCb, o.sampling);
var mouseInteractionHandler = initMouseInteractionObserver(o.mouseInteractionCb, o.blockClass, o.sampling);
var scrollHandler = initScrollObserver(o.scrollCb, o.blockClass, o.sampling);
var viewportResizeHandler = initViewportResizeObserver(o.viewportResizeCb);
var inputHandler = initInputObserver(o.inputCb, o.blockClass, o.ignoreClass, o.maskAllInputs);
var inputHandler = initInputObserver(o.inputCb, o.blockClass, o.ignoreClass, o.maskInputOptions, o.sampling);
var mediaInteractionHandler = initMediaInteractionObserver(o.mediaInteractionCb, o.blockClass);

@@ -1161,6 +1181,30 @@ var styleSheetObserver = initStyleSheetObserver(o.styleSheetRuleCb);

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, packFn = options.packFn;
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, maskAllInputs = options.maskAllInputs, _maskInputOptions = options.maskInputOptions, hooks = options.hooks, packFn = options.packFn, _d = options.sampling, sampling = _d === void 0 ? {} : _d, mousemoveWait = options.mousemoveWait;
if (!emit) {
throw new Error('emit function is required');
}
if (mousemoveWait !== undefined && sampling.mousemove === undefined) {
sampling.mousemove = mousemoveWait;
}
var maskInputOptions = maskAllInputs === true
? {
color: true,
date: true,
'datetime-local': true,
email: true,
month: true,
number: true,
range: true,
search: true,
tel: true,
text: true,
time: true,
url: true,
week: true,
textarea: true,
select: true,
}
: _maskInputOptions !== undefined
? _maskInputOptions
: {};
polyfill();

@@ -1196,3 +1240,3 @@ var lastFullSnapshotEvent;

}), isCheckout);
var _e = __read(snapshot(document, blockClass, inlineStylesheet, maskAllInputs), 2), node = _e[0], idNodeMap = _e[1];
var _e = __read(snapshot(document, blockClass, inlineStylesheet, maskInputOptions), 2), node = _e[0], idNodeMap = _e[1];
if (!node) {

@@ -1283,5 +1327,5 @@ return console.warn('Failed to snapshot the document');

ignoreClass: ignoreClass,
maskAllInputs: maskAllInputs,
maskInputOptions: maskInputOptions,
inlineStylesheet: inlineStylesheet,
mousemoveWait: mousemoveWait,
sampling: sampling,
}, hooks));

@@ -1288,0 +1332,0 @@ };

{
"name": "rrweb",
"version": "0.8.2",
"version": "0.8.3",
"description": "record and replay the web",

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

"pako": "^1.0.11",
"rrweb-snapshot": "^0.7.27",
"rrweb-snapshot": "^0.8.0",
"smoothscroll-polyfill": "^0.4.3"
}
}

@@ -17,2 +17,4 @@ <p align="center">

> I have joined Github Sponsors and highly appreciate your sponsorship.
rrweb refers to 'record and replay the web', which is a tool for recording and replaying users' interactions on the web.

@@ -19,0 +21,0 @@

@@ -15,2 +15,4 @@ <p align="center">

> 我已开通 Github Sponsor, 您可以通过赞助的形式帮助 rrweb 的开发。
rrweb 是 'record and replay the web' 的简写,旨在利用现代浏览器所提供的强大 API 录制并回放任意 web 界面中的用户操作。

@@ -17,0 +19,0 @@

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

import { MaskInputOptions } from 'rrweb-snapshot';
import { mutationRecord, blockClass, mutationCallBack } from '../types';

@@ -14,8 +15,8 @@ export default class MutationBuffer {

private inlineStylesheet;
private maskAllInputs;
constructor(cb: mutationCallBack, blockClass: blockClass, inlineStylesheet: boolean, maskAllInputs: boolean);
private maskInputOptions;
constructor(cb: mutationCallBack, blockClass: blockClass, inlineStylesheet: boolean, maskInputOptions: MaskInputOptions);
processMutations: (mutations: mutationRecord[]) => void;
emit: () => void;
private processMutation;
private genAdds;
emit: () => void;
}
import { observerParam, listenerHandler, hooksParam } from '../types';
export declare const INPUT_TAGS: string[];
export declare const MASK_TYPES: string[];
export default function initObservers(o: observerParam, hooks?: hooksParam): listenerHandler;

@@ -15,2 +15,4 @@ import { Timer } from './timer';

private service;
private treeIndex;
private fragmentParentMap;
constructor(events: Array<eventWithTime | string>, config?: Partial<playerConfig>);

@@ -35,2 +37,5 @@ on(event: string, handler: Handler): void;

private applyIncremental;
private applyMutation;
private applyScroll;
private applyInput;
private legacy_resolveMissingNode;

@@ -37,0 +42,0 @@ private moveAndHover;

@@ -66,2 +66,3 @@ import { playerConfig, eventWithTime, Emitter } from '../types';

};
export declare function discardPriorSnapshots(events: eventWithTime[], baselineTime: number): eventWithTime[];
declare type PlayerAssets = {

@@ -68,0 +69,0 @@ emitter: Emitter;

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

import { serializedNodeWithId, idNodeMap, INode } from 'rrweb-snapshot';
import { serializedNodeWithId, idNodeMap, INode, MaskInputOptions } from 'rrweb-snapshot';
import { PackFn, UnpackFn } from './packer/base';

@@ -93,2 +93,8 @@ export declare enum EventType {

export declare type blockClass = string | RegExp;
export declare type SamplingStrategy = Partial<{
mousemove: boolean | number;
mouseInteraction: boolean | Record<string, boolean | undefined>;
scroll: number;
input: 'all' | 'last';
}>;
export declare type recordOptions<T> = {

@@ -101,6 +107,8 @@ emit?: (e: T, isCheckout?: boolean) => void;

maskAllInputs?: boolean;
maskInputOptions?: MaskInputOptions;
inlineStylesheet?: boolean;
hooks?: hooksParam;
packFn?: PackFn;
sampling?: SamplingStrategy;
mousemoveWait?: number;
packFn?: PackFn;
};

@@ -117,6 +125,6 @@ export declare type observerParam = {

ignoreClass: string;
maskAllInputs: boolean;
maskInputOptions: MaskInputOptions;
inlineStylesheet: boolean;
styleSheetRuleCb: styleSheetRuleCallback;
mousemoveWait: number;
sampling: SamplingStrategy;
};

@@ -271,2 +279,4 @@ export declare type hooksParam = {

export declare type playerMetaData = {
startTime: number;
endTime: number;
totalTime: number;

@@ -304,4 +314,5 @@ };

EventCast = "event-cast",
CustomEvent = "custom-event"
CustomEvent = "custom-event",
Flush = "flush"
}
export {};

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

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

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

export declare function hookSetter<T>(target: T, key: string | number | symbol, d: PropertyDescriptor, isRevoked?: boolean, win?: Window & typeof globalThis): hookResetter;
export declare function patch(source: {
[key: string]: any;
}, name: string, replacement: (...args: any[]) => any): () => void;
export declare function getWindowHeight(): number;

@@ -14,1 +17,33 @@ export declare function getWindowWidth(): number;

export declare function polyfill(): void;
export declare function needCastInSyncMode(event: eventWithTime): boolean;
export declare type TreeNode = {
id: number;
mutation: addedNodeMutation;
parent?: TreeNode;
children: Record<number, TreeNode>;
texts: textMutation[];
attributes: attributeMutation[];
};
export declare class TreeIndex {
tree: Record<number, TreeNode>;
private removeNodeMutations;
private textMutations;
private attributeMutations;
private indexes;
private removeIdSet;
private scrollMap;
private inputMap;
constructor();
add(mutation: addedNodeMutation): void;
remove(mutation: removedNodeMutation): void;
text(mutation: textMutation): void;
attribute(mutation: attributeMutation): void;
scroll(d: scrollData): void;
input(d: inputData): void;
flush(): {
mutationData: mutationData;
scrollMap: TreeIndex['scrollMap'];
inputMap: TreeIndex['inputMap'];
};
private reset;
}

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

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

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

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

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc