@snowplow/browser-tracker-core
Advanced tools
Comparing version 3.13.0 to 3.13.1-dev.0
/*! | ||
* Core functionality for Snowplow Browser trackers v3.13.0 (http://bit.ly/sp-js) | ||
* Core functionality for Snowplow Browser trackers v3.13.1-dev.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 o,r=0,i=n.length;r<i;r++)!o&&r in n||(o||(o=Array.prototype.slice.call(n,0,r)),o[r]=n[r]);return e.concat(o||Array.prototype.slice.call(n))}function t(){var e,n={},t=[],o=[],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&&r(i)&&(e={keyIfEncoded:e,keyIfNotEncoded:n,json:i},o.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,o,i),n}}}function o(e){return function(t,o,r){for(var i=function(n,o,r){if(n=JSON.stringify(n),e){if(r=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,"_")}r.call(t,o,n)}else t.add(r,n)},a=function(n,o){if(!n){var r=t.getPayload();if(e?r.cx:r.co){var i=(n=JSON).parse;if(e){if(r=r.cx){switch(4-r.length%4){case 2:r+="==";break;case 3:r+="="}r=function(e){var n,t=0,o=0,r="",i=[];if(!e)return e;e+="";do{var a=ye.indexOf(e.charAt(t++)),c=ye.indexOf(e.charAt(t++));r=ye.indexOf(e.charAt(t++));var u=ye.indexOf(e.charAt(t++)),s=a<<18|c<<12|r<<6|u;a=s>>16&255,c=s>>8&255,s&=255,i[o++]=64===r?String.fromCharCode(a):64===u?String.fromCharCode(a,c):String.fromCharCode(a,c,s)}while(t<e.length);return r=i.join(""),n=r.replace(/\0+$/,""),decodeURIComponent(n.split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}(r=r.replace(/-/g,"+").replace(/_/g,"/"))}}else r=r.co;n=i.call(n,r)}else n=void 0}return n?n.data=n.data.concat(o.data):n=o,n},c=void 0,u=0;u<o.length;u++){var s=o[u];"cx"===s.keyIfEncoded?c=a(c,s.json):i(s.json,s.keyIfEncoded,s.keyIfNotEncoded)}o.length=0,r.length&&(c=a(c,o={schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:n([],r,!0)}),r.length=0),c&&i(c,"cx","co")}}function r(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 o=[],r=[],i=0;i<t.length;i++){var a=t[i];h(a)?o.push(a):g(a)&&r.push(a)}e=e.concat(r),n=n.concat(o)},clearGlobalContexts:function(){n=[],e=[]},removeGlobalContexts:function(t){for(var o=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)})))},r=0;r<t.length;r++)o(t[r])},getApplicableContexts:function(t){e:{for(var o=0,r=t.getJson();o<r.length;o++){var i=r[o];if("ue_px"===i.keyIfEncoded&&"object"==typeof i.json.data&&"string"==typeof(i=i.json.data.schema)){o=i;break e}}o=""}i="string"==typeof(r=t.getPayload().e)?r:"",r=[];var a=b(e,t,i,o);return r.push.apply(r,a),t=function(e,n,t,o){var r;return e=w(e).map((function(e){e:{if(p(e)){var r=e[0],i=!1;try{i=r({event:n.getPayload(),eventType:t,eventSchema:o})}catch(e){i=!1}if(!0===i){e=b(e[1],n,t,o);break e}}else if(v(e)&&function(e,n){var t=0,o=0,r=e.accept;return Array.isArray(r)?e.accept.some((function(e){return m(e,n)}))&&o++:"string"==typeof r&&m(r,n)&&o++,r=e.reject,Array.isArray(r)?e.reject.some((function(e){return m(e,n)}))&&t++:"string"==typeof r&&m(r,n)&&t++,0<o&&0===t}(e[0],o)){e=b(e[1],n,t,o);break e}e=[]}if(e&&0!==e.length)return e})),(r=[]).concat.apply(r,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}(n,t,i,o),r.push.apply(r,t),r}}}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!!(r(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 p(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 v(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 p(e)||v(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,o){var r;return e=w(e).map((function(e){e:if(f(e))e=[e];else{if(d(e)){n:{var r=void 0;try{if(r=e({event:n.getPayload(),eventType:t,eventSchema:o}),Array.isArray(r)&&r.every(f)||f(r)){var i=r;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})),(r=[]).concat.apply(r,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}function S(e){void 0===e&&(e={});var t,r,c,u,s,l,f,d=e.base64,g=e.corePlugins,p=null!=g?g:[];t=null==d||d,r=p,c=e.callback,u=function(e){return{addPluginContexts:function(t){var o=t?n([],t,!0):[];return e.forEach((function(e){try{e.contexts&&o.push.apply(o,e.contexts())}catch(e){we.error("Error adding plugin contexts",e)}})),o}}}(r),s=a(),l=t,f={};var v=ne(ne({},e={track:function(e,n,t){e.withJsonProcessor(o(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),r.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 r.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,p.push(e),null===(n=e.logger)||void 0===n||n.call(e,we),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,v)}});return null==p||p.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,v)})),v}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 o=window.localStorage,r=Date.now()+1e3*t;return o.setItem("".concat(e,".expires"),r.toString()),o.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 N(e){var n=window,t=L("referrer",n.location.href)||L("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 D(e,n,t,o){return e.addEventListener?(e.addEventListener(n,t,o),!0):e.attachEvent?e.attachEvent("on"+n,t):void(e["on"+n]=t)}function L(e,n){return(e=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(n))?decodeURIComponent(e[1].replace(/\+/g," ")):null}function _(e,n,t){t=n+"="+t;var o=(e=e.split("#"))[0].split("?"),r=o.shift();if(o=o.join("?")){for(var i=!0,a=o.split("&"),c=0;c<a.length;c++)if(a[c].substr(0,n.length+1)===n+"="){i=!1,a[c]=t,o=a.join("&");break}i&&(o=t+"&"+o)}else o=t;return e[0]=r+"?"+o,e.join("#")}function B(e,n){for(var t=window.location.hostname,o="_sp_root_domain_test_"+(new Date).getTime(),r="_test_value_"+(new Date).getTime(),i=t.split("."),a=i.length-2;0<=a;a--){var c=i.slice(a).join(".");if(R(o,r,0,"/",c,e,n),R(o)===r){for(U(o,c,e,n),t=M("_sp_root_domain_test_"),o=0;o<t.length;o++)U(t[o],c,e,n);return c}}return t}function U(e,n,t,o){R(e,"",-1,"/",n,t,o)}function M(e){for(var n=document.cookie.split("; "),t=[],o=0;o<n.length;o++)n[o].substring(0,e.length)===e&&t.push(n[o]);return t}function R(e,n,t,o,r,i,a){return 1<arguments.length?document.cookie=e+"="+encodeURIComponent(null!=n?n:"")+(t?"; Expires="+new Date(+new Date+1e3*t).toUTCString():"")+(o?"; Path="+o:"")+(r?"; Domain="+r:"")+(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)?L("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){var t=ne({memorizedVisitCount:1},n),o=t.memorizedVisitCount;n=t.configStateStorageStrategy;var r=t.configAnonymousTracking;return t=t.onSessionUpdateCallback,"0"===e[0]?(e[7]=e[6],e[5]=e[4],e[3]++):e[3]=o,o=me.v4(),e[6]=o,e[10]=0,e[8]="",e[9]=void 0,t&&t(Q(e,n,r)),o}function W(e){e[4]=Math.round((new Date).getTime()/1e3)}function Q(e,n,t){var o=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:o?new Date(o).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 o=document.documentElement,r=document.body;return t=Math.max(o.clientWidth,o.offsetWidth,o.scrollWidth),o=Math.max(o.clientHeight,o.offsetHeight,o.scrollHeight,r?Math.max(r.offsetHeight,r.scrollHeight):0),{viewport:e,documentSize:n(t=isNaN(t)||isNaN(o)?"":t+"x"+o),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,o,r,i,a){void 0===a&&(a={});var c=[];e=function(e,n,o,r,i,a){function u(){(an=G(window.location.hostname,window.location.href,N()))[1]!==un&&(sn=N(un)),cn=j(an[0]),un=an[1]}function s(e){var n=(new Date).getTime();null!=(e=e.currentTarget)&&e.href&&(e.href=_(e.href,"_sp",$e+"."+n))}function l(e){for(var n=0;n<document.links.length;n++){var t=document.links[n];!t.spDecorationEnabled&&e(t)&&(D(t,"click",s,!0),D(t,"mousedown",s,!0),t.spDecorationEnabled=!0)}}function f(e){if(Fe){var n=/#.*/;e=e.replace(n,"")}return Ge&&(n=/[{}]/g,e=e.replace(n,"")),e}function d(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function g(e){return e=hn+e+"."+Ke,"localStorage"==In?k(e):"cookie"==In||"cookieAndLocalStorage"==In?R(e):void 0}function p(){u(),Ke=xe((mn||cn)+(yn||"/")).slice(0,4)}function v(){We=(new Date).getTime()}function h(){var e=m(),n=e[0];n<Qe?Qe=n:n>Xe&&(Xe=n),(e=e[1])<Ze?Ze=e:e>Ye&&(Ye=e),v()}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];Xe=Qe=n,Ye=Ze=e=e[1]}function w(){M(hn+"ses."+Ke,"*",xn)}function b(e){var n=hn+"id."+Ke;e.shift(),M(n,e=e.join("."),Tn)}function M(e,n,t){On&&!An||("localStorage"==In?T(e,n,t):("cookie"==In||"cookieAndLocalStorage"==In)&&R(e,n,t,yn,mn,wn,bn))}function V(e){var n=hn+"id."+Ke,t=hn+"ses."+Ke;x(n),x(t),U(n,mn,wn,bn),U(t,mn,wn,bn),null!=e&&e.preserveSession||(en=me.v4(),En=1),null!=e&&e.preserveUser||($e=On?"":me.v4(),nn=null)}function z(e){e&&e.stateStorageStrategy&&(a.stateStorageStrategy=e.stateStorageStrategy,In=Be(a)),On=!!a.anonymousTracking,An=Ue(a),Cn=Me(a),jn.setUseLocalStorage("localStorage"==In||"cookieAndLocalStorage"==In),jn.setAnonymousTracking(Cn)}function H(){if(!On||An){var e="none"!=In&&!!g("ses"),n=J();if(n[1])var t=n[1];else t=On?"":me.v4(),n[1]=t;$e=t,en=e?n[6]:q(n,{configStateStorageStrategy:In,configAnonymousTracking:On,onSessionUpdateCallback:Bn}),En=n[3],"none"!=In&&(w(),W(n),b(n))}}function J(){return"none"==In?["1","",0,0,0,void 0,"","","",void 0,0]:function(e,n,t,o){var r=Math.round((new Date).getTime()/1e3);e?(e=e.split(".")).unshift("0"):e=["1",n,r,o,r,"",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],r),i(e[3],o),i(e[4],r),n(e[5]),e[6],e[7],e[8],n(e[9]),i(e[10],0)]}(g("id")||void 0,$e,en,En)}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"===In||On||!Ve)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,o=e.context,r=e.timestamp;if(e=e.contextCallback,u(),Dn&&Y(),Dn=!0,pn=document.title,n=P((Je=n)||pn),on.track(function(e){var n=e.pageUrl,o=e.pageTitle;e=e.referrer;var r=t();return r.add("e","pv"),r.add("url",n),r.add("page",o),r.add("refr",e),r}({pageUrl:f(He||un),pageTitle:n,referrer:f(ze||sn)}),(o||[]).concat(e?e():[]),r),r=new Date,n=!1,Ln.enabled&&!Ln.installed){n=Ln.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")?D(document,a,v,{passive:!0}):D(document,a,v),y(),a=function(e,n){return void 0===n&&(n=v),function(e){return D(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(Ln.enabled&&(vn||n))for(r in We=r.getTime(),r=void 0,Ln.configurations)(n=Ln.configurations[r])&&(window.clearInterval(n.activityInterval),te(n,o,e))}function te(e,n,t){var o=function(e,n){u(),e({context:n,pageViewId:K(),minXOffset:Qe,minYOffset:Ze,maxXOffset:Xe,maxYOffset:Ye}),y()},r=function(){We+e.configHeartBeatTimer>(new Date).getTime()&&o(e.callback,(n||[]).concat(t?t():[]))};e.activityInterval=0!=e.configMinimumVisitLength?window.setTimeout((function(){We+e.configMinimumVisitLength>(new Date).getTime()&&o(e.callback,(n||[]).concat(t?t():[])),e.activityInterval=window.setInterval(r,e.configHeartBeatTimer)}),e.configMinimumVisitLength):window.setInterval(r,e.configHeartBeatTimer)}function oe(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 re(e){var n=e.context,o=e.minXOffset,r=e.minYOffset,i=e.maxXOffset,a=e.maxYOffset;(e=document.title)!==pn&&(pn=e,Je=void 0);var c=(e=on).track,u=f(He||un),s=P(Je||pn),l=f(ze||sn);o=Math.round(o),i=Math.round(i),r=Math.round(r),a=Math.round(a);var d=t();d.add("e","pp"),d.add("url",u),d.add("page",s),d.add("refr",l),o&&!isNaN(Number(o))&&d.add("pp_mix",o.toString()),i&&!isNaN(Number(i))&&d.add("pp_max",i.toString()),r&&!isNaN(Number(r))&&d.add("pp_miy",r.toString()),a&&!isNaN(Number(a))&&d.add("pp_may",a.toString()),c.call(e,d,n)}var ie,ae,ce,ue,se,le,fe,de,ge,pe,ve,he,ye,be,Se,ke,Te,Ae,Ce,Oe,Ie,Pe,Ee,je,Ne,De,Le,_e;a.eventMethod=null!==(ie=a.eventMethod)&&void 0!==ie?ie:"post";var Be=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)},Me=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)},Re=null!==(ce=null===(ae=null==a?void 0:a.contexts)||void 0===ae?void 0:ae.browser)&&void 0!==ce&&ce,Ve=null===(se=null===(ue=null==a?void 0:a.contexts)||void 0===ue?void 0:ue.webPage)||void 0===se||se;c.push({beforeTrack:function(e){var n=g("ses"),t=J();if(tn=!!qe&&!!R(qe),kn||tn)V();else{"0"===t[0]?(en=n||"none"==In?t[6]:q(t,{configStateStorageStrategy:In,configAnonymousTracking:On,onSessionUpdateCallback:Bn}),En=t[3]):(new Date).getTime()-Pn>1e3*xn&&(En++,en=q(t,{configStateStorageStrategy:In,configAnonymousTracking:On,memorizedVisitCount:En,onSessionUpdateCallback:Bn})),W(t),0===t[10]&&(n=e.build(),t[8]=n.eid,n=n.dtm||n.ttm,t[9]=n?parseInt(n):void 0),t[10]+=1;var o=(n=X()).documentSize;e.add("vp",n.viewport),e.add("ds",o),e.add("vid",An?En:On?null:En),e.add("sid",An?en:On?null:en),e.add("duid",On?null:t[1]),e.add("uid",On?null:nn),u(),e.add("refr",f(ze||sn)),e.add("url",f(He||un)),!_n||On&&!An||(n=Q(t,In,On),e.addContextEntity({schema:"iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2",data:n})),"none"!=In&&(b(t),w()),Pn=(new Date).getTime()}}}),Ve&&c.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:K()}}]}}),Re&&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!==(le=a.plugins)&&void 0!==le?le:[]);var ze,He,Je,Fe,Ge,qe,We,Qe,Xe,Ze,Ye,Ke,$e,en,nn,tn,on=S({base64:a.encodeBase64,corePlugins:c,callback:function(e){kn||tn||jn.enqueueRequest(e.build(),fn)}}),rn=document.characterSet||document.charset,an=G(window.location.hostname,window.location.href,N()),cn=j(an[0]),un=an[1],sn=an[2],ln=null!==(fe=a.platform)&&void 0!==fe?fe:"web",fn=Z(r),dn=null!==(de=a.postPath)&&void 0!==de?de:"/com.snowplowanalytics.snowplow/tp2",gn=null!==(ge=a.appId)&&void 0!==ge?ge:"",pn=document.title,vn=null===(pe=a.resetActivityTrackingOnPageView)||void 0===pe||pe,hn=null!==(ve=a.cookieName)&&void 0!==ve?ve:"_sp_",mn=null!==(he=a.cookieDomain)&&void 0!==he?he:void 0,yn="/",wn=null!==(ye=a.cookieSameSite)&&void 0!==ye?ye:"None",bn=null===(be=a.cookieSecure)||void 0===be||be,Sn=navigator.doNotTrack||navigator.msDoNotTrack||window.doNotTrack,kn=void 0!==a.respectDoNotTrack&&(a.respectDoNotTrack&&("yes"===Sn||"1"===Sn)),Tn=null!==(Se=a.cookieLifetime)&&void 0!==Se?Se:63072e3,xn=null!==(ke=a.sessionCookieTimeout)&&void 0!==ke?ke:1800,An=Ue(a),Cn=Me(a),On=!!a.anonymousTracking,In=Be(a),Pn=(new Date).getTime(),En=1,jn=function(e,n,t,o,r,i,a,c,u,s,l,f,d,g,p,v){function h(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:m(JSON.stringify(n))}}function m(e){for(var n=0,t=0;t<e.length;t++){var o=e.charCodeAt(t);127>=o?n+=1:2047>=o?n+=2:55296<=o&&57343>=o?(n+=4,t++):n=65535>o?n+3:n+4}return n}function y(e){for(void 0===e&&(e=!1);E.length&&"string"!=typeof E[0]&&"object"!=typeof E[0];)E.shift();if(1>E.length)P=!1;else{if(!O(x))throw"No collector configured";if(P=!0,D){var n=function(e){for(var n=0,t=0;n<e.length&&!((t+=e[n].bytes)>=a);)n+=1;return n},o=void 0;if(M(E))var r=w(o=x,!0,e),i=n(E);else o=k(E[0]),r=w(o,!1,e),i=1;var c=setTimeout((function(){r.abort(),P=!1}),l),u=function(e){for(var n=0;n<e;n++)E.shift();t&&T(B,JSON.stringify(E.slice(0,s)))};if(r.onreadystatechange=function(){if(4===r.readyState&&200<=r.status)if(clearTimeout(c),300>r.status)u(i),y();else{var e=r.status;(e=!(200<=e&&300>e||!p.includes(e)&&v.includes(e)))||(we.error("Status ".concat(r.status,", will not retry.")),u(i)),P=!1}},M(E)){if(0<(n=E.slice(0,i)).length){if(e=!1,n=n.map((function(e){return e.evt})),N){var d=new Blob([b(S(n))],{type:"application/json"});try{e=navigator.sendBeacon(o,d)}catch(n){e=!1}}!0===e?(u(i),y()):r.send(b(S(n)))}}else r.send()}else if(f||M(E))P=!1;else{o=new Image(1,1);var g=!0;o.onload=function(){g&&(g=!1,E.shift(),t&&T(B,JSON.stringify(E.slice(0,s))),y())},o.onerror=function(){g&&(P=g=!1)},o.src=k(E[0]),setTimeout((function(){g&&P&&(g=!1,y())}),l)}}}function w(e,n,t){var o=new XMLHttpRequest;for(var r in n?(o.open("POST",e,!t),o.setRequestHeader("Content-Type","application/json; charset=UTF-8")):o.open("GET",e,!t),o.withCredentials=g,f&&o.setRequestHeader("SP-Anonymous","*"),d)Object.prototype.hasOwnProperty.call(d,r)&&o.setRequestHeader(r,d[r]);return o}function b(e){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",data:e})}function S(e){for(var n=(new Date).getTime().toString(),t=0;t<e.length;t++)e[t].stm=n;return e}function k(e){return u?x+e.replace("?","?stm="+(new Date).getTime()+"&"):x+e}var x,A,C,I,P=!1,E=[],j=!0===(o="string"==typeof o?o.toLowerCase():o)||"beacon"===o||"true"===o,N=!(!(j&&window.navigator&&window.navigator.sendBeacon)||(A=window.navigator.userAgent,(I=(I=A).match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/"))&&I.length&&parseInt(I[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,A)&&(C=A).match("Version/.* Safari/")&&!C.match("Chrom(e|ium)")))&&j,D=!(!window.XMLHttpRequest||!("withCredentials"in new XMLHttpRequest)),L="get"!==o&&D&&("post"===o||j),_=L?r:"/i",B="snowplowOutQueue_".concat(e,"_").concat(L?"post2":"get");if(j&&(d={}),i=t&&F()&&L&&i||1,t)try{var U=window.localStorage.getItem(B);E=U?JSON.parse(U):[]}catch(A){}Array.isArray(E)||(E=[]),n.outQueues.push(E),D&&1<i&&n.bufferFlushers.push((function(e){P||y(e)}));var M=function(e){return"object"==typeof e[0]};return{enqueueRequest:function(e,n){if(x=n+_,L){if((e=h(e)).bytes>=a)return we.warn("Event ("+e.bytes+"B) too big, max is "+a),n=e,void w(x,!0,!1).send(b(S([n.evt])));E.push(e)}else{var o,u="?",l={co:!0,cx:!0},f=!0;for(o in e)e.hasOwnProperty(o)&&!l.hasOwnProperty(o)&&(f?f=!1:u+="&",u+=encodeURIComponent(o)+"="+encodeURIComponent(e[o]));for(var d in l)e.hasOwnProperty(d)&&l.hasOwnProperty(d)&&(u+="&"+d+"="+encodeURIComponent(e[d]));if(0<c&&(l=m(l=k(u)))>=c)return we.warn("Event ("+l+"B) too big, max is "+c),void(D&&(e=h(e),w(n+r,!0,!1).send(b(S([e.evt])))));E.push(u)}n=!1,t&&(n=T(B,JSON.stringify(E.slice(0,s)))),P||n&&!(E.length>=i)||y()},executeQueue:function(){P||y()},setUseLocalStorage:function(e){t=e},setAnonymousTracking:function(e){f=e},setCollectorUrl:function(e){x=e+_},setBufferSize:function(e){i=e}}}(e,i,"localStorage"==In||"cookieAndLocalStorage"==In,a.eventMethod,dn,null!==(Te=a.bufferSize)&&void 0!==Te?Te:1,null!==(Ae=a.maxPostBytes)&&void 0!==Ae?Ae:4e4,null!==(Ce=a.maxGetBytes)&&void 0!==Ce?Ce:0,null===(Oe=a.useStm)||void 0===Oe||Oe,null!==(Ie=a.maxLocalStorageQueueSize)&&void 0!==Ie?Ie:1e3,null!==(Pe=a.connectionTimeout)&&void 0!==Pe?Pe:5e3,Cn,null!==(Ee=a.customHeaders)&&void 0!==Ee?Ee:{},null===(je=a.withCredentials)||void 0===je||je,null!==(Ne=a.retryStatusCodes)&&void 0!==Ne?Ne:[],(null!==(De=a.dontRetryStatusCodes)&&void 0!==De?De:[]).concat([400,401,403,410,422])),Nn=!1,Dn=!1,Ln={enabled:!1,installed:!1,configurations:{}},_n=null!==(_e=null===(Le=a.contexts)||void 0===Le?void 0:Le.session)&&void 0!==_e&&_e,Bn=a.onSessionUpdateCallback;a.hasOwnProperty("discoverRootDomain")&&a.discoverRootDomain&&(mn=B(wn,bn));var Un=X(),Mn=Un.browserLanguage,Rn=Un.resolution,Vn=Un.colorDepth,zn=Un.cookiesEnabled;return on.setTrackerVersion(o),on.setTrackerNamespace(n),on.setAppId(gn),on.setPlatform(ln),on.addPayloadPair("cookie",zn?"1":"0"),on.addPayloadPair("cs",rn),on.addPayloadPair("lang",Mn),on.addPayloadPair("res",Rn),on.addPayloadPair("cd",Vn),p(),H(),a.crossDomainLinker&&l(a.crossDomainLinker),ne(ne({},{getDomainSessionIndex:function(){return En},getPageViewId:K,getTabId:$,newSession:function(){var e=J();"0"===e[0]?(en="none"!=In?q(e,{configStateStorageStrategy:In,configAnonymousTracking:On,onSessionUpdateCallback:Bn}):e[6],En=e[3],w()):(En++,en=q(e,{configStateStorageStrategy:In,configAnonymousTracking:On,memorizedVisitCount:En,onSessionUpdateCallback:Bn})),W(e),"none"!=In&&(b(e),w()),Pn=(new Date).getTime()},getCookieName:function(e){return hn+e+"."+Ke},getUserId:function(){return nn},getDomainUserId:function(){return J()[1]},getDomainUserInfo:function(){return J()},setReferrerUrl:function(e){ze=e},setCustomUrl:function(e){u();var n,t=un;d(e)?He=e:"/"===e.slice(0,1)?He=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)),He=t+e)},setDocumentTitle:function(e){pn=document.title,Je=e},discardHashTag:function(e){Fe=e},discardBrace:function(e){Ge=e},setCookiePath:function(e){yn=e,p()},setVisitorCookieTimeout:function(e){Tn=e},crossDomainLinker:function(e){l(e)},enableActivityTracking:function(e){Ln.configurations.pagePing||(Ln.enabled=!0,Ln.configurations.pagePing=oe(ne(ne({},e),{callback:re})))},enableActivityTrackingCallback:function(e){Ln.configurations.callback||(Ln.enabled=!0,Ln.configurations.callback=oe(e))},updatePageActivity:function(){v()},setOptOutCookie:function(e){qe=e},setUserId:function(e){nn=e},setUserIdFromLocation:function(e){u(),nn=L(e,un)},setUserIdFromReferrer:function(e){u(),nn=L(e,sn)},setUserIdFromCookie:function(e){nn=R(e)},setCollectorUrl:function(e){fn=Z(e),jn.setCollectorUrl(fn)},setBufferSize:function(e){jn.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={}),jn.executeQueue(),e.newBufferSize&&jn.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(),jn.executeQueue()},enableAnonymousTracking:function(e){var n;a.anonymousTracking=null===(n=e&&(null==e?void 0:e.options))||void 0===n||n,z(e),An||Y()},clearUserData:V}),{id:e,namespace:n,core:on,sharedState:i})}(e,n,o,r,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=[],o=0;o<e.length;o++){var r=e[o];n.hasOwnProperty(r)?t.push(n[r]):we.warn(r+" not configured")}return t}var ne=function(){return ne=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},ne.apply(this,arguments)},te={},oe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(oe){var re=new Uint8Array(16);te=function(){return oe(re),re}}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,pe=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||pe)())[6]=15&e[6]|64,e[8]=63&e[8]|128,n)for(var o=0;16>o;++o)n[t+o]=e[o];return n||le(e)},te.v1=function(e,n,t){t=n&&t||0;var o=n||[],r=(e=e||{}).node||ue,i=void 0!==e.clockseq?e.clockseq:se;if(null==r||null==i){var a=fe();null==r&&(r=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,o[t++]=e>>>24&255,o[t++]=e>>>16&255,o[t++]=e>>>8&255,o[t++]=255&e,e=a/4294967296*1e4&268435455,o[t++]=e>>>8&255,o[t++]=255&e,o[t++]=e>>>24&15|16,o[t++]=e>>>16&255,o[t++]=i>>>8|128,o[t++]=255&i,i=0;6>i;++i)o[t+i]=r[i];return n||le(o)};var ve,he,me=te.v4=te,ye="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";(he=ve||(ve={}))[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=ve.warn),{setLogLevel:function(n){e=ve[n]?n:ve.warn},warn:function(t,o){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];e>=ve.warn&&"undefined"!=typeof console&&(i="Snowplow: "+t,o?console.warn.apply(console,n([i+"\n",o],r,!1)):console.warn.apply(console,n([i],r,!1)))},error:function(t,o){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];e>=ve.error&&"undefined"!=typeof console&&(i="Snowplow: "+t+"\n",o?console.error.apply(console,n([i+"\n",o],r,!1)):console.error.apply(console,n([i],r,!1)))},debug:function(t){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];e>=ve.debug&&"undefined"!=typeof console&&console.debug.apply(console,n(["Snowplow: "+t],o,!1))},info:function(t){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];e>=ve.info&&"undefined"!=typeof console&&console.info.apply(console,n(["Snowplow: "+t],o,!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,o=0;t<e.length;t++,o+=8)n[o>>>5]|=e[t]<<24-o%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 o=e[t]<<16|e[t+1]<<8|e[t+2],r=0;4>r;r++)8*t+6*r<=8*e.length?n.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(o>>>6*(3-r)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],t=0,o=0;t<e.length;o=++t%4)0!=o&&n.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(t-1))&Math.pow(2,-2*o+8)-1)<<2*o|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(t))>>>6-2*o);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,o=function(o,r){var i=e.wordsToBytes,a=o;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()),o=e.bytesToWords(a);var c=8*a.length;a=[];var u=1732584193,s=-271733879,l=-1732584194,f=271733878,d=-1009589776;for(o[c>>5]|=128<<24-c%32,o[15+(c+64>>>9<<4)]=c,c=0;c<o.length;c+=16){for(var g=u,p=s,v=l,h=f,m=d,y=0;80>y;y++){if(16>y)a[y]=o[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+=p,l+=v,f+=h,d+=m}return i=i.call(e,[u,s,l,f,d]),r&&r.asBytes?i:r&&r.asString?t.bytesToString(i):e.bytesToHex(i)};o._blocksize=16,o._digestsize=20,be=o}();var xe=be,Ae={},Ce=function(){this.outQueues=[],this.bufferFlushers=[],this.hasLoaded=!1,this.registeredOnLoadHandlers=[]};e.SharedState=Ce,e.addEventListener=D,e.addTracker=function(e,n,t,o,r,i){return Ae.hasOwnProperty(e)?null:(Ae[e]=Y(e,n,t,o,r,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,o=window;return t.visibilityState&&D(t,"visibilitychange",(function(){"hidden"==t.visibilityState&&n.bufferFlushers.forEach((function(e){e(!1)}))}),!1),D(o,"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())})),D(o,"load",e,!1)):e(),n},e.decorateQuerystring=_,e.deleteCookie=U,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=L,e.getCookiesWithPrefix=M,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 o=0;for(e=V(e);o<e.length;o++)if(t[e[o]]){o=!0;break e}o=!1}return o===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=N,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 o,r=0,i=n.length;r<i;r++)!o&&r in n||(o||(o=Array.prototype.slice.call(n,0,r)),o[r]=n[r]);return e.concat(o||Array.prototype.slice.call(n))}function t(){var e,n={},t=[],o=[],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&&r(i)&&(e={keyIfEncoded:e,keyIfNotEncoded:n,json:i},o.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,o,i),n}}}function o(e){return function(t,o,r){for(var i=function(n,o,r){if(n=JSON.stringify(n),e){if(r=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,"_")}r.call(t,o,n)}else t.add(r,n)},a=function(n,o){if(!n){var r=t.getPayload();if(e?r.cx:r.co){var i=(n=JSON).parse;if(e){if(r=r.cx){switch(4-r.length%4){case 2:r+="==";break;case 3:r+="="}r=function(e){var n,t=0,o=0,r="",i=[];if(!e)return e;e+="";do{var a=ye.indexOf(e.charAt(t++)),c=ye.indexOf(e.charAt(t++));r=ye.indexOf(e.charAt(t++));var u=ye.indexOf(e.charAt(t++)),s=a<<18|c<<12|r<<6|u;a=s>>16&255,c=s>>8&255,s&=255,i[o++]=64===r?String.fromCharCode(a):64===u?String.fromCharCode(a,c):String.fromCharCode(a,c,s)}while(t<e.length);return r=i.join(""),n=r.replace(/\0+$/,""),decodeURIComponent(n.split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}(r=r.replace(/-/g,"+").replace(/_/g,"/"))}}else r=r.co;n=i.call(n,r)}else n=void 0}return n?n.data=n.data.concat(o.data):n=o,n},c=void 0,u=0;u<o.length;u++){var s=o[u];"cx"===s.keyIfEncoded?c=a(c,s.json):i(s.json,s.keyIfEncoded,s.keyIfNotEncoded)}o.length=0,r.length&&(c=a(c,o={schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:n([],r,!0)}),r.length=0),c&&i(c,"cx","co")}}function r(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 o=[],r=[],i=0;i<t.length;i++){var a=t[i];h(a)?o.push(a):g(a)&&r.push(a)}e=e.concat(r),n=n.concat(o)},clearGlobalContexts:function(){n=[],e=[]},removeGlobalContexts:function(t){for(var o=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)})))},r=0;r<t.length;r++)o(t[r])},getApplicableContexts:function(t){e:{for(var o=0,r=t.getJson();o<r.length;o++){var i=r[o];if("ue_px"===i.keyIfEncoded&&"object"==typeof i.json.data&&"string"==typeof(i=i.json.data.schema)){o=i;break e}}o=""}i="string"==typeof(r=t.getPayload().e)?r:"",r=[];var a=b(e,t,i,o);return r.push.apply(r,a),t=function(e,n,t,o){var r;return e=w(e).map((function(e){e:{if(p(e)){var r=e[0],i=!1;try{i=r({event:n.getPayload(),eventType:t,eventSchema:o})}catch(e){i=!1}if(!0===i){e=b(e[1],n,t,o);break e}}else if(v(e)&&function(e,n){var t=0,o=0,r=e.accept;return Array.isArray(r)?e.accept.some((function(e){return m(e,n)}))&&o++:"string"==typeof r&&m(r,n)&&o++,r=e.reject,Array.isArray(r)?e.reject.some((function(e){return m(e,n)}))&&t++:"string"==typeof r&&m(r,n)&&t++,0<o&&0===t}(e[0],o)){e=b(e[1],n,t,o);break e}e=[]}if(e&&0!==e.length)return e})),(r=[]).concat.apply(r,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}(n,t,i,o),r.push.apply(r,t),r}}}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!!(r(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 p(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 v(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 p(e)||v(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,o){var r;return e=w(e).map((function(e){e:if(f(e))e=[e];else{if(d(e)){n:{var r=void 0;try{if(r=e({event:n.getPayload(),eventType:t,eventSchema:o}),Array.isArray(r)&&r.every(f)||f(r)){var i=r;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})),(r=[]).concat.apply(r,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}function S(e){void 0===e&&(e={});var t,r,c,u,s,l,f,d=e.base64,g=e.corePlugins,p=null!=g?g:[];t=null==d||d,r=p,c=e.callback,u=function(e){return{addPluginContexts:function(t){var o=n([],t,!0);return e.forEach((function(e){try{e.contexts&&o.push.apply(o,e.contexts())}catch(e){we.error("Error adding plugin contexts",e)}})),o}}}(r),s=a(),l=t,f={};var v=ne(ne({},e={track:function(e,t,i,a){e.withJsonProcessor(o(l)),e.add("eid",me.v4()),e.addDict(f),i=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()}}(i),e.add(i.type,i.value.toString()),a=a?[{schema:"iglu:com.snowplowanalytics.snowplow/tracking_scenario/jsonschema/1-0-0",data:a}]:[],t=t?n([],t,!0):[],t=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(n([],t,!0),a,!0))),void 0!==(t=t&&t.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:t}:void 0)&&e.addJson("cx","co",t),r.forEach((function(n){try{n.beforeTrack&&n.beforeTrack(e)}catch(e){we.error("Plugin beforeTrack",e)}})),"function"==typeof c&&c(e);var d=e.build();return r.forEach((function(e){try{e.afterTrack&&e.afterTrack(d)}catch(e){we.error("Plugin afterTrack",e)}})),d},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,p.push(e),null===(n=e.logger)||void 0===n||n.call(e,we),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,v)}});return null==p||p.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,v)})),v}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 o=window.localStorage,r=Date.now()+1e3*t;return o.setItem("".concat(e,".expires"),r.toString()),o.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 N(e){var n=window,t=L("referrer",n.location.href)||L("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 D(e,n,t,o){return e.addEventListener?(e.addEventListener(n,t,o),!0):e.attachEvent?e.attachEvent("on"+n,t):void(e["on"+n]=t)}function L(e,n){return(e=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(n))?decodeURIComponent(e[1].replace(/\+/g," ")):null}function _(e,n,t){t=n+"="+t;var o=(e=e.split("#"))[0].split("?"),r=o.shift();if(o=o.join("?")){for(var i=!0,a=o.split("&"),c=0;c<a.length;c++)if(a[c].substr(0,n.length+1)===n+"="){i=!1,a[c]=t,o=a.join("&");break}i&&(o=t+"&"+o)}else o=t;return e[0]=r+"?"+o,e.join("#")}function B(e,n){for(var t=window.location.hostname,o="_sp_root_domain_test_"+(new Date).getTime(),r="_test_value_"+(new Date).getTime(),i=t.split("."),a=i.length-2;0<=a;a--){var c=i.slice(a).join(".");if(R(o,r,0,"/",c,e,n),R(o)===r){for(U(o,c,e,n),t=M("_sp_root_domain_test_"),o=0;o<t.length;o++)U(t[o],c,e,n);return c}}return t}function U(e,n,t,o){R(e,"",-1,"/",n,t,o)}function M(e){for(var n=document.cookie.split("; "),t=[],o=0;o<n.length;o++)n[o].substring(0,e.length)===e&&t.push(n[o]);return t}function R(e,n,t,o,r,i,a){return 1<arguments.length?document.cookie=e+"="+encodeURIComponent(null!=n?n:"")+(t?"; Expires="+new Date(+new Date+1e3*t).toUTCString():"")+(o?"; Path="+o:"")+(r?"; Domain="+r:"")+(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)?L("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){var t=ne({memorizedVisitCount:1},n),o=t.memorizedVisitCount;n=t.configStateStorageStrategy;var r=t.configAnonymousTracking;return t=t.onSessionUpdateCallback,"0"===e[0]?(e[7]=e[6],e[5]=e[4],e[3]++):e[3]=o,o=me.v4(),e[6]=o,e[10]=0,e[8]="",e[9]=void 0,t&&t(Q(e,n,r)),o}function W(e){e[4]=Math.round((new Date).getTime()/1e3)}function Q(e,n,t){var o=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:o?new Date(o).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 o=document.documentElement,r=document.body;return t=Math.max(o.clientWidth,o.offsetWidth,o.scrollWidth),o=Math.max(o.clientHeight,o.offsetHeight,o.scrollHeight,r?Math.max(r.offsetHeight,r.scrollHeight):0),{viewport:e,documentSize:n(t=isNaN(t)||isNaN(o)?"":t+"x"+o),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,o,r,i,a){void 0===a&&(a={});var c=[];e=function(e,n,o,r,i,a){function u(){(an=G(window.location.hostname,window.location.href,N()))[1]!==un&&(sn=N(un)),cn=j(an[0]),un=an[1]}function s(e){var n=(new Date).getTime();null!=(e=e.currentTarget)&&e.href&&(e.href=_(e.href,"_sp",$e+"."+n))}function l(e){for(var n=0;n<document.links.length;n++){var t=document.links[n];!t.spDecorationEnabled&&e(t)&&(D(t,"click",s,!0),D(t,"mousedown",s,!0),t.spDecorationEnabled=!0)}}function f(e){if(Fe){var n=/#.*/;e=e.replace(n,"")}return Ge&&(n=/[{}]/g,e=e.replace(n,"")),e}function d(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function g(e){return e=hn+e+"."+Ke,"localStorage"==In?k(e):"cookie"==In||"cookieAndLocalStorage"==In?R(e):void 0}function p(){u(),Ke=xe((mn||cn)+(yn||"/")).slice(0,4)}function v(){We=(new Date).getTime()}function h(){var e=m(),n=e[0];n<Qe?Qe=n:n>Xe&&(Xe=n),(e=e[1])<Ze?Ze=e:e>Ye&&(Ye=e),v()}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];Xe=Qe=n,Ye=Ze=e=e[1]}function w(){M(hn+"ses."+Ke,"*",xn)}function b(e){var n=hn+"id."+Ke;e.shift(),M(n,e=e.join("."),Tn)}function M(e,n,t){On&&!An||("localStorage"==In?T(e,n,t):("cookie"==In||"cookieAndLocalStorage"==In)&&R(e,n,t,yn,mn,wn,bn))}function V(e){var n=hn+"id."+Ke,t=hn+"ses."+Ke;x(n),x(t),U(n,mn,wn,bn),U(t,mn,wn,bn),null!=e&&e.preserveSession||(en=me.v4(),En=1),null!=e&&e.preserveUser||($e=On?"":me.v4(),nn=null)}function z(e){e&&e.stateStorageStrategy&&(a.stateStorageStrategy=e.stateStorageStrategy,In=Be(a)),On=!!a.anonymousTracking,An=Ue(a),Cn=Me(a),jn.setUseLocalStorage("localStorage"==In||"cookieAndLocalStorage"==In),jn.setAnonymousTracking(Cn)}function H(){if(!On||An){var e="none"!=In&&!!g("ses"),n=J();if(n[1])var t=n[1];else t=On?"":me.v4(),n[1]=t;$e=t,en=e?n[6]:q(n,{configStateStorageStrategy:In,configAnonymousTracking:On,onSessionUpdateCallback:Bn}),En=n[3],"none"!=In&&(w(),W(n),b(n))}}function J(){return"none"==In?["1","",0,0,0,void 0,"","","",void 0,0]:function(e,n,t,o){var r=Math.round((new Date).getTime()/1e3);e?(e=e.split(".")).unshift("0"):e=["1",n,r,o,r,"",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],r),i(e[3],o),i(e[4],r),n(e[5]),e[6],e[7],e[8],n(e[9]),i(e[10],0)]}(g("id")||void 0,$e,en,En)}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"===In||On||!Ve)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,o=e.context,r=e.timestamp,i=e.scenario;if(e=e.contextCallback,u(),Dn&&Y(),Dn=!0,pn=document.title,n=P((Je=n)||pn),on.track(function(e){var n=e.pageUrl,o=e.pageTitle;e=e.referrer;var r=t();return r.add("e","pv"),r.add("url",n),r.add("page",o),r.add("refr",e),r}({pageUrl:f(He||un),pageTitle:n,referrer:f(ze||sn)}),(o||[]).concat(e?e():[]),r,i),r=new Date,i=!1,Ln.enabled&&!Ln.installed){i=Ln.installed=!0;var a={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),a.hasSupport=e}}};a.update(),n="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",Object.prototype.hasOwnProperty.call(a,"hasSupport")?D(document,n,v,{passive:!0}):D(document,n,v),y(),n=function(e,n){return void 0===n&&(n=v),function(e){return D(document,e,n)}},"click mouseup mousedown mousemove keypress keydown keyup touchend touchstart".split(" ").forEach(n(document)),["resize","focus","blur"].forEach(n(window)),n(window,h)("scroll")}if(Ln.enabled&&(vn||i))for(r in We=r.getTime(),r=void 0,Ln.configurations)(i=Ln.configurations[r])&&(window.clearInterval(i.activityInterval),te(i,o,e))}function te(e,n,t){var o=function(e,n){u(),e({context:n,pageViewId:K(),minXOffset:Qe,minYOffset:Ze,maxXOffset:Xe,maxYOffset:Ye}),y()},r=function(){We+e.configHeartBeatTimer>(new Date).getTime()&&o(e.callback,(n||[]).concat(t?t():[]))};e.activityInterval=0!=e.configMinimumVisitLength?window.setTimeout((function(){We+e.configMinimumVisitLength>(new Date).getTime()&&o(e.callback,(n||[]).concat(t?t():[])),e.activityInterval=window.setInterval(r,e.configHeartBeatTimer)}),e.configMinimumVisitLength):window.setInterval(r,e.configHeartBeatTimer)}function oe(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 re(e){var n=e.context,o=e.minXOffset,r=e.minYOffset,i=e.maxXOffset,a=e.maxYOffset;(e=document.title)!==pn&&(pn=e,Je=void 0);var c=(e=on).track,u=f(He||un),s=P(Je||pn),l=f(ze||sn);o=Math.round(o),i=Math.round(i),r=Math.round(r),a=Math.round(a);var d=t();d.add("e","pp"),d.add("url",u),d.add("page",s),d.add("refr",l),o&&!isNaN(Number(o))&&d.add("pp_mix",o.toString()),i&&!isNaN(Number(i))&&d.add("pp_max",i.toString()),r&&!isNaN(Number(r))&&d.add("pp_miy",r.toString()),a&&!isNaN(Number(a))&&d.add("pp_may",a.toString()),c.call(e,d,n)}var ie,ae,ce,ue,se,le,fe,de,ge,pe,ve,he,ye,be,Se,ke,Te,Ae,Ce,Oe,Ie,Pe,Ee,je,Ne,De,Le,_e;a.eventMethod=null!==(ie=a.eventMethod)&&void 0!==ie?ie:"post";var Be=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)},Me=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)},Re=null!==(ce=null===(ae=null==a?void 0:a.contexts)||void 0===ae?void 0:ae.browser)&&void 0!==ce&&ce,Ve=null===(se=null===(ue=null==a?void 0:a.contexts)||void 0===ue?void 0:ue.webPage)||void 0===se||se;c.push({beforeTrack:function(e){var n=g("ses"),t=J();if(tn=!!qe&&!!R(qe),kn||tn)V();else{"0"===t[0]?(en=n||"none"==In?t[6]:q(t,{configStateStorageStrategy:In,configAnonymousTracking:On,onSessionUpdateCallback:Bn}),En=t[3]):(new Date).getTime()-Pn>1e3*xn&&(En++,en=q(t,{configStateStorageStrategy:In,configAnonymousTracking:On,memorizedVisitCount:En,onSessionUpdateCallback:Bn})),W(t),0===t[10]&&(n=e.build(),t[8]=n.eid,n=n.dtm||n.ttm,t[9]=n?parseInt(n):void 0),t[10]+=1;var o=(n=X()).documentSize;e.add("vp",n.viewport),e.add("ds",o),e.add("vid",An?En:On?null:En),e.add("sid",An?en:On?null:en),e.add("duid",On?null:t[1]),e.add("uid",On?null:nn),u(),e.add("refr",f(ze||sn)),e.add("url",f(He||un)),!_n||On&&!An||(n=Q(t,In,On),e.addContextEntity({schema:"iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2",data:n})),"none"!=In&&(b(t),w()),Pn=(new Date).getTime()}}}),Ve&&c.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:K()}}]}}),Re&&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!==(le=a.plugins)&&void 0!==le?le:[]);var ze,He,Je,Fe,Ge,qe,We,Qe,Xe,Ze,Ye,Ke,$e,en,nn,tn,on=S({base64:a.encodeBase64,corePlugins:c,callback:function(e){kn||tn||jn.enqueueRequest(e.build(),fn)}}),rn=document.characterSet||document.charset,an=G(window.location.hostname,window.location.href,N()),cn=j(an[0]),un=an[1],sn=an[2],ln=null!==(fe=a.platform)&&void 0!==fe?fe:"web",fn=Z(r),dn=null!==(de=a.postPath)&&void 0!==de?de:"/com.snowplowanalytics.snowplow/tp2",gn=null!==(ge=a.appId)&&void 0!==ge?ge:"",pn=document.title,vn=null===(pe=a.resetActivityTrackingOnPageView)||void 0===pe||pe,hn=null!==(ve=a.cookieName)&&void 0!==ve?ve:"_sp_",mn=null!==(he=a.cookieDomain)&&void 0!==he?he:void 0,yn="/",wn=null!==(ye=a.cookieSameSite)&&void 0!==ye?ye:"None",bn=null===(be=a.cookieSecure)||void 0===be||be,Sn=navigator.doNotTrack||navigator.msDoNotTrack||window.doNotTrack,kn=void 0!==a.respectDoNotTrack&&(a.respectDoNotTrack&&("yes"===Sn||"1"===Sn)),Tn=null!==(Se=a.cookieLifetime)&&void 0!==Se?Se:63072e3,xn=null!==(ke=a.sessionCookieTimeout)&&void 0!==ke?ke:1800,An=Ue(a),Cn=Me(a),On=!!a.anonymousTracking,In=Be(a),Pn=(new Date).getTime(),En=1,jn=function(e,n,t,o,r,i,a,c,u,s,l,f,d,g,p,v){function h(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:m(JSON.stringify(n))}}function m(e){for(var n=0,t=0;t<e.length;t++){var o=e.charCodeAt(t);127>=o?n+=1:2047>=o?n+=2:55296<=o&&57343>=o?(n+=4,t++):n=65535>o?n+3:n+4}return n}function y(e){for(void 0===e&&(e=!1);E.length&&"string"!=typeof E[0]&&"object"!=typeof E[0];)E.shift();if(1>E.length)P=!1;else{if(!O(x))throw"No collector configured";if(P=!0,D){var n=function(e){for(var n=0,t=0;n<e.length&&!((t+=e[n].bytes)>=a);)n+=1;return n},o=void 0;if(M(E))var r=w(o=x,!0,e),i=n(E);else o=k(E[0]),r=w(o,!1,e),i=1;var c=setTimeout((function(){r.abort(),P=!1}),l),u=function(e){for(var n=0;n<e;n++)E.shift();t&&T(B,JSON.stringify(E.slice(0,s)))};if(r.onreadystatechange=function(){if(4===r.readyState&&200<=r.status)if(clearTimeout(c),300>r.status)u(i),y();else{var e=r.status;(e=!(200<=e&&300>e||!p.includes(e)&&v.includes(e)))||(we.error("Status ".concat(r.status,", will not retry.")),u(i)),P=!1}},M(E)){if(0<(n=E.slice(0,i)).length){if(e=!1,n=n.map((function(e){return e.evt})),N){var d=new Blob([b(S(n))],{type:"application/json"});try{e=navigator.sendBeacon(o,d)}catch(n){e=!1}}!0===e?(u(i),y()):r.send(b(S(n)))}}else r.send()}else if(f||M(E))P=!1;else{o=new Image(1,1);var g=!0;o.onload=function(){g&&(g=!1,E.shift(),t&&T(B,JSON.stringify(E.slice(0,s))),y())},o.onerror=function(){g&&(P=g=!1)},o.src=k(E[0]),setTimeout((function(){g&&P&&(g=!1,y())}),l)}}}function w(e,n,t){var o=new XMLHttpRequest;for(var r in n?(o.open("POST",e,!t),o.setRequestHeader("Content-Type","application/json; charset=UTF-8")):o.open("GET",e,!t),o.withCredentials=g,f&&o.setRequestHeader("SP-Anonymous","*"),d)Object.prototype.hasOwnProperty.call(d,r)&&o.setRequestHeader(r,d[r]);return o}function b(e){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",data:e})}function S(e){for(var n=(new Date).getTime().toString(),t=0;t<e.length;t++)e[t].stm=n;return e}function k(e){return u?x+e.replace("?","?stm="+(new Date).getTime()+"&"):x+e}var x,A,C,I,P=!1,E=[],j=!0===(o="string"==typeof o?o.toLowerCase():o)||"beacon"===o||"true"===o,N=!(!(j&&window.navigator&&window.navigator.sendBeacon)||(A=window.navigator.userAgent,(I=(I=A).match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/"))&&I.length&&parseInt(I[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,A)&&(C=A).match("Version/.* Safari/")&&!C.match("Chrom(e|ium)")))&&j,D=!(!window.XMLHttpRequest||!("withCredentials"in new XMLHttpRequest)),L="get"!==o&&D&&("post"===o||j),_=L?r:"/i",B="snowplowOutQueue_".concat(e,"_").concat(L?"post2":"get");if(j&&(d={}),i=t&&F()&&L&&i||1,t)try{var U=window.localStorage.getItem(B);E=U?JSON.parse(U):[]}catch(A){}Array.isArray(E)||(E=[]),n.outQueues.push(E),D&&1<i&&n.bufferFlushers.push((function(e){P||y(e)}));var M=function(e){return"object"==typeof e[0]};return{enqueueRequest:function(e,n){if(x=n+_,L){if((e=h(e)).bytes>=a)return we.warn("Event ("+e.bytes+"B) too big, max is "+a),n=e,void w(x,!0,!1).send(b(S([n.evt])));E.push(e)}else{var o,u="?",l={co:!0,cx:!0},f=!0;for(o in e)e.hasOwnProperty(o)&&!l.hasOwnProperty(o)&&(f?f=!1:u+="&",u+=encodeURIComponent(o)+"="+encodeURIComponent(e[o]));for(var d in l)e.hasOwnProperty(d)&&l.hasOwnProperty(d)&&(u+="&"+d+"="+encodeURIComponent(e[d]));if(0<c&&(l=m(l=k(u)))>=c)return we.warn("Event ("+l+"B) too big, max is "+c),void(D&&(e=h(e),w(n+r,!0,!1).send(b(S([e.evt])))));E.push(u)}n=!1,t&&(n=T(B,JSON.stringify(E.slice(0,s)))),P||n&&!(E.length>=i)||y()},executeQueue:function(){P||y()},setUseLocalStorage:function(e){t=e},setAnonymousTracking:function(e){f=e},setCollectorUrl:function(e){x=e+_},setBufferSize:function(e){i=e}}}(e,i,"localStorage"==In||"cookieAndLocalStorage"==In,a.eventMethod,dn,null!==(Te=a.bufferSize)&&void 0!==Te?Te:1,null!==(Ae=a.maxPostBytes)&&void 0!==Ae?Ae:4e4,null!==(Ce=a.maxGetBytes)&&void 0!==Ce?Ce:0,null===(Oe=a.useStm)||void 0===Oe||Oe,null!==(Ie=a.maxLocalStorageQueueSize)&&void 0!==Ie?Ie:1e3,null!==(Pe=a.connectionTimeout)&&void 0!==Pe?Pe:5e3,Cn,null!==(Ee=a.customHeaders)&&void 0!==Ee?Ee:{},null===(je=a.withCredentials)||void 0===je||je,null!==(Ne=a.retryStatusCodes)&&void 0!==Ne?Ne:[],(null!==(De=a.dontRetryStatusCodes)&&void 0!==De?De:[]).concat([400,401,403,410,422])),Nn=!1,Dn=!1,Ln={enabled:!1,installed:!1,configurations:{}},_n=null!==(_e=null===(Le=a.contexts)||void 0===Le?void 0:Le.session)&&void 0!==_e&&_e,Bn=a.onSessionUpdateCallback;a.hasOwnProperty("discoverRootDomain")&&a.discoverRootDomain&&(mn=B(wn,bn));var Un=X(),Mn=Un.browserLanguage,Rn=Un.resolution,Vn=Un.colorDepth,zn=Un.cookiesEnabled;return on.setTrackerVersion(o),on.setTrackerNamespace(n),on.setAppId(gn),on.setPlatform(ln),on.addPayloadPair("cookie",zn?"1":"0"),on.addPayloadPair("cs",rn),on.addPayloadPair("lang",Mn),on.addPayloadPair("res",Rn),on.addPayloadPair("cd",Vn),p(),H(),a.crossDomainLinker&&l(a.crossDomainLinker),ne(ne({},{getDomainSessionIndex:function(){return En},getPageViewId:K,getTabId:$,newSession:function(){var e=J();"0"===e[0]?(en="none"!=In?q(e,{configStateStorageStrategy:In,configAnonymousTracking:On,onSessionUpdateCallback:Bn}):e[6],En=e[3],w()):(En++,en=q(e,{configStateStorageStrategy:In,configAnonymousTracking:On,memorizedVisitCount:En,onSessionUpdateCallback:Bn})),W(e),"none"!=In&&(b(e),w()),Pn=(new Date).getTime()},getCookieName:function(e){return hn+e+"."+Ke},getUserId:function(){return nn},getDomainUserId:function(){return J()[1]},getDomainUserInfo:function(){return J()},setReferrerUrl:function(e){ze=e},setCustomUrl:function(e){u();var n,t=un;d(e)?He=e:"/"===e.slice(0,1)?He=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)),He=t+e)},setDocumentTitle:function(e){pn=document.title,Je=e},discardHashTag:function(e){Fe=e},discardBrace:function(e){Ge=e},setCookiePath:function(e){yn=e,p()},setVisitorCookieTimeout:function(e){Tn=e},crossDomainLinker:function(e){l(e)},enableActivityTracking:function(e){Ln.configurations.pagePing||(Ln.enabled=!0,Ln.configurations.pagePing=oe(ne(ne({},e),{callback:re})))},enableActivityTrackingCallback:function(e){Ln.configurations.callback||(Ln.enabled=!0,Ln.configurations.callback=oe(e))},updatePageActivity:function(){v()},setOptOutCookie:function(e){qe=e},setUserId:function(e){nn=e},setUserIdFromLocation:function(e){u(),nn=L(e,un)},setUserIdFromReferrer:function(e){u(),nn=L(e,sn)},setUserIdFromCookie:function(e){nn=R(e)},setCollectorUrl:function(e){fn=Z(e),jn.setCollectorUrl(fn)},setBufferSize:function(e){jn.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={}),jn.executeQueue(),e.newBufferSize&&jn.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(),jn.executeQueue()},enableAnonymousTracking:function(e){var n;a.anonymousTracking=null===(n=e&&(null==e?void 0:e.options))||void 0===n||n,z(e),An||Y()},clearUserData:V}),{id:e,namespace:n,core:on,sharedState:i})}(e,n,o,r,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=[],o=0;o<e.length;o++){var r=e[o];n.hasOwnProperty(r)?t.push(n[r]):we.warn(r+" not configured")}return t}var ne=function(){return ne=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},ne.apply(this,arguments)},te={},oe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(oe){var re=new Uint8Array(16);te=function(){return oe(re),re}}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,pe=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||pe)())[6]=15&e[6]|64,e[8]=63&e[8]|128,n)for(var o=0;16>o;++o)n[t+o]=e[o];return n||le(e)},te.v1=function(e,n,t){t=n&&t||0;var o=n||[],r=(e=e||{}).node||ue,i=void 0!==e.clockseq?e.clockseq:se;if(null==r||null==i){var a=fe();null==r&&(r=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,o[t++]=e>>>24&255,o[t++]=e>>>16&255,o[t++]=e>>>8&255,o[t++]=255&e,e=a/4294967296*1e4&268435455,o[t++]=e>>>8&255,o[t++]=255&e,o[t++]=e>>>24&15|16,o[t++]=e>>>16&255,o[t++]=i>>>8|128,o[t++]=255&i,i=0;6>i;++i)o[t+i]=r[i];return n||le(o)};var ve,he,me=te.v4=te,ye="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";(he=ve||(ve={}))[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=ve.warn),{setLogLevel:function(n){e=ve[n]?n:ve.warn},warn:function(t,o){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];e>=ve.warn&&"undefined"!=typeof console&&(i="Snowplow: "+t,o?console.warn.apply(console,n([i+"\n",o],r,!1)):console.warn.apply(console,n([i],r,!1)))},error:function(t,o){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];e>=ve.error&&"undefined"!=typeof console&&(i="Snowplow: "+t+"\n",o?console.error.apply(console,n([i+"\n",o],r,!1)):console.error.apply(console,n([i],r,!1)))},debug:function(t){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];e>=ve.debug&&"undefined"!=typeof console&&console.debug.apply(console,n(["Snowplow: "+t],o,!1))},info:function(t){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];e>=ve.info&&"undefined"!=typeof console&&console.info.apply(console,n(["Snowplow: "+t],o,!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,o=0;t<e.length;t++,o+=8)n[o>>>5]|=e[t]<<24-o%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 o=e[t]<<16|e[t+1]<<8|e[t+2],r=0;4>r;r++)8*t+6*r<=8*e.length?n.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(o>>>6*(3-r)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],t=0,o=0;t<e.length;o=++t%4)0!=o&&n.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(t-1))&Math.pow(2,-2*o+8)-1)<<2*o|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(t))>>>6-2*o);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,o=function(o,r){var i=e.wordsToBytes,a=o;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()),o=e.bytesToWords(a);var c=8*a.length;a=[];var u=1732584193,s=-271733879,l=-1732584194,f=271733878,d=-1009589776;for(o[c>>5]|=128<<24-c%32,o[15+(c+64>>>9<<4)]=c,c=0;c<o.length;c+=16){for(var g=u,p=s,v=l,h=f,m=d,y=0;80>y;y++){if(16>y)a[y]=o[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+=p,l+=v,f+=h,d+=m}return i=i.call(e,[u,s,l,f,d]),r&&r.asBytes?i:r&&r.asString?t.bytesToString(i):e.bytesToHex(i)};o._blocksize=16,o._digestsize=20,be=o}();var xe=be,Ae={},Ce=function(){this.outQueues=[],this.bufferFlushers=[],this.hasLoaded=!1,this.registeredOnLoadHandlers=[]};e.SharedState=Ce,e.addEventListener=D,e.addTracker=function(e,n,t,o,r,i){return Ae.hasOwnProperty(e)?null:(Ae[e]=Y(e,n,t,o,r,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,o=window;return t.visibilityState&&D(t,"visibilitychange",(function(){"hidden"==t.visibilityState&&n.bufferFlushers.forEach((function(e){e(!1)}))}),!1),D(o,"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())})),D(o,"load",e,!1)):e(),n},e.decorateQuerystring=_,e.deleteCookie=U,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=L,e.getCookiesWithPrefix=M,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 o=0;for(e=V(e);o<e.length;o++)if(t[e[o]]){o=!0;break e}o=!1}return o===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=N,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.13.0", | ||
"version": "3.13.1-dev.0", | ||
"description": "Core functionality for Snowplow Browser trackers", | ||
@@ -21,3 +21,3 @@ "homepage": "http://bit.ly/sp-js", | ||
"dependencies": { | ||
"@snowplow/tracker-core": "3.13.0", | ||
"@snowplow/tracker-core": "3.13.1-dev.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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
2195256
9788
1
+ Added@snowplow/tracker-core@3.13.1-dev.0(transitive)
- Removed@snowplow/tracker-core@3.13.0(transitive)