!function(){"use strict";var e="__us_privacy",t="__tcfapi",n="__gppapi",r="li_config",o="pre_lips",i="__uspapiLocator",a="__tcfapiLocator",c="__gppLocator";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function s(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var u={},l={};function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}var p={},f="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",h=new RegExp("^".concat(f,"$"),"i"),v=!!String.prototype.trim;function g(e){return null!=e}function m(e){return"[object Array]"===Object.prototype.toString.call(e)}function w(e){return v?(""+e).trim():(""+e).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function y(e){return"string"==typeof e}function S(e){return!!e&&"object"==d(e)&&!m(e)}function E(e,t){return new Date((new Date).getTime()+e*t)}function C(e,t,n){if(S(t)){var r=void 0;return(r="message"in t&&"string"==typeof t.message?new Error(n||t.message):new Error(n)).name=e,"stack"in t&&"string"==typeof t.stack&&(r.stack=t.stack),"lineNumber"in t&&"number"==typeof t.lineNumber&&(r.lineNumber=t.lineNumber),"columnNumber"in t&&"number"==typeof t.columnNumber&&(r.columnNumber=t.columnNumber),r}return(r=Error(n)).name=e,r}var b=function(){return b=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)return t.call(n,o[0]),this;var i=function o(i){r.off(e,o),t.call(n,i)};return i._=t,this.on(e,i,n)},e.prototype.emit=function(e,t){var n;(this.data.h[e]||[]).forEach((function(e){return e.callback(t)}));var r=this.data.q[e]||[];return this.data=b(b({},this.data),{q:b(b({},this.data.q),(n={},n[e]=I(I([],r.length0},p.isObject=S,p.isRecord=function(e){return S(e)},p.isString=y,p.isUUID=function(e){return!!e&&h.test(w(e))},p.nonNull=g,p.onNonNull=function(e,t){return null!=e?t(e):e},p.safeToString=function(e){return"object"==d(e)?JSON.stringify(e):""+e},p.strEqualsIgnoreCase=function(e,t){return y(e)&&y(t)&&w(e.toLowerCase())===w(t.toLowerCase())},p.trim=w,p.wrapError=C;for(var k=[],L=0;L<64;)k[L]=0|4294967296*Math.sin(++L%Math.PI);for(var A,x=18,D=[],N=[];x>1;x--)for(A=x;A<320;)D[A+=x]=1;function R(e,t){return 4294967296*Math.pow(e,1/t)|0}for(A=0;A<64;)D[++x]||(N[A]=R(x,2),D[A++]=R(x,3));function F(e,t){return e>>>t|e<<-t}var j=Object.freeze({__proto__:null,md5:function(e){var t,n,r,o=[t=1732584193,n=4023233417,~t,~n],i=[],a=unescape(encodeURI(e))+"€",c=a.length;for(e=--c/4+2|15,i[--e]=8*c;~c;)i[c>>2]|=a.charCodeAt(c)<<8*c--;for(L=a=0;L>4]+k[a]+~~i[L|15&[a,5*a+1,3*a+5,7*a][c]])<<(c=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*c+a++%4])|r>>>-c),t,n])t=0|c[1],n=c[2];for(a=4;a;)o[--a]+=c[a]}for(e="";a<32;)e+=(o[a>>3]>>4*(1^a++)&15).toString(16);return e},sha1:function(e){var t,n,r,o,i,a=[],c=[n=1732584193,r=4023233417,~n,~r,3285377520],s=[],u=unescape(encodeURI(e))+"€",l=u.length;for(s[e=--l/4+2|15]=8*l;~l;)s[l>>2]|=u.charCodeAt(l)<<8*~l--;for(t=l=0;t>2]+((u=n[0])<<5|u>>>27),u,r<<30|r>>>2,o,i])u=a[l-3]^a[l-8]^a[l-14]^a[l-16],r=n[1],o=n[2],i=n[3];for(l=5;l;)c[--l]+=n[l]}for(u="";l<40;)u+=(c[l>>3]>>4*(7-l++)&15).toString(16);return u},sha256:function(e){var t=N.slice(x=A=0,8),n=[],r=unescape(encodeURI(e))+"€",o=r.length;for(n[e=--o/4+2|15]=8*o;~o;)n[o>>2]|=r.charCodeAt(o)<<8*~o--;for(o=[];x>>10)+o[A-7]+(F(r=o[A-15],7)^F(r,18)^r>>>3)+o[A-16])+R.pop()+(F(r=R[4],6)^F(r,11)^F(r,25))+(r&R[5]^~r&R[6])+D[A++];for(A=8;A;)t[--A]+=R[A]}for(r="";A<64;)r+=(t[A>>3]>>4*(7-A++)&15).toString(16);return r}}),M=p,U=s(j),T=function(e,t){return T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},T(e,t)};function B(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}T(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var P=function(){return P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n255)return null;var n,r="";for(t=0;t>2,o[1]=(3&e.charCodeAt(t))<<4,e.length>t+2?(o[1]|=e.charCodeAt(t+1)>>4,o[2]=(15&e.charCodeAt(t+1))<<2,o[2]|=e.charCodeAt(t+2)>>6,o[3]=63&e.charCodeAt(t+2)):e.length>t+1&&(o[1]|=e.charCodeAt(t+1)>>4,o[2]=(15&e.charCodeAt(t+1))<<2);for(var i=0;i=0&&n<64?$[n]:void 0}}return r}(e);return t||""}var K=/[+/]|=+$/g,Z={"+":"-","/":"_"};function ee(e){return Z[e]||""}function te(e){var t=null,n=encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt("0x"+t,16))}));try{t=window&&M.isFunction(window.btoa)?window.btoa:Y}catch(e){t=Y}return t(n).replace(K,ee)}var ne=function(){return/(\s+)?[a-f0-9]{32,64}(\s+)?/gi},re=new Map([[32,"md5"],[40,"sha1"],[64,"sha256"]]);function oe(e){var t=ie(e);return!!t&&re.has(t.length)}function ie(e){var t=e.match(ne());return t&&t.map(M.trim)[0]}function ae(e){var t=e.toLowerCase();return{md5:U.md5(t),sha1:U.sha1(t),sha256:U.sha256(t)}}var ce=function(){return/\S+(@|%40)\S+\.\S+/};function se(e){return ce().test(e)}function ue(e){for(var t=function(e){for(var t=[],n=new RegExp("([\\w\\d.+-]+(@|%40)[\\w\\d-]+.[\\w\\d.-]+)","g"),r=n.exec(e);r;)t.push(M.trim(r[1])),r=n.exec(e);return t}(e),n=[],r=e,o=0;o-1){var c=M.trim(M.safeToString(n[i])),s=(t=void 0,(t=c.match(ce()))&&t.map(M.trim)[0]),u=ie(c);if(s){var l=ae(he(s));return ye({hashedEmail:[l.md5,l.sha1,l.sha256]},e)}if(u&&oe(u))return ye({hashedEmail:[u.toLowerCase()]},e)}}return e},function(e){var t=e.eventSource||{};return Object.keys(t).forEach((function(e){var n=e.toLowerCase(),r=t[e];ge.indexOf(n)>-1&&M.isArray(r)&&r.length>10&&(r.length=10)})),{}}];function ye(e,t){var n={};function r(e){return M.isObject(e)?e:{}}function o(e){return Object.keys(e)}var i=r(e),a=r(t);return o(i).forEach((function(e){n[e]=i[e]})),o(a).forEach((function(e){n[e]=a[e]})),n}var Se=function(){function e(e){void 0===e&&(e=[]),this.tuples=e}return e.prototype.add=function(e,t,n){void 0===n&&(n={});var r=n.stripEmpty,o=void 0===r||r,i=n.prepend;return""===e||o&&""===t?this:void 0!==i&&i?(this.tuples.unshift([e,t]),this):(this.tuples.push([e,t]),this)},e.prototype.addOptional=function(e,t,n){return void 0===n&&(n={}),M.nonNull(t)?this.add(e,t,n):this},e.prototype.addParamsMap=function(e){var t=this;return Object.keys(e).forEach((function(n){var r=e[n];M.nonNull(r)&&(M.isArray(r)?r.forEach((function(e){return t.add(n,e)})):t.add(n,r))})),this},e.prototype.copy=function(){return new e(this.tuples.slice())},e.prototype.filteredCopy=function(t){return new e(this.tuples.filter((function(e){var n=e[0],r=e[1];return t(n,r)})))},e.prototype.toQueryString=function(){var e="";return this.tuples.forEach((function(t){var n=t[0],r=t[1],o=0===e.length?"?":"&";e="".concat(e).concat(o).concat(encodeURIComponent(n),"=").concat(encodeURIComponent(r))})),e},e}();function Ee(e){return null===e?"":M.onNonNull(e,U.md5)}var Ce="full",be="no_path";var Ie=["setemail","setemailhash","sethashedemail"],_e=function(){function e(t,n){this.data=e.safeFiddle(t,n),this.eventBus=n}return e.safeFiddle=function(e,t){try{return n=JSON.parse(JSON.stringify(e)),M.isObject(n.eventSource)?we.reduce((function(e,t){return ye(e,t(e))}),n):n}catch(e){return t.emitErrorWithMessage("StateCombineWith","Error while extracting event data",e),{}}var n},e.prototype.combineWith=function(t){return new e(ye(this.data,t),this.eventBus)},e.prototype.sendsPixel=function(){var e=M.isObject(this.data.eventSource)?this.data.eventSource:{},t=Object.keys(e).filter((function(e){return"eventname"===e.toLowerCase()||"event"===e.toLowerCase()})),n=t&&t.length>=1&&t[0],r=n&&M.trim(e[n]);return!r||-1===Ie.indexOf(r.toLowerCase())},e.prototype.asQuery=function(){var e,t,n,r=this.data,o=(new Se).addOptional("aid",r.appId).addOptional("did",r.distributorId).addOptional("se",M.onNonNull(r.eventSource,(function(e){return te(JSON.stringify(e,le))}))).addOptional("duid",r.liveConnectId).addOptional("tv",r.trackerVersion);if(M.nonNull(r.pageUrl)){var i=function(e){if(void 0===e.pageUrl||0===e.pageUrl.length)return["",!1,[]];if(function(e){return!(void 0!==e.urlCollectionMode&&e.urlCollectionMode!==Ce||void 0!==e.queryParametersFilter&&""!==e.queryParametersFilter)}(e))return[e.pageUrl,!1,[]];var t=new ve(e.pageUrl),n=function(e){var t=fe(e),n=[];return Object.keys(t).forEach((function(e){n.push([e,pe(t,e)])})),n}(t.search),r=function(e,t){return t.urlCollectionMode===be&&e.pathname.length>1}(t,e),o=function(e,t){if(void 0===t.queryParametersFilter||""===t.queryParametersFilter)return[];var n=new RegExp(t.queryParametersFilter);return e.map((function(e){return e[0]})).filter((function(e){return n.test(e)}))}(n,e);return r&&(t.pathname="/"),o.length>0&&(t.search=function(e,t){var n=e.filter((function(e){return-1===t.indexOf(e[0])})).map((function(e){return"".concat(e[0],"=").concat(e[1])}));return n.length>0?"?".concat(n.join("&")):""}(n,o)),[t.toString(),r,o]}(r),a=i[0],c=i[1],s=i[2];o.add("pu",a).addOptional("pu_rp",c?"1":void 0).add("pu_rqp",s.join(","))}return o.addOptional("ae",M.onNonNull(r.errorDetails,(function(e){return te(JSON.stringify(e))}))),M.isArray(r.retrievedIdentifiers)&&r.retrievedIdentifiers.forEach((function(e){return o.add("ext_".concat(e.name),e.value)})),M.isArray(r.hashesFromIdentifiers)&&r.hashesFromIdentifiers.forEach((function(e){return o.add("scre","".concat(e.md5,",").concat(e.sha1,",").concat(e.sha256))})),o.addOptional("li_did",null===(e=r.decisionIds)||void 0===e?void 0:e.join(",")).addOptional("e",null===(t=r.hashedEmail)||void 0===t?void 0:t.join(",")).addOptional("us_privacy",r.usPrivacyString).addOptional("wpn",r.wrapperName).addOptional("gdpr",M.onNonNull(r.gdprApplies,(function(e){return e?"1":"0"}))).addOptional("n3pc",r.privacyMode?"1":void 0).addOptional("n3pct",r.privacyMode?"1":void 0).addOptional("nb",r.privacyMode?"1":void 0).addOptional("gdpr_consent",r.gdprConsent).addOptional("refr",r.referrer).addOptional("c",r.contextElements).addOptional("gpp_s",r.gppString).addOptional("gpp_as",null===(n=r.gppApplicableSections)||void 0===n?void 0:n.join(",")).addOptional("cd",r.cookieDomain).addOptional("ic",Ee(r.resolvedIdCookie),{stripEmpty:!1}),o},e}();function Oe(e){void 0===e&&(e=window);for(var t,n=Ae((function(){return e.location.ancestorOrigins}))||[],r=[],o=e;o!==top;)r.push(o),o=o.parent;r.push(o);for(var i=function(e){t=Ae((function(){return r[e].location.href})),0!==e&&(t||(t=Ae((function(){return r[e-1].document.referrer}))),t||(t=n[e-1]))},a=r.length-1;a>=0&&!t;a--)i(a);return t}function ke(e,t,n){if(!e&&t&&""!==t&&n){var r=function(e,t){for(var n=window.document.querySelectorAll(e),r="",o=0;o-1})};function Re(e,t){if(e&&e.appId&&e.distributorId){var n=e.distributorId;delete e.distributorId,t.emitError("AppIdAndDistributorIdPresent",new Error("Event contains both appId: ".concat(e.appId," and distributorId: ").concat(n,". Ignoring distributorId")))}return e}var Fe="idCookie",je=function(){function e(e,t,n){var r,o,i=this,a=e||{identityResolutionConfig:{}};this.eventBus=n,this.calls=t,this.idexConfig=a.identityResolutionConfig||{},this.externalIds=a.retrievedIdentifiers||[],this.source=this.idexConfig.source||"unknown",this.publisherId=this.idexConfig.publisherId||"any",this.url=this.idexConfig.url||z,this.timeout=this.idexConfig.ajaxTimeout||a.ajaxTimeout||5e3,this.requestedAttributes=this.idexConfig.requestedAttributes||J,this.privacyMode=null!==(r=a.privacyMode)&&void 0!==r&&r,this.resolvedIdCookie=a.resolvedIdCookie,this.generateIdCookie="generated"===this.idexConfig.idCookieMode,this.peopleVerifiedId=a.peopleVerifiedId,this.query=(new Se).addOptional("duid",a.peopleVerifiedId).addOptional("us_privacy",a.usPrivacyString).addOptional("gdpr",M.onNonNull(a.gdprApplies,(function(e){return e?1:0}))).addOptional("n3pc",a.privacyMode?1:void 0).addOptional("gdpr_consent",a.gdprConsent).addOptional("did",a.distributorId).addOptional("gpp_s",a.gppString).addOptional("gpp_as",null===(o=a.gppApplicableSections)||void 0===o?void 0:o.join(",")).addOptional("cd",a.cookieDomain).addOptional("ic",Ee(a.resolvedIdCookie),{stripEmpty:!1}),this.externalIds.forEach((function(e){i.query.add(e.name,e.value)})),this.requestedAttributes.forEach((function(e){i.query.add("resolve",e)}))}return e.prototype.attributeResolutionAllowed=function(e){return"uid2"===e?!this.privacyMode:e!==Fe},e.prototype.filterParams=function(e){var t=this;return e.filteredCopy((function(e,n){return"resolve"!==e||!!M.isString(n)&&t.attributeResolutionAllowed(n)}))},e.prototype.enrichExtraIdentifiers=function(e,t){var n,r=t.tuples.filter((function(e){return"resolve"===e[0]})).map((function(e){return e[1]})),o=P({},e);return n=Fe,r.indexOf(n)>-1&&(this.generateIdCookie&&this.peopleVerifiedId?o[Fe]=this.peopleVerifiedId:this.resolvedIdCookie&&(o[Fe]=this.resolvedIdCookie)),o},e.prototype.responseReceived=function(e,t){var n=this;return function(r,o){var i={};if(r)try{var a=JSON.parse(r);M.isObject(a)&&(i=a)}catch(e){n.eventBus.emitError("IdentityResolverParser",e)}var c=function(e){if(M.isObject(e)&&"getResponseHeader"in e&&M.isFunction(e.getResponseHeader)){var t=e.getResponseHeader("expires");if(t)return new Date(t)}}(o);e(n.enrichExtraIdentifiers(i,t),{expiresAt:c})}},e.prototype.buildUrl=function(e){return"".concat(this.url,"/").concat(this.source,"/").concat(this.publisherId).concat(this.filterParams(e).toQueryString())},e.prototype.getUrl=function(e){var t=this.query.copy().addParamsMap(null!=e?e:{});return this.buildUrl(t)},e.prototype.resolve=function(e,t,n){try{var r=this.query.copy().addParamsMap(null!=n?n:{});this.calls.ajaxGet(this.buildUrl(r),this.responseReceived(e,r),t,this.timeout)}catch(e){t&&M.isFunction(t)&&t(e),this.eventBus&&this.eventBus.emitError("IdentityResolve",e)}},e}();function Me(e){return"number"==typeof e&&e>=0?new M.ReplayEmitter(e):new M.ReplayEmitter(5)}function Ue(e){M.isFunction(e.emitErrorWithMessage)&&M.isFunction(e.emitError)||(e.emitErrorWithMessage=function(t,n,r){void 0===r&&(r={});var o=M.wrapError(t,n,r);return e.emit(M.ERRORS_CHANNEL,o)},e.emitError=function(t,n){return e.emitErrorWithMessage(t,n.message,n)})}function Te(e){return void 0===e&&(e=5),Me(e)}function Be(e){var t=window[e].eventBus||window[H];return Ue(t),t}var Pe=Object.freeze({__proto__:null,GlobalEventBus:function(e,t,n){try{return window||n(new Error("Bus can only be attached to the window, which is not present")),window&&!window[e]&&(window[e]=Me(t)),Ue(window[e]),window[e]}catch(e){n(e)}},LocalEventBus:Te,getAvailableBus:Be}),Ve="_li_dcdm_c";function He(e){var t=e.getCookie(Ve);if(t)return t;for(var n=document.domain||document.location&&document.location.host||window&&window.location&&window.location.host||"localhost",r=n.split("."),o=r.length;o>0;o--){var i=".".concat(r.slice(o-1,r.length).join("."));if(e.setCookie(Ve,i,void 0,"Lax",i),e.getCookie(Ve))return i}return".".concat(n)}var We={cookie:"cookie",localStorage:"ls",none:"none",disabled:"disabled"},Qe=function(e){var t=e.privacyMode?We.disabled:e.storageStrategy||We.cookie;return P(P({},e),{storageStrategy:t})},qe=M.expiresInDays(30),Ge="li_did",ze="lidids.",Je=function(e,t,n){return n.indexOf(e)===t},Xe=function(e){return e&&M.trim(e).length>0};var $e="0123456789ABCDEFGHJKMNPQRSTVWXYZ",Ye=$e.length,Ke=Math.pow(2,48)-1,Ze=10,et=16,tt=function(){var e="undefined"!=typeof window?window:null,t=e&&(e.crypto||e.msCrypto);return t?function(){var e=new Uint8Array(1);return t.getRandomValues(e),e[0]/255}:function(){return Math.random()}}();function nt(){var e=Math.floor(tt()*Ye);return e===Ye&&(e=Ye-1),$e.charAt(e)}function rt(){return function(e,t){if(e>Ke)throw(n=new Error("cannot encode time greater than "+Ke)).source="Ulid",n;for(var n,r,o="";t>0;t--)r=e%Ye,o=$e.charAt(r)+o,e=(e-r)/Ye;return o}(Date.now(),Ze)+function(e){for(var t="";e>0;e--)t=nt()+t;return t}(et)}var ot="_lc2_fpi";function it(e,t){return function(n){var r,o,i,a,c=e.get(ot);if(c)o=c.data;else{var s=t.getCookie(ot);if(s)e.set(ot,s),o=s;else{var u="".concat((i=n.cookieDomain,void 0===a&&(a=12),U.sha1(i.replace(/^\./,"")).substring(0,a)),"--").concat(rt()).toLocaleLowerCase();e.set(ot,u),o=null===(r=e.get(ot))||void 0===r?void 0:r.data}}return o&&t.setDataInLocalStorage(G,o),P(P({},n),{liveConnectId:o,peopleVerifiedId:o})}}var at=120,ct={errorDetails:{message:"Unknown message",name:"Unknown name"}};function st(e){try{var t=1*e;return isNaN(t)?void 0:t}catch(e){}}function ut(e){try{return M.isString(e)&&e.length&&e.length>at?"".concat(e.substr(0,at),"..."):"".concat(e)}catch(e){}}var lt=function(){},dt=function(){function e(e,t,n){this.obj=e,this.name=t,this.errors=[],this.eventBus=n}return e.prototype.wrap=function(e){var t=this;if(M.isObject(this.obj)){var n=this.obj[e];if(M.isFunction(n))return function(){for(var r,o=[],i=0;i0&&this.eventBus.emitErrorWithMessage(this.name,"The functions '".concat(JSON.stringify(this.errors),"' were not provided"))},e}(),pt=function(){};function ft(e,t,n){return M.strEqualsIgnoreCase(t,We.disabled)?pt:e.wrap(n)}function ht(e,t,n){return M.strEqualsIgnoreCase(t,We.none)?pt:ft(e,t,n)}var vt=function(){function e(e,t){this.minimalFunctions={getCookie:ft(t,e,"getCookie"),getDataFromLocalStorage:ft(t,e,"getDataFromLocalStorage"),localStorageIsEnabled:ht(t,e,"localStorageIsEnabled")}}return e.make=function(t,n,r){var o=new dt(n,"ReadOnlyStorageHandler",r),i=new e(t,o);return o.reportErrors(),i},e.prototype.localStorageIsEnabled=function(){return!!this.minimalFunctions.localStorageIsEnabled()},e.prototype.getCookie=function(e){return this.minimalFunctions.getCookie(e)||null},e.prototype.getDataFromLocalStorage=function(e){return this.minimalFunctions.getDataFromLocalStorage(e)||null},e}(),gt=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.storageStrategy=t,r.functions={setCookie:ht(n,t,"setCookie"),removeDataFromLocalStorage:ht(n,t,"removeDataFromLocalStorage"),setDataInLocalStorage:ht(n,t,"setDataInLocalStorage"),findSimilarCookies:ft(n,t,"findSimilarCookies")},r}return B(t,e),t.make=function(e,n,r){var o=new dt(n,"StorageHandler",r),i=new t(e,o);return o.reportErrors(),i},t.prototype.setCookie=function(e,t,n,r,o){this.functions.setCookie(e,t,n,r,o)},t.prototype.setDataInLocalStorage=function(e,t){this.functions.setDataInLocalStorage(e,t)},t.prototype.removeDataFromLocalStorage=function(e){this.functions.removeDataFromLocalStorage(e)},t.prototype.findSimilarCookies=function(e){return this.functions.findSimilarCookies(e)||[]},t}(vt),mt=function(e){function t(t){var n=e.call(this,t)||this;return n.name="ParseError",n}return B(t,e),t}(Error),wt=function(){function e(e){this.handler=e.storageHandler,this.cookieDomain=e.cookieDomain,this.eventBus=e.eventBus}return e.prototype.deleteCookie=function(e){this.handler.setCookie(e,"",new Date(0),"Lax",this.cookieDomain)},e.prototype.parseMetaRecord=function(e){var t,n=JSON.parse(e);if(!M.isObject(n))throw new mt("Meta record is not an object");if("e"in n&&(t=new Date(n.e),isNaN(t.getTime())))throw new mt("Invalid expiresAt");if(!("w"in n))throw new mt("Missing writtenAt");var r=new Date(n.w);if(isNaN(r.getTime()))throw new mt("Invalid writtenAt");return{expiresAt:t,writtenAt:r}},e.prototype.serializeMetaRecord=function(e){var t;return e.expiresAt&&(t=e.expiresAt.getTime()),JSON.stringify({w:e.writtenAt.getTime(),e:t})},e.prototype.getCookieRecord=function(e,t){var n,r=this.handler.getCookie(t);if(!r||0===r.length)return null;try{n=this.parseMetaRecord(r)}catch(n){return this.eventBus.emitErrorWithMessage("Cache","Failed reading meta from cookies",n),this.deleteCookie(e),this.deleteCookie(t),null}var o=n.expiresAt;if(o&&o.getTime()<=Date.now())return null;var i=this.handler.getCookie(e);return i?{data:i,meta:n}:null},e.prototype.getLSRecord=function(e,t){var n,r=this.handler.getDataFromLocalStorage(t);if(!r||0===r.length)return null;try{n=this.parseMetaRecord(r)}catch(n){return this.eventBus.emitErrorWithMessage("Cache","Failed reading meta from ls",n),this.handler.removeDataFromLocalStorage(e),this.handler.removeDataFromLocalStorage(t),null}var o=n.expiresAt;if(o&&o.getTime()<=Date.now())return this.handler.removeDataFromLocalStorage(e),this.handler.removeDataFromLocalStorage(t),null;var i=this.handler.getDataFromLocalStorage(e);return i?{data:i,meta:n}:null},e.prototype.get=function(e){var t=yt(e),n=this.getCookieRecord(e,t),r=this.getLSRecord(e,t);return n&&r?n.meta.writtenAt.getTime()===r.meta.writtenAt.getTime()?n:n.meta.writtenAt>r.meta.writtenAt?(this.handler.setDataInLocalStorage(e,n.data),this.handler.setDataInLocalStorage(t,this.serializeMetaRecord(n.meta)),n):(this.handler.setCookie(e,r.data,r.meta.expiresAt,"Lax",this.cookieDomain),this.handler.setCookie(t,this.serializeMetaRecord(r.meta),r.meta.expiresAt,"Lax",this.cookieDomain),r):n?(this.handler.setDataInLocalStorage(e,n.data),this.handler.setDataInLocalStorage(t,this.serializeMetaRecord(n.meta)),n):r?(this.handler.setCookie(e,r.data,r.meta.expiresAt,"Lax",this.cookieDomain),this.handler.setCookie(t,this.serializeMetaRecord(r.meta),r.meta.expiresAt,"Lax",this.cookieDomain),r):null},e.prototype.set=function(e,t,n){var r=yt(e),o=this.serializeMetaRecord({writtenAt:new Date,expiresAt:n});this.handler.setDataInLocalStorage(e,t),this.handler.setDataInLocalStorage(r,o);var i=n||M.expiresInDays(730);this.handler.setCookie(e,t,i,"Lax",this.cookieDomain),this.handler.setCookie(r,o,i,"Lax",this.cookieDomain)},e}();function yt(e){return"".concat(e,"_meta")}var St=function(){function e(e,t){var n=new dt(e,"CallHandler",t);this.functions={ajaxGet:n.wrap("ajaxGet"),pixelGet:n.wrap("pixelGet")},n.reportErrors()}return e.prototype.ajaxGet=function(e,t,n,r){this.functions.ajaxGet(e,t,n,r)},e.prototype.pixelGet=function(e,t){this.functions.pixelGet(e,t)},e}();function Et(e){return function(t){var n,r,o,i;return"cookie"===(null===(n=t.idCookie)||void 0===n?void 0:n.strategy)&&"string"==typeof(null===(r=t.idCookie)||void 0===r?void 0:r.name)?P(P({},t),{resolvedIdCookie:e.getCookie(t.idCookie.name)}):"localStorage"===(null===(o=t.idCookie)||void 0===o?void 0:o.strategy)&&"string"==typeof(null===(i=t.idCookie)||void 0===i?void 0:i.name)?P(P({},t),{resolvedIdCookie:e.getDataFromLocalStorage(t.idCookie.name)}):t}}var Ct={};function bt(e,t,n,r){if(e&&M.isObject(e))if("config"in e)r.emitErrorWithMessage("StrayConfig","Received a config after LC has already been initialised",new Error(JSON.stringify(e)));else{var o=new _e(n,r),i=o.combineWith({eventSource:e});Ct.hashedEmail=Ct.hashedEmail||i.data.hashedEmail;var a=ye({eventSource:e},Ct);t.sendAjax(o.combineWith(a),{onPreSend:function(){return r.emit(q,"0")},onLoad:function(){return r.emit(Q,n)}})}else r.emitErrorWithMessage("EventNotAnObject","Received event was not an object",new Error(e))}function It(e,t,n,r){try{var o=P(P({},Re(e,r)),{identifiersToResolve:e.identifiersToResolve||[],contextSelectors:e.contextSelectors||"",contextElementsLength:e.contextElementsLength||0}),i=new St(n,r),a=xe(Qe(Ne(o))),c=gt.make(a.storageStrategy,t,r),s=function(e){return function(t){return P(P({},t),{cookieDomain:He(e)})}}(c)(a),u=new wt({storageHandler:c,eventBus:r,cookieDomain:s.cookieDomain}),l=Et(c)(it(u,c)(function(e,t){return function(n){function r(e,n){try{return n()}catch(n){return t.emitErrorWithMessage("DecisionsResolve",e,n),[]}}var o=r("Error while extracting new decision ids",(function(){var e,t;return[].concat(n.pageUrl&&(e=n.pageUrl,t=Ge,pe(fe(e),t))||[]).map(M.trim).filter(Xe).filter(M.isUUID).filter(Je)})),i=r("Error while retrieving stored decision ids",(function(){return e.findSimilarCookies(ze).map(M.trim).filter(Xe).filter(M.isUUID)}));return o.forEach((function(r){try{(o=r)&&e.setCookie("".concat(ze).concat(o),o,qe,"Lax",n.cookieDomain)}catch(r){t.emitErrorWithMessage("DecisionsResolve","Error while storing new decision id",r)}var o})),P(P({},n),{decisionIds:o.concat(i).filter(Je)})}}(c,r)(function(e,t){return function(n){try{return P(P({},n),function(e,t){for(var n=[],r=[],o=0;o=200&&c.status<300||304===c.status?t(c.responseText,c):o("Error during XHR call: ".concat(c.status,", url: ").concat(e)))},c);a.ontimeout=function(){var t=Date.now()-i;o("Timeout after ".concat(t," (").concat(r,"), url: ").concat(e))},a.open("GET",e,!0),a.timeout=r,a.withCredentials=!0,a.send()}catch(t){o("Error while constructing ajax request, ".concat(t,", url: ").concat(e))}var c,s},e.prototype.pixelGet=function(e,t){var n=new window.Image;Gt.isFunction(t)&&(n.onload=t),n.src=e},e}(),Xt=function(){function e(e){this.eventBus=e,this._localStorageIsEnabled=void 0,this.cookies=zt.withConverter({read:function(t,n){try{var r=zt.converter.read(t,n);return void 0===r?null:r}catch(t){return e.emitErrorWithMessage("CookieReadError","Failed reading cookie ".concat(n),t),null}}})}return e.prototype.getCookie=function(e){var t=this.cookies.get(e);return void 0===t?null:t},e.prototype.findSimilarCookies=function(e){try{var t=this.cookies.get();return Object.keys(t).filter((function(n){return n.indexOf(e)>=0&&null!==t[n]})).map((function(e){return t[e]}))}catch(e){return this.eventBus.emitErrorWithMessage("CookieFindSimilarInJar","Failed fetching from a cookie jar",e),[]}},e.prototype.setCookie=function(e,t,n,r,o){if(n){var i;i="string"==typeof n?new Date(n):"number"==typeof n?new Date(Date.now()+864e5*n):n,this.cookies.set(e,t,{domain:o,expires:i,samesite:r})}else this.cookies.set(e,t,{domain:o,samesite:r})},e.prototype.localStorageIsEnabled=function(){return null==this._localStorageIsEnabled&&(this._localStorageIsEnabled=this.checkLocalStorage()),this._localStorageIsEnabled},e.prototype.getDataFromLocalStorage=function(e){return this.localStorageIsEnabled()?window.localStorage.getItem(e):null},e.prototype.setDataInLocalStorage=function(e,t){this.localStorageIsEnabled()&&window.localStorage.setItem(e,t)},e.prototype.removeDataFromLocalStorage=function(e){this.localStorageIsEnabled()&&window.localStorage.removeItem(e)},e.prototype.checkLocalStorage=function(){var e=!1;try{if(window&&window.localStorage){var t=Math.random().toString();window.localStorage.setItem(t,t),e=window.localStorage.getItem(t)===t,window.localStorage.removeItem(t)}}catch(e){this.eventBus.emitError("LSCheckError",e)}return e},e}();Qt.DefaultCallHandler=Jt,Qt.DefaultStorageHandler=Xt;var $t=Qt.DefaultCallHandler,Yt=Qt.DefaultStorageHandler,Kt={trackerVersion:"v2.12.0",collectorUrl:"https://rp.liadm.com"},Zt="liQ";function en(o,c,s){var u;o.once(r,(function(r){return nn(o,"BuilderConfigProcessing",(function(){var s=c(r,o);s.identifiersToResolve=s.identifiersToResolve||s.scrapingCookieNames,s.wrapperName=s.wrapperName||"lc-bundle",u=Bt(Bt({},Kt),s),s.usPrivacyString?o.emit(e,{usPrivacyString:s.usPrivacyString,uspapiCalled:!0}):function(t,n){var r,o=(n||{}).uspapiTimeout||100;function a(n){t.emit(e,{usPrivacyString:n,uspapiCalled:!0})}var c=setTimeout((function(){a(null)}),o);function s(e,t){t&&e.uspString&&(a(e.uspString),clearTimeout(c))}if(window.__uspapi&&"function"==typeof window.__uspapi)window.__uspapi("getUSPData",1,s);else{var u=Pt(i);if(u){window.addEventListener("message",(function e(t){var n=t&&t.data&&t.data.__uspapiReturn;n&&n.callId&&r===n.callId&&(window.removeEventListener("message",e,!1),s(n.returnValue,n.success))}),!1);var l={__uspapiCall:{command:"getUSPData",version:1,callId:r="li_uspapi_call_".concat(Math.random())}};u.postMessage(l,"*")}else a(null)}}(o,s),s.gdprApplies&&s.gdprConsent?o.emit(t,{gdprApplies:s.gdprApplies,gdprConsent:s.gdprConsent,tcfCalled:!0}):function(e,n){var r,o=(n||{}).tcfAPITimeout||100;function i(n){e.emit(t,{gdprApplies:void 0===n.gdprApplies||null===n.gdprApplies?void 0:!!n.gdprApplies,gdprConsent:n.tcString,tcfCalled:!0})}var c=setTimeout((function(){i({})}),o);function s(e,t){t&&e&&(i(e),clearTimeout(c))}if(window.__tcfapi&&"function"==typeof window.__tcfapi)window.__tcfapi(Vt,Ht,s);else{var u=Pt(a);if(u){window.addEventListener("message",(function e(t){var n=t&&t.data&&t.data.__tcfapiReturn;n&&n.callId&&r===n.callId&&(window.removeEventListener("message",e,!1),s(n.returnValue,n.success))}),!1),r="li_tcf_call_".concat(Math.random());var l={__tcfapiCall:{command:Vt,version:Ht,callId:r}};u.postMessage(l,"*")}else i({})}}(o,s),s.gppString&&s.gppApplicableSections?o.emit(n,{gppString:s.gppString,gppApplicableSections:s.gppApplicableSections,gppCalled:!0}):Wt(o,s)}))})),o.once(e,(function(e){return nn(o,"BuilderConsentError",(function(){u=Bt(Bt({},u),e),tn(o,u,s)}))})),o.once(t,(function(e){return nn(o,"BuilderConsentError",(function(){u=Bt(Bt({},u),e),tn(o,u,s)}))})),o.once(n,(function(e){return nn(o,"BuilderConsentError",(function(){u=Bt(Bt({},u),e),tn(o,u,s)}))}))}function tn(e,t,n){if(t.uspapiCalled&&t.tcfCalled&&t.gppCalled){t.globalVarName=t.globalVarName||Zt;var r=Rt(t,new Yt(e),new $t,e);n&&n(r,t),function(e){var t=e.config&&e.config.globalVarName||Zt,n=window[t]||[];Array.isArray(n)&&n.forEach((function(t){return e.push(t)}))}(r),function(e,t){var n=e.defaultEventDelay||120;setTimeout((function(){var n=!1;(window.liQ_instances||[{eventBus:t}]).forEach((function(e){e.eventBus&&e.eventBus.once(o,(function(){n=!0}))})),n||(window[e.globalVarName||Zt]||[]).push({})}),n)}(t,e),window[t.globalVarName]=r}}function nn(e,t,n){try{n()}catch(n){e.emitError(t,n)}}var rn={},on=l;rn.LiveConnect=on.LiveConnect,rn.MinimalLiveConnect=on.MinimalLiveConnect,rn.QueryBuilder=on.QueryBuilder,rn.StandardLiveConnect=on.StandardLiveConnect,rn.StorageHandlerBackedCache=on.StorageHandlerBackedCache,rn.WrappedStorageHandler=on.WrappedStorageHandler,rn.encodeIdCookie=on.encodeIdCookie;var an=rn.QueryBuilder,cn=rn.encodeIdCookie,sn="_li_ss",un=function(){function e(e,t,n,r){this.config=e,this.cache=t,this.storageHandler=n,this.eventBus=r}return e.prototype.run=function(e){var t,n=this;try{var r=this.loadSyncState()||"",o=this.syncUrl(r,e);if(o){var i=document.createElement("iframe");if(!i||!document.body)throw new Error("Frame cannot be created");i.style.display="none",i.style.width="0px",i.style.height="0px",i.style.border="0px";var a=document.createElement("a");if(window.postMessage){t=function(e){a.href="https://i.liadm.com/s/c",(e.origin||(null==e?void 0:e.originalEvent.origin))===a.protocol+"//"+a.host&&e.data&&"string"==typeof e.data&&n.handleMsg(e.data)},window.addEventListener?window.addEventListener("message",t,!1):window.attachEvent("onmessage",t)}i.src=o,document.body.appendChild(i)}}catch(e){this.eventBus.emitErrorWithMessage("SyncContainerRun","Error while running SC",e)}},e.prototype.loadSyncState=function(){var e=this.cache.get(sn);return e?e.data:this.storageHandler.getDataFromLocalStorage(sn)},e.prototype.syncUrl=function(e,t){var n;if("appId"in t){var r={stripEmpty:!1},o=(new an).addOptional("duid",t.peopleVerifiedId,r).addOptional("euns",this.config.euns?1:0,r).addOptional("pt",this.config.pt,r).addOptional("s",e,r).addOptional("us_privacy",t.usPrivacyString,r).addOptional("gpp_s",t.gppString,r).addOptional("gpp_as",null===(n=t.gppApplicableSections)||void 0===n?void 0:n.join(","),r).addOptional("version","v2.12.0",r).addOptional("cd",t.cookieDomain,r).addOptional("ic",cn(t.resolvedIdCookie),r);return"https://i.liadm.com/s/c/"+t.appId+o.toQueryString()}},e.prototype.handleMsg=function(e){var t=this;try{e&&e.replace(/([^=]+)=([^&]*)&?/g,(function(e,n,r){if(n=decodeURIComponent(n),r=decodeURIComponent(r),n===sn){var o=r?Mt(30):new Date(-1);t.cache.set(n,r||"-",o)}return""}))}catch(e){this.eventBus.emitErrorWithMessage("SyncContainerHandleMessage","Error while handling SC message",e)}},e}();var ln=jt.GlobalEventBus(Ft.EVENT_BUS_NAMESPACE,5,(function(e){return console.log(e)}));function dn(e,t){if(e.globalVarName){var n=new Error("globalVarName provided");return n.name="GlobalVarNameProvided",t.emitError(n.name,n),delete e.globalVarName,e}return e}function pn(e,t){var n,r,o,i=!!(null===(n=e.config)||void 0===n?void 0:n.gdprApplies)||(null!==(o=null===(r=e.config)||void 0===r?void 0:r.gppApplicableSections)&&void 0!==o?o:[]).indexOf(2)>=0;if(e&&e.config&&e.config.appId&&!0===t.sync&&!i&&e.cache&&e.storageHandler&&e.eventBus){var a=new un(t,e.cache,e.storageHandler,e.eventBus);e.eventBus.once(Ft.PIXEL_SENT_PREFIX,(function(e){return a.run(e)}),a)}}nn(ln,"BuilderNotInitialized",(function(){if(ln){if(window.LI)ln.emit(r,window.LI);else{var e=function(e){var t=[];function n(n){Tt(n)&&("config"in n?(window.liQ=t,e.emit(r,n.config)):t.push(n))}return{push:function(){for(var e=[],t=0;t