@cloudcare/browser-rum 3.3.23 → 3.3.24
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/bundle/dataflux-rum.js +1 -1
- package/cjs/boot/buildEnv.js +1 -1
- package/cjs/domain/deflate/deflateWorker.js +1 -1
- package/cjs/domain/replay/record/canvasEncodeWorker.js +1 -1
- package/esm/boot/buildEnv.js +2 -5
- package/esm/boot/buildEnv.js.map +1 -1
- package/esm/boot/disabledRumPublicApi.js +2 -35
- package/esm/boot/disabledRumPublicApi.js.map +1 -1
- package/esm/boot/perStartRum.js +2 -260
- package/esm/boot/perStartRum.js.map +1 -1
- package/esm/boot/recorderApi.js +2 -338
- package/esm/boot/recorderApi.js.map +1 -1
- package/esm/boot/recorderApiStub.js +2 -21
- package/esm/boot/recorderApiStub.js.map +1 -1
- package/esm/boot/rum.entry.js +2 -13
- package/esm/boot/rum.entry.js.map +1 -1
- package/esm/boot/rum.js +2 -184
- package/esm/boot/rum.js.map +1 -1
- package/esm/boot/rum.slim.entry.js +2 -7
- package/esm/boot/rum.slim.entry.js.map +1 -1
- package/esm/boot/rumEntryFactory.js +2 -18
- package/esm/boot/rumEntryFactory.js.map +1 -1
- package/esm/boot/rumPublicApi.js +2 -344
- package/esm/boot/rumPublicApi.js.map +1 -1
- package/esm/boot/rumRecorderApiStub.js +2 -13
- package/esm/boot/rumRecorderApiStub.js.map +1 -1
- package/esm/boot/rumSlimConfiguration.js +2 -10
- package/esm/boot/rumSlimConfiguration.js.map +1 -1
- package/esm/boot/sessionReplayPublicApi.js +2 -43
- package/esm/boot/sessionReplayPublicApi.js.map +1 -1
- package/esm/boot/startRecording.js +2 -444
- package/esm/boot/startRecording.js.map +1 -1
- package/esm/constants.js +2 -28
- package/esm/constants.js.map +1 -1
- package/esm/domain/assembly.js +2 -213
- package/esm/domain/assembly.js.map +1 -1
- package/esm/domain/configuration.js +2 -323
- package/esm/domain/configuration.js.map +1 -1
- package/esm/domain/contexts/commonContext.js +2 -8
- package/esm/domain/contexts/commonContext.js.map +1 -1
- package/esm/domain/contexts/displayContext.js +2 -16
- package/esm/domain/contexts/displayContext.js.map +1 -1
- package/esm/domain/contexts/foregroundContexts.js +2 -103
- package/esm/domain/contexts/foregroundContexts.js.map +1 -1
- package/esm/domain/contexts/internalContext.js +2 -41
- package/esm/domain/contexts/internalContext.js.map +1 -1
- package/esm/domain/contexts/pageStateHistory.js +2 -104
- package/esm/domain/contexts/pageStateHistory.js.map +1 -1
- package/esm/domain/contexts/urlContexts.js +2 -85
- package/esm/domain/contexts/urlContexts.js.map +1 -1
- package/esm/domain/contexts/viewContexts.js +2 -45
- package/esm/domain/contexts/viewContexts.js.map +1 -1
- package/esm/domain/deflate/deflateEncoder.js +2 -592
- package/esm/domain/deflate/deflateEncoder.js.map +1 -1
- package/esm/domain/deflate/deflateWorker.js +2 -225
- package/esm/domain/deflate/deflateWorker.js.map +1 -1
- package/esm/domain/deflate/index.js +2 -3
- package/esm/domain/deflate/index.js.map +1 -1
- package/esm/domain/domMutationObservable.js +2 -62
- package/esm/domain/domMutationObservable.js.map +1 -1
- package/esm/domain/encoderStreamId.js +2 -6
- package/esm/domain/encoderStreamId.js.map +1 -1
- package/esm/domain/firstInputPolyfill.js +2 -77
- package/esm/domain/firstInputPolyfill.js.map +1 -1
- package/esm/domain/initViewportObservable.js +2 -36
- package/esm/domain/initViewportObservable.js.map +1 -1
- package/esm/domain/locationChangeObservable.js +2 -65
- package/esm/domain/locationChangeObservable.js.map +1 -1
- package/esm/domain/performanceObservable.js +2 -116
- package/esm/domain/performanceObservable.js.map +1 -1
- package/esm/domain/performanceUtils.js +2 -45
- package/esm/domain/performanceUtils.js.map +1 -1
- package/esm/domain/plugins.js +2 -59
- package/esm/domain/plugins.js.map +1 -1
- package/esm/domain/privacy.js +2 -266
- package/esm/domain/privacy.js.map +1 -1
- package/esm/domain/replay/record/canvasAutoSnapshot.js +2 -9
- package/esm/domain/replay/record/canvasAutoSnapshot.js.map +1 -1
- package/esm/domain/replay/record/canvasCommandCapture.js +2 -1275
- package/esm/domain/replay/record/canvasCommandCapture.js.map +1 -1
- package/esm/domain/replay/record/canvasCommandObserver.js +2 -1207
- package/esm/domain/replay/record/canvasCommandObserver.js.map +1 -1
- package/esm/domain/replay/record/canvasCommandSerializeArgs.js +2 -111
- package/esm/domain/replay/record/canvasCommandSerializeArgs.js.map +1 -1
- package/esm/domain/replay/record/canvasContext.js +2 -50
- package/esm/domain/replay/record/canvasContext.js.map +1 -1
- package/esm/domain/replay/record/canvasContinuousScheduler.js +2 -378
- package/esm/domain/replay/record/canvasContinuousScheduler.js.map +1 -1
- package/esm/domain/replay/record/canvasEncodeBridge.js +2 -692
- package/esm/domain/replay/record/canvasEncodeBridge.js.map +1 -1
- package/esm/domain/replay/record/canvasEncodeWorker.js +2 -164
- package/esm/domain/replay/record/canvasEncodeWorker.js.map +1 -1
- package/esm/domain/replay/record/canvasFrameSignature.js +2 -75
- package/esm/domain/replay/record/canvasFrameSignature.js.map +1 -1
- package/esm/domain/replay/record/canvasMutationRecord.js +2 -26
- package/esm/domain/replay/record/canvasMutationRecord.js.map +1 -1
- package/esm/domain/replay/record/canvasObserver.js +2 -420
- package/esm/domain/replay/record/canvasObserver.js.map +1 -1
- package/esm/domain/replay/record/canvasSerializeArgs.js +2 -101
- package/esm/domain/replay/record/canvasSerializeArgs.js.map +1 -1
- package/esm/domain/replay/record/canvasWebGLPluginHost.js +2 -26
- package/esm/domain/replay/record/canvasWebGLPluginHost.js.map +1 -1
- package/esm/domain/replay/record/elementsScrollPositions.js +2 -23
- package/esm/domain/replay/record/elementsScrollPositions.js.map +1 -1
- package/esm/domain/replay/record/index.js +2 -4
- package/esm/domain/replay/record/index.js.map +1 -1
- package/esm/domain/replay/record/mutationBatch.js +2 -562
- package/esm/domain/replay/record/mutationBatch.js.map +1 -1
- package/esm/domain/replay/record/mutationObserver.js +2 -2332
- package/esm/domain/replay/record/mutationObserver.js.map +1 -1
- package/esm/domain/replay/record/mutationResourceBudget.js +2 -137
- package/esm/domain/replay/record/mutationResourceBudget.js.map +1 -1
- package/esm/domain/replay/record/observers.js +2 -624
- package/esm/domain/replay/record/observers.js.map +1 -1
- package/esm/domain/replay/record/privacy.js +2 -1
- package/esm/domain/replay/record/privacy.js.map +1 -1
- package/esm/domain/replay/record/record.js +2 -3511
- package/esm/domain/replay/record/record.js.map +1 -1
- package/esm/domain/replay/record/serializationUtils.js +2 -677
- package/esm/domain/replay/record/serializationUtils.js.map +1 -1
- package/esm/domain/replay/record/serialize.js +2 -735
- package/esm/domain/replay/record/serialize.js.map +1 -1
- package/esm/domain/replay/record/shadowRootsController.js +2 -902
- package/esm/domain/replay/record/shadowRootsController.js.map +1 -1
- package/esm/domain/replay/record/utils.js +2 -36
- package/esm/domain/replay/record/utils.js.map +1 -1
- package/esm/domain/replay/record/viewports.js +2 -58
- package/esm/domain/replay/record/viewports.js.map +1 -1
- package/esm/domain/replay/replayStats.js +2 -59
- package/esm/domain/replay/replayStats.js.map +1 -1
- package/esm/domain/replay/segmentCollection/buildReplayPayload.js +2 -31
- package/esm/domain/replay/segmentCollection/buildReplayPayload.js.map +1 -1
- package/esm/domain/replay/segmentCollection/index.js +2 -3
- package/esm/domain/replay/segmentCollection/index.js.map +1 -1
- package/esm/domain/replay/segmentCollection/segment.js +2 -415
- package/esm/domain/replay/segmentCollection/segment.js.map +1 -1
- package/esm/domain/replay/segmentCollection/segmentCollection.js +2 -1114
- package/esm/domain/replay/segmentCollection/segmentCollection.js.map +1 -1
- package/esm/domain/replay/startRecordBridge.js +2 -13
- package/esm/domain/replay/startRecordBridge.js.map +1 -1
- package/esm/domain/replay/timeAnchor.js +2 -20
- package/esm/domain/replay/timeAnchor.js.map +1 -1
- package/esm/domain/requestCollection.js +2 -121
- package/esm/domain/requestCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/actionCollection.js +2 -83
- package/esm/domain/rumEventsCollection/actions/actionCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/clickChain.js +2 -62
- package/esm/domain/rumEventsCollection/actions/clickChain.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/computeFrustration.js +2 -67
- package/esm/domain/rumEventsCollection/actions/computeFrustration.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/getActionNameFromElement.js +2 -279
- package/esm/domain/rumEventsCollection/actions/getActionNameFromElement.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/getSelectorsFromElement.js +2 -233
- package/esm/domain/rumEventsCollection/actions/getSelectorsFromElement.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/interactionSelectorCache.js +2 -21
- package/esm/domain/rumEventsCollection/actions/interactionSelectorCache.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/listenActionEvents.js +2 -67
- package/esm/domain/rumEventsCollection/actions/listenActionEvents.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/trackClickActions.js +2 -263
- package/esm/domain/rumEventsCollection/actions/trackClickActions.js.map +1 -1
- package/esm/domain/rumEventsCollection/error/errorCollection.js +2 -93
- package/esm/domain/rumEventsCollection/error/errorCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/error/trackConsoleError.js +2 -12
- package/esm/domain/rumEventsCollection/error/trackConsoleError.js.map +1 -1
- package/esm/domain/rumEventsCollection/error/trackReportError.js +2 -19
- package/esm/domain/rumEventsCollection/error/trackReportError.js.map +1 -1
- package/esm/domain/rumEventsCollection/longTask/longAnimationFrameCollection.js +2 -55
- package/esm/domain/rumEventsCollection/longTask/longAnimationFrameCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/longTask/longTaskCollection.js +2 -38
- package/esm/domain/rumEventsCollection/longTask/longTaskCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/matchRequestResourceEntry.js +2 -69
- package/esm/domain/rumEventsCollection/resource/matchRequestResourceEntry.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/resourceCollection.js +2 -294
- package/esm/domain/rumEventsCollection/resource/resourceCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/resourceTrackerManager.js +2 -232
- package/esm/domain/rumEventsCollection/resource/resourceTrackerManager.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/resourceUtils.js +2 -218
- package/esm/domain/rumEventsCollection/resource/resourceUtils.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/retrieveInitialDocumentResourceTiming.js +2 -19
- package/esm/domain/rumEventsCollection/resource/retrieveInitialDocumentResourceTiming.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/webSocketCollection.js +2 -191
- package/esm/domain/rumEventsCollection/resource/webSocketCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/interactionCountPolyfill.js +2 -47
- package/esm/domain/rumEventsCollection/view/interactionCountPolyfill.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackCommonViewMetrics.js +2 -42
- package/esm/domain/rumEventsCollection/view/trackCommonViewMetrics.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js +2 -117
- package/esm/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackFirstContentfulPaint.js +2 -20
- package/esm/domain/rumEventsCollection/view/trackFirstContentfulPaint.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackFirstHidden.js +2 -49
- package/esm/domain/rumEventsCollection/view/trackFirstHidden.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackFirstInput.js +2 -41
- package/esm/domain/rumEventsCollection/view/trackFirstInput.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackInitialViewTimings.js +2 -44
- package/esm/domain/rumEventsCollection/view/trackInitialViewTimings.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackInteractionToNextPaint.js +2 -153
- package/esm/domain/rumEventsCollection/view/trackInteractionToNextPaint.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackLargestContentfulPaint.js +2 -54
- package/esm/domain/rumEventsCollection/view/trackLargestContentfulPaint.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackLoadingTime.js +2 -50
- package/esm/domain/rumEventsCollection/view/trackLoadingTime.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackNavigationTimings.js +2 -73
- package/esm/domain/rumEventsCollection/view/trackNavigationTimings.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackScrollMetrics.js +2 -84
- package/esm/domain/rumEventsCollection/view/trackScrollMetrics.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackSoftNavigationMetrics.js +2 -38
- package/esm/domain/rumEventsCollection/view/trackSoftNavigationMetrics.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackViewEventCounts.js +2 -15
- package/esm/domain/rumEventsCollection/view/trackViewEventCounts.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackViews.js +2 -418
- package/esm/domain/rumEventsCollection/view/trackViews.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/viewCollection.js +2 -127
- package/esm/domain/rumEventsCollection/view/viewCollection.js.map +1 -1
- package/esm/domain/rumSessionManager.js +2 -208
- package/esm/domain/rumSessionManager.js.map +1 -1
- package/esm/domain/tracing/ddtraceTracer.js +2 -40
- package/esm/domain/tracing/ddtraceTracer.js.map +1 -1
- package/esm/domain/tracing/getDocumentTraceId.js +2 -69
- package/esm/domain/tracing/getDocumentTraceId.js.map +1 -1
- package/esm/domain/tracing/jaegerTracer.js +2 -42
- package/esm/domain/tracing/jaegerTracer.js.map +1 -1
- package/esm/domain/tracing/sampler.js +2 -61
- package/esm/domain/tracing/sampler.js.map +1 -1
- package/esm/domain/tracing/skywalkingTracer.js +2 -90
- package/esm/domain/tracing/skywalkingTracer.js.map +1 -1
- package/esm/domain/tracing/traceIdentifier.js +2 -57
- package/esm/domain/tracing/traceIdentifier.js.map +1 -1
- package/esm/domain/tracing/tracer.js +2 -128
- package/esm/domain/tracing/tracer.js.map +1 -1
- package/esm/domain/tracing/w3cTraceParentTracer.js +2 -69
- package/esm/domain/tracing/w3cTraceParentTracer.js.map +1 -1
- package/esm/domain/tracing/zipkinMultiTracer.js +2 -42
- package/esm/domain/tracing/zipkinMultiTracer.js.map +1 -1
- package/esm/domain/tracing/zipkinSingleTracer.js +2 -41
- package/esm/domain/tracing/zipkinSingleTracer.js.map +1 -1
- package/esm/domain/trackEventCounts.js +2 -49
- package/esm/domain/trackEventCounts.js.map +1 -1
- package/esm/domain/usr/index.js +2 -38
- package/esm/domain/usr/index.js.map +1 -1
- package/esm/domain/visitorId/index.js +2 -406
- package/esm/domain/visitorId/index.js.map +1 -1
- package/esm/domain/waitPageActivityEnd.js +2 -142
- package/esm/domain/waitPageActivityEnd.js.map +1 -1
- package/esm/index.js +2 -4
- package/esm/index.js.map +1 -1
- package/esm/transport/startRumBatch.js +2 -74
- package/esm/transport/startRumBatch.js.map +1 -1
- package/esm/transport/startRumEventBridge.js +2 -9
- package/esm/transport/startRumEventBridge.js.map +1 -1
- package/esm/types/index.js +2 -1
- package/esm/types/index.js.map +1 -1
- package/esm/types/sessionReplayConstants.js +2 -46
- package/esm/types/sessionReplayConstants.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,444 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { startRecordBridge } from '../domain/replay/startRecordBridge';
|
|
4
|
-
import { startSegmentCollection, SEGMENT_BYTES_LIMIT } from '../domain/replay/segmentCollection';
|
|
5
|
-
import { RecordType } from '../types';
|
|
6
|
-
import { deleteOldestStats } from '../domain/replay/replayStats';
|
|
7
|
-
/* How long to wait for error checkouts */
|
|
8
|
-
export var BUFFER_CHECKOUT_TIME = 60 * ONE_SECOND;
|
|
9
|
-
var REPLAY_SEGMENT_FLUSH_HISTORY_LIMIT = 10;
|
|
10
|
-
export function startRecording(lifeCycle, configuration, sessionManager, viewContexts, encoder, httpRequest, onStopped, createHttpRequestOverride, recordOverride) {
|
|
11
|
-
var createHttpRequestImpl = false ? createHttpRequestOverride || createHttpRequest : createHttpRequest;
|
|
12
|
-
var recordImpl = false ? recordOverride || record : record;
|
|
13
|
-
var cleanupTasks = [];
|
|
14
|
-
var replayMemoryBudget = {
|
|
15
|
-
$rRecord: function $rRecord() {
|
|
16
|
-
return 0;
|
|
17
|
-
},
|
|
18
|
-
$rSegment: function $rSegment() {
|
|
19
|
-
return 0;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
var isRecordingStopped = false;
|
|
23
|
-
var isRecordingReady = false;
|
|
24
|
-
var pendingStopRequested = false;
|
|
25
|
-
var pendingStopReason;
|
|
26
|
-
var stoppedNotificationSent = false;
|
|
27
|
-
var flushRecorderBeforePageExit = function flushRecorderBeforePageExit() {};
|
|
28
|
-
var emitReplayTimeAnchor = function emitReplayTimeAnchor() {};
|
|
29
|
-
var finalReplayTimeAnchorRequested = false;
|
|
30
|
-
var hasSegmentCollection = false;
|
|
31
|
-
function emitFinalReplayTimeAnchor() {
|
|
32
|
-
if (finalReplayTimeAnchorRequested || document.visibilityState !== 'visible') {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
var admissionResult = emitReplayTimeAnchor();
|
|
36
|
-
if (admissionResult === true) {
|
|
37
|
-
finalReplayTimeAnchorRequested = true;
|
|
38
|
-
}
|
|
39
|
-
return admissionResult;
|
|
40
|
-
}
|
|
41
|
-
var replayResetRequestedBeforeRecorder = false;
|
|
42
|
-
var requestReplayReset = function requestReplayReset() {
|
|
43
|
-
replayResetRequestedBeforeRecorder = true;
|
|
44
|
-
};
|
|
45
|
-
function notifyStopped(flushReason) {
|
|
46
|
-
if (stoppedNotificationSent || !onStopped) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
stoppedNotificationSent = true;
|
|
50
|
-
try {
|
|
51
|
-
onStopped(flushReason);
|
|
52
|
-
} catch (error) {
|
|
53
|
-
addTelemetryDebug('Session Replay stopped callback failed.', {
|
|
54
|
-
reason: flushReason,
|
|
55
|
-
error: String(error)
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function stopRecording(flushReason) {
|
|
60
|
-
if (isRecordingStopped) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
if (!isRecordingReady) {
|
|
64
|
-
pendingStopRequested = true;
|
|
65
|
-
pendingStopReason = flushReason;
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
if (!hasSegmentCollection) {
|
|
69
|
-
try {
|
|
70
|
-
emitFinalReplayTimeAnchor();
|
|
71
|
-
} catch (error) {
|
|
72
|
-
addTelemetryDebug('Session Replay final time anchor failed.', {
|
|
73
|
-
reason: flushReason,
|
|
74
|
-
error: String(error)
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
isRecordingStopped = true;
|
|
79
|
-
var firstCleanupError;
|
|
80
|
-
cleanupTasks.slice().reverse().forEach(function (task) {
|
|
81
|
-
try {
|
|
82
|
-
task(flushReason);
|
|
83
|
-
} catch (error) {
|
|
84
|
-
if (!firstCleanupError) {
|
|
85
|
-
firstCleanupError = error;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
if (firstCleanupError) {
|
|
90
|
-
addTelemetryDebug('Session Replay cleanup failed.', {
|
|
91
|
-
reason: flushReason,
|
|
92
|
-
error: String(firstCleanupError)
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
notifyStopped(flushReason);
|
|
96
|
-
}
|
|
97
|
-
var lastReplaySegmentFlushForDebug;
|
|
98
|
-
var replaySegmentFlushHistoryForDebug = false ? [] : undefined;
|
|
99
|
-
var replaySegmentFlushCount = 0;
|
|
100
|
-
var replayResetCountForDebug = 0;
|
|
101
|
-
var replayResetLastReasonForDebug;
|
|
102
|
-
var areReplaySegmentsLockedForDebug = function areReplaySegmentsLockedForDebug() {
|
|
103
|
-
return false;
|
|
104
|
-
};
|
|
105
|
-
var reportError = function reportError(error) {
|
|
106
|
-
lifeCycle.notify(LifeCycleEventType.RAW_ERROR_COLLECTED, {
|
|
107
|
-
error: error
|
|
108
|
-
});
|
|
109
|
-
addTelemetryDebug('Error reported to customer', {
|
|
110
|
-
'error.message': error.message
|
|
111
|
-
});
|
|
112
|
-
};
|
|
113
|
-
try {
|
|
114
|
-
var replayRequest = httpRequest || lifeCycle.$rReplayRequest;
|
|
115
|
-
if (!replayRequest) {
|
|
116
|
-
replayRequest = createHttpRequestImpl(configuration.sessionReplayEndPoint, SEGMENT_BYTES_LIMIT, configuration.retryMaxSize, reportError);
|
|
117
|
-
// Recorder restarts share one bounded retry queue/timer/request state.
|
|
118
|
-
// Old segment finishes can then drain in order without multiplying a
|
|
119
|
-
// 20 MiB queue for every stop/start cycle.
|
|
120
|
-
lifeCycle.$rReplayRequest = replayRequest;
|
|
121
|
-
}
|
|
122
|
-
var addRecord, addBaselineRecords, _record;
|
|
123
|
-
var stopSegmentCollection;
|
|
124
|
-
var beginMandatoryFullSnapshotRecovery = function beginMandatoryFullSnapshotRecovery() {};
|
|
125
|
-
var discardMandatoryFullSnapshotRecovery = function discardMandatoryFullSnapshotRecovery() {};
|
|
126
|
-
var wasLastEmitBackpressured = function wasLastEmitBackpressured() {};
|
|
127
|
-
var replayTimeAnchorsEnabled = true;
|
|
128
|
-
if (!canUseEventBridge()) {
|
|
129
|
-
var session = sessionManager.findTrackedSession();
|
|
130
|
-
var isRecordErrorSessionReplay = session && session.errorSessionReplayAllowed && !session.sessionHasError;
|
|
131
|
-
replayTimeAnchorsEnabled = !isRecordErrorSessionReplay;
|
|
132
|
-
var segmentCollection = startSegmentCollection(lifeCycle, configuration, sessionManager, viewContexts, replayRequest, encoder, isRecordErrorSessionReplay, {
|
|
133
|
-
beforePageExitFlush: function beforePageExitFlush(pageExitEvent) {
|
|
134
|
-
return flushRecorderBeforePageExit(pageExitEvent);
|
|
135
|
-
},
|
|
136
|
-
onReplayResetNeeded: function onReplayResetNeeded(reason) {
|
|
137
|
-
if (false) {
|
|
138
|
-
replayResetCountForDebug += 1;
|
|
139
|
-
replayResetLastReasonForDebug = reason;
|
|
140
|
-
}
|
|
141
|
-
requestReplayReset(reason);
|
|
142
|
-
},
|
|
143
|
-
onReplayResetExhausted: function onReplayResetExhausted(reason) {
|
|
144
|
-
stopRecording(reason || 'full_snapshot_failure_limit');
|
|
145
|
-
},
|
|
146
|
-
memoryBudget: replayMemoryBudget,
|
|
147
|
-
onSegmentFlushed: false ? function (segmentFlush) {
|
|
148
|
-
replaySegmentFlushCount += 1;
|
|
149
|
-
lastReplaySegmentFlushForDebug = cloneReplaySegmentFlushForDebug(segmentFlush, replaySegmentFlushCount);
|
|
150
|
-
replaySegmentFlushHistoryForDebug.push(lastReplaySegmentFlushForDebug);
|
|
151
|
-
if (replaySegmentFlushHistoryForDebug.length > REPLAY_SEGMENT_FLUSH_HISTORY_LIMIT) {
|
|
152
|
-
replaySegmentFlushHistoryForDebug.shift();
|
|
153
|
-
}
|
|
154
|
-
} : undefined
|
|
155
|
-
});
|
|
156
|
-
hasSegmentCollection = true;
|
|
157
|
-
addRecord = segmentCollection.addRecord;
|
|
158
|
-
addBaselineRecords = segmentCollection.$rAddBaselineRecords;
|
|
159
|
-
wasLastEmitBackpressured = segmentCollection.$rWasLastAddRecordBackpressured || wasLastEmitBackpressured;
|
|
160
|
-
beginMandatoryFullSnapshotRecovery = segmentCollection.$rBeginMandatoryRecovery || beginMandatoryFullSnapshotRecovery;
|
|
161
|
-
discardMandatoryFullSnapshotRecovery = segmentCollection.$rDiscardMandatoryRecovery || discardMandatoryFullSnapshotRecovery;
|
|
162
|
-
var flushBufferSegment = segmentCollection.flushBufferSegment;
|
|
163
|
-
var unlockSegment = segmentCollection.unlockSegment;
|
|
164
|
-
if (false) {
|
|
165
|
-
areReplaySegmentsLockedForDebug = segmentCollection.isLocked;
|
|
166
|
-
}
|
|
167
|
-
stopSegmentCollection = segmentCollection.stop;
|
|
168
|
-
// Register a provisional cleanup before record() starts. Unexpected
|
|
169
|
-
// recorder initialization failures must not leave segment lifecycle
|
|
170
|
-
// subscriptions and timers alive.
|
|
171
|
-
cleanupTasks.push(stopSegmentCollection);
|
|
172
|
-
if (isRecordErrorSessionReplay) {
|
|
173
|
-
var sessionStateUpdateSubscription = sessionManager.sessionStateUpdateObservable.subscribe(function (_ref) {
|
|
174
|
-
var newState = _ref.newState;
|
|
175
|
-
if (isRecordErrorSessionReplay && (newState.hasError || newState.forcedSession)) {
|
|
176
|
-
isRecordErrorSessionReplay = false;
|
|
177
|
-
replayTimeAnchorsEnabled = true;
|
|
178
|
-
unlockSegment();
|
|
179
|
-
// Error-only recordings do not need periodic anchor-only
|
|
180
|
-
// segments while their buffer is locked. Establish the live
|
|
181
|
-
// timeline immediately when an error or forced session
|
|
182
|
-
// unlocks it.
|
|
183
|
-
emitReplayTimeAnchor();
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
cleanupTasks.push(sessionStateUpdateSubscription.unsubscribe);
|
|
187
|
-
}
|
|
188
|
-
var lastFullSnapshotEvent = null;
|
|
189
|
-
var wrappedEmit = function wrappedEmit(recordData) {
|
|
190
|
-
var accepted = addRecord(recordData);
|
|
191
|
-
if (accepted !== false && isRecordErrorSessionReplay) {
|
|
192
|
-
if (recordData.type === RecordType.FullSnapshot) {
|
|
193
|
-
lastFullSnapshotEvent = recordData;
|
|
194
|
-
} else if (recordData.type === RecordType.IncrementalSnapshot) {
|
|
195
|
-
var exceedTime = recordData.timestamp - lastFullSnapshotEvent.timestamp > BUFFER_CHECKOUT_TIME;
|
|
196
|
-
// If the time between the last full snapshot and the incremental snapshot is greater than the buffer time, we need to take a new full snapshot
|
|
197
|
-
if (exceedTime) {
|
|
198
|
-
flushBufferSegment(function () {
|
|
199
|
-
deleteOldestStats();
|
|
200
|
-
_takeSubsequentFullSnapshot();
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
return accepted;
|
|
206
|
-
};
|
|
207
|
-
var wrappedEmitBaseline = function wrappedEmitBaseline(records) {
|
|
208
|
-
var accepted = addBaselineRecords(records);
|
|
209
|
-
if (accepted !== false && isRecordErrorSessionReplay) {
|
|
210
|
-
lastFullSnapshotEvent = records[records.length - 1];
|
|
211
|
-
}
|
|
212
|
-
return accepted;
|
|
213
|
-
};
|
|
214
|
-
_record = recordImpl({
|
|
215
|
-
emit: wrappedEmit,
|
|
216
|
-
$rEmitBaseline: wrappedEmitBaseline,
|
|
217
|
-
configuration: configuration,
|
|
218
|
-
lifeCycle: lifeCycle,
|
|
219
|
-
sessionManager: sessionManager,
|
|
220
|
-
$rWasLastEmitBackpressured: wasLastEmitBackpressured,
|
|
221
|
-
$rOnMandatoryFullSnapshotStarted: beginMandatoryFullSnapshotRecovery,
|
|
222
|
-
$rOnMandatoryFullSnapshotAbandoned: discardMandatoryFullSnapshotRecovery,
|
|
223
|
-
$rShouldEmitTimeAnchor: function $rShouldEmitTimeAnchor() {
|
|
224
|
-
return replayTimeAnchorsEnabled;
|
|
225
|
-
},
|
|
226
|
-
$rMemoryBudget: replayMemoryBudget,
|
|
227
|
-
onFullSnapshotFailure: stopRecording
|
|
228
|
-
});
|
|
229
|
-
} else {
|
|
230
|
-
;
|
|
231
|
-
var _startRecordBridge = startRecordBridge(viewContexts);
|
|
232
|
-
addRecord = _startRecordBridge.addRecord;
|
|
233
|
-
_record = recordImpl({
|
|
234
|
-
emit: addRecord,
|
|
235
|
-
configuration: configuration,
|
|
236
|
-
lifeCycle: lifeCycle,
|
|
237
|
-
sessionManager: sessionManager,
|
|
238
|
-
$rWasLastEmitBackpressured: wasLastEmitBackpressured,
|
|
239
|
-
$rOnMandatoryFullSnapshotStarted: beginMandatoryFullSnapshotRecovery,
|
|
240
|
-
$rOnMandatoryFullSnapshotAbandoned: discardMandatoryFullSnapshotRecovery,
|
|
241
|
-
$rShouldEmitTimeAnchor: function $rShouldEmitTimeAnchor() {
|
|
242
|
-
return replayTimeAnchorsEnabled;
|
|
243
|
-
},
|
|
244
|
-
$rMemoryBudget: replayMemoryBudget,
|
|
245
|
-
onFullSnapshotFailure: stopRecording
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
if (!_record || typeof _record.stop !== 'function') {
|
|
249
|
-
throw new Error('Session Replay recorder failed to initialize.');
|
|
250
|
-
}
|
|
251
|
-
emitReplayTimeAnchor = _record.$rEmitTimeAnchor || emitReplayTimeAnchor;
|
|
252
|
-
var stopRecorder = _record.stop;
|
|
253
|
-
if (stopSegmentCollection) {
|
|
254
|
-
// Remove the provisional entry and restore the intended successful-stop
|
|
255
|
-
// ordering below (cleanup tasks run in reverse).
|
|
256
|
-
var provisionalCleanupIndex = cleanupTasks.indexOf(stopSegmentCollection);
|
|
257
|
-
if (provisionalCleanupIndex !== -1) {
|
|
258
|
-
cleanupTasks.splice(provisionalCleanupIndex, 1);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
cleanupTasks.push(stopSegmentCollection ? function (flushReason) {
|
|
262
|
-
// segmentCollection already invoked beforePageExitFlush while its
|
|
263
|
-
// encoder was writable. Teardown must now discard any unfinished
|
|
264
|
-
// atomic tail instead of doing work that can no longer be sent.
|
|
265
|
-
stopRecorder(flushReason, true);
|
|
266
|
-
} : stopRecorder);
|
|
267
|
-
if (stopSegmentCollection) {
|
|
268
|
-
// Stop the segment collection first (cleanup tasks run in reverse).
|
|
269
|
-
// Its beforePageExitFlush hook can then drain the still-live recorder,
|
|
270
|
-
// including a second unload pass after synchronous encoder backpressure
|
|
271
|
-
// is released, before the observers are torn down.
|
|
272
|
-
cleanupTasks.push(stopSegmentCollection);
|
|
273
|
-
}
|
|
274
|
-
var _takeSubsequentFullSnapshot = _record.takeSubsequentFullSnapshot;
|
|
275
|
-
var flushScheduledFullSnapshot = _record.flushScheduledFullSnapshot || function () {};
|
|
276
|
-
var flushCanvasCommands = _record.$rFlushCanvasCommands || function () {};
|
|
277
|
-
flushRecorderBeforePageExit = function flushRecorderBeforePageExit(pageExitEvent) {
|
|
278
|
-
if (pageExitEvent && pageExitEvent.reason !== PageExitReason.UNLOADING) {
|
|
279
|
-
// Hidden, frozen, and pagehide states can resume in the same view.
|
|
280
|
-
// Keep an in-progress DOM recovery baseline scheduled so later
|
|
281
|
-
// mutations are never attached to the stale pre-overflow snapshot.
|
|
282
|
-
_record.flushMutations();
|
|
283
|
-
flushCanvasCommands();
|
|
284
|
-
if (pageExitEvent.reason === PageExitReason.HIDDEN || document.visibilityState === 'visible') {
|
|
285
|
-
return emitReplayTimeAnchor();
|
|
286
|
-
}
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
if (!flushScheduledFullSnapshot()) {
|
|
290
|
-
// The segment is still writable in this hook. Give a paged raw/shadow
|
|
291
|
-
// transaction its final bounded drain before segmentCollection closes;
|
|
292
|
-
// record.stop() runs afterwards and can only discard an unfinished
|
|
293
|
-
// atomic tail.
|
|
294
|
-
_record.flushMutations(true);
|
|
295
|
-
}
|
|
296
|
-
// Keep the command recorder alive until this hook runs: the segment is
|
|
297
|
-
// still writable here, including the second unload pass after synchronous
|
|
298
|
-
// encoder backpressure is released.
|
|
299
|
-
flushCanvasCommands();
|
|
300
|
-
return emitFinalReplayTimeAnchor();
|
|
301
|
-
};
|
|
302
|
-
requestReplayReset = createReplayResetScheduler(_takeSubsequentFullSnapshot, cleanupTasks);
|
|
303
|
-
if (replayResetRequestedBeforeRecorder) {
|
|
304
|
-
requestReplayReset();
|
|
305
|
-
}
|
|
306
|
-
var scheduleSubsequentFullSnapshot = _record.scheduleSubsequentFullSnapshot || _takeSubsequentFullSnapshot;
|
|
307
|
-
var prepareForViewChange = _record.prepareForViewChange || _record.flushMutations;
|
|
308
|
-
var snapshotCanvas = _record.snapshotCanvas;
|
|
309
|
-
var getSerializedNodeIdForDebug = _record.getSerializedNodeIdForDebug;
|
|
310
|
-
var recordingDebug;
|
|
311
|
-
if (false) {
|
|
312
|
-
recordingDebug = {
|
|
313
|
-
getLastAutoCanvasSnapshotResultForDebug: _record.getLastAutoCanvasSnapshotResultForDebug,
|
|
314
|
-
getAutoCanvasSnapshotDebugHistoryForDebug: _record.getAutoCanvasSnapshotDebugHistoryForDebug,
|
|
315
|
-
getLastCanvasMutationForDebug: _record.getLastCanvasMutationForDebug,
|
|
316
|
-
getCanvasMutationHistoryForDebug: _record.getCanvasMutationHistoryForDebug,
|
|
317
|
-
getLastDomMutationForDebug: _record.getLastDomMutationForDebug,
|
|
318
|
-
getDomMutationHistoryForDebug: _record.getDomMutationHistoryForDebug,
|
|
319
|
-
getReplayPerformanceForDebug: function getReplayPerformanceForDebug() {
|
|
320
|
-
return cloneReplayPerformanceForDebug(_record.getReplayPerformanceForDebug ? _record.getReplayPerformanceForDebug() : undefined, replaySegmentFlushCount, replayResetCountForDebug, replayResetLastReasonForDebug, areReplaySegmentsLockedForDebug());
|
|
321
|
-
},
|
|
322
|
-
getLastReplaySegmentFlushForDebug: function getLastReplaySegmentFlushForDebug() {
|
|
323
|
-
return cloneReplaySegmentFlushForDebug(lastReplaySegmentFlushForDebug);
|
|
324
|
-
},
|
|
325
|
-
getReplaySegmentFlushHistoryForDebug: function getReplaySegmentFlushHistoryForDebug() {
|
|
326
|
-
return replaySegmentFlushHistoryForDebug.map(function (segmentFlush) {
|
|
327
|
-
return cloneReplaySegmentFlushForDebug(segmentFlush);
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
};
|
|
331
|
-
}
|
|
332
|
-
var flushMutations = _record.flushMutations;
|
|
333
|
-
var subscribeViewEnded = lifeCycle.subscribe(LifeCycleEventType.VIEW_ENDED, function () {
|
|
334
|
-
if (!flushScheduledFullSnapshot(true, true)) {
|
|
335
|
-
// Preserve DOM changes still queued by the native MutationObservers.
|
|
336
|
-
// The next view snapshot has not been scheduled yet, so resetting the
|
|
337
|
-
// observers here would otherwise lose the old view's final state.
|
|
338
|
-
flushMutations();
|
|
339
|
-
}
|
|
340
|
-
// Canvas command batches are frame-scheduled. Publish the old view's
|
|
341
|
-
// final batch before ViewEnd and before VIEW_CREATED resets the canvas
|
|
342
|
-
// baseline for the next replay tree.
|
|
343
|
-
flushCanvasCommands();
|
|
344
|
-
prepareForViewChange();
|
|
345
|
-
addRecord({
|
|
346
|
-
timestamp: timeStampNow(),
|
|
347
|
-
type: RecordType.ViewEnd
|
|
348
|
-
});
|
|
349
|
-
});
|
|
350
|
-
cleanupTasks.push(subscribeViewEnded.unsubscribe);
|
|
351
|
-
var scribeViewCreated = lifeCycle.subscribe(LifeCycleEventType.VIEW_CREATED, function (view) {
|
|
352
|
-
scheduleSubsequentFullSnapshot(view.startClocks.timeStamp);
|
|
353
|
-
});
|
|
354
|
-
cleanupTasks.push(scribeViewCreated.unsubscribe);
|
|
355
|
-
isRecordingReady = true;
|
|
356
|
-
if (pendingStopRequested) {
|
|
357
|
-
stopRecording(pendingStopReason);
|
|
358
|
-
}
|
|
359
|
-
} catch (error) {
|
|
360
|
-
isRecordingReady = true;
|
|
361
|
-
stopRecording('start_failure');
|
|
362
|
-
throw error;
|
|
363
|
-
}
|
|
364
|
-
var recording = {
|
|
365
|
-
stop: stopRecording,
|
|
366
|
-
isStopped: function isStopped() {
|
|
367
|
-
return isRecordingStopped;
|
|
368
|
-
},
|
|
369
|
-
// The public/manual snapshot is opportunistic. Internal view, buffer and
|
|
370
|
-
// recovery snapshots keep using the raw non-discardable function above.
|
|
371
|
-
takeSubsequentFullSnapshot: function takeSubsequentFullSnapshot() {
|
|
372
|
-
return _takeSubsequentFullSnapshot(undefined, true);
|
|
373
|
-
},
|
|
374
|
-
snapshotCanvas: snapshotCanvas,
|
|
375
|
-
getSerializedNodeIdForDebug: getSerializedNodeIdForDebug,
|
|
376
|
-
flushReplayMutationsForDebug: flushMutations
|
|
377
|
-
};
|
|
378
|
-
if (false) {
|
|
379
|
-
assign(recording, recordingDebug);
|
|
380
|
-
}
|
|
381
|
-
return recording;
|
|
382
|
-
}
|
|
383
|
-
function createReplayResetScheduler(takeSubsequentFullSnapshot, cleanupTasks) {
|
|
384
|
-
var stopped = false;
|
|
385
|
-
var pending = false;
|
|
386
|
-
var lastResetAt = -Infinity;
|
|
387
|
-
var resetTimeoutId;
|
|
388
|
-
var RESET_MIN_INTERVAL = ONE_SECOND;
|
|
389
|
-
function runReset() {
|
|
390
|
-
resetTimeoutId = undefined;
|
|
391
|
-
if (stopped || !pending) {
|
|
392
|
-
return;
|
|
393
|
-
}
|
|
394
|
-
pending = false;
|
|
395
|
-
lastResetAt = Date.now();
|
|
396
|
-
takeSubsequentFullSnapshot();
|
|
397
|
-
}
|
|
398
|
-
cleanupTasks.push(function () {
|
|
399
|
-
stopped = true;
|
|
400
|
-
if (resetTimeoutId !== undefined) {
|
|
401
|
-
clearTimeout(resetTimeoutId);
|
|
402
|
-
resetTimeoutId = undefined;
|
|
403
|
-
}
|
|
404
|
-
});
|
|
405
|
-
return function () {
|
|
406
|
-
if (stopped) {
|
|
407
|
-
return;
|
|
408
|
-
}
|
|
409
|
-
pending = true;
|
|
410
|
-
if (resetTimeoutId !== undefined) {
|
|
411
|
-
return;
|
|
412
|
-
}
|
|
413
|
-
var delay = Math.max(lastResetAt + RESET_MIN_INTERVAL - Date.now(), 0);
|
|
414
|
-
resetTimeoutId = setTimeout(runReset, delay);
|
|
415
|
-
};
|
|
416
|
-
}
|
|
417
|
-
function cloneReplaySegmentFlushForDebug(segmentFlush, sequence) {
|
|
418
|
-
if (!segmentFlush) {
|
|
419
|
-
return segmentFlush;
|
|
420
|
-
}
|
|
421
|
-
return {
|
|
422
|
-
sequence: typeof sequence === 'number' ? sequence : segmentFlush.sequence,
|
|
423
|
-
creationReason: segmentFlush.creationReason,
|
|
424
|
-
flushReason: segmentFlush.flushReason,
|
|
425
|
-
recordsCount: segmentFlush.recordsCount,
|
|
426
|
-
recordCountsByType: assign({}, segmentFlush.recordCountsByType),
|
|
427
|
-
start: segmentFlush.start,
|
|
428
|
-
end: segmentFlush.end,
|
|
429
|
-
indexInView: segmentFlush.indexInView,
|
|
430
|
-
rawBytesCount: segmentFlush.rawBytesCount
|
|
431
|
-
};
|
|
432
|
-
}
|
|
433
|
-
function cloneReplayPerformanceForDebug(stats, replaySegmentFlushCount, replayResetCount, replayResetLastReason, replaySegmentsLocked) {
|
|
434
|
-
if (!stats && typeof replaySegmentFlushCount === 'undefined') {
|
|
435
|
-
return undefined;
|
|
436
|
-
}
|
|
437
|
-
return assign({}, stats || {}, {
|
|
438
|
-
replaySegmentFlushCount: replaySegmentFlushCount || 0,
|
|
439
|
-
replayResetCount: replayResetCount || 0,
|
|
440
|
-
replayResetLastReason: replayResetLastReason,
|
|
441
|
-
replaySegmentsLocked: Boolean(replaySegmentsLocked)
|
|
442
|
-
});
|
|
443
|
-
}
|
|
444
|
-
//# sourceMappingURL=startRecording.js.map
|
|
1
|
+
import{timeStampNow,createHttpRequest,LifeCycleEventType,PageExitReason,addTelemetryDebug,ONE_SECOND,canUseEventBridge,assign}from"@cloudcare/browser-core";import{record}from"../domain/replay/record";import{startRecordBridge}from"../domain/replay/startRecordBridge";import{startSegmentCollection,SEGMENT_BYTES_LIMIT}from"../domain/replay/segmentCollection";import{RecordType}from"../types";import{deleteOldestStats}from"../domain/replay/replayStats";export var BUFFER_CHECKOUT_TIME=60*ONE_SECOND;export function startRecording(lifeCycle,configuration,sessionManager,viewContexts,encoder,httpRequest,onStopped,createHttpRequestOverride,recordOverride){var pendingStopReason,createHttpRequestImpl=createHttpRequest,recordImpl=record,cleanupTasks=[],replayMemoryBudget={$rRecord:function $rRecord(){return 0},$rSegment:function $rSegment(){return 0}},isRecordingStopped=!1,isRecordingReady=!1,pendingStopRequested=!1,stoppedNotificationSent=!1,flushRecorderBeforePageExit=function flushRecorderBeforePageExit(){},emitReplayTimeAnchor=function emitReplayTimeAnchor(){},finalReplayTimeAnchorRequested=!1,hasSegmentCollection=!1;function emitFinalReplayTimeAnchor(){if(finalReplayTimeAnchorRequested||"visible"!==document.visibilityState)return!0;var admissionResult=emitReplayTimeAnchor();return!0===admissionResult&&(finalReplayTimeAnchorRequested=!0),admissionResult}var replayResetRequestedBeforeRecorder=!1,requestReplayReset=function requestReplayReset(){replayResetRequestedBeforeRecorder=!0};function stopRecording(flushReason){if(!isRecordingStopped){if(!isRecordingReady)return pendingStopRequested=!0,void(pendingStopReason=flushReason);if(!hasSegmentCollection)try{emitFinalReplayTimeAnchor()}catch(error){addTelemetryDebug("Session Replay final time anchor failed.",{reason:flushReason,error:String(error)})}var firstCleanupError;isRecordingStopped=!0,cleanupTasks.slice().reverse().forEach((function(task){try{task(flushReason)}catch(error){firstCleanupError||(firstCleanupError=error)}})),firstCleanupError&&addTelemetryDebug("Session Replay cleanup failed.",{reason:flushReason,error:String(firstCleanupError)}),function notifyStopped(flushReason){if(!stoppedNotificationSent&&onStopped){stoppedNotificationSent=!0;try{onStopped(flushReason)}catch(error){addTelemetryDebug("Session Replay stopped callback failed.",{reason:flushReason,error:String(error)})}}}(flushReason)}}try{var addRecord,addBaselineRecords,_record,stopSegmentCollection,replayRequest=httpRequest||lifeCycle.$rReplayRequest;replayRequest||(replayRequest=createHttpRequestImpl(configuration.sessionReplayEndPoint,SEGMENT_BYTES_LIMIT,configuration.retryMaxSize,(function reportError(error){lifeCycle.notify(LifeCycleEventType.RAW_ERROR_COLLECTED,{error:error}),addTelemetryDebug("Error reported to customer",{"error.message":error.message})})),lifeCycle.$rReplayRequest=replayRequest);var beginMandatoryFullSnapshotRecovery=function beginMandatoryFullSnapshotRecovery(){},discardMandatoryFullSnapshotRecovery=function discardMandatoryFullSnapshotRecovery(){},wasLastEmitBackpressured=function wasLastEmitBackpressured(){},replayTimeAnchorsEnabled=!0;if(canUseEventBridge()){var _startRecordBridge=startRecordBridge(viewContexts);addRecord=_startRecordBridge.addRecord,_record=recordImpl({emit:addRecord,configuration:configuration,lifeCycle:lifeCycle,sessionManager:sessionManager,$rWasLastEmitBackpressured:wasLastEmitBackpressured,$rOnMandatoryFullSnapshotStarted:beginMandatoryFullSnapshotRecovery,$rOnMandatoryFullSnapshotAbandoned:discardMandatoryFullSnapshotRecovery,$rShouldEmitTimeAnchor:function $rShouldEmitTimeAnchor(){return replayTimeAnchorsEnabled},$rMemoryBudget:replayMemoryBudget,onFullSnapshotFailure:stopRecording})}else{var session=sessionManager.findTrackedSession(),isRecordErrorSessionReplay=session&&session.errorSessionReplayAllowed&&!session.sessionHasError;replayTimeAnchorsEnabled=!isRecordErrorSessionReplay;var segmentCollection=startSegmentCollection(lifeCycle,configuration,sessionManager,viewContexts,replayRequest,encoder,isRecordErrorSessionReplay,{beforePageExitFlush:function beforePageExitFlush(pageExitEvent){return flushRecorderBeforePageExit(pageExitEvent)},onReplayResetNeeded:function onReplayResetNeeded(reason){requestReplayReset(reason)},onReplayResetExhausted:function onReplayResetExhausted(reason){stopRecording(reason||"full_snapshot_failure_limit")},memoryBudget:replayMemoryBudget,onSegmentFlushed:void 0});hasSegmentCollection=!0,addRecord=segmentCollection.addRecord,addBaselineRecords=segmentCollection.$rAddBaselineRecords,wasLastEmitBackpressured=segmentCollection.$rWasLastAddRecordBackpressured||wasLastEmitBackpressured,beginMandatoryFullSnapshotRecovery=segmentCollection.$rBeginMandatoryRecovery||beginMandatoryFullSnapshotRecovery,discardMandatoryFullSnapshotRecovery=segmentCollection.$rDiscardMandatoryRecovery||discardMandatoryFullSnapshotRecovery;var flushBufferSegment=segmentCollection.flushBufferSegment,unlockSegment=segmentCollection.unlockSegment;if(stopSegmentCollection=segmentCollection.stop,cleanupTasks.push(stopSegmentCollection),isRecordErrorSessionReplay){var sessionStateUpdateSubscription=sessionManager.sessionStateUpdateObservable.subscribe((function(_ref){var newState=_ref.newState;isRecordErrorSessionReplay&&(newState.hasError||newState.forcedSession)&&(isRecordErrorSessionReplay=!1,replayTimeAnchorsEnabled=!0,unlockSegment(),emitReplayTimeAnchor())}));cleanupTasks.push(sessionStateUpdateSubscription.unsubscribe)}var lastFullSnapshotEvent=null;_record=recordImpl({emit:function wrappedEmit(recordData){var accepted=addRecord(recordData);if(!1!==accepted&&isRecordErrorSessionReplay)if(recordData.type===RecordType.FullSnapshot)lastFullSnapshotEvent=recordData;else if(recordData.type===RecordType.IncrementalSnapshot){recordData.timestamp-lastFullSnapshotEvent.timestamp>BUFFER_CHECKOUT_TIME&&flushBufferSegment((function(){deleteOldestStats(),_takeSubsequentFullSnapshot()}))}return accepted},$rEmitBaseline:function wrappedEmitBaseline(records){var accepted=addBaselineRecords(records);return!1!==accepted&&isRecordErrorSessionReplay&&(lastFullSnapshotEvent=records[records.length-1]),accepted},configuration:configuration,lifeCycle:lifeCycle,sessionManager:sessionManager,$rWasLastEmitBackpressured:wasLastEmitBackpressured,$rOnMandatoryFullSnapshotStarted:beginMandatoryFullSnapshotRecovery,$rOnMandatoryFullSnapshotAbandoned:discardMandatoryFullSnapshotRecovery,$rShouldEmitTimeAnchor:function $rShouldEmitTimeAnchor(){return replayTimeAnchorsEnabled},$rMemoryBudget:replayMemoryBudget,onFullSnapshotFailure:stopRecording})}if(!_record||"function"!=typeof _record.stop)throw new Error("Session Replay recorder failed to initialize.");emitReplayTimeAnchor=_record.$rEmitTimeAnchor||emitReplayTimeAnchor;var stopRecorder=_record.stop;if(stopSegmentCollection){var provisionalCleanupIndex=cleanupTasks.indexOf(stopSegmentCollection);-1!==provisionalCleanupIndex&&cleanupTasks.splice(provisionalCleanupIndex,1)}cleanupTasks.push(stopSegmentCollection?function(flushReason){stopRecorder(flushReason,!0)}:stopRecorder),stopSegmentCollection&&cleanupTasks.push(stopSegmentCollection);var _takeSubsequentFullSnapshot=_record.takeSubsequentFullSnapshot,flushScheduledFullSnapshot=_record.flushScheduledFullSnapshot||function(){},flushCanvasCommands=_record.$rFlushCanvasCommands||function(){};flushRecorderBeforePageExit=function flushRecorderBeforePageExit(pageExitEvent){return pageExitEvent&&pageExitEvent.reason!==PageExitReason.UNLOADING?(_record.flushMutations(),flushCanvasCommands(),pageExitEvent.reason===PageExitReason.HIDDEN||"visible"===document.visibilityState?emitReplayTimeAnchor():void 0):(flushScheduledFullSnapshot()||_record.flushMutations(!0),flushCanvasCommands(),emitFinalReplayTimeAnchor())},requestReplayReset=function createReplayResetScheduler(takeSubsequentFullSnapshot,cleanupTasks){var resetTimeoutId,stopped=!1,pending=!1,lastResetAt=-1/0,RESET_MIN_INTERVAL=ONE_SECOND;function runReset(){resetTimeoutId=void 0,!stopped&&pending&&(pending=!1,lastResetAt=Date.now(),takeSubsequentFullSnapshot())}return cleanupTasks.push((function(){stopped=!0,void 0!==resetTimeoutId&&(clearTimeout(resetTimeoutId),resetTimeoutId=void 0)})),function(){if(!stopped&&(pending=!0,void 0===resetTimeoutId)){var delay=Math.max(lastResetAt+RESET_MIN_INTERVAL-Date.now(),0);resetTimeoutId=setTimeout(runReset,delay)}}}(_takeSubsequentFullSnapshot,cleanupTasks),replayResetRequestedBeforeRecorder&&requestReplayReset();var scheduleSubsequentFullSnapshot=_record.scheduleSubsequentFullSnapshot||_takeSubsequentFullSnapshot,prepareForViewChange=_record.prepareForViewChange||_record.flushMutations,snapshotCanvas=_record.snapshotCanvas,getSerializedNodeIdForDebug=_record.getSerializedNodeIdForDebug;0;var flushMutations=_record.flushMutations,subscribeViewEnded=lifeCycle.subscribe(LifeCycleEventType.VIEW_ENDED,(function(){flushScheduledFullSnapshot(!0,!0)||flushMutations(),flushCanvasCommands(),prepareForViewChange(),addRecord({timestamp:timeStampNow(),type:RecordType.ViewEnd})}));cleanupTasks.push(subscribeViewEnded.unsubscribe);var scribeViewCreated=lifeCycle.subscribe(LifeCycleEventType.VIEW_CREATED,(function(view){scheduleSubsequentFullSnapshot(view.startClocks.timeStamp)}));cleanupTasks.push(scribeViewCreated.unsubscribe),isRecordingReady=!0,pendingStopRequested&&stopRecording(pendingStopReason)}catch(error){throw isRecordingReady=!0,stopRecording("start_failure"),error}var recording={stop:stopRecording,isStopped:function isStopped(){return isRecordingStopped},takeSubsequentFullSnapshot:function takeSubsequentFullSnapshot(){return _takeSubsequentFullSnapshot(void 0,!0)},snapshotCanvas:snapshotCanvas,getSerializedNodeIdForDebug:getSerializedNodeIdForDebug,flushReplayMutationsForDebug:flushMutations};return recording}
|
|
2
|
+
//# sourceMappingURL=startRecording.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startRecording.js","names":["timeStampNow","createHttpRequest","LifeCycleEventType","PageExitReason","addTelemetryDebug","ONE_SECOND","canUseEventBridge","assign","record","startRecordBridge","startSegmentCollection","SEGMENT_BYTES_LIMIT","RecordType","deleteOldestStats","BUFFER_CHECKOUT_TIME","REPLAY_SEGMENT_FLUSH_HISTORY_LIMIT","startRecording","lifeCycle","configuration","sessionManager","viewContexts","encoder","httpRequest","onStopped","createHttpRequestOverride","recordOverride","createHttpRequestImpl","__BUILD_ENV__REPLAY_DEBUG_ENABLED__","recordImpl","cleanupTasks","replayMemoryBudget","$rRecord","$rSegment","isRecordingStopped","isRecordingReady","pendingStopRequested","pendingStopReason","stoppedNotificationSent","flushRecorderBeforePageExit","emitReplayTimeAnchor","finalReplayTimeAnchorRequested","hasSegmentCollection","emitFinalReplayTimeAnchor","document","visibilityState","admissionResult","replayResetRequestedBeforeRecorder","requestReplayReset","notifyStopped","flushReason","error","reason","String","stopRecording","firstCleanupError","slice","reverse","forEach","task","lastReplaySegmentFlushForDebug","replaySegmentFlushHistoryForDebug","undefined","replaySegmentFlushCount","replayResetCountForDebug","replayResetLastReasonForDebug","areReplaySegmentsLockedForDebug","reportError","notify","RAW_ERROR_COLLECTED","message","replayRequest","$rReplayRequest","sessionReplayEndPoint","retryMaxSize","addRecord","addBaselineRecords","_record","stopSegmentCollection","beginMandatoryFullSnapshotRecovery","discardMandatoryFullSnapshotRecovery","wasLastEmitBackpressured","replayTimeAnchorsEnabled","session","findTrackedSession","isRecordErrorSessionReplay","errorSessionReplayAllowed","sessionHasError","segmentCollection","beforePageExitFlush","pageExitEvent","onReplayResetNeeded","onReplayResetExhausted","memoryBudget","onSegmentFlushed","segmentFlush","cloneReplaySegmentFlushForDebug","push","length","shift","$rAddBaselineRecords","$rWasLastAddRecordBackpressured","$rBeginMandatoryRecovery","$rDiscardMandatoryRecovery","flushBufferSegment","unlockSegment","isLocked","stop","sessionStateUpdateSubscription","sessionStateUpdateObservable","subscribe","_ref","newState","hasError","forcedSession","unsubscribe","lastFullSnapshotEvent","wrappedEmit","recordData","accepted","type","FullSnapshot","IncrementalSnapshot","exceedTime","timestamp","takeSubsequentFullSnapshot","wrappedEmitBaseline","records","emit","$rEmitBaseline","$rWasLastEmitBackpressured","$rOnMandatoryFullSnapshotStarted","$rOnMandatoryFullSnapshotAbandoned","$rShouldEmitTimeAnchor","$rMemoryBudget","onFullSnapshotFailure","_startRecordBridge","Error","$rEmitTimeAnchor","stopRecorder","provisionalCleanupIndex","indexOf","splice","flushScheduledFullSnapshot","flushCanvasCommands","$rFlushCanvasCommands","UNLOADING","flushMutations","HIDDEN","createReplayResetScheduler","scheduleSubsequentFullSnapshot","prepareForViewChange","snapshotCanvas","getSerializedNodeIdForDebug","recordingDebug","getLastAutoCanvasSnapshotResultForDebug","getAutoCanvasSnapshotDebugHistoryForDebug","getLastCanvasMutationForDebug","getCanvasMutationHistoryForDebug","getLastDomMutationForDebug","getDomMutationHistoryForDebug","getReplayPerformanceForDebug","cloneReplayPerformanceForDebug","getLastReplaySegmentFlushForDebug","getReplaySegmentFlushHistoryForDebug","map","subscribeViewEnded","VIEW_ENDED","ViewEnd","scribeViewCreated","VIEW_CREATED","view","startClocks","timeStamp","recording","isStopped","flushReplayMutationsForDebug","stopped","pending","lastResetAt","Infinity","resetTimeoutId","RESET_MIN_INTERVAL","runReset","Date","now","clearTimeout","delay","Math","max","setTimeout","sequence","creationReason","recordsCount","recordCountsByType","start","end","indexInView","rawBytesCount","stats","replayResetCount","replayResetLastReason","replaySegmentsLocked","Boolean"],"sources":["../../src/boot/startRecording.js"],"mappings":"AAAA,SACEA,YAAY,EACZC,iBAAiB,EACjBC,kBAAkB,EAClBC,cAAc,EACdC,iBAAiB,EACjBC,UAAU,EACVC,iBAAiB,EACjBC,MAAM,QACD,yBAAyB;AAChC,SAASC,MAAM,QAAQ,yBAAyB;AA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AEjG,YAAY,CAACiG,cAAc;IAC3C9I,WAAW,EAAE6C,YAAY,CAAC7C,WAAW;IACrC+I,YAAY,EAAElG,YAAY,CAACkG,YAAY;IACvCC,kBAAkB,EAAE1L,MAAM,CAAC,CAAC,CAAC,EAAEuF,YAAY,CAACmG,kBAAkB,CAAC;IAC/DC,KAAK,EAAEpG,YAAY,CAACoG,KAAK;IACzBC,GAAG,EAAErG,YAAY,CAACqG,GAAG;IACrBC,WAAW,EAAEtG,YAAY,CAACsG,WAAW;IACrCC,aAAa,EAAEvG,YAAY,CAACuG;EAC9B,CAAC;AACH;AAEA,SAASpC,8BAA8BA,CACrCqC,KAAK,EACLxI,uBAAuB,EACvByI,gBAAgB,EAChBC,qBAAqB,EACrBC,oBAAoB,EACpB;EACA,IAAI,CAACH,KAAK,IAAI,OAAOxI,uBAAuB,KAAK,WAAW,EAAE;IAC5D,OAAOD,SAAS;EAClB;EAEA,OAAOtD,MAAM,CAAC,CAAC,CAAC,EAAE+L,KAAK,IAAI,CAAC,CAAC,EAAE;IAC7BxI,uBAAuB,EAAEA,uBAAuB,IAAI,CAAC;IACrDyI,gBAAgB,EAAEA,gBAAgB,IAAI,CAAC;IACvCC,qBAAqB,EAAEA,qBAAqB;IAC5CC,oBAAoB,EAAEC,OAAO,CAACD,oBAAoB;EACpD,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"startRecording.js","names":["timeStampNow","createHttpRequest","LifeCycleEventType","PageExitReason","addTelemetryDebug","ONE_SECOND","canUseEventBridge","assign","record","startRecordBridge","startSegmentCollection","SEGMENT_BYTES_LIMIT","RecordType","deleteOldestStats","BUFFER_CHECKOUT_TIME","startRecording","lifeCycle","configuration","sessionManager","viewContexts","encoder","httpRequest","onStopped","createHttpRequestOverride","recordOverride","pendingStopReason","createHttpRequestImpl","recordImpl","cleanupTasks","replayMemoryBudget","$rRecord","$rSegment","isRecordingStopped","isRecordingReady","pendingStopRequested","stoppedNotificationSent","flushRecorderBeforePageExit","emitReplayTimeAnchor","finalReplayTimeAnchorRequested","hasSegmentCollection","emitFinalReplayTimeAnchor","document","visibilityState","admissionResult","replayResetRequestedBeforeRecorder","requestReplayReset","stopRecording","flushReason","error","reason","String","firstCleanupError","slice","reverse","forEach","task","notifyStopped","addRecord","addBaselineRecords","_record","stopSegmentCollection","replayRequest","$rReplayRequest","sessionReplayEndPoint","retryMaxSize","reportError","notify","RAW_ERROR_COLLECTED","message","beginMandatoryFullSnapshotRecovery","discardMandatoryFullSnapshotRecovery","wasLastEmitBackpressured","replayTimeAnchorsEnabled","_startRecordBridge","emit","$rWasLastEmitBackpressured","$rOnMandatoryFullSnapshotStarted","$rOnMandatoryFullSnapshotAbandoned","$rShouldEmitTimeAnchor","$rMemoryBudget","onFullSnapshotFailure","session","findTrackedSession","isRecordErrorSessionReplay","errorSessionReplayAllowed","sessionHasError","segmentCollection","beforePageExitFlush","pageExitEvent","onReplayResetNeeded","onReplayResetExhausted","memoryBudget","onSegmentFlushed","undefined","$rAddBaselineRecords","$rWasLastAddRecordBackpressured","$rBeginMandatoryRecovery","$rDiscardMandatoryRecovery","flushBufferSegment","unlockSegment","stop","push","sessionStateUpdateSubscription","sessionStateUpdateObservable","subscribe","_ref","newState","hasError","forcedSession","unsubscribe","lastFullSnapshotEvent","wrappedEmit","recordData","accepted","type","FullSnapshot","IncrementalSnapshot","timestamp","takeSubsequentFullSnapshot","$rEmitBaseline","wrappedEmitBaseline","records","length","Error","$rEmitTimeAnchor","stopRecorder","provisionalCleanupIndex","indexOf","splice","flushScheduledFullSnapshot","flushCanvasCommands","$rFlushCanvasCommands","UNLOADING","flushMutations","HIDDEN","createReplayResetScheduler","resetTimeoutId","stopped","pending","lastResetAt","Infinity","RESET_MIN_INTERVAL","runReset","Date","now","clearTimeout","delay","Math","max","setTimeout","scheduleSubsequentFullSnapshot","prepareForViewChange","snapshotCanvas","getSerializedNodeIdForDebug","__BUILD_ENV__REPLAY_DEBUG_ENABLED__","subscribeViewEnded","VIEW_ENDED","ViewEnd","scribeViewCreated","VIEW_CREATED","view","startClocks","timeStamp","recording","isStopped","flushReplayMutationsForDebug"],"sources":["../../src/boot/startRecording.js"],"mappings":"OACEA,aACAC,kBACAC,mBACAC,eACAC,kBACAC,WACAC,kBACAC,WACK,iCACEC,WAAc,iCACdC,sBAAyB,4CAEhCC,uBACAC,wBACK,4CACEC,eAAkB,kBAClBC,sBAAyB,sCAE3B,IAAMC,qBAAuB,GAAKT,kBAGlC,SAASU,eACdC,UACAC,cACAC,eACAC,aACAC,QACAC,YACAC,UACAC,0BACAC,gBAEA,IAkBIC,kBAlBAC,sBACAH,kBAEAI,WAAgDnB,OAGhDoB,aAAe,GACfC,mBAAqB,CACvBC,SAAU,SAAVA,WACE,OAAO,CACT,EACAC,UAAW,SAAXA,YACE,OAAO,CACT,GAEEC,oBAAqB,EACrBC,kBAAmB,EACnBC,sBAAuB,EAEvBC,yBAA0B,EAC1BC,4BAA8B,SAA9BA,8BAA2C,EAC3CC,qBAAuB,SAAvBA,uBAAoC,EACpCC,gCAAiC,EACjCC,sBAAuB,EAC3B,SAASC,4BACP,GACEF,gCAC6B,YAA7BG,SAASC,gBAET,OAAO,EAET,IAAIC,gBAAkBN,uBAItB,OAHwB,IAApBM,kBACFL,gCAAiC,GAE5BK,eACT,CACA,IAAIC,oCAAqC,EACrCC,mBAAqB,SAArBA,qBACFD,oCAAqC,CACvC,EAeA,SAASE,cAAcC,aACrB,IAAIf,mBAAJ,CAGA,IAAKC,iBAGH,OAFAC,sBAAuB,OACvBT,kBAAoBsB,aAGtB,IAAKR,qBACH,IACEC,2BACF,CAAE,MAAOQ,OACP5C,kBAAkB,2CAA4C,CAC5D6C,OAAQF,YACRC,MAAOE,OAAOF,QAElB,CAGF,IAAIG,kBADJnB,oBAAqB,EAErBJ,aACGwB,QACAC,UACAC,SAAQ,SAAUC,MACjB,IACEA,KAAKR,YACP,CAAE,MAAOC,OACFG,oBACHA,kBAAoBH,MAExB,CACF,IACEG,m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mask';
|
|
7
|
-
export var PRIVACY_ATTR_VALUE_MASK_USER_INPUT = 'mask-user-input';
|
|
8
|
-
export var PRIVACY_ATTR_VALUE_HIDDEN = 'hidden';
|
|
9
|
-
|
|
10
|
-
// Privacy Classes - not all customers can set plain HTML attributes, so support classes too
|
|
11
|
-
export var PRIVACY_CLASS_ALLOW = 'gc-privacy-allow';
|
|
12
|
-
export var PRIVACY_CLASS_MASK = 'gc-privacy-mask';
|
|
13
|
-
export var PRIVACY_CLASS_MASK_USER_INPUT = 'gc-privacy-mask-user-input';
|
|
14
|
-
export var PRIVACY_CLASS_HIDDEN = 'gc-privacy-hidden';
|
|
15
|
-
|
|
16
|
-
// Private Replacement Templates
|
|
17
|
-
export var CENSORED_STRING_MARK = '***';
|
|
18
|
-
export var CENSORED_IMG_MARK = 'data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==';
|
|
19
|
-
export var FORM_PRIVATE_TAG_NAMES = {
|
|
20
|
-
INPUT: true,
|
|
21
|
-
OUTPUT: true,
|
|
22
|
-
TEXTAREA: true,
|
|
23
|
-
SELECT: true,
|
|
24
|
-
OPTION: true,
|
|
25
|
-
DATALIST: true,
|
|
26
|
-
OPTGROUP: true
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=constants.js.map
|
|
1
|
+
export{NodePrivacyLevel}from"@cloudcare/browser-core";export var PRIVACY_ATTR_NAME="data-gc-privacy";export var PRIVACY_ATTR_VALUE_ALLOW="allow";export var PRIVACY_ATTR_VALUE_MASK="mask";export var PRIVACY_ATTR_VALUE_MASK_USER_INPUT="mask-user-input";export var PRIVACY_ATTR_VALUE_HIDDEN="hidden";export var PRIVACY_CLASS_ALLOW="gc-privacy-allow";export var PRIVACY_CLASS_MASK="gc-privacy-mask";export var PRIVACY_CLASS_MASK_USER_INPUT="gc-privacy-mask-user-input";export var PRIVACY_CLASS_HIDDEN="gc-privacy-hidden";export var CENSORED_STRING_MARK="***";export var CENSORED_IMG_MARK="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==";export var FORM_PRIVATE_TAG_NAMES={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};
|
|
2
|
+
//# sourceMappingURL=constants.js.map
|
package/esm/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","names":["NodePrivacyLevel","PRIVACY_ATTR_NAME","PRIVACY_ATTR_VALUE_ALLOW","PRIVACY_ATTR_VALUE_MASK","PRIVACY_ATTR_VALUE_MASK_USER_INPUT","PRIVACY_ATTR_VALUE_HIDDEN","PRIVACY_CLASS_ALLOW","PRIVACY_CLASS_MASK","PRIVACY_CLASS_MASK_USER_INPUT","PRIVACY_CLASS_HIDDEN","CENSORED_STRING_MARK","CENSORED_IMG_MARK","FORM_PRIVATE_TAG_NAMES","INPUT","OUTPUT","TEXTAREA","SELECT","OPTION","DATALIST","OPTGROUP"],"sources":["../src/constants.js"],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.js","names":["NodePrivacyLevel","PRIVACY_ATTR_NAME","PRIVACY_ATTR_VALUE_ALLOW","PRIVACY_ATTR_VALUE_MASK","PRIVACY_ATTR_VALUE_MASK_USER_INPUT","PRIVACY_ATTR_VALUE_HIDDEN","PRIVACY_CLASS_ALLOW","PRIVACY_CLASS_MASK","PRIVACY_CLASS_MASK_USER_INPUT","PRIVACY_CLASS_HIDDEN","CENSORED_STRING_MARK","CENSORED_IMG_MARK","FORM_PRIVATE_TAG_NAMES","INPUT","OUTPUT","TEXTAREA","SELECT","OPTION","DATALIST","OPTGROUP"],"sources":["../src/constants.js"],"mappings":"OAASA,qBAAwB,iCAE1B,IAAIC,kBAAoB,yBAGxB,IAAIC,yBAA2B,eAC/B,IAAIC,wBAA0B,cAC9B,IAAIC,mCAAqC,yBACzC,IAAIC,0BAA4B,gBAGhC,IAAIC,oBAAsB,0BAC1B,IAAIC,mBAAqB,yBACzB,IAAIC,8BAAgC,oCACpC,IAAIC,qBAAuB,2BAG3B,IAAIC,qBAAuB,aAC3B,IAAIC,kBACT,4FAEK,IAAIC,uBAAyB,CAClCC,OAAO,EACPC,QAAQ,EACRC,UAAU,EACVC,QAAQ,EACRC,QAAQ,EACRC,UAAU,EACVC,UAAU","ignoreList":[]}
|