"use strict";(()=>{var vo=Object.create;var Bn=Object.defineProperty;var mo=Object.getOwnPropertyDescriptor;var po=Object.getOwnPropertyNames;var go=Object.getPrototypeOf,ho=Object.prototype.hasOwnProperty;var qt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var yo=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of po(t))!ho.call(e,o)&&o!==n&&Bn(e,o,{get:()=>t[o],enumerable:!(r=mo(t,o))||r.enumerable});return e};var wo=(e,t,n)=>(n=e!=null?vo(go(e)):{},yo(t||!e||!e.__esModule?Bn(n,"default",{value:e,enumerable:!0}):n,e));var ir=qt((ca,or)=>{(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,r){return n<<r|n>>>32-r},rotr:function(n,r){return n<<32-r|n>>>r},endian:function(n){if(n.constructor==Number)return t.rotl(n,8)&16711935|t.rotl(n,24)&4278255360;for(var r=0;r<n.length;r++)n[r]=t.endian(n[r]);return n},randomBytes:function(n){for(var r=[];n>0;n--)r.push(Math.floor(Math.random()*256));return r},bytesToWords:function(n){for(var r=[],o=0,i=0;o<n.length;o++,i+=8)r[i>>>5]|=n[o]<<24-i%32;return r},wordsToBytes:function(n){for(var r=[],o=0;o<n.length*32;o+=8)r.push(n[o>>>5]>>>24-o%32&255);return r},bytesToHex:function(n){for(var r=[],o=0;o<n.length;o++)r.push((n[o]>>>4).toString(16)),r.push((n[o]&15).toString(16));return r.join("")},hexToBytes:function(n){for(var r=[],o=0;o<n.length;o+=2)r.push(parseInt(n.substr(o,2),16));return r},bytesToBase64:function(n){for(var r=[],o=0;o<n.length;o+=3)for(var i=n[o]<<16|n[o+1]<<8|n[o+2],u=0;u<4;u++)o*8+u*6<=n.length*8?r.push(e.charAt(i>>>6*(3-u)&63)):r.push("=");return r.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var r=[],o=0,i=0;o<n.length;i=++o%4)i!=0&&r.push((e.indexOf(n.charAt(o-1))&Math.pow(2,-2*i+8)-1)<<i*2|e.indexOf(n.charAt(o))>>>6-i*2);return r}};or.exports=t})()});var Zt=qt((la,ar)=>{var $t={utf8:{stringToBytes:function(e){return $t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape($t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(e.charCodeAt(n)&255);return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};ar.exports=$t});var sr=qt((fa,ur)=>{(function(){var e=ir(),t=Zt().utf8,n=Zt().bin,r=function(i){i.constructor==String?i=t.stringToBytes(i):typeof Buffer<"u"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(i)?i=Array.prototype.slice.call(i,0):Array.isArray(i)||(i=i.toString());var u=e.bytesToWords(i),s=i.length*8,l=[],c=1732584193,f=-271733879,m=-1732584194,p=271733878,w=-1009589776;u[s>>5]|=128<<24-s%32,u[(s+64>>>9<<4)+15]=s;for(var y=0;y<u.length;y+=16){for(var g=c,k=f,M=m,E=p,A=w,v=0;v<80;v++){if(v<16)l[v]=u[y+v];else{var x=l[v-3]^l[v-8]^l[v-14]^l[v-16];l[v]=x<<1|x>>>31}var U=(c<<5|c>>>27)+w+(l[v]>>>0)+(v<20?(f&m|~f&p)+1518500249:v<40?(f^m^p)+1859775393:v<60?(f&m|f&p|m&p)-1894007588:(f^m^p)-899497514);w=p,p=m,m=f<<30|f>>>2,f=c,c=U}c+=g,f+=k,m+=M,p+=E,w+=A}return[c,f,m,p,w]},o=function(i,u){var s=e.wordsToBytes(r(i));return u&&u.asBytes?s:u&&u.asString?n.bytesToString(s):e.bytesToHex(s)};o._blocksize=16,o._digestsize=20,ur.exports=o})()});var F=function(){return F=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},F.apply(this,arguments)};function Me(e,t,n,r){function o(i){return i instanceof n?i:new n(function(u){u(i)})}return new(n||(n=Promise))(function(i,u){function s(f){try{c(r.next(f))}catch(m){u(m)}}function l(f){try{c(r.throw(f))}catch(m){u(m)}}function c(f){f.done?i(f.value):o(f.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}function qe(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,u=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return u.next=s(0),u.throw=s(1),u.return=s(2),typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(c){return function(f){return l([c,f])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;u&&(u=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(f){c=[6,f],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function J(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var N=[];for(wt=0;wt<256;++wt)N.push((wt+256).toString(16).slice(1));var wt;function Nn(e,t=0){return(N[e[t+0]]+N[e[t+1]]+N[e[t+2]]+N[e[t+3]]+"-"+N[e[t+4]]+N[e[t+5]]+"-"+N[e[t+6]]+N[e[t+7]]+"-"+N[e[t+8]]+N[e[t+9]]+"-"+N[e[t+10]]+N[e[t+11]]+N[e[t+12]]+N[e[t+13]]+N[e[t+14]]+N[e[t+15]]).toLowerCase()}var bt,bo=new Uint8Array(16);function Ht(){if(!bt&&(bt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bt(bo)}var So=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Gt={randomUUID:So};function xo(e,t,n){if(Gt.randomUUID&&!t&&!e)return Gt.randomUUID();e=e||{};var r=e.random||(e.rng||Ht)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return Nn(r)}var K=xo;var To="4.1.0";function Io(e){if(!e)return e;var t=4-e.length%4;switch(t){case 2:e+="==";break;case 3:e+="=";break}var n=e.replace(/-/g,"+").replace(/_/g,"/");return ko(n)}function Po(e){if(!e)return e;var t=Co(e);return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Co(e){var t,n,r,o,i,u,s,l,c=0,f=0,m=[];if(!e)return e;e=unescape(encodeURIComponent(e));do t=e.charCodeAt(c++),n=e.charCodeAt(c++),r=e.charCodeAt(c++),l=t<<16|n<<8|r,o=l>>18&63,i=l>>12&63,u=l>>6&63,s=l&63,m[f++]=xe.charAt(o)+xe.charAt(i)+xe.charAt(u)+xe.charAt(s);while(c<e.length);var p=m.join(""),w=e.length%3;return(w?p.slice(0,w-3):p)+"===".slice(w||3)}function ko(e){var t=function(y){return decodeURIComponent(y.split("").map(function(g){return"%"+("00"+g.charCodeAt(0).toString(16)).slice(-2)}).join(""))},n,r,o,i,u,s,l,c,f=0,m=0,p="",w=[];if(!e)return e;e+="";do i=xe.indexOf(e.charAt(f++)),u=xe.indexOf(e.charAt(f++)),s=xe.indexOf(e.charAt(f++)),l=xe.indexOf(e.charAt(f++)),c=i<<18|u<<12|s<<6|l,n=c>>16&255,r=c>>8&255,o=c&255,s===64?w[m++]=String.fromCharCode(n):l===64?w[m++]=String.fromCharCode(n,r):w[m++]=String.fromCharCode(n,r,o);while(f<e.length);return p=w.join(""),t(p.replace(/\0+$/,""))}function Xt(){var e={},t=[],n=[],r=[],o,i=function(c,f){f!=null&&f!==""&&(e[c]=f)},u=function(c){for(var f in c)Object.prototype.hasOwnProperty.call(c,f)&&i(f,c[f])},s=function(c,f,m){if(m&&Hn(m)){var p={keyIfEncoded:c,keyIfNotEncoded:f,json:m};n.push(p),t.push(p)}},l=function(c){r.push(c)};return{add:i,addDict:u,addJson:s,addContextEntity:l,getPayload:function(){return e},getJson:function(){return t},withJsonProcessor:function(c){o=c},build:function(){return o?.(this,n,r),e}}}function Eo(e){return function(t,n,r){for(var o=function(p,w,y){var g=JSON.stringify(p);e?t.add(w,Po(g)):t.add(y,g)},i=function(){var p=t.getPayload();if(e?p.cx:p.co)return JSON.parse(e?Io(p.cx):p.co)},u=function(p,w){var y=p||i();return y?y.data=y.data.concat(w.data):y=w,y},s=void 0,l=0,c=n;l<c.length;l++){var f=c[l];f.keyIfEncoded==="cx"?s=u(s,f.json):o(f.json,f.keyIfEncoded,f.keyIfNotEncoded)}if(n.length=0,r.length){var m={schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:J([],r,!0)};s=u(s,m),r.length=0}s&&o(s,"cx","co")}}function Hn(e){if(!Gn(e))return!1;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function Gn(e){return typeof e<"u"&&e!==null&&(e.constructor==={}.constructor||e.constructor===[].constructor)}var St="Snowplow: ",me;(function(e){e[e.none=0]="none",e[e.error=1]="error",e[e.warn=2]="warn",e[e.debug=3]="debug",e[e.info=4]="info"})(me||(me={}));var z=Ao();function Ao(e){e===void 0&&(e=me.warn);function t(u){me[u]?e=u:e=me.warn}function n(u,s){for(var l=[],c=2;c<arguments.length;c++)l[c-2]=arguments[c];if(e>=me.error&&typeof console<"u"){var f=St+u+`
`;s?console.error.apply(console,J([f+`
`,s],l,!1)):console.error.apply(console,J([f],l,!1))}}function r(u,s){for(var l=[],c=2;c<arguments.length;c++)l[c-2]=arguments[c];if(e>=me.warn&&typeof console<"u"){var f=St+u;s?console.warn.apply(console,J([f+`
`,s],l,!1)):console.warn.apply(console,J([f],l,!1))}}function o(u){for(var s=[],l=1;l<arguments.length;l++)s[l-1]=arguments[l];e>=me.debug&&typeof console<"u"&&console.debug.apply(console,J([St+u],s,!1))}function i(u){for(var s=[],l=1;l<arguments.length;l++)s[l-1]=arguments[l];e>=me.info&&typeof console<"u"&&console.info.apply(console,J([St+u],s,!1))}return{setLogLevel:t,warn:r,error:n,debug:o,info:i}}function Oo(){var e=[],t=[],n={},r={},o=function(i){var u=Bo(i),s=No(i),l=[],c=Wt(e.concat(Object.values(n)),i,s,u);l.push.apply(l,c);var f=qo(t.concat(Object.values(r)),i,s,u);return l.push.apply(l,f),l};return{getGlobalPrimitives:function(){return e.concat(Object.values(n))},getConditionalProviders:function(){return t.concat(Object.values(r))},addGlobalContexts:function(i){if(Array.isArray(i)){for(var u=[],s=[],l=0,c=i;l<c.length;l++){var f=c[l];$e(f)?u.push(f):pe(f)&&s.push(f)}e=e.concat(s),t=t.concat(u)}else for(var m=0,p=Object.entries(i);m<p.length;m++){var w=p[m],y=w[0],f=w[1];$e(f)?r[y]=f:pe(f)&&(n[y]=f)}},clearGlobalContexts:function(){t=[],e=[],r={},n={}},removeGlobalContexts:function(i){for(var u=function(f){typeof f=="string"?(delete r[f],delete n[f]):$e(f)?t=t.filter(function(m){return!zn(f,m)}):pe(f)&&(e=e.filter(function(m){return!zn(f,m)}))},s=0,l=i;s<l.length;s++){var c=l[s];u(c)}},getApplicableContexts:function(i){return o(i)}}}function _o(e){return{addPluginContexts:function(t){var n=t?J([],t,!0):[];return e.forEach(function(r){try{r.contexts&&n.push.apply(n,r.contexts())}catch(o){z.error("Error adding plugin contexts",o)}}),n}}}function Yt(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return(t=e?.map(function(o){if(typeof o=="function")try{return o.apply(void 0,n)}catch{return}else return o}).filter(Boolean))!==null&&t!==void 0?t:[]}function Ro(e){var t=new RegExp("^iglu:([a-zA-Z0-9-_.]+)/([a-zA-Z0-9-_]+)/jsonschema/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$"),n=t.exec(e);if(n!==null)return n.slice(1,6)}function Do(e){if(e[0]==="*"||e[1]==="*")return!1;if(e.slice(2).length>0){for(var t=!1,n=0,r=e.slice(2);n<r.length;n++){var o=r[n];if(o==="*")t=!0;else if(t)return!1}return!0}else if(e.length==2)return!0;return!1}function Jn(e){var t=e.split(".");return t&&t.length>1?Do(t):!1}function Wn(e){var t=new RegExp("^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]*|\\*)$"),n=t.exec(e);if(n!==null&&Jn(n[1]))return n.slice(1,6)}function Jt(e){var t=Wn(e);if(t){var n=t[0];return t.length===5&&Jn(n)}return!1}function Uo(e){return Array.isArray(e)&&e.every(function(t){return typeof t=="string"})}function Vn(e){return Uo(e)?e.every(function(t){return Jt(t)}):typeof e=="string"?Jt(e):!1}function Ze(e){var t=e;return Hn(t)&&"schema"in t&&"data"in t?typeof t.schema=="string"&&typeof t.data=="object":!1}function Lo(e){var t=e,n=0;if(e!=null&&typeof e=="object"&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(t,"accept"))if(Vn(t.accept))n+=1;else return!1;if(Object.prototype.hasOwnProperty.call(t,"reject"))if(Vn(t.reject))n+=1;else return!1;return n>0&&n<=2}return!1}function It(e){return typeof e=="function"&&e.length<=1}function pe(e){return It(e)||Ze(e)}function Xn(e){return Array.isArray(e)&&e.length===2?Array.isArray(e[1])?It(e[0])&&e[1].every(pe):It(e[0])&&pe(e[1]):!1}function Yn(e){return Array.isArray(e)&&e.length===2&&Lo(e[0])?Array.isArray(e[1])?e[1].every(pe):pe(e[1]):!1}function $e(e){return Xn(e)||Yn(e)}function jo(e,t){var n=0,r=0,o=e.accept;Array.isArray(o)?e.accept.some(function(u){return xt(u,t)})&&r++:typeof o=="string"&&xt(o,t)&&r++;var i=e.reject;return Array.isArray(i)?e.reject.some(function(u){return xt(u,t)})&&n++:typeof i=="string"&&xt(i,t)&&n++,r>0&&n===0?!0:(r===0&&n>0,!1)}function xt(e,t){if(!Jt(e))return!1;var n=Wn(e),r=Ro(t);if(n&&r){if(!Fo(n[0],r[0]))return!1;for(var o=1;o<5;o++)if(!Qn(n[o],r[o]))return!1;return!0}return!1}function Fo(e,t){var n=t.split("."),r=e.split(".");if(n&&r){if(n.length!==r.length)return!1;for(var o=0;o<r.length;o++)if(!Qn(n[o],r[o]))return!1;return!0}return!1}function Qn(e,t){return e&&t&&e==="*"||e===t}function Bo(e){for(var t=e.getJson(),n=0,r=t;n<r.length;n++){var o=r[n];if(o.keyIfEncoded==="ue_px"&&typeof o.json.data=="object"){var i=o.json.data.schema;if(typeof i=="string")return i}}return""}function No(e){var t=e.getPayload().e;return typeof t=="string"?t:""}function Vo(e,t,n,r){var o=void 0;try{var i={event:t.getPayload(),eventType:n,eventSchema:r};return o=e(i),Array.isArray(o)&&o.every(Ze)||Ze(o)?o:void 0}catch{o=void 0}return o}function $n(e){return Array.isArray(e)?e:Array.of(e)}function Wt(e,t,n,r){var o,i=$n(e),u=function(l){var c=zo(l,t,n,r);if(c&&c.length!==0)return c},s=i.map(u);return(o=[]).concat.apply(o,s.filter(function(l){return l!=null&&l.filter(Boolean)}))}function zo(e,t,n,r){if(Ze(e))return[e];if(It(e)){var o=Vo(e,t,n,r);if(Ze(o))return[o];if(Array.isArray(o))return o}}function Mo(e,t,n,r){if(Xn(e)){var o=e[0],i=!1;try{var u={event:t.getPayload(),eventType:n,eventSchema:r};i=o(u)}catch{i=!1}if(i===!0)return Wt(e[1],t,n,r)}else if(Yn(e)&&jo(e[0],r))return Wt(e[1],t,n,r);return[]}function Tt(e,t){return typeof e=="function"?e===t:JSON.stringify(e)===JSON.stringify(t)}function zn(e,t){if($e(e)){if(!$e(t))return!1;var n=e[0],r=e[1],o=t[0],i=t[1];return Tt(n,o)?Array.isArray(r)?!Array.isArray(i)||r.length!==i.length?!1:r.reduce(function(u,s,l){return u&&Tt(s,i[l])},!0):Array.isArray(i)?!1:Tt(r,i):!1}else if(pe(e))return pe(t)?Tt(e,t):!1;return!1}function qo(e,t,n,r){var o,i=$n(e),u=function(l){var c=Mo(l,t,n,r);if(c&&c.length!==0)return c},s=i.map(u);return(o=[]).concat.apply(o,s.filter(function(l){return l!=null&&l.filter(Boolean)}))}function Ho(e){var t=e.payload,n=e.svrAnon,r=n===void 0?!1:n;return{payload:t,svrAnon:r}}function Go(e){return e==null?{type:"dtm",value:new Date().getTime()}:typeof e=="number"?{type:"dtm",value:e}:e.type==="ttm"?{type:"ttm",value:e.value}:{type:"dtm",value:e.value||new Date().getTime()}}function Zn(e){e===void 0&&(e={});function t(l,c,f){var m=_o(c),p=Oo(),w=l,y={};function g(v){if(v&&v.length)return{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:v}}function k(v,x){var U=p.getApplicableContexts(v),R=[];return x&&x.length&&R.push.apply(R,x),U&&U.length&&R.push.apply(R,U),R}function M(v,x,U){v.withJsonProcessor(Eo(w)),v.add("eid",K()),v.addDict(y);var R=Go(U);v.add(R.type,R.value.toString());var Y=k(v,m.addPluginContexts(x)),Q=g(Y);Q!==void 0&&v.addJson("cx","co",Q),c.forEach(function(B){try{B.beforeTrack&&B.beforeTrack(v)}catch(q){z.error("Plugin beforeTrack",q)}});var ie=c.find(function(B){try{return B.filter&&B.filter(v.build())===!1}catch(q){return z.error("Plugin filter",q),!1}});if(!ie){typeof f=="function"&&f(v);var ae=v.build();return c.forEach(function(B){try{B.afterTrack&&B.afterTrack(ae)}catch(q){z.error("Plugin afterTrack",q)}}),ae}}function E(v,x){y[v]=x}var A={track:M,addPayloadPair:E,getBase64Encoding:function(){return w},setBase64Encoding:function(v){w=v},addPayloadDict:function(v){for(var x in v)Object.prototype.hasOwnProperty.call(v,x)&&(y[x]=v[x])},resetPayloadPairs:function(v){y=Gn(v)?v:{}},setTrackerVersion:function(v){E("tv",v)},setTrackerNamespace:function(v){E("tna",v)},setAppId:function(v){E("aid",v)},setPlatform:function(v){E("p",v)},setUserId:function(v){E("uid",v)},setScreenResolution:function(v,x){E("res",v+"x"+x)},setViewport:function(v,x){E("vp",v+"x"+x)},setColorDepth:function(v){E("cd",v)},setTimezone:function(v){E("tz",v)},setLang:function(v){E("lang",v)},setIpAddress:function(v){E("ip",v)},setUseragent:function(v){E("ua",v)},addGlobalContexts:function(v){p.addGlobalContexts(v)},clearGlobalContexts:function(){p.clearGlobalContexts()},removeGlobalContexts:function(v){p.removeGlobalContexts(v)}};return A}var n=e.base64,r=e.corePlugins,o=e.callback,i=r??[],u=t(n??!0,i,o),s=F(F({},u),{addPlugin:function(l){var c,f,m=l.plugin;i.push(m),(c=m.logger)===null||c===void 0||c.call(m,z),(f=m.activateCorePlugin)===null||f===void 0||f.call(m,s)}});return i?.forEach(function(l){var c,f;(c=l.logger)===null||c===void 0||c.call(l,z),(f=l.activateCorePlugin)===null||f===void 0||f.call(l,s)}),s}function Kn(e){var t=e.event,n=t.schema,r=t.data,o=Xt(),i={schema:"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",data:{schema:n,data:r}};return o.add("e","ue"),o.addJson("ue_px","ue_pr",i),o}function er(e){var t=e.pageUrl,n=e.pageTitle,r=e.referrer,o=Xt();return o.add("e","pv"),o.add("url",t),o.add("page",n),o.add("refr",r),o}function tr(e){var t=e.pageUrl,n=e.pageTitle,r=e.referrer,o=e.minXOffset,i=e.maxXOffset,u=e.minYOffset,s=e.maxYOffset,l=Xt();return l.add("e","pp"),l.add("url",t),l.add("page",n),l.add("refr",r),o&&!isNaN(Number(o))&&l.add("pp_mix",o.toString()),i&&!isNaN(Number(i))&&l.add("pp_max",i.toString()),u&&!isNaN(Number(u))&&l.add("pp_miy",u.toString()),s&&!isNaN(Number(s))&&l.add("pp_may",s.toString()),l}function Qt(e){var t=e.targetUrl,n=e.elementId,r=e.elementClasses,o=e.elementTarget,i=e.elementContent,u={schema:"iglu:com.snowplowanalytics.snowplow/link_click/jsonschema/1-0-1",data:Jo({targetUrl:t,elementId:n,elementClasses:r,elementTarget:o,elementContent:i})};return Kn({event:u})}function Jo(e,t){t===void 0&&(t={});var n={};for(var r in e)(t[r]||e[r]!==null&&typeof e[r]<"u")&&(n[r]=e[r]);return n}function Pt(e){var t=e.maxSize,n=t===void 0?1e3:t,r=e.events,o=r===void 0?[]:r,i=J([],o,!0),u=function(){return Promise.resolve(i.length)};return{count:u,add:function(s){for(i.push(s);i.length>n;)i.shift();return u()},removeHead:function(s){for(var l=0;l<s;l++)i.shift();return Promise.resolve()},iterator:function(){var s=0,l=J([],i,!0);return{next:function(){return s<l.length?Promise.resolve({value:l[s++],done:!1}):Promise.resolve({value:void 0,done:!0})}}},getAll:function(){return Promise.resolve(J([],i,!0))},getAllPayloads:function(){return Promise.resolve(i.map(function(s){return s.payload}))}}}var Wo="iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4";function Xo(e){return JSON.stringify({schema:Wo,data:e})}function Yo(e){for(var t=new Date().getTime().toString(),n=0;n<e.length;n++)e[n].stm=t;return e}function Qo(e){var t=e.endpoint,n=e.protocol,r=n===void 0?"https":n,o=e.port,i=e.eventMethod,u=i===void 0?"post":i,s=e.customHeaders,l=e.connectionTimeout,c=e.keepalive,f=c===void 0?!1:c,m=e.postPath,p=m===void 0?"/com.snowplowanalytics.snowplow/tp2":m,w=e.useStm,y=w===void 0?!0:w,g=e.maxPostBytes,k=g===void 0?4e4:g,M=e.credentials,E=M===void 0?"include":M,A=[],v=u.toLowerCase()==="post",x,U;function R(){var T=A.reduce(function(D,$){return D+(v?$.getPOSTRequestBytesCount():$.getGETRequestBytesCount())},0);return v&&(T+=88),T}function Y(){return A.length}function Q(){return A.length>0?A[0].getServerAnonymization():void 0}function ie(T){return A.length>0&&Q()!==T.getServerAnonymization()?!1:(A.push(T),!0)}function ae(){return A}function B(){return v?R()>=k:A.length>=1}function q(){var T=new Headers;return v&&T.append("Content-Type","application/json; charset=UTF-8"),s&&Object.keys(s).forEach(function(D){T.append(D,s[D])}),Q()&&T.append("SP-Anonymous","*"),T}function ye(){var T=t;t.includes("://")||(T="".concat(r,"://").concat(t)),o&&(T="".concat(T,":").concat(o));var D=v?p:"/i";return T+D}function ce(T,D){fe(!1),U=new AbortController,x=setTimeout(function(){var je="Request timed out";console.error(je),x=void 0,fe(!1,je)},l??5e3);var $=F({headers:q(),signal:U.signal,keepalive:f,credentials:E},D),Le=new Request(T,$);return Le}function le(){var T=Yo(A.map(function(D){return D.getPOSTRequestBody()}));return ce(ye(),{method:"POST",body:Xo(T)})}function Ce(){if(A.length!==1)throw new Error("Only one event can be sent in a GET request");var T=A[0],D=T.getGETRequestURL(ye(),y);return ce(D,{method:"GET"})}function ke(){if(A.length!==0)return v?le():Ce()}function fe(T,D){if(x!==void 0&&(clearTimeout(x),x=void 0),U!==void 0){var $=U;U=void 0,T||$.abort(D)}}return{addEvent:ie,getEvents:ae,toRequest:ke,countBytes:R,countEvents:Y,isFull:B,closeRequest:fe}}function Mn(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);r<=127?t+=1:r<=2047?t+=2:r>=55296&&r<=57343?(t+=4,n++):r<65535?t+=3:t+=4}return t}function $o(e){var t={co:!0,cx:!0},n=[];for(var r in e)e.hasOwnProperty(r)&&!t[r]&&n.push(r+"="+encodeURIComponent(e[r]));for(var o in t)e.hasOwnProperty(o)&&t[o]&&n.push(o+"="+encodeURIComponent(e[o]));return"?"+n.join("&")}function Zo(e){var t=Object.keys(e).map(function(n){return[n,e[n]]}).reduce(function(n,r){var o=r[0],i=r[1];return n[o]=i.toString(),n},{});return t}function qn(e){var t=null,n=null,r=null,o=null;function i(){return e.payload}function u(){var p;return(p=e.svrAnon)!==null&&p!==void 0?p:!1}function s(p){return t===null&&(t=$o(p)),t}function l(p,w){var y=s(i());return w?p+y.replace("?","?stm="+new Date().getTime()+"&"):p+y}function c(){if(r===null){var p=s(i());r=Mn(p)}return r}function f(){return n===null&&(n=Zo(i())),n}function m(){return o===null&&(o=Mn(JSON.stringify(f()))),o}return{getPayload:i,getServerAnonymization:u,getGETRequestURL:l,getGETRequestBytesCount:c,getPOSTRequestBody:f,getPOSTRequestBytesCount:m}}function nr(e){var t=e.endpoint,n=e.eventMethod,r=n===void 0?"post":n,o=e.postPath,i=e.protocol,u=e.port,s=e.maxPostBytes,l=s===void 0?4e4:s,c=e.maxGetBytes,f=e.bufferSize,m=f===void 0?1:f,p=e.customHeaders,w=e.serverAnonymization,y=e.connectionTimeout,g=e.keepalive,k=e.idService,M=e.dontRetryStatusCodes,E=M===void 0?[]:M,A=e.retryStatusCodes,v=A===void 0?[]:A,x=e.retryFailedRequests,U=x===void 0?!0:x,R=e.onRequestFailure,Y=e.onRequestSuccess,Q=e.customFetch,ie=Q===void 0?fetch:Q,ae=e.useStm,B=e.eventStore,q=B===void 0?Pt({}):B,ye=e.credentials,ce=!1,le=!1,Ce=r.toLowerCase()==="post";E=E.concat([400,401,403,410,422]);function ke(b){return b>=200&&b<300||!U?!1:v.includes(b)?!0:!E.includes(b)}function fe(b,S){Y!==void 0&&setTimeout(function(){try{Y?.(b,S)}catch(P){z.error("Error in onRequestSuccess",P)}},0)}function T(b,S){R!==void 0&&setTimeout(function(){try{R?.(b,S)}catch(P){z.error("Error in onRequestFailure",P)}},0)}function D(b){return Me(this,void 0,void 0,function(){var S,P,I,H,L,ue;return qe(this,function(j){switch(j.label){case 0:if(S=b.toRequest(),S===void 0)throw new Error("Empty batch");P=b.getEvents().map(function(ne){return ne.getPayload()}),j.label=1;case 1:return j.trys.push([1,4,,5]),[4,ie(S)];case 2:return I=j.sent(),[4,I.text()];case 3:return j.sent(),b.closeRequest(!0),I.ok?(fe(P,I),[2,{success:!0,retry:!1,status:I.status}]):(H=ke(I.status),T({events:P,status:I.status,message:I.statusText,willRetry:H},I),[2,{success:!1,retry:H,status:I.status}]);case 4:return L=j.sent(),b.closeRequest(!1),ue=typeof L=="string"?L:L?L.message:"Unknown error",T({events:P,message:ue,willRetry:!0}),[2,{success:!1,retry:!0}];case 5:return[2]}})})}function $(){return Qo({endpoint:t,protocol:i,port:u,eventMethod:r,customHeaders:p,connectionTimeout:y,keepalive:g,maxPostBytes:l,useStm:ae,credentials:ye,postPath:o})}function Le(b){var S=function(H,L){return z.warn("Event ("+H+"B) too big, max is "+L)};if(Ce){var P=b.getPOSTRequestBytesCount()+88,I=P>l;return I&&S(P,l),I}else{if(c===void 0)return!1;var P=b.getGETRequestBytesCount(),I=P>c;return I&&S(P,c),I}}function je(){return Me(this,void 0,void 0,function(){var b;return qe(this,function(S){switch(S.label){case 0:return k&&!ce?(ce=!0,b=new Request(k,{method:"GET"}),[4,ie(b)]):[3,2];case 1:S.sent(),S.label=2;case 2:return[2]}})})}function He(){return Me(this,void 0,void 0,function(){var b;return qe(this,function(S){switch(S.label){case 0:if(le)return[3,5];le=!0,S.label=1;case 1:return S.trys.push([1,3,4,5]),[4,it()];case 2:return S.sent(),[3,5];case 3:return b=S.sent(),z.error("Error sending events",b),[3,5];case 4:return le=!1,[7];case 5:return[2]}})})}function it(){return Me(this,void 0,void 0,function(){var b,S,P,I,H,L,ue,j,ne,ve;return qe(this,function(W){switch(W.label){case 0:return[4,je()];case 1:W.sent(),b=$(),S=q.iterator(),W.label=2;case 2:return b.isFull()?[3,4]:[4,S.next()];case 3:return P=W.sent(),I=P.value,H=P.done,H||I===void 0?[3,4]:(L=qn(I),b.addEvent(L)?[3,2]:[3,4]);case 4:return b.countEvents()===0?[2]:[4,D(b)];case 5:return ue=W.sent(),j=ue.success,ne=ue.retry,ve=ue.status,j||!ne?(j||z.error("Status ".concat(ve,", will not retry.")),[4,q.removeHead(b.countEvents())]):[3,7];case 6:W.sent(),W.label=7;case 7:return j?[4,it()]:[3,9];case 8:W.sent(),W.label=9;case 9:return[2]}})})}function te(b){return Me(this,void 0,void 0,function(){var S,P,I,H;return qe(this,function(L){switch(L.label){case 0:return S=Ho({payload:b,svrAnon:w}),P=qn(S),Le(P)?(I=$(),I.addEvent(P),[4,D(I)]):[3,2];case 1:return L.sent(),[3,5];case 2:return[4,q.add(S)];case 3:return H=L.sent(),H>=m?[4,He()]:[3,5];case 4:L.sent(),L.label=5;case 5:return[2]}})})}function V(b){t=b}function At(b){w=b}function de(b){m=b}return{flush:He,input:te,setCollectorUrl:V,setAnonymousTracking:At,setBufferSize:de}}var rr=To;var yr=wo(sr());function Ko(e){try{var t=window.localStorage,n=t.getItem(e+".expires");if(n===null||+n>Date.now())return t.getItem(e);t.removeItem(e),t.removeItem(e+".expires");return}catch{return}}function ei(e,t,n){n===void 0&&(n=63072e3);try{var r=window.localStorage,o=Date.now()+n*1e3;return r.setItem("".concat(e,".expires"),o.toString()),r.setItem(e,t),!0}catch{return!1}}function cr(e){try{var t=window.localStorage;return t.removeItem(e),t.removeItem(e+".expires"),!0}catch{return!1}}function lr(e){try{return window.sessionStorage.getItem(e)}catch{return}}function ti(e,t){try{return window.sessionStorage.setItem(e,t),!0}catch{return!1}}var ni={sessionId:!0,sourceId:!0,sourcePlatform:!1,userId:!1,reason:!1};function ri(e,t,n){var r,o,i=new Date().getTime(),u=F(F({},ni),t),s=n.domainUserId,l=n.userId,c=n.sessionId,f=n.sourceId,m=n.sourcePlatform,p=n.event,w=p.currentTarget,y=typeof u.reason=="function"?u.reason(p):(r=w?.textContent)===null||r===void 0?void 0:r.trim();return e?o=[s,i,u.sessionId&&c,u.userId&&Kt(l||""),u.sourceId&&Kt(f||""),u.sourcePlatform&&m,u.reason&&Kt(y||"")].map(function(g){return g||""}).join(".").replace(/([.]*$)/,""):o=n.domainUserId+"."+i,o}function Kt(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=+$/,"")}function oi(e){return!!(e&&typeof e.valueOf()=="string")}function fr(e){return Number.isInteger&&Number.isInteger(e)||typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function ii(){if(typeof Intl=="object"&&typeof Intl.DateTimeFormat=="function"){var e=new Intl.DateTimeFormat().resolvedOptions();return e.timeZone}}function dr(e){if(!oi(e)){e=e.text||"";var t=document.getElementsByTagName("title");t&&t[0]!=null&&(e=t[0].text)}return e}function tt(e){var t=new RegExp("^(?:(?:https?|ftp):)/*(?:[^@]+@)?([^:/#]+)"),n=t.exec(e);return n?n[1]:e}function vr(e){var t=e.length;return e.charAt(--t)==="."&&(e=e.slice(0,t)),e.slice(0,2)==="*."&&(e=e.slice(1)),e}function en(e){var t=window,n=nt("referrer",t.location.href)||nt("referer",t.location.href);if(n)return n;if(e)return e;try{if(t.top)return t.top.document.referrer;if(t.parent)return t.parent.document.referrer}catch{}return document.referrer}function se(e,t,n,r){if(e.addEventListener)return e.addEventListener(t,n,r),!0;if(e.attachEvent)return e.attachEvent("on"+t,n);e["on"+t]=n}function nt(e,t){var n=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(t);return n?decodeURIComponent(n[1].replace(/\+/g," ")):null}function ai(e,t,n){var r=t+"="+n,o=e.split("#"),i=o[0].split("?"),u=i.shift(),s=i.join("?");if(!s)s=r;else{for(var l=!0,c=s.split("&"),f=0;f<c.length;f++)if(c[f].substr(0,t.length+1)===t+"="){l=!1,c[f]=r,s=c.join("&");break}l&&(s=r+"&"+s)}return o[0]=u+"?"+s,o.join("#")}function ui(e,t){for(var n=window.location.hostname,r="_sp_root_domain_test_",o=r+new Date().getTime(),i="_test_value_"+new Date().getTime(),u=n.split("."),s=u.length-2;s>=0;s--){var l=u.slice(s).join(".");if(Pe(o,i,0,"/",l,e,t),Pe(o)===i){kt(o,"/",l,e,t);for(var c=si(r),f=0;f<c.length;f++)kt(c[f],"/",l,e,t);return l}}return n}function kt(e,t,n,r,o){Pe(e,"",-1,t,n,r,o)}function si(e){for(var t=document.cookie.split("; "),n=[],r=0;r<t.length;r++)t[r].substring(0,e.length)===e&&n.push(t[r]);return n}function Pe(e,t,n,r,o,i,u){return arguments.length>1?document.cookie=e+"="+encodeURIComponent(t??"")+(n?"; Expires="+new Date(+new Date+n*1e3).toUTCString():"")+(r?"; Path="+r:"")+(o?"; Domain="+o:"")+(i?"; SameSite="+i:"")+(u?"; Secure":""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}function wr(e){if(e==null||typeof e!="object"||Array.isArray(e))return function(){return!0};var t=Object.prototype.hasOwnProperty.call(e,"allowlist"),n=fi(e);return li(e,function(r){return ci(r,n)===t})}function cn(e){return e.className.match(/\S+/g)||[]}function ci(e,t){for(var n=cn(e),r=0,o=n;r<o.length;r++){var i=o[r];if(t[i])return!0}return!1}function li(e,t){return e.hasOwnProperty("filter")&&e.filter?e.filter:t}function fi(e){var t={},n=e.allowlist||e.denylist;if(n){Array.isArray(n)||(n=[n]);for(var r=0;r<n.length;r++)t[n[r]]=!0}return t}function di(e){var t=e.trackerId,n=e.maxLocalStorageQueueSize,r=n===void 0?1e3:n,o=e.useLocalStorage,i=o===void 0?!0:o,u="snowplowOutQueue_".concat(t);function s(){if(i){var k=window.localStorage.getItem(u),M=k?JSON.parse(k):[];return Pt({maxSize:r,events:M})}else return Pt({maxSize:r})}var l=s(),c=l.getAll,f=l.getAllPayloads,m=l.add,p=l.count,w=l.iterator,y=l.removeHead;function g(){return i?c().then(function(k){window.localStorage.setItem(u,JSON.stringify(k))}):Promise.resolve()}return{count:p,add:function(k){return m(k),g().then(p)},removeHead:function(k){return y(k),g()},iterator:w,getAll:c,getAllPayloads:f,setUseLocalStorage:function(k){i=k}}}function vi(e,t){var n,r=(n=e.eventStore)!==null&&n!==void 0?n:di(e);e.eventStore=r;var o=nr(e);return t.bufferFlushers.push(o.flush),{enqueueRequest:o.input,executeQueue:o.flush,setAnonymousTracking:o.setAnonymousTracking,setCollectorUrl:o.setCollectorUrl,setBufferSize:o.setBufferSize,setUseLocalStorage:function(i){if(r.hasOwnProperty("setUseLocalStorage")){var u=r;u.setUseLocalStorage(i)}}}}function mi(e,t){var n=new RegExp("^(?:https?|ftp)(?::/*(?:[^?]+))([?][^#]+)"),r=n.exec(e);return r&&r?.length>1?nt(t,r[1]):null}function mr(e,t,n){var r;return e==="translate.googleusercontent.com"?(n===""&&(n=t),t=(r=mi(t,"u"))!==null&&r!==void 0?r:"",e=tt(t)):(e==="cc.bingj.com"||e==="webcache.googleusercontent.com")&&(t=document.links[0].href,e=tt(t)),[e,t,n]}var br=0,Te=1,pi=2,rt=3,ln=4,Sr=5,Ie=6,_e=7,Re=8,De=9,ge=10;function gi(){var e=["1","",0,0,0,void 0,"","","",void 0,0];return e}function hi(e,t,n,r){var o=new Date,i=Math.round(o.getTime()/1e3),u;e?(u=e.split("."),u.unshift("0")):u=["1",t,i,r,i,"",n],(!u[Ie]||u[Ie]==="undefined")&&(u[Ie]=K()),(!u[_e]||u[_e]==="undefined")&&(u[_e]=""),(!u[Re]||u[Re]==="undefined")&&(u[Re]=""),(!u[De]||u[De]==="undefined")&&(u[De]=""),(!u[ge]||u[ge]==="undefined")&&(u[ge]=0);var s=function(f,m){var p=parseInt(f);return isNaN(p)?m:p},l=function(f){return f?s(f,void 0):void 0},c=[u[br],u[Te],s(u[pi],i),s(u[rt],r),s(u[ln],i),l(u[Sr]),u[Ie],u[_e],u[Re],l(u[De]),s(u[ge],0)];return c}function yi(e,t){var n;return e[Te]?n=e[Te]:t?(n="",e[Te]=n):(n=K(),e[Te]=n),n}function Ke(e,t){t===void 0&&(t={memorizedVisitCount:1});var n=t.memorizedVisitCount;un(e)?(e[_e]=e[Ie],e[Sr]=e[ln],e[rt]++):e[rt]=n;var r=K();return e[Ie]=r,e[ge]=0,e[Re]="",e[De]=void 0,r}function tn(e){e[ln]=Math.round(new Date().getTime()/1e3)}function wi(e,t){if(e[ge]===0){var n=t.build();e[Re]=n.eid;var r=n.dtm||n.ttm;e[De]=r?parseInt(r):void 0}}function bi(e){e[ge]+=1}function Si(e,t){var n=J([],e,!0);return t&&(n[Te]="",n[_e]=""),n.shift(),n.join(".")}function pr(e,t,n){var r=e[De],o={userId:n?"00000000-0000-0000-0000-000000000000":e[Te],sessionId:e[Ie],eventIndex:e[ge],sessionIndex:e[rt],previousSessionId:n?null:e[_e]||null,storageMechanism:t=="localStorage"?"LOCAL_STORAGE":"COOKIE_1",firstEventId:e[Re]||null,firstEventTimestamp:r?new Date(r).toISOString():null};return o}function nn(e){return e[Ie]}function xi(e){return e[Te]}function rn(e){return e[rt]}function un(e){return e[br]==="0"}function gr(e){return e[ge]}var Ti="iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",Ii="iglu:com.snowplowanalytics.snowplow/browser_context/jsonschema/2-0-0",Pi="iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2",Ci="iglu:com.snowplowanalytics.snowplow/application/jsonschema/1-0-0";function ki(){return"ResizeObserver"in window}var hr=!1;function Ei(){if(!hr&&!(!document||!document.body||!document.documentElement)){hr=!0;var e=new ResizeObserver(function(t){for(var n=0,r=t;n<r.length;n++){var o=r[n];(o.target===document.body||o.target===document.documentElement)&&(Ct=sn())}});e.observe(document.body),e.observe(document.documentElement)}}var Ct,ot="x";function on(){return ki()?(Ct||(Ct=sn()),Ei(),Ct):sn()}function sn(){return{viewport:an(Ai()),documentSize:an(Oi()),resolution:an(_i()),colorDepth:screen.colorDepth,devicePixelRatio:window.devicePixelRatio,cookiesEnabled:window.navigator.cookieEnabled,online:window.navigator.onLine,browserLanguage:window.navigator.language||window.navigator.userLanguage,documentLanguage:document.documentElement.lang,webdriver:window.navigator.webdriver,deviceMemory:window.navigator.deviceMemory,hardwareConcurrency:window.navigator.hardwareConcurrency}}function Ai(){var e,t;if("innerWidth"in window)e=window.innerWidth,t=window.innerHeight;else{var n=document.documentElement||document.body;e=n.clientWidth,t=n.clientHeight}return Math.max(0,e)+ot+Math.max(0,t)}function Oi(){var e=document.documentElement,t=document.body,n=t?Math.max(t.offsetHeight,t.scrollHeight):0,r=Math.max(e.clientWidth,e.offsetWidth,e.scrollWidth),o=Math.max(e.clientHeight,e.offsetHeight,e.scrollHeight,n);return isNaN(r)||isNaN(o)?"":r+ot+o}function _i(){return screen.width+ot+screen.height}function an(e){return e&&e.split(ot).map(function(t){return Math.floor(Number(t))}).join(ot)}function Ri(e){var t,n,r,o=!0,i=10,u=.05;function s(){var m;return n&&(!r||r>new Date)&&(m=n[0])!==null&&m!==void 0?m:Pe(e)}function l(m,p,w,y,g,k){return n=[m,p,w,y,g,k],o=!1,t===void 0&&(t=setTimeout(function(){t=void 0,f()},i)),r=new Date(Date.now()+Math.min(u,p??u)*1e3),!0}function c(m,p,w,y){n=void 0,o=!0,t!==void 0&&(clearTimeout(t),t=void 0),kt(e,m,p,w,y)}function f(){if(t!==void 0&&(clearTimeout(t),t=void 0),!o&&(o=!0,n!==void 0)){var m=n[0],p=n[1],w=n[2],y=n[3],g=n[4],k=n[5];Pe(e,m,p,w,y,g,k)}}return{getValue:s,setValue:l,deleteValue:c,flush:f}}function Di(){var e={};function t(s){return e[s]||(e[s]=Ri(s)),e[s]}function n(s){return t(s).getValue()}function r(s,l,c,f,m,p,w){return t(s).setValue(l,c,f,m,p,w)}function o(s,l,c,f,m){t(s).deleteValue(l,c,f,m)}function i(){e={}}function u(){for(var s=0,l=Object.values(e);s<l.length;s++){var c=l[s];c.flush()}}return{getCookie:n,setCookie:r,deleteCookie:o,clearCache:i,flush:u}}var xr=Di(),Ui={getCookie:Pe,setCookie:function(e,t,n,r,o,i,u){return Pe(e,t,n,r,o,i,u),document.cookie.indexOf("".concat(e,"="))!==-1},deleteCookie:kt,flush:function(){}};function Li(e,t,n,r,o,i){i===void 0&&(i={});var u=[],s=function(f,m,p,w,y,g){var k,M,E,A,v,x,U,R,Y,Q,ie,ae,B,q,ye,ce,le,Ce,ke,fe;g.eventMethod=(k=g.eventMethod)!==null&&k!==void 0?k:"post";var T=function(a){var d;return(d=a.stateStorageStrategy)!==null&&d!==void 0?d:"cookieAndLocalStorage"},D=function(a){var d;return typeof a.anonymousTracking=="boolean"?!1:((d=a.anonymousTracking)===null||d===void 0?void 0:d.withSessionTracking)===!0},$=function(a){var d;return typeof a.anonymousTracking=="boolean"?!1:((d=a.anonymousTracking)===null||d===void 0?void 0:d.withServerAnonymisation)===!0},Le=function(a){return!!a.anonymousTracking},je=(E=(M=g?.contexts)===null||M===void 0?void 0:M.browser)!==null&&E!==void 0?E:!1,He=(v=(A=g?.contexts)===null||A===void 0?void 0:A.webPage)!==null&&v!==void 0?v:!0,it=function(a){return typeof a=="boolean"?{useExtendedCrossDomainLinker:a}:{useExtendedCrossDomainLinker:!0,collectCrossDomainAttributes:a}},te=g.synchronousCookieWrite?Ui:xr;u.push(ro()),He&&u.push(to()),je&&u.push(no()),u.push.apply(u,(x=g.plugins)!==null&&x!==void 0?x:[]);var V=Zn({base64:(U=g.encodeBase64)!==null&&U!==void 0?U:g.eventMethod!=="post",corePlugins:u,callback:$r}),At=document.characterSet||document.charset,de=mr(window.location.hostname,window.location.href,en()),b=vr(de[0]),S=de[1],P=de[2],I,H=(R=g.platform)!==null&&R!==void 0?R:"web",L=(Y=g.appId)!==null&&Y!==void 0?Y:"",ue=g.appVersion,j,ne=document.title,ve,W=!1,Nr=(Q=g.resetActivityTrackingOnPageView)!==null&&Q!==void 0?Q:!0,dn,vn,Vr=(ie=g.cookieName)!==null&&ie!==void 0?ie:"_sp_",Ee=(ae=g.cookieDomain)!==null&&ae!==void 0?ae:void 0,zr=(B=g.discoverRootDomain)!==null&&B!==void 0?B:Ee===void 0,Ge="/",at=(q=g.cookieSameSite)!==null&&q!==void 0?q:"Lax",ut=(ye=g.cookieSecure)!==null&&ye!==void 0?ye:!0,mn=window.navigator.doNotTrack||window.navigator.msDoNotTrack||window.doNotTrack,pn=typeof g.respectDoNotTrack<"u"?g.respectDoNotTrack&&(mn==="yes"||mn==="1"):!1,Ot,gn=(ce=g.cookieLifetime)!==null&&ce!==void 0?ce:63072e3,hn=(le=g.sessionCookieTimeout)!==null&&le!==void 0?le:1800,Fe=D(g),_t=$(g),re=Le(g),O=T(g),st,Rt=new Date().getTime(),ct,lt,ft,dt,yn,vt,Z,oe=1,we,be=vi(F({trackerId:f,endpoint:On(w),serverAnonymization:_t,useLocalStorage:O=="localStorage"||O=="cookieAndLocalStorage"},g),y),Dt=!1,Be=(Ce=g.preservePageViewIdForUrl)!==null&&Ce!==void 0?Ce:!1,Ut=void 0,G={enabled:!1,installed:!1,configurations:{}},Mr=(fe=(ke=g.contexts)===null||ke===void 0?void 0:ke.session)!==null&&fe!==void 0?fe:!1,mt,pt=g.onSessionUpdateCallback,Lt=!1,wn=it(g.useExtendedCrossDomainLinker||!1),qr=wn.useExtendedCrossDomainLinker,Hr=wn.collectCrossDomainAttributes;zr&&!Ee&&(Ee=ui(at,ut));var gt=on(),Gr=gt.browserLanguage,Jr=gt.resolution,Wr=gt.colorDepth,Xr=gt.cookiesEnabled,bn=ii();V.setTrackerVersion(p),V.setTrackerNamespace(m),V.setAppId(L),V.setPlatform(H),V.addPayloadPair("cookie",Xr?"1":"0"),V.addPayloadPair("cs",At),V.addPayloadPair("lang",Gr),V.addPayloadPair("res",Jr),V.addPayloadPair("cd",Wr),bn&&V.addPayloadPair("tz",bn),ue&&V.addPlugin({plugin:{contexts:function(){return[{schema:Ci,data:{version:ue}}]}}}),Tn(),An(),g.crossDomainLinker&&Sn(g.crossDomainLinker);function Ae(){de=mr(window.location.hostname,window.location.href,en()),de[1]!==S&&(P=en(S)),b=vr(de[0]),S=de[1]}function Yr(a){var d="_sp";return function(h){var C=h.currentTarget,_=ri(a,Hr,{domainUserId:vt,userId:we||void 0,sessionId:Z,sourceId:L,sourcePlatform:H,event:h});C?.href&&(C.href=ai(C.href,d,_))}}function Sn(a){for(var d=Yr(qr),h=0;h<document.links.length;h++){var C=document.links[h];!C.spDecorationEnabled&&a(C)&&(C.addEventListener("click",d,!0),C.addEventListener("mousedown",d,!0),C.spDecorationEnabled=!0)}}function Oe(a){var d;return dn&&(d=new RegExp("#.*"),a=a.replace(d,"")),vn&&(d=new RegExp("[{}]","g"),a=a.replace(d,"")),a}function xn(a){var d=new RegExp("^([a-z]+):"),h=d.exec(a);return h?h[1]:null}function Qr(a,d){var h=xn(d),C;return h?d:d.slice(0,1)==="/"?xn(a)+"://"+tt(a)+d:(a=Oe(a),(C=a.indexOf("?"))>=0&&(a=a.slice(0,C)),(C=a.lastIndexOf("/"))!==a.length-1&&(a=a.slice(0,C+1)),a+d)}function $r(a){pn||mt||be.enqueueRequest(a.build())}function Ne(a){return Vr+a+"."+yn}function jt(a){var d=Ne(a);if(O=="localStorage")return Ko(d);if(O=="cookie"||O=="cookieAndLocalStorage")return te.getCookie(d)}function Tn(){Ae(),yn=(0,yr.default)((Ee||b)+(Ge||"/")).slice(0,4)}function Je(){var a=new Date;st=a.getTime()}function Zr(){Kr(),Je()}function In(){var a=document.documentElement;return a?[a.scrollLeft||window.pageXOffset,a.scrollTop||window.pageYOffset]:[0,0]}function Pn(){var a=In(),d=a[0];ct=d,lt=d;var h=a[1];ft=h,dt=h}function Kr(){var a=In(),d=a[0];d<ct?ct=d:d>lt&&(lt=d);var h=a[1];h<ft?ft=h:h>dt&&(dt=h)}function ht(a){return Math.round(a)}function Ft(){var a=Ne("ses"),d="*";return Cn(a,d,hn)}function Bt(a){var d=Ne("id"),h=Si(a,re);return Cn(d,h,gn)}function Cn(a,d,h){return re&&!Fe?!1:O=="localStorage"?ei(a,d,h):O=="cookie"||O=="cookieAndLocalStorage"?te.setCookie(a,d,h,Ge,Ee,at,ut):!1}function kn(a){var d=Ne("id"),h=Ne("ses");cr(d),cr(h),te.deleteCookie(d,Ge,Ee,at,ut),te.deleteCookie(h,Ge,Ee,at,ut),a?.preserveSession||(Z=K(),oe=1),a?.preserveUser||(vt=re?"":K(),we=null)}function En(a){a&&a.stateStorageStrategy&&(g.stateStorageStrategy=a.stateStorageStrategy,O=T(g)),re=Le(g),Fe=D(g),_t=$(g),be.setUseLocalStorage(O=="localStorage"||O=="cookieAndLocalStorage"),be.setAnonymousTracking(_t)}function An(){if(!(re&&!Fe)){var a=O!="none"&&!!jt("ses"),d=We();vt=yi(d,re),a?Z=nn(d):Z=Ke(d),oe=rn(d),O!="none"&&(Ft(),tn(d),Bt(d),gr(d)||te.flush())}}function We(){if(O=="none")return gi();var a=jt("id")||void 0;return hi(a,vt,Z,oe)}function On(a){return a.indexOf("http")===0?a:(document.location.protocol==="https:"?"https":"http")+"://"+a}function _n(){(!Dt||y.pageViewId==null)&&(y.pageViewId=K(),y.pageViewUrl=j||S)}function Xe(){return eo()&&(y.pageViewId=K(),y.pageViewUrl=j||S),y.pageViewId}function eo(){if(y.pageViewId==null)return!0;if(Dt||!Be)return!1;if(y.pageViewUrl===void 0)return!0;var a=j||S;if(Be===!0||Be=="full"||!("URL"in window))return y.pageViewUrl!=a;var d=new URL(a),h=new URL(y.pageViewUrl);return Be=="pathname"?d.pathname!=h.pathname:Be=="pathnameAndSearch"?d.pathname!=h.pathname||d.search!=h.search:!1}function Rn(){if(O==="none"||re||!He)return null;var a="_sp_tab_id",d=lr(a);return d||(ti(a,K()),d=lr(a)),d||null}function to(){return{contexts:function(){return[{schema:Ti,data:{id:Xe()}}]}}}function no(){return{contexts:function(){return[{schema:Ii,data:F(F({},on()),{tabId:Rn()})}]}}}function ro(){var a=function(h){return re?null:h},d=function(h){return Fe?h:a(h)};return{beforeTrack:function(h){var C=jt("ses"),_=We(),Se=gr(_)===0;if(Ot?mt=!!te.getCookie(Ot):mt=!1,pn||mt){kn();return}un(_)?(!C&&O!="none"?Z=Ke(_):Z=nn(_),oe=rn(_)):new Date().getTime()-Rt>hn*1e3&&(oe++,Z=Ke(_,{memorizedVisitCount:oe})),tn(_),wi(_,h),bi(_);var X=on(),Ve=X.viewport,Ye=X.documentSize;h.add("vp",Ve),h.add("ds",Ye),h.add("vid",d(oe)),h.add("sid",d(Z)),h.add("duid",a(xi(_))),h.add("uid",a(we)),Ae(),h.add("refr",Oe(I||P)),h.add("url",Oe(j||S));var Qe=pr(_,O,re);if(Mr&&(!re||Fe)&&oo(h,Qe),O!="none"){Bt(_);var Vt=Ft();(!C||Se)&&Vt&&pt&&!Lt&&(te.flush(),pt(Qe),Lt=!1)}Rt=new Date().getTime()}}}function oo(a,d){var h={schema:Pi,data:d};a.addContextEntity(h)}function io(){var a=We();if(un(a)?(O!="none"?Z=Ke(a):Z=nn(a),oe=rn(a)):(oe++,Z=Ke(a,{memorizedVisitCount:oe})),tn(a),O!="none"){var d=pr(a,O,re);Bt(a);var h=Ft();te.flush(),h&&pt&&(Lt=!0,pt(d))}Rt=new Date().getTime()}function Nt(a,d){return(a||[]).concat(d?d():[])}function ao(a){var d=a.title,h=a.context,C=a.timestamp,_=a.contextCallback;Ae(),Ut&&Ut==Xe()&&_n(),Ut=Xe(),ne=document.title,d?(ve=d,W=!0):W&&(ve=null);var Se=dr(ve||ne);V.track(er({pageUrl:Oe(j||S),pageTitle:Se,referrer:Oe(I||P)}),Nt(h,_),C);var X=new Date,Ve=!1;if(G.enabled&&!G.installed){G.installed=!0,Ve=!0;var Ye={update:function(){if(typeof window<"u"&&typeof window.addEventListener=="function"){var ze=!1,yt=Object.defineProperty({},"passive",{get:function(){ze=!0},set:function(){}}),jn=function(){};window.addEventListener("testPassiveEventSupport",jn,yt),window.removeEventListener("testPassiveEventSupport",jn,yt),Ye.hasSupport=ze}}};Ye.update();var Qe="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(Ye,"hasSupport")?se(document,Qe,Je,{passive:!0}):se(document,Qe,Je),Pn();var Vt=["click","mouseup","mousedown","mousemove","keypress","keydown","keyup","touchend","touchstart"],lo=["resize","focus","blur"],zt=function(fo,ze){return ze===void 0&&(ze=Je),function(yt){return se(document,yt,ze)}};Vt.forEach(zt(document)),lo.forEach(zt(window)),zt(window,Zr)("scroll")}if(G.enabled&&(Nr||Ve)){st=X.getTime();var Ln=void 0;for(Ln in G.configurations){var Mt=G.configurations[Ln];Mt&&(window.clearInterval(Mt.activityInterval),uo(Mt,h,_))}}}function uo(a,d,h){var C=function(X,Ve){Ae(),X({context:Ve,pageViewId:Xe(),minXOffset:ct,minYOffset:ft,maxXOffset:lt,maxYOffset:dt}),Pn()},_=function(){var X=new Date;st+a.configMinimumVisitLength>X.getTime()&&C(a.callback,Nt(d,h)),a.activityInterval=window.setInterval(Se,a.configHeartBeatTimer)},Se=function(){var X=new Date;st+a.configHeartBeatTimer>X.getTime()&&C(a.callback,Nt(d,h))};a.configMinimumVisitLength===0?a.activityInterval=window.setInterval(Se,a.configHeartBeatTimer):a.activityInterval=window.setTimeout(_,a.configMinimumVisitLength)}function Dn(a){var d=a.minimumVisitLength,h=a.heartbeatDelay,C=a.callback;if(fr(d)&&fr(h))return{configMinimumVisitLength:d*1e3,configHeartBeatTimer:h*1e3,callback:C};z.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function so(a){var d=a.context,h=a.minXOffset,C=a.minYOffset,_=a.maxXOffset,Se=a.maxYOffset,X=document.title;X!==ne&&(ne=X,ve=void 0),V.track(tr({pageUrl:Oe(j||S),pageTitle:dr(ve||ne),referrer:Oe(I||P),minXOffset:ht(h),maxXOffset:ht(_),minYOffset:ht(C),maxYOffset:ht(Se)}),d)}function Un(a){var d=G.configurations[a];d?.configMinimumVisitLength===0?window.clearTimeout(d?.activityInterval):window.clearInterval(d?.activityInterval),G.configurations[a]=void 0}var co={getDomainSessionIndex:function(){return oe},getPageViewId:Xe,getTabId:Rn,newSession:io,getCookieName:function(a){return Ne(a)},getUserId:function(){return we},getDomainUserId:function(){return We()[1]},getDomainUserInfo:function(){return We()},setReferrerUrl:function(a){I=a},setCustomUrl:function(a){Ae(),j=Qr(S,a)},setDocumentTitle:function(a){ne=document.title,ve=a,W=!1},discardHashTag:function(a){dn=a},discardBrace:function(a){vn=a},setCookiePath:function(a){Ge=a,Tn()},setVisitorCookieTimeout:function(a){gn=a},crossDomainLinker:function(a){Sn(a)},enableActivityTracking:function(a){G.configurations.pagePing||(G.enabled=!0,G.configurations.pagePing=Dn(F(F({},a),{callback:so})))},enableActivityTrackingCallback:function(a){G.configurations.callback||(G.enabled=!0,G.configurations.callback=Dn(a))},disableActivityTracking:function(){Un("pagePing")},disableActivityTrackingCallback:function(){Un("callback")},updatePageActivity:function(){Je()},setOptOutCookie:function(a){Ot=a},setUserId:function(a){we=a},setUserIdFromLocation:function(a){Ae(),we=nt(a,S)},setUserIdFromReferrer:function(a){Ae(),we=nt(a,P)},setUserIdFromCookie:function(a){we=te.getCookie(a)},setCollectorUrl:function(a){be.setCollectorUrl(On(a))},setBufferSize:function(a){be.setBufferSize(a)},flushBuffer:function(a){a===void 0&&(a={}),be.executeQueue(),a.newBufferSize&&be.setBufferSize(a.newBufferSize)},trackPageView:function(a){a===void 0&&(a={}),ao(a)},preservePageViewId:function(){Dt=!0},preservePageViewIdForUrl:function(a){Be=a},disableAnonymousTracking:function(a){g.anonymousTracking=!1,En(a),An(),be.executeQueue()},enableAnonymousTracking:function(a){var d;g.anonymousTracking=(d=a&&a?.options)!==null&&d!==void 0?d:!0,En(a),Fe||_n()},clearUserData:kn};return F(F({},co),{id:f,namespace:m,core:V,sharedState:y})},l=s(e,t,n,r,o,i),c=F(F({},l),{addPlugin:function(f){var m,p;c.core.addPlugin(f),(p=(m=f.plugin).activateBrowserPlugin)===null||p===void 0||p.call(m,c)}});return u.forEach(function(f){var m;(m=f.activateBrowserPlugin)===null||m===void 0||m.call(f,c)}),c}var et={};function fn(e,t){try{ji(e??Fi()).forEach(t)}catch(n){z.error("Function failed",n)}}function Tr(e,t,n){try{Pr(e??Object.keys(t),t).forEach(n)}catch(r){z.error("Function failed",r)}}function Ir(e,t,n,r,o,i){return et.hasOwnProperty(e)?null:(et[e]=Li(e,t,n,r,o,i),et[e])}function ji(e){return Pr(e,et)}function Fi(){return Object.keys(et)}function Pr(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];t.hasOwnProperty(i)?n.push(t[i]):z.warn(i+" not configured")}return n}function Cr(){xr.flush()}var Bi=function(){function e(){this.bufferFlushers=[],this.hasLoaded=!1,this.registeredOnLoadHandlers=[]}return e}();function kr(){var e=new Bi,t=document,n=window;function r(){t.visibilityState=="hidden"&&e.bufferFlushers.forEach(function(s){s(!1)})}function o(){e.bufferFlushers.forEach(function(s){s(!1)})}function i(){var s;if(!e.hasLoaded)for(e.hasLoaded=!0,s=0;s<e.registeredOnLoadHandlers.length;s++)e.registeredOnLoadHandlers[s]();return!0}function u(){t.addEventListener?t.addEventListener("DOMContentLoaded",function s(){t.removeEventListener("DOMContentLoaded",s,!1),i()}):t.attachEvent&&t.attachEvent("onreadystatechange",function s(){t.readyState==="complete"&&(t.detachEvent("onreadystatechange",s),i())}),se(n,"load",i,!1)}return t.visibilityState&&se(t,"visibilitychange",r,!1),se(n,"beforeunload",o,!1),document.readyState==="loading"?u():i(),e}var Ar=["a","area"],Ni=Ar.join(", "),Vi=/^(javascript|vbscript|jscript|mocha|livescript|ecmascript):/i,Ue={},he={},ee={},Et=void 0;function Or(){return{activateBrowserPlugin:function(e){Ue[e.id]=e},logger:function(e){Et=e}}}function _r(e,t){e===void 0&&(e={}),t===void 0&&(t=Object.keys(Ue)),zi(t),t.forEach(function(n){Ue[n]&&(Gi(e,n),Ji(n))})}function zi(e){e===void 0&&(e=Object.keys(Ue)),e.forEach(function(t){Ue[t]&&he[t]&&(window.removeEventListener("click",he[t],!0),window.removeEventListener("mouseup",he[t],!0),window.removeEventListener("mousedown",he[t],!0))})}function Er(e,t){t===void 0&&(t=Object.keys(Ue)),Tr(t,Ue,function(n){var r,o,i,u;if("element"in e){var s=(i=(r=e.trackContent)!==null&&r!==void 0?r:(o=ee[n.id])===null||o===void 0?void 0:o.linkTrackingContent)!==null&&i!==void 0?i:!1;u=Mi(e.element,s)}else u=Qt(e);u&&n.core.track(u,e.context,e.timestamp)}),Cr()}function Mi(e,t){t===void 0&&(t=!1);var n,r,o,i,u=e,s=u.hostname||tt(u.href),l=u.href.replace(s,function(c){return c.toLowerCase()});if(!Vi.test(l))return n=u.id,r=cn(u),o=u.target,i=t?u.innerHTML:void 0,l||Et?.warn("Link click target URL empty",u),Qt({targetUrl:l||"about:invalid",elementId:n,elementClasses:r,elementTarget:o,elementContent:i})}function qi(e){if(e instanceof Element){if(typeof e.closest=="function")return e.closest(Ni);for(var t=e;t;){var n=t.tagName.toLowerCase();if(Ar.indexOf(n)!==-1)return t;t=t.parentElement}}return null}function Hi(e,t){var n=ee[e].linkTrackingContext,r=ee[e].linkTrackingFilter,o=t||window.event,i=o.which||o.button,u=o.composed?o.composedPath()[0]:o.target||o.srcElement,s=qi(u);!s||s.href==null||r&&!r(s)||(o.type==="click"?Er({element:s,context:Yt(n,s)},[e]):o.type==="mousedown"?i===1||i===2?(ee[e].lastButton=i,ee[e].lastTarget=s):delete ee[e].lastButton:o.type==="mouseup"&&(i===ee[e].lastButton&&s===ee[e].lastTarget&&Er({element:s,context:Yt(n,s)},[e]),delete ee[e].lastButton,delete ee[e].lastTarget))}function Gi(e,t){var n=e===void 0?{}:e,r=n.options,o=n.pseudoClicks,i=n.trackContent,u=n.context;ee[t]={linkTrackingContent:i,linkTrackingContext:u,linkTrackingPseudoClicks:o,linkTrackingFilter:wr(r)}}function Ji(e){he[e]=he[e]||Hi.bind(null,e),ee[e].linkTrackingPseudoClicks?(se(window,"mouseup",he[e],!0),se(window,"mousedown",he[e],!0)):se(window,"click",he[e],!0)}function Dr(e,t){fn(t,function(n){n.enableActivityTracking(e)})}function Ur(e,t){fn(t,function(n){n.trackPageView(e)})}var Rr=typeof window<"u"?kr():void 0;function Lr(e,t,n){if(Rr)return Ir(e,e,"js-".concat(rr),t,Rr,n)}var Wi="tagsjs_debug_mode",jr=e=>{let{tag:t="common"}=e,n=localStorage.getItem(Wi)==="true"||!1;return{log:(...r)=>{n&&console.log(`tagsjs(${t}):`,...r)},info:(...r)=>{n&&console.info(`tagsjs(${t}):`,...r)},warn:(...r)=>console.warn(`tagsjs(${t}):`,...r),error:(...r)=>console.error(`tagsjs(${t}):`,...r)}};var Fr=e=>{let{appId:t,collectorUrl:n,shouldTrackLinkClicks:r=!1}=e,o=jr({tag:"snowplow"});o.info("init");let i=[];r&&i.push(Or());let u=Lr("tagsjs.sp",n,{appId:t,discoverRootDomain:!0,cookieSameSite:"Lax",plugins:i});if(!u){o.error("failed to initialize tracker");return}Dr({minimumVisitLength:5,heartbeatDelay:5},[u.id]),r&&_r({trackContent:!0},[u.id]);let s=!1;(()=>{s||(Ur({},[u.id]),s=!0,o.info("tracked page view"))})()};var Xi=e=>{document.readyState==="loading"?window.addEventListener("DOMContentLoaded",e):e()},Br=Xi;Br(()=>{Fr({appId:"plus.rosenheim24.de",collectorUrl:"s.rosenheim24.de"})});})();