clarity-js 0.7.56 → 0.7.58
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 +124 -56
- package/build/clarity.min.js +1 -1
- package/build/clarity.module.js +124 -56
- package/build/clarity.performance.js +1 -1
- package/package.json +1 -1
- package/src/core/config.ts +1 -0
- package/src/core/version.ts +1 -1
- package/src/data/metadata.ts +10 -3
- package/src/interaction/encode.ts +7 -1
- package/src/interaction/pointer.ts +19 -4
- package/src/interaction/resize.ts +9 -2
- package/src/layout/animation.ts +8 -1
- package/src/layout/mutation.ts +61 -30
- package/types/core.d.ts +1 -0
- package/types/interaction.d.ts +1 -0
- package/types/layout.d.ts +8 -2
package/build/clarity.module.js
CHANGED
|
@@ -136,6 +136,7 @@ var config$2 = {
|
|
|
136
136
|
throttleDom: true,
|
|
137
137
|
conversions: false,
|
|
138
138
|
longTask: 30,
|
|
139
|
+
includeSubdomains: true,
|
|
139
140
|
};
|
|
140
141
|
|
|
141
142
|
function api(method) {
|
|
@@ -163,7 +164,7 @@ function stop$F() {
|
|
|
163
164
|
startTime = 0;
|
|
164
165
|
}
|
|
165
166
|
|
|
166
|
-
var version$1 = "0.7.
|
|
167
|
+
var version$1 = "0.7.58";
|
|
167
168
|
|
|
168
169
|
// tslint:disable: no-bitwise
|
|
169
170
|
function hash (input, precision) {
|
|
@@ -1954,6 +1955,8 @@ function stop$r() {
|
|
|
1954
1955
|
|
|
1955
1956
|
var state$5 = [];
|
|
1956
1957
|
var timeout$5 = null;
|
|
1958
|
+
var activeTouchPointId = 0;
|
|
1959
|
+
var activeTouchPointIds = new Set();
|
|
1957
1960
|
function start$s() {
|
|
1958
1961
|
reset$f();
|
|
1959
1962
|
}
|
|
@@ -1996,13 +1999,25 @@ function touch(event, root, evt) {
|
|
|
1996
1999
|
var y = "clientY" in entry ? Math.round(entry["clientY"] + d.scrollTop) : null;
|
|
1997
2000
|
x = x && frame ? x + Math.round(frame.offsetLeft) : x;
|
|
1998
2001
|
y = y && frame ? y + Math.round(frame.offsetTop) : y;
|
|
1999
|
-
//
|
|
2000
|
-
//
|
|
2001
|
-
// tested in Chromium-based browsers as well as Firefox
|
|
2002
|
+
// We cannot rely on identifier to determine primary touch as its value doesn't always start with 0.
|
|
2003
|
+
// Safari/Webkit uses the address of the UITouch object as the identifier value for each touch point.
|
|
2002
2004
|
var id = "identifier" in entry ? entry["identifier"] : undefined;
|
|
2005
|
+
switch (event) {
|
|
2006
|
+
case 17 /* Event.TouchStart */:
|
|
2007
|
+
if (activeTouchPointIds.size === 0) {
|
|
2008
|
+
activeTouchPointId = id;
|
|
2009
|
+
}
|
|
2010
|
+
activeTouchPointIds.add(id);
|
|
2011
|
+
break;
|
|
2012
|
+
case 18 /* Event.TouchEnd */:
|
|
2013
|
+
case 20 /* Event.TouchCancel */:
|
|
2014
|
+
activeTouchPointIds.delete(id);
|
|
2015
|
+
break;
|
|
2016
|
+
}
|
|
2017
|
+
var isPrimary = activeTouchPointId === id;
|
|
2003
2018
|
// Check for null values before processing this event
|
|
2004
2019
|
if (x !== null && y !== null) {
|
|
2005
|
-
handler$2({ time: t, event: event, data: { target: target(evt), x: x, y: y, id: id } });
|
|
2020
|
+
handler$2({ time: t, event: event, data: { target: target(evt), x: x, y: y, id: id, isPrimary: isPrimary } });
|
|
2006
2021
|
}
|
|
2007
2022
|
}
|
|
2008
2023
|
}
|
|
@@ -2051,7 +2066,9 @@ function stop$q() {
|
|
|
2051
2066
|
|
|
2052
2067
|
var data$b;
|
|
2053
2068
|
var timeout$4 = null;
|
|
2069
|
+
var initialStateLogged = false;
|
|
2054
2070
|
function start$r() {
|
|
2071
|
+
initialStateLogged = false;
|
|
2055
2072
|
bind(window, "resize", recompute$5);
|
|
2056
2073
|
recompute$5();
|
|
2057
2074
|
}
|
|
@@ -2063,8 +2080,14 @@ function recompute$5() {
|
|
|
2063
2080
|
width: de && "clientWidth" in de ? Math.min(de.clientWidth, window.innerWidth) : window.innerWidth,
|
|
2064
2081
|
height: de && "clientHeight" in de ? Math.min(de.clientHeight, window.innerHeight) : window.innerHeight,
|
|
2065
2082
|
};
|
|
2066
|
-
|
|
2067
|
-
|
|
2083
|
+
if (initialStateLogged) {
|
|
2084
|
+
clearTimeout(timeout$4);
|
|
2085
|
+
timeout$4 = setTimeout(process$5, 500 /* Setting.LookAhead */, 11 /* Event.Resize */);
|
|
2086
|
+
}
|
|
2087
|
+
else {
|
|
2088
|
+
encode$3(11 /* Event.Resize */);
|
|
2089
|
+
initialStateLogged = true;
|
|
2090
|
+
}
|
|
2068
2091
|
}
|
|
2069
2092
|
function process$5(event) {
|
|
2070
2093
|
schedule$1(encode$3.bind(this, event));
|
|
@@ -2370,6 +2393,7 @@ function traverse (root, timer, source, timestamp) {
|
|
|
2370
2393
|
|
|
2371
2394
|
var observers = [];
|
|
2372
2395
|
var mutations = [];
|
|
2396
|
+
var throttledMutations = {};
|
|
2373
2397
|
var insertRule = null;
|
|
2374
2398
|
var deleteRule = null;
|
|
2375
2399
|
var attachShadow = null;
|
|
@@ -2377,6 +2401,7 @@ var mediaInsertRule = null;
|
|
|
2377
2401
|
var mediaDeleteRule = null;
|
|
2378
2402
|
var queue$2 = [];
|
|
2379
2403
|
var timeout$1 = null;
|
|
2404
|
+
var throttleDelay = null;
|
|
2380
2405
|
var activePeriod = null;
|
|
2381
2406
|
var history$4 = {};
|
|
2382
2407
|
function start$k() {
|
|
@@ -2480,6 +2505,7 @@ function stop$i() {
|
|
|
2480
2505
|
observers = [];
|
|
2481
2506
|
history$4 = {};
|
|
2482
2507
|
mutations = [];
|
|
2508
|
+
throttledMutations = [];
|
|
2483
2509
|
queue$2 = [];
|
|
2484
2510
|
activePeriod = 0;
|
|
2485
2511
|
timeout$1 = null;
|
|
@@ -2497,36 +2523,24 @@ function handle$1(m) {
|
|
|
2497
2523
|
measure(compute$6)();
|
|
2498
2524
|
});
|
|
2499
2525
|
}
|
|
2500
|
-
function
|
|
2526
|
+
function processMutation(timer, mutation, instance, timestamp) {
|
|
2501
2527
|
return __awaiter(this, void 0, void 0, function () {
|
|
2502
|
-
var
|
|
2503
|
-
return __generator(this, function (
|
|
2504
|
-
switch (
|
|
2528
|
+
var state, target, type;
|
|
2529
|
+
return __generator(this, function (_a) {
|
|
2530
|
+
switch (_a.label) {
|
|
2505
2531
|
case 0:
|
|
2506
|
-
timer = { id: id(), cost: 3 /* Metric.LayoutCost */ };
|
|
2507
|
-
start$y(timer);
|
|
2508
|
-
_b.label = 1;
|
|
2509
|
-
case 1:
|
|
2510
|
-
if (!(mutations.length > 0)) return [3 /*break*/, 8];
|
|
2511
|
-
record = mutations.shift();
|
|
2512
|
-
instance = time();
|
|
2513
|
-
_i = 0, _a = record.mutations;
|
|
2514
|
-
_b.label = 2;
|
|
2515
|
-
case 2:
|
|
2516
|
-
if (!(_i < _a.length)) return [3 /*break*/, 6];
|
|
2517
|
-
mutation = _a[_i];
|
|
2518
2532
|
state = state$a(timer);
|
|
2519
|
-
if (!(state === 0 /* Task.Wait */)) return [3 /*break*/,
|
|
2533
|
+
if (!(state === 0 /* Task.Wait */)) return [3 /*break*/, 2];
|
|
2520
2534
|
return [4 /*yield*/, suspend$1(timer)];
|
|
2521
|
-
case
|
|
2522
|
-
state =
|
|
2523
|
-
|
|
2524
|
-
case
|
|
2535
|
+
case 1:
|
|
2536
|
+
state = _a.sent();
|
|
2537
|
+
_a.label = 2;
|
|
2538
|
+
case 2:
|
|
2525
2539
|
if (state === 2 /* Task.Stop */) {
|
|
2526
|
-
return [
|
|
2540
|
+
return [2 /*return*/];
|
|
2527
2541
|
}
|
|
2528
2542
|
target = mutation.target;
|
|
2529
|
-
type = config$2.throttleDom ? track$5(mutation, timer, instance,
|
|
2543
|
+
type = config$2.throttleDom ? track$5(mutation, timer, instance, timestamp) : mutation.type;
|
|
2530
2544
|
if (type && target && target.ownerDocument) {
|
|
2531
2545
|
parse$1(target.ownerDocument);
|
|
2532
2546
|
}
|
|
@@ -2535,31 +2549,60 @@ function process$2() {
|
|
|
2535
2549
|
}
|
|
2536
2550
|
switch (type) {
|
|
2537
2551
|
case "attributes" /* Constant.Attributes */:
|
|
2538
|
-
processNode(target, 3 /* Source.Attributes */,
|
|
2552
|
+
processNode(target, 3 /* Source.Attributes */, timestamp);
|
|
2539
2553
|
break;
|
|
2540
2554
|
case "characterData" /* Constant.CharacterData */:
|
|
2541
|
-
processNode(target, 4 /* Source.CharacterData */,
|
|
2555
|
+
processNode(target, 4 /* Source.CharacterData */, timestamp);
|
|
2542
2556
|
break;
|
|
2543
2557
|
case "childList" /* Constant.ChildList */:
|
|
2544
|
-
processNodeList(mutation.addedNodes, 1 /* Source.ChildListAdd */, timer,
|
|
2545
|
-
processNodeList(mutation.removedNodes, 2 /* Source.ChildListRemove */, timer,
|
|
2546
|
-
break;
|
|
2547
|
-
case "suspend" /* Constant.Suspend */:
|
|
2548
|
-
value = get(target);
|
|
2549
|
-
if (value) {
|
|
2550
|
-
value.metadata.suspend = true;
|
|
2551
|
-
}
|
|
2558
|
+
processNodeList(mutation.addedNodes, 1 /* Source.ChildListAdd */, timer, timestamp);
|
|
2559
|
+
processNodeList(mutation.removedNodes, 2 /* Source.ChildListRemove */, timer, timestamp);
|
|
2552
2560
|
break;
|
|
2553
2561
|
}
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2562
|
+
return [2 /*return*/];
|
|
2563
|
+
}
|
|
2564
|
+
});
|
|
2565
|
+
});
|
|
2566
|
+
}
|
|
2567
|
+
function process$2() {
|
|
2568
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2569
|
+
var timer, record, instance, _i, _a, mutation, processedMutations, _b, _c, key, throttledMutationToProcess;
|
|
2570
|
+
return __generator(this, function (_d) {
|
|
2571
|
+
switch (_d.label) {
|
|
2572
|
+
case 0:
|
|
2573
|
+
timer = { id: id(), cost: 3 /* Metric.LayoutCost */ };
|
|
2574
|
+
start$y(timer);
|
|
2575
|
+
_d.label = 1;
|
|
2576
|
+
case 1:
|
|
2577
|
+
if (!(mutations.length > 0)) return [3 /*break*/, 3];
|
|
2578
|
+
record = mutations.shift();
|
|
2579
|
+
instance = time();
|
|
2580
|
+
for (_i = 0, _a = record.mutations; _i < _a.length; _i++) {
|
|
2581
|
+
mutation = _a[_i];
|
|
2582
|
+
processMutation(timer, mutation, instance, record.time);
|
|
2583
|
+
}
|
|
2584
|
+
return [4 /*yield*/, encode$4(6 /* Event.Mutation */, timer, record.time)];
|
|
2585
|
+
case 2:
|
|
2586
|
+
_d.sent();
|
|
2561
2587
|
return [3 /*break*/, 1];
|
|
2562
|
-
case
|
|
2588
|
+
case 3:
|
|
2589
|
+
processedMutations = false;
|
|
2590
|
+
for (_b = 0, _c = Object.keys(throttledMutations); _b < _c.length; _b++) {
|
|
2591
|
+
key = _c[_b];
|
|
2592
|
+
throttledMutationToProcess = throttledMutations[key];
|
|
2593
|
+
delete throttledMutations[key];
|
|
2594
|
+
processMutation(timer, throttledMutationToProcess.mutation, time(), throttledMutationToProcess.timestamp);
|
|
2595
|
+
processedMutations = true;
|
|
2596
|
+
}
|
|
2597
|
+
if (Object.keys(throttledMutations).length > 0) {
|
|
2598
|
+
processThrottledMutations();
|
|
2599
|
+
}
|
|
2600
|
+
if (!(Object.keys(throttledMutations).length === 0 && processedMutations)) return [3 /*break*/, 5];
|
|
2601
|
+
return [4 /*yield*/, encode$4(6 /* Event.Mutation */, timer, time())];
|
|
2602
|
+
case 4:
|
|
2603
|
+
_d.sent();
|
|
2604
|
+
_d.label = 5;
|
|
2605
|
+
case 5:
|
|
2563
2606
|
stop$w(timer);
|
|
2564
2607
|
return [2 /*return*/];
|
|
2565
2608
|
}
|
|
@@ -2590,14 +2633,16 @@ function track$5(m, timer, instance, timestamp) {
|
|
|
2590
2633
|
h[0] = inactive ? (h[1] === instance ? h[0] : h[0] + 1) : 1;
|
|
2591
2634
|
h[1] = instance;
|
|
2592
2635
|
// Return updated mutation type based on if we have already hit the threshold or not
|
|
2593
|
-
if (h[0]
|
|
2636
|
+
if (h[0] >= 10 /* Setting.MutationSuspendThreshold */) {
|
|
2594
2637
|
// Store a reference to removedNodes so we can process them later
|
|
2595
2638
|
// when we resume mutations again on user interactions
|
|
2596
2639
|
h[2] = m.removedNodes;
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2640
|
+
if (instance > timestamp + 3000 /* Setting.MutationActivePeriod */) {
|
|
2641
|
+
return m.type;
|
|
2642
|
+
}
|
|
2643
|
+
// we only store the most recent mutation for a given key if it is being throttled
|
|
2644
|
+
throttledMutations[key] = { mutation: m, timestamp: timestamp };
|
|
2645
|
+
return "throttle" /* Constant.Throttle */;
|
|
2601
2646
|
}
|
|
2602
2647
|
}
|
|
2603
2648
|
return m.type;
|
|
@@ -2644,6 +2689,12 @@ function processNodeList(list, source, timer, timestamp) {
|
|
|
2644
2689
|
});
|
|
2645
2690
|
});
|
|
2646
2691
|
}
|
|
2692
|
+
function processThrottledMutations() {
|
|
2693
|
+
if (throttleDelay) {
|
|
2694
|
+
clearTimeout(throttleDelay);
|
|
2695
|
+
}
|
|
2696
|
+
throttleDelay = setTimeout(function () { schedule$1(process$2, 1 /* Priority.High */); }, 33 /* Setting.LookAhead */);
|
|
2697
|
+
}
|
|
2647
2698
|
function schedule(node) {
|
|
2648
2699
|
// Only schedule manual trigger for this node if it's not already in the queue
|
|
2649
2700
|
if (queue$2.indexOf(node) < 0) {
|
|
@@ -3136,6 +3187,7 @@ var state$2 = [];
|
|
|
3136
3187
|
var elementAnimate = null;
|
|
3137
3188
|
var animationPlay = null;
|
|
3138
3189
|
var animationPause = null;
|
|
3190
|
+
var animationCommitStyles = null;
|
|
3139
3191
|
var animationCancel = null;
|
|
3140
3192
|
var animationFinish = null;
|
|
3141
3193
|
var animationId = 'clarityAnimationId';
|
|
@@ -3143,12 +3195,15 @@ var operationCount = 'clarityOperationCount';
|
|
|
3143
3195
|
var maxOperations = 20;
|
|
3144
3196
|
function start$i() {
|
|
3145
3197
|
if (window["Animation"] &&
|
|
3198
|
+
window["Animation"].prototype &&
|
|
3146
3199
|
window["KeyframeEffect"] &&
|
|
3200
|
+
window["KeyframeEffect"].prototype &&
|
|
3147
3201
|
window["KeyframeEffect"].prototype.getKeyframes &&
|
|
3148
3202
|
window["KeyframeEffect"].prototype.getTiming) {
|
|
3149
3203
|
reset$7();
|
|
3150
3204
|
overrideAnimationHelper(animationPlay, "play");
|
|
3151
3205
|
overrideAnimationHelper(animationPause, "pause");
|
|
3206
|
+
overrideAnimationHelper(animationCommitStyles, "commitStyles");
|
|
3152
3207
|
overrideAnimationHelper(animationCancel, "cancel");
|
|
3153
3208
|
overrideAnimationHelper(animationFinish, "finish");
|
|
3154
3209
|
if (elementAnimate === null) {
|
|
@@ -3232,6 +3287,9 @@ function trackAnimationOperation(animation, name) {
|
|
|
3232
3287
|
case "finish":
|
|
3233
3288
|
operation = 4 /* AnimationOperation.Finish */;
|
|
3234
3289
|
break;
|
|
3290
|
+
case "commitStyles":
|
|
3291
|
+
operation = 5 /* AnimationOperation.CommitStyles */;
|
|
3292
|
+
break;
|
|
3235
3293
|
}
|
|
3236
3294
|
if (operation) {
|
|
3237
3295
|
track$4(time(), animation[animationId], operation);
|
|
@@ -3612,6 +3670,9 @@ function encode$3 (type, ts) {
|
|
|
3612
3670
|
tokens.push(entry.data.y);
|
|
3613
3671
|
if (entry.data.id !== undefined) {
|
|
3614
3672
|
tokens.push(entry.data.id);
|
|
3673
|
+
if (entry.data.isPrimary !== undefined) {
|
|
3674
|
+
tokens.push(entry.data.isPrimary.toString());
|
|
3675
|
+
}
|
|
3615
3676
|
}
|
|
3616
3677
|
queue(tokens);
|
|
3617
3678
|
track$8(entry.event, entry.data.x, entry.data.y);
|
|
@@ -4785,7 +4846,7 @@ function shortid() {
|
|
|
4785
4846
|
}
|
|
4786
4847
|
function session() {
|
|
4787
4848
|
var output = { session: shortid(), ts: Math.round(Date.now()), count: 1, upgrade: null, upload: "" /* Constant.Empty */ };
|
|
4788
|
-
var value = getCookie("_clsk" /* Constant.SessionKey
|
|
4849
|
+
var value = getCookie("_clsk" /* Constant.SessionKey */, !config$2.includeSubdomains);
|
|
4789
4850
|
if (value) {
|
|
4790
4851
|
var parts = value.split("|" /* Constant.Pipe */);
|
|
4791
4852
|
// Making it backward & forward compatible by using greater than comparison (v0.6.21)
|
|
@@ -4805,7 +4866,7 @@ function num(string, base) {
|
|
|
4805
4866
|
}
|
|
4806
4867
|
function user() {
|
|
4807
4868
|
var output = { id: shortid(), version: 0, expiry: null, consent: 0 /* BooleanFlag.False */, dob: 0 };
|
|
4808
|
-
var cookie = getCookie("_clck" /* Constant.CookieKey
|
|
4869
|
+
var cookie = getCookie("_clck" /* Constant.CookieKey */, !config$2.includeSubdomains);
|
|
4809
4870
|
if (cookie && cookie.length > 0) {
|
|
4810
4871
|
// Splitting and looking up first part for forward compatibility, in case we wish to store additional information in a cookie
|
|
4811
4872
|
var parts = cookie.split("|" /* Constant.Pipe */);
|
|
@@ -4847,8 +4908,9 @@ function user() {
|
|
|
4847
4908
|
}
|
|
4848
4909
|
return output;
|
|
4849
4910
|
}
|
|
4850
|
-
function getCookie(key) {
|
|
4911
|
+
function getCookie(key, limit) {
|
|
4851
4912
|
var _a;
|
|
4913
|
+
if (limit === void 0) { limit = false; }
|
|
4852
4914
|
if (supported(document, "cookie" /* Constant.Cookie */)) {
|
|
4853
4915
|
var cookies = document.cookie.split(";" /* Constant.Semicolon */);
|
|
4854
4916
|
if (cookies) {
|
|
@@ -4865,6 +4927,12 @@ function getCookie(key) {
|
|
|
4865
4927
|
while (isEncoded) {
|
|
4866
4928
|
_a = decodeCookieValue(decodedValue), isEncoded = _a[0], decodedValue = _a[1];
|
|
4867
4929
|
}
|
|
4930
|
+
// If we are limiting cookies, check if the cookie value is limited
|
|
4931
|
+
if (limit) {
|
|
4932
|
+
return decodedValue.endsWith("".concat("~" /* Constant.Tilde */, "1"))
|
|
4933
|
+
? decodedValue.substring(0, decodedValue.length - 2)
|
|
4934
|
+
: null;
|
|
4935
|
+
}
|
|
4868
4936
|
return decodedValue;
|
|
4869
4937
|
}
|
|
4870
4938
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";var t=Object.freeze({__proto__:null,get queue(){return gt},get start(){return vt},get stop(){return mt},get track(){return st}}),n=Object.freeze({__proto__:null,get check(){return Et},get compute(){return Mt},get data(){return lt},get start(){return _t},get stop(){return Ot},get trigger(){return It}}),e=Object.freeze({__proto__:null,get compute(){return qt},get data(){return Tt},get log(){return At},get reset(){return Nt},get start(){return zt},get stop(){return Ct},get updates(){return xt}}),r=Object.freeze({__proto__:null,get callback(){return Zt},get callbacks(){return Rt},get clear(){return Wt},get consent(){return Jt},get data(){return Pt},get electron(){return Ut},get id(){return Xt},get metadata(){return Bt},get save(){return Gt},get shortid(){return Kt},get start(){return Lt},get stop(){return Vt}}),o=Object.freeze({__proto__:null,get data(){return on},get envelope(){return un},get start(){return an},get stop(){return cn}}),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,longTask:30};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.56";var l=!0,d=null,f=null;function p(t,n,e){return function(){if(l&&null===d)try{d=new RegExp("\\p{N}","gu"),f=new RegExp("\\p{L}","gu"),new RegExp("\\p{Sc}","gu")}catch(t){l=!1}}(),t?t.replace(f,n).replace(d,e):t}var h=[],v=null;function g(){}var m=[];function y(){}function w(){}var b=Object.freeze({__proto__:null,checkDocumentStyles:function(t){},compute:function(){},data:v,hashText:y,keys:m,log:g,observe:function(){},reset:function(){},sheetAdoptionState:[],sheetUpdateState:[],start:function(){},state:h,stop:function(){},trigger:w}),k=null;function S(t,n){An()&&t&&"string"==typeof t&&t.length<255&&(k=n&&"string"==typeof n&&n.length<255?{key:t,value:n}:{value:t},St(24))}var _,E=null,I=null;function M(t){t in E||(E[t]=0),t in I||(I[t]=0),E[t]++,I[t]++}function O(t,n){null!==n&&(t in E||(E[t]=0),t in I||(I[t]=0),E[t]+=n,I[t]+=n)}function T(t,n){null!==n&&!1===isNaN(n)&&(t in E||(E[t]=0),(n>E[t]||0===E[t])&&(I[t]=n,E[t]=n))}function x(t,n,e){return window.setTimeout(dn(t),n,e)}function j(t){return window.clearTimeout(t)}var z=0,C=0,A=null;function q(){A&&j(A),A=x(N,C),z=u()}function N(){var t=u();_={gap:t-z},St(25),_.gap<3e5?A=x(N,C):jn&&(S("clarity","suspend"),ne(),["mousemove","touchstart"].forEach((function(t){return pn(document,t,qn)})),["resize","scroll","pageshow"].forEach((function(t){return pn(window,t,qn)})))}var D=Object.freeze({__proto__:null,get data(){return _},reset:q,start:function(){C=6e4,z=0},stop:function(){j(A),z=0,C=0}}),P=null;function R(t){An()&&a.lean&&(a.lean=!1,P={key:t},Zt(),Gt(),a.upgrade&&a.upgrade(t),St(3))}var U=Object.freeze({__proto__:null,get data(){return P},start:function(){!a.lean&&a.upgrade&&a.upgrade("Config"),P=null},stop:function(){P=null},upgrade:R});function H(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 L(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 V=null;function B(t,n){J(t,"string"==typeof n?[n]:n)}function X(t,n,e,r){return void 0===n&&(n=null),void 0===e&&(e=null),void 0===r&&(r=null),H(this,void 0,void 0,(function(){var o,a;return L(this,(function(i){switch(i.label){case 0:return a={},[4,G(t)];case 1:return a.userId=i.sent(),a.userHint=r||((c=t)&&c.length>=5?"".concat(c.substring(0,2)).concat(p(c.substring(2),"*","*")):p(c,"*","*")),J("userId",[(o=a).userId]),J("userHint",[o.userHint]),J("userType",[F(t)]),n&&(J("sessionId",[n]),o.sessionId=n),e&&(J("pageId",[e]),o.pageId=e),[2,o]}var c}))}))}function J(t,n){if(An()&&t&&n&&"string"==typeof t&&t.length<255){for(var e=(t in V?V[t]:[]),r=0;r<n.length;r++)"string"==typeof n[r]&&n[r].length<255&&e.push(n[r]);V[t]=e}}function W(){St(34)}function Z(){V={}}function G(t){return H(this,void 0,void 0,(function(){var n;return L(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 F(t){return t&&t.indexOf("@")>0?"email":"string"}var Y="CompressionStream"in window;function K(t){return H(this,void 0,void 0,(function(){var n,e;return L(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),Y?(n=new ReadableStream({start:function(n){return H(this,void 0,void 0,(function(){return L(this,(function(e){return n.enqueue(t),n.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),e=Uint8Array.bind,[4,Q(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 Q(t){return H(this,void 0,void 0,(function(){var n,e,r,o,a;return L(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 $=null;function tt(t){try{if(!$)return;var n=function(t){try{return JSON.parse(t)}catch(t){return[]}}(t);n.forEach((function(t){$(t)}))}catch(t){}}var nt=[b,e,Object.freeze({__proto__:null,compute:W,get data(){return V},identify:X,reset:Z,set:B,start:function(){Z()},stop:function(){Z()}}),n,b,r,o,t,D,U,b];function et(){E={},I={},M(5),nt.forEach((function(t){return dn(t.start)()}))}function rt(){nt.slice().reverse().forEach((function(t){return dn(t.stop)()})),E={},I={}}function ot(){W(),qt(),St(0),Mt()}var at,it,ct,ut,st,lt,dt=0,ft=0,pt=null,ht=0;function vt(){ut=!0,dt=0,ft=0,ht=0,at=[],it=[],ct={},st=null}function gt(t,n){if(void 0===n&&(n=!0),ut){var e=u(),r=t.length>1?t[1]:null,o=JSON.stringify(t);switch(r){case 5:dt+=o.length;case 37:case 6:case 43:case 45:case 46:ft+=o.length,at.push(o);break;default:it.push(o)}M(25);var i=function(){var t=!1===a.lean&&dt>0?100:on.sequence*a.delay;return"string"==typeof a.upload?Math.max(Math.min(t,3e4),100):a.delay}();e-ht>2*i&&(j(pt),pt=null),n&&null===pt&&(25!==r&&q(),pt=x(yt,i),ht=e,Et(ft))}}function mt(){j(pt),yt(!0),dt=0,ft=0,ht=0,at=[],it=[],ct={},st=null,ut=!1}function yt(t){return void 0===t&&(t=!1),H(this,void 0,void 0,(function(){var n,e,r,o,i,c,u,s;return L(this,(function(l){switch(l.label){case 0:return pt=null,(n=!1===a.lean&&ft>0&&(ft<1048576||on.sequence>0))&&T(1,1),ot(),e=!0===t,r=JSON.stringify(un(e)),o="[".concat(it.join(),"]"),i=n?"[".concat(at.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,K(c)];case 2:s=l.sent(),l.label=3;case 3:return O(2,(u=s)?u.length:c.length),wt(c,u,on.sequence,e),it=[],n&&(at=[],ft=0,dt=0),[2]}}))}))}function wt(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))&&kt(e)}catch(t){}if(!1===i){e in ct?ct[e].attempts++:ct[e]={data:t,attempts:1};var c=new XMLHttpRequest;c.open("POST",o,!0),c.timeout=15e3,c.ontimeout=function(){ln(new Error("".concat("Timeout"," : ").concat(o)))},null!==e&&(c.onreadystatechange=function(){dn(bt)(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),kt(e)}}function bt(t,n){var e=ct[n];t&&4===t.readyState&&e&&((t.status<200||t.status>208)&&e.attempts<=1?t.status>=400&&t.status<500?It(6):(0===t.status&&(a.upload=a.fallback?a.fallback:a.upload),wt(e.data,null,n)):(st={sequence:n,attempts:e.attempts,status:t.status},e.attempts>1&&St(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":It(6);break;case"UPGRADE":R("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&&tt(i[1])}}}(t.responseText),0===t.status&&(wt(e.data,null,n,!0),It(3)),t.status>=200&&t.status<=208&&kt(n),delete ct[n]))}function kt(t){1===t&&(Gt(),Zt())}function St(t){var n=[u(),t];switch(t){case 4:var e=h;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),gt(n,!1));break;case 25:n.push(_.gap),gt(n);break;case 35:n.push(lt.check),gt(n,!1);break;case 3:n.push(P.key),gt(n);break;case 2:n.push(st.sequence),n.push(st.attempts),n.push(st.status),gt(n,!1);break;case 24:k.key&&n.push(k.key),n.push(k.value),gt(n);break;case 34:var r=Object.keys(V);if(r.length>0){for(var o=0,a=r;o<a.length;o++){var i=a[o];n.push(i),n.push(V[i])}Z(),gt(n,!1)}break;case 0:var c=Object.keys(I);if(c.length>0){for(var s=0,l=c;s<l.length;s++){var d=l[s],f=parseInt(d,10);n.push(f),n.push(Math.round(I[d]))}I={},gt(n,!1)}break;case 1:var p=Object.keys(xt);if(p.length>0){for(var g=0,y=p;g<y.length;g++){var w=y[g];f=parseInt(w,10);n.push(f),n.push(xt[w])}Nt(),gt(n,!1)}break;case 36:var b=Object.keys(v);if(b.length>0){for(var S=0,E=b;S<E.length;S++){var M=E[S];f=parseInt(M,10);n.push(f),n.push([].concat.apply([],v[M]))}gt(n,!1)}break;case 40:m.forEach((function(t){n.push(t);var e=[];for(var r in v[t]){var o=parseInt(r,10);e.push(o),e.push(v[t][r])}n.push(e)})),gt(n,!1)}}function _t(){lt={check:0}}function Et(t){if(0===lt.check){var n=lt.check;n=on.sequence>=128?1:n,n=on.pageNum>=128?7:n,n=u()>72e5?2:n,(n=t>10485760?2:n)!==lt.check&&It(n)}}function It(t){lt.check=t,5!==t&&(Wt(),ne())}function Mt(){0!==lt.check&&St(35)}function Ot(){lt=null}var Tt=null,xt=null,jt=!1;function zt(){Tt={},xt={},jt=!1}function Ct(){Tt={},xt={},jt=!1}function At(t,n){if(n&&(n="".concat(n),t in Tt||(Tt[t]=[]),Tt[t].indexOf(n)<0)){if(Tt[t].length>128)return void(jt||(jt=!0,It(5)));Tt[t].push(n),t in xt||(xt[t]=[]),xt[t].push(n)}}function qt(){St(1)}function Nt(){xt={},jt=!1}function Dt(t){At(36,t.toString())}var Pt=null,Rt=[],Ut=0,Ht=null;function Lt(){var t,n,e;Ht=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:"";Ut=r.indexOf("Electron")>0?1:0;var s,l=function(){var t={session:Kt(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},n=tn("_clsk");if(n){var e=n.split("|");e.length>=5&&t.ts-Qt(e[1])<18e5&&(t.session=e[0],t.count=Qt(e[2])+1,t.upgrade=Qt(e[3]),t.upload=e.length>=6?"".concat("https://").concat(e[5],"/").concat(e[4]):"".concat("https://").concat(e[4]))}return t}(),d=$t(),f=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);Pt={projectId:f,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,At(0,r),At(3,u),At(1,function(t,n){if(void 0===n&&(n=!1),n)return"".concat("https://").concat("Electron");var e=a.drop;if(e&&e.length>0&&t&&t.indexOf("?")>0){var r=t.split("?");return r[0]+"?"+r[1].split("&").map((function(t){return e.some((function(n){return 0===t.indexOf("".concat(n,"="))}))?"".concat(t.split("=")[0],"=").concat("*na*"):t})).join("&")}return t}(location.href,!!Ut)),At(2,document.referrer),At(15,function(){var t=Kt();if(a.track&&Ft(window,"sessionStorage")){var n=sessionStorage.getItem("_cltk");t=n||t,sessionStorage.setItem("_cltk",t)}return t}()),At(16,document.documentElement.lang),At(17,document.dir),At(26,"".concat(window.devicePixelRatio)),At(28,d.dob.toString()),At(29,d.version.toString()),At(33,c),At(34,o),At(35,i),T(0,l.ts),T(1,0),T(35,Ut),navigator&&(At(9,navigator.language),T(33,navigator.hardwareConcurrency),T(32,navigator.maxTouchPoints),T(34,Math.round(navigator.deviceMemory)),(s=navigator.userAgentData)&&s.getHighEntropyValues?s.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var n;At(22,t.platform),At(23,t.platformVersion),null===(n=t.brands)||void 0===n||n.forEach((function(t){At(24,t.name+"~"+t.version)})),At(25,t.model),T(27,t.mobile?1:0)})):At(22,navigator.platform)),screen&&(T(14,Math.round(screen.width)),T(15,Math.round(screen.height)),T(16,Math.round(screen.colorDepth)));for(var p=0,h=a.cookies;p<h.length;p++){var v=h[p],g=tn(v);g&&B(v,g)}!function(t){Dt(t?1:0)}(a.track),Yt(d)}function Vt(){Ht=null,Pt=null,Rt.forEach((function(t){t.called=!1}))}function Bt(t,n,e){void 0===n&&(n=!0),void 0===e&&(e=!1);var r=a.lean?0:1,o=!1;Pt&&(r||!1===n)&&(t(Pt,!a.lean),o=!0),!e&&o||Rt.push({callback:t,wait:n,recall:e,called:o})}function Xt(){return Pt?[Pt.userId,Pt.sessionId,Pt.pageNum].join("."):""}function Jt(t){if(void 0===t&&(t=!0),!t)return a.track=!1,en("_clsk","",-Number.MAX_VALUE),en("_clck","",-Number.MAX_VALUE),ne(),void window.setTimeout(te,250);An()&&(a.track=!0,Yt($t(),1),Gt(),Dt(2))}function Wt(){en("_clsk","",0)}function Zt(){!function(t){if(Rt.length>0)for(var n=0;n<Rt.length;n++){var e=Rt[n];!e.callback||e.called||e.wait&&!t||(e.callback(Pt,!a.lean),e.called=!0,e.recall||(Rt.splice(n,1),n--))}}(a.lean?0:1)}function Gt(){if(Pt){var t=Math.round(Date.now()),n=a.upload&&"string"==typeof a.upload?a.upload.replace("https://",""):"",e=a.lean?0:1;en("_clsk",[Pt.sessionId,t,Pt.pageNum,e,n].join("|"),1)}}function Ft(t,n){try{return!!t[n]}catch(t){return!1}}function Yt(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)&&en("_clck",[Pt.userId,2,e.toString(36),n,r].join("|"),365)}function Kt(){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 Qt(t,n){return void 0===n&&(n=10),parseInt(t,n)}function $t(){var t={id:Kt(),version:0,expiry:null,consent:0,dob:0},n=tn("_clck");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=Qt(e[1])),e.length>2&&(t.expiry=Qt(e[2],36)),e.length>3&&1===Qt(e[3])&&(t.consent=1),e.length>4&&Qt(e[1])>1&&(t.dob=Qt(e[4])),a.track=a.track||1===t.consent,t.id=a.track?e[0]:t.id}return t}function tn(t){var n;if(Ft(document,"cookie")){var e=document.cookie.split(";");if(e)for(var r=0;r<e.length;r++){var o=e[r].split("=");if(o.length>1&&o[0]&&o[0].trim()===t){for(var a=nn(o[1]),i=a[0],c=a[1];i;)i=(n=nn(c))[0],c=n[1];return c}}}return null}function nn(t){try{var n=decodeURIComponent(t);return[n!=t,n]}catch(t){}return[!1,t]}function en(t,n,e){if((a.track||""==n)&&(navigator&&navigator.cookieEnabled||Ft(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===Ht){for(var u=location.hostname?location.hostname.split("."):[],s=u.length-1;s>=0;s--)if(Ht=".".concat(u[s]).concat(Ht||""),s<u.length-1&&(document.cookie="".concat(c).concat(";").concat("domain=").concat(Ht),tn(t)===n))return;Ht=""}}catch(t){Ht=""}document.cookie=Ht?"".concat(c).concat(";").concat("domain=").concat(Ht):c}}var rn,on=null;function an(){var t=Pt;on={version:s,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0}}function cn(){on=null}function un(t){return on.start=on.start+on.duration,on.duration=u()-on.start,on.sequence++,on.upload=t&&"sendBeacon"in navigator?1:0,on.end=t?1:0,[on.version,on.sequence,on.start,on.duration,on.projectId,on.userId,on.sessionId,on.pageNum,on.upload,on.end]}function sn(){rn=[]}function ln(t){if(rn&&-1===rn.indexOf(t.message)){var n=a.report;if(n&&n.length>0){var e={v:on.version,p:on.projectId,u:on.userId,s:on.sessionId,n:on.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)),rn.push(t.message)}}return t}function dn(t){return function(){var n=performance.now();try{t.apply(this,arguments)}catch(t){throw ln(t)}var e=performance.now()-n;O(4,e),e>a.longTask&&(M(7),T(6,e))}}var fn=[];function pn(t,n,e,r){void 0===r&&(r=!1),e=dn(e);try{t[i("addEventListener")](n,e,r),fn.push({event:n,target:t,listener:e,capture:r})}catch(t){}}function hn(){for(var t=0,n=fn;t<n.length;t++){var e=n[t];try{e.target[i("removeEventListener")](e.event,e.listener,e.capture)}catch(t){}}fn=[]}var vn=null,gn=null,mn=null,yn=0;function wn(){return!(yn++>20)}function bn(){yn=0,mn!==Sn()&&(ne(),window.setTimeout(kn,250))}function kn(){te(),T(29,1)}function Sn(){return location.href?location.href.replace(location.hash,""):location.href}var _n=[],En=null,In=null,Mn=null;function On(){In&&(Mn(),In=null,null===En&&xn())}function Tn(){_n=[],En=null,In=null}function xn(){var t=_n.shift();t&&(En=t,t.task().then((function(){t.id===Xt()&&(t.resolve(),En=null,xn())})).catch((function(n){t.id===Xt()&&(n&&(n.name,n.message,n.stack),En=null,xn())})))}var jn=!1;function zn(){jn=!0,c=performance.now()+performance.timeOrigin,Tn(),hn(),sn(),mn=Sn(),yn=0,pn(window,"popstate",bn),null===vn&&(vn=history.pushState,history.pushState=function(){vn.apply(this,arguments),An()&&wn()&&bn()}),null===gn&&(gn=history.replaceState,history.replaceState=function(){gn.apply(this,arguments),An()&&wn()&&bn()})}function Cn(){mn=null,yn=0,sn(),hn(),Tn(),c=0,jn=!1}function An(){return jn}function qn(){te(),S("clarity","restart")}var Nn=null;function Dn(){Nn=null}function Pn(t){Nn={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){H(this,void 0,void 0,(function(){var n,e;return L(this,(function(r){return n=u(),e=[n,t],29===t&&(e.push(Nn.fetchStart),e.push(Nn.connectStart),e.push(Nn.connectEnd),e.push(Nn.requestStart),e.push(Nn.responseStart),e.push(Nn.responseEnd),e.push(Nn.domInteractive),e.push(Nn.domComplete),e.push(Nn.loadEventStart),e.push(Nn.loadEventEnd),e.push(Nn.redirectCount),e.push(Nn.size),e.push(Nn.type),e.push(Nn.protocol),e.push(Nn.encodedSize),e.push(Nn.decodedSize),Dn(),gt(e)),[2]}))}))}(29)}var Rn,Un=0,Hn=1/0,Ln=0,Vn=0,Bn=[],Xn=new Map,Jn=function(){return Un||0},Wn=function(){if(!Bn.length)return-1;var t=Math.min(Bn.length-1,Math.floor((Jn()-Vn)/50));return Bn[t].latency},Zn=function(){Vn=Jn(),Bn.length=0,Xn.clear()},Gn=function(t){if(t.interactionId&&!(t.duration<40)){!function(t){"interactionCount"in performance?Un=performance.interactionCount:t.interactionId&&(Hn=Math.min(Hn,t.interactionId),Ln=Math.max(Ln,t.interactionId),Un=Ln?(Ln-Hn)/7+1:0)}(t);var n=Bn[Bn.length-1],e=Xn.get(t.interactionId);if(e||Bn.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};Xn.set(r.id,r),Bn.push(r)}Bn.sort((function(t,n){return n.latency-t.latency})),Bn.length>10&&Bn.splice(10).forEach((function(t){return Xn.delete(t.id)}))}}},Fn=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint","event"];function Yn(){try{Rn&&Rn.disconnect(),Rn=new PerformanceObserver(dn(Kn));for(var t=0,n=Fn;t<n.length;t++){var e=n[t];PerformanceObserver.supportedEntryTypes.indexOf(e)>=0&&("layout-shift"===e&&O(9,0),Rn.observe({type:e,buffered:!0}))}}catch(t){}}function Kn(t){!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":Pn(r);break;case"resource":var o=r.name;At(4,Qn(o)),o!==a.upload&&o!==a.fallback||T(28,r.duration);break;case"longtask":M(7);break;case"first-input":n&&T(10,r.processingStart-r.startTime);break;case"event":n&&"PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&(Gn(r),At(37,Wn().toString()));break;case"layout-shift":n&&!r.hadRecentInput&&O(9,1e3*r.value);break;case"largest-contentful-paint":n&&T(8,r.startTime)}}}(t.getEntries())}function Qn(t){var n=document.createElement("a");return n.href=t,n.host}var $n=[b,b,b,Object.freeze({__proto__:null,start:function(){Dn(),function(){navigator&&"connection"in navigator&&At(27,navigator.connection.effectiveType),window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&("complete"!==document.readyState?pn(window,"load",x.bind(this,Yn,0)):Yn())}()},stop:function(){Rn&&Rn.disconnect(),Rn=null,Zn(),Dn()}})];function te(t){void 0===t&&(t=null),function(){try{var t=navigator&&"globalPrivacyControl"in navigator&&1==navigator.globalPrivacyControl;return!1===jn&&"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||jn)return!1;for(var n in t)n in a&&(a[n]=t[n])}(t),zn(),et(),$n.forEach((function(t){return dn(t.start)()})),null===t&&ae())}function ne(){An()&&($n.slice().reverse().forEach((function(t){return dn(t.stop)()})),rt(),Cn(),void 0!==re&&(re[oe]=function(){(re[oe].q=re[oe].q||[]).push(arguments),"start"===arguments[0]&&re[oe].q.unshift(re[oe].q.pop())&&ae()}))}var ee=Object.freeze({__proto__:null,consent:Jt,event:S,hashText:y,identify:X,metadata:Bt,pause:function(){An()&&(S("clarity","pause"),null===In&&(In=new Promise((function(t){Mn=t}))))},resume:function(){An()&&(On(),S("clarity","resume"))},set:B,signal:function(t){$=t},start:te,stop:ne,upgrade:R,version:s}),re=window,oe="clarity";function ae(){if(void 0!==re){if(re[oe]&&re[oe].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=re[oe]&&re[oe].q||[];for(re[oe]=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return ee[t].apply(ee,n)},re[oe].v=s;t.length>0;)re[oe].apply(re,t.shift())}}ae()}();
|
|
1
|
+
!function(){"use strict";var t=Object.freeze({__proto__:null,get queue(){return gt},get start(){return vt},get stop(){return mt},get track(){return st}}),n=Object.freeze({__proto__:null,get check(){return Et},get compute(){return Mt},get data(){return lt},get start(){return _t},get stop(){return Ot},get trigger(){return It}}),e=Object.freeze({__proto__:null,get compute(){return qt},get data(){return Tt},get log(){return At},get reset(){return Nt},get start(){return zt},get stop(){return Ct},get updates(){return xt}}),r=Object.freeze({__proto__:null,get callback(){return Zt},get callbacks(){return Rt},get clear(){return Jt},get consent(){return Wt},get data(){return Pt},get electron(){return Ut},get id(){return Xt},get metadata(){return Bt},get save(){return Gt},get shortid(){return Kt},get start(){return Lt},get stop(){return Vt}}),o=Object.freeze({__proto__:null,get data(){return on},get envelope(){return un},get start(){return an},get stop(){return cn}}),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,longTask:30,includeSubdomains:!0};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.58";var l=!0,d=null,f=null;function p(t,n,e){return function(){if(l&&null===d)try{d=new RegExp("\\p{N}","gu"),f=new RegExp("\\p{L}","gu"),new RegExp("\\p{Sc}","gu")}catch(t){l=!1}}(),t?t.replace(f,n).replace(d,e):t}var h=[],v=null;function g(){}var m=[];function y(){}function b(){}var w=Object.freeze({__proto__:null,checkDocumentStyles:function(t){},compute:function(){},data:v,hashText:y,keys:m,log:g,observe:function(){},reset:function(){},sheetAdoptionState:[],sheetUpdateState:[],start:function(){},state:h,stop:function(){},trigger:b}),k=null;function S(t,n){An()&&t&&"string"==typeof t&&t.length<255&&(k=n&&"string"==typeof n&&n.length<255?{key:t,value:n}:{value:t},St(24))}var _,E=null,I=null;function M(t){t in E||(E[t]=0),t in I||(I[t]=0),E[t]++,I[t]++}function O(t,n){null!==n&&(t in E||(E[t]=0),t in I||(I[t]=0),E[t]+=n,I[t]+=n)}function T(t,n){null!==n&&!1===isNaN(n)&&(t in E||(E[t]=0),(n>E[t]||0===E[t])&&(I[t]=n,E[t]=n))}function x(t,n,e){return window.setTimeout(dn(t),n,e)}function j(t){return window.clearTimeout(t)}var z=0,C=0,A=null;function q(){A&&j(A),A=x(N,C),z=u()}function N(){var t=u();_={gap:t-z},St(25),_.gap<3e5?A=x(N,C):jn&&(S("clarity","suspend"),ne(),["mousemove","touchstart"].forEach((function(t){return pn(document,t,qn)})),["resize","scroll","pageshow"].forEach((function(t){return pn(window,t,qn)})))}var D=Object.freeze({__proto__:null,get data(){return _},reset:q,start:function(){C=6e4,z=0},stop:function(){j(A),z=0,C=0}}),P=null;function R(t){An()&&a.lean&&(a.lean=!1,P={key:t},Zt(),Gt(),a.upgrade&&a.upgrade(t),St(3))}var U=Object.freeze({__proto__:null,get data(){return P},start:function(){!a.lean&&a.upgrade&&a.upgrade("Config"),P=null},stop:function(){P=null},upgrade:R});function H(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 L(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 V=null;function B(t,n){W(t,"string"==typeof n?[n]:n)}function X(t,n,e,r){return void 0===n&&(n=null),void 0===e&&(e=null),void 0===r&&(r=null),H(this,void 0,void 0,(function(){var o,a;return L(this,(function(i){switch(i.label){case 0:return a={},[4,G(t)];case 1:return a.userId=i.sent(),a.userHint=r||((c=t)&&c.length>=5?"".concat(c.substring(0,2)).concat(p(c.substring(2),"*","*")):p(c,"*","*")),W("userId",[(o=a).userId]),W("userHint",[o.userHint]),W("userType",[F(t)]),n&&(W("sessionId",[n]),o.sessionId=n),e&&(W("pageId",[e]),o.pageId=e),[2,o]}var c}))}))}function W(t,n){if(An()&&t&&n&&"string"==typeof t&&t.length<255){for(var e=(t in V?V[t]:[]),r=0;r<n.length;r++)"string"==typeof n[r]&&n[r].length<255&&e.push(n[r]);V[t]=e}}function J(){St(34)}function Z(){V={}}function G(t){return H(this,void 0,void 0,(function(){var n;return L(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 F(t){return t&&t.indexOf("@")>0?"email":"string"}var Y="CompressionStream"in window;function K(t){return H(this,void 0,void 0,(function(){var n,e;return L(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),Y?(n=new ReadableStream({start:function(n){return H(this,void 0,void 0,(function(){return L(this,(function(e){return n.enqueue(t),n.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),e=Uint8Array.bind,[4,Q(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 Q(t){return H(this,void 0,void 0,(function(){var n,e,r,o,a;return L(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 $=null;function tt(t){try{if(!$)return;var n=function(t){try{return JSON.parse(t)}catch(t){return[]}}(t);n.forEach((function(t){$(t)}))}catch(t){}}var nt=[w,e,Object.freeze({__proto__:null,compute:J,get data(){return V},identify:X,reset:Z,set:B,start:function(){Z()},stop:function(){Z()}}),n,w,r,o,t,D,U,w];function et(){E={},I={},M(5),nt.forEach((function(t){return dn(t.start)()}))}function rt(){nt.slice().reverse().forEach((function(t){return dn(t.stop)()})),E={},I={}}function ot(){J(),qt(),St(0),Mt()}var at,it,ct,ut,st,lt,dt=0,ft=0,pt=null,ht=0;function vt(){ut=!0,dt=0,ft=0,ht=0,at=[],it=[],ct={},st=null}function gt(t,n){if(void 0===n&&(n=!0),ut){var e=u(),r=t.length>1?t[1]:null,o=JSON.stringify(t);switch(r){case 5:dt+=o.length;case 37:case 6:case 43:case 45:case 46:ft+=o.length,at.push(o);break;default:it.push(o)}M(25);var i=function(){var t=!1===a.lean&&dt>0?100:on.sequence*a.delay;return"string"==typeof a.upload?Math.max(Math.min(t,3e4),100):a.delay}();e-ht>2*i&&(j(pt),pt=null),n&&null===pt&&(25!==r&&q(),pt=x(yt,i),ht=e,Et(ft))}}function mt(){j(pt),yt(!0),dt=0,ft=0,ht=0,at=[],it=[],ct={},st=null,ut=!1}function yt(t){return void 0===t&&(t=!1),H(this,void 0,void 0,(function(){var n,e,r,o,i,c,u,s;return L(this,(function(l){switch(l.label){case 0:return pt=null,(n=!1===a.lean&&ft>0&&(ft<1048576||on.sequence>0))&&T(1,1),ot(),e=!0===t,r=JSON.stringify(un(e)),o="[".concat(it.join(),"]"),i=n?"[".concat(at.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,K(c)];case 2:s=l.sent(),l.label=3;case 3:return O(2,(u=s)?u.length:c.length),bt(c,u,on.sequence,e),it=[],n&&(at=[],ft=0,dt=0),[2]}}))}))}function bt(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))&&kt(e)}catch(t){}if(!1===i){e in ct?ct[e].attempts++:ct[e]={data:t,attempts:1};var c=new XMLHttpRequest;c.open("POST",o,!0),c.timeout=15e3,c.ontimeout=function(){ln(new Error("".concat("Timeout"," : ").concat(o)))},null!==e&&(c.onreadystatechange=function(){dn(wt)(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),kt(e)}}function wt(t,n){var e=ct[n];t&&4===t.readyState&&e&&((t.status<200||t.status>208)&&e.attempts<=1?t.status>=400&&t.status<500?It(6):(0===t.status&&(a.upload=a.fallback?a.fallback:a.upload),bt(e.data,null,n)):(st={sequence:n,attempts:e.attempts,status:t.status},e.attempts>1&&St(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":It(6);break;case"UPGRADE":R("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&&tt(i[1])}}}(t.responseText),0===t.status&&(bt(e.data,null,n,!0),It(3)),t.status>=200&&t.status<=208&&kt(n),delete ct[n]))}function kt(t){1===t&&(Gt(),Zt())}function St(t){var n=[u(),t];switch(t){case 4:var e=h;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),gt(n,!1));break;case 25:n.push(_.gap),gt(n);break;case 35:n.push(lt.check),gt(n,!1);break;case 3:n.push(P.key),gt(n);break;case 2:n.push(st.sequence),n.push(st.attempts),n.push(st.status),gt(n,!1);break;case 24:k.key&&n.push(k.key),n.push(k.value),gt(n);break;case 34:var r=Object.keys(V);if(r.length>0){for(var o=0,a=r;o<a.length;o++){var i=a[o];n.push(i),n.push(V[i])}Z(),gt(n,!1)}break;case 0:var c=Object.keys(I);if(c.length>0){for(var s=0,l=c;s<l.length;s++){var d=l[s],f=parseInt(d,10);n.push(f),n.push(Math.round(I[d]))}I={},gt(n,!1)}break;case 1:var p=Object.keys(xt);if(p.length>0){for(var g=0,y=p;g<y.length;g++){var b=y[g];f=parseInt(b,10);n.push(f),n.push(xt[b])}Nt(),gt(n,!1)}break;case 36:var w=Object.keys(v);if(w.length>0){for(var S=0,E=w;S<E.length;S++){var M=E[S];f=parseInt(M,10);n.push(f),n.push([].concat.apply([],v[M]))}gt(n,!1)}break;case 40:m.forEach((function(t){n.push(t);var e=[];for(var r in v[t]){var o=parseInt(r,10);e.push(o),e.push(v[t][r])}n.push(e)})),gt(n,!1)}}function _t(){lt={check:0}}function Et(t){if(0===lt.check){var n=lt.check;n=on.sequence>=128?1:n,n=on.pageNum>=128?7:n,n=u()>72e5?2:n,(n=t>10485760?2:n)!==lt.check&&It(n)}}function It(t){lt.check=t,5!==t&&(Jt(),ne())}function Mt(){0!==lt.check&&St(35)}function Ot(){lt=null}var Tt=null,xt=null,jt=!1;function zt(){Tt={},xt={},jt=!1}function Ct(){Tt={},xt={},jt=!1}function At(t,n){if(n&&(n="".concat(n),t in Tt||(Tt[t]=[]),Tt[t].indexOf(n)<0)){if(Tt[t].length>128)return void(jt||(jt=!0,It(5)));Tt[t].push(n),t in xt||(xt[t]=[]),xt[t].push(n)}}function qt(){St(1)}function Nt(){xt={},jt=!1}function Dt(t){At(36,t.toString())}var Pt=null,Rt=[],Ut=0,Ht=null;function Lt(){var t,n,e;Ht=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:"";Ut=r.indexOf("Electron")>0?1:0;var s,l=function(){var t={session:Kt(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},n=tn("_clsk",!a.includeSubdomains);if(n){var e=n.split("|");e.length>=5&&t.ts-Qt(e[1])<18e5&&(t.session=e[0],t.count=Qt(e[2])+1,t.upgrade=Qt(e[3]),t.upload=e.length>=6?"".concat("https://").concat(e[5],"/").concat(e[4]):"".concat("https://").concat(e[4]))}return t}(),d=$t(),f=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);Pt={projectId:f,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,At(0,r),At(3,u),At(1,function(t,n){if(void 0===n&&(n=!1),n)return"".concat("https://").concat("Electron");var e=a.drop;if(e&&e.length>0&&t&&t.indexOf("?")>0){var r=t.split("?");return r[0]+"?"+r[1].split("&").map((function(t){return e.some((function(n){return 0===t.indexOf("".concat(n,"="))}))?"".concat(t.split("=")[0],"=").concat("*na*"):t})).join("&")}return t}(location.href,!!Ut)),At(2,document.referrer),At(15,function(){var t=Kt();if(a.track&&Ft(window,"sessionStorage")){var n=sessionStorage.getItem("_cltk");t=n||t,sessionStorage.setItem("_cltk",t)}return t}()),At(16,document.documentElement.lang),At(17,document.dir),At(26,"".concat(window.devicePixelRatio)),At(28,d.dob.toString()),At(29,d.version.toString()),At(33,c),At(34,o),At(35,i),T(0,l.ts),T(1,0),T(35,Ut),navigator&&(At(9,navigator.language),T(33,navigator.hardwareConcurrency),T(32,navigator.maxTouchPoints),T(34,Math.round(navigator.deviceMemory)),(s=navigator.userAgentData)&&s.getHighEntropyValues?s.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var n;At(22,t.platform),At(23,t.platformVersion),null===(n=t.brands)||void 0===n||n.forEach((function(t){At(24,t.name+"~"+t.version)})),At(25,t.model),T(27,t.mobile?1:0)})):At(22,navigator.platform)),screen&&(T(14,Math.round(screen.width)),T(15,Math.round(screen.height)),T(16,Math.round(screen.colorDepth)));for(var p=0,h=a.cookies;p<h.length;p++){var v=h[p],g=tn(v);g&&B(v,g)}!function(t){Dt(t?1:0)}(a.track),Yt(d)}function Vt(){Ht=null,Pt=null,Rt.forEach((function(t){t.called=!1}))}function Bt(t,n,e){void 0===n&&(n=!0),void 0===e&&(e=!1);var r=a.lean?0:1,o=!1;Pt&&(r||!1===n)&&(t(Pt,!a.lean),o=!0),!e&&o||Rt.push({callback:t,wait:n,recall:e,called:o})}function Xt(){return Pt?[Pt.userId,Pt.sessionId,Pt.pageNum].join("."):""}function Wt(t){if(void 0===t&&(t=!0),!t)return a.track=!1,en("_clsk","",-Number.MAX_VALUE),en("_clck","",-Number.MAX_VALUE),ne(),void window.setTimeout(te,250);An()&&(a.track=!0,Yt($t(),1),Gt(),Dt(2))}function Jt(){en("_clsk","",0)}function Zt(){!function(t){if(Rt.length>0)for(var n=0;n<Rt.length;n++){var e=Rt[n];!e.callback||e.called||e.wait&&!t||(e.callback(Pt,!a.lean),e.called=!0,e.recall||(Rt.splice(n,1),n--))}}(a.lean?0:1)}function Gt(){if(Pt){var t=Math.round(Date.now()),n=a.upload&&"string"==typeof a.upload?a.upload.replace("https://",""):"",e=a.lean?0:1;en("_clsk",[Pt.sessionId,t,Pt.pageNum,e,n].join("|"),1)}}function Ft(t,n){try{return!!t[n]}catch(t){return!1}}function Yt(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)&&en("_clck",[Pt.userId,2,e.toString(36),n,r].join("|"),365)}function Kt(){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 Qt(t,n){return void 0===n&&(n=10),parseInt(t,n)}function $t(){var t={id:Kt(),version:0,expiry:null,consent:0,dob:0},n=tn("_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=Qt(e[1])),e.length>2&&(t.expiry=Qt(e[2],36)),e.length>3&&1===Qt(e[3])&&(t.consent=1),e.length>4&&Qt(e[1])>1&&(t.dob=Qt(e[4])),a.track=a.track||1===t.consent,t.id=a.track?e[0]:t.id}return t}function tn(t,n){var e;if(void 0===n&&(n=!1),Ft(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=nn(a[1]),c=i[0],u=i[1];c;)c=(e=nn(u))[0],u=e[1];return n?u.endsWith("".concat("~","1"))?u.substring(0,u.length-2):null:u}}}return null}function nn(t){try{var n=decodeURIComponent(t);return[n!=t,n]}catch(t){}return[!1,t]}function en(t,n,e){if((a.track||""==n)&&(navigator&&navigator.cookieEnabled||Ft(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===Ht){for(var u=location.hostname?location.hostname.split("."):[],s=u.length-1;s>=0;s--)if(Ht=".".concat(u[s]).concat(Ht||""),s<u.length-1&&(document.cookie="".concat(c).concat(";").concat("domain=").concat(Ht),tn(t)===n))return;Ht=""}}catch(t){Ht=""}document.cookie=Ht?"".concat(c).concat(";").concat("domain=").concat(Ht):c}}var rn,on=null;function an(){var t=Pt;on={version:s,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0}}function cn(){on=null}function un(t){return on.start=on.start+on.duration,on.duration=u()-on.start,on.sequence++,on.upload=t&&"sendBeacon"in navigator?1:0,on.end=t?1:0,[on.version,on.sequence,on.start,on.duration,on.projectId,on.userId,on.sessionId,on.pageNum,on.upload,on.end]}function sn(){rn=[]}function ln(t){if(rn&&-1===rn.indexOf(t.message)){var n=a.report;if(n&&n.length>0){var e={v:on.version,p:on.projectId,u:on.userId,s:on.sessionId,n:on.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)),rn.push(t.message)}}return t}function dn(t){return function(){var n=performance.now();try{t.apply(this,arguments)}catch(t){throw ln(t)}var e=performance.now()-n;O(4,e),e>a.longTask&&(M(7),T(6,e))}}var fn=[];function pn(t,n,e,r){void 0===r&&(r=!1),e=dn(e);try{t[i("addEventListener")](n,e,r),fn.push({event:n,target:t,listener:e,capture:r})}catch(t){}}function hn(){for(var t=0,n=fn;t<n.length;t++){var e=n[t];try{e.target[i("removeEventListener")](e.event,e.listener,e.capture)}catch(t){}}fn=[]}var vn=null,gn=null,mn=null,yn=0;function bn(){return!(yn++>20)}function wn(){yn=0,mn!==Sn()&&(ne(),window.setTimeout(kn,250))}function kn(){te(),T(29,1)}function Sn(){return location.href?location.href.replace(location.hash,""):location.href}var _n=[],En=null,In=null,Mn=null;function On(){In&&(Mn(),In=null,null===En&&xn())}function Tn(){_n=[],En=null,In=null}function xn(){var t=_n.shift();t&&(En=t,t.task().then((function(){t.id===Xt()&&(t.resolve(),En=null,xn())})).catch((function(n){t.id===Xt()&&(n&&(n.name,n.message,n.stack),En=null,xn())})))}var jn=!1;function zn(){jn=!0,c=performance.now()+performance.timeOrigin,Tn(),hn(),sn(),mn=Sn(),yn=0,pn(window,"popstate",wn),null===vn&&(vn=history.pushState,history.pushState=function(){vn.apply(this,arguments),An()&&bn()&&wn()}),null===gn&&(gn=history.replaceState,history.replaceState=function(){gn.apply(this,arguments),An()&&bn()&&wn()})}function Cn(){mn=null,yn=0,sn(),hn(),Tn(),c=0,jn=!1}function An(){return jn}function qn(){te(),S("clarity","restart")}var Nn=null;function Dn(){Nn=null}function Pn(t){Nn={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){H(this,void 0,void 0,(function(){var n,e;return L(this,(function(r){return n=u(),e=[n,t],29===t&&(e.push(Nn.fetchStart),e.push(Nn.connectStart),e.push(Nn.connectEnd),e.push(Nn.requestStart),e.push(Nn.responseStart),e.push(Nn.responseEnd),e.push(Nn.domInteractive),e.push(Nn.domComplete),e.push(Nn.loadEventStart),e.push(Nn.loadEventEnd),e.push(Nn.redirectCount),e.push(Nn.size),e.push(Nn.type),e.push(Nn.protocol),e.push(Nn.encodedSize),e.push(Nn.decodedSize),Dn(),gt(e)),[2]}))}))}(29)}var Rn,Un=0,Hn=1/0,Ln=0,Vn=0,Bn=[],Xn=new Map,Wn=function(){return Un||0},Jn=function(){if(!Bn.length)return-1;var t=Math.min(Bn.length-1,Math.floor((Wn()-Vn)/50));return Bn[t].latency},Zn=function(){Vn=Wn(),Bn.length=0,Xn.clear()},Gn=function(t){if(t.interactionId&&!(t.duration<40)){!function(t){"interactionCount"in performance?Un=performance.interactionCount:t.interactionId&&(Hn=Math.min(Hn,t.interactionId),Ln=Math.max(Ln,t.interactionId),Un=Ln?(Ln-Hn)/7+1:0)}(t);var n=Bn[Bn.length-1],e=Xn.get(t.interactionId);if(e||Bn.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};Xn.set(r.id,r),Bn.push(r)}Bn.sort((function(t,n){return n.latency-t.latency})),Bn.length>10&&Bn.splice(10).forEach((function(t){return Xn.delete(t.id)}))}}},Fn=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint","event"];function Yn(){try{Rn&&Rn.disconnect(),Rn=new PerformanceObserver(dn(Kn));for(var t=0,n=Fn;t<n.length;t++){var e=n[t];PerformanceObserver.supportedEntryTypes.indexOf(e)>=0&&("layout-shift"===e&&O(9,0),Rn.observe({type:e,buffered:!0}))}}catch(t){}}function Kn(t){!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":Pn(r);break;case"resource":var o=r.name;At(4,Qn(o)),o!==a.upload&&o!==a.fallback||T(28,r.duration);break;case"longtask":M(7);break;case"first-input":n&&T(10,r.processingStart-r.startTime);break;case"event":n&&"PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&(Gn(r),At(37,Jn().toString()));break;case"layout-shift":n&&!r.hadRecentInput&&O(9,1e3*r.value);break;case"largest-contentful-paint":n&&T(8,r.startTime)}}}(t.getEntries())}function Qn(t){var n=document.createElement("a");return n.href=t,n.host}var $n=[w,w,w,Object.freeze({__proto__:null,start:function(){Dn(),function(){navigator&&"connection"in navigator&&At(27,navigator.connection.effectiveType),window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&("complete"!==document.readyState?pn(window,"load",x.bind(this,Yn,0)):Yn())}()},stop:function(){Rn&&Rn.disconnect(),Rn=null,Zn(),Dn()}})];function te(t){void 0===t&&(t=null),function(){try{var t=navigator&&"globalPrivacyControl"in navigator&&1==navigator.globalPrivacyControl;return!1===jn&&"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||jn)return!1;for(var n in t)n in a&&(a[n]=t[n])}(t),zn(),et(),$n.forEach((function(t){return dn(t.start)()})),null===t&&ae())}function ne(){An()&&($n.slice().reverse().forEach((function(t){return dn(t.stop)()})),rt(),Cn(),void 0!==re&&(re[oe]=function(){(re[oe].q=re[oe].q||[]).push(arguments),"start"===arguments[0]&&re[oe].q.unshift(re[oe].q.pop())&&ae()}))}var ee=Object.freeze({__proto__:null,consent:Wt,event:S,hashText:y,identify:X,metadata:Bt,pause:function(){An()&&(S("clarity","pause"),null===In&&(In=new Promise((function(t){Mn=t}))))},resume:function(){An()&&(On(),S("clarity","resume"))},set:B,signal:function(t){$=t},start:te,stop:ne,upgrade:R,version:s}),re=window,oe="clarity";function ae(){if(void 0!==re){if(re[oe]&&re[oe].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=re[oe]&&re[oe].q||[];for(re[oe]=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return ee[t].apply(ee,n)},re[oe].v=s;t.length>0;)re[oe].apply(re,t.shift())}}ae()}();
|
package/package.json
CHANGED
package/src/core/config.ts
CHANGED
package/src/core/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
let version = "0.7.
|
|
1
|
+
let version = "0.7.58";
|
|
2
2
|
export default version;
|
package/src/data/metadata.ts
CHANGED
|
@@ -213,7 +213,7 @@ export function shortid(): string {
|
|
|
213
213
|
|
|
214
214
|
function session(): Session {
|
|
215
215
|
let output: Session = { session: shortid(), ts: Math.round(Date.now()), count: 1, upgrade: null, upload: Constant.Empty };
|
|
216
|
-
let value = getCookie(Constant.SessionKey);
|
|
216
|
+
let value = getCookie(Constant.SessionKey, !config.includeSubdomains);
|
|
217
217
|
if (value) {
|
|
218
218
|
let parts = value.split(Constant.Pipe);
|
|
219
219
|
// Making it backward & forward compatible by using greater than comparison (v0.6.21)
|
|
@@ -234,7 +234,7 @@ function num(string: string, base: number = 10): number {
|
|
|
234
234
|
|
|
235
235
|
function user(): User {
|
|
236
236
|
let output: User = { id: shortid(), version: 0, expiry: null, consent: BooleanFlag.False, dob: 0 };
|
|
237
|
-
let cookie = getCookie(Constant.CookieKey);
|
|
237
|
+
let cookie = getCookie(Constant.CookieKey, !config.includeSubdomains);
|
|
238
238
|
if (cookie && cookie.length > 0) {
|
|
239
239
|
// Splitting and looking up first part for forward compatibility, in case we wish to store additional information in a cookie
|
|
240
240
|
let parts = cookie.split(Constant.Pipe);
|
|
@@ -266,7 +266,7 @@ function user(): User {
|
|
|
266
266
|
return output;
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
function getCookie(key: string): string {
|
|
269
|
+
function getCookie(key: string, limit = false): string {
|
|
270
270
|
if (supported(document, Constant.Cookie)) {
|
|
271
271
|
let cookies: string[] = document.cookie.split(Constant.Semicolon);
|
|
272
272
|
if (cookies) {
|
|
@@ -285,6 +285,13 @@ function getCookie(key: string): string {
|
|
|
285
285
|
[isEncoded, decodedValue] = decodeCookieValue(decodedValue);
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
+
// If we are limiting cookies, check if the cookie value is limited
|
|
289
|
+
if (limit) {
|
|
290
|
+
return decodedValue.endsWith(`${Constant.Tilde}1`)
|
|
291
|
+
? decodedValue.substring(0, decodedValue.length - 2)
|
|
292
|
+
: null;
|
|
293
|
+
}
|
|
294
|
+
|
|
288
295
|
return decodedValue;
|
|
289
296
|
}
|
|
290
297
|
}
|
|
@@ -37,7 +37,13 @@ export default async function (type: Event, ts: number = null): Promise<void> {
|
|
|
37
37
|
tokens.push(pTarget.id);
|
|
38
38
|
tokens.push(entry.data.x);
|
|
39
39
|
tokens.push(entry.data.y);
|
|
40
|
-
if (entry.data.id !== undefined) {
|
|
40
|
+
if (entry.data.id !== undefined) {
|
|
41
|
+
tokens.push(entry.data.id);
|
|
42
|
+
|
|
43
|
+
if (entry.data.isPrimary !== undefined) {
|
|
44
|
+
tokens.push(entry.data.isPrimary.toString());
|
|
45
|
+
}
|
|
46
|
+
}
|
|
41
47
|
queue(tokens);
|
|
42
48
|
baseline.track(entry.event, entry.data.x, entry.data.y);
|
|
43
49
|
}
|
|
@@ -11,6 +11,8 @@ import encode from "./encode";
|
|
|
11
11
|
|
|
12
12
|
export let state: PointerState[] = [];
|
|
13
13
|
let timeout: number = null;
|
|
14
|
+
let activeTouchPointId = 0;
|
|
15
|
+
const activeTouchPointIds = new Set<number>();
|
|
14
16
|
|
|
15
17
|
export function start(): void {
|
|
16
18
|
reset();
|
|
@@ -58,13 +60,26 @@ function touch(event: Event, root: Node, evt: TouchEvent): void {
|
|
|
58
60
|
x = x && frame ? x + Math.round(frame.offsetLeft) : x;
|
|
59
61
|
y = y && frame ? y + Math.round(frame.offsetTop) : y;
|
|
60
62
|
|
|
61
|
-
//
|
|
62
|
-
//
|
|
63
|
-
// tested in Chromium-based browsers as well as Firefox
|
|
63
|
+
// We cannot rely on identifier to determine primary touch as its value doesn't always start with 0.
|
|
64
|
+
// Safari/Webkit uses the address of the UITouch object as the identifier value for each touch point.
|
|
64
65
|
const id = "identifier" in entry ? entry["identifier"] : undefined;
|
|
65
66
|
|
|
67
|
+
switch(event) {
|
|
68
|
+
case Event.TouchStart:
|
|
69
|
+
if (activeTouchPointIds.size === 0) {
|
|
70
|
+
activeTouchPointId = id;
|
|
71
|
+
}
|
|
72
|
+
activeTouchPointIds.add(id);
|
|
73
|
+
break;
|
|
74
|
+
case Event.TouchEnd:
|
|
75
|
+
case Event.TouchCancel:
|
|
76
|
+
activeTouchPointIds.delete(id);
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
const isPrimary = activeTouchPointId === id;
|
|
80
|
+
|
|
66
81
|
// Check for null values before processing this event
|
|
67
|
-
if (x !== null && y !== null) { handler({ time: t, event, data: { target: target(evt), x, y, id } }); }
|
|
82
|
+
if (x !== null && y !== null) { handler({ time: t, event, data: { target: target(evt), x, y, id, isPrimary } }); }
|
|
68
83
|
}
|
|
69
84
|
}
|
|
70
85
|
}
|
|
@@ -7,8 +7,10 @@ import { schedule } from "@src/core/task";
|
|
|
7
7
|
|
|
8
8
|
export let data: ResizeData;
|
|
9
9
|
let timeout: number = null;
|
|
10
|
+
let initialStateLogged = false;
|
|
10
11
|
|
|
11
12
|
export function start(): void {
|
|
13
|
+
initialStateLogged = false;
|
|
12
14
|
bind(window, "resize", recompute);
|
|
13
15
|
recompute();
|
|
14
16
|
}
|
|
@@ -21,8 +23,13 @@ function recompute(): void {
|
|
|
21
23
|
width: de && "clientWidth" in de ? Math.min(de.clientWidth, window.innerWidth) : window.innerWidth,
|
|
22
24
|
height: de && "clientHeight" in de ? Math.min(de.clientHeight, window.innerHeight) : window.innerHeight,
|
|
23
25
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
if (initialStateLogged) {
|
|
27
|
+
clearTimeout(timeout);
|
|
28
|
+
timeout = setTimeout(process, Setting.LookAhead, Event.Resize);
|
|
29
|
+
} else {
|
|
30
|
+
encode(Event.Resize);
|
|
31
|
+
initialStateLogged = true;
|
|
32
|
+
}
|
|
26
33
|
}
|
|
27
34
|
|
|
28
35
|
function process(event: Event): void {
|