clarity-js 0.7.67 → 0.7.68

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.
@@ -167,7 +167,7 @@ function stop$F() {
167
167
  startTime = 0;
168
168
  }
169
169
 
170
- var version$1 = "0.7.67";
170
+ var version$1 = "0.7.68";
171
171
 
172
172
  // tslint:disable: no-bitwise
173
173
  function hash (input, precision) {
@@ -1849,6 +1849,7 @@ function handler$3(event, root, evt) {
1849
1849
  var eY = l ? Math.max(Math.floor(((y - l.y) / l.h) * 32767 /* Setting.ClickPrecision */), 0) : 0;
1850
1850
  // Check for null values before processing this event
1851
1851
  if (x !== null && y !== null) {
1852
+ var textInfo = text(t);
1852
1853
  state$8.push({
1853
1854
  time: time(evt),
1854
1855
  event: event,
@@ -1861,10 +1862,11 @@ function handler$3(event, root, evt) {
1861
1862
  button: evt.button,
1862
1863
  reaction: reaction(t),
1863
1864
  context: context(a),
1864
- text: text(t),
1865
+ text: textInfo.text,
1865
1866
  link: a ? a.href : null,
1866
1867
  hash: null,
1867
- trust: evt.isTrusted ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */
1868
+ trust: evt.isTrusted ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */,
1869
+ isFullText: textInfo.isFullText,
1868
1870
  }
1869
1871
  });
1870
1872
  schedule$1(encode$3.bind(this, event));
@@ -1884,17 +1886,20 @@ function link(node) {
1884
1886
  }
1885
1887
  function text(element) {
1886
1888
  var output = null;
1889
+ var isFullText = false;
1887
1890
  if (element) {
1888
1891
  // Grab text using "textContent" for most HTMLElements, however, use "value" for HTMLInputElements and "alt" for HTMLImageElement.
1889
1892
  var t = element.textContent || String(element.value || '') || element.alt;
1890
1893
  if (t) {
1891
1894
  // Replace multiple occurrence of space characters with a single white space
1892
1895
  // Also, trim any spaces at the beginning or at the end of string
1896
+ var trimmedText = t.replace(/\s+/g, " " /* Constant.Space */).trim();
1893
1897
  // Finally, send only first few characters as specified by the Setting
1894
- output = t.replace(/\s+/g, " " /* Constant.Space */).trim().substr(0, 25 /* Setting.ClickText */);
1898
+ output = trimmedText.substring(0, 25 /* Setting.ClickText */);
1899
+ isFullText = output.length === trimmedText.length;
1895
1900
  }
1896
1901
  }
1897
- return output;
1902
+ return { text: output, isFullText: isFullText ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */ };
1898
1903
  }
1899
1904
  function reaction(element) {
1900
1905
  if (element.nodeType === Node.ELEMENT_NODE) {
@@ -2346,7 +2351,7 @@ function start$n() {
2346
2351
  }
2347
2352
  function recompute$1(evt) {
2348
2353
  recompute$1.dn = 17 /* FunctionNames.UnloadRecompute */;
2349
- data$9 = { name: evt.type };
2354
+ data$9 = { name: evt.type, persisted: evt.persisted ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */ };
2350
2355
  encode$3(26 /* Event.Unload */, time(evt));
2351
2356
  stop();
2352
2357
  }
@@ -3183,10 +3188,10 @@ var sheetAdoptionState = [];
3183
3188
  var replace = null;
3184
3189
  var replaceSync = null;
3185
3190
  var styleSheetId = 'claritySheetId';
3186
- var styleSheetPageNum = 'claritySheetNum';
3187
3191
  var styleSheetMap = {};
3188
3192
  var styleTimeMap = {};
3189
3193
  var documentNodes = [];
3194
+ var createdSheetIds = [];
3190
3195
  function start$j() {
3191
3196
  if (window['CSSStyleSheet'] && CSSStyleSheet.prototype) {
3192
3197
  if (replace === null) {
@@ -3197,7 +3202,7 @@ function start$j() {
3197
3202
  // if we haven't seen this stylesheet on this page yet, wait until the checkDocumentStyles has found it
3198
3203
  // and attached the sheet to a document. This way the timestamp of the style sheet creation will align
3199
3204
  // to when it is used in the document rather than potentially being misaligned during the traverse process.
3200
- if (this[styleSheetPageNum] === data$2.pageNum) {
3205
+ if (createdSheetIds.indexOf(this[styleSheetId]) > -1) {
3201
3206
  trackStyleChange(time(), this[styleSheetId], 1 /* StyleSheetOperation.Replace */, arguments[0]);
3202
3207
  }
3203
3208
  }
@@ -3212,7 +3217,7 @@ function start$j() {
3212
3217
  // if we haven't seen this stylesheet on this page yet, wait until the checkDocumentStyles has found it
3213
3218
  // and attached the sheet to a document. This way the timestamp of the style sheet creation will align
3214
3219
  // to when it is used in the document rather than potentially being misaligned during the traverse process.
3215
- if (this[styleSheetPageNum] === data$2.pageNum) {
3220
+ if (createdSheetIds.indexOf(this[styleSheetId]) > -1) {
3216
3221
  trackStyleChange(time(), this[styleSheetId], 2 /* StyleSheetOperation.ReplaceSync */, arguments[0]);
3217
3222
  }
3218
3223
  }
@@ -3234,14 +3239,13 @@ function checkDocumentStyles(documentNode, timestamp) {
3234
3239
  var currentStyleSheets = [];
3235
3240
  for (var _i = 0, _a = documentNode.adoptedStyleSheets; _i < _a.length; _i++) {
3236
3241
  var styleSheet = _a[_i];
3237
- var pageNum = data$2.pageNum;
3238
3242
  // If we haven't seen this style sheet on this page yet, we create a reference to it for the visualizer.
3239
3243
  // For SPA or times in which Clarity restarts on a given page, our visualizer would lose context
3240
3244
  // on the previously created style sheet for page N-1.
3241
3245
  // Then we synthetically call replaceSync with its contents to bootstrap it
3242
- if (styleSheet[styleSheetPageNum] !== pageNum) {
3243
- styleSheet[styleSheetPageNum] = pageNum;
3246
+ if (!styleSheet[styleSheetId] || createdSheetIds.indexOf(styleSheet[styleSheetId]) === -1) {
3244
3247
  styleSheet[styleSheetId] = shortid();
3248
+ createdSheetIds.push(styleSheet[styleSheetId]);
3245
3249
  trackStyleChange(timestamp, styleSheet[styleSheetId], 0 /* StyleSheetOperation.Create */);
3246
3250
  trackStyleChange(timestamp, styleSheet[styleSheetId], 2 /* StyleSheetOperation.ReplaceSync */, getCssRules(styleSheet));
3247
3251
  }
@@ -3274,6 +3278,7 @@ function stop$h() {
3274
3278
  styleSheetMap = {};
3275
3279
  styleTimeMap = {};
3276
3280
  documentNodes = [];
3281
+ createdSheetIds = [];
3277
3282
  reset$8();
3278
3283
  }
3279
3284
  function trackStyleChange(time, id, operation, cssRules) {
@@ -3823,6 +3828,7 @@ function encode$3 (type, ts) {
3823
3828
  tokens.push(url$1(entry.data.link));
3824
3829
  tokens.push(cHash);
3825
3830
  tokens.push(entry.data.trust);
3831
+ tokens.push(entry.data.isFullText);
3826
3832
  queue(tokens);
3827
3833
  track$2(entry.time, entry.event, cHash, entry.data.x, entry.data.y, entry.data.reaction, entry.data.context);
3828
3834
  }
@@ -3852,6 +3858,7 @@ function encode$3 (type, ts) {
3852
3858
  case 26 /* Event.Unload */:
3853
3859
  u = data$9;
3854
3860
  tokens.push(u.name);
3861
+ tokens.push(u.persisted);
3855
3862
  reset$a();
3856
3863
  queue(tokens);
3857
3864
  break;
@@ -5222,16 +5229,19 @@ function measure (method) {
5222
5229
  }
5223
5230
 
5224
5231
  var bindings = [];
5225
- function bind(target, event, listener, capture) {
5232
+ function bind(target, event, listener, capture, passive) {
5226
5233
  if (capture === void 0) { capture = false; }
5234
+ if (passive === void 0) { passive = true; }
5227
5235
  listener = measure(listener);
5228
5236
  // Wrapping following lines inside try / catch to cover edge cases where we might try to access an inaccessible element.
5229
5237
  // E.g. Iframe may start off as same-origin but later turn into cross-origin, and the following lines will throw an exception.
5230
5238
  try {
5231
- target[api("addEventListener" /* Constant.AddEventListener */)](event, listener, capture);
5232
- bindings.push({ event: event, target: target, listener: listener, capture: capture });
5239
+ target[api("addEventListener" /* Constant.AddEventListener */)](event, listener, { capture: capture, passive: passive });
5240
+ bindings.push({ event: event, target: target, listener: listener, options: { capture: capture, passive: passive } });
5241
+ }
5242
+ catch (_a) {
5243
+ /* do nothing */
5233
5244
  }
5234
- catch ( /* do nothing */_a) { /* do nothing */ }
5235
5245
  }
5236
5246
  function reset$1() {
5237
5247
  // Walk through existing list of bindings and remove them all
@@ -5239,9 +5249,11 @@ function reset$1() {
5239
5249
  var binding = bindings_1[_i];
5240
5250
  // Wrapping inside try / catch to avoid situations where the element may be destroyed before we get a chance to unbind
5241
5251
  try {
5242
- binding.target[api("removeEventListener" /* Constant.RemoveEventListener */)](binding.event, binding.listener, binding.capture);
5252
+ binding.target[api("removeEventListener" /* Constant.RemoveEventListener */)](binding.event, binding.listener, { capture: binding.options.capture, passive: binding.options.passive });
5253
+ }
5254
+ catch (_a) {
5255
+ /* do nothing */
5243
5256
  }
5244
- catch ( /* do nothing */_a) { /* do nothing */ }
5245
5257
  }
5246
5258
  bindings = [];
5247
5259
  }
@@ -1 +1 @@
1
- !function(){"use strict";var t=Object.freeze({__proto__:null,get queue(){return yt},get start(){return mt},get stop(){return bt},get track(){return dt}}),n=Object.freeze({__proto__:null,get check(){return Mt},get compute(){return Tt},get data(){return pt},get start(){return It},get stop(){return xt},get trigger(){return Ot}}),e=Object.freeze({__proto__:null,get compute(){return Pt},get data(){return jt},get log(){return Nt},get reset(){return Dt},get start(){return At},get stop(){return qt},get updates(){return zt}}),r=Object.freeze({__proto__:null,get callback(){return Gt},get callbacks(){return Ht},get clear(){return Zt},get consent(){return Yt},get data(){return Ut},get electron(){return Lt},get id(){return Jt},get metadata(){return Wt},get save(){return Ft},get shortid(){return $t},get start(){return Xt},get stop(){return Bt}}),o=Object.freeze({__proto__:null,get data(){return cn},get envelope(){return ln},get start(){return un},get stop(){return sn}}),a={projectId:null,delay:1e3,lean:!1,track:!0,content:!0,drop:[],mask:[],unmask:[],regions:[],cookies:[],fraud:!0,checksum:[],report:null,upload:null,fallback:null,upgrade:null,action:null,dob:null,delayDom:!1,throttleDom:!0,conversions:!1,includeSubdomains:!0,throttleMutations:!1,dropMutations:!1,criticalMs:200,discard:[]};function i(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var c=0;function u(t){void 0===t&&(t=null);var n=t&&t.timeStamp>0?t.timeStamp:performance.now(),e=t&&t.view?t.view.performance.timeOrigin:performance.timeOrigin;return Math.max(Math.round(n+e-c),0)}var s="0.7.67";var l=255,d=!0,p=null,f=null;function h(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var r=t;if(n)r="".concat("https://").concat("Electron");else{var o=a.drop;if(o&&o.length>0&&t&&t.indexOf("?")>0){var i=t.split("?"),c=i[0],u=i[1];r=c+"?"+u.split("&").map((function(t){return o.some((function(n){return 0===t.indexOf("".concat(n,"="))}))?"".concat(t.split("=")[0],"=").concat("*na*"):t})).join("&")}}return e&&(r=r.substring(0,l)),r}function v(t,n,e){return function(){if(d&&null===p)try{p=new RegExp("\\p{N}","gu"),f=new RegExp("\\p{L}","gu"),new RegExp("\\p{Sc}","gu")}catch(t){d=!1}}(),t?t.replace(f,n).replace(p,e):t}var g=[],m=null;function y(){}var b=[];function w(){}function k(){}var S=Object.freeze({__proto__:null,checkDocumentStyles:function(t){},compute:function(){},data:m,hashText:w,keys:b,log:y,observe:function(){},reset:function(){},sheetAdoptionState:[],sheetUpdateState:[],start:function(){},state:g,stop:function(){},trigger:k}),_=null;function E(t,n){Nn()&&t&&"string"==typeof t&&t.length<255&&(_=n&&"string"==typeof n&&n.length<255?{key:t,value:n}:{value:t},Et(24))}var I,M=null,O=null;function T(t){t in M||(M[t]=0),t in O||(O[t]=0),M[t]++,O[t]++}function x(t,n){null!==n&&(t in M||(M[t]=0),t in O||(O[t]=0),M[t]+=n,O[t]+=n)}function j(t,n){null!==n&&!1===isNaN(n)&&(t in M||(M[t]=0),(n>M[t]||0===M[t])&&(O[t]=n,M[t]=n))}function z(t,n,e){return window.setTimeout(fn(t),n,e)}function C(t){return window.clearTimeout(t)}var A=0,q=0,N=null;function P(){N&&C(N),N=z(D,q),A=u()}function D(){var t=u();I={gap:t-A},Et(25),I.gap<3e5?N=z(D,q):Cn&&(E("clarity","suspend"),oe(),["mousemove","touchstart"].forEach((function(t){return vn(document,t,Pn)})),["resize","scroll","pageshow"].forEach((function(t){return vn(window,t,Pn)})))}var R=Object.freeze({__proto__:null,get data(){return I},reset:P,start:function(){q=6e4,A=0},stop:function(){C(N),A=0,q=0}}),U=null;function H(t){Nn()&&a.lean&&(a.lean=!1,U={key:t},Gt(),Ft(),a.upgrade&&a.upgrade(t),Et(3))}var L=Object.freeze({__proto__:null,get data(){return U},start:function(){!a.lean&&a.upgrade&&a.upgrade("Config"),U=null},stop:function(){U=null},upgrade:H});function V(t,n,e,r){return new(e||(e=Promise))((function(o,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(i,c)}u((r=r.apply(t,n||[])).next())}))}function X(t,n){var e,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(u){return function(c){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=n.call(t,i)}catch(t){c=[6,t],r=0}finally{e=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}var B=null;function W(t,n){Y(t,"string"==typeof n?[n]:n)}function J(t,n,e,r){return void 0===n&&(n=null),void 0===e&&(e=null),void 0===r&&(r=null),V(this,void 0,void 0,(function(){var o,a;return X(this,(function(i){switch(i.label){case 0:return a={},[4,F(t)];case 1:return a.userId=i.sent(),a.userHint=r||((c=t)&&c.length>=5?"".concat(c.substring(0,2)).concat(v(c.substring(2),"*","*")):v(c,"*","*")),Y("userId",[(o=a).userId]),Y("userHint",[o.userHint]),Y("userType",[K(t)]),n&&(Y("sessionId",[n]),o.sessionId=n),e&&(Y("pageId",[e]),o.pageId=e),[2,o]}var c}))}))}function Y(t,n){if(Nn()&&t&&n&&"string"==typeof t&&t.length<255){for(var e=(t in B?B[t]:[]),r=0;r<n.length;r++)"string"==typeof n[r]&&n[r].length<255&&e.push(n[r]);B[t]=e}}function Z(){Et(34)}function G(){B={}}function F(t){return V(this,void 0,void 0,(function(){var n;return X(this,(function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),crypto&&t?[4,crypto.subtle.digest("SHA-256",(new TextEncoder).encode(t))]:[3,2];case 1:return n=e.sent(),[2,Array.prototype.map.call(new Uint8Array(n),(function(t){return("00"+t.toString(16)).slice(-2)})).join("")];case 2:return[2,""];case 3:return[3,5];case 4:return e.sent(),[2,""];case 5:return[2]}}))}))}function K(t){return t&&t.indexOf("@")>0?"email":"string"}var Q="CompressionStream"in window;function $(t){return V(this,void 0,void 0,(function(){var n,e;return X(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),Q?(n=new ReadableStream({start:function(n){return V(this,void 0,void 0,(function(){return X(this,(function(e){return n.enqueue(t),n.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),e=Uint8Array.bind,[4,tt(n)]):[3,2];case 1:return[2,new(e.apply(Uint8Array,[void 0,r.sent()]))];case 2:return[3,4];case 3:return r.sent(),[3,4];case 4:return[2,null]}}))}))}function tt(t){return V(this,void 0,void 0,(function(){var n,e,r,o,a;return X(this,(function(i){switch(i.label){case 0:n=t.getReader(),e=[],r=!1,o=[],i.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return a=i.sent(),r=a.done,o=a.value,r?[2,e]:(e.push.apply(e,o),[3,1]);case 3:return[2,e]}}))}))}var nt=null;function et(t){try{if(!nt)return;var n=function(t){try{return JSON.parse(t)}catch(t){return[]}}(t);n.forEach((function(t){nt(t)}))}catch(t){}}var rt=[S,e,Object.freeze({__proto__:null,compute:Z,get data(){return B},identify:J,reset:G,set:W,start:function(){G()},stop:function(){G()}}),n,S,r,o,t,R,L,S];function ot(){M={},O={},T(5),rt.forEach((function(t){return fn(t.start)()}))}function at(){rt.slice().reverse().forEach((function(t){return fn(t.stop)()})),M={},O={}}function it(){Z(),Pt(),Et(0),Tt()}var ct,ut,st,lt,dt,pt,ft=0,ht=0,vt=null,gt=0;function mt(){lt=!0,ft=0,ht=0,gt=0,ct=[],ut=[],st={},dt=null}function yt(t,n){if(void 0===n&&(n=!0),lt){var e=u(),r=t.length>1?t[1]:null,o=JSON.stringify(t);switch(r){case 5:ft+=o.length;case 37:case 6:case 43:case 45:case 46:ht+=o.length,ct.push(o);break;default:ut.push(o)}T(25);var i=function(){var t=!1===a.lean&&ft>0?100:cn.sequence*a.delay;return"string"==typeof a.upload?Math.max(Math.min(t,3e4),100):a.delay}();e-gt>2*i&&(C(vt),vt=null),n&&null===vt&&(25!==r&&P(),vt=z(wt,i),gt=e,Mt(ht))}}function bt(){C(vt),wt(!0),ft=0,ht=0,gt=0,ct=[],ut=[],st={},dt=null,lt=!1}function wt(t){return void 0===t&&(t=!1),V(this,void 0,void 0,(function(){var n,e,r,o,i,c,u,s;return X(this,(function(l){switch(l.label){case 0:return vt=null,(n=!1===a.lean&&ht>0&&(ht<1048576||cn.sequence>0))&&j(1,1),it(),e=!0===t,r=JSON.stringify(ln(e)),o="[".concat(ut.join(),"]"),i=n?"[".concat(ct.join(),"]"):"",c=function(t){return t.p.length>0?'{"e":'.concat(t.e,',"a":').concat(t.a,',"p":').concat(t.p,"}"):'{"e":'.concat(t.e,',"a":').concat(t.a,"}")}({e:r,a:o,p:i}),e?(s=null,[3,3]):[3,1];case 1:return[4,$(c)];case 2:s=l.sent(),l.label=3;case 3:return x(2,(u=s)?u.length:c.length),kt(c,u,cn.sequence,e),ut=[],n&&(ct=[],ht=0,ft=0),[2]}}))}))}function kt(t,n,e,r){if(void 0===r&&(r=!1),"string"==typeof a.upload){var o=a.upload,i=!1;if(r&&"sendBeacon"in navigator)try{(i=navigator.sendBeacon.bind(navigator)(o,t))&&_t(e)}catch(t){}if(!1===i){e in st?st[e].attempts++:st[e]={data:t,attempts:1};var c=new XMLHttpRequest;c.open("POST",o,!0),c.timeout=15e3,c.ontimeout=function(){pn(new Error("".concat("Timeout"," : ").concat(o)))},null!==e&&(c.onreadystatechange=function(){fn(St)(c,e)}),c.withCredentials=!0,n?(c.setRequestHeader("Accept","application/x-clarity-gzip"),c.send(n)):c.send(t)}}else if(a.upload){(0,a.upload)(t),_t(e)}}function St(t,n){var e=st[n];t&&4===t.readyState&&e&&((t.status<200||t.status>208)&&e.attempts<=1?t.status>=400&&t.status<500?Ot(6):(0===t.status&&(a.upload=a.fallback?a.fallback:a.upload),kt(e.data,null,n)):(dt={sequence:n,attempts:e.attempts,status:t.status},e.attempts>1&&Et(2),200===t.status&&t.responseText&&function(t){for(var n=t&&t.length>0?t.split("\n"):[],e=0,r=n;e<r.length;e++){var o=r[e],i=o&&o.length>0?o.split(/ (.*)/):[""];switch(i[0]){case"END":Ot(6);break;case"UPGRADE":H("Auto");break;case"ACTION":a.action&&i.length>1&&a.action(i[1]);break;case"EXTRACT":i.length>1&&i[1];break;case"SIGNAL":i.length>1&&et(i[1])}}}(t.responseText),0===t.status&&(kt(e.data,null,n,!0),Ot(3)),t.status>=200&&t.status<=208&&_t(n),delete st[n]))}function _t(t){1===t&&(Ft(),Gt())}function Et(t){var n=[u(),t];switch(t){case 4:var e=g;e&&((n=[e.time,e.event]).push(e.data.visible),n.push(e.data.docWidth),n.push(e.data.docHeight),n.push(e.data.screenWidth),n.push(e.data.screenHeight),n.push(e.data.scrollX),n.push(e.data.scrollY),n.push(e.data.pointerX),n.push(e.data.pointerY),n.push(e.data.activityTime),n.push(e.data.scrollTime),n.push(e.data.pointerTime),n.push(e.data.moveX),n.push(e.data.moveY),n.push(e.data.moveTime),n.push(e.data.downX),n.push(e.data.downY),n.push(e.data.downTime),yt(n,!1));break;case 25:n.push(I.gap),yt(n);break;case 35:n.push(pt.check),yt(n,!1);break;case 3:n.push(U.key),yt(n);break;case 2:n.push(dt.sequence),n.push(dt.attempts),n.push(dt.status),yt(n,!1);break;case 24:_.key&&n.push(_.key),n.push(_.value),yt(n);break;case 34:var r=Object.keys(B);if(r.length>0){for(var o=0,a=r;o<a.length;o++){var i=a[o];n.push(i),n.push(B[i])}G(),yt(n,!1)}break;case 0:var c=Object.keys(O);if(c.length>0){for(var s=0,l=c;s<l.length;s++){var d=l[s],p=parseInt(d,10);n.push(p),n.push(Math.round(O[d]))}O={},yt(n,!1)}break;case 1:var f=Object.keys(zt);if(f.length>0){for(var h=0,v=f;h<v.length;h++){var y=v[h];p=parseInt(y,10);n.push(p),n.push(zt[y])}Dt(),yt(n,!1)}break;case 36:var w=Object.keys(m);if(w.length>0){for(var k=0,S=w;k<S.length;k++){var E=S[k];p=parseInt(E,10);n.push(p),n.push([].concat.apply([],m[E]))}yt(n,!1)}break;case 40:b.forEach((function(t){n.push(t);var e=[];for(var r in m[t]){var o=parseInt(r,10);e.push(o),e.push(m[t][r])}n.push(e)})),yt(n,!1)}}function It(){pt={check:0}}function Mt(t){if(0===pt.check){var n=pt.check;n=cn.sequence>=128?1:n,n=cn.pageNum>=128?7:n,n=u()>72e5?2:n,(n=t>10485760?2:n)!==pt.check&&Ot(n)}}function Ot(t){pt.check=t,5!==t&&(Zt(),oe())}function Tt(){0!==pt.check&&Et(35)}function xt(){pt=null}var jt=null,zt=null,Ct=!1;function At(){jt={},zt={},Ct=!1}function qt(){jt={},zt={},Ct=!1}function Nt(t,n){if(n&&(n="".concat(n),t in jt||(jt[t]=[]),jt[t].indexOf(n)<0)){if(jt[t].length>128)return void(Ct||(Ct=!0,Ot(5)));jt[t].push(n),t in zt||(zt[t]=[]),zt[t].push(n)}}function Pt(){Et(1)}function Dt(){zt={},Ct=!1}function Rt(t){Nt(36,t.toString())}var Ut=null,Ht=[],Lt=0,Vt=null;function Xt(){var t,n,e;Vt=null;var r=navigator&&"userAgent"in navigator?navigator.userAgent:"",o=null!==(e=null===(n=null===(t=null===Intl||void 0===Intl?void 0:Intl.DateTimeFormat())||void 0===t?void 0:t.resolvedOptions())||void 0===n?void 0:n.timeZone)&&void 0!==e?e:"",i=(new Date).getTimezoneOffset().toString(),c=window.location.ancestorOrigins?Array.from(window.location.ancestorOrigins).toString():"",u=document&&document.title?document.title:"";Lt=r.indexOf("Electron")>0?1:0;var s,l=function(){var t={session:$t(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},n=en("_clsk",!a.includeSubdomains);if(n){var e=n.split("|");e.length>=5&&t.ts-tn(e[1])<18e5&&(t.session=e[0],t.count=tn(e[2])+1,t.upgrade=tn(e[3]),t.upload=e.length>=6?"".concat("https://").concat(e[5],"/").concat(e[4]):"".concat("https://").concat(e[4]))}return t}(),d=nn(),p=a.projectId||function(t,n){void 0===n&&(n=null);for(var e,r=5381,o=r,a=0;a<t.length;a+=2)r=(r<<5)+r^t.charCodeAt(a),a+1<t.length&&(o=(o<<5)+o^t.charCodeAt(a+1));return e=Math.abs(r+11579*o),(n?e%Math.pow(2,n):e).toString(36)}(location.host);Ut={projectId:p,userId:d.id,sessionId:l.session,pageNum:l.count},a.lean=a.track&&null!==l.upgrade?0===l.upgrade:a.lean,a.upload=a.track&&"string"==typeof a.upload&&l.upload&&l.upload.length>"https://".length?l.upload:a.upload,Nt(0,r),Nt(3,u),Nt(1,h(location.href,!!Lt)),Nt(2,document.referrer),Nt(15,function(){var t=$t();if(a.track&&Kt(window,"sessionStorage")){var n=sessionStorage.getItem("_cltk");t=n||t,sessionStorage.setItem("_cltk",t)}return t}()),Nt(16,document.documentElement.lang),Nt(17,document.dir),Nt(26,"".concat(window.devicePixelRatio)),Nt(28,d.dob.toString()),Nt(29,d.version.toString()),Nt(33,c),Nt(34,o),Nt(35,i),j(0,l.ts),j(1,0),j(35,Lt),navigator&&(Nt(9,navigator.language),j(33,navigator.hardwareConcurrency),j(32,navigator.maxTouchPoints),j(34,Math.round(navigator.deviceMemory)),(s=navigator.userAgentData)&&s.getHighEntropyValues?s.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var n;Nt(22,t.platform),Nt(23,t.platformVersion),null===(n=t.brands)||void 0===n||n.forEach((function(t){Nt(24,t.name+"~"+t.version)})),Nt(25,t.model),j(27,t.mobile?1:0)})):Nt(22,navigator.platform)),screen&&(j(14,Math.round(screen.width)),j(15,Math.round(screen.height)),j(16,Math.round(screen.colorDepth)));for(var f=0,v=a.cookies;f<v.length;f++){var g=v[f],m=en(g);m&&W(g,m)}!function(t){Rt(t?1:0)}(a.track),Qt(d)}function Bt(){Vt=null,Ut=null,Ht.forEach((function(t){t.called=!1}))}function Wt(t,n,e){void 0===n&&(n=!0),void 0===e&&(e=!1);var r=a.lean?0:1,o=!1;Ut&&(r||!1===n)&&(t(Ut,!a.lean),o=!0),!e&&o||Ht.push({callback:t,wait:n,recall:e,called:o})}function Jt(){return Ut?[Ut.userId,Ut.sessionId,Ut.pageNum].join("."):""}function Yt(t){if(void 0===t&&(t=!0),!t)return a.track=!1,on("_clsk","",-Number.MAX_VALUE),on("_clck","",-Number.MAX_VALUE),oe(),void window.setTimeout(re,250);Nn()&&(a.track=!0,Qt(nn(),1),Ft(),Rt(2))}function Zt(){on("_clsk","",0)}function Gt(){!function(t){if(Ht.length>0)for(var n=0;n<Ht.length;n++){var e=Ht[n];!e.callback||e.called||e.wait&&!t||(e.callback(Ut,!a.lean),e.called=!0,e.recall||(Ht.splice(n,1),n--))}}(a.lean?0:1)}function Ft(){if(Ut){var t=Math.round(Date.now()),n=a.upload&&"string"==typeof a.upload?a.upload.replace("https://",""):"",e=a.lean?0:1;on("_clsk",[Ut.sessionId,t,Ut.pageNum,e,n].join("|"),1)}}function Kt(t,n){try{return!!t[n]}catch(t){return!1}}function Qt(t,n){void 0===n&&(n=null),n=null===n?t.consent:n;var e=Math.ceil((Date.now()+31536e6)/864e5),r=0===t.dob?null===a.dob?0:a.dob:t.dob;(null===t.expiry||Math.abs(e-t.expiry)>=1||t.consent!==n||t.dob!==r)&&on("_clck",[Ut.userId,2,e.toString(36),n,r].join("|"),365)}function $t(){var t=Math.floor(Math.random()*Math.pow(2,32));return window&&window.crypto&&window.crypto.getRandomValues&&Uint32Array&&(t=window.crypto.getRandomValues(new Uint32Array(1))[0]),t.toString(36)}function tn(t,n){return void 0===n&&(n=10),parseInt(t,n)}function nn(){var t={id:$t(),version:0,expiry:null,consent:0,dob:0},n=en("_clck",!a.includeSubdomains);if(n&&n.length>0){for(var e=n.split("|"),r=0,o=0,i=document.cookie.split(";");o<i.length;o++){r+="_clck"===i[o].split("=")[0].trim()?1:0}if(1===e.length||r>1){var c="".concat(";").concat("expires=").concat(new Date(0).toUTCString()).concat(";path=/");document.cookie="".concat("_clck","=").concat(c),document.cookie="".concat("_clsk","=").concat(c)}e.length>1&&(t.version=tn(e[1])),e.length>2&&(t.expiry=tn(e[2],36)),e.length>3&&1===tn(e[3])&&(t.consent=1),e.length>4&&tn(e[1])>1&&(t.dob=tn(e[4])),a.track=a.track||1===t.consent,t.id=a.track?e[0]:t.id}return t}function en(t,n){var e;if(void 0===n&&(n=!1),Kt(document,"cookie")){var r=document.cookie.split(";");if(r)for(var o=0;o<r.length;o++){var a=r[o].split("=");if(a.length>1&&a[0]&&a[0].trim()===t){for(var i=rn(a[1]),c=i[0],u=i[1];c;)c=(e=rn(u))[0],u=e[1];return n?u.endsWith("".concat("~","1"))?u.substring(0,u.length-2):null:u}}}return null}function rn(t){try{var n=decodeURIComponent(t);return[n!=t,n]}catch(t){}return[!1,t]}function on(t,n,e){if((a.track||""==n)&&(navigator&&navigator.cookieEnabled||Kt(document,"cookie"))){var r=function(t){return encodeURIComponent(t)}(n),o=new Date;o.setDate(o.getDate()+e);var i=o?"expires="+o.toUTCString():"",c="".concat(t,"=").concat(r).concat(";").concat(i).concat(";path=/");try{if(null===Vt){for(var u=location.hostname?location.hostname.split("."):[],s=u.length-1;s>=0;s--)if(Vt=".".concat(u[s]).concat(Vt||""),s<u.length-1&&(document.cookie="".concat(c).concat(";").concat("domain=").concat(Vt),en(t)===n))return;Vt=""}}catch(t){Vt=""}document.cookie=Vt?"".concat(c).concat(";").concat("domain=").concat(Vt):c}}var an,cn=null;function un(){var t=Ut;cn={version:s,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0,applicationPlatform:0,url:""}}function sn(){cn=null}function ln(t){return cn.start=cn.start+cn.duration,cn.duration=u()-cn.start,cn.sequence++,cn.upload=t&&"sendBeacon"in navigator?1:0,cn.end=t?1:0,cn.applicationPlatform=0,cn.url=h(location.href,!1,!0),[cn.version,cn.sequence,cn.start,cn.duration,cn.projectId,cn.userId,cn.sessionId,cn.pageNum,cn.upload,cn.end,cn.applicationPlatform,cn.url]}function dn(){an=[]}function pn(t){if(an&&-1===an.indexOf(t.message)){var n=a.report;if(n&&n.length>0){var e={v:cn.version,p:cn.projectId,u:cn.userId,s:cn.sessionId,n:cn.pageNum};t.message&&(e.m=t.message),t.stack&&(e.e=t.stack);var r=new XMLHttpRequest;r.open("POST",n,!0),r.send(JSON.stringify(e)),an.push(t.message)}}return t}function fn(t){return function(){var n=performance.now();try{t.apply(this,arguments)}catch(t){throw pn(t)}var e=performance.now()-n;x(4,e),e>30&&(T(7),j(6,e),"".concat(t.dn||t.name,"-").concat(e))}}var hn=[];function vn(t,n,e,r){void 0===r&&(r=!1),e=fn(e);try{t[i("addEventListener")](n,e,r),hn.push({event:n,target:t,listener:e,capture:r})}catch(t){}}function gn(){for(var t=0,n=hn;t<n.length;t++){var e=n[t];try{e.target[i("removeEventListener")](e.event,e.listener,e.capture)}catch(t){}}hn=[]}var mn=null,yn=null,bn=null,wn=0;function kn(){return!(wn++>20)}function Sn(){Sn.dn=1,wn=0,bn!==En()&&(oe(),window.setTimeout(_n,250))}function _n(){re(),j(29,1)}function En(){return location.href?location.href.replace(location.hash,""):location.href}var In=[],Mn=null,On=null,Tn=null;function xn(){On&&(Tn(),On=null,null===Mn&&zn())}function jn(){In=[],Mn=null,On=null}function zn(){var t=In.shift();t&&(Mn=t,t.task().then((function(){t.id===Jt()&&(t.resolve(),Mn=null,zn())})).catch((function(n){t.id===Jt()&&(n&&(n.name,n.message,n.stack),Mn=null,zn())})))}var Cn=!1;function An(){Cn=!0,c=performance.now()+performance.timeOrigin,jn(),gn(),dn(),bn=En(),wn=0,vn(window,"popstate",Sn),null===mn&&(mn=history.pushState,history.pushState=function(){mn.apply(this,arguments),Nn()&&kn()&&Sn()}),null===yn&&(yn=history.replaceState,history.replaceState=function(){yn.apply(this,arguments),Nn()&&kn()&&Sn()})}function qn(){bn=null,wn=0,dn(),gn(),jn(),c=0,Cn=!1}function Nn(){return Cn}function Pn(){Pn.dn=2,re(),E("clarity","restart")}var Dn=null;function Rn(){Dn=null}function Un(t){Dn={fetchStart:Math.round(t.fetchStart),connectStart:Math.round(t.connectStart),connectEnd:Math.round(t.connectEnd),requestStart:Math.round(t.requestStart),responseStart:Math.round(t.responseStart),responseEnd:Math.round(t.responseEnd),domInteractive:Math.round(t.domInteractive),domComplete:Math.round(t.domComplete),loadEventStart:Math.round(t.loadEventStart),loadEventEnd:Math.round(t.loadEventEnd),redirectCount:Math.round(t.redirectCount),size:t.transferSize?t.transferSize:0,type:t.type,protocol:t.nextHopProtocol,encodedSize:t.encodedBodySize?t.encodedBodySize:0,decodedSize:t.decodedBodySize?t.decodedBodySize:0},function(t){V(this,void 0,void 0,(function(){var n,e;return X(this,(function(r){return n=u(),e=[n,t],29===t&&(e.push(Dn.fetchStart),e.push(Dn.connectStart),e.push(Dn.connectEnd),e.push(Dn.requestStart),e.push(Dn.responseStart),e.push(Dn.responseEnd),e.push(Dn.domInteractive),e.push(Dn.domComplete),e.push(Dn.loadEventStart),e.push(Dn.loadEventEnd),e.push(Dn.redirectCount),e.push(Dn.size),e.push(Dn.type),e.push(Dn.protocol),e.push(Dn.encodedSize),e.push(Dn.decodedSize),Rn(),yt(e)),[2]}))}))}(29)}var Hn,Ln=0,Vn=1/0,Xn=0,Bn=0,Wn=[],Jn=new Map,Yn=function(){return Ln||0},Zn=function(){if(!Wn.length)return-1;var t=Math.min(Wn.length-1,Math.floor((Yn()-Bn)/50));return Wn[t].latency},Gn=function(){Bn=Yn(),Wn.length=0,Jn.clear()},Fn=function(t){if(t.interactionId&&!(t.duration<40)){!function(t){"interactionCount"in performance?Ln=performance.interactionCount:t.interactionId&&(Vn=Math.min(Vn,t.interactionId),Xn=Math.max(Xn,t.interactionId),Ln=Xn?(Xn-Vn)/7+1:0)}(t);var n=Wn[Wn.length-1],e=Jn.get(t.interactionId);if(e||Wn.length<10||t.duration>(null==n?void 0:n.latency)){if(e)t.duration>e.latency&&(e.latency=t.duration);else{var r={id:t.interactionId,latency:t.duration};Jn.set(r.id,r),Wn.push(r)}Wn.sort((function(t,n){return n.latency-t.latency})),Wn.length>10&&Wn.splice(10).forEach((function(t){return Jn.delete(t.id)}))}}},Kn=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint","event"];function Qn(){Qn.dn=26;try{Hn&&Hn.disconnect(),Hn=new PerformanceObserver(fn($n));for(var t=0,n=Kn;t<n.length;t++){var e=n[t];PerformanceObserver.supportedEntryTypes.indexOf(e)>=0&&("layout-shift"===e&&x(9,0),Hn.observe({type:e,buffered:!0}))}}catch(t){}}function $n(t){$n.dn=27,function(t){for(var n=(!("visibilityState"in document)||"visible"===document.visibilityState),e=0;e<t.length;e++){var r=t[e];switch(r.entryType){case"navigation":Un(r);break;case"resource":var o=r.name;Nt(4,te(o)),o!==a.upload&&o!==a.fallback||j(28,r.duration);break;case"longtask":T(7);break;case"first-input":n&&j(10,r.processingStart-r.startTime);break;case"event":n&&"PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&(Fn(r),Nt(37,Zn().toString()));break;case"layout-shift":n&&!r.hadRecentInput&&x(9,1e3*r.value);break;case"largest-contentful-paint":n&&j(8,r.startTime)}}}(t.getEntries())}function te(t){var n=document.createElement("a");return n.href=t,n.host}var ne=Object.freeze({__proto__:null,start:function t(){t.dn=25,Rn(),function(){navigator&&"connection"in navigator&&Nt(27,navigator.connection.effectiveType),window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&("complete"!==document.readyState?vn(window,"load",z.bind(this,Qn,0)):Qn())}()},stop:function(){Hn&&Hn.disconnect(),Hn=null,Gn(),Rn()}}),ee=[S,S,S,ne];function re(t){void 0===t&&(t=null),function(){try{var t=navigator&&"globalPrivacyControl"in navigator&&1==navigator.globalPrivacyControl;return!1===Cn&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap&&!t}catch(t){return!1}}()&&(!function(t){if(null===t||Cn)return!1;for(var n in t)n in a&&(a[n]=t[n])}(t),An(),ot(),ee.forEach((function(t){return fn(t.start)()})),null===t&&ue())}function oe(){Nn()&&(ee.slice().reverse().forEach((function(t){return fn(t.stop)()})),at(),qn(),void 0!==ie&&(ie[ce]=function(){(ie[ce].q=ie[ce].q||[]).push(arguments),"start"===arguments[0]&&ie[ce].q.unshift(ie[ce].q.pop())&&ue()}))}var ae=Object.freeze({__proto__:null,consent:Yt,event:E,hashText:w,identify:J,metadata:Wt,pause:function(){Nn()&&(E("clarity","pause"),null===On&&(On=new Promise((function(t){Tn=t}))))},resume:function(){Nn()&&(xn(),E("clarity","resume"))},set:W,signal:function(t){nt=t},start:re,stop:oe,upgrade:H,version:s}),ie=window,ce="clarity";function ue(){if(void 0!==ie){if(ie[ce]&&ie[ce].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=ie[ce]&&ie[ce].q||[];for(ie[ce]=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return ae[t].apply(ae,n)},ie[ce].v=s;t.length>0;)ie[ce].apply(ie,t.shift())}}ue()}();
1
+ !function(){"use strict";var t=Object.freeze({__proto__:null,get queue(){return yt},get start(){return mt},get stop(){return bt},get track(){return dt}}),n=Object.freeze({__proto__:null,get check(){return Mt},get compute(){return Tt},get data(){return pt},get start(){return It},get stop(){return xt},get trigger(){return Ot}}),e=Object.freeze({__proto__:null,get compute(){return Pt},get data(){return jt},get log(){return Nt},get reset(){return Dt},get start(){return At},get stop(){return qt},get updates(){return zt}}),r=Object.freeze({__proto__:null,get callback(){return Gt},get callbacks(){return Ht},get clear(){return Zt},get consent(){return Yt},get data(){return Ut},get electron(){return Lt},get id(){return Jt},get metadata(){return Wt},get save(){return Ft},get shortid(){return $t},get start(){return Xt},get stop(){return Bt}}),o=Object.freeze({__proto__:null,get data(){return cn},get envelope(){return ln},get start(){return un},get stop(){return sn}}),a={projectId:null,delay:1e3,lean:!1,track:!0,content:!0,drop:[],mask:[],unmask:[],regions:[],cookies:[],fraud:!0,checksum:[],report:null,upload:null,fallback:null,upgrade:null,action:null,dob:null,delayDom:!1,throttleDom:!0,conversions:!1,includeSubdomains:!0,throttleMutations:!1,dropMutations:!1,criticalMs:200,discard:[]};function i(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var c=0;function u(t){void 0===t&&(t=null);var n=t&&t.timeStamp>0?t.timeStamp:performance.now(),e=t&&t.view?t.view.performance.timeOrigin:performance.timeOrigin;return Math.max(Math.round(n+e-c),0)}var s="0.7.68";var l=255,d=!0,p=null,f=null;function h(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var r=t;if(n)r="".concat("https://").concat("Electron");else{var o=a.drop;if(o&&o.length>0&&t&&t.indexOf("?")>0){var i=t.split("?"),c=i[0],u=i[1];r=c+"?"+u.split("&").map((function(t){return o.some((function(n){return 0===t.indexOf("".concat(n,"="))}))?"".concat(t.split("=")[0],"=").concat("*na*"):t})).join("&")}}return e&&(r=r.substring(0,l)),r}function v(t,n,e){return function(){if(d&&null===p)try{p=new RegExp("\\p{N}","gu"),f=new RegExp("\\p{L}","gu"),new RegExp("\\p{Sc}","gu")}catch(t){d=!1}}(),t?t.replace(f,n).replace(p,e):t}var g=[],m=null;function y(){}var b=[];function w(){}function k(){}var S=Object.freeze({__proto__:null,checkDocumentStyles:function(t){},compute:function(){},data:m,hashText:w,keys:b,log:y,observe:function(){},reset:function(){},sheetAdoptionState:[],sheetUpdateState:[],start:function(){},state:g,stop:function(){},trigger:k}),_=null;function E(t,n){Nn()&&t&&"string"==typeof t&&t.length<255&&(_=n&&"string"==typeof n&&n.length<255?{key:t,value:n}:{value:t},Et(24))}var I,M=null,O=null;function T(t){t in M||(M[t]=0),t in O||(O[t]=0),M[t]++,O[t]++}function x(t,n){null!==n&&(t in M||(M[t]=0),t in O||(O[t]=0),M[t]+=n,O[t]+=n)}function j(t,n){null!==n&&!1===isNaN(n)&&(t in M||(M[t]=0),(n>M[t]||0===M[t])&&(O[t]=n,M[t]=n))}function z(t,n,e){return window.setTimeout(fn(t),n,e)}function C(t){return window.clearTimeout(t)}var A=0,q=0,N=null;function P(){N&&C(N),N=z(D,q),A=u()}function D(){var t=u();I={gap:t-A},Et(25),I.gap<3e5?N=z(D,q):Cn&&(E("clarity","suspend"),oe(),["mousemove","touchstart"].forEach((function(t){return vn(document,t,Pn)})),["resize","scroll","pageshow"].forEach((function(t){return vn(window,t,Pn)})))}var R=Object.freeze({__proto__:null,get data(){return I},reset:P,start:function(){q=6e4,A=0},stop:function(){C(N),A=0,q=0}}),U=null;function H(t){Nn()&&a.lean&&(a.lean=!1,U={key:t},Gt(),Ft(),a.upgrade&&a.upgrade(t),Et(3))}var L=Object.freeze({__proto__:null,get data(){return U},start:function(){!a.lean&&a.upgrade&&a.upgrade("Config"),U=null},stop:function(){U=null},upgrade:H});function V(t,n,e,r){return new(e||(e=Promise))((function(o,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(i,c)}u((r=r.apply(t,n||[])).next())}))}function X(t,n){var e,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(u){return function(c){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=n.call(t,i)}catch(t){c=[6,t],r=0}finally{e=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}var B=null;function W(t,n){Y(t,"string"==typeof n?[n]:n)}function J(t,n,e,r){return void 0===n&&(n=null),void 0===e&&(e=null),void 0===r&&(r=null),V(this,void 0,void 0,(function(){var o,a;return X(this,(function(i){switch(i.label){case 0:return a={},[4,F(t)];case 1:return a.userId=i.sent(),a.userHint=r||((c=t)&&c.length>=5?"".concat(c.substring(0,2)).concat(v(c.substring(2),"*","*")):v(c,"*","*")),Y("userId",[(o=a).userId]),Y("userHint",[o.userHint]),Y("userType",[K(t)]),n&&(Y("sessionId",[n]),o.sessionId=n),e&&(Y("pageId",[e]),o.pageId=e),[2,o]}var c}))}))}function Y(t,n){if(Nn()&&t&&n&&"string"==typeof t&&t.length<255){for(var e=(t in B?B[t]:[]),r=0;r<n.length;r++)"string"==typeof n[r]&&n[r].length<255&&e.push(n[r]);B[t]=e}}function Z(){Et(34)}function G(){B={}}function F(t){return V(this,void 0,void 0,(function(){var n;return X(this,(function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),crypto&&t?[4,crypto.subtle.digest("SHA-256",(new TextEncoder).encode(t))]:[3,2];case 1:return n=e.sent(),[2,Array.prototype.map.call(new Uint8Array(n),(function(t){return("00"+t.toString(16)).slice(-2)})).join("")];case 2:return[2,""];case 3:return[3,5];case 4:return e.sent(),[2,""];case 5:return[2]}}))}))}function K(t){return t&&t.indexOf("@")>0?"email":"string"}var Q="CompressionStream"in window;function $(t){return V(this,void 0,void 0,(function(){var n,e;return X(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),Q?(n=new ReadableStream({start:function(n){return V(this,void 0,void 0,(function(){return X(this,(function(e){return n.enqueue(t),n.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),e=Uint8Array.bind,[4,tt(n)]):[3,2];case 1:return[2,new(e.apply(Uint8Array,[void 0,r.sent()]))];case 2:return[3,4];case 3:return r.sent(),[3,4];case 4:return[2,null]}}))}))}function tt(t){return V(this,void 0,void 0,(function(){var n,e,r,o,a;return X(this,(function(i){switch(i.label){case 0:n=t.getReader(),e=[],r=!1,o=[],i.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return a=i.sent(),r=a.done,o=a.value,r?[2,e]:(e.push.apply(e,o),[3,1]);case 3:return[2,e]}}))}))}var nt=null;function et(t){try{if(!nt)return;var n=function(t){try{return JSON.parse(t)}catch(t){return[]}}(t);n.forEach((function(t){nt(t)}))}catch(t){}}var rt=[S,e,Object.freeze({__proto__:null,compute:Z,get data(){return B},identify:J,reset:G,set:W,start:function(){G()},stop:function(){G()}}),n,S,r,o,t,R,L,S];function ot(){M={},O={},T(5),rt.forEach((function(t){return fn(t.start)()}))}function at(){rt.slice().reverse().forEach((function(t){return fn(t.stop)()})),M={},O={}}function it(){Z(),Pt(),Et(0),Tt()}var ct,ut,st,lt,dt,pt,ft=0,ht=0,vt=null,gt=0;function mt(){lt=!0,ft=0,ht=0,gt=0,ct=[],ut=[],st={},dt=null}function yt(t,n){if(void 0===n&&(n=!0),lt){var e=u(),r=t.length>1?t[1]:null,o=JSON.stringify(t);switch(r){case 5:ft+=o.length;case 37:case 6:case 43:case 45:case 46:ht+=o.length,ct.push(o);break;default:ut.push(o)}T(25);var i=function(){var t=!1===a.lean&&ft>0?100:cn.sequence*a.delay;return"string"==typeof a.upload?Math.max(Math.min(t,3e4),100):a.delay}();e-gt>2*i&&(C(vt),vt=null),n&&null===vt&&(25!==r&&P(),vt=z(wt,i),gt=e,Mt(ht))}}function bt(){C(vt),wt(!0),ft=0,ht=0,gt=0,ct=[],ut=[],st={},dt=null,lt=!1}function wt(t){return void 0===t&&(t=!1),V(this,void 0,void 0,(function(){var n,e,r,o,i,c,u,s;return X(this,(function(l){switch(l.label){case 0:return vt=null,(n=!1===a.lean&&ht>0&&(ht<1048576||cn.sequence>0))&&j(1,1),it(),e=!0===t,r=JSON.stringify(ln(e)),o="[".concat(ut.join(),"]"),i=n?"[".concat(ct.join(),"]"):"",c=function(t){return t.p.length>0?'{"e":'.concat(t.e,',"a":').concat(t.a,',"p":').concat(t.p,"}"):'{"e":'.concat(t.e,',"a":').concat(t.a,"}")}({e:r,a:o,p:i}),e?(s=null,[3,3]):[3,1];case 1:return[4,$(c)];case 2:s=l.sent(),l.label=3;case 3:return x(2,(u=s)?u.length:c.length),kt(c,u,cn.sequence,e),ut=[],n&&(ct=[],ht=0,ft=0),[2]}}))}))}function kt(t,n,e,r){if(void 0===r&&(r=!1),"string"==typeof a.upload){var o=a.upload,i=!1;if(r&&"sendBeacon"in navigator)try{(i=navigator.sendBeacon.bind(navigator)(o,t))&&_t(e)}catch(t){}if(!1===i){e in st?st[e].attempts++:st[e]={data:t,attempts:1};var c=new XMLHttpRequest;c.open("POST",o,!0),c.timeout=15e3,c.ontimeout=function(){pn(new Error("".concat("Timeout"," : ").concat(o)))},null!==e&&(c.onreadystatechange=function(){fn(St)(c,e)}),c.withCredentials=!0,n?(c.setRequestHeader("Accept","application/x-clarity-gzip"),c.send(n)):c.send(t)}}else if(a.upload){(0,a.upload)(t),_t(e)}}function St(t,n){var e=st[n];t&&4===t.readyState&&e&&((t.status<200||t.status>208)&&e.attempts<=1?t.status>=400&&t.status<500?Ot(6):(0===t.status&&(a.upload=a.fallback?a.fallback:a.upload),kt(e.data,null,n)):(dt={sequence:n,attempts:e.attempts,status:t.status},e.attempts>1&&Et(2),200===t.status&&t.responseText&&function(t){for(var n=t&&t.length>0?t.split("\n"):[],e=0,r=n;e<r.length;e++){var o=r[e],i=o&&o.length>0?o.split(/ (.*)/):[""];switch(i[0]){case"END":Ot(6);break;case"UPGRADE":H("Auto");break;case"ACTION":a.action&&i.length>1&&a.action(i[1]);break;case"EXTRACT":i.length>1&&i[1];break;case"SIGNAL":i.length>1&&et(i[1])}}}(t.responseText),0===t.status&&(kt(e.data,null,n,!0),Ot(3)),t.status>=200&&t.status<=208&&_t(n),delete st[n]))}function _t(t){1===t&&(Ft(),Gt())}function Et(t){var n=[u(),t];switch(t){case 4:var e=g;e&&((n=[e.time,e.event]).push(e.data.visible),n.push(e.data.docWidth),n.push(e.data.docHeight),n.push(e.data.screenWidth),n.push(e.data.screenHeight),n.push(e.data.scrollX),n.push(e.data.scrollY),n.push(e.data.pointerX),n.push(e.data.pointerY),n.push(e.data.activityTime),n.push(e.data.scrollTime),n.push(e.data.pointerTime),n.push(e.data.moveX),n.push(e.data.moveY),n.push(e.data.moveTime),n.push(e.data.downX),n.push(e.data.downY),n.push(e.data.downTime),yt(n,!1));break;case 25:n.push(I.gap),yt(n);break;case 35:n.push(pt.check),yt(n,!1);break;case 3:n.push(U.key),yt(n);break;case 2:n.push(dt.sequence),n.push(dt.attempts),n.push(dt.status),yt(n,!1);break;case 24:_.key&&n.push(_.key),n.push(_.value),yt(n);break;case 34:var r=Object.keys(B);if(r.length>0){for(var o=0,a=r;o<a.length;o++){var i=a[o];n.push(i),n.push(B[i])}G(),yt(n,!1)}break;case 0:var c=Object.keys(O);if(c.length>0){for(var s=0,l=c;s<l.length;s++){var d=l[s],p=parseInt(d,10);n.push(p),n.push(Math.round(O[d]))}O={},yt(n,!1)}break;case 1:var f=Object.keys(zt);if(f.length>0){for(var h=0,v=f;h<v.length;h++){var y=v[h];p=parseInt(y,10);n.push(p),n.push(zt[y])}Dt(),yt(n,!1)}break;case 36:var w=Object.keys(m);if(w.length>0){for(var k=0,S=w;k<S.length;k++){var E=S[k];p=parseInt(E,10);n.push(p),n.push([].concat.apply([],m[E]))}yt(n,!1)}break;case 40:b.forEach((function(t){n.push(t);var e=[];for(var r in m[t]){var o=parseInt(r,10);e.push(o),e.push(m[t][r])}n.push(e)})),yt(n,!1)}}function It(){pt={check:0}}function Mt(t){if(0===pt.check){var n=pt.check;n=cn.sequence>=128?1:n,n=cn.pageNum>=128?7:n,n=u()>72e5?2:n,(n=t>10485760?2:n)!==pt.check&&Ot(n)}}function Ot(t){pt.check=t,5!==t&&(Zt(),oe())}function Tt(){0!==pt.check&&Et(35)}function xt(){pt=null}var jt=null,zt=null,Ct=!1;function At(){jt={},zt={},Ct=!1}function qt(){jt={},zt={},Ct=!1}function Nt(t,n){if(n&&(n="".concat(n),t in jt||(jt[t]=[]),jt[t].indexOf(n)<0)){if(jt[t].length>128)return void(Ct||(Ct=!0,Ot(5)));jt[t].push(n),t in zt||(zt[t]=[]),zt[t].push(n)}}function Pt(){Et(1)}function Dt(){zt={},Ct=!1}function Rt(t){Nt(36,t.toString())}var Ut=null,Ht=[],Lt=0,Vt=null;function Xt(){var t,n,e;Vt=null;var r=navigator&&"userAgent"in navigator?navigator.userAgent:"",o=null!==(e=null===(n=null===(t=null===Intl||void 0===Intl?void 0:Intl.DateTimeFormat())||void 0===t?void 0:t.resolvedOptions())||void 0===n?void 0:n.timeZone)&&void 0!==e?e:"",i=(new Date).getTimezoneOffset().toString(),c=window.location.ancestorOrigins?Array.from(window.location.ancestorOrigins).toString():"",u=document&&document.title?document.title:"";Lt=r.indexOf("Electron")>0?1:0;var s,l=function(){var t={session:$t(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},n=en("_clsk",!a.includeSubdomains);if(n){var e=n.split("|");e.length>=5&&t.ts-tn(e[1])<18e5&&(t.session=e[0],t.count=tn(e[2])+1,t.upgrade=tn(e[3]),t.upload=e.length>=6?"".concat("https://").concat(e[5],"/").concat(e[4]):"".concat("https://").concat(e[4]))}return t}(),d=nn(),p=a.projectId||function(t,n){void 0===n&&(n=null);for(var e,r=5381,o=r,a=0;a<t.length;a+=2)r=(r<<5)+r^t.charCodeAt(a),a+1<t.length&&(o=(o<<5)+o^t.charCodeAt(a+1));return e=Math.abs(r+11579*o),(n?e%Math.pow(2,n):e).toString(36)}(location.host);Ut={projectId:p,userId:d.id,sessionId:l.session,pageNum:l.count},a.lean=a.track&&null!==l.upgrade?0===l.upgrade:a.lean,a.upload=a.track&&"string"==typeof a.upload&&l.upload&&l.upload.length>"https://".length?l.upload:a.upload,Nt(0,r),Nt(3,u),Nt(1,h(location.href,!!Lt)),Nt(2,document.referrer),Nt(15,function(){var t=$t();if(a.track&&Kt(window,"sessionStorage")){var n=sessionStorage.getItem("_cltk");t=n||t,sessionStorage.setItem("_cltk",t)}return t}()),Nt(16,document.documentElement.lang),Nt(17,document.dir),Nt(26,"".concat(window.devicePixelRatio)),Nt(28,d.dob.toString()),Nt(29,d.version.toString()),Nt(33,c),Nt(34,o),Nt(35,i),j(0,l.ts),j(1,0),j(35,Lt),navigator&&(Nt(9,navigator.language),j(33,navigator.hardwareConcurrency),j(32,navigator.maxTouchPoints),j(34,Math.round(navigator.deviceMemory)),(s=navigator.userAgentData)&&s.getHighEntropyValues?s.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var n;Nt(22,t.platform),Nt(23,t.platformVersion),null===(n=t.brands)||void 0===n||n.forEach((function(t){Nt(24,t.name+"~"+t.version)})),Nt(25,t.model),j(27,t.mobile?1:0)})):Nt(22,navigator.platform)),screen&&(j(14,Math.round(screen.width)),j(15,Math.round(screen.height)),j(16,Math.round(screen.colorDepth)));for(var f=0,v=a.cookies;f<v.length;f++){var g=v[f],m=en(g);m&&W(g,m)}!function(t){Rt(t?1:0)}(a.track),Qt(d)}function Bt(){Vt=null,Ut=null,Ht.forEach((function(t){t.called=!1}))}function Wt(t,n,e){void 0===n&&(n=!0),void 0===e&&(e=!1);var r=a.lean?0:1,o=!1;Ut&&(r||!1===n)&&(t(Ut,!a.lean),o=!0),!e&&o||Ht.push({callback:t,wait:n,recall:e,called:o})}function Jt(){return Ut?[Ut.userId,Ut.sessionId,Ut.pageNum].join("."):""}function Yt(t){if(void 0===t&&(t=!0),!t)return a.track=!1,on("_clsk","",-Number.MAX_VALUE),on("_clck","",-Number.MAX_VALUE),oe(),void window.setTimeout(re,250);Nn()&&(a.track=!0,Qt(nn(),1),Ft(),Rt(2))}function Zt(){on("_clsk","",0)}function Gt(){!function(t){if(Ht.length>0)for(var n=0;n<Ht.length;n++){var e=Ht[n];!e.callback||e.called||e.wait&&!t||(e.callback(Ut,!a.lean),e.called=!0,e.recall||(Ht.splice(n,1),n--))}}(a.lean?0:1)}function Ft(){if(Ut){var t=Math.round(Date.now()),n=a.upload&&"string"==typeof a.upload?a.upload.replace("https://",""):"",e=a.lean?0:1;on("_clsk",[Ut.sessionId,t,Ut.pageNum,e,n].join("|"),1)}}function Kt(t,n){try{return!!t[n]}catch(t){return!1}}function Qt(t,n){void 0===n&&(n=null),n=null===n?t.consent:n;var e=Math.ceil((Date.now()+31536e6)/864e5),r=0===t.dob?null===a.dob?0:a.dob:t.dob;(null===t.expiry||Math.abs(e-t.expiry)>=1||t.consent!==n||t.dob!==r)&&on("_clck",[Ut.userId,2,e.toString(36),n,r].join("|"),365)}function $t(){var t=Math.floor(Math.random()*Math.pow(2,32));return window&&window.crypto&&window.crypto.getRandomValues&&Uint32Array&&(t=window.crypto.getRandomValues(new Uint32Array(1))[0]),t.toString(36)}function tn(t,n){return void 0===n&&(n=10),parseInt(t,n)}function nn(){var t={id:$t(),version:0,expiry:null,consent:0,dob:0},n=en("_clck",!a.includeSubdomains);if(n&&n.length>0){for(var e=n.split("|"),r=0,o=0,i=document.cookie.split(";");o<i.length;o++){r+="_clck"===i[o].split("=")[0].trim()?1:0}if(1===e.length||r>1){var c="".concat(";").concat("expires=").concat(new Date(0).toUTCString()).concat(";path=/");document.cookie="".concat("_clck","=").concat(c),document.cookie="".concat("_clsk","=").concat(c)}e.length>1&&(t.version=tn(e[1])),e.length>2&&(t.expiry=tn(e[2],36)),e.length>3&&1===tn(e[3])&&(t.consent=1),e.length>4&&tn(e[1])>1&&(t.dob=tn(e[4])),a.track=a.track||1===t.consent,t.id=a.track?e[0]:t.id}return t}function en(t,n){var e;if(void 0===n&&(n=!1),Kt(document,"cookie")){var r=document.cookie.split(";");if(r)for(var o=0;o<r.length;o++){var a=r[o].split("=");if(a.length>1&&a[0]&&a[0].trim()===t){for(var i=rn(a[1]),c=i[0],u=i[1];c;)c=(e=rn(u))[0],u=e[1];return n?u.endsWith("".concat("~","1"))?u.substring(0,u.length-2):null:u}}}return null}function rn(t){try{var n=decodeURIComponent(t);return[n!=t,n]}catch(t){}return[!1,t]}function on(t,n,e){if((a.track||""==n)&&(navigator&&navigator.cookieEnabled||Kt(document,"cookie"))){var r=function(t){return encodeURIComponent(t)}(n),o=new Date;o.setDate(o.getDate()+e);var i=o?"expires="+o.toUTCString():"",c="".concat(t,"=").concat(r).concat(";").concat(i).concat(";path=/");try{if(null===Vt){for(var u=location.hostname?location.hostname.split("."):[],s=u.length-1;s>=0;s--)if(Vt=".".concat(u[s]).concat(Vt||""),s<u.length-1&&(document.cookie="".concat(c).concat(";").concat("domain=").concat(Vt),en(t)===n))return;Vt=""}}catch(t){Vt=""}document.cookie=Vt?"".concat(c).concat(";").concat("domain=").concat(Vt):c}}var an,cn=null;function un(){var t=Ut;cn={version:s,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0,applicationPlatform:0,url:""}}function sn(){cn=null}function ln(t){return cn.start=cn.start+cn.duration,cn.duration=u()-cn.start,cn.sequence++,cn.upload=t&&"sendBeacon"in navigator?1:0,cn.end=t?1:0,cn.applicationPlatform=0,cn.url=h(location.href,!1,!0),[cn.version,cn.sequence,cn.start,cn.duration,cn.projectId,cn.userId,cn.sessionId,cn.pageNum,cn.upload,cn.end,cn.applicationPlatform,cn.url]}function dn(){an=[]}function pn(t){if(an&&-1===an.indexOf(t.message)){var n=a.report;if(n&&n.length>0){var e={v:cn.version,p:cn.projectId,u:cn.userId,s:cn.sessionId,n:cn.pageNum};t.message&&(e.m=t.message),t.stack&&(e.e=t.stack);var r=new XMLHttpRequest;r.open("POST",n,!0),r.send(JSON.stringify(e)),an.push(t.message)}}return t}function fn(t){return function(){var n=performance.now();try{t.apply(this,arguments)}catch(t){throw pn(t)}var e=performance.now()-n;x(4,e),e>30&&(T(7),j(6,e),"".concat(t.dn||t.name,"-").concat(e))}}var hn=[];function vn(t,n,e,r,o){void 0===r&&(r=!1),void 0===o&&(o=!0),e=fn(e);try{t[i("addEventListener")](n,e,{capture:r,passive:o}),hn.push({event:n,target:t,listener:e,options:{capture:r,passive:o}})}catch(t){}}function gn(){for(var t=0,n=hn;t<n.length;t++){var e=n[t];try{e.target[i("removeEventListener")](e.event,e.listener,{capture:e.options.capture,passive:e.options.passive})}catch(t){}}hn=[]}var mn=null,yn=null,bn=null,wn=0;function kn(){return!(wn++>20)}function Sn(){Sn.dn=1,wn=0,bn!==En()&&(oe(),window.setTimeout(_n,250))}function _n(){re(),j(29,1)}function En(){return location.href?location.href.replace(location.hash,""):location.href}var In=[],Mn=null,On=null,Tn=null;function xn(){On&&(Tn(),On=null,null===Mn&&zn())}function jn(){In=[],Mn=null,On=null}function zn(){var t=In.shift();t&&(Mn=t,t.task().then((function(){t.id===Jt()&&(t.resolve(),Mn=null,zn())})).catch((function(n){t.id===Jt()&&(n&&(n.name,n.message,n.stack),Mn=null,zn())})))}var Cn=!1;function An(){Cn=!0,c=performance.now()+performance.timeOrigin,jn(),gn(),dn(),bn=En(),wn=0,vn(window,"popstate",Sn),null===mn&&(mn=history.pushState,history.pushState=function(){mn.apply(this,arguments),Nn()&&kn()&&Sn()}),null===yn&&(yn=history.replaceState,history.replaceState=function(){yn.apply(this,arguments),Nn()&&kn()&&Sn()})}function qn(){bn=null,wn=0,dn(),gn(),jn(),c=0,Cn=!1}function Nn(){return Cn}function Pn(){Pn.dn=2,re(),E("clarity","restart")}var Dn=null;function Rn(){Dn=null}function Un(t){Dn={fetchStart:Math.round(t.fetchStart),connectStart:Math.round(t.connectStart),connectEnd:Math.round(t.connectEnd),requestStart:Math.round(t.requestStart),responseStart:Math.round(t.responseStart),responseEnd:Math.round(t.responseEnd),domInteractive:Math.round(t.domInteractive),domComplete:Math.round(t.domComplete),loadEventStart:Math.round(t.loadEventStart),loadEventEnd:Math.round(t.loadEventEnd),redirectCount:Math.round(t.redirectCount),size:t.transferSize?t.transferSize:0,type:t.type,protocol:t.nextHopProtocol,encodedSize:t.encodedBodySize?t.encodedBodySize:0,decodedSize:t.decodedBodySize?t.decodedBodySize:0},function(t){V(this,void 0,void 0,(function(){var n,e;return X(this,(function(r){return n=u(),e=[n,t],29===t&&(e.push(Dn.fetchStart),e.push(Dn.connectStart),e.push(Dn.connectEnd),e.push(Dn.requestStart),e.push(Dn.responseStart),e.push(Dn.responseEnd),e.push(Dn.domInteractive),e.push(Dn.domComplete),e.push(Dn.loadEventStart),e.push(Dn.loadEventEnd),e.push(Dn.redirectCount),e.push(Dn.size),e.push(Dn.type),e.push(Dn.protocol),e.push(Dn.encodedSize),e.push(Dn.decodedSize),Rn(),yt(e)),[2]}))}))}(29)}var Hn,Ln=0,Vn=1/0,Xn=0,Bn=0,Wn=[],Jn=new Map,Yn=function(){return Ln||0},Zn=function(){if(!Wn.length)return-1;var t=Math.min(Wn.length-1,Math.floor((Yn()-Bn)/50));return Wn[t].latency},Gn=function(){Bn=Yn(),Wn.length=0,Jn.clear()},Fn=function(t){if(t.interactionId&&!(t.duration<40)){!function(t){"interactionCount"in performance?Ln=performance.interactionCount:t.interactionId&&(Vn=Math.min(Vn,t.interactionId),Xn=Math.max(Xn,t.interactionId),Ln=Xn?(Xn-Vn)/7+1:0)}(t);var n=Wn[Wn.length-1],e=Jn.get(t.interactionId);if(e||Wn.length<10||t.duration>(null==n?void 0:n.latency)){if(e)t.duration>e.latency&&(e.latency=t.duration);else{var r={id:t.interactionId,latency:t.duration};Jn.set(r.id,r),Wn.push(r)}Wn.sort((function(t,n){return n.latency-t.latency})),Wn.length>10&&Wn.splice(10).forEach((function(t){return Jn.delete(t.id)}))}}},Kn=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint","event"];function Qn(){Qn.dn=26;try{Hn&&Hn.disconnect(),Hn=new PerformanceObserver(fn($n));for(var t=0,n=Kn;t<n.length;t++){var e=n[t];PerformanceObserver.supportedEntryTypes.indexOf(e)>=0&&("layout-shift"===e&&x(9,0),Hn.observe({type:e,buffered:!0}))}}catch(t){}}function $n(t){$n.dn=27,function(t){for(var n=(!("visibilityState"in document)||"visible"===document.visibilityState),e=0;e<t.length;e++){var r=t[e];switch(r.entryType){case"navigation":Un(r);break;case"resource":var o=r.name;Nt(4,te(o)),o!==a.upload&&o!==a.fallback||j(28,r.duration);break;case"longtask":T(7);break;case"first-input":n&&j(10,r.processingStart-r.startTime);break;case"event":n&&"PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&(Fn(r),Nt(37,Zn().toString()));break;case"layout-shift":n&&!r.hadRecentInput&&x(9,1e3*r.value);break;case"largest-contentful-paint":n&&j(8,r.startTime)}}}(t.getEntries())}function te(t){var n=document.createElement("a");return n.href=t,n.host}var ne=Object.freeze({__proto__:null,start:function t(){t.dn=25,Rn(),function(){navigator&&"connection"in navigator&&Nt(27,navigator.connection.effectiveType),window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&("complete"!==document.readyState?vn(window,"load",z.bind(this,Qn,0)):Qn())}()},stop:function(){Hn&&Hn.disconnect(),Hn=null,Gn(),Rn()}}),ee=[S,S,S,ne];function re(t){void 0===t&&(t=null),function(){try{var t=navigator&&"globalPrivacyControl"in navigator&&1==navigator.globalPrivacyControl;return!1===Cn&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap&&!t}catch(t){return!1}}()&&(!function(t){if(null===t||Cn)return!1;for(var n in t)n in a&&(a[n]=t[n])}(t),An(),ot(),ee.forEach((function(t){return fn(t.start)()})),null===t&&ue())}function oe(){Nn()&&(ee.slice().reverse().forEach((function(t){return fn(t.stop)()})),at(),qn(),void 0!==ie&&(ie[ce]=function(){(ie[ce].q=ie[ce].q||[]).push(arguments),"start"===arguments[0]&&ie[ce].q.unshift(ie[ce].q.pop())&&ue()}))}var ae=Object.freeze({__proto__:null,consent:Yt,event:E,hashText:w,identify:J,metadata:Wt,pause:function(){Nn()&&(E("clarity","pause"),null===On&&(On=new Promise((function(t){Tn=t}))))},resume:function(){Nn()&&(xn(),E("clarity","resume"))},set:W,signal:function(t){nt=t},start:re,stop:oe,upgrade:H,version:s}),ie=window,ce="clarity";function ue(){if(void 0!==ie){if(ie[ce]&&ie[ce].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=ie[ce]&&ie[ce].q||[];for(ie[ce]=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return ae[t].apply(ae,n)},ie[ce].v=s;t.length>0;)ie[ce].apply(ie,t.shift())}}ue()}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clarity-js",
3
- "version": "0.7.67",
3
+ "version": "0.7.68",
4
4
  "description": "An analytics library that uses web page interactions to generate aggregated insights",
5
5
  "author": "Microsoft Corp.",
6
6
  "license": "MIT",
package/src/core/event.ts CHANGED
@@ -4,14 +4,16 @@ import measure from "./measure";
4
4
 
5
5
  let bindings: BrowserEvent[] = [];
6
6
 
7
- export function bind(target: EventTarget, event: string, listener: EventListener, capture: boolean = false): void {
8
- listener = measure(listener) as EventListener;
9
- // Wrapping following lines inside try / catch to cover edge cases where we might try to access an inaccessible element.
10
- // E.g. Iframe may start off as same-origin but later turn into cross-origin, and the following lines will throw an exception.
11
- try {
12
- target[api(Constant.AddEventListener)](event, listener, capture);
13
- bindings.push({ event, target, listener, capture });
14
- } catch { /* do nothing */ }
7
+ export function bind(target: EventTarget, event: string, listener: EventListener, capture: boolean = false, passive: boolean = true): void {
8
+ listener = measure(listener) as EventListener;
9
+ // Wrapping following lines inside try / catch to cover edge cases where we might try to access an inaccessible element.
10
+ // E.g. Iframe may start off as same-origin but later turn into cross-origin, and the following lines will throw an exception.
11
+ try {
12
+ target[api(Constant.AddEventListener)](event, listener, { capture, passive });
13
+ bindings.push({ event, target, listener, options: { capture, passive } });
14
+ } catch {
15
+ /* do nothing */
16
+ }
15
17
  }
16
18
 
17
19
  export function reset(): void {
@@ -19,8 +21,10 @@ export function reset(): void {
19
21
  for (let binding of bindings) {
20
22
  // Wrapping inside try / catch to avoid situations where the element may be destroyed before we get a chance to unbind
21
23
  try {
22
- binding.target[api(Constant.RemoveEventListener)](binding.event, binding.listener, binding.capture);
23
- } catch { /* do nothing */ }
24
+ binding.target[api(Constant.RemoveEventListener)](binding.event, binding.listener, { capture: binding.options.capture, passive: binding.options.passive });
25
+ } catch {
26
+ /* do nothing */
27
+ }
24
28
  }
25
29
  bindings = [];
26
30
  }
package/src/core/time.ts CHANGED
@@ -8,9 +8,9 @@ export function start(): void {
8
8
  // since iframes can be loaded later the event timestamp is not the same as performance.now()
9
9
  // converting everything to absolute time by adding timeorigin of the event view
10
10
  // to synchronize times before calculating the difference with start time
11
- export function time(event: UIEvent = null): number {
11
+ export function time(event: UIEvent | PageTransitionEvent = null): number {
12
12
  let ts = event && event.timeStamp > 0 ? event.timeStamp : performance.now();
13
- let origin = event && event.view ? event.view.performance.timeOrigin : performance.timeOrigin;
13
+ let origin = event && (event as UIEvent).view ? (event as UIEvent).view.performance.timeOrigin : performance.timeOrigin;
14
14
  return Math.max(Math.round(ts + origin - startTime), 0);
15
15
  }
16
16
 
@@ -1,2 +1,2 @@
1
- let version = "0.7.67";
1
+ let version = "0.7.68";
2
2
  export default version;
@@ -1,5 +1,5 @@
1
1
  import { BooleanFlag, Constant, Event, Setting } from "@clarity-types/data";
2
- import { BrowsingContext, ClickState } from "@clarity-types/interaction";
2
+ import { BrowsingContext, ClickState, TextInfo } from "@clarity-types/interaction";
3
3
  import { Box } from "@clarity-types/layout";
4
4
  import { FunctionNames } from "@clarity-types/performance";
5
5
  import { bind } from "@src/core/event";
@@ -55,6 +55,7 @@ function handler(event: Event, root: Node, evt: MouseEvent): void {
55
55
 
56
56
  // Check for null values before processing this event
57
57
  if (x !== null && y !== null) {
58
+ const textInfo = text(t);
58
59
  state.push({
59
60
  time: time(evt), event, data: {
60
61
  target: t,
@@ -65,10 +66,11 @@ function handler(event: Event, root: Node, evt: MouseEvent): void {
65
66
  button: evt.button,
66
67
  reaction: reaction(t),
67
68
  context: context(a),
68
- text: text(t),
69
+ text: textInfo.text,
69
70
  link: a ? a.href : null,
70
71
  hash: null,
71
- trust: evt.isTrusted ? BooleanFlag.True : BooleanFlag.False
72
+ trust: evt.isTrusted ? BooleanFlag.True : BooleanFlag.False,
73
+ isFullText: textInfo.isFullText,
72
74
  }
73
75
  });
74
76
  schedule(encode.bind(this, event));
@@ -88,19 +90,23 @@ function link(node: Node): HTMLAnchorElement {
88
90
  return null;
89
91
  }
90
92
 
91
- function text(element: Node): string {
93
+ function text(element: Node): TextInfo {
92
94
  let output = null;
95
+ let isFullText = false;
93
96
  if (element) {
94
97
  // Grab text using "textContent" for most HTMLElements, however, use "value" for HTMLInputElements and "alt" for HTMLImageElement.
95
98
  let t = element.textContent || String((element as HTMLInputElement).value || '') || (element as HTMLImageElement).alt;
96
99
  if (t) {
97
100
  // Replace multiple occurrence of space characters with a single white space
98
101
  // Also, trim any spaces at the beginning or at the end of string
102
+ const trimmedText = t.replace(/\s+/g, Constant.Space).trim();
99
103
  // Finally, send only first few characters as specified by the Setting
100
- output = t.replace(/\s+/g, Constant.Space).trim().substr(0, Setting.ClickText);
104
+ output = trimmedText.substring(0, Setting.ClickText);
105
+ isFullText = output.length === trimmedText.length;
101
106
  }
102
107
  }
103
- return output;
108
+
109
+ return { text: output, isFullText: isFullText ? BooleanFlag.True : BooleanFlag.False };
104
110
  }
105
111
 
106
112
  function reaction(element: Node): BooleanFlag {
@@ -67,6 +67,7 @@ export default async function (type: Event, ts: number = null): Promise<void> {
67
67
  tokens.push(scrub.url(entry.data.link));
68
68
  tokens.push(cHash);
69
69
  tokens.push(entry.data.trust);
70
+ tokens.push(entry.data.isFullText);
70
71
  queue(tokens);
71
72
  timeline.track(entry.time, entry.event, cHash, entry.data.x, entry.data.y, entry.data.reaction, entry.data.context);
72
73
  }
@@ -95,6 +96,7 @@ export default async function (type: Event, ts: number = null): Promise<void> {
95
96
  case Event.Unload:
96
97
  let u = unload.data;
97
98
  tokens.push(u.name);
99
+ tokens.push(u.persisted);
98
100
  unload.reset();
99
101
  queue(tokens);
100
102
  break;
@@ -1,4 +1,4 @@
1
- import { Event } from "@clarity-types/data";
1
+ import { BooleanFlag, Event } from "@clarity-types/data";
2
2
  import { UnloadData } from "@clarity-types/interaction";
3
3
  import { FunctionNames } from "@clarity-types/performance";
4
4
  import * as clarity from "@src/clarity";
@@ -12,9 +12,9 @@ export function start(): void {
12
12
  bind(window, "pagehide", recompute);
13
13
  }
14
14
 
15
- function recompute(evt: UIEvent): void {
15
+ function recompute(evt: PageTransitionEvent): void {
16
16
  recompute.dn = FunctionNames.UnloadRecompute;
17
- data = { name: evt.type };
17
+ data = { name: evt.type, persisted: evt.persisted ? BooleanFlag.True : BooleanFlag.False };
18
18
  encode(Event.Unload, time(evt));
19
19
  clarity.stop();
20
20
  }
@@ -1,7 +1,7 @@
1
1
  import { Event, Metric } from "@clarity-types/data";
2
2
  import { StyleSheetOperation, StyleSheetState } from "@clarity-types/layout";
3
3
  import { time } from "@src/core/time";
4
- import { shortid, data as metadataFields } from "@src/data/metadata";
4
+ import { shortid } from "@src/data/metadata";
5
5
  import encode from "@src/layout/encode";
6
6
  import { getId } from "@src/layout/dom";
7
7
  import * as core from "@src/core";
@@ -13,10 +13,10 @@ export let sheetAdoptionState: StyleSheetState[] = [];
13
13
  let replace: (text?: string) => Promise<CSSStyleSheet> = null;
14
14
  let replaceSync: (text?: string) => void = null;
15
15
  const styleSheetId = 'claritySheetId';
16
- const styleSheetPageNum = 'claritySheetNum';
17
16
  let styleSheetMap = {};
18
17
  let styleTimeMap: {[key: string]: number} = {};
19
18
  let documentNodes = [];
19
+ let createdSheetIds = [];
20
20
 
21
21
  export function start(): void {
22
22
  if (window['CSSStyleSheet'] && CSSStyleSheet.prototype) {
@@ -28,7 +28,7 @@ export function start(): void {
28
28
  // if we haven't seen this stylesheet on this page yet, wait until the checkDocumentStyles has found it
29
29
  // and attached the sheet to a document. This way the timestamp of the style sheet creation will align
30
30
  // to when it is used in the document rather than potentially being misaligned during the traverse process.
31
- if (this[styleSheetPageNum] === metadataFields.pageNum) {
31
+ if (createdSheetIds.indexOf(this[styleSheetId]) > -1) {
32
32
  trackStyleChange(time(), this[styleSheetId], StyleSheetOperation.Replace, arguments[0]);
33
33
  }
34
34
  }
@@ -44,7 +44,7 @@ export function start(): void {
44
44
  // if we haven't seen this stylesheet on this page yet, wait until the checkDocumentStyles has found it
45
45
  // and attached the sheet to a document. This way the timestamp of the style sheet creation will align
46
46
  // to when it is used in the document rather than potentially being misaligned during the traverse process.
47
- if (this[styleSheetPageNum] === metadataFields.pageNum) {
47
+ if (createdSheetIds.indexOf(this[styleSheetId]) > -1) {
48
48
  trackStyleChange(time(), this[styleSheetId], StyleSheetOperation.ReplaceSync, arguments[0]);
49
49
  }
50
50
  }
@@ -66,17 +66,17 @@ export function checkDocumentStyles(documentNode: Document, timestamp: number):
66
66
  metric.max(Metric.ConstructedStyles, 1);
67
67
  let currentStyleSheets: string[] = [];
68
68
  for (var styleSheet of documentNode.adoptedStyleSheets) {
69
- const pageNum = metadataFields.pageNum;
70
69
  // If we haven't seen this style sheet on this page yet, we create a reference to it for the visualizer.
71
70
  // For SPA or times in which Clarity restarts on a given page, our visualizer would lose context
72
71
  // on the previously created style sheet for page N-1.
73
72
  // Then we synthetically call replaceSync with its contents to bootstrap it
74
- if (styleSheet[styleSheetPageNum] !== pageNum) {
75
- styleSheet[styleSheetPageNum] = pageNum;
73
+ if (!styleSheet[styleSheetId] || createdSheetIds.indexOf(styleSheet[styleSheetId]) === -1) {
76
74
  styleSheet[styleSheetId] = shortid();
75
+ createdSheetIds.push(styleSheet[styleSheetId]);
77
76
  trackStyleChange(timestamp, styleSheet[styleSheetId], StyleSheetOperation.Create);
78
77
  trackStyleChange(timestamp, styleSheet[styleSheetId], StyleSheetOperation.ReplaceSync, getCssRules(styleSheet));
79
78
  }
79
+
80
80
  currentStyleSheets.push(styleSheet[styleSheetId]);
81
81
  }
82
82
 
@@ -109,6 +109,7 @@ export function stop(): void {
109
109
  styleSheetMap = {};
110
110
  styleTimeMap = {};
111
111
  documentNodes = [];
112
+ createdSheetIds = [];
112
113
  reset();
113
114
  }
114
115
 
package/types/core.d.ts CHANGED
@@ -101,7 +101,10 @@ export interface BrowserEvent {
101
101
  event: string;
102
102
  target: EventTarget;
103
103
  listener: EventListener;
104
- capture: boolean;
104
+ options: {
105
+ capture: boolean;
106
+ passive: boolean;
107
+ };
105
108
  }
106
109
 
107
110
  export interface Report {
@@ -1,3 +1,4 @@
1
+ import { BooleanFlag } from "@clarity-types/data";
1
2
  import { Time } from "./core";
2
3
  import { Event, Target } from "./data";
3
4
 
@@ -121,6 +122,12 @@ export interface ClickData {
121
122
  link: string;
122
123
  hash: string;
123
124
  trust: number;
125
+ isFullText: BooleanFlag;
126
+ }
127
+
128
+ export interface TextInfo {
129
+ text: string;
130
+ isFullText: BooleanFlag;
124
131
  }
125
132
 
126
133
  export interface ClipboardData {
@@ -150,6 +157,7 @@ export interface SelectionData {
150
157
 
151
158
  export interface UnloadData {
152
159
  name: string;
160
+ persisted: BooleanFlag;
153
161
  }
154
162
 
155
163
  export interface VisibilityData {