@highlight-run/rrweb 2.0.1 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/dist/plugins/console-record.js +408 -609
  2. package/dist/plugins/console-record.min.js +12 -15
  3. package/dist/plugins/console-record.min.js.map +1 -1
  4. package/dist/plugins/console-replay.js +142 -271
  5. package/dist/plugins/console-replay.min.js +4 -15
  6. package/dist/plugins/console-replay.min.js.map +1 -1
  7. package/dist/plugins/sequential-id-record.js +23 -26
  8. package/dist/plugins/sequential-id-record.min.js +1 -1
  9. package/dist/plugins/sequential-id-record.min.js.map +1 -1
  10. package/dist/plugins/sequential-id-replay.js +26 -30
  11. package/dist/plugins/sequential-id-replay.min.js +1 -1
  12. package/dist/plugins/sequential-id-replay.min.js.map +1 -1
  13. package/dist/record/rrweb-record-pack.js +63 -146
  14. package/dist/record/rrweb-record-pack.min.js +3 -15
  15. package/dist/record/rrweb-record-pack.min.js.map +1 -1
  16. package/dist/record/rrweb-record.js +3002 -3118
  17. package/dist/record/rrweb-record.min.js +4 -15
  18. package/dist/record/rrweb-record.min.js.map +1 -1
  19. package/dist/replay/rrweb-replay-unpack.js +4354 -4054
  20. package/dist/replay/rrweb-replay-unpack.min.js +5 -17
  21. package/dist/replay/rrweb-replay-unpack.min.js.map +1 -1
  22. package/dist/replay/rrweb-replay.js +4286 -3984
  23. package/dist/replay/rrweb-replay.min.js +5 -17
  24. package/dist/replay/rrweb-replay.min.js.map +1 -1
  25. package/dist/rrweb-all.js +7634 -7453
  26. package/dist/rrweb-all.min.js +16 -17
  27. package/dist/rrweb-all.min.js.map +1 -1
  28. package/dist/rrweb.js +7339 -7075
  29. package/dist/rrweb.min.js +6 -17
  30. package/dist/rrweb.min.js.map +1 -1
  31. package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__auto__createBase64WorkerFactory.js +12 -0
  32. package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__auto__isNodeJS.js +7 -0
  33. package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +31 -0
  34. package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__node__WorkerClass.js +11 -0
  35. package/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__node__createBase64WorkerFactory.js +18 -0
  36. package/es/rrweb/_virtual/image-bitmap-data-url-worker.js +6 -0
  37. package/es/rrweb/ext/mitt/dist/mitt.es.js +1 -1
  38. package/es/rrweb/ext/tslib/tslib.es6.js +38 -0
  39. package/es/rrweb/packages/rrdom/es/virtual-dom.js +1099 -0
  40. package/es/rrweb/packages/rrweb/src/index.js +6 -4
  41. package/es/rrweb/packages/rrweb/src/packer/base.js +1 -1
  42. package/es/rrweb/packages/rrweb/src/packer/pack.js +4 -5
  43. package/es/rrweb/packages/rrweb/src/packer/unpack.js +24 -24
  44. package/es/rrweb/packages/rrweb/src/plugins/console/record/error-stack-parser.js +175 -176
  45. package/es/rrweb/packages/rrweb/src/plugins/console/record/index.js +109 -128
  46. package/es/rrweb/packages/rrweb/src/plugins/console/record/stringify.js +125 -138
  47. package/es/rrweb/packages/rrweb/src/plugins/console/replay/index.js +88 -105
  48. package/es/rrweb/packages/rrweb/src/plugins/sequential-id/record/index.js +19 -20
  49. package/es/rrweb/packages/rrweb/src/plugins/sequential-id/replay/index.js +25 -25
  50. package/es/rrweb/packages/rrweb/src/record/iframe-manager.js +29 -30
  51. package/es/rrweb/packages/rrweb/src/record/index.js +348 -373
  52. package/es/rrweb/packages/rrweb/src/record/mutation.js +487 -528
  53. package/es/rrweb/packages/rrweb/src/record/observer.js +584 -659
  54. package/es/rrweb/packages/rrweb/src/record/observers/canvas/2d.js +44 -73
  55. package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas-manager.js +166 -87
  56. package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas.js +21 -26
  57. package/es/rrweb/packages/rrweb/src/record/observers/canvas/serialize-args.js +119 -112
  58. package/es/rrweb/packages/rrweb/src/record/observers/canvas/webgl.js +53 -72
  59. package/es/rrweb/packages/rrweb/src/record/shadow-dom-manager.js +38 -40
  60. package/es/rrweb/packages/rrweb/src/record/stylesheet-manager.js +31 -0
  61. package/es/rrweb/packages/rrweb/src/replay/canvas/2d.js +27 -23
  62. package/es/rrweb/packages/rrweb/src/replay/canvas/deserialize-args.js +67 -0
  63. package/es/rrweb/packages/rrweb/src/replay/canvas/index.js +37 -29
  64. package/es/rrweb/packages/rrweb/src/replay/canvas/webgl.js +58 -120
  65. package/es/rrweb/packages/rrweb/src/replay/index.js +1545 -1854
  66. package/es/rrweb/packages/rrweb/src/replay/machine.js +275 -315
  67. package/es/rrweb/packages/rrweb/src/replay/smoothscroll.js +216 -218
  68. package/es/rrweb/packages/rrweb/src/replay/styles/inject-style.js +7 -7
  69. package/es/rrweb/packages/rrweb/src/replay/timer.js +87 -91
  70. package/es/rrweb/packages/rrweb/src/types.js +72 -72
  71. package/es/rrweb/packages/rrweb/src/utils.js +312 -506
  72. package/es/rrweb/packages/rrweb-snapshot/es/rrweb-snapshot.js +195 -71
  73. package/lib/plugins/console-record.js +469 -627
  74. package/lib/plugins/console-replay.js +198 -268
  75. package/lib/plugins/sequential-id-record.js +19 -20
  76. package/lib/plugins/sequential-id-replay.js +25 -25
  77. package/lib/record/rrweb-record-pack.js +184 -139
  78. package/lib/record/rrweb-record.js +2473 -2425
  79. package/lib/replay/rrweb-replay-unpack.js +3797 -3343
  80. package/lib/replay/rrweb-replay.js +3742 -3288
  81. package/lib/rrweb-all.js +6725 -6247
  82. package/lib/rrweb.js +6157 -5632
  83. package/package.json +14 -13
  84. package/typings/packer/base.d.ts +1 -1
  85. package/typings/plugins/console/record/index.d.ts +1 -1
  86. package/typings/plugins/console/record/stringify.d.ts +1 -1
  87. package/typings/plugins/sequential-id/record/index.d.ts +1 -1
  88. package/typings/plugins/sequential-id/replay/index.d.ts +1 -1
  89. package/typings/record/iframe-manager.d.ts +3 -3
  90. package/typings/record/index.d.ts +1 -1
  91. package/typings/record/mutation.d.ts +2 -1
  92. package/typings/record/observers/canvas/2d.d.ts +2 -1
  93. package/typings/record/observers/canvas/canvas-manager.d.ts +5 -2
  94. package/typings/record/observers/canvas/canvas.d.ts +1 -1
  95. package/typings/record/observers/canvas/serialize-args.d.ts +5 -5
  96. package/typings/record/observers/canvas/webgl.d.ts +2 -1
  97. package/typings/record/shadow-dom-manager.d.ts +2 -1
  98. package/typings/record/stylesheet-manager.d.ts +12 -0
  99. package/typings/record/workers/image-bitmap-data-url-worker.d.ts +5 -0
  100. package/typings/replay/canvas/2d.d.ts +3 -3
  101. package/typings/replay/canvas/deserialize-args.d.ts +7 -0
  102. package/typings/replay/canvas/index.d.ts +4 -3
  103. package/typings/replay/canvas/webgl.d.ts +3 -5
  104. package/typings/replay/index.d.ts +7 -10
  105. package/typings/types.d.ts +45 -17
  106. package/typings/utils.d.ts +17 -44
  107. package/dist/replay/rrweb-replay-unpack.min.css +0 -2
  108. package/dist/replay/rrweb-replay-unpack.min.css.map +0 -1
  109. package/dist/replay/rrweb-replay.min.css +0 -2
  110. package/dist/replay/rrweb-replay.min.css.map +0 -1
  111. package/dist/rrweb-all.min.css +0 -2
  112. package/dist/rrweb-all.min.css.map +0 -1
  113. package/dist/rrweb.min.css +0 -2
  114. package/dist/rrweb.min.css.map +0 -1
  115. package/es/rrweb/packages/rrweb/ext/tslib/tslib.es6.js +0 -78
  116. package/es/rrweb/packages/rrweb/src/replay/virtual-styles.js +0 -121
  117. package/typings/replay/virtual-styles.d.ts +0 -43
@@ -1,33 +1,30 @@
1
1
  var rrwebSequentialIdRecord = (function (exports) {
2
- 'use strict';
2
+ 'use strict';
3
3
 
4
- var defaultOptions = {
5
- key: '_sid',
6
- };
7
- var PLUGIN_NAME = 'rrweb/sequential-id@1';
8
- var getRecordSequentialIdPlugin = function (options) {
9
- var _options = options
10
- ? Object.assign({}, defaultOptions, options)
11
- : defaultOptions;
12
- var id = 0;
13
- return {
14
- name: PLUGIN_NAME,
15
- eventProcessor: function (event) {
16
- var _a;
17
- Object.assign(event, (_a = {},
18
- _a[_options.key] = ++id,
19
- _a));
20
- return event;
21
- },
22
- options: _options,
23
- };
4
+ const defaultOptions = {
5
+ key: "_sid"
6
+ };
7
+ const PLUGIN_NAME = "rrweb/sequential-id@1";
8
+ const getRecordSequentialIdPlugin = (options) => {
9
+ const _options = options ? Object.assign({}, defaultOptions, options) : defaultOptions;
10
+ let id = 0;
11
+ return {
12
+ name: PLUGIN_NAME,
13
+ eventProcessor(event) {
14
+ Object.assign(event, {
15
+ [_options.key]: ++id
16
+ });
17
+ return event;
18
+ },
19
+ options: _options
24
20
  };
21
+ };
25
22
 
26
- exports.PLUGIN_NAME = PLUGIN_NAME;
27
- exports.getRecordSequentialIdPlugin = getRecordSequentialIdPlugin;
23
+ exports.PLUGIN_NAME = PLUGIN_NAME;
24
+ exports.getRecordSequentialIdPlugin = getRecordSequentialIdPlugin;
28
25
 
29
- Object.defineProperty(exports, '__esModule', { value: true });
26
+ Object.defineProperty(exports, '__esModule', { value: true });
30
27
 
31
- return exports;
28
+ return exports;
32
29
 
33
- }({}));
30
+ })({});
@@ -1,2 +1,2 @@
1
- var rrwebSequentialIdRecord=function(e){"use strict";var r={key:"_sid"},n="rrweb/sequential-id@1";return e.PLUGIN_NAME=n,e.getRecordSequentialIdPlugin=function(e){var t=e?Object.assign({},r,e):r,i=0;return{name:n,eventProcessor:function(e){var r;return Object.assign(e,((r={})[t.key]=++i,r)),e},options:t}},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
1
+ var rrwebSequentialIdRecord=function(e){"use strict";const t={key:"_sid"},n="rrweb/sequential-id@1",c=r=>{const i=r?Object.assign({},t,r):t;let s=0;return{name:n,eventProcessor(u){return Object.assign(u,{[i.key]:++s}),u},options:i}};return e.PLUGIN_NAME=n,e.getRecordSequentialIdPlugin=c,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
2
2
  //# sourceMappingURL=sequential-id-record.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sequential-id-record.min.js","sources":["../../../src/plugins/sequential-id/record/index.ts"],"sourcesContent":["import { RecordPlugin } from '../../../types';\n\nexport type SequentialIdOptions = {\n key: string;\n};\n\nconst defaultOptions: SequentialIdOptions = {\n key: '_sid',\n};\n\nexport const PLUGIN_NAME = 'rrweb/sequential-id@1';\n\nexport const getRecordSequentialIdPlugin: (\n options?: Partial<SequentialIdOptions>,\n) => RecordPlugin = (options) => {\n const _options = options\n ? Object.assign({}, defaultOptions, options)\n : defaultOptions;\n let id = 0;\n\n return {\n name: PLUGIN_NAME,\n eventProcessor(event) {\n Object.assign(event, {\n [_options.key]: ++id,\n });\n return event;\n },\n options: _options,\n };\n};\n"],"names":["defaultOptions","key","PLUGIN_NAME","options","_options","Object","assign","id","name","eventProcessor","event"],"mappings":"qDAMA,IAAMA,EAAsC,CAC1CC,IAAK,QAGMC,EAAc,6EAIP,SAACC,GACnB,IAAMC,EAAWD,EACbE,OAAOC,OAAO,GAAIN,EAAgBG,GAClCH,EACAO,EAAK,EAET,MAAO,CACLC,KAAMN,EACNO,wBAAeC,SAIb,OAHAL,OAAOC,OAAOI,UACXN,EAASH,OAAQM,MAEbG,GAETP,QAASC"}
1
+ {"version":3,"file":"sequential-id-record.min.js","sources":["../../src/plugins/sequential-id/record/index.ts"],"sourcesContent":["import type { RecordPlugin } from '../../../types';\n\nexport type SequentialIdOptions = {\n key: string;\n};\n\nconst defaultOptions: SequentialIdOptions = {\n key: '_sid',\n};\n\nexport const PLUGIN_NAME = 'rrweb/sequential-id@1';\n\nexport const getRecordSequentialIdPlugin: (\n options?: Partial<SequentialIdOptions>,\n) => RecordPlugin = (options) => {\n const _options = options\n ? Object.assign({}, defaultOptions, options)\n : defaultOptions;\n let id = 0;\n\n return {\n name: PLUGIN_NAME,\n eventProcessor(event) {\n Object.assign(event, {\n [_options.key]: ++id,\n });\n return event;\n },\n options: _options,\n };\n};\n"],"names":[],"mappings":";;;EAAA,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAa,MAAC,WAAW,CAAC,uBAAuB,CAAC,2BAA2B,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAM,CAAC,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;;;;;;;;;;;;;"}
@@ -1,37 +1,33 @@
1
1
  var rrwebSequentialIdReplay = (function (exports) {
2
- 'use strict';
2
+ 'use strict';
3
3
 
4
- var defaultOptions = {
5
- key: '_sid',
6
- warnOnMissingId: true,
7
- };
8
- var getReplaySequentialIdPlugin = function (options) {
9
- var _a = options
10
- ? Object.assign({}, defaultOptions, options)
11
- : defaultOptions, key = _a.key, warnOnMissingId = _a.warnOnMissingId;
12
- var currentId = 1;
13
- return {
14
- handler: function (event) {
15
- if (key in event) {
16
- var id = event[key];
17
- if (id !== currentId) {
18
- console.error("[sequential-id-plugin]: expect to get an id with value \"".concat(currentId, "\", but got \"").concat(id, "\""));
19
- }
20
- else {
21
- currentId++;
22
- }
23
- }
24
- else if (warnOnMissingId) {
25
- console.warn("[sequential-id-plugin]: failed to get id in key: \"".concat(key, "\""));
26
- }
27
- },
28
- };
4
+ const defaultOptions = {
5
+ key: "_sid",
6
+ warnOnMissingId: true
7
+ };
8
+ const getReplaySequentialIdPlugin = (options) => {
9
+ const { key, warnOnMissingId } = options ? Object.assign({}, defaultOptions, options) : defaultOptions;
10
+ let currentId = 1;
11
+ return {
12
+ handler(event) {
13
+ if (key in event) {
14
+ const id = event[key];
15
+ if (id !== currentId) {
16
+ console.error(`[sequential-id-plugin]: expect to get an id with value "${currentId}", but got "${id}"`);
17
+ } else {
18
+ currentId++;
19
+ }
20
+ } else if (warnOnMissingId) {
21
+ console.warn(`[sequential-id-plugin]: failed to get id in key: "${key}"`);
22
+ }
23
+ }
29
24
  };
25
+ };
30
26
 
31
- exports.getReplaySequentialIdPlugin = getReplaySequentialIdPlugin;
27
+ exports.getReplaySequentialIdPlugin = getReplaySequentialIdPlugin;
32
28
 
33
- Object.defineProperty(exports, '__esModule', { value: true });
29
+ Object.defineProperty(exports, '__esModule', { value: true });
34
30
 
35
- return exports;
31
+ return exports;
36
32
 
37
- }({}));
33
+ })({});
@@ -1,2 +1,2 @@
1
- var rrwebSequentialIdReplay=function(e){"use strict";var n={key:"_sid",warnOnMissingId:!0};return e.getReplaySequentialIdPlugin=function(e){var i=e?Object.assign({},n,e):n,t=i.key,a=i.warnOnMissingId,r=1;return{handler:function(e){if(t in e){var n=e[t];n!==r?console.error('[sequential-id-plugin]: expect to get an id with value "'.concat(r,'", but got "').concat(n,'"')):r++}else a&&console.warn('[sequential-id-plugin]: failed to get id in key: "'.concat(t,'"'))}}},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
1
+ var rrwebSequentialIdReplay=function(e){"use strict";const t={key:"_sid",warnOnMissingId:!0},u=l=>{const{key:n,warnOnMissingId:r}=l?Object.assign({},t,l):t;let i=1;return{handler(a){if(n in a){const s=a[n];s!==i?console.error(`[sequential-id-plugin]: expect to get an id with value "${i}", but got "${s}"`):i++}else r&&console.warn(`[sequential-id-plugin]: failed to get id in key: "${n}"`)}}};return e.getReplaySequentialIdPlugin=u,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
2
2
  //# sourceMappingURL=sequential-id-replay.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sequential-id-replay.min.js","sources":["../../../src/plugins/sequential-id/replay/index.ts"],"sourcesContent":["import type { SequentialIdOptions } from '../record';\nimport { ReplayPlugin, eventWithTime } from '../../../types';\n\ntype Options = SequentialIdOptions & {\n warnOnMissingId: boolean;\n};\n\nconst defaultOptions: Options = {\n key: '_sid',\n warnOnMissingId: true,\n};\n\nexport const getReplaySequentialIdPlugin: (\n options?: Partial<Options>,\n) => ReplayPlugin = (options) => {\n const { key, warnOnMissingId } = options\n ? Object.assign({}, defaultOptions, options)\n : defaultOptions;\n let currentId = 1;\n\n return {\n handler(event: eventWithTime) {\n if (key in event) {\n const id = ((event as unknown) as Record<string, number>)[key];\n if (id !== currentId) {\n console.error(\n `[sequential-id-plugin]: expect to get an id with value \"${currentId}\", but got \"${id}\"`,\n );\n } else {\n currentId++;\n }\n } else if (warnOnMissingId) {\n console.warn(\n `[sequential-id-plugin]: failed to get id in key: \"${key}\"`,\n );\n }\n },\n };\n};\n"],"names":["defaultOptions","key","warnOnMissingId","options","_a","Object","assign","currentId","handler","event","id","console","error","warn"],"mappings":"qDAOA,IAAMA,EAA0B,CAC9BC,IAAK,OACLC,iBAAiB,wCAKC,SAACC,GACb,IAAAC,EAA2BD,EAC7BE,OAAOC,OAAO,GAAIN,EAAgBG,GAClCH,EAFIC,QAAKC,oBAGTK,EAAY,EAEhB,MAAO,CACLC,QAAA,SAAQC,GACN,GAAIR,KAAOQ,EAAO,CAChB,IAAMC,EAAOD,EAA6CR,GACtDS,IAAOH,EACTI,QAAQC,MACN,kEAA2DL,yBAAwBG,QAGrFH,SAEOL,GACTS,QAAQE,KACN,4DAAqDZ"}
1
+ {"version":3,"file":"sequential-id-replay.min.js","sources":["../../src/plugins/sequential-id/replay/index.ts"],"sourcesContent":["import type { SequentialIdOptions } from '../record';\nimport type { ReplayPlugin, eventWithTime } from '../../../types';\n\ntype Options = SequentialIdOptions & {\n warnOnMissingId: boolean;\n};\n\nconst defaultOptions: Options = {\n key: '_sid',\n warnOnMissingId: true,\n};\n\nexport const getReplaySequentialIdPlugin: (\n options?: Partial<Options>,\n) => ReplayPlugin = (options) => {\n const { key, warnOnMissingId } = options\n ? Object.assign({}, defaultOptions, options)\n : defaultOptions;\n let currentId = 1;\n\n return {\n handler(event: eventWithTime) {\n if (key in event) {\n const id = ((event as unknown) as Record<string, number>)[key];\n if (id !== currentId) {\n console.error(\n `[sequential-id-plugin]: expect to get an id with value \"${currentId}\", but got \"${id}\"`,\n );\n } else {\n currentId++;\n }\n } else if (warnOnMissingId) {\n console.warn(\n `[sequential-id-plugin]: failed to get id in key: \"${key}\"`,\n );\n }\n },\n };\n};\n"],"names":[],"mappings":";;;EAAA,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAa,MAAC,2BAA2B,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,wDAAwD,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAE,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,kDAAkD,EAAE,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,CAAC;;;;;;;;;;;;"}
@@ -1,151 +1,47 @@
1
1
  var rrwebRecord = (function (exports) {
2
2
  'use strict';
3
3
 
4
- /*! *****************************************************************************
5
- Copyright (c) Microsoft Corporation.
6
-
7
- Permission to use, copy, modify, and/or distribute this software for any
8
- purpose with or without fee is hereby granted.
9
-
10
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16
- PERFORMANCE OF THIS SOFTWARE.
17
- ***************************************************************************** */
18
-
19
- var __assign = function() {
20
- __assign = Object.assign || function __assign(t) {
21
- for (var s, i = 1, n = arguments.length; i < n; i++) {
22
- s = arguments[i];
23
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
24
- }
25
- return t;
26
- };
27
- return __assign.apply(this, arguments);
28
- };
29
-
30
4
  var NodeType;
31
- (function (NodeType) {
32
- NodeType[NodeType["Document"] = 0] = "Document";
33
- NodeType[NodeType["DocumentType"] = 1] = "DocumentType";
34
- NodeType[NodeType["Element"] = 2] = "Element";
35
- NodeType[NodeType["Text"] = 3] = "Text";
36
- NodeType[NodeType["CDATA"] = 4] = "CDATA";
37
- NodeType[NodeType["Comment"] = 5] = "Comment";
5
+ (function(NodeType2) {
6
+ NodeType2[NodeType2["Document"] = 0] = "Document";
7
+ NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
8
+ NodeType2[NodeType2["Element"] = 2] = "Element";
9
+ NodeType2[NodeType2["Text"] = 3] = "Text";
10
+ NodeType2[NodeType2["CDATA"] = 4] = "CDATA";
11
+ NodeType2[NodeType2["Comment"] = 5] = "Comment";
38
12
  })(NodeType || (NodeType = {}));
39
13
 
40
- var EventType;
41
- (function (EventType) {
42
- EventType[EventType["DomContentLoaded"] = 0] = "DomContentLoaded";
43
- EventType[EventType["Load"] = 1] = "Load";
44
- EventType[EventType["FullSnapshot"] = 2] = "FullSnapshot";
45
- EventType[EventType["IncrementalSnapshot"] = 3] = "IncrementalSnapshot";
46
- EventType[EventType["Meta"] = 4] = "Meta";
47
- EventType[EventType["Custom"] = 5] = "Custom";
48
- EventType[EventType["Plugin"] = 6] = "Plugin";
49
- })(EventType || (EventType = {}));
50
- var IncrementalSource;
51
- (function (IncrementalSource) {
52
- IncrementalSource[IncrementalSource["Mutation"] = 0] = "Mutation";
53
- IncrementalSource[IncrementalSource["MouseMove"] = 1] = "MouseMove";
54
- IncrementalSource[IncrementalSource["MouseInteraction"] = 2] = "MouseInteraction";
55
- IncrementalSource[IncrementalSource["Scroll"] = 3] = "Scroll";
56
- IncrementalSource[IncrementalSource["ViewportResize"] = 4] = "ViewportResize";
57
- IncrementalSource[IncrementalSource["Input"] = 5] = "Input";
58
- IncrementalSource[IncrementalSource["TouchMove"] = 6] = "TouchMove";
59
- IncrementalSource[IncrementalSource["MediaInteraction"] = 7] = "MediaInteraction";
60
- IncrementalSource[IncrementalSource["StyleSheetRule"] = 8] = "StyleSheetRule";
61
- IncrementalSource[IncrementalSource["CanvasMutation"] = 9] = "CanvasMutation";
62
- IncrementalSource[IncrementalSource["Font"] = 10] = "Font";
63
- IncrementalSource[IncrementalSource["Log"] = 11] = "Log";
64
- IncrementalSource[IncrementalSource["Drag"] = 12] = "Drag";
65
- IncrementalSource[IncrementalSource["StyleDeclaration"] = 13] = "StyleDeclaration";
66
- })(IncrementalSource || (IncrementalSource = {}));
67
- var MouseInteractions;
68
- (function (MouseInteractions) {
69
- MouseInteractions[MouseInteractions["MouseUp"] = 0] = "MouseUp";
70
- MouseInteractions[MouseInteractions["MouseDown"] = 1] = "MouseDown";
71
- MouseInteractions[MouseInteractions["Click"] = 2] = "Click";
72
- MouseInteractions[MouseInteractions["ContextMenu"] = 3] = "ContextMenu";
73
- MouseInteractions[MouseInteractions["DblClick"] = 4] = "DblClick";
74
- MouseInteractions[MouseInteractions["Focus"] = 5] = "Focus";
75
- MouseInteractions[MouseInteractions["Blur"] = 6] = "Blur";
76
- MouseInteractions[MouseInteractions["TouchStart"] = 7] = "TouchStart";
77
- MouseInteractions[MouseInteractions["TouchMove_Departed"] = 8] = "TouchMove_Departed";
78
- MouseInteractions[MouseInteractions["TouchEnd"] = 9] = "TouchEnd";
79
- MouseInteractions[MouseInteractions["TouchCancel"] = 10] = "TouchCancel";
80
- })(MouseInteractions || (MouseInteractions = {}));
81
- var CanvasContext;
82
- (function (CanvasContext) {
83
- CanvasContext[CanvasContext["2D"] = 0] = "2D";
84
- CanvasContext[CanvasContext["WebGL"] = 1] = "WebGL";
85
- CanvasContext[CanvasContext["WebGL2"] = 2] = "WebGL2";
86
- })(CanvasContext || (CanvasContext = {}));
87
- var MediaInteractions;
88
- (function (MediaInteractions) {
89
- MediaInteractions[MediaInteractions["Play"] = 0] = "Play";
90
- MediaInteractions[MediaInteractions["Pause"] = 1] = "Pause";
91
- MediaInteractions[MediaInteractions["Seeked"] = 2] = "Seeked";
92
- MediaInteractions[MediaInteractions["VolumeChange"] = 3] = "VolumeChange";
93
- })(MediaInteractions || (MediaInteractions = {}));
94
- var ReplayerEvents;
95
- (function (ReplayerEvents) {
96
- ReplayerEvents["Start"] = "start";
97
- ReplayerEvents["Pause"] = "pause";
98
- ReplayerEvents["Resume"] = "resume";
99
- ReplayerEvents["Resize"] = "resize";
100
- ReplayerEvents["Finish"] = "finish";
101
- ReplayerEvents["FullsnapshotRebuilded"] = "fullsnapshot-rebuilded";
102
- ReplayerEvents["LoadStylesheetStart"] = "load-stylesheet-start";
103
- ReplayerEvents["LoadStylesheetEnd"] = "load-stylesheet-end";
104
- ReplayerEvents["SkipStart"] = "skip-start";
105
- ReplayerEvents["SkipEnd"] = "skip-end";
106
- ReplayerEvents["MouseInteraction"] = "mouse-interaction";
107
- ReplayerEvents["EventCast"] = "event-cast";
108
- ReplayerEvents["CustomEvent"] = "custom-event";
109
- ReplayerEvents["Flush"] = "flush";
110
- ReplayerEvents["StateChange"] = "state-change";
111
- ReplayerEvents["PlayBack"] = "play-back";
112
- })(ReplayerEvents || (ReplayerEvents = {}));
113
-
114
- var DEPARTED_MIRROR_ACCESS_WARNING = 'Please stop import mirror directly. Instead of that,' +
115
- '\r\n' +
116
- 'now you can use replayer.getMirror() to access the mirror instance of a replayer,' +
117
- '\r\n' +
118
- 'or you can use record.mirror to access the mirror instance during recording.';
119
- var _mirror = {
120
- map: {},
121
- getId: function () {
122
- console.error(DEPARTED_MIRROR_ACCESS_WARNING);
123
- return -1;
124
- },
125
- getNode: function () {
126
- console.error(DEPARTED_MIRROR_ACCESS_WARNING);
127
- return null;
128
- },
129
- removeNodeFromMap: function () {
130
- console.error(DEPARTED_MIRROR_ACCESS_WARNING);
131
- },
132
- has: function () {
133
- console.error(DEPARTED_MIRROR_ACCESS_WARNING);
134
- return false;
135
- },
136
- reset: function () {
137
- console.error(DEPARTED_MIRROR_ACCESS_WARNING);
138
- },
14
+ const DEPARTED_MIRROR_ACCESS_WARNING = "Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";
15
+ let _mirror = {
16
+ map: {},
17
+ getId() {
18
+ console.error(DEPARTED_MIRROR_ACCESS_WARNING);
19
+ return -1;
20
+ },
21
+ getNode() {
22
+ console.error(DEPARTED_MIRROR_ACCESS_WARNING);
23
+ return null;
24
+ },
25
+ removeNodeFromMap() {
26
+ console.error(DEPARTED_MIRROR_ACCESS_WARNING);
27
+ },
28
+ has() {
29
+ console.error(DEPARTED_MIRROR_ACCESS_WARNING);
30
+ return false;
31
+ },
32
+ reset() {
33
+ console.error(DEPARTED_MIRROR_ACCESS_WARNING);
34
+ }
139
35
  };
140
- if (typeof window !== 'undefined' && window.Proxy && window.Reflect) {
141
- _mirror = new Proxy(_mirror, {
142
- get: function (target, prop, receiver) {
143
- if (prop === 'map') {
144
- console.error(DEPARTED_MIRROR_ACCESS_WARNING);
145
- }
146
- return Reflect.get(target, prop, receiver);
147
- },
148
- });
36
+ if (typeof window !== "undefined" && window.Proxy && window.Reflect) {
37
+ _mirror = new Proxy(_mirror, {
38
+ get(target, prop, receiver) {
39
+ if (prop === "map") {
40
+ console.error(DEPARTED_MIRROR_ACCESS_WARNING);
41
+ }
42
+ return Reflect.get(target, prop, receiver);
43
+ }
44
+ });
149
45
  }
150
46
 
151
47
  /*
@@ -731,11 +627,32 @@ var rrwebRecord = (function (exports) {
731
627
  return r;
732
628
  }
733
629
 
734
- var MARK = 'v1';
630
+ const MARK = "v1";
735
631
 
736
- var pack = function (event) {
737
- var _e = __assign(__assign({}, event), { v: MARK });
738
- return strFromU8(zlibSync(strToU8(JSON.stringify(_e))), true);
632
+ var __defProp = Object.defineProperty;
633
+ var __defProps = Object.defineProperties;
634
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
635
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
636
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
637
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
638
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
639
+ var __spreadValues = (a, b) => {
640
+ for (var prop in b || (b = {}))
641
+ if (__hasOwnProp.call(b, prop))
642
+ __defNormalProp(a, prop, b[prop]);
643
+ if (__getOwnPropSymbols)
644
+ for (var prop of __getOwnPropSymbols(b)) {
645
+ if (__propIsEnum.call(b, prop))
646
+ __defNormalProp(a, prop, b[prop]);
647
+ }
648
+ return a;
649
+ };
650
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
651
+ const pack = (event) => {
652
+ const _e = __spreadProps(__spreadValues({}, event), {
653
+ v: MARK
654
+ });
655
+ return strFromU8(zlibSync(strToU8(JSON.stringify(_e))), true);
739
656
  };
740
657
 
741
658
  exports.pack = pack;
@@ -744,4 +661,4 @@ var rrwebRecord = (function (exports) {
744
661
 
745
662
  return exports;
746
663
 
747
- }({}));
664
+ })({});
@@ -1,16 +1,4 @@
1
- var rrwebRecord=function(e){"use strict";
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var r,n,t,o,a,u,f,i=function(){return(i=Object.assign||function(e){for(var r,n=1,t=arguments.length;n<t;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)};!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(r||(r={})),function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin"}(n||(n={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration"}(t||(t={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel"}(o||(o={})),function(e){e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2"}(a||(a={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange"}(u||(u={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back"}(f||(f={}));var c="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",l={map:{},getId:function(){return console.error(c),-1},getNode:function(){return console.error(c),null},removeNodeFromMap:function(){console.error(c)},has:function(){return console.error(c),!1},reset:function(){console.error(c)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(l=new Proxy(l,{get:function(e,r,n){return"map"===r&&console.error(c),Reflect.get(e,r,n)}}));for(var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v="undefined"==typeof Uint8Array?[]:new Uint8Array(256),h=0;h<s.length;h++)v[s.charCodeAt(h)]=h;var d=Uint8Array,m=Uint16Array,g=Uint32Array,w=new d([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),p=new d([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),y=new d([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),M=function(e,r){for(var n=new m(31),t=0;t<31;++t)n[t]=r+=1<<e[t-1];var o=new g(n[30]);for(t=1;t<30;++t)for(var a=n[t];a<n[t+1];++a)o[a]=a-n[t]<<5|t;return[n,o]},C=M(w,2),S=C[0],D=C[1];S[28]=258,D[258]=28;for(var b=M(p,0)[1],T=new m(32768),k=0;k<32768;++k){var P=(43690&k)>>>1|(21845&k)<<1;P=(61680&(P=(52428&P)>>>2|(13107&P)<<2))>>>4|(3855&P)<<4,T[k]=((65280&P)>>>8|(255&P)<<8)>>>1}var x=function(e,r,n){for(var t=e.length,o=0,a=new m(r);o<t;++o)++a[e[o]-1];var u,f=new m(r);for(o=0;o<r;++o)f[o]=f[o-1]+a[o-1]<<1;if(n){u=new m(1<<r);var i=15-r;for(o=0;o<t;++o)if(e[o])for(var c=o<<4|e[o],l=r-e[o],s=f[e[o]-1]++<<l,v=s|(1<<l)-1;s<=v;++s)u[T[s]>>>i]=c}else for(u=new m(t),o=0;o<t;++o)u[o]=T[f[e[o]-1]++]>>>15-e[o];return u},A=new d(288);for(k=0;k<144;++k)A[k]=8;for(k=144;k<256;++k)A[k]=9;for(k=256;k<280;++k)A[k]=7;for(k=280;k<288;++k)A[k]=8;var L=new d(32);for(k=0;k<32;++k)L[k]=5;var I=x(A,9,0),E=x(L,5,0),F=function(e){return(e/8>>0)+(7&e&&1)},R=function(e,r,n){(null==r||r<0)&&(r=0),(null==n||n>e.length)&&(n=e.length);var t=new(e instanceof m?m:e instanceof g?g:d)(n-r);return t.set(e.subarray(r,n)),t},U=function(e,r,n){n<<=7&r;var t=r/8>>0;e[t]|=n,e[t+1]|=n>>>8},O=function(e,r,n){n<<=7&r;var t=r/8>>0;e[t]|=n,e[t+1]|=n>>>8,e[t+2]|=n>>>16},z=function(e,r){for(var n=[],t=0;t<e.length;++t)e[t]&&n.push({s:t,f:e[t]});var o=n.length,a=n.slice();if(!o)return[new d(0),0];if(1==o){var u=new d(n[0].s+1);return u[n[0].s]=1,[u,1]}n.sort((function(e,r){return e.f-r.f})),n.push({s:-1,f:25001});var f=n[0],i=n[1],c=0,l=1,s=2;for(n[0]={s:-1,f:f.f+i.f,l:f,r:i};l!=o-1;)f=n[n[c].f<n[s].f?c++:s++],i=n[c!=l&&n[c].f<n[s].f?c++:s++],n[l++]={s:-1,f:f.f+i.f,l:f,r:i};var v=a[0].s;for(t=1;t<o;++t)a[t].s>v&&(v=a[t].s);var h=new m(v+1),g=G(n[l-1],h,0);if(g>r){t=0;var w=0,p=g-r,y=1<<p;for(a.sort((function(e,r){return h[r.s]-h[e.s]||e.f-r.f}));t<o;++t){var M=a[t].s;if(!(h[M]>r))break;w+=y-(1<<g-h[M]),h[M]=r}for(w>>>=p;w>0;){var C=a[t].s;h[C]<r?w-=1<<r-h[C]++-1:++t}for(;t>=0&&w;--t){var S=a[t].s;h[S]==r&&(--h[S],++w)}g=r}return[new d(h),g]},G=function(e,r,n){return-1==e.s?Math.max(G(e.l,r,n+1),G(e.r,r,n+1)):r[e.s]=n},V=function(e){for(var r=e.length;r&&!e[--r];);for(var n=new m(++r),t=0,o=e[0],a=1,u=function(e){n[t++]=e},f=1;f<=r;++f)if(e[f]==o&&f!=r)++a;else{if(!o&&a>2){for(;a>138;a-=138)u(32754);a>2&&(u(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(u(o),--a;a>6;a-=6)u(8304);a>2&&(u(a-3<<5|8208),a=0)}for(;a--;)u(o);a=1,o=e[f]}return[n.subarray(0,t),r]},W=function(e,r){for(var n=0,t=0;t<r.length;++t)n+=e[t]*r[t];return n},j=function(e,r,n){var t=n.length,o=F(r+2);e[o]=255&t,e[o+1]=t>>>8,e[o+2]=255^e[o],e[o+3]=255^e[o+1];for(var a=0;a<t;++a)e[o+a+4]=n[a];return 8*(o+4+t)},B=function(e,r,n,t,o,a,u,f,i,c,l){U(r,l++,n),++o[256];for(var s=z(o,15),v=s[0],h=s[1],d=z(a,15),g=d[0],M=d[1],C=V(v),S=C[0],D=C[1],b=V(g),T=b[0],k=b[1],P=new m(19),F=0;F<S.length;++F)P[31&S[F]]++;for(F=0;F<T.length;++F)P[31&T[F]]++;for(var R=z(P,7),G=R[0],B=R[1],N=19;N>4&&!G[y[N-1]];--N);var _,J,q,H,K=c+5<<3,Q=W(o,A)+W(a,L)+u,X=W(o,v)+W(a,g)+u+14+3*N+W(P,G)+(2*P[16]+3*P[17]+7*P[18]);if(K<=Q&&K<=X)return j(r,l,e.subarray(i,i+c));if(U(r,l,1+(X<Q)),l+=2,X<Q){_=x(v,h,0),J=v,q=x(g,M,0),H=g;var Y=x(G,B,0);U(r,l,D-257),U(r,l+5,k-1),U(r,l+10,N-4),l+=14;for(F=0;F<N;++F)U(r,l+3*F,G[y[F]]);l+=3*N;for(var Z=[S,T],$=0;$<2;++$){var ee=Z[$];for(F=0;F<ee.length;++F){var re=31&ee[F];U(r,l,Y[re]),l+=G[re],re>15&&(U(r,l,ee[F]>>>5&127),l+=ee[F]>>>12)}}}else _=I,J=A,q=E,H=L;for(F=0;F<f;++F)if(t[F]>255){re=t[F]>>>18&31;O(r,l,_[re+257]),l+=J[re+257],re>7&&(U(r,l,t[F]>>>23&31),l+=w[re]);var ne=31&t[F];O(r,l,q[ne]),l+=H[ne],ne>3&&(O(r,l,t[F]>>>5&8191),l+=p[ne])}else O(r,l,_[t[F]]),l+=J[t[F]];return O(r,l,_[256]),l+J[256]},N=new g([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),_=new d(0),J=function(e,r,n,t,o){return function(e,r,n,t,o,a){var u=e.length,f=new d(t+u+5*(1+Math.floor(u/7e3))+o),i=f.subarray(t,f.length-o),c=0;if(!r||u<8)for(var l=0;l<=u;l+=65535){var s=l+65535;s<u?c=j(i,c,e.subarray(l,s)):(i[l]=a,c=j(i,c,e.subarray(l,u)))}else{for(var v=N[r-1],h=v>>>13,y=8191&v,M=(1<<n)-1,C=new m(32768),S=new m(M+1),T=Math.ceil(n/3),k=2*T,P=function(r){return(e[r]^e[r+1]<<T^e[r+2]<<k)&M},x=new g(25e3),A=new m(288),L=new m(32),I=0,E=0,U=(l=0,0),O=0,z=0;l<u;++l){var G=P(l),V=32767&l,W=S[G];if(C[V]=W,S[G]=V,O<=l){var J=u-l;if((I>7e3||U>24576)&&J>423){c=B(e,i,0,x,A,L,E,U,z,l-z,c),U=I=E=0,z=l;for(var q=0;q<286;++q)A[q]=0;for(q=0;q<30;++q)L[q]=0}var H=2,K=0,Q=y,X=V-W&32767;if(J>2&&G==P(l-X))for(var Y=Math.min(h,J)-1,Z=Math.min(32767,l),$=Math.min(258,J);X<=Z&&--Q&&V!=W;){if(e[l+H]==e[l+H-X]){for(var ee=0;ee<$&&e[l+ee]==e[l+ee-X];++ee);if(ee>H){if(H=ee,K=X,ee>Y)break;var re=Math.min(X,ee-2),ne=0;for(q=0;q<re;++q){var te=l-X+q+32768&32767,oe=te-C[te]+32768&32767;oe>ne&&(ne=oe,W=te)}}}X+=(V=W)-(W=C[V])+32768&32767}if(K){x[U++]=268435456|D[H]<<18|b[K];var ae=31&D[H],ue=31&b[K];E+=w[ae]+p[ue],++A[257+ae],++L[ue],O=l+H,++I}else x[U++]=e[l],++A[e[l]]}}c=B(e,i,a,x,A,L,E,U,z,l-z,c),a||(c=j(i,c,_))}return R(f,0,t+F(c)+o)}(e,null==r.level?6:r.level,null==r.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+r.mem,n,t,!o)};function q(e,r){void 0===r&&(r={});var n=function(){var e=1,r=0;return{p:function(n){for(var t=e,o=r,a=n.length,u=0;u!=a;){for(var f=Math.min(u+5552,a);u<f;++u)o+=t+=n[u];t%=65521,o%=65521}e=t,r=o},d:function(){return(e>>>8<<16|(255&r)<<8|r>>>8)+2*((255&e)<<23)}}}();n.p(e);var t=J(e,r,2,4);return function(e,r){var n=r.level,t=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=t<<6|(t?32-2*t:1)}(t,r),function(e,r,n){for(;n;++r)e[r]=n,n>>>=8}(t,t.length-4,n.d()),t}return e.pack=function(e){var r=i(i({},e),{v:"v1"});return function(e,r){var n="";if(!r&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var t=0;t<e.length;){var o=e[t++];o<128||r?n+=String.fromCharCode(o):o<224?n+=String.fromCharCode((31&o)<<6|63&e[t++]):o<240?n+=String.fromCharCode((15&o)<<12|(63&e[t++])<<6|63&e[t++]):(o=((15&o)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,n+=String.fromCharCode(55296|o>>10,56320|1023&o))}return n}(q(function(e,r){var n=e.length;if(!r&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var t=new d(e.length+(e.length>>>1)),o=0,a=function(e){t[o++]=e},u=0;u<n;++u){if(o+5>t.length){var f=new d(o+8+(n-u<<1));f.set(t),t=f}var i=e.charCodeAt(u);i<128||r?a(i):i<2048?(a(192|i>>>6),a(128|63&i)):i>55295&&i<57344?(a(240|(i=65536+(1047552&i)|1023&e.charCodeAt(++u))>>>18),a(128|i>>>12&63),a(128|i>>>6&63),a(128|63&i)):(a(224|i>>>12),a(128|i>>>6&63),a(128|63&i))}return R(t,0,o)}(JSON.stringify(r))),!0)},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
1
+ var rrwebRecord=function(er){"use strict";var sr;(function(r){r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment"})(sr||(sr={}));const B=`Please stop import mirror directly. Instead of that,\r
2
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
3
+ or you can use record.mirror to access the mirror instance during recording.`;let cr={map:{},getId(){return console.error(B),-1},getNode(){return console.error(B),null},removeNodeFromMap(){console.error(B)},has(){return console.error(B),!1},reset(){console.error(B)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(cr=new Proxy(cr,{get(r,e,a){return e==="map"&&console.error(B),Reflect.get(r,e,a)}}));for(var Ir=(r=>(r[r.DomContentLoaded=0]="DomContentLoaded",r[r.Load=1]="Load",r[r.FullSnapshot=2]="FullSnapshot",r[r.IncrementalSnapshot=3]="IncrementalSnapshot",r[r.Meta=4]="Meta",r[r.Custom=5]="Custom",r[r.Plugin=6]="Plugin",r))(Ir||{}),xr=(r=>(r[r.Mutation=0]="Mutation",r[r.MouseMove=1]="MouseMove",r[r.MouseInteraction=2]="MouseInteraction",r[r.Scroll=3]="Scroll",r[r.ViewportResize=4]="ViewportResize",r[r.Input=5]="Input",r[r.TouchMove=6]="TouchMove",r[r.MediaInteraction=7]="MediaInteraction",r[r.StyleSheetRule=8]="StyleSheetRule",r[r.CanvasMutation=9]="CanvasMutation",r[r.Font=10]="Font",r[r.Log=11]="Log",r[r.Drag=12]="Drag",r[r.StyleDeclaration=13]="StyleDeclaration",r))(xr||{}),Er=(r=>(r[r.MouseUp=0]="MouseUp",r[r.MouseDown=1]="MouseDown",r[r.Click=2]="Click",r[r.ContextMenu=3]="ContextMenu",r[r.DblClick=4]="DblClick",r[r.Focus=5]="Focus",r[r.Blur=6]="Blur",r[r.TouchStart=7]="TouchStart",r[r.TouchMove_Departed=8]="TouchMove_Departed",r[r.TouchEnd=9]="TouchEnd",r[r.TouchCancel=10]="TouchCancel",r))(Er||{}),Lr=(r=>(r[r["2D"]=0]="2D",r[r.WebGL=1]="WebGL",r[r.WebGL2=2]="WebGL2",r))(Lr||{}),Rr=(r=>(r[r.Play=0]="Play",r[r.Pause=1]="Pause",r[r.Seeked=2]="Seeked",r[r.VolumeChange=3]="VolumeChange",r))(Rr||{}),Or=(r=>(r.Start="start",r.Pause="pause",r.Resume="resume",r.Resize="resize",r.Finish="finish",r.FullsnapshotRebuilded="fullsnapshot-rebuilded",r.LoadStylesheetStart="load-stylesheet-start",r.LoadStylesheetEnd="load-stylesheet-end",r.SkipStart="skip-start",r.SkipEnd="skip-end",r.MouseInteraction="mouse-interaction",r.EventCast="event-cast",r.CustomEvent="custom-event",r.Flush="flush",r.StateChange="state-change",r.PlayBack="play-back",r))(Or||{}),hr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dr=typeof Uint8Array>"u"?[]:new Uint8Array(256),Y=0;Y<hr.length;Y++)dr[hr.charCodeAt(Y)]=Y;var S=Uint8Array,w=Uint16Array,J=Uint32Array,nr=new S([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ar=new 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,0,0]),wr=new S([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),gr=function(r,e){for(var a=new w(31),n=0;n<31;++n)a[n]=e+=1<<r[n-1];for(var o=new J(a[30]),n=1;n<30;++n)for(var t=a[n];t<a[n+1];++t)o[t]=t-a[n]<<5|n;return[a,o]},Mr=gr(nr,2),pr=Mr[0],or=Mr[1];pr[28]=258,or[258]=28;for(var Ur=gr(ar,0),yr=Ur[1],tr=new w(32768),s=0;s<32768;++s){var p=(s&43690)>>>1|(s&21845)<<1;p=(p&52428)>>>2|(p&13107)<<2,p=(p&61680)>>>4|(p&3855)<<4,tr[s]=((p&65280)>>>8|(p&255)<<8)>>>1}for(var K=function(r,e,a){for(var n=r.length,o=0,t=new w(e);o<n;++o)++t[r[o]-1];var f=new w(e);for(o=0;o<e;++o)f[o]=f[o-1]+t[o-1]<<1;var i;if(a){i=new w(1<<e);var l=15-e;for(o=0;o<n;++o)if(r[o])for(var c=o<<4|r[o],v=e-r[o],g=f[r[o]-1]++<<v,m=g|(1<<v)-1;g<=m;++g)i[tr[g]>>>l]=c}else for(i=new w(n),o=0;o<n;++o)i[o]=tr[f[r[o]-1]++]>>>15-r[o];return i},G=new S(288),s=0;s<144;++s)G[s]=8;for(var s=144;s<256;++s)G[s]=9;for(var s=256;s<280;++s)G[s]=7;for(var s=280;s<288;++s)G[s]=8;for(var Z=new S(32),s=0;s<32;++s)Z[s]=5;var zr=K(G,9,0),jr=K(Z,5,0),Cr=function(r){return(r/8>>0)+(r&7&&1)},Sr=function(r,e,a){(e==null||e<0)&&(e=0),(a==null||a>r.length)&&(a=r.length);var n=new(r instanceof w?w:r instanceof J?J:S)(a-e);return n.set(r.subarray(e,a)),n},d=function(r,e,a){a<<=e&7;var n=e/8>>0;r[n]|=a,r[n+1]|=a>>>8},H=function(r,e,a){a<<=e&7;var n=e/8>>0;r[n]|=a,r[n+1]|=a>>>8,r[n+2]|=a>>>16},vr=function(r,e){for(var a=[],n=0;n<r.length;++n)r[n]&&a.push({s:n,f:r[n]});var o=a.length,t=a.slice();if(!o)return[new S(0),0];if(o==1){var f=new S(a[0].s+1);return f[a[0].s]=1,[f,1]}a.sort(function(E,b){return E.f-b.f}),a.push({s:-1,f:25001});var i=a[0],l=a[1],c=0,v=1,g=2;for(a[0]={s:-1,f:i.f+l.f,l:i,r:l};v!=o-1;)i=a[a[c].f<a[g].f?c++:g++],l=a[c!=v&&a[c].f<a[g].f?c++:g++],a[v++]={s:-1,f:i.f+l.f,l:i,r:l};for(var m=t[0].s,n=1;n<o;++n)t[n].s>m&&(m=t[n].s);var M=new w(m+1),I=fr(a[v-1],M,0);if(I>e){var n=0,C=0,U=I-e,V=1<<U;for(t.sort(function(b,y){return M[y.s]-M[b.s]||b.f-y.f});n<o;++n){var x=t[n].s;if(M[x]>e)C+=V-(1<<I-M[x]),M[x]=e;else break}for(C>>>=U;C>0;){var N=t[n].s;M[N]<e?C-=1<<e-M[N]++-1:++n}for(;n>=0&&C;--n){var z=t[n].s;M[z]==e&&(--M[z],++C)}I=e}return[new S(M),I]},fr=function(r,e,a){return r.s==-1?Math.max(fr(r.l,e,a+1),fr(r.r,e,a+1)):e[r.s]=a},mr=function(r){for(var e=r.length;e&&!r[--e];);for(var a=new w(++e),n=0,o=r[0],t=1,f=function(l){a[n++]=l},i=1;i<=e;++i)if(r[i]==o&&i!=e)++t;else{if(!o&&t>2){for(;t>138;t-=138)f(32754);t>2&&(f(t>10?t-11<<5|28690:t-3<<5|12305),t=0)}else if(t>3){for(f(o),--t;t>6;t-=6)f(8304);t>2&&(f(t-3<<5|8208),t=0)}for(;t--;)f(o);t=1,o=r[i]}return[a.subarray(0,n),e]},Q=function(r,e){for(var a=0,n=0;n<e.length;++n)a+=r[n]*e[n];return a},$=function(r,e,a){var n=a.length,o=Cr(e+2);r[o]=n&255,r[o+1]=n>>>8,r[o+2]=r[o]^255,r[o+3]=r[o+1]^255;for(var t=0;t<n;++t)r[o+t+4]=a[t];return(o+4+n)*8},Dr=function(r,e,a,n,o,t,f,i,l,c,v){d(e,v++,a),++o[256];for(var g=vr(o,15),m=g[0],M=g[1],I=vr(t,15),C=I[0],U=I[1],V=mr(m),x=V[0],N=V[1],z=mr(C),E=z[0],b=z[1],y=new w(19),u=0;u<x.length;++u)y[x[u]&31]++;for(var u=0;u<E.length;++u)y[E[u]&31]++;for(var W=vr(y,7),k=W[0],rr=W[1],D=19;D>4&&!k[wr[D-1]];--D);var _=c+5<<3,F=Q(o,G)+Q(t,Z)+f,A=Q(o,m)+Q(t,C)+f+14+3*D+Q(y,k)+(2*y[16]+3*y[17]+7*y[18]);if(_<=F&&_<=A)return $(e,v,r.subarray(l,l+c));var L,h,P,j;if(d(e,v,1+(A<F)),v+=2,A<F){L=K(m,M,0),h=m,P=K(C,U,0),j=C;var lr=K(k,rr,0);d(e,v,N-257),d(e,v+5,b-1),d(e,v+10,D-4),v+=14;for(var u=0;u<D;++u)d(e,v+3*u,k[wr[u]]);v+=3*D;for(var R=[x,E],X=0;X<2;++X)for(var q=R[X],u=0;u<q.length;++u){var O=q[u]&31;d(e,v,lr[O]),v+=k[O],O>15&&(d(e,v,q[u]>>>5&127),v+=q[u]>>>12)}}else L=zr,h=G,P=jr,j=Z;for(var u=0;u<i;++u)if(n[u]>255){var O=n[u]>>>18&31;H(e,v,L[O+257]),v+=h[O+257],O>7&&(d(e,v,n[u]>>>23&31),v+=nr[O]);var T=n[u]&31;H(e,v,P[T]),v+=j[T],T>3&&(H(e,v,n[u]>>>5&8191),v+=ar[T])}else H(e,v,L[n[u]]),v+=h[n[u]];return H(e,v,L[256]),v+h[256]},Gr=new J([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Vr=new S(0),Wr=function(r,e,a,n,o,t){var f=r.length,i=new S(n+f+5*(1+Math.floor(f/7e3))+o),l=i.subarray(n,i.length-o),c=0;if(!e||f<8)for(var v=0;v<=f;v+=65535){var g=v+65535;g<f?c=$(l,c,r.subarray(v,g)):(l[v]=t,c=$(l,c,r.subarray(v,f)))}else{for(var m=Gr[e-1],M=m>>>13,I=m&8191,C=(1<<a)-1,U=new w(32768),V=new w(C+1),x=Math.ceil(a/3),N=2*x,z=function(ir){return(r[ir]^r[ir+1]<<x^r[ir+2]<<N)&C},E=new J(25e3),b=new w(288),y=new w(32),u=0,W=0,v=0,k=0,rr=0,D=0;v<f;++v){var _=z(v),F=v&32767,A=V[_];if(U[F]=A,V[_]=F,rr<=v){var L=f-v;if((u>7e3||k>24576)&&L>423){c=Dr(r,l,0,E,b,y,W,k,D,v-D,c),k=u=W=0,D=v;for(var h=0;h<286;++h)b[h]=0;for(var h=0;h<30;++h)y[h]=0}var P=2,j=0,lr=I,R=F-A&32767;if(L>2&&_==z(v-R))for(var X=Math.min(M,L)-1,q=Math.min(32767,v),O=Math.min(258,L);R<=q&&--lr&&F!=A;){if(r[v+P]==r[v+P-R]){for(var T=0;T<O&&r[v+T]==r[v+T-R];++T);if(T>P){if(P=T,j=R,T>X)break;for(var oe=Math.min(R,T-2),kr=0,h=0;h<oe;++h){var ur=v-R+h+32768&32767,te=U[ur],Fr=ur-te+32768&32767;Fr>kr&&(kr=Fr,A=ur)}}}F=A,A=U[F],R+=F-A+32768&32767}if(j){E[k++]=268435456|or[P]<<18|yr[j];var Ar=or[P]&31,Pr=yr[j]&31;W+=nr[Ar]+ar[Pr],++b[257+Ar],++y[Pr],rr=v+P,++u}else E[k++]=r[v],++b[r[v]]}}c=Dr(r,l,t,E,b,y,W,k,D,v-D,c),t||(c=$(l,c,Vr))}return Sr(i,0,n+Cr(c)+o)},Br=function(){var r=1,e=0;return{p:function(a){for(var n=r,o=e,t=a.length,f=0;f!=t;){for(var i=Math.min(f+5552,t);f<i;++f)n+=a[f],o+=n;n%=65521,o%=65521}r=n,e=o},d:function(){return(r>>>8<<16|(e&255)<<8|e>>>8)+((r&255)<<23)*2}}},Nr=function(r,e,a,n,o){return Wr(r,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):12+e.mem,a,n,!o)},_r=function(r,e,a){for(;a;++e)r[e]=a,a>>>=8},qr=function(r,e){var a=e.level,n=a==0?0:a<6?1:a==9?3:2;r[0]=120,r[1]=n<<6|(n?32-2*n:1)};function Jr(r,e){e===void 0&&(e={});var a=Br();a.p(r);var n=Nr(r,e,2,4);return qr(n,e),_r(n,n.length-4,a.d()),n}function Kr(r,e){var a=r.length;if(!e&&typeof TextEncoder<"u")return new TextEncoder().encode(r);for(var n=new S(r.length+(r.length>>>1)),o=0,t=function(c){n[o++]=c},f=0;f<a;++f){if(o+5>n.length){var i=new S(o+8+(a-f<<1));i.set(n),n=i}var l=r.charCodeAt(f);l<128||e?t(l):l<2048?(t(192|l>>>6),t(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|r.charCodeAt(++f)&1023,t(240|l>>>18),t(128|l>>>12&63),t(128|l>>>6&63),t(128|l&63)):(t(224|l>>>12),t(128|l>>>6&63),t(128|l&63))}return Sr(n,0,o)}function Hr(r,e){var a="";if(!e&&typeof TextDecoder<"u")return new TextDecoder().decode(r);for(var n=0;n<r.length;){var o=r[n++];o<128||e?a+=String.fromCharCode(o):o<224?a+=String.fromCharCode((o&31)<<6|r[n++]&63):o<240?a+=String.fromCharCode((o&15)<<12|(r[n++]&63)<<6|r[n++]&63):(o=((o&15)<<18|(r[n++]&63)<<12|(r[n++]&63)<<6|r[n++]&63)-65536,a+=String.fromCharCode(55296|o>>10,56320|o&1023))}return a}const Qr="v1";var Xr=Object.defineProperty,Yr=Object.defineProperties,Zr=Object.getOwnPropertyDescriptors,Tr=Object.getOwnPropertySymbols,$r=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,br=(r,e,a)=>e in r?Xr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,ee=(r,e)=>{for(var a in e||(e={}))$r.call(e,a)&&br(r,a,e[a]);if(Tr)for(var a of Tr(e))re.call(e,a)&&br(r,a,e[a]);return r},ne=(r,e)=>Yr(r,Zr(e));const ae=r=>{const e=ne(ee({},r),{v:Qr});return Hr(Jr(Kr(JSON.stringify(e))),!0)};return er.pack=ae,Object.defineProperty(er,"__esModule",{value:!0}),er}({});
16
4
  //# sourceMappingURL=rrweb-record-pack.min.js.map