Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@snowplow/browser-tracker

Package Overview
Dependencies
Maintainers
3
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@snowplow/browser-tracker - npm Package Compare versions

Comparing version 3.3.0 to 3.3.1

2

dist/index.module.js
/*!
* Browser tracker for Snowplow v3.3.0 (http://bit.ly/sp-js)
* Browser tracker for Snowplow v3.3.1 (http://bit.ly/sp-js)
* Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang

@@ -4,0 +4,0 @@ * Licensed under BSD-3-Clause

/*!
* Browser tracker for Snowplow v3.3.0 (http://bit.ly/sp-js)
* Browser tracker for Snowplow v3.3.1 (http://bit.ly/sp-js)
* Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang

@@ -7,3 +7,3 @@ * Licensed under BSD-3-Clause

'use strict';(function(w,ca){"object"===typeof exports&&"undefined"!==typeof module?ca(exports):"function"===typeof define&&define.amd?define(["exports"],ca):(w="undefined"!==typeof globalThis?globalThis:w||self,ca(w.snowplowBrowserTracking={}))})(this,function(w){function ca(a,b,c){if(c||2===arguments.length)for(var e=0,g=b.length,f;e<g;e++)!f&&e in b||(f||(f=Array.prototype.slice.call(b,0,e)),f[e]=b[e]);return a.concat(f||b)}function eb(a){var b={exports:{}};return a(b,b.exports),b.exports}function Qa(){var a=
'use strict';(function(w,W){"object"===typeof exports&&"undefined"!==typeof module?W(exports):"function"===typeof define&&define.amd?define(["exports"],W):(w="undefined"!==typeof globalThis?globalThis:w||self,W(w.snowplowBrowserTracking={}))})(this,function(w){function W(a,b,c){if(c||2===arguments.length)for(var e=0,g=b.length,f;e<g;e++)!f&&e in b||(f||(f=Array.prototype.slice.call(b,0,e)),f[e]=b[e]);return a.concat(f||b)}function eb(a){var b={exports:{}};return a(b,b.exports),b.exports}function Qa(){var a=
{},b=[],c=[],e,g=function(f,l){null!=l&&""!==l&&(a[f]=l)};return{add:g,addDict:function(f){for(var l in f)Object.prototype.hasOwnProperty.call(f,l)&&g(l,f[l])},addJson:function(f,l,m){m&&Ib(m)&&(f={keyIfEncoded:f,keyIfNotEncoded:l,json:m},c.push(f),b.push(f))},getPayload:function(){return a},getJson:function(){return b},withJsonProcessor:function(f){e=f},build:function(){null===e||void 0===e?void 0:e(this,c);return a}}}function nc(a){return function(b,c){for(var e=0;e<c.length;e++){var g=c[e],f=JSON.stringify(g.json);

@@ -13,3 +13,3 @@ if(a){var l=b,m=l.add;g=g.keyIfEncoded;if(f){var q=0,z=0,D=[];if(f){f=unescape(encodeURIComponent(f));do{var F=f.charCodeAt(q++);var u=f.charCodeAt(q++);var h=f.charCodeAt(q++);var v=F<<16|u<<8|h;F=v>>18&63;u=v>>12&63;h=v>>6&63;v&=63;D[z++]=Ra.charAt(F)+Ra.charAt(u)+Ra.charAt(h)+Ra.charAt(v)}while(q<f.length);q=D.join("");f=f.length%3;f=(f?q.slice(0,f-3):q)+"===".slice(f||3)}f=f.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}m.call(l,g,f)}else b.add(g.keyIfNotEncoded,f)}c.length=0}}function Ib(a){if(!Jb(a))return!1;

removeGlobalContexts:function(c){for(var e=function(f){Kb(f)?b=b.filter(function(l){return JSON.stringify(l)!==JSON.stringify(f)}):za(f)&&(a=a.filter(function(l){return JSON.stringify(l)!==JSON.stringify(f)}))},g=0;g<c.length;g++)e(c[g])},getApplicableContexts:function(c){a:{var e=0;for(var g=c.getJson();e<g.length;e++){var f=g[e];if("ue_px"===f.keyIfEncoded&&"object"===typeof f.json.data&&(f=f.json.data.schema,"string"==typeof f)){e=f;break a}}e=""}g=c.getPayload().e;f="string"===typeof g?g:"";g=
[];var l=fb(a,c,f,e);g.push.apply(g,l);c=pc(b,c,f,e);g.push.apply(g,c);return g}}}function qc(a){return{addPluginContexts:function(b){var c=null!==b&&void 0!==b?b:[];a.forEach(function(e){try{e.contexts&&c.push.apply(c,e.contexts())}catch(g){ia.error("Error adding plugin contexts",g)}});return c}}}function rc(a){if("*"===a[0]||"*"===a[1])return!1;if(0<a.slice(2).length){var b=!1,c=0;for(a=a.slice(2);c<a.length;c++)if("*"===a[c])b=!0;else if(b)return!1;return!0}return 2==a.length?!0:!1}function Lb(a){return(a=
[];var l=fb(a,c,f,e);g.push.apply(g,l);c=pc(b,c,f,e);g.push.apply(g,c);return g}}}function qc(a){return{addPluginContexts:function(b){var c=b?W([],b):[];a.forEach(function(e){try{e.contexts&&c.push.apply(c,e.contexts())}catch(g){ia.error("Error adding plugin contexts",g)}});return c}}}function rc(a){if("*"===a[0]||"*"===a[1])return!1;if(0<a.slice(2).length){var b=!1,c=0;for(a=a.slice(2);c<a.length;c++)if("*"===a[c])b=!0;else if(b)return!1;return!0}return 2==a.length?!0:!1}function Lb(a){return(a=
a.split("."))&&1<a.length?rc(a):!1}function Mb(a){a=/^iglu:((?:(?:[a-zA-Z0-9-_]+|\*).)+(?:[a-zA-Z0-9-_]+|\*))\/([a-zA-Z0-9-_.]+|\*)\/jsonschema\/([1-9][0-9]*|\*)-(0|[1-9][0-9]*|\*)-(0|[1-9][0-9]*|\*)$/.exec(a);if(null!==a&&Lb(a[1]))return a.slice(1,6)}function gb(a){if(a=Mb(a)){var b=a[0];return 5===a.length&&Lb(b)}return!1}function sc(a){return Array.isArray(a)&&a.every(function(b){return"string"===typeof b})}function Nb(a){return sc(a)?a.every(function(b){return gb(b)}):"string"===typeof a?gb(a):

@@ -22,3 +22,3 @@ !1}function Ha(a){return Ib(a)&&"schema"in a&&"data"in a?"string"===typeof a.schema&&"object"===typeof a.data:!1}function tc(a){var b=0;if(null!=a&&"object"===typeof a&&!Array.isArray(a)){if(Object.prototype.hasOwnProperty.call(a,"accept"))if(Nb(a.accept))b+=1;else return!1;if(Object.prototype.hasOwnProperty.call(a,"reject"))if(Nb(a.reject))b+=1;else return!1;return 0<b&&2>=b}return!1}function Sa(a){return"function"===typeof a&&1>=a.length}function za(a){return Sa(a)||Ha(a)}function Ob(a){return Array.isArray(a)&&

function xc(a){void 0===a&&(a={});var b=a.base64,c=a.corePlugins,e=null!==c&&void 0!==c?c:[];a=function(f,l,m){function q(h,v){h=D.getApplicableContexts(h);var H=[];v&&v.length&&H.push.apply(H,v);h&&h.length&&H.push.apply(H,h);return H}var z=qc(l),D=oc(),F=f,u={};return{track:function(h,v,H){h.withJsonProcessor(nc(F));h.add("eid",R.v4());h.addDict(u);H=wc(H);h.add(H.type,H.value.toString());v=q(h,z.addPluginContexts(v));v=v&&v.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",
data:v}:void 0;void 0!==v&&h.addJson("cx","co",v);l.forEach(function(K){try{K.beforeTrack&&K.beforeTrack(h)}catch(S){ia.error("Plugin beforeTrack",S)}});"function"===typeof m&&m(h);var W=h.build();l.forEach(function(K){try{K.afterTrack&&K.afterTrack(W)}catch(S){ia.error("Plugin afterTrack",S)}});return W},addPayloadPair:function(h,v){u[h]=v},getBase64Encoding:function(){return F},setBase64Encoding:function(h){F=h},addPayloadDict:function(h){for(var v in h)Object.prototype.hasOwnProperty.call(h,v)&&
data:v}:void 0;void 0!==v&&h.addJson("cx","co",v);l.forEach(function(K){try{K.beforeTrack&&K.beforeTrack(h)}catch(S){ia.error("Plugin beforeTrack",S)}});"function"===typeof m&&m(h);var X=h.build();l.forEach(function(K){try{K.afterTrack&&K.afterTrack(X)}catch(S){ia.error("Plugin afterTrack",S)}});return X},addPayloadPair:function(h,v){u[h]=v},getBase64Encoding:function(){return F},setBase64Encoding:function(h){F=h},addPayloadDict:function(h){for(var v in h)Object.prototype.hasOwnProperty.call(h,v)&&
(u[v]=h[v])},resetPayloadPairs:function(h){u=Jb(h)?h:{}},setTrackerVersion:function(h){u.tv=h},setTrackerNamespace:function(h){u.tna=h},setAppId:function(h){u.aid=h},setPlatform:function(h){u.p=h},setUserId:function(h){u.uid=h},setScreenResolution:function(h,v){u.res=h+"x"+v},setViewport:function(h,v){u.vp=h+"x"+v},setColorDepth:function(h){u.cd=h},setTimezone:function(h){u.tz=h},setLang:function(h){u.lang=h},setIpAddress:function(h){u.ip=h},setUseragent:function(h){u.ua=h},addGlobalContexts:function(h){D.addGlobalContexts(h)},

@@ -29,16 +29,16 @@ clearGlobalContexts:function(){D.clearGlobalContexts()},removeGlobalContexts:function(h){D.removeGlobalContexts(h)}}}(null!==b&&void 0!==b?b:!0,e,a.callback);var g=da(da({},a),{addPlugin:function(f){var l,m;f=f.plugin;e.push(f);null===(l=f.logger)||void 0===l?void 0:l.call(f,ia);null===(m=f.activateCorePlugin)||void 0===m?void 0:m.call(f,g)}});null===e||void 0===e?void 0:e.forEach(function(f){var l,m;null===(l=f.logger)||void 0===l?void 0:l.call(f,ia);null===(m=f.activateCorePlugin)||void 0===m?void 0:

b.parent.document.referrer}catch(f){c=""}}""===c&&(c=document.referrer);return c}function ma(a,b,c,e){if(a.addEventListener)return a.addEventListener(b,c,e),!0;if(a.attachEvent)return a.attachEvent("on"+b,c);a["on"+b]=c}function Ia(a,b){return(a=(new RegExp("^[^#]*[?&]"+a+"=([^&#]*)")).exec(b))?decodeURIComponent(a[1].replace(/\+/g," ")):null}function Ua(a,b,c){void 0===c&&(c=63072E3);try{var e=window.localStorage,g=Date.now()+1E3*c;e.setItem(a+".expires",g.toString());e.setItem(a,b);return!0}catch(f){return!1}}
function Vb(a){try{var b=window.localStorage;b.removeItem(a);b.removeItem(a+".expires");return!0}catch(c){return!1}}function Ac(a,b){for(var c=window.location.hostname,e="_sp_root_domain_test_"+(new Date).getTime(),g="_test_value_"+(new Date).getTime(),f=c.split("."),l=f.length-1;0<=l;){var m=f.slice(l,f.length).join(".");X(e,g,0,"/",m,a,b);if(X(e)===g){X(e,"",-1,"/",m,a,b);c=document.cookie.split("; ");e=[];for(g=0;g<c.length;g++)"_sp_root_domain_test_"===c[g].substring(0,21)&&e.push(c[g]);c=e;for(e=
0;e<c.length;e++)X(c[e],"",-1,"/",m,a,b);return m}--l}return c}function X(a,b,c,e,g,f,l){return 1<arguments.length?document.cookie=a+"="+encodeURIComponent(null!==b&&void 0!==b?b:"")+(c?"; Expires="+(new Date(+new Date+1E3*c)).toUTCString():"")+(e?"; Path="+e:"")+(g?"; Domain="+g:"")+(f?"; SameSite="+f:"")+(l?"; Secure":""):decodeURIComponent((("; "+document.cookie).split("; "+a+"=")[1]||"").split(";")[0])}function Bc(a,b,c,e,g,f,l,m,q,z,D,F,u){function h(n){var A=Object.keys(n).map(function(x){return[x,
n[x]]}).reduce(function(x,t){x[t[0]]=t[1].toString();return x},{});return{evt:A,bytes:v(JSON.stringify(A))}}function v(n){for(var A=0,x=0;x<n.length;x++){var t=n.charCodeAt(x);127>=t?A+=1:2047>=t?A+=2:55296<=t&&57343>=t?(A+=4,x++):A=65535>t?A+3:A+4}return A}function H(n){for(void 0===n&&(n=!1);E.length&&"string"!==typeof E[0]&&"object"!==typeof E[0];)E.shift();if(1>E.length)O=!1;else{if(!ea||"string"!==typeof ea.valueOf())throw"No collector configured";O=!0;if(sa){var A=function(Y){for(var Z=0,Aa=
0;Z<Y.length&&!(Aa+=Y[Z].bytes,Aa>=l);)Z+=1;return Z},x=void 0;if(ja(E)){x=ea;var t=W(x,!0,n);var I=A(E)}else x=J(E[0]),t=W(x,!1,n),I=1;var P=setTimeout(function(){t.abort();O=!1},z),aa=function(Y){for(var Z=0;Z<Y;Z++)E.shift();c&&Ua(ta,JSON.stringify(E.slice(0,q)));H()};t.onreadystatechange=function(){4===t.readyState&&200<=t.status&&400>t.status?(clearTimeout(P),aa(I)):4===t.readyState&&400<=t.status&&(clearTimeout(P),O=!1)};if(ja(E)){if(A=E.slice(0,I),0<A.length){n=!1;A=A.map(function(Y){return Y.evt});
if(Ba){var na=new Blob([K(S(A))],{type:"application/json"});try{n=navigator.sendBeacon(x,na)}catch(Y){n=!1}}!0===n?aa(I):t.send(K(S(A)))}}else t.send()}else if(D||ja(E))O=!1;else{x=new Image(1,1);var fa=!0;x.onload=function(){fa&&(fa=!1,E.shift(),c&&Ua(ta,JSON.stringify(E.slice(0,q))),H())};x.onerror=function(){fa&&(O=fa=!1)};x.src=J(E[0]);setTimeout(function(){fa&&O&&(fa=!1,H())},z)}}}function W(n,A,x){var t=new XMLHttpRequest;A?(t.open("POST",n,!x),t.setRequestHeader("Content-Type","application/json; charset=UTF-8")):
function Vb(a){try{var b=window.localStorage;b.removeItem(a);b.removeItem(a+".expires");return!0}catch(c){return!1}}function Ac(a,b){for(var c=window.location.hostname,e="_sp_root_domain_test_"+(new Date).getTime(),g="_test_value_"+(new Date).getTime(),f=c.split("."),l=f.length-1;0<=l;){var m=f.slice(l,f.length).join(".");Y(e,g,0,"/",m,a,b);if(Y(e)===g){Y(e,"",-1,"/",m,a,b);c=document.cookie.split("; ");e=[];for(g=0;g<c.length;g++)"_sp_root_domain_test_"===c[g].substring(0,21)&&e.push(c[g]);c=e;for(e=
0;e<c.length;e++)Y(c[e],"",-1,"/",m,a,b);return m}--l}return c}function Y(a,b,c,e,g,f,l){return 1<arguments.length?document.cookie=a+"="+encodeURIComponent(null!==b&&void 0!==b?b:"")+(c?"; Expires="+(new Date(+new Date+1E3*c)).toUTCString():"")+(e?"; Path="+e:"")+(g?"; Domain="+g:"")+(f?"; SameSite="+f:"")+(l?"; Secure":""):decodeURIComponent((("; "+document.cookie).split("; "+a+"=")[1]||"").split(";")[0])}function Bc(a,b,c,e,g,f,l,m,q,z,D,F,u){function h(n){var A=Object.keys(n).map(function(x){return[x,
n[x]]}).reduce(function(x,t){x[t[0]]=t[1].toString();return x},{});return{evt:A,bytes:v(JSON.stringify(A))}}function v(n){for(var A=0,x=0;x<n.length;x++){var t=n.charCodeAt(x);127>=t?A+=1:2047>=t?A+=2:55296<=t&&57343>=t?(A+=4,x++):A=65535>t?A+3:A+4}return A}function H(n){for(void 0===n&&(n=!1);E.length&&"string"!==typeof E[0]&&"object"!==typeof E[0];)E.shift();if(1>E.length)O=!1;else{if(!ea||"string"!==typeof ea.valueOf())throw"No collector configured";O=!0;if(sa){var A=function(Z){for(var aa=0,Aa=
0;aa<Z.length&&!(Aa+=Z[aa].bytes,Aa>=l);)aa+=1;return aa},x=void 0;if(ja(E)){x=ea;var t=X(x,!0,n);var I=A(E)}else x=J(E[0]),t=X(x,!1,n),I=1;var P=setTimeout(function(){t.abort();O=!1},z),ba=function(Z){for(var aa=0;aa<Z;aa++)E.shift();c&&Ua(ta,JSON.stringify(E.slice(0,q)));H()};t.onreadystatechange=function(){4===t.readyState&&200<=t.status&&400>t.status?(clearTimeout(P),ba(I)):4===t.readyState&&400<=t.status&&(clearTimeout(P),O=!1)};if(ja(E)){if(A=E.slice(0,I),0<A.length){n=!1;A=A.map(function(Z){return Z.evt});
if(Ba){var na=new Blob([K(S(A))],{type:"application/json"});try{n=navigator.sendBeacon(x,na)}catch(Z){n=!1}}!0===n?ba(I):t.send(K(S(A)))}}else t.send()}else if(D||ja(E))O=!1;else{x=new Image(1,1);var fa=!0;x.onload=function(){fa&&(fa=!1,E.shift(),c&&Ua(ta,JSON.stringify(E.slice(0,q))),H())};x.onerror=function(){fa&&(O=fa=!1)};x.src=J(E[0]);setTimeout(function(){fa&&O&&(fa=!1,H())},z)}}}function X(n,A,x){var t=new XMLHttpRequest;A?(t.open("POST",n,!x),t.setRequestHeader("Content-Type","application/json; charset=UTF-8")):
t.open("GET",n,!x);t.withCredentials=u;D&&t.setRequestHeader("SP-Anonymous","*");for(var I in F)Object.prototype.hasOwnProperty.call(F,I)&&t.setRequestHeader(I,F[I]);return t}function K(n){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",data:n})}function S(n){for(var A=(new Date).getTime().toString(),x=0;x<n.length;x++)n[x].stm=A;return n}function J(n){return m?ea+n.replace("?","?stm="+(new Date).getTime()+"&"):ea+n}function ka(n){function A(t,I,P){return(P=
P.match("(Macintosh;.*Mac OS X (d+)_(d+)[_d]*.*) AppleWebKit/"))&&P.length?parseInt(P[0])<=t||parseInt(P[0])===t&&parseInt(P[1])<=I:!1}function x(t){return t.match("Version/.* Safari/")&&!t.match("Chrom(e|ium)")}return function(t,I){return(I=I.match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/"))&&I.length?parseInt(I[0])<=t:!1}(13,n)||A(10,15,n)&&x(n)}var O=!1,ea,E=[];e="string"===typeof e?e.toLowerCase():e;var ua=!0===e||"beacon"===e||"true"===e,Ba=!(!(ua&&window.navigator&&window.navigator.sendBeacon)||
ka(window.navigator.userAgent))&&ua,sa=!!(window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest),va="get"!==e&&sa&&("post"===e||ua),Ja=va?g:"/i",ta="snowplowOutQueue_"+a+"_"+(va?"post2":"get");ua&&(F={});f=c&&zc()&&va&&f||1;if(c)try{var Ka=window.localStorage.getItem(ta);E=Ka?JSON.parse(Ka):[]}catch(n){}Array.isArray(E)||(E=[]);b.outQueues.push(E);sa&&1<f&&b.bufferFlushers.push(function(n){O||H(n)});var ja=function(n){return"object"===typeof n[0]};return{enqueueRequest:function(n,A){ea=A+
Ja;if(va){n=h(n);if(n.bytes>=l){ia.warn("Event ("+n.bytes+"B) too big, max is "+l);W(ea,!0,!1).send(K(S([n.evt])));return}E.push(n)}else{A=E;var x=A.push,t="?",I={co:!0,cx:!0},P=!0,aa;for(aa in n)n.hasOwnProperty(aa)&&!I.hasOwnProperty(aa)&&(P?P=!1:t+="&",t+=encodeURIComponent(aa)+"="+encodeURIComponent(n[aa]));for(var na in I)n.hasOwnProperty(na)&&I.hasOwnProperty(na)&&(t+="&"+na+"="+encodeURIComponent(n[na]));x.call(A,t)}n=!1;c&&(n=Ua(ta,JSON.stringify(E.slice(0,q))));O||n&&!(E.length>=f)||H()},
Ja;if(va){n=h(n);if(n.bytes>=l){ia.warn("Event ("+n.bytes+"B) too big, max is "+l);X(ea,!0,!1).send(K(S([n.evt])));return}E.push(n)}else{A=E;var x=A.push,t="?",I={co:!0,cx:!0},P=!0,ba;for(ba in n)n.hasOwnProperty(ba)&&!I.hasOwnProperty(ba)&&(P?P=!1:t+="&",t+=encodeURIComponent(ba)+"="+encodeURIComponent(n[ba]));for(var na in I)n.hasOwnProperty(na)&&I.hasOwnProperty(na)&&(t+="&"+na+"="+encodeURIComponent(n[na]));x.call(A,t)}n=!1;c&&(n=Ua(ta,JSON.stringify(E.slice(0,q))));O||n&&!(E.length>=f)||H()},
executeQueue:function(){O||H()},setUseLocalStorage:function(n){c=n},setAnonymousTracking:function(n){D=n},setCollectorUrl:function(n){ea=n+Ja},setBufferSize:function(n){f=n}}}function Wb(a,b,c){if("translate.googleusercontent.com"===a)""===c&&(c=b),a=(a=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(b))&&1<(null===a||void 0===a?void 0:a.length)?Ia("u",a[1]):null,b=null!==a&&void 0!==a?a:"",a=hb(b);else if("cc.bingj.com"===a||"webcache.googleusercontent.com"===a)b=document.links[0].href,a=hb(b);
return[a,b,c]}function Cc(a,b,c,e,g,f){void 0===f&&(f={});var l=[];a=function(q,z,D,F,u,h){function v(){wa=Wb(window.location.hostname,window.location.href,ib());wa[1]!==oa&&(La=ib(oa));Xb=Ub(wa[0]);oa=wa[1]}function H(d){var k=(new Date).getTime();d=d.currentTarget;if(null===d||void 0===d?0:d.href){k="_sp="+(Ca+"."+k);var p=d.href.split("#"),r=p[0].split("?"),B=r.shift();if(r=r.join("?")){for(var G=!0,M=r.split("&"),y=0;y<M.length;y++)if("_sp="===M[y].substr(0,4)){G=!1;M[y]=k;r=M.join("&");break}G&&
(r=k+"&"+r)}else r=k;p[0]=B+"?"+r;k=p.join("#");d.href=k}}function W(d){for(var k=0;k<document.links.length;k++){var p=document.links[k];!p.spDecorationEnabled&&d(p)&&(ma(p,"click",H,!0),ma(p,"mousedown",H,!0),p.spDecorationEnabled=!0)}}function K(d){if(Yb){var k=/#.*/;d=d.replace(k,"")}Zb&&(k=/[{}]/g,d=d.replace(k,""));return d}function S(d){return(d=/^([a-z]+):/.exec(d))?d[1]:null}function J(d){d=Da+d+"."+xa;if("localStorage"==L){try{var k=window.localStorage,p=k.getItem(d+".expires");if(null===
p||+p>Date.now())var r=k.getItem(d);else k.removeItem(d),k.removeItem(d+".expires"),r=void 0}catch(B){r=void 0}return r}if("cookie"==L||"cookieAndLocalStorage"==L)return X(d)}function ka(){v();xa=Dc((Ma||Xb)+(jb||"/")).slice(0,4)}function O(){Va=(new Date).getTime()}function ea(){var d=E(),k=d[0];k<Wa?Wa=k:k>Xa&&(Xa=k);d=d[1];d<Ya?Ya=d:d>Za&&(Za=d);O()}function E(){var d=document.documentElement;return d?[d.scrollLeft||window.pageXOffset,d.scrollTop||window.pageYOffset]:[0,0]}function ua(){var d=
E(),k=d[0];Xa=Wa=k;Za=Ya=d=d[1]}function Ba(){va(Da+"ses."+xa,"*",$b)}function sa(d,k,p,r,B,G){va(Da+"id."+xa,d+"."+k+"."+p+"."+r+"."+B+"."+G,ac)}function va(d,k,p){if(!pa||Ea)"localStorage"==L?Ua(d,k,p):("cookie"==L||"cookieAndLocalStorage"==L)&&X(d,k,p,jb,Ma,$a,ab)}function Ja(d){var k=Da+"id."+xa,p=Da+"ses."+xa;Vb(k);Vb(p);X(k,"",-1,"/",Ma,$a,ab);X(p,"",-1,"/",Ma,$a,ab);null!==d&&void 0!==d&&d.preserveSession||(Q=R.v4(),ha=0);null!==d&&void 0!==d&&d.preserveUser||(Ca=R.v4(),ya=null)}function ta(d){d&&
(r=k+"&"+r)}else r=k;p[0]=B+"?"+r;k=p.join("#");d.href=k}}function X(d){for(var k=0;k<document.links.length;k++){var p=document.links[k];!p.spDecorationEnabled&&d(p)&&(ma(p,"click",H,!0),ma(p,"mousedown",H,!0),p.spDecorationEnabled=!0)}}function K(d){if(Yb){var k=/#.*/;d=d.replace(k,"")}Zb&&(k=/[{}]/g,d=d.replace(k,""));return d}function S(d){return(d=/^([a-z]+):/.exec(d))?d[1]:null}function J(d){d=Da+d+"."+xa;if("localStorage"==L){try{var k=window.localStorage,p=k.getItem(d+".expires");if(null===
p||+p>Date.now())var r=k.getItem(d);else k.removeItem(d),k.removeItem(d+".expires"),r=void 0}catch(B){r=void 0}return r}if("cookie"==L||"cookieAndLocalStorage"==L)return Y(d)}function ka(){v();xa=Dc((Ma||Xb)+(jb||"/")).slice(0,4)}function O(){Va=(new Date).getTime()}function ea(){var d=E(),k=d[0];k<Wa?Wa=k:k>Xa&&(Xa=k);d=d[1];d<Ya?Ya=d:d>Za&&(Za=d);O()}function E(){var d=document.documentElement;return d?[d.scrollLeft||window.pageXOffset,d.scrollTop||window.pageYOffset]:[0,0]}function ua(){var d=
E(),k=d[0];Xa=Wa=k;Za=Ya=d=d[1]}function Ba(){va(Da+"ses."+xa,"*",$b)}function sa(d,k,p,r,B,G){va(Da+"id."+xa,d+"."+k+"."+p+"."+r+"."+B+"."+G,ac)}function va(d,k,p){if(!pa||Ea)"localStorage"==L?Ua(d,k,p):("cookie"==L||"cookieAndLocalStorage"==L)&&Y(d,k,p,jb,Ma,$a,ab)}function Ja(d){var k=Da+"id."+xa,p=Da+"ses."+xa;Vb(k);Vb(p);Y(k,"",-1,"/",Ma,$a,ab);Y(p,"",-1,"/",Ma,$a,ab);null!==d&&void 0!==d&&d.preserveSession||(Q=R.v4(),ha=0);null!==d&&void 0!==d&&d.preserveUser||(Ca=R.v4(),ya=null)}function ta(d){d&&
d.stateStorageStrategy&&(h.stateStorageStrategy=d.stateStorageStrategy,L=bc(h));pa=!!h.anonymousTracking;Ea=cc(h);kb=dc(h);qa.setUseLocalStorage("localStorage"==L||"cookieAndLocalStorage"==L);qa.setAnonymousTracking(kb)}function Ka(){if(!pa||Ea){var d="none"!=L&&!!J("ses"),k=ja();k[1]?Ca=k[1]:(Ca=pa?"":R.v4(),k[1]=Ca);Q=k[6];d||(k[3]++,Q=R.v4(),k[6]=Q,k[5]=k[4]);"none"!=L&&(Ba(),k[4]=Math.round((new Date).getTime()/1E3),k.shift(),sa.apply(null,k))}}function ja(){if("none"==L)return[];var d=Math.round((new Date).getTime()/

@@ -49,15 +49,15 @@ 1E3),k=J("id");k?(d=k.split("."),d.unshift("0")):d=["1",Ca,d,0,d,""];d[6]&&"undefined"!==d[6]||(d[6]=R.v4());return d}function n(d){return 0===d.indexOf("http")?d:("https:"===document.location.protocol?"https":"http")+"://"+d}function A(){ec&&null!=u.pageViewId||(u.pageViewId=R.v4())}function x(){null==u.pageViewId&&(u.pageViewId=R.v4());return u.pageViewId}function t(){return{contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:x()}}]}}}function I(d){var k=

"blur"].forEach(G(window));G(window,ea)("scroll")}if(U.enabled&&(Ec||k))for(r in Va=r.getTime(),r=void 0,U.configurations)if(k=U.configurations[r])window.clearInterval(k.activityInterval),P(k,p,d)}function P(d,k,p){var r=function(G,M){v();G({context:M,pageViewId:x(),minXOffset:Wa,minYOffset:Ya,maxXOffset:Xa,maxYOffset:Za});ua()},B=function(){Va+d.configHeartBeatTimer>(new Date).getTime()&&r(d.callback,(k||[]).concat(p?p():[]))};d.activityInterval=0!=d.configMinimumVisitLength?window.setTimeout(function(){Va+
d.configMinimumVisitLength>(new Date).getTime()&&r(d.callback,(k||[]).concat(p?p():[]));d.activityInterval=window.setInterval(B,d.configHeartBeatTimer)},d.configMinimumVisitLength):window.setInterval(B,d.configHeartBeatTimer)}function aa(d){var k=d.minimumVisitLength,p=d.heartbeatDelay;d=d.callback;if(Sb(k)&&Sb(p))return{configMinimumVisitLength:1E3*k,configHeartBeatTimer:1E3*p,callback:d};ia.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function na(d){var k=d.context,
p=d.minXOffset,r=d.minYOffset,B=d.maxXOffset,G=d.maxYOffset;d=document.title;d!==Fa&&(Fa=d,Na=void 0);d=T;var M=d.track,y=K(Ga||oa),V=Tb(Na||Fa),cb=K(bb||La);p=Math.round(p);B=Math.round(B);r=Math.round(r);G=Math.round(G);var ba=Qa();ba.add("e","pp");ba.add("url",y);ba.add("page",V);ba.add("refr",cb);p&&!isNaN(Number(p))&&ba.add("pp_mix",p.toString());B&&!isNaN(Number(B))&&ba.add("pp_max",B.toString());r&&!isNaN(Number(r))&&ba.add("pp_miy",r.toString());G&&!isNaN(Number(G))&&ba.add("pp_may",G.toString());
M.call(d,ba,k)}var fa,Y,Z,Aa,lb,mb,nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab,Bb;h.eventMethod=null!==(fa=h.eventMethod)&&void 0!==fa?fa:"post";var bc=function(d){var k;return null!==(k=d.stateStorageStrategy)&&void 0!==k?k:"cookieAndLocalStorage"},cc=function(d){var k,p;return"boolean"===typeof d.anonymousTracking?!1:null!==(p=!0===(null===(k=d.anonymousTracking)||void 0===k?void 0:k.withSessionTracking))&&void 0!==p?p:!1},dc=function(d){var k,p;return"boolean"===typeof d.anonymousTracking?!1:null!==
(p=!0===(null===(k=d.anonymousTracking)||void 0===k?void 0:k.withServerAnonymisation))&&void 0!==p?p:!1};l.push(function(){return{beforeTrack:function(d){var k=Math.round((new Date).getTime()/1E3),p=J("ses"),r=ja(),B=r[0],G=r[1],M=r[2],y=r[3],V=r[4],cb=r[5];r=r[6];var ba=Oa?!!X(Oa):!1;gc||ba?Ja():("0"===B?(Q=r,p||"none"==L||(y++,cb=V,Q=R.v4()),ha=y):(new Date).getTime()-Cb>1E3*$b&&(Q=R.v4(),ha++),p=d.add,"innerWidth"in window?(B=window.innerWidth,y=window.innerHeight):(y=document.documentElement||
d.configMinimumVisitLength>(new Date).getTime()&&r(d.callback,(k||[]).concat(p?p():[]));d.activityInterval=window.setInterval(B,d.configHeartBeatTimer)},d.configMinimumVisitLength):window.setInterval(B,d.configHeartBeatTimer)}function ba(d){var k=d.minimumVisitLength,p=d.heartbeatDelay;d=d.callback;if(Sb(k)&&Sb(p))return{configMinimumVisitLength:1E3*k,configHeartBeatTimer:1E3*p,callback:d};ia.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function na(d){var k=d.context,
p=d.minXOffset,r=d.minYOffset,B=d.maxXOffset,G=d.maxYOffset;d=document.title;d!==Fa&&(Fa=d,Na=void 0);d=T;var M=d.track,y=K(Ga||oa),V=Tb(Na||Fa),cb=K(bb||La);p=Math.round(p);B=Math.round(B);r=Math.round(r);G=Math.round(G);var ca=Qa();ca.add("e","pp");ca.add("url",y);ca.add("page",V);ca.add("refr",cb);p&&!isNaN(Number(p))&&ca.add("pp_mix",p.toString());B&&!isNaN(Number(B))&&ca.add("pp_max",B.toString());r&&!isNaN(Number(r))&&ca.add("pp_miy",r.toString());G&&!isNaN(Number(G))&&ca.add("pp_may",G.toString());
M.call(d,ca,k)}var fa,Z,aa,Aa,lb,mb,nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab,Bb;h.eventMethod=null!==(fa=h.eventMethod)&&void 0!==fa?fa:"post";var bc=function(d){var k;return null!==(k=d.stateStorageStrategy)&&void 0!==k?k:"cookieAndLocalStorage"},cc=function(d){var k,p;return"boolean"===typeof d.anonymousTracking?!1:null!==(p=!0===(null===(k=d.anonymousTracking)||void 0===k?void 0:k.withSessionTracking))&&void 0!==p?p:!1},dc=function(d){var k,p;return"boolean"===typeof d.anonymousTracking?!1:null!==
(p=!0===(null===(k=d.anonymousTracking)||void 0===k?void 0:k.withServerAnonymisation))&&void 0!==p?p:!1};l.push(function(){return{beforeTrack:function(d){var k=Math.round((new Date).getTime()/1E3),p=J("ses"),r=ja(),B=r[0],G=r[1],M=r[2],y=r[3],V=r[4],cb=r[5];r=r[6];var ca=Oa?!!Y(Oa):!1;gc||ca?Ja():("0"===B?(Q=r,p||"none"==L||(y++,cb=V,Q=R.v4()),ha=y):(new Date).getTime()-Cb>1E3*$b&&(Q=R.v4(),ha++),p=d.add,"innerWidth"in window?(B=window.innerWidth,y=window.innerHeight):(y=document.documentElement||
document.body,B=y.clientWidth,y=y.clientHeight),p.call(d,"vp",0<=B&&0<=y?B+"x"+y:null),p=d.add,y=document.documentElement,V=document.body,B=Math.max(y.clientWidth,y.offsetWidth,y.scrollWidth),y=Math.max(y.clientHeight,y.offsetHeight,y.scrollHeight,V?Math.max(V.offsetHeight,V.scrollHeight):0),B=isNaN(B)||isNaN(y)?"":B+"x"+y,p.call(d,"ds",B),d.add("vid",Ea?ha:pa?null:ha),d.add("sid",Ea?Q:pa?null:Q),d.add("duid",pa?null:G),d.add("uid",pa?null:ya),v(),d.add("refr",K(bb||La)),d.add("url",K(Ga||oa)),"none"!=
L&&(sa(G,M,ha,k,cb,Q),Ba()),Cb=(new Date).getTime())}}}());(null!==(Z=null===(Y=null===h||void 0===h?void 0:h.contexts)||void 0===Y?void 0:Y.webPage)&&void 0!==Z?Z:1)&&l.push(t());l.push.apply(l,null!==(Aa=h.plugins)&&void 0!==Aa?Aa:[]);var T=xc({base64:h.encodeBase64,corePlugins:l,callback:function(d){var k=Oa?!!X(Oa):!1;gc||k||qa.enqueueRequest(d.build(),Db)}}),Fc=navigator.userLanguage||navigator.language,Gc=document.characterSet||document.charset,wa=Wb(window.location.hostname,window.location.href,
L&&(sa(G,M,ha,k,cb,Q),Ba()),Cb=(new Date).getTime())}}}());(null!==(aa=null===(Z=null===h||void 0===h?void 0:h.contexts)||void 0===Z?void 0:Z.webPage)&&void 0!==aa?aa:1)&&l.push(t());l.push.apply(l,null!==(Aa=h.plugins)&&void 0!==Aa?Aa:[]);var T=xc({base64:h.encodeBase64,corePlugins:l,callback:function(d){var k=Oa?!!Y(Oa):!1;gc||k||qa.enqueueRequest(d.build(),Db)}}),Fc=navigator.userLanguage||navigator.language,Gc=document.characterSet||document.charset,wa=Wb(window.location.hostname,window.location.href,
ib()),Xb=Ub(wa[0]),oa=wa[1],La=wa[2],bb,Hc=null!==(lb=h.platform)&&void 0!==lb?lb:"web",Db=n(F),Ic=null!==(mb=h.postPath)&&void 0!==mb?mb:"/com.snowplowanalytics.snowplow/tp2",Jc=null!==(nb=h.appId)&&void 0!==nb?nb:"",Ga,Fa=document.title,Na,Ec=null!==(ob=h.resetActivityTrackingOnPageView)&&void 0!==ob?ob:!0,Yb,Zb,Da=null!==(pb=h.cookieName)&&void 0!==pb?pb:"_sp_",Ma=null!==(qb=h.cookieDomain)&&void 0!==qb?qb:void 0,jb="/",$a=null!==(rb=h.cookieSameSite)&&void 0!==rb?rb:"None",ab=null!==(sb=h.cookieSecure)&&
void 0!==sb?sb:!0,hc=navigator.doNotTrack||navigator.msDoNotTrack||window.doNotTrack,gc="undefined"!==typeof h.respectDoNotTrack?h.respectDoNotTrack&&("yes"===hc||"1"===hc):!1,Oa,ac=null!==(tb=h.cookieLifetime)&&void 0!==tb?tb:63072E3,$b=null!==(ub=h.sessionCookieTimeout)&&void 0!==ub?ub:1800,Ea=cc(h),kb=dc(h),pa=!!h.anonymousTracking,L=bc(h),Va,Cb=(new Date).getTime(),Wa,Xa,Ya,Za,xa,Ca,Q,ha=1,ya,qa=Bc(q,u,"localStorage"==L||"cookieAndLocalStorage"==L,h.eventMethod,Ic,null!==(vb=h.bufferSize)&&void 0!==
vb?vb:1,null!==(wb=h.maxPostBytes)&&void 0!==wb?wb:4E4,null!==(xb=h.useStm)&&void 0!==xb?xb:!0,null!==(yb=h.maxLocalStorageQueueSize)&&void 0!==yb?yb:1E3,null!==(zb=h.connectionTimeout)&&void 0!==zb?zb:5E3,kb,null!==(Ab=h.customHeaders)&&void 0!==Ab?Ab:{},null!==(Bb=h.withCredentials)&&void 0!==Bb?Bb:!0),ec=!1,fc=!1,U={enabled:!1,installed:!1,configurations:{}};h.hasOwnProperty("discoverRootDomain")&&h.discoverRootDomain&&(Ma=Ac($a,ab));T.setTrackerVersion(D);T.setTrackerNamespace(z);T.setAppId(Jc);
T.setPlatform(Hc);T.addPayloadPair("cookie",navigator.cookieEnabled?"1":"0");T.addPayloadPair("cs",Gc);T.addPayloadPair("lang",Fc);T.addPayloadPair("res",screen.width+"x"+screen.height);T.addPayloadPair("cd",screen.colorDepth);ka();Ka();h.crossDomainLinker&&W(h.crossDomainLinker);return da(da({},{getDomainSessionIndex:function(){return ha},getPageViewId:function(){return x()},newSession:function(){var d=Math.round((new Date).getTime()/1E3),k=ja(),p=k[1],r=k[2],B=k[3],G=k[4],M=k[5],y=k[6];"0"===k[0]?
T.setPlatform(Hc);T.addPayloadPair("cookie",navigator.cookieEnabled?"1":"0");T.addPayloadPair("cs",Gc);T.addPayloadPair("lang",Fc);T.addPayloadPair("res",screen.width+"x"+screen.height);T.addPayloadPair("cd",screen.colorDepth);ka();Ka();h.crossDomainLinker&&X(h.crossDomainLinker);return da(da({},{getDomainSessionIndex:function(){return ha},getPageViewId:function(){return x()},newSession:function(){var d=Math.round((new Date).getTime()/1E3),k=ja(),p=k[1],r=k[2],B=k[3],G=k[4],M=k[5],y=k[6];"0"===k[0]?
(Q=y,"none"!=L&&(B++,M=G,Q=R.v4()),ha=B,Ba()):(Q=R.v4(),ha++);"none"!=L&&(sa(p,r,ha,d,M,Q),Ba());Cb=(new Date).getTime()},getCookieName:function(d){return Da+d+"."+xa},getUserId:function(){return ya},getDomainUserId:function(){return ja()[1]},getDomainUserInfo:function(){return ja()},setReferrerUrl:function(d){bb=d},setCustomUrl:function(d){v();var k=oa,p;S(d)?Ga=d:"/"===d.slice(0,1)?Ga=S(k)+"://"+hb(k)+d:(k=K(k),0<=(p=k.indexOf("?"))&&(k=k.slice(0,p)),(p=k.lastIndexOf("/"))!==k.length-1&&(k=k.slice(0,
p+1)),Ga=k+d)},setDocumentTitle:function(d){Fa=document.title;Na=d},discardHashTag:function(d){Yb=d},discardBrace:function(d){Zb=d},setCookiePath:function(d){jb=d;ka()},setVisitorCookieTimeout:function(d){ac=d},crossDomainLinker:function(d){W(d)},enableActivityTracking:function(d){U.configurations.pagePing||(U.enabled=!0,U.configurations.pagePing=aa(da(da({},d),{callback:na})))},enableActivityTrackingCallback:function(d){U.configurations.callback||(U.enabled=!0,U.configurations.callback=aa(d))},updatePageActivity:function(){O()},
setOptOutCookie:function(d){Oa=d},setUserId:function(d){ya=d},setUserIdFromLocation:function(d){v();ya=Ia(d,oa)},setUserIdFromReferrer:function(d){v();ya=Ia(d,La)},setUserIdFromCookie:function(d){ya=X(d)},setCollectorUrl:function(d){Db=n(d);qa.setCollectorUrl(Db)},setBufferSize:function(d){qa.setBufferSize(d)},flushBuffer:function(d){void 0===d&&(d={});qa.executeQueue();d.newBufferSize&&qa.setBufferSize(d.newBufferSize)},trackPageView:function(d){void 0===d&&(d={});I(d)},preservePageViewId:function(){ec=
p+1)),Ga=k+d)},setDocumentTitle:function(d){Fa=document.title;Na=d},discardHashTag:function(d){Yb=d},discardBrace:function(d){Zb=d},setCookiePath:function(d){jb=d;ka()},setVisitorCookieTimeout:function(d){ac=d},crossDomainLinker:function(d){X(d)},enableActivityTracking:function(d){U.configurations.pagePing||(U.enabled=!0,U.configurations.pagePing=ba(da(da({},d),{callback:na})))},enableActivityTrackingCallback:function(d){U.configurations.callback||(U.enabled=!0,U.configurations.callback=ba(d))},updatePageActivity:function(){O()},
setOptOutCookie:function(d){Oa=d},setUserId:function(d){ya=d},setUserIdFromLocation:function(d){v();ya=Ia(d,oa)},setUserIdFromReferrer:function(d){v();ya=Ia(d,La)},setUserIdFromCookie:function(d){ya=Y(d)},setCollectorUrl:function(d){Db=n(d);qa.setCollectorUrl(Db)},setBufferSize:function(d){qa.setBufferSize(d)},flushBuffer:function(d){void 0===d&&(d={});qa.executeQueue();d.newBufferSize&&qa.setBufferSize(d.newBufferSize)},trackPageView:function(d){void 0===d&&(d={});I(d)},preservePageViewId:function(){ec=
!0},disableAnonymousTracking:function(d){h.anonymousTracking=!1;ta(d);Ka();qa.executeQueue()},enableAnonymousTracking:function(d){var k;h.anonymousTracking=null!==(k=d&&(null===d||void 0===d?void 0:d.options))&&void 0!==k?k:!0;ta(d);Ea||A()},clearUserData:Ja}),{id:q,namespace:z,core:T,sharedState:u})}(a,b,c,e,g,f);var m=da(da({},a),{addPlugin:function(q){var z,D;m.core.addPlugin(q);null===(D=(z=q.plugin).activateBrowserPlugin)||void 0===D?void 0:D.call(z,m)}});l.forEach(function(q){var z;null===(z=

@@ -70,4 +70,4 @@ q.activateBrowserPlugin)||void 0===z?void 0:z.call(q,m)});return m}function C(a,b){try{var c=null!==a&&void 0!==a?a:Object.keys(Pa);a=Pa;for(var e=[],g=0;g<c.length;g++){var f=c[g];a.hasOwnProperty(f)?e.push(a[f]):ia.warn(f+" not configured")}e.forEach(b)}catch(l){ia.error("Function failed",l)}}function Kc(){function a(){"hidden"==g.visibilityState&&e.bufferFlushers.forEach(function(l){l(!1)})}function b(){var l;if(!e.hasLoaded)for(e.hasLoaded=!0,l=0;l<e.registeredOnLoadHandlers.length;l++)e.registeredOnLoadHandlers[l]();

void 0===a.clockseq&&(f=f+1&16383);(0>q||l>Fb)&&void 0===a.nsecs&&(m=0);if(1E4<=m)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");Fb=l;Gb=m;Eb=f;l+=122192928E5;a=(1E4*(l&268435455)+m)%4294967296;e[c++]=a>>>24&255;e[c++]=a>>>16&255;e[c++]=a>>>8&255;e[c++]=a&255;a=l/4294967296*1E4&268435455;e[c++]=a>>>8&255;e[c++]=a&255;e[c++]=a>>>24&15|16;e[c++]=a>>>16&255;e[c++]=f>>>8|128;e[c++]=f&255;for(f=0;6>f;++f)e[c+f]=g[f];return b?b:jc(e)};var R=ra.v4=ra,Ra="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
la;(function(a){a[a.none=0]="none";a[a.error=1]="error";a[a.warn=2]="warn";a[a.debug=3]="debug";a[a.info=4]="info"})(la||(la={}));var ia=function(a){void 0===a&&(a=la.warn);return{setLogLevel:function(b){a=la[b]?b:la.warn},warn:function(b,c){for(var e=[],g=2;g<arguments.length;g++)e[g-2]=arguments[g];a>=la.warn&&"undefined"!==typeof console&&(g="Snowplow: "+b,c?console.warn.apply(console,ca([g+"\n",c],e)):console.warn.apply(console,ca([g],e)))},error:function(b,c){for(var e=[],g=2;g<arguments.length;g++)e[g-
2]=arguments[g];a>=la.error&&"undefined"!==typeof console&&(g="Snowplow: "+b+"\n",c?console.error.apply(console,ca([g+"\n",c],e)):console.error.apply(console,ca([g],e)))},debug:function(b){for(var c=[],e=1;e<arguments.length;e++)c[e-1]=arguments[e];a>=la.debug&&"undefined"!==typeof console&&console.debug.apply(console,ca(["Snowplow: "+b],c))},info:function(b){for(var c=[],e=1;e<arguments.length;e++)c[e-1]=arguments[e];a>=la.info&&"undefined"!==typeof console&&console.info.apply(console,ca(["Snowplow: "+
la;(function(a){a[a.none=0]="none";a[a.error=1]="error";a[a.warn=2]="warn";a[a.debug=3]="debug";a[a.info=4]="info"})(la||(la={}));var ia=function(a){void 0===a&&(a=la.warn);return{setLogLevel:function(b){a=la[b]?b:la.warn},warn:function(b,c){for(var e=[],g=2;g<arguments.length;g++)e[g-2]=arguments[g];a>=la.warn&&"undefined"!==typeof console&&(g="Snowplow: "+b,c?console.warn.apply(console,W([g+"\n",c],e)):console.warn.apply(console,W([g],e)))},error:function(b,c){for(var e=[],g=2;g<arguments.length;g++)e[g-
2]=arguments[g];a>=la.error&&"undefined"!==typeof console&&(g="Snowplow: "+b+"\n",c?console.error.apply(console,W([g+"\n",c],e)):console.error.apply(console,W([g],e)))},debug:function(b){for(var c=[],e=1;e<arguments.length;e++)c[e-1]=arguments[e];a>=la.debug&&"undefined"!==typeof console&&console.debug.apply(console,W(["Snowplow: "+b],c))},info:function(b){for(var c=[],e=1;e<arguments.length;e++)c[e-1]=arguments[e];a>=la.info&&"undefined"!==typeof console&&console.info.apply(console,W(["Snowplow: "+
b],c))}}}(),db=eb(function(a){(function(){var b={rotl:function(c,e){return c<<e|c>>>32-e},rotr:function(c,e){return c<<32-e|c>>>e},endian:function(c){if(c.constructor==Number)return b.rotl(c,8)&16711935|b.rotl(c,24)&4278255360;for(var e=0;e<c.length;e++)c[e]=b.endian(c[e]);return c},randomBytes:function(c){for(var e=[];0<c;c--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(c){for(var e=[],g=0,f=0;g<c.length;g++,f+=8)e[f>>>5]|=c[g]<<24-f%32;return e},wordsToBytes:function(c){for(var e=

@@ -77,10 +77,10 @@ [],g=0;g<32*c.length;g+=8)e.push(c[g>>>5]>>>24-g%32&255);return e},bytesToHex:function(c){for(var e=[],g=0;g<c.length;g++)e.push((c[g]>>>4).toString(16)),e.push((c[g]&15).toString(16));return e.join("")},hexToBytes:function(c){for(var e=[],g=0;g<c.length;g+=2)e.push(parseInt(c.substr(g,2),16));return e},bytesToBase64:function(c){for(var e=[],g=0;g<c.length;g+=3)for(var f=c[g]<<16|c[g+1]<<8|c[g+2],l=0;4>l;l++)8*g+6*l<=8*c.length?e.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>>

bin:{stringToBytes:function(a){for(var b=[],c=0;c<a.length;c++)b.push(a.charCodeAt(c)&255);return b},bytesToString:function(a){for(var b=[],c=0;c<a.length;c++)b.push(String.fromCharCode(a[c]));return b.join("")}}},lc=Hb,Dc=eb(function(a){(function(){var b=lc.utf8,c=lc.bin,e=function(g,f){var l=db.wordsToBytes,m=g;m.constructor==String?m=b.stringToBytes(m):"undefined"!==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(m)?m=Array.prototype.slice.call(m,0):Array.isArray(m)||(m=m.toString());
g=db.bytesToWords(m);var q=8*m.length;m=[];var z=1732584193,D=-271733879,F=-1732584194,u=271733878,h=-1009589776;g[q>>5]|=128<<24-q%32;g[(q+64>>>9<<4)+15]=q;for(q=0;q<g.length;q+=16){for(var v=z,H=D,W=F,K=u,S=h,J=0;80>J;J++){if(16>J)m[J]=g[q+J];else{var ka=m[J-3]^m[J-8]^m[J-14]^m[J-16];m[J]=ka<<1|ka>>>31}ka=(z<<5|z>>>27)+h+(m[J]>>>0)+(20>J?(D&F|~D&u)+1518500249:40>J?(D^F^u)+1859775393:60>J?(D&F|D&u|F&u)-1894007588:(D^F^u)-899497514);h=u;u=F;F=D<<30|D>>>2;D=z;z=ka}z+=v;D+=H;F+=W;u+=K;h+=S}l=l.call(db,
g=db.bytesToWords(m);var q=8*m.length;m=[];var z=1732584193,D=-271733879,F=-1732584194,u=271733878,h=-1009589776;g[q>>5]|=128<<24-q%32;g[(q+64>>>9<<4)+15]=q;for(q=0;q<g.length;q+=16){for(var v=z,H=D,X=F,K=u,S=h,J=0;80>J;J++){if(16>J)m[J]=g[q+J];else{var ka=m[J-3]^m[J-8]^m[J-14]^m[J-16];m[J]=ka<<1|ka>>>31}ka=(z<<5|z>>>27)+h+(m[J]>>>0)+(20>J?(D&F|~D&u)+1518500249:40>J?(D^F^u)+1859775393:60>J?(D&F|D&u|F&u)-1894007588:(D^F^u)-899497514);h=u;u=F;F=D<<30|D>>>2;D=z;z=ka}z+=v;D+=H;F+=X;u+=K;h+=S}l=l.call(db,
[z,D,F,u,h]);return f&&f.asBytes?l:f&&f.asString?c.bytesToString(l):db.bytesToHex(l)};e._blocksize=16;e._digestsize=20;a.exports=e})()}),Pa={},Lc=function(){return function(){this.outQueues=[];this.bufferFlushers=[];this.hasLoaded=!1;this.registeredOnLoadHandlers=[]}}(),mc="undefined"!==typeof window?Kc():void 0;w.addGlobalContexts=function(a,b){C(b,function(c){c.core.addGlobalContexts(a)})};w.addPlugin=function(a,b){C(b,function(c){c.addPlugin(a)})};w.clearGlobalContexts=function(a){C(a,function(b){b.core.clearGlobalContexts()})};
w.clearUserData=function(a,b){C(b,function(c){c.clearUserData(a)})};w.crossDomainLinker=function(a,b){C(b,function(c){c.crossDomainLinker(a)})};w.disableAnonymousTracking=function(a,b){C(b,function(c){c.disableAnonymousTracking(a)})};w.discardBrace=function(a,b){C(b,function(c){c.discardBrace(a)})};w.discardHashTag=function(a,b){C(b,function(c){c.discardHashTag(a)})};w.enableActivityTracking=function(a,b){C(b,function(c){c.enableActivityTracking(a)})};w.enableActivityTrackingCallback=function(a,b){C(b,
function(c){c.enableActivityTrackingCallback(a)})};w.enableAnonymousTracking=function(a,b){C(b,function(c){c.enableAnonymousTracking(a)})};w.flushBuffer=function(a,b){C(b,function(c){c.flushBuffer(a)})};w.newSession=function(a){C(a,function(b){b.newSession()})};w.newTracker=function(a,b,c){void 0===c&&(c={});if(mc)return Pa.hasOwnProperty(a)?a=null:(Pa[a]=Cc(a,a,"js-3.3.0",b,mc,c),a=Pa[a]),a};w.preservePageViewId=function(a){C(a,function(b){b.preservePageViewId()})};w.removeGlobalContexts=function(a,
function(c){c.enableActivityTrackingCallback(a)})};w.enableAnonymousTracking=function(a,b){C(b,function(c){c.enableAnonymousTracking(a)})};w.flushBuffer=function(a,b){C(b,function(c){c.flushBuffer(a)})};w.newSession=function(a){C(a,function(b){b.newSession()})};w.newTracker=function(a,b,c){void 0===c&&(c={});if(mc)return Pa.hasOwnProperty(a)?a=null:(Pa[a]=Cc(a,a,"js-3.3.1",b,mc,c),a=Pa[a]),a};w.preservePageViewId=function(a){C(a,function(b){b.preservePageViewId()})};w.removeGlobalContexts=function(a,
b){C(b,function(c){c.core.removeGlobalContexts(a)})};w.setBufferSize=function(a,b){C(b,function(c){c.setBufferSize(a)})};w.setCollectorUrl=function(a,b){C(b,function(c){c.setCollectorUrl(a)})};w.setCookiePath=function(a,b){C(b,function(c){c.setCookiePath(a)})};w.setCustomUrl=function(a,b){C(b,function(c){c.setCustomUrl(a)})};w.setDocumentTitle=function(a,b){C(b,function(c){c.setDocumentTitle(a)})};w.setOptOutCookie=function(a,b){C(b,function(c){c.setOptOutCookie(a)})};w.setReferrerUrl=function(a,
b){C(b,function(c){c.setReferrerUrl(a)})};w.setUserId=function(a,b){C(b,function(c){c.setUserId(a)})};w.setUserIdFromCookie=function(a,b){C(b,function(c){c.setUserIdFromCookie(a)})};w.setUserIdFromLocation=function(a,b){C(b,function(c){c.setUserIdFromLocation(a)})};w.setUserIdFromReferrer=function(a,b){C(b,function(c){c.setUserIdFromReferrer(a)})};w.setVisitorCookieTimeout=function(a,b){C(b,function(c){c.setVisitorCookieTimeout(a)})};w.trackPageView=function(a,b){C(b,function(c){c.trackPageView(a)})};
w.trackSelfDescribingEvent=function(a,b){C(b,function(c){c=c.core;var e=c.track,g=a.event,f=g.schema,l=g.data;g=Qa();f={schema:"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",data:{schema:f,data:l}};g.add("e","ue");g.addJson("ue_px","ue_pr",f);e.call(c,g,a.context,a.timestamp)})};w.trackStructEvent=function(a,b){C(b,function(c){c=c.core;var e=c.track,g=a.category,f=a.action,l=a.label,m=a.property,q=a.value,z=Qa();z.add("e","se");z.add("se_ca",g);z.add("se_ac",f);z.add("se_la",
l);z.add("se_pr",m);z.add("se_va",null==q?void 0:q.toString());e.call(c,z,a.context,a.timestamp)})};w.updatePageActivity=function(a){C(a,function(b){b.updatePageActivity()})};w.version="3.3.0";Object.defineProperty(w,"__esModule",{value:!0})})
l);z.add("se_pr",m);z.add("se_va",null==q?void 0:q.toString());e.call(c,z,a.context,a.timestamp)})};w.updatePageActivity=function(a){C(a,function(b){b.updatePageActivity()})};w.version="3.3.1";Object.defineProperty(w,"__esModule",{value:!0})})
//# sourceMappingURL=index.umd.min.js.map
{
"name": "@snowplow/browser-tracker",
"version": "3.3.0",
"version": "3.3.1",
"description": "Browser tracker for Snowplow",

@@ -35,4 +35,4 @@ "keywords": [

"dependencies": {
"@snowplow/browser-tracker-core": "3.3.0",
"@snowplow/tracker-core": "3.3.0",
"@snowplow/browser-tracker-core": "3.3.1",
"@snowplow/tracker-core": "3.3.1",
"tslib": "^2.3.0"

@@ -39,0 +39,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc