@snowplow/browser-tracker-core
Advanced tools
Comparing version 3.16.0 to 3.17.0
@@ -276,2 +276,15 @@ /* | ||
idService?: string; | ||
/** | ||
* Whether to retry failed requests to the collector. | ||
* | ||
* Failed requests are requests that failed due to | ||
* [timeouts](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout_event), | ||
* [network errors](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/error_event), | ||
* and [abort events](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/abort_event). | ||
* | ||
* Takes precedent over `retryStatusCodes` and `dontRetryStatusCodes`. | ||
* | ||
* @defaultValue true | ||
*/ | ||
retryFailedRequests?: boolean; | ||
}; | ||
@@ -278,0 +291,0 @@ /** |
@@ -276,2 +276,15 @@ /* | ||
idService?: string; | ||
/** | ||
* Whether to retry failed requests to the collector. | ||
* | ||
* Failed requests are requests that failed due to | ||
* [timeouts](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout_event), | ||
* [network errors](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/error_event), | ||
* and [abort events](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/abort_event). | ||
* | ||
* Takes precedent over `retryStatusCodes` and `dontRetryStatusCodes`. | ||
* | ||
* @defaultValue true | ||
*/ | ||
retryFailedRequests?: boolean; | ||
}; | ||
@@ -278,0 +291,0 @@ /** |
@@ -276,2 +276,15 @@ /* | ||
idService?: string; | ||
/** | ||
* Whether to retry failed requests to the collector. | ||
* | ||
* Failed requests are requests that failed due to | ||
* [timeouts](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout_event), | ||
* [network errors](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/error_event), | ||
* and [abort events](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/abort_event). | ||
* | ||
* Takes precedent over `retryStatusCodes` and `dontRetryStatusCodes`. | ||
* | ||
* @defaultValue true | ||
*/ | ||
retryFailedRequests?: boolean; | ||
}; | ||
@@ -278,0 +291,0 @@ /** |
/*! | ||
* Core functionality for Snowplow Browser trackers v3.16.0 (http://bit.ly/sp-js) | ||
* Core functionality for Snowplow Browser trackers v3.17.0 (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(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).snowplowBrowserTrackerCore={})}(this,(function(e){function n(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}function t(){var e,n={},t=[],r=[],i=[],a=function(e,t){null!=t&&""!==t&&(n[e]=t)};return{add:a,addDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a(n,e[n])},addJson:function(e,n,i){i&&o(i)&&(e={keyIfEncoded:e,keyIfNotEncoded:n,json:i},r.push(e),t.push(e))},addContextEntity:function(e){i.push(e)},getPayload:function(){return n},getJson:function(){return t},withJsonProcessor:function(n){e=n},build:function(){return null==e||e(this,r,i),n}}}function r(e){return function(t,r,o){for(var i=function(n,r,o){if(n=JSON.stringify(n),e){if(o=t.add,n){var i=0,a=0,c=[];if(n){n=unescape(encodeURIComponent(n));do{var u=n.charCodeAt(i++),s=n.charCodeAt(i++),l=n.charCodeAt(i++),f=u<<16|s<<8|l;u=f>>18&63,s=f>>12&63,l=f>>6&63,f&=63,c[a++]=ye.charAt(u)+ye.charAt(s)+ye.charAt(l)+ye.charAt(f)}while(i<n.length);i=c.join(""),n=((n=n.length%3)?i.slice(0,n-3):i)+"===".slice(n||3)}n=n.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o.call(t,r,n)}else t.add(o,n)},a=function(n,r){if(!n){var o=t.getPayload();if(e?o.cx:o.co){var i=(n=JSON).parse;if(e){if(o=o.cx){switch(4-o.length%4){case 2:o+="==";break;case 3:o+="="}o=function(e){var n,t=0,r=0,o="",i=[];if(!e)return e;e+="";do{var a=ye.indexOf(e.charAt(t++)),c=ye.indexOf(e.charAt(t++));o=ye.indexOf(e.charAt(t++));var u=ye.indexOf(e.charAt(t++)),s=a<<18|c<<12|o<<6|u;a=s>>16&255,c=s>>8&255,s&=255,i[r++]=64===o?String.fromCharCode(a):64===u?String.fromCharCode(a,c):String.fromCharCode(a,c,s)}while(t<e.length);return o=i.join(""),n=o.replace(/\0+$/,""),decodeURIComponent(n.split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}(o=o.replace(/-/g,"+").replace(/_/g,"/"))}}else o=o.co;n=i.call(n,o)}else n=void 0}return n?n.data=n.data.concat(r.data):n=r,n},c=void 0,u=0;u<r.length;u++){var s=r[u];"cx"===s.keyIfEncoded?c=a(c,s.json):i(s.json,s.keyIfEncoded,s.keyIfNotEncoded)}r.length=0,o.length&&(c=a(c,r={schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:n([],o,!0)}),o.length=0),c&&i(c,"cx","co")}}function o(e){if(!i(e))return!1;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))return!0;return!1}function i(e){return null!=e&&(e.constructor==={}.constructor||e.constructor===[].constructor)}function a(){var e=[],n=[];return{getGlobalPrimitives:function(){return e},getConditionalProviders:function(){return n},addGlobalContexts:function(t){for(var r=[],o=[],i=0;i<t.length;i++){var a=t[i];h(a)?r.push(a):g(a)&&o.push(a)}e=e.concat(o),n=n.concat(r)},clearGlobalContexts:function(){n=[],e=[]},removeGlobalContexts:function(t){for(var r=function(t){h(t)?n=n.filter((function(e){return JSON.stringify(e)!==JSON.stringify(t)})):g(t)&&(e=e.filter((function(e){return JSON.stringify(e)!==JSON.stringify(t)})))},o=0;o<t.length;o++)r(t[o])},getApplicableContexts:function(t){e:{for(var r=0,o=t.getJson();r<o.length;r++){var i=o[r];if("ue_px"===i.keyIfEncoded&&"object"==typeof i.json.data&&"string"==typeof(i=i.json.data.schema)){r=i;break e}}r=""}i="string"==typeof(o=t.getPayload().e)?o:"",o=[];var a=b(e,t,i,r);return o.push.apply(o,a),t=function(e,n,t,r){var o;return e=w(e).map((function(e){e:{if(v(e)){var o=e[0],i=!1;try{i=o({event:n.getPayload(),eventType:t,eventSchema:r})}catch(e){i=!1}if(!0===i){e=b(e[1],n,t,r);break e}}else if(p(e)&&function(e,n){var t=0,r=0,o=e.accept;return Array.isArray(o)?e.accept.some((function(e){return m(e,n)}))&&r++:"string"==typeof o&&m(o,n)&&r++,o=e.reject,Array.isArray(o)?e.reject.some((function(e){return m(e,n)}))&&t++:"string"==typeof o&&m(o,n)&&t++,0<r&&0===t}(e[0],r)){e=b(e[1],n,t,r);break e}e=[]}if(e&&0!==e.length)return e})),(o=[]).concat.apply(o,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}(n,t,i,r),o.push.apply(o,t),o}}}function c(e){return!!((e=e.split("."))&&1<e.length)&&function(e){if("*"===e[0]||"*"===e[1])return!1;if(0<e.slice(2).length){var n=!1,t=0;for(e=e.slice(2);t<e.length;t++)if("*"===e[t])n=!0;else if(n)return!1;return!0}return 2==e.length}(e)}function u(e){if(null!==(e=/^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(e))&&c(e[1]))return e.slice(1,6)}function s(e){if(e=u(e)){var n=e[0];return 5===e.length&&c(n)}return!1}function l(e){return function(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))}(e)?e.every((function(e){return s(e)})):"string"==typeof e&&s(e)}function f(e){return!!(o(e)&&"schema"in e&&"data"in e)&&("string"==typeof e.schema&&"object"==typeof e.data)}function d(e){return"function"==typeof e&&1>=e.length}function g(e){return d(e)||f(e)}function v(e){return!(!Array.isArray(e)||2!==e.length)&&(Array.isArray(e[1])?d(e[0])&&e[1].every(g):d(e[0])&&g(e[1]))}function p(e){return!(!Array.isArray(e)||2!==e.length)&&(!!function(e){var n=0;if(null!=e&&"object"==typeof e&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(e,"accept")){if(!l(e.accept))return!1;n+=1}if(Object.prototype.hasOwnProperty.call(e,"reject")){if(!l(e.reject))return!1;n+=1}return 0<n&&2>=n}return!1}(e[0])&&(Array.isArray(e[1])?e[1].every(g):g(e[1])))}function h(e){return v(e)||p(e)}function m(e,n){if(!s(e))return!1;if(e=u(e),n=null!==(n=/^iglu:([a-zA-Z0-9-_.]+)\/([a-zA-Z0-9-_]+)\/jsonschema\/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$/.exec(n))?n.slice(1,6):void 0,e&&n){if(!function(e,n){if(n=n.split("."),e=e.split("."),n&&e){if(n.length!==e.length)return!1;for(var t=0;t<e.length;t++)if(!y(n[t],e[t]))return!1;return!0}return!1}(e[0],n[0]))return!1;for(var t=1;5>t;t++)if(!y(e[t],n[t]))return!1;return!0}return!1}function y(e,n){return e&&n&&"*"===e||e===n}function w(e){return Array.isArray(e)?e:[e]}function b(e,n,t,r){var o;return e=w(e).map((function(e){e:if(f(e))e=[e];else{if(d(e)){n:{var o=void 0;try{if(o=e({event:n.getPayload(),eventType:t,eventSchema:r}),Array.isArray(o)&&o.every(f)||f(o)){var i=o;break n}i=void 0;break n}catch(e){}i=void 0}if(f(i)){e=[i];break e}if(Array.isArray(i)){e=i;break e}}e=void 0}if(e&&0!==e.length)return e})),(o=[]).concat.apply(o,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}function S(e){void 0===e&&(e={});var t,o,c,u,s,l,f,d=e.base64,g=e.corePlugins,v=null!=g?g:[];t=null==d||d,o=v,c=e.callback,u=function(e){return{addPluginContexts:function(t){var r=t?n([],t,!0):[];return e.forEach((function(e){try{e.contexts&&r.push.apply(r,e.contexts())}catch(e){we.error("Error adding plugin contexts",e)}})),r}}}(o),s=a(),l=t,f={};var p=ne(ne({},e={track:function(e,n,t){e.withJsonProcessor(r(l)),e.add("eid",me.v4()),e.addDict(f),t=function(e){return null==e?{type:"dtm",value:(new Date).getTime()}:"number"==typeof e?{type:"dtm",value:e}:"ttm"===e.type?{type:"ttm",value:e.value}:{type:"dtm",value:e.value||(new Date).getTime()}}(t),e.add(t.type,t.value.toString()),n=function(e,n){e=s.getApplicableContexts(e);var t=[];return n&&n.length&&t.push.apply(t,n),e&&e.length&&t.push.apply(t,e),t}(e,u.addPluginContexts(n)),void 0!==(n=n&&n.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:n}:void 0)&&e.addJson("cx","co",n),o.forEach((function(n){try{n.beforeTrack&&n.beforeTrack(e)}catch(e){we.error("Plugin beforeTrack",e)}})),"function"==typeof c&&c(e);var i=e.build();return o.forEach((function(e){try{e.afterTrack&&e.afterTrack(i)}catch(e){we.error("Plugin afterTrack",e)}})),i},addPayloadPair:function(e,n){f[e]=n},getBase64Encoding:function(){return l},setBase64Encoding:function(e){l=e},addPayloadDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(f[n]=e[n])},resetPayloadPairs:function(e){f=i(e)?e:{}},setTrackerVersion:function(e){f.tv=e},setTrackerNamespace:function(e){f.tna=e},setAppId:function(e){f.aid=e},setPlatform:function(e){f.p=e},setUserId:function(e){f.uid=e},setScreenResolution:function(e,n){f.res=e+"x"+n},setViewport:function(e,n){f.vp=e+"x"+n},setColorDepth:function(e){f.cd=e},setTimezone:function(e){f.tz=e},setLang:function(e){f.lang=e},setIpAddress:function(e){f.ip=e},setUseragent:function(e){f.ua=e},addGlobalContexts:function(e){s.addGlobalContexts(e)},clearGlobalContexts:function(){s.clearGlobalContexts()},removeGlobalContexts:function(e){s.removeGlobalContexts(e)}}),{addPlugin:function(e){var n,t;e=e.plugin,v.push(e),null===(n=e.logger)||void 0===n||n.call(e,we),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,p)}});return null==v||v.forEach((function(e){var n,t;null===(n=e.logger)||void 0===n||n.call(e,we),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,p)})),p}function k(e){try{var n=window.localStorage,t=n.getItem(e+".expires");if(null===t||+t>Date.now())return n.getItem(e);n.removeItem(e),n.removeItem(e+".expires")}catch(e){}}function T(e,n,t){void 0===t&&(t=63072e3);try{var r=window.localStorage,o=Date.now()+1e3*t;return r.setItem("".concat(e,".expires"),o.toString()),r.setItem(e,n),!0}catch(e){return!1}}function x(e){try{var n=window.localStorage;return n.removeItem(e),n.removeItem(e+".expires"),!0}catch(e){return!1}}function A(e){try{return window.sessionStorage.getItem(e)}catch(e){}}function C(e,n){try{return window.sessionStorage.setItem(e,n),!0}catch(e){return!1}}function O(e){return!(!e||"string"!=typeof e.valueOf())}function I(e){return Number.isInteger&&Number.isInteger(e)||"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function P(e){if(!O(e)){e=e.text||"";var n=document.getElementsByTagName("title");n&&null!=n[0]&&(e=n[0].text)}return e}function E(e){var n=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(e);return n?n[1]:e}function j(e){var n=e.length;return"."===e.charAt(--n)&&(e=e.slice(0,n)),"*."===e.slice(0,2)&&(e=e.slice(1)),e}function L(e){var n=window,t=D("referrer",n.location.href)||D("referer",n.location.href);if(t)return t;if(e)return e;try{if(n.top)return n.top.document.referrer;if(n.parent)return n.parent.document.referrer}catch(e){}return document.referrer}function N(e,n,t,r){return e.addEventListener?(e.addEventListener(n,t,r),!0):e.attachEvent?e.attachEvent("on"+n,t):void(e["on"+n]=t)}function D(e,n){return(e=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(n))?decodeURIComponent(e[1].replace(/\+/g," ")):null}function _(e,n,t){t=n+"="+t;var r=(e=e.split("#"))[0].split("?"),o=r.shift();if(r=r.join("?")){for(var i=!0,a=r.split("&"),c=0;c<a.length;c++)if(a[c].substr(0,n.length+1)===n+"="){i=!1,a[c]=t,r=a.join("&");break}i&&(r=t+"&"+r)}else r=t;return e[0]=o+"?"+r,e.join("#")}function B(e,n){for(var t=window.location.hostname,r="_sp_root_domain_test_"+(new Date).getTime(),o="_test_value_"+(new Date).getTime(),i=t.split("."),a=i.length-2;0<=a;a--){var c=i.slice(a).join(".");if(R(r,o,0,"/",c,e,n),R(r)===o){for(M(r,c,e,n),t=U("_sp_root_domain_test_"),r=0;r<t.length;r++)M(t[r],c,e,n);return c}}return t}function M(e,n,t,r){R(e,"",-1,"/",n,t,r)}function U(e){for(var n=document.cookie.split("; "),t=[],r=0;r<n.length;r++)n[r].substring(0,e.length)===e&&t.push(n[r]);return t}function R(e,n,t,r,o,i,a){return 1<arguments.length?document.cookie=e+"="+encodeURIComponent(null!=n?n:"")+(t?"; Expires="+new Date(+new Date+1e3*t).toUTCString():"")+(r?"; Path="+r:"")+(o?"; Domain="+o:"")+(i?"; SameSite="+i:"")+(a?"; Secure":""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}function V(e){return e.className.match(/\S+/g)||[]}function z(e,n){return e.hasOwnProperty("filter")&&e.filter?e.filter:n}function H(e){var n={};if(e=e.allowlist||e.denylist){Array.isArray(e)||(e=[e]);for(var t=0;t<e.length;t++)n[e[t]]=!0}return n}function J(){try{return!!window.localStorage}catch(e){return!0}}function F(){if(!J())return!1;try{var e=window.localStorage;return e.setItem("modernizr","modernizr"),e.removeItem("modernizr"),!0}catch(e){return!1}}function G(e,n,t){return"translate.googleusercontent.com"===e?(""===t&&(t=n),e=E(n=null!=(e=(e=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(n))&&1<(null==e?void 0:e.length)?D("u",e[1]):null)?e:"")):"cc.bingj.com"!==e&&"webcache.googleusercontent.com"!==e||(e=E(n=document.links[0].href)),[e,n,t]}function q(e,n){return void 0===n&&(n={memorizedVisitCount:1}),n=n.memorizedVisitCount,"0"===e[0]?(e[7]=e[6],e[5]=e[4],e[3]++):e[3]=n,n=me.v4(),e[6]=n,e[10]=0,e[8]="",e[9]=void 0,n}function W(e){e[4]=Math.round((new Date).getTime()/1e3)}function Q(e,n,t){var r=e[9];return{userId:t?"00000000-0000-0000-0000-000000000000":e[1],sessionId:e[6],eventIndex:e[10],sessionIndex:e[3],previousSessionId:t?null:e[7]||null,storageMechanism:"localStorage"==n?"LOCAL_STORAGE":"COOKIE_1",firstEventId:e[8]||null,firstEventTimestamp:r?new Date(r).toISOString():null}}function X(){var e=Z;if("innerWidth"in window)var n=window.innerWidth,t=window.innerHeight;else n=(t=document.documentElement||document.body).clientWidth,t=t.clientHeight;e=e(0<=n&&0<=t?n+"x"+t:null),n=Z;var r=document.documentElement,o=document.body;return t=Math.max(r.clientWidth,r.offsetWidth,r.scrollWidth),r=Math.max(r.clientHeight,r.offsetHeight,r.scrollHeight,o?Math.max(o.offsetHeight,o.scrollHeight):0),{viewport:e,documentSize:n(t=isNaN(t)||isNaN(r)?"":t+"x"+r),resolution:Z(screen.width+"x"+screen.height),colorDepth:screen.colorDepth,devicePixelRatio:window.devicePixelRatio,cookiesEnabled:window.navigator.cookieEnabled,online:window.navigator.onLine,browserLanguage:navigator.language||navigator.userLanguage,documentLanguage:document.documentElement.lang,webdriver:window.navigator.webdriver,deviceMemory:window.navigator.deviceMemory,hardwareConcurrency:window.navigator.hardwareConcurrency}}function Z(e){return e&&e.split("x").map((function(e){return Math.floor(Number(e))})).join("x")}function Y(e,n,r,o,i,a){void 0===a&&(a={});var c=[];e=function(e,n,r,o,i,a){function u(){(cn=G(window.location.hostname,window.location.href,L()))[1]!==sn&&(ln=L(sn)),un=j(cn[0]),sn=cn[1]}function s(e){var n=(new Date).getTime();null!=(e=e.currentTarget)&&e.href&&(e.href=_(e.href,"_sp",en+"."+n))}function l(e){for(var n=0;n<document.links.length;n++){var t=document.links[n];!t.spDecorationEnabled&&e(t)&&(N(t,"click",s,!0),N(t,"mousedown",s,!0),t.spDecorationEnabled=!0)}}function f(e){if(Ge){var n=/#.*/;e=e.replace(n,"")}return qe&&(n=/[{}]/g,e=e.replace(n,"")),e}function d(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function g(e){return e=mn+e+"."+$e,"localStorage"==Pn?k(e):"cookie"==Pn||"cookieAndLocalStorage"==Pn?R(e):void 0}function v(){u(),$e=xe((yn||un)+(wn||"/")).slice(0,4)}function p(){Qe=(new Date).getTime()}function h(){var e=m(),n=e[0];n<Xe?Xe=n:n>Ze&&(Ze=n),(e=e[1])<Ye?Ye=e:e>Ke&&(Ke=e),p()}function m(){var e=document.documentElement;return e?[e.scrollLeft||window.pageXOffset,e.scrollTop||window.pageYOffset]:[0,0]}function y(){var e=m(),n=e[0];Ze=Xe=n,Ke=Ye=e=e[1]}function w(){return U(mn+"ses."+$e,"*",An)}function b(e){var n=mn+"id."+$e;return e.shift(),U(n,e=e.join("."),xn)}function U(e,n,t){return!(In&&!Cn)&&("localStorage"==Pn?T(e,n,t):("cookie"==Pn||"cookieAndLocalStorage"==Pn)&&(R(e,n,t,wn,yn,bn,Sn),-1!==document.cookie.indexOf("".concat(e,"="))))}function V(e){var n=mn+"id."+$e,t=mn+"ses."+$e;x(n),x(t),M(n,yn,bn,Sn),M(t,yn,bn,Sn),null!=e&&e.preserveSession||(nn=me.v4(),jn=1),null!=e&&e.preserveUser||(en=In?"":me.v4(),tn=null)}function z(e){e&&e.stateStorageStrategy&&(a.stateStorageStrategy=e.stateStorageStrategy,Pn=Me(a)),In=!!a.anonymousTracking,Cn=Ue(a),On=Re(a),Ln.setUseLocalStorage("localStorage"==Pn||"cookieAndLocalStorage"==Pn),Ln.setAnonymousTracking(On)}function H(){if(!In||Cn){var e="none"!=Pn&&!!g("ses"),n=J();if(n[1])var t=n[1];else t=In?"":me.v4(),n[1]=t;en=t,nn=e?n[6]:q(n),jn=n[3],"none"!=Pn&&(w(),W(n),b(n))}}function J(){return"none"==Pn?["1","",0,0,0,void 0,"","","",void 0,0]:function(e,n,t,r){var o=Math.round((new Date).getTime()/1e3);e?(e=e.split(".")).unshift("0"):e=["1",n,o,r,o,"",t],e[6]&&"undefined"!==e[6]||(e[6]=me.v4()),e[7]&&"undefined"!==e[7]||(e[7]=""),e[8]&&"undefined"!==e[8]||(e[8]=""),e[9]&&"undefined"!==e[9]||(e[9]=""),e[10]&&"undefined"!==e[10]||(e[10]=0);var i=function(e,n){return e=parseInt(e),isNaN(e)?n:e};return n=function(e){return e?i(e,void 0):void 0},[e[0],e[1],i(e[2],o),i(e[3],r),i(e[4],o),n(e[5]),e[6],e[7],e[8],n(e[9]),i(e[10],0)]}(g("id")||void 0,en,nn,jn)}function Z(e){return 0===e.indexOf("http")?e:("https:"===document.location.protocol?"https":"http")+"://"+e}function Y(){Nn&&null!=i.pageViewId||(i.pageViewId=me.v4())}function K(){return null==i.pageViewId&&(i.pageViewId=me.v4()),i.pageViewId}function $(){if("none"===Pn||In||!ze)return null;var e=A("_sp_tab_id");return e||(C("_sp_tab_id",me.v4()),e=A("_sp_tab_id")),e||null}function ee(e){var n=e.title,r=e.context,o=e.timestamp;if(e=e.contextCallback,u(),Dn&&Y(),Dn=!0,pn=document.title,n=P((Fe=n)||pn),on.track(function(e){var n=e.pageUrl,r=e.pageTitle;e=e.referrer;var o=t();return o.add("e","pv"),o.add("url",n),o.add("page",r),o.add("refr",e),o}({pageUrl:f(Je||sn),pageTitle:n,referrer:f(He||ln)}),(r||[]).concat(e?e():[]),o),o=new Date,n=!1,_n.enabled&&!_n.installed){n=_n.installed=!0;var i={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,n=Object.defineProperty({},"passive",{get:function(){e=!0},set:function(){}}),t=function(){};window.addEventListener("testPassiveEventSupport",t,n),window.removeEventListener("testPassiveEventSupport",t,n),i.hasSupport=e}}};i.update();var a="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(i,"hasSupport")?N(document,a,p,{passive:!0}):N(document,a,p),y(),a=function(e,n){return void 0===n&&(n=p),function(e){return N(document,e,n)}},"click mouseup mousedown mousemove keypress keydown keyup touchend touchstart".split(" ").forEach(a(document)),["resize","focus","blur"].forEach(a(window)),a(window,h)("scroll")}if(_n.enabled&&(hn||n))for(o in Qe=o.getTime(),o=void 0,_n.configurations)(n=_n.configurations[o])&&(window.clearInterval(n.activityInterval),te(n,r,e))}function te(e,n,t){var r=function(e,n){u(),e({context:n,pageViewId:K(),minXOffset:Xe,minYOffset:Ye,maxXOffset:Ze,maxYOffset:Ke}),y()},o=function(){Qe+e.configHeartBeatTimer>(new Date).getTime()&&r(e.callback,(n||[]).concat(t?t():[]))};e.activityInterval=0===e.configMinimumVisitLength?window.setInterval(o,e.configHeartBeatTimer):window.setTimeout((function(){Qe+e.configMinimumVisitLength>(new Date).getTime()&&r(e.callback,(n||[]).concat(t?t():[])),e.activityInterval=window.setInterval(o,e.configHeartBeatTimer)}),e.configMinimumVisitLength)}function re(e){var n=e.minimumVisitLength,t=e.heartbeatDelay;if(e=e.callback,I(n)&&I(t))return{configMinimumVisitLength:1e3*n,configHeartBeatTimer:1e3*t,callback:e};we.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function oe(e){var n=e.context,r=e.minXOffset,o=e.minYOffset,i=e.maxXOffset,a=e.maxYOffset;(e=document.title)!==pn&&(pn=e,Fe=void 0);var c=(e=on).track,u=f(Je||sn),s=P(Fe||pn),l=f(He||ln);r=Math.round(r),i=Math.round(i),o=Math.round(o),a=Math.round(a);var d=t();d.add("e","pp"),d.add("url",u),d.add("page",s),d.add("refr",l),r&&!isNaN(Number(r))&&d.add("pp_mix",r.toString()),i&&!isNaN(Number(i))&&d.add("pp_max",i.toString()),o&&!isNaN(Number(o))&&d.add("pp_miy",o.toString()),a&&!isNaN(Number(a))&&d.add("pp_may",a.toString()),c.call(e,d,n)}function ie(e){var n=_n.configurations[e];0===(null==n?void 0:n.configMinimumVisitLength)?window.clearTimeout(null==n?void 0:n.activityInterval):window.clearInterval(null==n?void 0:n.activityInterval),_n.configurations[e]=void 0}var ae,ce,ue,se,le,fe,de,ge,ve,pe,he,ye,be,Se,ke,Te,Ae,Ce,Oe,Ie,Pe,Ee,je,Le,Ne,De,_e,Be;a.eventMethod=null!==(ae=a.eventMethod)&&void 0!==ae?ae:"post";var Me=function(e){var n;return null!==(n=e.stateStorageStrategy)&&void 0!==n?n:"cookieAndLocalStorage"},Ue=function(e){var n,t;return"boolean"!=typeof e.anonymousTracking&&(null!==(t=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withSessionTracking))&&void 0!==t&&t)},Re=function(e){var n,t;return"boolean"!=typeof e.anonymousTracking&&(null!==(t=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withServerAnonymisation))&&void 0!==t&&t)},Ve=null!==(ue=null===(ce=null==a?void 0:a.contexts)||void 0===ce?void 0:ce.browser)&&void 0!==ue&&ue,ze=null===(le=null===(se=null==a?void 0:a.contexts)||void 0===se?void 0:se.webPage)||void 0===le||le;c.push({beforeTrack:function(e){var n=g("ses"),t=J(),r=0===t[10];if(rn=!!We&&!!R(We),Tn||rn)V();else{if("0"===t[0]?(nn=n||"none"==Pn?t[6]:q(t),jn=t[3]):(new Date).getTime()-En>1e3*An&&(jn++,nn=q(t,{memorizedVisitCount:jn})),W(t),0===t[10]){var o=e.build();t[8]=o.eid,o=o.dtm||o.ttm,t[9]=o?parseInt(o):void 0}t[10]+=1;var i=(o=X()).documentSize;e.add("vp",o.viewport),e.add("ds",i),e.add("vid",Cn?jn:In?null:jn),e.add("sid",Cn?nn:In?null:nn),e.add("duid",In?null:t[1]),e.add("uid",In?null:tn),u(),e.add("refr",f(He||ln)),e.add("url",f(Je||sn)),o=Q(t,Pn,In),!Bn||In&&!Cn||e.addContextEntity({schema:"iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2",data:o}),"none"!=Pn&&(b(t),e=w(),n&&!r||!e||!Mn||Un||(Mn(o),Un=!1)),En=(new Date).getTime()}}}),ze&&c.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:K()}}]}}),Ve&&c.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/browser_context/jsonschema/1-0-0",data:ne(ne({},X()),{tabId:$()})}]}}),c.push.apply(c,null!==(fe=a.plugins)&&void 0!==fe?fe:[]);var He,Je,Fe,Ge,qe,We,Qe,Xe,Ze,Ye,Ke,$e,en,nn,tn,rn,on=S({base64:a.encodeBase64,corePlugins:c,callback:function(e){Tn||rn||Ln.enqueueRequest(e.build(),dn)}}),an=document.characterSet||document.charset,cn=G(window.location.hostname,window.location.href,L()),un=j(cn[0]),sn=cn[1],ln=cn[2],fn=null!==(de=a.platform)&&void 0!==de?de:"web",dn=Z(o),gn=null!==(ge=a.postPath)&&void 0!==ge?ge:"/com.snowplowanalytics.snowplow/tp2",vn=null!==(ve=a.appId)&&void 0!==ve?ve:"",pn=document.title,hn=null===(pe=a.resetActivityTrackingOnPageView)||void 0===pe||pe,mn=null!==(he=a.cookieName)&&void 0!==he?he:"_sp_",yn=null!==(ye=a.cookieDomain)&&void 0!==ye?ye:void 0,wn="/",bn=null!==(be=a.cookieSameSite)&&void 0!==be?be:"None",Sn=null===(Se=a.cookieSecure)||void 0===Se||Se,kn=navigator.doNotTrack||navigator.msDoNotTrack||window.doNotTrack,Tn=void 0!==a.respectDoNotTrack&&(a.respectDoNotTrack&&("yes"===kn||"1"===kn)),xn=null!==(ke=a.cookieLifetime)&&void 0!==ke?ke:63072e3,An=null!==(Te=a.sessionCookieTimeout)&&void 0!==Te?Te:1800,Cn=Ue(a),On=Re(a),In=!!a.anonymousTracking,Pn=Me(a),En=(new Date).getTime(),jn=1,Ln=function(e,n,t,r,o,i,a,c,u,s,l,f,d,g,v,p,h){function m(e){var n=Object.keys(e).map((function(n){return[n,e[n]]})).reduce((function(e,n){return e[n[0]]=n[1].toString(),e}),{});return{evt:n,bytes:y(JSON.stringify(n))}}function y(e){for(var n=0,t=0;t<e.length;t++){var r=e.charCodeAt(t);127>=r?n+=1:2047>=r?n+=2:55296<=r&&57343>=r?(n+=4,t++):n=65535>r?n+3:n+4}return n}function w(e){for(void 0===e&&(e=!1);j.length&&"string"!=typeof j[0]&&"object"!=typeof j[0];)j.shift();if(j.length){if(!O(A))throw"No collector configured";if(E=!0,h&&!L){var n=b(h,!1,e);L=!0,n.timeout=l,n.onreadystatechange=function(){4===n.readyState&&w()},n.send()}else if(_){var r=function(e){for(var n=0,t=0;n<e.length&&!((t+=e[n].bytes)>=a);)n+=1;return n},o=void 0;if(V(j))var i=b(o=A,!0,e),c=r(j);else o=x(j[0]),i=b(o,!1,e),c=1;var u=setTimeout((function(){i.abort(),E=!1}),l),d=function(e){for(var n=0;n<e;n++)j.shift();t&&T(U,JSON.stringify(j.slice(0,s)))};if(i.onreadystatechange=function(){if(4===i.readyState&&200<=i.status)if(clearTimeout(u),300>i.status)d(c),w();else{var e=i.status;(e=!(200<=e&&300>e||!v.includes(e)&&p.includes(e)))||(we.error("Status ".concat(i.status,", will not retry.")),d(c)),E=!1}},V(j)){if(0<(r=j.slice(0,c)).length){if(e=!1,r=r.map((function(e){return e.evt})),D){var g=new Blob([S(k(r))],{type:"application/json"});try{e=navigator.sendBeacon(o,g)}catch(n){e=!1}}!0===e?(d(c),w()):i.send(S(k(r)))}}else i.send()}else if(f||V(j))E=!1;else{o=new Image(1,1);var m=!0;o.onload=function(){m&&(m=!1,j.shift(),t&&T(U,JSON.stringify(j.slice(0,s))),w())},o.onerror=function(){m&&(E=m=!1)},o.src=x(j[0]),setTimeout((function(){m&&E&&(m=!1,w())}),l)}}else E=!1}function b(e,n,t){var r=new XMLHttpRequest;for(var o in n?(r.open("POST",e,!t),r.setRequestHeader("Content-Type","application/json; charset=UTF-8")):r.open("GET",e,!t),r.withCredentials=g,f&&r.setRequestHeader("SP-Anonymous","*"),d)Object.prototype.hasOwnProperty.call(d,o)&&r.setRequestHeader(o,d[o]);return r}function S(e){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",data:e})}function k(e){for(var n=(new Date).getTime().toString(),t=0;t<e.length;t++)e[t].stm=n;return e}function x(e){return u?A+e.replace("?","?stm="+(new Date).getTime()+"&"):A+e}var A,C,I,P,E=!1,j=[],L=!1,N=!0===(r="string"==typeof r?r.toLowerCase():r)||"beacon"===r||"true"===r,D=!(!(N&&window.navigator&&window.navigator.sendBeacon)||(C=window.navigator.userAgent,(P=(P=C).match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/"))&&P.length&&parseInt(P[0])<=13||function(e,n,t){return!(!(t=t.match("(Macintosh;.*Mac OS X (d+)_(d+)[_d]*.*) AppleWebKit/"))||!t.length)&&(parseInt(t[0])<=e||parseInt(t[0])===e&&parseInt(t[1])<=n)}(10,15,C)&&(I=C).match("Version/.* Safari/")&&!I.match("Chrom(e|ium)")))&&N,_=!(!window.XMLHttpRequest||!("withCredentials"in new XMLHttpRequest)),B="get"!==r&&_&&("post"===r||N),M=B?o:"/i",U="snowplowOutQueue_".concat(e,"_").concat(B?"post2":"get");if(N&&(d={}),i=t&&F()&&B&&i||1,t)try{var R=window.localStorage.getItem(U);j=R?JSON.parse(R):[]}catch(C){}Array.isArray(j)||(j=[]),n.outQueues.push(j),_&&1<i&&n.bufferFlushers.push((function(e){E||w(e)}));var V=function(e){return"object"==typeof e[0]&&"evt"in e[0]};return{enqueueRequest:function(e,n){if(A=n+M,B){if((e=m(e)).bytes>=a)return we.warn("Event ("+e.bytes+"B) too big, max is "+a),n=e,void b(A,!0,!1).send(S(k([n.evt])));j.push(e)}else{var r,u="?",l={co:!0,cx:!0},f=!0;for(r in e)e.hasOwnProperty(r)&&!l.hasOwnProperty(r)&&(f?f=!1:u+="&",u+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));for(var d in l)e.hasOwnProperty(d)&&l.hasOwnProperty(d)&&(u+="&"+d+"="+encodeURIComponent(e[d]));if(0<c&&(l=y(l=x(u)))>=c)return we.warn("Event ("+l+"B) too big, max is "+c),void(_&&(e=m(e),b(n+o,!0,!1).send(S(k([e.evt])))));j.push(u)}n=!1,t&&(n=T(U,JSON.stringify(j.slice(0,s)))),E||n&&!(j.length>=i)||w()},executeQueue:function(){E||w()},setUseLocalStorage:function(e){t=e},setAnonymousTracking:function(e){f=e},setCollectorUrl:function(e){A=e+M},setBufferSize:function(e){i=e}}}(e,i,"localStorage"==Pn||"cookieAndLocalStorage"==Pn,a.eventMethod,gn,null!==(Ae=a.bufferSize)&&void 0!==Ae?Ae:1,null!==(Ce=a.maxPostBytes)&&void 0!==Ce?Ce:4e4,null!==(Oe=a.maxGetBytes)&&void 0!==Oe?Oe:0,null===(Ie=a.useStm)||void 0===Ie||Ie,null!==(Pe=a.maxLocalStorageQueueSize)&&void 0!==Pe?Pe:1e3,null!==(Ee=a.connectionTimeout)&&void 0!==Ee?Ee:5e3,On,null!==(je=a.customHeaders)&&void 0!==je?je:{},null===(Le=a.withCredentials)||void 0===Le||Le,null!==(Ne=a.retryStatusCodes)&&void 0!==Ne?Ne:[],(null!==(De=a.dontRetryStatusCodes)&&void 0!==De?De:[]).concat([400,401,403,410,422]),a.idService),Nn=!1,Dn=!1,_n={enabled:!1,installed:!1,configurations:{}},Bn=null!==(Be=null===(_e=a.contexts)||void 0===_e?void 0:_e.session)&&void 0!==Be&&Be,Mn=a.onSessionUpdateCallback,Un=!1;a.hasOwnProperty("discoverRootDomain")&&a.discoverRootDomain&&(yn=B(bn,Sn));var Rn=X(),Vn=Rn.browserLanguage,zn=Rn.resolution,Hn=Rn.colorDepth,Jn=Rn.cookiesEnabled;return on.setTrackerVersion(r),on.setTrackerNamespace(n),on.setAppId(vn),on.setPlatform(fn),on.addPayloadPair("cookie",Jn?"1":"0"),on.addPayloadPair("cs",an),on.addPayloadPair("lang",Vn),on.addPayloadPair("res",zn),on.addPayloadPair("cd",Hn),v(),H(),a.crossDomainLinker&&l(a.crossDomainLinker),ne(ne({},{getDomainSessionIndex:function(){return jn},getPageViewId:K,getTabId:$,newSession:function(){var e=J();if("0"===e[0]?(nn="none"!=Pn?q(e):e[6],jn=e[3]):(jn++,nn=q(e,{memorizedVisitCount:jn})),W(e),"none"!=Pn){var n=Q(e,Pn,In);b(e),w()&&Mn&&(Un=!0,Mn(n))}En=(new Date).getTime()},getCookieName:function(e){return mn+e+"."+$e},getUserId:function(){return tn},getDomainUserId:function(){return J()[1]},getDomainUserInfo:function(){return J()},setReferrerUrl:function(e){He=e},setCustomUrl:function(e){u();var n,t=sn;d(e)?Je=e:"/"===e.slice(0,1)?Je=d(t)+"://"+E(t)+e:(0<=(n=(t=f(t)).indexOf("?"))&&(t=t.slice(0,n)),(n=t.lastIndexOf("/"))!==t.length-1&&(t=t.slice(0,n+1)),Je=t+e)},setDocumentTitle:function(e){pn=document.title,Fe=e},discardHashTag:function(e){Ge=e},discardBrace:function(e){qe=e},setCookiePath:function(e){wn=e,v()},setVisitorCookieTimeout:function(e){xn=e},crossDomainLinker:function(e){l(e)},enableActivityTracking:function(e){_n.configurations.pagePing||(_n.enabled=!0,_n.configurations.pagePing=re(ne(ne({},e),{callback:oe})))},enableActivityTrackingCallback:function(e){_n.configurations.callback||(_n.enabled=!0,_n.configurations.callback=re(e))},disableActivityTracking:function(){ie("pagePing")},disableActivityTrackingCallback:function(){ie("callback")},updatePageActivity:function(){p()},setOptOutCookie:function(e){We=e},setUserId:function(e){tn=e},setUserIdFromLocation:function(e){u(),tn=D(e,sn)},setUserIdFromReferrer:function(e){u(),tn=D(e,ln)},setUserIdFromCookie:function(e){tn=R(e)},setCollectorUrl:function(e){dn=Z(e),Ln.setCollectorUrl(dn)},setBufferSize:function(e){Ln.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={}),Ln.executeQueue(),e.newBufferSize&&Ln.setBufferSize(e.newBufferSize)},trackPageView:function(e){void 0===e&&(e={}),ee(e)},preservePageViewId:function(){Nn=!0},disableAnonymousTracking:function(e){a.anonymousTracking=!1,z(e),H(),Ln.executeQueue()},enableAnonymousTracking:function(e){var n;a.anonymousTracking=null===(n=e&&(null==e?void 0:e.options))||void 0===n||n,z(e),Cn||Y()},clearUserData:V}),{id:e,namespace:n,core:on,sharedState:i})}(e,n,r,o,i,a);var u=ne(ne({},e),{addPlugin:function(e){var n,t;u.core.addPlugin(e),null===(t=(n=e.plugin).activateBrowserPlugin)||void 0===t||t.call(n,u)}});return c.forEach((function(e){var n;null===(n=e.activateBrowserPlugin)||void 0===n||n.call(e,u)})),u}function K(e){return ee(e,Ae)}function $(){return Object.keys(Ae)}function ee(e,n){for(var t=[],r=0;r<e.length;r++){var o=e[r];n.hasOwnProperty(o)?t.push(n[o]):we.warn(o+" not configured")}return t}var ne=function(){return ne=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},ne.apply(this,arguments)},te={},re="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(re){var oe=new Uint8Array(16);te=function(){return re(oe),oe}}else{var ie=Array(16);te=function(){for(var e,n=0;16>n;n++)0==(3&n)&&(e=4294967296*Math.random()),ie[n]=e>>>((3&n)<<3)&255;return ie}}for(var ae=[],ce=0;256>ce;++ce)ae[ce]=(ce+256).toString(16).substr(1);var ue,se,le=function(e,n){return n=n||0,[ae[e[n++]],ae[e[n++]],ae[e[n++]],ae[e[n++]],"-",ae[e[n++]],ae[e[n++]],"-",ae[e[n++]],ae[e[n++]],"-",ae[e[n++]],ae[e[n++]],"-",ae[e[n++]],ae[e[n++]],ae[e[n++]],ae[e[n++]],ae[e[n++]],ae[e[n++]]].join("")},fe=te,de=0,ge=0,ve=te;te=function(e,n,t){if(t=n&&t||0,"string"==typeof e&&(n="binary"===e?Array(16):null,e=null),(e=(e=e||{}).random||(e.rng||ve)())[6]=15&e[6]|64,e[8]=63&e[8]|128,n)for(var r=0;16>r;++r)n[t+r]=e[r];return n||le(e)},te.v1=function(e,n,t){t=n&&t||0;var r=n||[],o=(e=e||{}).node||ue,i=void 0!==e.clockseq?e.clockseq:se;if(null==o||null==i){var a=fe();null==o&&(o=ue=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==i&&(i=se=16383&(a[6]<<8|a[7]))}a=void 0!==e.msecs?e.msecs:(new Date).getTime();var c=void 0!==e.nsecs?e.nsecs:ge+1,u=a-de+(c-ge)/1e4;if(0>u&&void 0===e.clockseq&&(i=i+1&16383),(0>u||a>de)&&void 0===e.nsecs&&(c=0),1e4<=c)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");for(de=a,ge=c,se=i,e=(1e4*(268435455&(a+=122192928e5))+c)%4294967296,r[t++]=e>>>24&255,r[t++]=e>>>16&255,r[t++]=e>>>8&255,r[t++]=255&e,e=a/4294967296*1e4&268435455,r[t++]=e>>>8&255,r[t++]=255&e,r[t++]=e>>>24&15|16,r[t++]=e>>>16&255,r[t++]=i>>>8|128,r[t++]=255&i,i=0;6>i;++i)r[t+i]=o[i];return n||le(r)};var pe,he,me=te.v4=te,ye="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";(he=pe||(pe={}))[he.none=0]="none",he[he.error=1]="error",he[he.warn=2]="warn",he[he.debug=3]="debug",he[he.info=4]="info";var we=function(e){return void 0===e&&(e=pe.warn),{setLogLevel:function(n){e=pe[n]?n:pe.warn},warn:function(t,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];e>=pe.warn&&"undefined"!=typeof console&&(i="Snowplow: "+t,r?console.warn.apply(console,n([i+"\n",r],o,!1)):console.warn.apply(console,n([i],o,!1)))},error:function(t,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];e>=pe.error&&"undefined"!=typeof console&&(i="Snowplow: "+t+"\n",r?console.error.apply(console,n([i+"\n",r],o,!1)):console.error.apply(console,n([i],o,!1)))},debug:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e>=pe.debug&&"undefined"!=typeof console&&console.debug.apply(console,n(["Snowplow: "+t],r,!1))},info:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e>=pe.info&&"undefined"!=typeof console&&console.info.apply(console,n(["Snowplow: "+t],r,!1))}}}(),be={},Se={};!function(){var e={rotl:function(e,n){return e<<n|e>>>32-n},rotr:function(e,n){return e<<32-n|e>>>n},endian:function(n){if(n.constructor==Number)return 16711935&e.rotl(n,8)|4278255360&e.rotl(n,24);for(var t=0;t<n.length;t++)n[t]=e.endian(n[t]);return n},randomBytes:function(e){for(var n=[];0<e;e--)n.push(Math.floor(256*Math.random()));return n},bytesToWords:function(e){for(var n=[],t=0,r=0;t<e.length;t++,r+=8)n[r>>>5]|=e[t]<<24-r%32;return n},wordsToBytes:function(e){for(var n=[],t=0;t<32*e.length;t+=8)n.push(e[t>>>5]>>>24-t%32&255);return n},bytesToHex:function(e){for(var n=[],t=0;t<e.length;t++)n.push((e[t]>>>4).toString(16)),n.push((15&e[t]).toString(16));return n.join("")},hexToBytes:function(e){for(var n=[],t=0;t<e.length;t+=2)n.push(parseInt(e.substr(t,2),16));return n},bytesToBase64:function(e){for(var n=[],t=0;t<e.length;t+=3)for(var r=e[t]<<16|e[t+1]<<8|e[t+2],o=0;4>o;o++)8*t+6*o<=8*e.length?n.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],t=0,r=0;t<e.length;r=++t%4)0!=r&&n.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(t-1))&Math.pow(2,-2*r+8)-1)<<2*r|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(t))>>>6-2*r);return n}};Se=e}();var ke={utf8:{stringToBytes:function(e){return ke.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(ke.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var n=[],t=0;t<e.length;t++)n.push(255&e.charCodeAt(t));return n},bytesToString:function(e){for(var n=[],t=0;t<e.length;t++)n.push(String.fromCharCode(e[t]));return n.join("")}}},Te=ke;!function(){var e=Se,n=Te.utf8,t=Te.bin,r=function(r,o){var i=e.wordsToBytes,a=r;a.constructor==String?a=n.stringToBytes(a):"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(a)?a=Array.prototype.slice.call(a,0):Array.isArray(a)||(a=a.toString()),r=e.bytesToWords(a);var c=8*a.length;a=[];var u=1732584193,s=-271733879,l=-1732584194,f=271733878,d=-1009589776;for(r[c>>5]|=128<<24-c%32,r[15+(c+64>>>9<<4)]=c,c=0;c<r.length;c+=16){for(var g=u,v=s,p=l,h=f,m=d,y=0;80>y;y++){if(16>y)a[y]=r[c+y];else{var w=a[y-3]^a[y-8]^a[y-14]^a[y-16];a[y]=w<<1|w>>>31}w=(u<<5|u>>>27)+d+(a[y]>>>0)+(20>y?1518500249+(s&l|~s&f):40>y?1859775393+(s^l^f):60>y?(s&l|s&f|l&f)-1894007588:(s^l^f)-899497514),d=f,f=l,l=s<<30|s>>>2,s=u,u=w}u+=g,s+=v,l+=p,f+=h,d+=m}return i=i.call(e,[u,s,l,f,d]),o&&o.asBytes?i:o&&o.asString?t.bytesToString(i):e.bytesToHex(i)};r._blocksize=16,r._digestsize=20,be=r}();var xe=be,Ae={},Ce=function(){this.outQueues=[],this.bufferFlushers=[],this.hasLoaded=!1,this.registeredOnLoadHandlers=[]};e.SharedState=Ce,e.addEventListener=N,e.addTracker=function(e,n,t,r,o,i){return Ae.hasOwnProperty(e)?null:(Ae[e]=Y(e,n,t,r,o,i),Ae[e])},e.allTrackerNames=$,e.allTrackers=function(){return Ae},e.attemptDeleteLocalStorage=x,e.attemptGetLocalStorage=k,e.attemptGetSessionStorage=A,e.attemptWriteLocalStorage=T,e.attemptWriteSessionStorage=C,e.cookie=R,e.createSharedState=function(){function e(){var e;if(!n.hasLoaded)for(n.hasLoaded=!0,e=0;e<n.registeredOnLoadHandlers.length;e++)n.registeredOnLoadHandlers[e]();return!0}var n=new Ce,t=document,r=window;return t.visibilityState&&N(t,"visibilitychange",(function(){"hidden"==t.visibilityState&&n.bufferFlushers.forEach((function(e){e(!1)}))}),!1),N(r,"beforeunload",(function(){n.bufferFlushers.forEach((function(e){e(!1)}))}),!1),"loading"===document.readyState?(t.addEventListener?t.addEventListener("DOMContentLoaded",(function n(){t.removeEventListener("DOMContentLoaded",n,!1),e()})):t.attachEvent&&t.attachEvent("onreadystatechange",(function n(){"complete"===t.readyState&&(t.detachEvent("onreadystatechange",n),e())})),N(r,"load",e,!1)):e(),n},e.decorateQuerystring=_,e.deleteCookie=M,e.dispatchToTrackers=function(e,n){try{K(null!=e?e:$()).forEach(n)}catch(e){we.error("Function failed",e)}},e.dispatchToTrackersInCollection=function(e,n,t){try{ee(null!=e?e:Object.keys(n),n).forEach(t)}catch(e){we.error("Function failed",e)}},e.findRootDomain=B,e.fixupDomain=j,e.fixupTitle=P,e.fixupUrl=G,e.fromQuerystring=D,e.getCookiesWithPrefix=U,e.getCssClasses=V,e.getFilterByClass=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var n=Object.prototype.hasOwnProperty.call(e,"allowlist"),t=H(e);return z(e,(function(e){e:{var r=0;for(e=V(e);r<e.length;r++)if(t[e[r]]){r=!0;break e}r=!1}return r===n}))},e.getFilterByName=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var n=e.hasOwnProperty("allowlist"),t=H(e);return z(e,(function(e){return e.name in t===n}))},e.getHostName=E,e.getReferrer=L,e.getTracker=function(e){return Ae.hasOwnProperty(e)?Ae[e]:(we.warn(e+" not configured"),null)},e.getTrackers=K,e.hasLocalStorage=J,e.hasSessionStorage=function(){try{return!!window.sessionStorage}catch(e){return!0}},e.isFunction=function(e){return!(!e||"function"!=typeof e)},e.isInteger=I,e.isString=O,e.isValueInArray=function(e,n){for(var t=0;t<n.length;t++)if(n[t]===e)return!0;return!1},e.localStorageAccessible=F,e.parseAndValidateFloat=function(e){return e=parseFloat(e),isNaN(e)?void 0:e},e.parseAndValidateInt=function(e){return e=parseInt(e),isNaN(e)?void 0:e},e.trackerExists=function(e){return Ae.hasOwnProperty(e)},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
"use strict";!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).snowplowBrowserTrackerCore={})}(this,(function(e){function n(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}function t(){var e,n={},t=[],r=[],i=[],a=function(e,t){null!=t&&""!==t&&(n[e]=t)};return{add:a,addDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a(n,e[n])},addJson:function(e,n,i){i&&o(i)&&(e={keyIfEncoded:e,keyIfNotEncoded:n,json:i},r.push(e),t.push(e))},addContextEntity:function(e){i.push(e)},getPayload:function(){return n},getJson:function(){return t},withJsonProcessor:function(n){e=n},build:function(){return null==e||e(this,r,i),n}}}function r(e){return function(t,r,o){for(var i=function(n,r,o){if(n=JSON.stringify(n),e){if(o=t.add,n){var i=0,a=0,c=[];if(n){n=unescape(encodeURIComponent(n));do{var u=n.charCodeAt(i++),s=n.charCodeAt(i++),l=n.charCodeAt(i++),f=u<<16|s<<8|l;u=f>>18&63,s=f>>12&63,l=f>>6&63,f&=63,c[a++]=ye.charAt(u)+ye.charAt(s)+ye.charAt(l)+ye.charAt(f)}while(i<n.length);i=c.join(""),n=((n=n.length%3)?i.slice(0,n-3):i)+"===".slice(n||3)}n=n.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o.call(t,r,n)}else t.add(o,n)},a=function(n,r){if(!n){var o=t.getPayload();if(e?o.cx:o.co){var i=(n=JSON).parse;if(e){if(o=o.cx){switch(4-o.length%4){case 2:o+="==";break;case 3:o+="="}o=function(e){var n,t=0,r=0,o="",i=[];if(!e)return e;e+="";do{var a=ye.indexOf(e.charAt(t++)),c=ye.indexOf(e.charAt(t++));o=ye.indexOf(e.charAt(t++));var u=ye.indexOf(e.charAt(t++)),s=a<<18|c<<12|o<<6|u;a=s>>16&255,c=s>>8&255,s&=255,i[r++]=64===o?String.fromCharCode(a):64===u?String.fromCharCode(a,c):String.fromCharCode(a,c,s)}while(t<e.length);return o=i.join(""),n=o.replace(/\0+$/,""),decodeURIComponent(n.split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}(o=o.replace(/-/g,"+").replace(/_/g,"/"))}}else o=o.co;n=i.call(n,o)}else n=void 0}return n?n.data=n.data.concat(r.data):n=r,n},c=void 0,u=0;u<r.length;u++){var s=r[u];"cx"===s.keyIfEncoded?c=a(c,s.json):i(s.json,s.keyIfEncoded,s.keyIfNotEncoded)}r.length=0,o.length&&(c=a(c,r={schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:n([],o,!0)}),o.length=0),c&&i(c,"cx","co")}}function o(e){if(!i(e))return!1;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))return!0;return!1}function i(e){return null!=e&&(e.constructor==={}.constructor||e.constructor===[].constructor)}function a(){var e=[],n=[];return{getGlobalPrimitives:function(){return e},getConditionalProviders:function(){return n},addGlobalContexts:function(t){for(var r=[],o=[],i=0;i<t.length;i++){var a=t[i];h(a)?r.push(a):g(a)&&o.push(a)}e=e.concat(o),n=n.concat(r)},clearGlobalContexts:function(){n=[],e=[]},removeGlobalContexts:function(t){for(var r=function(t){h(t)?n=n.filter((function(e){return JSON.stringify(e)!==JSON.stringify(t)})):g(t)&&(e=e.filter((function(e){return JSON.stringify(e)!==JSON.stringify(t)})))},o=0;o<t.length;o++)r(t[o])},getApplicableContexts:function(t){e:{for(var r=0,o=t.getJson();r<o.length;r++){var i=o[r];if("ue_px"===i.keyIfEncoded&&"object"==typeof i.json.data&&"string"==typeof(i=i.json.data.schema)){r=i;break e}}r=""}i="string"==typeof(o=t.getPayload().e)?o:"",o=[];var a=b(e,t,i,r);return o.push.apply(o,a),t=function(e,n,t,r){var o;return e=w(e).map((function(e){e:{if(v(e)){var o=e[0],i=!1;try{i=o({event:n.getPayload(),eventType:t,eventSchema:r})}catch(e){i=!1}if(!0===i){e=b(e[1],n,t,r);break e}}else if(p(e)&&function(e,n){var t=0,r=0,o=e.accept;return Array.isArray(o)?e.accept.some((function(e){return m(e,n)}))&&r++:"string"==typeof o&&m(o,n)&&r++,o=e.reject,Array.isArray(o)?e.reject.some((function(e){return m(e,n)}))&&t++:"string"==typeof o&&m(o,n)&&t++,0<r&&0===t}(e[0],r)){e=b(e[1],n,t,r);break e}e=[]}if(e&&0!==e.length)return e})),(o=[]).concat.apply(o,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}(n,t,i,r),o.push.apply(o,t),o}}}function c(e){return!!((e=e.split("."))&&1<e.length)&&function(e){if("*"===e[0]||"*"===e[1])return!1;if(0<e.slice(2).length){var n=!1,t=0;for(e=e.slice(2);t<e.length;t++)if("*"===e[t])n=!0;else if(n)return!1;return!0}return 2==e.length}(e)}function u(e){if(null!==(e=/^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(e))&&c(e[1]))return e.slice(1,6)}function s(e){if(e=u(e)){var n=e[0];return 5===e.length&&c(n)}return!1}function l(e){return function(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))}(e)?e.every((function(e){return s(e)})):"string"==typeof e&&s(e)}function f(e){return!!(o(e)&&"schema"in e&&"data"in e)&&("string"==typeof e.schema&&"object"==typeof e.data)}function d(e){return"function"==typeof e&&1>=e.length}function g(e){return d(e)||f(e)}function v(e){return!(!Array.isArray(e)||2!==e.length)&&(Array.isArray(e[1])?d(e[0])&&e[1].every(g):d(e[0])&&g(e[1]))}function p(e){return!(!Array.isArray(e)||2!==e.length)&&(!!function(e){var n=0;if(null!=e&&"object"==typeof e&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(e,"accept")){if(!l(e.accept))return!1;n+=1}if(Object.prototype.hasOwnProperty.call(e,"reject")){if(!l(e.reject))return!1;n+=1}return 0<n&&2>=n}return!1}(e[0])&&(Array.isArray(e[1])?e[1].every(g):g(e[1])))}function h(e){return v(e)||p(e)}function m(e,n){if(!s(e))return!1;if(e=u(e),n=null!==(n=/^iglu:([a-zA-Z0-9-_.]+)\/([a-zA-Z0-9-_]+)\/jsonschema\/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$/.exec(n))?n.slice(1,6):void 0,e&&n){if(!function(e,n){if(n=n.split("."),e=e.split("."),n&&e){if(n.length!==e.length)return!1;for(var t=0;t<e.length;t++)if(!y(n[t],e[t]))return!1;return!0}return!1}(e[0],n[0]))return!1;for(var t=1;5>t;t++)if(!y(e[t],n[t]))return!1;return!0}return!1}function y(e,n){return e&&n&&"*"===e||e===n}function w(e){return Array.isArray(e)?e:[e]}function b(e,n,t,r){var o;return e=w(e).map((function(e){e:if(f(e))e=[e];else{if(d(e)){n:{var o=void 0;try{if(o=e({event:n.getPayload(),eventType:t,eventSchema:r}),Array.isArray(o)&&o.every(f)||f(o)){var i=o;break n}i=void 0;break n}catch(e){}i=void 0}if(f(i)){e=[i];break e}if(Array.isArray(i)){e=i;break e}}e=void 0}if(e&&0!==e.length)return e})),(o=[]).concat.apply(o,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}function S(e){void 0===e&&(e={});var t,o,c,u,s,l,f,d=e.base64,g=e.corePlugins,v=null!=g?g:[];t=null==d||d,o=v,c=e.callback,u=function(e){return{addPluginContexts:function(t){var r=t?n([],t,!0):[];return e.forEach((function(e){try{e.contexts&&r.push.apply(r,e.contexts())}catch(e){we.error("Error adding plugin contexts",e)}})),r}}}(o),s=a(),l=t,f={};var p=ne(ne({},e={track:function(e,n,t){e.withJsonProcessor(r(l)),e.add("eid",me.v4()),e.addDict(f),t=function(e){return null==e?{type:"dtm",value:(new Date).getTime()}:"number"==typeof e?{type:"dtm",value:e}:"ttm"===e.type?{type:"ttm",value:e.value}:{type:"dtm",value:e.value||(new Date).getTime()}}(t),e.add(t.type,t.value.toString()),n=function(e,n){e=s.getApplicableContexts(e);var t=[];return n&&n.length&&t.push.apply(t,n),e&&e.length&&t.push.apply(t,e),t}(e,u.addPluginContexts(n)),void 0!==(n=n&&n.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:n}:void 0)&&e.addJson("cx","co",n),o.forEach((function(n){try{n.beforeTrack&&n.beforeTrack(e)}catch(e){we.error("Plugin beforeTrack",e)}})),"function"==typeof c&&c(e);var i=e.build();return o.forEach((function(e){try{e.afterTrack&&e.afterTrack(i)}catch(e){we.error("Plugin afterTrack",e)}})),i},addPayloadPair:function(e,n){f[e]=n},getBase64Encoding:function(){return l},setBase64Encoding:function(e){l=e},addPayloadDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(f[n]=e[n])},resetPayloadPairs:function(e){f=i(e)?e:{}},setTrackerVersion:function(e){f.tv=e},setTrackerNamespace:function(e){f.tna=e},setAppId:function(e){f.aid=e},setPlatform:function(e){f.p=e},setUserId:function(e){f.uid=e},setScreenResolution:function(e,n){f.res=e+"x"+n},setViewport:function(e,n){f.vp=e+"x"+n},setColorDepth:function(e){f.cd=e},setTimezone:function(e){f.tz=e},setLang:function(e){f.lang=e},setIpAddress:function(e){f.ip=e},setUseragent:function(e){f.ua=e},addGlobalContexts:function(e){s.addGlobalContexts(e)},clearGlobalContexts:function(){s.clearGlobalContexts()},removeGlobalContexts:function(e){s.removeGlobalContexts(e)}}),{addPlugin:function(e){var n,t;e=e.plugin,v.push(e),null===(n=e.logger)||void 0===n||n.call(e,we),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,p)}});return null==v||v.forEach((function(e){var n,t;null===(n=e.logger)||void 0===n||n.call(e,we),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,p)})),p}function k(e){try{var n=window.localStorage,t=n.getItem(e+".expires");if(null===t||+t>Date.now())return n.getItem(e);n.removeItem(e),n.removeItem(e+".expires")}catch(e){}}function T(e,n,t){void 0===t&&(t=63072e3);try{var r=window.localStorage,o=Date.now()+1e3*t;return r.setItem("".concat(e,".expires"),o.toString()),r.setItem(e,n),!0}catch(e){return!1}}function x(e){try{var n=window.localStorage;return n.removeItem(e),n.removeItem(e+".expires"),!0}catch(e){return!1}}function A(e){try{return window.sessionStorage.getItem(e)}catch(e){}}function C(e,n){try{return window.sessionStorage.setItem(e,n),!0}catch(e){return!1}}function O(e){return!(!e||"string"!=typeof e.valueOf())}function I(e){return Number.isInteger&&Number.isInteger(e)||"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function P(e){if(!O(e)){e=e.text||"";var n=document.getElementsByTagName("title");n&&null!=n[0]&&(e=n[0].text)}return e}function E(e){var n=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(e);return n?n[1]:e}function j(e){var n=e.length;return"."===e.charAt(--n)&&(e=e.slice(0,n)),"*."===e.slice(0,2)&&(e=e.slice(1)),e}function L(e){var n=window,t=D("referrer",n.location.href)||D("referer",n.location.href);if(t)return t;if(e)return e;try{if(n.top)return n.top.document.referrer;if(n.parent)return n.parent.document.referrer}catch(e){}return document.referrer}function N(e,n,t,r){return e.addEventListener?(e.addEventListener(n,t,r),!0):e.attachEvent?e.attachEvent("on"+n,t):void(e["on"+n]=t)}function D(e,n){return(e=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(n))?decodeURIComponent(e[1].replace(/\+/g," ")):null}function _(e,n,t){t=n+"="+t;var r=(e=e.split("#"))[0].split("?"),o=r.shift();if(r=r.join("?")){for(var i=!0,a=r.split("&"),c=0;c<a.length;c++)if(a[c].substr(0,n.length+1)===n+"="){i=!1,a[c]=t,r=a.join("&");break}i&&(r=t+"&"+r)}else r=t;return e[0]=o+"?"+r,e.join("#")}function B(e,n){for(var t=window.location.hostname,r="_sp_root_domain_test_"+(new Date).getTime(),o="_test_value_"+(new Date).getTime(),i=t.split("."),a=i.length-2;0<=a;a--){var c=i.slice(a).join(".");if(R(r,o,0,"/",c,e,n),R(r)===o){for(M(r,c,e,n),t=U("_sp_root_domain_test_"),r=0;r<t.length;r++)M(t[r],c,e,n);return c}}return t}function M(e,n,t,r){R(e,"",-1,"/",n,t,r)}function U(e){for(var n=document.cookie.split("; "),t=[],r=0;r<n.length;r++)n[r].substring(0,e.length)===e&&t.push(n[r]);return t}function R(e,n,t,r,o,i,a){return 1<arguments.length?document.cookie=e+"="+encodeURIComponent(null!=n?n:"")+(t?"; Expires="+new Date(+new Date+1e3*t).toUTCString():"")+(r?"; Path="+r:"")+(o?"; Domain="+o:"")+(i?"; SameSite="+i:"")+(a?"; Secure":""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}function V(e){return e.className.match(/\S+/g)||[]}function z(e,n){return e.hasOwnProperty("filter")&&e.filter?e.filter:n}function H(e){var n={};if(e=e.allowlist||e.denylist){Array.isArray(e)||(e=[e]);for(var t=0;t<e.length;t++)n[e[t]]=!0}return n}function J(){try{return!!window.localStorage}catch(e){return!0}}function F(){if(!J())return!1;try{var e=window.localStorage;return e.setItem("modernizr","modernizr"),e.removeItem("modernizr"),!0}catch(e){return!1}}function G(e,n,t){return"translate.googleusercontent.com"===e?(""===t&&(t=n),e=E(n=null!=(e=(e=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(n))&&1<(null==e?void 0:e.length)?D("u",e[1]):null)?e:"")):"cc.bingj.com"!==e&&"webcache.googleusercontent.com"!==e||(e=E(n=document.links[0].href)),[e,n,t]}function q(e,n){return void 0===n&&(n={memorizedVisitCount:1}),n=n.memorizedVisitCount,"0"===e[0]?(e[7]=e[6],e[5]=e[4],e[3]++):e[3]=n,n=me.v4(),e[6]=n,e[10]=0,e[8]="",e[9]=void 0,n}function W(e){e[4]=Math.round((new Date).getTime()/1e3)}function Q(e,n,t){var r=e[9];return{userId:t?"00000000-0000-0000-0000-000000000000":e[1],sessionId:e[6],eventIndex:e[10],sessionIndex:e[3],previousSessionId:t?null:e[7]||null,storageMechanism:"localStorage"==n?"LOCAL_STORAGE":"COOKIE_1",firstEventId:e[8]||null,firstEventTimestamp:r?new Date(r).toISOString():null}}function X(){var e=Z;if("innerWidth"in window)var n=window.innerWidth,t=window.innerHeight;else n=(t=document.documentElement||document.body).clientWidth,t=t.clientHeight;e=e(0<=n&&0<=t?n+"x"+t:null),n=Z;var r=document.documentElement,o=document.body;return t=Math.max(r.clientWidth,r.offsetWidth,r.scrollWidth),r=Math.max(r.clientHeight,r.offsetHeight,r.scrollHeight,o?Math.max(o.offsetHeight,o.scrollHeight):0),{viewport:e,documentSize:n(t=isNaN(t)||isNaN(r)?"":t+"x"+r),resolution:Z(screen.width+"x"+screen.height),colorDepth:screen.colorDepth,devicePixelRatio:window.devicePixelRatio,cookiesEnabled:window.navigator.cookieEnabled,online:window.navigator.onLine,browserLanguage:navigator.language||navigator.userLanguage,documentLanguage:document.documentElement.lang,webdriver:window.navigator.webdriver,deviceMemory:window.navigator.deviceMemory,hardwareConcurrency:window.navigator.hardwareConcurrency}}function Z(e){return e&&e.split("x").map((function(e){return Math.floor(Number(e))})).join("x")}function Y(e,n,r,o,i,a){void 0===a&&(a={});var c=[];e=function(e,n,r,o,i,a){function u(){(cn=G(window.location.hostname,window.location.href,L()))[1]!==sn&&(ln=L(sn)),un=j(cn[0]),sn=cn[1]}function s(e){var n=(new Date).getTime();null!=(e=e.currentTarget)&&e.href&&(e.href=_(e.href,"_sp",en+"."+n))}function l(e){for(var n=0;n<document.links.length;n++){var t=document.links[n];!t.spDecorationEnabled&&e(t)&&(N(t,"click",s,!0),N(t,"mousedown",s,!0),t.spDecorationEnabled=!0)}}function f(e){if(Ge){var n=/#.*/;e=e.replace(n,"")}return qe&&(n=/[{}]/g,e=e.replace(n,"")),e}function d(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function g(e){return e=mn+e+"."+$e,"localStorage"==Pn?k(e):"cookie"==Pn||"cookieAndLocalStorage"==Pn?R(e):void 0}function v(){u(),$e=xe((yn||un)+(wn||"/")).slice(0,4)}function p(){Qe=(new Date).getTime()}function h(){var e=m(),n=e[0];n<Xe?Xe=n:n>Ze&&(Ze=n),(e=e[1])<Ye?Ye=e:e>Ke&&(Ke=e),p()}function m(){var e=document.documentElement;return e?[e.scrollLeft||window.pageXOffset,e.scrollTop||window.pageYOffset]:[0,0]}function y(){var e=m(),n=e[0];Ze=Xe=n,Ke=Ye=e=e[1]}function w(){return U(mn+"ses."+$e,"*",An)}function b(e){var n=mn+"id."+$e;return e.shift(),U(n,e=e.join("."),xn)}function U(e,n,t){return!(In&&!Cn)&&("localStorage"==Pn?T(e,n,t):("cookie"==Pn||"cookieAndLocalStorage"==Pn)&&(R(e,n,t,wn,yn,bn,Sn),-1!==document.cookie.indexOf("".concat(e,"="))))}function V(e){var n=mn+"id."+$e,t=mn+"ses."+$e;x(n),x(t),M(n,yn,bn,Sn),M(t,yn,bn,Sn),null!=e&&e.preserveSession||(nn=me.v4(),jn=1),null!=e&&e.preserveUser||(en=In?"":me.v4(),tn=null)}function z(e){e&&e.stateStorageStrategy&&(a.stateStorageStrategy=e.stateStorageStrategy,Pn=Me(a)),In=!!a.anonymousTracking,Cn=Ue(a),On=Re(a),Ln.setUseLocalStorage("localStorage"==Pn||"cookieAndLocalStorage"==Pn),Ln.setAnonymousTracking(On)}function H(){if(!In||Cn){var e="none"!=Pn&&!!g("ses"),n=J();if(n[1])var t=n[1];else t=In?"":me.v4(),n[1]=t;en=t,nn=e?n[6]:q(n),jn=n[3],"none"!=Pn&&(w(),W(n),b(n))}}function J(){return"none"==Pn?["1","",0,0,0,void 0,"","","",void 0,0]:function(e,n,t,r){var o=Math.round((new Date).getTime()/1e3);e?(e=e.split(".")).unshift("0"):e=["1",n,o,r,o,"",t],e[6]&&"undefined"!==e[6]||(e[6]=me.v4()),e[7]&&"undefined"!==e[7]||(e[7]=""),e[8]&&"undefined"!==e[8]||(e[8]=""),e[9]&&"undefined"!==e[9]||(e[9]=""),e[10]&&"undefined"!==e[10]||(e[10]=0);var i=function(e,n){return e=parseInt(e),isNaN(e)?n:e};return n=function(e){return e?i(e,void 0):void 0},[e[0],e[1],i(e[2],o),i(e[3],r),i(e[4],o),n(e[5]),e[6],e[7],e[8],n(e[9]),i(e[10],0)]}(g("id")||void 0,en,nn,jn)}function Z(e){return 0===e.indexOf("http")?e:("https:"===document.location.protocol?"https":"http")+"://"+e}function Y(){Nn&&null!=i.pageViewId||(i.pageViewId=me.v4())}function K(){return null==i.pageViewId&&(i.pageViewId=me.v4()),i.pageViewId}function $(){if("none"===Pn||In||!ze)return null;var e=A("_sp_tab_id");return e||(C("_sp_tab_id",me.v4()),e=A("_sp_tab_id")),e||null}function ee(e){var n=e.title,r=e.context,o=e.timestamp;if(e=e.contextCallback,u(),Dn&&Y(),Dn=!0,pn=document.title,n=P((Fe=n)||pn),on.track(function(e){var n=e.pageUrl,r=e.pageTitle;e=e.referrer;var o=t();return o.add("e","pv"),o.add("url",n),o.add("page",r),o.add("refr",e),o}({pageUrl:f(Je||sn),pageTitle:n,referrer:f(He||ln)}),(r||[]).concat(e?e():[]),o),o=new Date,n=!1,_n.enabled&&!_n.installed){n=_n.installed=!0;var i={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,n=Object.defineProperty({},"passive",{get:function(){e=!0},set:function(){}}),t=function(){};window.addEventListener("testPassiveEventSupport",t,n),window.removeEventListener("testPassiveEventSupport",t,n),i.hasSupport=e}}};i.update();var a="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(i,"hasSupport")?N(document,a,p,{passive:!0}):N(document,a,p),y(),a=function(e,n){return void 0===n&&(n=p),function(e){return N(document,e,n)}},"click mouseup mousedown mousemove keypress keydown keyup touchend touchstart".split(" ").forEach(a(document)),["resize","focus","blur"].forEach(a(window)),a(window,h)("scroll")}if(_n.enabled&&(hn||n))for(o in Qe=o.getTime(),o=void 0,_n.configurations)(n=_n.configurations[o])&&(window.clearInterval(n.activityInterval),te(n,r,e))}function te(e,n,t){var r=function(e,n){u(),e({context:n,pageViewId:K(),minXOffset:Xe,minYOffset:Ye,maxXOffset:Ze,maxYOffset:Ke}),y()},o=function(){Qe+e.configHeartBeatTimer>(new Date).getTime()&&r(e.callback,(n||[]).concat(t?t():[]))};e.activityInterval=0===e.configMinimumVisitLength?window.setInterval(o,e.configHeartBeatTimer):window.setTimeout((function(){Qe+e.configMinimumVisitLength>(new Date).getTime()&&r(e.callback,(n||[]).concat(t?t():[])),e.activityInterval=window.setInterval(o,e.configHeartBeatTimer)}),e.configMinimumVisitLength)}function re(e){var n=e.minimumVisitLength,t=e.heartbeatDelay;if(e=e.callback,I(n)&&I(t))return{configMinimumVisitLength:1e3*n,configHeartBeatTimer:1e3*t,callback:e};we.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function oe(e){var n=e.context,r=e.minXOffset,o=e.minYOffset,i=e.maxXOffset,a=e.maxYOffset;(e=document.title)!==pn&&(pn=e,Fe=void 0);var c=(e=on).track,u=f(Je||sn),s=P(Fe||pn),l=f(He||ln);r=Math.round(r),i=Math.round(i),o=Math.round(o),a=Math.round(a);var d=t();d.add("e","pp"),d.add("url",u),d.add("page",s),d.add("refr",l),r&&!isNaN(Number(r))&&d.add("pp_mix",r.toString()),i&&!isNaN(Number(i))&&d.add("pp_max",i.toString()),o&&!isNaN(Number(o))&&d.add("pp_miy",o.toString()),a&&!isNaN(Number(a))&&d.add("pp_may",a.toString()),c.call(e,d,n)}function ie(e){var n=_n.configurations[e];0===(null==n?void 0:n.configMinimumVisitLength)?window.clearTimeout(null==n?void 0:n.activityInterval):window.clearInterval(null==n?void 0:n.activityInterval),_n.configurations[e]=void 0}var ae,ce,ue,se,le,fe,de,ge,ve,pe,he,ye,be,Se,ke,Te,Ae,Ce,Oe,Ie,Pe,Ee,je,Le,Ne,De,_e,Be;a.eventMethod=null!==(ae=a.eventMethod)&&void 0!==ae?ae:"post";var Me=function(e){var n;return null!==(n=e.stateStorageStrategy)&&void 0!==n?n:"cookieAndLocalStorage"},Ue=function(e){var n,t;return"boolean"!=typeof e.anonymousTracking&&(null!==(t=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withSessionTracking))&&void 0!==t&&t)},Re=function(e){var n,t;return"boolean"!=typeof e.anonymousTracking&&(null!==(t=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withServerAnonymisation))&&void 0!==t&&t)},Ve=null!==(ue=null===(ce=null==a?void 0:a.contexts)||void 0===ce?void 0:ce.browser)&&void 0!==ue&&ue,ze=null===(le=null===(se=null==a?void 0:a.contexts)||void 0===se?void 0:se.webPage)||void 0===le||le;c.push({beforeTrack:function(e){var n=g("ses"),t=J(),r=0===t[10];if(rn=!!We&&!!R(We),Tn||rn)V();else{if("0"===t[0]?(nn=n||"none"==Pn?t[6]:q(t),jn=t[3]):(new Date).getTime()-En>1e3*An&&(jn++,nn=q(t,{memorizedVisitCount:jn})),W(t),0===t[10]){var o=e.build();t[8]=o.eid,o=o.dtm||o.ttm,t[9]=o?parseInt(o):void 0}t[10]+=1;var i=(o=X()).documentSize;e.add("vp",o.viewport),e.add("ds",i),e.add("vid",Cn?jn:In?null:jn),e.add("sid",Cn?nn:In?null:nn),e.add("duid",In?null:t[1]),e.add("uid",In?null:tn),u(),e.add("refr",f(He||ln)),e.add("url",f(Je||sn)),o=Q(t,Pn,In),!Bn||In&&!Cn||e.addContextEntity({schema:"iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2",data:o}),"none"!=Pn&&(b(t),e=w(),n&&!r||!e||!Mn||Un||(Mn(o),Un=!1)),En=(new Date).getTime()}}}),ze&&c.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:K()}}]}}),Ve&&c.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/browser_context/jsonschema/2-0-0",data:ne(ne({},X()),{tabId:$()})}]}}),c.push.apply(c,null!==(fe=a.plugins)&&void 0!==fe?fe:[]);var He,Je,Fe,Ge,qe,We,Qe,Xe,Ze,Ye,Ke,$e,en,nn,tn,rn,on=S({base64:a.encodeBase64,corePlugins:c,callback:function(e){Tn||rn||Ln.enqueueRequest(e.build(),dn)}}),an=document.characterSet||document.charset,cn=G(window.location.hostname,window.location.href,L()),un=j(cn[0]),sn=cn[1],ln=cn[2],fn=null!==(de=a.platform)&&void 0!==de?de:"web",dn=Z(o),gn=null!==(ge=a.postPath)&&void 0!==ge?ge:"/com.snowplowanalytics.snowplow/tp2",vn=null!==(ve=a.appId)&&void 0!==ve?ve:"",pn=document.title,hn=null===(pe=a.resetActivityTrackingOnPageView)||void 0===pe||pe,mn=null!==(he=a.cookieName)&&void 0!==he?he:"_sp_",yn=null!==(ye=a.cookieDomain)&&void 0!==ye?ye:void 0,wn="/",bn=null!==(be=a.cookieSameSite)&&void 0!==be?be:"None",Sn=null===(Se=a.cookieSecure)||void 0===Se||Se,kn=navigator.doNotTrack||navigator.msDoNotTrack||window.doNotTrack,Tn=void 0!==a.respectDoNotTrack&&(a.respectDoNotTrack&&("yes"===kn||"1"===kn)),xn=null!==(ke=a.cookieLifetime)&&void 0!==ke?ke:63072e3,An=null!==(Te=a.sessionCookieTimeout)&&void 0!==Te?Te:1800,Cn=Ue(a),On=Re(a),In=!!a.anonymousTracking,Pn=Me(a),En=(new Date).getTime(),jn=1,Ln=function(e,n,t,r,o,i,a,c,u,s,l,f,d,g,v,p,h,m){function y(e){var n=Object.keys(e).map((function(n){return[n,e[n]]})).reduce((function(e,n){return e[n[0]]=n[1].toString(),e}),{});return{evt:n,bytes:w(JSON.stringify(n))}}function w(e){for(var n=0,t=0;t<e.length;t++){var r=e.charCodeAt(t);127>=r?n+=1:2047>=r?n+=2:55296<=r&&57343>=r?(n+=4,t++):n=65535>r?n+3:n+4}return n}function b(e){for(void 0===e&&(e=!1);L.length&&"string"!=typeof L[0]&&"object"!=typeof L[0];)L.shift();if(L.length){if(!O(C))throw"No collector configured";if(j=!0,h&&!N){var n=S(h,!1,e);N=!0,n.timeout=l,n.onreadystatechange=function(){4===n.readyState&&b()},n.send()}else if(B){var r=function(e){for(var n=0,t=0;n<e.length&&!((t+=e[n].bytes)>=a);)n+=1;return n},o=void 0;if(z(L))var i=S(o=C,!0,e),c=r(L);else o=A(L[0]),i=S(o,!1,e),c=1;var u=setTimeout((function(){i.abort(),m||d(c),j=!1}),l),d=function(e){for(var n=0;n<e;n++)L.shift();t&&T(R,JSON.stringify(L.slice(0,s)))};if(i.onreadystatechange=function(){if(4===i.readyState)if(clearTimeout(u),200<=i.status&&300>i.status)d(c),b();else{var e=i.status;(200<=e&&300>e||!m||!v.includes(e)&&p.includes(e))&&(we.error("Status ".concat(i.status,", will not retry.")),d(c)),j=!1}},z(L)){if(0<(r=L.slice(0,c)).length){if(e=!1,r=r.map((function(e){return e.evt})),_){var g=new Blob([k(x(r))],{type:"application/json"});try{e=navigator.sendBeacon(o,g)}catch(n){e=!1}}!0===e?(d(c),b()):i.send(k(x(r)))}}else i.send()}else if(f||z(L))j=!1;else{o=new Image(1,1);var y=!0;o.onload=function(){y&&(y=!1,L.shift(),t&&T(R,JSON.stringify(L.slice(0,s))),b())},o.onerror=function(){y&&(j=y=!1)},o.src=A(L[0]),setTimeout((function(){y&&j&&(y=!1,b())}),l)}}else j=!1}function S(e,n,t){var r=new XMLHttpRequest;for(var o in n?(r.open("POST",e,!t),r.setRequestHeader("Content-Type","application/json; charset=UTF-8")):r.open("GET",e,!t),r.withCredentials=g,f&&r.setRequestHeader("SP-Anonymous","*"),d)Object.prototype.hasOwnProperty.call(d,o)&&r.setRequestHeader(o,d[o]);return r}function k(e){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",data:e})}function x(e){for(var n=(new Date).getTime().toString(),t=0;t<e.length;t++)e[t].stm=n;return e}function A(e){return u?C+e.replace("?","?stm="+(new Date).getTime()+"&"):C+e}void 0===m&&(m=!0);var C,I,P,E,j=!1,L=[],N=!1,D=!0===(r="string"==typeof r?r.toLowerCase():r)||"beacon"===r||"true"===r,_=!(!(D&&window.navigator&&window.navigator.sendBeacon)||(I=window.navigator.userAgent,(E=(E=I).match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/"))&&E.length&&parseInt(E[0])<=13||function(e,n,t){return!(!(t=t.match("(Macintosh;.*Mac OS X (d+)_(d+)[_d]*.*) AppleWebKit/"))||!t.length)&&(parseInt(t[0])<=e||parseInt(t[0])===e&&parseInt(t[1])<=n)}(10,15,I)&&(P=I).match("Version/.* Safari/")&&!P.match("Chrom(e|ium)")))&&D,B=!(!window.XMLHttpRequest||!("withCredentials"in new XMLHttpRequest)),M="get"!==r&&B&&("post"===r||D),U=M?o:"/i",R="snowplowOutQueue_".concat(e,"_").concat(M?"post2":"get");if(D&&(d={}),i=t&&F()&&M&&i||1,t)try{var V=window.localStorage.getItem(R);L=V?JSON.parse(V):[]}catch(I){}Array.isArray(L)||(L=[]),n.outQueues.push(L),B&&1<i&&n.bufferFlushers.push((function(e){j||b(e)}));var z=function(e){return"object"==typeof e[0]&&"evt"in e[0]};return{enqueueRequest:function(e,n){if(C=n+U,M){if((e=y(e)).bytes>=a)return we.warn("Event ("+e.bytes+"B) too big, max is "+a),n=e,void S(C,!0,!1).send(k(x([n.evt])));L.push(e)}else{var r,u="?",l={co:!0,cx:!0},f=!0;for(r in e)e.hasOwnProperty(r)&&!l.hasOwnProperty(r)&&(f?f=!1:u+="&",u+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));for(var d in l)e.hasOwnProperty(d)&&l.hasOwnProperty(d)&&(u+="&"+d+"="+encodeURIComponent(e[d]));if(0<c&&(l=w(l=A(u)))>=c)return we.warn("Event ("+l+"B) too big, max is "+c),void(B&&(e=y(e),S(n+o,!0,!1).send(k(x([e.evt])))));L.push(u)}n=!1,t&&(n=T(R,JSON.stringify(L.slice(0,s)))),j||n&&!(L.length>=i)||b()},executeQueue:function(){j||b()},setUseLocalStorage:function(e){t=e},setAnonymousTracking:function(e){f=e},setCollectorUrl:function(e){C=e+U},setBufferSize:function(e){i=e}}}(e,i,"localStorage"==Pn||"cookieAndLocalStorage"==Pn,a.eventMethod,gn,null!==(Ae=a.bufferSize)&&void 0!==Ae?Ae:1,null!==(Ce=a.maxPostBytes)&&void 0!==Ce?Ce:4e4,null!==(Oe=a.maxGetBytes)&&void 0!==Oe?Oe:0,null===(Ie=a.useStm)||void 0===Ie||Ie,null!==(Pe=a.maxLocalStorageQueueSize)&&void 0!==Pe?Pe:1e3,null!==(Ee=a.connectionTimeout)&&void 0!==Ee?Ee:5e3,On,null!==(je=a.customHeaders)&&void 0!==je?je:{},null===(Le=a.withCredentials)||void 0===Le||Le,null!==(Ne=a.retryStatusCodes)&&void 0!==Ne?Ne:[],(null!==(De=a.dontRetryStatusCodes)&&void 0!==De?De:[]).concat([400,401,403,410,422]),a.idService,a.retryFailedRequests),Nn=!1,Dn=!1,_n={enabled:!1,installed:!1,configurations:{}},Bn=null!==(Be=null===(_e=a.contexts)||void 0===_e?void 0:_e.session)&&void 0!==Be&&Be,Mn=a.onSessionUpdateCallback,Un=!1;a.hasOwnProperty("discoverRootDomain")&&a.discoverRootDomain&&(yn=B(bn,Sn));var Rn=X(),Vn=Rn.browserLanguage,zn=Rn.resolution,Hn=Rn.colorDepth,Jn=Rn.cookiesEnabled;return on.setTrackerVersion(r),on.setTrackerNamespace(n),on.setAppId(vn),on.setPlatform(fn),on.addPayloadPair("cookie",Jn?"1":"0"),on.addPayloadPair("cs",an),on.addPayloadPair("lang",Vn),on.addPayloadPair("res",zn),on.addPayloadPair("cd",Hn),v(),H(),a.crossDomainLinker&&l(a.crossDomainLinker),ne(ne({},{getDomainSessionIndex:function(){return jn},getPageViewId:K,getTabId:$,newSession:function(){var e=J();if("0"===e[0]?(nn="none"!=Pn?q(e):e[6],jn=e[3]):(jn++,nn=q(e,{memorizedVisitCount:jn})),W(e),"none"!=Pn){var n=Q(e,Pn,In);b(e),w()&&Mn&&(Un=!0,Mn(n))}En=(new Date).getTime()},getCookieName:function(e){return mn+e+"."+$e},getUserId:function(){return tn},getDomainUserId:function(){return J()[1]},getDomainUserInfo:function(){return J()},setReferrerUrl:function(e){He=e},setCustomUrl:function(e){u();var n,t=sn;d(e)?Je=e:"/"===e.slice(0,1)?Je=d(t)+"://"+E(t)+e:(0<=(n=(t=f(t)).indexOf("?"))&&(t=t.slice(0,n)),(n=t.lastIndexOf("/"))!==t.length-1&&(t=t.slice(0,n+1)),Je=t+e)},setDocumentTitle:function(e){pn=document.title,Fe=e},discardHashTag:function(e){Ge=e},discardBrace:function(e){qe=e},setCookiePath:function(e){wn=e,v()},setVisitorCookieTimeout:function(e){xn=e},crossDomainLinker:function(e){l(e)},enableActivityTracking:function(e){_n.configurations.pagePing||(_n.enabled=!0,_n.configurations.pagePing=re(ne(ne({},e),{callback:oe})))},enableActivityTrackingCallback:function(e){_n.configurations.callback||(_n.enabled=!0,_n.configurations.callback=re(e))},disableActivityTracking:function(){ie("pagePing")},disableActivityTrackingCallback:function(){ie("callback")},updatePageActivity:function(){p()},setOptOutCookie:function(e){We=e},setUserId:function(e){tn=e},setUserIdFromLocation:function(e){u(),tn=D(e,sn)},setUserIdFromReferrer:function(e){u(),tn=D(e,ln)},setUserIdFromCookie:function(e){tn=R(e)},setCollectorUrl:function(e){dn=Z(e),Ln.setCollectorUrl(dn)},setBufferSize:function(e){Ln.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={}),Ln.executeQueue(),e.newBufferSize&&Ln.setBufferSize(e.newBufferSize)},trackPageView:function(e){void 0===e&&(e={}),ee(e)},preservePageViewId:function(){Nn=!0},disableAnonymousTracking:function(e){a.anonymousTracking=!1,z(e),H(),Ln.executeQueue()},enableAnonymousTracking:function(e){var n;a.anonymousTracking=null===(n=e&&(null==e?void 0:e.options))||void 0===n||n,z(e),Cn||Y()},clearUserData:V}),{id:e,namespace:n,core:on,sharedState:i})}(e,n,r,o,i,a);var u=ne(ne({},e),{addPlugin:function(e){var n,t;u.core.addPlugin(e),null===(t=(n=e.plugin).activateBrowserPlugin)||void 0===t||t.call(n,u)}});return c.forEach((function(e){var n;null===(n=e.activateBrowserPlugin)||void 0===n||n.call(e,u)})),u}function K(e){return ee(e,Ae)}function $(){return Object.keys(Ae)}function ee(e,n){for(var t=[],r=0;r<e.length;r++){var o=e[r];n.hasOwnProperty(o)?t.push(n[o]):we.warn(o+" not configured")}return t}var ne=function(){return ne=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},ne.apply(this,arguments)},te={},re="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(re){var oe=new Uint8Array(16);te=function(){return re(oe),oe}}else{var ie=Array(16);te=function(){for(var e,n=0;16>n;n++)0==(3&n)&&(e=4294967296*Math.random()),ie[n]=e>>>((3&n)<<3)&255;return ie}}for(var ae=[],ce=0;256>ce;++ce)ae[ce]=(ce+256).toString(16).substr(1);var ue,se,le=function(e,n){return n=n||0,[ae[e[n++]],ae[e[n++]],ae[e[n++]],ae[e[n++]],"-",ae[e[n++]],ae[e[n++]],"-",ae[e[n++]],ae[e[n++]],"-",ae[e[n++]],ae[e[n++]],"-",ae[e[n++]],ae[e[n++]],ae[e[n++]],ae[e[n++]],ae[e[n++]],ae[e[n++]]].join("")},fe=te,de=0,ge=0,ve=te;te=function(e,n,t){if(t=n&&t||0,"string"==typeof e&&(n="binary"===e?Array(16):null,e=null),(e=(e=e||{}).random||(e.rng||ve)())[6]=15&e[6]|64,e[8]=63&e[8]|128,n)for(var r=0;16>r;++r)n[t+r]=e[r];return n||le(e)},te.v1=function(e,n,t){t=n&&t||0;var r=n||[],o=(e=e||{}).node||ue,i=void 0!==e.clockseq?e.clockseq:se;if(null==o||null==i){var a=fe();null==o&&(o=ue=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==i&&(i=se=16383&(a[6]<<8|a[7]))}a=void 0!==e.msecs?e.msecs:(new Date).getTime();var c=void 0!==e.nsecs?e.nsecs:ge+1,u=a-de+(c-ge)/1e4;if(0>u&&void 0===e.clockseq&&(i=i+1&16383),(0>u||a>de)&&void 0===e.nsecs&&(c=0),1e4<=c)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");for(de=a,ge=c,se=i,e=(1e4*(268435455&(a+=122192928e5))+c)%4294967296,r[t++]=e>>>24&255,r[t++]=e>>>16&255,r[t++]=e>>>8&255,r[t++]=255&e,e=a/4294967296*1e4&268435455,r[t++]=e>>>8&255,r[t++]=255&e,r[t++]=e>>>24&15|16,r[t++]=e>>>16&255,r[t++]=i>>>8|128,r[t++]=255&i,i=0;6>i;++i)r[t+i]=o[i];return n||le(r)};var pe,he,me=te.v4=te,ye="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";(he=pe||(pe={}))[he.none=0]="none",he[he.error=1]="error",he[he.warn=2]="warn",he[he.debug=3]="debug",he[he.info=4]="info";var we=function(e){return void 0===e&&(e=pe.warn),{setLogLevel:function(n){e=pe[n]?n:pe.warn},warn:function(t,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];e>=pe.warn&&"undefined"!=typeof console&&(i="Snowplow: "+t,r?console.warn.apply(console,n([i+"\n",r],o,!1)):console.warn.apply(console,n([i],o,!1)))},error:function(t,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];e>=pe.error&&"undefined"!=typeof console&&(i="Snowplow: "+t+"\n",r?console.error.apply(console,n([i+"\n",r],o,!1)):console.error.apply(console,n([i],o,!1)))},debug:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e>=pe.debug&&"undefined"!=typeof console&&console.debug.apply(console,n(["Snowplow: "+t],r,!1))},info:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e>=pe.info&&"undefined"!=typeof console&&console.info.apply(console,n(["Snowplow: "+t],r,!1))}}}(),be={},Se={};!function(){var e={rotl:function(e,n){return e<<n|e>>>32-n},rotr:function(e,n){return e<<32-n|e>>>n},endian:function(n){if(n.constructor==Number)return 16711935&e.rotl(n,8)|4278255360&e.rotl(n,24);for(var t=0;t<n.length;t++)n[t]=e.endian(n[t]);return n},randomBytes:function(e){for(var n=[];0<e;e--)n.push(Math.floor(256*Math.random()));return n},bytesToWords:function(e){for(var n=[],t=0,r=0;t<e.length;t++,r+=8)n[r>>>5]|=e[t]<<24-r%32;return n},wordsToBytes:function(e){for(var n=[],t=0;t<32*e.length;t+=8)n.push(e[t>>>5]>>>24-t%32&255);return n},bytesToHex:function(e){for(var n=[],t=0;t<e.length;t++)n.push((e[t]>>>4).toString(16)),n.push((15&e[t]).toString(16));return n.join("")},hexToBytes:function(e){for(var n=[],t=0;t<e.length;t+=2)n.push(parseInt(e.substr(t,2),16));return n},bytesToBase64:function(e){for(var n=[],t=0;t<e.length;t+=3)for(var r=e[t]<<16|e[t+1]<<8|e[t+2],o=0;4>o;o++)8*t+6*o<=8*e.length?n.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],t=0,r=0;t<e.length;r=++t%4)0!=r&&n.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(t-1))&Math.pow(2,-2*r+8)-1)<<2*r|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(t))>>>6-2*r);return n}};Se=e}();var ke={utf8:{stringToBytes:function(e){return ke.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(ke.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var n=[],t=0;t<e.length;t++)n.push(255&e.charCodeAt(t));return n},bytesToString:function(e){for(var n=[],t=0;t<e.length;t++)n.push(String.fromCharCode(e[t]));return n.join("")}}},Te=ke;!function(){var e=Se,n=Te.utf8,t=Te.bin,r=function(r,o){var i=e.wordsToBytes,a=r;a.constructor==String?a=n.stringToBytes(a):"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(a)?a=Array.prototype.slice.call(a,0):Array.isArray(a)||(a=a.toString()),r=e.bytesToWords(a);var c=8*a.length;a=[];var u=1732584193,s=-271733879,l=-1732584194,f=271733878,d=-1009589776;for(r[c>>5]|=128<<24-c%32,r[15+(c+64>>>9<<4)]=c,c=0;c<r.length;c+=16){for(var g=u,v=s,p=l,h=f,m=d,y=0;80>y;y++){if(16>y)a[y]=r[c+y];else{var w=a[y-3]^a[y-8]^a[y-14]^a[y-16];a[y]=w<<1|w>>>31}w=(u<<5|u>>>27)+d+(a[y]>>>0)+(20>y?1518500249+(s&l|~s&f):40>y?1859775393+(s^l^f):60>y?(s&l|s&f|l&f)-1894007588:(s^l^f)-899497514),d=f,f=l,l=s<<30|s>>>2,s=u,u=w}u+=g,s+=v,l+=p,f+=h,d+=m}return i=i.call(e,[u,s,l,f,d]),o&&o.asBytes?i:o&&o.asString?t.bytesToString(i):e.bytesToHex(i)};r._blocksize=16,r._digestsize=20,be=r}();var xe=be,Ae={},Ce=function(){this.outQueues=[],this.bufferFlushers=[],this.hasLoaded=!1,this.registeredOnLoadHandlers=[]};e.SharedState=Ce,e.addEventListener=N,e.addTracker=function(e,n,t,r,o,i){return Ae.hasOwnProperty(e)?null:(Ae[e]=Y(e,n,t,r,o,i),Ae[e])},e.allTrackerNames=$,e.allTrackers=function(){return Ae},e.attemptDeleteLocalStorage=x,e.attemptGetLocalStorage=k,e.attemptGetSessionStorage=A,e.attemptWriteLocalStorage=T,e.attemptWriteSessionStorage=C,e.cookie=R,e.createSharedState=function(){function e(){var e;if(!n.hasLoaded)for(n.hasLoaded=!0,e=0;e<n.registeredOnLoadHandlers.length;e++)n.registeredOnLoadHandlers[e]();return!0}var n=new Ce,t=document,r=window;return t.visibilityState&&N(t,"visibilitychange",(function(){"hidden"==t.visibilityState&&n.bufferFlushers.forEach((function(e){e(!1)}))}),!1),N(r,"beforeunload",(function(){n.bufferFlushers.forEach((function(e){e(!1)}))}),!1),"loading"===document.readyState?(t.addEventListener?t.addEventListener("DOMContentLoaded",(function n(){t.removeEventListener("DOMContentLoaded",n,!1),e()})):t.attachEvent&&t.attachEvent("onreadystatechange",(function n(){"complete"===t.readyState&&(t.detachEvent("onreadystatechange",n),e())})),N(r,"load",e,!1)):e(),n},e.decorateQuerystring=_,e.deleteCookie=M,e.dispatchToTrackers=function(e,n){try{K(null!=e?e:$()).forEach(n)}catch(e){we.error("Function failed",e)}},e.dispatchToTrackersInCollection=function(e,n,t){try{ee(null!=e?e:Object.keys(n),n).forEach(t)}catch(e){we.error("Function failed",e)}},e.findRootDomain=B,e.fixupDomain=j,e.fixupTitle=P,e.fixupUrl=G,e.fromQuerystring=D,e.getCookiesWithPrefix=U,e.getCssClasses=V,e.getFilterByClass=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var n=Object.prototype.hasOwnProperty.call(e,"allowlist"),t=H(e);return z(e,(function(e){e:{var r=0;for(e=V(e);r<e.length;r++)if(t[e[r]]){r=!0;break e}r=!1}return r===n}))},e.getFilterByName=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var n=e.hasOwnProperty("allowlist"),t=H(e);return z(e,(function(e){return e.name in t===n}))},e.getHostName=E,e.getReferrer=L,e.getTracker=function(e){return Ae.hasOwnProperty(e)?Ae[e]:(we.warn(e+" not configured"),null)},e.getTrackers=K,e.hasLocalStorage=J,e.hasSessionStorage=function(){try{return!!window.sessionStorage}catch(e){return!0}},e.isFunction=function(e){return!(!e||"function"!=typeof e)},e.isInteger=I,e.isString=O,e.isValueInArray=function(e,n){for(var t=0;t<n.length;t++)if(n[t]===e)return!0;return!1},e.localStorageAccessible=F,e.parseAndValidateFloat=function(e){return e=parseFloat(e),isNaN(e)?void 0:e},e.parseAndValidateInt=function(e){return e=parseInt(e),isNaN(e)?void 0:e},e.trackerExists=function(e){return Ae.hasOwnProperty(e)},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.umd.min.js.map |
{ | ||
"name": "@snowplow/browser-tracker-core", | ||
"version": "3.16.0", | ||
"version": "3.17.0", | ||
"description": "Core functionality for Snowplow Browser trackers", | ||
@@ -21,3 +21,3 @@ "homepage": "http://bit.ly/sp-js", | ||
"dependencies": { | ||
"@snowplow/tracker-core": "3.16.0", | ||
"@snowplow/tracker-core": "3.17.0", | ||
"sha1": "^1.1.1", | ||
@@ -24,0 +24,0 @@ "tslib": "^2.3.1", |
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 too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2219773
9947
+ Added@snowplow/tracker-core@3.17.0(transitive)
- Removed@snowplow/tracker-core@3.16.0(transitive)