window.Seeka = window.Seeka || {};
window.Seeka.client = window.Seeka.client || {};
window.Seeka.client.origin = { h: 'thebureaufashionweek.com' };
"use strict";(()=>{var xl=Object.create;var nr=Object.defineProperty,Al=Object.defineProperties,Cl=Object.getOwnPropertyDescriptor,Sl=Object.getOwnPropertyDescriptors,Pl=Object.getOwnPropertyNames,rr=Object.getOwnPropertySymbols,wl=Object.getPrototypeOf,qn=Object.prototype.hasOwnProperty,co=Object.prototype.propertyIsEnumerable;var $n=(r,e,t)=>e in r?nr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,p=(r,e)=>{for(var t in e||(e={}))qn.call(e,t)&&$n(r,t,e[t]);if(rr)for(var t of rr(e))co.call(e,t)&&$n(r,t,e[t]);return r},F=(r,e)=>Al(r,Sl(e));var uo=(r,e)=>{var t={};for(var i in r)qn.call(r,i)&&e.indexOf(i)<0&&(t[i]=r[i]);if(r!=null&&rr)for(var i of rr(r))e.indexOf(i)<0&&co.call(r,i)&&(t[i]=r[i]);return t};var Tl=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),El=(r,e)=>{for(var t in e)nr(r,t,{get:e[t],enumerable:!0})},Ml=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Pl(e))!qn.call(r,n)&&n!==t&&nr(r,n,{get:()=>e[n],enumerable:!(i=Cl(e,n))||i.enumerable});return r};var Ll=(r,e,t)=>(t=r!=null?xl(wl(r)):{},Ml(e||!r||!r.__esModule?nr(t,"default",{value:r,enumerable:!0}):t,r));var u=(r,e,t)=>$n(r,typeof e!="symbol"?e+"":e,t);var h=(r,e,t)=>new Promise((i,n)=>{var s=c=>{try{o(t.next(c))}catch(d){n(d)}},a=c=>{try{o(t.throw(c))}catch(d){n(d)}},o=c=>c.done?i(c.value):Promise.resolve(c.value).then(s,a);o((t=t.apply(r,e)).next())});var Bd=Tl((Ps,ws)=>{(function(r,e){typeof Ps=="object"&&typeof ws!="undefined"?ws.exports=function(t,i,n,s,a){for(i=i.split?i.split("."):i,s=0;s<i.length;s++)t=t?t[i[s]]:a;return t===a?n:t}:typeof define=="function"&&define.amd?define(function(){return function(t,i,n,s,a){for(i=i.split?i.split("."):i,s=0;s<i.length;s++)t=t?t[i[s]]:a;return t===a?n:t}}):r.dlv=function(t,i,n,s,a){for(i=i.split?i.split("."):i,s=0;s<i.length;s++)t=t?t[i[s]]:a;return t===a?n:t}})(Ps)});var oo={};El(oo,{ActivityDefinitionHelper:()=>Ye,AnalyticsLibrary:()=>$r,ConditionOperator:()=>Bi,ConsentMappingMatchType:()=>fs,ContentIdentificationBehavior:()=>qr,ConvergeApi:()=>Ct,ConvergeSdk:()=>Dt,ConvergeSdkConfiguration:()=>Ti,DataLayerHelper:()=>jt,DebugHelper:()=>_t,ECommerceContentType:()=>Wr,ECommerceFinancialStatus:()=>us,ECommerceFulfillmentStatus:()=>ds,ECommercePlatform:()=>Gr,ExperienceTrackingViewContextType:()=>gs,FacebookPixelConversionEventName:()=>ms,HandlersSdkConfiguration:()=>xi,HookListenerTypes:()=>En,IabPrivacyConsentPurposeId:()=>Kr,IabPrivacyConsentPurposeIdMap:()=>Ci,OrganisationBrandBillingStatusEnablement:()=>Fi,PluginMethodNotImplementedMessage:()=>Ss,PreInitialiseIdentityMediator:()=>di,PreInitialiseTrackMediator:()=>ui,PrivacyDataControlMode:()=>Jr,RegionalConsentGrantOption:()=>ls,ScopedConvergeSdk:()=>Ei,SdkLogEventLevel:()=>Hi,TrackingActivityNames:()=>ve,UrlHelper:()=>sn,WindowPostMessageMediationEventName:()=>Xs,augmentActivityFromPipelineRuleContainers:()=>on,compareTextMatchInfo:()=>ze,getActivityName:()=>Ld,getParamFromQueryString:()=>Ie,install:()=>Xk,isUrlMatch:()=>As,isUrlMatchedToFilter:()=>xn,normalizeToE164:()=>Nd,removePiiFromQueryString:()=>xs,removePiiFromUrl:()=>nn,sanitizeResourceUrl:()=>rt,urlToWinLocation:()=>ji});var Dl=typeof global=="object"&&global&&global.Object===Object&&global,sr=Dl;var Ol=typeof self=="object"&&self&&self.Object===Object&&self,Nl=sr||Ol||Function("return this")(),ne=Nl;var Rl=ne.Symbol,ue=Rl;var lo=Object.prototype,_l=lo.hasOwnProperty,Ul=lo.toString,Li=ue?ue.toStringTag:void 0;function Bl(r){var e=_l.call(r,Li),t=r[Li];try{r[Li]=void 0;var i=!0}catch(s){}var n=Ul.call(r);return i&&(e?r[Li]=t:delete r[Li]),n}var fo=Bl;var Fl=Object.prototype,Hl=Fl.toString;function Vl(r){return Hl.call(r)}var mo=Vl;var jl="[object Null]",Wl="[object Undefined]",go=ue?ue.toStringTag:void 0;function Gl(r){return r==null?r===void 0?Wl:jl:go&&go in Object(r)?fo(r):mo(r)}var ye=Gl;function $l(r){return r!=null&&typeof r=="object"}var oe=$l;var ql="[object Symbol]";function Kl(r){return typeof r=="symbol"||oe(r)&&ye(r)==ql}var mt=Kl;function Jl(r,e){for(var t=-1,i=r==null?0:r.length,n=Array(i);++t<i;)n[t]=e(r[t],t,r);return n}var po=Jl;var Ql=Array.isArray,W=Ql;var zl=1/0,ho=ue?ue.prototype:void 0,yo=ho?ho.toString:void 0;function vo(r){if(typeof r=="string")return r;if(W(r))return po(r,vo)+"";if(mt(r))return yo?yo.call(r):"";var e=r+"";return e=="0"&&1/r==-zl?"-0":e}var bo=vo;var Yl=/\s/;function Zl(r){for(var e=r.length;e--&&Yl.test(r.charAt(e)););return e}var ko=Zl;var Xl=/^\s+/;function ef(r){return r&&r.slice(0,ko(r)+1).replace(Xl,"")}var Io=ef;function tf(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var Q=tf;var xo=NaN,rf=/^[-+]0x[0-9a-f]+$/i,nf=/^0b[01]+$/i,sf=/^0o[0-7]+$/i,of=parseInt;function af(r){if(typeof r=="number")return r;if(mt(r))return xo;if(Q(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=Q(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=Io(r);var t=nf.test(r);return t||sf.test(r)?of(r.slice(2),t?2:8):rf.test(r)?xo:+r}var Kn=af;function cf(r){return r}var Gt=cf;var df="[object AsyncFunction]",uf="[object Function]",lf="[object GeneratorFunction]",ff="[object Proxy]";function mf(r){if(!Q(r))return!1;var e=ye(r);return e==uf||e==lf||e==df||e==ff}var gt=mf;var gf=ne["__core-js_shared__"],or=gf;var Ao=function(){var r=/[^.]+$/.exec(or&&or.keys&&or.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function pf(r){return!!Ao&&Ao in r}var Co=pf;var hf=Function.prototype,yf=hf.toString;function vf(r){if(r!=null){try{return yf.call(r)}catch(e){}try{return r+""}catch(e){}}return""}var et=vf;var bf=/[\\^$.*+?()[\]{}|]/g,kf=/^\[object .+?Constructor\]$/,If=Function.prototype,xf=Object.prototype,Af=If.toString,Cf=xf.hasOwnProperty,Sf=RegExp("^"+Af.call(Cf).replace(bf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Pf(r){if(!Q(r)||Co(r))return!1;var e=gt(r)?Sf:kf;return e.test(et(r))}var So=Pf;function wf(r,e){return r==null?void 0:r[e]}var Po=wf;function Tf(r,e){var t=Po(r,e);return So(t)?t:void 0}var ke=Tf;var Ef=ke(ne,"WeakMap"),ar=Ef;var wo=Object.create,Mf=function(){function r(){}return function(e){if(!Q(e))return{};if(wo)return wo(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}(),cr=Mf;function Lf(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}var To=Lf;function Df(){}var Eo=Df;function Of(r,e){var t=-1,i=r.length;for(e||(e=Array(i));++t<i;)e[t]=r[t];return e}var dr=Of;var Nf=800,Rf=16,_f=Date.now;function Uf(r){var e=0,t=0;return function(){var i=_f(),n=Rf-(i-t);if(t=i,n>0){if(++e>=Nf)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}var Mo=Uf;function Bf(r){return function(){return r}}var Lo=Bf;var Ff=function(){try{var r=ke(Object,"defineProperty");return r({},"",{}),r}catch(e){}}(),$t=Ff;var Hf=$t?function(r,e){return $t(r,"toString",{configurable:!0,enumerable:!1,value:Lo(e),writable:!0})}:Gt,Do=Hf;var Vf=Mo(Do),Oo=Vf;function jf(r,e){for(var t=-1,i=r==null?0:r.length;++t<i&&e(r[t],t,r)!==!1;);return r}var ur=jf;function Wf(r,e,t,i){for(var n=r.length,s=t+(i?1:-1);i?s--:++s<n;)if(e(r[s],s,r))return s;return-1}var No=Wf;function Gf(r){return r!==r}var Ro=Gf;function $f(r,e,t){for(var i=t-1,n=r.length;++i<n;)if(r[i]===e)return i;return-1}var _o=$f;function qf(r,e,t){return e===e?_o(r,e,t):No(r,Ro,t)}var Uo=qf;function Kf(r,e){var t=r==null?0:r.length;return!!t&&Uo(r,e,0)>-1}var Bo=Kf;var Jf=9007199254740991,Qf=/^(?:0|[1-9]\d*)$/;function zf(r,e){var t=typeof r;return e=e==null?Jf:e,!!e&&(t=="number"||t!="symbol"&&Qf.test(r))&&r>-1&&r%1==0&&r<e}var pt=zf;function Yf(r,e,t){e=="__proto__"&&$t?$t(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}var qt=Yf;function Zf(r,e){return r===e||r!==r&&e!==e}var He=Zf;var Xf=Object.prototype,em=Xf.hasOwnProperty;function tm(r,e,t){var i=r[e];(!(em.call(r,e)&&He(i,t))||t===void 0&&!(e in r))&&qt(r,e,t)}var Kt=tm;function im(r,e,t,i){var n=!t;t||(t={});for(var s=-1,a=e.length;++s<a;){var o=e[s],c=i?i(t[o],r[o],o,t,r):void 0;c===void 0&&(c=r[o]),n?qt(t,o,c):Kt(t,o,c)}return t}var Ve=im;var Fo=Math.max;function rm(r,e,t){return e=Fo(e===void 0?r.length-1:e,0),function(){for(var i=arguments,n=-1,s=Fo(i.length-e,0),a=Array(s);++n<s;)a[n]=i[e+n];n=-1;for(var o=Array(e+1);++n<e;)o[n]=i[n];return o[e]=t(a),To(r,this,o)}}var Ho=rm;function nm(r,e){return Oo(Ho(r,e,Gt),r+"")}var lr=nm;var sm=9007199254740991;function om(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=sm}var Jt=om;function am(r){return r!=null&&Jt(r.length)&&!gt(r)}var je=am;function cm(r,e,t){if(!Q(t))return!1;var i=typeof e;return(i=="number"?je(t)&&pt(e,t.length):i=="string"&&e in t)?He(t[e],r):!1}var Vo=cm;function dm(r){return lr(function(e,t){var i=-1,n=t.length,s=n>1?t[n-1]:void 0,a=n>2?t[2]:void 0;for(s=r.length>3&&typeof s=="function"?(n--,s):void 0,a&&Vo(t[0],t[1],a)&&(s=n<3?void 0:s,n=1),e=Object(e);++i<n;){var o=t[i];o&&r(e,o,i,s)}return e})}var jo=dm;var um=Object.prototype;function lm(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||um;return r===t}var ht=lm;function fm(r,e){for(var t=-1,i=Array(r);++t<r;)i[t]=e(t);return i}var Wo=fm;var mm="[object Arguments]";function gm(r){return oe(r)&&ye(r)==mm}var Jn=gm;var Go=Object.prototype,pm=Go.hasOwnProperty,hm=Go.propertyIsEnumerable,ym=Jn(function(){return arguments}())?Jn:function(r){return oe(r)&&pm.call(r,"callee")&&!hm.call(r,"callee")},De=ym;function vm(){return!1}var $o=vm;var Jo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,qo=Jo&&typeof module=="object"&&module&&!module.nodeType&&module,bm=qo&&qo.exports===Jo,Ko=bm?ne.Buffer:void 0,km=Ko?Ko.isBuffer:void 0,Im=km||$o,Ce=Im;var xm="[object Arguments]",Am="[object Array]",Cm="[object Boolean]",Sm="[object Date]",Pm="[object Error]",wm="[object Function]",Tm="[object Map]",Em="[object Number]",Mm="[object Object]",Lm="[object RegExp]",Dm="[object Set]",Om="[object String]",Nm="[object WeakMap]",Rm="[object ArrayBuffer]",_m="[object DataView]",Um="[object Float32Array]",Bm="[object Float64Array]",Fm="[object Int8Array]",Hm="[object Int16Array]",Vm="[object Int32Array]",jm="[object Uint8Array]",Wm="[object Uint8ClampedArray]",Gm="[object Uint16Array]",$m="[object Uint32Array]",te={};te[Um]=te[Bm]=te[Fm]=te[Hm]=te[Vm]=te[jm]=te[Wm]=te[Gm]=te[$m]=!0;te[xm]=te[Am]=te[Rm]=te[Cm]=te[_m]=te[Sm]=te[Pm]=te[wm]=te[Tm]=te[Em]=te[Mm]=te[Lm]=te[Dm]=te[Om]=te[Nm]=!1;function qm(r){return oe(r)&&Jt(r.length)&&!!te[ye(r)]}var Qo=qm;function Km(r){return function(e){return r(e)}}var yt=Km;var zo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Di=zo&&typeof module=="object"&&module&&!module.nodeType&&module,Jm=Di&&Di.exports===zo,Qn=Jm&&sr.process,Qm=function(){try{var r=Di&&Di.require&&Di.require("util").types;return r||Qn&&Qn.binding&&Qn.binding("util")}catch(e){}}(),we=Qm;var Yo=we&&we.isTypedArray,zm=Yo?yt(Yo):Qo,We=zm;var Ym=Object.prototype,Zm=Ym.hasOwnProperty;function Xm(r,e){var t=W(r),i=!t&&De(r),n=!t&&!i&&Ce(r),s=!t&&!i&&!n&&We(r),a=t||i||n||s,o=a?Wo(r.length,String):[],c=o.length;for(var d in r)(e||Zm.call(r,d))&&!(a&&(d=="length"||n&&(d=="offset"||d=="parent")||s&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||pt(d,c)))&&o.push(d);return o}var fr=Xm;function eg(r,e){return function(t){return r(e(t))}}var mr=eg;var tg=mr(Object.keys,Object),Zo=tg;var ig=Object.prototype,rg=ig.hasOwnProperty;function ng(r){if(!ht(r))return Zo(r);var e=[];for(var t in Object(r))rg.call(r,t)&&t!="constructor"&&e.push(t);return e}var gr=ng;function sg(r){return je(r)?fr(r):gr(r)}var Ge=sg;function og(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var Xo=og;var ag=Object.prototype,cg=ag.hasOwnProperty;function dg(r){if(!Q(r))return Xo(r);var e=ht(r),t=[];for(var i in r)i=="constructor"&&(e||!cg.call(r,i))||t.push(i);return t}var ea=dg;function ug(r){return je(r)?fr(r,!0):ea(r)}var $e=ug;var lg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fg=/^\w*$/;function mg(r,e){if(W(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||mt(r)?!0:fg.test(r)||!lg.test(r)||e!=null&&r in Object(e)}var Qt=mg;var gg=ke(Object,"create"),tt=gg;function pg(){this.__data__=tt?tt(null):{},this.size=0}var ta=pg;function hg(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var ia=hg;var yg="__lodash_hash_undefined__",vg=Object.prototype,bg=vg.hasOwnProperty;function kg(r){var e=this.__data__;if(tt){var t=e[r];return t===yg?void 0:t}return bg.call(e,r)?e[r]:void 0}var ra=kg;var Ig=Object.prototype,xg=Ig.hasOwnProperty;function Ag(r){var e=this.__data__;return tt?e[r]!==void 0:xg.call(e,r)}var na=Ag;var Cg="__lodash_hash_undefined__";function Sg(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=tt&&e===void 0?Cg:e,this}var sa=Sg;function zt(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var i=r[e];this.set(i[0],i[1])}}zt.prototype.clear=ta;zt.prototype.delete=ia;zt.prototype.get=ra;zt.prototype.has=na;zt.prototype.set=sa;var zn=zt;function Pg(){this.__data__=[],this.size=0}var oa=Pg;function wg(r,e){for(var t=r.length;t--;)if(He(r[t][0],e))return t;return-1}var vt=wg;var Tg=Array.prototype,Eg=Tg.splice;function Mg(r){var e=this.__data__,t=vt(e,r);if(t<0)return!1;var i=e.length-1;return t==i?e.pop():Eg.call(e,t,1),--this.size,!0}var aa=Mg;function Lg(r){var e=this.__data__,t=vt(e,r);return t<0?void 0:e[t][1]}var ca=Lg;function Dg(r){return vt(this.__data__,r)>-1}var da=Dg;function Og(r,e){var t=this.__data__,i=vt(t,r);return i<0?(++this.size,t.push([r,e])):t[i][1]=e,this}var ua=Og;function Yt(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var i=r[e];this.set(i[0],i[1])}}Yt.prototype.clear=oa;Yt.prototype.delete=aa;Yt.prototype.get=ca;Yt.prototype.has=da;Yt.prototype.set=ua;var bt=Yt;var Ng=ke(ne,"Map"),kt=Ng;function Rg(){this.size=0,this.__data__={hash:new zn,map:new(kt||bt),string:new zn}}var la=Rg;function _g(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}var fa=_g;function Ug(r,e){var t=r.__data__;return fa(e)?t[typeof e=="string"?"string":"hash"]:t.map}var It=Ug;function Bg(r){var e=It(this,r).delete(r);return this.size-=e?1:0,e}var ma=Bg;function Fg(r){return It(this,r).get(r)}var ga=Fg;function Hg(r){return It(this,r).has(r)}var pa=Hg;function Vg(r,e){var t=It(this,r),i=t.size;return t.set(r,e),this.size+=t.size==i?0:1,this}var ha=Vg;function Zt(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var i=r[e];this.set(i[0],i[1])}}Zt.prototype.clear=la;Zt.prototype.delete=ma;Zt.prototype.get=ga;Zt.prototype.has=pa;Zt.prototype.set=ha;var Ot=Zt;var jg="Expected a function";function Yn(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(jg);var t=function(){var i=arguments,n=e?e.apply(this,i):i[0],s=t.cache;if(s.has(n))return s.get(n);var a=r.apply(this,i);return t.cache=s.set(n,a)||s,a};return t.cache=new(Yn.Cache||Ot),t}Yn.Cache=Ot;var ya=Yn;var Wg=500;function Gg(r){var e=ya(r,function(i){return t.size===Wg&&t.clear(),i}),t=e.cache;return e}var va=Gg;var $g=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qg=/\\(\\)?/g,Kg=va(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace($g,function(t,i,n,s){e.push(n?s.replace(qg,"$1"):i||t)}),e}),ba=Kg;function Jg(r){return r==null?"":bo(r)}var qe=Jg;function Qg(r,e){return W(r)?r:Qt(r,e)?[r]:ba(qe(r))}var Xt=Qg;var zg=1/0;function Yg(r){if(typeof r=="string"||mt(r))return r;var e=r+"";return e=="0"&&1/r==-zg?"-0":e}var Ke=Yg;function Zg(r,e){e=Xt(e,r);for(var t=0,i=e.length;r!=null&&t<i;)r=r[Ke(e[t++])];return t&&t==i?r:void 0}var pr=Zg;function Xg(r,e,t){var i=r==null?void 0:pr(r,e);return i===void 0?t:i}var it=Xg;function ep(r,e){for(var t=-1,i=e.length,n=r.length;++t<i;)r[n+t]=e[t];return r}var ei=ep;var ka=ue?ue.isConcatSpreadable:void 0;function tp(r){return W(r)||De(r)||!!(ka&&r&&r[ka])}var Ia=tp;function xa(r,e,t,i,n){var s=-1,a=r.length;for(t||(t=Ia),n||(n=[]);++s<a;){var o=r[s];e>0&&t(o)?e>1?xa(o,e-1,t,i,n):ei(n,o):i||(n[n.length]=o)}return n}var hr=xa;function ip(r){var e=r==null?0:r.length;return e?hr(r,1):[]}var Zn=ip;var rp=mr(Object.getPrototypeOf,Object),xt=rp;var np="[object Object]",sp=Function.prototype,op=Object.prototype,Aa=sp.toString,ap=op.hasOwnProperty,cp=Aa.call(Object);function dp(r){if(!oe(r)||ye(r)!=np)return!1;var e=xt(r);if(e===null)return!0;var t=ap.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Aa.call(t)==cp}var Ca=dp;function up(r,e,t){var i=-1,n=r.length;e<0&&(e=-e>n?0:n+e),t=t>n?n:t,t<0&&(t+=n),n=e>t?0:t-e>>>0,e>>>=0;for(var s=Array(n);++i<n;)s[i]=r[i+e];return s}var Sa=up;function lp(r,e,t){var i=r.length;return t=t===void 0?i:t,!e&&t>=i?r:Sa(r,e,t)}var Pa=lp;var fp="\\ud800-\\udfff",mp="\\u0300-\\u036f",gp="\\ufe20-\\ufe2f",pp="\\u20d0-\\u20ff",hp=mp+gp+pp,yp="\\ufe0e\\ufe0f",vp="\\u200d",bp=RegExp("["+vp+fp+hp+yp+"]");function kp(r){return bp.test(r)}var yr=kp;function Ip(r){return r.split("")}var wa=Ip;var Ta="\\ud800-\\udfff",xp="\\u0300-\\u036f",Ap="\\ufe20-\\ufe2f",Cp="\\u20d0-\\u20ff",Sp=xp+Ap+Cp,Pp="\\ufe0e\\ufe0f",wp="["+Ta+"]",Xn="["+Sp+"]",es="\\ud83c[\\udffb-\\udfff]",Tp="(?:"+Xn+"|"+es+")",Ea="[^"+Ta+"]",Ma="(?:\\ud83c[\\udde6-\\uddff]){2}",La="[\\ud800-\\udbff][\\udc00-\\udfff]",Ep="\\u200d",Da=Tp+"?",Oa="["+Pp+"]?",Mp="(?:"+Ep+"(?:"+[Ea,Ma,La].join("|")+")"+Oa+Da+")*",Lp=Oa+Da+Mp,Dp="(?:"+[Ea+Xn+"?",Xn,Ma,La,wp].join("|")+")",Op=RegExp(es+"(?="+es+")|"+Dp+Lp,"g");function Np(r){return r.match(Op)||[]}var Na=Np;function Rp(r){return yr(r)?Na(r):wa(r)}var Ra=Rp;function _p(r){return function(e){e=qe(e);var t=yr(e)?Ra(e):void 0,i=t?t[0]:e.charAt(0),n=t?Pa(t,1).join(""):e.slice(1);return i[r]()+n}}var _a=_p;var Up=_a("toUpperCase"),vr=Up;function Bp(r){return vr(qe(r).toLowerCase())}var Ua=Bp;function Fp(r,e,t,i){var n=-1,s=r==null?0:r.length;for(i&&s&&(t=r[++n]);++n<s;)t=e(t,r[n],n,r);return t}var Ba=Fp;function Hp(r){return function(e){return r==null?void 0:r[e]}}var Fa=Hp;var Vp={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},jp=Fa(Vp),Ha=jp;var Wp=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Gp="\\u0300-\\u036f",$p="\\ufe20-\\ufe2f",qp="\\u20d0-\\u20ff",Kp=Gp+$p+qp,Jp="["+Kp+"]",Qp=RegExp(Jp,"g");function zp(r){return r=qe(r),r&&r.replace(Wp,Ha).replace(Qp,"")}var Va=zp;var Yp=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Zp(r){return r.match(Yp)||[]}var ja=Zp;var Xp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function eh(r){return Xp.test(r)}var Wa=eh;var Ja="\\ud800-\\udfff",th="\\u0300-\\u036f",ih="\\ufe20-\\ufe2f",rh="\\u20d0-\\u20ff",nh=th+ih+rh,Qa="\\u2700-\\u27bf",za="a-z\\xdf-\\xf6\\xf8-\\xff",sh="\\xac\\xb1\\xd7\\xf7",oh="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ah="\\u2000-\\u206f",ch=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ya="A-Z\\xc0-\\xd6\\xd8-\\xde",dh="\\ufe0e\\ufe0f",Za=sh+oh+ah+ch,Xa="['\u2019]",Ga="["+Za+"]",uh="["+nh+"]",ec="\\d+",lh="["+Qa+"]",tc="["+za+"]",ic="[^"+Ja+Za+ec+Qa+za+Ya+"]",fh="\\ud83c[\\udffb-\\udfff]",mh="(?:"+uh+"|"+fh+")",gh="[^"+Ja+"]",rc="(?:\\ud83c[\\udde6-\\uddff]){2}",nc="[\\ud800-\\udbff][\\udc00-\\udfff]",ti="["+Ya+"]",ph="\\u200d",$a="(?:"+tc+"|"+ic+")",hh="(?:"+ti+"|"+ic+")",qa="(?:"+Xa+"(?:d|ll|m|re|s|t|ve))?",Ka="(?:"+Xa+"(?:D|LL|M|RE|S|T|VE))?",sc=mh+"?",oc="["+dh+"]?",yh="(?:"+ph+"(?:"+[gh,rc,nc].join("|")+")"+oc+sc+")*",vh="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bh="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",kh=oc+sc+yh,Ih="(?:"+[lh,rc,nc].join("|")+")"+kh,xh=RegExp([ti+"?"+tc+"+"+qa+"(?="+[Ga,ti,"$"].join("|")+")",hh+"+"+Ka+"(?="+[Ga,ti+$a,"$"].join("|")+")",ti+"?"+$a+"+"+qa,ti+"+"+Ka,bh,vh,ec,Ih].join("|"),"g");function Ah(r){return r.match(xh)||[]}var ac=Ah;function Ch(r,e,t){return r=qe(r),e=t?void 0:e,e===void 0?Wa(r)?ac(r):ja(r):r.match(e)||[]}var cc=Ch;var Sh="['\u2019]",Ph=RegExp(Sh,"g");function wh(r){return function(e){return Ba(cc(Va(e).replace(Ph,"")),r,"")}}var br=wh;var Th=br(function(r,e,t){return e=e.toLowerCase(),r+(t?Ua(e):e)}),ts=Th;function Eh(){this.__data__=new bt,this.size=0}var dc=Eh;function Mh(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}var uc=Mh;function Lh(r){return this.__data__.get(r)}var lc=Lh;function Dh(r){return this.__data__.has(r)}var fc=Dh;var Oh=200;function Nh(r,e){var t=this.__data__;if(t instanceof bt){var i=t.__data__;if(!kt||i.length<Oh-1)return i.push([r,e]),this.size=++t.size,this;t=this.__data__=new Ot(i)}return t.set(r,e),this.size=t.size,this}var mc=Nh;function ii(r){var e=this.__data__=new bt(r);this.size=e.size}ii.prototype.clear=dc;ii.prototype.delete=uc;ii.prototype.get=lc;ii.prototype.has=fc;ii.prototype.set=mc;var Je=ii;function Rh(r,e){return r&&Ve(e,Ge(e),r)}var gc=Rh;function _h(r,e){return r&&Ve(e,$e(e),r)}var pc=_h;var bc=typeof exports=="object"&&exports&&!exports.nodeType&&exports,hc=bc&&typeof module=="object"&&module&&!module.nodeType&&module,Uh=hc&&hc.exports===bc,yc=Uh?ne.Buffer:void 0,vc=yc?yc.allocUnsafe:void 0;function Bh(r,e){if(e)return r.slice();var t=r.length,i=vc?vc(t):new r.constructor(t);return r.copy(i),i}var kr=Bh;function Fh(r,e){for(var t=-1,i=r==null?0:r.length,n=0,s=[];++t<i;){var a=r[t];e(a,t,r)&&(s[n++]=a)}return s}var kc=Fh;function Hh(){return[]}var Ir=Hh;var Vh=Object.prototype,jh=Vh.propertyIsEnumerable,Ic=Object.getOwnPropertySymbols,Wh=Ic?function(r){return r==null?[]:(r=Object(r),kc(Ic(r),function(e){return jh.call(r,e)}))}:Ir,ri=Wh;function Gh(r,e){return Ve(r,ri(r),e)}var xc=Gh;var $h=Object.getOwnPropertySymbols,qh=$h?function(r){for(var e=[];r;)ei(e,ri(r)),r=xt(r);return e}:Ir,xr=qh;function Kh(r,e){return Ve(r,xr(r),e)}var Ac=Kh;function Jh(r,e,t){var i=e(r);return W(r)?i:ei(i,t(r))}var Ar=Jh;function Qh(r){return Ar(r,Ge,ri)}var Oi=Qh;function zh(r){return Ar(r,$e,xr)}var Cc=zh;var Yh=ke(ne,"DataView"),Cr=Yh;var Zh=ke(ne,"Promise"),Sr=Zh;var Xh=ke(ne,"Set"),At=Xh;var Sc="[object Map]",ey="[object Object]",Pc="[object Promise]",wc="[object Set]",Tc="[object WeakMap]",Ec="[object DataView]",ty=et(Cr),iy=et(kt),ry=et(Sr),ny=et(At),sy=et(ar),Nt=ye;(Cr&&Nt(new Cr(new ArrayBuffer(1)))!=Ec||kt&&Nt(new kt)!=Sc||Sr&&Nt(Sr.resolve())!=Pc||At&&Nt(new At)!=wc||ar&&Nt(new ar)!=Tc)&&(Nt=function(r){var e=ye(r),t=e==ey?r.constructor:void 0,i=t?et(t):"";if(i)switch(i){case ty:return Ec;case iy:return Sc;case ry:return Pc;case ny:return wc;case sy:return Tc}return e});var Oe=Nt;var oy=Object.prototype,ay=oy.hasOwnProperty;function cy(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&ay.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var Mc=cy;var dy=ne.Uint8Array,ni=dy;function uy(r){var e=new r.constructor(r.byteLength);return new ni(e).set(new ni(r)),e}var si=uy;function ly(r,e){var t=e?si(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}var Lc=ly;var fy=/\w*$/;function my(r){var e=new r.constructor(r.source,fy.exec(r));return e.lastIndex=r.lastIndex,e}var Dc=my;var Oc=ue?ue.prototype:void 0,Nc=Oc?Oc.valueOf:void 0;function gy(r){return Nc?Object(Nc.call(r)):{}}var Rc=gy;function py(r,e){var t=e?si(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var Pr=py;var hy="[object Boolean]",yy="[object Date]",vy="[object Map]",by="[object Number]",ky="[object RegExp]",Iy="[object Set]",xy="[object String]",Ay="[object Symbol]",Cy="[object ArrayBuffer]",Sy="[object DataView]",Py="[object Float32Array]",wy="[object Float64Array]",Ty="[object Int8Array]",Ey="[object Int16Array]",My="[object Int32Array]",Ly="[object Uint8Array]",Dy="[object Uint8ClampedArray]",Oy="[object Uint16Array]",Ny="[object Uint32Array]";function Ry(r,e,t){var i=r.constructor;switch(e){case Cy:return si(r);case hy:case yy:return new i(+r);case Sy:return Lc(r,t);case Py:case wy:case Ty:case Ey:case My:case Ly:case Dy:case Oy:case Ny:return Pr(r,t);case vy:return new i;case by:case xy:return new i(r);case ky:return Dc(r);case Iy:return new i;case Ay:return Rc(r)}}var _c=Ry;function _y(r){return typeof r.constructor=="function"&&!ht(r)?cr(xt(r)):{}}var wr=_y;var Uy="[object Map]";function By(r){return oe(r)&&Oe(r)==Uy}var Uc=By;var Bc=we&&we.isMap,Fy=Bc?yt(Bc):Uc,Fc=Fy;var Hy="[object Set]";function Vy(r){return oe(r)&&Oe(r)==Hy}var Hc=Vy;var Vc=we&&we.isSet,jy=Vc?yt(Vc):Hc,jc=jy;var Wy=1,Gy=2,$y=4,Wc="[object Arguments]",qy="[object Array]",Ky="[object Boolean]",Jy="[object Date]",Qy="[object Error]",Gc="[object Function]",zy="[object GeneratorFunction]",Yy="[object Map]",Zy="[object Number]",$c="[object Object]",Xy="[object RegExp]",ev="[object Set]",tv="[object String]",iv="[object Symbol]",rv="[object WeakMap]",nv="[object ArrayBuffer]",sv="[object DataView]",ov="[object Float32Array]",av="[object Float64Array]",cv="[object Int8Array]",dv="[object Int16Array]",uv="[object Int32Array]",lv="[object Uint8Array]",fv="[object Uint8ClampedArray]",mv="[object Uint16Array]",gv="[object Uint32Array]",ee={};ee[Wc]=ee[qy]=ee[nv]=ee[sv]=ee[Ky]=ee[Jy]=ee[ov]=ee[av]=ee[cv]=ee[dv]=ee[uv]=ee[Yy]=ee[Zy]=ee[$c]=ee[Xy]=ee[ev]=ee[tv]=ee[iv]=ee[lv]=ee[fv]=ee[mv]=ee[gv]=!0;ee[Qy]=ee[Gc]=ee[rv]=!1;function Tr(r,e,t,i,n,s){var a,o=e&Wy,c=e&Gy,d=e&$y;if(t&&(a=n?t(r,i,n,s):t(r)),a!==void 0)return a;if(!Q(r))return r;var l=W(r);if(l){if(a=Mc(r),!o)return dr(r,a)}else{var f=Oe(r),m=f==Gc||f==zy;if(Ce(r))return kr(r,o);if(f==$c||f==Wc||m&&!n){if(a=c||m?{}:wr(r),!o)return c?Ac(r,pc(a,r)):xc(r,gc(a,r))}else{if(!ee[f])return n?r:{};a=_c(r,f,o)}}s||(s=new Je);var g=s.get(r);if(g)return g;s.set(r,a),jc(r)?r.forEach(function(x){a.add(Tr(x,e,t,x,r,s))}):Fc(r)&&r.forEach(function(x,S){a.set(S,Tr(x,e,t,S,r,s))});var y=d?c?Cc:Oi:c?$e:Ge,I=l?void 0:y(r);return ur(I||r,function(x,S){I&&(S=x,x=r[S]),Kt(a,S,Tr(x,e,t,S,r,s))}),a}var qc=Tr;var pv=1,hv=4;function yv(r){return qc(r,pv|hv)}var Rt=yv;var vv="__lodash_hash_undefined__";function bv(r){return this.__data__.set(r,vv),this}var Kc=bv;function kv(r){return this.__data__.has(r)}var Jc=kv;function Er(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new Ot;++e<t;)this.add(r[e])}Er.prototype.add=Er.prototype.push=Kc;Er.prototype.has=Jc;var Mr=Er;function Iv(r,e){for(var t=-1,i=r==null?0:r.length;++t<i;)if(e(r[t],t,r))return!0;return!1}var Qc=Iv;function xv(r,e){return r.has(e)}var Lr=xv;var Av=1,Cv=2;function Sv(r,e,t,i,n,s){var a=t&Av,o=r.length,c=e.length;if(o!=c&&!(a&&c>o))return!1;var d=s.get(r),l=s.get(e);if(d&&l)return d==e&&l==r;var f=-1,m=!0,g=t&Cv?new Mr:void 0;for(s.set(r,e),s.set(e,r);++f<o;){var y=r[f],I=e[f];if(i)var x=a?i(I,y,f,e,r,s):i(y,I,f,r,e,s);if(x!==void 0){if(x)continue;m=!1;break}if(g){if(!Qc(e,function(S,T){if(!Lr(g,T)&&(y===S||n(y,S,t,i,s)))return g.push(T)})){m=!1;break}}else if(!(y===I||n(y,I,t,i,s))){m=!1;break}}return s.delete(r),s.delete(e),m}var Dr=Sv;function Pv(r){var e=-1,t=Array(r.size);return r.forEach(function(i,n){t[++e]=[n,i]}),t}var zc=Pv;function wv(r){var e=-1,t=Array(r.size);return r.forEach(function(i){t[++e]=i}),t}var oi=wv;var Tv=1,Ev=2,Mv="[object Boolean]",Lv="[object Date]",Dv="[object Error]",Ov="[object Map]",Nv="[object Number]",Rv="[object RegExp]",_v="[object Set]",Uv="[object String]",Bv="[object Symbol]",Fv="[object ArrayBuffer]",Hv="[object DataView]",Yc=ue?ue.prototype:void 0,is=Yc?Yc.valueOf:void 0;function Vv(r,e,t,i,n,s,a){switch(t){case Hv:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case Fv:return!(r.byteLength!=e.byteLength||!s(new ni(r),new ni(e)));case Mv:case Lv:case Nv:return He(+r,+e);case Dv:return r.name==e.name&&r.message==e.message;case Rv:case Uv:return r==e+"";case Ov:var o=zc;case _v:var c=i&Tv;if(o||(o=oi),r.size!=e.size&&!c)return!1;var d=a.get(r);if(d)return d==e;i|=Ev,a.set(r,e);var l=Dr(o(r),o(e),i,n,s,a);return a.delete(r),l;case Bv:if(is)return is.call(r)==is.call(e)}return!1}var Zc=Vv;var jv=1,Wv=Object.prototype,Gv=Wv.hasOwnProperty;function $v(r,e,t,i,n,s){var a=t&jv,o=Oi(r),c=o.length,d=Oi(e),l=d.length;if(c!=l&&!a)return!1;for(var f=c;f--;){var m=o[f];if(!(a?m in e:Gv.call(e,m)))return!1}var g=s.get(r),y=s.get(e);if(g&&y)return g==e&&y==r;var I=!0;s.set(r,e),s.set(e,r);for(var x=a;++f<c;){m=o[f];var S=r[m],T=e[m];if(i)var M=a?i(T,S,m,e,r,s):i(S,T,m,r,e,s);if(!(M===void 0?S===T||n(S,T,t,i,s):M)){I=!1;break}x||(x=m=="constructor")}if(I&&!x){var C=r.constructor,P=e.constructor;C!=P&&"constructor"in r&&"constructor"in e&&!(typeof C=="function"&&C instanceof C&&typeof P=="function"&&P instanceof P)&&(I=!1)}return s.delete(r),s.delete(e),I}var Xc=$v;var qv=1,ed="[object Arguments]",td="[object Array]",Or="[object Object]",Kv=Object.prototype,id=Kv.hasOwnProperty;function Jv(r,e,t,i,n,s){var a=W(r),o=W(e),c=a?td:Oe(r),d=o?td:Oe(e);c=c==ed?Or:c,d=d==ed?Or:d;var l=c==Or,f=d==Or,m=c==d;if(m&&Ce(r)){if(!Ce(e))return!1;a=!0,l=!1}if(m&&!l)return s||(s=new Je),a||We(r)?Dr(r,e,t,i,n,s):Zc(r,e,c,t,i,n,s);if(!(t&qv)){var g=l&&id.call(r,"__wrapped__"),y=f&&id.call(e,"__wrapped__");if(g||y){var I=g?r.value():r,x=y?e.value():e;return s||(s=new Je),n(I,x,t,i,s)}}return m?(s||(s=new Je),Xc(r,e,t,i,n,s)):!1}var rd=Jv;function nd(r,e,t,i,n){return r===e?!0:r==null||e==null||!oe(r)&&!oe(e)?r!==r&&e!==e:rd(r,e,t,i,nd,n)}var ai=nd;var Qv=1,zv=2;function Yv(r,e,t,i){var n=t.length,s=n,a=!i;if(r==null)return!s;for(r=Object(r);n--;){var o=t[n];if(a&&o[2]?o[1]!==r[o[0]]:!(o[0]in r))return!1}for(;++n<s;){o=t[n];var c=o[0],d=r[c],l=o[1];if(a&&o[2]){if(d===void 0&&!(c in r))return!1}else{var f=new Je;if(i)var m=i(d,l,c,r,e,f);if(!(m===void 0?ai(l,d,Qv|zv,i,f):m))return!1}}return!0}var sd=Yv;function Zv(r){return r===r&&!Q(r)}var Nr=Zv;function Xv(r){for(var e=Ge(r),t=e.length;t--;){var i=e[t],n=r[i];e[t]=[i,n,Nr(n)]}return e}var od=Xv;function eb(r,e){return function(t){return t==null?!1:t[r]===e&&(e!==void 0||r in Object(t))}}var Rr=eb;function tb(r){var e=od(r);return e.length==1&&e[0][2]?Rr(e[0][0],e[0][1]):function(t){return t===r||sd(t,r,e)}}var ad=tb;function ib(r,e){return r!=null&&e in Object(r)}var cd=ib;function rb(r,e,t){e=Xt(e,r);for(var i=-1,n=e.length,s=!1;++i<n;){var a=Ke(e[i]);if(!(s=r!=null&&t(r,a)))break;r=r[a]}return s||++i!=n?s:(n=r==null?0:r.length,!!n&&Jt(n)&&pt(a,n)&&(W(r)||De(r)))}var dd=rb;function nb(r,e){return r!=null&&dd(r,e,cd)}var ud=nb;var sb=1,ob=2;function ab(r,e){return Qt(r)&&Nr(e)?Rr(Ke(r),e):function(t){var i=it(t,r);return i===void 0&&i===e?ud(t,r):ai(e,i,sb|ob)}}var ld=ab;function cb(r){return function(e){return e==null?void 0:e[r]}}var fd=cb;function db(r){return function(e){return pr(e,r)}}var md=db;function ub(r){return Qt(r)?fd(Ke(r)):md(r)}var gd=ub;function lb(r){return typeof r=="function"?r:r==null?Gt:typeof r=="object"?W(r)?ld(r[0],r[1]):ad(r):gd(r)}var pd=lb;function fb(r){return function(e,t,i){for(var n=-1,s=Object(e),a=i(e),o=a.length;o--;){var c=a[r?o:++n];if(t(s[c],c,s)===!1)break}return e}}var hd=fb;var mb=hd(),_r=mb;function gb(r,e){return r&&_r(r,e,Ge)}var yd=gb;var pb=function(){return ne.Date.now()},Ur=pb;var hb="Expected a function",yb=Math.max,vb=Math.min;function bb(r,e,t){var i,n,s,a,o,c,d=0,l=!1,f=!1,m=!0;if(typeof r!="function")throw new TypeError(hb);e=Kn(e)||0,Q(t)&&(l=!!t.leading,f="maxWait"in t,s=f?yb(Kn(t.maxWait)||0,e):s,m="trailing"in t?!!t.trailing:m);function g(w){var L=i,U=n;return i=n=void 0,d=w,a=r.apply(U,L),a}function y(w){return d=w,o=setTimeout(S,e),l?g(w):a}function I(w){var L=w-c,U=w-d,G=e-L;return f?vb(G,s-U):G}function x(w){var L=w-c,U=w-d;return c===void 0||L>=e||L<0||f&&U>=s}function S(){var w=Ur();if(x(w))return T(w);o=setTimeout(S,I(w))}function T(w){return o=void 0,m&&i?g(w):(i=n=void 0,a)}function M(){o!==void 0&&clearTimeout(o),d=0,i=c=n=o=void 0}function C(){return o===void 0?a:T(Ur())}function P(){var w=Ur(),L=x(w);if(i=arguments,n=this,c=w,L){if(o===void 0)return y(c);if(f)return clearTimeout(o),o=setTimeout(S,e),g(c)}return o===void 0&&(o=setTimeout(S,e)),a}return P.cancel=M,P.flush=C,P}var Ni=bb;function kb(r,e,t){(t!==void 0&&!He(r[e],t)||t===void 0&&!(e in r))&&qt(r,e,t)}var Ri=kb;function Ib(r){return oe(r)&&je(r)}var Br=Ib;function xb(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}var _i=xb;function Ab(r){return Ve(r,$e(r))}var vd=Ab;function Cb(r,e,t,i,n,s,a){var o=_i(r,t),c=_i(e,t),d=a.get(c);if(d){Ri(r,t,d);return}var l=s?s(o,c,t+"",r,e,a):void 0,f=l===void 0;if(f){var m=W(c),g=!m&&Ce(c),y=!m&&!g&&We(c);l=c,m||g||y?W(o)?l=o:Br(o)?l=dr(o):g?(f=!1,l=kr(c,!0)):y?(f=!1,l=Pr(c,!0)):l=[]:Ca(c)||De(c)?(l=o,De(o)?l=vd(o):(!Q(o)||gt(o))&&(l=wr(c))):f=!1}f&&(a.set(c,l),n(l,c,i,s,a),a.delete(c)),Ri(r,t,l)}var bd=Cb;function kd(r,e,t,i,n){r!==e&&_r(e,function(s,a){if(n||(n=new Je),Q(s))bd(r,e,a,t,kd,i,n);else{var o=i?i(_i(r,a),s,a+"",r,e,n):void 0;o===void 0&&(o=s),Ri(r,a,o)}},$e)}var Id=kd;var Sb=jo(function(r,e,t,i){Id(r,e,t,i)}),rs=Sb;function Pb(r,e,t){for(var i=-1,n=r==null?0:r.length;++i<n;)if(t(e,r[i]))return!0;return!1}var xd=Pb;function wb(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var Fr=wb;var Tb="[object Date]";function Eb(r){return oe(r)&&ye(r)==Tb}var Ad=Eb;var Cd=we&&we.isDate,Mb=Cd?yt(Cd):Ad,ns=Mb;var Lb="[object Map]",Db="[object Set]",Ob=Object.prototype,Nb=Ob.hasOwnProperty;function Rb(r){if(r==null)return!0;if(je(r)&&(W(r)||typeof r=="string"||typeof r.splice=="function"||Ce(r)||We(r)||De(r)))return!r.length;var e=Oe(r);if(e==Lb||e==Db)return!r.size;if(ht(r))return!gr(r).length;for(var t in r)if(Nb.call(r,t))return!1;return!0}var ss=Rb;function _b(r,e,t){t=typeof t=="function"?t:void 0;var i=t?t(r,e):void 0;return i===void 0?ai(r,e,void 0,t):!!i}var Hr=_b;function Ub(r,e,t,i){if(!Q(r))return r;e=Xt(e,r);for(var n=-1,s=e.length,a=s-1,o=r;o!=null&&++n<s;){var c=Ke(e[n]),d=t;if(c==="__proto__"||c==="constructor"||c==="prototype")return r;if(n!=a){var l=o[c];d=i?i(l,c,o):void 0,d===void 0&&(d=Q(l)?l:pt(e[n+1])?[]:{})}Kt(o,c,d),o=o[c]}return r}var Sd=Ub;function Bb(r,e,t){return r==null?r:Sd(r,e,t)}var os=Bb;var Fb=br(function(r,e,t){return r+(t?" ":"")+vr(e)}),as=Fb;function Hb(r,e,t){var i=W(r),n=i||Ce(r)||We(r);if(e=pd(e,4),t==null){var s=r&&r.constructor;n?t=i?new s:[]:Q(r)?t=gt(s)?cr(xt(r)):{}:t={}}return(n?ur:yd)(r,function(a,o,c){return e(t,a,o,c)}),t}var cs=Hb;var Vb=1/0,jb=At&&1/oi(new At([,-0]))[1]==Vb?function(r){return new At(r)}:Eo,Pd=jb;var Wb=200;function Gb(r,e,t){var i=-1,n=Bo,s=r.length,a=!0,o=[],c=o;if(t)a=!1,n=xd;else if(s>=Wb){var d=e?null:Pd(r);if(d)return oi(d);a=!1,n=Lr,c=new Mr}else c=e?[]:o;e:for(;++i<s;){var l=r[i],f=e?e(l):l;if(l=t||l!==0?l:0,a&&f===f){for(var m=c.length;m--;)if(c[m]===f)continue e;e&&c.push(f),o.push(l)}else n(c,f,t)||(c!==o&&c.push(f),o.push(l))}return o}var Vr=Gb;var $b=lr(function(r){return Vr(hr(r,1,Br,!0))}),jr=$b;function qb(r){return r&&r.length?Vr(r):[]}var ci=qb;var Kb=(r,e,i={})=>{var t=uo(i,[]);let n=[],s=Ni(()=>h(null,null,function*(){let c=[...n];n.length=0,yield r(c)}),e,p({maxWait:e},t)),a=()=>{s.cancel(),n.length=0},o=c=>{W(c)?n.push(...Zn(c)):n.push(c),s()};return o.cancel=a,o.flush=s.flush,o},wd=Kb;var Ui=r=>{function e(t){return cs(t,function(i,n,s){let a=!ns(n)&&Q(n),o=a?e(n):n;a&&ss(o)||(W(i)?i.push(o):i[s]=o)})}return Q(r)?e(r):r};var ve=(D=>(D.Undefined="undefined",D.PageViewOrganic="pageViewOrganic",D.PageViewUtmAttributed="pageViewUtmAttributed",D.AddPaymentMethod="addPaymentMethod",D.AddToWishlist="addToWishlist",D.ContactMessage="contactMessage",D.Custom="custom",D.SyncCart="syncCart",D.Order="order",D.InitiateCheckout="initiateCheckout",D.AddToCart="addToCart",D.RemoveFromCart="removeFromCart",D.OneTimeItemPurchase="oneTimeItemPurchase",D.SubscriptionItemPurchase="subscriptionItemPurchase",D.ViewProduct="viewProduct",D.ViewPage="viewPage",D.ApplyPromotionalCode="applyPromotionalCode",D.KeywordSearch="keywordSearch",D.UserLoginSignup="userLoginSignup",D.UserLogin="userLogin",D.NewsletterSignup="newsletterSignup",D.Lead="lead",D.ChangeProductAttribute="changeProductAttribute",D.FilterItemsByAttribute="filterItemsByAttribute",D.Schedule="schedule",D.ViewContentItem="viewContentItem",D.StartTrial="startTrial",D))(ve||{}),Wr=(n=>(n.Undefined="undefined",n.SingleProduct="singleProduct",n.SingleVariant="singleVariant",n.Collection="collection",n))(Wr||{}),Gr=(c=>(c.None="none",c.BigCommerce="bigCommerce",c.Shopify="shopify",c.OrderGroove="orderGroove",c.Magento="magento",c.Generic="generic",c.WooCommerce="wooCommerce",c.Demandware="demandware",c))(Gr||{}),ds=(a=>(a.Undefined="undefined",a.Fulfilled="fulfilled",a.NoneFulfilled="noneFulfilled",a.PartiallyFulfilled="partiallyFulfilled",a.RestockedOrCancelled="restockedOrCancelled",a.Pending="pending",a))(ds||{}),us=(c=>(c.Undefined="undefined",c.Pending="pending",c.Authorized="authorized",c.PartiallyPaid="partiallyPaid",c.Paid="paid",c.PartiallyRefunded="partiallyRefunded",c.Refunded="refunded",c.Voided="voided",c))(us||{}),$r=(f=>(f.Undefined="undefined",f.Seeka="seeka",f.DynamicYield="dynamicYield",f.Segment="segment",f.FacebookPixel="facebookPixel",f.GoogleAnalytics="googleAnalytics",f.Braze="braze",f.SnapchatPixel="snapchatPixel",f.Pinterest="pinterest",f.TikTokPixel="tikTokPixel",f.GoogleAds="googleAds",f))($r||{}),qr=(a=>(a.Default="default",a.Sku="sku",a.ProductId="productId",a.VariantId="variantId",a.ProductIdAndVariantIdUnderscore="productIdAndVariantIdUnderscore",a.VariantIdOrProductId="variantIdOrProductId",a))(qr||{});var Bi=(w=>(w.Undefined="undefined",w.Equals="equals",w.NotEquals="notEquals",w.Contains="contains",w.NotContains="notContains",w.StartsWith="startsWith",w.EndsWith="endsWith",w.IsNull="isNull",w.NotNull="notNull",w.IsTrue="isTrue",w.IsFalse="isFalse",w.GreaterThanOrEquals="greaterThanOrEquals",w.LessThanOrEquals="lessThanOrEquals",w.GreaterThan="greaterThan",w.LessThan="lessThan",w.Before="before",w.After="after",w.Between="between",w.In="in",w.NotIn="notIn",w.Regex="regEx",w.Any="any",w))(Bi||{});var ls=(i=>(i.Unset="unset",i.Granted="granted",i.Denied="denied",i))(ls||{}),Kr=(t=>(t.Undefined="undefined",t.MeasureAdvertisingPerformance="measureAdvertisingPerformance",t))(Kr||{}),fs=(i=>(i.Undefined="undefined",i.AllOf="allOf",i.AnyOf="anyOf",i))(fs||{}),Jr=(i=>(i.Disabled="disabled",i.Explicit="explicit",i.Implicit="implicit",i))(Jr||{}),ms=(C=>(C.Undefined="undefined",C.Custom="custom",C.AddPaymentInfo="addPaymentInfo",C.AddToCart="addToCart",C.AddToWishlist="addToWishlist",C.CompleteRegistration="completeRegistration",C.Contact="contact",C.CustomizeProduct="customizeProduct",C.Donate="donate",C.FindLocation="findLocation",C.InitiateCheckout="initiateCheckout",C.Lead="lead",C.PageView="pageView",C.Purchase="purchase",C.Schedule="schedule",C.Search="search",C.StartTrial="startTrial",C.SubmitApplication="submitApplication",C.Subscribe="subscribe",C.ViewContent="viewContent",C))(ms||{}),gs=(g=>(g.Undefined="undefined",g.Other="other",g.Home="home",g.Category="category",g.SingleProduct="singleProduct",g.Cart="cart",g.SinglePost="singlePost",g.PostList="postList",g.SignIn="signIn",g.CheckoutStart="checkoutStart",g.CheckoutStep="checkoutStep",g.CheckoutSuccess="checkoutSuccess",g.SearchResults="searchResults",g))(gs||{}),Fi=(a=>(a.Undefined="undefined",a.FullyFeatured="fullyFeatured",a.BrowserOnlyDueToCurrentPlan="browserOnlyDueToCurrentPlan",a.BrowserOnlyDueToBillingFailure="browserOnlyDueToBillingFailure",a.NoFeaturesEnabledDueToBillingFailure="noFeaturesEnabledDueToBillingFailure",a.NoFeaturesEnabledDueToNoCurrentPlan="noFeaturesEnabledDueToNoCurrentPlan",a))(Fi||{});var Hi=(n=>(n.Information="information",n.Warning="warning",n.Error="error",n.Verbose="verbose",n))(Hi||{});var Ct=class{constructor(e,t){u(this,"ingest");this.ingest=new ps(e,t)}};u(Ct,"immediateTriggerSendForActivities",["addPaymentMethod","addToCart","contactMessage","lead","order","initiateCheckout","schedule","startTrial","subscriptionItemPurchase","newsletterSignup"]);var ps=class{constructor(e,t){u(this,"push");u(this,"send");u(this,"sdk");u(this,"flushQueueDebounced");this.sdk=t;let i={fetch(s,a){return h(this,null,function*(){var g,y,I,x,S,T,M,C,P,w,L,U,G,$,D,z,re,Z;let o=(t==null?void 0:t.config)||e,c=p({},a!=null?a:{});(c.keepalive===void 0||c.keepalive===null)&&(c.keepalive=!0);let d=new Headers(c.headers);d.set("Accept","application/json"),d.set("X-OrgId",o.organisationId),d.set("X-Converge-Key",o.key),(g=o.runtime)!=null&&g.ver&&d.set("X-Sdk-Runtime-Version",(y=o.runtime)==null?void 0:y.ver),(I=o.runtime)!=null&&I.type&&d.set("X-Sdk-Runtime-Type",(x=o.runtime)==null?void 0:x.type),(T=(S=o.runtime)==null?void 0:S.client)!=null&&T.ver&&d.set("X-Sdk-Client-Version",(C=(M=o.runtime)==null?void 0:M.client)==null?void 0:C.ver),(w=(P=o.runtime)==null?void 0:P.client)!=null&&w.type&&d.set("X-Sdk-Client-Type",(U=(L=o.runtime)==null?void 0:L.client)==null?void 0:U.type),(D=($=(G=o.runtime)==null?void 0:G.client)==null?void 0:$.origin)!=null&&D.h&&d.set("X-Sdk-Client-Origin-Host",(Z=(re=(z=o.runtime)==null?void 0:z.client)==null?void 0:re.origin)==null?void 0:Z.h),c.headers=d;let l=new AbortController,f=setTimeout(()=>l.abort(),2e4);c.signal=l.signal;let m=yield window.fetch(s,c);return clearTimeout(f),m})}};this.flushQueueDebounced=wd(s=>h(this,null,function*(){if(!(!s||s.length===0))try{this.sdk&&this.sdk.debug.verbose("Publish - processing queue",{queueItems:s});let a=s.filter(l=>!!l.activity).map(l=>l.activity),o=s.filter(l=>!!l.identity).map(l=>l.identity),c=s.filter(l=>!!l.bot).map(l=>l.bot),d=s.filter(l=>!!l.log).map(l=>l.log);yield Promise.all([this.send(a,o,[],[]),this.send([],[],c,d)]),this.sdk&&this.sdk.debug.verbose("Publish - processed queue",{activity:a,ids:o,bots:c,logs:d})}catch(a){this.sdk||console.error("Seeka - failed to publish queue",a)}}),1700,{}),this.push=(s,a,o,c)=>h(this,null,function*(){this.sdk&&this.sdk.debug.verbose("Publish - pushing to queue",{activities:s,identities:a,bots:o,logs:c}),s&&s.length>0&&this.flushQueueDebounced(s.map(d=>({activity:Ui(p({},d))}))),a&&a.length>0&&this.flushQueueDebounced(a.map(d=>({identity:Ui(p({},d))}))),c&&c.length>0&&this.flushQueueDebounced(c.map(d=>({log:Ui(p({},d))}))),o&&o.length>0&&this.flushQueueDebounced(o.map(d=>({bot:Ui(p({},d))}))),s!=null&&s.some(d=>{var l;return Ct.immediateTriggerSendForActivities.indexOf((l=d.payload)==null?void 0:l.activityName)>-1})&&(yield this.flushQueueDebounced.flush())}),this.send=(s,a,o,c)=>h(this,null,function*(){let d={data:[]};s&&s.length>0&&s.forEach(f=>{d.data.push({ev:f})}),a&&a.length>0&&a.forEach(f=>{d.data.push({id:f})}),o&&o.length>0&&o.forEach(f=>{d.data.push({bot:f})}),c&&c.length>0&&c.forEach(f=>{if(f.properties){let m=typeof f.properties=="string"?f.properties:JSON.stringify(f.properties);m.length>4e3&&(this.sdk&&this.sdk.debug.warn("Publish - log properties too large so not including props in batch",{messageTemplate:f.messageTemplate,jsonPropsLength:m.length}),f.properties={error:"properties removed due to size"})}d.data.push({log:f})});let l=f=>h(this,null,function*(){var y;let m=(t==null?void 0:t.config)||e;if(!(yield i.fetch(`${m.ingestEndpoint}/api/ingest`,{method:"POST",body:JSON.stringify(f),credentials:"omit",mode:"cors",headers:{"Content-Type":"application/json"}})).ok)throw new Error("Failed to publish batch");this.sdk&&((y=f.data)==null||y.forEach(I=>{var x,S,T,M;this.sdk&&this.sdk.debug.verbose(`Publish - send - ${(I.ev?((S=(x=I.ev)==null?void 0:x.payload)==null?void 0:S.activityName)+" "+((M=(T=I.ev)==null?void 0:T.payload)==null?void 0:M.activityId):null)||(I.id?"identity":null)||(I.bot?"bot metric":null)||(I.log?"log":null)||"unknown"}`,{item:I})}))});d&&d.data.length>0&&(yield l(d))})}};var di=class{constructor(e){u(this,"p");u(this,"personId");u(this,"device",{});this.p=e}getTrait(e){throw new Error("Unavailable.")}addTrait(e,t,i){return h(this,null,function*(){this.p("addTrait",[e,t,i])})}setTrait(e,t,i){return h(this,null,function*(){this.p("setTrait",[e,t,i])})}getProfile(){throw new Error("Unavailable.")}setProfile(e){return h(this,null,function*(){this.p("setProfile",[e])})}touchAndGetSessionId(){throw new Error("Unavailable.")}mergeProfile(e){return h(this,null,function*(){this.p("mergeProfile",[e])})}mergeTwoProfiles(e,t){throw new Error("Unavailable.")}reset(e){return h(this,null,function*(){this.p("reset",[e])})}syncIdentity(e){throw new Error("Unavailable.")}isAnonymous(e){throw new Error("Unavailable.")}flushIdentitySyncQueue(){return h(this,null,function*(){this.p("flushIdentitySyncQueue",[])})}sanitiseProfile(e){throw new Error("Unavailable.")}generateNewSessionId(e){throw new Error("Unavailable.")}};var ui=class{constructor(e){u(this,"p");this.p=e}custom(e,t,i){this.p("custom",[e,t,i])}viewPage(e,t){this.p("viewPage",[e,t])}addPaymentMethod(e,t,i){this.p("addPaymentMethod",[e,t,i])}keywordSearch(e,t,i){this.p("keywordSearch",[e,t,i])}userLogin(e,t,i){this.p("userLogin",[e,t,i])}userLoginSignup(e,t,i){this.p("userLoginSignup",[e,t,i])}newsletterSignup(e,t,i){this.p("newsletterSignup",[e,t,i])}applyPromotionalCode(e,t,i){this.p("applyPromotionalCode",[e,t,i])}lead(e,t,i){this.p("lead",[e,t,i])}startTrial(e,t,i){this.p("startTrial",[e,t,i])}contactMessage(e,t,i){this.p("contactMessage",[e,t,i])}schedule(e,t,i){this.p("schedule",[e,t,i])}viewContentItem(e,t,i){this.p("viewContentItem",[e,t,i])}order(e,t,i){this.p("order",[e,t,i])}subscriptionItemPurchase(e,t,i){this.p("subscriptionItemPurchase",[e,t,i])}initiateCheckout(e,t,i){this.p("initiateCheckout",[e,t,i])}viewProduct(e,t,i){this.p("viewProduct",[e,t,i])}addToCart(e,t,i){this.p("addToCart",[e,t,i])}addToWishlist(e,t,i){this.p("addToWishlist",[e,t,i])}removeFromCart(e,t,i){this.p("removeFromCart",[e,t,i])}changeProductAttribute(e,t,i){this.p("changeProductAttribute",[e,t,i])}filterItemsByAttribute(e,t,i){this.p("filterItemsByAttribute",[e,t,i])}activity(e,t,i){this.p("activity",[e,t,i])}};var me=[];for(let r=0;r<256;++r)me.push((r+256).toString(16).slice(1));function Td(r,e=0){return(me[r[e+0]]+me[r[e+1]]+me[r[e+2]]+me[r[e+3]]+"-"+me[r[e+4]]+me[r[e+5]]+"-"+me[r[e+6]]+me[r[e+7]]+"-"+me[r[e+8]]+me[r[e+9]]+"-"+me[r[e+10]]+me[r[e+11]]+me[r[e+12]]+me[r[e+13]]+me[r[e+14]]+me[r[e+15]]).toLowerCase()}var hs,Jb=new Uint8Array(16);function ys(){if(!hs){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");hs=crypto.getRandomValues.bind(crypto)}return hs(Jb)}var Qb=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),vs={randomUUID:Qb};function zb(r,e,t){var n,s,a;if(vs.randomUUID&&!e&&!r)return vs.randomUUID();r=r||{};let i=(a=(s=r.random)!=null?s:(n=r.rng)==null?void 0:n.call(r))!=null?a:ys();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){if(t=t||0,t<0||t+16>e.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let o=0;o<16;++o)e[t+o]=i[o];return e}return Td(i)}var Vi=zb;var Ed=r=>{window.SeekaBindedGlobalErrorListener||(window.addEventListener("unhandledrejection",e=>{var t,i,n,s,a,o,c;r("Unhandled promise rejection",{error:JSON.stringify({stack:((t=e.reason)==null?void 0:t.stack)||((i=e.reason)==null?void 0:i.stacktrace),detail:(n=e.reason)==null?void 0:n.toString(),file:(s=e.reason)==null?void 0:s.filename,loc:((a=e.reason)==null?void 0:a.lineno)+":"+((o=e.reason)==null?void 0:o.colno),message:(c=e.reason)==null?void 0:c.message})})}),window.addEventListener("error",e=>(r("Unhandled error - "+(e==null?void 0:e.message),{error:JSON.stringify({stack:e.error.stack||e.error.stacktrace,detail:e.error.toString(),file:e.filename,loc:e.lineno+":"+e.colno,message:e==null?void 0:e.message})}),!1)),window.SeekaBindedGlobalErrorListener=!0)},ie=typeof window=="undefined";var Md=(r,e)=>Qe()?r==="error":Qr(r)>=Qr(e),Qr=r=>Qe()?4:r=="verbose"?1:r=="information"?2:r=="warning"?3:r=="error"?4:0;function Qe(){return typeof process!="undefined"&&typeof process.env!="undefined"&&process.env.JEST_WORKER_ID!==void 0||typeof jest!="undefined"}var X=class X{constructor(e){u(this,"sdk");u(this,"isDebugEnabled");u(this,"isDebugToStringLogEnabled");u(this,"minimumLevel");u(this,"unitTestEnv");u(this,"isDebugEnabledStateName","debug.isEnabled");u(this,"isDebugToStringEnabledStateName","debug.isEnabled.toString");u(this,"minimumLevelStateName","debug.minimumLevel");u(this,"minimumLevelToPublishToSeekaBackend","warning");u(this,"isSidekickDiagnoseMode");u(this,"isSidekickBuilderMode");var o,c,d,l,f,m,g,y,I,x;this.sdk=e,this.unitTestEnv=Qe();let t=this.sdk.state.get(this.isDebugEnabledStateName),i=!1,n=null;if(!ie){let S=e.dataLayer.window.sessionStorage(),T=e.dataLayer.window.location();if(this.isSidekickDiagnoseMode=S.getItem("seeka_diagid")!=null&&S.getItem("seeka_diagid")!=null||T.href.indexOf("_s_sidekick_mode=diagnose")>-1||S.getItem(T.host+"/sk/_s_sidekick_mode")==="diagnose"||!!((o=this.sdk.config)!=null&&o.testMode),this.isSidekickBuilderMode=((c=T==null?void 0:T.search)==null?void 0:c.indexOf("_s_sidekick_mode=build"))>-1,e.util&&e.util.url)try{n=e.util.url.getParamFromQueryString("debugLevel",T.href),i=!!n}catch(M){console.error("[Seeka] - failed to get debug level from url",M)}}t!=null?this.isDebugEnabled=this.isSidekickDiagnoseMode||t:this.isDebugEnabled=this.isSidekickDiagnoseMode||((l=(d=e.config)==null?void 0:d.debug)==null?void 0:l.isEnabled)===!0||!1,i&&(this.isDebugEnabled=!0);let s=this.sdk.state.get(this.isDebugToStringEnabledStateName);if(s!=null?this.isDebugToStringLogEnabled=s:this.isDebugToStringLogEnabled=((m=(f=e.config)==null?void 0:f.debug)==null?void 0:m.isToStringLogEnabled)===!0||!1,!ie){let S=e.dataLayer.window.sessionStorage();if(S.getItem("seeka_diaglevel")!=null&&S.getItem("seeka_diaglevel")!=null){let T=S.getItem("seeka_diaglevel");this.minimumLevel=T,this.minimumLevelToPublishToSeekaBackend=T}}(y=(g=e.config)==null?void 0:g.debug)!=null&&y.isDiagnosisEnabled&&(this.minimumLevelToPublishToSeekaBackend="information");let a=this.sdk.state.get(this.minimumLevelStateName);if(a!=null?this.minimumLevel=a:this.minimumLevel=((x=(I=e.config)==null?void 0:I.debug)==null?void 0:x.minimumLevel)||X.DefaultMinimumLevel,n)try{this.minimumLevel=n}catch(S){console.error("[Seeka] - failed to set debug level from url",S)}}setEnabled(e,t){this.isDebugEnabled=!!e,this.sdk.state.set(this.isDebugEnabledStateName,this.isDebugEnabled),t!=null&&(this.sdk.state.set(this.isDebugToStringEnabledStateName,t||!1),this.isDebugToStringLogEnabled=t||!1)}toggleDevMode(e){var t,i;if(this.isDebugEnabled&&e!==!0||e===!1){this.setEnabled(!1);try{let n=(t=this.sdk)==null?void 0:t.dataLayer.window.sessionStorage();n&&n.setItem("seeka_testmode_toggle","0")}catch(n){console.error("[Seeka] - failed to set test mode toggle",n)}return this.setMinimumLevel("information"),!1}else{this.setEnabled(!0);try{let n=(i=this.sdk)==null?void 0:i.dataLayer.window.sessionStorage();n&&n.setItem("seeka_testmode_toggle","")}catch(n){console.error("[Seeka] - failed to set test mode toggle",n)}return this.setMinimumLevel("verbose"),!0}}static getDatabase(){return h(this,null,function*(){return Qe()?null:new Promise((e,t)=>{let i;try{i=indexedDB.open(X.seekaDatabaseName,X.seekaDatabaseVersion)}catch(n){this.indexDbErrorOpenLogged||(this.ignoreDbOpenError?console.debug("[Seeka] - failed to open indexDb database",n):console.error("[Seeka] - failed to open indexDb database",n)),this.indexDbErrorOpenLogged=!0,e(null);return}i.onsuccess=n=>{let s=i.result;s.objectStoreNames.contains(X.logStoreName)&&e(s)},i.onupgradeneeded=n=>{let s=i.result;s.objectStoreNames.contains(X.logStoreName)&&s.deleteObjectStore(X.logStoreName);let a=s.createObjectStore(X.logStoreName,{autoIncrement:!0});a.createIndex("level","level",{unique:!1}),a.createIndex("created","created",{unique:!1}),a.transaction.oncomplete=o=>{e(s)},a.transaction.onerror=o=>{t(o)}},i.onerror=n=>{t(n)}})})}static getPersistedLogs(e){return h(this,null,function*(){if(Qe())return[];let t=yield X.getDatabase();return t==null?[]:new Promise((i,n)=>{let s=t.transaction([X.logStoreName]).objectStore(X.logStoreName).getAll();s.onsuccess=a=>{e!=null?i((s.result||[]).slice(0,e)):i(s.result||[])},s.onerror=a=>{n(a)}})})}static clearPersistedLogs(){return h(this,null,function*(){if(Qe())return;let e=yield X.getDatabase();if(e!=null)return new Promise((t,i)=>{let n=e.transaction([X.logStoreName],"readwrite").objectStore(X.logStoreName).clear();n.onsuccess=s=>{t()},n.onerror=s=>{i(s)}})})}getPersistedLogs(){return h(this,null,function*(){return yield X.getPersistedLogs()})}clearPersistedLogs(){return h(this,null,function*(){yield X.clearPersistedLogs()})}setMinimumLevel(e){this.minimumLevel=e?e.toLowerCase():X.DefaultMinimumLevel,this.sdk.state.set(this.minimumLevelStateName,this.minimumLevel)}shouldLogLevel(e){return Md(e,this.minimumLevel)}getLogLevelVerbosity(e){return Qr(e)}isEnabled(){var t,i;let e=this.sdk.state.get(this.isDebugEnabledStateName);return e!=null?!((t=this.sdk)!=null&&t.config.isDisabled)&&e:!((i=this.sdk)!=null&&i.config.isDisabled)&&(this.isSidekickDiagnoseMode||this.isDebugEnabled)||!1}isOperationAllowed(e,t,i){try{return this.sdk.config.testMode==="diag"?(this.log(`TestMode - ${e} for ${t} blocked by test mode ${this.sdk.config.testMode}`,F(p({},i),{logMetadata:F(p({},i==null?void 0:i.logMetadata),{stream:!0})})),!1):!0}catch(n){return console.error("[Seeka] - failed to check if operation is allowed",n),!0}}isToStringConsoleEnabled(){let e=this.sdk.state.get(this.isDebugToStringEnabledStateName);return e!=null?e:this.isDebugToStringLogEnabled||!1}prepareLogProps(e){if(e instanceof Error)return this.sdk.util.parse.parseError(e);for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&e[t]instanceof Error&&(e[t]=this.sdk.util.parse.parseError(e[t]));return e}write(e,t,i){var s,a;let n=this.unitTestEnv||i&&i.preventLogApiPublish===!0||this.isSidekickBuilderMode;try{i&&(i=this.prepareLogProps(i));let o=!this.unitTestEnv&&i&&i.logMetadata&&i.logMetadata.stream===!0,c=this.isEnabled(),d=this.shouldLogLevel(e);if(c||o||d){if(i!=null&&o)try{X.getDatabase().then(l=>{if(l==null)return;let f=l.transaction([X.logStoreName],"readwrite").objectStore(X.logStoreName),m=new Date().getTime(),g={logId:`${m}-${Math.floor(Math.random()*1e6)}`,created:m,level:e,message:t,props:i,scope:{key:this.sdk.config.scopeKey,description:this.sdk.config.scopeDescription}};f.add(g)})}catch(l){console.error("[Seeka] - failed to write log to local database",l)}if(c&&d){let f=["[Seeka] "+new Date().toISOString()+" -",t+(i?" -":"")];switch(this.isToStringConsoleEnabled()?f.push(i?JSON.stringify(i):""):i&&f.push(i),f.push({scope:{key:this.sdk.config.scopeKey,description:this.sdk.config.scopeDescription}}),e){case"error":console.error.apply(void 0,f);break;case"warning":console.warn.apply(void 0,f);break;case"information":console.info.apply(void 0,f);break;default:console.log.apply(void 0,f)}}(!n&&this.isSidekickDiagnoseMode||c&&!((a=(s=this.sdk.config)==null?void 0:s.debug)!=null&&a.isLogPublishingDisabled)&&!n)&&this.getLogLevelVerbosity(e)>=this.getLogLevelVerbosity(this.minimumLevelToPublishToSeekaBackend)&&this.send(e,t,{logProps:i}).catch(l=>{console.error("[Seeka] - Failed to publish log",l)})}}catch(o){console.error("[Seeka] - failed to write log",o)}}send(e,t,i,n){return h(this,null,function*(){yield this.sdk.convergeApi.ingest.push([],[],[],[{logLevel:e,logType:"sdkLog",messageTemplate:t,identifiers:yield this.sdk.identity.getProfile(),id:Vi(),source:this.createTrackingSource("sdk/js/log"),properties:{messageTemplateProps:n,props:JSON.stringify(i)},utm:this.sdk.attribution.getCurrentTouchCampaign()}])})}createTrackingSource(e){var i,n,s,a;let t={method:e,loc:((s=(n=(i=this.sdk.dataLayer.window.location())==null?void 0:i.href)==null?void 0:n.split("_s_sidekick")[0])==null?void 0:s.split("#")[0])||"",vt:this.sdk.dataLayer.document.title(),sess:this.sdk.identity.touchAndGetSessionId(),diag:((a=this.sdk.dataLayer.window.sessionStorage())==null?void 0:a.getItem("seeka_diagid"))||void 0,origin:"browser",device:this.sdk.identity.device};return this.verbose("Tracking source created",{src:t}),t}log(e,t){this.write("information",e,t)}verbose(e,t){this.write("verbose",e,t)}error(e,t){this.write("error",e,t)}warn(e,t){this.write("warning",e,t)}};u(X,"DefaultMinimumLevel","warning"),u(X,"seekaDatabaseName","seeka"),u(X,"logStoreName","logs"),u(X,"seekaDatabaseVersion",3),u(X,"indexDbErrorOpenLogged",!1),u(X,"ignoreDbOpenError",!1);var _t=X;var zr=r=>r==null||r===""||String(r).trim()===""?"":String(r),Ld=r=>{let e=Object.keys(ve),t=r.toLowerCase(),i=e.find(n=>n.toLowerCase()===t);return i?ve[i]:"custom"},Dd=(r,e,t=!1)=>{if(e instanceof HTMLLabelElement&&e.htmlFor){let i=r.querySelector(`#${e.htmlFor}`);if(i)return i}return Yb(e,t)},Yb=(r,e)=>{var s,a,o,c,d,l,f,m,g,y,I;if(((s=r.nextElementSibling)==null?void 0:s.tagName)==="INPUT")return r.nextElementSibling;if(((a=r.previousElementSibling)==null?void 0:a.tagName)==="INPUT")return r.previousElementSibling;if(e&&((o=r.nextElementSibling)==null?void 0:o.tagName)==="SELECT")return r.nextElementSibling;if(e&&((c=r.previousElementSibling)==null?void 0:c.tagName)==="SELECT")return r.previousElementSibling;let t=(d=r.nextElementSibling)==null?void 0:d.querySelectorAll("input");if(t&&t.length>0)return t[0];if(e){let x=(l=r.nextElementSibling)==null?void 0:l.querySelectorAll("select");if(x&&x.length>0)return x[0]}let i=(f=r.parentElement)==null?void 0:f.querySelectorAll("input");if(i&&i.length>0)return i[0];if(e){let x=(m=r.parentElement)==null?void 0:m.querySelectorAll("select");if(x&&x.length>0)return x[0]}let n=(y=(g=r.parentElement)==null?void 0:g.parentElement)==null?void 0:y.querySelectorAll("input");if(n&&n.length>0)return n[0];if(e){let x=(I=r.parentElement)==null?void 0:I.querySelectorAll("select");if(x&&x.length>0)return x[0]}return r.closest("input")||(e?r.closest("select"):void 0)||void 0};var Od=[{iso2:"US",code:"1",localLengths:[10]},{iso2:"CA",code:"1",localLengths:[10]},{iso2:"CN",code:"86",localLengths:[11]},{iso2:"IN",code:"91",localLengths:[10]},{iso2:"ID",code:"62",localLengths:[10,11,12]},{iso2:"PK",code:"92",localLengths:[10]},{iso2:"BR",code:"55",localLengths:[10]},{iso2:"NG",code:"234",localLengths:[10]},{iso2:"BD",code:"880",localLengths:[10]},{iso2:"RU",code:"7",localLengths:[10]},{iso2:"MX",code:"52",localLengths:[10]},{iso2:"JP",code:"81",localLengths:[9,10]},{iso2:"ET",code:"251",localLengths:[9]},{iso2:"PH",code:"63",localLengths:[10]},{iso2:"EG",code:"20",localLengths:[10]},{iso2:"VN",code:"84",localLengths:[9]},{iso2:"CD",code:"243",localLengths:[9]},{iso2:"TR",code:"90",localLengths:[10]},{iso2:"IR",code:"98",localLengths:[10]},{iso2:"DE",code:"49",localLengths:[10,11]},{iso2:"TH",code:"66",localLengths:[9]},{iso2:"FR",code:"33",localLengths:[9]},{iso2:"GB",code:"44",localLengths:[10]},{iso2:"IT",code:"39",localLengths:[9]},{iso2:"TZ",code:"255",localLengths:[9]},{iso2:"MM",code:"95",localLengths:[9]},{iso2:"KR",code:"82",localLengths:[9,10]},{iso2:"ES",code:"34",localLengths:[9]},{iso2:"UA",code:"380",localLengths:[9]},{iso2:"AU",code:"61",localLengths:[9]}],Zb=Od.slice().sort((r,e)=>e.code.length-r.code.length);function Nd(r,e){let t=r.trim();if(t.startsWith("+")){let n=t.slice(1).replace(/\D/g,"");return n.length>=6&&n.length<=15?`+${n}`:r}if(t.startsWith("00")){let n=t.slice(2).replace(/\D/g,"");return n.length>=6&&n.length<=15?`+${n}`:r}let i=t.replace(/\D/g,"");for(let{code:n,localLengths:s}of Zb)if(i.startsWith(n)){let a=i.slice(n.length);if(s.includes(a.length))return`+${n}${a}`}if(e){let n=e.trim().toUpperCase(),s=Od.find(a=>a.iso2===n);if(s&&(i.startsWith("0")&&(i=i.slice(1)),s.localLengths.includes(i.length)))return`+${s.code}${i}`}return r}var Yr=r=>{let e=(r.getUTCMonth()+1).toString();e.length<2&&(e="0"+e);let t=r.getUTCDate().toString();t.length<2&&(t="0"+t);let i=r.getUTCHours().toString();i.length<2&&(i="0"+i);let n=r.getUTCMinutes().toString();n.length<2&&(n="0"+n);let s=r.getUTCSeconds().toString();return s.length<2&&(s="0"+s),`${r.getUTCFullYear()}${e}${t}.${i}${n}${s}`},Rd=r=>r?r.replace(/[-._~`]/g,"").trim():null,bs=()=>new Date().getTime()+"."+li(),li=()=>Math.floor(Math.random()*8999999999+1e9).toString(),Zr=r=>new Date(Date.UTC(parseInt(r.substring(0,4)),parseInt(r.substring(4,6))-1,parseInt(r.substring(6,8)),parseInt(r.substring(9,11)),parseInt(r.substring(11,13)),parseInt(r.substring(13,15)))),Xr=r=>"sk.1."+(r||new Date).getTime()+"."+li(),en=r=>r?r.replace(/[^\d.]*/g,""):"",tn=r=>(!r||r.length==0,r.sort((e,t)=>{let i=BigInt(e.split(".")[2]),n=BigInt(t.split(".")[2]);return i>n?1:i<n?-1:0})[0]);var ks=class{getRandomNumberString(){return li()}isEmpty(e){return e==null||e===""}getNewBrowserIdentifier(e){return Xr(e)}getEarliestAssignedBrowserIdentifier(e){return tn(e)}dateToYYYYMMDD(e){return e.toISOString().slice(0,10).replace(/-/g,"")}dateToUtcDateTimeReferenceString(e){return Yr(e)}dateFromUtcDateTimeReferenceString(e){return Zr(e)}base64Encode(e){return e==null?null:btoa(e)}alphaNumericOnly(e){return Rd(e)}isFirstCharacterAlpha(e){let t=e;return t.length===0?!1:(t.length>1&&(t=t[1]),t.match(/[a-z]/i)&&!0||!1)}trimLeadingAndTrailingChars(e,t){return t==="]"&&(t="\\]"),t==="^"&&(t="\\^"),t==="\\"&&(t="\\\\"),e.replace(new RegExp("^["+t+"]+|["+t+"]+$","g"),"")}sentenceCaseToSnakeCase(e){return this.trimLeadingAndTrailingChars(e.trim().replace(/\.?([A-Z]+)/g,"_$1").toLowerCase().replace(/^_/,"").replace(/__/g,"_").trim(),"_")}separatePersonFullName(e){if(!e)return{firstName:null,lastName:null};let t=e.trim().split(" ");return t.length===1?{firstName:e,lastName:null}:t.length===2?{firstName:t[0],lastName:t[1]}:{firstName:t[0],lastName:t.slice(1).join(" ")}}},rn=ks;var _d=new rn,Is=class{constructor(){u(this,"inputSelectorIgnoreTypes",["button","checkbox","password","radio","color","file","image","submit","day","month","week","hidden"])}parseStr(e){return zr(e)}parseFloat(e){if(e==null||e==="")return 0;let t=e.toString().replace(/[^0-9.]/g,"");return Number.isNaN(Number(t))?0:Number(t)}parseMoney(e){if(e==null||e===0||e==="")return+"0.00";let t=this.parseFloat(e);return Number(t.toFixed(3))}parseInt(e){return e==null||e===""||Number.isNaN(Number(e.toString()))?0:Math.floor(Number(e))}cloneDeep(e){return JSON.parse(JSON.stringify(e))}parseError(e){let t={};return Object.getOwnPropertyNames(e).forEach(function(i){t[i]=e[i]}),t}isNumber(e){return/^-?\d+$/.test(e)}lastOrDefault(e){if(!(e==null||e.length===0))return Fr(e)}last(e){return Fr(e)}getNestedProperty(e,t){return it(e,t)}setNestedProperty(e,t,i){return os(e,t,i)}mergeDeep(e,t){function i(n,s){if(W(n))return jr(n,s)}return W(e)&&W(t)?jr(e,t):rs(e,t,i)}isDeepEqual(e,t){return Hr(e,t)}isDeepEqualIgnoringTraits(e,t){return Hr(e,t,(n,s,a)=>{if(a==="traits")return!0})}parseFormToPersonDetails(e){let t=this.parseFormToPersonDetailsForLabels(e),i=this.parseFormToPersonDetailsForNameOrIdOrPlaceholderAttributes(e);return t==null&&i==null?null:{firstName:this.getLongestString([t==null?void 0:t.firstName,i==null?void 0:i.firstName]),fullName:this.getLongestString([t==null?void 0:t.fullName,i==null?void 0:i.fullName]),lastName:this.getLongestString([t==null?void 0:t.lastName,i==null?void 0:i.lastName]),email:this.getLongestString([t==null?void 0:t.email,i==null?void 0:i.email]),phone:this.getLongestString([t==null?void 0:t.phone,i==null?void 0:i.phone]),countryCode:this.getLongestString([t==null?void 0:t.countryCode,i==null?void 0:i.countryCode]),country:this.getLongestString([t==null?void 0:t.country,i==null?void 0:i.country]),state:this.getLongestString([t==null?void 0:t.state,i==null?void 0:i.state]),stateCode:this.getLongestString([t==null?void 0:t.stateCode,i==null?void 0:i.stateCode]),locality:this.getLongestString([t==null?void 0:t.locality,i==null?void 0:i.locality]),postcode:this.getLongestString([t==null?void 0:t.postcode,i==null?void 0:i.postcode])}}getLongestString(e){if(!e||e.length===0)return;let t=e.filter(n=>!!n),i=t[0];for(let n=0;n<t.length;n++){let s=t[n];s.length>i.length&&(i=s)}return i}parseFormToPersonDetailsForNameOrIdOrPlaceholderAttributes(e){let t=Array.from(e.querySelectorAll("input, select"));if(t.length===0)return null;let i={};return t.forEach(n=>{var l,f;let s=((l=n.getAttribute("type"))==null?void 0:l.toLowerCase())||"";if(this.inputSelectorIgnoreTypes.includes(s))return;let c=([n.getAttribute("aria-label"),n.getAttribute("title"),n instanceof HTMLInputElement?n.placeholder:null,n.name,n.id].find(m=>m&&m.trim().length>0)||"").toString().toLowerCase().replace(/\*/g,"").replace(/[\.\:]/g,"").split("(")[0].trim(),d=(f=n.value)==null?void 0:f.trim();if(d){if(c.includes("email")||c.includes("e-mail")||s==="email"){let m=this.emailAddress(d);(!i.email||m&&m.length>i.email.length)&&(i.email=m);return}if(c.includes("phone")||c.includes("mobile")||n.inputMode==="tel"||s==="tel"){let m=this.phoneNumberToE164(d);(!i.phone||m&&m.length>i.phone.length)&&(i.phone=m);return}if(/^(first\s?name|givenname|given)$/.test(c)){let m=d;(!i.firstName||m&&m.length>i.firstName.length)&&(i.firstName=m);return}if(/^(last\s?name|surname|family)$/.test(c)){let m=d;(!i.lastName||m&&m.length>i.lastName.length)&&(i.lastName=m);return}if(!i.fullName&&/^(name|full\s?name|your name)$/.test(c)){i.fullName=d;let m=_d.separatePersonFullName(d);i.firstName||(i.firstName=m.firstName||void 0),i.lastName||(i.lastName=m.lastName||void 0);return}if(c.includes("country")){let m=d;(!i.countryCode||m&&m.length>i.countryCode.length)&&(i.countryCode=m);return}if(!i.state&&/(state|province|region)/.test(c)){i.state=d;return}if(!i.locality&&/(city|locality|town)/.test(c)){i.locality=d;return}if(!i.postcode&&/(zip|postal|post\s?code)/.test(c)){i.postcode=d;return}}}),Object.keys(i).length?i:null}parseFormToPersonDetailsForLabels(e){let t=Array.from(e.querySelectorAll("label, div.MGLLabel"));if(t.length===0)return null;let i={};return t.forEach(n=>{var c;let s=(n.textContent||"").toLowerCase().replace(/\*/g,"").replace(/[\.\:]/g,"").split("(")[0].trim(),a=Dd(e,n);if(!a)return;let o=(c=a.value)==null?void 0:c.trim();if(o){if(/^(first\s?name|givenname|given)$/.test(s)){let d=o;(!i.firstName||d&&d.length>i.firstName.length)&&(i.firstName=d);return}if(/^(last\s?name|surname|family)$/.test(s)){let d=o;(!i.lastName||d&&d.length>i.lastName.length)&&(i.lastName=d);return}if(!i.fullName&&/^(name|full\s?name|your name)$/.test(s)){i.fullName=o;let d=_d.separatePersonFullName(o);i.firstName||(i.firstName=d.firstName||void 0),i.lastName||(i.lastName=d.lastName||void 0);return}if(s.includes("email")||s.includes("e-mail")){let d=this.emailAddress(o);(!i.email||d&&d.length>i.email.length)&&(i.email=d);return}if(s.includes("phone")&&!s.includes("country")){let d=this.phoneNumberToE164(o);(!i.phone||d&&d.length>i.phone.length)&&(i.phone=d);return}if(s.includes("country")){let d=o;(!i.countryCode||d&&d.length>i.countryCode.length)&&(i.countryCode=d);return}if(!i.state&&/(state|province|region)/.test(s)){i.state=o;return}if(!i.locality&&/(city|locality|town)/.test(s)){i.locality=o;return}if(!i.postcode&&/(zip|postal|post\s?code)/.test(s)){i.postcode=o;return}}}),Object.keys(i).length?i:null}emailAddress(e){return e?e.trim().toLowerCase():""}phoneNumberToE164(e){return e==null?"":(e=e.trim().replace(/-/gi,"").replace(/\(/gi,"").replace(/\)/gi,"").replace(/ /g,"").replace(/\+/g,""),e)}getContentIdFromProduct(e,t,i){var o,c,d,l,f,m,g,y,I,x,S,T,M;if(!e)return;let n=(o=t.processing)==null?void 0:o.contentIdentificationBehavior,s=null;i=="googleAnalytics"&&(((f=(l=(d=(c=t.analytics)==null?void 0:c.libraries)==null?void 0:d.googleAnalytics)==null?void 0:l.merchant)==null?void 0:f.productItemIdBehavior)!=null&&(n=(I=(y=(g=(m=t.analytics)==null?void 0:m.libraries)==null?void 0:g.googleAnalytics)==null?void 0:y.merchant)==null?void 0:I.productItemIdBehavior),s=this.parseStr((M=(T=(S=(x=t.analytics)==null?void 0:x.libraries)==null?void 0:S.googleAnalytics)==null?void 0:T.merchant)==null?void 0:M.productItemIdPrefix));let a;switch(n){case"sku":a=e==null?void 0:e.sku;break;case"productId":a=e==null?void 0:e.productIdentifier;break;case"variantId":a=e==null?void 0:e.variantIdentifier;break;case"productIdAndVariantIdUnderscore":this.parseStr(e.variantIdentifier)&&this.parseStr(e.productIdentifier)?a=`${e.productIdentifier}_${e.variantIdentifier}`:this.parseStr(e.variantIdentifier)?a=e.variantIdentifier:a=e.productIdentifier;break;case"variantIdOrProductId":this.parseStr(e.variantIdentifier)?a=e.variantIdentifier:a=e.productIdentifier;break;default:a=this.parseStr(e==null?void 0:e.sku)||this.parseStr(e==null?void 0:e.variantIdentifier)||this.parseStr(e==null?void 0:e.productIdentifier);break}return s?`${s}${a}`:a}getContentNameFromProduct(e,t){return this.parseStr(e==null?void 0:e.variantName)||this.parseStr(e==null?void 0:e.productName)}},fi=Is;var Ie=(r,e)=>{var s;if(r==null)return null;e.indexOf("http")===-1&&e.indexOf("?")===-1&&(e="?"+e),r=r.replace(/[[\]]/g,"\\$&");let t=new RegExp("[?&]"+r+"(=([^&#]*)|&|#|$)"),i=t.exec(e);if(!i||!i[2])return null;let n=decodeURIComponent(i[2].replace(/\+/g," "));return((s=zr(n))==null?void 0:s.trim())||null},ji=r=>{if(!r)throw new Error("href is required");let e=new URL(r);return{hash:e.hash,host:e.host,hostname:e.hostname,href:r,origin:e.origin,pathname:e.pathname,port:e.port,protocol:e.protocol,search:e.search}},nn=r=>{if(!r)return null;let e=new URL(r),t=e.searchParams;return Array.from(t.keys()).forEach(n=>{(n.indexOf("email")>-1||n.indexOf("firstname")>-1||n.indexOf("first_name")>-1||n.indexOf("lastname")>-1||n.indexOf("last_name")>-1)&&t.delete(n)}),e.toString()},xs=r=>{if(!r)return null;r.indexOf("?")===-1&&(r="?"+r);let e="https://test.com",t=e+r,i=nn(t);return i&&(i===e||i===e+"/"?"":i.substring(i.indexOf("?")+1))},As=(r,e)=>{if(!e)return!0;if(r||(r="/"),e||(e="/"),e.endsWith("*")){let t=e.replace("*","");return rt(r).startsWith(t)}else return rt(r)===rt(e)},rt=(r,e=!0)=>{var s;r.indexOf("http")===-1&&r.indexOf("/")!==0&&(r="/"+r);let n=(((s=new URL(r.indexOf("http")!==0?"https://domain.com"+r:r).pathname)==null?void 0:s.trim())||"").split("?")[0];return n.indexOf("/")!==0&&(n="/"+n),n.slice(n.length-1)==="/"&&(n=n.slice(0,n.length-1)),e&&(n.length>5&&n.slice(n.length-5)===".json"&&(n=n.slice(0,n.length-5)),n.length>3&&n.slice(n.length-3)===".js"&&(n=n.slice(0,n.length-3))),n.toLowerCase()};var Xb=new fi,Cs=class{getParamFromQueryString(e,t){var a;if(e==null||!t)return null;t.indexOf("http")===-1&&t.indexOf("?")===-1&&(t="?"+t),e=e.replace(/[[\]]/g,"\\$&");let i=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),n=i.exec(t);if(!n||!n[2])return null;let s=decodeURIComponent(n[2].replace(/\+/g," "));return((a=Xb.parseStr(s))==null?void 0:a.trim())||null}isUrlMatch(e,t){return As(e,t)}urlToWinLocation(e){return ji(e)}sanitizeResourceUrl(e,t=!0){return rt(e,t)}removePiiFromUrl(e){return nn(e)}removePiiFromQueryString(e){return xs(e)}},sn=Cs;var Ss="Method not implemented.";function de(r,e){if(!e||!r)return{};let t=Object.keys(r),i=p({},e);return t.forEach(n=>{i[n]=void 0}),i}function ek(r){return as(r==null?void 0:r.replace("converge-plugin-","").replace(/-/g," "))}function tk(r){let e=ts(r.replace("converge-plugin-",""));return e==="googleAnalytics4"?"googleAnalytics":e==="pinterestTag"?"pinterest":e}function ik(r){let e=r.split("-"),t=e[e.length-1];return e[e.length-2]==="G"?`G-${t}`:t}function Ud(r,e){return{name:r.name,convergePlugin:r,config:r.config,isInitialised:!1,enabled:e,initialize:t=>h(null,null,function*(){if(r.init!=null){t.payload.profile=yield r.sdk.identity.getProfile(),r.sdk.debug.verbose(`Plugin.${r.name}.wrapper.initialize`,F(p({},t),{plugins:[]}));try{r.init(t)}catch(i){r.sdk.debug.error("Plugin.Wrapper.init failed",i)}}}),initializeEnd:t=>h(null,null,function*(){if(r.initComplete!=null){r.sdk.debug.verbose(`Plugin.${r.name}.wrapper.initializeEnd`);try{yield r.initComplete(t)}catch(i){r.sdk.debug.error("Plugin.Wrapper.initComplete failed",i)}}}),methods:{getPlugin(...t){return r}},ready:t=>h(null,null,function*(){if(r.onReady){r.sdk.debug.verbose(`Plugin.${r.name}.wrapper.ready`);try{yield r.onReady()}catch(i){r.sdk.debug.error("Plugin.Wrapper.onReady failed",i)}}}),page:t=>{},track:t=>{var c,d,l,f,m,g;r.sdk.debug.verbose(`Plugin.${r.name}.wrapper.track`,F(p({},t),{plugins:[]}));let i=!1,n=!1,s=t.payload.event,a=t.payload.options.metadata,o={activityName:s,activity:t.payload.properties,props:t.payload.properties,metadata:a};try{if((d=(c=r.config)==null?void 0:c.pipeline)!=null&&d.containers&&r.type!=="converge-plugin-seeka"){let y=p({},o),I=on(o,r.config.pipeline.containers,r.sdk,r.sdk.debug.createTrackingSource(`sdk/js/activity/plugin/${r.type}/track`));if(I.wasAugmented){o=F(p(p({},o),I.activity),{metadata:p(p({},o.metadata),I.activity.metadata)});let x=ek(r.type);r.sdk.debug.verbose(`${x} - Pipeline rule applied to activity`,{original:y,augmented:o,plugin:{convergePlugin:{name:r.name,type:r.type}},logMetadata:{stream:!0,original:{activityName:y.activityName,activityNameCustom:(l=y.props)==null?void 0:l.activityNameCustom},destination:{platform:tk(r.type),identifier:ik(r.name),activityName:o.activityName,activityNameCustom:(f=o.props)==null?void 0:f.activityNameCustom}}})}}}catch(y){r.sdk.debug.error("Plugin.Wrapper.track.pipeline.rules failed",y)}try{switch(o.activityName){case"viewPage":r.viewPage&&(r.viewPage(o.props,o.metadata),i=!0);break;case"addPaymentMethod":r.addPaymentMethod&&(r.addPaymentMethod(o.activity,de({},o.props),o.metadata),i=!0);break;case"keywordSearch":r.keywordSearch&&(r.keywordSearch(o.activity,de({},o.props),o.metadata),i=!0);break;case"userLogin":r.userLogin&&(r.userLogin(o.activity,de({},o.props),o.metadata),i=!0);break;case"userLoginSignup":r.userLoginSignup&&(r.userLoginSignup(o.activity,de({},o.props),o.metadata),i=!0);break;case"newsletterSignup":r.newsletterSignup&&(r.newsletterSignup(o.activity,de({},o.props),o.metadata),i=!0);break;case"applyPromotionalCode":r.applyPromotionalCode&&(r.applyPromotionalCode(o.activity,de({},o.props),o.metadata),i=!0);break;case"lead":r.lead&&(r.lead(o.activity,de({},o.props),o.metadata),i=!0);break;case"startTrial":r.startTrial&&(r.startTrial(o.activity,de({},o.props),o.metadata),i=!0);break;case"contactMessage":r.contactMessage&&(r.contactMessage(o.activity,de({},o.props),o.metadata),i=!0);break;case"schedule":r.schedule&&(r.schedule(o.activity,de({},o.props),o.metadata),i=!0);break;case"viewContentItem":r.viewContentItem&&(r.viewContentItem(o.activity,de({},o.props),o.metadata),i=!0);break;case"order":r.order&&(r.order(o.activity,de({},o.props),o.metadata),i=!0);break;case"subscriptionItemPurchase":r.subscriptionItemPurchase&&(r.subscriptionItemPurchase(o.activity,de({},o.props),o.metadata),i=!0);break;case"initiateCheckout":r.initiateCheckout&&(r.initiateCheckout(o.activity,de({},o.props),o.metadata),i=!0);break;case"viewProduct":r.viewProduct&&(r.viewProduct(o.activity,de({},o.props),o.metadata),i=!0);break;case"addToCart":r.addToCart&&(r.addToCart(o.activity,de({},o.props),o.metadata),i=!0);break;case"addToWishlist":r.addToWishlist&&(r.addToWishlist(o.activity,de({},o.props),o.metadata),i=!0);break;case"removeFromCart":r.removeFromCart&&(r.removeFromCart(o.activity,de({},o.props),o.metadata),i=!0);break;case"changeProductAttribute":r.changeProductAttribute&&(r.changeProductAttribute(o.activity,de({},o.props),o.metadata),i=!0);break;case"filterItemsByAttribute":r.filterItemsByAttribute&&(r.filterItemsByAttribute(o.activity,de({},o.props),o.metadata),i=!0);break;case"custom":default:r.custom&&(r.custom((m=o.props)==null?void 0:m.activityNameCustom,o.props,o.metadata),i=!0);break}!i&&r.activity&&(n=!0,r.activity(o.activityName,o.props,o.metadata))}catch(y){if(y.message==Ss&&!n)(g=r.activity)==null||g.call(r,o.activityName,o.props,o.metadata);else throw y}},identify:t=>h(null,null,function*(){var i,n;if(r.onProfileChanged){r.sdk.debug.verbose(`Plugin.${r.name}.wrapper.identify`,F(p({},t),{plugins:[]}));try{let s=(n=(i=t==null?void 0:t.payload)==null?void 0:i.traits)==null?void 0:n.profile;s&&(yield r.onProfileChanged(s))}catch(s){r.sdk.debug.error("Plugin.wrapper.onProfileChanged failed",s)}}}),loaded:()=>{let t=!0;return r.isLoaded&&(t=r.isLoaded(),r.sdk.debug.verbose(`Plugin.${r.name}.wrapper.loaded = ${t}`)),t}}}var an=class{constructor(e){u(this,"sdk");this.sdk=e}addEventListeners(){window.addEventListener("klaviyoForms",e=>{var t;try{let i=(t=e==null?void 0:e.detail)==null?void 0:t.type;switch(this.sdk.debug.verbose("Seeka - Klaviyo - event bubble",{evType:i}),i){case"open":case"embedOpen":case"close":case"redirectedToUrl":case"stepSubmit":setTimeout(()=>{this.sdk.hooks.onViewLayoutChange()},3e3);break}}catch(i){this.sdk.debug.error("Converge - Klaviyo - message handle error",i)}})}};var fn=Ll(Bd());var Wi="undefined";var Ts="object";var Es="any",Ms="*";var nt="__";var cn=typeof process!="undefined"?process:{},nD=cn.env&&cn.env.NODE_ENV||"";var xe=typeof document!="undefined",sD=xe&&window.location.hostname==="localhost",oD=cn.versions!=null&&cn.versions.node!=null,aD=typeof Deno!="undefined"&&Deno.core!==void 0,cD=typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",dD=xe&&window.name==="nodejs"||typeof navigator!="undefined"&&navigator.userAgent!==void 0&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));function Fd(r,e){return e.charAt(0)[r]()+e.slice(1)}var rk=Fd.bind(null,"toUpperCase"),nk=Fd.bind(null,"toLowerCase");function sk(r){return Vd(r)?rk("null"):typeof r=="object"?ck(r):Object.prototype.toString.call(r).slice(8,-1)}function dn(r,e){e===void 0&&(e=!0);var t=sk(r);return e?nk(t):t}function Gi(r,e){return typeof e===r}var Ne=Gi.bind(null,"function"),st=Gi.bind(null,"string"),Ut=Gi.bind(null,"undefined");var Hd=Gi.bind(null,"boolean"),uD=Gi.bind(null,"symbol");function Vd(r){return r===null}function ok(r){return dn(r)==="number"&&!isNaN(r)}function jd(r){return dn(r)==="array"}function ge(r){if(!ak(r))return!1;for(var e=r;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(r)===e}function ak(r){return r&&(typeof r=="object"||r!==null)}function ck(r){return Ne(r.constructor)?r.constructor.name:null}function dk(r){return r instanceof Error||st(r.message)&&r.constructor&&ok(r.constructor.stackTraceLimit)}function Wd(r,e){if(typeof e!="object"||Vd(e))return!1;if(e instanceof r)return!0;var t=dn(new r(""));if(dk(e))for(;e;){if(dn(e)===t)return!0;e=Object.getPrototypeOf(e)}return!1}var lD=Wd.bind(null,TypeError),fD=Wd.bind(null,SyntaxError);function un(r,e){var t=r instanceof Element||r instanceof HTMLDocument;return t&&e?uk(r,e):t}function uk(r,e){return e===void 0&&(e=""),r&&r.nodeName===e.toUpperCase()}function ln(r){var e=[].slice.call(arguments,1);return function(){return r.apply(void 0,[].slice.call(arguments).concat(e))}}var mD=ln(un,"form"),gD=ln(un,"button"),pD=ln(un,"input"),hD=ln(un,"select");function Gd(r){try{return decodeURIComponent(r.replace(/\+/g," "))}catch(e){return null}}function $d(){if(xe){var r=navigator,e=r.languages;return r.userLanguage||(e&&e.length?e[0]:r.language)}}function qd(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(r){}}function Kd(r){return function(e){for(var t,i=Object.create(null),n=/([^&=]+)=?([^&]*)/g;t=n.exec(e);){var s=Gd(t[1]),a=Gd(t[2]);if(s)if(s.substring(s.length-2)==="[]"){var o=i[s=s.substring(0,s.length-2)]||(i[s]=[]);i[s]=Array.isArray(o)?o:[],i[s].push(a)}else i[s]=a===""||a}for(var c in i){var d=c.split("[");d.length>1&&(lk(i,d.map(function(l){return l.replace(/[?[\]\\ ]/g,"")}),i[c]),delete i[c])}return i}(function(e){if(e){var t=e.match(/\?(.*)/);return t&&t[1]?t[1].split("#")[0]:""}return xe&&window.location.search.substring(1)}(r))}function lk(r,e,t){for(var i=e.length-1,n=0;n<i;++n){var s=e[n];if(s==="__proto__"||s==="constructor")break;s in r||(r[s]={}),r=r[s]}r[e[i]]=t}function $i(){for(var r="",e=0,t=4294967295*Math.random()|0;e++<36;){var i="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[e-1],n=15&t;r+=i=="-"||i=="4"?i:(i=="x"?n:3&n|8).toString(16),t=e%8==0?4294967295*Math.random()|0:t>>4}return r}var mi="global",Bt=nt+"global"+nt,Ft=typeof self===Ts&&self.self===self&&self||typeof global===Ts&&global.global===global&&global||void 0;function Te(r){return Ft[Bt][r]}function Ee(r,e){return Ft[Bt][r]=e}function Re(r){delete Ft[Bt][r]}function St(r,e,t){var i;try{if(qi(r)){var n=window[r];i=n[e].bind(n)}}catch(s){}return i||t}Ft[Bt]||(Ft[Bt]={});var mn={};function qi(r){if(typeof mn[r]!==Wi)return mn[r];try{var e=window[r];e.setItem(Wi,Wi),e.removeItem(Wi)}catch(t){return mn[r]=!1}return mn[r]=!0}function _(){return _=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},_.apply(this,arguments)}var wt="function",ot="undefined",fk="@@redux/"+Math.random().toString(36),Jd=function(){return typeof Symbol===wt&&Symbol.observable||"@@observable"}(),gn=" != "+wt;function fu(r,e,t){var i;if(typeof e===wt&&typeof t===ot&&(t=e,e=void 0),typeof t!==ot){if(typeof t!==wt)throw new Error("enhancer"+gn);return t(fu)(r,e)}if(typeof r!==wt)throw new Error("reducer"+gn);var n=r,s=e,a=[],o=a,c=!1;function d(){o===a&&(o=a.slice())}function l(){return s}function f(g){if(typeof g!==wt)throw new Error("Listener"+gn);var y=!0;return d(),o.push(g),function(){if(y){y=!1,d();var I=o.indexOf(g);o.splice(I,1)}}}function m(g){if(!ge(g))throw new Error("Act != obj");if(typeof g.type===ot)throw new Error("ActType "+ot);if(c)throw new Error("Dispatch in reducer");try{c=!0,s=n(s,g)}finally{c=!1}for(var y=a=o,I=0;I<y.length;I++)(0,y[I])();return g}return m({type:"@@redux/INIT"}),(i={dispatch:m,subscribe:f,getState:l,replaceReducer:function(g){if(typeof g!==wt)throw new Error("next reducer"+gn);n=g,m({type:"@@redux/INIT"})}})[Jd]=function(){var g,y=f;return(g={subscribe:function(I){if(typeof I!="object")throw new TypeError("Observer != obj");function x(){I.next&&I.next(l())}return x(),{unsubscribe:y(x)}}})[Jd]=function(){return this},g},i}function mk(r,e){var t=e&&e.type;return"action "+(t&&t.toString()||"?")+"reducer "+r+" returns "+ot}function yi(){var r=[].slice.call(arguments);return r.length===0?function(e){return e}:r.length===1?r[0]:r.reduce(function(e,t){return function(){return e(t.apply(void 0,[].slice.call(arguments)))}})}function gk(){var r=arguments;return function(e){return function(t,i,n){var s,a=e(t,i,n),o=a.dispatch,c={getState:a.getState,dispatch:function(d){return o(d)}};return s=[].slice.call(r).map(function(d){return d(c)}),_({},a,{dispatch:o=yi.apply(void 0,s)(a.dispatch)})}}}var Tt=nt+"anon_id",Ht=nt+"user_id",pi=nt+"user_traits";var Pt="userId",gi="anonymousId",yn=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],Rs=["name","EVENTS","config","loaded"],R=yn.reduce(function(r,e){return r[e]=e,r},{registerPluginType:function(r){return"registerPlugin:"+r},pluginReadyType:function(r){return"ready:"+r}}),Qd=/^utm_/,zd=/^an_prop_/,Yd=/^an_trait_/;function pk(r){var e=r.storage.setItem;return function(t){return function(i){return function(n){if(n.type===R.bootstrap){var s=n.params,a=n.user,o=n.persistedUser,c=n.initialUser,d=o.userId===a.userId;o.anonymousId!==a.anonymousId&&e(Tt,a.anonymousId),d||e(Ht,a.userId),c.traits&&e(pi,_({},d&&o.traits?o.traits:{},c.traits));var l=Object.keys(n.params);if(l.length){var f=s.an_uid,m=s.an_event,g=l.reduce(function(y,I){if(I.match(Qd)||I.match(/^(d|g)clid/)){var x=I.replace(Qd,"");y.campaign[x==="campaign"?"name":x]=s[I]}return I.match(zd)&&(y.props[I.replace(zd,"")]=s[I]),I.match(Yd)&&(y.traits[I.replace(Yd,"")]=s[I]),y},{campaign:{},props:{},traits:{}});t.dispatch(_({type:R.params,raw:s},g,f?{userId:f}:{})),f&&setTimeout(function(){return r.identify(f,g.traits)},0),m&&setTimeout(function(){return r.track(m,g.props)},0),Object.keys(g.campaign).length&&t.dispatch({type:R.campaign,campaign:g.campaign})}}return i(n)}}}}function hk(r){return function(e,t){if(e===void 0&&(e={}),t===void 0&&(t={}),t.type===R.setItemEnd){if(t.key===Tt)return _({},e,{anonymousId:t.value});if(t.key===Ht)return _({},e,{userId:t.value})}switch(t.type){case R.identify:return Object.assign({},e,{userId:t.userId,traits:_({},e.traits,t.traits)});case R.reset:return[Ht,Tt,pi].forEach(function(i){r.removeItem(i)}),Object.assign({},e,{userId:null,anonymousId:null,traits:{}});default:return e}}}function Zd(r){return{userId:r.getItem(Ht),anonymousId:r.getItem(Tt),traits:r.getItem(pi)}}var _s=function(r){return nt+"TEMP"+nt+r};function yk(r){var e=r.storage,t=e.setItem,i=e.removeItem,n=e.getItem;return function(s){return function(a){return function(o){var c=o.userId,d=o.traits,l=o.options;if(o.type===R.reset&&([Ht,pi,Tt].forEach(function(g){i(g)}),[Pt,gi,"traits"].forEach(function(g){Re(_s(g))})),o.type===R.identify){n(Tt)||t(Tt,$i());var f=n(Ht),m=n(pi)||{};f&&f!==c&&s.dispatch({type:R.userIdChanged,old:{userId:f,traits:m},new:{userId:c,traits:d},options:l}),c&&t(Ht,c),d&&t(pi,_({},m,d))}return a(o)}}}}var Ki={};function Xd(r,e){Ki[r]&&Ne(Ki[r])&&(Ki[r](e),delete Ki[r])}function mu(r,e,t){return new Promise(function(i,n){return e()?i(r):t<1?n(_({},r,{queue:!0})):new Promise(function(s){return setTimeout(s,10)}).then(function(s){return mu(r,e,t-10).then(i,n)})})}function vk(r){return{abort:r}}function gu(r,e,t){var i={},n=e(),s=r.getState(),a=s.plugins,o=s.queue,c=s.user;if(!s.context.offline&&o&&o.actions&&o.actions.length){var d=o.actions.reduce(function(f,m,g){return a[m.plugin].loaded?(f.process.push(m),f.processIndex.push(g)):(f.requeue.push(m),f.requeueIndex.push(g)),f},{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(d.processIndex&&d.processIndex.length){d.processIndex.forEach(function(f){var m=o.actions[f],g=m.plugin,y=m.payload.type,I=n[g][y];if(I&&Ne(I)){var x,S=function(C,P){return C===void 0&&(C={}),P===void 0&&(P={}),[Pt,gi].reduce(function(w,L){return C.hasOwnProperty(L)&&P[L]&&P[L]!==C[L]&&(w[L]=P[L]),w},C)}(m.payload,c),T=i[S.meta.rid];if(!T&&(x=I({payload:S,config:a[g].config,instance:t,abort:vk}))&&ge(x)&&x.abort)return void(i[S.meta.rid]=!0);if(!T){var M=y+":"+g;r.dispatch(_({},S,{type:M,_:{called:M,from:"queueDrain"}}))}}});var l=o.actions.filter(function(f,m){return!~d.processIndex.indexOf(m)});o.actions=l}}}var Ls=function(r){var e=r.data,t=r.action,i=r.instance,n=r.state,s=r.allPlugins,a=r.allMatches,o=r.store,c=r.EVENTS;try{var d=n.plugins,l=n.context,f=t.type,m=f.match(hi),g=e.exact.map(function(x){return x.pluginName});m&&(g=a.during.map(function(x){return x.pluginName}));var y=function(x,S){return function(T,M,C){var P=M.config,w=M.name,L=w+"."+T.type;C&&(L=C.event);var U=T.type.match(hi)?function(G,$,D,z,re){return function(Z,N){var se=z?z.name:G,ae=N&&Ji(N)?N:D;if(z&&(!(ae=N&&Ji(N)?N:[G]).includes(G)||ae.length!==1))throw new Error("Method "+$+" can only abort "+G+" plugin. "+JSON.stringify(ae)+" input valid");return _({},re,{abort:{reason:Z,plugins:ae,caller:$,_:se}})}}(w,L,S,C,T):function(G,$){return function(){throw new Error(G.type+" action not cancellable. Remove abort in "+$)}}(T,L);return{payload:bk(T),instance:x,config:P||{},abort:U}}}(i,g),I=e.exact.reduce(function(x,S){var T=S.pluginName,M=S.methodName,C=!1;return M.match(/^initialize/)||M.match(/^reset/)||(C=!d[T].loaded),l.offline&&M.match(/^(page|track|identify)/)&&(C=!0),x[""+T]=C,x},{});return Promise.resolve(e.exact.reduce(function(x,S,T){try{var M=S.pluginName;return Promise.resolve(x).then(function(C){function P(){return Promise.resolve(C)}var w=function(){if(e.namespaced&&e.namespaced[M])return Promise.resolve(e.namespaced[M].reduce(function(L,U,G){try{return Promise.resolve(L).then(function($){return U.method&&Ne(U.method)?(function(Z,N){var se=ou(Z);if(se&&se.name===N){var ae=ou(se.method);throw new Error([N+" plugin is calling method "+Z,"Plugins cant call self","Use "+se.method+" "+(ae?"or "+ae.method:"")+" in "+N+" plugin insteadof "+Z].join(`
`))}}(U.methodName,U.pluginName),Promise.resolve(U.method({payload:$,instance:i,abort:(D=$,z=M,re=U.pluginName,function(Z,N){return _({},D,{abort:{reason:Z,plugins:N||[z],caller:f,from:re||z}})}),config:iu(U.pluginName,d,s),plugins:d})).then(function(Z){var N=ge(Z)?Z:{};return Promise.resolve(_({},$,N))})):$;var D,z,re})}catch($){return Promise.reject($)}},Promise.resolve(t))).then(function(L){C[M]=L});C[M]=t}();return w&&w.then?w.then(P):P()})}catch(C){return Promise.reject(C)}},Promise.resolve({}))).then(function(x){return Promise.resolve(e.exact.reduce(function(S,T,M){try{var C=e.exact.length===M+1,P=T.pluginName,w=s[P];return Promise.resolve(S).then(function(L){var U=x[P]?x[P]:{};if(m&&(U=L),Os(U,P))return Ds({data:U,method:f,instance:i,pluginName:P,store:o}),Promise.resolve(L);if(Os(L,P))return C&&Ds({data:L,method:f,instance:i,store:o}),Promise.resolve(L);if(I.hasOwnProperty(P)&&I[P]===!0)return o.dispatch({type:"queue",plugin:P,payload:U,_:{called:"queue",from:"queueMechanism"}}),Promise.resolve(L);var G=y(x[P],s[P]);return Promise.resolve(w[f]({abort:G.abort,payload:U,instance:i,config:iu(P,d,s),plugins:d})).then(function($){var D=ge($)?$:{},z=_({},L,D),re=x[P];if(Os(re,P))Ds({data:re,method:f,instance:i,pluginName:P,store:o});else{var Z=f+":"+P;(Z.match(/:/g)||[]).length<2&&!f.match(eu)&&!f.match(tu)&&i.dispatch(_({},m?z:U,{type:Z,_:{called:Z,from:"submethod"}}))}return Promise.resolve(z)})})}catch(L){return Promise.reject(L)}},Promise.resolve(t))).then(function(S){if(!(f.match(hi)||f.match(/^registerPlugin/)||f.match(tu)||f.match(eu)||f.match(/^params/)||f.match(/^userIdChanged/))){if(c.plugins.includes(f),S._&&S._.originalAction===f)return S;var T=_({},S,{_:{originalAction:S.type,called:S.type,from:"engineEnd"}});pu(S,e.exact.length)&&!f.match(/End$/)&&(T=_({},T,{type:S.type+"Aborted"})),o.dispatch(T)}return S})})}catch(x){return Promise.reject(x)}},hi=/Start$/,eu=/^bootstrap/,tu=/^ready/;function Ds(r){var e=r.pluginName,t=r.method+"Aborted"+(e?":"+e:"");r.store.dispatch(_({},r.data,{type:t,_:{called:t,from:"abort"}}))}function iu(r,e,t){var i=e[r]||t[r];return i&&i.config?i.config:{}}function ru(r,e){return e.reduce(function(t,i){return i[r]?t.concat({methodName:r,pluginName:i.name,method:i[r]}):t},[])}function nu(r,e){var t=r.replace(hi,""),i=e?":"+e:"";return[""+r+i,""+t+i,t+"End"+i]}function Os(r,e){var t=r.abort;return!!t&&(t===!0||su(t,e)||t&&su(t.plugins,e))}function pu(r,e){var t=r.abort;if(!t)return!1;if(t===!0||st(t))return!0;var i=t.plugins;return Ji(t)&&t.length===e||Ji(i)&&i.length===e}function Ji(r){return Array.isArray(r)}function su(r,e){return!(!r||!Ji(r))&&r.includes(e)}function ou(r){var e=r.match(/(.*):(.*)/);return!!e&&{method:e[1],name:e[2]}}function bk(r){return Object.keys(r).reduce(function(e,t){return t==="type"||(e[t]=ge(r[t])?Object.assign({},r[t]):r[t]),e},{})}function kk(r,e,t){var i={};return function(n){return function(s){return function(a){try{var o,c=function(C){return o?C:s(f)},d=a.type,l=a.plugins,f=a;if(a.abort)return Promise.resolve(s(a));if(d===R.enablePlugin&&n.dispatch({type:R.initializeStart,plugins:l,disabled:[],fromEnable:!0,meta:a.meta}),d===R.disablePlugin&&setTimeout(function(){return Xd(a.meta.rid,{payload:a})},0),d===R.initializeEnd){var m=e(),g=Object.keys(m),y=g.filter(function(C){return l.includes(C)}).map(function(C){return m[C]}),I=[],x=[],S=a.disabled,T=y.map(function(C){var P=C.loaded,w=C.name,L=C.config;return mu(C,function(){return P({config:L})},1e4).then(function(U){return i[w]||(n.dispatch({type:R.pluginReadyType(w),name:w,events:Object.keys(C).filter(function(G){return!Rs.includes(G)})}),i[w]=!0),I=I.concat(w),C}).catch(function(U){if(U instanceof Error)throw new Error(U);return x=x.concat(U.name),U})});Promise.all(T).then(function(C){var P={plugins:I,failed:x,disabled:S};setTimeout(function(){g.length===T.length+S.length&&n.dispatch(_({},{type:R.ready},P))},0)})}var M=function(){if(d!==R.bootstrap)return/^ready:([^:]*)$/.test(d)&&setTimeout(function(){return gu(n,e,r)},0),Promise.resolve(function(C,P,w,L,U){try{var G=Ne(P)?P():P,$=C.type,D=$.replace(hi,"");if(C._&&C._.called)return Promise.resolve(C);var z=w.getState(),re=(se=G,(ae=z.plugins)===void 0&&(ae={}),(ft=C.options)===void 0&&(ft={}),Object.keys(se).filter(function(v){var k=ft.plugins||{};return Hd(k[v])?k[v]:k.all!==!1&&(!ae[v]||ae[v].enabled!==!1)}).map(function(v){return se[v]}));$===R.initializeStart&&C.fromEnable&&(re=Object.keys(z.plugins).filter(function(v){var k=z.plugins[v];return C.plugins.includes(v)&&!k.initialized}).map(function(v){return G[v]}));var Z=re.map(function(v){return v.name}),N=function(v,k,E){var V=nu(v).map(function(j){return ru(j,k)});return k.reduce(function(j,q){var ce=q.name,K=nu(v,ce).map(function(Mi){return ru(Mi,k)}),H=K[0],J=K[1],Fe=K[2];return H.length&&(j.beforeNS[ce]=H),J.length&&(j.duringNS[ce]=J),Fe.length&&(j.afterNS[ce]=Fe),j},{before:V[0],beforeNS:{},during:V[1],duringNS:{},after:V[2],afterNS:{}})}($,re);return Promise.resolve(Ls({action:C,data:{exact:N.before,namespaced:N.beforeNS},state:z,allPlugins:G,allMatches:N,instance:w,store:L,EVENTS:U})).then(function(v){function k(){var j=function(){if($.match(hi))return Promise.resolve(Ls({action:_({},E,{type:D+"End"}),data:{exact:N.after,namespaced:N.afterNS},state:z,allPlugins:G,allMatches:N,instance:w,store:L,EVENTS:U})).then(function(q){q.meta&&q.meta.hasCallback&&Xd(q.meta.rid,{payload:q})})}();return j&&j.then?j.then(function(){return v}):v}if(pu(v,Z.length))return v;var E,V=function(){if($!==D)return Promise.resolve(Ls({action:_({},v,{type:D}),data:{exact:N.during,namespaced:N.duringNS},state:z,allPlugins:G,allMatches:N,instance:w,store:L,EVENTS:U})).then(function(j){E=j});E=v}();return V&&V.then?V.then(k):k()})}catch(v){return Promise.reject(v)}var se,ae,ft}(a,e,r,n,t)).then(function(C){return o=1,s(C)})}();return Promise.resolve(M&&M.then?M.then(c):c(M))}catch(C){return Promise.reject(C)}}}}}function Ik(r){return function(e){return function(t){return function(i){var n=i.type,s=i.key,a=i.value,o=i.options;if(n===R.setItem||n===R.removeItem){if(i.abort)return t(i);n===R.setItem?r.setItem(s,a,o):r.removeItem(s,o)}return t(i)}}}}var xk=function(){var r=this;this.before=[],this.after=[],this.addMiddleware=function(e,t){r[t]=r[t].concat(e)},this.removeMiddleware=function(e,t){var i=r[t].findIndex(function(n){return n===e});i!==-1&&(r[t]=[].concat(r[t].slice(0,i),r[t].slice(i+1)))},this.dynamicMiddlewares=function(e){return function(t){return function(i){return function(n){var s={getState:t.getState,dispatch:function(o){return t.dispatch(o)}},a=r[e].map(function(o){return o(s)});return yi.apply(void 0,a)(i)(n)}}}}};function Ak(r){return function(e,t){e===void 0&&(e={});var i={};if(t.type==="initialize:aborted")return e;if(/^registerPlugin:([^:]*)$/.test(t.type)){var n=au(t.type,"registerPlugin"),s=r()[n];if(!s||!n)return e;var a=t.enabled,o=s.config;return i[n]={enabled:a,initialized:!!a&&!s.initialize,loaded:!!a&&!!s.loaded({config:o}),config:o},_({},e,i)}if(/^initialize:([^:]*)$/.test(t.type)){var c=au(t.type,R.initialize),d=r()[c];return d&&c?(i[c]=_({},e[c],{initialized:!0,loaded:!!d.loaded({config:d.config})}),_({},e,i)):e}if(/^ready:([^:]*)$/.test(t.type))return i[t.name]=_({},e[t.name],{loaded:!0}),_({},e,i);switch(t.type){case R.disablePlugin:return _({},e,cu(t.plugins,!1,e));case R.enablePlugin:return _({},e,cu(t.plugins,!0,e));default:return e}}}function au(r,e){return r.substring(e.length+1,r.length)}function cu(r,e,t){return r.reduce(function(i,n){return i[n]=_({},t[n],{enabled:e}),i},t)}function hu(r){try{return JSON.parse(JSON.stringify(r))}catch(e){}return r}var Ck={last:{},history:[]};function Sk(r,e){r===void 0&&(r=Ck);var t=e.options,i=e.meta;if(e.type===R.track){var n=hu(_({event:e.event,properties:e.properties},Object.keys(t).length&&{options:t},{meta:i}));return _({},r,{last:n,history:r.history.concat(n)})}return r}var Pk={actions:[]};function wk(r,e){r===void 0&&(r=Pk);var t=e.payload;switch(e.type){case"queue":var i;return i=t&&t.type&&t.type===R.identify?[e].concat(r.actions):r.actions.concat(e),_({},r,{actions:i});case"dequeue":return[];default:return r}}var yu=/#.*$/;function Tk(r){var e=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(r);return"/"+(e&&e[3]?e[3].split("?")[0].replace(yu,""):"")}var vu,bu,ku,Iu,Ek=function(r){if(r===void 0&&(r={}),!xe)return r;var e=document,t=e.title,i=e.referrer,n=window,s=n.location,a=n.innerWidth,o=n.innerHeight,c=s.hash,d=s.search,l=function(m){var g=function(){if(xe){for(var y,I=document.getElementsByTagName("link"),x=0;y=I[x];x++)if(y.getAttribute("rel")==="canonical")return y.getAttribute("href")}}();return g?g.match(/\?/)?g:g+m:window.location.href.replace(yu,"")}(d),f={title:t,url:l,path:Tk(l),hash:c,search:d,width:a,height:o};return i&&i!==""&&(f.referrer=i),_({},f,r)},Mk={last:{},history:[]};function Lk(r,e){r===void 0&&(r=Mk);var t=e.options;if(e.type===R.page){var i=hu(_({properties:e.properties,meta:e.meta},Object.keys(t).length&&{options:t}));return _({},r,{last:i,history:r.history.concat(i)})}return r}vu=function(){if(!xe)return!1;var r=navigator.appVersion;return~r.indexOf("Win")?"Windows":~r.indexOf("Mac")?"MacOS":~r.indexOf("X11")?"UNIX":~r.indexOf("Linux")?"Linux":"Unknown OS"}(),bu=xe?document.referrer:null,ku=$d(),Iu=qd();var du={initialized:!1,sessionId:$i(),app:null,version:null,debug:!1,offline:!!xe&&!navigator.onLine,os:{name:vu},userAgent:xe?navigator.userAgent:"node",library:{name:"analytics",version:"0.12.16"},timezone:Iu,locale:ku,campaign:{},referrer:bu};function Dk(r,e){r===void 0&&(r=du);var t=r.initialized,i=e.campaign;switch(e.type){case R.campaign:return _({},r,{campaign:i});case R.offline:return _({},r,{offline:!0});case R.online:return _({},r,{offline:!1});default:return t?r:_({},du,r,{initialized:!0})}}var Ok=["plugins","reducers","storage"];function Nk(r,e,t){if(xe){var i=window[(t?"add":"remove")+"EventListener"];r.split(" ").forEach(function(n){i(n,e)})}}function Rk(r){var e=Nk.bind(null,"online offline",function(t){return Promise.resolve(!navigator.onLine).then(r)});return e(!0),function(t){return e(!1)}}function xu(){return Ee("analytics",[]),function(r){return function(e,t,i){var n=r(e,t,i),s=n.dispatch;return Object.assign(n,{dispatch:function(a){return Ft[Bt].analytics.push(a.action||a),s(a)}})}}}function uu(r){return function(){return yi(yi.apply(null,arguments),xu())}}function Ns(r){return r?jd(r)?r:[r]:[]}function lu(r,e,t){r===void 0&&(r={});var i,n,s=$i();return e&&(Ki[s]=(i=e,n=function(a){for(var o,c=a||Array.prototype.slice.call(arguments),d=0;d<c.length;d++)if(Ne(c[d])){o=c[d];break}return o}(t),function(a){n&&n(a),i(a)})),_({},r,{rid:s,ts:new Date().getTime()},e?{hasCallback:!0}:{})}function Au(r){r===void 0&&(r={});var e=r.reducers||{},t=r.initialUser||{},i=(r.plugins||[]).reduce(function(v,k){if(Ne(k))return v.middlewares=v.middlewares.concat(k),v;if(k.NAMESPACE&&(k.name=k.NAMESPACE),!k.name)throw new Error("https://lytics.dev/errors/1");k.config||(k.config={});var E=k.EVENTS?Object.keys(k.EVENTS).map(function(q){return k.EVENTS[q]}):[];v.pluginEnabled[k.name]=!(k.enabled===!1||k.config.enabled===!1),delete k.enabled,k.methods&&(v.methods[k.name]=Object.keys(k.methods).reduce(function(q,ce){var K;return q[ce]=(K=k.methods[ce],function(){for(var H=Array.prototype.slice.call(arguments),J=new Array(K.length),Fe=0;Fe<H.length;Fe++)J[Fe]=H[Fe];return J[J.length]=P,K.apply({instance:P},J)}),q},{}),delete k.methods);var V=Object.keys(k).concat(E),j=new Set(v.events.concat(V));if(v.events=Array.from(j),v.pluginsArray=v.pluginsArray.concat(k),v.plugins[k.name])throw new Error(k.name+"AlreadyLoaded");return v.plugins[k.name]=k,v.plugins[k.name].loaded||(v.plugins[k.name].loaded=function(){return!0}),v},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),n=r.storage?r.storage:{getItem:Te,setItem:Ee,removeItem:Re},s=function(v){return function(k,E,V){return E.getState("user")[k]||(V&&ge(V)&&V[k]?V[k]:Zd(v)[k]||Te(_s(k))||null)}}(n),a=i.plugins,o=i.events.filter(function(v){return!Rs.includes(v)}).sort(),c=new Set(o.concat(yn).filter(function(v){return!Rs.includes(v)})),d=Array.from(c).sort(),l=function(){return a},f=new xk,m=f.addMiddleware,g=f.removeMiddleware,y=f.dynamicMiddlewares,I=function(){throw new Error("Abort disabled inListener")},x=Kd(),S=Zd(n),T=_({},S,t,x.an_uid?{userId:x.an_uid}:{},x.an_aid?{anonymousId:x.an_aid}:{});T.anonymousId||(T.anonymousId=$i());var M=_({enable:function(v,k){return new Promise(function(E){N.dispatch({type:R.enablePlugin,plugins:Ns(v),_:{originalAction:R.enablePlugin}},E,[k])})},disable:function(v,k){return new Promise(function(E){N.dispatch({type:R.disablePlugin,plugins:Ns(v),_:{originalAction:R.disablePlugin}},E,[k])})}},i.methods),C=!1,P={identify:function(v,k,E,V){try{var j=st(v)?v:null,q=ge(v)?v:k,ce=E||{},K=P.user();Ee(_s(Pt),j);var H=j||q.userId||s(Pt,P,q);return Promise.resolve(new Promise(function(J){N.dispatch(_({type:R.identifyStart,userId:H,traits:q||{},options:ce,anonymousId:K.anonymousId},K.id&&K.id!==j&&{previousId:K.id}),J,[k,E,V])}))}catch(J){return Promise.reject(J)}},track:function(v,k,E,V){try{var j=ge(v)?v.event:v;if(!j||!st(j))throw new Error("EventMissing");var q=ge(v)?v:k||{},ce=ge(E)?E:{};return Promise.resolve(new Promise(function(K){N.dispatch({type:R.trackStart,event:j,properties:q,options:ce,userId:s(Pt,P,k),anonymousId:s(gi,P,k)},K,[k,E,V])}))}catch(K){return Promise.reject(K)}},page:function(v,k,E){try{var V=ge(v)?v:{},j=ge(k)?k:{};return Promise.resolve(new Promise(function(q){N.dispatch({type:R.pageStart,properties:Ek(V),options:j,userId:s(Pt,P,V),anonymousId:s(gi,P,V)},q,[v,k,E])}))}catch(q){return Promise.reject(q)}},user:function(v){if(v===Pt||v==="id")return s(Pt,P);if(v===gi||v==="anonId")return s(gi,P);var k=P.getState("user");return v?(0,fn.default)(k,v):k},reset:function(v){return new Promise(function(k){N.dispatch({type:R.resetStart},k,v)})},ready:function(v){return C&&v({plugins:M,instance:P}),P.on(R.ready,function(k){v(k),C=!0})},on:function(v,k){if(!v||!Ne(k))return!1;if(v===R.bootstrap)throw new Error(".on disabled for "+v);var E=/Start$|Start:/;if(v==="*"){var V=function(K){return function(H){return function(J){return J.type.match(E)&&k({payload:J,instance:P,plugins:a}),H(J)}}},j=function(K){return function(H){return function(J){return J.type.match(E)||k({payload:J,instance:P,plugins:a}),H(J)}}};return m(V,pn),m(j,hn),function(){g(V,pn),g(j,hn)}}var q=v.match(E)?pn:hn,ce=function(K){return function(H){return function(J){return J.type===v&&k({payload:J,instance:P,plugins:a,abort:I}),H(J)}}};return m(ce,q),function(){return g(ce,q)}},once:function(v,k){if(!v||!Ne(k))return!1;if(v===R.bootstrap)throw new Error(".once disabled for "+v);var E=P.on(v,function(V){k({payload:V.payload,instance:P,plugins:a,abort:I}),E()});return E},getState:function(v){var k=N.getState();return v?(0,fn.default)(k,v):Object.assign({},k)},dispatch:function(v){var k=st(v)?{type:v}:v;if(yn.includes(k.type))throw new Error("reserved action "+k.type);var E=_({},k,{_:_({originalAction:k.type},v._||{})});N.dispatch(E)},enablePlugin:M.enable,disablePlugin:M.disable,plugins:M,storage:{getItem:n.getItem,setItem:function(v,k,E){N.dispatch({type:R.setItemStart,key:v,value:k,options:E})},removeItem:function(v,k){N.dispatch({type:R.removeItemStart,key:v,options:k})}},setAnonymousId:function(v,k){P.storage.setItem(Tt,v,k)},events:{core:yn,plugins:o}},w=i.middlewares.concat([function(v){return function(k){return function(E){return E.meta||(E.meta=lu()),k(E)}}},y(pn),kk(P,l,{all:d,plugins:o}),Ik(n),pk(P),yk(P),y(hn)]),L={context:Dk,user:hk(n),page:Lk,track:Sk,plugins:Ak(l),queue:wk},U=yi,G=yi;if(xe&&r.debug){var $=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;$&&(U=$({trace:!0,traceLimit:25})),G=function(){return arguments.length===0?xu():ge(typeof arguments[0])?uu():uu().apply(null,arguments)}}var D,z=function(v){return Object.keys(v).reduce(function(k,E){return Ok.includes(E)||(k[E]=v[E]),k},{})}(r),re=i.pluginsArray.reduce(function(v,k){var E=k.name,V=k.config,j=k.loaded,q=i.pluginEnabled[E];return v[E]={enabled:q,initialized:!!q&&!k.initialize,loaded:!!j({config:V}),config:V},v},{}),Z={context:z,user:T,plugins:re},N=fu(function(v){for(var k=Object.keys(v),E={},V=0;V<k.length;V++){var j=k[V];typeof v[j]===wt&&(E[j]=v[j])}var q,ce=Object.keys(E);try{(function(K){Object.keys(K).forEach(function(H){var J=K[H];if(typeof J(void 0,{type:"@@redux/INIT"})===ot||typeof J(void 0,{type:fk})===ot)throw new Error("reducer "+H+" "+ot)})})(E)}catch(K){q=K}return function(K,H){if(K===void 0&&(K={}),q)throw q;for(var J=!1,Fe={},Mi=0;Mi<ce.length;Mi++){var ir=ce[Mi],ao=K[ir],Gn=(0,E[ir])(ao,H);if(typeof Gn===ot){var Il=mk(ir,H);throw new Error(Il)}Fe[ir]=Gn,J=J||Gn!==ao}return J?Fe:K}}(_({},L,e)),Z,G(U(gk.apply(void 0,w))));N.dispatch=(D=N.dispatch,function(v,k,E){var V=_({},v,{meta:lu(v.meta,k,Ns(E))});return D.apply(null,[V])});var se=Object.keys(a);N.dispatch({type:R.bootstrap,plugins:se,config:z,params:x,user:T,initialUser:t,persistedUser:S});var ae=se.filter(function(v){return i.pluginEnabled[v]}),ft=se.filter(function(v){return!i.pluginEnabled[v]});return N.dispatch({type:R.registerPlugins,plugins:se,enabled:i.pluginEnabled}),i.pluginsArray.map(function(v,k){var E=v.bootstrap,V=v.config,j=v.name;E&&Ne(E)&&E({instance:P,config:V,payload:v}),N.dispatch({type:R.registerPluginType(j),name:j,enabled:i.pluginEnabled[j],plugin:v}),i.pluginsArray.length===k+1&&N.dispatch({type:R.initializeStart,plugins:ae,disabled:ft})}),Rk(function(v){N.dispatch({type:v?R.offline:R.online})}),function(v,k,E){setInterval(function(){return gu(v,k,E)},3e3)}(N,l,P),P}var pn="before",hn="after";var vi="cookie",Vt=Fs(),Us=vn,Cu=vn;function Bs(r){return Vt?vn(r,"",-1):Re(r)}function Fs(){if(Vt!==void 0)return Vt;var r="cookiecookie";try{vn(r,r),Vt=document.cookie.indexOf(r)!==-1,Bs(r)}catch(e){Vt=!1}return Vt}function vn(r,e,t,i,n,s){if(typeof window!="undefined"){var a=arguments.length>1;return Vt===!1&&(a?Ee(r,e):Te(r)),a?document.cookie=r+"="+encodeURIComponent(e)+(t?"; expires="+new Date(+new Date+1e3*t).toUTCString()+(i?"; path="+i:"")+(n?"; domain="+n:"")+(s?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+r+"=")[1]||"").split(";")[0])}}var bi="localStorage",Su=qi.bind(null,"localStorage"),MD=St("localStorage","getItem",Te),LD=St("localStorage","setItem",Ee),DD=St("localStorage","removeItem",Re);var ki="sessionStorage",Pu=qi.bind(null,"sessionStorage"),RD=St("sessionStorage","getItem",Te),_D=St("sessionStorage","setItem",Ee),UD=St("sessionStorage","removeItem",Re);function Ii(r){var e=r;try{if((e=JSON.parse(r))==="true")return!0;if(e==="false")return!1;if(ge(e))return e;parseFloat(e)===e&&(e=parseFloat(e))}catch(t){}if(e!==null&&e!=="")return e}var _k=Su(),Uk=Pu(),Bk=Fs();function wu(r,e){if(r){var t=Hs(e),i=!Gs(t),n=Vs(t)?Ii(localStorage.getItem(r)):void 0;if(i&&!Ut(n))return n;var s=js(t)?Ii(Us(r)):void 0;if(i&&s)return s;var a=Ws(t)?Ii(sessionStorage.getItem(r)):void 0;if(i&&a)return a;var o=Te(r);return i?o:{localStorage:n,sessionStorage:a,cookie:s,global:o}}}function Fk(r,e,t){if(r&&!Ut(e)){var i={},n=Hs(t),s=JSON.stringify(e),a=!Gs(n);return Vs(n)&&(i[bi]=bn(bi,e,Ii(localStorage.getItem(r))),localStorage.setItem(r,s),a)?i[bi]:js(n)&&(i[vi]=bn(vi,e,Ii(Us(r))),Cu(r,s),a)?i[vi]:Ws(n)&&(i[ki]=bn(ki,e,Ii(sessionStorage.getItem(r))),sessionStorage.setItem(r,s),a)?i[ki]:(i[mi]=bn(mi,e,Te(r)),Ee(r,e),a?i[mi]:i)}}function Hk(r,e){if(r){var t=Hs(e),i=wu(r,Ms),n={};return!Ut(i.localStorage)&&Vs(t)&&(localStorage.removeItem(r),n[bi]=i.localStorage),!Ut(i.cookie)&&js(t)&&(Bs(r),n[vi]=i.cookie),!Ut(i.sessionStorage)&&Ws(t)&&(sessionStorage.removeItem(r),n[ki]=i.sessionStorage),!Ut(i.global)&&kn(t,mi)&&(Re(r),n[mi]=i.global),n}}function Hs(r){return r?st(r)?r:r.storage:Es}function Vs(r){return _k&&kn(r,bi)}function js(r){return Bk&&kn(r,vi)}function Ws(r){return Uk&&kn(r,ki)}function Gs(r){return r===Ms||r==="all"}function kn(r,e){return r===Es||r===e||Gs(r)}function bn(r,e,t){return{location:r,current:e,previous:t}}var Tu={setItem:Fk,getItem:wu,removeItem:Hk};function Vk(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Eu(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function Mu(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Eu(Object(t),!0).forEach(function(i){Vk(r,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Eu(Object(t)).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(t,i))})}return r}function Lu(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={storage:Tu};return Au(Mu(Mu({},e),r))}var Ou="@seeka-labs/converge",Nu="1.9.20";function Ru(r,e,t){return t&&e&&(e==null?void 0:e.trim())!==""?e:r.toString().toLowerCase()==="custom".toString().toLowerCase()?e!=null?e:"":r.toString()}function In(r,e,t){var s;let i=[];switch(r.type){case"activityTracked":{let a=Ru(e.activityName,(s=e.props)==null?void 0:s.activityNameCustom,!1);if(!r.activityNames||r.activityNames.length===0||!r.activityNames.some(o=>o.toLowerCase()===a.toLowerCase()))return{isMatch:!1,resultDescriptions:["Activity name does not match filter"],filter:r};i.push("Activity name matches filter");break}default:return{isMatch:!1,resultDescriptions:["Filter type '"+r.type+"' is not supported"],filter:r}}let n=!1;if(r.sourceFilter&&r.sourceFilter.filters&&r.sourceFilter.filters.length>0){let a=[];r.sourceFilter.filters.forEach(c=>{let d=!1;switch(c.type){case"domain":{if(c.key&&t.loc){let l=at(t.loc,!1),f=at(t.loc,!0),m=c.key.toLowerCase();l&&(l===m||f===m)?(i.push(`Source domain matches ${c.key}`),d=!0):i.push(`Source domain does not match ${c.key}`)}break}case"wildcard":{i.push("Matches all sources due to wildcard"),d=!0;break}default:}a.push(d)});let o=r.sourceFilter.comparer==="undefined"?"and":r.sourceFilter.comparer;if(o==="and")n=a.every(c=>c);else if(o==="or")n=a.some(c=>c);else throw new Error(`Not supported: ${o}`)}return{isMatch:n,resultDescriptions:i,filter:r}}function at(r,e){var t;try{if(!r)return null;let i=r+"";i.startsWith("http")||(i="https://"+i);let s=(t=new URL(i).hostname)==null?void 0:t.toLowerCase();return e&&s.startsWith("www.")?s.substring(4):s}catch(i){return null}}function xn(r,e,t,i,n){if(!r||r.length===0)return i;let s=[];if(r.forEach(a=>{let o=!1;if(a.type)switch(a.type){case"domain":{if(t){let c=at(t,!1);a.textMatch?(ze(a.textMatch,c,n)||ze(a.textMatch,at(t,!0),n))&&(o=!0):a.key&&c&&c.toLowerCase()===a.key.toLowerCase()&&(o=!0)}break}case"pagePath":{let c=new URL(t),d=rt(c.pathname);a.textMatch?a.textMatch.operator==="equals"?o=ze(F(p({},a.textMatch),{matchValue:rt(a.textMatch.matchValue||"")}),d,n):o=ze(a.textMatch,d,n):n==null||n.debug.error("TextMatchInfo is missing for PagePath source filter",{sourceFilter:a});break}case"url":{a.textMatch?o=ze(a.textMatch,t,n):n==null||n.debug.error("TextMatchInfo is missing for Url source filter",{sourceFilter:a});break}case"wildcard":{o=!0;break}default:throw new Error(`Not supported: ${a.type}`)}s.push(o)}),e==="and"||!e)return s.every(a=>a);if(e==="or")return s.some(a=>a);throw new Error(`Not supported: ${e}`)}function ze(r,e,t){if(!r)return!1;if(r.operator==="any")return!0;let i=(e||"").toLowerCase().trim(),n=(r.matchValue||"").toLowerCase().trim();switch(r.operator){case"equals":return i===n;case"notEquals":return i!==n;case"contains":return i?i.includes(n):!1;case"notContains":return i?!i.includes(n):!1;case"startsWith":return i?i.startsWith(n):!1;case"endsWith":return i?i.endsWith(n):!1;case"isNull":return!i;case"notNull":return!!i;case"isTrue":return i==="true"||i==="1"||i==="yes";case"isFalse":return i==="false"||i==="0"||i==="no";case"in":try{return i?JSON.parse(n).map(a=>a.trim().toLowerCase()).some(a=>a.toLowerCase()===i):!1}catch(s){return t?t.debug.error(`Error parsing In condition: ${s}`):console.error(`Error parsing In condition: ${s}`),!1}case"notIn":try{return i?!JSON.parse(n).map(a=>a.trim().toLowerCase()).some(a=>a.toLowerCase()===i):!1}catch(s){return t?t.debug.error(`Error parsing NotIn condition: ${s}`):console.error(`Error parsing In condition: ${s}`),!1}case"regEx":return new RegExp(n,"i").test(i);default:throw new Error(`Not supported: ${r.operator}`)}}var $s=class{constructor(e,t,i){u(this,"sdk");u(this,"keyPrefix");u(this,"orgKeyPrefix");u(this,"secureCookies",!1);u(this,"mainCookieDomain");var n;if(this.sdk=e,this.keyPrefix=t+"__",this.orgKeyPrefix=i+"__",e){let s=e.dataLayer.window.location();if(s&&s.hostname){let a=(n=at(s.href,!0))==null?void 0:n.toLowerCase();a&&a!=="localhost"&&(this.mainCookieDomain="."+a),this.secureCookies=s.protocol==="https:"}}}get(e){var t;try{let i=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return i?i[2]:null}catch(i){return(t=this.sdk)==null||t.debug.error("Failed to get cookie val",i),null}}getSeekaScopedCookie(e){let t=this.keyPrefix+e;return this.get(t)}getSeekaOrgCookie(e){let t=this.orgKeyPrefix+e;return this.get(t)}getSeekaScopedByNamePrefix(e){let t=this.keyPrefix+e;return this.getByNamePrefix(t)}getByNamePrefix(e){var t;try{return document.cookie.split(";").filter(function(i){return i.trim().indexOf(e)===0}).map(function(i){return i.trim()})||[]}catch(i){return(t=this.sdk)==null||t.debug.error("Failed to get cookies by val name prefix",i),[]}}setSeekaScoped(e,t,i){let n=this.keyPrefix+e;this.set(n,t,i)}setSeekaOrg(e,t,i){let n=this.orgKeyPrefix+e;this.set(n,t,i)}set(e,t,i,n){var s,a,o,c,d;try{let l="",f=new Date;if(f.setTime(f.getTime()+(i||365*50)*24*60*60*1e3),l="; expires="+f.toUTCString(),(s=this.sdk)==null||s.debug.verbose("Setting cookie",{cookieName:e,val:t,mainCookieDomain:this.mainCookieDomain,secureCookies:this.secureCookies,domains:n}),n){let g=Array.isArray(n)?n:[n];for(let y of g){let I=e+"="+(t||"")+l+";path=/;SameSite=Lax;domain="+y;(a=this.sdk)==null||a.debug.verbose("Setting domain cookie",{domain:y,cookieString:I}),document.cookie=I}}let m=this.secureCookies?";secure":"";if(this.mainCookieDomain){let g=e+"="+(t||"")+l+";path=/;SameSite=Lax;domain="+this.mainCookieDomain+m;(o=this.sdk)==null||o.debug.verbose("Setting main domain cookie",{cookieString:g}),document.cookie=g}else{let g=e+"="+(t||"")+l+";path=/;SameSite=Lax"+m;(c=this.sdk)==null||c.debug.verbose("Setting no-domain cookie",{cookieString:g}),document.cookie=g}setTimeout(()=>{var y;let g=this.get(e);(y=this.sdk)==null||y.debug.verbose("Cookie verification",{cookieName:e,retrieved:g})},0)}catch(l){(d=this.sdk)==null||d.debug.warn("Failed to set cookie",l)}}},_u=$s;function Wk(r){return r instanceof Uint8Array||ArrayBuffer.isView(r)&&r.constructor.name==="Uint8Array"}function Qi(r,...e){if(!Wk(r))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(r.length))throw new Error("Uint8Array expected of length "+e+", got length="+r.length)}function qs(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}function Uu(r,e){Qi(r);let t=e.outputLen;if(r.length<t)throw new Error("digestInto() expects output buffer of length at least "+t)}function zi(...r){for(let e=0;e<r.length;e++)r[e].fill(0)}function Cn(r){return new DataView(r.buffer,r.byteOffset,r.byteLength)}function _e(r,e){return r<<32-e|r>>>e}var Gk=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",$k=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));function Bu(r){if(Qi(r),Gk)return r.toHex();let e="";for(let t=0;t<r.length;t++)e+=$k[r[t]];return e}function Ks(r){if(typeof r!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(r))}function Js(r){return typeof r=="string"&&(r=Ks(r)),Qi(r),r}var An=class{};function Fu(r){let e=i=>r().update(Js(i)).digest(),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}function qk(r,e,t,i){if(typeof r.setBigUint64=="function")return r.setBigUint64(e,t,i);let n=BigInt(32),s=BigInt(4294967295),a=Number(t>>n&s),o=Number(t&s),c=i?4:0,d=i?0:4;r.setUint32(e+c,a,i),r.setUint32(e+d,o,i)}function Hu(r,e,t){return r&e^~r&t}function Vu(r,e,t){return r&e^r&t^e&t}var Sn=class extends An{constructor(e,t,i,n){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=i,this.isLE=n,this.buffer=new Uint8Array(e),this.view=Cn(this.buffer)}update(e){qs(this),e=Js(e),Qi(e);let{view:t,buffer:i,blockLen:n}=this,s=e.length;for(let a=0;a<s;){let o=Math.min(n-this.pos,s-a);if(o===n){let c=Cn(e);for(;n<=s-a;a+=n)this.process(c,a);continue}i.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){qs(this),Uu(e,this),this.finished=!0;let{buffer:t,view:i,blockLen:n,isLE:s}=this,{pos:a}=this;t[a++]=128,zi(this.buffer.subarray(a)),this.padOffset>n-a&&(this.process(i,0),a=0);for(let f=a;f<n;f++)t[f]=0;qk(i,n-8,BigInt(this.length*8),s),this.process(i,0);let o=Cn(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let d=c/4,l=this.get();if(d>l.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<d;f++)o.setUint32(4*f,l[f],s)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let i=e.slice(0,t);return this.destroy(),i}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:i,length:n,finished:s,destroyed:a,pos:o}=this;return e.destroyed=a,e.finished=s,e.length=n,e.pos=o,n%t&&e.buffer.set(i),e}clone(){return this._cloneInto()}},ct=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);var Kk=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Et=new Uint32Array(64),Qs=class extends Sn{constructor(e=32){super(64,e,8,!1),this.A=ct[0]|0,this.B=ct[1]|0,this.C=ct[2]|0,this.D=ct[3]|0,this.E=ct[4]|0,this.F=ct[5]|0,this.G=ct[6]|0,this.H=ct[7]|0}get(){let{A:e,B:t,C:i,D:n,E:s,F:a,G:o,H:c}=this;return[e,t,i,n,s,a,o,c]}set(e,t,i,n,s,a,o,c){this.A=e|0,this.B=t|0,this.C=i|0,this.D=n|0,this.E=s|0,this.F=a|0,this.G=o|0,this.H=c|0}process(e,t){for(let f=0;f<16;f++,t+=4)Et[f]=e.getUint32(t,!1);for(let f=16;f<64;f++){let m=Et[f-15],g=Et[f-2],y=_e(m,7)^_e(m,18)^m>>>3,I=_e(g,17)^_e(g,19)^g>>>10;Et[f]=I+Et[f-7]+y+Et[f-16]|0}let{A:i,B:n,C:s,D:a,E:o,F:c,G:d,H:l}=this;for(let f=0;f<64;f++){let m=_e(o,6)^_e(o,11)^_e(o,25),g=l+m+Hu(o,c,d)+Kk[f]+Et[f]|0,I=(_e(i,2)^_e(i,13)^_e(i,22))+Vu(i,n,s)|0;l=d,d=c,c=o,o=a+g|0,a=s,s=n,n=i,i=g+I|0}i=i+this.A|0,n=n+this.B|0,s=s+this.C|0,a=a+this.D|0,o=o+this.E|0,c=c+this.F|0,d=d+this.G|0,l=l+this.H|0,this.set(i,n,s,a,o,c,d,l)}roundClean(){zi(Et)}destroy(){this.set(0,0,0,0,0,0,0,0),zi(this.buffer)}};var ju=Fu(()=>new Qs);var zs=class{constructor(e){u(this,"sdk");this.sdk=e}sha256(e){return h(this,null,function*(){if(!e||(e=e.trim(),!e))return"";try{let t=Ks(e);return Bu(ju(t)).toLowerCase()}catch(t){let i=this.sdk.dataLayer.window.location().protocol,n=!ie&&i.substring(0,5)!=="https";return this.sdk.debug.error(n?"Failed to sha256 as current protocol is not HTTPS. Data requested to be hashed will be handled as empty text.":"Failed to sha256. Data requested to be hashed will be handled as empty text.",t),""}})}},Wu=zs;var Ys=class{constructor(e){u(this,"sdk");u(this,"methodCallQueue",{});u(this,"priorityMethodCallQueue",{});this.sdk=e,this.methodCallQueue=this.createQueue("standard"),this.priorityMethodCallQueue=this.createQueue("priority")}createQueue(e){return{name:e,items:[],failedItems:[]}}sleep(e){return new Promise(t=>setTimeout(t,e))}addMethodCallToQueue(e,t,i,n,s){let a=this.methodCallQueue;s&&(a=this.priorityMethodCallQueue),n?a.items.push({id:bs(),func:function(){return h(this,null,function*(){yield e.apply(t,i)})},context:t,params:i,isAsync:n}):a.items.push({id:bs(),func:function(){e.apply(t,i)},context:t,params:i,isAsync:n}),this.sdk.debug.verbose("Queue - addMethodCallToQueue",a.name)}startProcessingPriorityMethods(){return h(this,null,function*(){this.sdk.debug.verbose("Queue - startProcessingPriorityMethods"),yield this.processQueue(this.priorityMethodCallQueue),this.sdk.debug.verbose("Queue - finishProcessingPriorityMethods")})}startProcessingStandardMethods(){return h(this,null,function*(){this.sdk.debug.verbose("Queue - startProcessingStandardMethods"),yield this.processQueue(this.methodCallQueue),this.sdk.debug.verbose("Queue - finishProcessingStandardMethods")})}processQueue(e){return h(this,null,function*(){this.sdk.debug.verbose("Queue - processing starting",e.name);let t=performance.now();for(;e.items.length>0;){let n=e.items[0];try{let s=performance.now();n.isAsync?yield n.func():n.func();let a=performance.now();this.sdk.debug.verbose(`Queue - handled item in ${a-s}ms`,e.name)}catch(s){this.sdk.debug.error("Queue - failed handling item "+e.name,s),e.failedItems.push(n)}finally{e.items.shift()}}let i=performance.now();this.sdk.debug.verbose(`Queue - processing complete in ${i-t}ms`,e.name)})}},Gu=Ys;var Se=new fi,Zs=class{order(e){return e&&(e.totalDiscounts&&(e.totalDiscounts=Se.parseMoney(e.totalDiscounts)),e.totalLineItemsPrice&&(e.totalLineItemsPrice=Se.parseMoney(e.totalLineItemsPrice)),e.totalPrice&&(e.totalPrice=Se.parseMoney(e.totalPrice)),e.totalRefunds&&(e.totalRefunds=Se.parseMoney(e.totalRefunds)),e.totalShippingPrice&&(e.totalShippingPrice=Se.parseMoney(e.totalShippingPrice)),e.totalTax&&(e.totalTax=Se.parseMoney(e.totalTax)),e.products&&e.products.length>0&&(e.products=e.products.filter(t=>!!t).map(t=>this.product(t)).filter(t=>!!t)),(!e.products||e.products.length===0)&&(e.products=[]),e)}product(e){return!e||(e.totalDiscount&&(e.totalDiscount=Se.parseMoney(e.totalDiscount)),e.unitPrice&&(e.unitPrice=Se.parseMoney(e.unitPrice)),e.quantity&&(e.quantity=Se.parseFloat(e.quantity)),e.productName=Se.parseStr(e.productName),e.variantIdentifier=Se.parseStr(e.variantIdentifier),e.productIdentifier=Se.parseStr(e.productIdentifier),e.variantName=Se.parseStr(e.variantName),!e.productName&&!e.variantIdentifier&&!e.productIdentifier&&!e.variantName)?null:e}},$u=Zs;function qu(r={}){return{name:"analytics-plugin-converge-configurationapply",config:p({},r),pageStart:({abort:e,config:t})=>{var i,n;if(((n=(i=t.tracking)==null?void 0:i.processing)==null?void 0:n.isBrowserEventsDisabled)===!0)return e("Cancel the page call because browser events are disabled")},identifyStart:({abort:e,config:t})=>{var i,n;if(((n=(i=t.tracking)==null?void 0:i.processing)==null?void 0:n.isIdentityDisabled)===!0)return e("Cancel the identify call because identity is disabled")},trackStart:({abort:e,config:t})=>{var i,n;if(((n=(i=t.tracking)==null?void 0:i.processing)==null?void 0:n.isBrowserEventsDisabled)===!0)return e("Cancel the track call because browser events are disabled")},loaded:()=>!0}}var Pn=class{constructor(e){u(this,"sdk");u(this,"instanceKeyPrefix");u(this,"orgKeyPrefix");u(this,"globalKeyPrefix");u(this,"state",{});this.sdk=e,this.instanceKeyPrefix="sk__i_"+e.config.scopeKey+"__",this.orgKeyPrefix="sk__o_"+e.config.organisationId+"__",this.globalKeyPrefix="sk__"}getKeyPrefix(e){return e==="org"?this.orgKeyPrefix:e==="global"?this.globalKeyPrefix:this.instanceKeyPrefix}removeByPrefix(e,t){for(let i in this.state)i.indexOf(this.getKeyPrefix(t)+e)==0&&delete this.state[i]}set(e,t,i){this.state[this.getKeyPrefix(i)+e]=t}get(e,t){return"key"in this.state?this.state[this.getKeyPrefix(t)+e]:null}};var wn=class{constructor(e,t,i){u(this,"instanceKeyPrefix");u(this,"orgKeyPrefix");u(this,"globalKeyPrefix");u(this,"storage");this.instanceKeyPrefix="sk__i_"+e+"__",this.orgKeyPrefix="sk__o_"+t+"__",this.globalKeyPrefix="sk__",this.storage=i}getKeyPrefix(e){return e==="org"?this.orgKeyPrefix:e==="global"?this.globalKeyPrefix:this.instanceKeyPrefix}removeByPrefix(e,t){let i=Object.keys(this.storage);for(let n in i){let s=i[n];s.indexOf(this.getKeyPrefix(t)+e)===0&&this.storage.removeItem(s)}}set(e,t,i){this.storage.setItem(this.getKeyPrefix(i)+e,JSON.stringify(t))}get(e,t){let i=this.storage.getItem(this.getKeyPrefix(t)+e);return i==null||i==null?null:JSON.parse(i)}};var Tn=class{constructor(e){u(this,"sdk");this.sdk=e}addEventListeners(){window.addEventListener("message",e=>{if(e.origin==="https://bookings.nowbookit.com")try{let t=JSON.parse(e.data);if(t.type!=="NBIWidget2GoogleAnalytics")return;switch(this.sdk.debug.verbose("Converge - Now book it - event bubble",t),t.event.event){case"Booking Confirmed":this.sdk.track.lead();break}}catch(t){this.sdk.debug.error("Converge - Now book it - message handle error",t)}})}};var Ye=class r{constructor(e){u(this,"sdk");u(this,"definitionListenerBindedToElementDataAttrPrefix");u(this,"firedDefinitionIds",[]);this.sdk=e,this.definitionListenerBindedToElementDataAttrPrefix="data-sk-act-def-binded-"+e.config.scopeKey}bindEventHandlersForActivityDefinitions(){var t,i,n,s,a;this.sdk.debug.verbose("Activity definitions - bindEventHandlersForActivityDefinitions starting");let e=(((s=(n=(i=(t=this.sdk.config)==null?void 0:t.tracking)==null?void 0:i.analytics)==null?void 0:n.autoCollection)==null?void 0:s.activityDefinitions)||[]).filter(o=>o.triggerSettings&&o.triggerSettings.firingTriggers&&o.triggerSettings.firingTriggers.filter(c=>c.htmlElements&&c.htmlElements.length>0).length>0);this.sdk.debug.verbose("Activity definitions - bindEventHandlersForActivityDefinitions processing",{definitions:e});for(let o=0;o<e.length;o++){let c=e[o];if(this.isTriggersPassableForCurrentViewContext(c.triggerSettings,void 0,!0,c.id)&&!(!c.triggerSettings||!c.triggerSettings.firingTriggers)){this.sdk.debug.verbose("Activity definitions - "+c.id+" - processing binding definition",{definition:c});for(let d=0;d<c.triggerSettings.firingTriggers.length;d++){let l=c.triggerSettings.firingTriggers[d];if(!(!l||!l.htmlElements||l.htmlElements.length===0))for(let f=0;f<l.htmlElements.length;f++){let m=l.htmlElements[f];if(!m.locator||!m.eventTypes||m.eventTypes.length==0)continue;let g=r.getDocumentElementsFromLocator(m.locator);if(g.length===0){this.sdk.debug.verbose("Activity definitions - "+c.id+" - no elements found for locator",{locator:m.locator,definition:c});continue}this.sdk.debug.verbose("Activity definitions - "+c.id+" - elements found for locator",{locator:m.locator,htmlElements:g,definition:c});for(let y=0;y<g.length;y++){let I=g[y];if(I.tagName)for(let x=0;x<m.eventTypes.length;x++){let S=m.eventTypes[x],T=`${this.definitionListenerBindedToElementDataAttrPrefix}-${c.id}`;I.getAttribute(T)?this.sdk.debug.verbose("Activity definitions - "+c.id+" - element binding - already bound for "+S,{locator:m.locator,htmlElement:I,definition:c}):(S==="submit"?((a=I.tagName)==null?void 0:a.toUpperCase())==="FORM"?this.bindFormSubmit(I,c):this.sdk.debug.warn("Not binding submit to element that does not support it",{tagName:I.tagName,definition:c}):I.offsetParent===null?this.sdk.debug.verbose("Activity definitions - "+c.id+" - element binding - not binding to hidden element "+S,{locator:m.locator,htmlElement:I,definition:c}):I.addEventListener(S,C=>h(this,null,function*(){yield this.processCustomActivityDefinition(c,{eventType:C.type,target:C.currentTarget})}),!1),I.setAttribute(T,"binded"),this.sdk.debug.verbose("Activity definitions - "+c.id+" - element binding - bound for "+S,{locator:m.locator,htmlElement:I,definition:c}))}}}}}}this.sdk.debug.verbose("Activity definitions - bindEventHandlersForActivityDefinitions completed")}bindFormSubmit(e,t){let i=window.gform&&e.id&&e.id.startsWith("gform_")&&e.attributes["data-formid"],n=!1;if(i){let s=e.getAttribute("data-formid"),a=(o,c)=>h(this,null,function*(){if(this.sdk.debug.verbose("Listened to Gravity form submission",{gFormId:s,data:o,def:t,el:e,gFormVersion:c}),o.form.dataset.formid!==s||o.submissionType!==window.gform.submission.SUBMISSION_TYPE_SUBMIT)return o;this.sdk.debug.log("Handling Gravity form submission",{data:o,def:t,el:e,gFormVersion:c}),yield this.processCustomActivityDefinition(t,{eventType:"submit",target:e})});this.sdk.debug.verbose("Binding to Gravity form submission",{def:t,el:e,gFormId:s});try{window.gform.utils.addAsyncFilter?window.gform.utils.addAsyncFilter("gform/submission/pre_submission",o=>h(this,null,function*(){return yield a(o,"async"),o})):window.gform.addFilter("gform/submission/pre_submission",function(o){return a(o,"sync"),o}),n=!0}catch(o){this.sdk.debug.warn("Failed to bind to Gravity form submission event",{error:o})}}n||e.addEventListener("submit",s=>h(this,null,function*(){yield this.processCustomActivityDefinition(t,{eventType:s.type,target:e})}),!0)}static getValueFromWindowGlobal(e,t,i){if(!e)return null;let n=null;try{i==null||i.debug.verbose("Getting value from window global",{winGlobalRef:e});let s=it(window,e);typeof s=="function"?n=s():n=s}catch(s){i==null||i.debug.error("Failed to get value from window global",{error:s,winGlobalRef:e})}return t&&typeof n=="string"?en(n):n}static getParameterValueFromElement(e,t){if(!e)return null;let i=null;return(e.tagName==="SPAN"||e.tagName==="DIV"||e.tagName==="H1"||e.tagName==="H2"||e.tagName==="H3")&&(i=e.innerText),e.tagName==="INPUT"&&(i=e.value),e.tagName==="SELECT"&&(i=e.value),e.tagName==="TEXTAREA"&&(i=e.value),t?en(i):i}static getHtmlElementsFromTextMatchInfo(e,t,i,n,s,a){var d,l,f,m,g;let o="",c=n||"";switch(e.operator){case"equals":o=`${c}[${t}="${(d=e.matchValue)==null?void 0:d.trim()}"]`;break;case"contains":o=`${c}[${t}*="${(l=e.matchValue)==null?void 0:l.trim()}"]`;break;case"startsWith":o=`${c}[${t}^="${(f=e.matchValue)==null?void 0:f.trim()}"]`;break;case"endsWith":o=`${c}[${t}$="${(m=e.matchValue)==null?void 0:m.trim()}"]`;break;case"regEx":let y=new RegExp(((g=e.matchValue)==null?void 0:g.trim())||"");return Array.from(document.querySelectorAll(c||"*")).filter(I=>y.test(I.id));default:a?a==null||a.debug.warn(`Activity definitions - unsupported ${i} operator`,{textMatch:e}):console.warn(`Activity definitions - unsupported ${i} operator`,{textMatch:e});break}return o?s!=null?s.filter(y=>y.matches(o)):Array.from(document.querySelectorAll(o)):[]}static getDocumentElementsFromLocator(e,t){try{let i=null;e.elementIdMatch&&(i=r.getHtmlElementsFromTextMatchInfo(e.elementIdMatch,"id","elementIdMatch",null,i,t)),e.linkUrlMatch&&(i=r.getHtmlElementsFromTextMatchInfo(e.linkUrlMatch,"href","linkUrlMatch","a",i,t)),e.innerTextMatch&&e.elementTypes&&e.innerTextMatch.matchValue?e.innerTextMatch.operator?e.elementTypes.forEach(s=>{var a,o;if(e.innerTextMatch){let c=`${s}`,d=i!=null?i:Array.from(document.querySelectorAll(c)),l=(o=(a=e.innerTextMatch)==null?void 0:a.matchValue)==null?void 0:o.toLowerCase();switch(e.innerTextMatch.operator){case"equals":i=(i||[]).concat(Array.from(d).filter(m=>{var g,y;return l&&(((g=m.textContent)==null?void 0:g.trim().toLowerCase())===l||((y=m.value)==null?void 0:y.trim().toLowerCase())===l)}));break;case"contains":i=(i||[]).concat(Array.from(d).filter(m=>{var g,y;return l&&(((g=m.textContent)==null?void 0:g.includes(l))||((y=m.value)==null?void 0:y.includes(l)))}));break;case"startsWith":i=(i||[]).concat(Array.from(d).filter(m=>{var g,y;return l&&(((g=m.textContent)==null?void 0:g.startsWith(l))||((y=m.value)==null?void 0:y.startsWith(l)))}));break;case"endsWith":i=(i||[]).concat(Array.from(d).filter(m=>{var g,y;return l&&(((g=m.textContent)==null?void 0:g.endsWith(l))||((y=m.value)==null?void 0:y.endsWith(l)))}));break;case"regEx":let f=new RegExp(l||"");i=(i||[]).concat(Array.from(d).filter(m=>f.test(m.textContent||"")||f.test(m.value||"")));break;default:t?t==null||t.debug.warn("Activity definitions - unsupported innerTextMatch operator",{locator:e}):console.warn("Activity definitions - unsupported innerTextMatch operator",{locator:e});break}}}):t?t==null||t.debug.warn("Activity definitions - locator.innerTextMatch.operator is not set",{locator:e}):console.warn("Activity definitions - locator.innerTextMatch.operator is not set",{locator:e}):!e.linkUrlMatch&&!e.elementIdMatch&&!e.innerTextMatch&&e.elementTypes&&e.elementTypes.length>0&&e.elementTypes.forEach(s=>{let a=`${s}`;i!=null?i=i.filter(o=>o.matches(a)):i=(i||[]).concat(Array.from(document.querySelectorAll(a)))});let n=e.classNames&&e.classNames.length>0?e.classNames.filter(s=>!!s):[];if(n.length>0)if(e.elementTypes&&e.elementTypes.length>0)e.elementTypes.forEach(s=>{let a=`${s}.${n.join(".")}`;i!=null?i=i.filter(o=>o.matches(a)):i=(i||[]).concat(Array.from(document.querySelectorAll(a)))});else{let s=`.${n.join(".")}`;i!=null?i=i.filter(a=>a.matches(s)):i=(i||[]).concat(Array.from(document.querySelectorAll(s)))}return(i===null||i.length===0)&&t&&(t==null||t.debug.verbose("Activity definitions - no elements found for locator",{locator:e})),i||[]}catch(i){return t?t==null||t.debug.error("Activity definitions - getDocumentElementsFromLocator failed",{err:i,locator:e}):console.error("Activity definitions - getDocumentElementsFromLocator failed",i,e),[]}}processCustomActivityDefinitions(){return h(this,null,function*(){var t,i,n,s;let e=((s=(n=(i=(t=this.sdk.config)==null?void 0:t.tracking)==null?void 0:i.analytics)==null?void 0:n.autoCollection)==null?void 0:s.activityDefinitions)||[];e&&this.sdk.debug.verbose("Activity definitions - processing definitions",{definitions:e});for(let a=0;a<e.length;a++){let o=e[a];yield this.processCustomActivityDefinition(o)}})}processCustomActivityDefinition(e,t){return h(this,null,function*(){if(this.sdk.debug.verbose("Activity definitions - "+e.id+" - processing definition",{definition:e,eventInfo:t}),e.triggerSettings&&!this.isTriggersPassableForCurrentViewContext(e.triggerSettings,t,!1,e.id)){this.sdk.debug.verbose("Activity definitions - "+e.id+" - not handling - triggers not passable for current view context",{definition:e,eventInfo:t});return}this.sdk.debug.verbose("Activity definitions - "+e.id+" - handling definition",{definition:e,eventInfo:t});let i={};try{if((t==null?void 0:t.eventType)==="submit"||(t==null?void 0:t.eventType)==="click"){let a=t.target.tagName.toLowerCase()==="form"?t.target:this.getNParentElement(t.target,9,"form"),o=null;if(a)o=this.sdk.util.parse.parseFormToPersonDetails(a),o&&this.sdk.debug.verbose("Activity definitions - "+e.id+" - extracted identity from form",{form:a,definition:e,eventInfo:t});else{let d=this.getNParentElement(t.target,9,void 0);d&&(o=this.sdk.util.parse.parseFormToPersonDetails(d),o&&this.sdk.debug.verbose("Activity definitions - "+e.id+" - extracted identity from target element",{form:a,definition:e,eventInfo:t}))}if(o&&(o.email&&(i.email=[o.email]),o.phone&&(i.phone=[o.phone]),o.firstName?i.firstName=[o.firstName]:o.fullName&&(i.firstName=[o.fullName]),o.lastName&&(i.lastName=[o.lastName]),o.country||o.countryCode||o.state||o.stateCode||o.locality||o.postcode)){i.address=[];let d={};o.country&&(d.country=o.country),o.countryCode&&(d.countryCode=o.countryCode),o.state&&(d.state=o.state),o.stateCode&&(d.stateCode=o.stateCode),o.locality&&(d.locality=o.locality),o.postcode&&(d.postcode=o.postcode),i.address.push(d)}let c=this.setProfileConsentFieldsFromDefinition(e,i);(o||c)&&(yield this.sdk.identity.mergeProfile(i))}else this.setProfileConsentFieldsFromDefinition(e,i)&&(yield this.sdk.identity.mergeProfile(i));if(e.id&&(t==null?void 0:t.eventType)==="submit"){if(this.firedDefinitionIds.includes(e.id)){this.sdk.debug.warn("Not double firing activity definition",{definition:e,firedDefinitionIds:this.firedDefinitionIds});return}this.firedDefinitionIds.push(e.id)}let n=p({},e.activityParameters);e.activityNameCustom&&(n.activityNameCustom=e.activityNameCustom),this.setDynamicActivityParameterValues(n,{locatorElement:t==null?void 0:t.target});let s=this.getActivityParamsFromDynamic(e.activityName,n);yield this.sdk.track.activity(e.activityName,s,{sourceDefinition:e})}catch(n){this.sdk.debug.error("Activity definitions - "+e.id+" - failed to process definition",n)}})}getActivityParamsFromDynamic(e,t){var a,o;let i=p({},t),n=i.contentName||i.sourceContentName;n&&(i.contentName=n);let s=t;if(s){let c=s.contentId;c&&e=="viewContentItem"&&(i.identifiers=[c]);let d=s.productIdentifier,l=s.productName,f=this.sdk.util.parse.parseMoney(en((a=s.unitPrice||s.totalPrice)==null?void 0:a.toString()));(l||d)&&(e==="order"||e==="initiateCheckout"||e==="addPaymentMethod"||e==="oneTimeItemPurchase"||e==="subscriptionItemPurchase")&&(i.products||(i.products=[]),i.totalPrice=f,(o=i.products)==null||o.push({productIdentifier:d,productName:l,quantity:1,unitPrice:f})),f&&(e==="removeFromCart"||e==="addToCart"||e==="addToWishlist"||e==="viewProduct")&&(i.unitPrice=f)}return i}setProfileConsentFieldsFromDefinition(e,t){var s,a,o,c,d,l,f,m,g,y,I,x,S,T,M,C,P,w,L,U,G,$,D;let i=!1;t.consent||(t.consent={});let n=(e.activityNameCustom||e.activityName)+" on "+window.location.hostname;return(s=e.consentSettings)!=null&&s.analytics&&(t.consent.analytics||(t.consent.analytics={}),((a=e.consentSettings)==null?void 0:a.analytics.consentGranted)===!0?(t.consent.analytics.consentGrantedAt=new Date,t.consent.analytics.consentGrantedSourceName=((o=e.consentSettings)==null?void 0:o.analytics.consentSourceName)||n,i=!0):((c=e.consentSettings)==null?void 0:c.analytics.consentGranted)===!1&&(t.consent.analytics.consentNotGrantedAt=new Date,t.consent.analytics.consentNotGrantedSourceName=((d=e.consentSettings)==null?void 0:d.analytics.consentSourceName)||n,i=!0)),(l=e.consentSettings)!=null&&l.loyalty&&(t.consent.loyalty||(t.consent.loyalty={}),((f=e.consentSettings)==null?void 0:f.loyalty.consentGranted)===!0?(t.consent.loyalty.consentGrantedAt=new Date,t.consent.loyalty.consentGrantedSourceName=((m=e.consentSettings)==null?void 0:m.loyalty.consentSourceName)||n,i=!0):((g=e.consentSettings)==null?void 0:g.loyalty.consentGranted)===!1&&(t.consent.loyalty.consentNotGrantedAt=new Date,t.consent.loyalty.consentNotGrantedSourceName=((y=e.consentSettings)==null?void 0:y.loyalty.consentSourceName)||n,i=!0)),(I=e.consentSettings)!=null&&I.marketing&&(t.consent.marketing||(t.consent.marketing={}),(S=(x=e.consentSettings)==null?void 0:x.marketing)!=null&&S.sms&&(t.consent.marketing.sms||(t.consent.marketing.sms={}),((T=e.consentSettings)==null?void 0:T.marketing.sms.consentGranted)===!0?(t.consent.marketing.sms.consentGrantedAt=new Date,t.consent.marketing.sms.consentGrantedSourceName=((M=e.consentSettings)==null?void 0:M.marketing.sms.consentSourceName)||n,i=!0):((C=e.consentSettings)==null?void 0:C.marketing.sms.consentGranted)===!1&&(t.consent.marketing.sms.consentNotGrantedAt=new Date,t.consent.marketing.sms.consentNotGrantedSourceName=((P=e.consentSettings)==null?void 0:P.marketing.sms.consentSourceName)||n,i=!0)),(L=(w=e.consentSettings)==null?void 0:w.marketing)!=null&&L.email&&(t.consent.marketing.email||(t.consent.marketing.email={}),((U=e.consentSettings)==null?void 0:U.marketing.email.consentGranted)===!0?(t.consent.marketing.email.consentGrantedAt=new Date,t.consent.marketing.email.consentGrantedSourceName=((G=e.consentSettings)==null?void 0:G.marketing.email.consentSourceName)||n,i=!0):(($=e.consentSettings)==null?void 0:$.marketing.email.consentGranted)===!1&&(t.consent.marketing.email.consentNotGrantedAt=new Date,t.consent.marketing.email.consentNotGrantedSourceName=((D=e.consentSettings)==null?void 0:D.marketing.email.consentSourceName)||n,i=!0))),i&&this.sdk.debug.verbose("Activity definitions - "+e.id+" - setting consent fields",{definition:e,consent:t.consent}),i}setDynamicActivityParameterValues(e,t){Object.keys(e).forEach(i=>{(typeof e[i]=="string"||e[i]instanceof String)&&(e[i]=this.setDynamicActivityParameterValue(e[i],t,i)),typeof e[i]=="object"&&e[i]!==null&&this.setDynamicActivityParameterValues(e[i],t)})}setDynamicActivityParameterValue(e,t,i){if(!e.startsWith("{{"))return e;let n=e.replace(/{{/gi,"").replace(/}}/gi,"");if(this.sdk.debug.verbose("Activity definitions - setting dynamic parameter value",{paramValue:e,paramName:i,dynamicParam:n,dynamicParamSources:t}),n==="locatorElement.innerText"&&t.locatorElement)return t.locatorElement[n.split(".")[1]];if(n==="documentElement.title")return this.sdk.dataLayer.document.title()||"";if(n.indexOf("queryElement")===0){let s=n.substring(n.indexOf(":")+1),a=document.querySelectorAll(s);if(!a||a.length===0)return this.sdk.debug.warn("Dynamic parameter - did not find element for selector "+s,{paramValue:e,dynamicParamSources:t}),"";a.length>1&&this.sdk.debug.warn("Dynamic parameter - matched multiple elements for selector "+s,{paramValue:e,dynamicParamSources:t,matched:a});let o=i==="unitPrice"||i==="totalPrice"||i==="totalDiscounts"||i==="predictedValue",c=r.getParameterValueFromElement(a[0],o)||"";return c?this.sdk.debug.verbose("Dynamic parameter - matched element and got value "+n,{gotVal:c,paramValue:e,dynamicParamSources:t,el:a[0]}):this.sdk.debug.warn("Dynamic parameter - matched element but no value found for param "+n,{paramValue:e,dynamicParamSources:t,el:a[0]}),c}if(n.indexOf("windowGlobal")===0){let s=n.substring(n.indexOf(":")+1),a=i==="unitPrice"||i==="totalPrice"||i==="totalDiscounts"||i==="predictedValue",o=r.getValueFromWindowGlobal(s,a,this.sdk);return o?this.sdk.debug.verbose("Dynamic parameter - matched window global and got value "+n,{theVal:o,paramValue:e,winGlobalRef:s}):this.sdk.debug.warn("Dynamic parameter - no value found for window global param "+n,{paramValue:e,winGlobalRef:s}),o}return this.sdk.debug.warn("Dynamic parameter - cannot fill value for param "+n,{paramValue:e,dynamicParamSources:t}),""}isTriggersPassableForCurrentViewContext(e,t,i,n){let s=n?" - "+n:"";if(!e||!e.firingTriggers||e.firingTriggers.length===0||e.firingTriggersComparer==="undefined")return this.sdk.debug.verbose(`Activity definitions${s} - trigger group - FAIL - invalid config`,{triggerSettings:e,eventInfo:t}),!1;let a=this.sdk.debug.createTrackingSource("sdk/js/activity/trigger"),o=!0;for(let c=0;c<e.firingTriggers.length;c++){let d=e.firingTriggers[c];if(this.isTriggerPassableForCurrentViewContext(d,t,i,a,n)){if(e.firingTriggersComparer==="or")return!0}else o=!1}if(o){this.sdk.debug.verbose(`Activity definitions${s} - firingTriggers group - PASS`,{triggerSettings:e,eventInfo:t});let c=(e.blockingTriggers||[]).filter(d=>d.filters&&d.filters.length>0);if(c){let d=!1;for(let l=0;l<c.length;l++){let f=c[l];if(this.isTriggerPassableForCurrentViewContext(f,t,i,a,n)){if(e.blockingTriggersComparer==="or")return!1;d=!0}}if(d)return this.sdk.debug.verbose(`Activity definitions${s} - blockingTriggers group - FAIL`,{triggerSettings:e,eventInfo:t}),!1}return!0}return this.sdk.debug.verbose(`Activity definitions${s} - firingTriggers group - FAIL`,{triggerSettings:e,eventInfo:t}),!1}isTriggerPassableForCurrentViewContext(e,t,i,n,s){if(!e)return!1;let a=s?" - "+s:"";if(e.filters&&e.filters.length>0)if(xn(e.filters,e.comparer,n.loc,!0,this.sdk))this.sdk.debug.verbose(`Activity definitions${a} - trigger - PASS - filter matched`,{trigger:e,eventInfo:t,source:n});else return this.sdk.debug.verbose(`Activity definitions${a} - trigger - FAIL - filter not matched`,{trigger:e,eventInfo:t,source:n}),!1;if(e.htmlElements&&e.htmlElements.length>0){if(!i&&!t)return!i&&!t?(this.sdk.debug.verbose(`Activity definitions${a} - trigger - FAIL - origin not HTML event`,{trigger:e,eventInfo:t,source:n}),!1):(this.sdk.debug.verbose(`Activity definitions${a} - trigger - PASS - considering null event as pass`,{trigger:e,eventInfo:t,source:n}),!0);if(t)for(let o=0;o<e.htmlElements.length;o++){let c=e.htmlElements[o];this.isTriggerMatchedToHtmlElement(c,t)?this.sdk.debug.verbose(`Activity definitions${a} - trigger - PASS - HTML element event match`,{trigger:e,eventInfo:t,htmlElement:c,source:n}):this.sdk.debug.verbose(`Activity definitions${a} - trigger - FAIL - HTML element event match`,{trigger:e,eventInfo:t,htmlElement:c,source:n})}}return this.sdk.debug.verbose(`Activity definitions${a} - trigger - PASS`,{trigger:e,eventInfo:t,source:n}),!0}isTriggerMatchedToHtmlElement(e,t){return t&&e.eventTypes&&e.eventTypes.indexOf(t.eventType)>-1}getNParentElement(e,t,i){var o;this.sdk.debug.verbose("Activity definitions - get the n parent",{maxParentElementDepth:t,el:e});let n=null,s=0,a=e;for(;s<=t&&a.parentNode;){if(a=(a==null?void 0:a.parentNode)||null,i&&((o=a.tagName)==null?void 0:o.toUpperCase())===i.toUpperCase()||s===t){n=a;break}s++}return n?this.sdk.debug.verbose("Activity definitions - get parent n element found",{found:n,maxParentElementDepth:t,el:e}):this.sdk.debug.verbose("Activity definitions - get parent n element not found",{maxParentElementDepth:t,el:e}),n}};var En=(e=>(e.OnRouteChange="onRouteChange",e))(En||{}),Xs="seeka.mediate",Ku=!1,Ze=class r{constructor(e){u(this,"sdk");u(this,"definitionHelper");u(this,"windowPostMessageMediator");u(this,"disabledListeners");u(this,"viewLayoutChangedListenerBindedToElementDataAttr","data-sk-view-layout-binded");u(this,"onRouteChangePreCheck",e=>e.hostname!==window.location.hostname||this.sdk.util.url.sanitizeResourceUrl(e.pathname)===this.sdk.util.url.sanitizeResourceUrl(window.location.pathname)?!1:(window.Seeka||(window.Seeka={}),window.Seeka.context||(window.Seeka.context={}),window.Seeka.context.window||(window.Seeka.context.window={}),window.Seeka.context.window.location=e,!0));var t,i,n,s,a,o;this.sdk=e,this.definitionHelper=new Ye(this.sdk),this.disabledListeners=((a=(s=(n=(i=(t=window.Seeka)==null?void 0:t.context)==null?void 0:i.tracking)==null?void 0:n.processing)==null?void 0:s.hooks)==null?void 0:a.disabledListeners)||[],(o=this.sdk.config.tracking.processing)!=null&&o.mediateBrowserMethodsToWindowReference&&this.sdk.debug.verbose("Hooks - mediating browser methods to window reference",{ref:this.sdk.config.tracking.processing.mediateBrowserMethodsToWindowReference})}onRouteChange(e){return h(this,null,function*(){var i,n,s;if(this.sdk.debug.verbose("Hooks - onRouteChange",{newLocation:e}),e&&!this.onRouteChangePreCheck(e))return;let t=yield this.sdk.handlers.getViewContext();t&&this.sdk.handlers.setViewContext(t),(n=(i=this.sdk.config.tracking.analytics)==null?void 0:i.autoCollection)!=null&&n.activityNames&&((s=this.sdk.config.tracking.analytics)==null?void 0:s.autoCollection.activityNames.indexOf("viewPage"))>-1&&(yield this.sdk.track.viewPage()),yield this.onViewLayoutChange(),this.definitionHelper.firedDefinitionIds=[],yield this.definitionHelper.processCustomActivityDefinitions()})}onWindowLifeEnd(){return h(this,null,function*(){this.sdk.debug.verbose("Hooks - onWindowLifeEnd"),yield Promise.all([this.sdk.identity.flushIdentitySyncQueue(),this.sdk.convergeApi.ingest.flushQueueDebounced.flush()])})}onViewLayoutChange(){return h(this,null,function*(){yield this.definitionHelper.bindEventHandlersForActivityDefinitions(),document.querySelectorAll('a, button, input[type="button"]').forEach(e=>{try{e.getAttribute(this.viewLayoutChangedListenerBindedToElementDataAttr)||(e.setAttribute(this.viewLayoutChangedListenerBindedToElementDataAttr,"binded"),e.addEventListener("click",t=>{setTimeout(()=>h(this,null,function*(){yield this.onViewLayoutChange()}),3500)}))}catch(t){this.sdk.debug.error("Hooks - onPageReady - bind buttons failed",t)}})})}onPageReady(){return h(this,null,function*(){this.sdk.debug.verbose("Hooks - onPageReady"),typeof document!="undefined"&&document.addEventListener("gform/theme/scripts_loaded",()=>{this.onViewLayoutChange()}),window.addEventListener("message",t=>h(this,null,function*(){var i,n,s;if(t.origin&&t.origin.indexOf("stripe.com")>-1&&t.data){let a=null;try{a=JSON.parse(t.data)}catch(o){this.sdk.debug.verbose("Hooks - onPageReady - stripe message event failed to parse",{event:t,err:o})}if(a)try{a.message&&a.message.payload&&(a.message.payload.event==="ready"&&setTimeout(()=>this.onViewLayoutChange(),1250),a.message.payload.event==="change"&&a.message.payload.data&&a.message.payload.data.complete===!0&&((n=(i=this.sdk.config.tracking.analytics)==null?void 0:i.autoCollection)!=null&&n.activityNames&&this.sdk.config.tracking.analytics.autoCollection.activityNames.indexOf("addPaymentMethod")>-1?Ku?this.sdk.debug.verbose("Not firing add payment method due to stripe message as it has already fired"):(yield this.sdk.track.addPaymentMethod({paymentMethodName:(s=a.message.payload.data.value)==null?void 0:s.type}),Ku=!0,this.sdk.debug.verbose("Fired add payment method due to stripe message",{payload:a})):this.sdk.debug.verbose("Not firing add payment method due to stripe message as auto tracking not enabled",{payload:a})))}catch(o){this.sdk.debug.warn("Hooks - onPageReady - stripe message event failed to handle",{event:t,err:o})}}}));let e=yield this.sdk.handlers.getViewContext();e&&this.sdk.handlers.setViewContext(e),yield this.sdk.util.queue.startProcessingStandardMethods(),document.readyState==="complete"||document.readyState==="interactive"?setTimeout(()=>h(this,null,function*(){yield this.sdk.attribution.applyCrossDomainTrackingToDom()}),1):document.addEventListener("DOMContentLoaded",()=>h(this,null,function*(){yield this.sdk.attribution.applyCrossDomainTrackingToDom()})),this.onViewLayoutChange(),setTimeout(()=>this.onViewLayoutChange(),4e3)})}onViewContextSet(e){return h(this,null,function*(){this.sdk.debug.verbose("Hooks - onViewContextSet",e);let t=[];for(let i in this.sdk.lib.analytics.plugins){let n=this.sdk.lib.analytics.plugins[i];if(n.getPlugin){let s=n.getPlugin();s&&s.onViewContextSet&&t.push(s.onViewContextSet(e))}}yield Promise.all(t)})}onOrderSuccessPageView(){return h(this,null,function*(){let e=yield this.sdk.handlers.getCart();e?(this.sdk.debug.verbose("Hooks - onOrderSuccessPageView - auto collecting order activity."),yield this.sdk.track.order(e)):this.sdk.debug.warn("Hooks - onOrderSuccessPageView - cannot fire as handlers.getCart not implemented or returned an empty cart.")})}mediateWindowPostMessage(e){var t,i,n;if(this.windowPostMessageMediator||(t=this.sdk.config.tracking.processing)!=null&&t.mediateBrowserMethodsToWindowReference){let s=this.windowPostMessageMediator||((i=this.sdk.config.tracking.processing)!=null&&i.mediateBrowserMethodsToWindowReference?it(window,this.sdk.config.tracking.processing.mediateBrowserMethodsToWindowReference):void 0);if(s){this.sdk.debug.verbose("Hooks - mediating window post message",e);try{s(Xs,e),this.windowPostMessageMediator||(this.windowPostMessageMediator=s,this.sdk.debug.verbose("Hooks - stored reference to to post message mediator",{ref:(n=this.sdk.config.tracking.processing)==null?void 0:n.mediateBrowserMethodsToWindowReference}))}catch(a){this.sdk.debug.error("Hooks - Failed to mediate window post message",{err:a,payload:e})}}}}publishEvent(e,t){t||(t={}),t.scope={key:this.sdk.config.scopeKey,description:this.sdk.config.scopeDescription},r.publishEventGlobal(e,t),this.sdk.debug.verbose(`Hooks - published event converge.${e.toString()}`,{payload:{detail:t}})}static publishEventGlobal(e,t){let i="converge."+e.toString(),n=new CustomEvent(i,{detail:t});window.dispatchEvent(n),window.self!==window.top&&window.parent&&document&&document.referrer&&window.parent.postMessage({source:"seeka",eventName:i,detail:t},document.referrer)}};var Mn=class{constructor(){u(this,"retrieveActivityIdentifier")}},Ln=class{constructor(e){u(this,"sdk");u(this,"definitionHelper");u(this,"pageViewFiredForUrlCache",[]);this.sdk=e,this.definitionHelper=new Ye(this.sdk)}activityFirePreconditionCheck(e,t,i,n){return h(this,null,function*(){var s,a;if(this.sdk.config.isDisabled)return!1;if(!this.sdk.status.isInitialised||this.sdk.status.isIntialiseInFlight||!this.sdk.lib.analytics){this.sdk.debug.verbose("SDK not initialised so pushing tracking on queue",{activityName:e,activity:t,props:i});let o=null,c=[];switch(e){case"addPaymentMethod":o=this.sdk.track.addPaymentMethod,c=[t,i,n];break;case"addToWishlist":o=this.sdk.track.addToWishlist,c=[i,n];break;case"custom":o=this.sdk.track.custom,c=[t,i,n];break;case"startTrial":o=this.sdk.track.startTrial,c=[t,i,n];break;case"order":o=this.sdk.track.order,c=[t,i,n];break;case"subscriptionItemPurchase":o=this.sdk.track.subscriptionItemPurchase,c=[t,i,n];break;case"initiateCheckout":o=this.sdk.track.initiateCheckout,c=[t,i,n];break;case"addToCart":o=this.sdk.track.addToCart,c=[t,i,n];break;case"removeFromCart":o=this.sdk.track.removeFromCart,c=[t,i,n];break;case"viewProduct":o=this.sdk.track.viewProduct,c=[t,i,n];break;case"viewPage":o=this.sdk.track.viewPage,c=[i,n];break;case"applyPromotionalCode":o=this.sdk.track.applyPromotionalCode,c=[t,i,n];break;case"keywordSearch":o=this.sdk.track.keywordSearch,c=[t,i,n];break;case"userLoginSignup":o=this.sdk.track.userLoginSignup,c=[t,i,n];break;case"userLogin":o=this.sdk.track.userLogin,c=[t,i,n];break;case"newsletterSignup":o=this.sdk.track.newsletterSignup,c=[t,i,n];break;case"lead":o=this.sdk.track.lead,c=[t,i,n];break;case"contactMessage":o=this.sdk.track.contactMessage,c=[t,i,n];break;case"schedule":o=this.sdk.track.schedule,c=[t,i,n];break;case"viewContentItem":o=this.sdk.track.viewContentItem,c=[t,i,n];break}return o!=null?this.sdk.util.queue.addMethodCallToQueue(o,this.sdk.track,c,!0,!1):this.sdk.debug.warn("SDK not initialised and not able to push tracking to queue",{activityName:e,activity:t,props:i}),!1}if(e==="viewPage"){let o=((a=(s=this.sdk.dataLayer.window.location())==null?void 0:s.href)==null?void 0:a.split("#")[0])||"";if(o&&this.pageViewFiredForUrlCache.indexOf(o)>-1)return this.sdk.debug.verbose("Page view already fired for this URL so not firing again",{activityName:e,activity:t,props:i,scope:this.sdk.config.scopeKey}),!1;this.sdk.debug.verbose("Page view not fired, firing",{thisPageViewUrl:o,scope:this.sdk.config.scopeKey}),this.pageViewFiredForUrlCache.push(o)}return!0})}onBeforeActivityTrack(e,t,i,n){return h(this,null,function*(){let s=i||{};if(s.activityIdentifier||(s.activityIdentifier=yield this.retrieveActivityIdentifier(e,t,i),this.sdk.debug.verbose("ActivitySdk.onBeforeActivityTrack - automatically generated activity identifier as it was not provided in the activity",{activityName:e,activity:t,outputProps:s,originalProps:p({},i)})),(e=="addPaymentMethod"||e=="addToWishlist"||e=="initiateCheckout"||e=="oneTimeItemPurchase"||e=="subscriptionItemPurchase"||e=="order")&&(t||(t={}),t.products||(t.products=[]),t=this.sdk.util.sanitise.order(t),t.products.length===0)){let a=yield this.sdk.handlers.getCart();a&&(t=F(p(p({},t),a),{products:a.products}))}if(e=="addPaymentMethod"||e=="addToCart"||e=="addToWishlist"||e=="initiateCheckout"||e=="custom"||e=="lead"||e=="contactMessage"||e=="schedule"||e=="newsletterSignup"||e=="startTrial"||e=="oneTimeItemPurchase"||e=="order"||e=="removeFromCart"||e=="userLogin"||e=="userLoginSignup"){let a=yield this.sdk.handlers.getLoggedInUser();a&&(yield this.sdk.identity.mergeProfile(a))}return{activity:t,props:s,metadata:n}})}onAfterActivitySanitise(e,t,i,n){return h(this,null,function*(){let s=yield this.sdk.activity.validateActivityAndSetDefaults(e,t,i);i=s.props,t=s.activity,this.sdk.hooks.mediateWindowPostMessage({api:"track",method:e,params:[t,i,n]});let a=e=="custom"?{activityNameCustom:t}:p({},t),o=e=="custom"?F(p({},i),{activityNameCustom:t}):p({},i);return this.sdk.hooks.publishEvent("activity.tracked",{activityName:e,activity:a,props:o,metadata:n}),{activity:t,props:i,metadata:n}})}validateActivityAndSetDefaults(e,t,i,n){return h(this,null,function*(){var c;let s=i||{},a={activityName:e,provided:t?this.sdk.util.parse.cloneDeep(t):void 0,props:i,messages:[]},o=`Activity validation - ${e} -`;if(e=="order"){let d=t;if(!d)return this.sdk.debug.warn(`${o} activity properties not provided`,a),{activity:t,props:s,metadata:n};!d.orderIdentifier&&!d.orderNumber&&a.messages.push("orderIdentifier and orderNumber not provided when one is required")}if(e=="order"||e=="addPaymentMethod"||e=="initiateCheckout"){let d=t;if(!d)return this.sdk.debug.warn(`${o} order property not provided`,a),{activity:t,props:s,metadata:n};if(!d.products||d.products.length===0)a.messages.push("products array not provided");else for(let l=0;l<d.products.length;l++){let f=d.products[l],m=this.validateProductActivityAndSetDefaults(f,l,d.currencyCode,!0);if(d.products[l]=m.product,m.messages)for(let g in m.messages)Object.prototype.hasOwnProperty.call(m.messages,g)&&a.messages.push(m.messages[g])}d.currencyCode||((c=this.sdk.config.tracking.defaults)!=null&&c.currencyCode?(d.currencyCode=this.sdk.config.tracking.defaults.currencyCode,a.messages.push(`transaction currencyCode not provided so using default currency code ${this.sdk.config.tracking.defaults.currencyCode} in SDK config`)):a.messages.push("transaction currencyCode not provided and no default currency code set in SDK config")),d.totalPrice||(!d.products||d.products.length===0?a.messages.push("totalPrice not provided and could not calculate total due to no products being provided"):(d.totalPrice=this.sdk.util.parse.parseMoney(d.products.map(l=>(l.unitPrice||0)*(l.quantity||1)).reduce((l,f)=>l+f,0)),d.totalTax&&!isNaN(d.totalTax)&&(d.totalPrice+=this.sdk.util.parse.parseMoney(d.totalTax)),d.totalShippingPrice&&!isNaN(d.totalShippingPrice)&&(d.totalPrice+=this.sdk.util.parse.parseMoney(d.totalShippingPrice)),d.totalPrice=this.sdk.util.parse.parseMoney(d.totalPrice)))}if(e=="addPaymentMethod"){let d=t;if(!d)return this.sdk.debug.warn(`${o} order property not provided`,a),{activity:t,props:s,metadata:n};d.paymentMethodName||a.messages.push("paymentMethodName not provided")}if(e=="viewProduct"||e=="addToCart"||e=="removeFromCart"||e=="addToWishlist"){let d=t;if(!d)return this.sdk.debug.warn(`${o} product not provided`,a),{activity:t,props:s,metadata:n};let l=e=="addToCart"||e=="removeFromCart",f=this.validateProductActivityAndSetDefaults(d,void 0,void 0,l);if(t=f.product,f.messages)for(let m in f.messages)Object.prototype.hasOwnProperty.call(f.messages,m)&&a.messages.push(f.messages[m])}if(e=="applyPromotionalCode"){let d=t;d!=null&&d.code||a.messages.push("code not provided")}if(e=="keywordSearch"){let d=t;d!=null&&d.searchText||a.messages.push("searchText not provided")}if(e=="userLogin"||e=="userLoginSignup"||e=="newsletterSignup"){let d=t;if(!d)return this.sdk.debug.warn(`${o} activity properties not provided`,a),{activity:t,props:s,metadata:n};(!d.userAccountIdentifierValue&&d.userAccountIdentifierTypeName||d.userAccountIdentifierValue&&!d.userAccountIdentifierTypeName)&&a.messages.push("userAccountIdentifierValue and userAccountIdentifierTypeName should be provided together"),!d.userAccountIdentifierValue&&!d.userAccountIdentifierTypeName&&!d.emailAddress&&a.messages.push("either emailAddress or (userAccountIdentifierValue and userAccountIdentifierTypeName) was not provided")}return a.messages.length>0&&this.sdk.debug.warn(`${o} failed`,a),{activity:t,props:s,metadata:n}})}isActivityMatchedToFilter(e,t,i,n,s){return In(e,{activityName:i,activity:{},props:n,metadata:s},this.sdk.debug.createTrackingSource(`sdk/js/activity/${t}/track`))}validateProductActivityAndSetDefaults(e,t,i,n){var c;let s=[],a=t!=null?"product #"+(t+1)+" - ":"product ",o=e.type=="collection";return!o&&!e.currencyCode&&(i?e.currencyCode=i:(c=this.sdk.config.tracking.defaults)!=null&&c.currencyCode?(e.currencyCode=this.sdk.config.tracking.defaults.currencyCode,s.push(`${a}currencyCode not provided so using default currency code ${this.sdk.config.tracking.defaults.currencyCode} in SDK config`)):s.push(`${a}currencyCode not provided and no default currency code set in SDK config`)),!o&&(e.unitPrice===void 0||e.unitPrice===null)&&s.push(`${a}unitPrice not provided`),!o&&n&&(e.quantity===null||e.quantity===void 0?(s.push(`${a}quantity not provided. setting quantity to 1`),e.quantity=1):e.quantity<=0&&(s.push(`${a}quantity provided as less than or equal to 0. setting quantity to 1`),e.quantity=1)),!e.productName&&!e.variantName&&s.push(`${a}productName and variantName not provided but one is required`),!o&&!e.sku&&!e.productIdentifier&&!e.variantIdentifier&&s.push(`${a}sku, productIdentifier and variantIdentifier not provided but one is required`),{product:e,messages:s}}retrieveActivityIdentifier(e,t,i,n){return h(this,null,function*(){var s;if((s=this.sdk.config.activity)!=null&&s.retrieveActivityIdentifier){let a=yield this.sdk.config.activity.retrieveActivityIdentifier(e,t,i);if(!a)this.sdk.debug.warn("ActivitySdk.retrieveActivityIdentifier was called but returned an empty or null identifier. Will generate a random identifier.",{activityName:e,activity:t,props:i});else return a}return yield this.generateRandomActivityIdentifier(e,t,i)})}generateRandomActivityIdentifier(e,t,i){return h(this,null,function*(){let n=t==null?void 0:t.orderNumber;return n||(n=t==null?void 0:t.orderIdentifier),n?`${e}_${n}`:Vi()})}queueCollectionOfAutomaticActivities(){this.sdk.util.queue.addMethodCallToQueue(()=>h(this,null,function*(){var e,t,i;(t=(e=this.sdk.config.tracking.analytics)==null?void 0:e.autoCollection)!=null&&t.activityNames&&((i=this.sdk.config.tracking.analytics)==null?void 0:i.autoCollection.activityNames.indexOf("viewPage"))>-1&&(yield this.sdk.track.viewPage())}),this,[],!0,!1),this.sdk.util.queue.addMethodCallToQueue(()=>h(this,null,function*(){var e,t,i,n,s,a;!ie&&((e=this.sdk.config.tracking.analytics)!=null&&e.autoCollection)&&((t=this.sdk.config.tracking.analytics)!=null&&t.autoCollection.orderSuccessUrlPathMatchRegex)&&this.sdk.util.url.isUrlMatch(this.sdk.dataLayer.window.location().pathname,this.sdk.config.tracking.analytics.autoCollection.orderSuccessUrlPathMatchRegex)&&(this.sdk.debug.verbose("Order status page detected based on URL regex",(i=this.sdk.config.tracking.analytics)==null?void 0:i.autoCollection.orderSuccessUrlPathMatchRegex),(s=(n=this.sdk.config.tracking.analytics)==null?void 0:n.autoCollection)!=null&&s.activityNames&&((a=this.sdk.config.tracking.analytics)==null?void 0:a.autoCollection.activityNames.indexOf("order"))>-1&&(yield this.sdk.track.order()))}),this,[],!0,!1),this.sdk.util.queue.addMethodCallToQueue(()=>h(this,null,function*(){var e,t,i;if((t=(e=this.sdk.config.tracking.analytics)==null?void 0:e.autoCollection)!=null&&t.activityNames&&((i=this.sdk.config.tracking.analytics)==null?void 0:i.autoCollection.activityNames.indexOf("viewProduct"))>-1){let n=yield this.sdk.handlers.getCurrentProduct();n&&(yield this.sdk.track.viewProduct(n))}}),this,[],!0,!1),this.sdk.util.queue.addMethodCallToQueue(()=>h(this,null,function*(){var e,t,i;if((t=(e=this.sdk.config.tracking.analytics)==null?void 0:e.autoCollection)!=null&&t.activityNames&&((i=this.sdk.config.tracking.analytics)==null?void 0:i.autoCollection.activityNames.indexOf("keywordSearch"))>-1){let n=yield this.sdk.handlers.getCurrentSearchContext();if(n&&n.searchText)yield this.sdk.track.keywordSearch(n);else if(!ie){let s=this.sdk.config.tracking.analytics.autoCollection.keywordSearchQueryParamName||"q",a=this.sdk.util.url.getParamFromQueryString(s,this.sdk.dataLayer.window.location().href);a&&(yield this.sdk.track.keywordSearch({searchText:a}))}}}),this,[],!0,!1),this.sdk.util.queue.addMethodCallToQueue(()=>h(this,null,function*(){yield this.definitionHelper.processCustomActivityDefinitions()}),this,[],!0,!1)}};var On=class{constructor(e){u(this,"sdk");u(this,"stateKeyPrefix","attr.");u(this,"stateKeys",{lastTouchCampaign:"camp.last"});this.sdk=e}addCrossDomainTracking(e,t){if(ie||!this.sdk||!e||!e.startsWith("https://")&&!e.startsWith("http://"))return e;let i=e+"";if(this.sdk.identity&&this.sdk.identity.personId&&(i.includes("sk.pid")||(i=`${i}${i.includes("?")?"&":"?"}sk.pid=${this.sdk.identity.personId}`),i.includes("sk.sid")||(i=`${i}${i.includes("?")?"&":"?"}sk.sid=${this.sdk.identity.touchAndGetSessionId()}`)),t&&t!=="none"){if(i.includes("utm_"))this.sdk.debug.verbose("Attribution.addCrossDomainTracking.utmParamsAlreadyPresent",{url:i});else if(t==="urlPassthrough"){let n=this.getCurrentTouchCampaign();n&&(i=this.addUtmTrackingToUrl(i,n),this.sdk.debug.verbose("Attribution.addCrossDomainTracking.utmParamsAdded."+t,{url:i,utmParams:n,utmBehavior:t}))}else if(t==="sessionPassthrough"){let n=this.getLastTouchCampaign();n&&(i=this.addUtmTrackingToUrl(i,n),this.sdk.debug.verbose("Attribution.addCrossDomainTracking.utmParamsAdded."+t,{url:i,utmParams:n,utmBehavior:t}))}}return(this.sdk.config.plugins||[]).forEach(n=>{if(n){if(n.addCrossDomainTrackingQuery)try{let s=n.addCrossDomainTrackingQuery();s&&s.forEach((a,o)=>{o&&!i.includes(`${o}=`)&&(i=`${i}${i.includes("?")?"&":"?"}${o}=${a}`)})}catch(s){this.sdk.debug.error("Attribution.addCrossDomainTrackingQuery.pluginError",{plugin:n,error:s})}if(n.addCrossDomainTracking)try{i=n.addCrossDomainTracking(i)}catch(s){this.sdk.debug.error("Attribution.addCrossDomainTracking.pluginError",{plugin:n,error:s})}}}),i}addUtmTrackingToUrl(e,t){if(!e||!t)return e;let i=e+"";return t.id&&(i=`${i}${i.includes("?")?"&":"?"}utm_id=${t.id}`),t.content&&(i=`${i}${i.includes("?")?"&":"?"}utm_content=${t.content}`),t.source&&(i=`${i}${i.includes("?")?"&":"?"}utm_source=${t.source}`),t.campaign&&(i=`${i}${i.includes("?")?"&":"?"}utm_campaign=${t.campaign}`),t.term&&(i=`${i}${i.includes("?")?"&":"?"}utm_term=${t.term}`),t.medium&&(i=`${i}${i.includes("?")?"&":"?"}utm_medium=${t.medium}`),i}getCurrentTouchCampaign(){if(ie)return;let e=this.sdk.dataLayer.window.location(),t=this.sdk.util.url.getParamFromQueryString("utm_id",e.href),i=this.sdk.util.url.getParamFromQueryString("utm_content",e.href),n=this.sdk.util.url.getParamFromQueryString("utm_source",e.href)||this.sdk.util.url.getParamFromQueryString("source",e.href),s=this.sdk.util.url.getParamFromQueryString("utm_campaign",e.href)||this.sdk.util.url.getParamFromQueryString("campaign",e.href),a=this.sdk.util.url.getParamFromQueryString("utm_term",e.href)||this.sdk.util.url.getParamFromQueryString("term",e.href),o=this.sdk.util.url.getParamFromQueryString("utm_medium",e.href)||this.sdk.util.url.getParamFromQueryString("medium",e.href),c=this.sdk.util.url.getParamFromQueryString("fbclid",e.href);if(t||(t=this.sdk.util.url.getParamFromQueryString("campaign_id",e.href)),i||(i=this.sdk.util.url.getParamFromQueryString("ad_name",e.href)),n||(n=this.sdk.util.url.getParamFromQueryString("placement",e.href)),s||(s=this.sdk.util.url.getParamFromQueryString("campaign_name",e.href)),t||i||n||s||a||o)return!o&&c&&(o="cpc"),!n&&c&&(n="fb"),{id:t,content:i,source:n,campaign:s,term:a,medium:o}}setLastTouchCampaign(e){let t=this.getLastTouchCampaign();!this.isCampaignDataEqual(t,e)?(this.sdk.state.set(this.stateKeyPrefix+this.stateKeys.lastTouchCampaign,e),this.sdk.debug.verbose("Attribution.setLastTouchCampaign.wasChanged",{key:this.stateKeyPrefix+this.stateKeys.lastTouchCampaign,value:e})):this.sdk.debug.verbose("Attribution.setLastTouchCampaign.unchanged",{key:this.stateKeyPrefix+this.stateKeys.lastTouchCampaign,value:e})}getLastTouchCampaign(){return this.sdk.state.get(this.stateKeyPrefix+this.stateKeys.lastTouchCampaign)}isCampaignDataEqual(e,t){if(!e&&!t)return!0;let i=!e;return e&&((e.id!==(t==null?void 0:t.id)||!e.id&&(t!=null&&t.id))&&(i=!0),(e.content!==(t==null?void 0:t.content)||!e.content&&(t!=null&&t.content))&&(i=!0),(e.source!==(t==null?void 0:t.source)||!e.source&&(t!=null&&t.source))&&(i=!0),(e.campaign!==(t==null?void 0:t.campaign)||!e.campaign&&(t!=null&&t.campaign))&&(i=!0),(e.term!==(t==null?void 0:t.term)||!e.term&&(t!=null&&t.term))&&(i=!0),(e.medium!==(t==null?void 0:t.medium)||!e.medium&&(t!=null&&t.medium))&&(i=!0)),!i}applyCrossDomainTrackingToDom(){return h(this,null,function*(){var e,t;try{let i=((t=(e=this.sdk.config.tracking.analytics)==null?void 0:e.crossDomain)==null?void 0:t.rules)||[];if(!i||i.length===0)return;let n=this.sdk.dataLayer.window.location();if(!n||!n.hostname)return;let s=at(n.href,!1),a=at(n.href,!0);yield Promise.all(i.map(o=>h(this,null,function*(){if(!o||!o.sourceHostname||!o.destinationLink||!o.destinationLink.matchValue||!o.destinationLink.operator)return;if(!ze(o.sourceHostname,s,this.sdk)&&!ze(o.sourceHostname,a,this.sdk)){this.sdk.debug.verbose("Attribution.applyCrossDomainTracking.sourceHostname.noMatch",{rule:o,sourceDomain:s});return}let c={elementTypes:["a"],linkUrlMatch:o.destinationLink};this.sdk.debug.verbose("Attribution.applyCrossDomainTracking.sourceHostname.match",{rule:o,sourceDomain:s,locator:c});let d=Ye.getDocumentElementsFromLocator(c,this.sdk);if(!d||d.length===0){this.sdk.debug.verbose("Attribution.applyCrossDomainTracking.destinationLink.match.noLinks",{rule:o,sourceDomain:s,locator:c});return}else this.sdk.debug.verbose("Attribution.applyCrossDomainTracking.destinationLink.match.foundLinks",{rule:o,sourceDomain:s,locator:c,links:d}),d.forEach(l=>{var m,g;let f=(m=l.attributes.getNamedItem("data-sk-link-xdomain"))==null?void 0:m.value;if(f){this.sdk.debug.verbose("Attribution.applyCrossDomainTracking.destinationLink.match.alreadyAdded",{href:l.href,ruleId:f});return}if(l.href){let y=l.href+"";l.href=this.addCrossDomainTracking(l.href,(g=o.utm)==null?void 0:g.behavior),l.setAttribute("data-sk-link-xdomain",o.id||"no-id"),this.sdk.debug.verbose("Attribution.applyCrossDomainTracking.destinationLink.match.foundLinks.addedTracking",{rule:o,sourceDomain:s,locator:c,link:l,before:y,after:l.href})}})})))}catch(i){this.sdk.debug.error("Attribution.applyCrossDomainTracking.error",{error:i})}})}};var jt=class{constructor(){u(this,"window",{location:()=>{var e,t,i;return ie?void 0:((i=(t=(e=window.Seeka)==null?void 0:e.context)==null?void 0:t.window)==null?void 0:i.location)||window.location},localStorage:()=>{var e,t,i;return ie?void 0:((i=(t=(e=window.Seeka)==null?void 0:e.context)==null?void 0:t.window)==null?void 0:i.localStorage)||window.localStorage},sessionStorage:()=>{var e,t,i;return ie?void 0:((i=(t=(e=window.Seeka)==null?void 0:e.context)==null?void 0:t.window)==null?void 0:i.sessionStorage)||window.sessionStorage}});u(this,"document",{referrer:()=>{var e,t,i;return ie?void 0:((i=(t=(e=window.Seeka)==null?void 0:e.context)==null?void 0:t.document)==null?void 0:i.referrer)||document.referrer},title:()=>{var e,t,i;return ie?void 0:((i=(t=(e=window.Seeka)==null?void 0:e.context)==null?void 0:t.document)==null?void 0:i.title)||document.title}});u(this,"navigator",{userAgent:()=>{var e,t,i;return ie?void 0:((i=(t=(e=window.Seeka)==null?void 0:e.context)==null?void 0:t.navigator)==null?void 0:i.userAgent)||navigator.userAgent},language:()=>{var e,t,i;return ie?void 0:((i=(t=(e=window.Seeka)==null?void 0:e.context)==null?void 0:t.navigator)==null?void 0:i.language)||navigator.language}})}};var xi=class{constructor(){u(this,"getCart");u(this,"getCurrentProduct");u(this,"getLoggedInUser");u(this,"getViewContext");u(this,"getCurrentSearchContext");u(this,"getCurrentConsent")}},Nn=class{constructor(e){u(this,"sdk");u(this,"viewContext");this.sdk=e}getCart(){return h(this,null,function*(){var e;if(window.Seeka&&window.Seeka.context&&window.Seeka.context.cart)return window.Seeka.context.cart;if((e=this.sdk.config.handlers)!=null&&e.getCart){let t=yield this.sdk.config.handlers.getCart();if(t)return this.sdk.debug.verbose("HandlersSdk.getCart",t),t;this.sdk.debug.verbose("HandlersSdk.getCart","produced an empty result")}else this.sdk.debug.verbose("HandlersSdk.getCart","was called but is not defined on ConvergeSdkConfiguration.HandlersSdkConfiguration and data layer empty")})}getCurrentProduct(){return h(this,null,function*(){var e;if(window.Seeka&&window.Seeka.context&&window.Seeka.context.product)return window.Seeka.context.product;if((e=this.sdk.config.handlers)!=null&&e.getCurrentProduct){let t=yield this.sdk.config.handlers.getCurrentProduct();if(t)return this.sdk.debug.verbose("HandlersSdk.getCurrentProduct",t),t;this.sdk.debug.verbose("HandlersSdk.getCurrentProduct","produced an empty result")}else this.sdk.debug.verbose("HandlersSdk.getCurrentProduct","was called but is not defined on ConvergeSdkConfiguration.HandlersSdkConfiguration and data layer empty")})}getCurrentSearchContext(){return h(this,null,function*(){var e;if(window.Seeka&&window.Seeka.context&&window.Seeka.context.search)return window.Seeka.context.search;if((e=this.sdk.config.handlers)!=null&&e.getCurrentSearchContext){let t=yield this.sdk.config.handlers.getCurrentSearchContext();if(t)return this.sdk.debug.verbose("HandlersSdk.getCurrentSearchContext",t),t;this.sdk.debug.verbose("HandlersSdk.getCurrentSearchContext","produced an empty result")}})}getLoggedInUser(){return h(this,null,function*(){var e;if(window.Seeka&&window.Seeka.context&&window.Seeka.context.user)return window.Seeka.context.user;if((e=this.sdk.config.handlers)!=null&&e.getLoggedInUser){let t=yield this.sdk.config.handlers.getLoggedInUser();if(t)return this.sdk.debug.verbose("HandlersSdk.getLoggedInUser",t),t;this.sdk.debug.verbose("HandlersSdk.getLoggedInUser","produced an empty result")}else this.sdk.debug.verbose("HandlersSdk.getLoggedInUser","was called but is not defined on ConvergeSdkConfiguration.HandlersSdkConfiguration")})}getViewContext(){return h(this,null,function*(){var e;if((e=this.sdk.config.handlers)!=null&&e.getViewContext){let t=yield this.sdk.config.handlers.getViewContext();if(t)return this.sdk.debug.verbose("HandlersSdk.getViewContext",t),t;this.sdk.debug.verbose("HandlersSdk.getViewContext","produced an empty result")}else{if(this.viewContext)return this.viewContext;this.sdk.debug.verbose("HandlersSdk.getViewContext","was called but is not defined on ConvergeSdkConfiguration.HandlersSdkConfiguration and HandlersSdk.setViewContext was not previously called.")}})}setViewContext(e){this.viewContext=e,this.sdk.hooks.onViewContextSet(e)}};var Ue={browserId:"bId",personId:"pId",sessionId:"sId",sessionLastTouch:"sIdTouch",audienceMemberId:"aMId"},be="id.",Ai="id.trait.",eo=r=>{let e=Yr(r),t=li();return`${e}.${t}`},to=r=>{if(!r)return!1;let e=r.split(".");return!(e.length!=4||e[0]!="sk"||e[1]!="1"||Number.isNaN(Number(e[2]))||Number.isNaN(Number(e[3])))},Ju=(r,e,t,i,n,s,a,o)=>{var y,I,x;io(i,t,s,a,r);let c=i.get(be+Ue.browserId,"org");if((!c||c.length===0)&&(c=e.seekaBId||null),!c){let S=n.getSeekaOrgCookie("sk_bid");if(S)try{c=JSON.parse(S)}catch(T){a("Failed to parse seekaBId cookie",T)}}let d=null;r&&(d=Ie("skpid",r)||Ie("sk.pid",r),d&&(to(d)?s("Using provided person ID as per query string parameter sk.pid",{urlProvidedPersonId:d}):(d=null,o("Not using provided person ID as per query string parameter sk.pid as it is not formatted correctly",{urlProvidedPersonId:d}))));let l=d||i.get(be+Ue.personId,"org")||n.getSeekaOrgCookie("sk_pid")||((x=(I=(y=window.Seeka)==null?void 0:y.context)==null?void 0:I.user)==null?void 0:x.seekaPId)||e.seekaPId;l||(l=e.seekaPId);let f=!1,m=!1;if(c&&c.length>0&&s("Using previously assigned seekaBId",c),l&&s("Using previously assigned seekaPId",l),l&&(!c||c.length==0)&&(c=[l],f=!0,s("Assigned seekaBId from seekaPId")),!l&&c&&c.length>0&&(l=tn(c),m=!0,s("Assigned seekaPId from earliest seekaBId")),!l){let S=Xr();s("Assigned new seekaPId",S),l=S,m=!0}(!c||c.length==0)&&(c=[l],f=!0,s("Assigned seekaBId from new seekaPId",l)),f&&(e.seekaBId=c),m&&(e.seekaPId=l),ro(e,i,n,s),e.seekaBId=c,e.seekaPId=l;let g={personId:l,browserId:c,newIdentifiers:e};return s("Using identifiers",e),g},io=(r,e,t,i,n)=>{var s,a;try{let o=n?Ie("sk.sid",n):null;o&&r.set(be+Ue.sessionId,o,"global");let c=o||r.get(be+Ue.sessionId,"global")||((a=(s=window.Seeka)==null?void 0:s.context)==null?void 0:a.sess)||null,d=r.get(be+Ue.sessionLastTouch,"global"),l=d?new Date(d):new Date,f=!1;if(c&&l!=null){let m=e||1800,g=Zr(c),y=new Date(new Date(l).setSeconds(l.getSeconds()+m));l!=null&&y<=new Date?(t("Identity.session.touchAndGetSessionId.sessionTimedOut",{maxSecondsForSession:m,currentSessionLastTouched:l,currentSessionCreatedAt:g,currentSessionTimeOutAt:y,currentSessionId:c}),f=!0):t("Identity.session.touchAndGetSessionId.useExistingSession",{maxSecondsForSession:m,currentSessionLastTouched:l,currentSessionCreatedAt:g,currentSessionTimeOutAt:y,currentSessionId:c})}else c||(f=!0);if(f){let m=eo(new Date);r.set(be+Ue.sessionId,m,"global"),t("Identity.session.touchAndGetSessionId.sessionCreated",{currentSessionId:c,newSessionId:m,currentSessionLastTouched:l}),c=m}return r.set(be+Ue.sessionLastTouch,new Date().toISOString(),"global"),c}catch(o){return i("Identity.session.touchAndGetSessionId failed",o),""}},ro=(r,e,t,i)=>{r.seekaBId&&(e.set(be+Ue.browserId,r.seekaBId,"org"),t.setSeekaOrg("sk_bid",JSON.stringify(r.seekaBId),void 0),i("Identity.setStatePersistedIdentifiers.seekaBId",{key:be+Ue.browserId,value:r.seekaBId})),r.seekaPId&&(e.set(be+Ue.personId,r.seekaPId,"org"),t.setSeekaOrg("sk_pid",r.seekaPId,void 0),i("Identity.setStatePersistedIdentifiers.seekaPId",{key:be+Ue.browserId,value:r.seekaPId}))};var Ci={measureAdvertisingPerformance:7};var Rn=class{constructor(e){u(this,"sdk");u(this,"identifiers");u(this,"profileChangeCounter",0);u(this,"device",{});u(this,"personId");u(this,"flushIdentitySyncQueue",()=>h(this,null,function*(){yield this.syncIdentityDebounced.flush()}));u(this,"syncIdentityDebounced",Ni(()=>h(this,null,function*(){yield this.syncIdentity("sdk/js/profile/change")}),1500,{maxWait:1500}));var t,i,n,s,a,o;this.sdk=e,(i=(t=window.Seeka)==null?void 0:t.context)!=null&&i.user&&this.sdk.debug.verbose("Identity - Initialising from window.Seeka.context.user",window.Seeka.context.user),this.identifiers=(s=(n=window.Seeka)==null?void 0:n.context)!=null&&s.user?p({},(o=(a=window.Seeka)==null?void 0:a.context)==null?void 0:o.user):{},this.ensureTraitsNotNull()}isValidSeekaPersonId(e){return to(e)}getOrAssign(){var i,n,s,a;let e=(s=(n=(i=this.sdk.config.tracking)==null?void 0:i.analytics)==null?void 0:n.identity)==null?void 0:s.userSessionTimeoutSeconds,t=Ju((a=this.sdk.dataLayer.window.location())==null?void 0:a.href,this.identifiers,e,this.sdk.state,this.sdk.util.cookie,(o,c)=>this.sdk.debug.verbose(o,c),(o,c)=>this.sdk.debug.error(o,c),(o,c)=>this.sdk.debug.warn(o,c));return this.identifiers=p({},t.newIdentifiers),this.personId=this.identifiers.seekaPId,{personId:t.personId,browserId:t.browserId}}reset(e){return h(this,null,function*(){if(this.identifiers={},this.personId=void 0,this.ensureTraitsNotNull(),e===!0){this.sdk.state.removeByPrefix(be,"instance"),this.sdk.state.removeByPrefix(Ai,"instance"),this.sdk.state.removeByPrefix(be,"global"),this.sdk.state.removeByPrefix(Ai,"global"),this.sdk.state.removeByPrefix(be,"org"),this.sdk.state.removeByPrefix(Ai,"org");try{this.sdk.util.cookie.setSeekaOrg("sk_pid","",-1),this.sdk.util.cookie.setSeekaOrg("sk_bid","",-1)}catch(t){this.sdk.debug.error("Identity.reset failed to remove cookie",t)}}this.sdk.debug.verbose("Identity.reset",{resetStorage:e}),yield this.onProfileChanged()})}getTrait(e){return h(this,null,function*(){this.ensureTraitsNotNull();let t=this.sdk.state.get(Ai+e,"org")||[],i=this.sdk.util.parse.getNestedProperty(this.identifiers.traits,e);i&&Array.isArray(i)&&i.length>0&&(t=t.concat(i));let n=t&&t.length>0?t.filter(s=>s&&!0):null;return this.sdk.debug.verbose("Identity.getTrait."+e,n),n})}addTrait(e,t,i){return h(this,null,function*(){this.ensureTraitsNotNull();let n=(yield this.getTrait(e))||[],s=[].concat(n);s.push(t),this.sdk.debug.verbose("Identity.addTrait."+e,{before:n,new:s}),yield this.setTrait(e,s,i)})}setTrait(e,t,i){return h(this,null,function*(){this.ensureTraitsNotNull();let n=p({},this.identifiers);this.identifiers.traits=this.sdk.util.parse.setNestedProperty(this.identifiers.traits,e,t),i&&this.sdk.state.set(Ai+e,t,"org"),this.sdk.util.parse.isDeepEqual(n,this.identifiers)?this.sdk.debug.verbose("Identity.setTrait profile was not changed",this.identifiers):(this.sdk.debug.verbose("Identity.setTrait."+e,t),yield this.onProfileChanged())})}getProfile(){return this.sdk.debug.verbose("Identity.getProfile",this.identifiers),this.sanitiseProfile(this.identifiers)}setProfile(e){return h(this,null,function*(){try{let t=p({},this.identifiers);e=this.sanitiseProfile(e),this.identifiers=p({},e),this.personId=this.identifiers.seekaPId,this.ensureTraitsNotNull(),this.getOrAssign(),yield this.onProfileSet("setProfile",t,this.identifiers)}catch(t){this.sdk.debug.error("Identity.setProfile failed",t)}})}mergeTwoProfiles(e,t){let i=this.sanitiseProfile(Rt(e)),n=this.sanitiseProfile(Rt(t)),s=this.sdk.util.parse.mergeDeep(i,n);return s.shopify=this.sdk.util.parse.mergeDeep(i.shopify||{},n.shopify||{}),s.magento=this.sdk.util.parse.mergeDeep(i.magento||{},n.magento||{}),s.facebook=this.sdk.util.parse.mergeDeep(i.facebook||{},n.facebook||{}),s.snapchat=this.sdk.util.parse.mergeDeep(i.snapchat||{},n.snapchat||{}),s.tiktok=this.sdk.util.parse.mergeDeep(i.tiktok||{},n.tiktok||{}),s.google=this.sdk.util.parse.mergeDeep(i.google||{},n.google||{}),s.wooCommerce=this.sdk.util.parse.mergeDeep(i.wooCommerce||{},n.wooCommerce||{}),s.bigCommerce=this.sdk.util.parse.mergeDeep(i.bigCommerce||{},n.bigCommerce||{}),s.address=this.sdk.util.parse.mergeDeep(i.address||[],n.address||[]),s.consent=this.sdk.util.parse.mergeDeep(i.consent||{},n.consent||{}),s.seekaBId=ci([...e.seekaBId||[],...t.seekaBId||[],e.seekaPId||"",t.seekaPId||""].filter(Boolean)).filter(a=>a!==s.seekaPId),s.traits=p(p({},i.traits),n.traits),p({},this.sanitiseProfile(s))}mergeProfile(e){return h(this,null,function*(){try{let t=Rt(p({},this.identifiers));this.identifiers=this.mergeTwoProfiles(this.identifiers,e),this.personId=this.identifiers.seekaPId,this.ensureTraitsNotNull(),yield this.onProfileSet("mergeProfile",t,this.identifiers)}catch(t){this.sdk.debug.error("Identity.mergeProfile failed",t)}})}onProfileSet(e,t,i){return h(this,null,function*(){this.personId=i.seekaPId,this.sdk.util.parse.isDeepEqual(t,i)?this.sdk.debug.verbose(`Identity.${e} identity was not changed`,i):(this.sdk.debug.log(`Identity.${e} caused identity to change`,{previous:t,newlySet:i}),this.setStatePersistedIdentifiers(i),this.sdk.hooks.mediateWindowPostMessage({api:"identity",method:"mergeProfile",params:[i]}),yield this.onProfileChanged())})}setStatePersistedIdentifiers(e){ro(e,this.sdk.state,this.sdk.util.cookie,(t,i)=>this.sdk.debug.verbose(t,i))}isAnonymous(e){return e?!(e.email&&e.email.length>0&&e.email[0]||e.phone&&e.phone.length>0&&e.phone[0]||e.firstName&&e.firstName.length>0&&e.firstName[0]||e.lastName&&e.lastName.length>0&&e.lastName[0]||e.address&&e.address.length>0&&e.address[0]&&e.address[0].addressLine1):!0}syncIdentity(e){return h(this,null,function*(){var i,n,s,a,o,c,d,l,f,m,g,y,I,x,S,T,M,C,P,w,L,U,G,$,D,z,re,Z,N,se,ae,ft,v,k,E,V,j,q,ce;let t=!0;if(this.sdk.config.enablement&&(this.sdk.config.enablement==="browserOnlyDueToBillingFailure"||this.sdk.config.enablement==="noFeaturesEnabledDueToBillingFailure"||this.sdk.config.enablement==="noFeaturesEnabledDueToNoCurrentPlan"?(this.sdk.debug.warn("Billing - Restricted so not syncing identity from Seeka API"),t=!1):this.sdk.config.enablement==="browserOnlyDueToCurrentPlan"&&(this.sdk.debug.verbose("Billing - Browser only plan so not syncing identity from Seeka API"),t=!1)),t&&!((n=(i=this.sdk.config.tracking)==null?void 0:i.processing)!=null&&n.isIdentityDisabled)&&!this.sdk.config.isDisabled){let K={logMetadata:{stream:!0,traits:{}}};try{K={logMetadata:{stream:!0,traits:{email:!!((s=this.identifiers.email)!=null&&s.length),phone:!!((a=this.identifiers.phone)!=null&&a.length),firstName:!!((o=this.identifiers.firstName)!=null&&o.length),lastName:!!((c=this.identifiers.lastName)!=null&&c.length),facebook:{fbp:!!((l=(d=this.identifiers.facebook)==null?void 0:d.fbp)!=null&&l.length),fbc:!!((m=(f=this.identifiers.facebook)==null?void 0:f.fbc)!=null&&m.length),lead:!!((y=(g=this.identifiers.facebook)==null?void 0:g.lead)!=null&&y.length)},snapchat:{scid:!!((x=(I=this.identifiers.snapchat)==null?void 0:I.scid)!=null&&x.length),sccid:!!((T=(S=this.identifiers.snapchat)==null?void 0:S.sccid)!=null&&T.length)},tiktok:{ttclid:!!((C=(M=this.identifiers.tiktok)==null?void 0:M.ttclid)!=null&&C.length),ttp:!!((w=(P=this.identifiers.tiktok)==null?void 0:P.ttp)!=null&&w.length),lead:!!((U=(L=this.identifiers.tiktok)==null?void 0:L.lead)!=null&&U.length)},google:{gclid:!!(($=(G=this.identifiers.google)==null?void 0:G.gclid)!=null&&$.length),clientId:!!((z=(D=this.identifiers.google)==null?void 0:D.userClientId)!=null&&z.length)},consent:{marketing:{sms:!!(this.identifiers.consent&&this.identifiers.consent.marketing&&this.identifiers.consent.marketing.sms&&((Z=(re=this.identifiers.consent.marketing)==null?void 0:re.sms)!=null&&Z.consentGrantedAt||(se=(N=this.identifiers.consent.marketing)==null?void 0:N.sms)!=null&&se.consentNotGrantedAt)),email:!!(this.identifiers.consent&&this.identifiers.consent.marketing&&this.identifiers.consent.marketing.email&&((ft=(ae=this.identifiers.consent.marketing)==null?void 0:ae.email)!=null&&ft.consentGrantedAt||(k=(v=this.identifiers.consent.marketing)==null?void 0:v.email)!=null&&k.consentNotGrantedAt))},analytics:!!(this.identifiers.consent&&this.identifiers.consent.analytics&&((E=this.identifiers.consent.analytics)!=null&&E.consentGrantedAt||(V=this.identifiers.consent.analytics)!=null&&V.consentNotGrantedAt)),loyalty:!!(this.identifiers.consent&&this.identifiers.consent.loyalty&&((j=this.identifiers.consent.loyalty)!=null&&j.consentGrantedAt||(q=this.identifiers.consent.loyalty)!=null&&q.consentNotGrantedAt))}}}},this.identifiers.address&&this.identifiers.address.length>0&&(K.logMetadata.traits.address={addressLine1:!!this.identifiers.address.find(H=>!!H.addressLine1),addressLine2:!!this.identifiers.address.find(H=>!!H.addressLine2),streetName:!!this.identifiers.address.find(H=>!!H.streetName),locality:!!this.identifiers.address.find(H=>!!H.locality),state:!!this.identifiers.address.find(H=>!!H.state),stateCode:!!this.identifiers.address.find(H=>!!H.stateCode),postcode:!!this.identifiers.address.find(H=>!!H.postcode),country:!!this.identifiers.address.find(H=>!!H.country),countryCode:!!this.identifiers.address.find(H=>!!H.countryCode)})}catch(H){console.warn("Error in logging identity traits",H)}if(this.sdk.privacy.isIabPurposesGranted([Ci.measureAdvertisingPerformance],"Seeka identity server push")){let H="Seeka - Server";if(this.sdk.debug.isOperationAllowed("profile push",H,K)){yield this.sdk.convergeApi.ingest.push([],[{id:this.identifiers,src:this.sdk.debug.createTrackingSource(e)}],[],[]);try{this.sdk.debug.log(`${H} profile push`,K)}catch(J){this.sdk.debug.error("Identity - failed to log identity sync",J)}}}return(ce=this.sdk.dataLayer.window.sessionStorage())==null||ce.setItem("sk.pid.last",new Date().getTime().toString()),this.identifiers}else return this.sdk.config.isDisabled||this.sdk.debug.warn("Cannot sync identity when isIdentityDisabled"),F(p({},this.identifiers),{seekaBId:[this.identifiers.seekaPId]})})}setSeekaPIdInput(e){try{if(!e)return;document.querySelectorAll("[data-q='seeka_id'], input[id='seekaProfileId'], input[name='seekaProfileId']").forEach(i=>{i.value=e})}catch(t){this.sdk.debug.error("Identity.setSeekaPIdInput failed",t)}}onProfileChanged(){return h(this,null,function*(){this.profileChangeCounter++;let e={profileChangeCounter:this.profileChangeCounter,identifiers:this.identifiers};this.sdk.debug.verbose("Identity.onProfileChanged (#"+this.profileChangeCounter+")",{eventPayload:e}),this.sdk.hooks.publishEvent("identity.changed",e),yield this.syncIdentityDebounced(),this.setSeekaPIdInput(this.identifiers.seekaPId),this.sdk.lib.analytics&&this.sdk.lib.analytics.identify&&(this.sdk.status.isInitialised?yield this.sdk.lib.analytics.identify(this.identifiers.seekaPId,{profile:this.identifiers}):this.sdk.util.queue.addMethodCallToQueue(this.sdk.lib.analytics.identify,this.sdk.lib.analytics,[this.identifiers.seekaPId,{profile:this.identifiers}],!1))})}sanitiseProfile(e){if(e.email){let t=[];for(let i of e.email)t.push(this.sdk.util.parse.emailAddress(i));e.email=ci(t.filter(i=>i&&!0))}if(e.phone){let t=[];for(let i of e.phone)t.push(this.sdk.util.parse.phoneNumberToE164(i));e.phone=ci(t.filter(i=>i&&!0))}return e.firstName&&(e.firstName=e.firstName.map(t=>t?t.trim():null).filter(t=>t&&!0)),e.lastName&&(e.lastName=e.lastName.map(t=>t?t.trim():null).filter(t=>t&&!0)),e.dob&&e.dob.length>0&&(e.dob=e.dob.filter(Boolean)),e.seekaBId=ci(e.seekaBId).filter(t=>t!==e.seekaPId),e.facebook?(e.facebook.fbc||(e.facebook.fbc=[]),e.facebook.fbp||(e.facebook.fbp=[]),e.facebook.login||(e.facebook.login=[]),e.facebook.lead||(e.facebook.lead=[])):e.facebook={fbc:[],fbp:[],login:[],lead:[]},e.snapchat?(e.snapchat.scid||(e.snapchat.scid=[]),e.snapchat.sccid||(e.snapchat.sccid=[])):e.snapchat={scid:[],sccid:[]},e.tiktok?(e.tiktok.ttclid||(e.tiktok.ttclid=[]),e.tiktok.ttp||(e.tiktok.ttp=[])):e.tiktok={ttclid:[],ttp:[],lead:[]},e.google?(e.google.userClientId||(e.google.userClientId=[]),e.google.gclid||(e.google.gclid=[])):e.google={userClientId:[],gclid:[]},e.magento?(e.magento.orderId||(e.magento.orderId=[]),e.magento.orderNumber||(e.magento.orderNumber=[]),e.magento.customerId||(e.magento.customerId=[]),e.magento.checkoutId||(e.magento.checkoutId=[]),e.magento.cartId||(e.magento.cartId=[])):e.magento={cartId:[],checkoutId:[],customerId:[],orderId:[],orderNumber:[]},e.bigCommerce||(e.bigCommerce={}),e.wooCommerce?(e.wooCommerce.orderId||(e.wooCommerce.orderId=[]),e.wooCommerce.customerId||(e.wooCommerce.customerId=[]),e.wooCommerce.cartHash||(e.wooCommerce.cartHash=[])):e.wooCommerce={orderId:[],customerId:[],cartHash:[]},e.shopify?(e.shopify.cartId||(e.shopify.cartId=[]),e.shopify.cartToken||(e.shopify.cartToken=[]),e.shopify.checkoutId||(e.shopify.checkoutId=[]),e.shopify.checkoutToken||(e.shopify.checkoutToken=[]),e.shopify.customerId||(e.shopify.customerId=[]),e.shopify.uniqueToken||(e.shopify.uniqueToken=[]),e.shopify.deviceId||(e.shopify.deviceId=[]),e.shopify.visitToken||(e.shopify.visitToken=[]),e.shopify.microSessionId||(e.shopify.microSessionId=[]),e.shopify.orderId||(e.shopify.orderId=[]),e.shopify.sessionHash||(e.shopify.sessionHash=[])):e.shopify={cartId:[],cartToken:[],checkoutId:[],checkoutToken:[],customerId:[],uniqueToken:[],deviceId:[],visitToken:[],microSessionId:[],orderId:[],sessionHash:[]},(!e.address||!W(e.address))&&(e.address=[]),e.address=e.address.filter(t=>t&&!0),e.consent||(e.consent={}),e.consent.marketing||(e.consent.marketing={}),e.consent.marketing.email||(e.consent.marketing.email={}),e.consent.marketing.sms||(e.consent.marketing.sms={}),e.consent.analytics||(e.consent.analytics={}),e.consent.loyalty||(e.consent.loyalty={}),e}touchAndGetSessionId(){var t,i,n,s;let e=(n=(i=(t=this.sdk.config.tracking)==null?void 0:t.analytics)==null?void 0:i.identity)==null?void 0:n.userSessionTimeoutSeconds;return io(this.sdk.state,e,(a,o)=>this.sdk.debug.verbose(a,o),(a,o)=>this.sdk.debug.error(a,o),(s=this.sdk.dataLayer.window.location())==null?void 0:s.href)}generateNewSessionId(e){return eo(e)}ensureTraitsNotNull(){(this.identifiers==null||this.identifiers==null)&&(this.identifiers={}),(this.identifiers.traits==null||this.identifiers.traits==null)&&(this.identifiers.traits={}),this.identifiers.shopify||(this.identifiers.shopify={}),this.identifiers.facebook||(this.identifiers.facebook={}),this.identifiers.tiktok||(this.identifiers.tiktok={}),this.identifiers.magento||(this.identifiers.magento={}),this.identifiers.wooCommerce||(this.identifiers.wooCommerce={}),this.identifiers.snapchat||(this.identifiers.snapchat={}),this.identifiers.google||(this.identifiers.google={}),this.identifiers.consent||(this.identifiers.consent={}),this.identifiers.consent.marketing||(this.identifiers.consent.marketing={}),this.identifiers.consent.marketing.email||(this.identifiers.consent.marketing.email={}),this.identifiers.consent.marketing.sms||(this.identifiers.consent.marketing.sms={}),this.identifiers.consent.analytics||(this.identifiers.consent.analytics={}),this.identifiers.consent.loyalty||(this.identifiers.consent.loyalty={})}};var le=class extends Error{constructor(e){super(e),this.name="DecodingError"}};var pe=class extends Error{constructor(e){super(e),this.name="EncodingError"}};var dt=class extends Error{constructor(e){super(e),this.name="GVLError"}};var Ae=class extends Error{constructor(e,t,i=""){super(`invalid value ${t} passed for ${e} ${i}`),this.name="TCModelError"}};var Be=class{static encode(e){if(!/^[0-1]+$/.test(e))throw new pe("Invalid bitField");let t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let i="";for(let n=0;n<e.length;n+=this.BASIS)i+=this.DICT[parseInt(e.substr(n,this.BASIS),2)];return i}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new le("Invalidly encoded Base64URL string");let t="";for(let i=0;i<e.length;i++){let n=this.REVERSE_DICT.get(e[i]).toString(2);t+="0".repeat(this.BASIS-n.length)+n}return t}};u(Be,"DICT","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),u(Be,"REVERSE_DICT",new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]])),u(Be,"BASIS",6),u(Be,"LCM",24);var Xe=class Xe{has(e){return Xe.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();let t=e.split("-")[0];if(e.length>=2&&t.length==2){if(Xe.langSet.has(e))return e;if(Xe.langSet.has(t))return t;let i=t+"-"+t;if(Xe.langSet.has(i))return i;for(let n of Xe.langSet)if(n.indexOf(e)!==-1||n.indexOf(t)!==-1)return n}throw new Error(`unsupported language ${e}`)}forEach(e){Xe.langSet.forEach(e)}get size(){return Xe.langSet.size}};u(Xe,"langSet",new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HI","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH","ZH-HANT"]));var _n=Xe;var b=class{};u(b,"cmpId","cmpId"),u(b,"cmpVersion","cmpVersion"),u(b,"consentLanguage","consentLanguage"),u(b,"consentScreen","consentScreen"),u(b,"created","created"),u(b,"supportOOB","supportOOB"),u(b,"isServiceSpecific","isServiceSpecific"),u(b,"lastUpdated","lastUpdated"),u(b,"numCustomPurposes","numCustomPurposes"),u(b,"policyVersion","policyVersion"),u(b,"publisherCountryCode","publisherCountryCode"),u(b,"publisherCustomConsents","publisherCustomConsents"),u(b,"publisherCustomLegitimateInterests","publisherCustomLegitimateInterests"),u(b,"publisherLegitimateInterests","publisherLegitimateInterests"),u(b,"publisherConsents","publisherConsents"),u(b,"publisherRestrictions","publisherRestrictions"),u(b,"purposeConsents","purposeConsents"),u(b,"purposeLegitimateInterests","purposeLegitimateInterests"),u(b,"purposeOneTreatment","purposeOneTreatment"),u(b,"specialFeatureOptins","specialFeatureOptins"),u(b,"useNonStandardTexts","useNonStandardTexts"),u(b,"vendorConsents","vendorConsents"),u(b,"vendorLegitimateInterests","vendorLegitimateInterests"),u(b,"vendorListVersion","vendorListVersion"),u(b,"vendorsAllowed","vendorsAllowed"),u(b,"vendorsDisclosed","vendorsDisclosed"),u(b,"version","version");var Me=class{clone(){let e=new this.constructor;return Object.keys(this).forEach(i=>{let n=this.deepClone(this[i]);n!==void 0&&(e[i]=n)}),e}deepClone(e){let t=typeof e;if(t==="number"||t==="string"||t==="boolean")return e;if(e!==null&&t==="object"){if(typeof e.clone=="function")return e.clone();if(e instanceof Date)return new Date(e.getTime());if(e[Symbol.iterator]!==void 0){let i=[];for(let n of e)i.push(this.deepClone(n));return e instanceof Array?i:new e.constructor(i)}else{let i={};for(let n in e)e.hasOwnProperty(n)&&(i[n]=this.deepClone(e[n]));return i}}}};var Pe;(function(r){r[r.NOT_ALLOWED=0]="NOT_ALLOWED",r[r.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",r[r.REQUIRE_LI=2]="REQUIRE_LI"})(Pe||(Pe={}));var Yi=class Yi extends Me{constructor(t,i){super();u(this,"purposeId_");u(this,"restrictionType");t!==void 0&&(this.purposeId=t),i!==void 0&&(this.restrictionType=i)}static unHash(t){let i=t.split(this.hashSeparator),n=new Yi;if(i.length!==2)throw new Ae("hash",t);return n.purposeId=parseInt(i[0],10),n.restrictionType=parseInt(i[1],10),n}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${Yi.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(t){this.purposeId_=t}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===Pe.NOT_ALLOWED||this.restrictionType===Pe.REQUIRE_CONSENT||this.restrictionType===Pe.REQUIRE_LI)}isSameAs(t){return this.purposeId===t.purposeId&&this.restrictionType===t.restrictionType}};u(Yi,"hashSeparator","-");var ut=Yi;var Si=class extends Me{constructor(){super(...arguments);u(this,"bitLength",0);u(this,"map",new Map);u(this,"gvl_")}has(t){return this.map.has(t)}isOkToHave(t,i,n){var a;let s=!0;if((a=this.gvl)!=null&&a.vendors){let o=this.gvl.vendors[n];if(o)if(t===Pe.NOT_ALLOWED)s=o.legIntPurposes.includes(i)||o.purposes.includes(i);else if(o.flexiblePurposes.length)switch(t){case Pe.REQUIRE_CONSENT:s=o.flexiblePurposes.includes(i)&&o.legIntPurposes.includes(i);break;case Pe.REQUIRE_LI:s=o.flexiblePurposes.includes(i)&&o.purposes.includes(i);break}else s=!1;else s=!1}return s}add(t,i){if(this.isOkToHave(i.restrictionType,i.purposeId,t)){let n=i.hash;this.has(n)||(this.map.set(n,new Set),this.bitLength=0),this.map.get(n).add(t)}}restrictPurposeToLegalBasis(t){let i=Array.from(this.gvl.vendorIds),n=t.hash,s=i[i.length-1],a=[...Array(s).keys()].map(o=>o+1);if(!this.has(n))this.map.set(n,new Set(a)),this.bitLength=0;else for(let o=1;o<=s;o++)this.map.get(n).add(o)}getVendors(t){let i=[];if(t){let n=t.hash;this.has(n)&&(i=Array.from(this.map.get(n)))}else{let n=new Set;this.map.forEach(s=>{s.forEach(a=>{n.add(a)})}),i=Array.from(n)}return i.sort((n,s)=>n-s)}getRestrictionType(t,i){let n;return this.getRestrictions(t).forEach(s=>{s.purposeId===i&&(n===void 0||n>s.restrictionType)&&(n=s.restrictionType)}),n}vendorHasRestriction(t,i){let n=!1,s=this.getRestrictions(t);for(let a=0;a<s.length&&!n;a++)n=i.isSameAs(s[a]);return n}getMaxVendorId(){let t=0;return this.map.forEach(i=>{t=Math.max(Array.from(i)[i.size-1],t)}),t}getRestrictions(t){let i=[];return this.map.forEach((n,s)=>{t?n.has(t)&&i.push(ut.unHash(s)):i.push(ut.unHash(s))}),i}getPurposes(){let t=new Set;return this.map.forEach((i,n)=>{t.add(ut.unHash(n).purposeId)}),Array.from(t)}remove(t,i){let n=i.hash,s=this.map.get(n);s&&(s.delete(t),s.size==0&&(this.map.delete(n),this.bitLength=0))}set gvl(t){this.gvl_||(this.gvl_=t,this.map.forEach((i,n)=>{let s=ut.unHash(n);Array.from(i).forEach(o=>{this.isOkToHave(s.restrictionType,s.purposeId,o)||i.delete(o)})}))}get gvl(){return this.gvl_}isEmpty(){return this.map.size===0}get numRestrictions(){return this.map.size}};var Qu;(function(r){r.COOKIE="cookie",r.WEB="web",r.APP="app"})(Qu||(Qu={}));var Y;(function(r){r.CORE="core",r.VENDORS_DISCLOSED="vendorsDisclosed",r.VENDORS_ALLOWED="vendorsAllowed",r.PUBLISHER_TC="publisherTC"})(Y||(Y={}));var Mt=class{};u(Mt,"ID_TO_KEY",[Y.CORE,Y.VENDORS_DISCLOSED,Y.VENDORS_ALLOWED,Y.PUBLISHER_TC]),u(Mt,"KEY_TO_ID",{[Y.CORE]:0,[Y.VENDORS_DISCLOSED]:1,[Y.VENDORS_ALLOWED]:2,[Y.PUBLISHER_TC]:3});var fe=class extends Me{constructor(){super(...arguments);u(this,"bitLength",0);u(this,"maxId_",0);u(this,"set_",new Set)}*[Symbol.iterator](){for(let t=1;t<=this.maxId;t++)yield[t,this.has(t)]}values(){return this.set_.values()}get maxId(){return this.maxId_}has(t){return this.set_.has(t)}unset(t){Array.isArray(t)?t.forEach(i=>this.unset(i)):typeof t=="object"?this.unset(Object.keys(t).map(i=>Number(i))):(this.set_.delete(Number(t)),this.bitLength=0,t===this.maxId&&(this.maxId_=0,this.set_.forEach(i=>{this.maxId_=Math.max(this.maxId,i)})))}isIntMap(t){let i=typeof t=="object";return i=i&&Object.keys(t).every(n=>{let s=Number.isInteger(parseInt(n,10));return s=s&&this.isValidNumber(t[n].id),s=s&&t[n].name!==void 0,s}),i}isValidNumber(t){return parseInt(t,10)>0}isSet(t){let i=!1;return t instanceof Set&&(i=Array.from(t).every(this.isValidNumber)),i}set(t){if(Array.isArray(t))t.forEach(i=>this.set(i));else if(this.isSet(t))this.set(Array.from(t));else if(this.isIntMap(t))this.set(Object.keys(t).map(i=>Number(i)));else if(this.isValidNumber(t))this.set_.add(t),this.maxId_=Math.max(this.maxId,t),this.bitLength=0;else throw new Ae("set()",t,"must be positive integer array, positive integer, Set<number>, or IntMap")}empty(){this.set_=new Set,this.maxId_=0}forEach(t){for(let i=1;i<=this.maxId;i++)t(this.has(i),i)}get size(){return this.set_.size}setAll(t){this.set(t)}};var zu,Yu,Zu,Xu,el,tl,il,rl,nl,sl,ol,al,cl,dl,ul,ll,fl,ml;ml=b.cmpId,fl=b.cmpVersion,ll=b.consentLanguage,ul=b.consentScreen,dl=b.created,cl=b.isServiceSpecific,al=b.lastUpdated,ol=b.policyVersion,sl=b.publisherCountryCode,nl=b.publisherLegitimateInterests,rl=b.publisherConsents,il=b.purposeConsents,tl=b.purposeLegitimateInterests,el=b.purposeOneTreatment,Xu=b.specialFeatureOptins,Zu=b.useNonStandardTexts,Yu=b.vendorListVersion,zu=b.version;var A=class{};u(A,ml,12),u(A,fl,12),u(A,ll,12),u(A,ul,6),u(A,dl,36),u(A,cl,1),u(A,al,36),u(A,ol,6),u(A,sl,12),u(A,nl,24),u(A,rl,24),u(A,il,24),u(A,tl,24),u(A,el,1),u(A,Xu,12),u(A,Zu,1),u(A,Yu,12),u(A,zu,6),u(A,"anyBoolean",1),u(A,"encodingType",1),u(A,"maxId",16),u(A,"numCustomPurposes",6),u(A,"numEntries",12),u(A,"numRestrictions",12),u(A,"purposeId",6),u(A,"restrictionType",2),u(A,"segmentType",3),u(A,"singleOrRange",1),u(A,"vendorId",16);var he=class{static encode(e){return String(Number(e))}static decode(e){return e==="1"}};var B=class{static encode(e,t){let i;if(typeof e=="string"&&(e=parseInt(e,10)),i=e.toString(2),i.length>t||e<0)throw new pe(`${e} too large to encode into ${t}`);return i.length<t&&(i="0".repeat(t-i.length)+i),i}static decode(e,t){if(t!==e.length)throw new le("invalid bit length");return parseInt(e,2)}};var Zi=class{static encode(e,t){return B.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new le("invalid bit length");let i=new Date;return i.setTime(B.decode(e,t)*100),i}};var Le=class{static encode(e,t){let i="";for(let n=1;n<=t;n++)i+=he.encode(e.has(n));return i}static decode(e,t){if(e.length!==t)throw new le("bitfield encoding length mismatch");let i=new fe;for(let n=1;n<=t;n++)he.decode(e[n-1])&&i.set(n);return i.bitLength=e.length,i}};var Xi=class{static encode(e,t){e=e.toUpperCase();let i=65,n=e.charCodeAt(0)-i,s=e.charCodeAt(1)-i;if(n<0||n>25||s<0||s>25)throw new pe(`invalid language code: ${e}`);if(t%2===1)throw new pe(`numBits must be even, ${t} is not valid`);t=t/2;let a=B.encode(n,t),o=B.encode(s,t);return a+o}static decode(e,t){let i;if(t===e.length&&!(e.length%2)){let s=e.length/2,a=B.decode(e.slice(0,s),s)+65,o=B.decode(e.slice(s),s)+65;i=String.fromCharCode(a)+String.fromCharCode(o)}else throw new le("invalid bit length for language");return i}};var Un=class{static encode(e){let t=B.encode(e.numRestrictions,A.numRestrictions);if(!e.isEmpty()){let i=(n,s)=>{for(let a=n+1;a<=s;a++)if(e.gvl.vendorIds.has(a))return a;return n};e.getRestrictions().forEach(n=>{t+=B.encode(n.purposeId,A.purposeId),t+=B.encode(n.restrictionType,A.restrictionType);let s=e.getVendors(n),a=s.length,o=0,c=0,d="";for(let l=0;l<a;l++){let f=s[l];if(c===0&&(o++,c=f),l===a-1||s[l+1]>i(f,s[a-1])){let m=f!==c;d+=he.encode(m),d+=B.encode(c,A.vendorId),m&&(d+=B.encode(f,A.vendorId)),c=0}}t+=B.encode(o,A.numEntries),t+=d})}return t}static decode(e){let t=0,i=new Si,n=B.decode(e.substr(t,A.numRestrictions),A.numRestrictions);t+=A.numRestrictions;for(let s=0;s<n;s++){let a=B.decode(e.substr(t,A.purposeId),A.purposeId);t+=A.purposeId;let o=B.decode(e.substr(t,A.restrictionType),A.restrictionType);t+=A.restrictionType;let c=new ut(a,o),d=B.decode(e.substr(t,A.numEntries),A.numEntries);t+=A.numEntries;for(let l=0;l<d;l++){let f=he.decode(e.substr(t,A.anyBoolean));t+=A.anyBoolean;let m=B.decode(e.substr(t,A.vendorId),A.vendorId);if(t+=A.vendorId,f){let g=B.decode(e.substr(t,A.vendorId),A.vendorId);if(t+=A.vendorId,g<m)throw new le(`Invalid RangeEntry: endVendorId ${g} is less than ${m}`);for(let y=m;y<=g;y++)i.add(y,c)}else i.add(m,c)}}return i.bitLength=t,i}};var Pi;(function(r){r[r.FIELD=0]="FIELD",r[r.RANGE=1]="RANGE"})(Pi||(Pi={}));var lt=class{static encode(e){let t=[],i=[],n=B.encode(e.maxId,A.maxId),s="",a,o=A.maxId+A.encodingType,c=o+e.maxId,d=A.vendorId*2+A.singleOrRange+A.numEntries,l=o+A.numEntries;return e.forEach((f,m)=>{s+=he.encode(f),a=e.maxId>d&&l<c,a&&f&&(e.has(m+1)?i.length===0&&(i.push(m),l+=A.singleOrRange,l+=A.vendorId):(i.push(m),l+=A.vendorId,t.push(i),i=[]))}),a?(n+=String(Pi.RANGE),n+=this.buildRangeEncoding(t)):(n+=String(Pi.FIELD),n+=s),n}static decode(e,t){let i,n=0,s=B.decode(e.substr(n,A.maxId),A.maxId);n+=A.maxId;let a=B.decode(e.charAt(n),A.encodingType);if(n+=A.encodingType,a===Pi.RANGE){if(i=new fe,t===1){if(e.substr(n,1)==="1")throw new le("Unable to decode default consent=1");n++}let o=B.decode(e.substr(n,A.numEntries),A.numEntries);n+=A.numEntries;for(let c=0;c<o;c++){let d=he.decode(e.charAt(n));n+=A.singleOrRange;let l=B.decode(e.substr(n,A.vendorId),A.vendorId);if(n+=A.vendorId,d){let f=B.decode(e.substr(n,A.vendorId),A.vendorId);n+=A.vendorId;for(let m=l;m<=f;m++)i.set(m)}else i.set(l)}}else{let o=e.substr(n,s);n+=s,i=Le.decode(o,s)}return i.bitLength=n,i}static buildRangeEncoding(e){let t=e.length,i=B.encode(t,A.numEntries);return e.forEach(n=>{let s=n.length===1;i+=he.encode(!s),i+=B.encode(n[0],A.vendorId),s||(i+=B.encode(n[1],A.vendorId))}),i}};function no(){return{[b.version]:B,[b.created]:Zi,[b.lastUpdated]:Zi,[b.cmpId]:B,[b.cmpVersion]:B,[b.consentScreen]:B,[b.consentLanguage]:Xi,[b.vendorListVersion]:B,[b.policyVersion]:B,[b.isServiceSpecific]:he,[b.useNonStandardTexts]:he,[b.specialFeatureOptins]:Le,[b.purposeConsents]:Le,[b.purposeLegitimateInterests]:Le,[b.purposeOneTreatment]:he,[b.publisherCountryCode]:Xi,[b.vendorConsents]:lt,[b.vendorLegitimateInterests]:lt,[b.publisherRestrictions]:Un,segmentType:B,[b.vendorsDisclosed]:lt,[b.vendorsAllowed]:lt,[b.publisherConsents]:Le,[b.publisherLegitimateInterests]:Le,[b.numCustomPurposes]:B,[b.publisherCustomConsents]:Le,[b.publisherCustomLegitimateInterests]:Le}}var Bn=class{constructor(){u(this,1,{[Y.CORE]:[b.version,b.created,b.lastUpdated,b.cmpId,b.cmpVersion,b.consentScreen,b.consentLanguage,b.vendorListVersion,b.purposeConsents,b.vendorConsents]});u(this,2,{[Y.CORE]:[b.version,b.created,b.lastUpdated,b.cmpId,b.cmpVersion,b.consentScreen,b.consentLanguage,b.vendorListVersion,b.policyVersion,b.isServiceSpecific,b.useNonStandardTexts,b.specialFeatureOptins,b.purposeConsents,b.purposeLegitimateInterests,b.purposeOneTreatment,b.publisherCountryCode,b.vendorConsents,b.vendorLegitimateInterests,b.publisherRestrictions],[Y.PUBLISHER_TC]:[b.publisherConsents,b.publisherLegitimateInterests,b.numCustomPurposes,b.publisherCustomConsents,b.publisherCustomLegitimateInterests],[Y.VENDORS_ALLOWED]:[b.vendorsAllowed],[Y.VENDORS_DISCLOSED]:[b.vendorsDisclosed]})}};var Fn=class{constructor(e,t){u(this,1,[Y.CORE]);u(this,2,[Y.CORE]);if(e.version===2)if(e.isServiceSpecific)this[2].push(Y.PUBLISHER_TC);else{let i=!!(t&&t.isForVendors);(!i||e[b.supportOOB]===!0)&&this[2].push(Y.VENDORS_DISCLOSED),i&&(e[b.supportOOB]&&e[b.vendorsAllowed].size>0&&this[2].push(Y.VENDORS_ALLOWED),this[2].push(Y.PUBLISHER_TC))}}};var wi=class{static encode(e,t){let i;try{i=this.fieldSequence[String(e.version)][t]}catch(a){throw new pe(`Unable to encode version: ${e.version}, segment: ${t}`)}let n="";t!==Y.CORE&&(n=B.encode(Mt.KEY_TO_ID[t],A.segmentType));let s=no();return i.forEach(a=>{let o=e[a],c=s[a],d=A[a];d===void 0&&this.isPublisherCustom(a)&&(d=Number(e[b.numCustomPurposes]));try{n+=c.encode(o,d)}catch(l){throw new pe(`Error encoding ${t}->${a}: ${l.message}`)}}),Be.encode(n)}static decode(e,t,i){let n=Be.decode(e),s=0;i===Y.CORE&&(t.version=B.decode(n.substr(s,A[b.version]),A[b.version])),i!==Y.CORE&&(s+=A.segmentType);let a=this.fieldSequence[String(t.version)][i],o=no();return a.forEach(c=>{let d=o[c],l=A[c];if(l===void 0&&this.isPublisherCustom(c)&&(l=Number(t[b.numCustomPurposes])),l!==0){let f=n.substr(s,l);if(d===lt?t[c]=d.decode(f,t.version):t[c]=d.decode(f,l),Number.isInteger(l))s+=l;else if(Number.isInteger(t[c].bitLength))s+=t[c].bitLength;else throw new le(c)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}};u(wi,"fieldSequence",new Bn);var er=class{static process(e,t){let i=e.gvl;if(!i)throw new pe("Unable to encode TCModel without a GVL");if(!i.isReady)throw new pe("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");e=e.clone(),e.consentLanguage=i.language.slice(0,2).toUpperCase(),(t==null?void 0:t.version)>0&&(t==null?void 0:t.version)<=this.processor.length?e.version=t.version:e.version=this.processor.length;let n=e.version-1;if(!this.processor[n])throw new pe(`Invalid version: ${e.version}`);return this.processor[n](e,i)}};u(er,"processor",[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset([1,3,4,5,6]);let i=new Map;return i.set("legIntPurposes",e.vendorLegitimateInterests),i.set("purposes",e.vendorConsents),i.forEach((n,s)=>{n.forEach((a,o)=>{if(a){let c=t.vendors[o];if(!c||c.deletedDate)n.unset(o);else if(c[s].length===0)if(s==="legIntPurposes"&&c.purposes.length===0&&c.legIntPurposes.length===0&&c.specialPurposes.length>0)n.set(o);else if(s==="legIntPurposes"&&c.purposes.length>0&&c.legIntPurposes.length===0&&c.specialPurposes.length>0)n.set(o);else if(e.isServiceSpecific)if(c.flexiblePurposes.length===0)n.unset(o);else{let d=e.publisherRestrictions.getRestrictions(o),l=!1;for(let f=0,m=d.length;f<m&&!l;f++)l=d[f].restrictionType===Pe.REQUIRE_CONSENT&&s==="purposes"||d[f].restrictionType===Pe.REQUIRE_LI&&s==="legIntPurposes";l||n.unset(o)}else n.unset(o)}})}),e.vendorsDisclosed.set(t.vendors),e}]);var Hn=class{static absCall(e,t,i,n){return new Promise((s,a)=>{let o=new XMLHttpRequest,c=()=>{if(o.readyState==XMLHttpRequest.DONE)if(o.status>=200&&o.status<300){let m=o.response;if(typeof m=="string")try{m=JSON.parse(m)}catch(g){}s(m)}else a(new Error(`HTTP Status: ${o.status} response type: ${o.responseType}`))},d=()=>{a(new Error("error"))},l=()=>{a(new Error("aborted"))},f=()=>{a(new Error("Timeout "+n+"ms "+e))};o.withCredentials=i,o.addEventListener("load",c),o.addEventListener("error",d),o.addEventListener("abort",l),t===null?o.open("GET",e,!0):o.open("POST",e,!0),o.responseType="json",o.timeout=n,o.ontimeout=f,o.send(t)})}static post(e,t,i=!1,n=0){return this.absCall(e,JSON.stringify(t),i,n)}static fetch(e,t=!1,i=0){return this.absCall(e,null,t,i)}};var O=class O extends Me{constructor(t,i){super();u(this,"readyPromise");u(this,"gvlSpecificationVersion");u(this,"vendorListVersion");u(this,"tcfPolicyVersion");u(this,"lastUpdated");u(this,"purposes");u(this,"specialPurposes");u(this,"features");u(this,"specialFeatures");u(this,"isReady_",!1);u(this,"vendors_");u(this,"vendorIds");u(this,"fullVendorList");u(this,"byPurposeVendorMap");u(this,"bySpecialPurposeVendorMap");u(this,"byFeatureVendorMap");u(this,"bySpecialFeatureVendorMap");u(this,"stacks");u(this,"dataCategories");u(this,"lang_");u(this,"cacheLang_");u(this,"isLatest",!1);let n=O.baseUrl,s=i==null?void 0:i.language;if(s)try{s=O.consentLanguages.parseLanguage(s)}catch(a){throw new dt("Error during parsing the language: "+a.message)}if(this.lang_=s||O.DEFAULT_LANGUAGE,this.cacheLang_=s||O.DEFAULT_LANGUAGE,this.isVendorList(t))this.populate(t),this.readyPromise=Promise.resolve();else{if(!n)throw new dt("must specify GVL.baseUrl before loading GVL json");if(t>0){let a=t;O.CACHE.has(a)?(this.populate(O.CACHE.get(a)),this.readyPromise=Promise.resolve()):(n+=O.versionedFilename.replace("[VERSION]",String(a)),this.readyPromise=this.fetchJson(n))}else O.CACHE.has(O.LATEST_CACHE_KEY)?(this.populate(O.CACHE.get(O.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(n+O.latestFilename))}}static set baseUrl(t){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new dt("Invalid baseUrl!  You may not pull directly from vendorlist.consensu.org and must provide your own cache");t.length>0&&t[t.length-1]!=="/"&&(t+="/"),this.baseUrl_=t}static get baseUrl(){return this.baseUrl_}static emptyLanguageCache(t){let i=!1;return t==null&&O.LANGUAGE_CACHE.size>0?(O.LANGUAGE_CACHE=new Map,i=!0):typeof t=="string"&&this.consentLanguages.has(t.toUpperCase())&&(O.LANGUAGE_CACHE.delete(t.toUpperCase()),i=!0),i}static emptyCache(t){let i=!1;return Number.isInteger(t)&&t>=0?(O.CACHE.delete(t),i=!0):t===void 0&&(O.CACHE=new Map,i=!0),i}cacheLanguage(){O.LANGUAGE_CACHE.has(this.cacheLang_)||O.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}fetchJson(t){return h(this,null,function*(){try{this.populate(yield Hn.fetch(t))}catch(i){throw new dt(i.message)}})}getJson(){return F(p({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.clonePurposes(),specialPurposes:this.cloneSpecialPurposes(),features:this.cloneFeatures(),specialFeatures:this.cloneSpecialFeatures(),stacks:this.cloneStacks()},this.dataCategories?{dataCategories:this.cloneDataCategories()}:{}),{vendors:this.cloneVendors()})}cloneSpecialFeatures(){let t={};for(let i of Object.keys(this.specialFeatures))t[i]=O.cloneFeature(this.specialFeatures[i]);return t}cloneFeatures(){let t={};for(let i of Object.keys(this.features))t[i]=O.cloneFeature(this.features[i]);return t}cloneStacks(){let t={};for(let i of Object.keys(this.stacks))t[i]=O.cloneStack(this.stacks[i]);return t}cloneDataCategories(){let t={};for(let i of Object.keys(this.dataCategories))t[i]=O.cloneDataCategory(this.dataCategories[i]);return t}cloneSpecialPurposes(){let t={};for(let i of Object.keys(this.specialPurposes))t[i]=O.clonePurpose(this.specialPurposes[i]);return t}clonePurposes(){let t={};for(let i of Object.keys(this.purposes))t[i]=O.clonePurpose(this.purposes[i]);return t}static clonePurpose(t){return p(p({id:t.id,name:t.name,description:t.description},t.descriptionLegal?{descriptionLegal:t.descriptionLegal}:{}),t.illustrations?{illustrations:Array.from(t.illustrations)}:{})}static cloneFeature(t){return p(p({id:t.id,name:t.name,description:t.description},t.descriptionLegal?{descriptionLegal:t.descriptionLegal}:{}),t.illustrations?{illustrations:Array.from(t.illustrations)}:{})}static cloneDataCategory(t){return{id:t.id,name:t.name,description:t.description}}static cloneStack(t){return{id:t.id,name:t.name,description:t.description,purposes:Array.from(t.purposes),specialFeatures:Array.from(t.specialFeatures)}}static cloneDataRetention(t){return F(p({},typeof t.stdRetention=="number"?{stdRetention:t.stdRetention}:{}),{purposes:p({},t.purposes),specialPurposes:p({},t.specialPurposes)})}static cloneVendorUrls(t){return t.map(i=>p({langId:i.langId,privacy:i.privacy},i.legIntClaim?{legIntClaim:i.legIntClaim}:{}))}static cloneVendor(t){return p(p(p(p(p(p(p(p(p(p(p({id:t.id,name:t.name,purposes:Array.from(t.purposes),legIntPurposes:Array.from(t.legIntPurposes),flexiblePurposes:Array.from(t.flexiblePurposes),specialPurposes:Array.from(t.specialPurposes),features:Array.from(t.features),specialFeatures:Array.from(t.specialFeatures)},t.overflow?{overflow:{httpGetLimit:t.overflow.httpGetLimit}}:{}),typeof t.cookieMaxAgeSeconds=="number"||t.cookieMaxAgeSeconds===null?{cookieMaxAgeSeconds:t.cookieMaxAgeSeconds}:{}),t.usesCookies!==void 0?{usesCookies:t.usesCookies}:{}),t.policyUrl?{policyUrl:t.policyUrl}:{}),t.cookieRefresh!==void 0?{cookieRefresh:t.cookieRefresh}:{}),t.usesNonCookieAccess!==void 0?{usesNonCookieAccess:t.usesNonCookieAccess}:{}),t.dataRetention?{dataRetention:this.cloneDataRetention(t.dataRetention)}:{}),t.urls?{urls:this.cloneVendorUrls(t.urls)}:{}),t.dataDeclaration?{dataDeclaration:Array.from(t.dataDeclaration)}:{}),t.deviceStorageDisclosureUrl?{deviceStorageDisclosureUrl:t.deviceStorageDisclosureUrl}:{}),t.deletedDate?{deletedDate:t.deletedDate}:{})}cloneVendors(){let t={};for(let i of Object.keys(this.fullVendorList))t[i]=O.cloneVendor(this.fullVendorList[i]);return t}changeLanguage(t){return h(this,null,function*(){let i=t;try{i=O.consentLanguages.parseLanguage(t)}catch(s){throw new dt("Error during parsing the language: "+s.message)}let n=t.toUpperCase();if(!(i.toLowerCase()===O.DEFAULT_LANGUAGE.toLowerCase()&&!O.LANGUAGE_CACHE.has(n))&&i!==this.lang_)if(this.lang_=i,O.LANGUAGE_CACHE.has(n)){let s=O.LANGUAGE_CACHE.get(n);for(let a in s)s.hasOwnProperty(a)&&(this[a]=s[a])}else{let s=O.baseUrl+O.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{yield this.fetchJson(s),this.cacheLang_=n,this.cacheLanguage()}catch(a){throw new dt("unable to load language: "+a.message)}}})}get language(){return this.lang_}isVendorList(t){return t!==void 0&&t.vendors!==void 0}populate(t){this.purposes=t.purposes,this.specialPurposes=t.specialPurposes,this.features=t.features,this.specialFeatures=t.specialFeatures,this.stacks=t.stacks,this.dataCategories=t.dataCategories,this.isVendorList(t)&&(this.gvlSpecificationVersion=t.gvlSpecificationVersion,this.tcfPolicyVersion=t.tcfPolicyVersion,this.vendorListVersion=t.vendorListVersion,this.lastUpdated=t.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=t.vendors,this.fullVendorList=t.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&O.CACHE.set(O.LATEST_CACHE_KEY,this.getJson()),O.CACHE.has(this.vendorListVersion)||O.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(t){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(i=>{this.byPurposeVendorMap[i]={legInt:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(i=>{this.bySpecialPurposeVendorMap[i]=new Set}),Object.keys(this.features).forEach(i=>{this.byFeatureVendorMap[i]=new Set}),Object.keys(this.specialFeatures).forEach(i=>{this.bySpecialFeatureVendorMap[i]=new Set}),Array.isArray(t)||(t=Object.keys(this.fullVendorList).map(i=>+i)),this.vendorIds=new Set(t),this.vendors_=t.reduce((i,n)=>{let s=this.vendors_[String(n)];return s&&s.deletedDate===void 0&&(s.purposes.forEach(a=>{this.byPurposeVendorMap[String(a)].consent.add(n)}),s.specialPurposes.forEach(a=>{this.bySpecialPurposeVendorMap[String(a)].add(n)}),s.legIntPurposes.forEach(a=>{this.byPurposeVendorMap[String(a)].legInt.add(n)}),s.flexiblePurposes&&s.flexiblePurposes.forEach(a=>{this.byPurposeVendorMap[String(a)].flexible.add(n)}),s.features.forEach(a=>{this.byFeatureVendorMap[String(a)].add(n)}),s.specialFeatures.forEach(a=>{this.bySpecialFeatureVendorMap[String(a)].add(n)}),i[n]=s),i},{})}getFilteredVendors(t,i,n,s){let a=t.charAt(0).toUpperCase()+t.slice(1),o,c={};return t==="purpose"&&n?o=this["by"+a+"VendorMap"][String(i)][n]:o=this["by"+(s?"Special":"")+a+"VendorMap"][String(i)],o.forEach(d=>{c[String(d)]=this.vendors[String(d)]}),c}getVendorsWithConsentPurpose(t){return this.getFilteredVendors("purpose",t,"consent")}getVendorsWithLegIntPurpose(t){return this.getFilteredVendors("purpose",t,"legInt")}getVendorsWithFlexiblePurpose(t){return this.getFilteredVendors("purpose",t,"flexible")}getVendorsWithSpecialPurpose(t){return this.getFilteredVendors("purpose",t,void 0,!0)}getVendorsWithFeature(t){return this.getFilteredVendors("feature",t)}getVendorsWithSpecialFeature(t){return this.getFilteredVendors("feature",t,void 0,!0)}get vendors(){return this.vendors_}narrowVendorsTo(t){this.mapVendors(t)}get isReady(){return this.isReady_}clone(){let t=new O(this.getJson());return this.lang_!==O.DEFAULT_LANGUAGE&&t.changeLanguage(this.lang_),t}static isInstanceOf(t){return typeof t=="object"&&typeof t.narrowVendorsTo=="function"}};u(O,"LANGUAGE_CACHE",new Map),u(O,"CACHE",new Map),u(O,"LATEST_CACHE_KEY",0),u(O,"DEFAULT_LANGUAGE","EN"),u(O,"consentLanguages",new _n),u(O,"baseUrl_"),u(O,"latestFilename","vendor-list.json"),u(O,"versionedFilename","archives/vendor-list-v[VERSION].json"),u(O,"languageFilename","purposes-[LANG].json");var Lt=O;var Wt=class extends Me{constructor(t){super();u(this,"isServiceSpecific_",!1);u(this,"supportOOB_",!0);u(this,"useNonStandardTexts_",!1);u(this,"purposeOneTreatment_",!1);u(this,"publisherCountryCode_","AA");u(this,"version_",2);u(this,"consentScreen_",0);u(this,"policyVersion_",5);u(this,"consentLanguage_","EN");u(this,"cmpId_",0);u(this,"cmpVersion_",0);u(this,"vendorListVersion_",0);u(this,"numCustomPurposes_",0);u(this,"gvl_");u(this,"created");u(this,"lastUpdated");u(this,"specialFeatureOptins",new fe);u(this,"purposeConsents",new fe);u(this,"purposeLegitimateInterests",new fe);u(this,"publisherConsents",new fe);u(this,"publisherLegitimateInterests",new fe);u(this,"publisherCustomConsents",new fe);u(this,"publisherCustomLegitimateInterests",new fe);u(this,"customPurposes");u(this,"vendorConsents",new fe);u(this,"vendorLegitimateInterests",new fe);u(this,"vendorsDisclosed",new fe);u(this,"vendorsAllowed",new fe);u(this,"publisherRestrictions",new Si);t&&(this.gvl=t),this.updated()}set gvl(t){Lt.isInstanceOf(t)||(t=new Lt(t)),this.gvl_=t,this.publisherRestrictions.gvl=t}get gvl(){return this.gvl_}set cmpId(t){if(t=Number(t),Number.isInteger(t)&&t>1)this.cmpId_=t;else throw new Ae("cmpId",t)}get cmpId(){return this.cmpId_}set cmpVersion(t){if(t=Number(t),Number.isInteger(t)&&t>-1)this.cmpVersion_=t;else throw new Ae("cmpVersion",t)}get cmpVersion(){return this.cmpVersion_}set consentScreen(t){if(t=Number(t),Number.isInteger(t)&&t>-1)this.consentScreen_=t;else throw new Ae("consentScreen",t)}get consentScreen(){return this.consentScreen_}set consentLanguage(t){this.consentLanguage_=t}get consentLanguage(){return this.consentLanguage_}set publisherCountryCode(t){if(/^([A-z]){2}$/.test(t))this.publisherCountryCode_=t.toUpperCase();else throw new Ae("publisherCountryCode",t)}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(t){if(t=Number(t)>>0,t<0)throw new Ae("vendorListVersion",t);this.vendorListVersion_=t}get vendorListVersion(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_}set policyVersion(t){if(this.policyVersion_=parseInt(t,10),this.policyVersion_<0)throw new Ae("policyVersion",t)}get policyVersion(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_}set version(t){this.version_=parseInt(t,10)}get version(){return this.version_}set isServiceSpecific(t){this.isServiceSpecific_=t}get isServiceSpecific(){return this.isServiceSpecific_}set useNonStandardTexts(t){this.useNonStandardTexts_=t}get useNonStandardTexts(){return this.useNonStandardTexts_}set supportOOB(t){this.supportOOB_=t}get supportOOB(){return this.supportOOB_}set purposeOneTreatment(t){this.purposeOneTreatment_=t}get purposeOneTreatment(){return this.purposeOneTreatment_}setAllVendorConsents(){this.vendorConsents.set(this.gvl.vendors)}unsetAllVendorConsents(){this.vendorConsents.empty()}setAllVendorsDisclosed(){this.vendorsDisclosed.set(this.gvl.vendors)}unsetAllVendorsDisclosed(){this.vendorsDisclosed.empty()}setAllVendorsAllowed(){this.vendorsAllowed.set(this.gvl.vendors)}unsetAllVendorsAllowed(){this.vendorsAllowed.empty()}setAllVendorLegitimateInterests(){this.vendorLegitimateInterests.set(this.gvl.vendors)}unsetAllVendorLegitimateInterests(){this.vendorLegitimateInterests.empty()}setAllPurposeConsents(){this.purposeConsents.set(this.gvl.purposes)}unsetAllPurposeConsents(){this.purposeConsents.empty()}setAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.set(this.gvl.purposes)}unsetAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.empty()}setAllSpecialFeatureOptins(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}unsetAllSpecialFeatureOptins(){this.specialFeatureOptins.empty()}setAll(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}unsetAll(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}get numCustomPurposes(){let t=this.numCustomPurposes_;if(typeof this.customPurposes=="object"){let i=Object.keys(this.customPurposes).sort((n,s)=>Number(n)-Number(s));t=parseInt(i.pop(),10)}return t}set numCustomPurposes(t){if(this.numCustomPurposes_=parseInt(t,10),this.numCustomPurposes_<0)throw new Ae("numCustomPurposes",t)}updated(){let t=new Date,i=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));this.created=i,this.lastUpdated=i}};u(Wt,"consentLanguages",Lt.consentLanguages);var tr=class{static encode(e,t){let i="",n;return e=er.process(e,t),Array.isArray(t==null?void 0:t.segments)?n=t.segments:n=new Fn(e,t)[""+e.version],n.forEach((s,a)=>{let o="";a<n.length-1&&(o="."),i+=wi.encode(e,s)+o}),i}static decode(e,t){let i=e.split("."),n=i.length;t||(t=new Wt);for(let s=0;s<n;s++){let a=i[s],c=Be.decode(a.charAt(0)).substr(0,A.segmentType),d=Mt.ID_TO_KEY[B.decode(c,A.segmentType).toString()];wi.decode(a,t,d)}return t}};var Jk={iabConsentManagerId:99999999,iabConsentManagerVersion:2,iabVendorListJsonUrl:""},Qk={lastUpdated:"2024-03-31T07:26:12.453Z",gvlSpecificationVersion:2,vendorListVersion:2,tcfPolicyVersion:2,vendors:{},purposes:{[Ci.measureAdvertisingPerformance.toString()]:{description:"Measure advertising performance"}},specialPurposes:{},features:{},specialFeatures:{},stacks:{}},Vn=class{constructor(e,t){u(this,"sdk");u(this,"mode");u(this,"cmp");u(this,"iabVendorList",Qk);u(this,"state",null);var i,n,s;this.sdk=e,this.mode=((s=(n=(i=e.config.tracking)==null?void 0:i.processing)==null?void 0:n.privacyDataControl)==null?void 0:s.mode)||"disabled",this.cmp=t||Jk}setPrivacyState(e){this.sdk.debug.verbose("Privacy - State - Request change",{newState:p({},e),oldState:p({},this.state)});let t=this.normaliseState(e),i=this.state?p({},this.state):{};!this.sdk.util.parse.isDeepEqual(t,i)?(this.state=t,this.sdk.status.isInitialised&&(this.sdk.debug.log("Privacy - State - Changed",{newState:this.state,oldState:i,logMetadata:{stream:!0}}),this.onPrivacyStateChanged(i),this.sdk.hooks.publishEvent("privacy.state.changed",{newState:p({},this.state),oldState:i}))):this.sdk.debug.verbose("Privacy - State - Unchanged",{newState:this.state})}onPrivacyStateChanged(e){var s;let t=this.sdk.identity.getProfile();this.sdk.identity.mergeProfile({consent:F(p({},t.consent),{privacy:{tcfConsentString:(s=this.state)==null?void 0:s.tcfConsentString}})}).then(()=>{this.sdk.debug.verbose("Privacy - Updated profile with new privacy state",{newState:this.state})}).catch(a=>{this.sdk.debug.error("Privacy - Failed to update profile with new privacy state",{e:a})}),this.sdk.state.set("sdk.privacy.state",this.state);let i=[],n=[];(this.sdk.config.plugins||[]).forEach(a=>{if(!a)return;this.sdk.debug.verbose("Privacy - privacy state change so checking plugin");let o=this.isPluginLoadable(a);if(a.enabled!=null&&a.enabled!==null&&a.enabled!==o){let c=(a.type||a.name).replace("converge-plugin-","").replace(/-/g," ");o?(this.sdk.debug.log(`Privacy - Plugin ${c} is disabled. Enabling due to privacy state`,{logMetadata:{stream:!0}}),i.push(a.name),a.enabled=!0):(this.sdk.debug.log(`Privacy - Plugin ${c} is enabled. Disabling due to privacy state`,{logMetadata:{stream:!0}}),n.push(a.name),a.enabled=!1)}}),i.length>0&&this.sdk.lib.analytics.plugins.enable(i),n.length>0&&this.sdk.lib.analytics.plugins.disable(n,a=>{this.sdk.debug.verbose("Privacy - Disabled plugins",{e:a})})}setConsentManager(e){return h(this,null,function*(){this.cmp=e})}normaliseState(e){if(!e||(!e.deniedIabPurposeIds||e.deniedIabPurposeIds.length==0)&&(!e.grantedIabPurposeIds||e.grantedIabPurposeIds.length==0)&&!e.tcfConsentString)return null;if(e.deniedIabPurposeIds&&e.deniedIabPurposeIds.length>0&&e.grantedIabPurposeIds&&e.grantedIabPurposeIds.length>0&&e.tcfConsentString)return e;if(e.grantedIabPurposeIds&&e.grantedIabPurposeIds.length>0&&!e.tcfConsentString){let t=new Wt;t.purposeConsents.set(e.grantedIabPurposeIds),t.gvl=new Lt(this.iabVendorList),e.tcfConsentString=tr.encode(t)}else if((!e.grantedIabPurposeIds||e.grantedIabPurposeIds.length>0)&&e.tcfConsentString){let t=tr.decode(e.tcfConsentString);e.grantedIabPurposeIds=Array.from(t.purposeConsents.values())}return e}isPluginLoadable(e){var t;return!this.mode||this.mode==="disabled"||((t=e.privacyConfig)==null?void 0:t.isPrivacyPlugin)===!0?!0:!e.privacyConfig||e.privacyConfig.requiresIabPurposes===null||e.privacyConfig.requiresIabPurposes===void 0?(this.sdk.debug.verbose(`Privacy - Missing required IAB purposes for plugin ${e.name} and privacy data control mode is ${this.mode}`),!1):e.privacyConfig.requiresIabPurposes.length===0?(this.sdk.debug.verbose(`Privacy - ${e.name} is exempt from privacy data control mode`),!0):this.isIabPurposesGranted(e.privacyConfig.requiresIabPurposes,`Loading plugin ${e.name}`)}isIabPurposesGranted(e,t){if(!this.mode||this.mode==="disabled")return!0;switch(this.mode){case"explicit":return!this.state||!this.state.grantedIabPurposeIds||this.state.grantedIabPurposeIds.length===0?(this.sdk.debug.verbose(`Privacy - Missing IAB consent purpose IDs on privacy state. ${t} blocked due to data control mode ${this.mode}`),!1):e.every(i=>this.state&&this.state.grantedIabPurposeIds.includes(i));case"implicit":return this.state&&this.state.deniedIabPurposeIds&&this.state.deniedIabPurposeIds.length>0?!e.find(i=>this.state&&this.state.deniedIabPurposeIds.includes(i)):!this.state||!this.state.grantedIabPurposeIds||this.state.grantedIabPurposeIds.length===0?(this.sdk.debug.verbose(`Privacy - Missing IAB consent purpose IDs on privacy state. ${t} blocked due to data control mode ${this.mode}`),!0):e.every(i=>this.state&&this.state.grantedIabPurposeIds.includes(i));default:return this.sdk.debug.error(`Privacy - Unknown data control mode. ${t} blocked`),!1}}};var gl=r=>{let e=Ie("test",window.location.href),t=!!e&&e!=="nostream";if(!t&&Ie("_s_sidekick",window.location.href)!=="1"&&window.sessionStorage.getItem(window.location.host+"/sk/_s_sidekick")!=="1")return;let i=Ie("_s_sidekick_endpoint",window.location.href),n=Ie("_s_sidekick_token",window.location.href)||window.sessionStorage.getItem(window.location.host+"/sk/_s_sidekick_token"),s=Ie("_s_sidekick_mode",window.location.href)||window.sessionStorage.getItem(window.location.host+"/sk/_s_sidekick_mode"),a=Ie("_s_sidekick_converge",window.location.href)||window.sessionStorage.getItem(window.location.host+"/sk/_s_sidekick_converge"),o=Ie("_s_sidekick_offline",window.location.href)==="1"||window.sessionStorage.getItem(window.location.host+"/sk/_s_sidekick_offline")==="1";if(t&&!s&&(s="diagnose"),n&&a||s==="diagnose"){let c=!!Ie("cache",window.location.href),d=new Date().getTime(),l=r||"latest",f=()=>{if(!document.getElementById("seekaWebsiteSidekickScript")){let m=document.createElement("script");m.id="seekaWebsiteSidekickScript";let g;i?g=`https://${i}/dist/js/converge-util-website-sidekick/${l}/static/js/bundle.js`:g=`https://sdk.seeka.services/dist/js/converge-util-website-sidekick/${l}/static/js/bundle.js`,c&&(g+=`?cache=${d}`),m.src=g,document.body.appendChild(m),window.sessionStorage.setItem(window.location.host+"/sk/_s_sidekick","1"),window.sessionStorage.setItem(window.location.host+"/sk/_s_sidekick_mode",s||"build"),n&&window.sessionStorage.setItem(window.location.host+"/sk/_s_sidekick_token",n),a&&window.sessionStorage.setItem(window.location.host+"/sk/_s_sidekick_converge",a),window.sessionStorage.setItem(window.location.host+"/sk/_s_sidekick_offline",o?"1":"0")}if(!document.getElementById("seekaWebsiteSidekickStyles")){let m=document.createElement("link");m.id="seekaWebsiteSidekickStyles",m.rel="stylesheet",m.type="text/css";let g;i?g=`https://${i}/dist/js/converge-util-website-sidekick/${l}/static/css/bundle.css`:g=`https://sdk.seeka.services/dist/js/converge-util-website-sidekick/${l}/static/css/bundle.css`,c&&(g+=`?cache=${d}`),m.href=g,document.head.appendChild(m)}};document.body?f():window.addEventListener("load",()=>f())}};var jn=class{constructor(e){u(this,"sdk");this.sdk=e}activity(e,t,i){return h(this,null,function*(){this.sdk.debug.verbose("Track.activity called",{name:e,props:t,metadata:i});try{switch(e){case"addPaymentMethod":{yield this.addPaymentMethod(t==null?void 0:t.order,t,i);break}case"addToWishlist":{yield this.addToWishlist(t==null?void 0:t.product,t,i);break}case"contactMessage":{yield this.contactMessage(t==null?void 0:t.info,t,i);break}case"custom":{yield this.custom((t==null?void 0:t.activityNameCustom)||e,t,i);break}case"order":{yield this.order((t==null?void 0:t.order)||t,t,i);break}case"subscriptionItemPurchase":{yield this.subscriptionItemPurchase(t==null?void 0:t.order,t,i);break}case"initiateCheckout":{yield this.initiateCheckout(t==null?void 0:t.order,t,i);break}case"addToCart":{yield this.addToCart(t==null?void 0:t.product,t,i);break}case"removeFromCart":{yield this.removeFromCart(t==null?void 0:t.product,t,i);break}case"viewProduct":{yield this.viewProduct(t==null?void 0:t.product,t,i);break}case"viewPage":{yield this.viewPage(t,i);break}case"applyPromotionalCode":{yield this.applyPromotionalCode(t==null?void 0:t.info,t,i);break}case"keywordSearch":{yield this.keywordSearch(t==null?void 0:t.info,t,i);break}case"userLoginSignup":{yield this.userLoginSignup(t==null?void 0:t.info,t,i);break}case"userLogin":{yield this.userLogin(t==null?void 0:t.info,t,i);break}case"newsletterSignup":{yield this.newsletterSignup(t==null?void 0:t.info,t,i);break}case"lead":{yield this.lead(t==null?void 0:t.info,t,i);break}case"startTrial":{yield this.startTrial(t==null?void 0:t.info,t,i);break}case"changeProductAttribute":{yield this.changeProductAttribute(t==null?void 0:t.info,t,i);break}case"filterItemsByAttribute":{yield this.filterItemsByAttribute(t==null?void 0:t.filters,t,i);break}case"schedule":{yield this.schedule(t==null?void 0:t.info,t,i);break}case"viewContentItem":{yield this.viewContentItem(t==null?void 0:t.info,t,i);break}default:yield this.custom(e,t,i);break}}catch(n){this.sdk.debug.error("Track.activity failed",n)}})}mergeIdentityWithActivityProps(e,t){return h(this,null,function*(){var i,n;try{if(((n=(i=this.sdk.config.tracking)==null?void 0:i.processing)==null?void 0:n.isIdentityDisabled)===!0)return;let s={};s.magento={},s.shopify={},s.magento.orderId=[],s.shopify.orderId=[];let a=!1;if(t!=null&&t.emailAddress&&(s.email=[t==null?void 0:t.emailAddress],a=!0),e!=null&&e.platformType)switch(e==null?void 0:e.platformType){case"magento":e!=null&&e.orderIdentifier&&(s.magento.orderId.push(e.orderIdentifier),a=!0),e!=null&&e.orderNumber&&(s.magento.orderId.push(e.orderNumber),a=!0),e!=null&&e.customerIdentifier&&(s.magento.customerId=[e.customerIdentifier],a=!0);break;case"shopify":e!=null&&e.orderIdentifier&&(s.shopify.orderId.push(e.orderIdentifier),a=!0),e!=null&&e.orderNumber&&(s.shopify.orderId.push(e.orderNumber),a=!0),e!=null&&e.customerIdentifier&&(s.shopify.customerId=[e.customerIdentifier],a=!0);break}a&&(yield this.sdk.identity.mergeProfile(s))}catch(s){this.sdk.debug.error("Track.mergeIdentityWithActivityProps failed",s)}})}custom(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("custom",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("custom",void 0,t,i);t=n.props,i=n.metadata,t=(yield this.sdk.activity.onAfterActivitySanitise("custom",e,t,i)).props,this.sdk.debug.log("Seeka - Browser track "+e,{props:t,metadata:i,logMetadata:{stream:!0,activityName:"custom",activityNameCustom:e}}),yield this.sdk.lib.analytics.track(e,F(p({},t),{activityNameCustom:e}),{metadata:i})}catch(n){this.sdk.debug.error("Track.custom failed",n)}})}viewPage(e,t){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("viewPage",void 0,e)))return;let i=yield this.sdk.activity.onBeforeActivityTrack("viewPage",void 0,e,t);e=i.props,t=i.metadata,e=(yield this.sdk.activity.onAfterActivitySanitise("viewPage",void 0,e,t)).props,this.sdk.debug.log("Seeka - Browser track viewPage",{props:e,metadata:t,logMetadata:{stream:!0,activityName:"viewPage"}}),yield this.sdk.lib.analytics.track("viewPage",p({},e),{metadata:t})}catch(i){this.sdk.debug.error("Track.viewPage failed",i)}})}addPaymentMethod(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("addPaymentMethod",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("addPaymentMethod",e,t,i);t=n.props,i=n.metadata,e=n.activity,e&&(e=this.sdk.util.sanitise.order(e)),yield this.mergeIdentityWithActivityProps(e,void 0);let s=yield this.sdk.activity.onAfterActivitySanitise("addPaymentMethod",e,t,i);t=s.props,e=s.activity,this.sdk.debug.log("Seeka - Browser track addPaymentMethod",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"addPaymentMethod"}})),yield this.sdk.lib.analytics.track("addPaymentMethod",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.addPaymentMethod failed",n)}})}keywordSearch(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("keywordSearch",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("keywordSearch",e,t,i);t=n.props,i=n.metadata,e=n.activity;let s=yield this.sdk.activity.onAfterActivitySanitise("keywordSearch",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track keywordSearch",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"keywordSearch"}})),yield this.sdk.lib.analytics.track("keywordSearch",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.keywordSearch failed",n)}})}userLogin(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("userLogin",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("userLogin",e,t,i);t=n.props,i=n.metadata,e=n.activity,yield this.mergeIdentityWithActivityProps(void 0,e),e!=null&&e.emailAddress&&(e.emailAddress=this.sdk.util.parse.emailAddress(e.emailAddress));let s=yield this.sdk.activity.onAfterActivitySanitise("userLogin",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track userLogin",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"userLogin"}})),yield this.sdk.lib.analytics.track("userLogin",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.userLogin failed",n)}})}userLoginSignup(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("userLoginSignup",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("userLoginSignup",e,t,i);t=n.props,i=n.metadata,e=n.activity,yield this.mergeIdentityWithActivityProps(void 0,e),e!=null&&e.emailAddress&&(e.emailAddress=this.sdk.util.parse.emailAddress(e.emailAddress));let s=yield this.sdk.activity.onAfterActivitySanitise("userLoginSignup",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track userLoginSignup",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"userLoginSignup"}})),yield this.sdk.lib.analytics.track("userLoginSignup",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.userLoginSignup failed",n)}})}newsletterSignup(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("newsletterSignup",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("newsletterSignup",e,t,i);t=n.props,i=n.metadata,e=n.activity,yield this.mergeIdentityWithActivityProps(void 0,e),e!=null&&e.emailAddress&&(e.emailAddress=this.sdk.util.parse.emailAddress(e.emailAddress));let s=yield this.sdk.activity.onAfterActivitySanitise("newsletterSignup",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track newsletterSignup",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"newsletterSignup"}})),yield this.sdk.lib.analytics.track("newsletterSignup",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.newsletterSignup failed",n)}})}applyPromotionalCode(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("applyPromotionalCode",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("applyPromotionalCode",e,t,i);t=n.props,i=n.metadata,e=n.activity;let s=yield this.sdk.activity.onAfterActivitySanitise("applyPromotionalCode",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track applyPromotionalCode",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"applyPromotionalCode"}})),yield this.sdk.lib.analytics.track("applyPromotionalCode",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.applyPromotionalCode failed",n)}})}lead(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("lead",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("lead",e,t,i);t=n.props,i=n.metadata,e=n.activity;let s=yield this.sdk.activity.onAfterActivitySanitise("lead",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track lead",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"lead"}})),yield this.sdk.lib.analytics.track("lead",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.lead failed",n)}})}startTrial(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("startTrial",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("startTrial",e,t,i);t=n.props,i=n.metadata,e=n.activity;let s=yield this.sdk.activity.onAfterActivitySanitise("startTrial",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track startTrial",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"startTrial"}})),yield this.sdk.lib.analytics.track("startTrial",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.startTrial failed",n)}})}contactMessage(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("contactMessage",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("contactMessage",e,t,i);t=n.props,i=n.metadata,e=n.activity;let s=yield this.sdk.activity.onAfterActivitySanitise("contactMessage",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track contactMessage",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"contactMessage"}})),yield this.sdk.lib.analytics.track("contactMessage",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.contactMessage failed",n)}})}schedule(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("schedule",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("schedule",e,t,i);t=n.props,i=n.metadata,e=n.activity;let s=yield this.sdk.activity.onAfterActivitySanitise("schedule",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track schedule",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"schedule"}})),yield this.sdk.lib.analytics.track("schedule",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.schedule failed",n)}})}viewContentItem(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("viewContentItem",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("viewContentItem",e,t,i);t=n.props,i=n.metadata,e=n.activity;let s=yield this.sdk.activity.onAfterActivitySanitise("viewContentItem",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track viewContentItem",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"viewContentItem"}})),yield this.sdk.lib.analytics.track("viewContentItem",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.viewContentItem failed",n)}})}order(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("order",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("order",e,t,i);t=n.props,i=n.metadata,e=n.activity,e&&(e=this.sdk.util.sanitise.order(e)),yield this.mergeIdentityWithActivityProps(e,void 0);let s=yield this.sdk.activity.onAfterActivitySanitise("order",e,t,i);t=s.props,e=s.activity,this.sdk.debug.log("Seeka - Browser track order",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"order"}})),yield this.sdk.lib.analytics.track("order",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.order failed",n)}})}subscriptionItemPurchase(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("subscriptionItemPurchase",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("subscriptionItemPurchase",e,t,i);t=n.props,i=n.metadata,e=n.activity,e&&(e=this.sdk.util.sanitise.order(e)),yield this.mergeIdentityWithActivityProps(e,void 0);let s=yield this.sdk.activity.onAfterActivitySanitise("subscriptionItemPurchase",e,t,i);t=s.props,e=s.activity,this.sdk.debug.log("Seeka - Browser track subscriptionItemPurchase",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"subscriptionItemPurchase"}})),yield this.sdk.lib.analytics.track("subscriptionItemPurchase",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.order failed",n)}})}initiateCheckout(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("initiateCheckout",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("initiateCheckout",e,t,i);t=n.props,i=n.metadata,e=n.activity,e&&(e=this.sdk.util.sanitise.order(e)),yield this.mergeIdentityWithActivityProps(e,void 0);let s=yield this.sdk.activity.onAfterActivitySanitise("initiateCheckout",e,t,i);t=s.props,e=s.activity,this.sdk.debug.log("Seeka - Browser track initiateCheckout",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"initiateCheckout"}})),yield this.sdk.lib.analytics.track("initiateCheckout",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.initiateCheckout failed",n)}})}viewProduct(e,t,i){return h(this,null,function*(){try{if(e||(e=yield this.sdk.handlers.getCurrentProduct()),!(yield this.sdk.activity.activityFirePreconditionCheck("viewProduct",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("viewProduct",e,t,i);t=n.props,i=n.metadata,e=n.activity,e&&(e=this.sdk.util.sanitise.product(e)||{});let s=yield this.sdk.activity.onAfterActivitySanitise("viewProduct",e,t,i);t=s.props,e=s.activity,this.sdk.debug.log("Seeka - Browser track viewProduct",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"viewProduct"}})),yield this.sdk.lib.analytics.track("viewProduct",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.viewProduct failed",n)}})}addToCart(e,t,i){return h(this,null,function*(){try{if(e||(e=yield this.sdk.handlers.getCurrentProduct()),!(yield this.sdk.activity.activityFirePreconditionCheck("addToCart",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("addToCart",e,t,i);t=n.props,i=n.metadata,e=n.activity,e&&(e=this.sdk.util.sanitise.product(e)||{});let s=yield this.sdk.activity.onAfterActivitySanitise("addToCart",e,t,i);t=s.props,e=s.activity,this.sdk.debug.log("Seeka - Browser track addToCart",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"addToCart"}})),yield this.sdk.lib.analytics.track("addToCart",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.addToCart failed",n)}})}addToWishlist(e,t,i){return h(this,null,function*(){try{if(e||(e=yield this.sdk.handlers.getCurrentProduct()),!(yield this.sdk.activity.activityFirePreconditionCheck("addToWishlist",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("addToWishlist",e,t,i);t=n.props,i=n.metadata,e=n.activity,e&&(e=this.sdk.util.sanitise.product(e)||{});let s=yield this.sdk.activity.onAfterActivitySanitise("addToWishlist",e,t,i);t=s.props,e=s.activity,this.sdk.debug.log("Seeka - Browser track addToWishlist",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"addToWishlist"}})),yield this.sdk.lib.analytics.track("addToWishlist",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.addToWishlist failed",n)}})}removeFromCart(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("removeFromCart",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("removeFromCart",e,t,i);t=n.props,i=n.metadata,e=n.activity,e&&(e=this.sdk.util.sanitise.product(e)||{});let s=yield this.sdk.activity.onAfterActivitySanitise("removeFromCart",e,t,i);t=s.props,e=s.activity,this.sdk.debug.log("Seeka - Browser track removeFromCart",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"removeFromCart"}})),yield this.sdk.lib.analytics.track("removeFromCart",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.removeFromCart failed",n)}})}changeProductAttribute(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("changeProductAttribute",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("changeProductAttribute",e,t,i);t=n.props,i=n.metadata,e=n.activity;let s=yield this.sdk.activity.onAfterActivitySanitise("changeProductAttribute",e,t,i);t=s.props,e=s.activity,i=s.metadata,this.sdk.debug.log("Seeka - Browser track changeProductAttribute",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"changeProductAttribute"}})),yield this.sdk.lib.analytics.track("changeProductAttribute",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.changeProductAttribute failed",n)}})}filterItemsByAttribute(e,t,i){return h(this,null,function*(){try{if(!(yield this.sdk.activity.activityFirePreconditionCheck("filterItemsByAttribute",e,t)))return;let n=yield this.sdk.activity.onBeforeActivityTrack("filterItemsByAttribute",e,t,i);t=n.props,i=n.metadata,e=n.activity;let s=yield this.sdk.activity.onAfterActivitySanitise("filterItemsByAttribute",e,t,i);t=s.props,e=s.activity,this.sdk.debug.log("Seeka - Browser track filterItemsByAttribute",F(p(p({},e),t),{metadata:i,logMetadata:{stream:!0,activityName:"filterItemsByAttribute"}})),yield this.sdk.lib.analytics.track("filterItemsByAttribute",p(p({},e),t),{metadata:i})}catch(n){this.sdk.debug.error("Track.filterItemsByAttribute failed",n)}})}};var Ti=class r{constructor(e,t,i,n,s,a,o,c,d){u(this,"scopeKey");u(this,"scopeDescription");u(this,"debug",{});u(this,"key","");u(this,"organisationId","");u(this,"endpoint","");u(this,"ingestEndpoint","");u(this,"plugins",[]);u(this,"enablement");u(this,"handlers",new xi);u(this,"activity",new Mn);u(this,"runtime",{});u(this,"testMode");u(this,"isDisabled",!1);u(this,"tracking",{});var l;this.key=e,this.organisationId=t,i&&(this.tracking=i),n&&(this.endpoint=n),o&&(this.ingestEndpoint=o),this.handlers=s,this.activity=a,this.scopeDescription=d||"",this.scopeKey=c||"",r.ensureDefaults(this),(i!=null&&i.debug&&i.debug.isDiagnosisEnabled||((l=new jt().window.sessionStorage())==null?void 0:l.getItem("seeka_diag_force"))==="1")&&(this.debug||(this.debug={}),this.debug.isDiagnosisEnabled=!0)}static ensureDefaults(e){var n,s,a,o,c,d,l;e.plugins||(e.plugins=[]),e.tracking||(e.tracking={debug:{},defaults:{},analytics:{},processing:{}}),e.tracking.debug||(e.tracking.debug={}),e.tracking.defaults||(e.tracking.defaults={}),e.tracking.analytics||(e.tracking.analytics={}),e.tracking.processing||(e.tracking.processing={}),e.endpoint||(e.endpoint="https://api.seeka.services"),e.ingestEndpoint||(e.ingestEndpoint="https://router.seeka.services");let t={ver:(s=(n=e.runtime)==null?void 0:n.client)==null?void 0:s.ver,type:(o=(a=e.runtime)==null?void 0:a.client)==null?void 0:o.type,origin:(d=(c=e.runtime)==null?void 0:c.client)==null?void 0:d.origin},i=(l=window.Seeka)==null?void 0:l.client;i&&(i.origin&&(t.origin=i.origin),i.type&&(t.type=i.type),i.ver&&(t.ver=i.ver)),e.runtime={ver:Nu,type:"js/"+Ou,client:t},e.debug||(e.debug={}),e.debug.minimumLevel?e.debug.minimumLevel=e.debug.minimumLevel.toLowerCase():e.debug.minimumLevel=_t.DefaultMinimumLevel,e.enablement||(e.enablement="fullyFeatured")}},Dt=class{constructor(e){u(this,"config");u(this,"state");u(this,"debug");u(this,"track");u(this,"hooks");u(this,"handlers");u(this,"activity");u(this,"identity");u(this,"privacy");u(this,"attribution");u(this,"convergeApi");u(this,"dataLayer");u(this,"lib");u(this,"util");u(this,"status");this.config=e||new Ti("",""),Ti.ensureDefaults(this.config),this.status={isIntialiseInFlight:!1,isInitialised:!1},this.dataLayer=new jt,this.state=ie?new Pn(this):new wn(this.config.scopeKey,this.config.organisationId,this.dataLayer.window.localStorage()),this.convergeApi=new Ct(this.config,this),this.debug=new _t(this);try{this.track=new jn(this),this.hooks=new Ze(this),this.handlers=new Nn(this),this.activity=new Ln(this),this.identity=new Rn(this),this.privacy=new Vn(this,void 0),this.attribution=new On(this),this.lib={analytics:{}},this.util={cookie:new _u(this,this.config.scopeKey,this.config.organisationId),parse:new fi,text:new rn,url:new sn,hash:new Wu(this),sanitise:new $u,queue:new Gu(this)}}catch(t){console.error("Failed to construct Converge SDK",t)}}initWithDefaults(){return h(this,null,function*(){if(this.status.isIntialiseInFlight){this.debug.warn("Cannot call initWithDefaults when initialisation already in flight.");return}if(this.status.isInitialised){this.debug.warn("Cannot call initWithDefaults when initialisation already completed.");return}this.status.isIntialiseInFlight=!0,this.status.isIntialiseInFlight=!1,this.init(),this.debug.log("Loaded SDK defaults",this.config)})}init(e){this.initAsync(e).catch(t=>{this.debug.error("Failed to initialise Converge SDK",t)})}initAsync(e){return h(this,null,function*(){var t;try{if(ie){this.debug.verbose("Not initialising SDK in SSR");return}if(this.debug.verbose("Attempting to initialise SDK",this.config),this.status.isIntialiseInFlight){this.debug.warn("Cannot call init when initialisation already in flight.");return}if(this.status.isInitialised){this.debug.warn("Cannot call init when initialisation already completed.");return}if(this.status.isIntialiseInFlight=!0,window.addEventListener("beforeunload",i=>h(this,null,function*(){yield this.hooks.onWindowLifeEnd()})),(t=this.config.debug)!=null&&t.isGlobalErrorListeningEnabled)try{Ed((i,n)=>this.debug.error(i,n))}catch(i){this.debug.error("Failed to bind error listeners",i)}try{yield this.internalInit(e||!1),this.status.isIntialiseInFlight=!1,this.debug.log("Initialised SDK",F(p({},this.config),{plugins:[]}))}catch(i){this.status.isInitialised=!1,this.status.isIntialiseInFlight=!1,this.debug.error("Failed to initialise Converge SDK async",i)}}catch(i){try{this.debug.error("Fatal: Failed to initialise SDK async",i)}catch(n){console.error("Fatal: Failed to initialise SDK async",{err:i,caughtError:n})}}})}internalInit(e){return h(this,null,function*(){var s,a,o,c,d;if(this.config.tracking||(this.config.tracking={}),e||Ze.publishEventGlobal("sdk.init.start"),!ie){let l=this.dataLayer.window.location(),f=this.dataLayer.window.sessionStorage();(this.util.url.getParamFromQueryString("_s_sidekick",l.href)==="1"||f.getItem(l.host+"/sk/_s_sidekick")==="1")&&this.util.url.getParamFromQueryString("_s_sidekick_mode",l.href)!=="diagnose"&&f.getItem(l.host+"/sk/_s_sidekick_mode")!=="diagnose"&&(this.debug.warn("Converge SDK is disabled due to Sidekick being active"),this.config.isDisabled=!0);let m=this.util.url.getParamFromQueryString("test",l.href);if(m)f&&f.setItem("seeka_testmode",m),this.config.testMode=m;else if(f&&f.getItem("seeka_testmode"))this.config.testMode=f.getItem("seeka_testmode");else if(((s=l.hostname)==null?void 0:s.toLowerCase())==="localhost"&&!m&&!f.getItem("seeka_testmode")&&!f.getItem("seeka_testmode_toggle")){let y="Setting SDK test mode to diag due to localhost. Data will not be tracked.";this.debug.log(y,{logMetadata:{stream:!0}}),this.config.testMode="diag",Qe()||this.debug.warn("Seeka - "+y)}if(this.config.testMode){let y=`SDK test mode is set to ${this.config.testMode}.`;this.config.testMode==="diag"&&(y+=" Data will not be sent to destinations.",y+=`\r
\r
`,y+=`\r
\r
`,y+="Append ?test=nostream to url to enable full SDK including event publishing to data destinations for this browser session.",y+=`\r
\r
`,y+="Append ?test=full to url to enable full SDK including diagnostic tool and event publishing for this browser session.",y+=`\r
\r
`,y+=`\r
\r
`,this.config.debug||(this.config.debug={}),this.config.debug.isDiagnosisEnabled=!0,this.debug.toggleDevMode(!0)),this.debug.log(y,{logMetadata:{stream:!0}}),Qe()||(console.warn("--------------------------------"),console.warn("--------------------------------"),console.warn("Seeka - "+y),console.warn("--------------------------------"),console.warn("--------------------------------"))}let g=this.util.url.getParamFromQueryString("_s_diagid",l.href)||f.getItem("seeka_diagid");(g||(a=this.config.debug)!=null&&a.isDiagnosisEnabled)&&(g=g||this.identity.generateNewSessionId(new Date),f&&f.setItem("seeka_diagid",g),this.debug.log("Diag - Session ID",g))}this.identity.getOrAssign();let t=this.attribution.getCurrentTouchCampaign();t&&this.attribution.setLastTouchCampaign(t);let i={app:"converge-"+this.config.scopeKey,debug:((c=(o=this.config)==null?void 0:o.debug)==null?void 0:c.isEnabled)===!0,plugins:[]};i.plugins.push(qu(this.config));let n=null;if(this.config.plugins){let l=this.config.plugins.filter(f=>f.privacyConfig&&f.privacyConfig.isPrivacyPlugin===!0);l&&l.length>0&&l.forEach(f=>h(this,null,function*(){yield this.loadPlugin(f,i)}));for(let f in this.config.plugins)if(Object.prototype.hasOwnProperty.call(this.config.plugins,f)){let m=this.config.plugins[f];if(m.config||(m.config={}),m.type!=="converge-plugin-seeka"&&((d=m.privacyConfig)==null?void 0:d.isPrivacyPlugin)!==!0){if(yield this.loadPlugin(m,i),m.getCrossDomainTrackingRules)try{let g=yield m.getCrossDomainTrackingRules();g&&g.length>0&&(this.debug.verbose(`Plugin.${m.name}.getCrossDomainTrackingRules`,g),this.config.tracking||(this.config.tracking={}),this.config.tracking.analytics||(this.config.tracking.analytics={}),this.config.tracking.analytics.crossDomain||(this.config.tracking.analytics.crossDomain={}),this.config.tracking.analytics.crossDomain.rules||(this.config.tracking.analytics.crossDomain.rules=[]),this.config.tracking.analytics.crossDomain.rules=[...this.config.tracking.analytics.crossDomain.rules,...g])}catch(g){this.debug.error(`Plugin.${m.name}.getCrossDomainTrackingRules failed`,g)}}else m.type==="converge-plugin-seeka"&&(n=m,m.config.scopeKey||(m.config.scopeKey=this.config.scopeKey))}}n!=null&&(yield this.loadPlugin(n,i)),this.lib.analytics=Lu(i),this.lib.analytics.on("ready",()=>h(this,null,function*(){var l,f;if(this.util.queue.addMethodCallToQueue(()=>{this.activity.definitionHelper.bindEventHandlersForActivityDefinitions()},this,[],!1,!0),this.util.queue.addMethodCallToQueue(()=>{if(!this.hooks.disabledListeners||!this.hooks.disabledListeners.includes("onRouteChange")){let m=window.navigation;m&&m.addEventListener("navigate",g=>{if(g.destination&&g.destination.url){if(!g.destination.sameDocument)return;let y=ji(g.destination.url);this.hooks.onRouteChange(y)}})}},this,[],!1,!1),this.util.queue.addMethodCallToQueue(()=>h(this,null,function*(){let m=yield this.handlers.getLoggedInUser();m&&(yield this.identity.mergeProfile(m))}),this,[],!0,!0),this.util.queue.addMethodCallToQueue(()=>h(this,null,function*(){var m,g,y,I,x,S,T,M,C,P,w,L,U,G,$,D,z,re,Z,N,se,ae;this.config.tracking.defaults||(this.config.tracking.defaults={}),(I=(y=(g=(m=window.Seeka)==null?void 0:m.context)==null?void 0:g.tracking)==null?void 0:y.defaults)!=null&&I.currencyCode&&(this.config.tracking.defaults.currencyCode=window.Seeka.context.tracking.defaults.currencyCode),this.config.tracking.analytics||(this.config.tracking.analytics={}),this.config.tracking.analytics.autoCollection||(this.config.tracking.analytics.autoCollection={}),((C=(M=(T=(S=(x=window.Seeka)==null?void 0:x.context)==null?void 0:S.tracking)==null?void 0:T.analytics)==null?void 0:M.autoCollection)==null?void 0:C.activityNames)!=null&&(this.config.tracking.analytics.autoCollection.activityNames=(G=(U=(L=(w=(P=window.Seeka)==null?void 0:P.context)==null?void 0:w.tracking)==null?void 0:L.analytics)==null?void 0:U.autoCollection)==null?void 0:G.activityNames),this.config.tracking.processing||(this.config.tracking.processing={}),(re=(z=(D=($=window.Seeka)==null?void 0:$.context)==null?void 0:D.tracking)==null?void 0:z.processing)!=null&&re.contentIdentificationBehavior&&(this.config.tracking.processing.contentIdentificationBehavior=(ae=(se=(N=(Z=window.Seeka)==null?void 0:Z.context)==null?void 0:N.tracking)==null?void 0:se.processing)==null?void 0:ae.contentIdentificationBehavior)}),this,[],!0,!0),window.ConvergeTrackingQueue)try{window.ConvergeTrackingQueue.length>0&&window.ConvergeTrackingQueue.forEach(m=>{m&&m.t==="act"&&m.a.length>1?this.util.queue.addMethodCallToQueue(this.track[m.a[0]],this.track,m.a.slice(1),!0,!1):m&&m.t==="id"&&m.a.length>1?this.util.queue.addMethodCallToQueue(this.identity[m.a[0]],this.identity,m.a.slice(1),!0,!1):this.debug.warn("Invalid pre-initialise queue item",m)},this)}catch(m){this.debug.error("Failed to process pre-initialise queue items",m)}yield this.util.queue.startProcessingPriorityMethods(),this.status.isInitialised=!0,this.activity.queueCollectionOfAutomaticActivities(),e?Ze.publishEventGlobal("sdk.ready.instance"):Ze.publishEventGlobal("sdk.ready");try{new Tn(this).addEventListeners()}catch(m){this.debug.error("Init Now book it listeners error",m)}try{new an(this).addEventListeners()}catch(m){this.debug.error("Init Klaviyo listeners error",m)}gl((f=(l=this.config)==null?void 0:l.runtime)==null?void 0:f.ver),yield this.hooks.onPageReady()}))})}loadPlugin(e,t){return h(this,null,function*(){if(this.debug.verbose(`Attempting to load ${e.name}`,e.config),e.sdk=this,e.isProxyPlugin)e.enabled=!0,e.analyticsLibPlugin?(e.analyticsLibPlugin.config||(e.analyticsLibPlugin.config={}),e.analyticsLibPlugin.config.sdk=this,t.plugins.push(e.analyticsLibPlugin),this.debug.verbose(`Loaded proxy plugin ${e.name}`,F(p({},e.analyticsLibPlugin),{config:{plugins:[]}}))):this.debug.warn(`Attempting to load ${e.name} failed due to isProxyPlugin=true and analyticsLibPlugin on plugin is not defined`,e.config);else{let i=yield this.privacy.isPluginLoadable(e);e.enabled=i,yield this.loadIdentifiers(e),e.beforeInit&&(yield e.beforeInit()),t.plugins.push(Ud(e,i)),this.debug.log(`Loaded plugin ${e.name}`,{version:e.version||"unknown",config:e.config})}})}loadIdentifiers(e){return h(this,null,function*(){if(e!=null&&e.collectIdentifiers)if(e.enabled)try{let t=yield e.collectIdentifiers();e.sdk.debug.verbose(`Plugin.${e.name}.collectIdentifiers`,t),t&&(yield this.identity.mergeProfile(t))}catch(t){this.debug.error(`Plugin.${e.name}.collectIdentifiers failed`,t)}else this.debug.verbose(`Plugin.${e==null?void 0:e.name}.collectIdentifiers - skipping due to plugin disabled`)})}refreshIdentifiers(){return h(this,null,function*(){var e;return(e=this.config.plugins)==null||e.forEach(t=>h(this,null,function*(){yield this.loadIdentifiers(t)})),yield this.identity.getProfile()})}};var Ei=class{constructor(e){u(this,"instances",{});u(this,"status",{isInitialised:!1,isIntialiseInFlight:!1});u(this,"identity",{getTrait:e=>{throw new Error("Method not available for scoped install.")},addTrait:(e,t,i)=>{throw new Error("Method not available for scoped install.")},setTrait:(e,t,i)=>{throw new Error("Method not available for scoped install.")},getProfile:()=>{throw new Error("Method not available for scoped install.")},setProfile:e=>{throw new Error("Method not available for scoped install.")},touchAndGetSessionId:()=>{throw new Error("Method not available for scoped install.")},mergeProfile:e=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(t=>this.instances[t].identity.mergeProfile(e)))}),mergeTwoProfiles:(e,t)=>{throw new Error("Method not available for scoped install.")},reset:e=>{throw new Error("Method not available for scoped install.")},syncIdentity:e=>{throw new Error("Method not available for scoped install.")},isAnonymous:e=>{throw new Error("Method not available for scoped install.")},flushIdentitySyncQueue:()=>{throw new Error("Method not available for scoped install.")},sanitiseProfile:e=>{throw new Error("Method not available for scoped install.")},generateNewSessionId:function(e){throw new Error("Function not implemented.")},personId:void 0,device:{}});u(this,"track",{custom:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.custom(e,t,i)))}),viewPage:(e,t)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(i=>this.instances[i].track.viewPage(e,t)))}),addPaymentMethod:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.addPaymentMethod(e,t,i)))}),keywordSearch:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.keywordSearch(e,t,i)))}),userLogin:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.userLogin(e,t,i)))}),userLoginSignup:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.userLoginSignup(e,t,i)))}),newsletterSignup:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.newsletterSignup(e,t,i)))}),applyPromotionalCode:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.applyPromotionalCode(e,t,i)))}),lead:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.lead(e,t,i)))}),startTrial:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.startTrial(e,t,i)))}),contactMessage:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.contactMessage(e,t,i)))}),schedule:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.schedule(e,t,i)))}),viewContentItem:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.viewContentItem(e,t,i)))}),order:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.order(e,t,i)))}),subscriptionItemPurchase:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.subscriptionItemPurchase(e,t,i)))}),initiateCheckout:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.initiateCheckout(e,t,i)))}),viewProduct:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.viewProduct(e,t,i)))}),addToCart:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.addToCart(e,t,i)))}),addToWishlist:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.addToWishlist(e,t,i)))}),removeFromCart:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.removeFromCart(e,t,i)))}),changeProductAttribute:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.changeProductAttribute(e,t,i)))}),filterItemsByAttribute:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.filterItemsByAttribute(e,t,i)))}),activity:(e,t,i)=>h(this,null,function*(){yield Promise.all(Object.keys(this.instances).map(n=>this.instances[n].track.activity(e,t,i)))})});u(this,"debug",{log:(e,t)=>{Object.keys(this.instances).forEach(i=>this.instances[i].debug.log(e,t))},setEnabled:(e,t)=>{Object.keys(this.instances).forEach(i=>this.instances[i].debug.setEnabled(e,t))},toggleDevMode:e=>Object.keys(this.instances).map(t=>this.instances[t].debug.toggleDevMode(e)).filter(t=>t===!0).length>0,setMinimumLevel:e=>{Object.keys(this.instances).forEach(t=>this.instances[t].debug.setMinimumLevel(e))},isEnabled:()=>{throw new Error("Method not available for scoped install.")},verbose:(e,t)=>{Object.keys(this.instances).forEach(i=>this.instances[i].debug.verbose(e,t))},error:(e,t)=>{Object.keys(this.instances).forEach(i=>this.instances[i].debug.error(e,t))},warn:(e,t)=>{Object.keys(this.instances).forEach(i=>this.instances[i].debug.warn(e,t))}});try{if(!e||e.length===0){console.error("Seeka - Install - No configuration to load",{configs:e});return}let t=Object.keys(this.instances),i=t.length>0||e.length>1;for(let n=0;n<e.length;n++){let s=e[n];if(s.scopeKey=i||s.scopeKey?s.scopeKey:s.key.replace(/sdkr_/gi,"").slice(-16),i&&(!s.scopeKey||!s.scopeDescription)){console.error("Seeka - Install - Cannot install SDK with empty scope key or scope description",{scopeKey:s.scopeKey,scopeDescription:s.scopeDescription});continue}if(t.indexOf(s.scopeKey)>-1){console.error("Seeka - Install - Cannot install SDK as an instance is already installed with this scope key",{scopeKey:s.scopeKey,scopeDescription:s.scopeDescription,loadedScopeKeys:t});continue}this.instances[s.scopeKey]=new Dt(s)}}catch(t){console.error("Seeka - Install - Failed to construct scoped Converge SDK",t)}}init(){try{let e=Object.keys(this.instances);this.status.isIntialiseInFlight=!0;let t=e.length>1;t&&Ze.publishEventGlobal("sdk.init.start");let i=[];for(let n=0;n<e.length;n++){let s=e[n],a=this.instances[s];!a.status||a.status.isInitialised===!1&&a.status.isIntialiseInFlight===!1?(a.debug.log("Seeka - Install - initialising instance",{scopeKey:s}),i.push(a.initAsync(t)),a.debug.log("Install - Install - initialised scoped SDK with key "+s,{scopeKey:s,scopeDescription:a.config.scopeDescription})):a.debug.warn("Install - Not initialising scoped SDK with key "+s,{status:a.status,scopeKey:s,scopeDescription:a.config.scopeDescription})}Promise.all(i).then(()=>{t&&Ze.publishEventGlobal("sdk.ready"),this.status.isIntialiseInFlight=!1,this.status.isInitialised=!0}).catch(n=>{this.status.isIntialiseInFlight=!1,console.error("Seeka - Install - Failed to initialise scoped SDK",n)})}catch(e){console.error("Seeka - Install - Failed to initialise scoped SDK",e)}}};var pl=(r,e)=>{window.Converge||(window.Converge={}),window.ConvergeTrackingQueue||(window.ConvergeTrackingQueue=[]),window.Converge.track||(window.Converge.track=new ui(r)),window.Converge.identity||(window.Converge.identity=new di(e)),window._skInitH||(window._skInitH=[])},hl=()=>{window.addEventListener("message",r=>{let e=r.data;e.dest==="seeka"&&window.Converge[e.payload.api][e.payload.method](...e.payload.params)},!1)};var yl=(r,e,t)=>{var n;if(!e||e.length===0||!r)return t;let i=r.toLowerCase().replace("www.","").split(":")[0];for(let s=0;s<e.length;s++){let a=e[s],o=(n=a.hostname)==null?void 0:n.toLowerCase().replace("www.","").split(":")[0];if(i.endsWith(o)||o.endsWith(i)||i===o)return a;let c=o.split(".").slice(1).join(".");if(i.endsWith(c)||c.endsWith(i))return a}return t};var so=(r,e)=>{r.forEach(t=>{if(t.id&&vl.has(t.id))return;t.id&&vl.add(t.id);let i=document.getElementsByTagName("script")[0];e&&document.body?document.body.appendChild(t):i&&i.parentNode?i.parentNode.insertBefore(t,i):document.head.appendChild(t)})},vl=new Set,zk=r=>{var n;let e="sk_int";(sessionStorage&&sessionStorage.getItem(e)==="1"||((n=window.location.search)==null?void 0:n.indexOf("_s_sidekick"))>-1)&&so(r,!1);let t=["scroll","click","keydown","mousemove","touchstart","touchmove","mousedown"],i=s=>{so(r,!0),t.forEach(a=>window.removeEventListener(a,i)),sessionStorage&&sessionStorage.setItem(e,"1")};t.forEach(s=>window.addEventListener(s,i))},Wn=(r,e,t,i)=>{var a,o,c,d;if(window._skInitH||(window._skInitH=[]),window._skInitH.indexOf(r)>-1)return;window._skInitH.push(r);let n=document.createElement("script");n.async=!0,n.id="seeka-init",e&&(n.onload=function(l){e(l)}),t&&(n.onerror=function(l){t(l)});let s=null;if(r.indexOf("cache=")>-1||((a=window.location.search)==null?void 0:a.indexOf("cache=0"))>-1||((o=window.location.search)==null?void 0:o.indexOf("test=full"))>-1||((c=window.location.search)==null?void 0:c.indexOf("_cache=0"))>-1||((d=window.location.search)==null?void 0:d.indexOf("_s_sidekick_mode"))>-1)s=new Date().getTime().toString();else try{s=sessionStorage.getItem("sk_config_cache")}catch(l){s=""}s&&(r=r+"&cache="+s),n.src=r,window.Seeka=window.Seeka||{},window.Seeka.client=window.Seeka.client||{};try{window.Seeka.client.origin={h:new URL(r).hostname}}catch(l){console.log(l)}i===!0?zk([n]):so([n],!1)},bl=r=>{if(!r||!r.instances||r.instances.length===0)return;let e={hostname:"sdk.seeka.services"};(!r.hosts||r.hosts.length===0)&&(r.hosts=[e]);let t=!1;try{t=!!sessionStorage.getItem("sk_ses_h_def")}catch(o){console.error(o)}let i=t?e:yl(window.location.hostname,r.hosts,e),n=r.instances.map(o=>o.id).join("_"),s="";r.instances.forEach((o,c)=>{s+=(s?"&":"?")+`k[${c}]=${o.key}`});let a=o=>`${o.protocol||"https"}://${o.hostname}${o.port?":"+o.port:""}${o.path===void 0?"/static/c":o.path}/${n}${o.ext===void 0?".js":o.ext}${s}${r.extraParams?"&"+r.extraParams:""}`;Wn(a(i),r.onLoad,o=>{i.hostname!==e.hostname?window.location.hostname==="localhost"?console.error("Failed Seeka "+i.hostname):(console.warn("Failed Seeka "+i.hostname+". Using "+e.hostname),sessionStorage.setItem("sk_ses_h_def","1"),Wn(a(e),r.onLoad,()=>{console.error("Failed Seeka "+e.hostname),r.onError&&r.onError(o)})):r.onError&&r.onError(o)},r.waitForInteraction)};var kl=()=>{pl((r,e)=>{window.ConvergeTrackingQueue.push({t:"act",a:[r,...e]})},(r,e)=>{window.ConvergeTrackingQueue.push({t:"id",a:[r,...e]})})};function on(r,e,t,i){var n;if(!e||e.length===0)return{wasAugmented:!1,activity:r,wasMatched:!1};t.debug.verbose("Checking if activity should be augmented by pipeline rule containers",{activityIdentifier:(n=r.props)==null?void 0:n.activityIdentifier});for(let s of e.sort((a,o)=>(a.processingOrder||0)-(o.processingOrder||0))){let a=Yk(r,s,t,i);if(a.wasMatched)return a}return{wasAugmented:!1,activity:r,wasMatched:!1}}function Yk(r,e,t,i){var n,s;if(!e.pipelineRules||e.pipelineRules.length===0)return{wasAugmented:!1,activity:r,wasMatched:!1};for(let a of e.pipelineRules){if(!a.activityFilter){t.debug.warn("Pipeline rule has no activity filter, skipping",{rule:a});continue}let o=In(a.activityFilter,r,i);if(o.isMatch)return t.debug.verbose("Pipeline rule matched activity with rule",{activityIdentifier:(n=r.props)==null?void 0:n.activityIdentifier,filterResult:o,rule:a}),Zk(r,a,t);t.debug.verbose("Pipeline rule did not match activity with rule",{activityIdentifier:(s=r.props)==null?void 0:s.activityIdentifier,filterResult:o,rule:a})}return{wasAugmented:!1,activity:r,wasMatched:!1}}function Zk(r,e,t){var o,c,d;if(!e)return{wasAugmented:!1,activity:r,wasMatched:!0,rule:e};let i=Rt(r);i.props||(i.props={});let n=!1,s;e.activityModifiers&&(e.activityModifiers.activityName==="custom"?e.activityModifiers.activityNameCustom?(i.props.activityNameCustom=e.activityModifiers.activityNameCustom,s=e.activityModifiers.activityNameOverride||void 0,n=!0,t.debug.verbose("Applying pipeline rule destination settings to activity with rule for custom activity",{activityIdentifier:(o=r.props)==null?void 0:o.activityIdentifier,activity:r,rule:e})):t.debug.warn("Not Applying pipeline rule destination settings to activity with rule for custom activity as activityNameCustom was empty for activityModifiers",{activityIdentifier:(c=r.props)==null?void 0:c.activityIdentifier,activity:r,rule:e}):e.activityModifiers.activityName!=="undefined"&&(t.debug.verbose("Applying pipeline rule destination settings to activity with rule for standard activity",{activityIdentifier:(d=r.props)==null?void 0:d.activityIdentifier,activity:r,rule:e}),i.activityName=e.activityModifiers.activityName,i.props.activityNameCustom=void 0,s=e.activityModifiers.activityNameOverride||void 0,n=!0));let a={wasAugmented:n,activity:i,wasMatched:!0,rule:e,destinationActivityNameOverride:s};return r.metadata||(r.metadata={}),r.metadata.augmentResult=a,a}var Xk={bindEventListeners:hl,SeekaInit:Wn,setStandardGlobals:kl,SeekaInstall:bl};window.SeekaConvergeCore=oo;window.ConvergeSdk=r=>{let e=new Dt(r);return e.init(),e};window.SeekaSdk=r=>{let e=new Ei(r);return e.init(),Object.keys(e.instances).length===1?e.instances[Object.keys(e.instances)[0]]:e};})();
/*! Bundled license information:

lodash-es/lodash.js:
  (**
   * @license
   * Lodash (Custom Build) <https://lodash.com/>
   * Build: `lodash modularize exports="es" -o ./`
   * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
   * Released under MIT license <https://lodash.com/license>
   * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
   * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
   *)

@noble/hashes/esm/utils.js:
  (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
*/
"use strict";(()=>{var K=Object.defineProperty,J=Object.defineProperties;var Y=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var Z=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var j=(r,n,t)=>n in r?K(r,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[n]=t,T=(r,n)=>{for(var t in n||(n={}))Z.call(n,t)&&j(r,t,n[t]);if(O)for(var t of O(n))Q.call(n,t)&&j(r,t,n[t]);return r},R=(r,n)=>J(r,Y(n));var y=(r,n,t)=>j(r,typeof n!="symbol"?n+"":n,t);var z=(r,n,t)=>new Promise((i,o)=>{var c=u=>{try{l(t.next(u))}catch(s){o(s)}},e=u=>{try{l(t.throw(u))}catch(s){o(s)}},l=u=>u.done?i(u.value):Promise.resolve(u.value).then(c,e);l((t=t.apply(r,n)).next())});var X=" daum[ /]| deusu/| yadirectfetcher|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|(?<!cam)scan|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|\\||^<|^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s\\w+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|^{{.*}}$|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|firephp|functionize|gomezagent|grab|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|ips-agent|java(?!;)|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|xtate/",ee=/bot|crawl|http|lighthouse|scan|search|spider/i,C;function te(){if(C instanceof RegExp)return C;try{C=new RegExp(X,"i")}catch(r){C=ee}return C}function U(r){return!!r&&te().test(r)}function b(r,n,t,i){return new(t||(t=Promise))(function(o,c){function e(s){try{u(i.next(s))}catch(a){c(a)}}function l(s){try{u(i.throw(s))}catch(a){c(a)}}function u(s){var a;s.done?o(s.value):(a=s.value,a instanceof t?a:new t(function(g){g(a)})).then(e,l)}u((i=i.apply(r,n||[])).next())})}function w(r,n){var t,i,o,c,e={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(u){return function(s){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;c&&(c=0,a[0]&&(e=0)),e;)try{if(t=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return e.label++,{value:a[1],done:!1};case 5:e.label++,i=a[1],a=[0];continue;case 7:a=e.ops.pop(),e.trys.pop();continue;default:if(o=e.trys,!((o=o.length>0&&o[o.length-1])||a[0]!==6&&a[0]!==2)){e=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){e.label=a[1];break}if(a[0]===6&&e.label<o[1]){e.label=o[1],o=a;break}if(o&&e.label<o[2]){e.label=o[2],e.ops.push(a);break}o[2]&&e.ops.pop(),e.trys.pop();continue}a=n.call(r,e)}catch(g){a=[6,g],i=0}finally{t=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([u,s])}}}var f={exclude:[],include:[],logging:!0,timeout:1e3};var G={},re={timeout:"true"},v=function(r,n){typeof window!="undefined"&&(G[r]=n)},ne=function(){return Object.fromEntries(Object.entries(G).filter(function(r){var n,t=r[0];return!(!((n=f==null?void 0:f.exclude)===null||n===void 0)&&n.includes(t))}).filter(function(r){var n,t,i,o,c=r[0];return!((n=f==null?void 0:f.include)===null||n===void 0)&&n.some(function(e){return e.includes(".")})?(t=f==null?void 0:f.include)===null||t===void 0?void 0:t.some(function(e){return e.startsWith(c)}):((i=f==null?void 0:f.include)===null||i===void 0?void 0:i.length)===0||((o=f==null?void 0:f.include)===null||o===void 0?void 0:o.includes(c))}).map(function(r){return[r[0],(0,r[1])()]}))};function A(r){return r^=r>>>16,r=Math.imul(r,2246822507),r^=r>>>13,r=Math.imul(r,3266489909),(r^=r>>>16)>>>0}var h=new Uint32Array([597399067,2869860233,951274213,2716044179]);function m(r,n){return r<<n|r>>>32-n}function _(r,n){var t;if(n===void 0&&(n=0),n=n?0|n:0,typeof r=="string"&&(t=r,r=new TextEncoder().encode(t).buffer),!(r instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var i=new Uint32Array([n,n,n,n]);(function(c,e){for(var l=c.byteLength/16|0,u=new Uint32Array(c,0,4*l),s=0;s<l;s++){var a=u.subarray(4*s,4*(s+1));a[0]=Math.imul(a[0],h[0]),a[0]=m(a[0],15),a[0]=Math.imul(a[0],h[1]),e[0]=e[0]^a[0],e[0]=m(e[0],19),e[0]=e[0]+e[1],e[0]=Math.imul(e[0],5)+1444728091,a[1]=Math.imul(a[1],h[1]),a[1]=m(a[1],16),a[1]=Math.imul(a[1],h[2]),e[1]=e[1]^a[1],e[1]=m(e[1],17),e[1]=e[1]+e[2],e[1]=Math.imul(e[1],5)+197830471,a[2]=Math.imul(a[2],h[2]),a[2]=m(a[2],17),a[2]=Math.imul(a[2],h[3]),e[2]=e[2]^a[2],e[2]=m(e[2],15),e[2]=e[2]+e[3],e[2]=Math.imul(e[2],5)+2530024501,a[3]=Math.imul(a[3],h[3]),a[3]=m(a[3],18),a[3]=Math.imul(a[3],h[0]),e[3]=e[3]^a[3],e[3]=m(e[3],13),e[3]=e[3]+e[0],e[3]=Math.imul(e[3],5)+850148119}})(r,i),function(c,e){var l=c.byteLength/16|0,u=c.byteLength%16,s=new Uint32Array(4),a=new Uint8Array(c,16*l,u);switch(u){case 15:s[3]=s[3]^a[14]<<16;case 14:s[3]=s[3]^a[13]<<8;case 13:s[3]=s[3]^a[12],s[3]=Math.imul(s[3],h[3]),s[3]=m(s[3],18),s[3]=Math.imul(s[3],h[0]),e[3]=e[3]^s[3];case 12:s[2]=s[2]^a[11]<<24;case 11:s[2]=s[2]^a[10]<<16;case 10:s[2]=s[2]^a[9]<<8;case 9:s[2]=s[2]^a[8],s[2]=Math.imul(s[2],h[2]),s[2]=m(s[2],17),s[2]=Math.imul(s[2],h[3]),e[2]=e[2]^s[2];case 8:s[1]=s[1]^a[7]<<24;case 7:s[1]=s[1]^a[6]<<16;case 6:s[1]=s[1]^a[5]<<8;case 5:s[1]=s[1]^a[4],s[1]=Math.imul(s[1],h[1]),s[1]=m(s[1],16),s[1]=Math.imul(s[1],h[2]),e[1]=e[1]^s[1];case 4:s[0]=s[0]^a[3]<<24;case 3:s[0]=s[0]^a[2]<<16;case 2:s[0]=s[0]^a[1]<<8;case 1:s[0]=s[0]^a[0],s[0]=Math.imul(s[0],h[0]),s[0]=m(s[0],15),s[0]=Math.imul(s[0],h[1]),e[0]=e[0]^s[0]}}(r,i),function(c,e){e[0]=e[0]^c.byteLength,e[1]=e[1]^c.byteLength,e[2]=e[2]^c.byteLength,e[3]=e[3]^c.byteLength,e[0]=e[0]+e[1]|0,e[0]=e[0]+e[2]|0,e[0]=e[0]+e[3]|0,e[1]=e[1]+e[0]|0,e[2]=e[2]+e[0]|0,e[3]=e[3]+e[0]|0,e[0]=A(e[0]),e[1]=A(e[1]),e[2]=A(e[2]),e[3]=A(e[3]),e[0]=e[0]+e[1]|0,e[0]=e[0]+e[2]|0,e[0]=e[0]+e[3]|0,e[1]=e[1]+e[0]|0,e[2]=e[2]+e[0]|0,e[3]=e[3]+e[0]|0}(r,i);var o=new Uint8Array(i.buffer);return Array.from(o).map(function(c){return c.toString(16).padStart(2,"0")}).join("")}function oe(r,n){return new Promise(function(t){setTimeout(function(){return t(n)},r)})}function ie(r,n,t){return Promise.all(r.map(function(i){return Promise.race([i,oe(n,t)])}))}function L(){return b(this,void 0,void 0,function(){var r,n,t,i,o;return w(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),r=ne(),n=Object.keys(r),[4,ie(Object.values(r),(f==null?void 0:f.timeout)||1e3,re)];case 1:return t=c.sent(),i=t.filter(function(e){return e!==void 0}),o={},i.forEach(function(e,l){o[n[l]]=e}),[2,W(o,f.exclude||[],f.include||[],"")];case 2:throw c.sent();case 3:return[2]}})})}function W(r,n,t,i){i===void 0&&(i="");for(var o={},c=function(s,a){var g=i+s+".";if(typeof a!="object"||Array.isArray(a)){var I=n.some(function(x){return g.startsWith(x)}),E=t.some(function(x){return g.startsWith(x)});I&&!E||(o[s]=a)}else{var P=W(a,n,t,g);Object.keys(P).length>0&&(o[s]=P)}},e=0,l=Object.entries(r);e<l.length;e++){var u=l[e];c(u[0],u[1])}return o}function V(r){return b(this,void 0,void 0,function(){var n,t;return w(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,L()];case 1:return n=i.sent(),t=_(JSON.stringify(n)),Math.random()<1e-5&&f.logging&&function(o,c){b(this,void 0,void 0,function(){var e,l;return w(this,function(u){switch(u.label){case 0:if(e="https://logging.thumbmarkjs.com/v1/log",l={thumbmark:o,components:c,version:"0.20.6"},sessionStorage.getItem("_tmjs_l"))return[3,4];sessionStorage.setItem("_tmjs_l","1"),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})];case 2:case 3:return u.sent(),[3,4];case 4:return[2]}})})}(t,n),r?[2,{hash:t.toString(),data:n}]:[2,t.toString()];case 2:throw i.sent();case 3:return[2]}})})}function k(){if(typeof navigator=="undefined")return{name:"unknown",version:"unknown"};for(var r=navigator.userAgent,n={edg:"Edge",opr:"Opera",samsung:"SamsungBrowser"},t=0,i=[new RegExp("(?<name>SamsungBrowser)\\/(?<version>\\d+(?:\\.\\d+)?)"),new RegExp("(?<name>Edge|Edg)\\/(?<version>\\d+(?:\\.\\d+)?)"),new RegExp("(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\\/(?<version>\\d+(?:\\.\\d+)?)"),new RegExp("(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\\/(?<version>\\d+(?:\\.\\d+)?)"),new RegExp("(?<name>Safari)\\/(?<version>\\d+(?:\\.\\d+)?)"),new RegExp("(?<name>MSIE|Trident|IEMobile).+?(?<version>\\d+(?:\\.\\d+)?)"),new RegExp("(?<name>samsung).*Version\\/(?<version>\\d+(?:\\.\\d+)?)","i"),new RegExp("(?<name>[A-Za-z]+)\\/(?<version>\\d+(?:\\.\\d+)?)")];t<i.length;t++){var o=i[t],c=r.match(o);if(c&&c.groups)return{name:n[c.groups.name.toLowerCase()]||c.groups.name,version:c.groups.version}}return{name:"unknown",version:"unknown"}}function ae(r){for(var n=0,t=0;t<r.length;++t)n+=Math.abs(r[t]);return n}var se=k();function $(r,n,t){for(var i=[],o=0;o<r[0].data.length;o++){for(var c=[],e=0;e<r.length;e++)c.push(r[e].data[o]);i.push(ce(c))}var l=new Uint8ClampedArray(i);return new ImageData(l,n,t)}function ce(r){if(r.length===0)return 0;for(var n={},t=0,i=r;t<i.length;t++)n[c=i[t]]=(n[c]||0)+1;var o=r[0];for(var c in n)n[c]>n[o]&&(o=parseInt(c,10));return o}["SamsungBrowser","Safari"].includes(se.name)||v("audio",function(){return b(this,void 0,void 0,function(){return w(this,function(r){return[2,new Promise(function(n,t){try{var i=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),o=i.createBufferSource(),c=i.createOscillator();c.frequency.value=1e3;var e,l=i.createDynamicsCompressor();l.threshold.value=-50,l.knee.value=40,l.ratio.value=12,l.attack.value=0,l.release.value=.2,c.connect(l),l.connect(i.destination),c.start(),i.oncomplete=function(u){e=u.renderedBuffer.getChannelData(0),n({sampleHash:ae(e),oscillator:c.type,maxChannels:i.destination.maxChannelCount,channelCountMode:o.channelCountMode})},i.startRendering()}catch(u){console.error("Error creating audio fingerprint:",u),t(u)}})]})})});var H=k(),F=H.name.toLowerCase(),le=H.version.split(".")[0]||"0",ue=parseInt(le,10);F==="firefox"||F==="safari"&&ue===17||v("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(r){var n=Array.from({length:3},function(){return function(){var t=document.createElement("canvas"),i=t.getContext("2d");if(!i)return new ImageData(1,1);t.width=280,t.height=20;var o=i.createLinearGradient(0,0,t.width,t.height);o.addColorStop(0,"red"),o.addColorStop(.16666666666666666,"orange"),o.addColorStop(.3333333333333333,"yellow"),o.addColorStop(.5,"green"),o.addColorStop(.6666666666666666,"blue"),o.addColorStop(.8333333333333334,"indigo"),o.addColorStop(1,"violet"),i.fillStyle=o,i.fillRect(0,0,t.width,t.height);var c="Random Text WMwmil10Oo";return i.font="23.123px Arial",i.fillStyle="black",i.fillText(c,-5,15),i.fillStyle="rgba(0, 0, 255, 0.5)",i.fillText(c,-3.3,17.7),i.beginPath(),i.moveTo(0,0),i.lineTo(2*t.width/7,t.height),i.strokeStyle="white",i.lineWidth=2,i.stroke(),i.getImageData(0,0,t.width,t.height)}()});r({commonImageDataHash:_($(n,280,20).data.toString()).toString()})})});var M,de=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],fe=["monospace","sans-serif","serif"];function N(r,n){if(!r)throw new Error("Canvas context not supported");return r.font,r.font="72px ".concat(n),r.measureText("WwMmLli0Oo").width}function he(){var r,n=document.createElement("canvas"),t=(r=n.getContext("webgl"))!==null&&r!==void 0?r:n.getContext("experimental-webgl");if(t&&"getParameter"in t)try{var i=(t.getParameter(t.VENDOR)||"").toString(),o=(t.getParameter(t.RENDERER)||"").toString(),c={vendor:i,renderer:o,version:(t.getParameter(t.VERSION)||"").toString(),shadingLanguageVersion:(t.getParameter(t.SHADING_LANGUAGE_VERSION)||"").toString()};if(!o.length||!i.length){var e=t.getExtension("WEBGL_debug_renderer_info");if(e){var l=(t.getParameter(e.UNMASKED_VENDOR_WEBGL)||"").toString(),u=(t.getParameter(e.UNMASKED_RENDERER_WEBGL)||"").toString();l&&(c.vendorUnmasked=l),u&&(c.rendererUnmasked=u)}}return c}catch(s){}return"undefined"}function ge(){var r=new Float32Array(1),n=new Uint8Array(r.buffer);return r[0]=1/0,r[0]=r[0]-r[0],n[3]}function pe(r,n){var t={};return n.forEach(function(i){var o=function(c){if(c.length===0)return null;var e={};c.forEach(function(s){var a=String(s);e[a]=(e[a]||0)+1});var l=c[0],u=1;return Object.keys(e).forEach(function(s){e[s]>u&&(l=s,u=e[s])}),l}(r.map(function(c){return i in c?c[i]:void 0}).filter(function(c){return c!==void 0}));o&&(t[i]=o)}),t}function me(){var r=[],n={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(n).forEach(function(t){n[t].forEach(function(i){matchMedia("(".concat(t,": ").concat(i,")")).matches&&r.push("".concat(t,": ").concat(i))})}),r}k().name!="Firefox"&&v("fonts",function(){var r=this;return new Promise(function(n,t){try{(function(i){var o;b(this,void 0,void 0,function(){var c,e,l;return w(this,function(u){switch(u.label){case 0:return document.body?[3,2]:[4,(s=50,new Promise(function(g){return setTimeout(g,s,a)}))];case 1:return u.sent(),[3,0];case 2:if((c=document.createElement("iframe")).setAttribute("frameBorder","0"),(e=c.style).setProperty("position","fixed"),e.setProperty("display","block","important"),e.setProperty("visibility","visible"),e.setProperty("border","0"),e.setProperty("opacity","0"),c.src="about:blank",document.body.appendChild(c),!(l=c.contentDocument||((o=c.contentWindow)===null||o===void 0?void 0:o.document)))throw new Error("Iframe document is not accessible");return i({iframe:l}),setTimeout(function(){document.body.removeChild(c)},0),[2]}var s,a})})})(function(i){var o=i.iframe;return b(r,void 0,void 0,function(){var c,e,l,u;return w(this,function(s){return c=o.createElement("canvas"),e=c.getContext("2d"),l=fe.map(function(a){return N(e,a)}),u={},de.forEach(function(a){var g=N(e,a);l.includes(g)||(u[a]=g)}),n(u),[2]})})})}catch(i){t({error:"unsupported"})}})}),v("hardware",function(){return new Promise(function(r,n){var t=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,i=window.performance&&window.performance.memory?window.performance.memory:0;r({videocard:he(),architecture:ge(),deviceMemory:t.toString()||"undefined",jsHeapSizeLimit:i.jsHeapSizeLimit||0})})}),v("locales",function(){return new Promise(function(r){r({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),v("permissions",function(){return b(this,void 0,void 0,function(){var r;return w(this,function(n){return M=(f==null?void 0:f.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],k().name.toLowerCase()==="safari"&&(M=M.filter(function(t){return!["camera","geolocation","microphone"].includes(t)})),r=Array.from({length:(f==null?void 0:f.retries)||3},function(){return function(){return b(this,void 0,void 0,function(){var t,i,o,c,e;return w(this,function(l){switch(l.label){case 0:t={},i=0,o=M,l.label=1;case 1:if(!(i<o.length))return[3,6];c=o[i],l.label=2;case 2:return l.trys.push([2,4,,5]),[4,navigator.permissions.query({name:c})];case 3:return e=l.sent(),t[c]=e.state.toString(),[3,5];case 4:return l.sent(),[3,5];case 5:return i++,[3,1];case 6:return[2,t]}})})}()}),[2,Promise.all(r).then(function(t){return pe(t,M)})]})})}),v("plugins",function(){var r=[];if(navigator.plugins)for(var n=0;n<navigator.plugins.length;n++){var t=navigator.plugins[n];r.push([t.name,t.filename,t.description].join("|"))}return new Promise(function(i){i({plugins:r})})}),v("screen",function(){return new Promise(function(r){r({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:me()})})}),v("system",function(){return new Promise(function(r){var n=k(),t={platform:window.navigator.platform,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:n.name,version:n.version}};n.name.toLowerCase()!=="safari"&&(t.applePayVersion=function(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var i=window.ApplePaySession.supportsVersion,o=15;o>0;o--)if(i(o))return o}catch(c){return 0}return 0}(),t.cookieEnabled=window.navigator.cookieEnabled),r(t)})});var p,ve=k().name!=="SamsungBrowser"?1:3,d=null;v("webgl",function(){return b(this,void 0,void 0,function(){var r;return w(this,function(n){typeof document!="undefined"&&((p=document.createElement("canvas")).width=200,p.height=100,d=p.getContext("webgl"));try{if(!d)throw new Error("WebGL not supported");return r=Array.from({length:ve},function(){return function(){try{if(!d)throw new Error("WebGL not supported");var t=`
          attribute vec2 position;
          void main() {
              gl_Position = vec4(position, 0.0, 1.0);
          }
      `,i=`
          precision mediump float;
          void main() {
              gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
          }
      `,o=d.createShader(d.VERTEX_SHADER),c=d.createShader(d.FRAGMENT_SHADER);if(!o||!c)throw new Error("Failed to create shaders");if(d.shaderSource(o,t),d.shaderSource(c,i),d.compileShader(o),!d.getShaderParameter(o,d.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+d.getShaderInfoLog(o));if(d.compileShader(c),!d.getShaderParameter(c,d.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+d.getShaderInfoLog(c));var e=d.createProgram();if(!e)throw new Error("Failed to create shader program");if(d.attachShader(e,o),d.attachShader(e,c),d.linkProgram(e),!d.getProgramParameter(e,d.LINK_STATUS))throw new Error("Shader program linking failed: "+d.getProgramInfoLog(e));d.useProgram(e);for(var l=137,u=new Float32Array(4*l),s=2*Math.PI/l,a=0;a<l;a++){var g=a*s;u[4*a]=0,u[4*a+1]=0,u[4*a+2]=Math.cos(g)*(p.width/2),u[4*a+3]=Math.sin(g)*(p.height/2)}var I=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,I),d.bufferData(d.ARRAY_BUFFER,u,d.STATIC_DRAW);var E=d.getAttribLocation(e,"position");d.enableVertexAttribArray(E),d.vertexAttribPointer(E,2,d.FLOAT,!1,0,0),d.viewport(0,0,p.width,p.height),d.clearColor(0,0,0,1),d.clear(d.COLOR_BUFFER_BIT),d.drawArrays(d.LINES,0,2*l);var P=new Uint8ClampedArray(p.width*p.height*4);return d.readPixels(0,0,p.width,p.height,d.RGBA,d.UNSIGNED_BYTE,P),new ImageData(P,p.width,p.height)}catch(x){return new ImageData(1,1)}finally{d&&(d.bindBuffer(d.ARRAY_BUFFER,null),d.useProgram(null),d.viewport(0,0,d.drawingBufferWidth,d.drawingBufferHeight),d.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:_($(r,p.width,p.height).data.toString()).toString()}]}catch(t){return[2,{webgl:"unsupported"}]}return[2]})})});var S=function(r,n,t,i){for(var o=(t-n)/i,c=0,e=0;e<i;e++)c+=r(n+(e+.5)*o);return c*o};v("math",function(){return b(void 0,void 0,void 0,function(){return w(this,function(r){return[2,{acos:Math.acos(.5),asin:S(Math.asin,-1,1,97),atan:S(Math.atan,-1,1,97),cos:S(Math.cos,0,Math.PI,97),cosh:Math.cosh(9/7),e:Math.E,largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),log:Math.log(1e3),pi:Math.PI,sin:S(Math.sin,-Math.PI,Math.PI,97),sinh:S(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:S(Math.tan,0,2*Math.PI,97),tanh:S(Math.tanh,-9/7,7/9,97)}]})})});var q="1.9.20";var B=class{constructor(n){y(this,"privacyConfig",{requiresIabPurposes:[]});y(this,"sdk");y(this,"analyticsLibPlugin");y(this,"isProxyPlugin",!0);y(this,"name");y(this,"type");y(this,"version");y(this,"config");this.type="converge-plugin-botdetection",this.name=this.type,this.version=q,this.sdk={},this.config=n||{},this.analyticsLibPlugin=we(this.config)}isLoaded(){var n;return((n=this.analyticsLibPlugin)==null?void 0:n.loaded())==!0}};function D(r){return r?U(r):!1}function we(r={}){return{name:"analytics-plugin-botdetection",config:R(T({},r),{sdk:{}}),initializeStart:i=>z(null,[i],function*({abort:n,config:t}){var c;let o=t.sdk;try{let e=t.userAgentOverride||o.dataLayer.navigator.userAgent(),l,u;if(o.identity.device.fp?(l=Promise.resolve(),u=Promise.resolve()):(l=V().then(s=>{o.identity.device.fp=s.toString()}),u=L().then(s=>{s&&s.system&&(s.system.browser&&(o.identity.device.bn=s.system.browser.name,o.identity.device.bv=s.system.browser.version),o.identity.device.pl=s.system.platform)})),D(e)&&(!((c=o.identity.device)!=null&&c.pl)||o.identity.device.pl.toLowerCase()!="iphone")&&(yield Promise.all([l,u]),o.debug.log("[Bot detection] - Bot user agent detected."+(t.allowDisableSdk?" Disabling SDK":"")),t.allowDisableSdk&&(o.config.isDisabled=!0),yield o.convergeApi.ingest.push([],[],[{id:R(T({},yield o.identity.getProfile()),{ua:[e]}),src:o.debug.createTrackingSource("sdk/js/bot/detect")}],[]),t.allowDisableSdk))return n("Cancel the initialize call because bot UA was detected")}catch(e){o.debug.error("Failed to start bot detection plugin",e)}}),pageStart:({abort:n,config:t})=>{if(t.allowDisableSdk&&D(t.userAgentOverride))return n("Cancel the page call because bot UA was detected")},identifyStart:({abort:n,config:t})=>{if(t.allowDisableSdk&&D(t.userAgentOverride))return n("Cancel the identify call because bot UA was detected")},trackStart:({abort:n,config:t})=>{if(t.allowDisableSdk&&D(t.userAgentOverride))return n("Cancel the track call because bot UA was detected")},loaded:()=>!0}}window.BotDetectionConvergeSdkPlugin=r=>new B(r);})();
"use strict";(()=>{var j=Object.create;var M=Object.defineProperty,V=Object.defineProperties,z=Object.getOwnPropertyDescriptor,U=Object.getOwnPropertyDescriptors,$=Object.getOwnPropertyNames,E=Object.getOwnPropertySymbols,Q=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var w=(a,e,t)=>e in a?M(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,v=(a,e)=>{for(var t in e||(e={}))T.call(e,t)&&w(a,t,e[t]);if(E)for(var t of E(e))W.call(e,t)&&w(a,t,e[t]);return a},k=(a,e)=>V(a,U(e));var Y=(a,e)=>()=>(e||a((e={exports:{}}).exports,e),e.exports);var Z=(a,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of $(e))!T.call(a,c)&&c!==t&&M(a,c,{get:()=>e[c],enumerable:!(i=z(e,c))||i.enumerable});return a};var K=(a,e,t)=>(t=a!=null?j(Q(a)):{},Z(e||!a||!a.__esModule?M(t,"default",{value:a,enumerable:!0}):t,a));var I=(a,e,t)=>w(a,typeof e!="symbol"?e+"":e,t);var y=(a,e,t)=>new Promise((i,c)=>{var n=d=>{try{o(t.next(d))}catch(r){c(r)}},l=d=>{try{o(t.throw(d))}catch(r){c(r)}},o=d=>d.done?i(d.value):Promise.resolve(d.value).then(n,l);o((t=t.apply(a,e)).next())});var B=Y((te,q)=>{q.exports=SeekaConvergeCore});var m=K(B());var O="1.9.20";var p=!1,C=!1,R=(...a)=>{},h=(...a)=>{},A=()=>(p||R("Pixel not initialized before using call ReactPixel.init with required params"),p),P=()=>window.fbq,J={autoConfig:!0,debug:!1},N={init(a,e={},t=J){p=typeof window!="undefined"&&!!P();function i(n){return document.querySelectorAll(`script[src='${n}']`).length>0}let c="https://connect.facebook.net/en_US/fbevents.js";if(i(c)?console.debug("Seeka - Facebook Pixel tag already installed."):function(n,l,o,d,r,u,s){n.fbq||(r=n.fbq=function(){r.callMethod?r.callMethod.apply(r,arguments):r.queue.push(arguments)},n._fbq||(n._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[],u=l.createElement(o),u.async=!0,u.src=d,s=l.getElementsByTagName(o)[0],s.parentNode.insertBefore(u,s))}(window,document,"script",c),!a)R("Please provide pixel id(s) for initializing");else{try{P().disablePushState=!0}catch(n){console.error(n,"Failed to disable fbq.disablePushState")}t.autoConfig===!1&&P()("set","autoConfig",!1,a),P()("init",a,e),p=!0,C=t.debug}},pageView(){},track(a,e){if(!A())return;let t=(e==null?void 0:e.eventId)||void 0;this.cleanProps(e),P()("track",a,e,{eventID:t}),C&&(h(`called fbq('track', '${a}');`),e&&h("with data",e))},trackSingle(a,e,t){if(!A())return;let i=(t==null?void 0:t.eventId)||void 0;this.cleanProps(t),P()("trackSingle",a,e,t,{eventID:i}),C&&(h(`called fbq('trackSingle', '${a}', '${e}');`),t&&h("with data",t))},trackCustom(a,e){if(!A())return;let t=(e==null?void 0:e.eventId)||void 0;this.cleanProps(e),P()("trackCustom",a,e,{eventID:t}),C&&(h(`called fbq('trackCustom', '${a}');`),e&&h("with data",e))},trackSingleCustom(a,e,t){if(!A())return;let i=(t==null?void 0:t.eventId)||void 0;this.cleanProps(t),P()("trackSingleCustom",a,e,t,{eventID:i}),C&&(h(`called fbq('trackSingleCustom', '${a}', '${e}');`),t&&h("with data",t))},grantConsent(){A()&&(P()("consent","grant"),C&&h("called fbq('consent', 'grant');"))},revokeConsent(){A()&&(P()("consent","revoke"),C&&h("called fbq('consent', 'revoke');"))},fbq(...a){A()&&(P()(...a),C&&(h(`called fbq('${a.slice(0,2).join("', '")}')`),a[2]&&h("with data",a[2])))},cleanProps(a){a&&(a.eventId&&delete a.eventId,a.testEventCode&&delete a.testEventCode)}};var S=class{constructor(e){I(this,"sdk");I(this,"analyticsLibPlugin");I(this,"privacyConfig",{requiresIabPurposes:[m.IabPrivacyConsentPurposeIdMap.measureAdvertisingPerformance]});I(this,"name");I(this,"type");I(this,"version");I(this,"config");this.type="converge-plugin-facebook-pixel",this.name=this.type+"-"+(e==null?void 0:e.pixelId),this.version=O,this.sdk={},this.config=e||{}}init(e){return y(this,null,function*(){this.analyticsLibPlugin=G(this.config),e.payload.facebookUserData=yield this.convertProfileToFacebookUserData(e.payload.profile),yield this.analyticsLibPlugin.initialize(e),e.payload.facebookUserData&&this.sdk.debug.verbose("Meta pixel -  advanced matching parameters",e.payload.facebookUserData);let t=this.sdk.util.url.getParamFromQueryString("test_event_code",this.sdk.dataLayer.window.location().href)||this.sdk.state.get("plugin.facebook.pixel.testEventCode");this.config||(this.config={pixelId:"",autoConfig:!0,debug:!1,testEventCode:void 0}),t&&(this.config.testEventCode=t,this.sdk.state.set("plugin.facebook.pixel.testEventCode",t))})}addCrossDomainTrackingQuery(){let e=new Map,t=this.sdk.util.cookie.get("_fbp")||"";return t&&e.set("sk.fbp",t),e}collectIdentifiers(){return y(this,null,function*(){let e={facebook:{fbp:[],fbc:[],login:[],lead:[]}};try{let n=this.sdk.util.url.getParamFromQueryString("sk.fbp",this.sdk.dataLayer.window.location().href),l=this.sdk.util.cookie.get("_fbp");if(n)e.facebook.fbp.push(n),this.sdk.util.cookie.set("_fbp",l),this.sdk.debug.verbose("Meta pixel - fbp from url",n);else if(l)e.facebook.fbp.push(l),this.sdk.debug.verbose("Meta pixel - fbp cookie",l);else{let o=this.generateNewFacebookBrowserId();this.sdk.util.cookie.set("_fbp",o),e.facebook.fbp.push(o)}}catch(n){this.sdk.debug.warn("Meta pixel -  Failed to collect fbp",n)}let t=this.sdk.util.url.getParamFromQueryString("fbclid",this.sdk.dataLayer.window.location().href),i=this.extractClickIdentifier(t),c=this.normaliseFacebookClickId(t);try{let n=this.sdk.util.cookie.get("_fbc"),l=n,o=null;n&&(o=n),c&&(!n||l!==i)&&(o=c),l&&(!i||l!==i)&&e.facebook.fbc.push(n),o&&this.extractClickIdentifier(o)!=l&&e.facebook.fbc.push(o),(!n&&o||l!==this.extractClickIdentifier(o))&&this.sdk.util.cookie.set("_fbc",o)}catch(n){this.sdk.debug.warn("Meta pixel -  Failed to collect fbc",n)}return this.sdk.debug.verbose("Meta pixel -  collected identifiers",e),e})}isLoaded(){var e;return((e=this.analyticsLibPlugin)==null?void 0:e.loaded())==!0}activity(e,t,i){return y(this,null,function*(){this.custom(e,t,i)})}custom(e,t,i){return y(this,null,function*(){var l,o;let c=((l=i==null?void 0:i.augmentResult)==null?void 0:l.destinationActivityNameOverride)||e,n=yield this.onBeforeSendParams(k(v({},t),{payload:{event:c,isCustomEvent:!0,props:v({},(o=t==null?void 0:t.payload)==null?void 0:o.properties)}}));this.analyticsLibPlugin.track(n,this.sdk)})}viewPage(e,t){return y(this,null,function*(){var c;let i=((c=t==null?void 0:t.augmentResult)==null?void 0:c.destinationActivityNameOverride)||(e==null?void 0:e.activityNameCustom)||"PageView";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},e),{payload:{event:i}})),this.sdk)})}addPaymentMethod(e,t,i){return y(this,null,function*(){var n,l,o,d,r;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"AddPaymentInfo";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:c,props:{currency:(e==null?void 0:e.currencyCode)||((o=(l=this.sdk.config.tracking)==null?void 0:l.defaults)==null?void 0:o.currencyCode),value:(e==null?void 0:e.totalPrice)||((d=e==null?void 0:e.products)==null?void 0:d.map(u=>(u.unitPrice||0)*(u.quantity||1)).reduce((u,s)=>u+s,0))||void 0,paymentMethodName:(e==null?void 0:e.paymentMethodName)||void 0,contents:(r=e==null?void 0:e.products)==null?void 0:r.map(u=>u?{id:this.sdk.util.parse.getContentIdFromProduct(u,this.sdk.config.tracking,m.AnalyticsLibrary.FacebookPixel),item_price:u.unitPrice,quantity:u.quantity}:null).filter(Boolean).filter(u=>u==null?void 0:u.id)}}})),this.sdk)})}keywordSearch(e,t,i){return y(this,null,function*(){var n;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"Search";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:c,props:{search_string:e==null?void 0:e.searchText}}})),this.sdk)})}userLogin(e,t,i){return y(this,null,function*(){var l,o;let c=((l=i==null?void 0:i.augmentResult)==null?void 0:l.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"UserLogin",n=yield this.onBeforeSendParams(k(v({},t),{payload:{event:c,isCustomEvent:!0,props:v({},(o=t==null?void 0:t.payload)==null?void 0:o.properties)}}));this.analyticsLibPlugin.track(n,this.sdk)})}userLoginSignup(e,t,i){return y(this,null,function*(){var n;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"CompleteRegistration";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:c}})),this.sdk)})}newsletterSignup(e,t,i){return y(this,null,function*(){var n;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"CompleteRegistration";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:c}})),this.sdk)})}lead(e,t,i){return y(this,null,function*(){var o,d,r,u,s,b;let c=((o=i==null?void 0:i.augmentResult)==null?void 0:o.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"Lead",n=(e==null?void 0:e.currencyCode)||((r=(d=this.sdk.config.tracking)==null?void 0:d.defaults)==null?void 0:r.currencyCode),l=(e==null?void 0:e.predictedValue)||(e==null?void 0:e.predictedLtv)||void 0;if(!l||l<=0){let f=(b=(s=(u=this.sdk.config.tracking)==null?void 0:u.analytics)==null?void 0:s.autoCollection)==null?void 0:b.defaultActivityCurrencyAmount;f!=null&&f.amount&&f.amount>0&&(n=f.currencyCode,l=f.amount,this.sdk.debug.log("Set value of event due to Meta requiring a value for this event and default currency amount config is set"))}this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:c,props:{content_name:e==null?void 0:e.sourceContentName,currency:n,value:l,companyName:e==null?void 0:e.companyName,companySize:e==null?void 0:e.companySize,predictedLtv:e==null?void 0:e.predictedLtv,predictedValue:e==null?void 0:e.predictedValue}}})),this.sdk)})}startTrial(e,t,i){return y(this,null,function*(){var n;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"StartTrial";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:c,props:{content_name:e==null?void 0:e.sourceContentName,currency:e==null?void 0:e.currencyCode,value:(e==null?void 0:e.predictedValue)||(e==null?void 0:e.predictedLtv),companyName:e==null?void 0:e.companyName,companySize:e==null?void 0:e.companySize,predictedLtv:e==null?void 0:e.predictedLtv,predictedValue:e==null?void 0:e.predictedValue}}})),this.sdk)})}contactMessage(e,t,i){return y(this,null,function*(){var n;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"Contact";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:c,props:{content_name:e==null?void 0:e.sourceContentName,currency:e==null?void 0:e.currencyCode,value:(e==null?void 0:e.predictedValue)||(e==null?void 0:e.predictedLtv),companyName:e==null?void 0:e.companyName,companySize:e==null?void 0:e.companySize,predictedLtv:e==null?void 0:e.predictedLtv,predictedValue:e==null?void 0:e.predictedValue}}})),this.sdk)})}schedule(e,t,i){return y(this,null,function*(){var n;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"Schedule";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:c,props:{content_name:e==null?void 0:e.sourceContentName,currency:e==null?void 0:e.currencyCode,value:(e==null?void 0:e.predictedValue)||(e==null?void 0:e.predictedLtv),companyName:e==null?void 0:e.companyName,companySize:e==null?void 0:e.companySize,predictedLtv:e==null?void 0:e.predictedLtv,predictedValue:e==null?void 0:e.predictedValue}}})),this.sdk)})}viewContentItem(e,t,i){return y(this,null,function*(){var l,o,d,r;let c=((l=i==null?void 0:i.augmentResult)==null?void 0:l.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"ViewContent",n=(e==null?void 0:e.items)&&(e==null?void 0:e.items.length)>0;this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:c,props:{content_name:e==null?void 0:e.contentName,content_category:e==null?void 0:e.categoryName,content_type:(e==null?void 0:e.contentType)===m.ECommerceContentType.Collection?"product_group":(e==null?void 0:e.contentType)===m.ECommerceContentType.SingleProduct||(e==null?void 0:e.contentType)===m.ECommerceContentType.SingleVariant?"product":void 0,currency:(e==null?void 0:e.currencyCode)||((d=(o=this.sdk.config.tracking)==null?void 0:o.defaults)==null?void 0:d.currencyCode),value:e==null?void 0:e.value,content_ids:n?void 0:e!=null&&e.identifiers&&e.identifiers.length>0?e.identifiers:void 0,contents:n?(r=e==null?void 0:e.items)==null?void 0:r.map(u=>u?{id:this.sdk.util.parse.getContentIdFromProduct(u,this.sdk.config.tracking,m.AnalyticsLibrary.FacebookPixel),item_price:u.unitPrice,quantity:u.quantity}:null).filter(Boolean).filter(u=>u==null?void 0:u.id):void 0}}})),this.sdk)})}order(e,t,i){return y(this,null,function*(){var o,d,r,u,s,b,f,L,_;let c=((o=i==null?void 0:i.augmentResult)==null?void 0:o.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"Purchase",n=(e==null?void 0:e.currencyCode)||((r=(d=this.sdk.config.tracking)==null?void 0:d.defaults)==null?void 0:r.currencyCode),l=(e==null?void 0:e.totalPrice)||((u=e==null?void 0:e.products)==null?void 0:u.map(g=>(g.unitPrice||0)*(g.quantity||1)).reduce((g,x)=>g+x,0))||void 0;if(!l||l<=0){let g=(f=(b=(s=this.sdk.config.tracking)==null?void 0:s.analytics)==null?void 0:b.autoCollection)==null?void 0:f.defaultActivityCurrencyAmount;if(g!=null&&g.amount&&g.amount>0)n=g.currencyCode,l=g.amount,this.sdk.debug.log("Set value of event due to Meta requiring a value for this event and default currency amount config is set");else{this.sdk.debug.warn("Not sending purchase event to Meta due to no value being set on the payload.");return}}this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:c,props:{currency:n,value:l,content_type:e?"product":void 0,num_items:((L=e==null?void 0:e.products)==null?void 0:L.map(g=>g.quantity||1).reduce((g,x)=>g+x,0))||void 0,order_id:(e==null?void 0:e.orderIdentifier)||(e==null?void 0:e.orderNumber),paymentMethodName:(e==null?void 0:e.paymentMethodName)||void 0,contents:(_=e==null?void 0:e.products)==null?void 0:_.map(g=>g?{id:this.sdk.util.parse.getContentIdFromProduct(g,this.sdk.config.tracking,m.AnalyticsLibrary.FacebookPixel),item_price:g.unitPrice,quantity:g.quantity}:null).filter(Boolean).filter(g=>g==null?void 0:g.id)}}})),this.sdk)})}subscriptionItemPurchase(e,t,i){return y(this,null,function*(){var n,l,o,d,r,u;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"Subscribe";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:c,props:{currency:(e==null?void 0:e.currencyCode)||((o=(l=this.sdk.config.tracking)==null?void 0:l.defaults)==null?void 0:o.currencyCode),value:(e==null?void 0:e.totalPrice)||((d=e==null?void 0:e.products)==null?void 0:d.map(s=>(s.unitPrice||0)*(s.quantity||1)).reduce((s,b)=>s+b,0))||void 0,content_type:e?"product":void 0,num_items:((r=e==null?void 0:e.products)==null?void 0:r.map(s=>s.quantity||1).reduce((s,b)=>s+b,0))||void 0,order_id:(e==null?void 0:e.orderIdentifier)||(e==null?void 0:e.orderNumber),paymentMethodName:(e==null?void 0:e.paymentMethodName)||void 0,contents:(u=e==null?void 0:e.products)==null?void 0:u.map(s=>s?{id:this.sdk.util.parse.getContentIdFromProduct(s,this.sdk.config.tracking,m.AnalyticsLibrary.FacebookPixel),item_price:s.unitPrice,quantity:s.quantity}:null).filter(Boolean).filter(s=>s==null?void 0:s.id)}}})),this.sdk)})}initiateCheckout(e,t,i){return y(this,null,function*(){var n,l,o,d,r,u;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"InitiateCheckout";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:c,props:{currency:(e==null?void 0:e.currencyCode)||((o=(l=this.sdk.config.tracking)==null?void 0:l.defaults)==null?void 0:o.currencyCode),value:(e==null?void 0:e.totalPrice)||((d=e==null?void 0:e.products)==null?void 0:d.map(s=>(s.unitPrice||0)*(s.quantity||1)).reduce((s,b)=>s+b,0))||void 0,num_items:((r=e==null?void 0:e.products)==null?void 0:r.map(s=>s.quantity||1).reduce((s,b)=>s+b,0))||void 0,order_id:(e==null?void 0:e.orderIdentifier)||(e==null?void 0:e.orderNumber),contents:(u=e==null?void 0:e.products)==null?void 0:u.map(s=>s?{id:this.sdk.util.parse.getContentIdFromProduct(s,this.sdk.config.tracking,m.AnalyticsLibrary.FacebookPixel),item_price:s.unitPrice,quantity:s.quantity}:null).filter(Boolean).filter(s=>s==null?void 0:s.id)}}})),this.sdk)})}viewProduct(e,t,i){return y(this,null,function*(){var n,l,o;let c=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"ViewContent";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:c,props:{currency:(e==null?void 0:e.currencyCode)||((o=(l=this.sdk.config.tracking)==null?void 0:l.defaults)==null?void 0:o.currencyCode),value:e==null?void 0:e.unitPrice,content_name:this.sdk.util.parse.getContentNameFromProduct(e,this.sdk.config.tracking),content_type:"product",content_category:e==null?void 0:e.categoryName,content_ids:[this.sdk.util.parse.getContentIdFromProduct(e,this.sdk.config.tracking,m.AnalyticsLibrary.FacebookPixel)]}}})),this.sdk)})}changeProductAttribute(e,t,i){return y(this,null,function*(){var l,o,d;let c=((l=i==null?void 0:i.augmentResult)==null?void 0:l.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"CustomizeProduct",n=e==null?void 0:e.product;this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:c,props:{currency:(n==null?void 0:n.currencyCode)||((d=(o=this.sdk.config.tracking)==null?void 0:o.defaults)==null?void 0:d.currencyCode),value:n==null?void 0:n.unitPrice,content_name:this.sdk.util.parse.getContentNameFromProduct(n,this.sdk.config.tracking),content_type:"product",content_category:n==null?void 0:n.categoryName,content_ids:[this.sdk.util.parse.getContentIdFromProduct(n,this.sdk.config.tracking,m.AnalyticsLibrary.FacebookPixel)]}}})),this.sdk)})}addToWishlist(e,t,i){return y(this,null,function*(){var o,d,r;let c=((o=i==null?void 0:i.augmentResult)==null?void 0:o.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"AddToWishlist",n=null,l=this.sdk.util.parse.getContentIdFromProduct(e,this.sdk.config.tracking,m.AnalyticsLibrary.FacebookPixel);l&&(n={id:l,item_price:e==null?void 0:e.unitPrice,quantity:e==null?void 0:e.quantity}),this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:c,props:{currency:(e==null?void 0:e.currencyCode)||((r=(d=this.sdk.config.tracking)==null?void 0:d.defaults)==null?void 0:r.currencyCode),value:e!=null&&e.unitPrice?(e==null?void 0:e.unitPrice)*((e==null?void 0:e.quantity)||1):void 0,content_name:this.sdk.util.parse.getContentNameFromProduct(e,this.sdk.config.tracking),content_type:"product",content_category:e==null?void 0:e.categoryName,contents:n?[n]:void 0}}})),this.sdk)})}addToCart(e,t,i){return y(this,null,function*(){var o,d,r;let c=((o=i==null?void 0:i.augmentResult)==null?void 0:o.destinationActivityNameOverride)||(t==null?void 0:t.activityNameCustom)||"AddToCart",n=null,l=this.sdk.util.parse.getContentIdFromProduct(e,this.sdk.config.tracking,m.AnalyticsLibrary.FacebookPixel);l&&(n={id:l,item_price:e==null?void 0:e.unitPrice,quantity:e==null?void 0:e.quantity}),this.analyticsLibPlugin.track(yield this.onBeforeSendParams(k(v({},t),{payload:{event:c,props:{currency:(e==null?void 0:e.currencyCode)||((r=(d=this.sdk.config.tracking)==null?void 0:d.defaults)==null?void 0:r.currencyCode),value:e!=null&&e.unitPrice?(e==null?void 0:e.unitPrice)*((e==null?void 0:e.quantity)||1):void 0,content_name:this.sdk.util.parse.getContentNameFromProduct(e,this.sdk.config.tracking),content_type:"product",content_category:e==null?void 0:e.categoryName,contents:n?[n]:void 0}}})),this.sdk)})}convertProfileToFacebookUserData(e){return y(this,null,function*(){var i,c,n,l,o,d,r,u;let t={};if(t.external_id=e.seekaPId,e.email&&e.email.length>0&&(t.em=(i=this.sdk.util.parse.last(e.email))==null?void 0:i.toLowerCase()),e.phone&&e.phone.length>0&&(t.ph=this.sdk.util.parse.last(e.phone)),e.dob&&e.dob.length>0)try{let s=this.sdk.util.parse.last(e.dob);s&&(t.db=this.sdk.util.text.dateToYYYYMMDD(s))}catch(s){this.sdk.debug.warn("Meta pixel -  failed to set dob",{error:s,dob:this.sdk.util.parse.last(e.dob)})}if(e.gender&&e.gender.length>0)try{t.ge=(c=this.sdk.util.parse.last(e.gender))==null?void 0:c.toLowerCase()}catch(s){this.sdk.debug.warn("Meta pixel -  failed to set gender",{error:s,gender:this.sdk.util.parse.last(e.gender)})}if(e.firstName&&e.firstName.length>0&&(t.fn=(n=this.sdk.util.parse.last(e.firstName))==null?void 0:n.toLowerCase()),e.lastName&&e.lastName.length>0&&(t.ln=(l=this.sdk.util.parse.last(e.lastName))==null?void 0:l.toLowerCase()),e.facebook&&e.facebook.fbc&&e.facebook.fbc.length>0){let s=this.sdk.util.parse.last(e.facebook.fbc);s&&(t.fbc=yield this.sdk.util.hash.sha256(s))}if(e.facebook&&e.facebook.fbp&&e.facebook.fbp.length>0&&(t.fbp=this.sdk.util.parse.last(e.facebook.fbp)),e.address&&e.address.length>0){let s=this.sdk.util.parse.last(e.address);s&&(s.locality&&(t.ct=(o=s.locality)==null?void 0:o.replace(/ /gi,"").toLowerCase()),s.stateCode?t.st=(d=s.stateCode)==null?void 0:d.toLowerCase():s.state&&(t.st=s.state),s.postcode&&(t.zp=s.postcode),s.countryCode?t.country=(r=s.countryCode)==null?void 0:r.toLowerCase():s.country&&(t.country=(u=s.country)==null?void 0:u.toLowerCase()))}return this.sdk.debug.verbose("Meta pixel -  user data",t),t})}onBeforeSendParams(e){return y(this,null,function*(){var c;let t=e?v({},e):{};t.payload||(t.payload={}),t.payload.props||(t.payload.props={}),!t.payload.props.eventId&&(e!=null&&e.activityIdentifier)&&(t.payload.props.eventId=e==null?void 0:e.activityIdentifier);try{(c=this.config)!=null&&c.testEventCode&&(t.payload.props.testEventCode=this.config.testEventCode)}catch(n){this.sdk.debug.error("Meta pixel - Failed to get test event code",n)}e.totalPrice&&(t.payload.props.value=e.totalPrice,delete t.payload.props.totalPrice),e.currencyCode&&(t.payload.props.currency=e.currencyCode,delete t.payload.props.currencyCode),e.contentName&&(t.payload.props.content_name=e.contentName,delete t.payload.props.contentName),(!t.payload.props.content_ids||t.payload.props.content_ids.length===0)&&(e.contentId&&((!t.payload.props.contents||t.payload.props.contents.length===0)&&(t.payload.props.content_ids=[e.contentId]),delete t.payload.props.contentId),e.productIdentifier&&((!t.payload.props.contents||t.payload.props.contents.length===0)&&(t.payload.props.content_ids=[e.productIdentifier]),delete t.payload.props.productIdentifier));let i=t.payload.props;if(i){let n=i.value,l=n!=null?String(n).trim():null;(n==null||n===0||(l==="0"||l==="0.0")||l==="")&&(delete i.value,delete i.currency)}return t})}extractClickIdentifier(e){if(!e)return null;let t=e.split(".");return t.length<3?e:t[3]}normaliseFacebookClickId(e){return e?(e.indexOf("fb.")!==0&&(e="fb.1."+new Date().getTime()+"."+e),e):null}generateNewFacebookBrowserId(){return"fb.1."+new Date().getTime()+"."+this.sdk.util.text.getRandomNumberString()}},F=[];function G(a){return{name:"analytics-plugin-facebook-pixel",config:v({},a),initialize:e=>y(null,null,function*(){let i=e.config;F.indexOf(a.pixelId)===-1&&(N.init(i.pixelId,e.payload.facebookUserData,{autoConfig:i.autoConfig===void 0||i.autoConfig===null?!0:i.autoConfig,debug:(i==null?void 0:i.debug)===!0}),F.push(a.pixelId))}),page:e=>{},track:(e,t)=>{X(a,e.payload.event,e.payload,t)},identify:()=>{},loaded:()=>F.indexOf(a.pixelId)>-1}}var D=Object.keys(m.FacebookPixelConversionEventName).filter(a=>a!=m.FacebookPixelConversionEventName.Undefined).map(a=>a.toString());function X(a,e,t,i){t.isCustomEvent&&D.includes(e)?(t.isCustomEvent=!1,i.debug.verbose("Facebook pixel -  Changing custom event to Facebook standard event",{pixelId:a.pixelId,event:e})):!t.isCustomEvent&&!D.includes(e)&&(t.isCustomEvent=!0,i.debug.verbose("Facebook pixel -  Changing standard event to Facebook custom event",{pixelId:a.pixelId,event:e}));let c="Facebook pixel - Browser track";if(a.fireEventsToAllInstalledPixels){i.debug.verbose("Facebook pixel - Firing event to all pixels",{event:e,payload:t.props});let n={props:t.props,logMetadata:{stream:!0,destination:{activityName:e,platform:m.AnalyticsLibrary.FacebookPixel,identifier:"All installed"}}};if(!i.debug.isOperationAllowed(e,c,n))return;t.isCustomEvent?N.trackCustom(e,t.props):N.track(e,t.props),i.debug.log(`${c} `+e,n)}else{i.debug.verbose("Facebook pixel - Firing event to specific pixels",{pixelId:a.pixelId,event:e,payload:t.props});let n={props:t.props,logMetadata:{stream:!0,destination:{activityName:e,platform:m.AnalyticsLibrary.FacebookPixel,identifier:a.pixelId}}};if(!i.debug.isOperationAllowed(e,c,n))return;t.isCustomEvent?N.trackSingleCustom(a.pixelId,e,t.props):N.trackSingle(a.pixelId,e,t.props),i.debug.log(`${c} `+e,n)}}window.FacebookPixelConvergeSdkPlugin=a=>new S(a);})();
"use strict";(()=>{var ie=Object.create;var M=Object.defineProperty,ne=Object.defineProperties,ae=Object.getOwnPropertyDescriptor,se=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertyNames,V=Object.getOwnPropertySymbols,re=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable;var L=(a,e,t)=>e in a?M(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,l=(a,e)=>{for(var t in e||(e={}))q.call(e,t)&&L(a,t,e[t]);if(V)for(var t of V(e))ce.call(e,t)&&L(a,t,e[t]);return a},d=(a,e)=>ne(a,se(e));var le=(a,e)=>()=>(e||a((e={exports:{}}).exports,e),e.exports);var ge=(a,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of oe(e))!q.call(a,s)&&s!==t&&M(a,s,{get:()=>e[s],enumerable:!(i=ae(e,s))||i.enumerable});return a};var Q=(a,e,t)=>(t=a!=null?ie(re(a)):{},ge(e||!a||!a.__esModule?M(t,"default",{value:a,enumerable:!0}):t,a));var b=(a,e,t)=>L(a,typeof e!="symbol"?e+"":e,t);var u=(a,e,t)=>new Promise((i,s)=>{var n=g=>{try{r(t.next(g))}catch(m){s(m)}},o=g=>{try{r(t.throw(g))}catch(m){s(m)}},r=g=>g.done?i(g.value):Promise.resolve(g.value).then(n,o);r((t=t.apply(a,e)).next())});var T=le((he,H)=>{H.exports=SeekaConvergeCore});var v=Q(T());var K="1.9.20";var I=Q(T());var Y={send_page_view:!1,anonymize_ip:!1,allow_google_signals:!0,cookie_update:!0,allow_ad_personalization_signals:!0,cookie_flags:""},_="dataLayer",W=!1,J="https://www.googletagmanager.com/gtag/js";function E(a){if(!a)throw new Error("No GA Measurement ID defined");if(Array.isArray(a))return a;if(typeof a=="string")return[a];throw new Error("GA Measurement ID must be string or array of strings")}var Z=(a,e)=>window[_]?(W||(e.debug.verbose("Google Analytics 4 - Using existing window.dataLayer due to it already existing",{config:a}),W=!0),_):a.dataLayerName,ue=a=>{let e=a.util.url.getParamFromQueryString("sk.gases",a.dataLayer.window.location().href)||null;return e?{sessionId:e,origin:"crossDomain"}:{sessionId:a.identity.touchAndGetSessionId(),origin:"seeka"}};function ye(a){let e={};return a.id&&(e.id=a.id),a.campaign&&(e.name=a.campaign),a.source&&(e.source=a.source),a.medium&&(e.medium=a.medium),a.content&&(e.content=a.content),a.term&&(e.term=a.term),{campaign:e}}function X(a,e){var m;let t=Array.isArray(a.measurementIds)&&a.measurementIds.length>0?String(a.measurementIds[0]||"").trim():typeof a.measurementIds=="string"?String(a.measurementIds||"").trim():"",i=a.customScriptSrc||J,s=Z(a,e),n=i;try{let f=new URL(i,((m=e.dataLayer.window.location())==null?void 0:m.href)||window.location.href);t&&f.searchParams.set("id",t),s!==_&&f.searchParams.set("l",s),n=f.toString()}catch(f){let A=i.includes("?")?i.split("?"):[i,""],P=new URLSearchParams(A[1]||"");t&&P.set("id",t),s!==_&&P.set("l",s),n=`${A[0]}?${P.toString()}`}let o=null,r=null;try{o=new URL(i,window.location.href)}catch(f){o=null}try{r=new URL(J)}catch(f){r=null}let g=document.querySelectorAll("script[src]");for(let f of Array.from(g)){let A=f.src,P=null;try{P=new URL(A,window.location.href)}catch(k){P=null}if(!P)continue;let c=o&&P.host===o.host&&P.pathname===o.pathname,y=r&&P.host===r.host&&P.pathname===r.pathname;if(!(!c&&!y)&&(new URLSearchParams(P.search).get("l")||_)===s)return{loaded:!0,tagUrl:n}}return{loaded:!1,tagUrl:n}}var p=class{constructor(a,e){b(this,"sdk");b(this,"config");b(this,"measurementIds");b(this,"loadedInstances",{});this.sdk=a,this.config=e,this.measurementIds=E(e.measurementIds)}initialize(){var f,A,P;let{gtagName:a,gtagConfig:e,additionalTags:t}=this.config,i=Z(this.config,this.sdk);window[i]||(window[i]=window[i]||[],this.sdk.debug.verbose("Google Analytics 4 - Set window[dataLayerName]",{config:this.config}));let s=!1;window[a]||(window[a]=function(){window[i].push(arguments)},s=!0,this.sdk.debug.verbose(`Google Analytics 4 - Set window[${a}]`,{config:this.config})),s?(window[a]("js",new Date),this.sdk.debug.verbose(`Google Analytics 4 - Set js on window[${a}]`,{config:this.config})):this.sdk.debug.warn(`Google Analytics 4 - Not setting js on window[${a}]`,{config:this.config});let n=(A=(f=this.sdk.config.tracking)==null?void 0:f.processing)==null?void 0:A.consent;if(n&&!n.disableConsentManagement&&n.regionalConsent)for(let c of n.regionalConsent){if(!c.configuration)continue;let y={};c.configuration.adStorage&&c.configuration.adStorage!==I.RegionalConsentGrantOption.Unset&&(y.ad_storage=c.configuration.adStorage),c.configuration.analyticsStorage&&c.configuration.analyticsStorage!==I.RegionalConsentGrantOption.Unset&&(y.analytics_storage=c.configuration.analyticsStorage),c.configuration.adUserData&&c.configuration.adUserData!==I.RegionalConsentGrantOption.Unset&&(y.ad_user_data=c.configuration.adUserData),c.configuration.adPersonalisation&&c.configuration.adPersonalisation!==I.RegionalConsentGrantOption.Unset&&(y.ad_personalization=c.configuration.adPersonalisation),c.configuration.functionalityStorage&&c.configuration.functionalityStorage!==I.RegionalConsentGrantOption.Unset&&(y.functionality_storage=c.configuration.functionalityStorage),c.configuration.securityStorage&&c.configuration.securityStorage!==I.RegionalConsentGrantOption.Unset&&(y.security_storage=c.configuration.securityStorage),c.configuration.personalisationStorage&&c.configuration.personalisationStorage!==I.RegionalConsentGrantOption.Unset&&(y.personalization_storage=c.configuration.personalisationStorage);let k="";c.countryCode&&c.subdivisionCode?k=`${c.countryCode}-${c.subdivisionCode}`:c.countryCode&&(k=c.countryCode),k&&(y.region=[k]),this.sdk.debug.verbose(`Google Analytics 4 - Set consent for region ${k}`,{val:y}),window[a]("consent","default",y)}let o=X(this.config,this.sdk);if(!(this.measurementIds&&this.measurementIds.length>0||t&&t.length>0))this.sdk.debug.warn("Google Analytics 4 - No measurement IDs or additional tags supplied. Skipping gtag.js injection.");else if(o.loaded)this.sdk.debug.verbose("Google Analytics 4 - not injecting gtag.js script as it is already loaded",{config:this.config,gtagScriptUrl:o.tagUrl});else{let c=document.createElement("script");c.async=!0,c.src=o.tagUrl,document.body?(document.body.appendChild(c),this.sdk.debug.verbose("Google Analytics 4 - injected gtag.js script",{config:this.config,gtagScriptUrl:o.tagUrl})):window.addEventListener("DOMContentLoaded",()=>{document.body.appendChild(c),this.sdk.debug.verbose("Google Analytics 4 - injected gtag.js script",{config:this.config,gtagScriptUrl:o.tagUrl})})}let r=l(l({transport_type:"beacon"},this.config.gtagConfig?this.config.gtagConfig:{}),this.config.isGoogleDebugMode===!0||(P=window.location.search)!=null&&P.includes("gtm_debug")?{debug_mode:!0}:{}),g=ue(this.sdk);g.origin==="crossDomain"&&(this.sdk.debug.verbose("Google Analytics 4 - Set session_id from sk.gases url param",{crossDomainSessionId:g.sessionId}),r.session_id=g.sessionId);let m=this.sdk.util.url.getParamFromQueryString("sk.gacl",this.sdk.dataLayer.window.location().href)||null;m&&(r.client_id=m,this.sdk.debug.verbose("Google Analytics 4 - Set client_id from sk.gacl url param",{crossDomainClientId:m})),this.sdk.debug.verbose("Google Analytics 4 - using configuration",{gtagConf:r,config:this.config});for(let c=0;c<this.measurementIds.length;c++)this.loadedInstances[this.measurementIds[c]]||(window[a]("config",this.measurementIds[c],r),this.loadedInstances[this.measurementIds[c]]=!0,this.sdk.debug.verbose(`Google Analytics 4 - Initialised measurement ID ${this.measurementIds[c]} with gtag config`,{gtagConf:r}));if(t&&t.length>0)for(let c=0;c<t.length;c++){let y=t[c];if(y.tagId&&(!this.measurementIds||this.measurementIds.indexOf(y.tagId)===-1)&&(window[a]("config",y.tagId,r),this.sdk.debug.verbose(`Google Analytics 4 - Initialised additional config ID ${y.tagId} with gtag config`,{gtagConf:r})),y.phoneConversions&&y.phoneConversions.length>0)for(let k=0;k<y.phoneConversions.length;k++){let C=y.phoneConversions[k];if(C.conversionLabel&&C.phoneConversionNumber){let N={phone_conversion_number:C.phoneConversionNumber};window[a]("config",`${y.tagId}/${C.conversionLabel}`,N),this.sdk.debug.verbose(`Google Analytics 4 - Initialised phone conversion config ID ${y.tagId}/${C.conversionLabel} with phone config`,{phoneConfig:N})}}}}identify(a){let e=this.sdk.identity.getProfile(),{gtagName:t}=this.config;if(!window[t]||!this.measurementIds.length){this.sdk.debug.warn(`Google Analytics 4 - Not handling identify call as window[${t}] is undefined or there are no measurement IDs`,{gtagName:t});return}else this.sdk.debug.verbose("Google Analytics 4 - Handling identify call",{gtagName:t,payload:a,profile:e});window[t]("set",{user_data:a,user_id:e.seekaPId});let i=[...new Set([e.seekaPId,...e.seekaBId||[]])].filter(Boolean);window[t]("set","user_properties",{user_id:e.seekaPId,user_ids:i})}track(a){var A,P,c,y;if(this.config.isIframeClient){this.sdk.debug.verbose("Google Analytics 4 - Not handling track call as it is an iframe client",{config:this.config});return}let{gtagName:e,enableAutomaticLastTouchAttribution:t}=this.config,i=a==null?void 0:a.event,s=(a==null?void 0:a.properties)||{};if(!window[e]||!this.measurementIds.length){this.sdk.debug.warn(`Google Analytics 4 - Not handling event track call as window[${e}] is undefined or there are no measurement IDs`,{gtagName:e,event:i,properties:s});return}let n=t?this.sdk.attribution.getLastTouchCampaign():null,o=n?ye(n):void 0,r={page_location:this.sdk.util.url.removePiiFromUrl((A=this.sdk.dataLayer.window.location())==null?void 0:A.href),page_path:(P=this.sdk.dataLayer.window.location())==null?void 0:P.pathname,page_title:this.sdk.dataLayer.document.title(),page_hash:(c=this.sdk.dataLayer.window.location())==null?void 0:c.hash,page_search:this.sdk.util.url.removePiiFromQueryString((y=this.sdk.dataLayer.window.location())==null?void 0:y.search),page_referrer:this.sdk.util.url.removePiiFromUrl(this.sdk.dataLayer.document.referrer())},g=d(l(l(l({},s),r),o),{tracking_origin:"seeka"}),m="Google Analytics 4 - Browser track",f={logMetadata:{stream:!0,destination:{activityName:i,platform:I.AnalyticsLibrary.GoogleAnalytics}}};if(this.sdk.debug.isOperationAllowed(i,m,f))for(let k=0;k<this.measurementIds.length;k++){let C=d(l({},g),{send_to:this.measurementIds[k]});window[e]("event",i,C),this.sdk.debug.log(`${m} `+i,d(l({},f),{identifier:this.measurementIds[k]}))}}loaded(){return X(this.config,this.sdk).loaded===!0}disable(a){let e=a?E(a):this.measurementIds;for(let t=0;t<this.measurementIds.length;t++){let i=this.measurementIds[t];e.includes(i)&&(window[`ga-disable-${i}`]=!0)}}enable(a){let e=a?E(a):this.measurementIds;for(let t=0;t<this.measurementIds.length;t++){let i=this.measurementIds[t];e.includes(i)&&(window[`ga-disable-${i}`]=!1)}}};function me(a={}){let e=null;return{name:"google-analytics",config:a,initialize:t=>{let i=t.config,s=t.sdk;e=new p(s,i),e.initialize()},identify:({payload:t})=>{e&&e.identify(t)},page:({payload:t,config:i,sdk:s})=>{},track:({payload:t})=>{e&&e.track({event:t==null?void 0:t.event,properties:t==null?void 0:t.properties})},loaded:()=>e?e.loaded():!1,methods:{disable:t=>{e==null||e.disable(t)},enable:t=>{e==null||e.enable(t)}}}}var ee=me;var S=class{constructor(e){b(this,"sdk");b(this,"analyticsLibPlugin");b(this,"privacyConfig",{requiresIabPurposes:[v.IabPrivacyConsentPurposeIdMap.measureAdvertisingPerformance]});b(this,"name");b(this,"type");b(this,"version");b(this,"config");b(this,"isIframeClient",!1);this.type="converge-plugin-google-analytics-4",this.name=this.type+"-"+e.measurementId,this.version=K,this.sdk={},this.config=e||{}}init(e){return u(this,null,function*(){var c,y,k,C,N,D,F,U,O,z,R,j,B;this.config||(this.config={measurementId:"",debug:!1,enableAutomaticLastTouchAttribution:!1}),this.isIframeClient=((y=(c=this.sdk.config.runtime)==null?void 0:c.client)==null?void 0:y.type)==="iframe",this.isIframeClient&&this.sdk.debug.warn("Seeka running in an iframe and Google Ads / GTAG / GA4 do not play nice with iframes, certain event firing will be disabled and sent via server side instead.");let t=((D=(N=(C=(k=this.sdk.config.tracking)==null?void 0:k.analytics)==null?void 0:C.libraries)==null?void 0:N.googleAnalytics)==null?void 0:D.googleTags)||[],i=((O=(U=(F=this.sdk.config.tracking)==null?void 0:F.analytics)==null?void 0:U.autoCollection)==null?void 0:O.activityDefinitions)||[];i.length>0&&i.forEach(h=>{var $,x;let w=((x=($=h==null?void 0:h.vendorSettings)==null?void 0:$.google)==null?void 0:x.googleAdsConversionTriggers)||[];w.length>0&&w.forEach(G=>{G.conversionId&&!t.find(te=>te.tagId===G.conversionId)&&t.push({tagId:G.conversionId})})});let s=`${this.sdk.config.scopeKey}_${this.sdk.util.text.alphaNumericOnly(this.config.measurementId)}`,n=`gtagSeekaGa4_${s}`,o=`dataLayerSeekaGa4_${s}`,r=d(l({},e.config),{measurementIds:[(z=this.config)==null?void 0:z.measurementId],isGoogleDebugMode:this.sdk.debug.isDebugEnabled,enableAutomaticLastTouchAttribution:(R=this.config)==null?void 0:R.enableAutomaticLastTouchAttribution,additionalTags:t,gtagName:n,dataLayerName:o,isIframeClient:this.isIframeClient,gtagConfig:d(l({},Y),{cookie_prefix:"_ga_seeka"})});r.debug&&this.sdk.debug.warn("Google Analytics 4 - Debug mode is enabled",this.sdk.config),r.enableAutomaticLastTouchAttribution&&this.sdk.debug.verbose("Google Analytics 4 - Automatic last touch attribution is enabled",this.sdk.config),this.analyticsLibPlugin=ee(r);let g=d(l({},e),{config:r});g.sdk=this.sdk,yield this.analyticsLibPlugin.initialize(g);let m=null,f=null,A=this.sdk.util.url.getParamFromQueryString("gclid",(j=this.sdk.dataLayer.window.location())==null?void 0:j.href)||null;try{m=yield new Promise(h=>{var w;window[n]("get",(w=this.config)==null?void 0:w.measurementId,"client_id",h)}),m?(this.sdk.state.set("plugin.google.analytics.client_id",m),this.sdk.debug.verbose("Google Analytics 4 - client",m)):this.sdk.debug.warn("Google Analytics 4 - Did not collect google client ID")}catch(h){this.sdk.debug.warn("Google Analytics 4 - Failed to collect google client ID",h)}try{f=yield new Promise(h=>{var w;window[n]("get",(w=this.config)==null?void 0:w.measurementId,"session_id",h)}),f?(this.sdk.state.set("plugin.google.analytics.session_id",f),this.sdk.debug.verbose("Google Analytics 4 - session",f)):this.sdk.debug.warn("Google Analytics 4 - Did not collect google session ID")}catch(h){this.sdk.debug.warn("Google Analytics 4 - Failed to collect google session ID",h)}if((A||m)&&(yield this.sdk.identity.mergeProfile({google:{gclid:A?[A]:[],userClientId:m?[m]:[]}})),((B=this.config)==null?void 0:B.enableAutomaticLastTouchAttribution)===!0)try{let h=this.sdk.attribution.getLastTouchCampaign();h&&window[n]("set",{campaign_id:h.id,campaign_name:h.campaign,campaign_source:h.source,campaign_medium:h.medium,campaign_term:h.term,campaign_content:h.content})}catch(h){this.sdk.debug.warn("Google Analytics 4 - Failed to set campaign data",h)}(this.sdk.config.plugins||[]).filter(h=>h.type===this.type).length===1&&(window.gtag||(window.gtag=window[n],this.sdk.debug.verbose("Setting global window.gtag")),window.dataLayer||(window.dataLayer=window[o],this.sdk.debug.verbose("Setting global window.dataLayer")))})}addCrossDomainTrackingQuery(){let e=new Map;return e.set("sk.gacl",this.sdk.state.get("plugin.google.analytics.client_id")||""),e.set("sk.gases",this.sdk.state.get("plugin.google.analytics.session_id")||""),e}onProfileChanged(e){return u(this,null,function*(){yield this.setGoogleUserData(e)})}setGoogleUserData(e){return u(this,null,function*(){try{let t=yield this.convertProfileToGoogleAnalyticsUserData(e);t&&(this.sdk.debug.verbose("Google Analytics 4 - user data",{googleUserData:t,profile:e}),yield this.analyticsLibPlugin.identify({payload:t,config:this.analyticsLibPlugin.config,sdk:this.sdk}))}catch(t){this.sdk.debug.warn("Google Analytics 4 - Failed to set user data",t)}})}onReady(){return u(this,null,function*(){let e=yield this.sdk.identity.getProfile();yield this.setGoogleUserData(e)})}collectIdentifiers(){return u(this,null,function*(){var i;let e={google:{gclid:[],userClientId:[]}};try{let s=this.sdk.util.url.getParamFromQueryString("gclid",(i=this.sdk.dataLayer.window.location())==null?void 0:i.href);s&&e.google.gclid.push(s)}catch(s){this.sdk.debug.warn("Google Analytics 4 - Failed to set gclid",s)}let t=this.sdk.state.get("plugin.google.analytics.client_id");return t&&e.google.userClientId.push(t),this.sdk.debug.verbose("Google Analytics 4 - collected identifiers",e),e})}isLoaded(){var e;return((e=this.analyticsLibPlugin)==null?void 0:e.loaded({config:this.analyticsLibPlugin.config},this.sdk))==!0}activity(e,t,i){return u(this,null,function*(){this.custom(e,t)})}custom(e,t,i){return u(this,null,function*(){var n,o;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(e);this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.Custom,d(l({},t),{payload:{event:s,isCustomEvent:!0,properties:l(l({},t?this.convertOrderToGoogleAnalyticsProps({totalPrice:t.unitPrice||t.totalPrice,currencyCode:t.currencyCode,orderIdentifier:t.orderIdentifier,orderNumber:t.orderNumber,checkoutIdentifier:t.checkoutIdentifier,cartIdentifier:t.cartIdentifier,paymentMethodName:t.paymentMethodName,products:t.products&&t.products.length>0?t.products:t.contentName||t.contentId||t.productIdentifier||t.productName?[{productIdentifier:t.contentId||t.productIdentifier,productName:t.contentName||t.productName}]:void 0},t.activityIdentifier):{}),(o=t==null?void 0:t.payload)==null?void 0:o.properties)}}),i,t==null?void 0:t.activityIdentifier))})}viewPage(e,t){return u(this,null,function*(){var s;let i=((s=t==null?void 0:t.augmentResult)==null?void 0:s.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(e==null?void 0:e.activityNameCustom)||"page_view";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.ViewPage,d(l({},e),{payload:{event:i}}),t,e==null?void 0:e.activityIdentifier))})}addPaymentMethod(e,t,i){return u(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"add_payment_info";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.AddPaymentMethod,d(l({},t),{payload:{event:s,properties:l({},this.convertOrderToGoogleAnalyticsProps(e,t==null?void 0:t.activityIdentifier))}}),i,t==null?void 0:t.activityIdentifier))})}keywordSearch(e,t,i){return u(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"search";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.KeywordSearch,d(l({},t),{payload:{event:s,properties:{search_term:e==null?void 0:e.searchText}}}),i,t==null?void 0:t.activityIdentifier))})}userLogin(e,t,i){return u(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"login";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.UserLogin,d(l({},t),{payload:{event:s}}),i,t==null?void 0:t.activityIdentifier))})}userLoginSignup(e,t,i){return u(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"sign_up";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.UserLoginSignup,d(l({},t),{payload:{event:s,properties:{sign_up_type:"login"}}}),i,t==null?void 0:t.activityIdentifier))})}newsletterSignup(e,t,i){return u(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"sign_up";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.NewsletterSignup,d(l({},t),{payload:{event:s,properties:{sign_up_type:"newsletter"}}}),i,t==null?void 0:t.activityIdentifier))})}applyPromotionalCode(e,t,i){return u(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"select_promotion";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.ApplyPromotionalCode,d(l({},t),{payload:{event:s,properties:{promotion_id:e==null?void 0:e.code}}}),i,t==null?void 0:t.activityIdentifier))})}lead(e,t,i){return u(this,null,function*(){var o,r,g;let s=((o=i==null?void 0:i.augmentResult)==null?void 0:o.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"generate_lead",n=(e==null?void 0:e.predictedValue)!=null&&(e==null?void 0:e.predictedValue)!=null?e.predictedValue:null;n==null&&(n=(e==null?void 0:e.predictedLtv)!=null&&(e==null?void 0:e.predictedLtv)!=null?e.predictedLtv:null),n==null&&(n=1),this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.Lead,d(l({},t),{payload:{event:s,properties:{currency:(e==null?void 0:e.currencyCode)||((g=(r=this.sdk.config.tracking)==null?void 0:r.defaults)==null?void 0:g.currencyCode),value:n,content_name:e==null?void 0:e.sourceContentName,predicted_ltv:e==null?void 0:e.predictedLtv,predicted_value:e==null?void 0:e.predictedValue}}}),i,t==null?void 0:t.activityIdentifier))})}startTrial(e,t,i){return u(this,null,function*(){var n,o,r;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"start_trial";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.StartTrial,d(l({},t),{payload:{event:s,isCustomEvent:!0,properties:{currency:(e==null?void 0:e.currencyCode)||((r=(o=this.sdk.config.tracking)==null?void 0:o.defaults)==null?void 0:r.currencyCode),value:(e==null?void 0:e.predictedValue)||(e==null?void 0:e.predictedLtv),content_name:e==null?void 0:e.sourceContentName,predicted_ltv:e==null?void 0:e.predictedLtv,predicted_value:e==null?void 0:e.predictedValue}}}),i,t==null?void 0:t.activityIdentifier))})}contactMessage(e,t,i){return u(this,null,function*(){var n,o,r;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"contact_message";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.ContactMessage,d(l({},t),{payload:{event:s,isCustomEvent:!0,properties:{currency:(e==null?void 0:e.currencyCode)||((r=(o=this.sdk.config.tracking)==null?void 0:o.defaults)==null?void 0:r.currencyCode),value:(e==null?void 0:e.predictedValue)||(e==null?void 0:e.predictedLtv),content_name:e==null?void 0:e.sourceContentName,predicted_ltv:e==null?void 0:e.predictedLtv,predicted_value:e==null?void 0:e.predictedValue}}}),i,t==null?void 0:t.activityIdentifier))})}schedule(e,t,i){return u(this,null,function*(){var n,o,r;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"schedule";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.Schedule,d(l({},t),{payload:{event:s,isCustomEvent:!0,properties:{currency:(e==null?void 0:e.currencyCode)||((r=(o=this.sdk.config.tracking)==null?void 0:o.defaults)==null?void 0:r.currencyCode),value:(e==null?void 0:e.predictedValue)||(e==null?void 0:e.predictedLtv),content_name:e==null?void 0:e.sourceContentName,predicted_ltv:e==null?void 0:e.predictedLtv,predicted_value:e==null?void 0:e.predictedValue}}}),i,t==null?void 0:t.activityIdentifier))})}viewContentItem(e,t,i){return u(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"view_item";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.ViewContentItem,d(l({},t),{payload:{event:s,properties:{item_type:"content",items:[{item_name:e==null?void 0:e.contentName}]}}}),i,t==null?void 0:t.activityIdentifier))})}order(e,t,i){return u(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"purchase";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.Order,d(l({},t),{payload:{event:s,properties:l({},this.convertOrderToGoogleAnalyticsProps(e,t==null?void 0:t.activityIdentifier))}}),i,(e==null?void 0:e.orderIdentifier)||(e==null?void 0:e.orderNumber)||(t==null?void 0:t.activityIdentifier)))})}subscriptionItemPurchase(e,t,i){return u(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"purchase";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.Order,d(l({},t),{payload:{event:s,properties:l({},this.convertOrderToGoogleAnalyticsProps(e,t==null?void 0:t.activityIdentifier))}}),i,t==null?void 0:t.activityIdentifier))})}initiateCheckout(e,t,i){return u(this,null,function*(){var n;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"begin_checkout";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.InitiateCheckout,d(l({},t),{payload:{event:s,properties:l({},this.convertOrderToGoogleAnalyticsProps(e,t==null?void 0:t.activityIdentifier))}}),i,t==null?void 0:t.activityIdentifier))})}viewProduct(e,t,i){return u(this,null,function*(){var n,o,r,g;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"view_item";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.ViewProduct,d(l({},t),{payload:{event:s,properties:{currency:(e==null?void 0:e.currencyCode)||((r=(o=this.sdk.config.tracking)==null?void 0:o.defaults)==null?void 0:r.currencyCode),value:e==null?void 0:e.unitPrice,item_type:((g=e==null?void 0:e.type)==null?void 0:g.toString())||v.ECommerceContentType.SingleProduct.toString(),items:[this.convertProductToGoogleAnalyticsProduct(e)]}}}),i,t==null?void 0:t.activityIdentifier))})}addToCart(e,t,i){return u(this,null,function*(){var n,o,r;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"add_to_cart";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.AddToCart,d(l({},t),{payload:{event:s,properties:{currency:(e==null?void 0:e.currencyCode)||((r=(o=this.sdk.config.tracking)==null?void 0:o.defaults)==null?void 0:r.currencyCode),value:e!=null&&e.unitPrice?(e==null?void 0:e.unitPrice)*((e==null?void 0:e.quantity)||1):void 0,items:[this.convertProductToGoogleAnalyticsProduct(e)]}}}),i,t==null?void 0:t.activityIdentifier))})}addToWishlist(e,t,i){return u(this,null,function*(){var n,o,r;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"add_to_wishlist";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.AddToWishlist,d(l({},t),{payload:{event:s,properties:{currency:(e==null?void 0:e.currencyCode)||((r=(o=this.sdk.config.tracking)==null?void 0:o.defaults)==null?void 0:r.currencyCode),value:e!=null&&e.unitPrice?(e==null?void 0:e.unitPrice)*((e==null?void 0:e.quantity)||1):void 0,items:[this.convertProductToGoogleAnalyticsProduct(e)]}}}),i,t==null?void 0:t.activityIdentifier))})}removeFromCart(e,t,i){return u(this,null,function*(){var n,o,r;let s=((n=i==null?void 0:i.augmentResult)==null?void 0:n.destinationActivityNameOverride)||this.sanitizeEventNameForMeasurementProtocol(t==null?void 0:t.activityNameCustom)||"remove_from_cart";this.analyticsLibPlugin.track(yield this.onBeforeSendParams(v.TrackingActivityNames.RemoveFromCart,d(l({},t),{payload:{event:s,properties:{currency:(e==null?void 0:e.currencyCode)||((r=(o=this.sdk.config.tracking)==null?void 0:o.defaults)==null?void 0:r.currencyCode),value:e!=null&&e.unitPrice?(e==null?void 0:e.unitPrice)*((e==null?void 0:e.quantity)||1):void 0,items:[this.convertProductToGoogleAnalyticsProduct(e)]}}}),i,t==null?void 0:t.activityIdentifier))})}changeProductAttribute(e,t){return u(this,null,function*(){})}filterItemsByAttribute(e,t){return u(this,null,function*(){})}convertProfileToGoogleAnalyticsUserData(e){let t={};if(t.user_id=e.seekaPId,e.email&&e.email.length>0&&(t.email=e.email.slice(-3)),e.phone&&e.phone.length>0&&(t.phone_number=e.phone.slice(-3)),e.firstName&&e.firstName.length>0&&(t.address||(t.address={}),t.address.first_name=this.sdk.util.parse.last(e.firstName)),e.lastName&&e.lastName.length>0&&(t.address||(t.address={}),t.address.last_name=this.sdk.util.parse.last(e.lastName)),e.address&&e.address.length>0){let i=this.sdk.util.parse.last(e.address);t.address||(t.address={}),i&&((i.addressLine1||i.addressLine2)&&(t.address.street=((i.addressLine1||"")+" "+(i.addressLine2||"")).trim()),i.locality&&(t.address.city=i.locality),(i.state||i.stateCode)&&(t.address.region=i.state?i.state:i.stateCode),i.postcode&&(t.address.postal_code=i.postcode),i.countryCode&&(t.address.country=i.countryCode.toUpperCase()))}return this.sdk.debug.verbose("Google Analytics 4 - user data",t),t}onBeforeSendParams(e,t,i,s){return u(this,null,function*(){let n=t?l({},t):{};n.payload||(n.payload={}),n.payload.props||(n.payload.props={}),n.instance=this.sdk.lib.analytics,n.config=this.analyticsLibPlugin.config,n.sdk=this.sdk;try{this.handlePostEventFireForDefinition(e,n,i==null?void 0:i.sourceDefinition,s)}catch(o){this.sdk.debug.error("Google Analytics 4 - Failed to fire post event fire for definition",{error:o,activity:e,props:t,parameters:n,metadata:i})}return n})}handlePostEventFireForDefinition(e,t,i,s){var o,r;if(!i)return;let n=((r=(o=i.vendorSettings)==null?void 0:o.google)==null?void 0:r.googleAdsConversionTriggers)||[];if(n.length>0)for(let g=0;g<n.length;g++){let m=n[g];this.fireGoogleAdConversionEvent(e,m,t,s)}}fireGoogleAdConversionEvent(e,t,i,s){let n=t.conversionId+"/"+t.conversionLabel,o=d(l({},i),{payload:d(l({},i.payload),{event:"conversion",properties:d(l({},i.payload.properties),{send_to:n,transaction_id:s})})});this.analyticsLibPlugin.track(o),this.sdk.debug.log(`Google Analytics 4 - Sent conversion event from ${e} to ${n}`,{originalActivity:e,params:o.payload,logMetadata:{stream:!0}})}sanitizeEventNameForMeasurementProtocol(e,t=!0){if(!e)return null;let i=e.replace(/-/g,"_").replace(/\./g,"_").replace(/ /g,"");return t&&(i=this.sdk.util.text.sentenceCaseToSnakeCase(i)),i.length>40&&this.sdk.debug.warn("Google Analytics 4 - Google Measurement protocol cannot have event names greater than 40 characters.",{before:e,attempted:i}),this.sdk.util.text.isFirstCharacterAlpha(i)||this.sdk.debug.warn("Google Analytics 4 - Google Measurement protocol event names must start with an alphabetic character.",{before:e,attempted:i}),i.toLowerCase()}convertOrderToGoogleAnalyticsProps(e,t){var s,n,o,r;if(!e)return;let i={currency:(e==null?void 0:e.currencyCode)||((n=(s=this.sdk.config.tracking)==null?void 0:s.defaults)==null?void 0:n.currencyCode),value:(e==null?void 0:e.totalPrice)||((o=e==null?void 0:e.products)==null?void 0:o.map(g=>(g.unitPrice||0)*(g.quantity||1)).reduce((g,m)=>g+m,0))||void 0,transaction_id:e.orderIdentifier||e.orderNumber||t,items:(r=e==null?void 0:e.products)==null?void 0:r.map((g,m)=>this.convertProductToGoogleAnalyticsProduct(g,m))};return e!=null&&e.paymentMethodName&&(i.payment_type=e==null?void 0:e.paymentMethodName),(e==null?void 0:e.totalShippingPrice)!=null&&(e==null?void 0:e.totalShippingPrice)!=null&&(i.shipping=e.totalShippingPrice),(e==null?void 0:e.totalTax)!=null&&(e==null?void 0:e.totalTax)!=null&&(i.tax=e.totalTax),i}convertProductToGoogleAnalyticsProduct(e,t){var s,n;let i={item_id:this.sdk.util.parse.getContentIdFromProduct(e,this.sdk.config.tracking,v.AnalyticsLibrary.GoogleAnalytics),item_name:e!=null&&e.productName?e==null?void 0:e.productName:e==null?void 0:e.variantName,item_variant:e!=null&&e.productName?e==null?void 0:e.variantIdentifier:void 0,currency:(e==null?void 0:e.currencyCode)||((n=(s=this.sdk.config.tracking)==null?void 0:s.defaults)==null?void 0:n.currencyCode),discount:e==null?void 0:e.totalDiscount,item_brand:e==null?void 0:e.brandName,item_category:e==null?void 0:e.categoryName,price:e==null?void 0:e.unitPrice,quantity:e==null?void 0:e.quantity};return t!=null&&(i.index=t),this.sdk.debug.verbose("Google Analytics 4 - converted product",{product:e,gaProduct:i}),i}};window.GoogleAnalytics4ConvergeSdkPlugin=a=>new S(a);})();
"use strict";(()=>{var j=Object.create;var u=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames,w=Object.getOwnPropertySymbols,x=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var l=(n,t,e)=>t in n?u(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,A=(n,t)=>{for(var e in t||(t={}))T.call(t,e)&&l(n,e,t[e]);if(w)for(var e of w(t))F.call(t,e)&&l(n,e,t[e]);return n};var L=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var U=(n,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of D(t))!T.call(n,o)&&o!==e&&u(n,o,{get:()=>t[o],enumerable:!(s=B(t,o))||s.enumerable});return n};var O=(n,t,e)=>(e=n!=null?j(x(n)):{},U(t||!n||!n.__esModule?u(e,"default",{value:n,enumerable:!0}):e,n));var c=(n,t,e)=>l(n,typeof t!="symbol"?t+"":t,e);var a=(n,t,e)=>new Promise((s,o)=>{var g=r=>{try{d(e.next(r))}catch(v){o(v)}},m=r=>{try{d(e.throw(r))}catch(v){o(v)}},d=r=>r.done?s(r.value):Promise.resolve(r.value).then(g,m);d((e=e.apply(n,t)).next())});var N=L((R,E)=>{E.exports=SeekaConvergeCore});var i=O(N());var _="1.9.20";var y=class{constructor(t){c(this,"sdk");c(this,"privacyConfig",{requiresIabPurposes:[i.IabPrivacyConsentPurposeIdMap.measureAdvertisingPerformance]});c(this,"name");c(this,"type");c(this,"version");c(this,"config");this.type="converge-plugin-seeka",t!=null&&t.scopeKey?this.name=this.type+"-"+t.scopeKey:this.name=this.type,this.version=_,this.sdk={},this.config=t||{}}init(t){return a(this,null,function*(){})}initComplete(t){return a(this,null,function*(){})}onReady(){return a(this,null,function*(){})}isLoaded(){return!0}activity(t,e){return a(this,null,function*(){yield this.sendActivity({activityName:t},e)})}custom(t,e,s){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.Custom,activityNameCustom:t},e)})}viewPage(t,e){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.ViewPage},t)})}addPaymentMethod(t,e,s){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.AddPaymentMethod,commerce:t},e)})}keywordSearch(t,e,s){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.KeywordSearch,search:t},e)})}userLogin(t,e,s){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.UserLogin,userAccount:t},e)})}userLoginSignup(t,e,s){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.UserLoginSignup,signUp:t},e)})}newsletterSignup(t,e,s){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.NewsletterSignup,signUp:t},e)})}applyPromotionalCode(t,e,s){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.ApplyPromotionalCode,promotion:t},e)})}lead(t,e,s){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.Lead,lead:t},e)})}startTrial(t,e,s){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.StartTrial,lead:t},e)})}contactMessage(t,e,s){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.ContactMessage,lead:t},e)})}schedule(t,e,s){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.Schedule,lead:t},e)})}viewContentItem(t,e,s){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.ViewContentItem,contentItem:t},e)})}order(t,e,s){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.Order,commerce:t},e)})}subscriptionItemPurchase(t,e,s){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.SubscriptionItemPurchase,commerce:t},e)})}initiateCheckout(t,e,s){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.InitiateCheckout,commerce:t},e)})}viewProduct(t,e,s){return a(this,null,function*(){let o={activityName:i.TrackingActivityNames.ViewProduct,commerce:{currencyCode:t==null?void 0:t.currencyCode,products:t?[t]:[]}};yield this.sendActivity(o,e)})}addToCart(t,e,s){return a(this,null,function*(){let o={activityName:i.TrackingActivityNames.AddToCart,commerce:{currencyCode:t==null?void 0:t.currencyCode,products:t?[t]:[]}};yield this.sendActivity(o,e)})}addToWishlist(t,e,s){return a(this,null,function*(){let o={activityName:i.TrackingActivityNames.AddToWishlist,commerce:{currencyCode:t==null?void 0:t.currencyCode,products:t?[t]:[]}};yield this.sendActivity(o,e)})}removeFromCart(t,e,s){return a(this,null,function*(){let o={activityName:i.TrackingActivityNames.RemoveFromCart,commerce:{currencyCode:t==null?void 0:t.currencyCode,products:t?[t]:[]}};yield this.sendActivity(o,e)})}changeProductAttribute(t,e,s){return a(this,null,function*(){yield this.sendActivity({activityName:i.TrackingActivityNames.ChangeProductAttribute,contentBehaviour:{changeProduct:t}},e)})}filterItemsByAttribute(t,e,s){return a(this,null,function*(){!t||t.length==0||(yield Promise.all(t.map(o=>this.sendActivity({activityName:i.TrackingActivityNames.FilterItemsByAttribute,contentBehaviour:{filterItems:o}},e))))})}sendActivity(t,e,s){return a(this,null,function*(){var I,b,f,S,M;if(this.sdk.config.enablement){if(this.sdk.config.enablement===i.OrganisationBrandBillingStatusEnablement.BrowserOnlyDueToBillingFailure||this.sdk.config.enablement===i.OrganisationBrandBillingStatusEnablement.NoFeaturesEnabledDueToBillingFailure||this.sdk.config.enablement===i.OrganisationBrandBillingStatusEnablement.NoFeaturesEnabledDueToNoCurrentPlan){this.sdk.debug.warn("Billing - Restricted so not publishing activity to Seeka API");return}else if(this.sdk.config.enablement===i.OrganisationBrandBillingStatusEnablement.BrowserOnlyDueToCurrentPlan){this.sdk.debug.verbose("Billing - Browser only plan so not publishing activity to Seeka API");return}}if(((b=(I=this.sdk.config.tracking)==null?void 0:I.processing)==null?void 0:b.isServerEventsDisabled)===!0)return;let o={},g=yield this.sdk.identity.getProfile();e||(e={}),!t.activityId&&e&&e!=null&&e.activityIdentifier&&(t.activityId=(f=e==null?void 0:e.activityIdentifier)==null?void 0:f.toString(),delete e.activityIdentifier),e.activityNameCustom&&(t.activityNameCustom=e.activityNameCustom,delete e.activityNameCustom),(!t.time||t.time.getFullYear()==1||t.time.getFullYear()==1900)&&(t.time=void 0);let m=this.sdk.state.get("plugin.facebook.pixel.testEventCode");m&&(o["facebook.pixel.test_event_code"]=m);let d=this.sdk.state.get("plugin.tiktok.pixel.testEventCode");d&&(o["tiktok.pixel.test_event_code"]=d),this.sdk.debug.isDebugEnabled===!0&&(o["google.analytics.debug_mode"]="1");let v=[],P=this.sdk.attribution.getCurrentTouchCampaign();P&&v.push(P),t.properties=A(A({},t.properties||{}),e.custom||{});let k=this.sdk.debug.createTrackingSource("sdk/js/activity/send");(S=this.sdk.privacy.state)!=null&&S.tcfConsentString&&(k.privacy={tcfConsentString:this.sdk.privacy.state.tcfConsentString});let p={payload:t,id:g,props:o,src:k,utm:v};p.props.activityIdentifier=void 0;let C={props:t,logMetadata:{stream:!0,destination:{activityName:t.activityNameCustom||t.activityName,platform:i.AnalyticsLibrary.Seeka,identifier:this.sdk.config.organisationId}}},h="Seeka - Server track";this.sdk.debug.isOperationAllowed((M=t.activityName)==null?void 0:M.toString(),h,C)&&(yield this.sdk.convergeApi.ingest.push([p],[],[],[]),i.ConvergeApi.immediateTriggerSendForActivities.indexOf(t.activityName)>-1&&(yield this.sdk.identity.flushIdentitySyncQueue(),yield this.sdk.convergeApi.ingest.flushQueueDebounced.flush()),this.sdk.debug.log(`${h} `+t.activityName,C))})}};window.SeekaConvergeSdkPlugin=n=>new y(n);})();
"use strict";(()=>{var u=Object.create;var p=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var P=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports);var v=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of f(e))!k.call(i,s)&&s!==t&&p(i,s,{get:()=>e[s],enumerable:!(r=C(e,s))||r.enumerable});return i};var h=(i,e,t)=>(t=i!=null?u(m(i)):{},v(e||!i||!i.__esModule?p(t,"default",{value:i,enumerable:!0}):t,i));var g=P((b,c)=>{c.exports=SeekaConvergeCore});var n=h(g());var y="2.0.3";var l=class{constructor(e){this.type="seeka-app-clarity",this.name=this.type+"-"+e.appInstallId,this.version=y,this.sdk={},this.config=e||{}}sdk;privacyConfig={requiresIabPurposes:[n.IabPrivacyConsentPurposeIdMap.measureAdvertisingPerformance]};name;type;version;config;async init(e){if(!this.config.clarityProjectId)return;this.getClarity()||this.installClarityScript()}async activity(e,t,r){let s=t?.activityNameCustom,a=this.getClarity();!e||!a||e===n.TrackingActivityNames.ViewPage||(e===n.TrackingActivityNames.Custom&&s?a("event",s):(a("event",e.toString()),(e===n.TrackingActivityNames.AddToCart||e===n.TrackingActivityNames.InitiateCheckout||e===n.TrackingActivityNames.Order||e===n.TrackingActivityNames.Lead)&&a("upgrade",e.toString())))}async onReady(){await this.setClarityIds(this.sdk.identity.getProfile());let e=this.getClarity();e&&e("set","pageTitle",this.sdk.dataLayer.document.title())}async onProfileChanged(e){await this.setClarityIds(e)}async setClarityIds(e){let t=e?.seekaPId,r=this.getClarity();r&&t&&(r("set","seekaProfileId",t),r("identify",t,this.sdk.identity.touchAndGetSessionId(),this.sdk.dataLayer.window.location()?.pathname))}getClarity(){return window.clarity}installClarityScript(){(function(e,t,r,s,a,o,d){e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},o=t.createElement(s),o.async=1,o.src="https://www.clarity.ms/tag/"+a,d=t.getElementsByTagName(s)[0],d.parentNode.insertBefore(o,d)})(window,document,"clarity","script",this.config.clarityProjectId)}isLoaded(){return!this.config.clarityProjectId||!!this.getClarity()}};window.ClarityAppConvergeSdkPlugin=i=>new l(i);})();
"use strict";(()=>{var N=Object.create;var w=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var B=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports);var M=(i,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of D(e))!j.call(i,a)&&a!==o&&w(i,a,{get:()=>e[a],enumerable:!(n=U(e,a))||n.enumerable});return i};var b=(i,e,o)=>(o=i!=null?N(T(i)):{},M(e||!i||!i.__esModule?w(o,"default",{value:i,enumerable:!0}):o,i));var y=B((O,A)=>{A.exports=SeekaConvergeCore});var $=b(y());var G="2.7.1";var f=b(y()),P={send_page_view:!1,anonymize_ip:!1,allow_google_signals:!0,cookie_update:!0,allow_ad_personalization_signals:!0,cookie_flags:""},m="dataLayer",I=!1,C="https://www.googletagmanager.com/gtag/js";function k(i){if(!i)throw new Error("No GA Measurement ID defined");if(Array.isArray(i))return i;if(typeof i=="string")return[i];throw new Error("GA Measurement ID must be string or array of strings")}var _=(i,e)=>window[m]?(I||(e.debug.verbose("Google Analytics 4 - Using existing window.dataLayer due to it already existing",{config:i}),I=!0),m):i.dataLayerName,E=i=>{let e=i.util.url.getParamFromQueryString("sk.gases",i.dataLayer.window.location().href)||null;return e?{sessionId:e,origin:"crossDomain"}:{sessionId:i.identity.touchAndGetSessionId(),origin:"seeka"}};function F(i){let e={};return i.id&&(e.id=i.id),i.campaign&&(e.name=i.campaign),i.source&&(e.source=i.source),i.medium&&(e.medium=i.medium),i.content&&(e.content=i.content),i.term&&(e.term=i.term),{campaign:e}}function S(i,e){let o=Array.isArray(i.measurementIds)&&i.measurementIds.length>0?String(i.measurementIds[0]||"").trim():typeof i.measurementIds=="string"?String(i.measurementIds||"").trim():"",n=i.customScriptSrc||C,a=_(i,e),r=n;try{let d=new URL(n,e.dataLayer.window.location()?.href||window.location.href);o&&d.searchParams.set("id",o),a!==m&&d.searchParams.set("l",a),r=d.toString()}catch{let d=n.includes("?")?n.split("?"):[n,""],t=new URLSearchParams(d[1]||"");o&&t.set("id",o),a!==m&&t.set("l",a),r=`${d[0]}?${t.toString()}`}let l=null,g=null;try{l=new URL(n,window.location.href)}catch{l=null}try{g=new URL(C)}catch{g=null}let c=document.querySelectorAll("script[src]");for(let d of Array.from(c)){let t=d.src,s=null;try{s=new URL(t,window.location.href)}catch{s=null}if(!s)continue;let u=l&&s.host===l.host&&s.pathname===l.pathname,h=g&&s.host===g.host&&s.pathname===g.pathname;if(!(!u&&!h)&&(new URLSearchParams(s.search).get("l")||m)===a)return{loaded:!0,tagUrl:r}}return{loaded:!1,tagUrl:r}}var L=class{sdk;config;measurementIds;loadedInstances={};constructor(i,e){this.sdk=i,this.config=e,this.measurementIds=k(e.measurementIds)}initialize(){let{gtagName:i,gtagConfig:e,additionalTags:o}=this.config,n=_(this.config,this.sdk);window[n]||(window[n]=window[n]||[],this.sdk.debug.verbose("Google Analytics 4 - Set window[dataLayerName]",{config:this.config}));let a=!1;window[i]||(window[i]=function(){window[n].push(arguments)},a=!0,this.sdk.debug.verbose(`Google Analytics 4 - Set window[${i}]`,{config:this.config})),a?(window[i]("js",new Date),this.sdk.debug.verbose(`Google Analytics 4 - Set js on window[${i}]`,{config:this.config})):this.sdk.debug.warn(`Google Analytics 4 - Not setting js on window[${i}]`,{config:this.config});let r=this.sdk.config.tracking?.processing?.consent;if(r&&!r.disableConsentManagement&&r.regionalConsent)for(let t of r.regionalConsent){if(!t.configuration)continue;let s={};t.configuration.adStorage&&t.configuration.adStorage!==f.RegionalConsentGrantOption.Unset&&(s.ad_storage=t.configuration.adStorage),t.configuration.analyticsStorage&&t.configuration.analyticsStorage!==f.RegionalConsentGrantOption.Unset&&(s.analytics_storage=t.configuration.analyticsStorage),t.configuration.adUserData&&t.configuration.adUserData!==f.RegionalConsentGrantOption.Unset&&(s.ad_user_data=t.configuration.adUserData),t.configuration.adPersonalisation&&t.configuration.adPersonalisation!==f.RegionalConsentGrantOption.Unset&&(s.ad_personalization=t.configuration.adPersonalisation),t.configuration.functionalityStorage&&t.configuration.functionalityStorage!==f.RegionalConsentGrantOption.Unset&&(s.functionality_storage=t.configuration.functionalityStorage),t.configuration.securityStorage&&t.configuration.securityStorage!==f.RegionalConsentGrantOption.Unset&&(s.security_storage=t.configuration.securityStorage),t.configuration.personalisationStorage&&t.configuration.personalisationStorage!==f.RegionalConsentGrantOption.Unset&&(s.personalization_storage=t.configuration.personalisationStorage);let u="";t.countryCode&&t.subdivisionCode?u=`${t.countryCode}-${t.subdivisionCode}`:t.countryCode&&(u=t.countryCode),u&&(s.region=[u]),this.sdk.debug.verbose(`Google Analytics 4 - Set consent for region ${u}`,{val:s}),window[i]("consent","default",s)}let l=S(this.config,this.sdk);if(!(this.measurementIds&&this.measurementIds.length>0||o&&o.length>0))this.sdk.debug.warn("Google Analytics 4 - No measurement IDs or additional tags supplied. Skipping gtag.js injection.");else if(l.loaded)this.sdk.debug.verbose("Google Analytics 4 - not injecting gtag.js script as it is already loaded",{config:this.config,gtagScriptUrl:l.tagUrl});else{let t=document.createElement("script");t.async=!0,t.src=l.tagUrl,document.body?(document.body.appendChild(t),this.sdk.debug.verbose("Google Analytics 4 - injected gtag.js script",{config:this.config,gtagScriptUrl:l.tagUrl})):window.addEventListener("DOMContentLoaded",()=>{document.body.appendChild(t),this.sdk.debug.verbose("Google Analytics 4 - injected gtag.js script",{config:this.config,gtagScriptUrl:l.tagUrl})})}let g={transport_type:"beacon",...this.config.gtagConfig?this.config.gtagConfig:{},...this.config.isGoogleDebugMode===!0||window.location.search?.includes("gtm_debug")?{debug_mode:!0}:{}},c=E(this.sdk);c.origin==="crossDomain"&&(this.sdk.debug.verbose("Google Analytics 4 - Set session_id from sk.gases url param",{crossDomainSessionId:c.sessionId}),g.session_id=c.sessionId);let d=this.sdk.util.url.getParamFromQueryString("sk.gacl",this.sdk.dataLayer.window.location().href)||null;d&&(g.client_id=d,this.sdk.debug.verbose("Google Analytics 4 - Set client_id from sk.gacl url param",{crossDomainClientId:d})),this.sdk.debug.verbose("Google Analytics 4 - using configuration",{gtagConf:g,config:this.config});for(let t=0;t<this.measurementIds.length;t++)this.loadedInstances[this.measurementIds[t]]||(window[i]("config",this.measurementIds[t],g),this.loadedInstances[this.measurementIds[t]]=!0,this.sdk.debug.verbose(`Google Analytics 4 - Initialised measurement ID ${this.measurementIds[t]} with gtag config`,{gtagConf:g}));if(o&&o.length>0)for(let t=0;t<o.length;t++){let s=o[t];if(s.tagId&&(!this.measurementIds||this.measurementIds.indexOf(s.tagId)===-1)&&(window[i]("config",s.tagId,g),this.sdk.debug.verbose(`Google Analytics 4 - Initialised additional config ID ${s.tagId} with gtag config`,{gtagConf:g})),s.phoneConversions&&s.phoneConversions.length>0)for(let u=0;u<s.phoneConversions.length;u++){let h=s.phoneConversions[u];if(h.conversionLabel&&h.phoneConversionNumber){let v={phone_conversion_number:h.phoneConversionNumber};window[i]("config",`${s.tagId}/${h.conversionLabel}`,v),this.sdk.debug.verbose(`Google Analytics 4 - Initialised phone conversion config ID ${s.tagId}/${h.conversionLabel} with phone config`,{phoneConfig:v})}}}}identify(i){let e=this.sdk.identity.getProfile(),{gtagName:o}=this.config;if(!window[o]||!this.measurementIds.length){this.sdk.debug.warn(`Google Analytics 4 - Not handling identify call as window[${o}] is undefined or there are no measurement IDs`,{gtagName:o});return}else this.sdk.debug.verbose("Google Analytics 4 - Handling identify call",{gtagName:o,payload:i,profile:e});window[o]("set",{user_data:i,user_id:e.seekaPId});let n=[...new Set([e.seekaPId,...e.seekaBId||[]])].filter(Boolean);window[o]("set","user_properties",{user_id:e.seekaPId,user_ids:n})}track(i){if(this.config.isIframeClient){this.sdk.debug.verbose("Google Analytics 4 - Not handling track call as it is an iframe client",{config:this.config});return}let{gtagName:e,enableAutomaticLastTouchAttribution:o}=this.config,n=i?.event,a=i?.properties||{};if(!window[e]||!this.measurementIds.length){this.sdk.debug.warn(`Google Analytics 4 - Not handling event track call as window[${e}] is undefined or there are no measurement IDs`,{gtagName:e,event:n,properties:a});return}let r=o?this.sdk.attribution.getLastTouchCampaign():null,l=r?F(r):void 0,g={page_location:this.sdk.util.url.removePiiFromUrl(this.sdk.dataLayer.window.location()?.href),page_path:this.sdk.dataLayer.window.location()?.pathname,page_title:this.sdk.dataLayer.document.title(),page_hash:this.sdk.dataLayer.window.location()?.hash,page_search:this.sdk.util.url.removePiiFromQueryString(this.sdk.dataLayer.window.location()?.search),page_referrer:this.sdk.util.url.removePiiFromUrl(this.sdk.dataLayer.document.referrer())},c={...a,...g,...l,tracking_origin:"seeka"},d="Google Analytics 4 - Browser track",t={logMetadata:{stream:!0,destination:{activityName:n,platform:f.AnalyticsLibrary.GoogleAnalytics}}};if(this.sdk.debug.isOperationAllowed(n,d,t))for(let s=0;s<this.measurementIds.length;s++){let u={...c,send_to:this.measurementIds[s]};window[e]("event",n,u),this.sdk.debug.log(`${d} `+n,{...t,identifier:this.measurementIds[s]})}}loaded(){return S(this.config,this.sdk).loaded===!0}disable(i){let e=i?k(i):this.measurementIds;for(let o=0;o<this.measurementIds.length;o++){let n=this.measurementIds[o];e.includes(n)&&(window[`ga-disable-${n}`]=!0)}}enable(i){let e=i?k(i):this.measurementIds;for(let o=0;o<this.measurementIds.length;o++){let n=this.measurementIds[o];e.includes(n)&&(window[`ga-disable-${n}`]=!1)}}};var p=class{constructor(e){this.type="seeka-app-google-ads",this.name=this.type+"-"+e.appInstallId,this.name=this.type,this.version=G,this.sdk={},this.config=e||{}}sdk;gtagHelper=null;gtagName=null;isIframeClient=!1;privacyConfig={requiresIabPurposes:[]};name;type;version;config;async beforeInit(){this.isIframeClient=this.sdk.config.runtime?.client?.type==="iframe";let e=(this.config.mappings||[]).map(a=>a.googleConversionAction?.conversionId||"").filter(Boolean);if(e.length===0){this.sdk.debug.verbose("Google Ads - No Google tags required for Google Ads plugin");return}let o=(this.sdk.config.tracking.analytics?.libraries?.googleAnalytics?.googleTags||[]).map(a=>a.tagId).filter(Boolean),n=e.filter(a=>o.indexOf(a)===-1);n.length>0&&(this.sdk.debug.verbose(`Google Ads - Adding Google tags for Google Ads plugin: ${n.join(", ")}`),this.sdk.config.tracking||(this.sdk.config.tracking={}),this.sdk.config.tracking.analytics||(this.sdk.config.tracking.analytics={}),this.sdk.config.tracking.analytics.libraries||(this.sdk.config.tracking.analytics.libraries={}),this.sdk.config.tracking.analytics.libraries.googleAnalytics||(this.sdk.config.tracking.analytics.libraries.googleAnalytics={}),this.sdk.config.tracking.analytics.libraries.googleAnalytics.googleTags||(this.sdk.config.tracking.analytics.libraries.googleAnalytics.googleTags=[]),this.sdk.config.tracking.analytics.libraries.googleAnalytics.googleTags=[...this.sdk.config.tracking.analytics.libraries.googleAnalytics.googleTags,...n.map(a=>({tagId:a}))],await this.checkConfigureGtags())}async checkConfigureGtags(){if(!this.sdk.config.plugins||this.sdk.config.plugins.length===0){this.sdk.debug.warn("Google Ads - No plugins detected");return}this.sdk.config.plugins.some(o=>o.type==="converge-plugin-google-analytics-4")?this.sdk.debug.verbose("Google Ads - Google Analytics 4 plugin detected, not configuring GTAGs"):(this.sdk.debug.verbose("Google Ads - No Google Analytics 4 plugin detected, configuring GTAGs"),await this.configureGtags())}async configureGtags(){let e=this.sdk.config.tracking?.analytics?.libraries?.googleAnalytics?.googleTags||[];if(e.length===0){this.sdk.debug.warn("Google Ads - No Google tags configured for Google Ads plugin");return}let o=`${this.sdk.config.scopeKey}_${this.sdk.util.text.alphaNumericOnly(this.config.appInstallId)}`;this.gtagName=`gtagSeekaGa4_${o}`;let n=`dataLayerSeekaGa4_${o}`;this.gtagHelper=new L(this.sdk,{measurementIds:[],isGoogleDebugMode:this.sdk.debug.isDebugEnabled,additionalTags:e,gtagName:this.gtagName,dataLayerName:n,isIframeClient:this.isIframeClient,gtagConfig:{...P,cookie_prefix:"_ga_seeka"}}),this.gtagHelper.initialize()}async activity(e,o,n){this.sdk.debug.log(`Google Ads - Listened to activity ${e} with props`,{props:o,metadata:n});let a=(this.config.mappings||[]).filter(Boolean).filter(r=>r.active&&r.googleConversionAction&&(r.googleConversionAction.type==="WEBPAGE"||r.googleConversionAction.type==="WEBPAGE_CODELESS"));if(a.length!==0)for(let r of a){let l=this.sdk.activity.isActivityMatchedToFilter(r.seekaActivityMatch,this.type,e,o,n),g=l.isMatch,c={currencyCode:o?.currencyCode||this.sdk.config?.tracking?.analytics?.autoCollection?.defaultActivityCurrencyAmount?.currencyCode||this.sdk.config.tracking?.defaults?.currencyCode||null,value:o?.unitPrice||o?.totalPrice||this.sdk.config?.tracking?.analytics?.autoCollection?.defaultActivityCurrencyAmount?.amount||null};if(g||this.sdk.debug.verbose(`Google Ads - Activity ${e} does not match conversion mapping`,{name:e,props:o,conversion:r,matchResult:l}),g){c.value||this.sdk.debug.log(`Google Ads - Activity ${e} does not contain a value ${e}`,{name:e,props:o,conversion:r}),this.sdk.debug.verbose(`Google Ads - Tracking conversion for activity ${e} with conversion id ${r.googleConversionAction.conversionId} and label ${r.googleConversionAction.conversionLabel} and value ${c}`);let d={send_to:`${r.googleConversionAction.conversionId}/${r.googleConversionAction.conversionLabel}`,value:c?.value,currency:c?.currencyCode,transaction_id:o?.orderIdentifier||o?.orderNumber||o?.activityIdentifier},t="Google Ads - Conversion track",s={props:d,logMetadata:{stream:!0,destination:{activityName:"conversion",platform:$.AnalyticsLibrary.GoogleAnalytics,identifier:r.googleConversionAction.conversionId}}};this.sdk.debug.isOperationAllowed("conversion",t,s)&&(this.callGtag("event","conversion",d)||this.sdk.debug.warn("Google Ads - Google tag not found, not firing Google Ads conversion",{conversionId:r.googleConversionAction.conversionId,conversionLabel:r.googleConversionAction.conversionLabel}),this.sdk.debug.log(`${t} conversion`,s))}}}callGtag(e,o,n){if(this.gtagHelper){if(!this.gtagName)return this.sdk.debug.warn("Google Ads - Google tag name not found"),!1;let a=window[this.gtagName];return a?(a(e,o,n),this.sdk.debug.verbose(`Google Ads - Called Google tag ${this.gtagName} with payload`,{payload:n}),!0):(this.sdk.debug.warn("Google Ads - Google tag not found"),!1)}else return this.callGtagViaPlugin(e,o,n)}callGtagViaPlugin(e,o,n){let a=(this.sdk.config.plugins||[]).filter(l=>l.type==="converge-plugin-google-analytics-4");if(!a||a.length===0)return!1;let r=!1;return a.forEach(l=>{let g=l.analyticsLibPlugin?.config?.gtagName;if(!g)return;let c=window[g];c&&(c(e,o,n),this.sdk.debug.verbose(`Google Ads - Called plugin Google tag ${g} with payload`,{payload:n}),r=!0)}),r}async collectIdentifiers(){let e={google:{gclid:[]}};try{let o=this.sdk.util.url.getParamFromQueryString("gclid",this.sdk.dataLayer.window.location()?.href);o&&e.google.gclid.push(o)}catch(o){this.sdk.debug.warn("Google Ads - Failed to set gclid",o)}return this.sdk.debug.verbose("Google Ads - collected identifiers",e),e}async init(e){}isLoaded(){return!0}};window.GoogleAdsAppConvergeSdkPlugin=i=>new p(i);})();
window.Converge = SeekaSdk([
                {
                    "scopeKey": "a2a1d8568a181204953f3a1c1543f0eb",
                    "scopeDescription": "The Bureau Fashion Week",
                    "debug": {},
                    "key": "sdkr_Q2ZESjhLUjZ4SVJDVkVoRmpzclNSTnhJYVpHRkVCdkZUdGhtdlBBTlNJQ0s1YlBUZlhJaUh4aXJtSGhTcEhZZ004REFhNEQwZExQRWRhaDlGekpTYWdzY3BkNWFSb3ppOXFuanlhTzlIeV84Uk1Ud1NuN19oeElBS2hNV1hNV2xXWmdDMGM5Wm94bWsxbVJoXzZtNTFqRDJYUExFZVIwbGdPV2M5U003RXUybEREeHg",
                    "organisationId": "ce50c838682f7276388f3a16639e0c96",
                    "plugins": [
                        BotDetectionConvergeSdkPlugin({}),FacebookPixelConvergeSdkPlugin({ 'pixelId': '570201587850053', 'pipeline': null }),GoogleAnalytics4ConvergeSdkPlugin({ 'measurementId': 'G-GPJ97EV5S3', 'enableAutomaticLastTouchAttribution': false, 'pipeline': null }),ClarityAppConvergeSdkPlugin({"clarityProjectId":"plcddnepgk","appId":"570d722c-c7b8-4ff1-b2b6-94658d25a2e6","appInstallId":"2fcfa05f-a9d4-5a99-364f-3a1c1f0cc05c","appUrl":"https://apps.seeka.services/clarity"}),GoogleAdsAppConvergeSdkPlugin({"appId":"3f5ecdb4-71c5-4b70-8d02-e0239fbf88e6","appInstallId":"0fd46b11-ede1-521c-b2aa-3a1c1f0aa85d","appUrl":"https://apps.seeka.services/google-ads","mappings":[{"id":"1dd76def-2275-4378-b780-dfd2ecaaf8a0","googleConversionAction":{"resourceName":"customers/5136908617/conversionActions/857804537","id":857804537,"name":"Purchase_manual","status":"ENABLED","type":"WEBPAGE","category":"PURCHASE","conversionLabel":"apcgCPmdhJkDEJOO1IoD","conversionId":"AW-827655955"},"active":true,"seekaActivityMatch":{"id":"cd5c265e-db9a-4e42-98f3-dbce2b235c69","type":"activityTracked","activityNames":["Order"],"sourceFilter":{"comparer":"or","filters":[{"type":"wildcard","key":"*","label":"Any source","textMatch":null}],"description":""}}}]}),SeekaConvergeSdkPlugin({ "scopeKey": "a2a1d8568a181204953f3a1c1543f0eb" })
                    ],
                    "enablement": "fullyFeatured",
                    "endpoint": "https://api.seeka.services",
                    "ingestEndpoint": "https://router.seeka.services",
                    "tracking": {
  "endpoint": "https://api.seeka.services",
  "ingestEndpoint": "https://router.seeka.services",
  "debug": {},
  "defaults": {
    "currencyCode": "AUD",
    "countryCode": "US"
  },
  "analytics": {
    "libraries": {
      "seeka": {
        "library": "seeka"
      },
      "googleAnalytics": {
        "googleTags": [],
        "merchant": {},
        "library": "googleAnalytics"
      },
      "facebookPixel": {
        "library": "facebookPixel"
      },
      "tikTokPixel": {
        "library": "tikTokPixel"
      },
      "dynamicYield": {
        "library": "dynamicYield"
      },
      "segment": {
        "library": "segment"
      },
      "snapchatPixel": {
        "library": "snapchatPixel"
      },
      "pinterestPixel": {
        "library": "pinterest"
      }
    },
    "autoCollection": {
      "activityNames": [
        "viewPage",
        "viewProduct",
        "addToCart",
        "keywordSearch",
        "newsletterSignup",
        "addPaymentMethod",
        "order"
      ],
      "keywordSearchQueryParamName": "q",
      "activityDefinitions": [
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "BUY TICKETS NOW\nSecure your spot before pricing increases"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/events/e160c549-c3b9-4c9b-b58e-436505fbbd79/reservation"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "61aace57-3dd2-4a8b-af95-7796b373589c",
          "description": "Hero"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 12th Fashion Show  4:00PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/friday-400pm"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "55368038-ea84-4055-b4a4-5f04596b1b52",
          "description": "Sept_12_4.00pm_background"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 12th Fashion Show  4:00PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/friday-400pm"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "640eeb31-dda0-4de8-aacb-3e9c867d7919",
          "description": "Sept_12_4.00pm_buy-tickets"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 12th Fashion Show  6:00PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/friday-600pm"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "542c0a93-7fc7-4a5e-ba5c-c3f1bc580fd3",
          "description": "Sept_12_6.00pm_background"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "classNames": [
                        "buy"
                      ],
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 12th Fashion Show  6:00PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/friday-600pm"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "a656e310-9012-4f7c-96ff-7f21dceac679",
          "description": "Sept_12_6.00pm_buy-tickets"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 12th Fashion Show  8:30PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/Friday%208%3A30PM"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "3cae67b7-7c18-4c2a-b18c-a6c5aaccf967",
          "description": "Sept_12_8.30pm_background"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 12th Fashion Show  8:30PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/Friday%208%3A30PM"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "737aa013-7781-41cf-9f72-24f1ae9aac17",
          "description": "Sept_12_8.30pm_buy-tickets"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 12th  After Party  10:00PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/Friday%20After%20Party"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "ae9fdb2e-48ae-4b48-abb5-7f40ed121c99",
          "description": "Sept_12_after-party_background"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 12th  After Party  10:00PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/Friday%20After%20Party"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "c6395d27-5d41-4ce3-9c55-049a43ff9898",
          "description": "Sept_12_after-party_buy-tickets"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 13th Fashion Show  12:00PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/Saturday%2012%3A00PM"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "ce6a0732-0713-4385-83aa-187092551570",
          "description": "Sept_13_12pm_background"
        },
        {
          "triggerSettings": {
            "schemaVersion": 2,
            "firingTriggersComparer": "and",
            "firingTriggers": [
              {
                "htmlElements": [
                  {
                    "locator": {
                      "elementTypes": [
                        "A"
                      ],
                      "innerTextMatch": {
                        "operator": "equals",
                        "matchValue": "September 13th Fashion Show  12:00PM\nBuy Tickets"
                      },
                      "linkUrlMatch": {
                        "operator": "startsWith",
                        "matchValue": "https://thebureaufashionweek.flicket.io/e160c549-c3b9-4c9b-b58e-436505fbbd79/releases/Saturday%2012%3A00PM"
                      }
                    },
                    "eventTypes": [
                      "click"
                    ]
                  }
                ],
                "comparer": "and",
                "filters": [
                  {
                    "label": "",
                    "type": "domain",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "thebureaufashionweek.com"
                    }
                  },
                  {
                    "label": "",
                    "type": "pagePath",
                    "key": "",
                    "textMatch": {
                      "operator": "equals",
                      "matchValue": "/new-york-fashion-week-tickets-september-2025"
                    }
                  }
                ],
                "description": ""
              }
            ],
            "blockingTriggersComparer": "and",
            "blockingTriggers": [
              {
                "htmlElements": [],
                "comparer": "and",
                "filters": [],
                "description": ""
              }
            ]
          },
          "vendorSettings": {
            "google": {
              "googleAdsConversionTriggers": []
            }
          },
          "consentSettings": {
            "analytics": {},
            "marketing": {
              "email": {},
              "sms": {}
            },
            "loyalty": {}
          },
          "activityName": "custom",
          "activityNameCustom": "Ticket Button Click",
          "activityParameters": {
            "contentName": "{{locatorElement.innerText}}"
          },
          "id": "2192379d-7083-438d-ba56-a494a326776a",
          "description": "Sept_13_12pm_buy-tickets"
        }
      ]
    },
    "identity": {
      "userSessionTimeoutSeconds": 1800
    }
  },
  "processing": {
    "publishToVendorsTimeoutSeconds": 600,
    "contentIdentificationBehavior": "default"
  },
  "browserSdkVersion": "latest"
},
                    "runtime": { "client": {"ver":"1.0.95","type":"wordpress"} }
                }
            ]);