clarity-js 0.7.25 → 0.7.26
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 +166 -146
- package/build/clarity.min.js +1 -1
- package/build/clarity.module.js +166 -146
- package/build/clarity.performance.js +1 -1
- package/package.json +1 -1
- package/rollup.config.ts +1 -1
- package/src/core/version.ts +1 -1
- package/src/data/metadata.ts +6 -3
- package/src/insight/style.ts +52 -0
- package/src/layout/node.ts +0 -6
- package/src/layout/style.ts +26 -16
- package/src/layout/traverse.ts +20 -36
- package/types/data.d.ts +2 -1
package/build/clarity.js
CHANGED
|
@@ -142,7 +142,7 @@ function api(method) {
|
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
var startTime = 0;
|
|
145
|
-
function start$
|
|
145
|
+
function start$I() {
|
|
146
146
|
startTime = performance.now();
|
|
147
147
|
}
|
|
148
148
|
function time(event) {
|
|
@@ -150,11 +150,11 @@ function time(event) {
|
|
|
150
150
|
var ts = event && event.timeStamp > 0 ? event.timeStamp : performance.now();
|
|
151
151
|
return Math.max(Math.round(ts - startTime), 0);
|
|
152
152
|
}
|
|
153
|
-
function stop$
|
|
153
|
+
function stop$F() {
|
|
154
154
|
startTime = 0;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
var version$1 = "0.7.
|
|
157
|
+
var version$1 = "0.7.26";
|
|
158
158
|
|
|
159
159
|
// tslint:disable: no-bitwise
|
|
160
160
|
function hash (input, precision) {
|
|
@@ -358,11 +358,11 @@ function redact$1(value) {
|
|
|
358
358
|
var state$c = null;
|
|
359
359
|
var buffer = null;
|
|
360
360
|
var update$2 = false;
|
|
361
|
-
function start$
|
|
361
|
+
function start$H() {
|
|
362
362
|
update$2 = false;
|
|
363
|
-
reset$
|
|
363
|
+
reset$s();
|
|
364
364
|
}
|
|
365
|
-
function reset$
|
|
365
|
+
function reset$s() {
|
|
366
366
|
// Baseline state holds the previous values - if it is updated in the current payload,
|
|
367
367
|
// reset the state to current value after sending the previous state
|
|
368
368
|
if (update$2) {
|
|
@@ -424,23 +424,23 @@ function visibility(t, visible) {
|
|
|
424
424
|
}
|
|
425
425
|
update$2 = true;
|
|
426
426
|
}
|
|
427
|
-
function compute$
|
|
427
|
+
function compute$d() {
|
|
428
428
|
if (update$2) {
|
|
429
429
|
encode$1(4 /* Event.Baseline */);
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
|
-
function stop$
|
|
433
|
-
reset$
|
|
432
|
+
function stop$E() {
|
|
433
|
+
reset$s();
|
|
434
434
|
}
|
|
435
435
|
|
|
436
436
|
var baseline = /*#__PURE__*/Object.freeze({
|
|
437
437
|
__proto__: null,
|
|
438
438
|
activity: activity,
|
|
439
|
-
compute: compute$
|
|
440
|
-
reset: reset$
|
|
441
|
-
start: start$
|
|
439
|
+
compute: compute$d,
|
|
440
|
+
reset: reset$s,
|
|
441
|
+
start: start$H,
|
|
442
442
|
get state () { return state$c; },
|
|
443
|
-
stop: stop$
|
|
443
|
+
stop: stop$E,
|
|
444
444
|
track: track$8,
|
|
445
445
|
visibility: visibility
|
|
446
446
|
});
|
|
@@ -465,12 +465,12 @@ function event(a, b) {
|
|
|
465
465
|
|
|
466
466
|
var data$i = null;
|
|
467
467
|
var updates$3 = null;
|
|
468
|
-
function start$
|
|
468
|
+
function start$G() {
|
|
469
469
|
data$i = {};
|
|
470
470
|
updates$3 = {};
|
|
471
471
|
count$1(5 /* Metric.InvokeCount */);
|
|
472
472
|
}
|
|
473
|
-
function stop$
|
|
473
|
+
function stop$D() {
|
|
474
474
|
data$i = {};
|
|
475
475
|
updates$3 = {};
|
|
476
476
|
}
|
|
@@ -508,10 +508,10 @@ function max(metric, value) {
|
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
-
function compute$
|
|
511
|
+
function compute$c() {
|
|
512
512
|
encode$1(0 /* Event.Metric */);
|
|
513
513
|
}
|
|
514
|
-
function reset$
|
|
514
|
+
function reset$r() {
|
|
515
515
|
updates$3 = {};
|
|
516
516
|
}
|
|
517
517
|
|
|
@@ -526,11 +526,11 @@ var data$h;
|
|
|
526
526
|
var last = 0;
|
|
527
527
|
var interval = 0;
|
|
528
528
|
var timeout$6 = null;
|
|
529
|
-
function start$
|
|
529
|
+
function start$F() {
|
|
530
530
|
interval = 60000 /* Setting.PingInterval */;
|
|
531
531
|
last = 0;
|
|
532
532
|
}
|
|
533
|
-
function reset$
|
|
533
|
+
function reset$q() {
|
|
534
534
|
if (timeout$6) {
|
|
535
535
|
clearTimeout(timeout$6);
|
|
536
536
|
}
|
|
@@ -548,7 +548,7 @@ function ping() {
|
|
|
548
548
|
suspend();
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
function stop$
|
|
551
|
+
function stop$C() {
|
|
552
552
|
clearTimeout(timeout$6);
|
|
553
553
|
last = 0;
|
|
554
554
|
interval = 0;
|
|
@@ -557,16 +557,16 @@ function stop$B() {
|
|
|
557
557
|
var ping$1 = /*#__PURE__*/Object.freeze({
|
|
558
558
|
__proto__: null,
|
|
559
559
|
get data () { return data$h; },
|
|
560
|
-
reset: reset$
|
|
561
|
-
start: start$
|
|
562
|
-
stop: stop$
|
|
560
|
+
reset: reset$q,
|
|
561
|
+
start: start$F,
|
|
562
|
+
stop: stop$C
|
|
563
563
|
});
|
|
564
564
|
|
|
565
565
|
var data$g = null;
|
|
566
|
-
function start$
|
|
566
|
+
function start$E() {
|
|
567
567
|
data$g = {};
|
|
568
568
|
}
|
|
569
|
-
function stop$
|
|
569
|
+
function stop$B() {
|
|
570
570
|
data$g = {};
|
|
571
571
|
}
|
|
572
572
|
function track$7(event, time) {
|
|
@@ -586,25 +586,25 @@ function track$7(event, time) {
|
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
function compute$
|
|
589
|
+
function compute$b() {
|
|
590
590
|
encode$1(36 /* Event.Summary */);
|
|
591
591
|
}
|
|
592
|
-
function reset$
|
|
592
|
+
function reset$p() {
|
|
593
593
|
data$g = {};
|
|
594
594
|
}
|
|
595
595
|
|
|
596
596
|
var summary = /*#__PURE__*/Object.freeze({
|
|
597
597
|
__proto__: null,
|
|
598
|
-
compute: compute$
|
|
598
|
+
compute: compute$b,
|
|
599
599
|
get data () { return data$g; },
|
|
600
|
-
reset: reset$
|
|
601
|
-
start: start$
|
|
602
|
-
stop: stop$
|
|
600
|
+
reset: reset$p,
|
|
601
|
+
start: start$E,
|
|
602
|
+
stop: stop$B,
|
|
603
603
|
track: track$7
|
|
604
604
|
});
|
|
605
605
|
|
|
606
606
|
var data$f = null;
|
|
607
|
-
function start$
|
|
607
|
+
function start$D() {
|
|
608
608
|
if (!config$1.lean && config$1.upgrade) {
|
|
609
609
|
config$1.upgrade("Config" /* Constant.Config */);
|
|
610
610
|
}
|
|
@@ -628,15 +628,15 @@ function upgrade(key) {
|
|
|
628
628
|
encode$1(3 /* Event.Upgrade */);
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
|
-
function stop$
|
|
631
|
+
function stop$A() {
|
|
632
632
|
data$f = null;
|
|
633
633
|
}
|
|
634
634
|
|
|
635
635
|
var upgrade$1 = /*#__PURE__*/Object.freeze({
|
|
636
636
|
__proto__: null,
|
|
637
637
|
get data () { return data$f; },
|
|
638
|
-
start: start$
|
|
639
|
-
stop: stop$
|
|
638
|
+
start: start$D,
|
|
639
|
+
stop: stop$A,
|
|
640
640
|
upgrade: upgrade
|
|
641
641
|
});
|
|
642
642
|
|
|
@@ -694,8 +694,8 @@ function __generator(thisArg, body) {
|
|
|
694
694
|
}
|
|
695
695
|
|
|
696
696
|
var data$e = null;
|
|
697
|
-
function start$
|
|
698
|
-
reset$
|
|
697
|
+
function start$C() {
|
|
698
|
+
reset$o();
|
|
699
699
|
}
|
|
700
700
|
function set(variable, value) {
|
|
701
701
|
var values = typeof value === "string" /* Constant.String */ ? [value] : value;
|
|
@@ -750,14 +750,14 @@ function log$2(variable, value) {
|
|
|
750
750
|
data$e[variable] = validValues;
|
|
751
751
|
}
|
|
752
752
|
}
|
|
753
|
-
function compute$
|
|
753
|
+
function compute$a() {
|
|
754
754
|
encode$1(34 /* Event.Variable */);
|
|
755
755
|
}
|
|
756
|
-
function reset$
|
|
756
|
+
function reset$o() {
|
|
757
757
|
data$e = {};
|
|
758
758
|
}
|
|
759
|
-
function stop$
|
|
760
|
-
reset$
|
|
759
|
+
function stop$z() {
|
|
760
|
+
reset$o();
|
|
761
761
|
}
|
|
762
762
|
function redact(input) {
|
|
763
763
|
return input && input.length >= 5 /* Setting.WordLength */ ?
|
|
@@ -791,13 +791,13 @@ function detect(input) {
|
|
|
791
791
|
|
|
792
792
|
var variable = /*#__PURE__*/Object.freeze({
|
|
793
793
|
__proto__: null,
|
|
794
|
-
compute: compute$
|
|
794
|
+
compute: compute$a,
|
|
795
795
|
get data () { return data$e; },
|
|
796
796
|
identify: identify,
|
|
797
|
-
reset: reset$
|
|
797
|
+
reset: reset$o,
|
|
798
798
|
set: set,
|
|
799
|
-
start: start$
|
|
800
|
-
stop: stop$
|
|
799
|
+
start: start$C,
|
|
800
|
+
stop: stop$z
|
|
801
801
|
});
|
|
802
802
|
|
|
803
803
|
var supported$1 = "CompressionStream" /* Constant.CompressionStream */ in window;
|
|
@@ -859,32 +859,32 @@ function read(stream) {
|
|
|
859
859
|
}
|
|
860
860
|
|
|
861
861
|
var modules$1 = [baseline, dimension, variable, limit, summary, metadata$1, envelope$1, upload$1, ping$1, upgrade$1, extract];
|
|
862
|
-
function start$
|
|
862
|
+
function start$B() {
|
|
863
863
|
// Metric needs to be initialized before we can start measuring. so metric is not wrapped in measure
|
|
864
|
-
start$
|
|
864
|
+
start$G();
|
|
865
865
|
modules$1.forEach(function (x) { return measure(x.start)(); });
|
|
866
866
|
}
|
|
867
|
-
function stop$
|
|
867
|
+
function stop$y() {
|
|
868
868
|
// Stop modules in the reverse order of their initialization
|
|
869
869
|
// The ordering below should respect inter-module dependency.
|
|
870
870
|
// E.g. if upgrade depends on upload, then upgrade needs to end before upload.
|
|
871
871
|
// Similarly, if upload depends on metadata, upload needs to end before metadata.
|
|
872
872
|
modules$1.slice().reverse().forEach(function (x) { return measure(x.stop)(); });
|
|
873
|
-
stop$
|
|
873
|
+
stop$D();
|
|
874
874
|
}
|
|
875
|
-
function compute$
|
|
876
|
-
compute$
|
|
877
|
-
compute$
|
|
875
|
+
function compute$9() {
|
|
876
|
+
compute$a();
|
|
877
|
+
compute$d();
|
|
878
878
|
compute$2();
|
|
879
|
+
compute$c();
|
|
879
880
|
compute$b();
|
|
880
|
-
compute$a();
|
|
881
881
|
compute$3();
|
|
882
882
|
compute$4();
|
|
883
883
|
}
|
|
884
884
|
|
|
885
885
|
var history$5 = [];
|
|
886
886
|
var data$d;
|
|
887
|
-
function start$
|
|
887
|
+
function start$A() {
|
|
888
888
|
history$5 = [];
|
|
889
889
|
max(26 /* Metric.Automation */, navigator.webdriver ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */);
|
|
890
890
|
try {
|
|
@@ -908,7 +908,7 @@ function check$4(id, target, input) {
|
|
|
908
908
|
|
|
909
909
|
var excludeClassNames = "load,active,fixed,visible,focus,show,collaps,animat" /* Constant.ExcludeClassNames */.split("," /* Constant.Comma */);
|
|
910
910
|
var selectorMap = {};
|
|
911
|
-
function reset$
|
|
911
|
+
function reset$n() {
|
|
912
912
|
selectorMap = {};
|
|
913
913
|
}
|
|
914
914
|
function get$1(input, type) {
|
|
@@ -997,7 +997,7 @@ function filter(value) {
|
|
|
997
997
|
var selector = /*#__PURE__*/Object.freeze({
|
|
998
998
|
__proto__: null,
|
|
999
999
|
get: get$1,
|
|
1000
|
-
reset: reset$
|
|
1000
|
+
reset: reset$n
|
|
1001
1001
|
});
|
|
1002
1002
|
|
|
1003
1003
|
var index = 1;
|
|
@@ -1016,14 +1016,14 @@ var idMap = null; // Maps node => id.
|
|
|
1016
1016
|
var iframeMap = null; // Maps iframe's contentDocument => parent iframe element
|
|
1017
1017
|
var privacyMap = null; // Maps node => Privacy (enum)
|
|
1018
1018
|
var fraudMap = null; // Maps node => FraudId (number)
|
|
1019
|
-
function start$
|
|
1020
|
-
reset$
|
|
1019
|
+
function start$z() {
|
|
1020
|
+
reset$m();
|
|
1021
1021
|
parse$1(document, true);
|
|
1022
1022
|
}
|
|
1023
|
-
function stop$
|
|
1024
|
-
reset$
|
|
1023
|
+
function stop$x() {
|
|
1024
|
+
reset$m();
|
|
1025
1025
|
}
|
|
1026
|
-
function reset$
|
|
1026
|
+
function reset$m() {
|
|
1027
1027
|
index = 1;
|
|
1028
1028
|
values = [];
|
|
1029
1029
|
updateMap = [];
|
|
@@ -1039,7 +1039,7 @@ function reset$l() {
|
|
|
1039
1039
|
iframeMap = new WeakMap();
|
|
1040
1040
|
privacyMap = new WeakMap();
|
|
1041
1041
|
fraudMap = new WeakMap();
|
|
1042
|
-
reset$
|
|
1042
|
+
reset$n();
|
|
1043
1043
|
}
|
|
1044
1044
|
// We parse new root nodes for any regions or masked nodes in the beginning (document) and
|
|
1045
1045
|
// later whenever there are new additions or modifications to DOM (mutations)
|
|
@@ -1375,8 +1375,8 @@ var dom = /*#__PURE__*/Object.freeze({
|
|
|
1375
1375
|
lookup: lookup,
|
|
1376
1376
|
parse: parse$1,
|
|
1377
1377
|
sameorigin: sameorigin,
|
|
1378
|
-
start: start$
|
|
1379
|
-
stop: stop$
|
|
1378
|
+
start: start$z,
|
|
1379
|
+
stop: stop$x,
|
|
1380
1380
|
update: update$1,
|
|
1381
1381
|
updates: updates$2
|
|
1382
1382
|
});
|
|
@@ -1404,7 +1404,7 @@ function resume$1() {
|
|
|
1404
1404
|
}
|
|
1405
1405
|
}
|
|
1406
1406
|
}
|
|
1407
|
-
function reset$
|
|
1407
|
+
function reset$l() {
|
|
1408
1408
|
tracker = {};
|
|
1409
1409
|
queuedTasks = [];
|
|
1410
1410
|
activeTask = null;
|
|
@@ -1474,7 +1474,7 @@ function state$b(timer) {
|
|
|
1474
1474
|
// If this task is no longer being tracked, send stop message to the caller
|
|
1475
1475
|
return 2 /* Task.Stop */;
|
|
1476
1476
|
}
|
|
1477
|
-
function start$
|
|
1477
|
+
function start$y(timer) {
|
|
1478
1478
|
tracker[key(timer)] = { start: performance.now(), calls: 0, yield: 30 /* Setting.LongTask */ };
|
|
1479
1479
|
}
|
|
1480
1480
|
function restart$2(timer) {
|
|
@@ -1482,12 +1482,12 @@ function restart$2(timer) {
|
|
|
1482
1482
|
if (tracker && tracker[id]) {
|
|
1483
1483
|
var c = tracker[id].calls;
|
|
1484
1484
|
var y = tracker[id].yield;
|
|
1485
|
-
start$
|
|
1485
|
+
start$y(timer);
|
|
1486
1486
|
tracker[id].calls = c + 1;
|
|
1487
1487
|
tracker[id].yield = y;
|
|
1488
1488
|
}
|
|
1489
1489
|
}
|
|
1490
|
-
function stop$
|
|
1490
|
+
function stop$w(timer) {
|
|
1491
1491
|
var end = performance.now();
|
|
1492
1492
|
var id = key(timer);
|
|
1493
1493
|
var duration = end - tracker[id].start;
|
|
@@ -1507,7 +1507,7 @@ function suspend$1(timer) {
|
|
|
1507
1507
|
case 0:
|
|
1508
1508
|
id = key(timer);
|
|
1509
1509
|
if (!(id in tracker)) return [3 /*break*/, 2];
|
|
1510
|
-
stop$
|
|
1510
|
+
stop$w(timer);
|
|
1511
1511
|
_a = tracker[id];
|
|
1512
1512
|
return [4 /*yield*/, wait()];
|
|
1513
1513
|
case 1:
|
|
@@ -1620,14 +1620,14 @@ function tokenize (tokens) {
|
|
|
1620
1620
|
}
|
|
1621
1621
|
|
|
1622
1622
|
var data$c;
|
|
1623
|
-
function reset$
|
|
1623
|
+
function reset$k() {
|
|
1624
1624
|
data$c = null;
|
|
1625
1625
|
}
|
|
1626
|
-
function start$
|
|
1627
|
-
reset$
|
|
1628
|
-
compute$
|
|
1626
|
+
function start$x() {
|
|
1627
|
+
reset$k();
|
|
1628
|
+
compute$8();
|
|
1629
1629
|
}
|
|
1630
|
-
function compute$
|
|
1630
|
+
function compute$8() {
|
|
1631
1631
|
var body = document.body;
|
|
1632
1632
|
var d = document.documentElement;
|
|
1633
1633
|
var bodyClientWidth = body ? body.clientWidth : null;
|
|
@@ -1650,12 +1650,51 @@ function compute$7() {
|
|
|
1650
1650
|
encode$4(8 /* Event.Document */);
|
|
1651
1651
|
}
|
|
1652
1652
|
}
|
|
1653
|
+
function stop$v() {
|
|
1654
|
+
reset$k();
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
var state$a = [];
|
|
1658
|
+
var replace = null;
|
|
1659
|
+
var replaceSync = null;
|
|
1660
|
+
function start$w() {
|
|
1661
|
+
reset$j();
|
|
1662
|
+
if (replace === null) {
|
|
1663
|
+
replace = CSSStyleSheet.prototype.replace;
|
|
1664
|
+
CSSStyleSheet.prototype.replace = function () {
|
|
1665
|
+
if (active()) {
|
|
1666
|
+
max(36 /* Metric.ConstructedStyles */, 1);
|
|
1667
|
+
}
|
|
1668
|
+
return replace.apply(this, arguments);
|
|
1669
|
+
};
|
|
1670
|
+
}
|
|
1671
|
+
if (replaceSync === null) {
|
|
1672
|
+
replaceSync = CSSStyleSheet.prototype.replaceSync;
|
|
1673
|
+
CSSStyleSheet.prototype.replaceSync = function () {
|
|
1674
|
+
if (active()) {
|
|
1675
|
+
max(36 /* Metric.ConstructedStyles */, 1);
|
|
1676
|
+
}
|
|
1677
|
+
return replaceSync.apply(this, arguments);
|
|
1678
|
+
};
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
function checkDocumentStyles(documentNode) {
|
|
1682
|
+
if (!(documentNode === null || documentNode === void 0 ? void 0 : documentNode.adoptedStyleSheets)) {
|
|
1683
|
+
// if we don't have adoptedStyledSheets on the Node passed to us, we can short circuit.
|
|
1684
|
+
return;
|
|
1685
|
+
}
|
|
1686
|
+
max(36 /* Metric.ConstructedStyles */, 1);
|
|
1687
|
+
}
|
|
1688
|
+
function compute$7() {
|
|
1689
|
+
checkDocumentStyles(document);
|
|
1690
|
+
}
|
|
1691
|
+
function reset$j() {
|
|
1692
|
+
state$a = [];
|
|
1693
|
+
}
|
|
1653
1694
|
function stop$u() {
|
|
1654
1695
|
reset$j();
|
|
1655
1696
|
}
|
|
1656
1697
|
|
|
1657
|
-
var state$a = [];
|
|
1658
|
-
|
|
1659
1698
|
var state$9 = [];
|
|
1660
1699
|
var animationPlay = null;
|
|
1661
1700
|
var animationPause = null;
|
|
@@ -1788,6 +1827,7 @@ function encode$4 (type, timer, ts) {
|
|
|
1788
1827
|
tokens.push(entry.data.newIds);
|
|
1789
1828
|
queue(tokens);
|
|
1790
1829
|
}
|
|
1830
|
+
reset$j();
|
|
1791
1831
|
return [3 /*break*/, 13];
|
|
1792
1832
|
case 4:
|
|
1793
1833
|
for (_e = 0, _f = state$a; _e < _f.length; _e++) {
|
|
@@ -1798,6 +1838,7 @@ function encode$4 (type, timer, ts) {
|
|
|
1798
1838
|
tokens.push(entry.data.cssRules);
|
|
1799
1839
|
queue(tokens);
|
|
1800
1840
|
}
|
|
1841
|
+
reset$j();
|
|
1801
1842
|
_l.label = 5;
|
|
1802
1843
|
case 5:
|
|
1803
1844
|
for (_g = 0, _h = state$9; _g < _h.length; _g++) {
|
|
@@ -2710,6 +2751,7 @@ function processNode (node, source) {
|
|
|
2710
2751
|
// later whenever there are new additions or modifications to DOM (mutations)
|
|
2711
2752
|
if (node === document)
|
|
2712
2753
|
parse$1(document);
|
|
2754
|
+
checkDocumentStyles(node);
|
|
2713
2755
|
observe$2(node);
|
|
2714
2756
|
break;
|
|
2715
2757
|
case Node.DOCUMENT_FRAGMENT_NODE:
|
|
@@ -2733,6 +2775,7 @@ function processNode (node, source) {
|
|
|
2733
2775
|
// the same way we observe real shadow DOM nodes (encapsulation provided by the browser).
|
|
2734
2776
|
dom[call](node, shadowRoot.host, { tag: "*P" /* Constant.PolyfillShadowDomTag */, attributes: {} }, source);
|
|
2735
2777
|
}
|
|
2778
|
+
checkDocumentStyles(node);
|
|
2736
2779
|
}
|
|
2737
2780
|
break;
|
|
2738
2781
|
case Node.TEXT_NODE:
|
|
@@ -2755,12 +2798,6 @@ function processNode (node, source) {
|
|
|
2755
2798
|
// In some cases, external libraries like vue-fragment, can modify parentNode property to not be in sync with the DOM
|
|
2756
2799
|
// For correctness, we first look at parentElement and if it not present then fall back to using parentNode
|
|
2757
2800
|
parent = node.parentElement ? node.parentElement : (node.parentNode ? node.parentNode : null);
|
|
2758
|
-
// For HTML slots, the parentElement doesn't actually match what is rendered. If we have an assignedSlot, we use that
|
|
2759
|
-
// as the parent to ensure our visualizations match the browser behavior for end users.
|
|
2760
|
-
var slottedParent = node.assignedSlot;
|
|
2761
|
-
if (slottedParent) {
|
|
2762
|
-
parent = slottedParent;
|
|
2763
|
-
}
|
|
2764
2801
|
// If we encounter a node that is part of SVG namespace, prefix the tag with SVG_PREFIX
|
|
2765
2802
|
if (element.namespaceURI === "http://www.w3.org/2000/svg" /* Constant.SvgNamespace */) {
|
|
2766
2803
|
tag = "svg:" /* Constant.SvgPrefix */ + tag;
|
|
@@ -2934,60 +2971,36 @@ function getAttributes(element) {
|
|
|
2934
2971
|
|
|
2935
2972
|
function traverse (root, timer, source) {
|
|
2936
2973
|
return __awaiter(this, void 0, void 0, function () {
|
|
2937
|
-
var
|
|
2938
|
-
return __generator(this, function (
|
|
2939
|
-
switch (
|
|
2974
|
+
var queue, entry, next, state, subnode;
|
|
2975
|
+
return __generator(this, function (_a) {
|
|
2976
|
+
switch (_a.label) {
|
|
2940
2977
|
case 0:
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
_i = 0, _a = [primaryQueue, slottedNodesQueue];
|
|
2944
|
-
_b.label = 1;
|
|
2978
|
+
queue = [root];
|
|
2979
|
+
_a.label = 1;
|
|
2945
2980
|
case 1:
|
|
2946
|
-
if (!(
|
|
2947
|
-
|
|
2948
|
-
_b.label = 2;
|
|
2949
|
-
case 2:
|
|
2950
|
-
if (!(currentQueue.length > 0)) return [3 /*break*/, 5];
|
|
2951
|
-
entry = currentQueue.shift();
|
|
2981
|
+
if (!(queue.length > 0)) return [3 /*break*/, 4];
|
|
2982
|
+
entry = queue.shift();
|
|
2952
2983
|
next = entry.firstChild;
|
|
2953
2984
|
while (next) {
|
|
2954
|
-
|
|
2955
|
-
// as the typical parent/child methods don't reflect what is rendered. We need to make sure all other mutations and
|
|
2956
|
-
// discoveries are processed before we process a slotted element. Once we are processing the slottedNodesQueue we can
|
|
2957
|
-
// skip this effort and go directly to our breadth first traversal.
|
|
2958
|
-
if (currentQueue == primaryQueue) {
|
|
2959
|
-
slottedParent = next.assignedSlot;
|
|
2960
|
-
if (slottedParent) {
|
|
2961
|
-
slottedNodesQueue.push(next);
|
|
2962
|
-
}
|
|
2963
|
-
else {
|
|
2964
|
-
currentQueue.push(next);
|
|
2965
|
-
}
|
|
2966
|
-
}
|
|
2967
|
-
else {
|
|
2968
|
-
currentQueue.push(next);
|
|
2969
|
-
}
|
|
2985
|
+
queue.push(next);
|
|
2970
2986
|
next = next.nextSibling;
|
|
2971
2987
|
}
|
|
2972
2988
|
state = state$b(timer);
|
|
2973
|
-
if (!(state === 0 /* Task.Wait */)) return [3 /*break*/,
|
|
2989
|
+
if (!(state === 0 /* Task.Wait */)) return [3 /*break*/, 3];
|
|
2974
2990
|
return [4 /*yield*/, suspend$1(timer)];
|
|
2991
|
+
case 2:
|
|
2992
|
+
state = _a.sent();
|
|
2993
|
+
_a.label = 3;
|
|
2975
2994
|
case 3:
|
|
2976
|
-
state = _b.sent();
|
|
2977
|
-
_b.label = 4;
|
|
2978
|
-
case 4:
|
|
2979
2995
|
if (state === 2 /* Task.Stop */) {
|
|
2980
|
-
return [3 /*break*/,
|
|
2996
|
+
return [3 /*break*/, 4];
|
|
2981
2997
|
}
|
|
2982
2998
|
subnode = processNode(entry, source);
|
|
2983
2999
|
if (subnode) {
|
|
2984
|
-
|
|
3000
|
+
queue.push(subnode);
|
|
2985
3001
|
}
|
|
2986
|
-
return [3 /*break*/, 2];
|
|
2987
|
-
case 5:
|
|
2988
|
-
_i++;
|
|
2989
3002
|
return [3 /*break*/, 1];
|
|
2990
|
-
case
|
|
3003
|
+
case 4: return [2 /*return*/];
|
|
2991
3004
|
}
|
|
2992
3005
|
});
|
|
2993
3006
|
});
|
|
@@ -3098,7 +3111,7 @@ function handle$1(m) {
|
|
|
3098
3111
|
track$7(6 /* Event.Mutation */, now);
|
|
3099
3112
|
mutations.push({ time: now, mutations: m });
|
|
3100
3113
|
schedule$1(process$1, 1 /* Priority.High */).then(function () {
|
|
3101
|
-
setTimeout(compute$
|
|
3114
|
+
setTimeout(compute$8);
|
|
3102
3115
|
measure(compute$6)();
|
|
3103
3116
|
});
|
|
3104
3117
|
}
|
|
@@ -3109,7 +3122,7 @@ function process$1() {
|
|
|
3109
3122
|
switch (_b.label) {
|
|
3110
3123
|
case 0:
|
|
3111
3124
|
timer = { id: id(), cost: 3 /* Metric.LayoutCost */ };
|
|
3112
|
-
start$
|
|
3125
|
+
start$y(timer);
|
|
3113
3126
|
_b.label = 1;
|
|
3114
3127
|
case 1:
|
|
3115
3128
|
if (!(mutations.length > 0)) return [3 /*break*/, 8];
|
|
@@ -3165,7 +3178,7 @@ function process$1() {
|
|
|
3165
3178
|
_b.sent();
|
|
3166
3179
|
return [3 /*break*/, 1];
|
|
3167
3180
|
case 8:
|
|
3168
|
-
stop$
|
|
3181
|
+
stop$w(timer);
|
|
3169
3182
|
return [2 /*return*/];
|
|
3170
3183
|
}
|
|
3171
3184
|
});
|
|
@@ -3600,7 +3613,7 @@ function queue(tokens, transmit) {
|
|
|
3600
3613
|
// We enrich the data going out with the existing upload. In these cases, call to upload comes with 'transmit' set to false.
|
|
3601
3614
|
if (transmit && timeout === null) {
|
|
3602
3615
|
if (type !== 25 /* Event.Ping */) {
|
|
3603
|
-
reset$
|
|
3616
|
+
reset$q();
|
|
3604
3617
|
}
|
|
3605
3618
|
timeout = setTimeout(upload, gap);
|
|
3606
3619
|
queuedTime = now;
|
|
@@ -3636,7 +3649,8 @@ function upload(final) {
|
|
|
3636
3649
|
// Otherwise you run a risk of infinite loop.
|
|
3637
3650
|
compute$6();
|
|
3638
3651
|
compute$5();
|
|
3639
|
-
compute$
|
|
3652
|
+
compute$9();
|
|
3653
|
+
compute$7();
|
|
3640
3654
|
last = final === true;
|
|
3641
3655
|
e = JSON.stringify(envelope(last));
|
|
3642
3656
|
a = "[".concat(analysis.join(), "]");
|
|
@@ -4119,7 +4133,7 @@ function encode$1 (event) {
|
|
|
4119
4133
|
tokens.push(b.data.activityTime);
|
|
4120
4134
|
queue(tokens, false);
|
|
4121
4135
|
}
|
|
4122
|
-
reset$
|
|
4136
|
+
reset$s();
|
|
4123
4137
|
break;
|
|
4124
4138
|
case 25 /* Event.Ping */:
|
|
4125
4139
|
tokens.push(data$h.gap);
|
|
@@ -4153,7 +4167,7 @@ function encode$1 (event) {
|
|
|
4153
4167
|
tokens.push(v);
|
|
4154
4168
|
tokens.push(data$e[v]);
|
|
4155
4169
|
}
|
|
4156
|
-
reset$
|
|
4170
|
+
reset$o();
|
|
4157
4171
|
queue(tokens, false);
|
|
4158
4172
|
}
|
|
4159
4173
|
break;
|
|
@@ -4168,7 +4182,7 @@ function encode$1 (event) {
|
|
|
4168
4182
|
// However, for data over the wire, we round it off to milliseconds precision.
|
|
4169
4183
|
tokens.push(Math.round(updates$3[m]));
|
|
4170
4184
|
}
|
|
4171
|
-
reset$
|
|
4185
|
+
reset$r();
|
|
4172
4186
|
queue(tokens, false);
|
|
4173
4187
|
}
|
|
4174
4188
|
break;
|
|
@@ -4194,7 +4208,7 @@ function encode$1 (event) {
|
|
|
4194
4208
|
tokens.push(key);
|
|
4195
4209
|
tokens.push([].concat.apply([], data$g[e]));
|
|
4196
4210
|
}
|
|
4197
|
-
reset$
|
|
4211
|
+
reset$p();
|
|
4198
4212
|
queue(tokens, false);
|
|
4199
4213
|
}
|
|
4200
4214
|
break;
|
|
@@ -4381,8 +4395,9 @@ function id() {
|
|
|
4381
4395
|
function consent(status) {
|
|
4382
4396
|
if (status === void 0) { status = true; }
|
|
4383
4397
|
if (!status) {
|
|
4384
|
-
|
|
4385
|
-
setCookie("
|
|
4398
|
+
config$1.track = false;
|
|
4399
|
+
setCookie("_clsk" /* Constant.SessionKey */, "" /* Constant.Empty */, -Number.MAX_VALUE);
|
|
4400
|
+
setCookie("_clck" /* Constant.CookieKey */, "" /* Constant.Empty */, -Number.MAX_VALUE);
|
|
4386
4401
|
stop();
|
|
4387
4402
|
window.setTimeout(start, 250 /* Setting.RestartDelay */);
|
|
4388
4403
|
return;
|
|
@@ -4553,7 +4568,9 @@ function encodeCookieValue(value) {
|
|
|
4553
4568
|
return encodeURIComponent(value);
|
|
4554
4569
|
}
|
|
4555
4570
|
function setCookie(key, value, time) {
|
|
4556
|
-
if
|
|
4571
|
+
// only write cookies if we are currently in a cookie writing mode (and they are supported)
|
|
4572
|
+
// OR if we are trying to write an empty cookie (i.e. clear the cookie value out)
|
|
4573
|
+
if ((config$1.track || value == "" /* Constant.Empty */) && ((navigator && navigator.cookieEnabled) || supported(document, "cookie" /* Constant.Cookie */))) {
|
|
4557
4574
|
// Some browsers automatically url encode cookie values if they are not url encoded.
|
|
4558
4575
|
// We therefore encode and decode cookie values ourselves.
|
|
4559
4576
|
var encodedValue = encodeCookieValue(value);
|
|
@@ -4763,8 +4780,8 @@ function stop$6() {
|
|
|
4763
4780
|
var status = false;
|
|
4764
4781
|
function start$6() {
|
|
4765
4782
|
status = true;
|
|
4766
|
-
start$
|
|
4767
|
-
reset$
|
|
4783
|
+
start$I();
|
|
4784
|
+
reset$l();
|
|
4768
4785
|
reset$1();
|
|
4769
4786
|
reset$2();
|
|
4770
4787
|
start$7();
|
|
@@ -4773,8 +4790,8 @@ function stop$5() {
|
|
|
4773
4790
|
stop$6();
|
|
4774
4791
|
reset$2();
|
|
4775
4792
|
reset$1();
|
|
4776
|
-
reset$
|
|
4777
|
-
stop$
|
|
4793
|
+
reset$l();
|
|
4794
|
+
stop$F();
|
|
4778
4795
|
status = false;
|
|
4779
4796
|
}
|
|
4780
4797
|
function active() {
|
|
@@ -4828,7 +4845,7 @@ function restart() {
|
|
|
4828
4845
|
}
|
|
4829
4846
|
|
|
4830
4847
|
function start$5() {
|
|
4831
|
-
start$
|
|
4848
|
+
start$A();
|
|
4832
4849
|
start$e();
|
|
4833
4850
|
start$d();
|
|
4834
4851
|
}
|
|
@@ -4844,7 +4861,7 @@ var diagnostic = /*#__PURE__*/Object.freeze({
|
|
|
4844
4861
|
|
|
4845
4862
|
function start$4() {
|
|
4846
4863
|
schedule$1(discover, 1 /* Priority.High */).then(function () {
|
|
4847
|
-
measure(compute$
|
|
4864
|
+
measure(compute$8)();
|
|
4848
4865
|
measure(compute$6)();
|
|
4849
4866
|
});
|
|
4850
4867
|
}
|
|
@@ -4856,14 +4873,15 @@ function discover() {
|
|
|
4856
4873
|
case 0:
|
|
4857
4874
|
ts = time();
|
|
4858
4875
|
timer = { id: id(), cost: 3 /* Metric.LayoutCost */ };
|
|
4859
|
-
start$
|
|
4876
|
+
start$y(timer);
|
|
4860
4877
|
return [4 /*yield*/, traverse(document, timer, 0 /* Source.Discover */)];
|
|
4861
4878
|
case 1:
|
|
4862
4879
|
_a.sent();
|
|
4880
|
+
checkDocumentStyles(document);
|
|
4863
4881
|
return [4 /*yield*/, encode$4(5 /* Event.Discover */, timer, ts)];
|
|
4864
4882
|
case 2:
|
|
4865
4883
|
_a.sent();
|
|
4866
|
-
stop$
|
|
4884
|
+
stop$w(timer);
|
|
4867
4885
|
return [2 /*return*/];
|
|
4868
4886
|
}
|
|
4869
4887
|
});
|
|
@@ -4873,17 +4891,19 @@ function discover() {
|
|
|
4873
4891
|
function start$3() {
|
|
4874
4892
|
// The order below is important
|
|
4875
4893
|
// and is determined by interdependencies of modules
|
|
4876
|
-
start$
|
|
4894
|
+
start$x();
|
|
4877
4895
|
start$u();
|
|
4878
|
-
start$
|
|
4896
|
+
start$z();
|
|
4879
4897
|
start$h();
|
|
4880
4898
|
start$4();
|
|
4899
|
+
start$w();
|
|
4881
4900
|
start$v();
|
|
4882
4901
|
}
|
|
4883
4902
|
function stop$3() {
|
|
4884
4903
|
stop$s();
|
|
4885
|
-
stop$
|
|
4904
|
+
stop$x();
|
|
4886
4905
|
stop$f();
|
|
4906
|
+
stop$v();
|
|
4887
4907
|
stop$u();
|
|
4888
4908
|
stop$t();
|
|
4889
4909
|
}
|
|
@@ -5079,7 +5099,7 @@ function start(config$1) {
|
|
|
5079
5099
|
if (check()) {
|
|
5080
5100
|
config(config$1);
|
|
5081
5101
|
start$6();
|
|
5082
|
-
start$
|
|
5102
|
+
start$B();
|
|
5083
5103
|
modules.forEach(function (x) { return measure(x.start)(); });
|
|
5084
5104
|
// If it's an internal call to start, without explicit configuration,
|
|
5085
5105
|
// re-process any newly accumulated items in the queue
|
|
@@ -5110,7 +5130,7 @@ function stop() {
|
|
|
5110
5130
|
if (active()) {
|
|
5111
5131
|
// Stop modules in the reverse order of their initialization and start queuing up items again
|
|
5112
5132
|
modules.slice().reverse().forEach(function (x) { return measure(x.stop)(); });
|
|
5113
|
-
stop$
|
|
5133
|
+
stop$y();
|
|
5114
5134
|
stop$5();
|
|
5115
5135
|
setup();
|
|
5116
5136
|
}
|