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