clarity-js 0.7.67 → 0.7.69
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/build/clarity.extended.js +1 -1
- package/build/clarity.insight.js +1 -1
- package/build/clarity.js +87 -28
- package/build/clarity.min.js +1 -1
- package/build/clarity.module.js +87 -28
- package/build/clarity.performance.js +1 -1
- package/package.json +1 -1
- package/src/core/event.ts +14 -10
- package/src/core/time.ts +2 -2
- package/src/core/version.ts +1 -1
- package/src/data/baseline.ts +32 -0
- package/src/data/encode.ts +6 -0
- package/src/data/metadata.ts +1 -1
- package/src/interaction/click.ts +12 -6
- package/src/interaction/encode.ts +2 -0
- package/src/interaction/timeline.ts +1 -1
- package/src/interaction/unload.ts +3 -3
- package/src/layout/mutation.ts +158 -94
- package/src/layout/style.ts +8 -7
- package/types/core.d.ts +4 -1
- package/types/data.d.ts +6 -0
- package/types/interaction.d.ts +8 -0
package/build/clarity.module.js
CHANGED
|
@@ -167,7 +167,7 @@ function stop$F() {
|
|
|
167
167
|
startTime = 0;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
var version$1 = "0.7.
|
|
170
|
+
var version$1 = "0.7.69";
|
|
171
171
|
|
|
172
172
|
// tslint:disable: no-bitwise
|
|
173
173
|
function hash (input, precision) {
|
|
@@ -409,6 +409,12 @@ function reset$s() {
|
|
|
409
409
|
downX: buffer.downX,
|
|
410
410
|
downY: buffer.downY,
|
|
411
411
|
downTime: buffer.downTime,
|
|
412
|
+
upX: buffer.upX,
|
|
413
|
+
upY: buffer.upY,
|
|
414
|
+
upTime: buffer.upTime,
|
|
415
|
+
pointerPrevX: buffer.pointerPrevX,
|
|
416
|
+
pointerPrevY: buffer.pointerPrevY,
|
|
417
|
+
pointerPrevTime: buffer.pointerPrevTime,
|
|
412
418
|
}
|
|
413
419
|
};
|
|
414
420
|
}
|
|
@@ -431,6 +437,12 @@ function reset$s() {
|
|
|
431
437
|
downX: 0,
|
|
432
438
|
downY: 0,
|
|
433
439
|
downTime: 0,
|
|
440
|
+
upX: 0,
|
|
441
|
+
upY: 0,
|
|
442
|
+
upTime: 0,
|
|
443
|
+
pointerPrevX: 0,
|
|
444
|
+
pointerPrevY: 0,
|
|
445
|
+
pointerPrevTime: 0,
|
|
434
446
|
};
|
|
435
447
|
}
|
|
436
448
|
function track$8(event, x, y, time) {
|
|
@@ -452,6 +464,9 @@ function track$8(event, x, y, time) {
|
|
|
452
464
|
buffer.moveX = x;
|
|
453
465
|
buffer.moveY = y;
|
|
454
466
|
buffer.moveTime = time;
|
|
467
|
+
buffer.pointerPrevX = buffer.pointerX;
|
|
468
|
+
buffer.pointerPrevY = buffer.pointerY;
|
|
469
|
+
buffer.pointerPrevTime = buffer.pointerTime;
|
|
455
470
|
buffer.pointerX = x;
|
|
456
471
|
buffer.pointerY = y;
|
|
457
472
|
buffer.pointerTime = time;
|
|
@@ -460,11 +475,28 @@ function track$8(event, x, y, time) {
|
|
|
460
475
|
buffer.downX = x;
|
|
461
476
|
buffer.downY = y;
|
|
462
477
|
buffer.downTime = time;
|
|
478
|
+
buffer.pointerPrevX = buffer.pointerX;
|
|
479
|
+
buffer.pointerPrevY = buffer.pointerY;
|
|
480
|
+
buffer.pointerPrevTime = buffer.pointerTime;
|
|
481
|
+
buffer.pointerX = x;
|
|
482
|
+
buffer.pointerY = y;
|
|
483
|
+
buffer.pointerTime = time;
|
|
484
|
+
break;
|
|
485
|
+
case 14 /* Event.MouseUp */:
|
|
486
|
+
buffer.upX = x;
|
|
487
|
+
buffer.upY = y;
|
|
488
|
+
buffer.upTime = time;
|
|
489
|
+
buffer.pointerPrevX = buffer.pointerX;
|
|
490
|
+
buffer.pointerPrevY = buffer.pointerY;
|
|
491
|
+
buffer.pointerPrevTime = buffer.pointerTime;
|
|
463
492
|
buffer.pointerX = x;
|
|
464
493
|
buffer.pointerY = y;
|
|
465
494
|
buffer.pointerTime = time;
|
|
466
495
|
break;
|
|
467
496
|
default:
|
|
497
|
+
buffer.pointerPrevX = buffer.pointerX;
|
|
498
|
+
buffer.pointerPrevY = buffer.pointerY;
|
|
499
|
+
buffer.pointerPrevTime = buffer.pointerTime;
|
|
468
500
|
buffer.pointerX = x;
|
|
469
501
|
buffer.pointerY = y;
|
|
470
502
|
buffer.pointerTime = time;
|
|
@@ -1849,6 +1881,7 @@ function handler$3(event, root, evt) {
|
|
|
1849
1881
|
var eY = l ? Math.max(Math.floor(((y - l.y) / l.h) * 32767 /* Setting.ClickPrecision */), 0) : 0;
|
|
1850
1882
|
// Check for null values before processing this event
|
|
1851
1883
|
if (x !== null && y !== null) {
|
|
1884
|
+
var textInfo = text(t);
|
|
1852
1885
|
state$8.push({
|
|
1853
1886
|
time: time(evt),
|
|
1854
1887
|
event: event,
|
|
@@ -1861,10 +1894,11 @@ function handler$3(event, root, evt) {
|
|
|
1861
1894
|
button: evt.button,
|
|
1862
1895
|
reaction: reaction(t),
|
|
1863
1896
|
context: context(a),
|
|
1864
|
-
text: text
|
|
1897
|
+
text: textInfo.text,
|
|
1865
1898
|
link: a ? a.href : null,
|
|
1866
1899
|
hash: null,
|
|
1867
|
-
trust: evt.isTrusted ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False
|
|
1900
|
+
trust: evt.isTrusted ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */,
|
|
1901
|
+
isFullText: textInfo.isFullText,
|
|
1868
1902
|
}
|
|
1869
1903
|
});
|
|
1870
1904
|
schedule$1(encode$3.bind(this, event));
|
|
@@ -1884,17 +1918,20 @@ function link(node) {
|
|
|
1884
1918
|
}
|
|
1885
1919
|
function text(element) {
|
|
1886
1920
|
var output = null;
|
|
1921
|
+
var isFullText = false;
|
|
1887
1922
|
if (element) {
|
|
1888
1923
|
// Grab text using "textContent" for most HTMLElements, however, use "value" for HTMLInputElements and "alt" for HTMLImageElement.
|
|
1889
1924
|
var t = element.textContent || String(element.value || '') || element.alt;
|
|
1890
1925
|
if (t) {
|
|
1891
1926
|
// Replace multiple occurrence of space characters with a single white space
|
|
1892
1927
|
// Also, trim any spaces at the beginning or at the end of string
|
|
1928
|
+
var trimmedText = t.replace(/\s+/g, " " /* Constant.Space */).trim();
|
|
1893
1929
|
// Finally, send only first few characters as specified by the Setting
|
|
1894
|
-
output =
|
|
1930
|
+
output = trimmedText.substring(0, 25 /* Setting.ClickText */);
|
|
1931
|
+
isFullText = output.length === trimmedText.length;
|
|
1895
1932
|
}
|
|
1896
1933
|
}
|
|
1897
|
-
return output;
|
|
1934
|
+
return { text: output, isFullText: isFullText ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */ };
|
|
1898
1935
|
}
|
|
1899
1936
|
function reaction(element) {
|
|
1900
1937
|
if (element.nodeType === Node.ELEMENT_NODE) {
|
|
@@ -2346,7 +2383,7 @@ function start$n() {
|
|
|
2346
2383
|
}
|
|
2347
2384
|
function recompute$1(evt) {
|
|
2348
2385
|
recompute$1.dn = 17 /* FunctionNames.UnloadRecompute */;
|
|
2349
|
-
data$9 = { name: evt.type };
|
|
2386
|
+
data$9 = { name: evt.type, persisted: evt.persisted ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */ };
|
|
2350
2387
|
encode$3(26 /* Event.Unload */, time(evt));
|
|
2351
2388
|
stop();
|
|
2352
2389
|
}
|
|
@@ -2477,6 +2514,8 @@ var throttleDelay = null;
|
|
|
2477
2514
|
var activePeriod = null;
|
|
2478
2515
|
var history$4 = {};
|
|
2479
2516
|
var criticalPeriod = null;
|
|
2517
|
+
// We ignore mutations if these attributes are updated
|
|
2518
|
+
var IGNORED_ATTRIBUTES = ["data-google-query-id", "data-load-complete", "data-google-container-id"];
|
|
2480
2519
|
function start$k() {
|
|
2481
2520
|
start$k.dn = 21 /* FunctionNames.MutationStart */;
|
|
2482
2521
|
observers = [];
|
|
@@ -2627,7 +2666,9 @@ function processMutation(timer, mutation, instance, timestamp) {
|
|
|
2627
2666
|
}
|
|
2628
2667
|
switch (type) {
|
|
2629
2668
|
case "attributes" /* Constant.Attributes */:
|
|
2630
|
-
|
|
2669
|
+
if (IGNORED_ATTRIBUTES.indexOf(mutation.attributeName) < 0) {
|
|
2670
|
+
processNode(target, 3 /* Source.Attributes */, timestamp);
|
|
2671
|
+
}
|
|
2631
2672
|
break;
|
|
2632
2673
|
case "characterData" /* Constant.CharacterData */:
|
|
2633
2674
|
processNode(target, 4 /* Source.CharacterData */, timestamp);
|
|
@@ -2732,8 +2773,7 @@ function track$5(m, timer, instance, timestamp) {
|
|
|
2732
2773
|
var parent_1 = value.selector ? value.selector.join() : "" /* Constant.Empty */;
|
|
2733
2774
|
// Check if its a low priority (e.g., ads related) element mutation happening during critical period
|
|
2734
2775
|
// If the discard list is empty, we discard all mutations during critical period
|
|
2735
|
-
var lowPriMutation = config$2.throttleMutations && critical &&
|
|
2736
|
-
(config$2.discard.length === 0 || config$2.discard.some(function (key) { return element_1.includes(key); }));
|
|
2776
|
+
var lowPriMutation = config$2.throttleMutations && critical && (config$2.discard.length === 0 || config$2.discard.some(function (key) { return element_1.includes(key); }));
|
|
2737
2777
|
// We use selector, instead of id, to determine the key (signature for the mutation) because in some cases
|
|
2738
2778
|
// repeated mutations can cause elements to be destroyed and then recreated as new DOM nodes
|
|
2739
2779
|
// In those cases, IDs will change however the selector (which is relative to DOM xPath) remains the same
|
|
@@ -2814,7 +2854,9 @@ function processThrottledMutations() {
|
|
|
2814
2854
|
if (throttleDelay) {
|
|
2815
2855
|
clearTimeout(throttleDelay);
|
|
2816
2856
|
}
|
|
2817
|
-
throttleDelay = setTimeout(function () {
|
|
2857
|
+
throttleDelay = setTimeout(function () {
|
|
2858
|
+
schedule$1(process$2, 1 /* Priority.High */);
|
|
2859
|
+
}, 33 /* Setting.LookAhead */);
|
|
2818
2860
|
}
|
|
2819
2861
|
function schedule(node) {
|
|
2820
2862
|
// Only schedule manual trigger for this node if it's not already in the queue
|
|
@@ -2827,7 +2869,9 @@ function schedule(node) {
|
|
|
2827
2869
|
if (timeout$1) {
|
|
2828
2870
|
clearTimeout(timeout$1);
|
|
2829
2871
|
}
|
|
2830
|
-
timeout$1 = setTimeout(function () {
|
|
2872
|
+
timeout$1 = setTimeout(function () {
|
|
2873
|
+
trigger$2();
|
|
2874
|
+
}, 33 /* Setting.LookAhead */);
|
|
2831
2875
|
return node;
|
|
2832
2876
|
}
|
|
2833
2877
|
function trigger$2() {
|
|
@@ -2847,7 +2891,8 @@ function trigger$2() {
|
|
|
2847
2891
|
}
|
|
2848
2892
|
function generate(target, type) {
|
|
2849
2893
|
generate.dn = 23 /* FunctionNames.MutationGenerate */;
|
|
2850
|
-
measure(handle$1)([
|
|
2894
|
+
measure(handle$1)([
|
|
2895
|
+
{
|
|
2851
2896
|
addedNodes: [target],
|
|
2852
2897
|
attributeName: null,
|
|
2853
2898
|
attributeNamespace: null,
|
|
@@ -2856,8 +2901,9 @@ function generate(target, type) {
|
|
|
2856
2901
|
previousSibling: null,
|
|
2857
2902
|
removedNodes: [],
|
|
2858
2903
|
target: target,
|
|
2859
|
-
type: type
|
|
2860
|
-
}
|
|
2904
|
+
type: type,
|
|
2905
|
+
},
|
|
2906
|
+
]);
|
|
2861
2907
|
}
|
|
2862
2908
|
|
|
2863
2909
|
var digitsRegex = /[^0-9\.]/g;
|
|
@@ -3183,10 +3229,10 @@ var sheetAdoptionState = [];
|
|
|
3183
3229
|
var replace = null;
|
|
3184
3230
|
var replaceSync = null;
|
|
3185
3231
|
var styleSheetId = 'claritySheetId';
|
|
3186
|
-
var styleSheetPageNum = 'claritySheetNum';
|
|
3187
3232
|
var styleSheetMap = {};
|
|
3188
3233
|
var styleTimeMap = {};
|
|
3189
3234
|
var documentNodes = [];
|
|
3235
|
+
var createdSheetIds = [];
|
|
3190
3236
|
function start$j() {
|
|
3191
3237
|
if (window['CSSStyleSheet'] && CSSStyleSheet.prototype) {
|
|
3192
3238
|
if (replace === null) {
|
|
@@ -3197,7 +3243,7 @@ function start$j() {
|
|
|
3197
3243
|
// if we haven't seen this stylesheet on this page yet, wait until the checkDocumentStyles has found it
|
|
3198
3244
|
// and attached the sheet to a document. This way the timestamp of the style sheet creation will align
|
|
3199
3245
|
// to when it is used in the document rather than potentially being misaligned during the traverse process.
|
|
3200
|
-
if (this[
|
|
3246
|
+
if (createdSheetIds.indexOf(this[styleSheetId]) > -1) {
|
|
3201
3247
|
trackStyleChange(time(), this[styleSheetId], 1 /* StyleSheetOperation.Replace */, arguments[0]);
|
|
3202
3248
|
}
|
|
3203
3249
|
}
|
|
@@ -3212,7 +3258,7 @@ function start$j() {
|
|
|
3212
3258
|
// if we haven't seen this stylesheet on this page yet, wait until the checkDocumentStyles has found it
|
|
3213
3259
|
// and attached the sheet to a document. This way the timestamp of the style sheet creation will align
|
|
3214
3260
|
// to when it is used in the document rather than potentially being misaligned during the traverse process.
|
|
3215
|
-
if (this[
|
|
3261
|
+
if (createdSheetIds.indexOf(this[styleSheetId]) > -1) {
|
|
3216
3262
|
trackStyleChange(time(), this[styleSheetId], 2 /* StyleSheetOperation.ReplaceSync */, arguments[0]);
|
|
3217
3263
|
}
|
|
3218
3264
|
}
|
|
@@ -3234,14 +3280,13 @@ function checkDocumentStyles(documentNode, timestamp) {
|
|
|
3234
3280
|
var currentStyleSheets = [];
|
|
3235
3281
|
for (var _i = 0, _a = documentNode.adoptedStyleSheets; _i < _a.length; _i++) {
|
|
3236
3282
|
var styleSheet = _a[_i];
|
|
3237
|
-
var pageNum = data$2.pageNum;
|
|
3238
3283
|
// If we haven't seen this style sheet on this page yet, we create a reference to it for the visualizer.
|
|
3239
3284
|
// For SPA or times in which Clarity restarts on a given page, our visualizer would lose context
|
|
3240
3285
|
// on the previously created style sheet for page N-1.
|
|
3241
3286
|
// Then we synthetically call replaceSync with its contents to bootstrap it
|
|
3242
|
-
if (styleSheet[
|
|
3243
|
-
styleSheet[styleSheetPageNum] = pageNum;
|
|
3287
|
+
if (!styleSheet[styleSheetId] || createdSheetIds.indexOf(styleSheet[styleSheetId]) === -1) {
|
|
3244
3288
|
styleSheet[styleSheetId] = shortid();
|
|
3289
|
+
createdSheetIds.push(styleSheet[styleSheetId]);
|
|
3245
3290
|
trackStyleChange(timestamp, styleSheet[styleSheetId], 0 /* StyleSheetOperation.Create */);
|
|
3246
3291
|
trackStyleChange(timestamp, styleSheet[styleSheetId], 2 /* StyleSheetOperation.ReplaceSync */, getCssRules(styleSheet));
|
|
3247
3292
|
}
|
|
@@ -3274,6 +3319,7 @@ function stop$h() {
|
|
|
3274
3319
|
styleSheetMap = {};
|
|
3275
3320
|
styleTimeMap = {};
|
|
3276
3321
|
documentNodes = [];
|
|
3322
|
+
createdSheetIds = [];
|
|
3277
3323
|
reset$8();
|
|
3278
3324
|
}
|
|
3279
3325
|
function trackStyleChange(time, id, operation, cssRules) {
|
|
@@ -3823,6 +3869,7 @@ function encode$3 (type, ts) {
|
|
|
3823
3869
|
tokens.push(url$1(entry.data.link));
|
|
3824
3870
|
tokens.push(cHash);
|
|
3825
3871
|
tokens.push(entry.data.trust);
|
|
3872
|
+
tokens.push(entry.data.isFullText);
|
|
3826
3873
|
queue(tokens);
|
|
3827
3874
|
track$2(entry.time, entry.event, cHash, entry.data.x, entry.data.y, entry.data.reaction, entry.data.context);
|
|
3828
3875
|
}
|
|
@@ -3852,6 +3899,7 @@ function encode$3 (type, ts) {
|
|
|
3852
3899
|
case 26 /* Event.Unload */:
|
|
3853
3900
|
u = data$9;
|
|
3854
3901
|
tokens.push(u.name);
|
|
3902
|
+
tokens.push(u.persisted);
|
|
3855
3903
|
reset$a();
|
|
3856
3904
|
queue(tokens);
|
|
3857
3905
|
break;
|
|
@@ -3982,7 +4030,7 @@ function track$2(time, event, hash, x, y, reaction, context) {
|
|
|
3982
4030
|
// Since timeline only keeps the data for configured time, we still want to continue tracking these values
|
|
3983
4031
|
// as part of the baseline. For instance, in a scenario where last scroll happened 5s ago.
|
|
3984
4032
|
// We would still need to capture the last scroll position as part of the baseline event, even when timeline will be empty.
|
|
3985
|
-
track$8(event, x, y);
|
|
4033
|
+
track$8(event, x, y, time);
|
|
3986
4034
|
}
|
|
3987
4035
|
function compute$5() {
|
|
3988
4036
|
var temp = [];
|
|
@@ -4594,6 +4642,12 @@ function encode$1 (event) {
|
|
|
4594
4642
|
tokens.push(b.data.downX);
|
|
4595
4643
|
tokens.push(b.data.downY);
|
|
4596
4644
|
tokens.push(b.data.downTime);
|
|
4645
|
+
tokens.push(b.data.upX);
|
|
4646
|
+
tokens.push(b.data.upY);
|
|
4647
|
+
tokens.push(b.data.upTime);
|
|
4648
|
+
tokens.push(b.data.pointerPrevX);
|
|
4649
|
+
tokens.push(b.data.pointerPrevY);
|
|
4650
|
+
tokens.push(b.data.pointerPrevTime);
|
|
4597
4651
|
queue(tokens, false);
|
|
4598
4652
|
}
|
|
4599
4653
|
reset$s();
|
|
@@ -4925,7 +4979,7 @@ function callback() {
|
|
|
4925
4979
|
processCallback(upgrade);
|
|
4926
4980
|
}
|
|
4927
4981
|
function save() {
|
|
4928
|
-
if (!data$2)
|
|
4982
|
+
if (!data$2 || !config$2.track)
|
|
4929
4983
|
return;
|
|
4930
4984
|
var ts = Math.round(Date.now());
|
|
4931
4985
|
var upload = config$2.upload && typeof config$2.upload === "string" /* Constant.String */ ? config$2.upload.replace("https://" /* Constant.HTTPS */, "" /* Constant.Empty */) : "" /* Constant.Empty */;
|
|
@@ -5222,16 +5276,19 @@ function measure (method) {
|
|
|
5222
5276
|
}
|
|
5223
5277
|
|
|
5224
5278
|
var bindings = [];
|
|
5225
|
-
function bind(target, event, listener, capture) {
|
|
5279
|
+
function bind(target, event, listener, capture, passive) {
|
|
5226
5280
|
if (capture === void 0) { capture = false; }
|
|
5281
|
+
if (passive === void 0) { passive = true; }
|
|
5227
5282
|
listener = measure(listener);
|
|
5228
5283
|
// Wrapping following lines inside try / catch to cover edge cases where we might try to access an inaccessible element.
|
|
5229
5284
|
// E.g. Iframe may start off as same-origin but later turn into cross-origin, and the following lines will throw an exception.
|
|
5230
5285
|
try {
|
|
5231
|
-
target[api("addEventListener" /* Constant.AddEventListener */)](event, listener, capture);
|
|
5232
|
-
bindings.push({ event: event, target: target, listener: listener, capture: capture });
|
|
5286
|
+
target[api("addEventListener" /* Constant.AddEventListener */)](event, listener, { capture: capture, passive: passive });
|
|
5287
|
+
bindings.push({ event: event, target: target, listener: listener, options: { capture: capture, passive: passive } });
|
|
5288
|
+
}
|
|
5289
|
+
catch (_a) {
|
|
5290
|
+
/* do nothing */
|
|
5233
5291
|
}
|
|
5234
|
-
catch ( /* do nothing */_a) { /* do nothing */ }
|
|
5235
5292
|
}
|
|
5236
5293
|
function reset$1() {
|
|
5237
5294
|
// Walk through existing list of bindings and remove them all
|
|
@@ -5239,9 +5296,11 @@ function reset$1() {
|
|
|
5239
5296
|
var binding = bindings_1[_i];
|
|
5240
5297
|
// Wrapping inside try / catch to avoid situations where the element may be destroyed before we get a chance to unbind
|
|
5241
5298
|
try {
|
|
5242
|
-
binding.target[api("removeEventListener" /* Constant.RemoveEventListener */)](binding.event, binding.listener, binding.capture);
|
|
5299
|
+
binding.target[api("removeEventListener" /* Constant.RemoveEventListener */)](binding.event, binding.listener, { capture: binding.options.capture, passive: binding.options.passive });
|
|
5300
|
+
}
|
|
5301
|
+
catch (_a) {
|
|
5302
|
+
/* do nothing */
|
|
5243
5303
|
}
|
|
5244
|
-
catch ( /* do nothing */_a) { /* do nothing */ }
|
|
5245
5304
|
}
|
|
5246
5305
|
bindings = [];
|
|
5247
5306
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";var t=Object.freeze({__proto__:null,get queue(){return yt},get start(){return mt},get stop(){return bt},get track(){return dt}}),n=Object.freeze({__proto__:null,get check(){return Mt},get compute(){return Tt},get data(){return pt},get start(){return It},get stop(){return xt},get trigger(){return Ot}}),e=Object.freeze({__proto__:null,get compute(){return Pt},get data(){return jt},get log(){return Nt},get reset(){return Dt},get start(){return At},get stop(){return qt},get updates(){return zt}}),r=Object.freeze({__proto__:null,get callback(){return Gt},get callbacks(){return Ht},get clear(){return Zt},get consent(){return Yt},get data(){return Ut},get electron(){return Lt},get id(){return Jt},get metadata(){return Wt},get save(){return Ft},get shortid(){return $t},get start(){return Xt},get stop(){return Bt}}),o=Object.freeze({__proto__:null,get data(){return cn},get envelope(){return ln},get start(){return un},get stop(){return sn}}),a={projectId:null,delay:1e3,lean:!1,track:!0,content:!0,drop:[],mask:[],unmask:[],regions:[],cookies:[],fraud:!0,checksum:[],report:null,upload:null,fallback:null,upgrade:null,action:null,dob:null,delayDom:!1,throttleDom:!0,conversions:!1,includeSubdomains:!0,throttleMutations:!1,dropMutations:!1,criticalMs:200,discard:[]};function i(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var c=0;function u(t){void 0===t&&(t=null);var n=t&&t.timeStamp>0?t.timeStamp:performance.now(),e=t&&t.view?t.view.performance.timeOrigin:performance.timeOrigin;return Math.max(Math.round(n+e-c),0)}var s="0.7.67";var l=255,d=!0,p=null,f=null;function h(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var r=t;if(n)r="".concat("https://").concat("Electron");else{var o=a.drop;if(o&&o.length>0&&t&&t.indexOf("?")>0){var i=t.split("?"),c=i[0],u=i[1];r=c+"?"+u.split("&").map((function(t){return o.some((function(n){return 0===t.indexOf("".concat(n,"="))}))?"".concat(t.split("=")[0],"=").concat("*na*"):t})).join("&")}}return e&&(r=r.substring(0,l)),r}function v(t,n,e){return function(){if(d&&null===p)try{p=new RegExp("\\p{N}","gu"),f=new RegExp("\\p{L}","gu"),new RegExp("\\p{Sc}","gu")}catch(t){d=!1}}(),t?t.replace(f,n).replace(p,e):t}var g=[],m=null;function y(){}var b=[];function w(){}function k(){}var S=Object.freeze({__proto__:null,checkDocumentStyles:function(t){},compute:function(){},data:m,hashText:w,keys:b,log:y,observe:function(){},reset:function(){},sheetAdoptionState:[],sheetUpdateState:[],start:function(){},state:g,stop:function(){},trigger:k}),_=null;function E(t,n){Nn()&&t&&"string"==typeof t&&t.length<255&&(_=n&&"string"==typeof n&&n.length<255?{key:t,value:n}:{value:t},Et(24))}var I,M=null,O=null;function T(t){t in M||(M[t]=0),t in O||(O[t]=0),M[t]++,O[t]++}function x(t,n){null!==n&&(t in M||(M[t]=0),t in O||(O[t]=0),M[t]+=n,O[t]+=n)}function j(t,n){null!==n&&!1===isNaN(n)&&(t in M||(M[t]=0),(n>M[t]||0===M[t])&&(O[t]=n,M[t]=n))}function z(t,n,e){return window.setTimeout(fn(t),n,e)}function C(t){return window.clearTimeout(t)}var A=0,q=0,N=null;function P(){N&&C(N),N=z(D,q),A=u()}function D(){var t=u();I={gap:t-A},Et(25),I.gap<3e5?N=z(D,q):Cn&&(E("clarity","suspend"),oe(),["mousemove","touchstart"].forEach((function(t){return vn(document,t,Pn)})),["resize","scroll","pageshow"].forEach((function(t){return vn(window,t,Pn)})))}var R=Object.freeze({__proto__:null,get data(){return I},reset:P,start:function(){q=6e4,A=0},stop:function(){C(N),A=0,q=0}}),U=null;function H(t){Nn()&&a.lean&&(a.lean=!1,U={key:t},Gt(),Ft(),a.upgrade&&a.upgrade(t),Et(3))}var L=Object.freeze({__proto__:null,get data(){return U},start:function(){!a.lean&&a.upgrade&&a.upgrade("Config"),U=null},stop:function(){U=null},upgrade:H});function V(t,n,e,r){return new(e||(e=Promise))((function(o,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(i,c)}u((r=r.apply(t,n||[])).next())}))}function X(t,n){var e,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(u){return function(c){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=n.call(t,i)}catch(t){c=[6,t],r=0}finally{e=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}var B=null;function W(t,n){Y(t,"string"==typeof n?[n]:n)}function J(t,n,e,r){return void 0===n&&(n=null),void 0===e&&(e=null),void 0===r&&(r=null),V(this,void 0,void 0,(function(){var o,a;return X(this,(function(i){switch(i.label){case 0:return a={},[4,F(t)];case 1:return a.userId=i.sent(),a.userHint=r||((c=t)&&c.length>=5?"".concat(c.substring(0,2)).concat(v(c.substring(2),"*","*")):v(c,"*","*")),Y("userId",[(o=a).userId]),Y("userHint",[o.userHint]),Y("userType",[K(t)]),n&&(Y("sessionId",[n]),o.sessionId=n),e&&(Y("pageId",[e]),o.pageId=e),[2,o]}var c}))}))}function Y(t,n){if(Nn()&&t&&n&&"string"==typeof t&&t.length<255){for(var e=(t in B?B[t]:[]),r=0;r<n.length;r++)"string"==typeof n[r]&&n[r].length<255&&e.push(n[r]);B[t]=e}}function Z(){Et(34)}function G(){B={}}function F(t){return V(this,void 0,void 0,(function(){var n;return X(this,(function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),crypto&&t?[4,crypto.subtle.digest("SHA-256",(new TextEncoder).encode(t))]:[3,2];case 1:return n=e.sent(),[2,Array.prototype.map.call(new Uint8Array(n),(function(t){return("00"+t.toString(16)).slice(-2)})).join("")];case 2:return[2,""];case 3:return[3,5];case 4:return e.sent(),[2,""];case 5:return[2]}}))}))}function K(t){return t&&t.indexOf("@")>0?"email":"string"}var Q="CompressionStream"in window;function $(t){return V(this,void 0,void 0,(function(){var n,e;return X(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),Q?(n=new ReadableStream({start:function(n){return V(this,void 0,void 0,(function(){return X(this,(function(e){return n.enqueue(t),n.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),e=Uint8Array.bind,[4,tt(n)]):[3,2];case 1:return[2,new(e.apply(Uint8Array,[void 0,r.sent()]))];case 2:return[3,4];case 3:return r.sent(),[3,4];case 4:return[2,null]}}))}))}function tt(t){return V(this,void 0,void 0,(function(){var n,e,r,o,a;return X(this,(function(i){switch(i.label){case 0:n=t.getReader(),e=[],r=!1,o=[],i.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return a=i.sent(),r=a.done,o=a.value,r?[2,e]:(e.push.apply(e,o),[3,1]);case 3:return[2,e]}}))}))}var nt=null;function et(t){try{if(!nt)return;var n=function(t){try{return JSON.parse(t)}catch(t){return[]}}(t);n.forEach((function(t){nt(t)}))}catch(t){}}var rt=[S,e,Object.freeze({__proto__:null,compute:Z,get data(){return B},identify:J,reset:G,set:W,start:function(){G()},stop:function(){G()}}),n,S,r,o,t,R,L,S];function ot(){M={},O={},T(5),rt.forEach((function(t){return fn(t.start)()}))}function at(){rt.slice().reverse().forEach((function(t){return fn(t.stop)()})),M={},O={}}function it(){Z(),Pt(),Et(0),Tt()}var ct,ut,st,lt,dt,pt,ft=0,ht=0,vt=null,gt=0;function mt(){lt=!0,ft=0,ht=0,gt=0,ct=[],ut=[],st={},dt=null}function yt(t,n){if(void 0===n&&(n=!0),lt){var e=u(),r=t.length>1?t[1]:null,o=JSON.stringify(t);switch(r){case 5:ft+=o.length;case 37:case 6:case 43:case 45:case 46:ht+=o.length,ct.push(o);break;default:ut.push(o)}T(25);var i=function(){var t=!1===a.lean&&ft>0?100:cn.sequence*a.delay;return"string"==typeof a.upload?Math.max(Math.min(t,3e4),100):a.delay}();e-gt>2*i&&(C(vt),vt=null),n&&null===vt&&(25!==r&&P(),vt=z(wt,i),gt=e,Mt(ht))}}function bt(){C(vt),wt(!0),ft=0,ht=0,gt=0,ct=[],ut=[],st={},dt=null,lt=!1}function wt(t){return void 0===t&&(t=!1),V(this,void 0,void 0,(function(){var n,e,r,o,i,c,u,s;return X(this,(function(l){switch(l.label){case 0:return vt=null,(n=!1===a.lean&&ht>0&&(ht<1048576||cn.sequence>0))&&j(1,1),it(),e=!0===t,r=JSON.stringify(ln(e)),o="[".concat(ut.join(),"]"),i=n?"[".concat(ct.join(),"]"):"",c=function(t){return t.p.length>0?'{"e":'.concat(t.e,',"a":').concat(t.a,',"p":').concat(t.p,"}"):'{"e":'.concat(t.e,',"a":').concat(t.a,"}")}({e:r,a:o,p:i}),e?(s=null,[3,3]):[3,1];case 1:return[4,$(c)];case 2:s=l.sent(),l.label=3;case 3:return x(2,(u=s)?u.length:c.length),kt(c,u,cn.sequence,e),ut=[],n&&(ct=[],ht=0,ft=0),[2]}}))}))}function kt(t,n,e,r){if(void 0===r&&(r=!1),"string"==typeof a.upload){var o=a.upload,i=!1;if(r&&"sendBeacon"in navigator)try{(i=navigator.sendBeacon.bind(navigator)(o,t))&&_t(e)}catch(t){}if(!1===i){e in st?st[e].attempts++:st[e]={data:t,attempts:1};var c=new XMLHttpRequest;c.open("POST",o,!0),c.timeout=15e3,c.ontimeout=function(){pn(new Error("".concat("Timeout"," : ").concat(o)))},null!==e&&(c.onreadystatechange=function(){fn(St)(c,e)}),c.withCredentials=!0,n?(c.setRequestHeader("Accept","application/x-clarity-gzip"),c.send(n)):c.send(t)}}else if(a.upload){(0,a.upload)(t),_t(e)}}function St(t,n){var e=st[n];t&&4===t.readyState&&e&&((t.status<200||t.status>208)&&e.attempts<=1?t.status>=400&&t.status<500?Ot(6):(0===t.status&&(a.upload=a.fallback?a.fallback:a.upload),kt(e.data,null,n)):(dt={sequence:n,attempts:e.attempts,status:t.status},e.attempts>1&&Et(2),200===t.status&&t.responseText&&function(t){for(var n=t&&t.length>0?t.split("\n"):[],e=0,r=n;e<r.length;e++){var o=r[e],i=o&&o.length>0?o.split(/ (.*)/):[""];switch(i[0]){case"END":Ot(6);break;case"UPGRADE":H("Auto");break;case"ACTION":a.action&&i.length>1&&a.action(i[1]);break;case"EXTRACT":i.length>1&&i[1];break;case"SIGNAL":i.length>1&&et(i[1])}}}(t.responseText),0===t.status&&(kt(e.data,null,n,!0),Ot(3)),t.status>=200&&t.status<=208&&_t(n),delete st[n]))}function _t(t){1===t&&(Ft(),Gt())}function Et(t){var n=[u(),t];switch(t){case 4:var e=g;e&&((n=[e.time,e.event]).push(e.data.visible),n.push(e.data.docWidth),n.push(e.data.docHeight),n.push(e.data.screenWidth),n.push(e.data.screenHeight),n.push(e.data.scrollX),n.push(e.data.scrollY),n.push(e.data.pointerX),n.push(e.data.pointerY),n.push(e.data.activityTime),n.push(e.data.scrollTime),n.push(e.data.pointerTime),n.push(e.data.moveX),n.push(e.data.moveY),n.push(e.data.moveTime),n.push(e.data.downX),n.push(e.data.downY),n.push(e.data.downTime),yt(n,!1));break;case 25:n.push(I.gap),yt(n);break;case 35:n.push(pt.check),yt(n,!1);break;case 3:n.push(U.key),yt(n);break;case 2:n.push(dt.sequence),n.push(dt.attempts),n.push(dt.status),yt(n,!1);break;case 24:_.key&&n.push(_.key),n.push(_.value),yt(n);break;case 34:var r=Object.keys(B);if(r.length>0){for(var o=0,a=r;o<a.length;o++){var i=a[o];n.push(i),n.push(B[i])}G(),yt(n,!1)}break;case 0:var c=Object.keys(O);if(c.length>0){for(var s=0,l=c;s<l.length;s++){var d=l[s],p=parseInt(d,10);n.push(p),n.push(Math.round(O[d]))}O={},yt(n,!1)}break;case 1:var f=Object.keys(zt);if(f.length>0){for(var h=0,v=f;h<v.length;h++){var y=v[h];p=parseInt(y,10);n.push(p),n.push(zt[y])}Dt(),yt(n,!1)}break;case 36:var w=Object.keys(m);if(w.length>0){for(var k=0,S=w;k<S.length;k++){var E=S[k];p=parseInt(E,10);n.push(p),n.push([].concat.apply([],m[E]))}yt(n,!1)}break;case 40:b.forEach((function(t){n.push(t);var e=[];for(var r in m[t]){var o=parseInt(r,10);e.push(o),e.push(m[t][r])}n.push(e)})),yt(n,!1)}}function It(){pt={check:0}}function Mt(t){if(0===pt.check){var n=pt.check;n=cn.sequence>=128?1:n,n=cn.pageNum>=128?7:n,n=u()>72e5?2:n,(n=t>10485760?2:n)!==pt.check&&Ot(n)}}function Ot(t){pt.check=t,5!==t&&(Zt(),oe())}function Tt(){0!==pt.check&&Et(35)}function xt(){pt=null}var jt=null,zt=null,Ct=!1;function At(){jt={},zt={},Ct=!1}function qt(){jt={},zt={},Ct=!1}function Nt(t,n){if(n&&(n="".concat(n),t in jt||(jt[t]=[]),jt[t].indexOf(n)<0)){if(jt[t].length>128)return void(Ct||(Ct=!0,Ot(5)));jt[t].push(n),t in zt||(zt[t]=[]),zt[t].push(n)}}function Pt(){Et(1)}function Dt(){zt={},Ct=!1}function Rt(t){Nt(36,t.toString())}var Ut=null,Ht=[],Lt=0,Vt=null;function Xt(){var t,n,e;Vt=null;var r=navigator&&"userAgent"in navigator?navigator.userAgent:"",o=null!==(e=null===(n=null===(t=null===Intl||void 0===Intl?void 0:Intl.DateTimeFormat())||void 0===t?void 0:t.resolvedOptions())||void 0===n?void 0:n.timeZone)&&void 0!==e?e:"",i=(new Date).getTimezoneOffset().toString(),c=window.location.ancestorOrigins?Array.from(window.location.ancestorOrigins).toString():"",u=document&&document.title?document.title:"";Lt=r.indexOf("Electron")>0?1:0;var s,l=function(){var t={session:$t(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},n=en("_clsk",!a.includeSubdomains);if(n){var e=n.split("|");e.length>=5&&t.ts-tn(e[1])<18e5&&(t.session=e[0],t.count=tn(e[2])+1,t.upgrade=tn(e[3]),t.upload=e.length>=6?"".concat("https://").concat(e[5],"/").concat(e[4]):"".concat("https://").concat(e[4]))}return t}(),d=nn(),p=a.projectId||function(t,n){void 0===n&&(n=null);for(var e,r=5381,o=r,a=0;a<t.length;a+=2)r=(r<<5)+r^t.charCodeAt(a),a+1<t.length&&(o=(o<<5)+o^t.charCodeAt(a+1));return e=Math.abs(r+11579*o),(n?e%Math.pow(2,n):e).toString(36)}(location.host);Ut={projectId:p,userId:d.id,sessionId:l.session,pageNum:l.count},a.lean=a.track&&null!==l.upgrade?0===l.upgrade:a.lean,a.upload=a.track&&"string"==typeof a.upload&&l.upload&&l.upload.length>"https://".length?l.upload:a.upload,Nt(0,r),Nt(3,u),Nt(1,h(location.href,!!Lt)),Nt(2,document.referrer),Nt(15,function(){var t=$t();if(a.track&&Kt(window,"sessionStorage")){var n=sessionStorage.getItem("_cltk");t=n||t,sessionStorage.setItem("_cltk",t)}return t}()),Nt(16,document.documentElement.lang),Nt(17,document.dir),Nt(26,"".concat(window.devicePixelRatio)),Nt(28,d.dob.toString()),Nt(29,d.version.toString()),Nt(33,c),Nt(34,o),Nt(35,i),j(0,l.ts),j(1,0),j(35,Lt),navigator&&(Nt(9,navigator.language),j(33,navigator.hardwareConcurrency),j(32,navigator.maxTouchPoints),j(34,Math.round(navigator.deviceMemory)),(s=navigator.userAgentData)&&s.getHighEntropyValues?s.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var n;Nt(22,t.platform),Nt(23,t.platformVersion),null===(n=t.brands)||void 0===n||n.forEach((function(t){Nt(24,t.name+"~"+t.version)})),Nt(25,t.model),j(27,t.mobile?1:0)})):Nt(22,navigator.platform)),screen&&(j(14,Math.round(screen.width)),j(15,Math.round(screen.height)),j(16,Math.round(screen.colorDepth)));for(var f=0,v=a.cookies;f<v.length;f++){var g=v[f],m=en(g);m&&W(g,m)}!function(t){Rt(t?1:0)}(a.track),Qt(d)}function Bt(){Vt=null,Ut=null,Ht.forEach((function(t){t.called=!1}))}function Wt(t,n,e){void 0===n&&(n=!0),void 0===e&&(e=!1);var r=a.lean?0:1,o=!1;Ut&&(r||!1===n)&&(t(Ut,!a.lean),o=!0),!e&&o||Ht.push({callback:t,wait:n,recall:e,called:o})}function Jt(){return Ut?[Ut.userId,Ut.sessionId,Ut.pageNum].join("."):""}function Yt(t){if(void 0===t&&(t=!0),!t)return a.track=!1,on("_clsk","",-Number.MAX_VALUE),on("_clck","",-Number.MAX_VALUE),oe(),void window.setTimeout(re,250);Nn()&&(a.track=!0,Qt(nn(),1),Ft(),Rt(2))}function Zt(){on("_clsk","",0)}function Gt(){!function(t){if(Ht.length>0)for(var n=0;n<Ht.length;n++){var e=Ht[n];!e.callback||e.called||e.wait&&!t||(e.callback(Ut,!a.lean),e.called=!0,e.recall||(Ht.splice(n,1),n--))}}(a.lean?0:1)}function Ft(){if(Ut){var t=Math.round(Date.now()),n=a.upload&&"string"==typeof a.upload?a.upload.replace("https://",""):"",e=a.lean?0:1;on("_clsk",[Ut.sessionId,t,Ut.pageNum,e,n].join("|"),1)}}function Kt(t,n){try{return!!t[n]}catch(t){return!1}}function Qt(t,n){void 0===n&&(n=null),n=null===n?t.consent:n;var e=Math.ceil((Date.now()+31536e6)/864e5),r=0===t.dob?null===a.dob?0:a.dob:t.dob;(null===t.expiry||Math.abs(e-t.expiry)>=1||t.consent!==n||t.dob!==r)&&on("_clck",[Ut.userId,2,e.toString(36),n,r].join("|"),365)}function $t(){var t=Math.floor(Math.random()*Math.pow(2,32));return window&&window.crypto&&window.crypto.getRandomValues&&Uint32Array&&(t=window.crypto.getRandomValues(new Uint32Array(1))[0]),t.toString(36)}function tn(t,n){return void 0===n&&(n=10),parseInt(t,n)}function nn(){var t={id:$t(),version:0,expiry:null,consent:0,dob:0},n=en("_clck",!a.includeSubdomains);if(n&&n.length>0){for(var e=n.split("|"),r=0,o=0,i=document.cookie.split(";");o<i.length;o++){r+="_clck"===i[o].split("=")[0].trim()?1:0}if(1===e.length||r>1){var c="".concat(";").concat("expires=").concat(new Date(0).toUTCString()).concat(";path=/");document.cookie="".concat("_clck","=").concat(c),document.cookie="".concat("_clsk","=").concat(c)}e.length>1&&(t.version=tn(e[1])),e.length>2&&(t.expiry=tn(e[2],36)),e.length>3&&1===tn(e[3])&&(t.consent=1),e.length>4&&tn(e[1])>1&&(t.dob=tn(e[4])),a.track=a.track||1===t.consent,t.id=a.track?e[0]:t.id}return t}function en(t,n){var e;if(void 0===n&&(n=!1),Kt(document,"cookie")){var r=document.cookie.split(";");if(r)for(var o=0;o<r.length;o++){var a=r[o].split("=");if(a.length>1&&a[0]&&a[0].trim()===t){for(var i=rn(a[1]),c=i[0],u=i[1];c;)c=(e=rn(u))[0],u=e[1];return n?u.endsWith("".concat("~","1"))?u.substring(0,u.length-2):null:u}}}return null}function rn(t){try{var n=decodeURIComponent(t);return[n!=t,n]}catch(t){}return[!1,t]}function on(t,n,e){if((a.track||""==n)&&(navigator&&navigator.cookieEnabled||Kt(document,"cookie"))){var r=function(t){return encodeURIComponent(t)}(n),o=new Date;o.setDate(o.getDate()+e);var i=o?"expires="+o.toUTCString():"",c="".concat(t,"=").concat(r).concat(";").concat(i).concat(";path=/");try{if(null===Vt){for(var u=location.hostname?location.hostname.split("."):[],s=u.length-1;s>=0;s--)if(Vt=".".concat(u[s]).concat(Vt||""),s<u.length-1&&(document.cookie="".concat(c).concat(";").concat("domain=").concat(Vt),en(t)===n))return;Vt=""}}catch(t){Vt=""}document.cookie=Vt?"".concat(c).concat(";").concat("domain=").concat(Vt):c}}var an,cn=null;function un(){var t=Ut;cn={version:s,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0,applicationPlatform:0,url:""}}function sn(){cn=null}function ln(t){return cn.start=cn.start+cn.duration,cn.duration=u()-cn.start,cn.sequence++,cn.upload=t&&"sendBeacon"in navigator?1:0,cn.end=t?1:0,cn.applicationPlatform=0,cn.url=h(location.href,!1,!0),[cn.version,cn.sequence,cn.start,cn.duration,cn.projectId,cn.userId,cn.sessionId,cn.pageNum,cn.upload,cn.end,cn.applicationPlatform,cn.url]}function dn(){an=[]}function pn(t){if(an&&-1===an.indexOf(t.message)){var n=a.report;if(n&&n.length>0){var e={v:cn.version,p:cn.projectId,u:cn.userId,s:cn.sessionId,n:cn.pageNum};t.message&&(e.m=t.message),t.stack&&(e.e=t.stack);var r=new XMLHttpRequest;r.open("POST",n,!0),r.send(JSON.stringify(e)),an.push(t.message)}}return t}function fn(t){return function(){var n=performance.now();try{t.apply(this,arguments)}catch(t){throw pn(t)}var e=performance.now()-n;x(4,e),e>30&&(T(7),j(6,e),"".concat(t.dn||t.name,"-").concat(e))}}var hn=[];function vn(t,n,e,r){void 0===r&&(r=!1),e=fn(e);try{t[i("addEventListener")](n,e,r),hn.push({event:n,target:t,listener:e,capture:r})}catch(t){}}function gn(){for(var t=0,n=hn;t<n.length;t++){var e=n[t];try{e.target[i("removeEventListener")](e.event,e.listener,e.capture)}catch(t){}}hn=[]}var mn=null,yn=null,bn=null,wn=0;function kn(){return!(wn++>20)}function Sn(){Sn.dn=1,wn=0,bn!==En()&&(oe(),window.setTimeout(_n,250))}function _n(){re(),j(29,1)}function En(){return location.href?location.href.replace(location.hash,""):location.href}var In=[],Mn=null,On=null,Tn=null;function xn(){On&&(Tn(),On=null,null===Mn&&zn())}function jn(){In=[],Mn=null,On=null}function zn(){var t=In.shift();t&&(Mn=t,t.task().then((function(){t.id===Jt()&&(t.resolve(),Mn=null,zn())})).catch((function(n){t.id===Jt()&&(n&&(n.name,n.message,n.stack),Mn=null,zn())})))}var Cn=!1;function An(){Cn=!0,c=performance.now()+performance.timeOrigin,jn(),gn(),dn(),bn=En(),wn=0,vn(window,"popstate",Sn),null===mn&&(mn=history.pushState,history.pushState=function(){mn.apply(this,arguments),Nn()&&kn()&&Sn()}),null===yn&&(yn=history.replaceState,history.replaceState=function(){yn.apply(this,arguments),Nn()&&kn()&&Sn()})}function qn(){bn=null,wn=0,dn(),gn(),jn(),c=0,Cn=!1}function Nn(){return Cn}function Pn(){Pn.dn=2,re(),E("clarity","restart")}var Dn=null;function Rn(){Dn=null}function Un(t){Dn={fetchStart:Math.round(t.fetchStart),connectStart:Math.round(t.connectStart),connectEnd:Math.round(t.connectEnd),requestStart:Math.round(t.requestStart),responseStart:Math.round(t.responseStart),responseEnd:Math.round(t.responseEnd),domInteractive:Math.round(t.domInteractive),domComplete:Math.round(t.domComplete),loadEventStart:Math.round(t.loadEventStart),loadEventEnd:Math.round(t.loadEventEnd),redirectCount:Math.round(t.redirectCount),size:t.transferSize?t.transferSize:0,type:t.type,protocol:t.nextHopProtocol,encodedSize:t.encodedBodySize?t.encodedBodySize:0,decodedSize:t.decodedBodySize?t.decodedBodySize:0},function(t){V(this,void 0,void 0,(function(){var n,e;return X(this,(function(r){return n=u(),e=[n,t],29===t&&(e.push(Dn.fetchStart),e.push(Dn.connectStart),e.push(Dn.connectEnd),e.push(Dn.requestStart),e.push(Dn.responseStart),e.push(Dn.responseEnd),e.push(Dn.domInteractive),e.push(Dn.domComplete),e.push(Dn.loadEventStart),e.push(Dn.loadEventEnd),e.push(Dn.redirectCount),e.push(Dn.size),e.push(Dn.type),e.push(Dn.protocol),e.push(Dn.encodedSize),e.push(Dn.decodedSize),Rn(),yt(e)),[2]}))}))}(29)}var Hn,Ln=0,Vn=1/0,Xn=0,Bn=0,Wn=[],Jn=new Map,Yn=function(){return Ln||0},Zn=function(){if(!Wn.length)return-1;var t=Math.min(Wn.length-1,Math.floor((Yn()-Bn)/50));return Wn[t].latency},Gn=function(){Bn=Yn(),Wn.length=0,Jn.clear()},Fn=function(t){if(t.interactionId&&!(t.duration<40)){!function(t){"interactionCount"in performance?Ln=performance.interactionCount:t.interactionId&&(Vn=Math.min(Vn,t.interactionId),Xn=Math.max(Xn,t.interactionId),Ln=Xn?(Xn-Vn)/7+1:0)}(t);var n=Wn[Wn.length-1],e=Jn.get(t.interactionId);if(e||Wn.length<10||t.duration>(null==n?void 0:n.latency)){if(e)t.duration>e.latency&&(e.latency=t.duration);else{var r={id:t.interactionId,latency:t.duration};Jn.set(r.id,r),Wn.push(r)}Wn.sort((function(t,n){return n.latency-t.latency})),Wn.length>10&&Wn.splice(10).forEach((function(t){return Jn.delete(t.id)}))}}},Kn=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint","event"];function Qn(){Qn.dn=26;try{Hn&&Hn.disconnect(),Hn=new PerformanceObserver(fn($n));for(var t=0,n=Kn;t<n.length;t++){var e=n[t];PerformanceObserver.supportedEntryTypes.indexOf(e)>=0&&("layout-shift"===e&&x(9,0),Hn.observe({type:e,buffered:!0}))}}catch(t){}}function $n(t){$n.dn=27,function(t){for(var n=(!("visibilityState"in document)||"visible"===document.visibilityState),e=0;e<t.length;e++){var r=t[e];switch(r.entryType){case"navigation":Un(r);break;case"resource":var o=r.name;Nt(4,te(o)),o!==a.upload&&o!==a.fallback||j(28,r.duration);break;case"longtask":T(7);break;case"first-input":n&&j(10,r.processingStart-r.startTime);break;case"event":n&&"PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&(Fn(r),Nt(37,Zn().toString()));break;case"layout-shift":n&&!r.hadRecentInput&&x(9,1e3*r.value);break;case"largest-contentful-paint":n&&j(8,r.startTime)}}}(t.getEntries())}function te(t){var n=document.createElement("a");return n.href=t,n.host}var ne=Object.freeze({__proto__:null,start:function t(){t.dn=25,Rn(),function(){navigator&&"connection"in navigator&&Nt(27,navigator.connection.effectiveType),window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&("complete"!==document.readyState?vn(window,"load",z.bind(this,Qn,0)):Qn())}()},stop:function(){Hn&&Hn.disconnect(),Hn=null,Gn(),Rn()}}),ee=[S,S,S,ne];function re(t){void 0===t&&(t=null),function(){try{var t=navigator&&"globalPrivacyControl"in navigator&&1==navigator.globalPrivacyControl;return!1===Cn&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap&&!t}catch(t){return!1}}()&&(!function(t){if(null===t||Cn)return!1;for(var n in t)n in a&&(a[n]=t[n])}(t),An(),ot(),ee.forEach((function(t){return fn(t.start)()})),null===t&&ue())}function oe(){Nn()&&(ee.slice().reverse().forEach((function(t){return fn(t.stop)()})),at(),qn(),void 0!==ie&&(ie[ce]=function(){(ie[ce].q=ie[ce].q||[]).push(arguments),"start"===arguments[0]&&ie[ce].q.unshift(ie[ce].q.pop())&&ue()}))}var ae=Object.freeze({__proto__:null,consent:Yt,event:E,hashText:w,identify:J,metadata:Wt,pause:function(){Nn()&&(E("clarity","pause"),null===On&&(On=new Promise((function(t){Tn=t}))))},resume:function(){Nn()&&(xn(),E("clarity","resume"))},set:W,signal:function(t){nt=t},start:re,stop:oe,upgrade:H,version:s}),ie=window,ce="clarity";function ue(){if(void 0!==ie){if(ie[ce]&&ie[ce].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=ie[ce]&&ie[ce].q||[];for(ie[ce]=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return ae[t].apply(ae,n)},ie[ce].v=s;t.length>0;)ie[ce].apply(ie,t.shift())}}ue()}();
|
|
1
|
+
!function(){"use strict";var t=Object.freeze({__proto__:null,get queue(){return yt},get start(){return mt},get stop(){return bt},get track(){return dt}}),n=Object.freeze({__proto__:null,get check(){return Mt},get compute(){return Tt},get data(){return pt},get start(){return It},get stop(){return xt},get trigger(){return Ot}}),e=Object.freeze({__proto__:null,get compute(){return Nt},get data(){return jt},get log(){return qt},get reset(){return Dt},get start(){return At},get stop(){return Pt},get updates(){return zt}}),r=Object.freeze({__proto__:null,get callback(){return Gt},get callbacks(){return Ht},get clear(){return Zt},get consent(){return Jt},get data(){return Ut},get electron(){return Xt},get id(){return Wt},get metadata(){return Yt},get save(){return Ft},get shortid(){return $t},get start(){return Vt},get stop(){return Bt}}),o=Object.freeze({__proto__:null,get data(){return un},get envelope(){return ln},get start(){return cn},get stop(){return sn}}),a={projectId:null,delay:1e3,lean:!1,track:!0,content:!0,drop:[],mask:[],unmask:[],regions:[],cookies:[],fraud:!0,checksum:[],report:null,upload:null,fallback:null,upgrade:null,action:null,dob:null,delayDom:!1,throttleDom:!0,conversions:!1,includeSubdomains:!0,throttleMutations:!1,dropMutations:!1,criticalMs:200,discard:[]};function i(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var u=0;function c(t){void 0===t&&(t=null);var n=t&&t.timeStamp>0?t.timeStamp:performance.now(),e=t&&t.view?t.view.performance.timeOrigin:performance.timeOrigin;return Math.max(Math.round(n+e-u),0)}var s="0.7.69";var l=255,d=!0,p=null,f=null;function h(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var r=t;if(n)r="".concat("https://").concat("Electron");else{var o=a.drop;if(o&&o.length>0&&t&&t.indexOf("?")>0){var i=t.split("?"),u=i[0],c=i[1];r=u+"?"+c.split("&").map((function(t){return o.some((function(n){return 0===t.indexOf("".concat(n,"="))}))?"".concat(t.split("=")[0],"=").concat("*na*"):t})).join("&")}}return e&&(r=r.substring(0,l)),r}function v(t,n,e){return function(){if(d&&null===p)try{p=new RegExp("\\p{N}","gu"),f=new RegExp("\\p{L}","gu"),new RegExp("\\p{Sc}","gu")}catch(t){d=!1}}(),t?t.replace(f,n).replace(p,e):t}var g=[],m=null;function y(){}var b=[];function w(){}function k(){}var S=Object.freeze({__proto__:null,checkDocumentStyles:function(t){},compute:function(){},data:m,hashText:w,keys:b,log:y,observe:function(){},reset:function(){},sheetAdoptionState:[],sheetUpdateState:[],start:function(){},state:g,stop:function(){},trigger:k}),_=null;function E(t,n){qn()&&t&&"string"==typeof t&&t.length<255&&(_=n&&"string"==typeof n&&n.length<255?{key:t,value:n}:{value:t},Et(24))}var I,M=null,O=null;function T(t){t in M||(M[t]=0),t in O||(O[t]=0),M[t]++,O[t]++}function x(t,n){null!==n&&(t in M||(M[t]=0),t in O||(O[t]=0),M[t]+=n,O[t]+=n)}function j(t,n){null!==n&&!1===isNaN(n)&&(t in M||(M[t]=0),(n>M[t]||0===M[t])&&(O[t]=n,M[t]=n))}function z(t,n,e){return window.setTimeout(fn(t),n,e)}function C(t){return window.clearTimeout(t)}var A=0,P=0,q=null;function N(){q&&C(q),q=z(D,P),A=c()}function D(){var t=c();I={gap:t-A},Et(25),I.gap<3e5?q=z(D,P):Cn&&(E("clarity","suspend"),oe(),["mousemove","touchstart"].forEach((function(t){return vn(document,t,Nn)})),["resize","scroll","pageshow"].forEach((function(t){return vn(window,t,Nn)})))}var R=Object.freeze({__proto__:null,get data(){return I},reset:N,start:function(){P=6e4,A=0},stop:function(){C(q),A=0,P=0}}),U=null;function H(t){qn()&&a.lean&&(a.lean=!1,U={key:t},Gt(),Ft(),a.upgrade&&a.upgrade(t),Et(3))}var X=Object.freeze({__proto__:null,get data(){return U},start:function(){!a.lean&&a.upgrade&&a.upgrade("Config"),U=null},stop:function(){U=null},upgrade:H});function L(t,n,e,r){return new(e||(e=Promise))((function(o,a){function i(t){try{c(r.next(t))}catch(t){a(t)}}function u(t){try{c(r.throw(t))}catch(t){a(t)}}function c(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(i,u)}c((r=r.apply(t,n||[])).next())}))}function V(t,n){var e,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=n.call(t,i)}catch(t){u=[6,t],r=0}finally{e=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}var B=null;function Y(t,n){J(t,"string"==typeof n?[n]:n)}function W(t,n,e,r){return void 0===n&&(n=null),void 0===e&&(e=null),void 0===r&&(r=null),L(this,void 0,void 0,(function(){var o,a;return V(this,(function(i){switch(i.label){case 0:return a={},[4,F(t)];case 1:return a.userId=i.sent(),a.userHint=r||((u=t)&&u.length>=5?"".concat(u.substring(0,2)).concat(v(u.substring(2),"*","*")):v(u,"*","*")),J("userId",[(o=a).userId]),J("userHint",[o.userHint]),J("userType",[K(t)]),n&&(J("sessionId",[n]),o.sessionId=n),e&&(J("pageId",[e]),o.pageId=e),[2,o]}var u}))}))}function J(t,n){if(qn()&&t&&n&&"string"==typeof t&&t.length<255){for(var e=(t in B?B[t]:[]),r=0;r<n.length;r++)"string"==typeof n[r]&&n[r].length<255&&e.push(n[r]);B[t]=e}}function Z(){Et(34)}function G(){B={}}function F(t){return L(this,void 0,void 0,(function(){var n;return V(this,(function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),crypto&&t?[4,crypto.subtle.digest("SHA-256",(new TextEncoder).encode(t))]:[3,2];case 1:return n=e.sent(),[2,Array.prototype.map.call(new Uint8Array(n),(function(t){return("00"+t.toString(16)).slice(-2)})).join("")];case 2:return[2,""];case 3:return[3,5];case 4:return e.sent(),[2,""];case 5:return[2]}}))}))}function K(t){return t&&t.indexOf("@")>0?"email":"string"}var Q="CompressionStream"in window;function $(t){return L(this,void 0,void 0,(function(){var n,e;return V(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),Q?(n=new ReadableStream({start:function(n){return L(this,void 0,void 0,(function(){return V(this,(function(e){return n.enqueue(t),n.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),e=Uint8Array.bind,[4,tt(n)]):[3,2];case 1:return[2,new(e.apply(Uint8Array,[void 0,r.sent()]))];case 2:return[3,4];case 3:return r.sent(),[3,4];case 4:return[2,null]}}))}))}function tt(t){return L(this,void 0,void 0,(function(){var n,e,r,o,a;return V(this,(function(i){switch(i.label){case 0:n=t.getReader(),e=[],r=!1,o=[],i.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return a=i.sent(),r=a.done,o=a.value,r?[2,e]:(e.push.apply(e,o),[3,1]);case 3:return[2,e]}}))}))}var nt=null;function et(t){try{if(!nt)return;var n=function(t){try{return JSON.parse(t)}catch(t){return[]}}(t);n.forEach((function(t){nt(t)}))}catch(t){}}var rt=[S,e,Object.freeze({__proto__:null,compute:Z,get data(){return B},identify:W,reset:G,set:Y,start:function(){G()},stop:function(){G()}}),n,S,r,o,t,R,X,S];function ot(){M={},O={},T(5),rt.forEach((function(t){return fn(t.start)()}))}function at(){rt.slice().reverse().forEach((function(t){return fn(t.stop)()})),M={},O={}}function it(){Z(),Nt(),Et(0),Tt()}var ut,ct,st,lt,dt,pt,ft=0,ht=0,vt=null,gt=0;function mt(){lt=!0,ft=0,ht=0,gt=0,ut=[],ct=[],st={},dt=null}function yt(t,n){if(void 0===n&&(n=!0),lt){var e=c(),r=t.length>1?t[1]:null,o=JSON.stringify(t);switch(r){case 5:ft+=o.length;case 37:case 6:case 43:case 45:case 46:ht+=o.length,ut.push(o);break;default:ct.push(o)}T(25);var i=function(){var t=!1===a.lean&&ft>0?100:un.sequence*a.delay;return"string"==typeof a.upload?Math.max(Math.min(t,3e4),100):a.delay}();e-gt>2*i&&(C(vt),vt=null),n&&null===vt&&(25!==r&&N(),vt=z(wt,i),gt=e,Mt(ht))}}function bt(){C(vt),wt(!0),ft=0,ht=0,gt=0,ut=[],ct=[],st={},dt=null,lt=!1}function wt(t){return void 0===t&&(t=!1),L(this,void 0,void 0,(function(){var n,e,r,o,i,u,c,s;return V(this,(function(l){switch(l.label){case 0:return vt=null,(n=!1===a.lean&&ht>0&&(ht<1048576||un.sequence>0))&&j(1,1),it(),e=!0===t,r=JSON.stringify(ln(e)),o="[".concat(ct.join(),"]"),i=n?"[".concat(ut.join(),"]"):"",u=function(t){return t.p.length>0?'{"e":'.concat(t.e,',"a":').concat(t.a,',"p":').concat(t.p,"}"):'{"e":'.concat(t.e,',"a":').concat(t.a,"}")}({e:r,a:o,p:i}),e?(s=null,[3,3]):[3,1];case 1:return[4,$(u)];case 2:s=l.sent(),l.label=3;case 3:return x(2,(c=s)?c.length:u.length),kt(u,c,un.sequence,e),ct=[],n&&(ut=[],ht=0,ft=0),[2]}}))}))}function kt(t,n,e,r){if(void 0===r&&(r=!1),"string"==typeof a.upload){var o=a.upload,i=!1;if(r&&"sendBeacon"in navigator)try{(i=navigator.sendBeacon.bind(navigator)(o,t))&&_t(e)}catch(t){}if(!1===i){e in st?st[e].attempts++:st[e]={data:t,attempts:1};var u=new XMLHttpRequest;u.open("POST",o,!0),u.timeout=15e3,u.ontimeout=function(){pn(new Error("".concat("Timeout"," : ").concat(o)))},null!==e&&(u.onreadystatechange=function(){fn(St)(u,e)}),u.withCredentials=!0,n?(u.setRequestHeader("Accept","application/x-clarity-gzip"),u.send(n)):u.send(t)}}else if(a.upload){(0,a.upload)(t),_t(e)}}function St(t,n){var e=st[n];t&&4===t.readyState&&e&&((t.status<200||t.status>208)&&e.attempts<=1?t.status>=400&&t.status<500?Ot(6):(0===t.status&&(a.upload=a.fallback?a.fallback:a.upload),kt(e.data,null,n)):(dt={sequence:n,attempts:e.attempts,status:t.status},e.attempts>1&&Et(2),200===t.status&&t.responseText&&function(t){for(var n=t&&t.length>0?t.split("\n"):[],e=0,r=n;e<r.length;e++){var o=r[e],i=o&&o.length>0?o.split(/ (.*)/):[""];switch(i[0]){case"END":Ot(6);break;case"UPGRADE":H("Auto");break;case"ACTION":a.action&&i.length>1&&a.action(i[1]);break;case"EXTRACT":i.length>1&&i[1];break;case"SIGNAL":i.length>1&&et(i[1])}}}(t.responseText),0===t.status&&(kt(e.data,null,n,!0),Ot(3)),t.status>=200&&t.status<=208&&_t(n),delete st[n]))}function _t(t){1===t&&(Ft(),Gt())}function Et(t){var n=[c(),t];switch(t){case 4:var e=g;e&&((n=[e.time,e.event]).push(e.data.visible),n.push(e.data.docWidth),n.push(e.data.docHeight),n.push(e.data.screenWidth),n.push(e.data.screenHeight),n.push(e.data.scrollX),n.push(e.data.scrollY),n.push(e.data.pointerX),n.push(e.data.pointerY),n.push(e.data.activityTime),n.push(e.data.scrollTime),n.push(e.data.pointerTime),n.push(e.data.moveX),n.push(e.data.moveY),n.push(e.data.moveTime),n.push(e.data.downX),n.push(e.data.downY),n.push(e.data.downTime),n.push(e.data.upX),n.push(e.data.upY),n.push(e.data.upTime),n.push(e.data.pointerPrevX),n.push(e.data.pointerPrevY),n.push(e.data.pointerPrevTime),yt(n,!1));break;case 25:n.push(I.gap),yt(n);break;case 35:n.push(pt.check),yt(n,!1);break;case 3:n.push(U.key),yt(n);break;case 2:n.push(dt.sequence),n.push(dt.attempts),n.push(dt.status),yt(n,!1);break;case 24:_.key&&n.push(_.key),n.push(_.value),yt(n);break;case 34:var r=Object.keys(B);if(r.length>0){for(var o=0,a=r;o<a.length;o++){var i=a[o];n.push(i),n.push(B[i])}G(),yt(n,!1)}break;case 0:var u=Object.keys(O);if(u.length>0){for(var s=0,l=u;s<l.length;s++){var d=l[s],p=parseInt(d,10);n.push(p),n.push(Math.round(O[d]))}O={},yt(n,!1)}break;case 1:var f=Object.keys(zt);if(f.length>0){for(var h=0,v=f;h<v.length;h++){var y=v[h];p=parseInt(y,10);n.push(p),n.push(zt[y])}Dt(),yt(n,!1)}break;case 36:var w=Object.keys(m);if(w.length>0){for(var k=0,S=w;k<S.length;k++){var E=S[k];p=parseInt(E,10);n.push(p),n.push([].concat.apply([],m[E]))}yt(n,!1)}break;case 40:b.forEach((function(t){n.push(t);var e=[];for(var r in m[t]){var o=parseInt(r,10);e.push(o),e.push(m[t][r])}n.push(e)})),yt(n,!1)}}function It(){pt={check:0}}function Mt(t){if(0===pt.check){var n=pt.check;n=un.sequence>=128?1:n,n=un.pageNum>=128?7:n,n=c()>72e5?2:n,(n=t>10485760?2:n)!==pt.check&&Ot(n)}}function Ot(t){pt.check=t,5!==t&&(Zt(),oe())}function Tt(){0!==pt.check&&Et(35)}function xt(){pt=null}var jt=null,zt=null,Ct=!1;function At(){jt={},zt={},Ct=!1}function Pt(){jt={},zt={},Ct=!1}function qt(t,n){if(n&&(n="".concat(n),t in jt||(jt[t]=[]),jt[t].indexOf(n)<0)){if(jt[t].length>128)return void(Ct||(Ct=!0,Ot(5)));jt[t].push(n),t in zt||(zt[t]=[]),zt[t].push(n)}}function Nt(){Et(1)}function Dt(){zt={},Ct=!1}function Rt(t){qt(36,t.toString())}var Ut=null,Ht=[],Xt=0,Lt=null;function Vt(){var t,n,e;Lt=null;var r=navigator&&"userAgent"in navigator?navigator.userAgent:"",o=null!==(e=null===(n=null===(t=null===Intl||void 0===Intl?void 0:Intl.DateTimeFormat())||void 0===t?void 0:t.resolvedOptions())||void 0===n?void 0:n.timeZone)&&void 0!==e?e:"",i=(new Date).getTimezoneOffset().toString(),u=window.location.ancestorOrigins?Array.from(window.location.ancestorOrigins).toString():"",c=document&&document.title?document.title:"";Xt=r.indexOf("Electron")>0?1:0;var s,l=function(){var t={session:$t(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},n=en("_clsk",!a.includeSubdomains);if(n){var e=n.split("|");e.length>=5&&t.ts-tn(e[1])<18e5&&(t.session=e[0],t.count=tn(e[2])+1,t.upgrade=tn(e[3]),t.upload=e.length>=6?"".concat("https://").concat(e[5],"/").concat(e[4]):"".concat("https://").concat(e[4]))}return t}(),d=nn(),p=a.projectId||function(t,n){void 0===n&&(n=null);for(var e,r=5381,o=r,a=0;a<t.length;a+=2)r=(r<<5)+r^t.charCodeAt(a),a+1<t.length&&(o=(o<<5)+o^t.charCodeAt(a+1));return e=Math.abs(r+11579*o),(n?e%Math.pow(2,n):e).toString(36)}(location.host);Ut={projectId:p,userId:d.id,sessionId:l.session,pageNum:l.count},a.lean=a.track&&null!==l.upgrade?0===l.upgrade:a.lean,a.upload=a.track&&"string"==typeof a.upload&&l.upload&&l.upload.length>"https://".length?l.upload:a.upload,qt(0,r),qt(3,c),qt(1,h(location.href,!!Xt)),qt(2,document.referrer),qt(15,function(){var t=$t();if(a.track&&Kt(window,"sessionStorage")){var n=sessionStorage.getItem("_cltk");t=n||t,sessionStorage.setItem("_cltk",t)}return t}()),qt(16,document.documentElement.lang),qt(17,document.dir),qt(26,"".concat(window.devicePixelRatio)),qt(28,d.dob.toString()),qt(29,d.version.toString()),qt(33,u),qt(34,o),qt(35,i),j(0,l.ts),j(1,0),j(35,Xt),navigator&&(qt(9,navigator.language),j(33,navigator.hardwareConcurrency),j(32,navigator.maxTouchPoints),j(34,Math.round(navigator.deviceMemory)),(s=navigator.userAgentData)&&s.getHighEntropyValues?s.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var n;qt(22,t.platform),qt(23,t.platformVersion),null===(n=t.brands)||void 0===n||n.forEach((function(t){qt(24,t.name+"~"+t.version)})),qt(25,t.model),j(27,t.mobile?1:0)})):qt(22,navigator.platform)),screen&&(j(14,Math.round(screen.width)),j(15,Math.round(screen.height)),j(16,Math.round(screen.colorDepth)));for(var f=0,v=a.cookies;f<v.length;f++){var g=v[f],m=en(g);m&&Y(g,m)}!function(t){Rt(t?1:0)}(a.track),Qt(d)}function Bt(){Lt=null,Ut=null,Ht.forEach((function(t){t.called=!1}))}function Yt(t,n,e){void 0===n&&(n=!0),void 0===e&&(e=!1);var r=a.lean?0:1,o=!1;Ut&&(r||!1===n)&&(t(Ut,!a.lean),o=!0),!e&&o||Ht.push({callback:t,wait:n,recall:e,called:o})}function Wt(){return Ut?[Ut.userId,Ut.sessionId,Ut.pageNum].join("."):""}function Jt(t){if(void 0===t&&(t=!0),!t)return a.track=!1,on("_clsk","",-Number.MAX_VALUE),on("_clck","",-Number.MAX_VALUE),oe(),void window.setTimeout(re,250);qn()&&(a.track=!0,Qt(nn(),1),Ft(),Rt(2))}function Zt(){on("_clsk","",0)}function Gt(){!function(t){if(Ht.length>0)for(var n=0;n<Ht.length;n++){var e=Ht[n];!e.callback||e.called||e.wait&&!t||(e.callback(Ut,!a.lean),e.called=!0,e.recall||(Ht.splice(n,1),n--))}}(a.lean?0:1)}function Ft(){if(Ut&&a.track){var t=Math.round(Date.now()),n=a.upload&&"string"==typeof a.upload?a.upload.replace("https://",""):"",e=a.lean?0:1;on("_clsk",[Ut.sessionId,t,Ut.pageNum,e,n].join("|"),1)}}function Kt(t,n){try{return!!t[n]}catch(t){return!1}}function Qt(t,n){void 0===n&&(n=null),n=null===n?t.consent:n;var e=Math.ceil((Date.now()+31536e6)/864e5),r=0===t.dob?null===a.dob?0:a.dob:t.dob;(null===t.expiry||Math.abs(e-t.expiry)>=1||t.consent!==n||t.dob!==r)&&on("_clck",[Ut.userId,2,e.toString(36),n,r].join("|"),365)}function $t(){var t=Math.floor(Math.random()*Math.pow(2,32));return window&&window.crypto&&window.crypto.getRandomValues&&Uint32Array&&(t=window.crypto.getRandomValues(new Uint32Array(1))[0]),t.toString(36)}function tn(t,n){return void 0===n&&(n=10),parseInt(t,n)}function nn(){var t={id:$t(),version:0,expiry:null,consent:0,dob:0},n=en("_clck",!a.includeSubdomains);if(n&&n.length>0){for(var e=n.split("|"),r=0,o=0,i=document.cookie.split(";");o<i.length;o++){r+="_clck"===i[o].split("=")[0].trim()?1:0}if(1===e.length||r>1){var u="".concat(";").concat("expires=").concat(new Date(0).toUTCString()).concat(";path=/");document.cookie="".concat("_clck","=").concat(u),document.cookie="".concat("_clsk","=").concat(u)}e.length>1&&(t.version=tn(e[1])),e.length>2&&(t.expiry=tn(e[2],36)),e.length>3&&1===tn(e[3])&&(t.consent=1),e.length>4&&tn(e[1])>1&&(t.dob=tn(e[4])),a.track=a.track||1===t.consent,t.id=a.track?e[0]:t.id}return t}function en(t,n){var e;if(void 0===n&&(n=!1),Kt(document,"cookie")){var r=document.cookie.split(";");if(r)for(var o=0;o<r.length;o++){var a=r[o].split("=");if(a.length>1&&a[0]&&a[0].trim()===t){for(var i=rn(a[1]),u=i[0],c=i[1];u;)u=(e=rn(c))[0],c=e[1];return n?c.endsWith("".concat("~","1"))?c.substring(0,c.length-2):null:c}}}return null}function rn(t){try{var n=decodeURIComponent(t);return[n!=t,n]}catch(t){}return[!1,t]}function on(t,n,e){if((a.track||""==n)&&(navigator&&navigator.cookieEnabled||Kt(document,"cookie"))){var r=function(t){return encodeURIComponent(t)}(n),o=new Date;o.setDate(o.getDate()+e);var i=o?"expires="+o.toUTCString():"",u="".concat(t,"=").concat(r).concat(";").concat(i).concat(";path=/");try{if(null===Lt){for(var c=location.hostname?location.hostname.split("."):[],s=c.length-1;s>=0;s--)if(Lt=".".concat(c[s]).concat(Lt||""),s<c.length-1&&(document.cookie="".concat(u).concat(";").concat("domain=").concat(Lt),en(t)===n))return;Lt=""}}catch(t){Lt=""}document.cookie=Lt?"".concat(u).concat(";").concat("domain=").concat(Lt):u}}var an,un=null;function cn(){var t=Ut;un={version:s,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0,applicationPlatform:0,url:""}}function sn(){un=null}function ln(t){return un.start=un.start+un.duration,un.duration=c()-un.start,un.sequence++,un.upload=t&&"sendBeacon"in navigator?1:0,un.end=t?1:0,un.applicationPlatform=0,un.url=h(location.href,!1,!0),[un.version,un.sequence,un.start,un.duration,un.projectId,un.userId,un.sessionId,un.pageNum,un.upload,un.end,un.applicationPlatform,un.url]}function dn(){an=[]}function pn(t){if(an&&-1===an.indexOf(t.message)){var n=a.report;if(n&&n.length>0){var e={v:un.version,p:un.projectId,u:un.userId,s:un.sessionId,n:un.pageNum};t.message&&(e.m=t.message),t.stack&&(e.e=t.stack);var r=new XMLHttpRequest;r.open("POST",n,!0),r.send(JSON.stringify(e)),an.push(t.message)}}return t}function fn(t){return function(){var n=performance.now();try{t.apply(this,arguments)}catch(t){throw pn(t)}var e=performance.now()-n;x(4,e),e>30&&(T(7),j(6,e),"".concat(t.dn||t.name,"-").concat(e))}}var hn=[];function vn(t,n,e,r,o){void 0===r&&(r=!1),void 0===o&&(o=!0),e=fn(e);try{t[i("addEventListener")](n,e,{capture:r,passive:o}),hn.push({event:n,target:t,listener:e,options:{capture:r,passive:o}})}catch(t){}}function gn(){for(var t=0,n=hn;t<n.length;t++){var e=n[t];try{e.target[i("removeEventListener")](e.event,e.listener,{capture:e.options.capture,passive:e.options.passive})}catch(t){}}hn=[]}var mn=null,yn=null,bn=null,wn=0;function kn(){return!(wn++>20)}function Sn(){Sn.dn=1,wn=0,bn!==En()&&(oe(),window.setTimeout(_n,250))}function _n(){re(),j(29,1)}function En(){return location.href?location.href.replace(location.hash,""):location.href}var In=[],Mn=null,On=null,Tn=null;function xn(){On&&(Tn(),On=null,null===Mn&&zn())}function jn(){In=[],Mn=null,On=null}function zn(){var t=In.shift();t&&(Mn=t,t.task().then((function(){t.id===Wt()&&(t.resolve(),Mn=null,zn())})).catch((function(n){t.id===Wt()&&(n&&(n.name,n.message,n.stack),Mn=null,zn())})))}var Cn=!1;function An(){Cn=!0,u=performance.now()+performance.timeOrigin,jn(),gn(),dn(),bn=En(),wn=0,vn(window,"popstate",Sn),null===mn&&(mn=history.pushState,history.pushState=function(){mn.apply(this,arguments),qn()&&kn()&&Sn()}),null===yn&&(yn=history.replaceState,history.replaceState=function(){yn.apply(this,arguments),qn()&&kn()&&Sn()})}function Pn(){bn=null,wn=0,dn(),gn(),jn(),u=0,Cn=!1}function qn(){return Cn}function Nn(){Nn.dn=2,re(),E("clarity","restart")}var Dn=null;function Rn(){Dn=null}function Un(t){Dn={fetchStart:Math.round(t.fetchStart),connectStart:Math.round(t.connectStart),connectEnd:Math.round(t.connectEnd),requestStart:Math.round(t.requestStart),responseStart:Math.round(t.responseStart),responseEnd:Math.round(t.responseEnd),domInteractive:Math.round(t.domInteractive),domComplete:Math.round(t.domComplete),loadEventStart:Math.round(t.loadEventStart),loadEventEnd:Math.round(t.loadEventEnd),redirectCount:Math.round(t.redirectCount),size:t.transferSize?t.transferSize:0,type:t.type,protocol:t.nextHopProtocol,encodedSize:t.encodedBodySize?t.encodedBodySize:0,decodedSize:t.decodedBodySize?t.decodedBodySize:0},function(t){L(this,void 0,void 0,(function(){var n,e;return V(this,(function(r){return n=c(),e=[n,t],29===t&&(e.push(Dn.fetchStart),e.push(Dn.connectStart),e.push(Dn.connectEnd),e.push(Dn.requestStart),e.push(Dn.responseStart),e.push(Dn.responseEnd),e.push(Dn.domInteractive),e.push(Dn.domComplete),e.push(Dn.loadEventStart),e.push(Dn.loadEventEnd),e.push(Dn.redirectCount),e.push(Dn.size),e.push(Dn.type),e.push(Dn.protocol),e.push(Dn.encodedSize),e.push(Dn.decodedSize),Rn(),yt(e)),[2]}))}))}(29)}var Hn,Xn=0,Ln=1/0,Vn=0,Bn=0,Yn=[],Wn=new Map,Jn=function(){return Xn||0},Zn=function(){if(!Yn.length)return-1;var t=Math.min(Yn.length-1,Math.floor((Jn()-Bn)/50));return Yn[t].latency},Gn=function(){Bn=Jn(),Yn.length=0,Wn.clear()},Fn=function(t){if(t.interactionId&&!(t.duration<40)){!function(t){"interactionCount"in performance?Xn=performance.interactionCount:t.interactionId&&(Ln=Math.min(Ln,t.interactionId),Vn=Math.max(Vn,t.interactionId),Xn=Vn?(Vn-Ln)/7+1:0)}(t);var n=Yn[Yn.length-1],e=Wn.get(t.interactionId);if(e||Yn.length<10||t.duration>(null==n?void 0:n.latency)){if(e)t.duration>e.latency&&(e.latency=t.duration);else{var r={id:t.interactionId,latency:t.duration};Wn.set(r.id,r),Yn.push(r)}Yn.sort((function(t,n){return n.latency-t.latency})),Yn.length>10&&Yn.splice(10).forEach((function(t){return Wn.delete(t.id)}))}}},Kn=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint","event"];function Qn(){Qn.dn=26;try{Hn&&Hn.disconnect(),Hn=new PerformanceObserver(fn($n));for(var t=0,n=Kn;t<n.length;t++){var e=n[t];PerformanceObserver.supportedEntryTypes.indexOf(e)>=0&&("layout-shift"===e&&x(9,0),Hn.observe({type:e,buffered:!0}))}}catch(t){}}function $n(t){$n.dn=27,function(t){for(var n=(!("visibilityState"in document)||"visible"===document.visibilityState),e=0;e<t.length;e++){var r=t[e];switch(r.entryType){case"navigation":Un(r);break;case"resource":var o=r.name;qt(4,te(o)),o!==a.upload&&o!==a.fallback||j(28,r.duration);break;case"longtask":T(7);break;case"first-input":n&&j(10,r.processingStart-r.startTime);break;case"event":n&&"PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&(Fn(r),qt(37,Zn().toString()));break;case"layout-shift":n&&!r.hadRecentInput&&x(9,1e3*r.value);break;case"largest-contentful-paint":n&&j(8,r.startTime)}}}(t.getEntries())}function te(t){var n=document.createElement("a");return n.href=t,n.host}var ne=Object.freeze({__proto__:null,start:function t(){t.dn=25,Rn(),function(){navigator&&"connection"in navigator&&qt(27,navigator.connection.effectiveType),window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&("complete"!==document.readyState?vn(window,"load",z.bind(this,Qn,0)):Qn())}()},stop:function(){Hn&&Hn.disconnect(),Hn=null,Gn(),Rn()}}),ee=[S,S,S,ne];function re(t){void 0===t&&(t=null),function(){try{var t=navigator&&"globalPrivacyControl"in navigator&&1==navigator.globalPrivacyControl;return!1===Cn&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap&&!t}catch(t){return!1}}()&&(!function(t){if(null===t||Cn)return!1;for(var n in t)n in a&&(a[n]=t[n])}(t),An(),ot(),ee.forEach((function(t){return fn(t.start)()})),null===t&&ce())}function oe(){qn()&&(ee.slice().reverse().forEach((function(t){return fn(t.stop)()})),at(),Pn(),void 0!==ie&&(ie[ue]=function(){(ie[ue].q=ie[ue].q||[]).push(arguments),"start"===arguments[0]&&ie[ue].q.unshift(ie[ue].q.pop())&&ce()}))}var ae=Object.freeze({__proto__:null,consent:Jt,event:E,hashText:w,identify:W,metadata:Yt,pause:function(){qn()&&(E("clarity","pause"),null===On&&(On=new Promise((function(t){Tn=t}))))},resume:function(){qn()&&(xn(),E("clarity","resume"))},set:Y,signal:function(t){nt=t},start:re,stop:oe,upgrade:H,version:s}),ie=window,ue="clarity";function ce(){if(void 0!==ie){if(ie[ue]&&ie[ue].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=ie[ue]&&ie[ue].q||[];for(ie[ue]=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return ae[t].apply(ae,n)},ie[ue].v=s;t.length>0;)ie[ue].apply(ie,t.shift())}}ce()}();
|
package/package.json
CHANGED
package/src/core/event.ts
CHANGED
|
@@ -4,14 +4,16 @@ import measure from "./measure";
|
|
|
4
4
|
|
|
5
5
|
let bindings: BrowserEvent[] = [];
|
|
6
6
|
|
|
7
|
-
export function bind(target: EventTarget, event: string, listener: EventListener, capture: boolean = false): void {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
export function bind(target: EventTarget, event: string, listener: EventListener, capture: boolean = false, passive: boolean = true): void {
|
|
8
|
+
listener = measure(listener) as EventListener;
|
|
9
|
+
// Wrapping following lines inside try / catch to cover edge cases where we might try to access an inaccessible element.
|
|
10
|
+
// E.g. Iframe may start off as same-origin but later turn into cross-origin, and the following lines will throw an exception.
|
|
11
|
+
try {
|
|
12
|
+
target[api(Constant.AddEventListener)](event, listener, { capture, passive });
|
|
13
|
+
bindings.push({ event, target, listener, options: { capture, passive } });
|
|
14
|
+
} catch {
|
|
15
|
+
/* do nothing */
|
|
16
|
+
}
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
export function reset(): void {
|
|
@@ -19,8 +21,10 @@ export function reset(): void {
|
|
|
19
21
|
for (let binding of bindings) {
|
|
20
22
|
// Wrapping inside try / catch to avoid situations where the element may be destroyed before we get a chance to unbind
|
|
21
23
|
try {
|
|
22
|
-
binding.target[api(Constant.RemoveEventListener)](binding.event, binding.listener, binding.capture);
|
|
23
|
-
} catch {
|
|
24
|
+
binding.target[api(Constant.RemoveEventListener)](binding.event, binding.listener, { capture: binding.options.capture, passive: binding.options.passive });
|
|
25
|
+
} catch {
|
|
26
|
+
/* do nothing */
|
|
27
|
+
}
|
|
24
28
|
}
|
|
25
29
|
bindings = [];
|
|
26
30
|
}
|
package/src/core/time.ts
CHANGED
|
@@ -8,9 +8,9 @@ export function start(): void {
|
|
|
8
8
|
// since iframes can be loaded later the event timestamp is not the same as performance.now()
|
|
9
9
|
// converting everything to absolute time by adding timeorigin of the event view
|
|
10
10
|
// to synchronize times before calculating the difference with start time
|
|
11
|
-
export function time(event: UIEvent = null): number {
|
|
11
|
+
export function time(event: UIEvent | PageTransitionEvent = null): number {
|
|
12
12
|
let ts = event && event.timeStamp > 0 ? event.timeStamp : performance.now();
|
|
13
|
-
let origin = event && event.view ? event.view.performance.timeOrigin : performance.timeOrigin;
|
|
13
|
+
let origin = event && (event as UIEvent).view ? (event as UIEvent).view.performance.timeOrigin : performance.timeOrigin;
|
|
14
14
|
return Math.max(Math.round(ts + origin - startTime), 0);
|
|
15
15
|
}
|
|
16
16
|
|
package/src/core/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
let version = "0.7.
|
|
1
|
+
let version = "0.7.69";
|
|
2
2
|
export default version;
|
package/src/data/baseline.ts
CHANGED
|
@@ -35,6 +35,12 @@ export function reset(): void {
|
|
|
35
35
|
downX: buffer.downX,
|
|
36
36
|
downY: buffer.downY,
|
|
37
37
|
downTime: buffer.downTime,
|
|
38
|
+
upX: buffer.upX,
|
|
39
|
+
upY: buffer.upY,
|
|
40
|
+
upTime: buffer.upTime,
|
|
41
|
+
pointerPrevX: buffer.pointerPrevX,
|
|
42
|
+
pointerPrevY: buffer.pointerPrevY,
|
|
43
|
+
pointerPrevTime: buffer.pointerPrevTime,
|
|
38
44
|
}
|
|
39
45
|
};
|
|
40
46
|
}
|
|
@@ -57,6 +63,12 @@ export function reset(): void {
|
|
|
57
63
|
downX: 0,
|
|
58
64
|
downY: 0,
|
|
59
65
|
downTime: 0,
|
|
66
|
+
upX: 0,
|
|
67
|
+
upY: 0,
|
|
68
|
+
upTime: 0,
|
|
69
|
+
pointerPrevX: 0,
|
|
70
|
+
pointerPrevY: 0,
|
|
71
|
+
pointerPrevTime: 0,
|
|
60
72
|
};
|
|
61
73
|
}
|
|
62
74
|
|
|
@@ -79,6 +91,9 @@ export function track(event: Event, x: number, y: number, time?: number): void {
|
|
|
79
91
|
buffer.moveX = x;
|
|
80
92
|
buffer.moveY = y;
|
|
81
93
|
buffer.moveTime = time;
|
|
94
|
+
buffer.pointerPrevX = buffer.pointerX;
|
|
95
|
+
buffer.pointerPrevY = buffer.pointerY;
|
|
96
|
+
buffer.pointerPrevTime = buffer.pointerTime;
|
|
82
97
|
buffer.pointerX = x;
|
|
83
98
|
buffer.pointerY = y;
|
|
84
99
|
buffer.pointerTime = time;
|
|
@@ -87,11 +102,28 @@ export function track(event: Event, x: number, y: number, time?: number): void {
|
|
|
87
102
|
buffer.downX = x;
|
|
88
103
|
buffer.downY = y;
|
|
89
104
|
buffer.downTime = time;
|
|
105
|
+
buffer.pointerPrevX = buffer.pointerX;
|
|
106
|
+
buffer.pointerPrevY = buffer.pointerY;
|
|
107
|
+
buffer.pointerPrevTime = buffer.pointerTime;
|
|
108
|
+
buffer.pointerX = x;
|
|
109
|
+
buffer.pointerY = y;
|
|
110
|
+
buffer.pointerTime = time;
|
|
111
|
+
break;
|
|
112
|
+
case Event.MouseUp:
|
|
113
|
+
buffer.upX = x;
|
|
114
|
+
buffer.upY = y;
|
|
115
|
+
buffer.upTime = time;
|
|
116
|
+
buffer.pointerPrevX = buffer.pointerX;
|
|
117
|
+
buffer.pointerPrevY = buffer.pointerY;
|
|
118
|
+
buffer.pointerPrevTime = buffer.pointerTime;
|
|
90
119
|
buffer.pointerX = x;
|
|
91
120
|
buffer.pointerY = y;
|
|
92
121
|
buffer.pointerTime = time;
|
|
93
122
|
break;
|
|
94
123
|
default:
|
|
124
|
+
buffer.pointerPrevX = buffer.pointerX;
|
|
125
|
+
buffer.pointerPrevY = buffer.pointerY;
|
|
126
|
+
buffer.pointerPrevTime = buffer.pointerTime;
|
|
95
127
|
buffer.pointerX = x;
|
|
96
128
|
buffer.pointerY = y;
|
|
97
129
|
buffer.pointerTime = time;
|
package/src/data/encode.ts
CHANGED
|
@@ -38,6 +38,12 @@ export default function(event: Event): void {
|
|
|
38
38
|
tokens.push(b.data.downX);
|
|
39
39
|
tokens.push(b.data.downY);
|
|
40
40
|
tokens.push(b.data.downTime);
|
|
41
|
+
tokens.push(b.data.upX);
|
|
42
|
+
tokens.push(b.data.upY);
|
|
43
|
+
tokens.push(b.data.upTime);
|
|
44
|
+
tokens.push(b.data.pointerPrevX);
|
|
45
|
+
tokens.push(b.data.pointerPrevY);
|
|
46
|
+
tokens.push(b.data.pointerPrevTime);
|
|
41
47
|
queue(tokens, false);
|
|
42
48
|
}
|
|
43
49
|
baseline.reset();
|
package/src/data/metadata.ts
CHANGED
|
@@ -160,7 +160,7 @@ export function callback(): void {
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
export function save(): void {
|
|
163
|
-
if (!data) return;
|
|
163
|
+
if (!data || !config.track) return;
|
|
164
164
|
let ts = Math.round(Date.now());
|
|
165
165
|
let upload = config.upload && typeof config.upload === Constant.String ? (config.upload as string).replace(Constant.HTTPS, Constant.Empty) : Constant.Empty;
|
|
166
166
|
let upgrade = config.lean ? BooleanFlag.False : BooleanFlag.True;
|