@convivainc/conviva-js-agent-tracker
Version:
Conviva JavaScript Agent SDK to auto-collect events and track application-specific events and state changes.
103 lines (102 loc) • 468 kB
JavaScript
/*!
* Browser tracker for Conviva v1.4.11 (http://bit.ly/sp-js)
* Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang
* Licensed under BSD-3-Clause
*/
'use strict';(function(Wa,Ic){"object"===typeof exports&&"undefined"!==typeof module?Ic(exports):"function"===typeof define&&define.amd?define(["exports"],Ic):(Wa="undefined"!==typeof globalThis?globalThis:Wa||self,Ic(Wa.convivaBrowserTracking={}))})(this,function(Wa){function Ic(b,a){(null==a||a>b.length)&&(a=b.length);for(var c=0,d=Array(a);c<a;c++)d[c]=b[c];return d}function si(b,a,c,d,e,f,g){try{var h=b[f](g),k=h.value}catch(l){return void c(l)}h.done?a(k):Promise.resolve(k).then(d,e)}function mg(b){return function(){var a=
this,c=arguments;return new Promise(function(d,e){function f(k){si(h,d,e,f,g,"next",k)}function g(k){si(h,d,e,f,g,"throw",k)}var h=b.apply(a,c);f(void 0)})}}function qb(b,a,c){a=Jc(a);a=ng()?Reflect.construct(a,c||[],Jc(b).constructor):a.apply(b,c);if(!a||"object"!=typeof a&&"function"!=typeof a){if(void 0!==a)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}else b=a;
return b}function ja(b,a){if(!(b instanceof a))throw new TypeError("Cannot call a class as a function");}function wm(b,a,c){if(ng())return Reflect.construct.apply(null,arguments);var d=[null];d.push.apply(d,a);d=new (b.bind.apply(b,d));return c&&$d(d,c.prototype),d}function ti(b,a){for(var c=0;c<a.length;c++){var d=a[c];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(b,ui(d.key),d)}}function ka(b,a,c){return a&&ti(b.prototype,a),c&&ti(b,c),Object.defineProperty(b,
"prototype",{writable:!1}),b}function Y(b,a){var c="undefined"!=typeof Symbol&&b[Symbol.iterator]||b["@@iterator"];if(!c){if(Array.isArray(b)||(c=og(b))||a&&b&&"number"==typeof b.length){c&&(b=c);var d=0;a=function(){};return{s:a,n:function(){return d>=b.length?{done:!0}:{done:!1,value:b[d++]}},e:function(h){throw h;},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var e,f=!0,g=!1;return{s:function(){c=
c.call(b)},n:function(){var h=c.next();return f=h.done,h},e:function(h){g=!0;e=h},f:function(){try{f||null==c.return||c.return()}finally{if(g)throw e;}}}}function pg(){return pg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(b,a,c){var d;for(d=b;!{}.hasOwnProperty.call(d,a)&&null!==(d=Jc(d)););if(d)return d=Object.getOwnPropertyDescriptor(d,a),d.get?d.get.call(3>arguments.length?b:c):d.value},pg.apply(null,arguments)}function Jc(b){return Jc=Object.setPrototypeOf?Object.getPrototypeOf.bind():
function(a){return a.__proto__||Object.getPrototypeOf(a)},Jc(b)}function rb(b,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(a&&a.prototype,{constructor:{value:b,writable:!0,configurable:!0}});Object.defineProperty(b,"prototype",{writable:!1});a&&$d(b,a)}function xm(b){try{return-1!==Function.toString.call(b).indexOf("[native code]")}catch(a){return"function"==typeof b}}function ng(){try{var b=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,
[],function(){}))}catch(a){}return(ng=function(){return!!b})()}function vi(b,a){var c=Object.keys(b);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(b);a&&(d=d.filter(function(e){return Object.getOwnPropertyDescriptor(b,e).enumerable}));c.push.apply(c,d)}return c}function ma(b){for(var a=1;a<arguments.length;a++){var c=null!=arguments[a]?arguments[a]:{};a%2?vi(Object(c),!0).forEach(function(d){var e=d;d=c[d];(e=ui(e))in b?Object.defineProperty(b,e,{value:d,enumerable:!0,configurable:!0,
writable:!0}):b[e]=d}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(c)):vi(Object(c)).forEach(function(d){Object.defineProperty(b,d,Object.getOwnPropertyDescriptor(c,d))})}return b}function ae(b,a){if(null==b)return{};var c;if(null==b)var d={};else{var e={};for(c in b)({}).hasOwnProperty.call(b,c)&&!a.includes(c)&&(e[c]=b[c]);d=e}if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(b);for(c=0;c<f.length;c++)e=f[c],a.includes(e)||{}.propertyIsEnumerable.call(b,
e)&&(d[e]=b[e])}return d}function Jb(){function b(A,z,B){return Object.defineProperty(A,z,{value:B,enumerable:!0,configurable:!0,writable:!0}),A[z]}function a(A,z,B,P){z=Object.create((z&&z.prototype instanceof d?z:d).prototype);P=new t(P||[]);return x(z,"_invoke",{value:k(A,B,P)}),z}function c(A,z,B){try{return{type:"normal",arg:A.call(z,B)}}catch(P){return{type:"throw",arg:P}}}function d(){}function e(){}function f(){}function g(A){["next","throw","return"].forEach(function(z){b(A,z,function(B){return this._invoke(z,
B)})})}function h(A,z){function B(M,oa,ia,qa){M=c(A[M],A,oa);if("throw"!==M.type){var za=M.arg;return(M=za.value)&&"object"==typeof M&&w.call(M,"__await")?z.resolve(M.__await).then(function(xa){B("next",xa,ia,qa)},function(xa){B("throw",xa,ia,qa)}):z.resolve(M).then(function(xa){za.value=xa;ia(za)},function(xa){return B("throw",xa,ia,qa)})}qa(M.arg)}var P;x(this,"_invoke",{value:function(M,oa){function ia(){return new z(function(qa,za){B(M,oa,qa,za)})}return P=P?P.then(ia,ia):ia()}})}function k(A,
z,B){var P=F;return function(M,oa){if(P===O)throw Error("Generator is already running");if(P===Z){if("throw"===M)throw oa;return{value:q,done:!0}}B.method=M;for(B.arg=oa;;){if(M=B.delegate)if(M=l(M,B)){if(M===R)continue;return M}if("next"===B.method)B.sent=B._sent=B.arg;else if("throw"===B.method){if(P===F)throw P=Z,B.arg;B.dispatchException(B.arg)}else"return"===B.method&&B.abrupt("return",B.arg);P=O;M=c(A,z,B);if("normal"===M.type){if(P=B.done?Z:I,M.arg===R)continue;return{value:M.arg,done:B.done}}"throw"===
M.type&&(P=Z,B.method="throw",B.arg=M.arg)}}}function l(A,z){var B=z.method,P=A.iterator[B];if(P===q)return z.delegate=null,"throw"===B&&A.iterator.return&&(z.method="return",z.arg=q,l(A,z),"throw"===z.method)||"return"!==B&&(z.method="throw",z.arg=new TypeError("The iterator does not provide a '"+B+"' method")),R;B=c(P,A.iterator,z.arg);return"throw"===B.type?(z.method="throw",z.arg=B.arg,z.delegate=null,R):(B=B.arg)?B.done?(z[A.resultName]=B.value,z.next=A.nextLoc,"return"!==z.method&&(z.method=
"next",z.arg=q),z.delegate=null,R):B:(z.method="throw",z.arg=new TypeError("iterator result is not an object"),z.delegate=null,R)}function r(A){var z={tryLoc:A[0]};1 in A&&(z.catchLoc=A[1]);2 in A&&(z.finallyLoc=A[2],z.afterLoc=A[3]);this.tryEntries.push(z)}function m(A){var z=A.completion||{};z.type="normal";delete z.arg;A.completion=z}function t(A){this.tryEntries=[{tryLoc:"root"}];A.forEach(r,this);this.reset(!0)}function p(A){if(A||""===A){var z=A[G];if(z)return z.call(A);if("function"==typeof A.next)return A;
if(!isNaN(A.length)){var B=-1;z=function M(){for(;++B<A.length;)if(w.call(A,B))return M.value=A[B],M.done=!1,M;return M.value=q,M.done=!0,M};return z.next=z}}throw new TypeError(typeof A+" is not iterable");}Jb=function(){return n};var q,n={},v=Object.prototype,w=v.hasOwnProperty,x=Object.defineProperty||function(A,z,B){A[z]=B.value},C="function"==typeof Symbol?Symbol:{},G=C.iterator||"@@iterator",H=C.asyncIterator||"@@asyncIterator",D=C.toStringTag||"@@toStringTag";try{b({},"")}catch(A){b=function(z,
B,P){return z[B]=P}}n.wrap=a;var F="suspendedStart",I="suspendedYield",O="executing",Z="completed",R={};C={};b(C,G,function(){return this});var ea=Object.getPrototypeOf;(ea=ea&&ea(ea(p([]))))&&ea!==v&&w.call(ea,G)&&(C=ea);var J=f.prototype=d.prototype=Object.create(C);return e.prototype=f,x(J,"constructor",{value:f,configurable:!0}),x(f,"constructor",{value:e,configurable:!0}),e.displayName=b(f,D,"GeneratorFunction"),n.isGeneratorFunction=function(A){A="function"==typeof A&&A.constructor;return!!A&&
(A===e||"GeneratorFunction"===(A.displayName||A.name))},n.mark=function(A){return Object.setPrototypeOf?Object.setPrototypeOf(A,f):(A.__proto__=f,b(A,D,"GeneratorFunction")),A.prototype=Object.create(J),A},n.awrap=function(A){return{__await:A}},g(h.prototype),b(h.prototype,H,function(){return this}),n.AsyncIterator=h,n.async=function(A,z,B,P,M){void 0===M&&(M=Promise);var oa=new h(a(A,z,B,P),M);return n.isGeneratorFunction(z)?oa:oa.next().then(function(ia){return ia.done?ia.value:oa.next()})},g(J),
b(J,D,"Generator"),b(J,G,function(){return this}),b(J,"toString",function(){return"[object Generator]"}),n.keys=function(A){var z=Object(A),B=[],P;for(P in z)B.push(P);return B.reverse(),function oa(){for(;B.length;){var ia=B.pop();if(ia in z)return oa.value=ia,oa.done=!1,oa}return oa.done=!0,oa}},n.values=p,t.prototype={constructor:t,reset:function(A){if(this.prev=0,this.next=0,this.sent=this._sent=q,this.done=!1,this.delegate=null,this.method="next",this.arg=q,this.tryEntries.forEach(m),!A)for(var z in this)"t"===
z.charAt(0)&&w.call(this,z)&&!isNaN(+z.slice(1))&&(this[z]=q)},stop:function(){this.done=!0;var A=this.tryEntries[0].completion;if("throw"===A.type)throw A.arg;return this.rval},dispatchException:function(A){function z(za,xa){return oa.type="throw",oa.arg=A,B.next=za,xa&&(B.method="next",B.arg=q),!!xa}if(this.done)throw A;for(var B=this,P=this.tryEntries.length-1;0<=P;--P){var M=this.tryEntries[P],oa=M.completion;if("root"===M.tryLoc)return z("end");if(M.tryLoc<=this.prev){var ia=w.call(M,"catchLoc"),
qa=w.call(M,"finallyLoc");if(ia&&qa){if(this.prev<M.catchLoc)return z(M.catchLoc,!0);if(this.prev<M.finallyLoc)return z(M.finallyLoc)}else if(ia){if(this.prev<M.catchLoc)return z(M.catchLoc,!0)}else{if(!qa)throw Error("try statement without catch or finally");if(this.prev<M.finallyLoc)return z(M.finallyLoc)}}}},abrupt:function(A,z){for(var B=this.tryEntries.length-1;0<=B;--B){var P=this.tryEntries[B];if(P.tryLoc<=this.prev&&w.call(P,"finallyLoc")&&this.prev<P.finallyLoc){var M=P;break}}M&&("break"===
A||"continue"===A)&&M.tryLoc<=z&&z<=M.finallyLoc&&(M=null);B=M?M.completion:{};return B.type=A,B.arg=z,M?(this.method="next",this.next=M.finallyLoc,R):this.complete(B)},complete:function(A,z){if("throw"===A.type)throw A.arg;return"break"===A.type||"continue"===A.type?this.next=A.arg:"return"===A.type?(this.rval=this.arg=A.arg,this.method="return",this.next="end"):"normal"===A.type&&z&&(this.next=z),R},finish:function(A){for(var z=this.tryEntries.length-1;0<=z;--z){var B=this.tryEntries[z];if(B.finallyLoc===
A)return this.complete(B.completion,B.afterLoc),m(B),R}},catch:function(A){for(var z=this.tryEntries.length-1;0<=z;--z){var B=this.tryEntries[z];if(B.tryLoc===A){A=B.completion;if("throw"===A.type){var P=A.arg;m(B)}return P}}throw Error("illegal catch attempt");},delegateYield:function(A,z,B){return this.delegate={iterator:p(A),resultName:z,nextLoc:B},"next"===this.method&&(this.arg=q),R}},n}function $d(b,a){return $d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,d){return c.__proto__=
d,c},$d(b,a)}function $a(b,a){var c=Array.isArray(b)?b:void 0;if(!c)a:{var d=null==b?null:"undefined"!=typeof Symbol&&b[Symbol.iterator]||b["@@iterator"];if(null!=d){var e,f,g,h=[],k=!0,l=!1;try{if(f=(d=d.call(b)).next,0===a){if(Object(d)!==d){c=void 0;break a}k=!1}else for(;!(k=(e=f.call(d)).done)&&(h.push(e.value),h.length!==a);k=!0);}catch(m){l=!0;var r=m}finally{try{if(!k&&null!=d.return&&(g=d.return(),Object(g)!==g)){c=void 0;break a}}finally{if(l)throw r;}}c=h}else c=void 0}if(!(b=c||og(b,a)))throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
return b}function Pb(b,a,c,d){var e=pg(Jc(1&d?b.prototype:b),a,c);return 2&d&&"function"==typeof e?function(f){return e.apply(c,f)}:e}function ac(b){var a=Array.isArray(b)?Ic(b):void 0;a||(a="undefined"!=typeof Symbol&&null!=b[Symbol.iterator]||null!=b["@@iterator"]?Array.from(b):void 0);if(!(b=a||og(b)))throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");return b}function ui(b){a:if("object"==
typeof b&&b){var a=b[Symbol.toPrimitive];if(void 0!==a){b=a.call(b,"string");if("object"!=typeof b)break a;throw new TypeError("@@toPrimitive must return a primitive value.");}b=String(b)}return"symbol"==typeof b?b:b+""}function T(b){"@babel/helpers - typeof";return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},T(b)}function og(b,a){if(b){if("string"==
typeof b)return Ic(b,a);var c={}.toString.call(b).slice(8,-1);return"Object"===c&&b.constructor&&(c=b.constructor.name),"Map"===c||"Set"===c?Array.from(b):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?Ic(b,a):void 0}}function Xe(b){var a="function"==typeof Map?new Map:void 0;return Xe=function(c){function d(){return wm(c,arguments,Jc(this).constructor)}if(null===c||!xm(c))return c;if("function"!=typeof c)throw new TypeError("Super expression must either be null or a function");
if(void 0!==a){if(a.has(c))return a.get(c);a.set(c,d)}return d.prototype=Object.create(c.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),$d(d,c)},Xe(b)}function wi(b,a){var c={},d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&0>a.indexOf(d)&&(c[d]=b[d]);if(null!=b&&"function"===typeof Object.getOwnPropertySymbols){var e=0;for(d=Object.getOwnPropertySymbols(b);e<d.length;e++)0>a.indexOf(d[e])&&Object.prototype.propertyIsEnumerable.call(b,d[e])&&(c[d[e]]=b[d[e]])}return c}
function be(b,a,c,d){function e(f){return f instanceof c?f:new c(function(g){g(f)})}return new (c||(c=Promise))(function(f,g){function h(r){try{l(d.next(r))}catch(m){g(m)}}function k(r){try{l(d["throw"](r))}catch(m){g(m)}}function l(r){r.done?f(r.value):e(r.value).then(h,k)}l((d=d.apply(b,a||[])).next())})}function ce(b,a){function c(l){return function(r){return d([l,r])}}function d(l){if(f)throw new TypeError("Generator is already executing.");for(;e;)try{if(f=1,g&&(h=l[0]&2?g["return"]:l[0]?g["throw"]||
((h=g["return"])&&h.call(g),0):g.next)&&!(h=h.call(g,l[1])).done)return h;if(g=0,h)l=[l[0]&2,h.value];switch(l[0]){case 0:case 1:h=l;break;case 4:return e.label++,{value:l[1],done:!1};case 5:e.label++;g=l[1];l=[0];continue;case 7:l=e.ops.pop();e.trys.pop();continue;default:if(!(h=e.trys,h=0<h.length&&h[h.length-1])&&(6===l[0]||2===l[0])){e=0;continue}if(3===l[0]&&(!h||l[1]>h[0]&&l[1]<h[3]))e.label=l[1];else if(6===l[0]&&e.label<h[1])e.label=h[1],h=l;else if(h&&e.label<h[2])e.label=h[2],e.ops.push(l);
else{h[2]&&e.ops.pop();e.trys.pop();continue}}l=a.call(b,e)}catch(r){l=[6,r],g=0}finally{f=h=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}var e={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},f,g,h,k;return k={next:c(0),"throw":c(1),"return":c(2)},"function"===typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k}function fb(b,a,c){if(c||2===arguments.length)for(var d=0,e=a.length,f;d<e;d++)!f&&d in a||(f||(f=Array.prototype.slice.call(a,0,d)),f[d]=
a[d]);return b.concat(f||Array.prototype.slice.call(a))}function ym(b){var a=0,c=0;var d="";var e=[];if(!b)return b;b+="";do{var f=Eb.indexOf(b.charAt(a++));var g=Eb.indexOf(b.charAt(a++));d=Eb.indexOf(b.charAt(a++));var h=Eb.indexOf(b.charAt(a++));var k=f<<18|g<<12|d<<6|h;f=k>>16&255;g=k>>8&255;k&=255;64===d?e[c++]=String.fromCharCode(f):64===h?e[c++]=String.fromCharCode(f,g):e[c++]=String.fromCharCode(f,g,k)}while(a<b.length);d=e.join("");return function(l){return decodeURIComponent(l.split("").map(function(r){return"%"+
("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""))}(d.replace(/\0+$/,""))}function zm(b){b=unescape(encodeURIComponent(b));for(var a="",c=0;c<b.length;){var d=b.charCodeAt(c++),e=b.charCodeAt(c++),f=b.charCodeAt(c++),g=d>>2;d=(d&3)<<4|e>>4;e=isNaN(e)?64:(e&15)<<2|f>>6;f=isNaN(f)?64:f&63;a+=Eb.charAt(g)+Eb.charAt(d)+Eb.charAt(e)+Eb.charAt(f)}return a}function qg(){var b={},a=[],c=[],d=[],e,f=function(g,h){null!=h&&""!==h&&(b[g]=h)};return{add:f,addDict:function(g){for(var h in g)Object.prototype.hasOwnProperty.call(g,
h)&&f(h,g[h])},addJson:function(g,h,k){k&&xi(k)&&(g={keyIfEncoded:g,keyIfNotEncoded:h,json:k},c.push(g),a.push(g))},addContextEntity:function(g){d.push(g)},getPayload:function(){return b},getJson:function(){return a},withJsonProcessor:function(g){e=g},build:function(){null===e||void 0===e?void 0:e(this,c,d);return b}}}function Am(b){return function(a,c,d){for(var e=function(l,r,m){l=JSON.stringify(l);if(b){m=a.add;if(l){var t=0,p=0,q=[];if(l){l=unescape(encodeURIComponent(l));do{var n=l.charCodeAt(t++);
var v=l.charCodeAt(t++);var w=l.charCodeAt(t++);var x=n<<16|v<<8|w;n=x>>18&63;v=x>>12&63;w=x>>6&63;x&=63;q[p++]=Eb.charAt(n)+Eb.charAt(v)+Eb.charAt(w)+Eb.charAt(x)}while(t<l.length);t=q.join("");l=l.length%3;l=(l?t.slice(0,l-3):t)+"===".slice(l||3)}l=l.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}m.call(a,r,l)}else a.add(m,l)},f=function(l,r){if(!l){var m=a.getPayload();if(b?m.cx:m.co){l=JSON;var t=l.parse;if(b){if(m=m.cx){switch(4-m.length%4){case 2:m+="==";break;case 3:m+="="}m=m.replace(/-/g,
"+").replace(/_/g,"/");m=ym(m)}}else m=m.co;l=t.call(l,m)}else l=void 0}l?l.dt=l.dt.concat(r.dt):l=r;return l},g=void 0,h=0;h<c.length;h++){var k=c[h];"cx"===k.keyIfEncoded?g=f(g,k.json):e(k.json,k.keyIfEncoded,k.keyIfNotEncoded)}c.length=0;d.length&&(c={sc:"sp/ctx/1-0-0",dt:fb([],d,!0)},g=f(g,c),d.length=0);g&&e(g,"cx","co")}}function xi(b){if(!yi(b))return!1;for(var a in b)if(Object.prototype.hasOwnProperty.call(b,a))return!0;return!1}function yi(b){return"undefined"!==typeof b&&null!==b&&(b.constructor===
{}.constructor||b.constructor===[].constructor)}function Bm(){var b=[],a=[];return{getGlobalPrimitives:function(){return b},getConditionalProviders:function(){return a},addGlobalContexts:function(c){for(var d=[],e=[],f=0;f<c.length;f++){var g=c[f];zi(g)?d.push(g):td(g)&&e.push(g)}b=b.concat(e);a=a.concat(d)},clearGlobalContexts:function(){a=[];b=[]},removeGlobalContexts:function(c){for(var d=function(f){zi(f)?a=a.filter(function(g){return JSON.stringify(g)!==JSON.stringify(f)}):td(f)&&(b=b.filter(function(g){return JSON.stringify(g)!==
JSON.stringify(f)}))},e=0;e<c.length;e++)d(c[e])},getApplicableContexts:function(c){a:{var d=0;for(var e=c.getJson();d<e.length;d++){var f=e[d];if("ue_px"===f.keyIfEncoded&&"object"===T(f.json.data)&&(f=f.json.data.schema,"string"==typeof f)){d=f;break a}}d=""}e=c.getPayload().e;f="string"===typeof e?e:"";e=[];var g=rg(b,c,f,d);e.push.apply(e,g);c=Cm(a,c,f,d);e.push.apply(e,c);return e}}}function Dm(b){return{addPluginContexts:function(a){var c=a?fb([],a,!0):[];b.forEach(function(d){try{d.contexts&&
c.push.apply(c,d.contexts())}catch(e){ra.error("Error adding plugin contexts",e)}});return c}}}function Ai(b){for(var a,c=[],d=1;d<arguments.length;d++)c[d-1]=arguments[d];return null!==(a=null===b||void 0===b?void 0:b.map(function(e){if("function"===typeof e)try{return e.apply(void 0,c)}catch(f){}else return e}).filter(Boolean))&&void 0!==a?a:[]}function Em(b){if("*"===b[0]||"*"===b[1])return!1;if(0<b.slice(2).length){var a=!1,c=0;for(b=b.slice(2);c<b.length;c++)if("*"===b[c])a=!0;else if(a)return!1;
return!0}return 2==b.length?!0:!1}function Bi(b){return(b=b.split("."))&&1<b.length?Em(b):!1}function Ci(b){b=/^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(b);if(null!==b&&Bi(b[1]))return b.slice(1,6)}function sg(b){if(b=Ci(b)){var a=b[0];return 5===b.length&&Bi(a)}return!1}function Fm(b){return Array.isArray(b)&&b.every(function(a){return"string"===typeof a})}function Di(b){return Fm(b)?b.every(function(a){return sg(a)}):
"string"===typeof b?sg(b):!1}function de(b){return xi(b)&&"sc"in b&&"dt"in b?"string"===typeof b.sc&&"object"===T(b.dt):!1}function Gm(b){var a=0;if(null!=b&&"object"===T(b)&&!Array.isArray(b)){if(Object.prototype.hasOwnProperty.call(b,"accept"))if(Di(b.accept))a+=1;else return!1;if(Object.prototype.hasOwnProperty.call(b,"reject"))if(Di(b.reject))a+=1;else return!1;return 0<a&&2>=a}return!1}function Ye(b){return"function"===typeof b&&1>=b.length}function td(b){return Ye(b)||de(b)}function Ei(b){return Array.isArray(b)&&
2===b.length?Array.isArray(b[1])?Ye(b[0])&&b[1].every(td):Ye(b[0])&&td(b[1]):!1}function Fi(b){return Array.isArray(b)&&2===b.length?Gm(b[0])?Array.isArray(b[1])?b[1].every(td):td(b[1]):!1:!1}function zi(b){return Ei(b)||Fi(b)}function Hm(b,a){var c=0,d=0,e=b.accept;Array.isArray(e)?b.accept.some(function(f){return Ze(f,a)})&&d++:"string"===typeof e&&Ze(e,a)&&d++;e=b.reject;Array.isArray(e)?b.reject.some(function(f){return Ze(f,a)})&&c++:"string"===typeof e&&Ze(e,a)&&c++;return 0<d&&0===c?!0:!1}function Ze(b,
a){if(!sg(b))return!1;b=Ci(b);a=/^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(a);a=null!==a?a.slice(1,6):void 0;if(b&&a){if(!Im(b[0],a[0]))return!1;for(var c=1;5>c;c++)if(!Gi(b[c],a[c]))return!1;return!0}return!1}function Im(b,a){a=a.split(".");b=b.split(".");if(a&&b){if(a.length!==b.length)return!1;for(var c=0;c<b.length;c++)if(!Gi(a[c],b[c]))return!1;return!0}return!1}function Gi(b,a){return b&&a&&"*"===b||b===a}function Hi(b){return Array.isArray(b)?
b:[b]}function rg(b,a,c,d){var e;b=Hi(b).map(function(f){a:if(de(f))f=[f];else{if(Ye(f)){b:{var g=void 0;try{var h={event:a.getPayload(),eventType:c,eventSchema:d};g=f(h);if(Array.isArray(g)&&g.every(de)||de(g)){var k=g;break b}k=void 0;break b}catch(l){}k=void 0}if(de(k)){f=[k];break a}else if(Array.isArray(k)){f=k;break a}}f=void 0}if(f&&0!==f.length)return f});return(e=[]).concat.apply(e,b.filter(function(f){return null!=f&&f.filter(Boolean)}))}function Cm(b,a,c,d){var e;b=Hi(b).map(function(f){a:{if(Ei(f)){var g=
f[0],h=!1;try{var k={event:a.getPayload(),eventType:c,eventSchema:d};h=g(k)}catch(l){h=!1}if(!0===h){f=rg(f[1],a,c,d);break a}}else if(Fi(f)&&Hm(f[0],d)){f=rg(f[1],a,c,d);break a}f=[]}if(f&&0!==f.length)return f});return(e=[]).concat.apply(e,b.filter(function(f){return null!=f&&f.filter(Boolean)}))}function Jm(b){return null==b?{type:"dtm",value:(new Date).getTime()}:"number"===typeof b?{type:"dtm",value:b}:"ttm"===b.type?{type:"ttm",value:b.value}:{type:"dtm",value:b.value||(new Date).getTime()}}
function Km(b){void 0===b&&(b={});var a=b.base64,c=b.corePlugins,d=null!==c&&void 0!==c?c:[];a=function(f,g,h){function k(q,n){q=r.getApplicableContexts(q);var v=[];n&&n.length&&v.push.apply(v,n);q&&q.length&&v.push.apply(v,q);return v}var l=Dm(g),r=Bm(),m=f,t={},p=null;return{track:function(q,n,v){q.withJsonProcessor(Am(m));q.add("eid",pc.v4());q.addDict(t);v=Jm(v);q.add(v.type,v.value.toString());n=k(q,l.addPluginContexts(n));n=n&&n.length?{sc:"sp/ctx/1-0-0",dt:n}:void 0;void 0!==n&&q.addJson("cx",
"co",n);g.forEach(function(x){try{x.beforeTrack&&x.beforeTrack(q)}catch(C){ra.error("Plugin beforeTrack",C)}});"function"===typeof h&&h(q);var w=q.build();g.forEach(function(x){try{x.afterTrack&&x.afterTrack(w)}catch(C){ra.error("Plugin afterTrack",C)}});return w},addPayloadPair:function(q,n){t[q]=n},configuration:b,getConfig:function(){return b},setConfig:function(q){q&&("undefined"!==typeof q.base64&&(m=b.base64=q.base64),"undefined"!==typeof q.lifecycleAutotracking&&(b.lifecycleAutotracking=q.lifecycleAutotracking),
"undefined"!==typeof q.cacheRefreshInterval&&(b.cacheRefreshInterval=q.cacheRefreshInterval),"undefined"!==typeof q.exceptionAutotracking&&(b.exceptionAutotracking=q.exceptionAutotracking),"undefined"!==typeof q.enablePeriodicHeartbeat&&(b.enablePeriodicHeartbeat=q.enablePeriodicHeartbeat),"undefined"!==typeof q.periodicHeartbeatInterval&&(b.periodicHeartbeatInterval=q.periodicHeartbeatInterval),"undefined"!==typeof q.enc&&(b.enc=q.enc),"undefined"!==typeof q.mend&&(b.mend=q.mend),"undefined"!==typeof q.maxLocalStorageQueueSize&&
(b.maxLocalStorageQueueSize=q.maxLocalStorageQueueSize),"undefined"!==typeof q.maxGetBytes&&(b.maxGetBytes=q.maxGetBytes),"undefined"!==typeof q.bufferSize&&(b.bufferSize=q.bufferSize),"undefined"!==typeof q.customEventTrackingConfiguration&&(b.customEventTrackingConfiguration=q.customEventTrackingConfiguration),"undefined"!==typeof q.networkRequestTrackingConfiguration&&(b.networkRequestTrackingConfiguration=q.networkRequestTrackingConfiguration),"undefined"!==typeof q.traceparentconfig&&(b.traceparentconfig=
q.traceparentconfig),"undefined"!==typeof q.baggageConfiguration&&(b.baggageConfiguration=q.baggageConfiguration),"undefined"!==typeof q.metaTagsTrackingConfiguration&&(b.metaTagsTrackingConfiguration=q.metaTagsTrackingConfiguration),"undefined"!==typeof q.evtStreamTrackingConfiguration&&(b.evtStreamTrackingConfiguration=q.evtStreamTrackingConfiguration),"undefined"!==typeof q.performanceContextConfig&&(b.performanceContextConfig=q.performanceContextConfig),"undefined"!==typeof q.configurationVersion&&
(b.configurationVersion=q.configurationVersion),"undefined"!==typeof q.catRcLastUpdatedTs&&(b.catRcLastUpdatedTs=q.catRcLastUpdatedTs),"undefined"!==typeof q.endpoint&&(b.endpoint=q.endpoint),"undefined"!==typeof q.controlIngestConfig&&(b.controlIngestConfig=q.controlIngestConfig),"undefined"!==typeof q.applicationContext&&(b.applicationContext=q.applicationContext),"undefined"!==typeof q.emitterConfiguration&&(b.emitterConfiguration=q.emitterConfiguration),"undefined"!==typeof q.di&&(b.di=q.di),
"undefined"!==typeof q.clickcc&&(b.clickcc=q.clickcc),"undefined"!==typeof q.collectionRateLimit&&(b.collectionRateLimit=q.collectionRateLimit),b.pageUrlTrackingConfig="undefined"!==typeof q.pageUrlTrackingConfig?q.pageUrlTrackingConfig:null,b.sessionReplayConfiguration="undefined"!==typeof q.sessionReplayConfiguration?q.sessionReplayConfiguration:null)},getBase64Encoding:function(){return m},setBase64Encoding:function(q){m=q},addPayloadDict:function(q){for(var n in q)Object.prototype.hasOwnProperty.call(q,
n)&&(t[n]=q[n])},resetPayloadPairs:function(q){t=yi(q)?q:{}},setTrackerVersion:function(q){t.tv=q},setTrackerNamespace:function(q){t.tna=q},setAppId:function(q){t.aid=q},setPlatform:function(q){t.p=q},setUserId:function(q){t.uid=q},setConversationId:function(q){p=q},getConversationId:function(){return p},setScreenResolution:function(q,n){t.res=q+"x"+n},setViewport:function(q,n){t.vp=q+"x"+n},setColorDepth:function(q){t.cd=q},setTimezone:function(q){t.tz=q},setLang:function(q){t.lang=q},setIpAddress:function(q){t.ip=
q},setUseragent:function(q){t.ua=q},addGlobalContexts:function(q){r.addGlobalContexts(q)},clearGlobalContexts:function(){r.clearGlobalContexts()},removeGlobalContexts:function(q){r.removeGlobalContexts(q)}}}(null!==a&&void 0!==a?a:!0,d,b.callback);var e=V(V({},a),{addPlugin:function(f){var g,h;f=f.plugin;d.push(f);null===(g=f.logger)||void 0===g?void 0:g.call(f,ra);null===(h=f.activateCorePlugin)||void 0===h?void 0:h.call(f,e)}});null===d||void 0===d?void 0:d.forEach(function(f){var g,h;null===(g=
f.logger)||void 0===g?void 0:g.call(f,ra);null===(h=f.activateCorePlugin)||void 0===h?void 0:h.call(f,e)});return e}function Kc(b){var a=b.event;b=a.sc;var c=a.dt;a=qg();b={sc:"sp/ue/1-0-0",dt:{sc:b,dt:c}};a.add("e","ue");a.addJson("ue_px","ue_pr",b);return a}function Lm(b){var a=b.pageUrl,c=b.pageTitle;b=b.referrer;var d=qg();d.add("e","pv");d.add("url",a);d.add("page",c);d.add("refr",b);return d}function ee(b){return Kc({event:{sc:"cv/re/1-0-1",dt:ud({name:b.name,data:b.data})}})}function Mm(b){return Kc({event:{sc:"cv/ve/1-0-5",
dt:ud({name:b.name,sid:b.sid,iid:b.iid,clid:b.clid,st:b.st,sst:b.sst,an:b.an,cl:b.cl,lv:b.lv,pn:b.pn,vid:b.vid,fw:b.fw,fwv:b.fwv,mn:b.mn,mv:b.mv,url:b.url,tags:b.tags,cen:b.cen,ced:b.ced,oldsc:b.oldsc,newsc:b.newsc,err:b.err,br:b.br,ft:b.ft,avgbr:b.avgbr})}})}function ud(b,a){void 0===a&&(a={});var c={},d;for(d in b)if(a[d]||null!==b[d]&&"undefined"!==typeof b[d])c[d]=b[d];return c}function vd(b){let a=b.length;for(;0<=--a;)b[a]=0}function tg(b,a,c,d,e){this.static_tree=b;this.extra_bits=a;this.extra_base=
c;this.elems=d;this.max_length=e;this.has_stree=b&&b.length}function ug(b,a){this.dyn_tree=b;this.max_code=0;this.stat_desc=a}function Qb(b,a,c,d,e){this.good_length=b;this.max_lazy=a;this.nice_length=c;this.max_chain=d;this.func=e}function Nm(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=$e;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;
this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new Uint16Array(1146);this.dyn_dtree=new Uint16Array(122);this.bl_tree=new Uint16Array(78);qc(this.dyn_ltree);qc(this.dyn_dtree);qc(this.bl_tree);this.bl_desc=
this.d_desc=this.l_desc=null;this.bl_count=new Uint16Array(16);this.heap=new Uint16Array(573);qc(this.heap);this.heap_max=this.heap_len=0;this.depth=new Uint16Array(573);qc(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.sym_end=this.sym_next=this.lit_bufsize=this.sym_buf=0}function fe(b){b=this.options=af.assign({level:Om,method:Pm,chunkSize:16384,windowBits:15,memLevel:8,strategy:Qm},b||{});b.raw&&0<b.windowBits?b.windowBits=-b.windowBits:b.gzip&&
0<b.windowBits&&16>b.windowBits&&(b.windowBits+=16);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new Ii;this.strm.avail_out=0;let a=ge.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(a!==bf)throw Error(Lc[a]);b.header&&ge.deflateSetHeader(this.strm,b.header);if(b.dictionary){b="string"===typeof b.dictionary?he.string2buf(b.dictionary):"[object ArrayBuffer]"===Ji.call(b.dictionary)?new Uint8Array(b.dictionary):b.dictionary;a=ge.deflateSetDictionary(this.strm,
b);if(a!==bf)throw Error(Lc[a]);this._dict_set=!0}}function vg(b,a){a=new fe(a);a.push(b,!0);if(a.err)throw a.msg||Lc[a.err];return a.result}function Rm(){this.strm=null;this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=
0;this.next=null;this.lens=new Uint16Array(320);this.work=new Uint16Array(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function ie(b){let a=this.options=af.assign({chunkSize:65536,windowBits:15,to:""},b||{});a.raw&&0<=a.windowBits&&16>a.windowBits&&(a.windowBits=-a.windowBits,0===a.windowBits&&(a.windowBits=-15));!(0<=a.windowBits&&16>a.windowBits)||b&&b.windowBits||(a.windowBits+=32);15<a.windowBits&&48>a.windowBits&&0===(a.windowBits&15)&&(a.windowBits|=15);this.err=0;this.msg=
"";this.ended=!1;this.chunks=[];this.strm=new Ii;this.strm.avail_out=0;b=bc.inflateInit2(this.strm,a.windowBits);if(b!==je)throw Error(Lc[b]);this.header=new Sm;bc.inflateGetHeader(this.strm,this.header);if(a.dictionary&&("string"===typeof a.dictionary?a.dictionary=he.string2buf(a.dictionary):"[object ArrayBuffer]"===Ki.call(a.dictionary)&&(a.dictionary=new Uint8Array(a.dictionary)),a.raw&&(b=bc.inflateSetDictionary(this.strm,a.dictionary),b!==je)))throw Error(Lc[b]);}function wg(b,a){a=new ie(a);
a.push(b);if(a.err)throw a.msg||Lc[a.err];return a.result}function xg(b){if(cf[b])return cf[b];var a=globalThis[b],c=a.prototype,d=b in Li?Li[b]:void 0;d=!(!d||!d.every(function(k){var l,r;return!(null==(r=null==(l=Object.getOwnPropertyDescriptor(c,k))?void 0:l.get)||!r.toString().includes("[native code]"))}));var e=b in Mi?Mi[b]:void 0;e=!(!e||!e.every(function(k){var l;return"function"===typeof c[k]&&(null==(l=c[k])?void 0:l.toString().includes("[native code]"))}));if(d&&e&&!globalThis.Zone)return cf[b]=
a.prototype;try{var f=document.createElement("iframe");document.body.appendChild(f);var g=f.contentWindow;if(!g)return a.prototype;var h=g[b].prototype;document.body.removeChild(f);return h?cf[b]=h:c}catch(k){return c}}function rc(b,a,c){var d,e="".concat(b,".").concat(String(c));if(yg[e])return yg[e].call(a);b=xg(b);b=null==(d=Object.getOwnPropertyDescriptor(b,c))?void 0:d.get;if(!b)return a[c];yg[e]=b;return b.call(a)}function Ni(b,a,c){var d="".concat(b,".").concat(String(c));if(zg[d])return zg[d].bind(a);
b=xg(b)[c];if("function"!==typeof b)return a[c];zg[d]=b;return b.bind(a)}function ke(b){var a=b&&"host"in b&&"mode"in b&&sb.host(b)||null;return!!(a&&"shadowRoot"in a&&sb.shadowRoot(a)===b)}function le(b){return"[object ShadowRoot]"===Object.prototype.toString.call(b)}function Tm(b){b.includes(" background-clip: text;")&&!b.includes(" -webkit-background-clip: text;")&&(b=b.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;"));return b}function Ag(b){try{var a=
b.rules||b.cssRules;if(!a)return null;var c=b.href;!c&&b.ownerNode&&b.ownerNode.ownerDocument&&(c=b.ownerNode.ownerDocument.location.href);var d=Array.from(a,function(e){return Oi(e,c)}).join("");return Tm(d)}catch(e){return null}}function Oi(b,a){if("styleSheet"in b){try{var c;if(!(c=Ag(b.styleSheet))){var d=b.cssText;if(3>d.split('"').length)c=d;else{var e=["@import","url(".concat(JSON.stringify(b.href),")")];""===b.layerName?e.push("layer"):b.layerName&&e.push("layer(".concat(b.layerName,")"));
b.supportsText&&e.push("supports(".concat(b.supportsText,")"));b.media.length&&e.push(b.media.mediaText);c=e.join(" ")+";"}}var f=c}catch(g){f=b.cssText}return b.styleSheet.href?df(f,b.styleSheet.href):f}f=b.cssText;"selectorText"in b&&b.selectorText.includes(":")&&(f=f.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2"));return a?df(f,a):f}function Bg(b){var a=b.element,c=b.maskInputOptions,d=b.tagName,e=b.type,f=b.maskInputFn;b=b.value||"";e=e&&e.toLowerCase();if(c[d.toLowerCase()]||e&&c[e])b=
f?f(b,a):"*".repeat(b.length);return b}function Um(b){var a=b.getContext("2d");if(!a)return!0;for(var c=0;c<b.width;c+=50)for(var d=0;d<b.height;d+=50){var e=a.getImageData;if((new Uint32Array(("__rrweb_original__"in e?e.__rrweb_original__:e).call(a,c,d,Math.min(50,b.width-c),Math.min(50,b.height-d)).data.buffer)).some(function(f){return 0!==f}))return!1}return!0}function Cg(b){var a=b.type;return b.hasAttribute("data-rr-is-password")?"password":a?a.toLowerCase():null}function Pi(b,a){var c;try{var d=
new URL(b,null!==a&&void 0!==a?a:window.location.href)}catch(e){return null}b=d.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(c=null==b?void 0:b[1])&&void 0!==c?c:null}function df(b,a){return(b||"").replace(Vm,function(c,d,e,f,g,h){e=e||g||h;d=d||f||"";if(!e)return c;if(Wm.test(e)||Xm.test(e)||Ym.test(e))return"url(".concat(d).concat(e).concat(d,")");if("/"===e[0]){var k="url(".concat(d),l=k.concat;c=-1<a.indexOf("//")?a.split("/").slice(0,3).join("/"):a.split("/")[0];c=c.split("?")[0];return l.call(k,
c+e).concat(d,")")}c=a.split("/");e=e.split("/");c.pop();e=Y(e);try{for(e.s();!(k=e.n()).done;)l=k.value,"."!==l&&(".."===l?c.pop():c.push(l))}catch(r){e.e(r)}finally{e.f()}return"url(".concat(d).concat(c.join("/")).concat(d,")")})}function Dg(b){return b.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function Zm(b,a){a=Array.from(a.childNodes);var c=[];if(1<a.length&&b&&"string"===typeof b)for(var d=Dg(b),e=1;e<a.length;e++)if(a[e].textContent&&"string"===typeof a[e].textContent)for(var f=Dg(a[e].textContent),
g=3;g<f.length;g++){var h=f.substring(0,g);if(2===d.split(h).length){for(g=f=d.indexOf(h);g<b.length;g++)if(Dg(b.substring(0,g)).length===f){c.push(b.substring(0,g));b=b.substring(g);break}break}}c.push(b);return c}function $m(){return Qi++}function an(b){if(b instanceof HTMLFormElement)return"form";b=b.tagName.toLowerCase();return bn.test(b)?"div":b}function cn(b,a){function c(l){return(l=l.exec(a.substring(d)))?(l=l[0],d+=l.length,l):""}if(""===a.trim())return a;for(var d=0,e=[];;){c(dn);if(d>=
a.length)break;var f=c(en);if(","===f.slice(-1))f=ef(b,f.substring(0,f.length-1)),e.push(f);else{var g="";f=ef(b,f);for(var h=!1;;){var k=a.charAt(d);if(""===k){e.push((f+g).trim());break}else if(h)")"===k&&(h=!1);else if(","===k){d+=1;e.push((f+g).trim());break}else"("===k&&(h=!0);g+=k;d+=1}}}return e.join(", ")}function ef(b,a){return a&&""!==a.trim()?Eg(b,a):a}function Eg(b,a){var c=Ri.get(b);c||(c=b.createElement("a"),Ri.set(b,c));if(!a)a="";else if(a.startsWith("blob:")||a.startsWith("data:"))return a;
c.setAttribute("href",a);return c.href}function Si(b,a,c,d){return d?"src"===c||"href"===c&&("use"!==a||"#"!==d[0])||"xlink:href"===c&&"#"!==d[0]||"background"===c&&("table"===a||"td"===a||"th"===a)?ef(b,d):"srcset"===c?cn(b,d):"style"===c?df(d,Eg(b)):"object"===a&&"data"===c?ef(b,d):d:d}function Ti(b,a,c){return("video"===b||"audio"===b)&&"autoplay"===a}function fn(b,a,c){try{if("string"===typeof a){if(b.classList.contains(a))return!0}else for(var d=b.classList.length;d--;)if(a.test(b.classList[d]))return!0;
if(c)return b.matches(c)}catch(e){}return!1}function ff(b,a,c){if(!b)return!1;if(b.nodeType!==b.ELEMENT_NODE)return c?ff(sb.parentNode(b),a,c):!1;for(var d=b.classList.length;d--;)if(a.test(b.classList[d]))return!0;return c?ff(sb.parentNode(b),a,c):!1}function Ui(b,a,c,d){if(b.nodeType===b.ELEMENT_NODE){if(!sb.childNodes(b).length)return!1}else{if(null===sb.parentElement(b))return!1;b=sb.parentElement(b)}try{if("string"===typeof a)if(d){if(b.closest(".".concat(a)))return!0}else{if(b.classList.contains(a))return!0}else if(ff(b,
a,d))return!0;if(c)if(d){if(b.closest(c))return!0}else if(b.matches(c))return!0}catch(e){}return!1}function gn(b,a,c){var d=b.contentWindow;if(d){var e=!1;try{var f=d.document.readyState}catch(h){return}if("complete"!==f){var g=setTimeout(function(){e||(a(),e=!0)},c);b.addEventListener("load",function(){clearTimeout(g);e=!0;a()})}else{if("about:blank"!==d.location.href||"about:blank"===b.src||""===b.src)return setTimeout(a,0),b.addEventListener("load",a);b.addEventListener("load",a)}}}function hn(b,
a,c){var d=!1;try{var e=b.sheet}catch(g){return}if(!e){var f=setTimeout(function(){d||(a(),d=!0)},c);b.addEventListener("load",function(){clearTimeout(f);d=!0;a()})}}function jn(b,a){var c=a.doc,d=a.blockClass,e=a.blockSelector,f=a.needsMask,g=a.inlineStylesheet,h=a.maskInputOptions,k=void 0===h?{}:h;h=a.maskTextFn;var l=a.maskInputFn,r=a.dataURLOptions,m=void 0===r?{}:r,t=a.inlineImages,p=a.recordCanvas,q=a.keepIframeSrcFn;r=a.newlyAddedElement;var n=void 0===r?!1:r;r=a.cssCaptured;r=void 0===r?
!1:r;a=a.mirror;a.hasNode(c)?(a=a.getId(c),a=1===a?void 0:a):a=void 0;switch(b.nodeType){case b.DOCUMENT_NODE:return"CSS1Compat"!==b.compatMode?{type:gb.Document,childNodes:[],compatMode:b.compatMode}:{type:gb.Document,childNodes:[]};case b.DOCUMENT_TYPE_NODE:return{type:gb.DocumentType,name:b.name,publicId:b.publicId,systemId:b.systemId,rootId:a};case b.ELEMENT_NODE:return kn(b,{doc:c,blockClass:d,blockSelector:e,inlineStylesheet:g,maskInputOptions:k,maskInputFn:l,dataURLOptions:m,inlineImages:t,
recordCanvas:p,keepIframeSrcFn:q,newlyAddedElement:n,rootId:a});case b.TEXT_NODE:return d=a,k=(e=sb.parentNode(b))&&e.tagName,e="",g="STYLE"===k?!0:void 0,(k="SCRIPT"===k?!0:void 0)?e="SCRIPT_PLACEHOLDER":r||(e=sb.textContent(b),g&&e&&(e=df(e,Eg(c)))),!g&&!k&&e&&f&&(e=h?h(e,sb.parentElement(b)):e.replace(/[\S]/g,"*")),{type:gb.Text,textContent:e||"",rootId:d};case b.CDATA_SECTION_NODE:return{type:gb.CDATA,textContent:"",rootId:a};case b.COMMENT_NODE:return{type:gb.Comment,textContent:sb.textContent(b)||
"",rootId:a};default:return!1}}function kn(b,a){var c=a.doc,d=a.inlineStylesheet,e=a.maskInputOptions,f=void 0===e?{}:e,g=a.maskInputFn;e=a.dataURLOptions;var h=void 0===e?{}:e,k=a.inlineImages,l=a.recordCanvas;e=a.keepIframeSrcFn;var r=a.newlyAddedElement,m=void 0===r?!1:r;r=a.rootId;a=fn(b,a.blockClass,a.blockSelector);for(var t=an(b),p={},q=b.attributes.length,n=0;n<q;n++){var v=b.attributes[n];Ti(t,v.name,v.value)||(p[v.name]=Si(c,t,v.name.toLowerCase(),v.value))}"link"===t&&d&&(d=Array.from(c.styleSheets).find(function(H){return H.href===
b.href}),q=null,d&&(q=Ag(d)),q&&(delete p.rel,delete p.href,p._cssText=q));"style"===t&&b.sheet&&(d=Ag(b.sheet))&&(1<b.childNodes.length&&(d=Zm(d,b).join("/* rr_split */")),p._cssText=d);if("input"===t||"textarea"===t||"select"===t)d=b.value,q=b.checked,"radio"!==p.type&&"checkbox"!==p.type&&"submit"!==p.type&&"button"!==p.type&&d?p.value=Bg({element:b,type:Cg(b),tagName:t,value:d,maskInputOptions:f,maskInputFn:g}):q&&(p.checked=q);"option"===t&&(b.selected&&!f.select?p.selected=!0:delete p.selected);
"dialog"===t&&b.open&&(p.rr_open_mode=b.matches("dialog:modal")?"modal":"non-modal");"canvas"===t&&l&&("2d"===b.__context?Um(b)||(p.rr_dataURL=b.toDataURL(h.type,h.quality)):"__context"in b||(f=b.toDataURL(h.type,h.quality),g=c.createElement("canvas"),g.width=b.width,g.height=b.height,g=g.toDataURL(h.type,h.quality),f!==g&&(p.rr_dataURL=f)));if("img"===t&&k){wd||(wd=c.createElement("canvas"),Vi=wd.getContext("2d"));var w=b.currentSrc||b.getAttribute("src")||"<unknown-src>",x=b.crossOrigin,C=function(){b.removeEventListener("load",
C);try{wd.width=b.naturalWidth,wd.height=b.naturalHeight,Vi.drawImage(b,0,0),p.rr_dataURL=wd.toDataURL(h.type,h.quality)}catch(H){if("anonymous"!==b.crossOrigin){b.crossOrigin="anonymous";b.complete&&0!==b.naturalWidth?C():b.addEventListener("load",C);return}console.warn("Cannot inline img src=".concat(w,"! Error: ").concat(H))}"anonymous"===b.crossOrigin&&(x?p.crossOrigin=x:b.removeAttribute("crossorigin"))};b.complete&&0!==b.naturalWidth?C():b.addEventListener("load",C)}if("audio"===t||"video"===
t)c=p,c.rr_mediaState=b.paused?"paused":"played",c.rr_mediaCurrentTime=b.currentTime,c.rr_mediaPlaybackRate=b.playbackRate,c.rr_mediaMuted=b.muted,c.rr_mediaLoop=b.loop,c.rr_mediaVolume=b.volume;m||(b.scrollLeft&&(p.rr_scrollLeft=b.scrollLeft),b.scrollTop&&(p.rr_scrollTop=b.scrollTop));a&&(c=b.getBoundingClientRect(),k=c.height,p={class:p.class,rr_width:"".concat(c.width,"px"),rr_height:"".concat(k,"px")});"iframe"!==t||e(p.src)||(b.contentDocument||(p.rr_src=p.src),delete p.src);var G;try{customElements.get(t)&&
(G=!0)}catch(H){}return{type:gb.Element,tagName:t,attributes:p,childNodes:[],isSVG:!("svg"!==b.tagName&&!b.ownerSVGElement)||void 0,needBlock:a,rootId:r,isCustom:G}}function Ja(b){return void 0===b||null===b?"":b.toLowerCase()}function ln(b,a){return a.comment&&b.type===gb.Comment||b.type===gb.Element&&(a.script&&("script"===b.tagName||"link"===b.tagName&&("preload"===b.attributes.rel||"modulepreload"===b.attributes.rel)&&"script"===b.attributes.as||"link"===b.tagName&&"prefetch"===b.attributes.rel&&
"string"===typeof b.attributes.href&&"js"===Pi(b.attributes.href))||a.headFavicon&&("link"===b.tagName&&"shortcut icon"===b.attributes.rel||"meta"===b.tagName&&(Ja(b.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Ja(b.attributes.name)||"icon"===Ja(b.attributes.rel)||"apple-touch-icon"===Ja(b.attributes.rel)||"shortcut icon"===Ja(b.attributes.rel)))||"meta"===b.tagName&&(a.headMetaDescKeywords&&Ja(b.attributes.name).match(/^description|keywords$/)||a.headMetaSocial&&
(Ja(b.attributes.property).match(/^(og|twitter|fb):/)||Ja(b.attributes.name).match(/^(og|twitter):/)||"pinterest"===Ja(b.attributes.name))||a.headMetaRobots&&("robots"===Ja(b.attributes.name)||"googlebot"===Ja(b.attributes.name)||"bingbot"===Ja(b.attributes.name))||a.headMetaHttpEquiv&&void 0!==b.attributes["http-equiv"]||a.headMetaAuthorship&&("author"===Ja(b.attributes.name)||"generator"===Ja(b.attributes.name)||"framework"===Ja(b.attributes.name)||"publisher"===Ja(b.attributes.name)||"progid"===
Ja(b.attributes.name)||Ja(b.attributes.property).match(/^article:/)||Ja(b.attributes.property).match(/^product:/))||a.headMetaVerification&&("google-site-verification"===Ja(b.attributes.name)||"yandex-verification"===Ja(b.attributes.name)||"csrf-token"===Ja(b.attributes.name)||"p:domain_verify"===Ja(b.attributes.name)||"verify-v1"===Ja(b.attributes.name)||"verification"===Ja(b.attributes.name)||"shopify-checkout-api-token"===Ja(b.attributes.name))))?!0:!1}function xd(b,a){var c=a.doc,d=a.mirror,e=
a.blockClass,f=a.blockSelector,g=a.maskTextClass,h=a.maskTextSelector,k=a.skipChild;k=void 0===k?!1:k;var l=a.inlineStylesheet,r=void 0===l?!0:l;l=a.maskInputOptions;var m=void 0===l?{}:l,t=a.maskTextFn,p=a.maskInputFn,q=a.slimDOMOptions;l=a.dataURLOptions;var n=void 0===l?{}:l;l=a.inlineImages;var v=void 0===l?!1:l;l=a.recordCanvas;var w=void 0===l?!1:l,x=a.onSerialize,C=a.onIframeLoad;l=a.iframeLoadTimeout;var G=void 0===l?5E3:l,H=a.onStylesheetLoad;l=a.stylesheetLoadTimeout;var D=void 0===l?5E3:
l;l=a.keepIframeSrcFn;var F=void 0===l?function(){return!1}:l;l=a.newlyAddedElement;l=void 0===l?!1:l;var I=a.cssCaptured;I=void 0===I?!1:I;var O=a.needsMask;a=a.preserveWhiteSpace;var Z=void 0===a?!0:a;O||(O=Ui(b,g,h,void 0===O));a=jn(b,{doc:c,mirror:d,blockClass:e,blockSelector:f,needsMask:O,inlineStylesheet:r,maskInputOptions:m,maskTextFn:t,maskInputFn:p,dataURLOptions:n,inlineImages:v,recordCanvas:w,keepIframeSrcFn:F,newlyAddedElement:l,cssCaptured:I});if(!a)return console.warn(b,"not serialized"),
null;l=d.hasNode(b)?d.getId(b):ln(a,q)||!Z&&a.type===gb.Text&&!a.textContent.replace(/^\s+|\s+$/gm,"").length?-2:Qi++;a=Object.assign(a,{id:l});d.add(b,a);if(-2===l)return null;x&&x(b);l=!k;a.type===gb.Element&&(l=l&&!a.needBlock,delete a.needBlock,(I=sb.shadowRoot(b))&&le(I)&&(a.isShadowHost=!0));if((a.type===gb.Document||a.type===gb.Element)&&l){q.headWhitespace&&a.type===gb.Element&&"head"===a.tagName&&(Z=!1);k={doc:c,mirror:d,blockClass:e,blockSelector:f,needsMask:O,maskTextClass:g,maskTextSelector:h,
skipChild:k,inlineStylesheet:r,maskInputOptions:m,maskTextFn:t,maskInputFn:p,slimDOMOptions:q,dataURLOptions:n,inlineImages:v,recordCanvas:w,preserveWhiteSpace:Z,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:G,onStylesheetLoad:H,stylesheetLoadTimeout:D,keepIframeSrcFn:F,cssCaptured:!1};if(a.type!==gb.Element||"textarea"!==a.tagName||void 0===a.attributes.value)for(a.type===gb.Element&&void 0!==a.attributes._cssText&&"string"===typeof a.attributes._cssText&&(k.cssCaptured=!0),l=0,I=Array.from(sb.childNodes(b));l<
I.length;l++){var R=xd(I[l],k);R&&a.childNodes.push(R)}l=null;if(b.nodeType===b.ELEMENT_NODE&&(l=sb.shadowRoot(b)))for(I=0,R=Array.from(sb.childNodes(l));I<R.length;I++){var ea=xd(R[I],k);ea&&(le(l)&&(ea.isShadow=!0),a.childNodes.push(ea))}}(k=sb.parentNode(b))&&ke(k)&&le(k)&&(a.isShadow=!0);a.type===gb.Element&&"iframe"===a.tagName&&gn(b,function(){var J=b.contentDocument;J&&C&&(J=xd(J,{doc:J,mirror:d,blockClass:e,blockSelector:f,needsMask:O,maskTextClass:g,maskTextSelector:h,skipChild:!1,inlineStylesheet:r,
maskInputOptions:m,maskTextFn:t,maskInputFn:p,slimDOMOptions:q,dataURLOptions:n,inlineImages:v,recordCanvas:w,preserveWhiteSpace:Z,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:G,onStylesheetLoad:H,stylesheetLoadTimeout:D,keepIframeSrcFn:F}))&&C(b,J)},G);a.type===gb.Element&&"link"===a.tagName&&"string"===typeof a.attributes.rel&&("stylesheet"===a.attributes.rel||"preload"===a.attributes.rel&&"string"===typeof a.attributes.href&&"css"===Pi(a.attributes.href))&&hn(b,function(){if(H){var J=xd(b,{doc:c,
mirror:d,blockClass:e,blockSelector:f,needsMask:O,maskTextClass:g,maskTextSelector:h,skipChild:!1,inlineStylesheet:r,maskInputOptions:m,maskTextFn:t,maskInputFn:p,slimDOMOptions:q,dataURLOptions:n,inlineImages:v,recordCanvas:w,preserveWhiteSpace:Z,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:G,onStylesheetLoad:H,stylesheetLoadTimeout:D,keepIframeSrcFn:F});J&&H(b,J)}},D);return a}function mn(b,a){a=a||{};var c=a.mirror;c=void 0===c?new Wi:c;var d=a.blockClass,e=a.blockSelector,f=a.maskTextClass,
g=a.maskTextSelector,h=a.inlineStylesheet,k=a.inlineImages,l=a.recordCanvas,r=a.maskAllInputs;r=void 0===r?!1:r;var m=a.slimDOM;m=void 0===m?!1:m;var t=a.keepIframeSrcFn;return xd(b,{doc:b,mirror:c,blockClass:void 0===d?"rr-block":d,blockSelector:void 0===e?null:e,maskTextClass:void 0===f?"rr-mask":f,maskTextSelector:void 0===g?null:g,skipChild:!1,inlineStylesheet:void 0===h?!0:h,maskInputOptions:!0===r?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,
time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===r?{password:!0}:r,maskTextFn:a.maskTextFn,maskInputFn:a.maskInputFn,slimDOMOptions:!0===m||"all"===m?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===m,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===m?{}:m,dataURLOptions:a.dataURLOptions,inlineImages:void 0===k?!1:k,recordCanvas:void 0===l?!1:l,preserveWhiteSpace:a.preserveWhiteSpace,onSerialize:a.onSerialize,
onIframeLoad:a.onIframeLoad,iframeLoadTimeout:a.iframeLoadTimeout,onStylesheetLoad:a.onStylesheetLoad,stylesheetLoadTimeout:a.stylesheetLoadTimeout,keepIframeSrcFn:void 0===t?function(){return!1}:t,newlyAddedElement:!1})}function nn(b){return b[0].toUpperCase()+b.slice(1)}function yd(b,a){(new on(a)).stringify(b)}function Fg(b,a){var c=new b.constructor,d;for(d in b)if(Object.prototype.hasOwnProperty.call(b,d)&&"proxyCache"!==d){var e=b[d],f=T(e);"parent"===d&&"object"===f?a&&(c[d]=a):"source"===
d?c[d]=e:Array.isArray(e)?c[d]=e.map(function(g){return Fg(g,c)}):("object"===f&&null!==e&&(e=Fg(e)),c[d]=e)}return c}function Xi(b){return b.map(function(a){a.nodes&&(a.nodes=Xi(a.nodes));delete a.source;return a})}functio