clarity-js 0.7.53 → 0.7.56
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 +63 -34
- package/build/clarity.min.js +1 -1
- package/build/clarity.module.js +63 -34
- package/build/clarity.performance.js +1 -1
- package/package.json +1 -1
- package/src/core/version.ts +1 -1
- package/src/data/dimension.ts +13 -2
- package/src/data/limit.ts +5 -2
- package/src/interaction/resize.ts +11 -2
- package/src/layout/dom.ts +22 -3
- package/src/layout/schema.ts +0 -3
package/build/clarity.module.js
CHANGED
|
@@ -83,11 +83,11 @@ function setup() {
|
|
|
83
83
|
w[c] = function () {
|
|
84
84
|
(w[c].q = w[c].q || []).push(arguments);
|
|
85
85
|
// if the start function was called, don't queue it and instead process the queue
|
|
86
|
-
arguments[0] === "start" && w[c].q.unshift(w[c].q.pop()) && process$
|
|
86
|
+
arguments[0] === "start" && w[c].q.unshift(w[c].q.pop()) && process$8();
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
function process$
|
|
90
|
+
function process$8() {
|
|
91
91
|
if (typeof w !== "undefined") {
|
|
92
92
|
// Do not execute or reset global "clarity" variable if a version of Clarity is already running on the page
|
|
93
93
|
if (w[c] && w[c].v) {
|
|
@@ -163,7 +163,7 @@ function stop$F() {
|
|
|
163
163
|
startTime = 0;
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
var version$1 = "0.7.
|
|
166
|
+
var version$1 = "0.7.56";
|
|
167
167
|
|
|
168
168
|
// tslint:disable: no-bitwise
|
|
169
169
|
function hash (input, precision) {
|
|
@@ -540,16 +540,16 @@ function clearTimeout(handle) {
|
|
|
540
540
|
var data$h;
|
|
541
541
|
var last = 0;
|
|
542
542
|
var interval = 0;
|
|
543
|
-
var timeout$
|
|
543
|
+
var timeout$7 = null;
|
|
544
544
|
function start$F() {
|
|
545
545
|
interval = 60000 /* Setting.PingInterval */;
|
|
546
546
|
last = 0;
|
|
547
547
|
}
|
|
548
548
|
function reset$q() {
|
|
549
|
-
if (timeout$
|
|
550
|
-
clearTimeout(timeout$
|
|
549
|
+
if (timeout$7) {
|
|
550
|
+
clearTimeout(timeout$7);
|
|
551
551
|
}
|
|
552
|
-
timeout$
|
|
552
|
+
timeout$7 = setTimeout(ping, interval);
|
|
553
553
|
last = time();
|
|
554
554
|
}
|
|
555
555
|
function ping() {
|
|
@@ -557,14 +557,14 @@ function ping() {
|
|
|
557
557
|
data$h = { gap: now - last };
|
|
558
558
|
encode$1(25 /* Event.Ping */);
|
|
559
559
|
if (data$h.gap < 300000 /* Setting.PingTimeout */) {
|
|
560
|
-
timeout$
|
|
560
|
+
timeout$7 = setTimeout(ping, interval);
|
|
561
561
|
}
|
|
562
562
|
else {
|
|
563
563
|
suspend();
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
566
|
function stop$C() {
|
|
567
|
-
clearTimeout(timeout$
|
|
567
|
+
clearTimeout(timeout$7);
|
|
568
568
|
last = 0;
|
|
569
569
|
interval = 0;
|
|
570
570
|
}
|
|
@@ -1156,7 +1156,7 @@ function add(node, parent, data, source) {
|
|
|
1156
1156
|
};
|
|
1157
1157
|
privacy(node, values[id], parentValue);
|
|
1158
1158
|
updateSelector(values[id]);
|
|
1159
|
-
|
|
1159
|
+
updateImageSize(values[id]);
|
|
1160
1160
|
track$6(id, source);
|
|
1161
1161
|
}
|
|
1162
1162
|
function update$1(node, parent, data, source) {
|
|
@@ -1233,6 +1233,7 @@ function iframe(node) {
|
|
|
1233
1233
|
return doc && iframeMap.has(doc) ? iframeMap.get(doc) : null;
|
|
1234
1234
|
}
|
|
1235
1235
|
function privacy(node, value, parent) {
|
|
1236
|
+
var _a;
|
|
1236
1237
|
var data = value.data;
|
|
1237
1238
|
var metadata = value.metadata;
|
|
1238
1239
|
var current = metadata.privacy;
|
|
@@ -1277,6 +1278,12 @@ function privacy(node, value, parent) {
|
|
|
1277
1278
|
// In a mode where we mask sensitive information by default, look through class names to aggressively mask content
|
|
1278
1279
|
metadata.privacy = inspect(attributes["class" /* Constant.Class */], maskText, metadata);
|
|
1279
1280
|
break;
|
|
1281
|
+
case tag === "IMG" /* Constant.ImageTag */:
|
|
1282
|
+
// Mask images with blob src as it is not publicly available anyway.
|
|
1283
|
+
if ((_a = attributes.src) === null || _a === void 0 ? void 0 : _a.startsWith('blob:')) {
|
|
1284
|
+
metadata.privacy = 3 /* Privacy.TextImage */;
|
|
1285
|
+
}
|
|
1286
|
+
break;
|
|
1280
1287
|
}
|
|
1281
1288
|
}
|
|
1282
1289
|
function inspect(input, lookup, metadata) {
|
|
@@ -1383,9 +1390,17 @@ function removeNodeFromNodesMap(id) {
|
|
|
1383
1390
|
}
|
|
1384
1391
|
}
|
|
1385
1392
|
}
|
|
1386
|
-
function
|
|
1393
|
+
function updateImageSize(value) {
|
|
1387
1394
|
// If this element is a image node, and is masked, then track box model for the current element
|
|
1388
1395
|
if (value.data.tag === "IMG" /* Constant.ImageTag */ && value.metadata.privacy === 3 /* Privacy.TextImage */) {
|
|
1396
|
+
var img_1 = getNode(value.id);
|
|
1397
|
+
// We will not capture the natural image dimensions until it loads.
|
|
1398
|
+
if (img_1 && (!img_1.complete || img_1.naturalWidth === 0)) {
|
|
1399
|
+
// This will trigger mutation to update the original width and height after image loads.
|
|
1400
|
+
bind(img_1, 'load', function () {
|
|
1401
|
+
img_1.setAttribute('data-clarity-loaded', "".concat(shortid()));
|
|
1402
|
+
});
|
|
1403
|
+
}
|
|
1389
1404
|
value.metadata.size = [];
|
|
1390
1405
|
}
|
|
1391
1406
|
}
|
|
@@ -1896,7 +1911,7 @@ function stop$s() {
|
|
|
1896
1911
|
reset$h();
|
|
1897
1912
|
}
|
|
1898
1913
|
|
|
1899
|
-
var timeout$
|
|
1914
|
+
var timeout$6 = null;
|
|
1900
1915
|
var state$6 = [];
|
|
1901
1916
|
function start$t() {
|
|
1902
1917
|
reset$g();
|
|
@@ -1922,23 +1937,23 @@ function recompute$6(evt) {
|
|
|
1922
1937
|
state$6.pop();
|
|
1923
1938
|
}
|
|
1924
1939
|
state$6.push({ time: time(evt), event: 27 /* Event.Input */, data: data });
|
|
1925
|
-
clearTimeout(timeout$
|
|
1926
|
-
timeout$
|
|
1940
|
+
clearTimeout(timeout$6);
|
|
1941
|
+
timeout$6 = setTimeout(process$7, 1000 /* Setting.InputLookAhead */, 27 /* Event.Input */);
|
|
1927
1942
|
}
|
|
1928
1943
|
}
|
|
1929
|
-
function process$
|
|
1944
|
+
function process$7(event) {
|
|
1930
1945
|
schedule$1(encode$3.bind(this, event));
|
|
1931
1946
|
}
|
|
1932
1947
|
function reset$g() {
|
|
1933
1948
|
state$6 = [];
|
|
1934
1949
|
}
|
|
1935
1950
|
function stop$r() {
|
|
1936
|
-
clearTimeout(timeout$
|
|
1951
|
+
clearTimeout(timeout$6);
|
|
1937
1952
|
reset$g();
|
|
1938
1953
|
}
|
|
1939
1954
|
|
|
1940
1955
|
var state$5 = [];
|
|
1941
|
-
var timeout$
|
|
1956
|
+
var timeout$5 = null;
|
|
1942
1957
|
function start$s() {
|
|
1943
1958
|
reset$f();
|
|
1944
1959
|
}
|
|
@@ -2003,16 +2018,16 @@ function handler$2(current) {
|
|
|
2003
2018
|
state$5.pop();
|
|
2004
2019
|
}
|
|
2005
2020
|
state$5.push(current);
|
|
2006
|
-
clearTimeout(timeout$
|
|
2007
|
-
timeout$
|
|
2021
|
+
clearTimeout(timeout$5);
|
|
2022
|
+
timeout$5 = setTimeout(process$6, 500 /* Setting.LookAhead */, current.event);
|
|
2008
2023
|
break;
|
|
2009
2024
|
default:
|
|
2010
2025
|
state$5.push(current);
|
|
2011
|
-
process$
|
|
2026
|
+
process$6(current.event);
|
|
2012
2027
|
break;
|
|
2013
2028
|
}
|
|
2014
2029
|
}
|
|
2015
|
-
function process$
|
|
2030
|
+
function process$6(event) {
|
|
2016
2031
|
schedule$1(encode$3.bind(this, event));
|
|
2017
2032
|
}
|
|
2018
2033
|
function reset$f() {
|
|
@@ -2027,14 +2042,15 @@ function similar$1(last, current) {
|
|
|
2027
2042
|
return current.event === last.event && match && distance < 20 /* Setting.Distance */ && gap < 25 /* Setting.Interval */;
|
|
2028
2043
|
}
|
|
2029
2044
|
function stop$q() {
|
|
2030
|
-
clearTimeout(timeout$
|
|
2045
|
+
clearTimeout(timeout$5);
|
|
2031
2046
|
// Send out any pending pointer events in the pipeline
|
|
2032
2047
|
if (state$5.length > 0) {
|
|
2033
|
-
process$
|
|
2048
|
+
process$6(state$5[state$5.length - 1].event);
|
|
2034
2049
|
}
|
|
2035
2050
|
}
|
|
2036
2051
|
|
|
2037
2052
|
var data$b;
|
|
2053
|
+
var timeout$4 = null;
|
|
2038
2054
|
function start$r() {
|
|
2039
2055
|
bind(window, "resize", recompute$5);
|
|
2040
2056
|
recompute$5();
|
|
@@ -2047,10 +2063,15 @@ function recompute$5() {
|
|
|
2047
2063
|
width: de && "clientWidth" in de ? Math.min(de.clientWidth, window.innerWidth) : window.innerWidth,
|
|
2048
2064
|
height: de && "clientHeight" in de ? Math.min(de.clientHeight, window.innerHeight) : window.innerHeight,
|
|
2049
2065
|
};
|
|
2050
|
-
|
|
2066
|
+
clearTimeout(timeout$4);
|
|
2067
|
+
timeout$4 = setTimeout(process$5, 500 /* Setting.LookAhead */, 11 /* Event.Resize */);
|
|
2068
|
+
}
|
|
2069
|
+
function process$5(event) {
|
|
2070
|
+
schedule$1(encode$3.bind(this, event));
|
|
2051
2071
|
}
|
|
2052
2072
|
function reset$e() {
|
|
2053
2073
|
data$b = null;
|
|
2074
|
+
clearTimeout(timeout$4);
|
|
2054
2075
|
}
|
|
2055
2076
|
function stop$p() {
|
|
2056
2077
|
reset$e();
|
|
@@ -2700,9 +2721,6 @@ function ld(json) {
|
|
|
2700
2721
|
max(12 /* Metric.RatingCount */, num$1(json["ratingCount" /* JsonLD.RatingCount */]));
|
|
2701
2722
|
max(17 /* Metric.ReviewCount */, num$1(json["reviewCount" /* JsonLD.ReviewCount */]));
|
|
2702
2723
|
break;
|
|
2703
|
-
case "person" /* JsonLD.Author */:
|
|
2704
|
-
log(8 /* Dimension.AuthorName */, json["name" /* JsonLD.Name */]);
|
|
2705
|
-
break;
|
|
2706
2724
|
case "offer" /* JsonLD.Offer */:
|
|
2707
2725
|
log(7 /* Dimension.ProductAvailability */, json["availability" /* JsonLD.Availability */]);
|
|
2708
2726
|
log(14 /* Dimension.ProductCondition */, json["itemCondition" /* JsonLD.ItemCondition */]);
|
|
@@ -4498,8 +4516,11 @@ function check$2(bytes) {
|
|
|
4498
4516
|
}
|
|
4499
4517
|
function trigger(reason) {
|
|
4500
4518
|
data$4.check = reason;
|
|
4501
|
-
|
|
4502
|
-
|
|
4519
|
+
// limit the dimensions we collect, but we don't need to stop Clarity entirely if we hit the limit
|
|
4520
|
+
if (reason !== 5 /* Check.Collection */) {
|
|
4521
|
+
clear();
|
|
4522
|
+
stop();
|
|
4523
|
+
}
|
|
4503
4524
|
}
|
|
4504
4525
|
function compute$3() {
|
|
4505
4526
|
if (data$4.check !== 0 /* Check.None */) {
|
|
@@ -4512,13 +4533,16 @@ function stop$a() {
|
|
|
4512
4533
|
|
|
4513
4534
|
var data$3 = null;
|
|
4514
4535
|
var updates = null;
|
|
4536
|
+
var limited = false;
|
|
4515
4537
|
function start$a() {
|
|
4516
4538
|
data$3 = {};
|
|
4517
4539
|
updates = {};
|
|
4540
|
+
limited = false;
|
|
4518
4541
|
}
|
|
4519
4542
|
function stop$9() {
|
|
4520
4543
|
data$3 = {};
|
|
4521
4544
|
updates = {};
|
|
4545
|
+
limited = false;
|
|
4522
4546
|
}
|
|
4523
4547
|
function log(dimension, value) {
|
|
4524
4548
|
// Check valid value before moving ahead
|
|
@@ -4529,6 +4553,14 @@ function log(dimension, value) {
|
|
|
4529
4553
|
data$3[dimension] = [];
|
|
4530
4554
|
}
|
|
4531
4555
|
if (data$3[dimension].indexOf(value) < 0) {
|
|
4556
|
+
// Limit check to ensure we have a cap on number of dimensions we can collect
|
|
4557
|
+
if (data$3[dimension].length > 128 /* Setting.CollectionLimit */) {
|
|
4558
|
+
if (!limited) {
|
|
4559
|
+
limited = true;
|
|
4560
|
+
trigger(5 /* Check.Collection */);
|
|
4561
|
+
}
|
|
4562
|
+
return;
|
|
4563
|
+
}
|
|
4532
4564
|
data$3[dimension].push(value);
|
|
4533
4565
|
// If this is a new value, track it as part of updates object
|
|
4534
4566
|
// This allows us to only send back new values in subsequent payloads
|
|
@@ -4536,10 +4568,6 @@ function log(dimension, value) {
|
|
|
4536
4568
|
updates[dimension] = [];
|
|
4537
4569
|
}
|
|
4538
4570
|
updates[dimension].push(value);
|
|
4539
|
-
// Limit check to ensure we have a cap on number of dimensions we can collect
|
|
4540
|
-
if (data$3[dimension].length > 128 /* Setting.CollectionLimit */) {
|
|
4541
|
-
trigger(5 /* Check.Collection */);
|
|
4542
|
-
}
|
|
4543
4571
|
}
|
|
4544
4572
|
}
|
|
4545
4573
|
}
|
|
@@ -4548,6 +4576,7 @@ function compute$2() {
|
|
|
4548
4576
|
}
|
|
4549
4577
|
function reset$3() {
|
|
4550
4578
|
updates = {};
|
|
4579
|
+
limited = false;
|
|
4551
4580
|
}
|
|
4552
4581
|
|
|
4553
4582
|
function config$1(track) {
|
|
@@ -5505,7 +5534,7 @@ function start(config$1) {
|
|
|
5505
5534
|
// If it's an internal call to start, without explicit configuration,
|
|
5506
5535
|
// re-process any newly accumulated items in the queue
|
|
5507
5536
|
if (config$1 === null) {
|
|
5508
|
-
process$
|
|
5537
|
+
process$8();
|
|
5509
5538
|
}
|
|
5510
5539
|
}
|
|
5511
5540
|
}
|
|
@@ -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 At},get data(){return Tt},get log(){return Ct},get reset(){return qt},get start(){return jt},get stop(){return zt},get updates(){return xt}}),r=Object.freeze({__proto__:null,get callback(){return Wt},get callbacks(){return Pt},get clear(){return Jt},get consent(){return Xt},get data(){return Dt},get electron(){return Rt},get id(){return Bt},get metadata(){return Vt},get save(){return Zt},get shortid(){return Yt},get start(){return Ht},get stop(){return Lt}}),o=Object.freeze({__proto__:null,get data(){return rn},get envelope(){return cn},get start(){return on},get stop(){return an}}),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.53";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){Cn()&&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(ln(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):xn&&(S("clarity","suspend"),te(),["mousemove","touchstart"].forEach((function(t){return fn(document,t,An)})),["resize","scroll","pageshow"].forEach((function(t){return fn(window,t,An)})))}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){Cn()&&a.lean&&(a.lean=!1,P={key:t},Wt(),Zt(),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(Cn()&&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 ln(t.start)()}))}function rt(){nt.slice().reverse().forEach((function(t){return ln(t.stop)()})),E={},I={}}function ot(){W(),At(),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:rn.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||rn.sequence>0))&&T(1,1),ot(),e=!0===t,r=JSON.stringify(cn(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,rn.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(){sn(new Error("".concat("Timeout"," : ").concat(o)))},null!==e&&(c.onreadystatechange=function(){ln(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&&(Zt(),Wt())}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])}qt(),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=rn.sequence>=128?1:n,n=rn.pageNum>=128?7:n,n=u()>72e5?2:n,(n=t>10485760?2:n)!==lt.check&&It(n)}}function It(t){lt.check=t,Jt(),te()}function Mt(){0!==lt.check&&St(35)}function Ot(){lt=null}var Tt=null,xt=null;function jt(){Tt={},xt={}}function zt(){Tt={},xt={}}function Ct(t,n){n&&(n="".concat(n),t in Tt||(Tt[t]=[]),Tt[t].indexOf(n)<0&&(Tt[t].push(n),t in xt||(xt[t]=[]),xt[t].push(n),Tt[t].length>128&&It(5)))}function At(){St(1)}function qt(){xt={}}function Nt(t){Ct(36,t.toString())}var Dt=null,Pt=[],Rt=0,Ut=null;function Ht(){var t,n,e;Ut=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:"";Rt=r.indexOf("Electron")>0?1:0;var s,l=function(){var t={session:Yt(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},n=$t("_clsk");if(n){var e=n.split("|");e.length>=5&&t.ts-Kt(e[1])<18e5&&(t.session=e[0],t.count=Kt(e[2])+1,t.upgrade=Kt(e[3]),t.upload=e.length>=6?"".concat("https://").concat(e[5],"/").concat(e[4]):"".concat("https://").concat(e[4]))}return t}(),d=Qt(),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);Dt={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,Ct(0,r),Ct(3,u),Ct(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,!!Rt)),Ct(2,document.referrer),Ct(15,function(){var t=Yt();if(a.track&&Gt(window,"sessionStorage")){var n=sessionStorage.getItem("_cltk");t=n||t,sessionStorage.setItem("_cltk",t)}return t}()),Ct(16,document.documentElement.lang),Ct(17,document.dir),Ct(26,"".concat(window.devicePixelRatio)),Ct(28,d.dob.toString()),Ct(29,d.version.toString()),Ct(33,c),Ct(34,o),Ct(35,i),T(0,l.ts),T(1,0),T(35,Rt),navigator&&(Ct(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;Ct(22,t.platform),Ct(23,t.platformVersion),null===(n=t.brands)||void 0===n||n.forEach((function(t){Ct(24,t.name+"~"+t.version)})),Ct(25,t.model),T(27,t.mobile?1:0)})):Ct(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=$t(v);g&&B(v,g)}!function(t){Nt(t?1:0)}(a.track),Ft(d)}function Lt(){Ut=null,Dt=null,Pt.forEach((function(t){t.called=!1}))}function Vt(t,n,e){void 0===n&&(n=!0),void 0===e&&(e=!1);var r=a.lean?0:1,o=!1;Dt&&(r||!1===n)&&(t(Dt,!a.lean),o=!0),!e&&o||Pt.push({callback:t,wait:n,recall:e,called:o})}function Bt(){return Dt?[Dt.userId,Dt.sessionId,Dt.pageNum].join("."):""}function Xt(t){if(void 0===t&&(t=!0),!t)return a.track=!1,nn("_clsk","",-Number.MAX_VALUE),nn("_clck","",-Number.MAX_VALUE),te(),void window.setTimeout($n,250);Cn()&&(a.track=!0,Ft(Qt(),1),Zt(),Nt(2))}function Jt(){nn("_clsk","",0)}function Wt(){!function(t){if(Pt.length>0)for(var n=0;n<Pt.length;n++){var e=Pt[n];!e.callback||e.called||e.wait&&!t||(e.callback(Dt,!a.lean),e.called=!0,e.recall||(Pt.splice(n,1),n--))}}(a.lean?0:1)}function Zt(){if(Dt){var t=Math.round(Date.now()),n=a.upload&&"string"==typeof a.upload?a.upload.replace("https://",""):"",e=a.lean?0:1;nn("_clsk",[Dt.sessionId,t,Dt.pageNum,e,n].join("|"),1)}}function Gt(t,n){try{return!!t[n]}catch(t){return!1}}function Ft(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)&&nn("_clck",[Dt.userId,2,e.toString(36),n,r].join("|"),365)}function Yt(){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 Kt(t,n){return void 0===n&&(n=10),parseInt(t,n)}function Qt(){var t={id:Yt(),version:0,expiry:null,consent:0,dob:0},n=$t("_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=Kt(e[1])),e.length>2&&(t.expiry=Kt(e[2],36)),e.length>3&&1===Kt(e[3])&&(t.consent=1),e.length>4&&Kt(e[1])>1&&(t.dob=Kt(e[4])),a.track=a.track||1===t.consent,t.id=a.track?e[0]:t.id}return t}function $t(t){var n;if(Gt(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=tn(o[1]),i=a[0],c=a[1];i;)i=(n=tn(c))[0],c=n[1];return c}}}return null}function tn(t){try{var n=decodeURIComponent(t);return[n!=t,n]}catch(t){}return[!1,t]}function nn(t,n,e){if((a.track||""==n)&&(navigator&&navigator.cookieEnabled||Gt(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===Ut){for(var u=location.hostname?location.hostname.split("."):[],s=u.length-1;s>=0;s--)if(Ut=".".concat(u[s]).concat(Ut||""),s<u.length-1&&(document.cookie="".concat(c).concat(";").concat("domain=").concat(Ut),$t(t)===n))return;Ut=""}}catch(t){Ut=""}document.cookie=Ut?"".concat(c).concat(";").concat("domain=").concat(Ut):c}}var en,rn=null;function on(){var t=Dt;rn={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 an(){rn=null}function cn(t){return rn.start=rn.start+rn.duration,rn.duration=u()-rn.start,rn.sequence++,rn.upload=t&&"sendBeacon"in navigator?1:0,rn.end=t?1:0,[rn.version,rn.sequence,rn.start,rn.duration,rn.projectId,rn.userId,rn.sessionId,rn.pageNum,rn.upload,rn.end]}function un(){en=[]}function sn(t){if(en&&-1===en.indexOf(t.message)){var n=a.report;if(n&&n.length>0){var e={v:rn.version,p:rn.projectId,u:rn.userId,s:rn.sessionId,n:rn.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)),en.push(t.message)}}return t}function ln(t){return function(){var n=performance.now();try{t.apply(this,arguments)}catch(t){throw sn(t)}var e=performance.now()-n;O(4,e),e>a.longTask&&(M(7),T(6,e))}}var dn=[];function fn(t,n,e,r){void 0===r&&(r=!1),e=ln(e);try{t[i("addEventListener")](n,e,r),dn.push({event:n,target:t,listener:e,capture:r})}catch(t){}}function pn(){for(var t=0,n=dn;t<n.length;t++){var e=n[t];try{e.target[i("removeEventListener")](e.event,e.listener,e.capture)}catch(t){}}dn=[]}var hn=null,vn=null,gn=null,mn=0;function yn(){return!(mn++>20)}function wn(){mn=0,gn!==kn()&&(te(),window.setTimeout(bn,250))}function bn(){$n(),T(29,1)}function kn(){return location.href?location.href.replace(location.hash,""):location.href}var Sn=[],_n=null,En=null,In=null;function Mn(){En&&(In(),En=null,null===_n&&Tn())}function On(){Sn=[],_n=null,En=null}function Tn(){var t=Sn.shift();t&&(_n=t,t.task().then((function(){t.id===Bt()&&(t.resolve(),_n=null,Tn())})).catch((function(n){t.id===Bt()&&(n&&(n.name,n.message,n.stack),_n=null,Tn())})))}var xn=!1;function jn(){xn=!0,c=performance.now()+performance.timeOrigin,On(),pn(),un(),gn=kn(),mn=0,fn(window,"popstate",wn),null===hn&&(hn=history.pushState,history.pushState=function(){hn.apply(this,arguments),Cn()&&yn()&&wn()}),null===vn&&(vn=history.replaceState,history.replaceState=function(){vn.apply(this,arguments),Cn()&&yn()&&wn()})}function zn(){gn=null,mn=0,un(),pn(),On(),c=0,xn=!1}function Cn(){return xn}function An(){$n(),S("clarity","restart")}var qn=null;function Nn(){qn=null}function Dn(t){qn={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(qn.fetchStart),e.push(qn.connectStart),e.push(qn.connectEnd),e.push(qn.requestStart),e.push(qn.responseStart),e.push(qn.responseEnd),e.push(qn.domInteractive),e.push(qn.domComplete),e.push(qn.loadEventStart),e.push(qn.loadEventEnd),e.push(qn.redirectCount),e.push(qn.size),e.push(qn.type),e.push(qn.protocol),e.push(qn.encodedSize),e.push(qn.decodedSize),Nn(),gt(e)),[2]}))}))}(29)}var Pn,Rn=0,Un=1/0,Hn=0,Ln=0,Vn=[],Bn=new Map,Xn=function(){return Rn||0},Jn=function(){if(!Vn.length)return-1;var t=Math.min(Vn.length-1,Math.floor((Xn()-Ln)/50));return Vn[t].latency},Wn=function(){Ln=Xn(),Vn.length=0,Bn.clear()},Zn=function(t){if(t.interactionId&&!(t.duration<40)){!function(t){"interactionCount"in performance?Rn=performance.interactionCount:t.interactionId&&(Un=Math.min(Un,t.interactionId),Hn=Math.max(Hn,t.interactionId),Rn=Hn?(Hn-Un)/7+1:0)}(t);var n=Vn[Vn.length-1],e=Bn.get(t.interactionId);if(e||Vn.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};Bn.set(r.id,r),Vn.push(r)}Vn.sort((function(t,n){return n.latency-t.latency})),Vn.length>10&&Vn.splice(10).forEach((function(t){return Bn.delete(t.id)}))}}},Gn=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint","event"];function Fn(){try{Pn&&Pn.disconnect(),Pn=new PerformanceObserver(ln(Yn));for(var t=0,n=Gn;t<n.length;t++){var e=n[t];PerformanceObserver.supportedEntryTypes.indexOf(e)>=0&&("layout-shift"===e&&O(9,0),Pn.observe({type:e,buffered:!0}))}}catch(t){}}function Yn(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":Dn(r);break;case"resource":var o=r.name;Ct(4,Kn(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&&(Zn(r),Ct(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 Kn(t){var n=document.createElement("a");return n.href=t,n.host}var Qn=[b,b,b,Object.freeze({__proto__:null,start:function(){Nn(),function(){navigator&&"connection"in navigator&&Ct(27,navigator.connection.effectiveType),window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&("complete"!==document.readyState?fn(window,"load",x.bind(this,Fn,0)):Fn())}()},stop:function(){Pn&&Pn.disconnect(),Pn=null,Wn(),Nn()}})];function $n(t){void 0===t&&(t=null),function(){try{var t=navigator&&"globalPrivacyControl"in navigator&&1==navigator.globalPrivacyControl;return!1===xn&&"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||xn)return!1;for(var n in t)n in a&&(a[n]=t[n])}(t),jn(),et(),Qn.forEach((function(t){return ln(t.start)()})),null===t&&oe())}function te(){Cn()&&(Qn.slice().reverse().forEach((function(t){return ln(t.stop)()})),rt(),zn(),void 0!==ee&&(ee[re]=function(){(ee[re].q=ee[re].q||[]).push(arguments),"start"===arguments[0]&&ee[re].q.unshift(ee[re].q.pop())&&oe()}))}var ne=Object.freeze({__proto__:null,consent:Xt,event:S,hashText:y,identify:X,metadata:Vt,pause:function(){Cn()&&(S("clarity","pause"),null===En&&(En=new Promise((function(t){In=t}))))},resume:function(){Cn()&&(Mn(),S("clarity","resume"))},set:B,signal:function(t){$=t},start:$n,stop:te,upgrade:R,version:s}),ee=window,re="clarity";function oe(){if(void 0!==ee){if(ee[re]&&ee[re].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=ee[re]&&ee[re].q||[];for(ee[re]=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return ne[t].apply(ne,n)},ee[re].v=s;t.length>0;)ee[re].apply(ee,t.shift())}}oe()}();
|
|
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()}();
|
package/package.json
CHANGED
package/src/core/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
let version = "0.7.
|
|
1
|
+
let version = "0.7.56";
|
|
2
2
|
export default version;
|
package/src/data/dimension.ts
CHANGED
|
@@ -4,15 +4,18 @@ import encode from "./encode";
|
|
|
4
4
|
|
|
5
5
|
export let data: DimensionData = null;
|
|
6
6
|
export let updates: DimensionData = null;
|
|
7
|
+
let limited = false;
|
|
7
8
|
|
|
8
9
|
export function start(): void {
|
|
9
10
|
data = {};
|
|
10
11
|
updates = {};
|
|
12
|
+
limited = false;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
export function stop(): void {
|
|
14
16
|
data = {};
|
|
15
17
|
updates = {};
|
|
18
|
+
limited = false;
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
export function log(dimension: Dimension, value: string): void {
|
|
@@ -22,13 +25,20 @@ export function log(dimension: Dimension, value: string): void {
|
|
|
22
25
|
value = `${value}`;
|
|
23
26
|
if (!(dimension in data)) { data[dimension] = []; }
|
|
24
27
|
if (data[dimension].indexOf(value) < 0) {
|
|
28
|
+
// Limit check to ensure we have a cap on number of dimensions we can collect
|
|
29
|
+
if (data[dimension].length > Setting.CollectionLimit) {
|
|
30
|
+
if (!limited) {
|
|
31
|
+
limited = true;
|
|
32
|
+
limit.trigger(Check.Collection);
|
|
33
|
+
}
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
|
|
25
37
|
data[dimension].push(value);
|
|
26
38
|
// If this is a new value, track it as part of updates object
|
|
27
39
|
// This allows us to only send back new values in subsequent payloads
|
|
28
40
|
if (!(dimension in updates)) { updates[dimension] = []; }
|
|
29
41
|
updates[dimension].push(value);
|
|
30
|
-
// Limit check to ensure we have a cap on number of dimensions we can collect
|
|
31
|
-
if (data[dimension].length > Setting.CollectionLimit) { limit.trigger(Check.Collection); }
|
|
32
42
|
}
|
|
33
43
|
}
|
|
34
44
|
}
|
|
@@ -39,4 +49,5 @@ export function compute(): void {
|
|
|
39
49
|
|
|
40
50
|
export function reset(): void {
|
|
41
51
|
updates = {};
|
|
52
|
+
limited = false;
|
|
42
53
|
}
|
package/src/data/limit.ts
CHANGED
|
@@ -26,8 +26,11 @@ export function check(bytes: number): void {
|
|
|
26
26
|
|
|
27
27
|
export function trigger(reason: Check): void {
|
|
28
28
|
data.check = reason;
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
// limit the dimensions we collect, but we don't need to stop Clarity entirely if we hit the limit
|
|
30
|
+
if (reason !== Check.Collection) {
|
|
31
|
+
metadata.clear();
|
|
32
|
+
clarity.stop();
|
|
33
|
+
}
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
export function compute(): void {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { Event } from "@clarity-types/data";
|
|
2
|
-
import { ResizeData } from "@clarity-types/interaction";
|
|
2
|
+
import { ResizeData, Setting } from "@clarity-types/interaction";
|
|
3
|
+
import { clearTimeout, setTimeout } from "@src/core/timeout";
|
|
3
4
|
import { bind } from "@src/core/event";
|
|
4
5
|
import encode from "./encode";
|
|
6
|
+
import { schedule } from "@src/core/task";
|
|
5
7
|
|
|
6
8
|
export let data: ResizeData;
|
|
9
|
+
let timeout: number = null;
|
|
7
10
|
|
|
8
11
|
export function start(): void {
|
|
9
12
|
bind(window, "resize", recompute);
|
|
@@ -18,11 +21,17 @@ function recompute(): void {
|
|
|
18
21
|
width: de && "clientWidth" in de ? Math.min(de.clientWidth, window.innerWidth) : window.innerWidth,
|
|
19
22
|
height: de && "clientHeight" in de ? Math.min(de.clientHeight, window.innerHeight) : window.innerHeight,
|
|
20
23
|
};
|
|
21
|
-
|
|
24
|
+
clearTimeout(timeout);
|
|
25
|
+
timeout = setTimeout(process, Setting.LookAhead, Event.Resize);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function process(event: Event): void {
|
|
29
|
+
schedule(encode.bind(this, event));
|
|
22
30
|
}
|
|
23
31
|
|
|
24
32
|
export function reset(): void {
|
|
25
33
|
data = null;
|
|
34
|
+
clearTimeout(timeout);
|
|
26
35
|
}
|
|
27
36
|
|
|
28
37
|
export function stop(): void {
|
package/src/layout/dom.ts
CHANGED
|
@@ -2,7 +2,9 @@ import { Privacy } from "@clarity-types/core";
|
|
|
2
2
|
import { Code, Setting, Severity } from "@clarity-types/data";
|
|
3
3
|
import { Constant, Mask, NodeInfo, NodeMeta, NodeValue, Selector, SelectorInput, Source } from "@clarity-types/layout";
|
|
4
4
|
import config from "@src/core/config";
|
|
5
|
+
import { bind } from "@src/core/event";
|
|
5
6
|
import hash from "@src/core/hash";
|
|
7
|
+
import { shortid } from "@src/data/metadata";
|
|
6
8
|
import * as internal from "@src/diagnostic/internal";
|
|
7
9
|
import * as region from "@src/layout/region";
|
|
8
10
|
import * as selector from "@src/layout/selector";
|
|
@@ -120,7 +122,7 @@ export function add(node: Node, parent: Node, data: NodeInfo, source: Source): v
|
|
|
120
122
|
|
|
121
123
|
privacy(node, values[id], parentValue);
|
|
122
124
|
updateSelector(values[id]);
|
|
123
|
-
|
|
125
|
+
updateImageSize(values[id]);
|
|
124
126
|
track(id, source);
|
|
125
127
|
}
|
|
126
128
|
|
|
@@ -250,6 +252,12 @@ function privacy(node: Node, value: NodeValue, parent: NodeValue): void {
|
|
|
250
252
|
// In a mode where we mask sensitive information by default, look through class names to aggressively mask content
|
|
251
253
|
metadata.privacy = inspect(attributes[Constant.Class], maskText, metadata);
|
|
252
254
|
break;
|
|
255
|
+
case tag === Constant.ImageTag:
|
|
256
|
+
// Mask images with blob src as it is not publicly available anyway.
|
|
257
|
+
if(attributes.src?.startsWith('blob:')){
|
|
258
|
+
metadata.privacy = Privacy.TextImage;
|
|
259
|
+
}
|
|
260
|
+
break;
|
|
253
261
|
}
|
|
254
262
|
}
|
|
255
263
|
|
|
@@ -361,10 +369,21 @@ function removeNodeFromNodesMap(id: number) {
|
|
|
361
369
|
}
|
|
362
370
|
}
|
|
363
371
|
|
|
364
|
-
function
|
|
372
|
+
function updateImageSize(value: NodeValue): void {
|
|
365
373
|
// If this element is a image node, and is masked, then track box model for the current element
|
|
366
|
-
if (value.data.tag === Constant.ImageTag && value.metadata.privacy === Privacy.TextImage) {
|
|
374
|
+
if (value.data.tag === Constant.ImageTag && value.metadata.privacy === Privacy.TextImage) {
|
|
375
|
+
let img = getNode(value.id) as HTMLImageElement;
|
|
376
|
+
// We will not capture the natural image dimensions until it loads.
|
|
377
|
+
if(img && (!img.complete || img.naturalWidth === 0)){
|
|
378
|
+
// This will trigger mutation to update the original width and height after image loads.
|
|
379
|
+
bind(img, 'load', () => {
|
|
380
|
+
img.setAttribute('data-clarity-loaded', `${shortid()}`);
|
|
381
|
+
})
|
|
382
|
+
}
|
|
383
|
+
value.metadata.size = [];
|
|
384
|
+
}
|
|
367
385
|
}
|
|
386
|
+
|
|
368
387
|
function getPreviousId(node: Node): number {
|
|
369
388
|
let id = null;
|
|
370
389
|
|
package/src/layout/schema.ts
CHANGED
|
@@ -35,9 +35,6 @@ export function ld(json: any): void {
|
|
|
35
35
|
metric.max(Metric.RatingCount, num(json[JsonLD.RatingCount]));
|
|
36
36
|
metric.max(Metric.ReviewCount, num(json[JsonLD.ReviewCount]));
|
|
37
37
|
break;
|
|
38
|
-
case JsonLD.Author:
|
|
39
|
-
dimension.log(Dimension.AuthorName, json[JsonLD.Name]);
|
|
40
|
-
break;
|
|
41
38
|
case JsonLD.Offer:
|
|
42
39
|
dimension.log(Dimension.ProductAvailability, json[JsonLD.Availability]);
|
|
43
40
|
dimension.log(Dimension.ProductCondition, json[JsonLD.ItemCondition]);
|