@snowplow/browser-tracker-core
Advanced tools
Comparing version 3.0.0-alpha.3 to 3.0.0-alpha.4
@@ -136,6 +136,2 @@ /* | ||
respectDoNotTrack?: boolean; | ||
/** Force all events to be sent using HTTPS */ | ||
forceSecureTracker?: boolean; | ||
/** Force all events to be sent using HTTP */ | ||
forceUnsecureTracker?: boolean; | ||
/** | ||
@@ -432,9 +428,8 @@ * The preferred technique to use to send events | ||
/** | ||
* Specify the Snowplow collector URL. Specific http or https to force it | ||
* or leave it off to match the website protocol. | ||
* | ||
* Specify the Snowplow collector URL. No need to include HTTP | ||
* or HTTPS - we will add this. | ||
* | ||
* @param rawUrl The collector URL minus protocol and /i | ||
* @param collectorUrl The collector URL, with or without protocol | ||
*/ | ||
setCollectorUrl: (rawUrl: string) => void; | ||
setCollectorUrl: (collectorUrl: string) => void; | ||
/** | ||
@@ -483,4 +478,20 @@ * Alter buffer size | ||
clearUserData: () => void; | ||
addPlugin: (plugin: BrowserPlugin) => void; | ||
} | ||
/** | ||
* Dispatch function to all specified trackers | ||
* | ||
* @param trackers An optional list of trackers to send the event to, or will send to all trackers | ||
* @param fn The function which will run against each tracker | ||
*/ | ||
declare function dispatchToTrackers(trackers: Array<string> | undefined, fn: (t: BrowserTracker) => void): void; | ||
/** | ||
* Dispatch function to all specified trackers from the supplied collection | ||
* | ||
* @param trackers An optional list of trackers to send the event to, or will send to all trackers | ||
* @param trackerCollection The collection which the trackers will be selected from | ||
* @param fn The function which will run against each tracker | ||
*/ | ||
declare function dispatchToTrackersInCollection(trackers: Array<string> | undefined, trackerCollection: Record<string, BrowserTracker>, fn: (t: BrowserTracker) => void): void; | ||
/** | ||
* Checks if a tracker has been created for a particular identifier | ||
@@ -782,2 +793,2 @@ * @param trackerId The unique identifier of the tracker | ||
declare function fixupUrl(hostName: string, href: string, referrer: string): string[]; | ||
export { trackerExists, addTracker, getTracker, getTrackers, allTrackers, allTrackerNames, AnonymousTrackingOptions, StateStorageStrategy, Platform, CookieSameSite, EventMethod, TrackerConfiguration, ActivityCallbackData, ActivityCallback, ActivityTrackingConfiguration, ActivityTrackingConfigurationCallback, PageViewEvent, DisableAnonymousTrackingConfiguration, EnableAnonymousTrackingConfiguration, FlushBufferConfiguration, BrowserTracker, FilterCriterion, isString, isInteger, isFunction, fixupTitle, getHostName, fixupDomain, getReferrer, addEventListener, fromQuerystring, warn, decorateQuerystring, attemptGetLocalStorage, attemptWriteLocalStorage, attemptDeleteLocalStorage, attemptGetSessionStorage, attemptWriteSessionStorage, findRootDomain, isValueInArray, deleteCookie, getCookiesWithPrefix, cookie, parseAndValidateInt, parseAndValidateFloat, getFilterByClass, getFilterByName, getCssClasses, hasSessionStorage, hasLocalStorage, localStorageAccessible, detectViewport, detectDocumentSize, fixupUrl, BrowserPlugin, SharedState, createSharedState }; | ||
export { dispatchToTrackers, dispatchToTrackersInCollection, trackerExists, addTracker, getTracker, getTrackers, allTrackers, allTrackerNames, AnonymousTrackingOptions, StateStorageStrategy, Platform, CookieSameSite, EventMethod, TrackerConfiguration, ActivityCallbackData, ActivityCallback, ActivityTrackingConfiguration, ActivityTrackingConfigurationCallback, PageViewEvent, DisableAnonymousTrackingConfiguration, EnableAnonymousTrackingConfiguration, FlushBufferConfiguration, BrowserTracker, FilterCriterion, isString, isInteger, isFunction, fixupTitle, getHostName, fixupDomain, getReferrer, addEventListener, fromQuerystring, warn, decorateQuerystring, attemptGetLocalStorage, attemptWriteLocalStorage, attemptDeleteLocalStorage, attemptGetSessionStorage, attemptWriteSessionStorage, findRootDomain, isValueInArray, deleteCookie, getCookiesWithPrefix, cookie, parseAndValidateInt, parseAndValidateFloat, getFilterByClass, getFilterByName, getCssClasses, hasSessionStorage, hasLocalStorage, localStorageAccessible, detectViewport, detectDocumentSize, fixupUrl, BrowserPlugin, SharedState, createSharedState }; |
@@ -136,6 +136,2 @@ /* | ||
respectDoNotTrack?: boolean; | ||
/** Force all events to be sent using HTTPS */ | ||
forceSecureTracker?: boolean; | ||
/** Force all events to be sent using HTTP */ | ||
forceUnsecureTracker?: boolean; | ||
/** | ||
@@ -432,9 +428,8 @@ * The preferred technique to use to send events | ||
/** | ||
* Specify the Snowplow collector URL. Specific http or https to force it | ||
* or leave it off to match the website protocol. | ||
* | ||
* Specify the Snowplow collector URL. No need to include HTTP | ||
* or HTTPS - we will add this. | ||
* | ||
* @param rawUrl The collector URL minus protocol and /i | ||
* @param collectorUrl The collector URL, with or without protocol | ||
*/ | ||
setCollectorUrl: (rawUrl: string) => void; | ||
setCollectorUrl: (collectorUrl: string) => void; | ||
/** | ||
@@ -483,4 +478,20 @@ * Alter buffer size | ||
clearUserData: () => void; | ||
addPlugin: (plugin: BrowserPlugin) => void; | ||
} | ||
/** | ||
* Dispatch function to all specified trackers | ||
* | ||
* @param trackers An optional list of trackers to send the event to, or will send to all trackers | ||
* @param fn The function which will run against each tracker | ||
*/ | ||
declare function dispatchToTrackers(trackers: Array<string> | undefined, fn: (t: BrowserTracker) => void): void; | ||
/** | ||
* Dispatch function to all specified trackers from the supplied collection | ||
* | ||
* @param trackers An optional list of trackers to send the event to, or will send to all trackers | ||
* @param trackerCollection The collection which the trackers will be selected from | ||
* @param fn The function which will run against each tracker | ||
*/ | ||
declare function dispatchToTrackersInCollection(trackers: Array<string> | undefined, trackerCollection: Record<string, BrowserTracker>, fn: (t: BrowserTracker) => void): void; | ||
/** | ||
* Checks if a tracker has been created for a particular identifier | ||
@@ -782,2 +793,2 @@ * @param trackerId The unique identifier of the tracker | ||
declare function fixupUrl(hostName: string, href: string, referrer: string): string[]; | ||
export { trackerExists, addTracker, getTracker, getTrackers, allTrackers, allTrackerNames, AnonymousTrackingOptions, StateStorageStrategy, Platform, CookieSameSite, EventMethod, TrackerConfiguration, ActivityCallbackData, ActivityCallback, ActivityTrackingConfiguration, ActivityTrackingConfigurationCallback, PageViewEvent, DisableAnonymousTrackingConfiguration, EnableAnonymousTrackingConfiguration, FlushBufferConfiguration, BrowserTracker, FilterCriterion, isString, isInteger, isFunction, fixupTitle, getHostName, fixupDomain, getReferrer, addEventListener, fromQuerystring, warn, decorateQuerystring, attemptGetLocalStorage, attemptWriteLocalStorage, attemptDeleteLocalStorage, attemptGetSessionStorage, attemptWriteSessionStorage, findRootDomain, isValueInArray, deleteCookie, getCookiesWithPrefix, cookie, parseAndValidateInt, parseAndValidateFloat, getFilterByClass, getFilterByName, getCssClasses, hasSessionStorage, hasLocalStorage, localStorageAccessible, detectViewport, detectDocumentSize, fixupUrl, BrowserPlugin, SharedState, createSharedState }; | ||
export { dispatchToTrackers, dispatchToTrackersInCollection, trackerExists, addTracker, getTracker, getTrackers, allTrackers, allTrackerNames, AnonymousTrackingOptions, StateStorageStrategy, Platform, CookieSameSite, EventMethod, TrackerConfiguration, ActivityCallbackData, ActivityCallback, ActivityTrackingConfiguration, ActivityTrackingConfigurationCallback, PageViewEvent, DisableAnonymousTrackingConfiguration, EnableAnonymousTrackingConfiguration, FlushBufferConfiguration, BrowserTracker, FilterCriterion, isString, isInteger, isFunction, fixupTitle, getHostName, fixupDomain, getReferrer, addEventListener, fromQuerystring, warn, decorateQuerystring, attemptGetLocalStorage, attemptWriteLocalStorage, attemptDeleteLocalStorage, attemptGetSessionStorage, attemptWriteSessionStorage, findRootDomain, isValueInArray, deleteCookie, getCookiesWithPrefix, cookie, parseAndValidateInt, parseAndValidateFloat, getFilterByClass, getFilterByName, getCssClasses, hasSessionStorage, hasLocalStorage, localStorageAccessible, detectViewport, detectDocumentSize, fixupUrl, BrowserPlugin, SharedState, createSharedState }; |
@@ -136,6 +136,2 @@ /* | ||
respectDoNotTrack?: boolean; | ||
/** Force all events to be sent using HTTPS */ | ||
forceSecureTracker?: boolean; | ||
/** Force all events to be sent using HTTP */ | ||
forceUnsecureTracker?: boolean; | ||
/** | ||
@@ -432,9 +428,8 @@ * The preferred technique to use to send events | ||
/** | ||
* Specify the Snowplow collector URL. Specific http or https to force it | ||
* or leave it off to match the website protocol. | ||
* | ||
* Specify the Snowplow collector URL. No need to include HTTP | ||
* or HTTPS - we will add this. | ||
* | ||
* @param rawUrl The collector URL minus protocol and /i | ||
* @param collectorUrl The collector URL, with or without protocol | ||
*/ | ||
setCollectorUrl: (rawUrl: string) => void; | ||
setCollectorUrl: (collectorUrl: string) => void; | ||
/** | ||
@@ -483,4 +478,20 @@ * Alter buffer size | ||
clearUserData: () => void; | ||
addPlugin: (plugin: BrowserPlugin) => void; | ||
} | ||
/** | ||
* Dispatch function to all specified trackers | ||
* | ||
* @param trackers An optional list of trackers to send the event to, or will send to all trackers | ||
* @param fn The function which will run against each tracker | ||
*/ | ||
declare function dispatchToTrackers(trackers: Array<string> | undefined, fn: (t: BrowserTracker) => void): void; | ||
/** | ||
* Dispatch function to all specified trackers from the supplied collection | ||
* | ||
* @param trackers An optional list of trackers to send the event to, or will send to all trackers | ||
* @param trackerCollection The collection which the trackers will be selected from | ||
* @param fn The function which will run against each tracker | ||
*/ | ||
declare function dispatchToTrackersInCollection(trackers: Array<string> | undefined, trackerCollection: Record<string, BrowserTracker>, fn: (t: BrowserTracker) => void): void; | ||
/** | ||
* Checks if a tracker has been created for a particular identifier | ||
@@ -782,2 +793,2 @@ * @param trackerId The unique identifier of the tracker | ||
declare function fixupUrl(hostName: string, href: string, referrer: string): string[]; | ||
export { trackerExists, addTracker, getTracker, getTrackers, allTrackers, allTrackerNames, AnonymousTrackingOptions, StateStorageStrategy, Platform, CookieSameSite, EventMethod, TrackerConfiguration, ActivityCallbackData, ActivityCallback, ActivityTrackingConfiguration, ActivityTrackingConfigurationCallback, PageViewEvent, DisableAnonymousTrackingConfiguration, EnableAnonymousTrackingConfiguration, FlushBufferConfiguration, BrowserTracker, FilterCriterion, isString, isInteger, isFunction, fixupTitle, getHostName, fixupDomain, getReferrer, addEventListener, fromQuerystring, warn, decorateQuerystring, attemptGetLocalStorage, attemptWriteLocalStorage, attemptDeleteLocalStorage, attemptGetSessionStorage, attemptWriteSessionStorage, findRootDomain, isValueInArray, deleteCookie, getCookiesWithPrefix, cookie, parseAndValidateInt, parseAndValidateFloat, getFilterByClass, getFilterByName, getCssClasses, hasSessionStorage, hasLocalStorage, localStorageAccessible, detectViewport, detectDocumentSize, fixupUrl, BrowserPlugin, SharedState, createSharedState }; | ||
export { dispatchToTrackers, dispatchToTrackersInCollection, trackerExists, addTracker, getTracker, getTrackers, allTrackers, allTrackerNames, AnonymousTrackingOptions, StateStorageStrategy, Platform, CookieSameSite, EventMethod, TrackerConfiguration, ActivityCallbackData, ActivityCallback, ActivityTrackingConfiguration, ActivityTrackingConfigurationCallback, PageViewEvent, DisableAnonymousTrackingConfiguration, EnableAnonymousTrackingConfiguration, FlushBufferConfiguration, BrowserTracker, FilterCriterion, isString, isInteger, isFunction, fixupTitle, getHostName, fixupDomain, getReferrer, addEventListener, fromQuerystring, warn, decorateQuerystring, attemptGetLocalStorage, attemptWriteLocalStorage, attemptDeleteLocalStorage, attemptGetSessionStorage, attemptWriteSessionStorage, findRootDomain, isValueInArray, deleteCookie, getCookiesWithPrefix, cookie, parseAndValidateInt, parseAndValidateFloat, getFilterByClass, getFilterByName, getCssClasses, hasSessionStorage, hasLocalStorage, localStorageAccessible, detectViewport, detectDocumentSize, fixupUrl, BrowserPlugin, SharedState, createSharedState }; |
/*! | ||
* Core functionality for Snowplow Browser trackers v3.0.0-alpha.3 (http://bit.ly/sp-js) | ||
* Core functionality for Snowplow Browser trackers v3.0.0-alpha.4 (http://bit.ly/sp-js) | ||
* Copyright 2021 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -7,3 +7,3 @@ * Licensed under BSD-3-Clause | ||
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).snowplowBrowserTrackerCore={})}(this,(function(e){function t(e){return!(!e||"string"!=typeof e.valueOf())}function n(e){return Number.isInteger&&Number.isInteger(e)||"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function r(e){if(!t(e)){e=e.text||"";var n=K.getElementsByTagName("title");n&&null!=n[0]&&(e=n[0].text)}return e}function o(e){var t=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(e);return t?t[1]:e}function i(e){var t=e.length;return"."===e.charAt(--t)&&(e=e.slice(0,t)),"*."===e.slice(0,2)&&(e=e.slice(1)),e}function a(e){var t="",n=c("referrer",Z.location.href)||c("referer",Z.location.href);if(n)return n;if(e)return e;try{t=Z.top.document.referrer}catch(e){if(Z.parent)try{t=Z.parent.document.referrer}catch(e){t=""}}return""===t&&(t=K.referrer),t}function u(e,t,n,r){return e.addEventListener?(e.addEventListener(t,n,r),!0):e.attachEvent?e.attachEvent("on"+t,n):void(e["on"+t]=n)}function c(e,t){return(e=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(t))?decodeURIComponent(e[1].replace(/\+/g," ")):null}function s(e){"undefined"!=typeof console&&console.warn("Snowplow: "+e)}function l(e,t,n){n=t+"="+n;var r=(e=e.split("#"))[0].split("?"),o=r.shift();if(r=r.join("?")){for(var i=!0,a=r.split("&"),u=0;u<a.length;u++)if(a[u].substr(0,t.length+1)===t+"="){i=!1,a[u]=n,r=a.join("&");break}i&&(r=n+"&"+r)}else r=n;return e[0]=o+"?"+r,e.join("#")}function f(e){try{var t=$.getItem(e+".expires");if(null===t||+t>Date.now())return $.getItem(e);$.removeItem(e),$.removeItem(e+".expires")}catch(e){}}function d(e,t,n){void 0===n&&(n=63072e3);try{var r=Date.now()+1e3*n;return $.setItem(e+".expires",r.toString()),$.setItem(e,t),!0}catch(e){return!1}}function p(e){try{return $.removeItem(e),$.removeItem(e+".expires"),!0}catch(e){return!1}}function g(e,t){for(var n="_sp_root_domain_test_"+(new Date).getTime(),r="_test_value_"+(new Date).getTime(),o=Z.location.hostname.split("."),i=o.length-1;0<=i;){var a=o.slice(i,o.length).join(".");if(m(n,r,0,"/",a,e,t),m(n)===r){for(v(n,a,e,t),n=h("_sp_root_domain_test_"),r=0;r<n.length;r++)v(n[r],a,e,t);return a}--i}return Z.location.hostname}function v(e,t,n,r){m(e,"",-1,"/",t,n,r)}function h(e){for(var t=K.cookie.split("; "),n=[],r=0;r<t.length;r++)t[r].substring(0,e.length)===e&&n.push(t[r]);return n}function m(e,t,n,r,o,i,a){return 1<arguments.length?K.cookie=e+"="+encodeURIComponent(null!=t?t:"")+(n?"; Expires="+new Date(+new Date+1e3*n).toUTCString():"")+(r?"; Path="+r:"")+(o?"; Domain="+o:"")+(i?"; SameSite="+i:"")+(a?"; Secure":""):decodeURIComponent((("; "+K.cookie).split("; "+e+"=")[1]||"").split(";")[0])}function y(e){return e.className.match(/\S+/g)||[]}function w(e,t){return e.hasOwnProperty("filter")&&e.filter?e.filter:t}function b(e){var t={};if(e=e.allowlist||e.denylist){Array.isArray(e)||(e=[e]);for(var n=0;n<e.length;n++)t[e[n]]=!0}return t}function S(e){var t={exports:{}};return e(t,t.exports),t.exports}function T(e){if(!e)return e;switch(4-e.length%4){case 2:e+="==";break;case 3:e+="="}return function(e){var t=0,n=0,r="",o=[];if(!e)return e;e+="";do{var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e.charAt(t++)),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e.charAt(t++));r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e.charAt(t++));var u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e.charAt(t++)),c=i<<18|a<<12|r<<6|u;i=c>>16&255,a=c>>8&255,c&=255,o[n++]=64===r?String.fromCharCode(i):64===u?String.fromCharCode(i,a):String.fromCharCode(i,a,c)}while(t<e.length);return function(e){return decodeURIComponent(e.split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}((r=o.join("")).replace(/\0+$/,""))}(e=e.replace(/-/g,"+").replace(/_/g,"/"))}function k(e){if(!x(e))return!1;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function x(e){return null!=e&&(e.constructor==={}.constructor||e.constructor===[].constructor)}function O(){var e={},t=[],n=!0,r=function(t,n){null!=n&&""!==n&&(e[t]=n)};return{setBase64Encoding:function(e){n=e},add:r,addDict:function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r(t,e[t])},addJson:function(e,n,r){r&&k(r)&&t.push([e,n,r])},build:function(){for(var o=0;o<t.length;o++){var i=t[o],a=JSON.stringify(i[2]);if(n){if(i=i[0],a){var u=0,c=0,s=[];if(a){a=unescape(encodeURIComponent(a));do{var l=a.charCodeAt(u++),f=a.charCodeAt(u++),d=a.charCodeAt(u++),p=l<<16|f<<8|d;l=p>>18&63,f=p>>12&63,d=p>>6&63,p&=63,s[c++]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(l)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(d)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p)}while(u<a.length);u=s.join(""),a=((a=a.length%3)?u.slice(0,a-3):u)+"===".slice(a||3)}a=a.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}r(i,a)}else r(i[1],a)}return t.length=0,e}}}function A(){var e=[],t=[];return{getGlobalPrimitives:function(){return e},getConditionalProviders:function(){return t},addGlobalContexts:function(n){for(var r=[],o=[],i=0;i<n.length;i++){var a=n[i];U(a)?r.push(a):L(a)&&o.push(a)}e=e.concat(o),t=t.concat(r)},clearGlobalContexts:function(){t=[],e=[]},removeGlobalContexts:function(n){for(var r=function(n){U(n)?t=t.filter((function(e){return JSON.stringify(e)===JSON.stringify(n)})):L(n)&&(e=e.filter((function(e){return JSON.stringify(e)===JSON.stringify(n)})))},o=0;o<n.length;o++)r(n[o])},getApplicableContexts:function(n){if(!(!k(n=n.build())||!("e"in n))&&"string"==typeof n.e){n=te({},n);try{Object.prototype.hasOwnProperty.call(n,"ue_px")&&(n.ue_px=JSON.parse(T(n.ue_px)));var r=n}catch(e){r=n}var o,i,a,u,c,s,l,f,d;return n="string"==typeof(null===(i=null===(o=r.ue_px)||void 0===o?void 0:o.data)||void 0===i?void 0:i.schema)?null===(u=null===(a=r.ue_px)||void 0===a?void 0:a.data)||void 0===u?void 0:u.schema:"string"==typeof(null===(s=null===(c=r.ue_pr)||void 0===c?void 0:c.data)||void 0===s?void 0:s.schema)?null===(f=null===(l=r.ue_pr)||void 0===l?void 0:l.data)||void 0===f?void 0:f.schema:"string"==typeof(null==r?void 0:r.schema)?null==r?void 0:r.schema:"",o=null!==(d=null==r?void 0:r.e)&&void 0!==d?d:"",d=[],i=V(e,r,o,n),d.push.apply(d,i),o=function(e,t,n,r){var o;return e=R(e).map((function(e){e:{if(B(e)){var o=e[0],i=!1;try{i=o({event:t,eventType:n,eventSchema:r})}catch(e){i=!1}if(!0===i){e=V(e[1],t,n,r);break e}}else if(E(e)&&function(e,t){var n=0,r=0,o=e.accept;return Array.isArray(o)?e.accept.some((function(e){return M(e,t)}))&&r++:"string"==typeof o&&M(o,t)&&r++,o=e.reject,Array.isArray(o)?e.reject.some((function(e){return M(e,t)}))&&n++:"string"==typeof o&&M(o,t)&&n++,0<r&&0===n}(e[0],r)){e=V(e[1],t,n,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)})))}(t,r,o,n),d.push.apply(d,o),d}return[]}}}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 t=!1,n=0;for(e=e.slice(2);n<e.length;n++)if("*"===e[n])t=!0;else if(t)return!1;return!0}return 2==e.length}(e)}function P(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 I(e){if(e=P(e)){var t=e[0];return 5===e.length&&C(t)}return!1}function D(e){return function(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))}(e)?e.every((function(e){return I(e)})):"string"==typeof e&&I(e)}function N(e){return!!(k(e)&&"schema"in e&&"data"in e)&&("string"==typeof e.schema&&"object"==typeof e.data)}function j(e){return"function"==typeof e&&1>=e.length}function L(e){return j(e)||N(e)}function B(e){return!(!Array.isArray(e)||2!==e.length)&&(Array.isArray(e[1])?j(e[0])&&e[1].every(L):j(e[0])&&L(e[1]))}function E(e){return!(!Array.isArray(e)||2!==e.length)&&(!!function(e){var t=0;if(null!=e&&"object"==typeof e&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(e,"accept")){if(!D(e.accept))return!1;t+=1}if(Object.prototype.hasOwnProperty.call(e,"reject")){if(!D(e.reject))return!1;t+=1}return 0<t&&2>=t}return!1}(e[0])&&(Array.isArray(e[1])?e[1].every(L):L(e[1])))}function U(e){return B(e)||E(e)}function M(e,t){if(!I(e))return!1;if(e=P(e),t=null!==(t=/^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(t))?t.slice(1,6):void 0,e&&t){if(!function(e,t){if(t=t.split("."),e=e.split("."),t&&e){if(t.length!==e.length)return!1;for(var n=0;n<e.length;n++)if(!_(t[n],e[n]))return!1;return!0}return!1}(e[0],t[0]))return!1;for(var n=1;5>n;n++)if(!_(e[n],t[n]))return!1;return!0}return!1}function _(e,t){return e&&t&&"*"===e||e===t}function R(e){return Array.isArray(e)?e:[e]}function V(e,t,n,r){var o;return e=R(e).map((function(e){e:if(N(e))e=[e];else{if(j(e)){t:{var o=void 0;try{if(o=e({event:t,eventType:n,eventSchema:r}),Array.isArray(o)&&o.every(N)||N(o)){var i=o;break t}i=void 0;break t}catch(e){}i=void 0}if(N(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 z(e,t,n){function r(e,t){e=a.getApplicableContexts(e);var n=[];return t&&t.length&&n.push.apply(n,t),e&&e.length&&n.push.apply(n,e),n}var o=null!=t?t:[],i=function(e){return{addPluginContexts:function(t){var n=null!=t?t:[];return e.forEach((function(e){try{e.contexts&&n.push.apply(n,e.contexts())}catch(e){console.warn("Snowplow: error with plugin context",e)}})),n}}}(o),a=A(),u=null==e||e,c={};return{track:function(e,t,a){return e.setBase64Encoding(u),e.add("eid",le.v4()),e.addDict(c),a=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()}}(a),e.add(a.type,a.value.toString()),void 0!==(t=(t=r(e,i.addPluginContexts(t)))&&t.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:t}:void 0)&&e.addJson("cx","co",t),o.forEach((function(t){try{t.beforeTrack&&t.beforeTrack(e)}catch(e){console.warn("Snowplow: error with plugin beforeTrack",e)}})),"function"==typeof n&&n(e),o.forEach((function(t){try{t.afterTrack&&t.afterTrack(e.build())}catch(e){console.warn("Snowplow: error with plugin ",e)}})),e},addPayloadPair:function(e,t){c[e]=t},getBase64Encoding:function(){return u},setBase64Encoding:function(e){u=e},addPayloadDict:function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(c[t]=e[t])},resetPayloadPairs:function(e){c=x(e)?e:{}},setTrackerVersion:function(e){c.tv=e},setTrackerNamespace:function(e){c.tna=e},setAppId:function(e){c.aid=e},setPlatform:function(e){c.p=e},setUserId:function(e){c.uid=e},setScreenResolution:function(e,t){c.res=e+"x"+t},setViewport:function(e,t){c.vp=e+"x"+t},setColorDepth:function(e){c.cd=e},setTimezone:function(e){c.tz=e},setLang:function(e){c.lang=e},setIpAddress:function(e){c.ip=e},setUseragent:function(e){c.ua=e},addGlobalContexts:function(e){a.addGlobalContexts(e)},clearGlobalContexts:function(){a.clearGlobalContexts()},removeGlobalContexts:function(e){a.removeGlobalContexts(e)}}}function H(e){var t=e.pageUrl,n=e.pageTitle;e=e.referrer;var r=O();return r.add("e","pv"),r.add("url",t),r.add("page",n),r.add("refr",e),r}function F(e){var t=e.pageUrl,n=e.pageTitle,r=e.referrer,o=e.minXOffset,i=e.maxXOffset,a=e.minYOffset;e=e.maxYOffset;var u=O();return u.add("e","pp"),u.add("url",t),u.add("page",n),u.add("refr",r),o&&!isNaN(Number(o))&&u.add("pp_mix",o.toString()),i&&!isNaN(Number(i))&&u.add("pp_max",i.toString()),a&&!isNaN(Number(a))&&u.add("pp_miy",a.toString()),e&&!isNaN(Number(e))&&u.add("pp_may",e.toString()),u}function J(){try{return!!ve.localStorage}catch(e){return!0}}function G(){if(!J())return!1;try{return ve.localStorage.setItem("modernizr","modernizr"),ve.localStorage.removeItem("modernizr"),!0}catch(e){return!1}}function W(){if("innerWidth"in ve)var e=ve.innerWidth,t=ve.innerHeight;else e=(t=he.documentElement||he.body).clientWidth,t=t.clientHeight;return 0<=e&&0<=t?e+"x"+t:null}function X(){var e=he.documentElement,t=he.body,n=Math.max(e.clientWidth,e.offsetWidth,e.scrollWidth);return e=Math.max(e.clientHeight,e.offsetHeight,e.scrollHeight,t?Math.max(t.offsetHeight,t.scrollHeight):0),isNaN(n)||isNaN(e)?"":n+"x"+e}function q(e,n,r,o,i,a,u,c,l,f,p){function g(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);127>=r?t+=1:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,n++):t=65535>r?t+3:t+4}return t}function v(e){for(void 0===e&&(e=!1);T.length&&"string"!=typeof T[0]&&"object"!=typeof T[0];)T.shift();if(1>T.length)S=!1;else{if(!t(b))throw"No collector configured";if(S=!0,C){var n=function(e){for(var t=0,n=0;t<e.length&&!((n+=e[t].bytes)>=u);)t+=1;return t},o=void 0;if(j(T))var i=h(o=b,!0,e),a=n(T);else o=w(T[0]),i=h(o,!1,e),a=1;var c=setTimeout((function(){i.abort(),S=!1}),f),s=function(e){for(var t=0;t<e;t++)T.shift();r&&d(D,JSON.stringify(T.slice(0,l))),v()};if(i.onreadystatechange=function(){4===i.readyState&&200<=i.status&&400>i.status?(clearTimeout(c),s(a)):4===i.readyState&&400<=i.status&&(clearTimeout(c),S=!1)},j(T)){if(0<(n=T.slice(0,a)).length){if(e=!1,n=n.map((function(e){return e.evt})),A){var g=new Blob([m(y(n))],{type:"application/json"});try{e=navigator.sendBeacon(o,g)}catch(t){e=!1}}!0===e?s(a):i.send(m(y(n)))}}else i.send()}else if(p||j(T))S=!1;else{o=new Image(1,1);var k=!0;o.onload=function(){k&&(k=!1,T.shift(),r&&d(D,JSON.stringify(T.slice(0,l))),v())},o.onerror=function(){k&&(S=k=!1)},o.src=w(T[0]),setTimeout((function(){k&&S&&(k=!1,v())}),f)}}}function h(e,t,n){var r=new XMLHttpRequest;return t?(r.open("POST",e,!n),r.setRequestHeader("Content-Type","application/json; charset=UTF-8")):r.open("GET",e,!n),r.withCredentials=!0,p&&r.setRequestHeader("SP-Anonymous","*"),r}function m(e){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",data:e})}function y(e){for(var t=(new Date).getTime().toString(),n=0;n<e.length;n++)e[n].stm=t;return e}function w(e){return c?b+e.replace("?","?stm="+(new Date).getTime()+"&"):b+e}var b,S=!1,T=[];o="string"==typeof o?o.toLowerCase():o;var k=window.localStorage,x=window.navigator,O=null===o||!0===o||"beacon"===o||"true"===o,A=!(!(O&&x&&x.sendBeacon)||function(e){return function(e,t){return!(!(t=t.match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/"))||!t.length)&&parseInt(t[0])<=13}(0,e)||function(e,t,n){return!(!(n=n.match("(Macintosh;.*Mac OS X (d+)_(d+)[_d]*.*) AppleWebKit/"))||!n.length)&&(parseInt(n[0])<=e||parseInt(n[0])===e&&parseInt(n[1])<=t)}(10,15,e)&&function(e){return e.match("Version/.* Safari/")&&!e.match("Chrom(e|ium)")}(e)}(x.userAgent))&&O,C=!(!window.XMLHttpRequest||!("withCredentials"in new XMLHttpRequest)),P="get"!==o&&C&&("post"===o||O),I=P?i:"/i",D="snowplowOutQueue_"+e+"_"+(P?"post2":"get");if(a=G()&&r&&P&&a||1,r)try{var N=k.getItem(D);T=N?JSON.parse(N):[]}catch(e){}Array.isArray(T)||(T=[]),n.outQueues.push(T),C&&1<a&&n.bufferFlushers.push((function(e){S||v(e)}));var j=function(e){return"object"==typeof e[0]};return{enqueueRequest:function(e,t){if(b=t+I,P){if((e=function(e){var t=Object.keys(e).map((function(t){return[t,e[t]]})).reduce((function(e,t){return e[t[0]]=t[1].toString(),e}),{});return{evt:t,bytes:g(JSON.stringify(t))}}(e)).bytes>=u)return s("Event ("+e.bytes+"B) too big, max is "+u),void h(b,!0,!1).send(m(y([e.evt])));T.push(e)}else T.push(function(e){var t,n="?",r={co:!0,cx:!0},o=!0;for(t in e)e.hasOwnProperty(t)&&!r.hasOwnProperty(t)&&(o?o=!1:n+="&",n+=encodeURIComponent(t)+"="+encodeURIComponent(e[t]));for(var i in r)e.hasOwnProperty(i)&&r.hasOwnProperty(i)&&(n+="&"+i+"="+encodeURIComponent(e[i]));return n}(e));e=!1,r&&(e=d(D,JSON.stringify(T.slice(0,l)))),S||e&&!(T.length>=a)||v()},executeQueue:function(){S||v()},setUseLocalStorage:function(e){r=e},setAnonymousTracking:function(e){p=e},setCollectorUrl:function(e){b=e+I},setBufferSize:function(e){a=e}}}function Q(e,t,n){return"translate.googleusercontent.com"===e?(""===n&&(n=t),e=o(t=null!=(e=(e=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(t))&&1<(null==e?void 0:e.length)?c("u",e[1]):null)?e:"")):"cc.bingj.com"!==e&&"webcache.googleusercontent.com"!==e||(e=o(t=document.links[0].href)),[e,t,n]}function Y(e,t,h,y,w,b){e=function(e,t,h,y,w,b){function S(){(qe=Q(Fe.location.hostname,Fe.location.href,a()))[1]!==Ye&&(Ze=a(Ye)),Qe=i(qe[0]),Ye=qe[1]}function T(e){var t=(new Date).getTime();null!=(e=e.target)&&e.href&&(e.href=l(e.href,"_sp",_e+"."+t))}function k(e){for(var t=0;t<He.links.length;t++){var n=He.links[t];!n.spDecorationEnabled&&e(n)&&(u(n,"click",T,!0),u(n,"mousedown",T,!0),n.spDecorationEnabled=!0)}}function x(e){if(Ie){var t=/#.*/;e=e.replace(t,"")}return De&&(t=/[{}]/g,e=e.replace(t,"")),e}function O(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function A(e){return e=at+e+"."+Me,"localStorage"==yt?f(e):"cookie"==yt||"cookieAndLocalStorage"==yt?m(e):void 0}function C(){S(),Me=bt((ut||Qe)+(ct||"/")).slice(0,4)}function P(){je=(new Date).getTime()}function I(){var e=D(),t=e[0];t<Le?Le=t:t>Be&&(Be=t),(e=e[1])<Ee?Ee=e:e>Ue&&(Ue=e),P()}function D(){var e=He.compatMode&&"BackCompat"!==He.compatMode?He.documentElement:He.body;return[e.scrollLeft||Fe.pageXOffset,e.scrollTop||Fe.pageYOffset]}function N(){var e=D(),t=e[0];Be=Le=t,Ue=Ee=e=e[1]}function j(){B(at+"ses."+Me,"*",gt)}function L(e,t,n,r,o,i){B(at+"id."+Me,e+"."+t+"."+n+"."+r+"."+o+"."+i,pt)}function B(e,t,n){mt&&!vt||("localStorage"==yt?d(e,t,n):("cookie"==yt||"cookieAndLocalStorage"==yt)&&m(e,t,n,ct,ut,st,lt))}function E(){var e=at+"id."+Me,t=at+"ses."+Me;p(e),p(t),v(e,ut,st,lt),v(t,ut,st,lt)}function U(){if(!mt||vt){var e="none"!=yt&&!!A("ses"),t=M();t[1]?_e=t[1]:(_e=mt?"":le.v4(),t[1]=_e),Re=t[6],e||(t[3]++,Re=le.v4(),t[6]=Re,t[5]=t[4]),"none"!=yt&&(j(),t[4]=Math.round((new Date).getTime()/1e3),t.shift(),L.apply(null,t))}}function M(){if("none"==yt)return[];var e=Math.round((new Date).getTime()/1e3),t=A("id");return t?(e=t.split(".")).unshift("0"):e=["1",_e,e,0,e,""],e[6]||(e[6]=le.v4()),e}function _(e){return $e?"https://"+e:et?"http://"+e:("https:"===He.location.protocol?"https":"http")+"://"+e}function R(){kt&&null!=w.pageViewId||(w.pageViewId=le.v4())}function V(){return null==w.pageViewId&&(w.pageViewId=le.v4()),w.pageViewId}function J(e,t,n){var r=function(e,t){S(),e({context:t,pageViewId:V(),minXOffset:Le,minYOffset:Ee,maxXOffset:Be,maxYOffset:Ue}),N()},o=function(){je+e.configHeartBeatTimer>(new Date).getTime()&&r(e.callback,(t||[]).concat(n?n():[]))};e.activityInterval=0!=e.configMinimumVisitLength?Fe.setTimeout((function(){je+e.configMinimumVisitLength>(new Date).getTime()&&r(e.callback,(t||[]).concat(n?n():[])),e.activityInterval=Fe.setInterval(o,e.configHeartBeatTimer)}),e.configMinimumVisitLength):Fe.setInterval(o,e.configHeartBeatTimer)}function G(e){var t=e.minimumVisitLength,r=e.heartbeatDelay;if(e=e.callback,n(t)&&n(r))return{configMinimumVisitLength:1e3*t,configHeartBeatTimer:1e3*r,callback:e};s("Activity tracking not enabled, please provide integer values for minimumVisitLength and heartbeatDelay.")}function Y(e){var t=e.context,n=e.minXOffset,o=e.minYOffset,i=e.maxXOffset;e=e.maxYOffset;var a=He.title;a!==ot&&(ot=a,Pe=void 0),ze.track(F({pageUrl:x(Ce||Ye),pageTitle:r(Pe||ot),referrer:x(Ae||Ze),minXOffset:Math.round(n),maxXOffset:Math.round(i),minYOffset:Math.round(o),maxYOffset:Math.round(e)}),t)}var Z,K,$,ee,ne,re,oe,ie,ae,ue,ce,se,fe,de,pe,ve,he,me,ye,we,be,Se;void 0===b&&(b={}),b.eventMethod=null!==(Z=b.eventMethod)&&void 0!==Z?Z:"post";var Te=function(e){var t;return null!==(t=e.stateStorageStrategy)&&void 0!==t?t:"cookieAndLocalStorage"},ke=function(e){var t,n;return"boolean"!=typeof e.anonymousTracking&&(null!==(n=!0===(null===(t=e.anonymousTracking)||void 0===t?void 0:t.withSessionTracking))&&void 0!==n&&n)},xe=function(e){var t,n;return"boolean"!=typeof e.anonymousTracking&&(null!==(n=!0===(null===(t=e.anonymousTracking)||void 0===t?void 0:t.withServerAnonymisation))&&void 0!==n&&n)},Oe=null!==(K=b.plugins)&&void 0!==K?K:[];(null===(ee=null===($=null==b?void 0:b.contexts)||void 0===$?void 0:$.webPage)||void 0===ee||ee)&&Oe.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:V()}}]}});var Ae,Ce,Pe,Ie,De,Ne,je,Le,Be,Ee,Ue,Me,_e,Re,Ve,ze=z(null===(ne=b.encodeBase64)||void 0===ne||ne,Oe,(function(e){var t=Math.round((new Date).getTime()/1e3),n=A("ses"),r=M(),o=r[0],i=r[1],a=r[2],u=r[3],c=r[4],s=r[5];r=r[6];var l=!!Ne&&!!m(Ne);dt||l?E():("0"===o?(Re=r,n||"none"==yt||(u++,s=c,Re=le.v4()),St=u):(new Date).getTime()-wt>1e3*gt&&(Re=le.v4(),St++),e.add("vp",W()),e.add("ds",X()),e.add("vid",vt?St:mt?null:St),e.add("sid",vt?Re:mt?null:Re),e.add("duid",mt?null:i),e.add("uid",mt?null:Ve),S(),e.add("refr",x(Ae||Ze)),e.add("url",x(Ce||Ye)),"none"!=yt&&(L(i,a,St,t,s,Re),j()),wt=(new Date).getTime()),t=!!Ne&&!!m(Ne),dt||t||Tt.enqueueRequest(e.build(),tt)})),He=document,Fe=window,Je=navigator,Ge=screen,We=Je.userLanguage||Je.language,Xe=He.characterSet||He.charset,qe=Q(Fe.location.hostname,Fe.location.href,a()),Qe=i(qe[0]),Ye=qe[1],Ze=qe[2],Ke=null!==(re=b.platform)&&void 0!==re?re:"web",$e=null!==(oe=b.forceSecureTracker)&&void 0!==oe&&oe,et=!$e&&null!==(ie=b.forceUnsecureTracker)&&void 0!==ie&&ie,tt=_(y),nt=null!==(ae=b.postPath)&&void 0!==ae?ae:"/com.snowplowanalytics.snowplow/tp2",rt=null!==(ue=b.appId)&&void 0!==ue?ue:"",ot=He.title,it=null===(ce=b.resetActivityTrackingOnPageView)||void 0===ce||ce,at=null!==(se=b.cookieName)&&void 0!==se?se:"_sp_",ut=null!==(fe=b.cookieDomain)&&void 0!==fe?fe:void 0,ct="/",st=null!==(de=b.cookieSameSite)&&void 0!==de?de:"None",lt=null===(pe=b.cookieSecure)||void 0===pe||pe,ft=Je.doNotTrack||Je.msDoNotTrack||Fe.doNotTrack,dt=void 0!==b.respectDoNotTrack&&(b.respectDoNotTrack&&("yes"===ft||"1"===ft)),pt=null!==(ve=b.cookieLifetime)&&void 0!==ve?ve:63072e3,gt=null!==(he=b.sessionCookieTimeout)&&void 0!==he?he:1800,vt=ke(b),ht=xe(b),mt=!!b.anonymousTracking,yt=Te(b),wt=(new Date).getTime(),bt=ge,St=1,Tt=q(e,w,"localStorage"==yt||"cookieAndLocalStorage"==yt,b.eventMethod,nt,null!==(me=b.bufferSize)&&void 0!==me?me:1,null!==(ye=b.maxPostBytes)&&void 0!==ye?ye:4e4,null===(we=b.useStm)||void 0===we||we,null!==(be=b.maxLocalStorageQueueSize)&&void 0!==be?be:1e3,null!==(Se=b.connectionTimeout)&&void 0!==Se?Se:5e3,ht),kt=!1,xt=!1,Ot={enabled:!1,installed:!1,configurations:{}};return b.hasOwnProperty("discoverRootDomain")&&b.discoverRootDomain&&(ut=g(st,lt)),ze.setTrackerVersion(h),ze.setTrackerNamespace(t),ze.setAppId(rt),ze.setPlatform(Ke),ze.addPayloadPair("cookie",Je.cookieEnabled?"1":"0"),ze.addPayloadPair("cs",Xe),ze.addPayloadPair("lang",We),ze.addPayloadPair("res",Ge.width+"x"+Ge.height),ze.addPayloadPair("cd",Ge.colorDepth),C(),U(),b.crossDomainLinker&&k(b.crossDomainLinker),te(te({},{getDomainSessionIndex:function(){return St},getPageViewId:function(){return V()},newSession:function(){var e=Math.round((new Date).getTime()/1e3),t=M(),n=t[1],r=t[2],o=t[3],i=t[4],a=t[5],u=t[6];"0"===t[0]?(Re=u,"none"!=yt&&(o++,a=i,Re=le.v4()),St=o,j()):(Re=le.v4(),St++),"none"!=yt&&(L(n,r,St,e,a,Re),j()),wt=(new Date).getTime()},getCookieName:function(e){return at+e+"."+Me},getUserId:function(){return Ve},getDomainUserId:function(){return M()[1]},getDomainUserInfo:function(){return M()},setReferrerUrl:function(e){Ae=e},setCustomUrl:function(e){S();var t,n=Ye;O(e)?Ce=e:"/"===e.slice(0,1)?Ce=O(n)+"://"+o(n)+e:(0<=(t=(n=x(n)).indexOf("?"))&&(n=n.slice(0,t)),(t=n.lastIndexOf("/"))!==n.length-1&&(n=n.slice(0,t+1)),Ce=n+e)},setDocumentTitle:function(e){ot=He.title,Pe=e},discardHashTag:function(e){Ie=e},discardBrace:function(e){De=e},setCookiePath:function(e){ct=e,C()},setVisitorCookieTimeout:function(e){pt=e},crossDomainLinker:function(e){k(e)},enableActivityTracking:function(e){Ot.enabled=!0,Ot.configurations.pagePing=G(te(te({},e),{callback:Y}))},enableActivityTrackingCallback:function(e){Ot.enabled=!0,Ot.configurations.callback=G(e)},updatePageActivity:function(){P()},setOptOutCookie:function(e){Ne=e},setUserId:function(e){Ve=e},setUserIdFromLocation:function(e){S(),Ve=c(e,Ye)},setUserIdFromReferrer:function(e){S(),Ve=c(e,Ze)},setUserIdFromCookie:function(e){Ve=m(e)},setCollectorUrl:function(e){tt=_(e),Tt.setCollectorUrl(tt)},setBufferSize:function(e){Tt.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={}),Tt.executeQueue(),e.newBufferSize&&Tt.setBufferSize(e.newBufferSize)},trackPageView:function(e){void 0===e&&(e={}),function(e){var t=e.title,n=e.context,o=e.timestamp;if(e=e.contextCallback,S(),xt&&R(),xt=!0,ot=He.title,t=r((Pe=t)||ot),ze.track(H({pageUrl:x(Ce||Ye),pageTitle:t,referrer:x(Ae||Ze)}),(n||[]).concat(e?e():[]),o),o=new Date,t=!1,Ot.enabled&&!Ot.installed){t=Ot.installed=!0;var i={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),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")?u(He,a,P,{passive:!0}):u(He,a,P),N(),a=function(e,t){return void 0===t&&(t=P),function(e){return u(He,e,t)}},"click mouseup mousedown mousemove keypress keydown keyup".split(" ").forEach(a(He)),["resize","focus","blur"].forEach(a(Fe)),a(Fe,I)("scroll")}if(Ot.enabled&&(it||t))for(o in je=o.getTime(),o=void 0,Ot.configurations)(t=Ot.configurations[o])&&(window.clearInterval(t.activityInterval),J(t,n,e))}(e)},preservePageViewId:function(){kt=!0},disableAnonymousTracking:function(e){e&&e.stateStorageStrategy?(b.stateStorageStrategy=e.stateStorageStrategy,b.anonymousTracking=!1,yt=Te(b)):b.anonymousTracking=!1,mt=!!b.anonymousTracking,vt=ke(b),ht=xe(b),Tt.setUseLocalStorage("localStorage"==yt||"cookieAndLocalStorage"==yt),Tt.setAnonymousTracking(ht),U(),Tt.executeQueue()},enableAnonymousTracking:function(e){b.anonymousTracking=e&&(null==e?void 0:e.options)||!0,mt=!!b.anonymousTracking,vt=ke(b),ht=xe(b),vt||R(),Tt.setAnonymousTracking(ht)},clearUserData:E}),{id:e,core:ze,sharedState:w,plugins:Oe})}(e,t,h,y,w,b),t=e.plugins;var S=function(e,t){var n,r={};for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["plugins"]);return t.forEach((function(e){var t;null===(t=e.activateBrowserPlugin)||void 0===t||t.call(e,S)})),S}for(var Z=window,K=document,$=window.localStorage,ee=window.sessionStorage,te=function(){return(te=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ne=S((function(e){var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=Array(16);e.exports=function(){for(var e,t=0;16>t;t++)0==(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}})),re=[],oe=0;256>oe;++oe)re[oe]=(oe+256).toString(16).substr(1);var ie,ae,ue=function(e,t){return t=t||0,[re[e[t++]],re[e[t++]],re[e[t++]],re[e[t++]],"-",re[e[t++]],re[e[t++]],"-",re[e[t++]],re[e[t++]],"-",re[e[t++]],re[e[t++]],"-",re[e[t++]],re[e[t++]],re[e[t++]],re[e[t++]],re[e[t++]],re[e[t++]]].join("")},ce=0,se=0;(oe=function(e,t,n){if(n=t&&n||0,"string"==typeof e&&(t="binary"===e?Array(16):null,e=null),(e=(e=e||{}).random||(e.rng||ne)())[6]=15&e[6]|64,e[8]=63&e[8]|128,t)for(var r=0;16>r;++r)t[n+r]=e[r];return t||ue(e)}).v1=function(e,t,n){n=t&&n||0;var r=t||[],o=(e=e||{}).node||ie,i=void 0!==e.clockseq?e.clockseq:ae;if(null==o||null==i){var a=ne();null==o&&(o=ie=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==i&&(i=ae=16383&(a[6]<<8|a[7]))}a=void 0!==e.msecs?e.msecs:(new Date).getTime();var u=void 0!==e.nsecs?e.nsecs:se+1,c=a-ce+(u-se)/1e4;if(0>c&&void 0===e.clockseq&&(i=i+1&16383),(0>c||a>ce)&&void 0===e.nsecs&&(u=0),1e4<=u)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");for(ce=a,se=u,ae=i,e=(1e4*(268435455&(a+=122192928e5))+u)%4294967296,r[n++]=e>>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e,e=a/4294967296*1e4&268435455,r[n++]=e>>>8&255,r[n++]=255&e,r[n++]=e>>>24&15|16,r[n++]=e>>>16&255,r[n++]=i>>>8|128,r[n++]=255&i,i=0;6>i;++i)r[n+i]=o[i];return t||ue(r)};var le=oe.v4=oe,fe=S((function(e){var t;t={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&t.rotl(e,8)|4278255360&t.rotl(e,24);for(var n=0;n<e.length;n++)e[n]=t.endian(e[n]);return e},randomBytes:function(e){for(var t=[];0<e;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var r=e[n]<<16|e[n+1]<<8|e[n+2],o=0;4>o;o++)8*n+6*o<=8*e.length?t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>>6*(3-o)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,r=0;n<e.length;r=++n%4)0!=r&&t.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(n-1))&Math.pow(2,-2*r+8)-1)<<2*r|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(n))>>>6-2*r);return t}},e.exports=t})),de={utf8:{stringToBytes:function(e){return de.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(de.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},pe=de,ge=S((function(e){var t,n,r,o;t=pe.utf8,n=pe.bin,r=function(e){e.constructor==String?e=t.stringToBytes(e):"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());var n=fe.bytesToWords(e),r=8*e.length;e=[];var o=1732584193,i=-271733879,a=-1732584194,u=271733878,c=-1009589776;for(n[r>>5]|=128<<24-r%32,n[15+(r+64>>>9<<4)]=r,r=0;r<n.length;r+=16){for(var s=o,l=i,f=a,d=u,p=c,g=0;80>g;g++){if(16>g)e[g]=n[r+g];else{var v=e[g-3]^e[g-8]^e[g-14]^e[g-16];e[g]=v<<1|v>>>31}v=(o<<5|o>>>27)+c+(e[g]>>>0)+(20>g?1518500249+(i&a|~i&u):40>g?1859775393+(i^a^u):60>g?(i&a|i&u|a&u)-1894007588:(i^a^u)-899497514),c=u,u=a,a=i<<30|i>>>2,i=o,o=v}o+=s,i+=l,a+=f,u+=d,c+=p}return[o,i,a,u,c]},(o=function(e,t){return e=fe.wordsToBytes(r(e)),t&&t.asBytes?e:t&&t.asString?n.bytesToString(e):fe.bytesToHex(e)})._blocksize=16,o._digestsize=20,e.exports=o})),ve=window,he=document,me={},ye=function(){this.outQueues=[],this.bufferFlushers=[],this.hasLoaded=!1,this.registeredOnLoadHandlers=[]};e.SharedState=ye,e.addEventListener=u,e.addTracker=function(e,t,n,r,o,i){return me.hasOwnProperty(e)?null:(me[e]=Y(e,t,n,r,o,i),me[e])},e.allTrackerNames=function(){return Object.keys(me)},e.allTrackers=function(){return me},e.attemptDeleteLocalStorage=p,e.attemptGetLocalStorage=f,e.attemptGetSessionStorage=function(e){try{return ee.getItem(e)}catch(e){}},e.attemptWriteLocalStorage=d,e.attemptWriteSessionStorage=function(e,t){try{return ee.setItem(e,t),!0}catch(e){return!1}},e.cookie=m,e.createSharedState=function(){function e(){var e;if(!r.hasLoaded)for(r.hasLoaded=!0,e=0;e<r.registeredOnLoadHandlers.length;e++)r.registeredOnLoadHandlers[e]();return!0}var t=document,n=window,r=new ye;return document.visibilityState&&u(t,"visibilitychange",(function(){"hidden"==t.visibilityState&&r.bufferFlushers.forEach((function(e){e(!1)}))}),!1),u(n,"beforeunload",(function(){r.bufferFlushers.forEach((function(e){e(!1)}))}),!1),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())})),u(n,"load",e,!1),r},e.decorateQuerystring=l,e.deleteCookie=v,e.detectDocumentSize=X,e.detectViewport=W,e.findRootDomain=g,e.fixupDomain=i,e.fixupTitle=r,e.fixupUrl=Q,e.fromQuerystring=c,e.getCookiesWithPrefix=h,e.getCssClasses=y,e.getFilterByClass=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var t=Object.prototype.hasOwnProperty.call(e,"allowlist"),n=b(e);return w(e,(function(e){e:{var r=0;for(e=y(e);r<e.length;r++)if(n[e[r]]){r=!0;break e}r=!1}return r===t}))},e.getFilterByName=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var t=e.hasOwnProperty("allowlist"),n=b(e);return w(e,(function(e){return e.name in n===t}))},e.getHostName=o,e.getReferrer=a,e.getTracker=function(e){return me.hasOwnProperty(e)?me[e]:(s(e+" not configured"),null)},e.getTrackers=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];me.hasOwnProperty(r)?t.push(me[r]):s(r+" not configured")}return t},e.hasLocalStorage=J,e.hasSessionStorage=function(){try{return!!ve.sessionStorage}catch(e){return!0}},e.isFunction=function(e){return!(!e||"function"!=typeof e)},e.isInteger=n,e.isString=t,e.isValueInArray=function(e,t){for(var n=0;n<t.length;n++)if(t[n]===e)return!0;return!1},e.localStorageAccessible=G,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 me.hasOwnProperty(e)},e.warn=s,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).snowplowBrowserTrackerCore={})}(this,(function(e){function t(e){return!(!e||"string"!=typeof e.valueOf())}function n(e){return Number.isInteger&&Number.isInteger(e)||"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function r(e){if(!t(e)){e=e.text||"";var n=ne.getElementsByTagName("title");n&&null!=n[0]&&(e=n[0].text)}return e}function o(e){var t=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(e);return t?t[1]:e}function i(e){var t=e.length;return"."===e.charAt(--t)&&(e=e.slice(0,t)),"*."===e.slice(0,2)&&(e=e.slice(1)),e}function a(e){var t="",n=c("referrer",te.location.href)||c("referer",te.location.href);if(n)return n;if(e)return e;try{t=te.top.document.referrer}catch(e){if(te.parent)try{t=te.parent.document.referrer}catch(e){t=""}}return""===t&&(t=ne.referrer),t}function u(e,t,n,r){return e.addEventListener?(e.addEventListener(t,n,r),!0):e.attachEvent?e.attachEvent("on"+t,n):void(e["on"+t]=n)}function c(e,t){return(e=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(t))?decodeURIComponent(e[1].replace(/\+/g," ")):null}function s(e){"undefined"!=typeof console&&console.warn("Snowplow: "+e)}function l(e,t,n){n=t+"="+n;var r=(e=e.split("#"))[0].split("?"),o=r.shift();if(r=r.join("?")){for(var i=!0,a=r.split("&"),u=0;u<a.length;u++)if(a[u].substr(0,t.length+1)===t+"="){i=!1,a[u]=n,r=a.join("&");break}i&&(r=n+"&"+r)}else r=n;return e[0]=o+"?"+r,e.join("#")}function f(e){try{var t=re.getItem(e+".expires");if(null===t||+t>Date.now())return re.getItem(e);re.removeItem(e),re.removeItem(e+".expires")}catch(e){}}function d(e,t,n){void 0===n&&(n=63072e3);try{var r=Date.now()+1e3*n;return re.setItem(e+".expires",r.toString()),re.setItem(e,t),!0}catch(e){return!1}}function p(e){try{return re.removeItem(e),re.removeItem(e+".expires"),!0}catch(e){return!1}}function g(e,t){for(var n="_sp_root_domain_test_"+(new Date).getTime(),r="_test_value_"+(new Date).getTime(),o=te.location.hostname.split("."),i=o.length-1;0<=i;){var a=o.slice(i,o.length).join(".");if(m(n,r,0,"/",a,e,t),m(n)===r){for(v(n,a,e,t),n=h("_sp_root_domain_test_"),r=0;r<n.length;r++)v(n[r],a,e,t);return a}--i}return te.location.hostname}function v(e,t,n,r){m(e,"",-1,"/",t,n,r)}function h(e){for(var t=ne.cookie.split("; "),n=[],r=0;r<t.length;r++)t[r].substring(0,e.length)===e&&n.push(t[r]);return n}function m(e,t,n,r,o,i,a){return 1<arguments.length?ne.cookie=e+"="+encodeURIComponent(null!=t?t:"")+(n?"; Expires="+new Date(+new Date+1e3*n).toUTCString():"")+(r?"; Path="+r:"")+(o?"; Domain="+o:"")+(i?"; SameSite="+i:"")+(a?"; Secure":""):decodeURIComponent((("; "+ne.cookie).split("; "+e+"=")[1]||"").split(";")[0])}function y(e){return e.className.match(/\S+/g)||[]}function w(e,t){return e.hasOwnProperty("filter")&&e.filter?e.filter:t}function b(e){var t={};if(e=e.allowlist||e.denylist){Array.isArray(e)||(e=[e]);for(var n=0;n<e.length;n++)t[e[n]]=!0}return t}function S(e){var t={exports:{}};return e(t,t.exports),t.exports}function k(e){if(!e)return e;switch(4-e.length%4){case 2:e+="==";break;case 3:e+="="}return function(e){var t=0,n=0,r="",o=[];if(!e)return e;e+="";do{var i=ve.indexOf(e.charAt(t++)),a=ve.indexOf(e.charAt(t++));r=ve.indexOf(e.charAt(t++));var u=ve.indexOf(e.charAt(t++)),c=i<<18|a<<12|r<<6|u;i=c>>16&255,a=c>>8&255,c&=255,o[n++]=64===r?String.fromCharCode(i):64===u?String.fromCharCode(i,a):String.fromCharCode(i,a,c)}while(t<e.length);return function(e){return decodeURIComponent(e.split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}((r=o.join("")).replace(/\0+$/,""))}(e=e.replace(/-/g,"+").replace(/_/g,"/"))}function T(e){if(!e)return e;var t=0,n=0,r=[];if(e){e=unescape(encodeURIComponent(e));do{var o=e.charCodeAt(t++),i=e.charCodeAt(t++),a=e.charCodeAt(t++),u=o<<16|i<<8|a;o=u>>18&63,i=u>>12&63,a=u>>6&63,u&=63,r[n++]=ve.charAt(o)+ve.charAt(i)+ve.charAt(a)+ve.charAt(u)}while(t<e.length);t=r.join(""),e=((e=e.length%3)?t.slice(0,e-3):t)+"===".slice(e||3)}return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function x(){var e,t={},n=[],r=function(e,n){null!=n&&""!==n&&(t[e]=n)};return{add:r,addDict:function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r(t,e[t])},addJson:function(e,t,r){r&&A(r)&&n.push([e,t,r])},withJsonProcessor:function(t){e=t},build:function(){return null==e||e(this,n),t}}}function A(e){if(!O(e))return!1;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function O(e){return null!=e&&(e.constructor==={}.constructor||e.constructor===[].constructor)}function C(){var e=[],t=[];return{getGlobalPrimitives:function(){return e},getConditionalProviders:function(){return t},addGlobalContexts:function(n){for(var r=[],o=[],i=0;i<n.length;i++){var a=n[i];M(a)?r.push(a):B(a)&&o.push(a)}e=e.concat(o),t=t.concat(r)},clearGlobalContexts:function(){t=[],e=[]},removeGlobalContexts:function(n){for(var r=function(n){M(n)?t=t.filter((function(e){return JSON.stringify(e)===JSON.stringify(n)})):B(n)&&(e=e.filter((function(e){return JSON.stringify(e)===JSON.stringify(n)})))},o=0;o<n.length;o++)r(n[o])},getApplicableContexts:function(n){if(!(!A(n=n.build())||!("e"in n))&&"string"==typeof n.e){n=ie({},n);try{Object.prototype.hasOwnProperty.call(n,"ue_px")&&(n.ue_px=JSON.parse(k(n.ue_px)));var r=n}catch(e){r=n}var o,i,a,u,c,s,l,f,d;return n="string"==typeof(null===(i=null===(o=r.ue_px)||void 0===o?void 0:o.data)||void 0===i?void 0:i.schema)?null===(u=null===(a=r.ue_px)||void 0===a?void 0:a.data)||void 0===u?void 0:u.schema:"string"==typeof(null===(s=null===(c=r.ue_pr)||void 0===c?void 0:c.data)||void 0===s?void 0:s.schema)?null===(f=null===(l=r.ue_pr)||void 0===l?void 0:l.data)||void 0===f?void 0:f.schema:"string"==typeof(null==r?void 0:r.schema)?null==r?void 0:r.schema:"",o=null!==(d=null==r?void 0:r.e)&&void 0!==d?d:"",d=[],i=z(e,r,o,n),d.push.apply(d,i),o=function(e,t,n,r){var o;return e=V(e).map((function(e){e:{if(E(e)){var o=e[0],i=!1;try{i=o({event:t,eventType:n,eventSchema:r})}catch(e){i=!1}if(!0===i){e=z(e[1],t,n,r);break e}}else if(_(e)&&function(e,t){var n=0,r=0,o=e.accept;return Array.isArray(o)?e.accept.some((function(e){return U(e,t)}))&&r++:"string"==typeof o&&U(o,t)&&r++,o=e.reject,Array.isArray(o)?e.reject.some((function(e){return U(e,t)}))&&n++:"string"==typeof o&&U(o,t)&&n++,0<r&&0===n}(e[0],r)){e=z(e[1],t,n,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)})))}(t,r,o,n),d.push.apply(d,o),d}return[]}}}function P(e){return!!((e=e.split("."))&&1<e.length)&&function(e){if("*"===e[0]||"*"===e[1])return!1;if(0<e.slice(2).length){var t=!1,n=0;for(e=e.slice(2);n<e.length;n++)if("*"===e[n])t=!0;else if(t)return!1;return!0}return 2==e.length}(e)}function I(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))&&P(e[1]))return e.slice(1,6)}function D(e){if(e=I(e)){var t=e[0];return 5===e.length&&P(t)}return!1}function N(e){return function(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))}(e)?e.every((function(e){return D(e)})):"string"==typeof e&&D(e)}function L(e){return!!(A(e)&&"schema"in e&&"data"in e)&&("string"==typeof e.schema&&"object"==typeof e.data)}function j(e){return"function"==typeof e&&1>=e.length}function B(e){return j(e)||L(e)}function E(e){return!(!Array.isArray(e)||2!==e.length)&&(Array.isArray(e[1])?j(e[0])&&e[1].every(B):j(e[0])&&B(e[1]))}function _(e){return!(!Array.isArray(e)||2!==e.length)&&(!!function(e){var t=0;if(null!=e&&"object"==typeof e&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(e,"accept")){if(!N(e.accept))return!1;t+=1}if(Object.prototype.hasOwnProperty.call(e,"reject")){if(!N(e.reject))return!1;t+=1}return 0<t&&2>=t}return!1}(e[0])&&(Array.isArray(e[1])?e[1].every(B):B(e[1])))}function M(e){return E(e)||_(e)}function U(e,t){if(!D(e))return!1;if(e=I(e),t=null!==(t=/^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(t))?t.slice(1,6):void 0,e&&t){if(!function(e,t){if(t=t.split("."),e=e.split("."),t&&e){if(t.length!==e.length)return!1;for(var n=0;n<e.length;n++)if(!R(t[n],e[n]))return!1;return!0}return!1}(e[0],t[0]))return!1;for(var n=1;5>n;n++)if(!R(e[n],t[n]))return!1;return!0}return!1}function R(e,t){return e&&t&&"*"===e||e===t}function V(e){return Array.isArray(e)?e:[e]}function z(e,t,n,r){var o;return e=V(e).map((function(e){e:if(L(e))e=[e];else{if(j(e)){t:{var o=void 0;try{if(o=e({event:t,eventType:n,eventSchema:r}),Array.isArray(o)&&o.every(L)||L(o)){var i=o;break t}i=void 0;break t}catch(e){}i=void 0}if(L(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 H(e){void 0===e&&(e={});var t=e.base64,n=e.corePlugins,r=null!=n?n:[];e=function(e,t,n){function r(e,t){e=i.getApplicableContexts(e);var n=[];return t&&t.length&&n.push.apply(n,t),e&&e.length&&n.push.apply(n,e),n}var o=function(e){return{addPluginContexts:function(t){var n=null!=t?t:[];return e.forEach((function(e){try{e.contexts&&n.push.apply(n,e.contexts())}catch(e){console.warn("Snowplow: error with plugin context",e)}})),n}}}(t),i=C(),a=e,u={};return{track:function(e,i,c){e.withJsonProcessor(function(e){return function(t,n){for(var r=0;r<n.length;r++){var o=n[r],i=JSON.stringify(o[2]);e?t.add(o[0],T(i)):t.add(o[1],i)}n.length=0}}(a)),e.add("eid",ge.v4()),e.addDict(u),c=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()}}(c),e.add(c.type,c.value.toString()),void 0!==(i=(i=r(e,o.addPluginContexts(i)))&&i.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:i}:void 0)&&e.addJson("cx","co",i),t.forEach((function(t){try{t.beforeTrack&&t.beforeTrack(e)}catch(e){console.warn("Snowplow: error with plugin beforeTrack",e)}})),"function"==typeof n&&n(e);var s=e.build();return t.forEach((function(e){try{e.afterTrack&&e.afterTrack(s)}catch(e){console.warn("Snowplow: error with plugin ",e)}})),s},addPayloadPair:function(e,t){u[e]=t},getBase64Encoding:function(){return a},setBase64Encoding:function(e){a=e},addPayloadDict:function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(u[t]=e[t])},resetPayloadPairs:function(e){u=O(e)?e:{}},setTrackerVersion:function(e){u.tv=e},setTrackerNamespace:function(e){u.tna=e},setAppId:function(e){u.aid=e},setPlatform:function(e){u.p=e},setUserId:function(e){u.uid=e},setScreenResolution:function(e,t){u.res=e+"x"+t},setViewport:function(e,t){u.vp=e+"x"+t},setColorDepth:function(e){u.cd=e},setTimezone:function(e){u.tz=e},setLang:function(e){u.lang=e},setIpAddress:function(e){u.ip=e},setUseragent:function(e){u.ua=e},addGlobalContexts:function(e){i.addGlobalContexts(e)},clearGlobalContexts:function(){i.clearGlobalContexts()},removeGlobalContexts:function(e){i.removeGlobalContexts(e)}}}(null==t||t,r,e.callback);var o=ie(ie({},e),{addPlugin:function(e){var t;r.push(e),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,o)}});return null==r||r.forEach((function(e){var t;null===(t=e.activateCorePlugin)||void 0===t||t.call(e,o)})),o}function J(e){var t=e.pageUrl,n=e.pageTitle;e=e.referrer;var r=x();return r.add("e","pv"),r.add("url",t),r.add("page",n),r.add("refr",e),r}function F(e){var t=e.pageUrl,n=e.pageTitle,r=e.referrer,o=e.minXOffset,i=e.maxXOffset,a=e.minYOffset;e=e.maxYOffset;var u=x();return u.add("e","pp"),u.add("url",t),u.add("page",n),u.add("refr",r),o&&!isNaN(Number(o))&&u.add("pp_mix",o.toString()),i&&!isNaN(Number(i))&&u.add("pp_max",i.toString()),a&&!isNaN(Number(a))&&u.add("pp_miy",a.toString()),e&&!isNaN(Number(e))&&u.add("pp_may",e.toString()),u}function G(){try{return!!be.localStorage}catch(e){return!0}}function W(){if(!G())return!1;try{return be.localStorage.setItem("modernizr","modernizr"),be.localStorage.removeItem("modernizr"),!0}catch(e){return!1}}function X(){if("innerWidth"in be)var e=be.innerWidth,t=be.innerHeight;else e=(t=Se.documentElement||Se.body).clientWidth,t=t.clientHeight;return 0<=e&&0<=t?e+"x"+t:null}function q(){var e=Se.documentElement,t=Se.body,n=Math.max(e.clientWidth,e.offsetWidth,e.scrollWidth);return e=Math.max(e.clientHeight,e.offsetHeight,e.scrollHeight,t?Math.max(t.offsetHeight,t.scrollHeight):0),isNaN(n)||isNaN(e)?"":n+"x"+e}function Q(e,n,r,o,i,a,u,c,l,f,p){function g(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);127>=r?t+=1:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,n++):t=65535>r?t+3:t+4}return t}function v(e){for(void 0===e&&(e=!1);k.length&&"string"!=typeof k[0]&&"object"!=typeof k[0];)k.shift();if(1>k.length)S=!1;else{if(!t(b))throw"No collector configured";if(S=!0,C){var n=function(e){for(var t=0,n=0;t<e.length&&!((n+=e[t].bytes)>=u);)t+=1;return t},o=void 0;if(L(k))var i=h(o=b,!0,e),a=n(k);else o=w(k[0]),i=h(o,!1,e),a=1;var c=setTimeout((function(){i.abort(),S=!1}),f),s=function(e){for(var t=0;t<e;t++)k.shift();r&&d(D,JSON.stringify(k.slice(0,l))),v()};if(i.onreadystatechange=function(){4===i.readyState&&200<=i.status&&400>i.status?(clearTimeout(c),s(a)):4===i.readyState&&400<=i.status&&(clearTimeout(c),S=!1)},L(k)){if(0<(n=k.slice(0,a)).length){if(e=!1,n=n.map((function(e){return e.evt})),O){var g=new Blob([m(y(n))],{type:"application/json"});try{e=navigator.sendBeacon(o,g)}catch(t){e=!1}}!0===e?s(a):i.send(m(y(n)))}}else i.send()}else if(p||L(k))S=!1;else{o=new Image(1,1);var T=!0;o.onload=function(){T&&(T=!1,k.shift(),r&&d(D,JSON.stringify(k.slice(0,l))),v())},o.onerror=function(){T&&(S=T=!1)},o.src=w(k[0]),setTimeout((function(){T&&S&&(T=!1,v())}),f)}}}function h(e,t,n){var r=new XMLHttpRequest;return t?(r.open("POST",e,!n),r.setRequestHeader("Content-Type","application/json; charset=UTF-8")):r.open("GET",e,!n),r.withCredentials=!0,p&&r.setRequestHeader("SP-Anonymous","*"),r}function m(e){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",data:e})}function y(e){for(var t=(new Date).getTime().toString(),n=0;n<e.length;n++)e[n].stm=t;return e}function w(e){return c?b+e.replace("?","?stm="+(new Date).getTime()+"&"):b+e}var b,S=!1,k=[];o="string"==typeof o?o.toLowerCase():o;var T=window.localStorage,x=window.navigator,A=null===o||!0===o||"beacon"===o||"true"===o,O=!(!(A&&x&&x.sendBeacon)||function(e){return function(e,t){return!(!(t=t.match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/"))||!t.length)&&parseInt(t[0])<=13}(0,e)||function(e,t,n){return!(!(n=n.match("(Macintosh;.*Mac OS X (d+)_(d+)[_d]*.*) AppleWebKit/"))||!n.length)&&(parseInt(n[0])<=e||parseInt(n[0])===e&&parseInt(n[1])<=t)}(10,15,e)&&function(e){return e.match("Version/.* Safari/")&&!e.match("Chrom(e|ium)")}(e)}(x.userAgent))&&A,C=!(!window.XMLHttpRequest||!("withCredentials"in new XMLHttpRequest)),P="get"!==o&&C&&("post"===o||A),I=P?i:"/i",D="snowplowOutQueue_"+e+"_"+(P?"post2":"get");if(a=W()&&r&&P&&a||1,r)try{var N=T.getItem(D);k=N?JSON.parse(N):[]}catch(e){}Array.isArray(k)||(k=[]),n.outQueues.push(k),C&&1<a&&n.bufferFlushers.push((function(e){S||v(e)}));var L=function(e){return"object"==typeof e[0]};return{enqueueRequest:function(e,t){if(b=t+I,P){if((e=function(e){var t=Object.keys(e).map((function(t){return[t,e[t]]})).reduce((function(e,t){return e[t[0]]=t[1].toString(),e}),{});return{evt:t,bytes:g(JSON.stringify(t))}}(e)).bytes>=u)return s("Event ("+e.bytes+"B) too big, max is "+u),void h(b,!0,!1).send(m(y([e.evt])));k.push(e)}else k.push(function(e){var t,n="?",r={co:!0,cx:!0},o=!0;for(t in e)e.hasOwnProperty(t)&&!r.hasOwnProperty(t)&&(o?o=!1:n+="&",n+=encodeURIComponent(t)+"="+encodeURIComponent(e[t]));for(var i in r)e.hasOwnProperty(i)&&r.hasOwnProperty(i)&&(n+="&"+i+"="+encodeURIComponent(e[i]));return n}(e));e=!1,r&&(e=d(D,JSON.stringify(k.slice(0,l)))),S||e&&!(k.length>=a)||v()},executeQueue:function(){S||v()},setUseLocalStorage:function(e){r=e},setAnonymousTracking:function(e){p=e},setCollectorUrl:function(e){b=e+I},setBufferSize:function(e){a=e}}}function Y(e,t,n){return"translate.googleusercontent.com"===e?(""===n&&(n=t),e=o(t=null!=(e=(e=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(t))&&1<(null==e?void 0:e.length)?c("u",e[1]):null)?e:"")):"cc.bingj.com"!==e&&"webcache.googleusercontent.com"!==e||(e=o(t=document.links[0].href)),[e,t,n]}function Z(e,t,h,y,w,b){var S;void 0===b&&(b={}),e=function(e,t,h,y,w,b){function S(){(Fe=Y(Re.location.hostname,Re.location.href,a()))[1]!==We&&(Xe=a(We)),Ge=i(Fe[0]),We=Fe[1]}function k(e){var t=(new Date).getTime();null!=(e=e.target)&&e.href&&(e.href=l(e.href,"_sp",Be+"."+t))}function T(e){for(var t=0;t<Ue.links.length;t++){var n=Ue.links[t];!n.spDecorationEnabled&&e(n)&&(u(n,"click",k,!0),u(n,"mousedown",k,!0),n.spDecorationEnabled=!0)}}function x(e){if(Ae){var t=/#.*/;e=e.replace(t,"")}return Oe&&(t=/[{}]/g,e=e.replace(t,"")),e}function A(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function O(e){return e=et+e+"."+je,"localStorage"==dt?f(e):"cookie"==dt||"cookieAndLocalStorage"==dt?m(e):void 0}function C(){S(),je=we((tt||Ge)+(nt||"/")).slice(0,4)}function P(){Pe=(new Date).getTime()}function I(){var e=D(),t=e[0];t<Ie?Ie=t:t>De&&(De=t),(e=e[1])<Ne?Ne=e:e>Le&&(Le=e),P()}function D(){var e=Ue.compatMode&&"BackCompat"!==Ue.compatMode?Ue.documentElement:Ue.body;return[e.scrollLeft||Re.pageXOffset,e.scrollTop||Re.pageYOffset]}function N(){var e=D(),t=e[0];De=Ie=t,Le=Ne=e=e[1]}function L(){B(et+"ses."+je,"*",ct)}function j(e,t,n,r,o,i){B(et+"id."+je,e+"."+t+"."+n+"."+r+"."+o+"."+i,ut)}function B(e,t,n){ft&&!st||("localStorage"==dt?d(e,t,n):("cookie"==dt||"cookieAndLocalStorage"==dt)&&m(e,t,n,nt,tt,rt,ot))}function E(){var e=et+"id."+je,t=et+"ses."+je;p(e),p(t),v(e,tt,rt,ot),v(t,tt,rt,ot)}function _(){if(!ft||st){var e="none"!=dt&&!!O("ses"),t=M();t[1]?Be=t[1]:(Be=ft?"":ge.v4(),t[1]=Be),Ee=t[6],e||(t[3]++,Ee=ge.v4(),t[6]=Ee,t[5]=t[4]),"none"!=dt&&(L(),t[4]=Math.round((new Date).getTime()/1e3),t.shift(),j.apply(null,t))}}function M(){if("none"==dt)return[];var e=Math.round((new Date).getTime()/1e3),t=O("id");return t?(e=t.split(".")).unshift("0"):e=["1",Be,e,0,e,""],e[6]||(e[6]=ge.v4()),e}function U(e){return 0===e.indexOf("http")?e:("https:"===Ue.location.protocol?"https":"http")+"://"+e}function R(){ht&&null!=w.pageViewId||(w.pageViewId=ge.v4())}function V(){return null==w.pageViewId&&(w.pageViewId=ge.v4()),w.pageViewId}function z(e,t,n){var r=function(e,t){S(),e({context:t,pageViewId:V(),minXOffset:Ie,minYOffset:Ne,maxXOffset:De,maxYOffset:Le}),N()},o=function(){Pe+e.configHeartBeatTimer>(new Date).getTime()&&r(e.callback,(t||[]).concat(n?n():[]))};e.activityInterval=0!=e.configMinimumVisitLength?Re.setTimeout((function(){Pe+e.configMinimumVisitLength>(new Date).getTime()&&r(e.callback,(t||[]).concat(n?n():[])),e.activityInterval=Re.setInterval(o,e.configHeartBeatTimer)}),e.configMinimumVisitLength):Re.setInterval(o,e.configHeartBeatTimer)}function G(e){var t=e.minimumVisitLength,r=e.heartbeatDelay;if(e=e.callback,n(t)&&n(r))return{configMinimumVisitLength:1e3*t,configHeartBeatTimer:1e3*r,callback:e};s("Activity tracking not enabled, please provide integer values for minimumVisitLength and heartbeatDelay.")}function W(e){var t=e.context,n=e.minXOffset,o=e.minYOffset,i=e.maxXOffset;e=e.maxYOffset;var a=Ue.title;a!==Ke&&(Ke=a,xe=void 0),Me.track(F({pageUrl:x(Te||We),pageTitle:r(xe||Ke),referrer:x(ke||Xe),minXOffset:Math.round(n),maxXOffset:Math.round(i),minYOffset:Math.round(o),maxYOffset:Math.round(e)}),t)}var Z,K,$,ee,te,ne,re,oe,ae,ue,ce,se,le,fe,de,pe,ve,he,me;b.eventMethod=null!==(Z=b.eventMethod)&&void 0!==Z?Z:"post";var ye=function(e){var t;return null!==(t=e.stateStorageStrategy)&&void 0!==t?t:"cookieAndLocalStorage"},be=function(e){var t,n;return"boolean"!=typeof e.anonymousTracking&&(null!==(n=!0===(null===(t=e.anonymousTracking)||void 0===t?void 0:t.withSessionTracking))&&void 0!==n&&n)},Se=function(e){var t,n;return"boolean"!=typeof e.anonymousTracking&&(null!==(n=!0===(null===(t=e.anonymousTracking)||void 0===t?void 0:t.withServerAnonymisation))&&void 0!==n&&n)};b.plugins=null!==(K=b.plugins)&&void 0!==K?K:[],(null===(ee=null===($=null==b?void 0:b.contexts)||void 0===$?void 0:$.webPage)||void 0===ee||ee)&&b.plugins.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:V()}}]}});var ke,Te,xe,Ae,Oe,Ce,Pe,Ie,De,Ne,Le,je,Be,Ee,_e,Me=H({base64:b.encodeBase64,corePlugins:b.plugins,callback:function(e){var t=Math.round((new Date).getTime()/1e3),n=O("ses"),r=M(),o=r[0],i=r[1],a=r[2],u=r[3],c=r[4],s=r[5];r=r[6];var l=!!Ce&&!!m(Ce);at||l?E():("0"===o?(Ee=r,n||"none"==dt||(u++,s=c,Ee=ge.v4()),gt=u):(new Date).getTime()-pt>1e3*ct&&(Ee=ge.v4(),gt++),e.add("vp",X()),e.add("ds",q()),e.add("vid",st?gt:ft?null:gt),e.add("sid",st?Ee:ft?null:Ee),e.add("duid",ft?null:i),e.add("uid",ft?null:_e),S(),e.add("refr",x(ke||Xe)),e.add("url",x(Te||We)),"none"!=dt&&(j(i,a,gt,t,s,Ee),L()),pt=(new Date).getTime()),t=!!Ce&&!!m(Ce),at||t||vt.enqueueRequest(e.build(),Qe)}}),Ue=document,Re=window,Ve=navigator,ze=screen,He=Ve.userLanguage||Ve.language,Je=Ue.characterSet||Ue.charset,Fe=Y(Re.location.hostname,Re.location.href,a()),Ge=i(Fe[0]),We=Fe[1],Xe=Fe[2],qe=null!==(te=b.platform)&&void 0!==te?te:"web",Qe=U(y),Ye=null!==(ne=b.postPath)&&void 0!==ne?ne:"/com.snowplowanalytics.snowplow/tp2",Ze=null!==(re=b.appId)&&void 0!==re?re:"",Ke=Ue.title,$e=null===(oe=b.resetActivityTrackingOnPageView)||void 0===oe||oe,et=null!==(ae=b.cookieName)&&void 0!==ae?ae:"_sp_",tt=null!==(ue=b.cookieDomain)&&void 0!==ue?ue:void 0,nt="/",rt=null!==(ce=b.cookieSameSite)&&void 0!==ce?ce:"None",ot=null===(se=b.cookieSecure)||void 0===se||se,it=Ve.doNotTrack||Ve.msDoNotTrack||Re.doNotTrack,at=void 0!==b.respectDoNotTrack&&(b.respectDoNotTrack&&("yes"===it||"1"===it)),ut=null!==(le=b.cookieLifetime)&&void 0!==le?le:63072e3,ct=null!==(fe=b.sessionCookieTimeout)&&void 0!==fe?fe:1800,st=be(b),lt=Se(b),ft=!!b.anonymousTracking,dt=ye(b),pt=(new Date).getTime(),gt=1,vt=Q(e,w,"localStorage"==dt||"cookieAndLocalStorage"==dt,b.eventMethod,Ye,null!==(de=b.bufferSize)&&void 0!==de?de:1,null!==(pe=b.maxPostBytes)&&void 0!==pe?pe:4e4,null===(ve=b.useStm)||void 0===ve||ve,null!==(he=b.maxLocalStorageQueueSize)&&void 0!==he?he:1e3,null!==(me=b.connectionTimeout)&&void 0!==me?me:5e3,lt),ht=!1,mt=!1,yt={enabled:!1,installed:!1,configurations:{}};return b.hasOwnProperty("discoverRootDomain")&&b.discoverRootDomain&&(tt=g(rt,ot)),Me.setTrackerVersion(h),Me.setTrackerNamespace(t),Me.setAppId(Ze),Me.setPlatform(qe),Me.addPayloadPair("cookie",Ve.cookieEnabled?"1":"0"),Me.addPayloadPair("cs",Je),Me.addPayloadPair("lang",He),Me.addPayloadPair("res",ze.width+"x"+ze.height),Me.addPayloadPair("cd",ze.colorDepth),C(),_(),b.crossDomainLinker&&T(b.crossDomainLinker),ie(ie({},{getDomainSessionIndex:function(){return gt},getPageViewId:function(){return V()},newSession:function(){var e=Math.round((new Date).getTime()/1e3),t=M(),n=t[1],r=t[2],o=t[3],i=t[4],a=t[5],u=t[6];"0"===t[0]?(Ee=u,"none"!=dt&&(o++,a=i,Ee=ge.v4()),gt=o,L()):(Ee=ge.v4(),gt++),"none"!=dt&&(j(n,r,gt,e,a,Ee),L()),pt=(new Date).getTime()},getCookieName:function(e){return et+e+"."+je},getUserId:function(){return _e},getDomainUserId:function(){return M()[1]},getDomainUserInfo:function(){return M()},setReferrerUrl:function(e){ke=e},setCustomUrl:function(e){S();var t,n=We;A(e)?Te=e:"/"===e.slice(0,1)?Te=A(n)+"://"+o(n)+e:(0<=(t=(n=x(n)).indexOf("?"))&&(n=n.slice(0,t)),(t=n.lastIndexOf("/"))!==n.length-1&&(n=n.slice(0,t+1)),Te=n+e)},setDocumentTitle:function(e){Ke=Ue.title,xe=e},discardHashTag:function(e){Ae=e},discardBrace:function(e){Oe=e},setCookiePath:function(e){nt=e,C()},setVisitorCookieTimeout:function(e){ut=e},crossDomainLinker:function(e){T(e)},enableActivityTracking:function(e){yt.enabled=!0,yt.configurations.pagePing=G(ie(ie({},e),{callback:W}))},enableActivityTrackingCallback:function(e){yt.enabled=!0,yt.configurations.callback=G(e)},updatePageActivity:function(){P()},setOptOutCookie:function(e){Ce=e},setUserId:function(e){_e=e},setUserIdFromLocation:function(e){S(),_e=c(e,We)},setUserIdFromReferrer:function(e){S(),_e=c(e,Xe)},setUserIdFromCookie:function(e){_e=m(e)},setCollectorUrl:function(e){Qe=U(e),vt.setCollectorUrl(Qe)},setBufferSize:function(e){vt.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={}),vt.executeQueue(),e.newBufferSize&&vt.setBufferSize(e.newBufferSize)},trackPageView:function(e){void 0===e&&(e={}),function(e){var t=e.title,n=e.context,o=e.timestamp;if(e=e.contextCallback,S(),mt&&R(),mt=!0,Ke=Ue.title,t=r((xe=t)||Ke),Me.track(J({pageUrl:x(Te||We),pageTitle:t,referrer:x(ke||Xe)}),(n||[]).concat(e?e():[]),o),o=new Date,t=!1,yt.enabled&&!yt.installed){t=yt.installed=!0;var i={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),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")?u(Ue,a,P,{passive:!0}):u(Ue,a,P),N(),a=function(e,t){return void 0===t&&(t=P),function(e){return u(Ue,e,t)}},"click mouseup mousedown mousemove keypress keydown keyup".split(" ").forEach(a(Ue)),["resize","focus","blur"].forEach(a(Re)),a(Re,I)("scroll")}if(yt.enabled&&($e||t))for(o in Pe=o.getTime(),o=void 0,yt.configurations)(t=yt.configurations[o])&&(window.clearInterval(t.activityInterval),z(t,n,e))}(e)},preservePageViewId:function(){ht=!0},disableAnonymousTracking:function(e){e&&e.stateStorageStrategy?(b.stateStorageStrategy=e.stateStorageStrategy,b.anonymousTracking=!1,dt=ye(b)):b.anonymousTracking=!1,ft=!!b.anonymousTracking,st=be(b),lt=Se(b),vt.setUseLocalStorage("localStorage"==dt||"cookieAndLocalStorage"==dt),vt.setAnonymousTracking(lt),_(),vt.executeQueue()},enableAnonymousTracking:function(e){b.anonymousTracking=e&&(null==e?void 0:e.options)||!0,ft=!!b.anonymousTracking,st=be(b),lt=Se(b),st||R(),vt.setAnonymousTracking(lt)},clearUserData:E}),{id:e,core:Me,sharedState:w})}(e,t,h,y,w,b);var k=ie(ie({},e),{addPlugin:function(e){var t,n;null===(t=b.plugins)||void 0===t||t.push(e),null===(n=e.activateBrowserPlugin)||void 0===n||n.call(e,k)}});return null===(S=b.plugins)||void 0===S||S.forEach((function(e){var t;null===(t=e.activateBrowserPlugin)||void 0===t||t.call(e,k)})),k}function K(e){return ee(e,ke)}function $(){return Object.keys(ke)}function ee(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r];t.hasOwnProperty(o)?n.push(t[o]):s(o+" not configured")}return n}for(var te=window,ne=document,re=window.localStorage,oe=window.sessionStorage,ie=function(){return(ie=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ae=S((function(e){var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=Array(16);e.exports=function(){for(var e,t=0;16>t;t++)0==(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}})),ue=[],ce=0;256>ce;++ce)ue[ce]=(ce+256).toString(16).substr(1);var se,le,fe=function(e,t){return t=t||0,[ue[e[t++]],ue[e[t++]],ue[e[t++]],ue[e[t++]],"-",ue[e[t++]],ue[e[t++]],"-",ue[e[t++]],ue[e[t++]],"-",ue[e[t++]],ue[e[t++]],"-",ue[e[t++]],ue[e[t++]],ue[e[t++]],ue[e[t++]],ue[e[t++]],ue[e[t++]]].join("")},de=0,pe=0;(ce=function(e,t,n){if(n=t&&n||0,"string"==typeof e&&(t="binary"===e?Array(16):null,e=null),(e=(e=e||{}).random||(e.rng||ae)())[6]=15&e[6]|64,e[8]=63&e[8]|128,t)for(var r=0;16>r;++r)t[n+r]=e[r];return t||fe(e)}).v1=function(e,t,n){n=t&&n||0;var r=t||[],o=(e=e||{}).node||se,i=void 0!==e.clockseq?e.clockseq:le;if(null==o||null==i){var a=ae();null==o&&(o=se=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==i&&(i=le=16383&(a[6]<<8|a[7]))}a=void 0!==e.msecs?e.msecs:(new Date).getTime();var u=void 0!==e.nsecs?e.nsecs:pe+1,c=a-de+(u-pe)/1e4;if(0>c&&void 0===e.clockseq&&(i=i+1&16383),(0>c||a>de)&&void 0===e.nsecs&&(u=0),1e4<=u)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");for(de=a,pe=u,le=i,e=(1e4*(268435455&(a+=122192928e5))+u)%4294967296,r[n++]=e>>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e,e=a/4294967296*1e4&268435455,r[n++]=e>>>8&255,r[n++]=255&e,r[n++]=e>>>24&15|16,r[n++]=e>>>16&255,r[n++]=i>>>8|128,r[n++]=255&i,i=0;6>i;++i)r[n+i]=o[i];return t||fe(r)};var ge=ce.v4=ce,ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",he=S((function(e){var t;t={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&t.rotl(e,8)|4278255360&t.rotl(e,24);for(var n=0;n<e.length;n++)e[n]=t.endian(e[n]);return e},randomBytes:function(e){for(var t=[];0<e;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var r=e[n]<<16|e[n+1]<<8|e[n+2],o=0;4>o;o++)8*n+6*o<=8*e.length?t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>>6*(3-o)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,r=0;n<e.length;r=++n%4)0!=r&&t.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(n-1))&Math.pow(2,-2*r+8)-1)<<2*r|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(n))>>>6-2*r);return t}},e.exports=t})),me={utf8:{stringToBytes:function(e){return me.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(me.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},ye=me,we=S((function(e){var t,n,r,o;t=ye.utf8,n=ye.bin,r=function(e){e.constructor==String?e=t.stringToBytes(e):"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());var n=he.bytesToWords(e),r=8*e.length;e=[];var o=1732584193,i=-271733879,a=-1732584194,u=271733878,c=-1009589776;for(n[r>>5]|=128<<24-r%32,n[15+(r+64>>>9<<4)]=r,r=0;r<n.length;r+=16){for(var s=o,l=i,f=a,d=u,p=c,g=0;80>g;g++){if(16>g)e[g]=n[r+g];else{var v=e[g-3]^e[g-8]^e[g-14]^e[g-16];e[g]=v<<1|v>>>31}v=(o<<5|o>>>27)+c+(e[g]>>>0)+(20>g?1518500249+(i&a|~i&u):40>g?1859775393+(i^a^u):60>g?(i&a|i&u|a&u)-1894007588:(i^a^u)-899497514),c=u,u=a,a=i<<30|i>>>2,i=o,o=v}o+=s,i+=l,a+=f,u+=d,c+=p}return[o,i,a,u,c]},(o=function(e,t){return e=he.wordsToBytes(r(e)),t&&t.asBytes?e:t&&t.asString?n.bytesToString(e):he.bytesToHex(e)})._blocksize=16,o._digestsize=20,e.exports=o})),be=window,Se=document,ke={},Te=function(){this.outQueues=[],this.bufferFlushers=[],this.hasLoaded=!1,this.registeredOnLoadHandlers=[]};e.SharedState=Te,e.addEventListener=u,e.addTracker=function(e,t,n,r,o,i){return ke.hasOwnProperty(e)?null:(ke[e]=Z(e,t,n,r,o,i),ke[e])},e.allTrackerNames=$,e.allTrackers=function(){return ke},e.attemptDeleteLocalStorage=p,e.attemptGetLocalStorage=f,e.attemptGetSessionStorage=function(e){try{return oe.getItem(e)}catch(e){}},e.attemptWriteLocalStorage=d,e.attemptWriteSessionStorage=function(e,t){try{return oe.setItem(e,t),!0}catch(e){return!1}},e.cookie=m,e.createSharedState=function(){function e(){var e;if(!r.hasLoaded)for(r.hasLoaded=!0,e=0;e<r.registeredOnLoadHandlers.length;e++)r.registeredOnLoadHandlers[e]();return!0}var t=document,n=window,r=new Te;return document.visibilityState&&u(t,"visibilitychange",(function(){"hidden"==t.visibilityState&&r.bufferFlushers.forEach((function(e){e(!1)}))}),!1),u(n,"beforeunload",(function(){r.bufferFlushers.forEach((function(e){e(!1)}))}),!1),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())})),u(n,"load",e,!1),r},e.decorateQuerystring=l,e.deleteCookie=v,e.detectDocumentSize=q,e.detectViewport=X,e.dispatchToTrackers=function(e,t){try{K(null!=e?e:$()).forEach(t)}catch(e){s("function failed")}},e.dispatchToTrackersInCollection=function(e,t,n){try{ee(null!=e?e:Object.keys(t),t).forEach(n)}catch(e){s("function failed")}},e.findRootDomain=g,e.fixupDomain=i,e.fixupTitle=r,e.fixupUrl=Y,e.fromQuerystring=c,e.getCookiesWithPrefix=h,e.getCssClasses=y,e.getFilterByClass=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var t=Object.prototype.hasOwnProperty.call(e,"allowlist"),n=b(e);return w(e,(function(e){e:{var r=0;for(e=y(e);r<e.length;r++)if(n[e[r]]){r=!0;break e}r=!1}return r===t}))},e.getFilterByName=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var t=e.hasOwnProperty("allowlist"),n=b(e);return w(e,(function(e){return e.name in n===t}))},e.getHostName=o,e.getReferrer=a,e.getTracker=function(e){return ke.hasOwnProperty(e)?ke[e]:(s(e+" not configured"),null)},e.getTrackers=K,e.hasLocalStorage=G,e.hasSessionStorage=function(){try{return!!be.sessionStorage}catch(e){return!0}},e.isFunction=function(e){return!(!e||"function"!=typeof e)},e.isInteger=n,e.isString=t,e.isValueInArray=function(e,t){for(var n=0;n<t.length;n++)if(t[n]===e)return!0;return!1},e.localStorageAccessible=W,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 ke.hasOwnProperty(e)},e.warn=s,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.umd.min.js.map |
{ | ||
"name": "@snowplow/browser-tracker-core", | ||
"version": "3.0.0-alpha.3", | ||
"version": "3.0.0-alpha.4", | ||
"description": "Core functionality for Snowplow Browser trackers", | ||
@@ -24,11 +24,11 @@ "homepage": "http://bit.ly/sp-js", | ||
"dependencies": { | ||
"@snowplow/tracker-core": "3.0.0-alpha.3", | ||
"@snowplow/tracker-core": "3.0.0-alpha.4", | ||
"sha1": "^1.1.1", | ||
"tslib": "^2.0.3", | ||
"uuid": "^3.3.3" | ||
"tslib": "^2.1.0", | ||
"uuid": "^3.4.0" | ||
}, | ||
"devDependencies": { | ||
"@ampproject/rollup-plugin-closure-compiler": "^0.26.0", | ||
"@rollup/plugin-commonjs": "^17.0.0", | ||
"@rollup/plugin-node-resolve": "^11.0.0", | ||
"@rollup/plugin-commonjs": "^17.1.0", | ||
"@rollup/plugin-node-resolve": "^11.2.0", | ||
"@types/jest": "^26.0.20", | ||
@@ -46,3 +46,3 @@ "@types/jsdom": "^16.2.6", | ||
"jest-standard-reporter": "^2.0.0", | ||
"rollup": "^2.34.0", | ||
"rollup": "^2.41.1", | ||
"rollup-plugin-cleanup": "^3.2.1", | ||
@@ -52,4 +52,4 @@ "rollup-plugin-license": "^2.2.0", | ||
"ts-jest": "^26.5.0", | ||
"typescript": "^4.1.2" | ||
"typescript": "^4.2.3" | ||
} | ||
} |
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
1047427
8614
+ Added@snowplow/tracker-core@3.0.0-alpha.4(transitive)
- Removed@snowplow/tracker-core@3.0.0-alpha.3(transitive)
Updatedtslib@^2.1.0
Updateduuid@^3.4.0