@highlight-run/rrweb 1.2.1 → 2.0.1-alpha.0
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.
- package/dist/plugins/console-record.js +655 -0
- package/dist/plugins/console-record.min.js +1 -1
- package/dist/plugins/console-record.min.js.map +1 -1
- package/dist/plugins/console-replay.js +293 -0
- package/dist/plugins/console-replay.min.js +16 -0
- package/dist/plugins/console-replay.min.js.map +1 -0
- package/dist/plugins/sequential-id-record.js +33 -0
- package/dist/plugins/sequential-id-record.min.js +2 -0
- package/dist/plugins/sequential-id-record.min.js.map +1 -0
- package/dist/plugins/sequential-id-replay.js +37 -0
- package/dist/plugins/sequential-id-replay.min.js +2 -0
- package/dist/plugins/sequential-id-replay.min.js.map +1 -0
- package/dist/record/rrweb-record-pack.js +747 -0
- package/dist/record/rrweb-record-pack.min.js +16 -0
- package/dist/record/rrweb-record-pack.min.js.map +1 -0
- package/dist/record/rrweb-record.js +3318 -0
- package/dist/record/rrweb-record.min.js +16 -0
- package/dist/record/rrweb-record.min.js.map +1 -0
- package/dist/replay/rrweb-replay-unpack.js +4626 -0
- package/dist/replay/rrweb-replay-unpack.min.css +2 -0
- package/dist/replay/rrweb-replay-unpack.min.css.map +1 -0
- package/dist/replay/rrweb-replay-unpack.min.js +30 -0
- package/dist/replay/rrweb-replay-unpack.min.js.map +1 -0
- package/dist/replay/rrweb-replay.js +4216 -0
- package/dist/replay/rrweb-replay.min.css +2 -0
- package/dist/replay/rrweb-replay.min.css.map +1 -0
- package/dist/replay/rrweb-replay.min.js +30 -0
- package/dist/replay/rrweb-replay.min.js.map +1 -0
- package/dist/rrweb-all.js +8708 -0
- package/dist/rrweb-all.min.css +2 -0
- package/dist/rrweb-all.min.css.map +1 -0
- package/dist/rrweb-all.min.js +30 -0
- package/dist/rrweb-all.min.js.map +1 -0
- package/dist/rrweb.js +7294 -0
- package/dist/rrweb.min.css +2 -0
- package/dist/rrweb.min.css.map +1 -0
- package/dist/rrweb.min.js +2 -2
- package/dist/rrweb.min.js.map +1 -1
- package/es/rrweb/ext/@xstate/fsm/es/index.js +17 -0
- package/es/rrweb/ext/base64-arraybuffer/dist/base64-arraybuffer.es5.js +49 -0
- package/es/rrweb/ext/fflate/esm/browser.js +777 -0
- package/es/rrweb/ext/mitt/dist/mitt.es.js +63 -0
- package/es/rrweb/packages/rrweb/ext/tslib/tslib.es6.js +78 -0
- package/es/rrweb/packages/rrweb/src/entries/all.js +13 -0
- package/es/rrweb/packages/rrweb/src/index.js +12 -0
- package/es/rrweb/packages/rrweb/src/packer/base.js +3 -0
- package/es/rrweb/packages/rrweb/src/packer/pack.js +10 -0
- package/es/rrweb/packages/rrweb/src/packer/unpack.js +29 -0
- package/es/rrweb/packages/rrweb/src/plugins/console/record/error-stack-parser.js +179 -0
- package/es/rrweb/packages/rrweb/src/plugins/console/record/index.js +134 -0
- package/es/rrweb/packages/rrweb/src/plugins/console/record/stringify.js +141 -0
- package/es/rrweb/packages/rrweb/src/plugins/console/replay/index.js +111 -0
- package/es/rrweb/packages/rrweb/src/plugins/sequential-id/record/index.js +23 -0
- package/es/rrweb/packages/rrweb/src/plugins/sequential-id/replay/index.js +28 -0
- package/es/rrweb/packages/rrweb/src/record/iframe-manager.js +32 -0
- package/es/rrweb/packages/rrweb/src/record/index.js +381 -0
- package/es/rrweb/packages/rrweb/src/record/mutation.js +532 -0
- package/es/rrweb/packages/rrweb/src/record/observer.js +665 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/2d.js +78 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas-manager.js +93 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas.js +30 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/serialize-args.js +116 -0
- package/es/rrweb/packages/rrweb/src/record/observers/canvas/webgl.js +78 -0
- package/es/rrweb/packages/rrweb/src/record/shadow-dom-manager.js +45 -0
- package/es/rrweb/packages/rrweb/src/replay/canvas/2d.js +25 -0
- package/es/rrweb/packages/rrweb/src/replay/canvas/index.js +35 -0
- package/es/rrweb/packages/rrweb/src/replay/canvas/webgl.js +124 -0
- package/es/rrweb/packages/rrweb/src/replay/index.js +1864 -0
- package/es/rrweb/packages/rrweb/src/replay/machine.js +321 -0
- package/es/rrweb/packages/rrweb/src/replay/smoothscroll.js +221 -0
- package/es/rrweb/packages/rrweb/src/replay/styles/inject-style.js +8 -0
- package/es/rrweb/packages/rrweb/src/replay/timer.js +96 -0
- package/es/rrweb/packages/rrweb/src/replay/virtual-styles.js +121 -0
- package/es/rrweb/packages/rrweb/src/types.js +75 -0
- package/es/rrweb/packages/rrweb/src/utils.js +509 -0
- package/es/rrweb/packages/rrweb-snapshot/es/rrweb-snapshot.js +1697 -0
- package/lib/plugins/console-record.js +650 -0
- package/lib/plugins/console-replay.js +288 -0
- package/lib/plugins/sequential-id-record.js +28 -0
- package/lib/plugins/sequential-id-replay.js +32 -0
- package/lib/record/rrweb-record-pack.js +742 -0
- package/lib/record/rrweb-record.js +3315 -0
- package/lib/replay/rrweb-replay-unpack.js +4621 -0
- package/lib/replay/rrweb-replay.js +4211 -0
- package/lib/rrweb-all.js +8703 -0
- package/lib/rrweb.js +7289 -0
- package/package.json +41 -43
- package/typings/entries/all.d.ts +6 -0
- package/{dist → typings}/entries/record-pack.d.ts +0 -0
- package/{dist → typings}/entries/replay-unpack.d.ts +0 -0
- package/{dist → typings}/index.d.ts +1 -2
- package/{dist → typings}/packer/base.d.ts +0 -0
- package/{dist → typings}/packer/index.d.ts +0 -0
- package/{dist → typings}/packer/pack.d.ts +0 -0
- package/{dist → typings}/packer/unpack.d.ts +0 -0
- package/{dist → typings}/plugins/console/record/error-stack-parser.d.ts +0 -0
- package/{dist → typings}/plugins/console/record/index.d.ts +3 -2
- package/{dist → typings}/plugins/console/record/stringify.d.ts +0 -0
- package/{dist → typings}/plugins/console/replay/index.d.ts +2 -2
- package/{dist → typings}/plugins/sequential-id/record/index.d.ts +0 -0
- package/{dist → typings}/plugins/sequential-id/replay/index.d.ts +0 -0
- package/{dist → typings}/record/iframe-manager.d.ts +1 -1
- package/{dist → typings}/record/index.d.ts +0 -0
- package/{dist → typings}/record/mutation.d.ts +5 -8
- package/typings/record/observer.d.ts +7 -0
- package/{dist → typings}/record/observers/canvas/2d.d.ts +0 -0
- package/{dist → typings}/record/observers/canvas/canvas-manager.d.ts +0 -0
- package/{dist → typings}/record/observers/canvas/canvas.d.ts +0 -0
- package/{dist → typings}/record/observers/canvas/serialize-args.d.ts +1 -1
- package/{dist → typings}/record/observers/canvas/webgl.d.ts +0 -0
- package/typings/record/observers/canvas/webgl2.d.ts +2 -0
- package/typings/record/shadow-dom-manager.d.ts +21 -0
- package/{dist → typings}/replay/canvas/2d.d.ts +0 -0
- package/{dist → typings}/replay/canvas/index.d.ts +0 -0
- package/{dist → typings}/replay/canvas/webgl.d.ts +0 -0
- package/{dist → typings}/replay/index.d.ts +1 -0
- package/{dist → typings}/replay/machine.d.ts +0 -0
- package/{dist → typings}/replay/smoothscroll.d.ts +0 -0
- package/{dist → typings}/replay/styles/inject-style.d.ts +0 -0
- package/{dist → typings}/replay/timer.d.ts +0 -0
- package/{dist → typings}/replay/virtual-styles.d.ts +1 -1
- package/{dist → typings}/rrdom/index.d.ts +0 -0
- package/{dist → typings}/rrdom/tree-node.d.ts +0 -0
- package/{dist → typings}/types.d.ts +7 -8
- package/{dist → typings}/utils.d.ts +3 -4
- package/CHANGELOG.md +0 -26
- package/README.md +0 -124
- package/README.zh_CN.md +0 -122
- package/dist/entries/all.d.ts +0 -4
- package/dist/index.css +0 -82
- package/dist/index.css.map +0 -1
- package/dist/index.js +0 -3
- package/dist/index.js.LICENSE.txt +0 -14
- package/dist/index.js.map +0 -1
- package/dist/plugins/entries/all.d.ts +0 -4
- package/dist/plugins/entries/record-pack.d.ts +0 -2
- package/dist/plugins/entries/replay-unpack.d.ts +0 -2
- package/dist/plugins/index.d.ts +0 -9
- package/dist/plugins/packer/base.d.ts +0 -7
- package/dist/plugins/packer/index.d.ts +0 -2
- package/dist/plugins/packer/pack.d.ts +0 -2
- package/dist/plugins/packer/unpack.d.ts +0 -2
- package/dist/plugins/plugins/console/record/error-stack-parser.d.ts +0 -37
- package/dist/plugins/plugins/console/record/index.d.ts +0 -41
- package/dist/plugins/plugins/console/record/stringify.d.ts +0 -2
- package/dist/plugins/plugins/console/replay/index.d.ts +0 -9
- package/dist/plugins/plugins/sequential-id/record/index.d.ts +0 -6
- package/dist/plugins/plugins/sequential-id/replay/index.d.ts +0 -7
- package/dist/plugins/record/iframe-manager.d.ts +0 -13
- package/dist/plugins/record/index.d.ts +0 -9
- package/dist/plugins/record/mutation.d.ts +0 -45
- package/dist/plugins/record/observer.d.ts +0 -11
- package/dist/plugins/record/observers/canvas/2d.d.ts +0 -2
- package/dist/plugins/record/observers/canvas/canvas-manager.d.ts +0 -32
- package/dist/plugins/record/observers/canvas/canvas.d.ts +0 -2
- package/dist/plugins/record/observers/canvas/serialize-args.d.ts +0 -6
- package/dist/plugins/record/observers/canvas/webgl.d.ts +0 -2
- package/dist/plugins/record/shadow-dom-manager.d.ts +0 -34
- package/dist/plugins/replay/canvas/2d.d.ts +0 -9
- package/dist/plugins/replay/canvas/index.d.ts +0 -9
- package/dist/plugins/replay/canvas/webgl.d.ts +0 -11
- package/dist/plugins/replay/index.d.ts +0 -82
- package/dist/plugins/replay/machine.d.ts +0 -85
- package/dist/plugins/replay/smoothscroll.d.ts +0 -1
- package/dist/plugins/replay/styles/inject-style.d.ts +0 -2
- package/dist/plugins/replay/timer.d.ts +0 -19
- package/dist/plugins/replay/virtual-styles.d.ts +0 -43
- package/dist/plugins/rrdom/index.d.ts +0 -1
- package/dist/plugins/rrdom/tree-node.d.ts +0 -20
- package/dist/plugins/snapshot/css.d.ts +0 -92
- package/dist/plugins/snapshot/index.d.ts +0 -5
- package/dist/plugins/snapshot/rebuild.d.ts +0 -19
- package/dist/plugins/snapshot/snapshot.d.ts +0 -49
- package/dist/plugins/snapshot/types.d.ts +0 -99
- package/dist/plugins/snapshot/utils.d.ts +0 -11
- package/dist/plugins/types.d.ts +0 -509
- package/dist/plugins/utils.d.ts +0 -71
- package/dist/record/observer.d.ts +0 -11
- package/dist/record/shadow-dom-manager.d.ts +0 -34
- package/dist/snapshot/css.d.ts +0 -92
- package/dist/snapshot/index.d.ts +0 -5
- package/dist/snapshot/rebuild.d.ts +0 -19
- package/dist/snapshot/snapshot.d.ts +0 -49
- package/dist/snapshot/types.d.ts +0 -99
- package/dist/snapshot/utils.d.ts +0 -11
|
@@ -0,0 +1,655 @@
|
|
|
1
|
+
var rrwebConsoleRecord = (function (exports) {
|
|
2
|
+
'use strict';
|
|
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
|
+
function __values(o) {
|
|
20
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
21
|
+
if (m) return m.call(o);
|
|
22
|
+
if (o && typeof o.length === "number") return {
|
|
23
|
+
next: function () {
|
|
24
|
+
if (o && i >= o.length) o = void 0;
|
|
25
|
+
return { value: o && o[i++], done: !o };
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function __read(o, n) {
|
|
32
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
33
|
+
if (!m) return o;
|
|
34
|
+
var i = m.call(o), r, ar = [], e;
|
|
35
|
+
try {
|
|
36
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
37
|
+
}
|
|
38
|
+
catch (error) { e = { error: error }; }
|
|
39
|
+
finally {
|
|
40
|
+
try {
|
|
41
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
42
|
+
}
|
|
43
|
+
finally { if (e) throw e.error; }
|
|
44
|
+
}
|
|
45
|
+
return ar;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function __spreadArray(to, from, pack) {
|
|
49
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
50
|
+
if (ar || !(i in from)) {
|
|
51
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
52
|
+
ar[i] = from[i];
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
var EventType;
|
|
59
|
+
(function (EventType) {
|
|
60
|
+
EventType[EventType["DomContentLoaded"] = 0] = "DomContentLoaded";
|
|
61
|
+
EventType[EventType["Load"] = 1] = "Load";
|
|
62
|
+
EventType[EventType["FullSnapshot"] = 2] = "FullSnapshot";
|
|
63
|
+
EventType[EventType["IncrementalSnapshot"] = 3] = "IncrementalSnapshot";
|
|
64
|
+
EventType[EventType["Meta"] = 4] = "Meta";
|
|
65
|
+
EventType[EventType["Custom"] = 5] = "Custom";
|
|
66
|
+
EventType[EventType["Plugin"] = 6] = "Plugin";
|
|
67
|
+
})(EventType || (EventType = {}));
|
|
68
|
+
var IncrementalSource;
|
|
69
|
+
(function (IncrementalSource) {
|
|
70
|
+
IncrementalSource[IncrementalSource["Mutation"] = 0] = "Mutation";
|
|
71
|
+
IncrementalSource[IncrementalSource["MouseMove"] = 1] = "MouseMove";
|
|
72
|
+
IncrementalSource[IncrementalSource["MouseInteraction"] = 2] = "MouseInteraction";
|
|
73
|
+
IncrementalSource[IncrementalSource["Scroll"] = 3] = "Scroll";
|
|
74
|
+
IncrementalSource[IncrementalSource["ViewportResize"] = 4] = "ViewportResize";
|
|
75
|
+
IncrementalSource[IncrementalSource["Input"] = 5] = "Input";
|
|
76
|
+
IncrementalSource[IncrementalSource["TouchMove"] = 6] = "TouchMove";
|
|
77
|
+
IncrementalSource[IncrementalSource["MediaInteraction"] = 7] = "MediaInteraction";
|
|
78
|
+
IncrementalSource[IncrementalSource["StyleSheetRule"] = 8] = "StyleSheetRule";
|
|
79
|
+
IncrementalSource[IncrementalSource["CanvasMutation"] = 9] = "CanvasMutation";
|
|
80
|
+
IncrementalSource[IncrementalSource["Font"] = 10] = "Font";
|
|
81
|
+
IncrementalSource[IncrementalSource["Log"] = 11] = "Log";
|
|
82
|
+
IncrementalSource[IncrementalSource["Drag"] = 12] = "Drag";
|
|
83
|
+
IncrementalSource[IncrementalSource["StyleDeclaration"] = 13] = "StyleDeclaration";
|
|
84
|
+
})(IncrementalSource || (IncrementalSource = {}));
|
|
85
|
+
var MouseInteractions;
|
|
86
|
+
(function (MouseInteractions) {
|
|
87
|
+
MouseInteractions[MouseInteractions["MouseUp"] = 0] = "MouseUp";
|
|
88
|
+
MouseInteractions[MouseInteractions["MouseDown"] = 1] = "MouseDown";
|
|
89
|
+
MouseInteractions[MouseInteractions["Click"] = 2] = "Click";
|
|
90
|
+
MouseInteractions[MouseInteractions["ContextMenu"] = 3] = "ContextMenu";
|
|
91
|
+
MouseInteractions[MouseInteractions["DblClick"] = 4] = "DblClick";
|
|
92
|
+
MouseInteractions[MouseInteractions["Focus"] = 5] = "Focus";
|
|
93
|
+
MouseInteractions[MouseInteractions["Blur"] = 6] = "Blur";
|
|
94
|
+
MouseInteractions[MouseInteractions["TouchStart"] = 7] = "TouchStart";
|
|
95
|
+
MouseInteractions[MouseInteractions["TouchMove_Departed"] = 8] = "TouchMove_Departed";
|
|
96
|
+
MouseInteractions[MouseInteractions["TouchEnd"] = 9] = "TouchEnd";
|
|
97
|
+
MouseInteractions[MouseInteractions["TouchCancel"] = 10] = "TouchCancel";
|
|
98
|
+
})(MouseInteractions || (MouseInteractions = {}));
|
|
99
|
+
var CanvasContext;
|
|
100
|
+
(function (CanvasContext) {
|
|
101
|
+
CanvasContext[CanvasContext["2D"] = 0] = "2D";
|
|
102
|
+
CanvasContext[CanvasContext["WebGL"] = 1] = "WebGL";
|
|
103
|
+
CanvasContext[CanvasContext["WebGL2"] = 2] = "WebGL2";
|
|
104
|
+
})(CanvasContext || (CanvasContext = {}));
|
|
105
|
+
var MediaInteractions;
|
|
106
|
+
(function (MediaInteractions) {
|
|
107
|
+
MediaInteractions[MediaInteractions["Play"] = 0] = "Play";
|
|
108
|
+
MediaInteractions[MediaInteractions["Pause"] = 1] = "Pause";
|
|
109
|
+
MediaInteractions[MediaInteractions["Seeked"] = 2] = "Seeked";
|
|
110
|
+
MediaInteractions[MediaInteractions["VolumeChange"] = 3] = "VolumeChange";
|
|
111
|
+
})(MediaInteractions || (MediaInteractions = {}));
|
|
112
|
+
var ReplayerEvents;
|
|
113
|
+
(function (ReplayerEvents) {
|
|
114
|
+
ReplayerEvents["Start"] = "start";
|
|
115
|
+
ReplayerEvents["Pause"] = "pause";
|
|
116
|
+
ReplayerEvents["Resume"] = "resume";
|
|
117
|
+
ReplayerEvents["Resize"] = "resize";
|
|
118
|
+
ReplayerEvents["Finish"] = "finish";
|
|
119
|
+
ReplayerEvents["FullsnapshotRebuilded"] = "fullsnapshot-rebuilded";
|
|
120
|
+
ReplayerEvents["LoadStylesheetStart"] = "load-stylesheet-start";
|
|
121
|
+
ReplayerEvents["LoadStylesheetEnd"] = "load-stylesheet-end";
|
|
122
|
+
ReplayerEvents["SkipStart"] = "skip-start";
|
|
123
|
+
ReplayerEvents["SkipEnd"] = "skip-end";
|
|
124
|
+
ReplayerEvents["MouseInteraction"] = "mouse-interaction";
|
|
125
|
+
ReplayerEvents["EventCast"] = "event-cast";
|
|
126
|
+
ReplayerEvents["CustomEvent"] = "custom-event";
|
|
127
|
+
ReplayerEvents["Flush"] = "flush";
|
|
128
|
+
ReplayerEvents["StateChange"] = "state-change";
|
|
129
|
+
ReplayerEvents["PlayBack"] = "play-back";
|
|
130
|
+
})(ReplayerEvents || (ReplayerEvents = {}));
|
|
131
|
+
|
|
132
|
+
var NodeType;
|
|
133
|
+
(function (NodeType) {
|
|
134
|
+
NodeType[NodeType["Document"] = 0] = "Document";
|
|
135
|
+
NodeType[NodeType["DocumentType"] = 1] = "DocumentType";
|
|
136
|
+
NodeType[NodeType["Element"] = 2] = "Element";
|
|
137
|
+
NodeType[NodeType["Text"] = 3] = "Text";
|
|
138
|
+
NodeType[NodeType["CDATA"] = 4] = "CDATA";
|
|
139
|
+
NodeType[NodeType["Comment"] = 5] = "Comment";
|
|
140
|
+
})(NodeType || (NodeType = {}));
|
|
141
|
+
|
|
142
|
+
var DEPARTED_MIRROR_ACCESS_WARNING = 'Please stop import mirror directly. Instead of that,' +
|
|
143
|
+
'\r\n' +
|
|
144
|
+
'now you can use replayer.getMirror() to access the mirror instance of a replayer,' +
|
|
145
|
+
'\r\n' +
|
|
146
|
+
'or you can use record.mirror to access the mirror instance during recording.';
|
|
147
|
+
var _mirror = {
|
|
148
|
+
map: {},
|
|
149
|
+
getId: function () {
|
|
150
|
+
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
|
|
151
|
+
return -1;
|
|
152
|
+
},
|
|
153
|
+
getNode: function () {
|
|
154
|
+
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
|
|
155
|
+
return null;
|
|
156
|
+
},
|
|
157
|
+
removeNodeFromMap: function () {
|
|
158
|
+
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
|
|
159
|
+
},
|
|
160
|
+
has: function () {
|
|
161
|
+
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
|
|
162
|
+
return false;
|
|
163
|
+
},
|
|
164
|
+
reset: function () {
|
|
165
|
+
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
|
|
166
|
+
},
|
|
167
|
+
};
|
|
168
|
+
if (typeof window !== 'undefined' && window.Proxy && window.Reflect) {
|
|
169
|
+
_mirror = new Proxy(_mirror, {
|
|
170
|
+
get: function (target, prop, receiver) {
|
|
171
|
+
if (prop === 'map') {
|
|
172
|
+
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
|
|
173
|
+
}
|
|
174
|
+
return Reflect.get(target, prop, receiver);
|
|
175
|
+
},
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
function patch(source, name, replacement) {
|
|
179
|
+
try {
|
|
180
|
+
if (!(name in source)) {
|
|
181
|
+
return function () { };
|
|
182
|
+
}
|
|
183
|
+
var original_1 = source[name];
|
|
184
|
+
var wrapped = replacement(original_1);
|
|
185
|
+
if (typeof wrapped === 'function') {
|
|
186
|
+
wrapped.prototype = wrapped.prototype || {};
|
|
187
|
+
Object.defineProperties(wrapped, {
|
|
188
|
+
__rrweb_original__: {
|
|
189
|
+
enumerable: false,
|
|
190
|
+
value: original_1,
|
|
191
|
+
},
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
source[name] = wrapped;
|
|
195
|
+
return function () {
|
|
196
|
+
source[name] = original_1;
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
catch (_a) {
|
|
200
|
+
return function () { };
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
var StackFrame = (function () {
|
|
205
|
+
function StackFrame(obj) {
|
|
206
|
+
this.fileName = obj.fileName || '';
|
|
207
|
+
this.functionName = obj.functionName || '';
|
|
208
|
+
this.lineNumber = obj.lineNumber;
|
|
209
|
+
this.columnNumber = obj.columnNumber;
|
|
210
|
+
}
|
|
211
|
+
StackFrame.prototype.toString = function () {
|
|
212
|
+
var lineNumber = this.lineNumber || '';
|
|
213
|
+
var columnNumber = this.columnNumber || '';
|
|
214
|
+
if (this.functionName) {
|
|
215
|
+
return (this.functionName +
|
|
216
|
+
' (' +
|
|
217
|
+
this.fileName +
|
|
218
|
+
':' +
|
|
219
|
+
lineNumber +
|
|
220
|
+
':' +
|
|
221
|
+
columnNumber +
|
|
222
|
+
')');
|
|
223
|
+
}
|
|
224
|
+
return this.fileName + ':' + lineNumber + ':' + columnNumber;
|
|
225
|
+
};
|
|
226
|
+
return StackFrame;
|
|
227
|
+
}());
|
|
228
|
+
var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\S+:\d+/;
|
|
229
|
+
var CHROME_IE_STACK_REGEXP = /^\s*at .*(\S+:\d+|\(native\))/m;
|
|
230
|
+
var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\[native code])?$/;
|
|
231
|
+
var ErrorStackParser = {
|
|
232
|
+
parse: function (error) {
|
|
233
|
+
if (!error) {
|
|
234
|
+
return [];
|
|
235
|
+
}
|
|
236
|
+
if (typeof error.stacktrace !== 'undefined' ||
|
|
237
|
+
typeof error['opera#sourceloc'] !== 'undefined') {
|
|
238
|
+
return this.parseOpera(error);
|
|
239
|
+
}
|
|
240
|
+
else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {
|
|
241
|
+
return this.parseV8OrIE(error);
|
|
242
|
+
}
|
|
243
|
+
else if (error.stack) {
|
|
244
|
+
return this.parseFFOrSafari(error);
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
throw new Error('Cannot parse given Error object');
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
extractLocation: function (urlLike) {
|
|
251
|
+
if (urlLike.indexOf(':') === -1) {
|
|
252
|
+
return [urlLike];
|
|
253
|
+
}
|
|
254
|
+
var regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/;
|
|
255
|
+
var parts = regExp.exec(urlLike.replace(/[()]/g, ''));
|
|
256
|
+
if (!parts)
|
|
257
|
+
throw new Error("Cannot parse given url: ".concat(urlLike));
|
|
258
|
+
return [parts[1], parts[2] || undefined, parts[3] || undefined];
|
|
259
|
+
},
|
|
260
|
+
parseV8OrIE: function (error) {
|
|
261
|
+
var filtered = error.stack.split('\n').filter(function (line) {
|
|
262
|
+
return !!line.match(CHROME_IE_STACK_REGEXP);
|
|
263
|
+
}, this);
|
|
264
|
+
return filtered.map(function (line) {
|
|
265
|
+
if (line.indexOf('(eval ') > -1) {
|
|
266
|
+
line = line
|
|
267
|
+
.replace(/eval code/g, 'eval')
|
|
268
|
+
.replace(/(\(eval at [^()]*)|(\),.*$)/g, '');
|
|
269
|
+
}
|
|
270
|
+
var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(');
|
|
271
|
+
var location = sanitizedLine.match(/ (\((.+):(\d+):(\d+)\)$)/);
|
|
272
|
+
sanitizedLine = location
|
|
273
|
+
? sanitizedLine.replace(location[0], '')
|
|
274
|
+
: sanitizedLine;
|
|
275
|
+
var tokens = sanitizedLine.split(/\s+/).slice(1);
|
|
276
|
+
var locationParts = this.extractLocation(location ? location[1] : tokens.pop());
|
|
277
|
+
var functionName = tokens.join(' ') || undefined;
|
|
278
|
+
var fileName = ['eval', '<anonymous>'].indexOf(locationParts[0]) > -1
|
|
279
|
+
? undefined
|
|
280
|
+
: locationParts[0];
|
|
281
|
+
return new StackFrame({
|
|
282
|
+
functionName: functionName,
|
|
283
|
+
fileName: fileName,
|
|
284
|
+
lineNumber: locationParts[1],
|
|
285
|
+
columnNumber: locationParts[2],
|
|
286
|
+
});
|
|
287
|
+
}, this);
|
|
288
|
+
},
|
|
289
|
+
parseFFOrSafari: function (error) {
|
|
290
|
+
var filtered = error.stack.split('\n').filter(function (line) {
|
|
291
|
+
return !line.match(SAFARI_NATIVE_CODE_REGEXP);
|
|
292
|
+
}, this);
|
|
293
|
+
return filtered.map(function (line) {
|
|
294
|
+
if (line.indexOf(' > eval') > -1) {
|
|
295
|
+
line = line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ':$1');
|
|
296
|
+
}
|
|
297
|
+
if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {
|
|
298
|
+
return new StackFrame({
|
|
299
|
+
functionName: line,
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
else {
|
|
303
|
+
var functionNameRegex = /((.*".+"[^@]*)?[^@]*)(?:@)/;
|
|
304
|
+
var matches = line.match(functionNameRegex);
|
|
305
|
+
var functionName = matches && matches[1] ? matches[1] : undefined;
|
|
306
|
+
var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));
|
|
307
|
+
return new StackFrame({
|
|
308
|
+
functionName: functionName,
|
|
309
|
+
fileName: locationParts[0],
|
|
310
|
+
lineNumber: locationParts[1],
|
|
311
|
+
columnNumber: locationParts[2],
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
}, this);
|
|
315
|
+
},
|
|
316
|
+
parseOpera: function (e) {
|
|
317
|
+
if (!e.stacktrace ||
|
|
318
|
+
(e.message.indexOf('\n') > -1 &&
|
|
319
|
+
e.message.split('\n').length > e.stacktrace.split('\n').length)) {
|
|
320
|
+
return this.parseOpera9(e);
|
|
321
|
+
}
|
|
322
|
+
else if (!e.stack) {
|
|
323
|
+
return this.parseOpera10(e);
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
return this.parseOpera11(e);
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
parseOpera9: function (e) {
|
|
330
|
+
var lineRE = /Line (\d+).*script (?:in )?(\S+)/i;
|
|
331
|
+
var lines = e.message.split('\n');
|
|
332
|
+
var result = [];
|
|
333
|
+
for (var i = 2, len = lines.length; i < len; i += 2) {
|
|
334
|
+
var match = lineRE.exec(lines[i]);
|
|
335
|
+
if (match) {
|
|
336
|
+
result.push(new StackFrame({
|
|
337
|
+
fileName: match[2],
|
|
338
|
+
lineNumber: parseFloat(match[1]),
|
|
339
|
+
}));
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
return result;
|
|
343
|
+
},
|
|
344
|
+
parseOpera10: function (e) {
|
|
345
|
+
var lineRE = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i;
|
|
346
|
+
var lines = e.stacktrace.split('\n');
|
|
347
|
+
var result = [];
|
|
348
|
+
for (var i = 0, len = lines.length; i < len; i += 2) {
|
|
349
|
+
var match = lineRE.exec(lines[i]);
|
|
350
|
+
if (match) {
|
|
351
|
+
result.push(new StackFrame({
|
|
352
|
+
functionName: match[3] || undefined,
|
|
353
|
+
fileName: match[2],
|
|
354
|
+
lineNumber: parseFloat(match[1]),
|
|
355
|
+
}));
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
return result;
|
|
359
|
+
},
|
|
360
|
+
parseOpera11: function (error) {
|
|
361
|
+
var filtered = error.stack.split('\n').filter(function (line) {
|
|
362
|
+
return (!!line.match(FIREFOX_SAFARI_STACK_REGEXP) &&
|
|
363
|
+
!line.match(/^Error created at/));
|
|
364
|
+
}, this);
|
|
365
|
+
return filtered.map(function (line) {
|
|
366
|
+
var tokens = line.split('@');
|
|
367
|
+
var locationParts = this.extractLocation(tokens.pop());
|
|
368
|
+
var functionCall = tokens.shift() || '';
|
|
369
|
+
var functionName = functionCall
|
|
370
|
+
.replace(/<anonymous function(: (\w+))?>/, '$2')
|
|
371
|
+
.replace(/\([^)]*\)/g, '') || undefined;
|
|
372
|
+
return new StackFrame({
|
|
373
|
+
functionName: functionName,
|
|
374
|
+
fileName: locationParts[0],
|
|
375
|
+
lineNumber: locationParts[1],
|
|
376
|
+
columnNumber: locationParts[2],
|
|
377
|
+
});
|
|
378
|
+
}, this);
|
|
379
|
+
},
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
function pathToSelector(node) {
|
|
383
|
+
if (!node || !node.outerHTML) {
|
|
384
|
+
return '';
|
|
385
|
+
}
|
|
386
|
+
var path = '';
|
|
387
|
+
while (node.parentElement) {
|
|
388
|
+
var name_1 = node.localName;
|
|
389
|
+
if (!name_1) {
|
|
390
|
+
break;
|
|
391
|
+
}
|
|
392
|
+
name_1 = name_1.toLowerCase();
|
|
393
|
+
var parent_1 = node.parentElement;
|
|
394
|
+
var domSiblings = [];
|
|
395
|
+
if (parent_1.children && parent_1.children.length > 0) {
|
|
396
|
+
for (var i = 0; i < parent_1.children.length; i++) {
|
|
397
|
+
var sibling = parent_1.children[i];
|
|
398
|
+
if (sibling.localName && sibling.localName.toLowerCase) {
|
|
399
|
+
if (sibling.localName.toLowerCase() === name_1) {
|
|
400
|
+
domSiblings.push(sibling);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
if (domSiblings.length > 1) {
|
|
406
|
+
name_1 += ':eq(' + domSiblings.indexOf(node) + ')';
|
|
407
|
+
}
|
|
408
|
+
path = name_1 + (path ? '>' + path : '');
|
|
409
|
+
node = parent_1;
|
|
410
|
+
}
|
|
411
|
+
return path;
|
|
412
|
+
}
|
|
413
|
+
function isObject(obj) {
|
|
414
|
+
return Object.prototype.toString.call(obj) === '[object Object]';
|
|
415
|
+
}
|
|
416
|
+
function isObjTooDeep(obj, limit) {
|
|
417
|
+
var e_1, _a;
|
|
418
|
+
if (limit === 0) {
|
|
419
|
+
return true;
|
|
420
|
+
}
|
|
421
|
+
var keys = Object.keys(obj);
|
|
422
|
+
try {
|
|
423
|
+
for (var keys_1 = __values(keys), keys_1_1 = keys_1.next(); !keys_1_1.done; keys_1_1 = keys_1.next()) {
|
|
424
|
+
var key = keys_1_1.value;
|
|
425
|
+
if (isObject(obj[key]) && isObjTooDeep(obj[key], limit - 1)) {
|
|
426
|
+
return true;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
431
|
+
finally {
|
|
432
|
+
try {
|
|
433
|
+
if (keys_1_1 && !keys_1_1.done && (_a = keys_1.return)) _a.call(keys_1);
|
|
434
|
+
}
|
|
435
|
+
finally { if (e_1) throw e_1.error; }
|
|
436
|
+
}
|
|
437
|
+
return false;
|
|
438
|
+
}
|
|
439
|
+
function stringify(obj, stringifyOptions) {
|
|
440
|
+
var options = {
|
|
441
|
+
numOfKeysLimit: 50,
|
|
442
|
+
depthOfLimit: 4,
|
|
443
|
+
};
|
|
444
|
+
Object.assign(options, stringifyOptions);
|
|
445
|
+
var stack = [];
|
|
446
|
+
var keys = [];
|
|
447
|
+
return JSON.stringify(obj, function (key, value) {
|
|
448
|
+
if (stack.length > 0) {
|
|
449
|
+
var thisPos = stack.indexOf(this);
|
|
450
|
+
~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
|
|
451
|
+
~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
|
|
452
|
+
if (~stack.indexOf(value)) {
|
|
453
|
+
if (stack[0] === value) {
|
|
454
|
+
value = '[Circular ~]';
|
|
455
|
+
}
|
|
456
|
+
else {
|
|
457
|
+
value =
|
|
458
|
+
'[Circular ~.' +
|
|
459
|
+
keys.slice(0, stack.indexOf(value)).join('.') +
|
|
460
|
+
']';
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
else {
|
|
465
|
+
stack.push(value);
|
|
466
|
+
}
|
|
467
|
+
if (value === null || value === undefined) {
|
|
468
|
+
return value;
|
|
469
|
+
}
|
|
470
|
+
if (shouldIgnore(value)) {
|
|
471
|
+
return toString(value);
|
|
472
|
+
}
|
|
473
|
+
if (value instanceof Event) {
|
|
474
|
+
var eventResult = {};
|
|
475
|
+
for (var eventKey in value) {
|
|
476
|
+
var eventValue = value[eventKey];
|
|
477
|
+
if (Array.isArray(eventValue)) {
|
|
478
|
+
eventResult[eventKey] = pathToSelector(eventValue.length ? eventValue[0] : null);
|
|
479
|
+
}
|
|
480
|
+
else {
|
|
481
|
+
eventResult[eventKey] = eventValue;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
return eventResult;
|
|
485
|
+
}
|
|
486
|
+
else if (value instanceof Node) {
|
|
487
|
+
if (value instanceof HTMLElement) {
|
|
488
|
+
return value ? value.outerHTML : '';
|
|
489
|
+
}
|
|
490
|
+
return value.nodeName;
|
|
491
|
+
}
|
|
492
|
+
else if (value instanceof Error) {
|
|
493
|
+
return value.stack
|
|
494
|
+
? value.stack + '\nEnd of stack for Error object'
|
|
495
|
+
: value.name + ': ' + value.message;
|
|
496
|
+
}
|
|
497
|
+
return value;
|
|
498
|
+
});
|
|
499
|
+
function shouldIgnore(_obj) {
|
|
500
|
+
if (isObject(_obj) && Object.keys(_obj).length > options.numOfKeysLimit) {
|
|
501
|
+
return true;
|
|
502
|
+
}
|
|
503
|
+
if (typeof _obj === 'function') {
|
|
504
|
+
return true;
|
|
505
|
+
}
|
|
506
|
+
if (isObject(_obj) && isObjTooDeep(_obj, options.depthOfLimit)) {
|
|
507
|
+
return true;
|
|
508
|
+
}
|
|
509
|
+
return false;
|
|
510
|
+
}
|
|
511
|
+
function toString(_obj) {
|
|
512
|
+
var str = _obj.toString();
|
|
513
|
+
if (options.stringLengthLimit && str.length > options.stringLengthLimit) {
|
|
514
|
+
str = "".concat(str.slice(0, options.stringLengthLimit), "...");
|
|
515
|
+
}
|
|
516
|
+
return str;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
var defaultLogOptions = {
|
|
521
|
+
level: [
|
|
522
|
+
'assert',
|
|
523
|
+
'clear',
|
|
524
|
+
'count',
|
|
525
|
+
'countReset',
|
|
526
|
+
'debug',
|
|
527
|
+
'dir',
|
|
528
|
+
'dirxml',
|
|
529
|
+
'error',
|
|
530
|
+
'group',
|
|
531
|
+
'groupCollapsed',
|
|
532
|
+
'groupEnd',
|
|
533
|
+
'info',
|
|
534
|
+
'log',
|
|
535
|
+
'table',
|
|
536
|
+
'time',
|
|
537
|
+
'timeEnd',
|
|
538
|
+
'timeLog',
|
|
539
|
+
'trace',
|
|
540
|
+
'warn',
|
|
541
|
+
],
|
|
542
|
+
lengthThreshold: 1000,
|
|
543
|
+
logger: 'console',
|
|
544
|
+
};
|
|
545
|
+
function initLogObserver(cb, win, logOptions) {
|
|
546
|
+
var e_1, _a;
|
|
547
|
+
var loggerType = logOptions.logger;
|
|
548
|
+
if (!loggerType) {
|
|
549
|
+
return function () { };
|
|
550
|
+
}
|
|
551
|
+
var logger;
|
|
552
|
+
if (typeof loggerType === 'string') {
|
|
553
|
+
logger = win[loggerType];
|
|
554
|
+
}
|
|
555
|
+
else {
|
|
556
|
+
logger = loggerType;
|
|
557
|
+
}
|
|
558
|
+
var logCount = 0;
|
|
559
|
+
var cancelHandlers = [];
|
|
560
|
+
if (logOptions.level.includes('error')) {
|
|
561
|
+
if (window) {
|
|
562
|
+
var errorHandler_1 = function (event) {
|
|
563
|
+
var message = event.message, error = event.error;
|
|
564
|
+
var trace = ErrorStackParser.parse(error).map(function (stackFrame) { return stackFrame.toString(); });
|
|
565
|
+
var payload = [stringify(message, logOptions.stringifyOptions)];
|
|
566
|
+
cb({
|
|
567
|
+
level: 'error',
|
|
568
|
+
trace: trace,
|
|
569
|
+
payload: payload,
|
|
570
|
+
});
|
|
571
|
+
};
|
|
572
|
+
window.addEventListener('error', errorHandler_1);
|
|
573
|
+
cancelHandlers.push(function () {
|
|
574
|
+
if (window)
|
|
575
|
+
window.removeEventListener('error', errorHandler_1);
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
try {
|
|
580
|
+
for (var _b = __values(logOptions.level), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
581
|
+
var levelType = _c.value;
|
|
582
|
+
cancelHandlers.push(replace(logger, levelType));
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
586
|
+
finally {
|
|
587
|
+
try {
|
|
588
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
589
|
+
}
|
|
590
|
+
finally { if (e_1) throw e_1.error; }
|
|
591
|
+
}
|
|
592
|
+
return function () {
|
|
593
|
+
cancelHandlers.forEach(function (h) { return h(); });
|
|
594
|
+
};
|
|
595
|
+
function replace(_logger, level) {
|
|
596
|
+
var _this = this;
|
|
597
|
+
if (!_logger[level]) {
|
|
598
|
+
return function () { };
|
|
599
|
+
}
|
|
600
|
+
return patch(_logger, level, function (original) {
|
|
601
|
+
return function () {
|
|
602
|
+
var args = [];
|
|
603
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
604
|
+
args[_i] = arguments[_i];
|
|
605
|
+
}
|
|
606
|
+
original.apply(_this, args);
|
|
607
|
+
try {
|
|
608
|
+
var trace = ErrorStackParser.parse(new Error())
|
|
609
|
+
.map(function (stackFrame) { return stackFrame.toString(); })
|
|
610
|
+
.splice(1);
|
|
611
|
+
var payload = args.map(function (s) {
|
|
612
|
+
return stringify(s, logOptions.stringifyOptions);
|
|
613
|
+
});
|
|
614
|
+
logCount++;
|
|
615
|
+
if (logCount < logOptions.lengthThreshold) {
|
|
616
|
+
cb({
|
|
617
|
+
level: level,
|
|
618
|
+
trace: trace,
|
|
619
|
+
payload: payload,
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
else if (logCount === logOptions.lengthThreshold) {
|
|
623
|
+
cb({
|
|
624
|
+
level: 'warn',
|
|
625
|
+
trace: [],
|
|
626
|
+
payload: [
|
|
627
|
+
stringify('The number of log records reached the threshold.'),
|
|
628
|
+
],
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
catch (error) {
|
|
633
|
+
original.apply(void 0, __spreadArray(['rrweb logger error:', error], __read(args), false));
|
|
634
|
+
}
|
|
635
|
+
};
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
var PLUGIN_NAME = 'rrweb/console@1';
|
|
640
|
+
var getRecordConsolePlugin = function (options) { return ({
|
|
641
|
+
name: PLUGIN_NAME,
|
|
642
|
+
observer: initLogObserver,
|
|
643
|
+
options: options
|
|
644
|
+
? Object.assign({}, defaultLogOptions, options)
|
|
645
|
+
: defaultLogOptions,
|
|
646
|
+
}); };
|
|
647
|
+
|
|
648
|
+
exports.PLUGIN_NAME = PLUGIN_NAME;
|
|
649
|
+
exports.getRecordConsolePlugin = getRecordConsolePlugin;
|
|
650
|
+
|
|
651
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
652
|
+
|
|
653
|
+
return exports;
|
|
654
|
+
|
|
655
|
+
}({}));
|