clarity-js 0.6.41 → 0.6.42

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.
@@ -75,7 +75,7 @@ var envelope$1 = /*#__PURE__*/Object.freeze({
75
75
 
76
76
  var config$1 = {
77
77
  projectId: null,
78
- delay: 1 * 1000 /* Time.Second */,
78
+ delay: 1 * 1000 /* Second */,
79
79
  lean: false,
80
80
  track: true,
81
81
  content: true,
@@ -96,7 +96,7 @@ function api(method) {
96
96
  // Zone.js, a popular package for Angular, overrides native browser APIs which can lead to inconsistent state for single page applications.
97
97
  // Example issue: https://github.com/angular/angular/issues/31712
98
98
  // As a work around, we ensuring Clarity access APIs outside of Zone (and use native implementation instead)
99
- return window["Zone" /* Constant.Zone */] && "__symbol__" /* Constant.Symbol */ in window["Zone" /* Constant.Zone */] ? window["Zone" /* Constant.Zone */]["__symbol__" /* Constant.Symbol */](method) : method;
99
+ return window["Zone" /* Zone */] && "__symbol__" /* Symbol */ in window["Zone" /* Zone */] ? window["Zone" /* Zone */]["__symbol__" /* Symbol */](method) : method;
100
100
  }
101
101
 
102
102
  var startTime = 0;
@@ -112,7 +112,7 @@ function stop$B() {
112
112
  startTime = 0;
113
113
  }
114
114
 
115
- var version$1 = "0.6.41";
115
+ var version$1 = "0.6.42";
116
116
 
117
117
  // tslint:disable: no-bitwise
118
118
  function hash (input) {
@@ -145,7 +145,7 @@ function reset$p() {
145
145
  // Baseline state holds the previous values - if it is updated in the current payload,
146
146
  // reset the state to current value after sending the previous state
147
147
  if (update$2) {
148
- state$9 = { time: time(), event: 4 /* Event.Baseline */, data: {
148
+ state$9 = { time: time(), event: 4 /* Baseline */, data: {
149
149
  visible: buffer.visible,
150
150
  docWidth: buffer.docWidth,
151
151
  docHeight: buffer.docHeight,
@@ -160,7 +160,7 @@ function reset$p() {
160
160
  };
161
161
  }
162
162
  buffer = buffer ? buffer : {
163
- visible: 1 /* BooleanFlag.True */,
163
+ visible: 1 /* True */,
164
164
  docWidth: 0,
165
165
  docHeight: 0,
166
166
  screenWidth: 0,
@@ -174,15 +174,15 @@ function reset$p() {
174
174
  }
175
175
  function track$7(event, x, y) {
176
176
  switch (event) {
177
- case 8 /* Event.Document */:
177
+ case 8 /* Document */:
178
178
  buffer.docWidth = x;
179
179
  buffer.docHeight = y;
180
180
  break;
181
- case 11 /* Event.Resize */:
181
+ case 11 /* Resize */:
182
182
  buffer.screenWidth = x;
183
183
  buffer.screenHeight = y;
184
184
  break;
185
- case 10 /* Event.Scroll */:
185
+ case 10 /* Scroll */:
186
186
  buffer.scrollX = x;
187
187
  buffer.scrollY = y;
188
188
  break;
@@ -197,7 +197,7 @@ function activity(t) {
197
197
  buffer.activityTime = t;
198
198
  }
199
199
  function visibility(t, visible) {
200
- buffer.visible = visible === "visible" ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */;
200
+ buffer.visible = visible === "visible" ? 1 /* True */ : 0 /* False */;
201
201
  if (!buffer.visible) {
202
202
  activity(t);
203
203
  }
@@ -205,7 +205,7 @@ function visibility(t, visible) {
205
205
  }
206
206
  function compute$c() {
207
207
  if (update$2) {
208
- encode$1(4 /* Event.Baseline */);
208
+ encode$1(4 /* Baseline */);
209
209
  }
210
210
  }
211
211
  function stop$A() {
@@ -229,12 +229,12 @@ function event(key, value) {
229
229
  if (active() &&
230
230
  key &&
231
231
  value &&
232
- typeof key === "string" /* Constant.String */ &&
233
- typeof value === "string" /* Constant.String */ &&
232
+ typeof key === "string" /* String */ &&
233
+ typeof value === "string" /* String */ &&
234
234
  key.length < 255 &&
235
235
  value.length < 255) {
236
236
  data$j = { key: key, value: value };
237
- encode$1(24 /* Event.Custom */);
237
+ encode$1(24 /* Custom */);
238
238
  }
239
239
  }
240
240
 
@@ -243,7 +243,7 @@ var updates$3 = null;
243
243
  function start$D() {
244
244
  data$i = {};
245
245
  updates$3 = {};
246
- count$1(5 /* Metric.InvokeCount */);
246
+ count$1(5 /* InvokeCount */);
247
247
  }
248
248
  function stop$z() {
249
249
  data$i = {};
@@ -284,7 +284,7 @@ function max(metric, value) {
284
284
  }
285
285
  }
286
286
  function compute$b() {
287
- encode$1(0 /* Event.Metric */);
287
+ encode$1(0 /* Metric */);
288
288
  }
289
289
  function reset$o() {
290
290
  updates$3 = {};
@@ -302,7 +302,7 @@ var last = 0;
302
302
  var interval = 0;
303
303
  var timeout$6 = null;
304
304
  function start$C() {
305
- interval = 60000 /* Setting.PingInterval */;
305
+ interval = 60000 /* PingInterval */;
306
306
  last = 0;
307
307
  }
308
308
  function reset$n() {
@@ -315,8 +315,8 @@ function reset$n() {
315
315
  function ping() {
316
316
  var now = time();
317
317
  data$h = { gap: now - last };
318
- encode$1(25 /* Event.Ping */);
319
- if (data$h.gap < 300000 /* Setting.PingTimeout */) {
318
+ encode$1(25 /* Ping */);
319
+ if (data$h.gap < 300000 /* PingTimeout */) {
320
320
  timeout$6 = setTimeout(ping, interval);
321
321
  }
322
322
  else {
@@ -353,7 +353,7 @@ function track$6(event, time) {
353
353
  var last = e[e.length - 1];
354
354
  // Add a new entry only if the new event occurs after configured interval
355
355
  // Otherwise, extend the duration of the previous entry
356
- if (time - last[0] > 100 /* Setting.SummaryInterval */) {
356
+ if (time - last[0] > 100 /* SummaryInterval */) {
357
357
  data$g[event].push([time, 0]);
358
358
  }
359
359
  else {
@@ -362,7 +362,7 @@ function track$6(event, time) {
362
362
  }
363
363
  }
364
364
  function compute$a() {
365
- encode$1(36 /* Event.Summary */);
365
+ encode$1(36 /* Summary */);
366
366
  }
367
367
  function reset$m() {
368
368
  data$g = {};
@@ -381,7 +381,7 @@ var summary = /*#__PURE__*/Object.freeze({
381
381
  var data$f = null;
382
382
  function start$A() {
383
383
  if (!config$1.lean && config$1.upgrade) {
384
- config$1.upgrade("Config" /* Constant.Config */);
384
+ config$1.upgrade("Config" /* Config */);
385
385
  }
386
386
  data$f = null;
387
387
  }
@@ -400,7 +400,7 @@ function upgrade(key) {
400
400
  if (config$1.upgrade) {
401
401
  config$1.upgrade(key);
402
402
  }
403
- encode$1(3 /* Event.Upgrade */);
403
+ encode$1(3 /* Upgrade */);
404
404
  }
405
405
  }
406
406
  function stop$w() {
@@ -420,25 +420,25 @@ function start$z() {
420
420
  reset$l();
421
421
  }
422
422
  function set(variable, value) {
423
- var values = typeof value === "string" /* Constant.String */ ? [value] : value;
423
+ var values = typeof value === "string" /* String */ ? [value] : value;
424
424
  log$2(variable, values);
425
425
  }
426
426
  function identify(userId, sessionId, pageId) {
427
427
  if (sessionId === void 0) { sessionId = null; }
428
428
  if (pageId === void 0) { pageId = null; }
429
- log$2("userId" /* Constant.UserId */, [userId]);
430
- log$2("sessionId" /* Constant.SessionId */, [sessionId]);
431
- log$2("pageId" /* Constant.PageId */, [pageId]);
429
+ log$2("userId" /* UserId */, [userId]);
430
+ log$2("sessionId" /* SessionId */, [sessionId]);
431
+ log$2("pageId" /* PageId */, [pageId]);
432
432
  }
433
433
  function log$2(variable, value) {
434
434
  if (active() &&
435
435
  variable &&
436
436
  value &&
437
- typeof variable === "string" /* Constant.String */ &&
437
+ typeof variable === "string" /* String */ &&
438
438
  variable.length < 255) {
439
439
  var validValues = variable in data$e ? data$e[variable] : [];
440
440
  for (var i = 0; i < value.length; i++) {
441
- if (typeof value[i] === "string" /* Constant.String */ && value[i].length < 255) {
441
+ if (typeof value[i] === "string" /* String */ && value[i].length < 255) {
442
442
  validValues.push(value[i]);
443
443
  }
444
444
  }
@@ -446,7 +446,7 @@ function log$2(variable, value) {
446
446
  }
447
447
  }
448
448
  function compute$9() {
449
- encode$1(34 /* Event.Variable */);
449
+ encode$1(34 /* Variable */);
450
450
  }
451
451
  function reset$l() {
452
452
  data$e = {};
@@ -466,7 +466,7 @@ var variable = /*#__PURE__*/Object.freeze({
466
466
  stop: stop$v
467
467
  });
468
468
 
469
- /******************************************************************************
469
+ /*! *****************************************************************************
470
470
  Copyright (c) Microsoft Corporation.
471
471
 
472
472
  Permission to use, copy, modify, and/or distribute this software for any
@@ -519,7 +519,7 @@ function __generator(thisArg, body) {
519
519
  }
520
520
  }
521
521
 
522
- var supported$1 = "CompressionStream" /* Constant.CompressionStream */ in window;
522
+ var supported$1 = "CompressionStream" /* CompressionStream */ in window;
523
523
  function compress (input) {
524
524
  return __awaiter(this, void 0, void 0, function () {
525
525
  var stream, _a;
@@ -536,7 +536,7 @@ function compress (input) {
536
536
  return [2 /*return*/];
537
537
  });
538
538
  });
539
- } }).pipeThrough(new TextEncoderStream()).pipeThrough(new window["CompressionStream" /* Constant.CompressionStream */]("gzip"));
539
+ } }).pipeThrough(new TextEncoderStream()).pipeThrough(new window["CompressionStream" /* CompressionStream */]("gzip"));
540
540
  _a = Uint8Array.bind;
541
541
  return [4 /*yield*/, read(stream)];
542
542
  case 1: return [2 /*return*/, new (_a.apply(Uint8Array, [void 0, _c.sent()]))()];
@@ -610,11 +610,11 @@ function scrub (value, hint, privacy, mangle) {
610
610
  if (mangle === void 0) { mangle = false; }
611
611
  if (value) {
612
612
  switch (privacy) {
613
- case 0 /* Privacy.None */:
613
+ case 0 /* None */:
614
614
  return value;
615
- case 1 /* Privacy.Sensitive */:
615
+ case 1 /* Sensitive */:
616
616
  switch (hint) {
617
- case "*T" /* Layout.Constant.TextTag */:
617
+ case "*T" /* TextTag */:
618
618
  case "value":
619
619
  case "placeholder":
620
620
  case "click":
@@ -622,16 +622,16 @@ function scrub (value, hint, privacy, mangle) {
622
622
  return redact(value);
623
623
  }
624
624
  return value;
625
- case 2 /* Privacy.Text */:
626
- case 3 /* Privacy.TextImage */:
625
+ case 2 /* Text */:
626
+ case 3 /* TextImage */:
627
627
  switch (hint) {
628
- case "*T" /* Layout.Constant.TextTag */:
628
+ case "*T" /* TextTag */:
629
629
  return mangle ? mangleText(value) : mask(value);
630
630
  case "src":
631
631
  case "srcset":
632
632
  case "title":
633
633
  case "alt":
634
- return privacy === 3 /* Privacy.TextImage */ ? "" /* Data.Constant.Empty */ : value;
634
+ return privacy === 3 /* TextImage */ ? "" /* Empty */ : value;
635
635
  case "value":
636
636
  case "click":
637
637
  case "input":
@@ -651,18 +651,18 @@ function mangleText(value) {
651
651
  var index = value.indexOf(first);
652
652
  var prefix = value.substr(0, index);
653
653
  var suffix = value.substr(index + trimmed.length);
654
- return "".concat(prefix).concat(trimmed.length.toString(36)).concat(suffix);
654
+ return "" + prefix + trimmed.length.toString(36) + suffix;
655
655
  }
656
656
  return value;
657
657
  }
658
658
  function mask(value) {
659
- return value.replace(catchallRegex, "\u2022" /* Data.Constant.Mask */);
659
+ return value.replace(catchallRegex, "\u2022" /* Mask */);
660
660
  }
661
661
  function mangleToken(value) {
662
- var length = ((Math.floor(value.length / 5 /* Data.Setting.WordLength */) + 1) * 5 /* Data.Setting.WordLength */);
663
- var output = "" /* Layout.Constant.Empty */;
662
+ var length = ((Math.floor(value.length / 5 /* WordLength */) + 1) * 5 /* WordLength */);
663
+ var output = "" /* Empty */;
664
664
  for (var i = 0; i < length; i++) {
665
- output += i > 0 && i % 5 /* Data.Setting.WordLength */ === 0 ? " " /* Data.Constant.Space */ : "\u2022" /* Data.Constant.Mask */;
665
+ output += i > 0 && i % 5 /* WordLength */ === 0 ? " " /* Space */ : "\u2022" /* Mask */;
666
666
  }
667
667
  return output;
668
668
  }
@@ -687,22 +687,22 @@ function redact(value) {
687
687
  }
688
688
  for (var i = 0; i < value.length; i++) {
689
689
  var c = value.charCodeAt(i);
690
- hasDigit = hasDigit || (c >= 48 /* Data.Character.Zero */ && c <= 57 /* Data.Character.Nine */); // Check for digits in the current word
691
- hasEmail = hasEmail || c === 64 /* Data.Character.At */; // Check for @ sign anywhere within the current word
692
- hasWhitespace = c === 9 /* Data.Character.Tab */ || c === 10 /* Data.Character.NewLine */ || c === 13 /* Data.Character.Return */ || c === 32 /* Data.Character.Blank */;
690
+ hasDigit = hasDigit || (c >= 48 /* Zero */ && c <= 57 /* Nine */); // Check for digits in the current word
691
+ hasEmail = hasEmail || c === 64 /* At */; // Check for @ sign anywhere within the current word
692
+ hasWhitespace = c === 9 /* Tab */ || c === 10 /* NewLine */ || c === 13 /* Return */ || c === 32 /* Blank */;
693
693
  // Process each word as an individual token to redact any sensitive information
694
694
  if (i === 0 || i === value.length - 1 || hasWhitespace) {
695
695
  // Performance optimization: Lazy load string -> array conversion only when required
696
696
  if (hasDigit || hasEmail) {
697
697
  if (array === null) {
698
- array = value.split("" /* Data.Constant.Empty */);
698
+ array = value.split("" /* Empty */);
699
699
  }
700
700
  // Work on a token at a time so we don't have to apply regex to a larger string
701
701
  var token = value.substring(spaceIndex + 1, hasWhitespace ? i : i + 1);
702
702
  // Check if unicode regex is supported, otherwise fallback to calling mask function on this token
703
703
  if (unicodeRegex && currencyRegex !== null) {
704
704
  // Do not redact information if the token contains a currency symbol
705
- token = token.match(currencyRegex) ? token : token.replace(letterRegex, "\u25AA" /* Data.Constant.Letter */).replace(digitRegex, "\u25AB" /* Data.Constant.Digit */);
705
+ token = token.match(currencyRegex) ? token : token.replace(letterRegex, "\u25AA" /* Letter */).replace(digitRegex, "\u25AB" /* Digit */);
706
706
  }
707
707
  else {
708
708
  token = mask(token);
@@ -719,28 +719,28 @@ function redact(value) {
719
719
  }
720
720
  }
721
721
  }
722
- return array ? array.join("" /* Data.Constant.Empty */) : value;
722
+ return array ? array.join("" /* Empty */) : value;
723
723
  }
724
724
 
725
725
  var history$5 = [];
726
726
  var data$d;
727
727
  function start$x() {
728
728
  history$5 = [];
729
- max(26 /* Metric.Automation */, navigator.webdriver ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */);
729
+ max(26 /* Automation */, navigator.webdriver ? 1 /* True */ : 0 /* False */);
730
730
  }
731
731
  function check$4(id, target, input) {
732
732
  // Compute hash for fraud detection. Hash is computed only if input meets the minimum length criteria
733
- if (id !== null && input && input.length >= 5 /* Setting.WordLength */) {
733
+ if (id !== null && input && input.length >= 5 /* WordLength */) {
734
734
  data$d = { id: id, target: target, hash: hash(input) };
735
735
  // Only encode this event if we haven't already reported this hash
736
736
  if (history$5.indexOf(data$d.hash) < 0) {
737
737
  history$5.push(data$d.hash);
738
- encode$2(41 /* Event.Fraud */);
738
+ encode$2(41 /* Fraud */);
739
739
  }
740
740
  }
741
741
  }
742
742
 
743
- var excludeClassNames = "load,active,fixed,visible,focus,show,collaps,animat" /* Constant.ExcludeClassNames */.split("," /* Constant.Comma */);
743
+ var excludeClassNames = "load,active,fixed,visible,focus,show,collaps,animat" /* ExcludeClassNames */.split("," /* Comma */);
744
744
  var selectorMap = {};
745
745
  function reset$k() {
746
746
  selectorMap = {};
@@ -748,68 +748,68 @@ function reset$k() {
748
748
  function get$1(input, type) {
749
749
  var a = input.attributes;
750
750
  var prefix = input.prefix ? input.prefix[type] : null;
751
- var suffix = type === 0 /* Selector.Alpha */ ? "".concat("~" /* Constant.Tilde */).concat(input.position - 1) : ":nth-of-type(".concat(input.position, ")");
751
+ var suffix = type === 0 /* Alpha */ ? "" + "~" /* Tilde */ + (input.position - 1) : ":nth-of-type(" + input.position + ")";
752
752
  switch (input.tag) {
753
753
  case "STYLE":
754
754
  case "TITLE":
755
755
  case "LINK":
756
756
  case "META":
757
- case "*T" /* Constant.TextTag */:
758
- case "*D" /* Constant.DocumentTag */:
759
- return "" /* Constant.Empty */;
757
+ case "*T" /* TextTag */:
758
+ case "*D" /* DocumentTag */:
759
+ return "" /* Empty */;
760
760
  case "HTML":
761
- return "HTML" /* Constant.HTML */;
761
+ return "HTML" /* HTML */;
762
762
  default:
763
763
  if (prefix === null) {
764
- return "" /* Constant.Empty */;
764
+ return "" /* Empty */;
765
765
  }
766
- prefix = "".concat(prefix).concat(">" /* Constant.Separator */);
767
- input.tag = input.tag.indexOf("svg:" /* Constant.SvgPrefix */) === 0 ? input.tag.substr("svg:" /* Constant.SvgPrefix */.length) : input.tag;
768
- var selector = "".concat(prefix).concat(input.tag).concat(suffix);
769
- var id = "id" /* Constant.Id */ in a && a["id" /* Constant.Id */].length > 0 ? a["id" /* Constant.Id */] : null;
770
- var classes = input.tag !== "BODY" /* Constant.BodyTag */ && "class" /* Constant.Class */ in a && a["class" /* Constant.Class */].length > 0 ? a["class" /* Constant.Class */].trim().split(/\s+/).filter(function (c) { return filter(c); }).join("." /* Constant.Period */) : null;
766
+ prefix = "" + prefix + ">" /* Separator */;
767
+ input.tag = input.tag.indexOf("svg:" /* SvgPrefix */) === 0 ? input.tag.substr("svg:" /* SvgPrefix */.length) : input.tag;
768
+ var selector = "" + prefix + input.tag + suffix;
769
+ var id = "id" /* Id */ in a && a["id" /* Id */].length > 0 ? a["id" /* Id */] : null;
770
+ var classes = input.tag !== "BODY" /* BodyTag */ && "class" /* Class */ in a && a["class" /* Class */].length > 0 ? a["class" /* Class */].trim().split(/\s+/).filter(function (c) { return filter(c); }).join("." /* Period */) : null;
771
771
  if (classes && classes.length > 0) {
772
- if (type === 0 /* Selector.Alpha */) {
772
+ if (type === 0 /* Alpha */) {
773
773
  // In Alpha mode, update selector to use class names, with relative positioning within the parent id container.
774
774
  // If the node has valid class name(s) then drop relative positioning within the parent path to keep things simple.
775
- var key = "".concat(getDomPath(prefix)).concat(input.tag).concat("." /* Constant.Dot */).concat(classes);
775
+ var key = "" + getDomPath(prefix) + input.tag + "." /* Dot */ + classes;
776
776
  if (!(key in selectorMap)) {
777
777
  selectorMap[key] = [];
778
778
  }
779
779
  if (selectorMap[key].indexOf(input.id) < 0) {
780
780
  selectorMap[key].push(input.id);
781
781
  }
782
- selector = "".concat(key).concat("~" /* Constant.Tilde */).concat(selectorMap[key].indexOf(input.id));
782
+ selector = "" + key + "~" /* Tilde */ + selectorMap[key].indexOf(input.id);
783
783
  }
784
784
  else {
785
785
  // In Beta mode, we continue to look at query selectors in context of the full page
786
- selector = "".concat(prefix).concat(input.tag, ".").concat(classes).concat(suffix);
786
+ selector = "" + prefix + input.tag + "." + classes + suffix;
787
787
  }
788
788
  }
789
789
  // Update selector to use "id" field when available. There are two exceptions:
790
790
  // (1) if "id" appears to be an auto generated string token, e.g. guid or a random id containing digits
791
791
  // (2) if "id" appears inside a shadow DOM, in which case we continue to prefix up to shadow DOM to prevent conflicts
792
- selector = id && filter(id) ? "".concat(getDomPrefix(prefix)).concat("#" /* Constant.Hash */).concat(id) : selector;
792
+ selector = id && filter(id) ? "" + getDomPrefix(prefix) + "#" /* Hash */ + id : selector;
793
793
  return selector;
794
794
  }
795
795
  }
796
796
  function getDomPrefix(prefix) {
797
- var shadowDomStart = prefix.lastIndexOf("*S" /* Constant.ShadowDomTag */);
798
- var iframeDomStart = prefix.lastIndexOf("".concat("iframe:" /* Constant.IFramePrefix */).concat("HTML" /* Constant.HTML */));
797
+ var shadowDomStart = prefix.lastIndexOf("*S" /* ShadowDomTag */);
798
+ var iframeDomStart = prefix.lastIndexOf("" + "iframe:" /* IFramePrefix */ + "HTML" /* HTML */);
799
799
  var domStart = Math.max(shadowDomStart, iframeDomStart);
800
800
  if (domStart < 0) {
801
- return "" /* Constant.Empty */;
801
+ return "" /* Empty */;
802
802
  }
803
- return prefix.substring(0, prefix.indexOf(">" /* Constant.Separator */, domStart) + 1);
803
+ return prefix.substring(0, prefix.indexOf(">" /* Separator */, domStart) + 1);
804
804
  }
805
805
  function getDomPath(input) {
806
- var parts = input.split(">" /* Constant.Separator */);
806
+ var parts = input.split(">" /* Separator */);
807
807
  for (var i = 0; i < parts.length; i++) {
808
- var tIndex = parts[i].indexOf("~" /* Constant.Tilde */);
809
- var dIndex = parts[i].indexOf("." /* Constant.Dot */);
808
+ var tIndex = parts[i].indexOf("~" /* Tilde */);
809
+ var dIndex = parts[i].indexOf("." /* Dot */);
810
810
  parts[i] = parts[i].substring(0, dIndex > 0 ? dIndex : (tIndex > 0 ? tIndex : parts[i].length));
811
811
  }
812
- return parts.join(">" /* Constant.Separator */);
812
+ return parts.join(">" /* Separator */);
813
813
  }
814
814
  // Check if the given input string has digits or excluded class names
815
815
  function filter(value) {
@@ -821,7 +821,7 @@ function filter(value) {
821
821
  }
822
822
  for (var i = 0; i < value.length; i++) {
823
823
  var c = value.charCodeAt(i);
824
- if (c >= 48 /* Character.Zero */ && c <= 57 /* Character.Nine */) {
824
+ if (c >= 48 /* Zero */ && c <= 57 /* Nine */) {
825
825
  return false;
826
826
  }
827
827
  }
@@ -864,7 +864,7 @@ function reset$j() {
864
864
  pauseTask = null;
865
865
  }
866
866
  function schedule$1(task, priority) {
867
- if (priority === void 0) { priority = 0 /* Priority.Normal */; }
867
+ if (priority === void 0) { priority = 0 /* Normal */; }
868
868
  return __awaiter(this, void 0, void 0, function () {
869
869
  var _i, queuedTasks_1, q, promise;
870
870
  return __generator(this, function (_a) {
@@ -876,7 +876,7 @@ function schedule$1(task, priority) {
876
876
  }
877
877
  }
878
878
  promise = new Promise(function (resolve) {
879
- var insert = priority === 1 /* Priority.High */ ? "unshift" : "push";
879
+ var insert = priority === 1 /* High */ ? "unshift" : "push";
880
880
  // Queue this task for asynchronous execution later
881
881
  // We also store a unique page identifier (id) along with the task to ensure
882
882
  // ensure that we do not accidentally execute this task in context of a different page
@@ -911,7 +911,7 @@ function run() {
911
911
  return;
912
912
  }
913
913
  if (error) {
914
- log$1(0 /* Code.RunTask */, 1 /* Severity.Warning */, error.name, error.message, error.stack);
914
+ log$1(0 /* RunTask */, 1 /* Warning */, error.name, error.message, error.stack);
915
915
  }
916
916
  activeTask = null;
917
917
  run();
@@ -922,13 +922,13 @@ function state$8(timer) {
922
922
  var id = key(timer);
923
923
  if (id in tracker) {
924
924
  var elapsed = performance.now() - tracker[id].start;
925
- return (elapsed > tracker[id].yield) ? 0 /* Task.Wait */ : 1 /* Task.Run */;
925
+ return (elapsed > tracker[id].yield) ? 0 /* Wait */ : 1 /* Run */;
926
926
  }
927
927
  // If this task is no longer being tracked, send stop message to the caller
928
- return 2 /* Task.Stop */;
928
+ return 2 /* Stop */;
929
929
  }
930
930
  function start$w(timer) {
931
- tracker[key(timer)] = { start: performance.now(), calls: 0, yield: 30 /* Setting.LongTask */ };
931
+ tracker[key(timer)] = { start: performance.now(), calls: 0, yield: 30 /* LongTask */ };
932
932
  }
933
933
  function restart$2(timer) {
934
934
  var id = key(timer);
@@ -945,11 +945,11 @@ function stop$t(timer) {
945
945
  var id = key(timer);
946
946
  var duration = end - tracker[id].start;
947
947
  sum(timer.cost, duration);
948
- count$1(5 /* Metric.InvokeCount */);
948
+ count$1(5 /* InvokeCount */);
949
949
  // For the first execution, which is synchronous, time is automatically counted towards TotalDuration.
950
950
  // However, for subsequent asynchronous runs, we need to manually update TotalDuration metric.
951
951
  if (tracker[id].calls > 0) {
952
- sum(4 /* Metric.TotalCost */, duration);
952
+ sum(4 /* TotalCost */, duration);
953
953
  }
954
954
  }
955
955
  function suspend$1(timer) {
@@ -970,13 +970,13 @@ function suspend$1(timer) {
970
970
  case 2:
971
971
  // After we are done with suspending task, ensure that we are still operating in the right context
972
972
  // If the task is still being tracked, continue running the task, otherwise ask caller to stop execution
973
- return [2 /*return*/, id in tracker ? 1 /* Task.Run */ : 2 /* Task.Stop */];
973
+ return [2 /*return*/, id in tracker ? 1 /* Run */ : 2 /* Stop */];
974
974
  }
975
975
  });
976
976
  });
977
977
  }
978
978
  function key(timer) {
979
- return "".concat(timer.id, ".").concat(timer.cost);
979
+ return timer.id + "." + timer.cost;
980
980
  }
981
981
  function wait() {
982
982
  return __awaiter(this, void 0, void 0, function () {
@@ -1014,14 +1014,14 @@ function requestIdleCallbackPolyfill(callback, options) {
1014
1014
  var currentTime = performance.now();
1015
1015
  var elapsed = currentTime - startTime;
1016
1016
  var duration = currentTime - event.data;
1017
- if (duration > 30 /* Setting.LongTask */ && elapsed < options.timeout) {
1017
+ if (duration > 30 /* LongTask */ && elapsed < options.timeout) {
1018
1018
  requestAnimationFrame(function () { outgoing.postMessage(currentTime); });
1019
1019
  }
1020
1020
  else {
1021
1021
  var didTimeout_1 = elapsed > options.timeout;
1022
1022
  callback({
1023
1023
  didTimeout: didTimeout_1,
1024
- timeRemaining: function () { return didTimeout_1 ? 30 /* Setting.LongTask */ : Math.max(0, 30 /* Setting.LongTask */ - duration); }
1024
+ timeRemaining: function () { return didTimeout_1 ? 30 /* LongTask */ : Math.max(0, 30 /* LongTask */ - duration); }
1025
1025
  });
1026
1026
  }
1027
1027
  };
@@ -1042,7 +1042,7 @@ function tokenize (tokens) {
1042
1042
  var reference = null;
1043
1043
  for (var i = 0; i < tokens.length; i++) {
1044
1044
  // Only optimize for string values
1045
- if (typeof tokens[i] === "string" /* Constant.String */) {
1045
+ if (typeof tokens[i] === "string" /* String */) {
1046
1046
  var token = tokens[i];
1047
1047
  var index = lookup[token] || -1;
1048
1048
  if (index >= 0) {
@@ -1084,10 +1084,10 @@ function encode$4 (type, timer, ts) {
1084
1084
  tokens = [eventTime, type];
1085
1085
  _a = type;
1086
1086
  switch (_a) {
1087
- case 8 /* Event.Document */: return [3 /*break*/, 1];
1088
- case 7 /* Event.Region */: return [3 /*break*/, 2];
1089
- case 5 /* Event.Discover */: return [3 /*break*/, 3];
1090
- case 6 /* Event.Mutation */: return [3 /*break*/, 3];
1087
+ case 8 /* Document */: return [3 /*break*/, 1];
1088
+ case 7 /* Region */: return [3 /*break*/, 2];
1089
+ case 5 /* Discover */: return [3 /*break*/, 3];
1090
+ case 6 /* Mutation */: return [3 /*break*/, 3];
1091
1091
  }
1092
1092
  return [3 /*break*/, 10];
1093
1093
  case 1:
@@ -1100,7 +1100,7 @@ function encode$4 (type, timer, ts) {
1100
1100
  case 2:
1101
1101
  for (_i = 0, _b = state$1; _i < _b.length; _i++) {
1102
1102
  r = _b[_i];
1103
- tokens = [r.time, 7 /* Event.Region */];
1103
+ tokens = [r.time, 7 /* Region */];
1104
1104
  tokens.push(r.data.id);
1105
1105
  tokens.push(r.data.interaction);
1106
1106
  tokens.push(r.data.visibility);
@@ -1111,7 +1111,7 @@ function encode$4 (type, timer, ts) {
1111
1111
  return [3 /*break*/, 10];
1112
1112
  case 3:
1113
1113
  // Check if we are operating within the context of the current page
1114
- if (state$8(timer) === 2 /* Task.Stop */) {
1114
+ if (state$8(timer) === 2 /* Stop */) {
1115
1115
  return [3 /*break*/, 10];
1116
1116
  }
1117
1117
  values = updates$2();
@@ -1122,13 +1122,13 @@ function encode$4 (type, timer, ts) {
1122
1122
  if (!(_c < values_1.length)) return [3 /*break*/, 8];
1123
1123
  value = values_1[_c];
1124
1124
  state = state$8(timer);
1125
- if (!(state === 0 /* Task.Wait */)) return [3 /*break*/, 6];
1125
+ if (!(state === 0 /* Wait */)) return [3 /*break*/, 6];
1126
1126
  return [4 /*yield*/, suspend$1(timer)];
1127
1127
  case 5:
1128
1128
  state = _e.sent();
1129
1129
  _e.label = 6;
1130
1130
  case 6:
1131
- if (state === 2 /* Task.Stop */) {
1131
+ if (state === 2 /* Stop */) {
1132
1132
  return [3 /*break*/, 8];
1133
1133
  }
1134
1134
  data = value.data;
@@ -1151,9 +1151,9 @@ function encode$4 (type, timer, ts) {
1151
1151
  if (value.previous && active) {
1152
1152
  tokens.push(value.previous);
1153
1153
  }
1154
- tokens.push(suspend ? "*M" /* Constant.SuspendMutationTag */ : data[key]);
1154
+ tokens.push(suspend ? "*M" /* SuspendMutationTag */ : data[key]);
1155
1155
  if (box && box.length === 2) {
1156
- tokens.push("".concat("#" /* Constant.Hash */).concat(str$1(box[0]), ".").concat(str$1(box[1])));
1156
+ tokens.push("" + "#" /* Hash */ + str$1(box[0]) + "." + str$1(box[1]));
1157
1157
  }
1158
1158
  break;
1159
1159
  case "attributes":
@@ -1175,7 +1175,7 @@ function encode$4 (type, timer, ts) {
1175
1175
  _c++;
1176
1176
  return [3 /*break*/, 4];
1177
1177
  case 8:
1178
- if (type === 6 /* Event.Mutation */) {
1178
+ if (type === 6 /* Mutation */) {
1179
1179
  activity(eventTime);
1180
1180
  }
1181
1181
  queue(tokenize(tokens), !config$1.lean);
@@ -1188,13 +1188,13 @@ function encode$4 (type, timer, ts) {
1188
1188
  }
1189
1189
  function shouldMangle(value) {
1190
1190
  var privacy = value.metadata.privacy;
1191
- return value.data.tag === "*T" /* Constant.TextTag */ && !(privacy === 0 /* Privacy.None */ || privacy === 1 /* Privacy.Sensitive */);
1191
+ return value.data.tag === "*T" /* TextTag */ && !(privacy === 0 /* None */ || privacy === 1 /* Sensitive */);
1192
1192
  }
1193
1193
  function size$1(value) {
1194
1194
  if (value.metadata.size !== null && value.metadata.size.length === 0) {
1195
1195
  var img = getNode(value.id);
1196
1196
  if (img) {
1197
- return [Math.floor(img.offsetWidth * 100 /* Setting.BoxPrecision */), Math.floor(img.offsetHeight * 100 /* Setting.BoxPrecision */)];
1197
+ return [Math.floor(img.offsetWidth * 100 /* BoxPrecision */), Math.floor(img.offsetHeight * 100 /* BoxPrecision */)];
1198
1198
  }
1199
1199
  }
1200
1200
  return value.metadata.size;
@@ -1203,7 +1203,7 @@ function str$1(input) {
1203
1203
  return input.toString(36);
1204
1204
  }
1205
1205
  function attribute(key, value, privacy) {
1206
- return "".concat(key, "=").concat(scrub(value, key, privacy));
1206
+ return key + "=" + scrub(value, key, privacy);
1207
1207
  }
1208
1208
 
1209
1209
  var data$c;
@@ -1234,7 +1234,7 @@ function compute$7() {
1234
1234
  // Check that width or height has changed from before, and also that width & height are not null values
1235
1235
  if ((data$c === null || width !== data$c.width || height !== data$c.height) && width !== null && height !== null) {
1236
1236
  data$c = { width: width, height: height };
1237
- encode$4(8 /* Event.Document */);
1237
+ encode$4(8 /* Document */);
1238
1238
  }
1239
1239
  }
1240
1240
  function end() {
@@ -1263,7 +1263,7 @@ function start$u() {
1263
1263
  reset$h();
1264
1264
  }
1265
1265
  function observe$b(root) {
1266
- bind(root, "click", handler$3.bind(this, 9 /* Event.Click */, root), true);
1266
+ bind(root, "click", handler$3.bind(this, 9 /* Click */, root), true);
1267
1267
  }
1268
1268
  function handler$3(event, root, evt) {
1269
1269
  var frame = iframe(root);
@@ -1289,14 +1289,13 @@ function handler$3(event, root, evt) {
1289
1289
  x = Math.round(l.x + (l.w / 2));
1290
1290
  y = Math.round(l.y + (l.h / 2));
1291
1291
  }
1292
- var eX = l ? Math.max(Math.floor(((x - l.x) / l.w) * 32767 /* Setting.ClickPrecision */), 0) : 0;
1293
- var eY = l ? Math.max(Math.floor(((y - l.y) / l.h) * 32767 /* Setting.ClickPrecision */), 0) : 0;
1292
+ var eX = l ? Math.max(Math.floor(((x - l.x) / l.w) * 32767 /* ClickPrecision */), 0) : 0;
1293
+ var eY = l ? Math.max(Math.floor(((y - l.y) / l.h) * 32767 /* ClickPrecision */), 0) : 0;
1294
1294
  // Check for null values before processing this event
1295
1295
  if (x !== null && y !== null) {
1296
1296
  state$7.push({
1297
1297
  time: time(),
1298
- event: event,
1299
- data: {
1298
+ event: event, data: {
1300
1299
  target: t,
1301
1300
  x: x,
1302
1301
  y: y,
@@ -1308,7 +1307,7 @@ function handler$3(event, root, evt) {
1308
1307
  text: text(t),
1309
1308
  link: a ? a.href : null,
1310
1309
  hash: null,
1311
- trust: evt.isTrusted ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */
1310
+ trust: evt.isTrusted ? 1 /* True */ : 0 /* False */
1312
1311
  }
1313
1312
  });
1314
1313
  schedule$1(encode$3.bind(this, event));
@@ -1323,7 +1322,7 @@ function text(element) {
1323
1322
  // Trim any spaces at the beginning or at the end of string
1324
1323
  // Also, replace multiple occurrence of space characters with a single white space
1325
1324
  // Finally, send only first few characters as specified by the Setting
1326
- output = t.trim().replace(/\s+/g, " " /* Constant.Space */).substr(0, 25 /* Setting.ClickText */);
1325
+ output = t.trim().replace(/\s+/g, " " /* Space */).substr(0, 25 /* ClickText */);
1327
1326
  }
1328
1327
  }
1329
1328
  return output;
@@ -1332,10 +1331,10 @@ function reaction(element) {
1332
1331
  if (element.nodeType === Node.ELEMENT_NODE) {
1333
1332
  var tag = element.tagName.toLowerCase();
1334
1333
  if (UserInputTags.indexOf(tag) >= 0) {
1335
- return 0 /* BooleanFlag.False */;
1334
+ return 0 /* False */;
1336
1335
  }
1337
1336
  }
1338
- return 1 /* BooleanFlag.True */;
1337
+ return 1 /* True */;
1339
1338
  }
1340
1339
  function layout$1(element) {
1341
1340
  var box = null;
@@ -1359,14 +1358,14 @@ function layout$1(element) {
1359
1358
  return box;
1360
1359
  }
1361
1360
  function context(a) {
1362
- if (a && a.hasAttribute("target" /* Constant.Target */)) {
1363
- switch (a.getAttribute("target" /* Constant.Target */)) {
1364
- case "_blank" /* Constant.Blank */: return 1 /* BrowsingContext.Blank */;
1365
- case "_parent" /* Constant.Parent */: return 2 /* BrowsingContext.Parent */;
1366
- case "_top" /* Constant.Top */: return 3 /* BrowsingContext.Top */;
1361
+ if (a && a.hasAttribute("target" /* Target */)) {
1362
+ switch (a.getAttribute("target" /* Target */)) {
1363
+ case "_blank" /* Blank */: return 1 /* Blank */;
1364
+ case "_parent" /* Parent */: return 2 /* Parent */;
1365
+ case "_top" /* Top */: return 3 /* Top */;
1367
1366
  }
1368
1367
  }
1369
- return 0 /* BrowsingContext.Self */;
1368
+ return 0 /* Self */;
1370
1369
  }
1371
1370
  function reset$h() {
1372
1371
  state$7 = [];
@@ -1380,13 +1379,13 @@ function start$t() {
1380
1379
  reset$g();
1381
1380
  }
1382
1381
  function observe$a(root) {
1383
- bind(root, "cut", recompute$7.bind(this, 0 /* Clipboard.Cut */), true);
1384
- bind(root, "copy", recompute$7.bind(this, 1 /* Clipboard.Copy */), true);
1385
- bind(root, "paste", recompute$7.bind(this, 2 /* Clipboard.Paste */), true);
1382
+ bind(root, "cut", recompute$7.bind(this, 0 /* Cut */), true);
1383
+ bind(root, "copy", recompute$7.bind(this, 1 /* Copy */), true);
1384
+ bind(root, "paste", recompute$7.bind(this, 2 /* Paste */), true);
1386
1385
  }
1387
1386
  function recompute$7(action, evt) {
1388
- state$6.push({ time: time(), event: 38 /* Event.Clipboard */, data: { target: target(evt), action: action } });
1389
- schedule$1(encode$3.bind(this, 38 /* Event.Clipboard */));
1387
+ state$6.push({ time: time(), event: 38 /* Clipboard */, data: { target: target(evt), action: action } });
1388
+ schedule$1(encode$3.bind(this, 38 /* Clipboard */));
1390
1389
  }
1391
1390
  function reset$g() {
1392
1391
  state$6 = [];
@@ -1419,9 +1418,9 @@ function recompute$6(evt) {
1419
1418
  if (state$5.length > 0 && (state$5[state$5.length - 1].data.target === data.target)) {
1420
1419
  state$5.pop();
1421
1420
  }
1422
- state$5.push({ time: time(), event: 27 /* Event.Input */, data: data });
1421
+ state$5.push({ time: time(), event: 27 /* Input */, data: data });
1423
1422
  clearTimeout(timeout$5);
1424
- timeout$5 = setTimeout(process$6, 500 /* Setting.LookAhead */, 27 /* Event.Input */);
1423
+ timeout$5 = setTimeout(process$6, 500 /* LookAhead */, 27 /* Input */);
1425
1424
  }
1426
1425
  }
1427
1426
  function process$6(event) {
@@ -1441,15 +1440,15 @@ function start$r() {
1441
1440
  reset$e();
1442
1441
  }
1443
1442
  function observe$8(root) {
1444
- bind(root, "mousedown", mouse.bind(this, 13 /* Event.MouseDown */, root), true);
1445
- bind(root, "mouseup", mouse.bind(this, 14 /* Event.MouseUp */, root), true);
1446
- bind(root, "mousemove", mouse.bind(this, 12 /* Event.MouseMove */, root), true);
1447
- bind(root, "wheel", mouse.bind(this, 15 /* Event.MouseWheel */, root), true);
1448
- bind(root, "dblclick", mouse.bind(this, 16 /* Event.DoubleClick */, root), true);
1449
- bind(root, "touchstart", touch.bind(this, 17 /* Event.TouchStart */, root), true);
1450
- bind(root, "touchend", touch.bind(this, 18 /* Event.TouchEnd */, root), true);
1451
- bind(root, "touchmove", touch.bind(this, 19 /* Event.TouchMove */, root), true);
1452
- bind(root, "touchcancel", touch.bind(this, 20 /* Event.TouchCancel */, root), true);
1443
+ bind(root, "mousedown", mouse.bind(this, 13 /* MouseDown */, root), true);
1444
+ bind(root, "mouseup", mouse.bind(this, 14 /* MouseUp */, root), true);
1445
+ bind(root, "mousemove", mouse.bind(this, 12 /* MouseMove */, root), true);
1446
+ bind(root, "wheel", mouse.bind(this, 15 /* MouseWheel */, root), true);
1447
+ bind(root, "dblclick", mouse.bind(this, 16 /* DoubleClick */, root), true);
1448
+ bind(root, "touchstart", touch.bind(this, 17 /* TouchStart */, root), true);
1449
+ bind(root, "touchend", touch.bind(this, 18 /* TouchEnd */, root), true);
1450
+ bind(root, "touchmove", touch.bind(this, 19 /* TouchMove */, root), true);
1451
+ bind(root, "touchcancel", touch.bind(this, 20 /* TouchCancel */, root), true);
1453
1452
  }
1454
1453
  function mouse(event, root, evt) {
1455
1454
  var frame = iframe(root);
@@ -1488,9 +1487,9 @@ function touch(event, root, evt) {
1488
1487
  }
1489
1488
  function handler$2(current) {
1490
1489
  switch (current.event) {
1491
- case 12 /* Event.MouseMove */:
1492
- case 15 /* Event.MouseWheel */:
1493
- case 19 /* Event.TouchMove */:
1490
+ case 12 /* MouseMove */:
1491
+ case 15 /* MouseWheel */:
1492
+ case 19 /* TouchMove */:
1494
1493
  var length_1 = state$4.length;
1495
1494
  var last = length_1 > 1 ? state$4[length_1 - 2] : null;
1496
1495
  if (last && similar$1(last, current)) {
@@ -1498,7 +1497,7 @@ function handler$2(current) {
1498
1497
  }
1499
1498
  state$4.push(current);
1500
1499
  clearTimeout(timeout$4);
1501
- timeout$4 = setTimeout(process$5, 500 /* Setting.LookAhead */, current.event);
1500
+ timeout$4 = setTimeout(process$5, 500 /* LookAhead */, current.event);
1502
1501
  break;
1503
1502
  default:
1504
1503
  state$4.push(current);
@@ -1518,7 +1517,7 @@ function similar$1(last, current) {
1518
1517
  var distance = Math.sqrt(dx * dx + dy * dy);
1519
1518
  var gap = current.time - last.time;
1520
1519
  var match = current.data.target === last.data.target;
1521
- return current.event === last.event && match && distance < 20 /* Setting.Distance */ && gap < 25 /* Setting.Interval */;
1520
+ return current.event === last.event && match && distance < 20 /* Distance */ && gap < 25 /* Interval */;
1522
1521
  }
1523
1522
  function stop$p() {
1524
1523
  clearTimeout(timeout$4);
@@ -1541,7 +1540,7 @@ function recompute$5() {
1541
1540
  width: de && "clientWidth" in de ? Math.min(de.clientWidth, window.innerWidth) : window.innerWidth,
1542
1541
  height: de && "clientHeight" in de ? Math.min(de.clientHeight, window.innerHeight) : window.innerHeight,
1543
1542
  };
1544
- encode$3(11 /* Event.Resize */);
1543
+ encode$3(11 /* Resize */);
1545
1544
  }
1546
1545
  function reset$d() {
1547
1546
  data$b = null;
@@ -1577,7 +1576,7 @@ function recompute$4(event) {
1577
1576
  // And, if for some reason that is not available, fall back to looking up scrollTop on document.documentElement.
1578
1577
  var x = element === de && "pageXOffset" in w ? Math.round(w.pageXOffset) : Math.round(element.scrollLeft);
1579
1578
  var y = element === de && "pageYOffset" in w ? Math.round(w.pageYOffset) : Math.round(element.scrollTop);
1580
- var current = { time: time(), event: 10 /* Event.Scroll */, data: { target: element, x: x, y: y } };
1579
+ var current = { time: time(), event: 10 /* Scroll */, data: { target: element, x: x, y: y } };
1581
1580
  // We don't send any scroll events if this is the first event and the current position is top (0,0)
1582
1581
  if ((event === null && x === 0 && y === 0) || (x === null || y === null)) {
1583
1582
  return;
@@ -1589,7 +1588,7 @@ function recompute$4(event) {
1589
1588
  }
1590
1589
  state$3.push(current);
1591
1590
  clearTimeout(timeout$3);
1592
- timeout$3 = setTimeout(process$4, 500 /* Setting.LookAhead */, 10 /* Event.Scroll */);
1591
+ timeout$3 = setTimeout(process$4, 500 /* LookAhead */, 10 /* Scroll */);
1593
1592
  }
1594
1593
  function reset$c() {
1595
1594
  state$3 = [];
@@ -1600,7 +1599,7 @@ function process$4(event) {
1600
1599
  function similar(last, current) {
1601
1600
  var dx = last.data.x - current.data.x;
1602
1601
  var dy = last.data.y - current.data.y;
1603
- return (dx * dx + dy * dy < 20 /* Setting.Distance */ * 20 /* Setting.Distance */) && (current.time - last.time < 25 /* Setting.Interval */);
1602
+ return (dx * dx + dy * dy < 20 /* Distance */ * 20 /* Distance */) && (current.time - last.time < 25 /* Interval */);
1604
1603
  }
1605
1604
  function stop$n() {
1606
1605
  clearTimeout(timeout$3);
@@ -1635,7 +1634,7 @@ function recompute$3(root) {
1635
1634
  var startNode = data$a.start ? data$a.start : null;
1636
1635
  if (previous !== null && data$a.start !== null && startNode !== current.anchorNode) {
1637
1636
  clearTimeout(timeout$2);
1638
- process$3(21 /* Event.Selection */);
1637
+ process$3(21 /* Selection */);
1639
1638
  }
1640
1639
  data$a = {
1641
1640
  start: current.anchorNode,
@@ -1645,7 +1644,7 @@ function recompute$3(root) {
1645
1644
  };
1646
1645
  previous = current;
1647
1646
  clearTimeout(timeout$2);
1648
- timeout$2 = setTimeout(process$3, 500 /* Setting.LookAhead */, 21 /* Event.Selection */);
1647
+ timeout$2 = setTimeout(process$3, 500 /* LookAhead */, 21 /* Selection */);
1649
1648
  }
1650
1649
  function process$3(event) {
1651
1650
  schedule$1(encode$3.bind(this, event));
@@ -1667,8 +1666,8 @@ function observe$5(root) {
1667
1666
  bind(root, "submit", recompute$2, true);
1668
1667
  }
1669
1668
  function recompute$2(evt) {
1670
- state$2.push({ time: time(), event: 39 /* Event.Submit */, data: { target: target(evt) } });
1671
- schedule$1(encode$3.bind(this, 39 /* Event.Submit */));
1669
+ state$2.push({ time: time(), event: 39 /* Submit */, data: { target: target(evt) } });
1670
+ schedule$1(encode$3.bind(this, 39 /* Submit */));
1672
1671
  }
1673
1672
  function reset$a() {
1674
1673
  state$2 = [];
@@ -1683,7 +1682,7 @@ function start$m() {
1683
1682
  }
1684
1683
  function recompute$1(evt) {
1685
1684
  data$9 = { name: evt.type };
1686
- encode$3(26 /* Event.Unload */);
1685
+ encode$3(26 /* Unload */);
1687
1686
  stop();
1688
1687
  }
1689
1688
  function reset$9() {
@@ -1700,7 +1699,7 @@ function start$l() {
1700
1699
  }
1701
1700
  function recompute() {
1702
1701
  data$8 = { visible: "visibilityState" in document ? document.visibilityState : "default" };
1703
- encode$3(28 /* Event.Visibility */);
1702
+ encode$3(28 /* Visibility */);
1704
1703
  }
1705
1704
  function reset$8() {
1706
1705
  data$8 = null;
@@ -1762,51 +1761,51 @@ function ld(json) {
1762
1761
  for (var _i = 0, _a = Object.keys(json); _i < _a.length; _i++) {
1763
1762
  var key = _a[_i];
1764
1763
  var value = json[key];
1765
- if (key === "@type" /* JsonLD.Type */ && typeof value === "string") {
1764
+ if (key === "@type" /* Type */ && typeof value === "string") {
1766
1765
  value = value.toLowerCase();
1767
1766
  /* Normalizations */
1768
- value = value.indexOf("article" /* JsonLD.Article */) >= 0 || value.indexOf("posting" /* JsonLD.Posting */) >= 0 ? "article" /* JsonLD.Article */ : value;
1767
+ value = value.indexOf("article" /* Article */) >= 0 || value.indexOf("posting" /* Posting */) >= 0 ? "article" /* Article */ : value;
1769
1768
  switch (value) {
1770
- case "article" /* JsonLD.Article */:
1771
- case "recipe" /* JsonLD.Recipe */:
1772
- log(5 /* Dimension.SchemaType */, json[key]);
1773
- log(8 /* Dimension.AuthorName */, json["creator" /* JsonLD.Creator */]);
1774
- log(18 /* Dimension.Headline */, json["headline" /* JsonLD.Headline */]);
1769
+ case "article" /* Article */:
1770
+ case "recipe" /* Recipe */:
1771
+ log(5 /* SchemaType */, json[key]);
1772
+ log(8 /* AuthorName */, json["creator" /* Creator */]);
1773
+ log(18 /* Headline */, json["headline" /* Headline */]);
1775
1774
  break;
1776
- case "product" /* JsonLD.Product */:
1777
- log(5 /* Dimension.SchemaType */, json[key]);
1778
- log(10 /* Dimension.ProductName */, json["name" /* JsonLD.Name */]);
1779
- log(12 /* Dimension.ProductSku */, json["sku" /* JsonLD.Sku */]);
1780
- if (json["brand" /* JsonLD.Brand */]) {
1781
- log(6 /* Dimension.ProductBrand */, json["brand" /* JsonLD.Brand */]["name" /* JsonLD.Name */]);
1775
+ case "product" /* Product */:
1776
+ log(5 /* SchemaType */, json[key]);
1777
+ log(10 /* ProductName */, json["name" /* Name */]);
1778
+ log(12 /* ProductSku */, json["sku" /* Sku */]);
1779
+ if (json["brand" /* Brand */]) {
1780
+ log(6 /* ProductBrand */, json["brand" /* Brand */]["name" /* Name */]);
1782
1781
  }
1783
1782
  break;
1784
- case "aggregaterating" /* JsonLD.AggregateRating */:
1785
- if (json["ratingValue" /* JsonLD.RatingValue */]) {
1786
- max(11 /* Metric.RatingValue */, num$1(json["ratingValue" /* JsonLD.RatingValue */], 100 /* Setting.RatingScale */));
1787
- max(18 /* Metric.BestRating */, num$1(json["bestRating" /* JsonLD.BestRating */]));
1788
- max(19 /* Metric.WorstRating */, num$1(json["worstRating" /* JsonLD.WorstRating */]));
1783
+ case "aggregaterating" /* AggregateRating */:
1784
+ if (json["ratingValue" /* RatingValue */]) {
1785
+ max(11 /* RatingValue */, num$1(json["ratingValue" /* RatingValue */], 100 /* RatingScale */));
1786
+ max(18 /* BestRating */, num$1(json["bestRating" /* BestRating */]));
1787
+ max(19 /* WorstRating */, num$1(json["worstRating" /* WorstRating */]));
1789
1788
  }
1790
- max(12 /* Metric.RatingCount */, num$1(json["ratingCount" /* JsonLD.RatingCount */]));
1791
- max(17 /* Metric.ReviewCount */, num$1(json["reviewCount" /* JsonLD.ReviewCount */]));
1789
+ max(12 /* RatingCount */, num$1(json["ratingCount" /* RatingCount */]));
1790
+ max(17 /* ReviewCount */, num$1(json["reviewCount" /* ReviewCount */]));
1792
1791
  break;
1793
- case "person" /* JsonLD.Author */:
1794
- log(8 /* Dimension.AuthorName */, json["name" /* JsonLD.Name */]);
1792
+ case "person" /* Author */:
1793
+ log(8 /* AuthorName */, json["name" /* Name */]);
1795
1794
  break;
1796
- case "offer" /* JsonLD.Offer */:
1797
- log(7 /* Dimension.ProductAvailability */, json["availability" /* JsonLD.Availability */]);
1798
- log(14 /* Dimension.ProductCondition */, json["itemCondition" /* JsonLD.ItemCondition */]);
1799
- log(13 /* Dimension.ProductCurrency */, json["priceCurrency" /* JsonLD.PriceCurrency */]);
1800
- log(12 /* Dimension.ProductSku */, json["sku" /* JsonLD.Sku */]);
1801
- max(13 /* Metric.ProductPrice */, num$1(json["price" /* JsonLD.Price */]));
1795
+ case "offer" /* Offer */:
1796
+ log(7 /* ProductAvailability */, json["availability" /* Availability */]);
1797
+ log(14 /* ProductCondition */, json["itemCondition" /* ItemCondition */]);
1798
+ log(13 /* ProductCurrency */, json["priceCurrency" /* PriceCurrency */]);
1799
+ log(12 /* ProductSku */, json["sku" /* Sku */]);
1800
+ max(13 /* ProductPrice */, num$1(json["price" /* Price */]));
1802
1801
  break;
1803
- case "brand" /* JsonLD.Brand */:
1804
- log(6 /* Dimension.ProductBrand */, json["name" /* JsonLD.Name */]);
1802
+ case "brand" /* Brand */:
1803
+ log(6 /* ProductBrand */, json["name" /* Name */]);
1805
1804
  break;
1806
1805
  }
1807
1806
  }
1808
1807
  // Continue parsing nested objects
1809
- if (value !== null && typeof (value) === "object" /* Constant.Object */) {
1808
+ if (value !== null && typeof (value) === "object" /* Object */) {
1810
1809
  ld(value);
1811
1810
  }
1812
1811
  }
@@ -1815,8 +1814,8 @@ function num$1(input, scale) {
1815
1814
  if (scale === void 0) { scale = 1; }
1816
1815
  if (input !== null) {
1817
1816
  switch (typeof input) {
1818
- case "number" /* Constant.Number */: return Math.round(input * scale);
1819
- case "string" /* Constant.String */: return Math.round(parseFloat(input.replace(digitsRegex, "" /* Constant.Empty */)) * scale);
1817
+ case "number" /* Number */: return Math.round(input * scale);
1818
+ case "string" /* String */: return Math.round(parseFloat(input.replace(digitsRegex, "" /* Empty */)) * scale);
1820
1819
  }
1821
1820
  }
1822
1821
  return null;
@@ -1827,11 +1826,11 @@ var newlineRegex = /[\r\n]+/g;
1827
1826
  function processNode (node, source) {
1828
1827
  var child = null;
1829
1828
  // Do not track this change if we are attempting to remove a node before discovering it
1830
- if (source === 2 /* Source.ChildListRemove */ && has(node) === false) {
1829
+ if (source === 2 /* ChildListRemove */ && has(node) === false) {
1831
1830
  return child;
1832
1831
  }
1833
1832
  // Special handling for text nodes that belong to style nodes
1834
- if (source !== 0 /* Source.Discover */ &&
1833
+ if (source !== 0 /* Discover */ &&
1835
1834
  node.nodeType === Node.TEXT_NODE &&
1836
1835
  node.parentElement &&
1837
1836
  node.parentElement.tagName === "STYLE") {
@@ -1844,10 +1843,10 @@ function processNode (node, source) {
1844
1843
  switch (node.nodeType) {
1845
1844
  case Node.DOCUMENT_TYPE_NODE:
1846
1845
  parent = insideFrame && node.parentNode ? iframe(node.parentNode) : parent;
1847
- var docTypePrefix = insideFrame ? "iframe:" /* Constant.IFramePrefix */ : "" /* Constant.Empty */;
1846
+ var docTypePrefix = insideFrame ? "iframe:" /* IFramePrefix */ : "" /* Empty */;
1848
1847
  var doctype = node;
1849
1848
  var docAttributes = { name: doctype.name, publicId: doctype.publicId, systemId: doctype.systemId };
1850
- var docData = { tag: docTypePrefix + "*D" /* Constant.DocumentTag */, attributes: docAttributes };
1849
+ var docData = { tag: docTypePrefix + "*D" /* DocumentTag */, attributes: docAttributes };
1851
1850
  dom[call](node, parent, docData, source);
1852
1851
  break;
1853
1852
  case Node.DOCUMENT_NODE:
@@ -1862,26 +1861,26 @@ function processNode (node, source) {
1862
1861
  if (shadowRoot.host) {
1863
1862
  parse$1(shadowRoot);
1864
1863
  var type = typeof (shadowRoot.constructor);
1865
- if (type === "function" /* Constant.Function */ && shadowRoot.constructor.toString().indexOf("[native code]" /* Constant.NativeCode */) >= 0) {
1864
+ if (type === "function" /* Function */ && shadowRoot.constructor.toString().indexOf("[native code]" /* NativeCode */) >= 0) {
1866
1865
  observe$3(shadowRoot);
1867
1866
  // See: https://wicg.github.io/construct-stylesheets/ for more details on adoptedStyleSheets.
1868
1867
  // At the moment, we are only able to capture "open" shadow DOM nodes. If they are closed, they are not accessible.
1869
1868
  // In future we may decide to proxy "attachShadow" call to gain access, but at the moment, we don't want to
1870
1869
  // cause any unintended side effect to the page. We will re-evaluate after we gather more real world data on this.
1871
- var style = "" /* Constant.Empty */;
1870
+ var style = "" /* Empty */;
1872
1871
  var adoptedStyleSheets = "adoptedStyleSheets" in shadowRoot ? shadowRoot["adoptedStyleSheets"] : [];
1873
1872
  for (var _i = 0, adoptedStyleSheets_1 = adoptedStyleSheets; _i < adoptedStyleSheets_1.length; _i++) {
1874
1873
  var styleSheet = adoptedStyleSheets_1[_i];
1875
1874
  style += getCssRules(styleSheet);
1876
1875
  }
1877
- var fragementData = { tag: "*S" /* Constant.ShadowDomTag */, attributes: { style: style } };
1876
+ var fragementData = { tag: "*S" /* ShadowDomTag */, attributes: { style: style } };
1878
1877
  dom[call](node, shadowRoot.host, fragementData, source);
1879
1878
  }
1880
1879
  else {
1881
1880
  // If the browser doesn't support shadow DOM natively, we detect that, and send appropriate tag back.
1882
1881
  // The differentiation is important because we don't have to observe pollyfill shadow DOM nodes,
1883
1882
  // the same way we observe real shadow DOM nodes (encapsulation provided by the browser).
1884
- dom[call](node, shadowRoot.host, { tag: "*P" /* Constant.PolyfillShadowDomTag */, attributes: {} }, source);
1883
+ dom[call](node, shadowRoot.host, { tag: "*P" /* PolyfillShadowDomTag */, attributes: {} }, source);
1885
1884
  }
1886
1885
  }
1887
1886
  break;
@@ -1894,7 +1893,7 @@ function processNode (node, source) {
1894
1893
  // The only exception is when we receive a mutation to remove the text node, in that case
1895
1894
  // parent will be null, but we can still process the node by checking it's an update call.
1896
1895
  if (call === "update" || (parent && has(parent) && parent.tagName !== "STYLE")) {
1897
- var textData = { tag: "*T" /* Constant.TextTag */, value: node.nodeValue };
1896
+ var textData = { tag: "*T" /* TextTag */, value: node.nodeValue };
1898
1897
  dom[call](node, parent, textData, source);
1899
1898
  }
1900
1899
  break;
@@ -1906,20 +1905,20 @@ function processNode (node, source) {
1906
1905
  // For correctness, we first look at parentElement and if it not present then fall back to using parentNode
1907
1906
  parent = node.parentElement ? node.parentElement : (node.parentNode ? node.parentNode : null);
1908
1907
  // If we encounter a node that is part of SVG namespace, prefix the tag with SVG_PREFIX
1909
- if (element.namespaceURI === "http://www.w3.org/2000/svg" /* Constant.SvgNamespace */) {
1910
- tag = "svg:" /* Constant.SvgPrefix */ + tag;
1908
+ if (element.namespaceURI === "http://www.w3.org/2000/svg" /* SvgNamespace */) {
1909
+ tag = "svg:" /* SvgPrefix */ + tag;
1911
1910
  }
1912
1911
  switch (tag) {
1913
1912
  case "HTML":
1914
1913
  parent = insideFrame && parent ? iframe(parent) : null;
1915
- var htmlPrefix = insideFrame ? "iframe:" /* Constant.IFramePrefix */ : "" /* Constant.Empty */;
1914
+ var htmlPrefix = insideFrame ? "iframe:" /* IFramePrefix */ : "" /* Empty */;
1916
1915
  var htmlData = { tag: htmlPrefix + tag, attributes: attributes };
1917
1916
  dom[call](node, parent, htmlData, source);
1918
1917
  break;
1919
1918
  case "SCRIPT":
1920
- if ("type" /* Constant.Type */ in attributes && attributes["type" /* Constant.Type */] === "application/ld+json" /* Constant.JsonLD */) {
1919
+ if ("type" /* Type */ in attributes && attributes["type" /* Type */] === "application/ld+json" /* JsonLD */) {
1921
1920
  try {
1922
- ld(JSON.parse(element.text.replace(newlineRegex, "" /* Constant.Empty */)));
1921
+ ld(JSON.parse(element.text.replace(newlineRegex, "" /* Empty */)));
1923
1922
  }
1924
1923
  catch ( /* do nothing */_a) { /* do nothing */ }
1925
1924
  }
@@ -1927,20 +1926,20 @@ function processNode (node, source) {
1927
1926
  case "NOSCRIPT":
1928
1927
  break;
1929
1928
  case "META":
1930
- var key = ("property" /* Constant.Property */ in attributes ?
1931
- "property" /* Constant.Property */ :
1932
- ("name" /* Constant.Name */ in attributes ? "name" /* Constant.Name */ : null));
1933
- if (key && "content" /* Constant.Content */ in attributes) {
1934
- var content = attributes["content" /* Constant.Content */];
1929
+ var key = ("property" /* Property */ in attributes ?
1930
+ "property" /* Property */ :
1931
+ ("name" /* Name */ in attributes ? "name" /* Name */ : null));
1932
+ if (key && "content" /* Content */ in attributes) {
1933
+ var content = attributes["content" /* Content */];
1935
1934
  switch (attributes[key]) {
1936
- case "og:title" /* Constant.ogTitle */:
1937
- log(20 /* Dimension.MetaTitle */, content);
1935
+ case "og:title" /* ogTitle */:
1936
+ log(20 /* MetaTitle */, content);
1938
1937
  break;
1939
- case "og:type" /* Constant.ogType */:
1940
- log(19 /* Dimension.MetaType */, content);
1938
+ case "og:type" /* ogType */:
1939
+ log(19 /* MetaType */, content);
1941
1940
  break;
1942
- case "generator" /* Constant.Generator */:
1943
- log(21 /* Dimension.Generator */, content);
1941
+ case "generator" /* Generator */:
1942
+ log(21 /* Generator */, content);
1944
1943
  break;
1945
1944
  }
1946
1945
  }
@@ -1948,7 +1947,7 @@ function processNode (node, source) {
1948
1947
  case "HEAD":
1949
1948
  var head = { tag: tag, attributes: attributes };
1950
1949
  if (location) {
1951
- head.attributes["*B" /* Constant.Base */] = location.protocol + "//" + location.hostname;
1950
+ head.attributes["*B" /* Base */] = location.protocol + "//" + location.hostname;
1952
1951
  }
1953
1952
  dom[call](node, parent, head, source);
1954
1953
  break;
@@ -1961,7 +1960,7 @@ function processNode (node, source) {
1961
1960
  var frameData = { tag: tag, attributes: attributes };
1962
1961
  if (sameorigin(iframe$1)) {
1963
1962
  monitor(iframe$1);
1964
- frameData.attributes["*O" /* Constant.SameOrigin */] = "true";
1963
+ frameData.attributes["*O" /* SameOrigin */] = "true";
1965
1964
  if (iframe$1.contentDocument && iframe$1.contentWindow && iframe$1.contentDocument.readyState !== "loading") {
1966
1965
  child = iframe$1.contentDocument;
1967
1966
  }
@@ -1990,7 +1989,7 @@ function observe$3(root) {
1990
1989
  function getStyleValue(style) {
1991
1990
  // Call trim on the text content to ensure we do not process white spaces ( , \n, \r\n, \t, etc.)
1992
1991
  // Also, check if stylesheet has any data-* attribute, if so process rules instead of looking up text
1993
- var value = style.textContent ? style.textContent.trim() : "" /* Constant.Empty */;
1992
+ var value = style.textContent ? style.textContent.trim() : "" /* Empty */;
1994
1993
  var dataset = style.dataset ? Object.keys(style.dataset).length : 0;
1995
1994
  if (value.length === 0 || dataset > 0) {
1996
1995
  value = getCssRules(style.sheet);
@@ -1998,14 +1997,14 @@ function getStyleValue(style) {
1998
1997
  return value;
1999
1998
  }
2000
1999
  function getCssRules(sheet) {
2001
- var value = "" /* Constant.Empty */;
2000
+ var value = "" /* Empty */;
2002
2001
  var cssRules = null;
2003
2002
  // Firefox throws a SecurityError when trying to access cssRules of a stylesheet from a different domain
2004
2003
  try {
2005
2004
  cssRules = sheet ? sheet.cssRules : [];
2006
2005
  }
2007
2006
  catch (e) {
2008
- log$1(1 /* Code.CssRules */, 1 /* Severity.Warning */, e ? e.name : null);
2007
+ log$1(1 /* CssRules */, 1 /* Warning */, e ? e.name : null);
2009
2008
  if (e && e.name !== "SecurityError") {
2010
2009
  throw e;
2011
2010
  }
@@ -2029,8 +2028,8 @@ function getAttributes(element) {
2029
2028
  }
2030
2029
  }
2031
2030
  // For INPUT tags read the dynamic "value" property if an explicit "value" attribute is not set
2032
- if (element.tagName === "INPUT" /* Constant.InputTag */ && !("value" /* Constant.Value */ in output) && element.value) {
2033
- output["value" /* Constant.Value */] = element.value;
2031
+ if (element.tagName === "INPUT" /* InputTag */ && !("value" /* Value */ in output) && element.value) {
2032
+ output["value" /* Value */] = element.value;
2034
2033
  }
2035
2034
  return output;
2036
2035
  }
@@ -2052,13 +2051,13 @@ function traverse (root, timer, source) {
2052
2051
  next = next.nextSibling;
2053
2052
  }
2054
2053
  state = state$8(timer);
2055
- if (!(state === 0 /* Task.Wait */)) return [3 /*break*/, 3];
2054
+ if (!(state === 0 /* Wait */)) return [3 /*break*/, 3];
2056
2055
  return [4 /*yield*/, suspend$1(timer)];
2057
2056
  case 2:
2058
2057
  state = _a.sent();
2059
2058
  _a.label = 3;
2060
2059
  case 3:
2061
- if (state === 2 /* Task.Stop */) {
2060
+ if (state === 2 /* Stop */) {
2062
2061
  return [3 /*break*/, 4];
2063
2062
  }
2064
2063
  subnode = processNode(node, source);
@@ -2135,7 +2134,7 @@ function observe$2(node) {
2135
2134
  // For this reason, we need to wire up mutations every time we see a new shadow dom.
2136
2135
  // Also, wrap it inside a try / catch. In certain browsers (e.g. legacy Edge), observer on shadow dom can throw errors
2137
2136
  try {
2138
- var m = api("MutationObserver" /* Constant.MutationObserver */);
2137
+ var m = api("MutationObserver" /* MutationObserver */);
2139
2138
  var observer = m in window ? new window[m](measure(handle$1)) : null;
2140
2139
  if (observer) {
2141
2140
  observer.observe(node, { attributes: true, childList: true, characterData: true, subtree: true });
@@ -2143,7 +2142,7 @@ function observe$2(node) {
2143
2142
  }
2144
2143
  }
2145
2144
  catch (e) {
2146
- log$1(2 /* Code.MutationObserver */, 0 /* Severity.Info */, e ? e.name : null);
2145
+ log$1(2 /* MutationObserver */, 0 /* Info */, e ? e.name : null);
2147
2146
  }
2148
2147
  }
2149
2148
  function monitor(frame) {
@@ -2151,7 +2150,7 @@ function monitor(frame) {
2151
2150
  // This includes cases where iframe location is updated without explicitly updating src attribute
2152
2151
  // E.g. iframe.contentWindow.location.href = "new-location";
2153
2152
  if (has(frame) === false) {
2154
- bind(frame, "load" /* Constant.LoadEvent */, generate.bind(this, frame, "childList" /* Constant.ChildList */), true);
2153
+ bind(frame, "load" /* LoadEvent */, generate.bind(this, frame, "childList" /* ChildList */), true);
2155
2154
  }
2156
2155
  }
2157
2156
  function stop$h() {
@@ -2169,14 +2168,14 @@ function stop$h() {
2169
2168
  timeout$1 = null;
2170
2169
  }
2171
2170
  function active$2() {
2172
- activePeriod = time() + 3000 /* Setting.MutationActivePeriod */;
2171
+ activePeriod = time() + 3000 /* MutationActivePeriod */;
2173
2172
  }
2174
2173
  function handle$1(m) {
2175
2174
  // Queue up mutation records for asynchronous processing
2176
2175
  var now = time();
2177
- track$6(6 /* Event.Mutation */, now);
2176
+ track$6(6 /* Mutation */, now);
2178
2177
  mutations.push({ time: now, mutations: m });
2179
- schedule$1(process$2, 1 /* Priority.High */).then(function () {
2178
+ schedule$1(process$2, 1 /* High */).then(function () {
2180
2179
  setTimeout(compute$7);
2181
2180
  measure(compute$6)();
2182
2181
  });
@@ -2187,7 +2186,7 @@ function process$2() {
2187
2186
  return __generator(this, function (_b) {
2188
2187
  switch (_b.label) {
2189
2188
  case 0:
2190
- timer = { id: id(), cost: 3 /* Metric.LayoutCost */ };
2189
+ timer = { id: id(), cost: 3 /* LayoutCost */ };
2191
2190
  start$w(timer);
2192
2191
  _b.label = 1;
2193
2192
  case 1:
@@ -2199,13 +2198,13 @@ function process$2() {
2199
2198
  if (!(_i < _a.length)) return [3 /*break*/, 6];
2200
2199
  mutation = _a[_i];
2201
2200
  state = state$8(timer);
2202
- if (!(state === 0 /* Task.Wait */)) return [3 /*break*/, 4];
2201
+ if (!(state === 0 /* Wait */)) return [3 /*break*/, 4];
2203
2202
  return [4 /*yield*/, suspend$1(timer)];
2204
2203
  case 3:
2205
2204
  state = _b.sent();
2206
2205
  _b.label = 4;
2207
2206
  case 4:
2208
- if (state === 2 /* Task.Stop */) {
2207
+ if (state === 2 /* Stop */) {
2209
2208
  return [3 /*break*/, 6];
2210
2209
  }
2211
2210
  target = mutation.target;
@@ -2217,17 +2216,17 @@ function process$2() {
2217
2216
  parse$1(target);
2218
2217
  }
2219
2218
  switch (type) {
2220
- case "attributes" /* Constant.Attributes */:
2221
- processNode(target, 3 /* Source.Attributes */);
2219
+ case "attributes" /* Attributes */:
2220
+ processNode(target, 3 /* Attributes */);
2222
2221
  break;
2223
- case "characterData" /* Constant.CharacterData */:
2224
- processNode(target, 4 /* Source.CharacterData */);
2222
+ case "characterData" /* CharacterData */:
2223
+ processNode(target, 4 /* CharacterData */);
2225
2224
  break;
2226
- case "childList" /* Constant.ChildList */:
2227
- processNodeList(mutation.addedNodes, 1 /* Source.ChildListAdd */, timer);
2228
- processNodeList(mutation.removedNodes, 2 /* Source.ChildListRemove */, timer);
2225
+ case "childList" /* ChildList */:
2226
+ processNodeList(mutation.addedNodes, 1 /* ChildListAdd */, timer);
2227
+ processNodeList(mutation.removedNodes, 2 /* ChildListRemove */, timer);
2229
2228
  break;
2230
- case "suspend" /* Constant.Suspend */:
2229
+ case "suspend" /* Suspend */:
2231
2230
  value = get(target);
2232
2231
  if (value) {
2233
2232
  value.metadata.suspend = true;
@@ -2238,7 +2237,7 @@ function process$2() {
2238
2237
  case 5:
2239
2238
  _i++;
2240
2239
  return [3 /*break*/, 2];
2241
- case 6: return [4 /*yield*/, encode$4(6 /* Event.Mutation */, timer, record.time)];
2240
+ case 6: return [4 /*yield*/, encode$4(6 /* Mutation */, timer, record.time)];
2242
2241
  case 7:
2243
2242
  _b.sent();
2244
2243
  return [3 /*break*/, 1];
@@ -2252,11 +2251,11 @@ function process$2() {
2252
2251
  function track$5(m, timer) {
2253
2252
  var value = m.target ? get(m.target.parentNode) : null;
2254
2253
  // Check if the parent is already discovered and that the parent is not the document root
2255
- if (value && value.data.tag !== "HTML" /* Constant.HTML */) {
2254
+ if (value && value.data.tag !== "HTML" /* HTML */) {
2256
2255
  var inactive = time() > activePeriod;
2257
2256
  var target = get(m.target);
2258
2257
  var element = target && target.selector ? target.selector.join() : m.target.nodeName;
2259
- var parent_1 = value.selector ? value.selector.join() : "" /* Constant.Empty */;
2258
+ var parent_1 = value.selector ? value.selector.join() : "" /* Empty */;
2260
2259
  // We use selector, instead of id, to determine the key (signature for the mutation) because in some cases
2261
2260
  // repeated mutations can cause elements to be destroyed and then recreated as new DOM nodes
2262
2261
  // In those cases, IDs will change however the selector (which is relative to DOM xPath) remains the same
@@ -2265,20 +2264,20 @@ function track$5(m, timer) {
2265
2264
  history$4[key] = key in history$4 ? history$4[key] : [0];
2266
2265
  var h = history$4[key];
2267
2266
  // Lookup any pending nodes queued up for removal, and process them now if we suspended a mutation before
2268
- if (inactive === false && h[0] >= 10 /* Setting.MutationSuspendThreshold */) {
2269
- processNodeList(h[1], 2 /* Source.ChildListRemove */, timer);
2267
+ if (inactive === false && h[0] >= 10 /* MutationSuspendThreshold */) {
2268
+ processNodeList(h[1], 2 /* ChildListRemove */, timer);
2270
2269
  }
2271
2270
  // Update the counter
2272
2271
  h[0] = inactive ? h[0] + 1 : 1;
2273
2272
  // Return updated mutation type based on if we have already hit the threshold or not
2274
- if (h[0] === 10 /* Setting.MutationSuspendThreshold */) {
2273
+ if (h[0] === 10 /* MutationSuspendThreshold */) {
2275
2274
  // Store a reference to removedNodes so we can process them later
2276
2275
  // when we resume mutations again on user interactions
2277
2276
  h[1] = m.removedNodes;
2278
- return "suspend" /* Constant.Suspend */;
2277
+ return "suspend" /* Suspend */;
2279
2278
  }
2280
- else if (h[0] > 10 /* Setting.MutationSuspendThreshold */) {
2281
- return "" /* Constant.Empty */;
2279
+ else if (h[0] > 10 /* MutationSuspendThreshold */) {
2280
+ return "" /* Empty */;
2282
2281
  }
2283
2282
  }
2284
2283
  return m.type;
@@ -2301,18 +2300,18 @@ function processNodeList(list, source, timer) {
2301
2300
  _a.label = 1;
2302
2301
  case 1:
2303
2302
  if (!(i < length)) return [3 /*break*/, 6];
2304
- if (!(source === 1 /* Source.ChildListAdd */)) return [3 /*break*/, 2];
2303
+ if (!(source === 1 /* ChildListAdd */)) return [3 /*break*/, 2];
2305
2304
  traverse(list[i], timer, source);
2306
2305
  return [3 /*break*/, 5];
2307
2306
  case 2:
2308
2307
  state = state$8(timer);
2309
- if (!(state === 0 /* Task.Wait */)) return [3 /*break*/, 4];
2308
+ if (!(state === 0 /* Wait */)) return [3 /*break*/, 4];
2310
2309
  return [4 /*yield*/, suspend$1(timer)];
2311
2310
  case 3:
2312
2311
  state = _a.sent();
2313
2312
  _a.label = 4;
2314
2313
  case 4:
2315
- if (state === 2 /* Task.Stop */) {
2314
+ if (state === 2 /* Stop */) {
2316
2315
  return [3 /*break*/, 6];
2317
2316
  }
2318
2317
  processNode(list[i], source);
@@ -2337,7 +2336,7 @@ function schedule(node, fragment) {
2337
2336
  if (timeout$1) {
2338
2337
  clearTimeout(timeout$1);
2339
2338
  }
2340
- timeout$1 = setTimeout(function () { trigger$1(fragment); }, 33 /* Setting.LookAhead */);
2339
+ timeout$1 = setTimeout(function () { trigger$1(fragment); }, 33 /* LookAhead */);
2341
2340
  return node;
2342
2341
  }
2343
2342
  function trigger$1(fragment) {
@@ -2350,7 +2349,7 @@ function trigger$1(fragment) {
2350
2349
  if (shadowRoot && has(node)) {
2351
2350
  continue;
2352
2351
  }
2353
- generate(node, shadowRoot || fragment ? "childList" /* Constant.ChildList */ : "characterData" /* Constant.CharacterData */);
2352
+ generate(node, shadowRoot || fragment ? "childList" /* ChildList */ : "characterData" /* CharacterData */);
2354
2353
  }
2355
2354
  }
2356
2355
  queue$2 = [];
@@ -2400,9 +2399,9 @@ function reset$7() {
2400
2399
  hashMap = {};
2401
2400
  override = [];
2402
2401
  unmask = [];
2403
- maskText = "address,password,contact" /* Mask.Text */.split("," /* Constant.Comma */);
2404
- maskInput = "password,secret,pass,social,ssn,name,code,dob,cell,mob,contact,hidden,account,cvv,ccv,email,tel,phone,address,addr,card,zip" /* Mask.Input */.split("," /* Constant.Comma */);
2405
- maskDisable = "radio,checkbox,range,button,reset,submit" /* Mask.Disable */.split("," /* Constant.Comma */);
2402
+ maskText = "address,password,contact" /* Text */.split("," /* Comma */);
2403
+ maskInput = "password,secret,pass,social,ssn,name,code,dob,cell,mob,contact,hidden,account,cvv,ccv,email,tel,phone,address,addr,card,zip" /* Input */.split("," /* Comma */);
2404
+ maskDisable = "radio,checkbox,range,button,reset,submit" /* Disable */.split("," /* Comma */);
2406
2405
  idMap = new WeakMap();
2407
2406
  iframeMap = new WeakMap();
2408
2407
  privacyMap = new WeakMap();
@@ -2418,19 +2417,19 @@ function parse$1(root, init) {
2418
2417
  try {
2419
2418
  // Parse unmask configuration into separate query selectors and override tokens as part of initialization
2420
2419
  if (init) {
2421
- config$1.unmask.forEach(function (x) { return x.indexOf("!" /* Constant.Bang */) < 0 ? unmask.push(x) : override.push(x.substr(1)); });
2420
+ config$1.unmask.forEach(function (x) { return x.indexOf("!" /* Bang */) < 0 ? unmask.push(x) : override.push(x.substr(1)); });
2422
2421
  }
2423
2422
  // Since mutations may happen on leaf nodes too, e.g. text nodes, which may not support all selector APIs.
2424
2423
  // We ensure that the root note supports querySelectorAll API before executing the code below to identify new regions.
2425
2424
  if ("querySelectorAll" in root) {
2426
- config$1.regions.forEach(function (x) { return root.querySelectorAll(x[1]).forEach(function (e) { return observe$1(e, "".concat(x[0])); }); }); // Regions
2427
- config$1.mask.forEach(function (x) { return root.querySelectorAll(x).forEach(function (e) { return privacyMap.set(e, 3 /* Privacy.TextImage */); }); }); // Masked Elements
2425
+ config$1.regions.forEach(function (x) { return root.querySelectorAll(x[1]).forEach(function (e) { return observe$1(e, "" + x[0]); }); }); // Regions
2426
+ config$1.mask.forEach(function (x) { return root.querySelectorAll(x).forEach(function (e) { return privacyMap.set(e, 3 /* TextImage */); }); }); // Masked Elements
2428
2427
  config$1.fraud.forEach(function (x) { return root.querySelectorAll(x[1]).forEach(function (e) { return fraudMap.set(e, x[0]); }); }); // Fraud Check
2429
- unmask.forEach(function (x) { return root.querySelectorAll(x).forEach(function (e) { return privacyMap.set(e, 0 /* Privacy.None */); }); }); // Unmasked Elements
2428
+ unmask.forEach(function (x) { return root.querySelectorAll(x).forEach(function (e) { return privacyMap.set(e, 0 /* None */); }); }); // Unmasked Elements
2430
2429
  }
2431
2430
  }
2432
2431
  catch (e) {
2433
- log$1(5 /* Code.Selector */, 1 /* Severity.Warning */, e ? e.name : null);
2432
+ log$1(5 /* Selector */, 1 /* Warning */, e ? e.name : null);
2434
2433
  }
2435
2434
  }
2436
2435
  function getId(node, autogen) {
@@ -2453,7 +2452,7 @@ function add(node, parent, data, source) {
2453
2452
  var regionId = exists(node) ? id : null;
2454
2453
  var fragmentId = null;
2455
2454
  var fraudId = fraudMap.has(node) ? fraudMap.get(node) : null;
2456
- var privacyId = config$1.content ? 1 /* Privacy.Sensitive */ : 2 /* Privacy.Text */;
2455
+ var privacyId = config$1.content ? 1 /* Sensitive */ : 3 /* TextImage */;
2457
2456
  if (parentId >= 0 && values[parentId]) {
2458
2457
  parentValue = values[parentId];
2459
2458
  parentValue.children.push(id);
@@ -2463,8 +2462,8 @@ function add(node, parent, data, source) {
2463
2462
  privacyId = parentValue.metadata.privacy;
2464
2463
  }
2465
2464
  // If there's an explicit region attribute set on the element, use it to mark a region on the page
2466
- if (data.attributes && "data-clarity-region" /* Constant.RegionData */ in data.attributes) {
2467
- observe$1(node, data.attributes["data-clarity-region" /* Constant.RegionData */]);
2465
+ if (data.attributes && "data-clarity-region" /* RegionData */ in data.attributes) {
2466
+ observe$1(node, data.attributes["data-clarity-region" /* RegionData */]);
2468
2467
  regionId = id;
2469
2468
  }
2470
2469
  nodes[id] = node;
@@ -2542,7 +2541,7 @@ function update$1(node, parent, data, source) {
2542
2541
  }
2543
2542
  function sameorigin(node) {
2544
2543
  var output = false;
2545
- if (node.nodeType === Node.ELEMENT_NODE && node.tagName === "IFRAME" /* Constant.IFrameTag */) {
2544
+ if (node.nodeType === Node.ELEMENT_NODE && node.tagName === "IFRAME" /* IFrameTag */) {
2546
2545
  var frame = node;
2547
2546
  // To determine if the iframe is same-origin or not, we try accessing it's contentDocument.
2548
2547
  // If the browser throws an exception, we assume it's cross-origin and move on.
@@ -2569,11 +2568,11 @@ function privacy(node, value, parent) {
2569
2568
  var attributes = data.attributes || {};
2570
2569
  var tag = data.tag.toUpperCase();
2571
2570
  switch (true) {
2572
- case "data-clarity-mask" /* Constant.MaskData */ in attributes:
2573
- metadata.privacy = 3 /* Privacy.TextImage */;
2571
+ case "data-clarity-mask" /* MaskData */ in attributes:
2572
+ metadata.privacy = 3 /* TextImage */;
2574
2573
  break;
2575
- case "data-clarity-unmask" /* Constant.UnmaskData */ in attributes:
2576
- metadata.privacy = 0 /* Privacy.None */;
2574
+ case "data-clarity-unmask" /* UnmaskData */ in attributes:
2575
+ metadata.privacy = 0 /* None */;
2577
2576
  break;
2578
2577
  case privacyMap.has(node):
2579
2578
  // If this node was explicitly configured to contain sensitive content, honor that privacy setting
@@ -2581,38 +2580,38 @@ function privacy(node, value, parent) {
2581
2580
  break;
2582
2581
  case fraudMap.has(node):
2583
2582
  // If this node was explicitly configured to be evaluated for fraud, then also mask content
2584
- metadata.privacy = 2 /* Privacy.Text */;
2583
+ metadata.privacy = 2 /* Text */;
2585
2584
  break;
2586
- case tag === "*T" /* Constant.TextTag */:
2585
+ case tag === "*T" /* TextTag */:
2587
2586
  // If it's a text node belonging to a STYLE or TITLE tag or one of scrub exceptions, then capture content
2588
- var pTag = parent && parent.data ? parent.data.tag : "" /* Constant.Empty */;
2589
- var pSelector_1 = parent && parent.selector ? parent.selector[1 /* Selector.Default */] : "" /* Constant.Empty */;
2590
- var tags = ["STYLE" /* Constant.StyleTag */, "TITLE" /* Constant.TitleTag */, "svg:style" /* Constant.SvgStyle */];
2591
- metadata.privacy = tags.includes(pTag) || override.some(function (x) { return pSelector_1.indexOf(x) >= 0; }) ? 0 /* Privacy.None */ : current;
2587
+ var pTag = parent && parent.data ? parent.data.tag : "" /* Empty */;
2588
+ var pSelector_1 = parent && parent.selector ? parent.selector[1 /* Default */] : "" /* Empty */;
2589
+ var tags = ["STYLE" /* StyleTag */, "TITLE" /* TitleTag */, "svg:style" /* SvgStyle */];
2590
+ metadata.privacy = tags.includes(pTag) || override.some(function (x) { return pSelector_1.indexOf(x) >= 0; }) ? 0 /* None */ : current;
2592
2591
  break;
2593
- case tag === "INPUT" /* Constant.InputTag */ && current === 0 /* Privacy.None */:
2592
+ case tag === "INPUT" /* InputTag */ && current === 0 /* None */:
2594
2593
  // If even default privacy setting is to not mask, we still scan through input fields for any sensitive information
2595
- var field_1 = "" /* Constant.Empty */;
2594
+ var field_1 = "" /* Empty */;
2596
2595
  Object.keys(attributes).forEach(function (x) { return field_1 += attributes[x].toLowerCase(); });
2597
2596
  metadata.privacy = inspect(field_1, maskInput, metadata);
2598
2597
  break;
2599
- case tag === "INPUT" /* Constant.InputTag */ && current === 1 /* Privacy.Sensitive */:
2598
+ case tag === "INPUT" /* InputTag */ && current === 1 /* Sensitive */:
2600
2599
  // Look through class names to aggressively mask content
2601
- metadata.privacy = inspect(attributes["class" /* Constant.Class */], maskText, metadata);
2600
+ metadata.privacy = inspect(attributes["class" /* Class */], maskText, metadata);
2602
2601
  // If this node has an explicit type assigned to it, go through masking rules to determine right privacy setting
2603
- metadata.privacy = inspect(attributes["type" /* Constant.Type */], maskInput, metadata);
2602
+ metadata.privacy = inspect(attributes["type" /* Type */], maskInput, metadata);
2604
2603
  // If it's a button or an input option, make an exception to disable masking in sensitive mode
2605
- metadata.privacy = maskDisable.indexOf(attributes["type" /* Constant.Type */]) >= 0 ? 0 /* Privacy.None */ : metadata.privacy;
2604
+ metadata.privacy = maskDisable.indexOf(attributes["type" /* Type */]) >= 0 ? 0 /* None */ : metadata.privacy;
2606
2605
  break;
2607
- case current === 1 /* Privacy.Sensitive */:
2606
+ case current === 1 /* Sensitive */:
2608
2607
  // In a mode where we mask sensitive information by default, look through class names to aggressively mask content
2609
- metadata.privacy = inspect(attributes["class" /* Constant.Class */], maskText, metadata);
2608
+ metadata.privacy = inspect(attributes["class" /* Class */], maskText, metadata);
2610
2609
  break;
2611
2610
  }
2612
2611
  }
2613
2612
  function inspect(input, lookup, metadata) {
2614
2613
  if (input && lookup.some(function (x) { return input.indexOf(x) >= 0; })) {
2615
- return 2 /* Privacy.Text */;
2614
+ return 2 /* Text */;
2616
2615
  }
2617
2616
  return metadata.privacy;
2618
2617
  }
@@ -2650,7 +2649,7 @@ function updateSelector(value) {
2650
2649
  var d = value.data;
2651
2650
  var p = position(parent, value);
2652
2651
  var s = { id: value.id, tag: d.tag, prefix: prefix, position: p, attributes: d.attributes };
2653
- value.selector = [get$1(s, 0 /* Selector.Alpha */), get$1(s, 1 /* Selector.Beta */)];
2652
+ value.selector = [get$1(s, 0 /* Alpha */), get$1(s, 1 /* Beta */)];
2654
2653
  value.hash = value.selector.map(function (x) { return x ? hash(x) : null; });
2655
2654
  value.hash.forEach(function (h) { return hashMap[h] = value.id; });
2656
2655
  // Match fragment configuration against both alpha and beta hash
@@ -2705,7 +2704,7 @@ function remove(id, source) {
2705
2704
  }
2706
2705
  function size(value) {
2707
2706
  // If this element is a image node, and is masked, then track box model for the current element
2708
- if (value.data.tag === "IMG" /* Constant.ImageTag */ && value.metadata.privacy === 3 /* Privacy.TextImage */) {
2707
+ if (value.data.tag === "IMG" /* ImageTag */ && value.metadata.privacy === 3 /* TextImage */) {
2709
2708
  value.metadata.size = [];
2710
2709
  }
2711
2710
  }
@@ -2740,7 +2739,7 @@ function track$4(id, source, fragment, changed, parentChanged) {
2740
2739
  // Edge case: If an element is added later on, and pre-discovered element is moved as a child.
2741
2740
  // In that case, we need to reorder the pre-discovered element in the update list to keep visualization consistent.
2742
2741
  var uIndex = updateMap.indexOf(id);
2743
- if (uIndex >= 0 && source === 1 /* Source.ChildListAdd */ && parentChanged) {
2742
+ if (uIndex >= 0 && source === 1 /* ChildListAdd */ && parentChanged) {
2744
2743
  updateMap.splice(uIndex, 1);
2745
2744
  updateMap.push(id);
2746
2745
  }
@@ -2786,15 +2785,15 @@ function exists(node) {
2786
2785
  }
2787
2786
  function track$3(id, event) {
2788
2787
  var node = getNode(id);
2789
- var data = id in regions ? regions[id] : { id: id, visibility: 0 /* RegionVisibility.Rendered */, interaction: 16 /* InteractionState.None */, name: regionMap.get(node) };
2788
+ var data = id in regions ? regions[id] : { id: id, visibility: 0 /* Rendered */, interaction: 16 /* None */, name: regionMap.get(node) };
2790
2789
  // Determine the interaction state based on incoming event
2791
- var interaction = 16 /* InteractionState.None */;
2790
+ var interaction = 16 /* None */;
2792
2791
  switch (event) {
2793
- case 9 /* Event.Click */:
2794
- interaction = 20 /* InteractionState.Clicked */;
2792
+ case 9 /* Click */:
2793
+ interaction = 20 /* Clicked */;
2795
2794
  break;
2796
- case 27 /* Event.Input */:
2797
- interaction = 30 /* InteractionState.Input */;
2795
+ case 27 /* Input */:
2796
+ interaction = 30 /* Input */;
2798
2797
  break;
2799
2798
  }
2800
2799
  // Process updates to this region, if applicable
@@ -2822,7 +2821,7 @@ function compute$6() {
2822
2821
  queue$1 = q;
2823
2822
  // Schedule encode only when we have at least one valid data entry
2824
2823
  if (state$1.length > 0) {
2825
- encode$4(7 /* Event.Region */);
2824
+ encode$4(7 /* Region */);
2826
2825
  }
2827
2826
  }
2828
2827
  function handler$1(entries) {
@@ -2838,27 +2837,27 @@ function handler$1(entries) {
2838
2837
  // Also, if these regions ever become non-zero width or height (through AJAX, user action or orientation change) - we will automatically start monitoring them from that point onwards
2839
2838
  if (regionMap.has(target) && rect.width + rect.height > 0 && viewport.width > 0 && viewport.height > 0) {
2840
2839
  var id = target ? getId(target) : null;
2841
- var data = id in regions ? regions[id] : { id: id, name: regionMap.get(target), interaction: 16 /* InteractionState.None */, visibility: 0 /* RegionVisibility.Rendered */ };
2840
+ var data = id in regions ? regions[id] : { id: id, name: regionMap.get(target), interaction: 16 /* None */, visibility: 0 /* Rendered */ };
2842
2841
  // For regions that have relatively smaller area, we look at intersection ratio and see the overlap relative to element's area
2843
2842
  // However, for larger regions, area of regions could be bigger than viewport and therefore comparison is relative to visible area
2844
2843
  var viewportRatio = overlap ? (overlap.width * overlap.height * 1.0) / (viewport.width * viewport.height) : 0;
2845
- var visible = viewportRatio > 0.05 /* Setting.ViewportIntersectionRatio */ || entry.intersectionRatio > 0.8 /* Setting.IntersectionRatio */;
2844
+ var visible = viewportRatio > 0.05 /* ViewportIntersectionRatio */ || entry.intersectionRatio > 0.8 /* IntersectionRatio */;
2846
2845
  // If an element is either visible or was visible and has been scrolled to the end
2847
2846
  // i.e. Scrolled to end is determined by if the starting position of the element + the window height is more than the total element height.
2848
2847
  // starting position is relative to the viewport - so Intersection observer returns a negative value for rect.top to indicate that the element top is above the viewport
2849
- var scrolledToEnd = (visible || data.visibility == 10 /* RegionVisibility.Visible */) && Math.abs(rect.top) + viewport.height > rect.height;
2848
+ var scrolledToEnd = (visible || data.visibility == 10 /* Visible */) && Math.abs(rect.top) + viewport.height > rect.height;
2850
2849
  // Process updates to this region, if applicable
2851
2850
  process$1(target, data, data.interaction, (scrolledToEnd ?
2852
- 13 /* RegionVisibility.ScrolledToEnd */ :
2853
- (visible ? 10 /* RegionVisibility.Visible */ : 0 /* RegionVisibility.Rendered */)));
2851
+ 13 /* ScrolledToEnd */ :
2852
+ (visible ? 10 /* Visible */ : 0 /* Rendered */)));
2854
2853
  // Stop observing this element now that we have already received scrolled signal
2855
- if (data.visibility >= 13 /* RegionVisibility.ScrolledToEnd */ && observer$1) {
2854
+ if (data.visibility >= 13 /* ScrolledToEnd */ && observer$1) {
2856
2855
  observer$1.unobserve(target);
2857
2856
  }
2858
2857
  }
2859
2858
  }
2860
2859
  if (state$1.length > 0) {
2861
- encode$4(7 /* Event.Region */);
2860
+ encode$4(7 /* Region */);
2862
2861
  }
2863
2862
  }
2864
2863
  function process$1(n, d, s, v) {
@@ -2917,7 +2916,7 @@ function link(node) {
2917
2916
  function metadata$2(node, event, text) {
2918
2917
  if (text === void 0) { text = null; }
2919
2918
  // If the node is null, we return a reserved value for id: 0. Valid assignment of id begins from 1+.
2920
- var output = { id: 0, hash: null, privacy: 2 /* Privacy.Text */, node: node };
2919
+ var output = { id: 0, hash: null, privacy: 2 /* Text */, node: node };
2921
2920
  if (node) {
2922
2921
  var value = get(node);
2923
2922
  if (value !== null) {
@@ -2943,15 +2942,15 @@ function encode$3 (type) {
2943
2942
  t = time();
2944
2943
  tokens = [t, type];
2945
2944
  switch (type) {
2946
- case 13 /* Event.MouseDown */:
2947
- case 14 /* Event.MouseUp */:
2948
- case 12 /* Event.MouseMove */:
2949
- case 15 /* Event.MouseWheel */:
2950
- case 16 /* Event.DoubleClick */:
2951
- case 17 /* Event.TouchStart */:
2952
- case 18 /* Event.TouchEnd */:
2953
- case 19 /* Event.TouchMove */:
2954
- case 20 /* Event.TouchCancel */:
2945
+ case 13 /* MouseDown */:
2946
+ case 14 /* MouseUp */:
2947
+ case 12 /* MouseMove */:
2948
+ case 15 /* MouseWheel */:
2949
+ case 16 /* DoubleClick */:
2950
+ case 17 /* TouchStart */:
2951
+ case 18 /* TouchEnd */:
2952
+ case 19 /* TouchMove */:
2953
+ case 20 /* TouchCancel */:
2955
2954
  for (_i = 0, _a = state$4; _i < _a.length; _i++) {
2956
2955
  entry = _a[_i];
2957
2956
  pTarget = metadata$2(entry.data.target, entry.event);
@@ -2966,12 +2965,12 @@ function encode$3 (type) {
2966
2965
  }
2967
2966
  reset$e();
2968
2967
  break;
2969
- case 9 /* Event.Click */:
2968
+ case 9 /* Click */:
2970
2969
  for (_b = 0, _c = state$7; _b < _c.length; _b++) {
2971
2970
  entry = _c[_b];
2972
2971
  cTarget = metadata$2(entry.data.target, entry.event, entry.data.text);
2973
2972
  tokens = [entry.time, entry.event];
2974
- cHash = cTarget.hash.join("." /* Constant.Dot */);
2973
+ cHash = cTarget.hash.join("." /* Dot */);
2975
2974
  tokens.push(cTarget.id);
2976
2975
  tokens.push(entry.data.x);
2977
2976
  tokens.push(entry.data.y);
@@ -2989,7 +2988,7 @@ function encode$3 (type) {
2989
2988
  }
2990
2989
  reset$h();
2991
2990
  break;
2992
- case 38 /* Event.Clipboard */:
2991
+ case 38 /* Clipboard */:
2993
2992
  for (_d = 0, _e = state$6; _d < _e.length; _d++) {
2994
2993
  entry = _e[_d];
2995
2994
  tokens = [entry.time, entry.event];
@@ -3002,7 +3001,7 @@ function encode$3 (type) {
3002
3001
  }
3003
3002
  reset$g();
3004
3003
  break;
3005
- case 11 /* Event.Resize */:
3004
+ case 11 /* Resize */:
3006
3005
  r = data$b;
3007
3006
  tokens.push(r.width);
3008
3007
  tokens.push(r.height);
@@ -3010,13 +3009,13 @@ function encode$3 (type) {
3010
3009
  reset$d();
3011
3010
  queue(tokens);
3012
3011
  break;
3013
- case 26 /* Event.Unload */:
3012
+ case 26 /* Unload */:
3014
3013
  u = data$9;
3015
3014
  tokens.push(u.name);
3016
3015
  reset$9();
3017
3016
  queue(tokens);
3018
3017
  break;
3019
- case 27 /* Event.Input */:
3018
+ case 27 /* Input */:
3020
3019
  for (_f = 0, _g = state$5; _f < _g.length; _f++) {
3021
3020
  entry = _g[_f];
3022
3021
  iTarget = metadata$2(entry.data.target, entry.event, entry.data.value);
@@ -3027,7 +3026,7 @@ function encode$3 (type) {
3027
3026
  }
3028
3027
  reset$f();
3029
3028
  break;
3030
- case 21 /* Event.Selection */:
3029
+ case 21 /* Selection */:
3031
3030
  s = data$a;
3032
3031
  if (s) {
3033
3032
  startTarget = metadata$2(s.start, type);
@@ -3040,7 +3039,7 @@ function encode$3 (type) {
3040
3039
  queue(tokens);
3041
3040
  }
3042
3041
  break;
3043
- case 10 /* Event.Scroll */:
3042
+ case 10 /* Scroll */:
3044
3043
  for (_h = 0, _j = state$3; _h < _j.length; _h++) {
3045
3044
  entry = _j[_h];
3046
3045
  sTarget = metadata$2(entry.data.target, entry.event);
@@ -3055,7 +3054,7 @@ function encode$3 (type) {
3055
3054
  }
3056
3055
  reset$c();
3057
3056
  break;
3058
- case 39 /* Event.Submit */:
3057
+ case 39 /* Submit */:
3059
3058
  for (_k = 0, _l = state$2; _k < _l.length; _k++) {
3060
3059
  entry = _l[_k];
3061
3060
  tokens = [entry.time, entry.event];
@@ -3067,7 +3066,7 @@ function encode$3 (type) {
3067
3066
  }
3068
3067
  reset$a();
3069
3068
  break;
3070
- case 22 /* Event.Timeline */:
3069
+ case 22 /* Timeline */:
3071
3070
  for (_m = 0, _o = updates$1; _m < _o.length; _m++) {
3072
3071
  entry = _o[_m];
3073
3072
  tokens = [entry.time, entry.event];
@@ -3081,7 +3080,7 @@ function encode$3 (type) {
3081
3080
  }
3082
3081
  reset$5();
3083
3082
  break;
3084
- case 28 /* Event.Visibility */:
3083
+ case 28 /* Visibility */:
3085
3084
  v = data$8;
3086
3085
  tokens.push(v.visible);
3087
3086
  queue(tokens);
@@ -3104,11 +3103,11 @@ function reset$5() {
3104
3103
  updates$1 = [];
3105
3104
  }
3106
3105
  function track$2(time, event, hash, x, y, reaction, context) {
3107
- if (reaction === void 0) { reaction = 1 /* BooleanFlag.True */; }
3108
- if (context === void 0) { context = 0 /* BrowsingContext.Self */; }
3106
+ if (reaction === void 0) { reaction = 1 /* True */; }
3107
+ if (context === void 0) { context = 0 /* Self */; }
3109
3108
  state.push({
3110
3109
  time: time,
3111
- event: 22 /* Event.Timeline */,
3110
+ event: 22 /* Timeline */,
3112
3111
  data: {
3113
3112
  type: event,
3114
3113
  hash: hash,
@@ -3127,7 +3126,7 @@ function compute$5() {
3127
3126
  var temp = [];
3128
3127
  updates$1 = [];
3129
3128
  var max = data$1.start + data$1.duration;
3130
- var min = Math.max(max - 2000 /* Setting.TimelineSpan */, 0);
3129
+ var min = Math.max(max - 2000 /* TimelineSpan */, 0);
3131
3130
  for (var _i = 0, state_1 = state; _i < state_1.length; _i++) {
3132
3131
  var s = state_1[_i];
3133
3132
  if (s.time >= min) {
@@ -3138,7 +3137,7 @@ function compute$5() {
3138
3137
  }
3139
3138
  }
3140
3139
  state = temp; // Drop events less than the min time
3141
- encode$3(22 /* Event.Timeline */);
3140
+ encode$3(22 /* Timeline */);
3142
3141
  }
3143
3142
  function stop$e() {
3144
3143
  state = [];
@@ -3171,10 +3170,10 @@ function queue(tokens, transmit) {
3171
3170
  var type = tokens.length > 1 ? tokens[1] : null;
3172
3171
  var event_1 = JSON.stringify(tokens);
3173
3172
  switch (type) {
3174
- case 5 /* Event.Discover */:
3173
+ case 5 /* Discover */:
3175
3174
  discoverBytes += event_1.length;
3176
- case 37 /* Event.Box */:
3177
- case 6 /* Event.Mutation */:
3175
+ case 37 /* Box */:
3176
+ case 6 /* Mutation */:
3178
3177
  playbackBytes += event_1.length;
3179
3178
  playback.push(event_1);
3180
3179
  break;
@@ -3183,7 +3182,7 @@ function queue(tokens, transmit) {
3183
3182
  break;
3184
3183
  }
3185
3184
  // Increment event count metric
3186
- count$1(25 /* Metric.EventCount */);
3185
+ count$1(25 /* EventCount */);
3187
3186
  // Following two checks are precautionary and act as a fail safe mechanism to get out of unexpected situations.
3188
3187
  // Check 1: If for any reason the upload hasn't happened after waiting for 2x the config.delay time,
3189
3188
  // reset the timer. This allows Clarity to attempt an upload again.
@@ -3196,7 +3195,7 @@ function queue(tokens, transmit) {
3196
3195
  // However, in certain scenarios - like metric calculation - which are triggered as part of an existing upload
3197
3196
  // We enrich the data going out with the existing upload. In these cases, call to upload comes with 'transmit' set to false.
3198
3197
  if (transmit && timeout === null) {
3199
- if (type !== 25 /* Event.Ping */) {
3198
+ if (type !== 25 /* Ping */) {
3200
3199
  reset$n();
3201
3200
  }
3202
3201
  timeout = setTimeout(upload, gap);
@@ -3225,9 +3224,9 @@ function upload(final) {
3225
3224
  switch (_b.label) {
3226
3225
  case 0:
3227
3226
  timeout = null;
3228
- sendPlaybackBytes = config$1.lean === false && playbackBytes > 0 && (playbackBytes < 1048576 /* Setting.MaxFirstPayloadBytes */ || data$1.sequence > 0);
3227
+ sendPlaybackBytes = config$1.lean === false && playbackBytes > 0 && (playbackBytes < 1048576 /* MaxFirstPayloadBytes */ || data$1.sequence > 0);
3229
3228
  if (sendPlaybackBytes) {
3230
- max(1 /* Metric.Playback */, 1 /* BooleanFlag.True */);
3229
+ max(1 /* Playback */, 1 /* True */);
3231
3230
  }
3232
3231
  // CAUTION: Ensure "transmit" is set to false in the queue function for following events
3233
3232
  // Otherwise you run a risk of infinite loop.
@@ -3236,8 +3235,8 @@ function upload(final) {
3236
3235
  compute$8();
3237
3236
  last = final === true;
3238
3237
  e = JSON.stringify(envelope(last));
3239
- a = "[".concat(analysis.join(), "]");
3240
- p = sendPlaybackBytes ? "[".concat(playback.join(), "]") : "" /* Constant.Empty */;
3238
+ a = "[" + analysis.join() + "]";
3239
+ p = sendPlaybackBytes ? "[" + playback.join() + "]" : "" /* Empty */;
3241
3240
  encoded = { e: e, a: a, p: p };
3242
3241
  payload = stringify(encoded);
3243
3242
  if (!last) return [3 /*break*/, 1];
@@ -3249,7 +3248,7 @@ function upload(final) {
3249
3248
  _b.label = 3;
3250
3249
  case 3:
3251
3250
  zipped = _a;
3252
- sum(2 /* Metric.TotalBytes */, zipped ? zipped.length : payload.length);
3251
+ sum(2 /* TotalBytes */, zipped ? zipped.length : payload.length);
3253
3252
  send(payload, zipped, data$1.sequence, last);
3254
3253
  // Clear out events now that payload has been dispatched
3255
3254
  analysis = [];
@@ -3264,12 +3263,12 @@ function upload(final) {
3264
3263
  });
3265
3264
  }
3266
3265
  function stringify(encoded) {
3267
- return encoded.p.length > 0 ? "{\"e\":".concat(encoded.e, ",\"a\":").concat(encoded.a, ",\"p\":").concat(encoded.p, "}") : "{\"e\":".concat(encoded.e, ",\"a\":").concat(encoded.a, "}");
3266
+ return encoded.p.length > 0 ? "{\"e\":" + encoded.e + ",\"a\":" + encoded.a + ",\"p\":" + encoded.p + "}" : "{\"e\":" + encoded.e + ",\"a\":" + encoded.a + "}";
3268
3267
  }
3269
3268
  function send(payload, zipped, sequence, beacon) {
3270
3269
  if (beacon === void 0) { beacon = false; }
3271
3270
  // Upload data if a valid URL is defined in the config
3272
- if (typeof config$1.upload === "string" /* Constant.String */) {
3271
+ if (typeof config$1.upload === "string" /* String */) {
3273
3272
  var url = config$1.upload;
3274
3273
  var dispatched = false;
3275
3274
  // If it's the last payload, attempt to upload using sendBeacon first.
@@ -3308,7 +3307,7 @@ function send(payload, zipped, sequence, beacon) {
3308
3307
  xhr_1.withCredentials = true;
3309
3308
  if (zipped) {
3310
3309
  // If we do have valid compressed array, send it with appropriate HTTP headers so server can decode it appropriately
3311
- xhr_1.setRequestHeader("Accept" /* Constant.Accept */, "application/x-clarity-gzip" /* Constant.ClarityGzip */);
3310
+ xhr_1.setRequestHeader("Accept" /* Accept */, "application/x-clarity-gzip" /* ClarityGzip */);
3312
3311
  xhr_1.send(zipped);
3313
3312
  }
3314
3313
  else {
@@ -3325,13 +3324,13 @@ function send(payload, zipped, sequence, beacon) {
3325
3324
  }
3326
3325
  function check$3(xhr, sequence) {
3327
3326
  var transitData = transit[sequence];
3328
- if (xhr && xhr.readyState === 4 /* XMLReadyState.Done */ && transitData) {
3327
+ if (xhr && xhr.readyState === 4 /* Done */ && transitData) {
3329
3328
  // Attempt send payload again (as configured in settings) if we do not receive a success (2XX) response code back from the server
3330
- if ((xhr.status < 200 || xhr.status > 208) && transitData.attempts <= 1 /* Setting.RetryLimit */) {
3329
+ if ((xhr.status < 200 || xhr.status > 208) && transitData.attempts <= 1 /* RetryLimit */) {
3331
3330
  // We re-attempt in all cases except when server explicitly rejects our request with 4XX error
3332
3331
  if (xhr.status >= 400 && xhr.status < 500) {
3333
3332
  // In case of a 4XX response from the server, we bail out instead of trying again
3334
- trigger(6 /* Check.Server */);
3333
+ trigger(6 /* Server */);
3335
3334
  }
3336
3335
  else {
3337
3336
  // Browser will send status = 0 when it refuses to put network request over the wire
@@ -3352,7 +3351,7 @@ function check$3(xhr, sequence) {
3352
3351
  track$1 = { sequence: sequence, attempts: transitData.attempts, status: xhr.status };
3353
3352
  // Send back an event only if we were not successful in our first attempt
3354
3353
  if (transitData.attempts > 1) {
3355
- encode$1(2 /* Event.Upload */);
3354
+ encode$1(2 /* Upload */);
3356
3355
  }
3357
3356
  // Handle response if it was a 200 response with a valid body
3358
3357
  if (xhr.status === 200 && xhr.responseText) {
@@ -3363,7 +3362,7 @@ function check$3(xhr, sequence) {
3363
3362
  // And, right before we terminate the session, we will attempt one last time to see if we can use
3364
3363
  // different transport option (sendBeacon vs. XHR) to get this data to the server for analysis purposes
3365
3364
  send(transitData.data, null, sequence, true);
3366
- trigger(3 /* Check.Retry */);
3365
+ trigger(3 /* Retry */);
3367
3366
  }
3368
3367
  // Signal that this request completed successfully
3369
3368
  if (xhr.status >= 200 && xhr.status <= 208) {
@@ -3383,21 +3382,21 @@ function done(sequence) {
3383
3382
  function delay() {
3384
3383
  // Progressively increase delay as we continue to send more payloads from the client to the server
3385
3384
  // If we are not uploading data to a server, and instead invoking UploadCallback, in that case keep returning configured value
3386
- var gap = config$1.lean === false && discoverBytes > 0 ? 100 /* Setting.MinUploadDelay */ : data$1.sequence * config$1.delay;
3387
- return typeof config$1.upload === "string" /* Constant.String */ ? Math.max(Math.min(gap, 30000 /* Setting.MaxUploadDelay */), 100 /* Setting.MinUploadDelay */) : config$1.delay;
3385
+ var gap = config$1.lean === false && discoverBytes > 0 ? 100 /* MinUploadDelay */ : data$1.sequence * config$1.delay;
3386
+ return typeof config$1.upload === "string" /* String */ ? Math.max(Math.min(gap, 30000 /* MaxUploadDelay */), 100 /* MinUploadDelay */) : config$1.delay;
3388
3387
  }
3389
3388
  function response(payload) {
3390
- var parts = payload && payload.length > 0 ? payload.split(" ") : ["" /* Constant.Empty */];
3389
+ var parts = payload && payload.length > 0 ? payload.split(" ") : ["" /* Empty */];
3391
3390
  switch (parts[0]) {
3392
- case "END" /* Constant.End */:
3391
+ case "END" /* End */:
3393
3392
  // Clear out session storage and end the session so we can start fresh the next time
3394
- trigger(6 /* Check.Server */);
3393
+ trigger(6 /* Server */);
3395
3394
  break;
3396
- case "UPGRADE" /* Constant.Upgrade */:
3395
+ case "UPGRADE" /* Upgrade */:
3397
3396
  // Upgrade current session to send back playback information
3398
- upgrade("Auto" /* Constant.Auto */);
3397
+ upgrade("Auto" /* Auto */);
3399
3398
  break;
3400
- case "ACTION" /* Constant.Action */:
3399
+ case "ACTION" /* Action */:
3401
3400
  // Invoke action callback, if configured and has a valid value
3402
3401
  if (config$1.action && parts.length > 1) {
3403
3402
  config$1.action(parts[1]);
@@ -3419,7 +3418,7 @@ function handler(error) {
3419
3418
  if (!(e.message in history$3)) {
3420
3419
  history$3[e.message] = 0;
3421
3420
  }
3422
- if (history$3[e.message]++ >= 5 /* Setting.ScriptErrorLimit */) {
3421
+ if (history$3[e.message]++ >= 5 /* ScriptErrorLimit */) {
3423
3422
  return true;
3424
3423
  }
3425
3424
  // Send back information only if the handled error has valid information
@@ -3431,7 +3430,7 @@ function handler(error) {
3431
3430
  stack: e.stack,
3432
3431
  source: error["filename"]
3433
3432
  };
3434
- encode$2(31 /* Event.ScriptError */);
3433
+ encode$2(31 /* ScriptError */);
3435
3434
  }
3436
3435
  return true;
3437
3436
  }
@@ -3442,7 +3441,7 @@ function encode$2 (type) {
3442
3441
  return __generator(this, function (_a) {
3443
3442
  tokens = [time(), type];
3444
3443
  switch (type) {
3445
- case 31 /* Event.ScriptError */:
3444
+ case 31 /* ScriptError */:
3446
3445
  tokens.push(data$7.message);
3447
3446
  tokens.push(data$7.line);
3448
3447
  tokens.push(data$7.column);
@@ -3450,7 +3449,7 @@ function encode$2 (type) {
3450
3449
  tokens.push(data$7.source);
3451
3450
  queue(tokens);
3452
3451
  break;
3453
- case 33 /* Event.Log */:
3452
+ case 33 /* Log */:
3454
3453
  if (data$6) {
3455
3454
  tokens.push(data$6.code);
3456
3455
  tokens.push(data$6.name);
@@ -3460,7 +3459,7 @@ function encode$2 (type) {
3460
3459
  queue(tokens, false);
3461
3460
  }
3462
3461
  break;
3463
- case 41 /* Event.Fraud */:
3462
+ case 41 /* Fraud */:
3464
3463
  if (data$d) {
3465
3464
  tokens.push(data$d.id);
3466
3465
  tokens.push(data$d.target);
@@ -3483,7 +3482,7 @@ function log$1(code, severity, name, message, stack) {
3483
3482
  if (name === void 0) { name = null; }
3484
3483
  if (message === void 0) { message = null; }
3485
3484
  if (stack === void 0) { stack = null; }
3486
- var key = name ? "".concat(name, "|").concat(message) : "";
3485
+ var key = name ? name + "|" + message : "";
3487
3486
  // While rare, it's possible for code to fail repeatedly during the lifetime of the same page
3488
3487
  // In those cases, we only want to log the failure once and not spam logs with redundant information.
3489
3488
  if (code in history$2 && history$2[code].indexOf(key) >= 0) {
@@ -3497,7 +3496,7 @@ function log$1(code, severity, name, message, stack) {
3497
3496
  else {
3498
3497
  history$2[code] = [key];
3499
3498
  }
3500
- encode$2(33 /* Event.Log */);
3499
+ encode$2(33 /* Log */);
3501
3500
  }
3502
3501
  function stop$c() {
3503
3502
  history$2 = {};
@@ -3518,25 +3517,25 @@ function start$c() {
3518
3517
  var source = e[i];
3519
3518
  var key = e[i + 1];
3520
3519
  switch (source) {
3521
- case 0 /* ExtractSource.Javascript */:
3520
+ case 0 /* Javascript */:
3522
3521
  var variable = e[i + 2];
3523
3522
  variables[key] = parse(variable);
3524
3523
  break;
3525
- case 1 /* ExtractSource.Cookie */:
3524
+ case 1 /* Cookie */:
3526
3525
  /*Todo: Add cookie extract logic*/
3527
3526
  break;
3528
- case 2 /* ExtractSource.Text */:
3527
+ case 2 /* Text */:
3529
3528
  var match_1 = e[i + 2];
3530
3529
  selectors[key] = match_1;
3531
3530
  break;
3532
- case 3 /* ExtractSource.Fragment */:
3531
+ case 3 /* Fragment */:
3533
3532
  fragments = e[i + 2];
3534
3533
  break;
3535
3534
  }
3536
3535
  }
3537
3536
  }
3538
3537
  catch (e) {
3539
- log$1(8 /* Code.Config */, 1 /* Severity.Warning */, e ? e.name : null);
3538
+ log$1(8 /* Config */, 1 /* Warning */, e ? e.name : null);
3540
3539
  }
3541
3540
  }
3542
3541
  function clone(v) {
@@ -3558,9 +3557,9 @@ function compute$4() {
3558
3557
  }
3559
3558
  }
3560
3559
  catch (e) {
3561
- log$1(5 /* Code.Selector */, 1 /* Severity.Warning */, e ? e.name : null);
3560
+ log$1(5 /* Selector */, 1 /* Warning */, e ? e.name : null);
3562
3561
  }
3563
- encode$1(40 /* Event.Extract */);
3562
+ encode$1(40 /* Extract */);
3564
3563
  }
3565
3564
  function reset$4() {
3566
3565
  keys = [];
@@ -3580,15 +3579,15 @@ function stop$b() {
3580
3579
  }
3581
3580
  function parse(variable) {
3582
3581
  var syntax = [];
3583
- var parts = variable.split("." /* Constant.Dot */);
3582
+ var parts = variable.split("." /* Dot */);
3584
3583
  while (parts.length > 0) {
3585
3584
  var part = parts.shift();
3586
- var arrayStart = part.indexOf("[" /* Constant.ArrayStart */);
3587
- var conditionStart = part.indexOf("{" /* Constant.ConditionStart */);
3588
- var conditionEnd = part.indexOf("}" /* Constant.ConditionEnd */);
3585
+ var arrayStart = part.indexOf("[" /* ArrayStart */);
3586
+ var conditionStart = part.indexOf("{" /* ConditionStart */);
3587
+ var conditionEnd = part.indexOf("}" /* ConditionEnd */);
3589
3588
  syntax.push({
3590
3589
  name: arrayStart > 0 ? part.substring(0, arrayStart) : (conditionStart > 0 ? part.substring(0, conditionStart) : part),
3591
- type: arrayStart > 0 ? 1 /* Type.Array */ : (conditionStart > 0 ? 2 /* Type.Object */ : 3 /* Type.Simple */),
3590
+ type: arrayStart > 0 ? 1 /* Array */ : (conditionStart > 0 ? 2 /* Object */ : 3 /* Simple */),
3592
3591
  condition: conditionStart > 0 ? part.substring(conditionStart + 1, conditionEnd) : null
3593
3592
  });
3594
3593
  }
@@ -3606,7 +3605,7 @@ function evaluate(variable, base) {
3606
3605
  var output;
3607
3606
  if (base && base[part.name]) {
3608
3607
  var obj = base[part.name];
3609
- if (part.type !== 1 /* Type.Array */ && match(obj, part.condition)) {
3608
+ if (part.type !== 1 /* Array */ && match(obj, part.condition)) {
3610
3609
  output = evaluate(variable, obj);
3611
3610
  }
3612
3611
  else if (Array.isArray(obj)) {
@@ -3628,7 +3627,7 @@ function evaluate(variable, base) {
3628
3627
  }
3629
3628
  function str(input) {
3630
3629
  // Automatically trim string to max of Setting.ExtractLimit to avoid fetching long strings
3631
- return input ? JSON.stringify(input).substring(0, 10000 /* Setting.ExtractLimit */) : input;
3630
+ return input ? JSON.stringify(input).substring(0, 10000 /* ExtractLimit */) : input;
3632
3631
  }
3633
3632
  function match(base, condition) {
3634
3633
  if (condition) {
@@ -3642,7 +3641,7 @@ function encode$1 (event) {
3642
3641
  var t = time();
3643
3642
  var tokens = [t, event];
3644
3643
  switch (event) {
3645
- case 4 /* Event.Baseline */:
3644
+ case 4 /* Baseline */:
3646
3645
  var b = state$9;
3647
3646
  if (b) {
3648
3647
  tokens = [b.time, b.event];
@@ -3660,30 +3659,30 @@ function encode$1 (event) {
3660
3659
  }
3661
3660
  reset$p();
3662
3661
  break;
3663
- case 25 /* Event.Ping */:
3662
+ case 25 /* Ping */:
3664
3663
  tokens.push(data$h.gap);
3665
3664
  queue(tokens);
3666
3665
  break;
3667
- case 35 /* Event.Limit */:
3666
+ case 35 /* Limit */:
3668
3667
  tokens.push(data$4.check);
3669
3668
  queue(tokens, false);
3670
3669
  break;
3671
- case 3 /* Event.Upgrade */:
3670
+ case 3 /* Upgrade */:
3672
3671
  tokens.push(data$f.key);
3673
3672
  queue(tokens);
3674
3673
  break;
3675
- case 2 /* Event.Upload */:
3674
+ case 2 /* Upload */:
3676
3675
  tokens.push(track$1.sequence);
3677
3676
  tokens.push(track$1.attempts);
3678
3677
  tokens.push(track$1.status);
3679
3678
  queue(tokens, false);
3680
3679
  break;
3681
- case 24 /* Event.Custom */:
3680
+ case 24 /* Custom */:
3682
3681
  tokens.push(data$j.key);
3683
3682
  tokens.push(data$j.value);
3684
3683
  queue(tokens);
3685
3684
  break;
3686
- case 34 /* Event.Variable */:
3685
+ case 34 /* Variable */:
3687
3686
  var variableKeys = Object.keys(data$e);
3688
3687
  if (variableKeys.length > 0) {
3689
3688
  for (var _i = 0, variableKeys_1 = variableKeys; _i < variableKeys_1.length; _i++) {
@@ -3695,7 +3694,7 @@ function encode$1 (event) {
3695
3694
  queue(tokens, false);
3696
3695
  }
3697
3696
  break;
3698
- case 0 /* Event.Metric */:
3697
+ case 0 /* Metric */:
3699
3698
  var metricKeys = Object.keys(updates$3);
3700
3699
  if (metricKeys.length > 0) {
3701
3700
  for (var _a = 0, metricKeys_1 = metricKeys; _a < metricKeys_1.length; _a++) {
@@ -3710,7 +3709,7 @@ function encode$1 (event) {
3710
3709
  queue(tokens, false);
3711
3710
  }
3712
3711
  break;
3713
- case 1 /* Event.Dimension */:
3712
+ case 1 /* Dimension */:
3714
3713
  var dimensionKeys = Object.keys(updates);
3715
3714
  if (dimensionKeys.length > 0) {
3716
3715
  for (var _b = 0, dimensionKeys_1 = dimensionKeys; _b < dimensionKeys_1.length; _b++) {
@@ -3723,7 +3722,7 @@ function encode$1 (event) {
3723
3722
  queue(tokens, false);
3724
3723
  }
3725
3724
  break;
3726
- case 36 /* Event.Summary */:
3725
+ case 36 /* Summary */:
3727
3726
  var eventKeys = Object.keys(data$g);
3728
3727
  if (eventKeys.length > 0) {
3729
3728
  for (var _c = 0, eventKeys_1 = eventKeys; _c < eventKeys_1.length; _c++) {
@@ -3736,7 +3735,7 @@ function encode$1 (event) {
3736
3735
  queue(tokens, false);
3737
3736
  }
3738
3737
  break;
3739
- case 40 /* Event.Extract */:
3738
+ case 40 /* Extract */:
3740
3739
  var extractKeys = keys;
3741
3740
  for (var _d = 0, extractKeys_1 = extractKeys; _d < extractKeys_1.length; _d++) {
3742
3741
  var e = extractKeys_1[_d];
@@ -3750,14 +3749,14 @@ function encode$1 (event) {
3750
3749
 
3751
3750
  var data$4;
3752
3751
  function start$b() {
3753
- data$4 = { check: 0 /* Check.None */ };
3752
+ data$4 = { check: 0 /* None */ };
3754
3753
  }
3755
3754
  function check$2(bytes) {
3756
- if (data$4.check === 0 /* Check.None */) {
3755
+ if (data$4.check === 0 /* None */) {
3757
3756
  var reason = data$4.check;
3758
- reason = data$1.sequence >= 128 /* Setting.PayloadLimit */ ? 1 /* Check.Payload */ : reason;
3759
- reason = time() > 7200000 /* Setting.ShutdownLimit */ ? 2 /* Check.Shutdown */ : reason;
3760
- reason = bytes > 10485760 /* Setting.PlaybackBytesLimit */ ? 2 /* Check.Shutdown */ : reason;
3757
+ reason = data$1.sequence >= 128 /* PayloadLimit */ ? 1 /* Payload */ : reason;
3758
+ reason = time() > 7200000 /* ShutdownLimit */ ? 2 /* Shutdown */ : reason;
3759
+ reason = bytes > 10485760 /* PlaybackBytesLimit */ ? 2 /* Shutdown */ : reason;
3761
3760
  if (reason !== data$4.check) {
3762
3761
  trigger(reason);
3763
3762
  }
@@ -3769,8 +3768,8 @@ function trigger(reason) {
3769
3768
  stop();
3770
3769
  }
3771
3770
  function compute$3() {
3772
- if (data$4.check !== 0 /* Check.None */) {
3773
- encode$1(35 /* Event.Limit */);
3771
+ if (data$4.check !== 0 /* None */) {
3772
+ encode$1(35 /* Limit */);
3774
3773
  }
3775
3774
  }
3776
3775
  function stop$a() {
@@ -3791,7 +3790,7 @@ function log(dimension, value) {
3791
3790
  // Check valid value before moving ahead
3792
3791
  if (value) {
3793
3792
  // Ensure received value is casted into a string if it wasn't a string to begin with
3794
- value = "".concat(value);
3793
+ value = "" + value;
3795
3794
  if (!(dimension in data$3)) {
3796
3795
  data$3[dimension] = [];
3797
3796
  }
@@ -3804,14 +3803,14 @@ function log(dimension, value) {
3804
3803
  }
3805
3804
  updates[dimension].push(value);
3806
3805
  // Limit check to ensure we have a cap on number of dimensions we can collect
3807
- if (data$3[dimension].length > 128 /* Setting.CollectionLimit */) {
3808
- trigger(5 /* Check.Collection */);
3806
+ if (data$3[dimension].length > 128 /* CollectionLimit */) {
3807
+ trigger(5 /* Collection */);
3809
3808
  }
3810
3809
  }
3811
3810
  }
3812
3811
  }
3813
3812
  function compute$2() {
3814
- encode$1(1 /* Event.Dimension */);
3813
+ encode$1(1 /* Dimension */);
3815
3814
  }
3816
3815
  function reset$3() {
3817
3816
  updates = {};
@@ -3822,8 +3821,8 @@ var callbacks = [];
3822
3821
  var rootDomain = null;
3823
3822
  function start$9() {
3824
3823
  rootDomain = null;
3825
- var ua = navigator && "userAgent" in navigator ? navigator.userAgent : "" /* Constant.Empty */;
3826
- var title = document && document.title ? document.title : "" /* Constant.Empty */;
3824
+ var ua = navigator && "userAgent" in navigator ? navigator.userAgent : "" /* Empty */;
3825
+ var title = document && document.title ? document.title : "" /* Empty */;
3827
3826
  // Populate ids for this page
3828
3827
  var s = session();
3829
3828
  var u = user();
@@ -3834,27 +3833,27 @@ function start$9() {
3834
3833
  pageNum: s.count
3835
3834
  };
3836
3835
  // Override configuration based on what's in the session storage, unless it is blank (e.g. using upload callback, like in devtools)
3837
- config$1.lean = config$1.track && s.upgrade !== null ? s.upgrade === 0 /* BooleanFlag.False */ : config$1.lean;
3838
- config$1.upload = config$1.track && typeof config$1.upload === "string" /* Constant.String */ && s.upload && s.upload.length > "https://" /* Constant.HTTPS */.length ? s.upload : config$1.upload;
3836
+ config$1.lean = config$1.track && s.upgrade !== null ? s.upgrade === 0 /* False */ : config$1.lean;
3837
+ config$1.upload = config$1.track && typeof config$1.upload === "string" /* String */ && s.upload && s.upload.length > "https://" /* HTTPS */.length ? s.upload : config$1.upload;
3839
3838
  // Log dimensions
3840
- log(0 /* Dimension.UserAgent */, ua);
3841
- log(3 /* Dimension.PageTitle */, title);
3842
- log(1 /* Dimension.Url */, location.href);
3843
- log(2 /* Dimension.Referrer */, document.referrer);
3844
- log(15 /* Dimension.TabId */, tab());
3845
- log(16 /* Dimension.PageLanguage */, document.documentElement.lang);
3846
- log(17 /* Dimension.DocumentDirection */, document.dir);
3839
+ log(0 /* UserAgent */, ua);
3840
+ log(3 /* PageTitle */, title);
3841
+ log(1 /* Url */, location.href);
3842
+ log(2 /* Referrer */, document.referrer);
3843
+ log(15 /* TabId */, tab());
3844
+ log(16 /* PageLanguage */, document.documentElement.lang);
3845
+ log(17 /* DocumentDirection */, document.dir);
3847
3846
  if (navigator) {
3848
- log(9 /* Dimension.Language */, navigator.userLanguage || navigator.language);
3847
+ log(9 /* Language */, navigator.userLanguage || navigator.language);
3849
3848
  userAgentData();
3850
3849
  }
3851
3850
  // Metrics
3852
- max(0 /* Metric.ClientTimestamp */, s.ts);
3853
- max(1 /* Metric.Playback */, 0 /* BooleanFlag.False */);
3851
+ max(0 /* ClientTimestamp */, s.ts);
3852
+ max(1 /* Playback */, 0 /* False */);
3854
3853
  if (screen) {
3855
- max(14 /* Metric.ScreenWidth */, Math.round(screen.width));
3856
- max(15 /* Metric.ScreenHeight */, Math.round(screen.height));
3857
- max(16 /* Metric.ColorDepth */, Math.round(screen.colorDepth));
3854
+ max(14 /* ScreenWidth */, Math.round(screen.width));
3855
+ max(15 /* ScreenHeight */, Math.round(screen.height));
3856
+ max(16 /* ColorDepth */, Math.round(screen.colorDepth));
3858
3857
  }
3859
3858
  // Read cookies specified in configuration
3860
3859
  for (var _i = 0, _a = config$1.cookies; _i < _a.length; _i++) {
@@ -3875,13 +3874,13 @@ function userAgentData() {
3875
3874
  "uaFullVersion"])
3876
3875
  .then(function (ua) {
3877
3876
  var _a;
3878
- log(22 /* Dimension.Platform */, ua.platform);
3879
- log(23 /* Dimension.PlatformVersion */, ua.platformVersion);
3877
+ log(22 /* Platform */, ua.platform);
3878
+ log(23 /* PlatformVersion */, ua.platformVersion);
3880
3879
  (_a = ua.brands) === null || _a === void 0 ? void 0 : _a.forEach(function (brand) {
3881
- log(24 /* Dimension.Brand */, brand.name + "~" /* Constant.Tilde */ + brand.version);
3880
+ log(24 /* Brand */, brand.name + "~" /* Tilde */ + brand.version);
3882
3881
  });
3883
- log(25 /* Dimension.Model */, ua.model);
3884
- max(27 /* Metric.Mobile */, ua.mobile ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */);
3882
+ log(25 /* Model */, ua.model);
3883
+ max(27 /* Mobile */, ua.mobile ? 1 /* True */ : 0 /* False */);
3885
3884
  });
3886
3885
  }
3887
3886
  }
@@ -3898,33 +3897,33 @@ function metadata(cb, wait) {
3898
3897
  callbacks.push({ callback: cb, wait: wait });
3899
3898
  }
3900
3899
  function id() {
3901
- return data$2 ? [data$2.userId, data$2.sessionId, data$2.pageNum].join("." /* Constant.Dot */) : "" /* Constant.Empty */;
3900
+ return data$2 ? [data$2.userId, data$2.sessionId, data$2.pageNum].join("." /* Dot */) : "" /* Empty */;
3902
3901
  }
3903
3902
  function consent() {
3904
3903
  if (active()) {
3905
3904
  config$1.track = true;
3906
- track(user(), 1 /* BooleanFlag.True */);
3905
+ track(user(), 1 /* True */);
3907
3906
  }
3908
3907
  }
3909
3908
  function clear() {
3910
3909
  // Clear any stored information in the cookie that tracks session information so we can restart fresh the next time
3911
- setCookie("_clsk" /* Constant.SessionKey */, "" /* Constant.Empty */, 0);
3910
+ setCookie("_clsk" /* SessionKey */, "" /* Empty */, 0);
3912
3911
  }
3913
3912
  function tab() {
3914
3913
  var id = shortid();
3915
- if (config$1.track && supported(window, "sessionStorage" /* Constant.SessionStorage */)) {
3916
- var value = sessionStorage.getItem("_cltk" /* Constant.TabKey */);
3914
+ if (config$1.track && supported(window, "sessionStorage" /* SessionStorage */)) {
3915
+ var value = sessionStorage.getItem("_cltk" /* TabKey */);
3917
3916
  id = value ? value : id;
3918
- sessionStorage.setItem("_cltk" /* Constant.TabKey */, id);
3917
+ sessionStorage.setItem("_cltk" /* TabKey */, id);
3919
3918
  }
3920
3919
  return id;
3921
3920
  }
3922
3921
  function save() {
3923
3922
  var ts = Math.round(Date.now());
3924
- var upload = config$1.upload && typeof config$1.upload === "string" /* Constant.String */ ? config$1.upload.replace("https://" /* Constant.HTTPS */, "" /* Constant.Empty */) : "" /* Constant.Empty */;
3925
- var upgrade = config$1.lean ? 0 /* BooleanFlag.False */ : 1 /* BooleanFlag.True */;
3923
+ var upload = config$1.upload && typeof config$1.upload === "string" /* String */ ? config$1.upload.replace("https://" /* HTTPS */, "" /* Empty */) : "" /* Empty */;
3924
+ var upgrade = config$1.lean ? 0 /* False */ : 1 /* True */;
3926
3925
  processCallback(upgrade);
3927
- setCookie("_clsk" /* Constant.SessionKey */, [data$2.sessionId, ts, data$2.pageNum, upgrade, upload].join("|" /* Constant.Pipe */), 1 /* Setting.SessionExpire */);
3926
+ setCookie("_clsk" /* SessionKey */, [data$2.sessionId, ts, data$2.pageNum, upgrade, upload].join("|" /* Pipe */), 1 /* SessionExpire */);
3928
3927
  }
3929
3928
  function processCallback(upgrade) {
3930
3929
  if (callbacks.length > 0) {
@@ -3949,10 +3948,10 @@ function track(u, consent) {
3949
3948
  consent = consent === null ? u.consent : consent;
3950
3949
  // Convert time precision into days to reduce number of bytes we have to write in a cookie
3951
3950
  // E.g. Math.ceil(1628735962643 / (24*60*60*1000)) => 18852 (days) => ejo in base36 (13 bytes => 3 bytes)
3952
- var end = Math.ceil((Date.now() + (365 /* Setting.Expire */ * 86400000 /* Time.Day */)) / 86400000 /* Time.Day */);
3951
+ var end = Math.ceil((Date.now() + (365 /* Expire */ * 86400000 /* Day */)) / 86400000 /* Day */);
3953
3952
  // To avoid cookie churn, write user id cookie only once every day
3954
- if (u.expiry === null || Math.abs(end - u.expiry) >= 1 /* Setting.CookieInterval */ || u.consent !== consent) {
3955
- setCookie("_clck" /* Constant.CookieKey */, [data$2.userId, 1 /* Setting.CookieVersion */, end.toString(36), consent].join("|" /* Constant.Pipe */), 365 /* Setting.Expire */);
3953
+ if (u.expiry === null || Math.abs(end - u.expiry) >= 1 /* CookieInterval */ || u.consent !== consent) {
3954
+ setCookie("_clck" /* CookieKey */, [data$2.userId, 1 /* CookieVersion */, end.toString(36), consent].join("|" /* Pipe */), 365 /* Expire */);
3956
3955
  }
3957
3956
  }
3958
3957
  function shortid() {
@@ -3963,17 +3962,17 @@ function shortid() {
3963
3962
  return id.toString(36);
3964
3963
  }
3965
3964
  function session() {
3966
- var output = { session: shortid(), ts: Math.round(Date.now()), count: 1, upgrade: null, upload: "" /* Constant.Empty */ };
3967
- var value = getCookie("_clsk" /* Constant.SessionKey */);
3965
+ var output = { session: shortid(), ts: Math.round(Date.now()), count: 1, upgrade: null, upload: "" /* Empty */ };
3966
+ var value = getCookie("_clsk" /* SessionKey */);
3968
3967
  if (value) {
3969
- var parts = value.split("|" /* Constant.Pipe */);
3968
+ var parts = value.split("|" /* Pipe */);
3970
3969
  // Making it backward & forward compatible by using greater than comparison (v0.6.21)
3971
3970
  // In future version, we can reduce the parts length to be 5 where the last part contains the full upload URL
3972
- if (parts.length >= 5 && output.ts - num(parts[1]) < 1800000 /* Setting.SessionTimeout */) {
3971
+ if (parts.length >= 5 && output.ts - num(parts[1]) < 1800000 /* SessionTimeout */) {
3973
3972
  output.session = parts[0];
3974
3973
  output.count = num(parts[2]) + 1;
3975
3974
  output.upgrade = num(parts[3]);
3976
- output.upload = parts.length >= 6 ? "".concat("https://" /* Constant.HTTPS */).concat(parts[5], "/").concat(parts[4]) : "".concat("https://" /* Constant.HTTPS */).concat(parts[4]);
3975
+ output.upload = parts.length >= 6 ? "" + "https://" /* HTTPS */ + parts[5] + "/" + parts[4] : "" + "https://" /* HTTPS */ + parts[4];
3977
3976
  }
3978
3977
  }
3979
3978
  return output;
@@ -3983,26 +3982,26 @@ function num(string, base) {
3983
3982
  return parseInt(string, base);
3984
3983
  }
3985
3984
  function user() {
3986
- var output = { id: shortid(), expiry: null, consent: 0 /* BooleanFlag.False */ };
3987
- var cookie = getCookie("_clck" /* Constant.CookieKey */);
3985
+ var output = { id: shortid(), expiry: null, consent: 0 /* False */ };
3986
+ var cookie = getCookie("_clck" /* CookieKey */);
3988
3987
  if (cookie && cookie.length > 0) {
3989
3988
  // Splitting and looking up first part for forward compatibility, in case we wish to store additional information in a cookie
3990
- var parts = cookie.split("|" /* Constant.Pipe */);
3989
+ var parts = cookie.split("|" /* Pipe */);
3991
3990
  // For backward compatibility introduced in v0.6.18; following code can be removed with future iterations
3992
3991
  // Count number of times Clarity's user cookie crumb appears in document.cookie (could be on different sub-domains e.g. www.domain.com and .domain.com)
3993
3992
  var count = 0;
3994
- for (var _i = 0, _a = document.cookie.split(";" /* Constant.Semicolon */); _i < _a.length; _i++) {
3993
+ for (var _i = 0, _a = document.cookie.split(";" /* Semicolon */); _i < _a.length; _i++) {
3995
3994
  var c = _a[_i];
3996
- count += c.split("=" /* Constant.Equals */)[0].trim() === "_clck" /* Constant.CookieKey */ ? 1 : 0;
3995
+ count += c.split("=" /* Equals */)[0].trim() === "_clck" /* CookieKey */ ? 1 : 0;
3997
3996
  }
3998
3997
  // Check if we either got version-less cookie value or saw multiple copies of the user cookie crumbs
3999
3998
  // In both these cases, we go ahead and delete the existing cookie set on current domain
4000
3999
  if (parts.length === 1 || count > 1) {
4001
- var deleted = "".concat(";" /* Constant.Semicolon */).concat("expires=" /* Constant.Expires */).concat((new Date(0)).toUTCString()).concat(";path=/" /* Constant.Path */);
4000
+ var deleted = "" + ";" /* Semicolon */ + "expires=" /* Expires */ + (new Date(0)).toUTCString() + ";path=/" /* Path */;
4002
4001
  // First, delete current user cookie which might be set on current sub-domain vs. root domain
4003
- document.cookie = "".concat("_clck" /* Constant.CookieKey */, "=").concat(deleted);
4002
+ document.cookie = "_clck" /* CookieKey */ + "=" + deleted;
4004
4003
  // Second, same thing for current session cookie so it can be re-written later with the root domain
4005
- document.cookie = "".concat("_clsk" /* Constant.SessionKey */, "=").concat(deleted);
4004
+ document.cookie = "_clsk" /* SessionKey */ + "=" + deleted;
4006
4005
  }
4007
4006
  // End code for backward compatibility
4008
4007
  // Read version information and timestamp from cookie, if available
@@ -4011,21 +4010,21 @@ function user() {
4011
4010
  }
4012
4011
  // Check if we have explicit consent to track this user
4013
4012
  if (parts.length > 3 && num(parts[3]) === 1) {
4014
- output.consent = 1 /* BooleanFlag.True */;
4013
+ output.consent = 1 /* True */;
4015
4014
  }
4016
4015
  // Set track configuration to true for this user if we have explicit consent, regardless of project setting
4017
- config$1.track = config$1.track || output.consent === 1 /* BooleanFlag.True */;
4016
+ config$1.track = config$1.track || output.consent === 1 /* True */;
4018
4017
  // Get user id from cookie only if we tracking is enabled, otherwise fallback to a random id
4019
4018
  output.id = config$1.track ? parts[0] : output.id;
4020
4019
  }
4021
4020
  return output;
4022
4021
  }
4023
4022
  function getCookie(key) {
4024
- if (supported(document, "cookie" /* Constant.Cookie */)) {
4025
- var cookies = document.cookie.split(";" /* Constant.Semicolon */);
4023
+ if (supported(document, "cookie" /* Cookie */)) {
4024
+ var cookies = document.cookie.split(";" /* Semicolon */);
4026
4025
  if (cookies) {
4027
4026
  for (var i = 0; i < cookies.length; i++) {
4028
- var pair = cookies[i].split("=" /* Constant.Equals */);
4027
+ var pair = cookies[i].split("=" /* Equals */);
4029
4028
  if (pair.length > 1 && pair[0] && pair[0].trim() === key) {
4030
4029
  return pair[1];
4031
4030
  }
@@ -4035,23 +4034,23 @@ function getCookie(key) {
4035
4034
  return null;
4036
4035
  }
4037
4036
  function setCookie(key, value, time) {
4038
- if (config$1.track && ((navigator && navigator.cookieEnabled) || supported(document, "cookie" /* Constant.Cookie */))) {
4037
+ if (config$1.track && ((navigator && navigator.cookieEnabled) || supported(document, "cookie" /* Cookie */))) {
4039
4038
  var expiry = new Date();
4040
4039
  expiry.setDate(expiry.getDate() + time);
4041
- var expires = expiry ? "expires=" /* Constant.Expires */ + expiry.toUTCString() : "" /* Constant.Empty */;
4042
- var cookie = "".concat(key, "=").concat(value).concat(";" /* Constant.Semicolon */).concat(expires).concat(";path=/" /* Constant.Path */);
4040
+ var expires = expiry ? "expires=" /* Expires */ + expiry.toUTCString() : "" /* Empty */;
4041
+ var cookie = key + "=" + value + ";" /* Semicolon */ + expires + ";path=/" /* Path */;
4043
4042
  try {
4044
4043
  // Attempt to get the root domain only once and fall back to writing cookie on the current domain.
4045
4044
  if (rootDomain === null) {
4046
- var hostname = location.hostname ? location.hostname.split("." /* Constant.Dot */) : [];
4045
+ var hostname = location.hostname ? location.hostname.split("." /* Dot */) : [];
4047
4046
  // Walk backwards on a domain and attempt to set a cookie, until successful
4048
4047
  for (var i = hostname.length - 1; i >= 0; i--) {
4049
- rootDomain = ".".concat(hostname[i]).concat(rootDomain ? rootDomain : "" /* Constant.Empty */);
4048
+ rootDomain = "." + hostname[i] + (rootDomain ? rootDomain : "" /* Empty */);
4050
4049
  // We do not wish to attempt writing a cookie on the absolute last part of the domain, e.g. .com or .net.
4051
4050
  // So we start attempting after second-last part, e.g. .domain.com (PASS) or .co.uk (FAIL)
4052
4051
  if (i < hostname.length - 1) {
4053
4052
  // Write the cookie on the current computed top level domain
4054
- document.cookie = "".concat(cookie).concat(";" /* Constant.Semicolon */).concat("domain=" /* Constant.Domain */).concat(rootDomain);
4053
+ document.cookie = "" + cookie + ";" /* Semicolon */ + "domain=" /* Domain */ + rootDomain;
4055
4054
  // Once written, check if the cookie exists and its value matches exactly with what we intended to set
4056
4055
  // Checking for exact value match helps us eliminate a corner case where the cookie may already be present with a different value
4057
4056
  // If the check is successful, no more action is required and we can return from the function since rootDomain cookie is already set
@@ -4063,13 +4062,13 @@ function setCookie(key, value, time) {
4063
4062
  }
4064
4063
  // Finally, if we were not successful and gone through all the options, play it safe and reset rootDomain to be empty
4065
4064
  // This forces our code to fall back to always writing cookie to the current domain
4066
- rootDomain = "" /* Constant.Empty */;
4065
+ rootDomain = "" /* Empty */;
4067
4066
  }
4068
4067
  }
4069
4068
  catch (_a) {
4070
- rootDomain = "" /* Constant.Empty */;
4069
+ rootDomain = "" /* Empty */;
4071
4070
  }
4072
- document.cookie = rootDomain ? "".concat(cookie).concat(";" /* Constant.Semicolon */).concat("domain=" /* Constant.Domain */).concat(rootDomain) : cookie;
4071
+ document.cookie = rootDomain ? "" + cookie + ";" /* Semicolon */ + "domain=" /* Domain */ + rootDomain : cookie;
4073
4072
  }
4074
4073
  }
4075
4074
 
@@ -4085,8 +4084,8 @@ function start$8() {
4085
4084
  userId: m.userId,
4086
4085
  sessionId: m.sessionId,
4087
4086
  pageNum: m.pageNum,
4088
- upload: 0 /* Upload.Async */,
4089
- end: 0 /* BooleanFlag.False */
4087
+ upload: 0 /* Async */,
4088
+ end: 0 /* False */
4090
4089
  };
4091
4090
  }
4092
4091
  function stop$7() {
@@ -4096,8 +4095,8 @@ function envelope(last) {
4096
4095
  data$1.start = data$1.start + data$1.duration;
4097
4096
  data$1.duration = time() - data$1.start;
4098
4097
  data$1.sequence++;
4099
- data$1.upload = last && "sendBeacon" in navigator ? 1 /* Upload.Beacon */ : 0 /* Upload.Async */;
4100
- data$1.end = last ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */;
4098
+ data$1.upload = last && "sendBeacon" in navigator ? 1 /* Beacon */ : 0 /* Async */;
4099
+ data$1.end = last ? 1 /* True */ : 0 /* False */;
4101
4100
  return [
4102
4101
  data$1.version,
4103
4102
  data$1.sequence,
@@ -4150,10 +4149,10 @@ function measure (method) {
4150
4149
  throw report(ex);
4151
4150
  }
4152
4151
  var duration = performance.now() - start;
4153
- sum(4 /* Metric.TotalCost */, duration);
4154
- if (duration > 30 /* Setting.LongTask */) {
4155
- count$1(7 /* Metric.LongTaskCount */);
4156
- max(6 /* Metric.ThreadBlockedTime */, duration);
4152
+ sum(4 /* TotalCost */, duration);
4153
+ if (duration > 30 /* LongTask */) {
4154
+ count$1(7 /* LongTaskCount */);
4155
+ max(6 /* ThreadBlockedTime */, duration);
4157
4156
  }
4158
4157
  };
4159
4158
  }
@@ -4165,7 +4164,7 @@ function bind(target, event, listener, capture) {
4165
4164
  // Wrapping following lines inside try / catch to cover edge cases where we might try to access an inaccessible element.
4166
4165
  // E.g. Iframe may start off as same-origin but later turn into cross-origin, and the following lines will throw an exception.
4167
4166
  try {
4168
- target[api("addEventListener" /* Constant.AddEventListener */)](event, listener, capture);
4167
+ target[api("addEventListener" /* AddEventListener */)](event, listener, capture);
4169
4168
  bindings.push({ event: event, target: target, listener: listener, capture: capture });
4170
4169
  }
4171
4170
  catch ( /* do nothing */_a) { /* do nothing */ }
@@ -4176,7 +4175,7 @@ function reset$1() {
4176
4175
  var binding = bindings_1[_i];
4177
4176
  // Wrapping inside try / catch to avoid situations where the element may be destroyed before we get a chance to unbind
4178
4177
  try {
4179
- binding.target[api("removeEventListener" /* Constant.RemoveEventListener */)](binding.event, binding.listener, binding.capture);
4178
+ binding.target[api("removeEventListener" /* RemoveEventListener */)](binding.event, binding.listener, binding.capture);
4180
4179
  }
4181
4180
  catch ( /* do nothing */_a) { /* do nothing */ }
4182
4181
  }
@@ -4213,8 +4212,8 @@ function start$7() {
4213
4212
  }
4214
4213
  }
4215
4214
  function check$1() {
4216
- if (count++ > 20 /* Setting.CallStackDepth */) {
4217
- log$1(4 /* Code.CallStackDepth */, 0 /* Severity.Info */);
4215
+ if (count++ > 20 /* CallStackDepth */) {
4216
+ log$1(4 /* CallStackDepth */, 0 /* Info */);
4218
4217
  return false;
4219
4218
  }
4220
4219
  return true;
@@ -4224,15 +4223,15 @@ function compute$1() {
4224
4223
  if (url !== getCurrentUrl()) {
4225
4224
  // If the url changed, start tracking it as a new page
4226
4225
  stop();
4227
- window.setTimeout(restart$1, 250 /* Setting.RestartDelay */);
4226
+ window.setTimeout(restart$1, 250 /* RestartDelay */);
4228
4227
  }
4229
4228
  }
4230
4229
  function restart$1() {
4231
4230
  start();
4232
- max(29 /* Metric.SinglePage */, 1 /* BooleanFlag.True */);
4231
+ max(29 /* SinglePage */, 1 /* True */);
4233
4232
  }
4234
4233
  function getCurrentUrl() {
4235
- return location.href ? location.href.replace(location.hash, "" /* Constant.Empty */) : location.href;
4234
+ return location.href ? location.href.replace(location.hash, "" /* Empty */) : location.href;
4236
4235
  }
4237
4236
  function stop$6() {
4238
4237
  url = null;
@@ -4295,7 +4294,7 @@ function config(override) {
4295
4294
  // not holding the session during inactive time periods.
4296
4295
  function suspend() {
4297
4296
  if (status) {
4298
- event("clarity" /* Constant.Clarity */, "suspend" /* Constant.Suspend */);
4297
+ event("clarity" /* Clarity */, "suspend" /* Suspend */);
4299
4298
  stop();
4300
4299
  ["mousemove", "touchstart"].forEach(function (x) { return bind(document, x, restart); });
4301
4300
  ["resize", "scroll", "pageshow"].forEach(function (x) { return bind(window, x, restart); });
@@ -4303,7 +4302,7 @@ function suspend() {
4303
4302
  }
4304
4303
  function restart() {
4305
4304
  start();
4306
- event("clarity" /* Constant.Clarity */, "restart" /* Constant.Restart */);
4305
+ event("clarity" /* Clarity */, "restart" /* Restart */);
4307
4306
  }
4308
4307
 
4309
4308
  function start$5() {
@@ -4322,7 +4321,7 @@ var diagnostic = /*#__PURE__*/Object.freeze({
4322
4321
  });
4323
4322
 
4324
4323
  function start$4() {
4325
- schedule$1(discover, 1 /* Priority.High */).then(function () {
4324
+ schedule$1(discover, 1 /* High */).then(function () {
4326
4325
  measure(compute$7)();
4327
4326
  measure(compute$6)();
4328
4327
  });
@@ -4334,12 +4333,12 @@ function discover() {
4334
4333
  switch (_a.label) {
4335
4334
  case 0:
4336
4335
  ts = time();
4337
- timer = { id: id(), cost: 3 /* Metric.LayoutCost */ };
4336
+ timer = { id: id(), cost: 3 /* LayoutCost */ };
4338
4337
  start$w(timer);
4339
- return [4 /*yield*/, traverse(document, timer, 0 /* Source.Discover */)];
4338
+ return [4 /*yield*/, traverse(document, timer, 0 /* Discover */)];
4340
4339
  case 1:
4341
4340
  _a.sent();
4342
- return [4 /*yield*/, encode$4(5 /* Event.Discover */, timer, ts)];
4341
+ return [4 /*yield*/, encode$4(5 /* Discover */, timer, ts)];
4343
4342
  case 2:
4344
4343
  _a.sent();
4345
4344
  stop$t(timer);
@@ -4378,7 +4377,7 @@ function encode (type) {
4378
4377
  t = time();
4379
4378
  tokens = [t, type];
4380
4379
  switch (type) {
4381
- case 29 /* Event.Navigation */:
4380
+ case 29 /* Navigation */:
4382
4381
  tokens.push(data.fetchStart);
4383
4382
  tokens.push(data.connectStart);
4384
4383
  tokens.push(data.connectEnd);
@@ -4427,11 +4426,11 @@ function compute(entry) {
4427
4426
  encodedSize: entry.encodedBodySize ? entry.encodedBodySize : 0,
4428
4427
  decodedSize: entry.decodedBodySize ? entry.decodedBodySize : 0
4429
4428
  };
4430
- encode(29 /* Event.Navigation */);
4429
+ encode(29 /* Navigation */);
4431
4430
  }
4432
4431
 
4433
4432
  var observer;
4434
- var types = ["navigation" /* Constant.Navigation */, "resource" /* Constant.Resource */, "longtask" /* Constant.LongTask */, "first-input" /* Constant.FID */, "layout-shift" /* Constant.CLS */, "largest-contentful-paint" /* Constant.LCP */];
4433
+ var types = ["navigation" /* Navigation */, "resource" /* Resource */, "longtask" /* LongTask */, "first-input" /* FID */, "layout-shift" /* CLS */, "largest-contentful-paint" /* LCP */];
4435
4434
  function start$2() {
4436
4435
  // Check the browser support performance observer as a pre-requisite for any performance measurement
4437
4436
  if (window["PerformanceObserver"] && PerformanceObserver.supportedEntryTypes) {
@@ -4446,7 +4445,7 @@ function start$2() {
4446
4445
  }
4447
4446
  }
4448
4447
  else {
4449
- log$1(3 /* Code.PerformanceObserver */, 0 /* Severity.Info */);
4448
+ log$1(3 /* PerformanceObserver */, 0 /* Info */);
4450
4449
  }
4451
4450
  }
4452
4451
  function observe() {
@@ -4466,15 +4465,15 @@ function observe() {
4466
4465
  if (PerformanceObserver.supportedEntryTypes.indexOf(x) >= 0) {
4467
4466
  // Initialize CLS with a value of zero. It's possible (and recommended) for sites to not have any cumulative layout shift.
4468
4467
  // In those cases, we want to still initialize the metric in Clarity
4469
- if (x === "layout-shift" /* Constant.CLS */) {
4470
- sum(9 /* Metric.CumulativeLayoutShift */, 0);
4468
+ if (x === "layout-shift" /* CLS */) {
4469
+ sum(9 /* CumulativeLayoutShift */, 0);
4471
4470
  }
4472
4471
  observer.observe({ type: x, buffered: true });
4473
4472
  }
4474
4473
  }
4475
4474
  }
4476
4475
  catch (_a) {
4477
- log$1(3 /* Code.PerformanceObserver */, 1 /* Severity.Warning */);
4476
+ log$1(3 /* PerformanceObserver */, 1 /* Warning */);
4478
4477
  }
4479
4478
  }
4480
4479
  function handle(entries) {
@@ -4485,41 +4484,41 @@ function process(entries) {
4485
4484
  for (var i = 0; i < entries.length; i++) {
4486
4485
  var entry = entries[i];
4487
4486
  switch (entry.entryType) {
4488
- case "navigation" /* Constant.Navigation */:
4487
+ case "navigation" /* Navigation */:
4489
4488
  compute(entry);
4490
4489
  break;
4491
- case "resource" /* Constant.Resource */:
4490
+ case "resource" /* Resource */:
4492
4491
  var name_1 = entry.name;
4493
- log(4 /* Dimension.NetworkHosts */, host(name_1));
4492
+ log(4 /* NetworkHosts */, host(name_1));
4494
4493
  if (name_1 === config$1.upload || name_1 === config$1.fallback) {
4495
- max(28 /* Metric.UploadTime */, entry.duration);
4494
+ max(28 /* UploadTime */, entry.duration);
4496
4495
  }
4497
4496
  break;
4498
- case "longtask" /* Constant.LongTask */:
4499
- count$1(7 /* Metric.LongTaskCount */);
4497
+ case "longtask" /* LongTask */:
4498
+ count$1(7 /* LongTaskCount */);
4500
4499
  break;
4501
- case "first-input" /* Constant.FID */:
4500
+ case "first-input" /* FID */:
4502
4501
  if (visible) {
4503
- max(10 /* Metric.FirstInputDelay */, entry["processingStart"] - entry.startTime);
4502
+ max(10 /* FirstInputDelay */, entry["processingStart"] - entry.startTime);
4504
4503
  }
4505
4504
  break;
4506
- case "layout-shift" /* Constant.CLS */:
4505
+ case "layout-shift" /* CLS */:
4507
4506
  // Scale the value to avoid sending back floating point number
4508
4507
  if (visible && !entry["hadRecentInput"]) {
4509
- sum(9 /* Metric.CumulativeLayoutShift */, entry["value"] * 1000);
4508
+ sum(9 /* CumulativeLayoutShift */, entry["value"] * 1000);
4510
4509
  }
4511
4510
  break;
4512
- case "largest-contentful-paint" /* Constant.LCP */:
4511
+ case "largest-contentful-paint" /* LCP */:
4513
4512
  if (visible) {
4514
- max(8 /* Metric.LargestPaint */, entry.startTime);
4513
+ max(8 /* LargestPaint */, entry.startTime);
4515
4514
  }
4516
4515
  break;
4517
4516
  }
4518
4517
  }
4519
- if (performance && "memory" /* Constant.Memory */ in performance && performance["memory" /* Constant.Memory */].usedJSHeapSize) {
4518
+ if (performance && "memory" /* Memory */ in performance && performance["memory" /* Memory */].usedJSHeapSize) {
4520
4519
  // Track consumed memory (MBs) where "memory" API is available
4521
4520
  // Reference: https://developer.mozilla.org/en-US/docs/Web/API/Performance/memory
4522
- max(30 /* Metric.UsedMemory */, Math.abs(performance["memory" /* Constant.Memory */].usedJSHeapSize / 1048576 /* Setting.MegaByte */));
4521
+ max(30 /* UsedMemory */, Math.abs(performance["memory" /* Memory */].usedJSHeapSize / 1048576 /* MegaByte */));
4523
4522
  }
4524
4523
  }
4525
4524
  function stop$2() {
@@ -4567,7 +4566,7 @@ function start(config$1) {
4567
4566
  // performance impact even further. For reference, we are talking single digit milliseconds optimization here, not seconds.
4568
4567
  function pause() {
4569
4568
  if (active()) {
4570
- event("clarity" /* Constant.Clarity */, "pause" /* Constant.Pause */);
4569
+ event("clarity" /* Clarity */, "pause" /* Pause */);
4571
4570
  pause$1();
4572
4571
  }
4573
4572
  }
@@ -4575,7 +4574,7 @@ function pause() {
4575
4574
  function resume() {
4576
4575
  if (active()) {
4577
4576
  resume$1();
4578
- event("clarity" /* Constant.Clarity */, "resume" /* Constant.Resume */);
4577
+ event("clarity" /* Clarity */, "resume" /* Resume */);
4579
4578
  }
4580
4579
  }
4581
4580
  function stop() {