PageSourceSearch

https://u.co.uk/_next/static/chunks/9752-9266cba386563a51.js

js u.co.uk collected 2026-09-24 17:42:46 UTC 97,812 bytes, 1 lines download raw bytes

1!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="6ef92022-0cb0-45c9-82d2-48daeef17522",t._sentryDebugIdIdentifier="sentry-dbid-6ef92022-0cb0-45c9-82d2-48daeef17522")}catch(t){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9752],{4794:(t,e,i)=>{i.d(e,{Fn:()=>l,KG:()=>r,aV:()=>s,et:()=>h,mO:()=>a,uR:()=>u,uy:()=>o,xE:()=>n});let s="logCustomEvent",r="setCustomUserAttribute",n="Braze must be initialized before calling methods.",o=30,l=30,a=72e5,u=15,h=1},5113:(t,e,i)=>{i.d(e,{A:()=>r});var s=i(16491);class r{constructor(){this.Mi={}}Dt(t){if("function"!=typeof t)return null;let e=s.A.ce();return this.Mi[e]=t,e}removeSubscription(t){delete this.Mi[t]}removeAllSubscriptions(){this.Mi={}}hc(){return Object.keys(this.Mi).length}X(t){let e=[];for(let i in this.Mi){let s=this.Mi[i];e.push(s(t))}return e}}},9482:(t,e,i)=>{i.d(e,{A:()=>s});let s={OPEN:"open",Rr:"purchase",hr:"push_click",Ee:"custom_event",Zr:"iam_click",As:"test"}},9825:(t,e,i)=>{i.d(e,{A:()=>d,d:()=>c});var s=i(95883),r=i(31463),n=i(44259),o=i(39102),l=i(88166),a=i(75632),u=i(41658),h=i(83736);let c={iu:{su:"ab.storage.userId",Na:"ab.storage.deviceId",Nl:"ab.storage.sessionId"},gt:{ac:"ab.test",tE:"ab.storage.events",eE:"ab.storage.attributes",sE:"ab.storage.attributes.anonymous_user",oc:"ab.storage.device",pu:"ab.storage.sdk_metadata",Ru:"ab.storage.session_id_for_cached_metadata",zn:"ab.storage.pushToken",qi:"ab.storage.newsFeed",zi:"ab.storage.lastNewsFeedRefresh",Zt:"ab.storage.cardImpressions",ml:"ab.storage.serverConfig",rE:"ab.storage.triggers",oE:"ab.storage.triggers.ts",Hl:"ab.storage.messagingSessionStart",Hs:"ab.storage.cc",Os:"ab.storage.ccLastFullSync",Qs:"ab.storage.ccLastCardUpdated",Hu:"ab.storage.globalRateLimitCurrentTokenCount",_u:"ab.storage.dynamicRateLimitCurrentTokenCount",Kt:"ab.storage.ccClicks",Yt:"ab.storage.ccImpressions",Vt:"ab.storage.ccDismissals",nE:"ab.storage.lastDisplayedTriggerTimesById",aE:"ab.storage.lastDisplayedTriggerTime",iE:"ab.storage.triggerFireInstancesById",qh:"ab.storage.signature",EE:"ab.storage.brazeSyncRetryCount",Zs:"ab.storage.sdkVersion",Xe:"ab.storage.ff",Ge:"ab.storage.ffImpressions",Ze:"ab.storage.ffLastRefreshAt",Ve:"ab.storage.ff.sessionId",lE:"ab.storage.lastReqToEndpoint",SE:"ab.storage.requestAttempts",Kr:"ab.storage.deferredIam",Ku:"ab.storage.lastSdkReq",_E:"ab.storage.alias",vt:"ab.storage.banners",Nt:"ab.storage.banners.impressions",yt:"ab.storage.banners.sessionId"},me:"ab.optOut"};class d{constructor(t,e){this.uE=t,this.cE=e,this.uE=t,this.cE=e}Ha(t){let e=(0,n.HP)(c.iu),i=new d.se(t);for(let t of e)i.remove(c.iu[t])}uu(t,e){let i=null;null!=e&&e instanceof r.A&&(i=e.bt()),this.uE.store(t,i)}TE(t){let e=this.tu(t);null!=e&&(e.ql=new Date().valueOf(),this.uu(t,e))}tu(t){let e,i=this.uE.gr(t),s=(t=>{let e;try{e=JSON.parse(t)}catch(t){e=null}return e})(i);if(s)(e=r.A.Rn(s)||null)&&this.uu(t,e);else{let s=r.A.hE(i);e=r.A.Rn(s)||null,s!==i&&e&&this.uu(t,e)}return e}Jl(t){this.uE.remove(t)}Xa(){let t;for(let e of(0,n.HP)(c.iu))null!=(t=this.tu(c.iu[e]))&&this.uu(c.iu[e],t)}Vo(t){let e;if(null==t||0===t.length)return!1;e=(0,n.cy)(t)?t:[t];let i=this.cE.gr(c.gt.tE);null!=i&&(0,n.cy)(i)||(i=[]);for(let t=0;t<e.length;t++)i.push(e[t].bt());return this.cE.store(c.gt.tE,i)}Al(t){return null!=t&&this.Vo([t])}AE(){let t=this.cE.gr(c.gt.tE);this.cE.remove(c.gt.tE),null==t&&(t=[]);let e=[],i=!1,r=null;if((0,n.cy)(t))for(let i=0;i<t.length;i++)s.A.RE(t[i])?e.push(s.A.Rn(t[i])):r=i;else i=!0;if(i||null!=r){let n="Stored events could not be deserialized as Events";i&&(n+=", was "+Object.prototype.toString.call(t)+" not an array"),null!=r&&(n+=", value at index "+r+" does not look like an event"),n+=", serialized values were of type "+typeof t+": "+JSON.stringify(t),e.push(new s.A(null,o.w.qu,new Date().valueOf(),null,{e:n}))}return e}Bt(t,e){return!!(0,n.BY)(c.gt,t,"StorageManager cannot store object.","STORAGE_KEYS.OBJECTS")&&this.cE.store(t,e)}ft(t){return!!(0,n.BY)(c.gt,t,"StorageManager cannot retrieve object.","STORAGE_KEYS.OBJECTS")&&this.cE.gr(t)}Ut(t){return!!(0,n.BY)(c.gt,t,"StorageManager cannot remove object.","STORAGE_KEYS.OBJECTS")&&(this.cE.remove(t),!0)}clearData(){let t=(0,n.HP)(c.iu),e=(0,n.HP)(c.gt);for(let e=0;e<t.length;e++){let i=t[e];this.uE.remove(c.iu[i])}for(let t=0;t<e.length;t++){let i=e[t];this.cE.remove(c.gt[i])}}gE(t){return t||c.gt.sE}Cu(t){let e=this.cE.gr(c.gt.eE);null==e&&(e={});let i=this.gE(t[a.A.Xn]),s=e[i];for(let r in t)r!==a.A.Xn&&(null==e[i]||s&&null==s[r])&&this.mu(t[a.A.Xn],r,t[r])}mu(t,e,i){let s=this.cE.gr(c.gt.eE);null==s&&(s={});let r=this.gE(t),n=s[r];if(null==n&&(n={},null!=t&&(n[a.A.Xn]=t)),e===a.A.lu)for(let t in null==n[e]&&(n[e]={}),i)n[e][t]=i[t];else n[e]=i;return s[r]=n,this.cE.store(c.gt.eE,s)}OE(){let t=this.cE.gr(c.gt.eE);this.cE.remove(c.gt.eE);let e=[];for(let i in t)null!=t[i]&&e.push(t[i]);return e}ru(t){let e=this.cE.gr(c.gt.eE);if(null!=e){let i=this.gE(null),s=e[i];null!=s&&(e[i]=void 0,this.cE.store(c.gt.eE,e),s[a.A.Xn]=t,this.Cu(s))}let i=this.tu(c.iu.Nl),s=null;null!=i&&(s=i.eu);let r=this.AE();if(null!=r)for(let e=0;e<r.length;e++){let i=r[e];null==i.userId&&i.sessionId==s&&(i.userId=t),this.Al(i)}}IE(){return this.cE.dE}}d.gc=class{constructor(t){this.an=t,this.an=t,this.dE=u.A.fE()?3:10}bE(t){return t+"."+this.an}store(t,e){try{return localStorage.setItem(this.bE(t),JSON.stringify({v:e})),!0}catch(t){return l.A.info("Storage failure: "+(0,h.u)(t)),!1}}gr(t){try{let e=null,i=localStorage.getItem(this.bE(t));return null!=i&&(e=JSON.parse(i)),null==e?null:e.v}catch(t){return l.A.info("Storage retrieval failure: "+(0,h.u)(t)),null}}remove(t){try{localStorage.removeItem(this.bE(t))}catch(t){return l.A.info("Storage removal failure: "+(0,h.u)(t)),!1}}},d.uc=class{constructor(){this.KE={},this.mE=5242880,this.dE=3}store(t,e){let i=this.YE(e);return i>this.mE?(l.A.info("Storage failure: object is ≈"+i+" bytes which is greater than the max of "+this.mE),!1):(this.KE[t]={value:e},!0)}YE(t){let e=[],i=[t],s=0;for(;i.length;){let t=i.pop();if("boolean"==typeof t)s+=4;else if("string"==typeof t)s+=2*t.length;else if("number"==typeof t)s+=8;else if("object"==typeof t&&-1===e.indexOf(t))for(let s in e.push(t),t)i.push(t[s])}return s}gr(t){let e=this.KE[t];return null==e?null:e.value}remove(t){this.KE[t]=null}},d.se=class{constructor(t,e){this.an=t,this.NE=e,this.an=t,this.GE=this.DE(),this.CE=576e3,this.NE=!!e}bE(t){return null!=this.an?t+"."+this.an:t}DE(){let t=0,e=document.location.hostname,i=e.split("."),s="ab._gd";
1for(;t<i.length-1&&-1===document.cookie.indexOf(s+"="+s);)t++,e="."+i.slice(-1-t).join("."),document.cookie=s+"="+s+";domain="+e+";";return document.cookie=s+"=;expires="+new Date(0).toUTCString()+";domain="+e+";",e}le(){let t=new Date;return t.setTime(t.getTime()+60*this.CE*1e3),t.getFullYear()}ME(){let t=(0,n.zu)(c.iu),e=document.cookie.split(";");for(let i=0;i<e.length;i++){let s=e[i];for(;" "===s.charAt(0);)s=s.substring(1);let r=!1;for(let e=0;e<t.length;e++)if(0===s.indexOf(t[e])){r=!0;break}if(r){let t=s.split("=")[0];-1===t.indexOf("."+this.an)&&this.pE(t)}}}store(t,e){let i;this.ME();let s=new Date;s.setTime(s.getTime()+60*this.CE*1e3);let r="expires="+s.toUTCString(),n="domain="+this.GE;i=this.NE?e:encodeURIComponent(e);let o=this.bE(t)+"="+i+";"+r+";"+n+";path=/";return o.length>=4093?(l.A.info("Storage failure: string is "+o.length+" chars which is too large to store as a cookie."),!1):(document.cookie=o,!0)}gr(t){let e=[],i=this.bE(t)+"=",s=document.cookie.split(";");for(let r=0;r<s.length;r++){let n=s[r];for(;" "===n.charAt(0);)n=n.substring(1);if(0===n.indexOf(i))try{let t;t=this.NE?n.substring(i.length,n.length):decodeURIComponent(n.substring(i.length,n.length)),e.push(t)}catch(e){return l.A.info("Storage retrieval failure: "+(0,h.u)(e)),this.remove(t),null}}return e.length>0?e[e.length-1]:null}remove(t){this.pE(this.bE(t))}pE(t){let e=t+"=;expires="+new Date(0).toUTCString();document.cookie=e,document.cookie=e+";path=/";let i=e+";domain="+this.GE;document.cookie=i,document.cookie=i+";path=/"}},d.lc=class{constructor(t,e,i){this.an=t,this.vE=[],e&&this.vE.push(new d.se(t)),i&&this.vE.push(new d.gc(t)),this.vE.push(new d.uc)}store(t,e){let i=!0;for(let s=0;s<this.vE.length;s++)i=this.vE[s].store(t,e)&&i;return i}gr(t){for(let e=0;e<this.vE.length;e++){let i=this.vE[e].gr(t);if(null!=i)return i}return null}remove(t){new d.se(this.an).remove(t);for(let e=0;e<this.vE.length;e++)this.vE[e].remove(t)}}},14566:(t,e,i)=>{i.d(e,{A:()=>l});var s=i(88166),r=i(76892),n=i(95883),o=i(20785);let l={ut:(t,e,i)=>{var l,a;let u=new o.A,h=r.Ay.P();if(!h)return s.A.info(`Not logging event with type "${t}" because the current session ID could not be found.`),u;let c=h.Qo();return u.$e.push(new n.A(i||(null==(l=r.Ay.ir())?void 0:l.getUserId()),t,new Date().valueOf(),c,e)),u.tt=(null==(a=r.Ay.j())?void 0:a.Vo(u.$e))||!1,u}}},16491:(t,e,i)=>{i.d(e,{A:()=>s});let s={ce:function(){let t=(t=!1)=>{let e=(Math.random().toString(16)+"000000000").substr(2,8);return t?"-"+e.substr(0,4)+"-"+e.substr(4,4):e};return t()+t(!0)+t(!0)+t()}}},20785:(t,e,i)=>{i.d(e,{A:()=>s});class s{constructor(t=!1,e=[]){this.tt=t,this.$e=e,this.tt=t,this.$e=e}ns(t){this.tt=this.tt&&t.tt,this.$e.push(...t.$e)}}},26034:(t,e,i)=>{i.d(e,{$6:()=>u,V:()=>l,dy:()=>g,jj:()=>h,mY:()=>a,qj:()=>d});var s=i(88166),r=i(83736),n=i(45999),o=i(42729);let l={types:{io:"container",logCustomEvent:"logCustomEvent",setEmailNotificationSubscriptionType:"setEmailNotificationSubscriptionType",setPushNotificationSubscriptionType:"setPushNotificationSubscriptionType",setCustomUserAttribute:"setCustomUserAttribute",requestPushPermission:"requestPushPermission",addToSubscriptionGroup:"addToSubscriptionGroup",removeFromSubscriptionGroup:"removeFromSubscriptionGroup",addToCustomAttributeArray:"addToCustomAttributeArray",removeFromCustomAttributeArray:"removeFromCustomAttributeArray",co:"openLink",mo:"openLinkInWebView"},properties:{type:"type",eo:"steps",so:"args"}},a={Mr:"unknownBrazeAction",wr:"noPushPrompt"},u=(t,e)=>{switch(t){case a.Mr:return`${e} contains an unknown braze action type and will not be displayed.`;case a.wr:return`${e} contains a push prompt braze action, but is not eligible for a push prompt. Ignoring.`;default:return""}};function h(t){try{let e=t.match(o.nx),i=e?e[0].length:null,r=i?t.substring(i):null;if(null==i||i>t.length-1||!r)return void s.A.error(`Did not find base64 encoded brazeAction in url to process : ${t}`);let l=(0,n.u)(r);return l?JSON.parse(l):void s.A.error(`Failed to decode base64 encoded brazeAction: ${r}`)}catch(e){return void s.A.error(`Failed to process brazeAction URL ${t} : ${(0,r.u)(e)}`)}}function c(t,e){let i=!1;if(e){for(let s of e)if(i=i||t(s))return!0}return!1}function d(t){let e=l.properties.type,i=l.properties.eo;try{if(null==t)return!0;let s=t[e];return s===l.types.io?c(d,t[i]):!(0,o.To)(s)}catch(t){return!0}}function g(t){if(!t||!(0,o.xs)(t))return!1;let e=l.properties.type,i=l.properties.eo,s=t[e];return s===l.types.io?c(g,t[i]):s===l.types.requestPushPermission}},26063:(t,e,i)=>{i.d(e,{A:()=>
1o});var s=i(4794),r=i(9825);let n={O:{Nu:"data",wi:"content_cards/sync",Le:"feature_flags/sync",Er:"template",K:"banners/sync"},Vu:t=>null==t?void 0:t.ft(r.d.gt.lE),sm:t=>null==t?void 0:t.ft(r.d.gt.SE),nm:(t,e)=>{null==t||t.Bt(r.d.gt.lE,e)},rm:(t,e)=>{null==t||t.Bt(r.d.gt.SE,e)},zu:(t,e)=>{if(!t||!e)return -1;let i=n.Vu(t);if(null==i)return -1;let s=i[e];return null==s||isNaN(s)?-1:s},ju:(t,e)=>{let i=s.et;if(!t||!e)return i;let r=n.sm(t);return null==r?i:null==(i=r[e])||isNaN(i)?s.et:i},W:(t,e,i)=>{if(!t||!e)return;let s=n.Vu(t);null==s&&(s={}),s[e]=i,n.nm(t,s)},Mu:(t,e,i)=>{if(!t||!e)return;let s=n.sm(t);null==s&&(s={}),s[e]=i,n.rm(t,s)},vi:(t,e)=>{t&&e&&n.Mu(t,e,s.et)},Uu:(t,e)=>{if(!t||!e)return;let i=n.ju(t,e);n.Mu(t,e,i+1)}},o=n},28005:(t,e,i)=>{i.d(e,{A:()=>l,s:()=>o});var s=i(88166),r=i(79472),n=i(83736);let o=t=>{let e,i,s={},r=t.toString().split("\r\n");if(!r)return s;for(let t of r)t&&(e=t.slice(0,t.indexOf(":")).toLowerCase().trim(),i=t.slice(t.indexOf(":")+1).trim(),s[e]=i);return s},l={Y:t=>{let e,i;try{let n=!1;if(window.XMLHttpRequest&&(n=!0),!n)return void s.A.error("This browser does not have any supported ajax options!");e=new XMLHttpRequest;let o=i=>{"function"==typeof t.error&&t.error(e.status),"function"==typeof t.nt&&t.nt(!1,i)};for(let s of(e.onload=()=>{let i=!1;if(4!==e.readyState)return;i=e.status>=200&&e.status<300||304===e.status;let s=e.getAllResponseHeaders();if(i){if("function"==typeof t.tt){let i;try{i=JSON.parse(e.responseText)}catch(n){let i={error:""===e.responseText?r.A.bu:r.A.Au,response:e.responseText};(0,t.tt)(i,s)}i&&t.tt(i,s)}"function"==typeof t.nt&&t.nt(!0,s)}else o(s)},e.onerror=()=>{o(e.getAllResponseHeaders())},e.ontimeout=()=>{o()},i=JSON.stringify(t.data),e.open("POST",t.url,!0),e.setRequestHeader("Content-type","application/json"),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.headers||[]))e.setRequestHeader(s[0],s[1]);e.send(i)}catch(t){s.A.error(`Network request error: ${(0,n.u)(t)}`)}}}},31463:(t,e,i)=>{i.d(e,{A:()=>l});var s=i(16491),r=i(88166),n=i(44259),o=i(83736);class l{constructor(t,e,i){this.eu=t,null==t&&(t=s.A.ce()),!i||isNaN(i)?this.Gl=new Date().valueOf():this.Gl=i,this.eu=t,this.ql=new Date().valueOf(),this.kl=e}bt(){return`g:${encodeURIComponent(this.eu)}|e:${this.kl}|c:${this.Gl}|l:${this.ql}`}static hE(t){let e;if("string"!=typeof t)return null;let i=t.lastIndexOf("|e:"),s=t.substring(0,i),r=s.split("g:")[1];return e=/[|:]/.test(r)?encodeURIComponent(r):r,t=t.replace(s,`g:${e}`)}static Rn(t){let e;if("string"==typeof t)try{let i=t.split("|");if(!(0,n.cy)(i)||4!==i.length)return null;let s=t=>t.split(":")[1],r=t=>{let e=parseInt(s(t));if(!isNaN(e))return e};(e=new l(decodeURIComponent(s(i[0])),r(i[1]),r(i[2]))).ql=r(i[3])}catch(e){r.A.info(`Unable to parse cookie string ${t}, failed with error: ${(0,o.u)(e)}`)}else{if(null==t||null==t.g)return null;(e=new l(t.g,t.e,t.c)).ql=t.l}return e}}},39102:(t,e,i)=>{i.d(e,{w:()=>s});let s={CustomEvent:"ce",Pr:"p",wc:"pc",Ac:"ca",Su:"i",qu:"ie",ts:"cci",rs:"ccic",Mt:"ccc",Wt:"ccd",Fl:"ss",Dl:"se",Ki:"si",Li:"sc",Qi:"sbc",Mc:"sfe",Do:"iec",bc:"lr",vc:"uae",ss:"ci",Ot:"cc",Sc:"lcaa",yc:"lcar",Hn:"inc",On:"add",Gn:"rem",$n:"set",Bn:"ncam",jc:"sgu",yr:"ffi",ro:"bi",ct:"bc"}},41658:(t,e,i)=>{i.d(e,{A:()=>h});var s=i(44259);class r{constructor(){}ef(){}ff(){}ec(t){}static nf(t,e){if(t&&e){if(t=t.toLowerCase(),(0,s.cy)(e.cf)){for(let i=0;i<e.cf.length;i++)if(-1!==t.indexOf(e.cf[i].toLowerCase()))return e.identity}else if(-1!==t.indexOf(e.cf.toLowerCase()))return e.identity}}}let n={rO:"Chrome",eO:"Edge",oO:"Opera",Bg:"Safari",OO:"Firefox"},o={xg:"Android",ao:"iOS",Pg:"Mac",Og:"Windows"};class l extends r{constructor(){if(super(),this.userAgentData=navigator.userAgentData,this.browser=null,this.version=null,this.userAgentData){let t=this.Bc();this.browser=t.browser||"Unknown Browser",this.version=t.version||"Unknown Version"}this.OS=null}ef(){return this.browser}ff(){return this.version}ec(t){if(this.OS)return Promise.resolve(this.OS);let e=e=>{for(let i=0;i<t.length;i++){let s=l.nf(e,t[i]);if(s)return this.OS=s,this.OS}return e};return this.userAgentData.platform?Promise.resolve(e(this.userAgentData.platform)):this.getHighEntropyValues().then(t=>t.platform?e(t.platform):navigator.platform).catch(()=>navigator.platform)}Bc(){let t={},e=this.userAgentData.brands;if(e&&e.length)for(let i of e){let e=this.Vc(n),s=i.brand.match(e);if(s&&s.length>0){t.browser=s[0],t.version=i.version;break}}return t}Vc(t){let e=[];for(let i in t)e.push(t[i]);return RegExp("("+e.join("|")+")","i")}getHighEntropyValues(){return this.userAgentData.getHighEntropyValues?this.userAgentData.getHighEntropyValues(["platform"]):Promise.reject()}}class a extends r{constructor(){super(),this.fd=a.Bc(navigator.userAgent||"")}ef(){return this.fd[0]||"Unknown Browser"}ff(){return this.fd[1]||"Unknown Version"}ec(t){for(let e=0;e<t.length;
1e++){let i=t[e].string,s=a.nf(i,t[e]);if(s)return s===o.Pg&&navigator.maxTouchPoints>1&&(s=o.ao),Promise.resolve(s)}return Promise.resolve(navigator.platform)}static Bc(t){let e,i=t.match(/(samsungbrowser|tizen|roku|konqueror|icab|crios|opera|ucbrowser|chrome|safari|firefox|camino|msie|trident(?=\/))\/?\s*(\.?\d+(\.\d+)*)/i)||[];if(-1!==t.indexOf("(Web0S; Linux/SmartTV)"))return["LG Smart TV",null];if(-1!==t.indexOf("CrKey"))return["Chromecast",null];if(-1!==t.indexOf("BRAVIA")||-1!==t.indexOf("SonyCEBrowser")||-1!==t.indexOf("SonyDTV"))return["Sony Smart TV",null];if(-1!==t.indexOf("PhilipsTV"))return["Philips Smart TV",null];if(t.match(/\b(Roku)\b/))return["Roku",null];if(t.match(/\bAFTM\b/))return["Amazon Fire Stick",null];if(i[1]===n.rO&&null!=(e=t.match(/\b(OPR|Edge|EdgA|Edg|UCBrowser)\/(\.?\d+(\.\d+)*)/)))return(e=e.slice(1))[0]=e[0].replace("OPR",n.oO),e[0]=e[0].replace("EdgA",n.eO),"Edg"===e[0]&&(e[0]=n.eO),[e[0],e[1]];if(i[1]===n.Bg&&null!=(e=t.match(/\b(EdgiOS)\/(\.?\d+(\.\d+)*)/)))return(e=e.slice(1))[0]=e[0].replace("EdgiOS",n.eO),[e[0],e[1]];if((i=i[2]?[i[1],i[2]]:[null,null])[0]===n.Bg&&null!=(e=t.match(/version\/(\.?\d+(\.\d+)*)/i))&&i.splice(1,1,e[1]),null!=(e=t.match(/\b(UCBrowser)\/(\.?\d+(\.\d+)*)/))&&i.splice(1,1,e[2]),i[0]===n.oO&&null!=(e=t.match(/mini\/(\.?\d+(\.\d+)*)/i)))return["Opera Mini",e[1]||""];if(i[0]){let t=i[0].toLowerCase();"crios"===t&&(i[0]=n.rO),"tizen"===t&&(i[0]="Samsung Smart TV",i[1]=null),"samsungbrowser"===t&&(i[0]="Samsung Browser")}return i}}class u{constructor(){let t=navigator.userAgentData?l:a;this.Sg=new t,this.userAgent=navigator.userAgent,this.browser=this.Sg.ef(),this.version=this.Sg.ff(),this.OS=null,this.ec().then(t=>this.OS=t);let e=navigator;this.language=(e.userLanguage||e.language||e.browserLanguage||e.systemLanguage||"").toLowerCase(),this.Ja=u.vg(this.userAgent)}fE(){return this.browser===n.Bg}ic(){return this.OS||null}ec(){return this.OS?Promise.resolve(this.OS):this.Sg.ec(u.kg).then(t=>(this.OS=t,t))}static vg(t){t=t.toLowerCase();let e=["googlebot","bingbot","slurp","duckduckbot","baiduspider","yandex","facebookexternalhit","sogou","ia_archiver","https://github.com/prerender/prerender","aolbuild","bingpreview","msnbot","adsbot","mediapartners-google","teoma","taiko"];for(let i=0;i<e.length;i++)if(-1!==t.indexOf(e[i]))return!0;return!1}}u.kg=[{string:navigator.platform,cf:"Win",identity:o.Og},{string:navigator.platform,cf:"Mac",identity:o.Pg},{string:navigator.platform,cf:"BlackBerry",identity:"BlackBerry"},{string:navigator.platform,cf:"FreeBSD",identity:"FreeBSD"},{string:navigator.platform,cf:"OpenBSD",identity:"OpenBSD"},{string:navigator.platform,cf:"Nintendo",identity:"Nintendo"},{string:navigator.platform,cf:"SunOS",identity:"SunOS"},{string:navigator.platform,cf:"PlayStation",identity:"PlayStation"},{string:navigator.platform,cf:"X11",identity:"X11"},{string:navigator.userAgent,cf:["iPhone","iPad","iPod"],identity:o.ao},{string:navigator.platform,cf:"Pike v",identity:o.ao},{string:navigator.userAgent,cf:["Web0S"],identity:"WebOS"},{string:navigator.userAgent,cf:"Tizen",identity:"Tizen"},{string:navigator.platform,cf:["Linux armv7l","Android"],identity:o.xg},{string:navigator.userAgent,cf:["Android"],identity:o.xg},{string:navigator.platform,cf:"Linux",identity:"Linux"}];let h=new u},42729:(t,e,i)=>{i.d(e,{B9:()=>y,Dz:()=>f,To:()=>w,Z2:()=>A,ZJ:()=>p,fB:()=>v,nx:()=>g,rK:()=>b,uZ:()=>m,xs:()=>E});var s=i(44259),r=i(45999),n=i(88166),o=i(59606),l=i(26034),a=i(4794);let u=/^[^\x00-\x1F\x22]+$/,h=/[$.]/,c=["$add","$update","$remove","$identifier_key","$identifier_value","$new_object","$time","$google_ad_personalization","$google_ad_user_data"],d=new RegExp(/^.+@.+\..+$/),g=/^brazeActions:\/\/v\d+\//;function f(t,e,i){let s=null!=t&&"string"==typeof t&&(""===t||null!=t.match(u));return s||n.A.error(`Cannot ${e} because ${i} "${t}" is invalid.`),s}function p(t){return null!=t&&t.match(h)&&-1===c.indexOf(t)&&n.A.warn("Custom attribute keys cannot contain '$' or '.'"),f(t,"set custom user attribute","the given key")}function m(t){let e=typeof t;return null==t||"number"===e||"boolean"===e||(0,s.$P)(t)||"string"===e}function b(t,e,i,s=!1){let r="string"==typeof t||null===t&&s;return r||n.A.error(`Cannot ${e} because ${i} "${t}
1" is invalid.`),r}function v(t,e,i,l,u){let h,c,d;if(null==t&&(t={}),"object"!=typeof t||(0,s.cy)(t))return n.A.error(`${e} requires that ${i} be an object. Ignoring ${u}.`),[!1,null];e===a.KG?(h=76800,c="75KB"):(h=51200,c="50KB");let g=JSON.stringify(t);if((0,r.N)(g)>h)return n.A.error(`Could not ${l} because ${i} was greater than the max size of ${c}.`),[!1,null];try{d=JSON.parse(g)}catch(t){return n.A.error(`Could not ${l} because ${i} did not contain valid JSON.`),[!1,null]}for(let i in t){if(e===a.KG&&!p(i)||!f(i,l,`the ${u} property name`))return[!1,null];let r=t[i];if(e!==a.KG&&null==r){delete t[i],delete d[i];continue}if((0,s.$P)(r)&&(d[i]=(0,o.EQ)(r)),!function(t,e,i,r,l){let a;return(a=(0,s.Gv)(t)||(0,s.cy)(t)?function t(e,i,r){let l=-1!==r;if(l&&r>50)return n.A.error("Nested attributes cannot be more than 50 levels deep."),!1;let a=l?r+1:-1;if((0,s.cy)(e)&&(0,s.cy)(i)){for(let r=0;r<e.length&&r<i.length;r++)if((0,s.$P)(e[r])&&(i[r]=(0,o.EQ)(e[r])),!t(e[r],i[r],a))return!1}else{if(!(0,s.Gv)(e))return m(e);for(let r of(0,s.HP)(e)){let n=e[r];if(l&&!p(r)||((0,s.$P)(n)&&(i[r]=(0,o.EQ)(n)),!t(n,i[r],a)))return!1}}return!0}(t,e,l?1:-1):m(t))||n.A.error(`Cannot ${i} because ${r} "${t}" is invalid.`),a}(r,d[i],l,`the ${u} property "${i}"`,e===a.KG))return[!1,null]}return[!0,d]}function A(t,e){let i=!1,r=!1,o=()=>{n.A.error("Custom attribute arrays must be either string arrays or object arrays.")};for(let n of e)if("string"==typeof n){if(r)return o(),[!1,!1];if(!f(n,`set custom user attribute "${t}"`,"the element in the given array"))return[!1,!1];i=!0}else{if(!(0,s.Gv)(n)||i)return o(),[!1,!1];if(!v(n,a.KG,"attribute value",`set custom user attribute "${t}"`,"custom user attribute"))return[!1,!1];r=!0}return[i,r]}function y(t){return"string"==typeof t&&null!=t.toLowerCase().match(d)}function E(t){if(!(l.V.properties.type in t))return!1;switch(t[l.V.properties.type]){case l.V.types.io:if(l.V.properties.eo in t)return!0;break;case l.V.types.logCustomEvent:case l.V.types.setEmailNotificationSubscriptionType:case l.V.types.setPushNotificationSubscriptionType:case l.V.types.setCustomUserAttribute:case l.V.types.addToSubscriptionGroup:case l.V.types.removeFromSubscriptionGroup:case l.V.types.addToCustomAttributeArray:case l.V.types.removeFromCustomAttributeArray:case l.V.types.co:case l.V.types.mo:if(l.V.properties.so in t)return!0;break;case l.V.types.requestPushPermission:return!0}return!1}function w(t){let e=!1;return Object.keys(l.V.types).forEach(i=>{l.V.types[i]!==t.toString()||(e=!0)}),e}},44259:(t,e,i)=>{i.d(e,{$P:()=>l,BY:()=>n,Gv:()=>a,HP:()=>u,cy:()=>o,n4:()=>function t(e,i){if(e===i)return 0!==e||1/e==1/i;if(null==e||null==i)return e===i;let s=e.toString();if(s!==i.toString())return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+i;case"[object Number]":return+e!=+e?+i!=+i:0==+e?1/e==1/i:+e==+i;case"[object Date]":case"[object Boolean]":return+e==+i}let r="[object Array]"===s;if(!r){if("object"!=typeof e||"object"!=typeof i)return!1;let t=e.constructor,s=i.constructor;if(t!==s&&!("function"==typeof t&&t instanceof t&&"function"==typeof s&&s instanceof s)&&"constructor"in e&&"constructor"in i)return!1}let n=[],o=[],l=n.length;for(;l--;)if(n[l]===e)return o[l]===i;if(n.push(e),o.push(i),r){if((l=e.length)!==i.length)return!1;for(;l--;)if(!t(e[l],i[l]))return!1}else{let s,r=u(e);if(l=r.length,u(i).length!==l)return!1;for(;l--;)if(s=r[l],!Object.prototype.hasOwnProperty.call(i,s)||!t(e[s],i[s]))return!1}return n.pop(),o.pop(),!0},zu:()=>r});var s=i(88166);function r(t){let e=[];for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&void 0!==t[i]&&e.push(t[i]);return e}function n(t,e,i,n){let o=r(t);return -1!==o.indexOf(e)||(s.A.error(`${i} Valid values from ${n} are "${o.join('"/"')}".`),!1)}function o(t){return Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)}function l(t){return"[object Date]"===Object.prototype.toString.call(t)}function a(t){return"[object Object]"===Object.prototype.toString.call(t)}function u(t){let e=[];for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.push(i);return e}},45999:(t,e,i)=>{i.d(e,{N:()=>r,u:()=>n});var s=i(88166);function r(t){let e=t.length;for(let i=t.length-1;i>=0;i--){let s=t.charCodeAt(i);s>127&&s<=2047?e++:s>2047&&s<=65535&&(e+=2),s>=56320&&s<=57343&&i--}return e}function n(t){try{t=t.replace(/-/g,"+").replace(/_/g,"/");let e=window.atob(t),i=new Uint8Array(e.length);for(let t=0;t<e.length;t++)i[t]=e.charCodeAt(t);let s=new Uint16Array(i.buffer);return String.fromCharCode(...s)}catch(t){return s.A.error("Unable to decode Base64: "+t),null}}},48662:(t,e,i)=>{i.d(e,{A:()=>s});class s{constructor(){}U(t){}
1changeUser(t=!1){}clearData(t=!1){}}},53007:(t,e,i)=>{i.d(e,{b:()=>r});var s=i(9825);function r(t){let e,i=null==t?void 0:t.ft(s.d.gt._E);return i&&(e={label:i.l,name:i.a}),e}},59606:(t,e,i)=>{i.d(e,{DA:()=>c,EQ:()=>l,Jd:()=>h,S3:()=>u,UK:()=>r,YX:()=>n,Zo:()=>o,jU:()=>a});var s=i(44259);function r(t,e=!1){let i=t/1e3;return e&&(i=Math.floor(i)),i}function n(t){return 1e3*t}function o(t){if(null==t)return null;let e=parseInt(t.toString());return isNaN(e)?null:new Date(1e3*e)}function l(t){return null!=t&&(0,s.$P)(t)?t.toISOString().replace(/\.[0-9]{3}Z$/,""):t}function a(t){return null==t||""===t?null:new Date(t)}function u(t){return null==t||""===t?new Date().valueOf():t}function h(t){return(new Date().valueOf()-t.valueOf())/1e3}function c(t){return(t.valueOf()-new Date().valueOf())/1e3}},59752:(t,e,i)=>{i.d(e,{Y:()=>c});var s=i(76892),r=i(14566),n=i(88166),o=i(39102),l=i(9482),a=i(71355),u=i(42729),h=i(4794);function c(t,e){if(!s.Ay.rr())return!1;if(null==t||t.length<=0)return n.A.error(`logCustomEvent requires a non-empty eventName, got "${t}". Ignoring event.`),!1;if(!(0,u.Dz)(t,"log custom event","the event name"))return!1;let[i,c]=(0,u.fB)(e,h.aV,"eventProperties",`log custom event "${t}"`,"event");if(!i)return!1;let d=s.Ay.v();if(d&&d.je(t))return n.A.info(`Custom Event "${t}" is blocklisted, ignoring.`),!1;let g=r.A.ut(o.w.CustomEvent,{n:t,p:c});if(g.tt)for(let i of(n.A.info(`Logged custom event "${t}".`),g.$e))a.B.m().Ce(l.A.Ee,[t,e],i);return g.tt}},62152:(t,e,i)=>{i.d(e,{A:()=>r});var s=i(59606);class r{constructor(t,e,i,s,r){this.endpoint=t,this.En=e,this.publicKey=i,this.Vl=s,this.fl=r,this.endpoint=t||null,this.En=e||null,this.publicKey=i||null,this.Vl=s||null,this.fl=r||null}bt(){return{e:this.endpoint,c:this.En,p:this.publicKey,u:this.Vl,v:this.fl}}static Rn(t){return new r(t.e,(0,s.jU)(t.c),t.p,t.u,t.v)}}},71355:(t,e,i)=>{i.d(e,{B:()=>Z});var s=i(28005),r=i(76892);class n{constructor(t,e){this.triggerId=t,this.messageExtras=e,this.triggerId=t,this.messageExtras=e,this.extras={},this.isControl=!0,this.Ht=!1}static fromJson(t){return new n(t.trigger_id,t.message_extras)}_t(){return!this.Ht&&(this.Ht=!0,!0)}Bo(){return this.Ht}}var o=i(41658),l=i(88166),a=i(83736);let u={Ic:null,Ho:function(t,e=!1,i=!1,s=!1){if(null==t)return!1;e=e||!1,i=i||!1;let r=t.getBoundingClientRect();return null!=r&&(r.top>=0&&r.top<=(window.innerHeight||document.documentElement.clientHeight)||!e)&&(r.left>=0||!s)&&(r.bottom>=0&&r.bottom<=(window.innerHeight||document.documentElement.clientHeight)||!i)&&(r.right<=(window.innerWidth||document.documentElement.clientWidth)||!s)}};function h(t){if(t.onclick){let e=document.createEvent("MouseEvents");e.initEvent("click",!0,!0),t.onclick.apply(t,[e])}}let c={_h:27};var d=i(5113);let g=t=>null!==t&&"IFRAME"===t.tagName;class f{constructor(t,e,i,s,r,n,o,l,a,u,h,c,g,p,m,b,v,A,y,E,w,C,S,O,_,T,N,I,k,B){this.message=t,this.messageAlignment=e,this.slideFrom=i,this.extras=s,this.triggerId=r,this.clickAction=n,this.uri=o,this.openTarget=l,this.dismissType=a,this.duration=u,this.icon=h,this.imageUrl=c,this.imageStyle=g,this.iconColor=p,this.iconBackgroundColor=m,this.backgroundColor=b,this.textColor=v,this.closeButtonColor=A,this.animateIn=y,this.animateOut=E,this.header=w,this.headerAlignment=C,this.headerTextColor=S,this.frameColor=O,this.buttons=_,this.cropType=T,this.orientation=N,this.htmlId=I,this.css=k,this.messageExtras=B,this.message=t,this.messageAlignment=e||f.TextAlignment.CENTER,this.duration=u||5e3,this.slideFrom=i||f.SlideFrom.BOTTOM,this.extras=s||{},this.triggerId=r,this.clickAction=n||f.ClickAction.NONE,this.uri=o,this.openTarget=l||f.OpenTarget.NONE,this.dismissType=a||f.DismissType.AUTO_DISMISS,this.icon=h,this.imageUrl=c,this.imageStyle=g||f.ImageStyle.TOP,this.iconColor=p||f.th.ih,this.iconBackgroundColor=m||f.th.sh,this.backgroundColor=b||f.th.ih,this.textColor=v||f.th.hh,this.closeButtonColor=A||f.th.eh,this.animateIn=y,null==this.animateIn&&(this.animateIn=!0),this.animateOut=E,null==this.animateOut&&(this.animateOut=!0),this.header=w,this.headerAlignment=C||f.TextAlignment.CENTER,this.headerTextColor=S||f.th.hh,this.frameColor=O||f.th.Eh,this.buttons=_||[],this.cropType=T||f.CropType.FIT_CENTER,this.orientation=N,this.htmlId=I,this.css=k,this.isControl
1=!1,this.messageExtras=B,this.nh=!1,this.Ht=!1,this.So=!1,this.Th=!1,this.jo=null,this.wo=null,this.ti=new d.A,this.oh=new d.A,this.$o=f.TextAlignment.CENTER}subscribeToClickedEvent(t){return this.ti.Dt(t)}subscribeToDismissedEvent(t){return this.oh.Dt(t)}removeSubscription(t){this.ti.removeSubscription(t),this.oh.removeSubscription(t)}removeAllSubscriptions(){this.ti.removeAllSubscriptions(),this.oh.removeAllSubscriptions()}closeMessage(){this.ll(this.jo)}vo(){return!0}Po(){return this.vo()}ho(){return null!=this.htmlId&&this.htmlId.length>4}lo(){return this.ho()&&null!=this.css&&this.css.length>0}do(){if(this.ho()&&this.lo())return this.htmlId+"-css"}_t(){return!this.Ht&&(this.Ht=!0,!0)}Bo(){return this.Ht}$t(t){return!this.So&&(this.So=!0,this.ti.X(),!0)}Qt(){return!this.Th&&(this.Th=!0,this.oh.X(),!0)}hide(t){if(t&&t.parentNode){let e=t.closest(".ab-iam-root");if(null==e&&(e=t),this.vo()&&null!=e.parentNode){let t=e.parentNode.classList;t&&t.contains(f.rh)&&t.remove(f.rh),document.body.removeEventListener("touchmove",f.lh)}e.className=e.className.replace(f.uh,f.ah)}return this.animateOut||!1}ll(t,e){let i,s;if(null==t)return;this.jo=null;let r=!1;(i=-1===t.className.indexOf("ab-in-app-message")?t.getElementsByClassName("ab-in-app-message")[0]:t)&&(r=this.hide(i));let n=document.body;null!=n&&(s=n.scrollTop);let l=()=>{if(t&&t.parentNode){let e=t.closest(".ab-iam-root");null==e&&(e=t),e.parentNode&&e.parentNode.removeChild(e)}let i=this.do();if(null!=i){let t=document.getElementById(i);t&&t.parentNode&&t.parentNode.removeChild(t)}null!=n&&"Safari"===o.A.browser&&(n.scrollTop=s),e?e():this.Qt()};r?setTimeout(l,f.Ih):l(),this.wo&&this.wo.focus()}zo(){return document.createTextNode(this.message||"")}ko(t){let e="";this.message||this.header||!this.vo()||(e="Modal Image"),t.setAttribute("alt",e)}static lh(t){if(t.targetTouches&&t.targetTouches.length>1)return;let e=t.target;e&&e.classList&&e.classList.contains("ab-message-text")&&e.scrollHeight>e.clientHeight||document.querySelector(`.${f.rh}`)&&t.cancelable&&t.preventDefault()}Ah(t){let e=t.parentNode;this.vo()&&null!=e&&this.orientation!==f.Orientation.LANDSCAPE&&(null!=e.classList&&e.classList.add(f.rh),document.body.addEventListener("touchmove",f.lh,!!function(){if(null==u.Ic){u.Ic=!1;try{let t=Object.defineProperty({},"passive",{get:()=>{u.Ic=!0}});window.addEventListener("testPassive",()=>{},t),window.removeEventListener("testPassive",()=>{},t)}catch(t){l.A.error((0,a.u)(t))}}return u.Ic}()&&{passive:!1})),t.className+=" "+f.uh}static Oh(t){if(t.keyCode===c._h&&!r.Ay.ee(r.lw.mh)&&document.querySelectorAll(".ab-modal-interactions").length>0){let t=document.getElementsByClassName("ab-html-message"),e=!1;for(let i of t){let t=null;g(i)&&i.contentWindow&&(t=i.contentWindow.document.getElementsByClassName("ab-programmatic-close-button")[0]),null!=t&&(h(t),e=!0)}if(!e){let t=document.querySelectorAll(".ab-modal-interactions > .ab-close-button")[0];null!=t&&h(t)}}}Lh(){this.nh||r.Ay.ee(r.lw.mh)||(document.addEventListener("keydown",f.Oh,!1),r.Ay.Nh(()=>{document.removeEventListener("keydown",f.Oh)}),this.nh=!0)}bt(t){let e={};return t&&(e[f.es.ra]=this.message,e[f.es.sa]=this.messageAlignment,e[f.es.Sh]=this.slideFrom,e[f.es.qs]=this.extras,e[f.es.ta]=this.triggerId,e[f.es.ia]=this.clickAction,e[f.es.URI]=this.uri,e[f.es.oa]=this.openTarget,e[f.es.pa]=this.dismissType,e[f.es.ma]=this.duration,e[f.es.na]=this.icon,e[f.es.ls]=this.imageUrl,e[f.es.ua]=this.imageStyle,e[f.es.ca]=this.iconColor,e[f.es.fa]=this.iconBackgroundColor,e[f.es.da]=this.backgroundColor,e[f.es.la]=this.textColor,e[f.es.ga]=this.closeButtonColor,e[f.es.ja]=this.animateIn,e[f.es.xa]=this.animateOut,e[f.es.za]=this.header,e[f.es.ha]=this.headerAlignment,e[f.es.va]=this.headerTextColor,e[f.es.wa]=this.frameColor,e[f.es.ya]=this.buttons,e[f.es.Sa]=this.cropType,e[f.es.ba]=this.orientation,e[f.es.ka]=this.htmlId,e[f.es.CSS]=this.css,e[f.es.hs]=t,e[f.es.qa]=this.messageExtras),e}}f.th={hh:0xff333333,ih:0xffffffff,sh:0xff0073d5,Rh:0xffefefef,Mh:0xff555555,Eh:0xc0333333,eh:0xff9b9b9b},f.Co={Dh:"hd",xo:"ias",Ch:"of",dh:"do",Uh:"umt",bh:"tf",Ph:"te"},f.SlideFrom={TOP:"TOP",BOTTOM:"BOTTOM"},f.ClickAction={NEWS_FEED:"NEWS_FEED",URI:"URI",NONE:"NONE"}
1,f.DismissType={AUTO_DISMISS:"AUTO_DISMISS",MANUAL:"SWIPE"},f.OpenTarget={NONE:"NONE",BLANK:"BLANK"},f.ImageStyle={TOP:"TOP",GRAPHIC:"GRAPHIC"},f.Orientation={PORTRAIT:"PORTRAIT",LANDSCAPE:"LANDSCAPE"},f.TextAlignment={START:"START",CENTER:"CENTER",END:"END"},f.CropType={CENTER_CROP:"CENTER_CROP",FIT_CENTER:"FIT_CENTER"},f.bo={Wr:"SLIDEUP",Vr:"MODAL",Fo:"MODAL_STYLED",Lr:"FULL",Ur:"WEB_HTML",po:"HTML",Jo:"HTML_FULL"},f.Ih=500,f.ph=200,f.uh="ab-show",f.ah="ab-hide",f.rh="ab-pause-scrolling",f.es={ra:"m",sa:"ma",Sh:"sf",qs:"e",ta:"ti",ia:"ca",URI:"u",oa:"oa",pa:"dt",ma:"d",na:"i",ls:"iu",ua:"is",ca:"ic",fa:"ibc",da:"bc",la:"tc",ga:"cbc",ja:"ai",xa:"ao",za:"h",ha:"ha",va:"htc",wa:"fc",ya:"b",Sa:"ct",ba:"o",ka:"hi",CSS:"css",hs:"type",Eo:"messageFields",qa:"me"};class p extends f{constructor(t,e,i,s,r,n,o,l,a,u,h,c){super(t,void 0,void 0,e,i,void 0,void 0,void 0,s=s||f.DismissType.MANUAL,r,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,n,o,void 0,void 0,void 0,l,void 0,void 0,void 0,a,u,c),this.messageFields=h,this.messageFields=h}Po(){return!1}$t(t){if(this.uo===f.bo.Ur){if(this.So)return!1;this.So=!0}return this.ti.X(t),!0}bt(){let t=super.bt(p.cs);return t[f.es.Eo]=this.messageFields,t}static Qr(t){return new p(t[f.es.ra],t[f.es.qs],t[f.es.ta],t[f.es.pa],t[f.es.ma],t[f.es.ja],t[f.es.xa],t[f.es.wa],t[f.es.ka],t[f.es.CSS],t[f.es.Eo],t[f.es.qa])}}p.cs=f.bo.Ur;class m{constructor(t,e,i,s,r,n,o){this.text=t,this.backgroundColor=e,this.textColor=i,this.borderColor=s,this.clickAction=r,this.uri=n,this.id=o,this.text=t||"",this.backgroundColor=e||f.th.sh,this.textColor=i||f.th.ih,this.borderColor=s||this.backgroundColor,this.clickAction=r||f.ClickAction.NONE,this.uri=n,null==o&&(o=m.Yi),this.id=o,this.So=!1,this.ti=new d.A}subscribeToClickedEvent(t){return this.ti.Dt(t)}removeSubscription(t){this.ti.removeSubscription(t)}removeAllSubscriptions(){this.ti.removeAllSubscriptions()}$t(){return!this.So&&(this.So=!0,this.ti.X(),!0)}static fromJson(t){return new m(t.text,t.bg_color,t.text_color,t.border_color,t.click_action,t.uri,t.id)}}m.Yi=-1;var b=i(14566);class v extends f{constructor(t,e,i,s,r,n,o,l,a,u,h,c,d,g,p,m,b,v,A,y,E,w,C,S,O,_,T,N,I){super(t,e,void 0,i,s,r,n,o,l=l||f.DismissType.MANUAL,a,u,h,c,d,g,p,m,b,v,A,y,E,w,C,S,O=O||f.CropType.CENTER_CROP,_=_||f.Orientation.PORTRAIT,T,N,I),this.$o=f.TextAlignment.CENTER}bt(){return super.bt(v.cs)}static Qr(t){return new v(t[f.es.ra],t[f.es.sa],t[f.es.qs],t[f.es.ta],t[f.es.ia],t[f.es.URI],t[f.es.oa],t[f.es.pa],t[f.es.ma],t[f.es.na],t[f.es.ls],t[f.es.ua],t[f.es.ca],t[f.es.fa],t[f.es.da],t[f.es.la],t[f.es.ga],t[f.es.ja],t[f.es.xa],t[f.es.za],t[f.es.ha],t[f.es.va],t[f.es.wa],w(t[f.es.ya]),t[f.es.Sa],t[f.es.ba],t[f.es.ka],t[f.es.CSS],t[f.es.qa])}}v.cs=f.bo.Lr;class A extends f{constructor(t,e,i,s,r,n,o,l,a,u,h,c,d,g,p,m,b,v,A,y,E,w,C,S,O,_,T,N){super(t,e,void 0,i,s,r,n,o,l=l||f.DismissType.MANUAL,a,u,h,c,d,g,p,m,b,v,A,y,E,w,C,S,O=O||f.CropType.FIT_CENTER,void 0,_,T,N),this.$o=f.TextAlignment.CENTER}bt(){return super.bt(A.cs)}static Qr(t){return new A(t[f.es.ra],t[f.es.sa],t[f.es.qs],t[f.es.ta],t[f.es.ia],t[f.es.URI],t[f.es.oa],t[f.es.pa],t[f.es.ma],t[f.es.na],t[f.es.ls],t[f.es.ua],t[f.es.ca],t[f.es.fa],t[f.es.da],t[f.es.la],t[f.es.ga],t[f.es.ja],t[f.es.xa],t[f.es.za],t[f.es.ha],t[f.es.va],t[f.es.wa],w(t[f.es.ya]),t[f.es.Sa],t[f.es.ka],t[f.es.CSS],t[f.es.qa])}}A.cs=f.bo.Vr;class y extends f{constructor(t,e,i,s,r,n,o,l,a,u,h,c,d,g,p,m,b,v,A,y,E,w){super(t,e=e||f.TextAlignment.START,i,s,r,n,o,l,a,u,h,c,void 0,d,g,p=p||f.th.Rh,m=m||f.th.Mh,b,v,A,void 0,void 0,void 0,void 0,void 0,void 0,void 0,y,E,w),this.$o=f.TextAlignment.START}vo(){return!1}zo(){let t=document.createElement("span");return t.appendChild(document.createTextNode(this.message||"")),t}Ah(t){let e=t.getElementsByClassName("ab-in-app-message")[0];u.Ho(e,!0,!0)||(this.slideFrom===f.SlideFrom.TOP?e.style.top="0px":e.style.bottom="0px"),super.Ah(t)}bt(){return super.bt(y.cs)}static Qr(t){return new y(t[f.es.ra],t[f.es.sa],t[f.es.Sh],t[f.es.qs],t[f.es.ta],t[f.es.ia],t[f.es.URI],t[f.es.oa],t[f.es.pa],t[f.es.ma],t[f.es.na],t[f.es.ls],t[f.es.ca],t[f.es.fa],t[f.es.da],t[f.es.la],t[f.es.ga],t[f.es.ja],t[f.es.xa],t[f.es.ka],t[f.es.CSS],t[f.es.qa])}}function E(t){let e;if(!t)return null;if(t.is_control)return n.fromJson(t);let i=t.type;null!=i&&(i=i.toUpperCase());let s=t.message,r=t.text_align_message,o=t.slide_from,a=t.extras,u=t.trigger_id,h=t.click_action,c=t.uri,d=t.open_target,g=t.message_close,b=t.duration,E=t.icon,w=t.image_url,C=t.image_style,S=t.icon_color,O=t.icon_bg_color,_=t.bg_color,T=t.text_color,N=t.close_btn_color,I=t.header,k=t.text_align_header,B=t.header_text_color,D=t.frame_color,x=[],P=t.btns;null==P&&(P=[]);for(let t=0;t<P.length;t++)x.push(m.fromJson(P[t]));let $=t.crop_type,R=t.orientation,L=t.animate_in,U=t.animate_out,F=t.html_id,M=t.css;null!=F&&""!==F&&null!=M&&""!==M||(F=void 0,M=void 0);let z=t.message_extras;if(i===A.cs||i===f.bo.Fo)e=new A(s,r,a,u,h,c,d,g,b,E,w,C,S,O,_,T,N,L,U,I,k,B,D,x,$,F,M,z);else if(i===v.cs)e=new v(s,r,a,u,h,c,d,g,b,E,w,C,S,O,_,T,N,L,U,I,k,B,D,x,$,R,F,M,z);else if(i===y.cs)e=new y(s,r,o,a,u,h,c,d,g,b,E,w,S,O,_,T,N,L,U,F,M,z);else{if(i!==p.cs&&i!==f.bo.po&&i!==f.bo.Jo)return void l.A.error("Ignoring message with unknown type "+i);(e=new p(s,a,u,g,b,L,U,D,F,M,t.message_fields,z)).trusted=t.trusted||!1}return e.uo=i,e}function w(t){let e=[];for(let i of t)e.push(new m(i.text,i.backgroundColor,i.textColor,i.borderColor,i.clickAction,i.uri,i.id));return e}y.cs=f.bo.Wr;var C=i(72732),S=i(20785),O=i(39102),_=i(59606);class T{constructor(t){this.xc=t,this.xc=t}zc(t){return null==this.xc||this.xc===t[0]}static fromJson(t){return new T(t?t.event_name:null)}bt(){return this.xc}
1}var N=i(44259);class I{constructor(t,e,i,s){this.yE=t,this.HE=e,this.comparator=i,this.LE=s,this.yE=t,this.HE=e,this.comparator=i,this.LE=s,this.HE===I.QE.UE&&this.comparator!==I.wE.XE&&this.comparator!==I.wE.BE&&this.comparator!==I.wE.jE&&this.comparator!==I.wE.zE&&(this.LE=(0,_.Zo)(this.LE))}zc(t){let e=null;switch(null!=t&&(e=t[this.yE]),this.comparator){case I.wE.FE:return null!=e&&e.valueOf()===this.LE.valueOf();case I.wE.kE:return null==e||e.valueOf()!==this.LE.valueOf();case I.wE.xE:return null!=e&&typeof e==typeof this.LE&&e>this.LE;case I.wE.XE:return this.HE===I.QE.UE?null!=e&&(0,N.$P)(e)&&(0,_.Jd)(e)<=this.LE.valueOf():null!=e&&typeof e==typeof this.LE&&e>=this.LE;case I.wE.JE:return null!=e&&typeof e==typeof this.LE&&e<this.LE;case I.wE.BE:return this.HE===I.QE.UE?null!=e&&(0,N.$P)(e)&&(0,_.Jd)(e)>=this.LE.valueOf():null!=e&&typeof e==typeof this.LE&&e<=this.LE;case I.wE.VE:return null!=e&&"string"==typeof e&&typeof e==typeof this.LE&&null!=e.match(this.LE);case I.wE.qE:return null!=e;case I.wE.PE:return null==e;case I.wE.jE:return null!=e&&(0,N.$P)(e)&&(0,_.DA)(e)<this.LE;case I.wE.zE:return null!=e&&(0,N.$P)(e)&&(0,_.DA)(e)>this.LE;case I.wE.WE:return null==e||typeof e!=typeof this.LE||"string"!=typeof e||null==e.match(this.LE)}return!1}static fromJson(t){return new I(t.property_key,t.property_type,t.comparator,t.property_value)}bt(){let t=this.LE;return(0,N.$P)(this.LE)&&(t=(0,_.UK)(t.valueOf())),{k:this.yE,t:this.HE,c:this.comparator,v:t}}static Rn(t){return new I(t.k,t.t,t.c,t.v)}}I.QE={ZE:"boolean",$E:"number",tT:"string",UE:"date"},I.wE={FE:1,kE:2,xE:3,XE:4,JE:5,BE:6,VE:10,qE:11,PE:12,jE:15,zE:16,WE:17};class k{constructor(t){this.filters=t,this.filters=t}zc(t){let e=!0;for(let i=0;i<this.filters.length;i++){let s=this.filters[i],r=!1;for(let e=0;e<s.length;e++)if(s[e].zc(t)){r=!0;break}if(!r){e=!1;break}}return e}static fromJson(t){if(null==t||!(0,N.cy)(t))return null;let e=[];for(let i=0;i<t.length;i++){let s=[],r=t[i];for(let t=0;t<r.length;t++)s.push(I.fromJson(r[t]));e.push(s)}return new k(e)}bt(){let t=[];for(let e=0;e<this.filters.length;e++){let i=this.filters[e],s=[];for(let t=0;t<i.length;t++)s.push(i[t].bt());t.push(s)}return t}static Rn(t){let e=[];for(let i=0;i<t.length;i++){let s=[],r=t[i];for(let t=0;t<r.length;t++)s.push(I.Rn(r[t]));e.push(s)}return new k(e)}}class B{constructor(t,e){this.xc=t,this.tf=e,this.xc=t,this.tf=e}zc(t){if(null==this.xc||null==this.tf)return!1;let e=t[0],i=t[1];return e===this.xc&&this.tf.zc(i)}static fromJson(t){return new B(t?t.event_name:null,t?k.fromJson(t.property_filters):null)}bt(){return{e:this.xc,pf:this.tf?this.tf.bt():null}}}class D{constructor(t,e){this.if=t,this.rf=e,this.if=t,this.rf=e}zc(t){if(null==this.if)return!1;let e=L.sf(t[0],this.if);if(!e)return!1;let i=null==this.rf||0===this.rf.length;if(null!=this.rf){for(let e=0;e<this.rf.length;e++)if(this.rf[e]===t[1]){i=!0;break}}return e&&i}static fromJson(t){return new D(t?t.id:null,t?t.buttons:null)}bt(){return this.if}}class x{constructor(t){this.productId=t,this.productId=t}zc(t){return null==this.productId||t[0]===this.productId}static fromJson(t){return new x(t?t.product_id:null)}bt(){return this.productId}}class P{constructor(t,e){this.productId=t,this.tf=e,this.productId=t,this.tf=e}zc(t){if(null==this.productId||null==this.tf)return!1;let e=t[0],i=t[1];return e===this.productId&&this.tf.zc(i)}static fromJson(t){return new P(t?t.product_id:null,t?k.fromJson(t.property_filters):null)}bt(){return{id:this.productId,pf:this.tf?this.tf.bt():null}}}class ${constructor(t){this.if=t,this.if=t}zc(t){return null==this.if||L.sf(t[0],this.if)}static fromJson(t){return new $(t?t.campaign_id:null)}bt(){return this.if}}var R=i(9482);class L{constructor(t,e){this.type=t,this.data=e,this.type=t,this.data=e}_c(t,e){return L.Ec[this.type]===t&&(null==this.data||this.data.zc(e))}static sf(t,e){let i=null;try{i=window.atob(t)}catch(e){return l.A.info("Failed to unencode analytics id "+t+": "+(0,a.u)(e)),!1}return e===i.split("_")[0]}static fromJson(t){let e=t.type,i=null;switch(e){case L.Or.OPEN:case L.Or.As:break;case L.Or.Rr:i=x.fromJson(t.data);break;case L.Or.Cc:i=P.fromJson(t.data);break;case L.Or.hr:i=$.fromJson(t.data);break;case L.Or.Ee:i=T.fromJson(t.data);break;case L.Or.Pc:i=B.fromJson(t.data);break;case L.Or.Zr:i=D.fromJson(t.data)}return new L(e,i)}
1bt(){return{t:this.type,d:this.data?this.data.bt():null}}static Rn(t){let e,i=null;switch(t.t){case L.Or.OPEN:case L.Or.As:break;case L.Or.Rr:i=new x(t.d);break;case L.Or.Cc:i=new P((e=t.d||{}).id,k.Rn(e.pf||[]));break;case L.Or.hr:i=new $(t.d);break;case L.Or.Ee:i=new T(t.d);break;case L.Or.Pc:i=new B((e=t.d||{}).e,k.Rn(e.pf||[]));break;case L.Or.Zr:i=new D(t.d)}return new L(t.t,i)}}L.Or={OPEN:"open",Rr:"purchase",Cc:"purchase_property",hr:"push_click",Ee:"custom_event",Pc:"custom_event_property",Zr:"iam_click",As:"test"},L.Ec={},L.Ec[L.Or.OPEN]=R.A.OPEN,L.Ec[L.Or.Rr]=R.A.Rr,L.Ec[L.Or.Cc]=R.A.Rr,L.Ec[L.Or.hr]=R.A.hr,L.Ec[L.Or.Ee]=R.A.Ee,L.Ec[L.Or.Pc]=R.A.Ee,L.Ec[L.Or.Zr]=R.A.Zr,L.Ec[L.Or.As]=R.A.As;class U{constructor(t,e=[],i,s,r=0,n,o,l=0,a=U.td,u,h,c){this.id=t,this.sd=e,this.startTime=i,this.endTime=s,this.priority=r,this.type=n,this.data=o,this.ed=l,this.rd=a,this.Jr=u,this.hd=h,this.od=c,this.id=t,this.sd=e||[],void 0===i&&(i=null),this.startTime=i,void 0===s&&(s=null),this.endTime=s,this.priority=r||0,this.type=n,this.ed=l||0,null==u&&(u=1e3*(this.ed+30)),this.Jr=u,this.data=o,null!=a&&(this.rd=a),this.hd=h,this.od=c||null}nd(t){return null==this.od||this.rd!==U.td&&t-this.od>=1e3*this.rd}ad(t){this.od=t}ud(t){return Math.max(t+1e3*this.ed-new Date().valueOf(),0)}dd(t){let e=new Date().valueOf()-t,i=null==t||isNaN(e)||null==this.Jr||e<this.Jr;return i||l.A.info(`Trigger action ${this.type} is no longer eligible for display - fired ${e}ms ago and has a timeout of ${this.Jr}ms.`),!i}static fromJson(t){let e=t.id,i=[];for(let e=0;e<t.trigger_condition.length;e++)i.push(L.fromJson(t.trigger_condition[e]));let s=(0,_.Zo)(t.start_time),r=(0,_.Zo)(t.end_time),n=t.priority,o=t.type,l=t.delay,a=t.re_eligibility,u=t.timeout,h=t.data,c=t.min_seconds_since_last_trigger;return(0,N.BY)(U.Or,o,"Could not construct Trigger from server data","Trigger.Types")?new U(e,i,s,r,n,o,h,l,a,u,c):null}bt(){let t=[];for(let e=0;e<this.sd.length;e++)t.push(this.sd[e].bt());return{i:this.id,c:t,s:this.startTime,e:this.endTime,p:this.priority,t:this.type,da:this.data,d:this.ed,r:this.rd,tm:this.Jr,ss:this.hd,ld:this.od}}static Rn(t){let e=[],i=t.c||[];for(let t=0;t<i.length;t++)e.push(L.Rn(i[t]));return new U(t.i,e,(0,_.jU)(t.s),(0,_.jU)(t.e),t.p,t.t,t.da,t.d,t.r,t.tm,t.ss,t.ld)}}U.Or={Cr:"inapp",md:"templated_iam"},U.td=-1;var F=i(42729),M=i(26034),z=i(80336),j=i(26063),q=i(9825);class V{constructor(t,e,i,s){this.S=t,this.T=e,this.C=i,this.Cs=s,this.S=t,this.T=e,this.C=i,this.Cs=s,this.Mi=new d.A,r.Ay.F(this.Mi),this.Bi=1e3,this._i=6e4,this.Pi=null,this.Gi=null,this.$i=null}Oi(){return this.Mi}Xi(t){return this.Mi.Dt(t)}Hi(){return this.Pi}Ji(t){this.Pi=t}ut(t,e,i,s){let r,o=new S.A;if(e===O.w.Ki||t instanceof n){if(!t._t())return l.A.info("This in-app message has already received an impression. Ignoring analytics event."),o}else if((e===O.w.Li||t instanceof p&&e===O.w.Qi)&&!t.$t(s))return l.A.info("This in-app message has already received a click. Ignoring analytics event."),o;return null==(r=t instanceof n?{trigger_ids:[t.triggerId]}:this.Vi(t))?o:(t.messageExtras&&(r.message_extras=t.messageExtras),null!=i&&(r.bid=i),b.A.ut(e,r))}Wi(t,e){let i=new S.A;if(!t.$t())return l.A.info("This in-app message button has already received a click. Ignoring analytics event."),i;let s=this.Vi(e);return null==s?i:t.id===m.Yi?(l.A.info("This in-app message button does not have a tracking id. Not logging event to Braze servers."),i):(null!=t.id&&(s.bid=t.id),b.A.ut(O.w.Qi,s))}Zi(t){let e=t.messageFields;return null!=e&&e.is_push_primer||!1}Ir(t){let e;if(!(t instanceof f))return;let i=t=>{if(!t)return;let e=(0,M.jj)(t);return(0,M.qj)(e)?(0,M.$6)(M.mY.Mr,"In-App Message"):(0,M.dy)(e)&&!z.A.Tr()?(0,M.$6)(M.mY.wr,"In-App Message"):void 0};if(this.Zi(t)&&!z.A.Tr())return"In-App Message contains a push prompt, but is not eligible for a push prompt. Ignoring.";for(let s of t.buttons||[])if(s.clickAction===f.ClickAction.URI&&s.uri&&F.nx.test(s.uri)&&(e=i(s.uri)))return e;return t.clickAction===f.ClickAction.URI&&t.uri&&F.nx.test(t.uri)?i(t.uri):void 0}Br(t,e){e!==this.$i&&this._r(),this.Gi=t,this.$i=e}_r(){null!=this.Gi&&(clearTimeout(this.Gi),this.Gi=null,this.$i=null)}qr(t,e,i,r){let n=this.S;if(!n)return;this.$i&&t.triggerId!==this.$i&&(this._r(),j.A.vi(this.C,j.A.O.Er));let o=n.Gr(!1,!1),a=n.H(o);a.template={trigger_id:t.triggerId,trigger_event_type:e},null!=i&&(a.template.data=i.Nr());let u=n.J(a,j.A.O.Er);n.V(a,(n=-1)=>{let o=this.S;if(!o)return;let h=new Date().valueOf();j.A.W(this.C,j.A.O.Er,h),-1!==n&&u.push(["X-Braze-Req-Tokens-Remaining",n.toString()]);let c,d,g=!1;s.A.Y({url:`${o.Z()}/template/`,data:a,headers:u,tt:e=>{if(!o.st(a,e,u))return void("function"==typeof t.$r&&t.$r());if(o.it(),null==e||null==e.templated_message)return;let i=e.templated_message;if(i.type!==U.Or.Cr)return;let s=E(i.data);if(null==s)return;let r=this.Ir(s);if(r)return l.A.error(r),void("function"==typeof t.$r&&t.$r());"function"==typeof t.Xr&&t.Xr(s)},error:e=>{g=!0,c=e,d=`getting user personalization for message ${t.triggerId}.`},nt:(s,n)=>{if(new Date().valueOf()-t.Hr<t.Jr){let s=0;if(g){let e=Math.min(t.Jr,this._i),i=this.Bi;null==r&&(r=i),s=Math.min(e,(0,C.C)(i,3*r))}o.rt(n,()=>{this.qr(t,e,i,s)},j.A.O.Er,e=>this.Br(e,t.triggerId),()=>this._r(),s)}g&&o.et(c,d)}})},j.A.O.Er)}Vi(t){if(null==t.triggerId)return l.A.info("The in-app message has no analytics id. Not logging event to Braze servers."),null;let e={};return null!=t.triggerId&&(e.trigger_ids=[t.triggerId]),e}sn(t){return!!this.C&&!(!(t&&t instanceof f&&t.constructor!==f)||t instanceof n)&&this.C.Bt(q.d.gt.Kr,t.bt())}Ar(){let t;if(!this.C)return null;let e=this.C.ft(q.d.gt.Kr);if(!e)return null;switch(e.type){case f.bo.Lr:t=v.Qr(e);break;case f.bo.Ur:case f.bo.po:case f.bo.Jo:t=p.Qr(e);break;case f.bo.Vr:case f.bo.Fo:t=A.Qr(e);break;case f.bo.Wr:t=y.Qr(e)}return t&&this.Yr(),t}Yr(){this.C&&this.C.Ut(q.d.gt.Kr)}}let J={aa:null,l:!1,ea:()=>(J.p(),J.aa||(J.aa=new V(r.Ay.g(),r.Ay.P(),r.Ay.j(),r.Ay.ir())),J.aa),p:()=>{J.l||(r.Ay.h(J),J.l=!0)},destroy:()=>{J.aa=null,J.l=!1}};var K=i(48662),H=i(95883);class G{constructor(t,e,i,s,r){this.triggerId=t,this.Xr=e,this.$r=i,this.Hr=s,this.Jr=r,this.triggerId=t,this.Xr=e,this.$r=i,this.Hr=s,this.Jr=r}
1static fromJson(t,e,i,s,r){return null==t||null==t.trigger_id?null:new G(t.trigger_id,e,i,s,r)}}class X extends K.A{constructor(t,e,i,s,r){super(),this.tg=t,this.Ts=e,this.C=i,this.Fi=s,this.ig=r,this.tg=t,this.Ts=e,this.C=i,this.Fi=s,this.ig=r,this.sg=[],this.eg=[],this.hg=null,this.ng={},this.og={},this.triggers=[],this.lg=0,this.ag(),this.gg()}fg(){if(this.C){this.hg=this.C.ft(q.d.gt.aE)||this.hg,this.ng=this.C.ft(q.d.gt.iE)||this.ng,this.og=this.C.ft(q.d.gt.nE)||this.og;for(let t=0;t<this.triggers.length;t++){let e=this.triggers[t];e.id&&null!=this.og[e.id]&&e.ad(this.og[e.id])}}}ag(){if(!this.C)return;this.lg=this.C.ft(q.d.gt.oE)||0;let t=this.C.ft(q.d.gt.rE)||[],e=[];for(let i=0;i<t.length;i++)e.push(U.Rn(t[i]));this.triggers=e,this.fg()}gg(){let t=this,e=function(e,i,s,r,n){return function(){t.cg(e,i,s,r,n)}},i={};for(let t of this.triggers)t.id&&(i[t.id]=t);let s=!1;for(let t=0;t<this.triggers.length;t++){let r=this.triggers[t];if(r.id&&null!=this.ng[r.id]){let t=this.ng[r.id],n=[];for(let s=0;s<t.length;s++){let o=t[s],l=r.ud(o.Hr||0);if(l>0){let t,s;n.push(o),null!=o.ug&&(t=o.ug),null!=o.dg&&H.A.RE(o.dg)&&(s=H.A.Rn(o.dg));let a=[];if(o.pg&&(0,N.cy)(o.pg))for(let t=0;t<o.pg.length;t++){let e=i[o.pg[t]];null!=e&&a.push(e)}this.eg.push(window.setTimeout(e(r,o.Hr||0,t,s,a),l))}}this.ng[r.id].length>n.length&&(this.ng[r.id]=n,s=!0,0===this.ng[r.id].length&&delete this.ng[r.id])}}s&&this.C&&this.C.Bt(q.d.gt.iE,this.ng)}mg(){if(!this.C)return;let t=[];for(let e=0;e<this.triggers.length;
1e++)t.push(this.triggers[e].bt());this.lg=new Date().valueOf(),this.C.Bt(q.d.gt.rE,t),this.C.Bt(q.d.gt.oE,this.lg)}bg(){this.C&&((this.C.ft(q.d.gt.oE)||0)>this.lg?this.ag():this.fg())}U(t){let e=!1;if(null!=t&&t.triggers){let i;this.ig.Yr(),this.fg();let s={},r={};this.triggers=[];for(let i=0;i<t.triggers.length;i++){let n=U.fromJson(t.triggers[i]);if(n){n.id&&null!=this.og[n.id]&&(n.ad(this.og[n.id]),s[n.id]=this.og[n.id]),n.id&&null!=this.ng[n.id]&&(r[n.id]=this.ng[n.id]);for(let t=0;t<n.sd.length;t++)if(n.sd[t]._c(R.A.As,null)){e=!0;break}this.triggers.push(n)}}(0,N.n4)(this.og,s)||(this.og=s,this.C&&this.C.Bt(q.d.gt.nE,this.og)),(0,N.n4)(this.ng,r)||(this.ng=r,this.C&&this.C.Bt(q.d.gt.iE,this.ng)),this.mg(),e&&(l.A.info("Trigger with test condition found, firing test."),this.Ce(R.A.As)),this.Ce(R.A.OPEN);let n=this.sg;this.sg=[];for(let t=0;t<n.length;t++)i=Array.prototype.slice.call(n[t]),this.Ce(...i)}}cg(t,e,i,s,r){let n,o,a,u=s=>{this.fg();let r=new Date().valueOf();t.dd(e)||(!1===navigator.onLine&&t.type===U.Or.Cr&&s.imageUrl?l.A.info(`Not showing ${t.type} trigger action ${t.id} due to offline state.`):t.nd(r)&&this.wg(t,r,i)?0===this.Ts.hc()?l.A.info(`Not displaying trigger ${t.id} because neither automaticallyShowInAppMessages() nor subscribeToInAppMessage() were called.`):(this.Ts.X([s]),this.yg(t,r)):l.A.info(`Not displaying trigger ${t.id} because display time fell outside of the acceptable time window.`))},h=()=>{this.fg();let n=r.pop();if(null!=n)if(this.Tg(n,e,i,s,r),n.dd(e)){let t=`Server aborted in-app message display, but the timeout on fallback trigger ${n.id} has already elapsed.`;r.length>0&&(t+=" Continuing to fall back."),l.A.info(t),h()}else{l.A.info(`Server aborted in-app message display. Falling back to lower priority ${n.type} trigger action ${t.id}.`);let o=1e3*n.ed-(new Date().valueOf()-e);o>0?this.eg.push(window.setTimeout(()=>{this.cg(n,e,i,s,r)},o)):this.cg(n,e,i,s,r)}};switch(t.type){case U.Or.Cr:if(null==(n=E(t.data))){l.A.error(`Could not parse trigger data for trigger ${t.id}, ignoring.`);break}if(o=this.ig.Ir(n)){l.A.error(o),h();break}u(n);break;case U.Or.md:if(null==(a=G.fromJson(t.data,u,h,e,t.Jr||0))){l.A.error(`Could not parse trigger data for trigger ${t.id}, ignoring.`);break}this.ig.qr(a,i,s);break;default:l.A.error(`Trigger ${t.id} was of unexpected type ${t.type}, ignoring.`)}}Ce(t,e=null,i){if(!(0,N.BY)(R.A,t,"Cannot fire trigger action.","TriggerEvents"))return;if(this.Fi&&this.Fi.dc())return l.A.info("Trigger sync is currently in progress, awaiting sync completion before firing trigger event."),void this.sg.push(arguments);this.bg();let s=new Date().valueOf(),r=s-(this.hg||0),n=!0,o=!0,a=[];for(let i=0;i<this.triggers.length;i++){let r=this.triggers[i],l=s+1e3*r.ed;if(r.nd(l)&&(null==r.startTime||r.startTime.valueOf()<=s)&&(null==r.endTime||r.endTime.valueOf()>=s)){let i=!1;for(let s=0;s<r.sd.length;s++)if(r.sd[s]._c(t,e)){i=!0;break}i&&(n=!1,this.wg(r,l,t)&&(o=!1,a.push(r)))}}if(n)return void l.A.info(`Trigger event ${t} did not match any trigger conditions.`);if(o)return void l.A.info(`Ignoring ${t} trigger event because a trigger was displayed ${r/1e3}s ago.`);a.sort((t,e)=>t.priority-e.priority);let u=a.pop();null!=u&&(l.A.info(`Firing ${u.type} trigger action ${u.id} from trigger event ${t}.`),this.Tg(u,s,t,i,a),0===u.ed?this.cg(u,s,t,i,a):this.eg.push(window.setTimeout(()=>{this.cg(u,s,t,i,a)},1e3*u.ed)))}changeUser(t=!1){if(this.triggers=[],this.C&&this.C.Ut(q.d.gt.rE),!t){this.sg=[],this.hg=null,this.og={},this.ng={};for(let t=0;t<this.eg.length;t++)clearTimeout(this.eg[t]);this.eg=[],this.C&&(this.C.Ut(q.d.gt.aE),this.C.Ut(q.d.gt.nE),this.C.Ut(q.d.gt.iE))}}clearData(){this.triggers=[],this.hg=null,this.og={},this.ng={};for(let t=0;t<this.eg.length;t++)clearTimeout(this.eg[t]);this.eg=[]}wg(t,e,i){if(null==this.hg)return!0;if(i===R.A.As)return l.A.info("Ignoring minimum interval between trigger because it is a test type."),!0;let s=t.hd;return null==s&&(s=this.tg),e-this.hg>=1e3*s}Tg(t,e,i,s,r){let n;this.fg(),t.id&&(this.ng[t.id]=this.ng[t.id]||[]);let o={};
1o.Hr=e,o.ug=i,null!=s&&(n=s.bt()),o.dg=n;let l=[];for(let t of r)t.id&&l.push(t.id);o.pg=l,t.id&&this.ng[t.id].push(o),this.C&&this.C.Bt(q.d.gt.iE,this.ng)}yg(t,e){this.fg(),t.ad(e),this.hg=e,t.id&&(this.og[t.id]=e),this.C&&(this.C.Bt(q.d.gt.aE,e),this.C.Bt(q.d.gt.nE,this.og))}}let Z={l:!1,provider:null,m:()=>(Z.p(),Z.provider||Z.rg(),Z.provider),rg:()=>{if(!Z.provider){let t=r.Ay.ee(r.lw.Xh);Z.provider=new X(null!=t?t:30,J.ea().Oi(),r.Ay.j(),r.Ay.rn(),J.ea()),r.Ay._(Z.provider)}},p:()=>{Z.l||(Z.rg(),r.Ay.h(Z),Z.l=!0)},destroy:()=>{Z.provider=null,Z.l=!1}}},72732:(t,e,i)=>{i.d(e,{C:()=>s});let s=(t,e)=>(t=Math.ceil(t),Math.floor(Math.random()*((e=Math.floor(e))-t+1))+t)},75632:(t,e,i)=>{i.d(e,{A:()=>u});var s=i(44259),r=i(88166),n=i(39102),o=i(42729),l=i(4794),a=i(59606);class u{constructor(t,e){this.Cs=t,this.Fi=e,this.Cs=t,this.Fi=e}getUserId(t){let e=this.Cs.getUserId();if("function"!=typeof t)return e;r.A.warn("The callback for getUserId is deprecated. You can access its return value directly instead (e.g. `const id = braze.getUser().getUserId()`)"),t(e)}addAlias(t,e){return!(0,o.rK)(t,"add alias","the alias",!1)||t.length<=0?(r.A.error("addAlias requires a non-empty alias"),!1):!(0,o.rK)(e,"add alias","the label",!1)||e.length<=0?(r.A.error("addAlias requires a non-empty label"),!1):this.Fi.Cn(t,e).tt}setFirstName(t){return!!(0,o.rK)(t,"set first name","the firstName",!0)&&this.Cs.nu("first_name",t)}setLastName(t){return!!(0,o.rK)(t,"set last name","the lastName",!0)&&this.Cs.nu("last_name",t)}setEmail(t){return null===t||(0,o.B9)(t)?this.Cs.nu("email",t):(r.A.error(`Cannot set email address - "${t}" did not pass RFC-5322 validation.`),!1)}setGender(t){return"string"==typeof t&&(t=t.toLowerCase()),!(null!==t&&!(0,s.BY)(u.Genders,t,`Gender "${t}" is not a valid gender.`,"User.Genders"))&&this.Cs.nu("gender",t)}setDateOfBirth(t,e,i){return null===t&&null===e&&null===i?this.Cs.nu("dob",null):(t=null!=t?parseInt(t.toString()):null,e=null!=e?parseInt(e.toString()):null,i=null!=i?parseInt(i.toString()):null,null==t||null==e||null==i||isNaN(t)||isNaN(e)||isNaN(i)||e>12||e<1||i>31||i<1?(r.A.error("Cannot set date of birth - parameters should comprise a valid date e.g. setDateOfBirth(1776, 7, 4);"),!1):this.Cs.nu("dob",`${t}-${e}-${i}`))}setCountry(t){return!!(0,o.rK)(t,"set country","the country",!0)&&this.Cs.nu("country",t)}setHomeCity(t){return!!(0,o.rK)(t,"set home city","the homeCity",!0)&&this.Cs.nu("home_city",t)}setLanguage(t){return!!(0,o.rK)(t,"set language","the language",!0)&&this.Cs.nu("language",t)}setEmailNotificationSubscriptionType(t){return!!(0,s.BY)(u.NotificationSubscriptionTypes,t,`Email notification setting "${t}" is not a valid subscription type.`,"User.NotificationSubscriptionTypes")&&this.Cs.nu("email_subscribe",t)}setPushNotificationSubscriptionType(t){return!!(0,s.BY)(u.NotificationSubscriptionTypes,t,`Push notification setting "${t}" is not a valid subscription type.`,"User.NotificationSubscriptionTypes")&&this.Cs.nu("push_subscribe",t)}setPhoneNumber(t){return!!(0,o.rK)(t,"set phone number","the phoneNumber",!0)&&(null===t||t.match(u.Fn)?this.Cs.nu("phone",t):(r.A.error(`Cannot set phone number - "${t}" did not pass validation.`),!1))}setLastKnownLocation(t,e,i,s,n){return null==t||null==e?(r.A.error("Cannot set last-known location - latitude and longitude are required."),!1):(t=parseFloat(t.toString()),e=parseFloat(e.toString()),null!=i&&(i=parseFloat(i.toString())),null!=s&&(s=parseFloat(s.toString())),null!=n&&(n=parseFloat(n.toString())),isNaN(t)||isNaN(e)||null!=i&&isNaN(i)||null!=s&&isNaN(s)||null!=n&&isNaN(n)?(r.A.error("Cannot set last-known location - all supplied parameters must be numeric."),!1):t>90||t<-90||e>180||e<-180?(r.A.error("Cannot set last-known location - latitude and longitude are bounded by \xb190 and \xb1180 respectively."),!1):null!=i&&i<0||null!=n&&n<0?(r.A.error("Cannot set last-known location - accuracy and altitudeAccuracy may not be negative."),!1):this.Fi.setLastKnownLocation(this.Cs.getUserId(),t,e,s,i,n).tt)}setCustomUserAttribute(t,e,i){if(!(0,o.ZJ)(t))return!1;let r=e=>{let[i]=(0,o.fB)(e,l.KG,"attribute value",`set custom user attribute "${t}"`,"custom user attribute");return i};if((0,s.cy)(e)){let[i,s]=(0,o.Z2)(t,e);if(!i&&!s&&0!==e.length)return!1;if(i||0===e.length)return this.Fi.Ln(n.w.$n,t,e).tt;for(let t of e)if(!r(t))return!1}else if((0,s.Gv)(e)){if(!r(e))return!1;if(i)return this.Fi.Ln(n.w.Bn,t,e).tt}else if(!(void 0!==e&&(0,o.uZ)(e))||((0,s.$P)(e)&&(e=(0,a.EQ)(e)),"string"==typeof e&&!(0,o.Dz)(e,`set custom user attribute "${t}"`,"the element in the given array")))return!1;return this.Cs.setCustomUserAttribute(t,e)}addToCustomAttributeArray(t,e){return!!(0,o.Dz)(t,"add to custom user attribute array","the given key")&&!(null!=e&&!(0,o.Dz)(e,"add to custom user attribute array","the given value"))&&this.Fi.Ln(n.w.On,t,e).tt}removeFromCustomAttributeArray(t,e){return!!(0,o.Dz)(t,"remove from custom user attribute array","the given key")&&!(null!=e&&!(0,o.Dz)(e,"remove from custom user attribute array","the given value"))&&this.Fi.Ln(n.w.Gn,t,e).tt}incrementCustomUserAttribute(t,e){if(!(0,o.Dz)(t,"increment custom user attribute","the given key"))return!1;null==e&&(e=1);let i=parseInt(e.toString());return isNaN(i)||i!==parseFloat(e.toString())?(r.A.error(`Cannot increment custom user attribute because the given incrementValue "${e}" is not an integer.`),!1):this.Fi.Ln(n.w.Hn,t,i).tt}setCustomLocationAttribute(t,e,i){return!!(0,o.Dz)(t,"set custom location attribute","the given key")&&((null!==e||null!==i)&&(e=null!=e?parseFloat(e.toString()):null,i=null!=i?parseFloat(i.toString()):null,null==e&&null!=i||null!=e&&null==i||null!=e&&(isNaN(e)||e>90||e<-90)||null!=i&&(isNaN(i)||i>
1180||i<-180))?(r.A.error("Received invalid values for latitude and/or longitude. Latitude and longitude are bounded by \xb190 and \xb1180 respectively, or must both be null for removal."),!1):this.Fi.Kn(t,e,i).tt)}addToSubscriptionGroup(t){return!(0,o.rK)(t,"add user to subscription group","subscription group ID",!1)||t.length<=0?(r.A.error("addToSubscriptionGroup requires a non-empty subscription group ID"),!1):this.Fi.Mn(t,u.Yn.SUBSCRIBED).tt}removeFromSubscriptionGroup(t){return!(0,o.rK)(t,"remove user from subscription group","subscription group ID",!1)||t.length<=0?(r.A.error("removeFromSubscriptionGroup requires a non-empty subscription group ID"),!1):this.Fi.Mn(t,u.Yn.UNSUBSCRIBED).tt}setLineId(t){return(0,o.rK)(t,"set LINE user ID","the ID",!0)&&0!==(null==t?void 0:t.length)?t&&t.length>u.Jn?(r.A.error(`Rejected LINE user ID ${t} because it is longer than ${u.Jn} characters.`),!1):this.Cs.nu("native_line_id",t):(r.A.error("setLineId requires a non-empty ID"),!1)}An(t,e,i,s,r){this.Cs.An(t,e,i,s,r),this.Fi.Qn()}xn(t){this.Cs.xn(t)}}u.Genders={MALE:"m",FEMALE:"f",OTHER:"o",UNKNOWN:"u",NOT_APPLICABLE:"n",PREFER_NOT_TO_SAY:"p"},u.NotificationSubscriptionTypes={OPTED_IN:"opted_in",SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed"},u.Fn=/^[0-9 .\\(\\)\\+\\-]+$/,u.Yn={SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed"},u.Xn="user_id",u.lu="custom",u.ur=997,u.Jn=33},76892:(t,e,i)=>{i.d(e,{lw:()=>j,Ay:()=>V});var s=i(9825),r=i(5113),n=i(95718),o=i(88166);class l{constructor(t,e,i){this.C=t,this.gh=e,this.Fh=i,this.C=t,this.gh=e||!1,this.Fh=i,this.kh=new r.A,this.fh=0,this.wh=1}jh(){return this.gh}xh(){return this.C.ft(s.d.gt.qh)}setSdkAuthenticationSignature(t){let e=this.xh();this.C.Bt(s.d.gt.qh,t);let i=n.A.Ls.Fs;new n.A(i,o.A).setItem(i.Ms.yh,this.wh,t),e!==t&&this.it()}Bh(){this.C.Ut(s.d.gt.qh);let t=n.A.Ls.Fs;new n.A(t,o.A).ge(t.Ms.yh,this.wh)}subscribeToSdkAuthenticationFailures(t){return this.Fh.Dt(t)}Gh(t){this.Fh.X(t)}Hh(){this.kh.removeAllSubscriptions()}Jh(){this.fh+=1}Kh(){return this.fh}it(){this.fh=0}}var a=i(48662),u=i(41658);class h{constructor(t){this.id=t,this.id=t}Nr(){let t={};return null!=this.browser&&(t.browser=this.browser),null!=this.tc&&(t.browser_version=this.tc),null!=this.os&&(t.os_version=this.os),null!=this.resolution&&(t.resolution=this.resolution),null!=this.language&&(t.locale=this.language),null!=this.timeZone&&(t.time_zone=this.timeZone),null!=this.userAgent&&(t.user_agent=this.userAgent),t}}let c={BROWSER:"browser",BROWSER_VERSION:"browserVersion",OS:"os",RESOLUTION:"resolution",LANGUAGE:"language",TIME_ZONE:"timeZone",USER_AGENT:"userAgent"};var d=i(31463),g=i(16491),f=i(44259),p=i(83736);class m{constructor(t,e){this.C=t,this.Qa=e,this.C=t,null==e&&(e=(0,f.zu)(c)),this.Qa=e}ve(t=!0){let e=this.C.tu(s.d.iu.Na);null==e&&(e=new d.A(g.A.ce()),t&&this.C.uu(s.d.iu.Na,e));let i=new h(e.eu);for(let t=0;t<this.Qa.length;t++)switch(this.Qa[t]){case c.BROWSER:i.browser=u.A.browser;break;case c.BROWSER_VERSION:i.tc=u.A.version;break;case c.OS:i.os=this.ec();break;case c.RESOLUTION:i.rc=screen.width+"x"+screen.height;break;case c.LANGUAGE:i.language=u.A.language;break;case c.TIME_ZONE:i.timeZone=this.sc(new Date);break;case c.USER_AGENT:i.userAgent=u.A.userAgent}return i}ec(){if(u.A.ic())return u.A.ic();let t=this.C.ft(s.d.gt.oc);return t&&t.os_version?t.os_version:u.A.ec()}sc(t){let e=!1;if("undefined"!=typeof Intl&&"function"==typeof Intl.DateTimeFormat)try{if("function"==typeof Intl.DateTimeFormat().resolvedOptions){let t=Intl.DateTimeFormat().resolvedOptions().timeZone;if(null!=t&&""!==t)return t}}catch(t){o.A.info("Intl.DateTimeFormat threw an error, cannot detect user's time zone:"+(0,p.u)(t)),e=!0}if(e)return"";let i=t.getTimezoneOffset();return this.nc(i)}nc(t){let e=Math.trunc(t/60),i=Math.trunc(t%60),s="GMT";return 0!==t&&(s+=(t<0?"+":"-")+(("00"+Math.abs(e)).slice(-2)+":")+("00"+Math.abs(i)).slice(-2)),s}}var b=i(79472),v=i(95883),A=i(59606),y=i(14566),E=i(39102),w=i(26063),C=i(4794),S=i(53007),O=i(28005);class _{constructor(t,e,i,s,r,n,o,l,a,u,h,c){this.hn=t,this.C=e,this.Pa=i,this.Cs=s,this.T=r,this.B=n,this.an=o,this.La=l,this.Ta=a,this.Ra=u,this.appVersion=h,this.au=c,this.du=t=>null==t?"":`${t} `,this.hn=t,this.C=e,this.Pa=i,this.Cs=s,this.T=r,this.B=n,this.an=o,this.La=l,this.Ta=a,this.Ra=u,this.appVersion=h,this.au=c,this.fu=["npm"],this.vu=[]}H(t,e=!1,i=!1){let r=this.hn.ve(!i),n=r.Nr(),o=this.C.ft(s.d.gt.oc);(0,f.n4)(o,n)||(t.device=n),t.api_key=this.an,t.time=(0,A.UK)(new Date().valueOf(),!0);let l=this.C.ft(s.d.gt.pu)||[],a=this.C.ft(s.d.gt.Ru)||"";this.fu.length>0&&(!(0,f.n4)(l,this.fu)||a!==this.T.St())&&(t.sdk_metadata=this.fu),t.sdk_version=this.Ta,this.Ra&&(t.sdk_flavor=this.Ra),t.app_version=this.appVersion,t.app_version_code=this.au,t.device_id=r.id;let u=this.Cs.getUserId();if(e&&null!==u&&(t.user_id=u),!u&&!this.Pa.jh()){let e=(0,S.b)(this.C);e&&(t.alias=e)}return t}st(t,e,i){let s=e.auth_error,r=e.error;if(!s&&!r)return!0;
1if(s){let e;this.Pa.Jh();let r={errorCode:s.error_code};for(let t of i)(0,f.cy)(t)&&"X-Braze-Auth-Signature"===t[0]&&(r.signature=t[1]);t.respond_with&&t.respond_with.user_id?r.userId=t.respond_with.user_id:t.user_id&&(r.userId=t.user_id);let n=s.reason;return n?(r.reason=n,e=`due to ${n}`):e=`with error code ${s.error_code}.`,this.Pa.jh()||(e+=' Please use the "enableSdkAuthentication" initialization option to enable authentication.'),o.A.error(`SDK Authentication failed ${e}`),this.gu(t.events||[],t.attributes||[]),this.Pa.Gh(r),!1}if(r){let i,s=r;switch(s){case b.A.bu:return i="Received successful response with empty body.",y.A.ut(E.w.qu,{e:i}),o.A.info(i),!1;case b.A.Au:return i="Received successful response with invalid JSON",y.A.ut(E.w.qu,{e:i+": "+e.response}),o.A.info(i),!1;case b.A.Du:s=`The API key "${t.api_key}" is invalid for the baseUrl ${this.La}`;break;case b.A.Tu:s="Sorry, we are not currently accepting your requests. If you think this is in error, please contact us.";break;case b.A.ku:s="No device identifier. Please contact [email protected]"}o.A.error("Backend error: "+s)}return!1}yu(t,e,i,s){return!!(t&&0!==t.length||e&&0!==e.length||i||s)}wu(t,e,i,s,r=!1){let n=[],o=t=>t||"",l=o(this.Cs.getUserId()),a=this.Gr(t,e),u=[],h=[],c,d=null;if(i.length>0){let t=[];for(let e of i){if(c=e.Nr(),this.Pa.jh()){if(l&&!c.user_id){d||(d={}),d.events||(d.events=[]),d.events.push(c);continue}if(o(c.user_id)!==l){h.push(c);continue}}t.push(c)}t.length>0&&(a.events=t)}if(s.length>0){let t=[];for(let e of s)e&&(this.Pa.jh()&&o(e.user_id)!==l?u.push(e):t.push(e));t.length>0&&(a.attributes=t)}if(this.gu(h,u),a=this.H(a,!1,r),d){let t={requestData:d=this.H(d,!1,r),headers:this.J(d,w.A.O.Nu)};n.push(t)}if(a&&!this.yu(a.events,a.attributes,t,e))return d?n:null;let g={requestData:a,headers:this.J(a,w.A.O.Nu)};return n.push(g),n}gu(t,e){if(t){let e=[];for(let i of t){let t=v.A.fromJson(i);t.time=(0,A.YX)(t.time),e.push(t)}this.C.Vo(e)}if(e)for(let t of e)this.C.Cu(t)}et(t,e){let i="HTTP error ";null!=t&&(i+=t+" "),i+=e,o.A.error(i)}zr(t){return y.A.ut(E.w.Su,{n:t})}Gr(t,e,i){let s={};t&&(s.feed=!0),e&&(s.triggers=!0);let r=null!=i?i:this.Cs.getUserId();if(r&&(s.user_id=r),!s.user_id&&!this.Pa.jh()){let t=(0,S.b)(this.C);t&&(s.alias=t)}return s.config={config_time:this.B.Et()},{respond_with:s}}Bu(t){let e=new Date().valueOf(),i=C.mO.toString(),s=w.A.zu(this.C,t);return -1!==s&&(i=(e-s).toString()),i}J(t,e,i=!1){let s=[["X-Braze-Api-Key",this.an]],r=this.Bu(e);s.push(["X-Braze-Last-Req-Ms-Ago",r]);let n=w.A.ju(this.C,e).toString();s.push(["X-Braze-Req-Attempt",n]);let o=!1;if(null!=t.respond_with&&t.respond_with.triggers&&(s.push(["X-Braze-TriggersRequest","true"]),o=!0),null!=t.respond_with&&t.respond_with.feed&&(s.push(["X-Braze-FeedRequest","true"]),o=!0),e===w.A.O.wi){s.push(["X-Braze-ContentCardsRequest","true"]);let t=w.A.ju(this.C,w.A.O.wi);t&&!i||(t=1,w.A.Mu(this.C,w.A.O.wi,t));let e=Math.max(0,t-1);s.push(["BRAZE-SYNC-RETRY-COUNT",e.toString()]),o=!0}if(e===w.A.O.Le&&(s.push(["X-Braze-FeatureFlagsRequest","true"]),o=!0),o&&s.push(["X-Braze-DataRequest","true"]),this.Pa.jh()){let t=this.Pa.xh();null!=t&&s.push(["X-Braze-Auth-Signature",t])}return s}Xu(t,e,i,s){let r=window.setTimeout(()=>{o.A.info(`Retrying rate limited ${this.du(s)}SDK request.`),this.V(e,i,s)},t);this.vu.push(r)}fo(){for(let t of this.vu)window.clearTimeout(t);this.vu=[]}V(t,e,i,r){if(!this.$u(i))return o.A.info(`${this.du(i)}SDK request being rate limited.`),void("function"==typeof r&&r());let n=this.Fu();if(!n.Lu)return o.A.info(`${this.du(i)}SDK request being rate limited. Request will be retried in ${Math.trunc(n.Eu/1e3)} seconds.`),void this.Xu(n.Eu,t,e,i);this.C.Bt(s.d.gt.Ku,new Date().valueOf());let l=t.device;l&&l.os_version instanceof Promise?l.os_version.then(i=>{t.device.os_version=i,e(n.Iu)}):e(n.Iu)}Pu(t){let e=t?(0,O.s)(t):null;if(!e||!e["retry-after"])return null;let i=e["retry-after"];return isNaN(i)&&!isNaN(Date.parse(i))?{type:"date",value:Date.parse(i)}:isNaN(parseFloat(i.toString()))?(y.A.ut(E.w.qu,{e:"Received unexpected value for retry-after header in /sync response: "+i}),null):{type:"timestamp",value:1e3*parseFloat(i.toString())}}rt(t,e,i,s,r,n){let o;if(w.A.ju(this.C,i)>=C.uR)return;n=n||0;let l=this.Pu(t);r();let a=t=>{s(window.setTimeout(()=>{e()},t)),w.A.Uu(this.C,i)};if(l&&!isNaN(l.value)){switch(l.type){case"date":(o=l.value-new Date().getTime()+n)<0&&e();break;case"timestamp":o=l.value+n}
1a(o)}else n?a(n):w.A.vi(this.C,i)}xu(t){var e;null==(e=this.C)||e.Bt(s.d.gt.Hu,t)}Ou(t,e){let i=this.Gu();null==i&&(i={}),i[t]=e,this.C.Bt(s.d.gt._u,i)}Wu(){var t;return null==(t=this.C)?void 0:t.ft(s.d.gt.Hu)}Gu(){var t;return null==(t=this.C)?void 0:t.ft(s.d.gt._u)}Yu(t,e,i,s,r=""){let n;if(r){let t=this.Gu();n=null==t||isNaN(t[r])?e:t[r]}else(null==(n=this.Wu())||isNaN(n))&&(n=e);return Math.min(n+(t-s)/1e3/i,e)}Ju(t,e){return Math.max(0,(1-t)*e*1e3)}Qu(t,e=""){var i,r,n,o,l;let a={Lu:!0,Iu:-1,Eu:0};if(null==t&&(t=!0),!t&&!e)return a;let u,h,c=null;if(t)c=null==(i=this.C)?void 0:i.ft(s.d.gt.Ku);else{let t=w.A.Vu(this.C);if(null==t||null==t[e])return a;c=t[e]}if(null==c||isNaN(c)||(t?(u=(null==(r=this.B)?void 0:r.Zu())||-1,h=(null==(n=this.B)?void 0:n.tl())||-1):(u=(null==(o=this.B)?void 0:o.el(e))||-1,h=(null==(l=this.B)?void 0:l.il(e))||-1),-1===u||-1===h))return a;let d=new Date().valueOf(),g=this.Yu(d,u,h,c,e);return g<1?(a.Lu=!1,a.Eu=this.Ju(g,h)):(a.Iu=g=Math.trunc(g)-1,t?this.xu(g):this.Ou(e,g)),a}Fu(){return this.Qu(!0)}$u(t){let e=this.Qu(!1,t);return!(e&&!e.Lu)}it(){this.Pa.it()}Z(){return this.La}addSdkMetadata(t){for(let e of t)-1===this.fu.indexOf(e)&&this.fu.push(e)}}var T=i(72732),N=i(20785),I=i(80336);class k{constructor(t,e,i,s,n,o,l,a,u,h){this.an=t,this.baseUrl=e,this.T=i,this.hn=s,this.Cs=n,this.B=o,this.C=l,this.$l=a,this.Pa=u,this.S=h,this.an=t,this.baseUrl=e,this.Tl=0,this.dE=l.IE()||0,this.Ml=null,this.T=i,this.hn=s,this.Cs=n,this.B=o,this.C=l,this.Pa=u,this.S=h,this.$l=a,this.Pl=new r.A,this.Ol=null,this.Ul=50,this._l=!1}Kl(t,e){return!t&&!e&&this.Pa.Kh()>=this.Ul}Xl(t){let e=this.T.zl();if(t.length>0){let i=this.Cs.getUserId();for(let s of t){let t=!s.userId&&!i||s.userId===i;s.type===E.w.Fl&&t&&(e=!0)}}return e}Ql(t=!1,e=!1,i=!0,r,n,l,a=!1,u=!1){i&&this.Yl();let h=this.C.AE(),c=this.C.OE(),d=!1,g=(t,e,o=-1)=>{let a=new Date().valueOf();w.A.W(this.C,w.A.O.Nu,a),-1!==o&&e.push(["X-Braze-Req-Tokens-Remaining",o.toString()]);let u=!1;O.A.Y({url:this.baseUrl+"/data/",data:t,headers:e,tt:i=>{null!=t.respond_with&&t.respond_with.triggers&&(this.Tl=Math.max(this.Tl-1,0)),this.S.st(t,i,e)?(this.Pa.it(),this.B.gl(i),null!=t.respond_with&&t.respond_with.user_id!=this.Cs.getUserId()||(null!=t.device&&this.C.Bt(s.d.gt.oc,t.device),null!=t.sdk_metadata&&(this.C.Bt(s.d.gt.pu,t.sdk_metadata),this.C.Bt(s.d.gt.Ru,this.T.St())),this.$l(i),w.A.Mu(this.C,w.A.O.Nu,1),"function"==typeof r&&r())):i.auth_error&&(u=!0)},error:()=>{u=!0,null!=t.respond_with&&t.respond_with.triggers&&(this.Tl=Math.max(this.Tl-1,0)),this.S.gu(t.events,t.attributes),"function"==typeof n&&n()},nt:(t,e)=>{"function"==typeof l&&l(!u);let s=this.S.Pu(e),r=0;if(s)switch(s.type){case"date":r=Math.max(s.value-new Date().valueOf(),0);break;case"timestamp":r=s.value}if(i&&!d){if(u){w.A.Uu(this.C,w.A.O.Nu);let t=this.Ml;(null==t||t<1e3*this.dE)&&(t=1e3*this.dE);let e=Math.min(3e5,(0,T.C)(1e3*this.dE,3*t))+r;this.Zl(e)}else this.Zl(Math.max(1e3*this.dE,r));d=!0}}})},f=this.Xl(h),p=e||f;if(this.Kl(a,f))return void o.A.info("Declining to flush data due to 50 consecutive authentication failures");if(i&&!this.S.yu(h,c,t,p))return this.Zl(),void("function"==typeof l&&l(!0));let m=this.S.wu(t,p,h,c,u);p&&this.Tl++;let b=!1;if(m)for(let t of m)this.S.V(t.requestData,e=>g(t.requestData,t.headers,e),w.A.O.Nu,n),b=!0;this.Pa.jh()&&i&&!b?this.Zl():f&&(o.A.info("Invoking new session subscriptions"),this.Pl.X())}dc(){return this.Tl>0}Zl(t=1e3*this.dE){this._l||(this.Yl(),this.Ol=window.setTimeout(()=>{if(document.hidden){let t="visibilitychange",e=()=>{document.hidden||(document.removeEventListener(t,e,!1),this.Ql())};document.addEventListener(t,e,!1)}else this.Ql()},t),this.Ml=t)}Yl(){null!=this.Ol&&(clearTimeout(this.Ol),this.Ol=null)}initialize(){this._l=!1,this.Zl()}destroy(){this.Pl.removeAllSubscriptions(),this.Pa.Hh(),this.Yl(),this._l=!0,this.Ql(void 0,void 0,!1,void 0,void 0,void 0,void 0,!0),this.Ol=null}on(t){return this.Pl.Dt(t)}openSession(){let t=this.T.St()!==this.T.Qo();t&&(this.C.TE(s.d.iu.Na),this.C.TE(s.d.iu.su)),this.Ql(void 0,!1,void 0,()=>{this.C.Ut(s.d.gt.Ge)}),this.Qn(),t&&i.e(8259).then(i.bind(i,78259)).then(t=>{if(this._l)return;let e=t.default.ea();if(null!=e&&(I.A.isPushPermissionGranted()||I.A.isPushBlocked())){let t=()=>{e.wn()?o.A.info("Push token maintenance is disabled, not refreshing token for backend."):e.subscribe()},i=()=>{let e=this.C.ft(s.d.gt.zn);(null==e||e)&&t()},r=n.A.Ls.Fs;new n.A(r,o.A).cr(r.Ms.cu,(e,i)=>{i&&t()},i)}})}mc(){this.C.Ut(s.d.gt.Xe),this.C.Ut(s.d.gt.Hs),this.C.Ut(s.d.gt.Kr)}fc(){var t,e;this.C.Ut(s.d.gt.Ku),this.C.Ut(s.d.gt.lE);let i=w.A.O;for(let e in i){let s=i[e];this.S.Ou(s,null==(t=this.B)?void 0:t.el(s))}this.S.xu(null==(e=this.B)?void 0:e.Zu())}changeUser(t,e,i){let r=this.Cs.getUserId();if(r!==t){this.T.Il(),this.mc(),null!=r&&this.Ql(void 0,!1,void 0,void 0,void 0),this.Cs.ou(t),i?this.Pa.setSdkAuthenticationSignature(i):this.Pa.Bh();for(let t=0;t<e.length;t++)e[t].changeUser(null==r);this.S.fo(),null!=r&&this.C.Ut(s.d.gt.Zt),this.C.Ut(s.d.gt.oc),this.C.Ut(s.d.gt._E),this.fc(),this.openSession(),o.A.info('Changed user to "'+t+'".')}else{let e="Doing nothing.";i&&this.Pa.xh()!==i&&(this.Pa.setSdkAuthenticationSignature(i),e="Updated SDK authentication signature"),o.A.info(`Current user is already ${t}. ${e}`)}}requestImmediateDataFlush(t){this.Yl(),this.T.Qo(),this.Ql(void 0,void 0,void 0,void 0,()=>{o.A.error("Failed to flush data, request will be retried automatically.")},t,!0)}requestFeedRefresh(){this.T.Qo(),this.Ql(!0)}
1br(t,e){this.T.Qo(),o.A.info("Requesting explicit trigger refresh."),this.Ql(void 0,!0,void 0,t,e)}Cn(t,e){let i=E.w.vc,r={a:t,l:e},n=y.A.ut(i,r);return n&&(o.A.info(`Logged alias ${t} with label ${e}`),this.C.Bt(s.d.gt._E,r)),n}Ln(t,e,i){if(this.B.hu(e))return o.A.info(`Custom Attribute "${e}" is blocklisted, ignoring.`),new N.A;let s=y.A.ut(t,{key:e,value:i});if(s){let t="object"==typeof i?JSON.stringify(i,null,2):i;o.A.info(`Logged custom attribute: ${e} with value: ${t}`)}return s}setLastKnownLocation(t,e,i,s,r,n){let l={latitude:e,longitude:i};null!=s&&(l.altitude=s),null!=r&&(l.ll_accuracy=r),null!=n&&(l.alt_accuracy=n);let a=y.A.ut(E.w.bc,l,t||void 0);return a&&o.A.info(`Set user last known location as ${JSON.stringify(l,null,2)}`),a}lr(t,e){let i=this.T.Qo();return new v.A(this.Cs.getUserId(),E.w.wc,t,i,{cid:e})}kc(t,e){return new n.A(t,e)}Qn(){let t=n.A.Ls.Fs;this.kc(t,o.A).setItem(t.Ms.Nu,1,{baseUrl:this.baseUrl,data:{api_key:this.an,device_id:this.hn.ve().id},userId:this.Cs.getUserId(),sdkAuthEnabled:this.Pa.jh()})}vr(t){for(let e of t)if(e.api_key===this.an)this.S.gu(e.events,e.attributes);else{let t=n.A.Ls.Fs;new n.A(t,o.A).setItem(t.Ms.kr,g.A.ce(),e)}}Kn(t,e,i){let s,r;return this.B.hu(t)?(o.A.info(`Custom Attribute "${t}" is blocklisted, ignoring.`),new N.A):(null===e&&null===i?(s=E.w.yc,r={key:t}):(s=E.w.Sc,r={key:t,latitude:e,longitude:i}),y.A.ut(s,r))}Mn(t,e){return y.A.ut(E.w.jc,{group_id:t,status:e})}}class B{constructor(t=0,e=[],i=[],s=[],r=null,n=null,o={enabled:!1},l={enabled:!1,refresh_rate_limit:void 0},a={enabled:!0,capacity:C.uy,refill_rate:C.Fn,endpoint_overrides:{}},u=null){this.dl=t,this.Rl=e,this.Cl=i,this.El=s,this.yl=r,this.fl=n,this.vl=o,this.De=l,this.bl=a,this.banners=u,this.dl=t,this.Rl=e,this.Cl=i,this.El=s,this.yl=r,this.fl=n,this.vl=o,this.De=l,this.bl=a,this.banners=u}bt(){return{s:"5.9.1",l:this.dl,e:this.Rl,a:this.Cl,p:this.El,m:this.yl,v:this.fl,c:this.vl,f:this.De,grl:this.bl,b:this.banners}}static Rn(t){let e=t.l;return"5.9.1"!==t.s&&(e=0),new B(e,t.e,t.a,t.p,t.m,t.v,t.c,t.f,t.grl,t.b)}}class D{constructor(t){this.C=t,this.C=t,this.sl=new r.A,this.rl=new r.A,this.ul=new r.A,this.al=new r.A,this.hl=null,this.ol=null}cl(){if(null==this.ol){let t=this.C.ft(s.d.gt.ml);this.ol=null!=t?B.Rn(t):new B}return this.ol}Et(){return this.cl().dl}gl(t){var e,i;if(null!=t&&null!=t.config){let r=t.config;if(r.time>this.cl().dl){let t=t=>null==t?this.cl().bl:t,n=new B(r.time,r.events_blacklist,r.attributes_blacklist,r.purchases_blacklist,r.messaging_session_timeout,r.vapid_public_key,r.content_cards,r.feature_flags,t(r.global_request_rate_limit),r.banners),o=!1;null!=n.fl&&this.In()!==n.fl&&(o=!0);let l=!1;null!=n.vl.enabled&&this.yi()!==n.vl.enabled&&(l=!0);let a=!1;null!=n.De.enabled&&this.ke()!==n.De.enabled&&(a=!0);let u=!1;null!=(null==(e=n.banners)?void 0:e.enabled)&&this.zt()!==(null==(i=n.banners)?void 0:i.enabled)&&(u=!0),this.ol=n,this.C.Bt(s.d.gt.ml,n.bt()),o&&this.sl.X(),l&&this.rl.X(),a&&this.ul.X(),u&&this.al.X()}}}Vn(t){let e=this.sl.Dt(t);return this.hl&&this.sl.removeSubscription(this.hl),this.hl=e,e}gi(t){return this.rl.Dt(t)}Ke(t){return this.ul.Dt(t)}A(t){return this.al.Dt(t)}je(t){return -1!==this.cl().Rl.indexOf(t)}hu(t){return -1!==this.cl().Cl.indexOf(t)}Dr(t){return -1!==this.cl().El.indexOf(t)}wl(){return this.cl().yl}In(){return this.cl().fl}yi(){return this.cl().vl.enabled||!1}Ll(){let t=this.cl().bl;return!(!t||null==t.enabled)&&t.enabled}Zu(){if(!this.Ll())return -1;let t=this.cl().bl;return null==t.capacity||t.capacity<10?-1:t.capacity}tl(){if(!this.Ll())return -1;let t=this.cl().bl;return null==t.refill_rate||t.refill_rate<=0?-1:t.refill_rate}Bl(t){let e=this.cl().bl.endpoint_overrides;return null==e?null:e[t]}el(t){let e=this.Bl(t);return null==e||isNaN(e.capacity)||e.capacity<=0?-1:e.capacity}il(t){let e=this.Bl(t);return null==e||isNaN(e.refill_rate)||e.refill_rate<=0?-1:e.refill_rate}ke(){return this.cl().De.enabled&&null==this.Oe()?(y.A.ut(E.w.qu,{e:"Missing feature flag refresh_rate_limit."}),!1):this.cl().De.enabled||!1}Oe(){return this.cl().De.refresh_rate_limit}zt(){var t;return(null==(t=this.cl().banners)?void 0:t.enabled)||null}ne(){var t;return(null==(t=this.cl().banners)?void 0:t.max_placements)||0}}class x{constructor(t,e,i,s){this.C=t,this.Cs=e,this.B=i,this.Sl=s,this.C=t,this.Cs=e,this.B=i,this.jl=1e3,(null==s||isNaN(s))&&(s=1800),s<this.jl/1e3&&(o.A.info("Specified session timeout of "+s+"s is too small, using the minimum session timeout of "+this.jl/1e3+"s instead."),s=this.jl/1e3),this.Sl=s}xl(t,e){return new v.A(this.Cs.getUserId(),E.w.Dl,t,e.eu,{d:(0,A.UK)(t-e.Gl)})}St(){let t=this.C.tu(s.d.iu.Nl);return null==t?null:t.eu}zl(){let t=new Date().valueOf(),e=this.B.wl();if(null==e)return!1;let i=this.C.ft(s.d.gt.Hl),r=null==i||t-i>1e3*e;return r&&this.C.Bt(s.d.gt.Hl,t),r}Wl(t,e){return null==e||null==e.kl||!(t-e.Gl<this.jl)&&e.kl<t}Qo(){let t=new Date().valueOf(),e=t+1e3*this.Sl,i=this.C.tu(s.d.iu.Nl);
1if(this.Wl(t,i)){let r="Generating session start event with time "+t;if(null!=i){let t=i.ql;t-i.Gl<this.jl&&(t=i.Gl+this.jl),this.C.Al(this.xl(t,i)),r+=" (old session ended "+t+")"}r+=". Will expire "+e.valueOf(),o.A.info(r);let n=new d.A(g.A.ce(),e);return this.C.Al(new v.A(this.Cs.getUserId(),E.w.Fl,t,n.eu)),this.C.uu(s.d.iu.Nl,n),null==this.C.ft(s.d.gt.Hl)&&this.C.Bt(s.d.gt.Hl,t),n.eu}if(null!=i)return i.ql=t,i.kl=e,this.C.uu(s.d.iu.Nl,i),i.eu}Il(){let t=this.C.tu(s.d.iu.Nl);null!=t&&(this.C.Jl(s.d.iu.Nl),this.C.Al(this.xl(new Date().valueOf(),t)))}}let P={Ya:function(t,e=!1){let i,r=!1;try{if(localStorage&&localStorage.getItem)try{localStorage.setItem(s.d.gt.ac,"true"),localStorage.getItem(s.d.gt.ac)&&(localStorage.removeItem(s.d.gt.ac),r=!0)}catch(t){if(!(t instanceof Error&&("QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&localStorage.length>0))throw t;r=!0}}catch(t){o.A.info("Local Storage not supported!")}let n=P.cc(),l=new s.A.lc(t,n&&!e,r);return i=r?new s.A.gc(t):new s.A.uc,new s.A(l,i)},cc:function(){return navigator.cookieEnabled||"cookie"in document&&(document.cookie.length>0||(document.cookie="test").indexOf.call(document.cookie,"test")>-1)}};var $=i(71355),R=i(45999),L=i(62152),U=i(75632);class F{constructor(t,e){this.B=t,this.C=e,this.B=t,this.C=e}getUserId(){let t=this.C.tu(s.d.iu.su);if(null==t)return null;let e=t.eu,i=(0,R.N)(e);if(i>U.A.ur){for(;i>U.A.ur;)e=e.slice(0,e.length-1),i=(0,R.N)(e);t.eu=e,this.C.uu(s.d.iu.su,t)}return e}ou(t){let e=null==this.getUserId();this.C.uu(s.d.iu.su,new d.A(t)),e&&this.C.ru(t)}setCustomUserAttribute(t,e){if(this.B.hu(t))return o.A.info('Custom Attribute "'+t+'" is blocklisted, ignoring.'),!1;let i={};return i[t]=e,this.nu(U.A.lu,i,!0)}nu(t,e,i=!1,s=!1){let r=this.C.mu(this.getUserId(),t,e),n="",l=t,a=e;return i&&(n=" custom","object"==typeof e&&(l=Object.keys(e)[0],"object"==typeof(a=e[l])&&(a=JSON.stringify(a,null,2)))),!s&&r&&o.A.info(`Logged${n} attribute ${l} with value ${a}`),r}An(t,e,i,r,l){this.nu("push_token",t,!1,!0),this.nu("custom_push_public_key",i,!1,!0),this.nu("custom_push_user_auth",r,!1,!0),this.nu("custom_push_vapid_public_key",l,!1,!0);let a=n.A.Ls.Fs,u=new n.A(a,o.A),h=new L.A(t,e,i,r,l);this.C.Bt(s.d.gt.zn,h.bt()),u.setItem(a.Ms.cu,a.be,!0)}xn(t){if(this.nu("push_token",null,!1,!0),this.nu("custom_push_public_key",null,!1,!0),this.nu("custom_push_user_auth",null,!1,!0),this.nu("custom_push_vapid_public_key",null,!1,!0),t){let t=n.A.Ls.Fs,e=new n.A(t,o.A);this.C.Bt(s.d.gt.zn,!1),e.setItem(t.Ms.cu,t.be,!1)}}}let M={$a:function(){return window.location.href}},z={Yo:"allowCrawlerActivity",Zo:"baseUrl",Wh:"noCookies",Vh:"devicePropertyAllowlist",Da:"disablePushTokenMaintenance",$h:"enableLogging",Yh:"enableSdkAuthentication",Ca:"manageServiceWorkerExternally",Xh:"minimumIntervalBetweenTriggerActionsInSeconds",Zh:"sessionTimeoutInSeconds",Qh:"appVersion",Ea:"appVersionNumber",_a:"serviceWorkerLocation",Ba:"safariWebsitePushId",Zn:"localization",er:"contentSecurityNonce",re:"allowUserSuppliedJavascript",Go:"inAppMessageZIndex",Ko:"openInAppMessagesInNewTab",en:"openNewsFeedCardsInNewTab",mh:"requireExplicitInAppMessageDismissal",Ia:"doNotLoadFontAwesome",Na:"deviceId",Aa:"serviceWorkerScope",Oa:"sdkFlavor",tn:"openCardsInNewTab"},j={Yo:"allowCrawlerActivity",Zo:"baseUrl",Wh:"noCookies",Vh:"devicePropertyAllowlist",Da:"disablePushTokenMaintenance",$h:"enableLogging",Yh:"enableSdkAuthentication",Ca:"manageServiceWorkerExternally",Xh:"minimumIntervalBetweenTriggerActionsInSeconds",Zh:"sessionTimeoutInSeconds",Qh:"appVersion",Ea:"appVersionNumber",_a:"serviceWorkerLocation",Ba:"safariWebsitePushId",Zn:"localization",er:"contentSecurityNonce",re:"allowUserSuppliedJavascript",Go:"inAppMessageZIndex",Ko:"openInAppMessagesInNewTab",tn:"openCardsInNewTab",en:"openNewsFeedCardsInNewTab",mh:"requireExplicitInAppMessageDismissal",Ia:"doNotLoadFontAwesome",Na:"deviceId",Aa:"serviceWorkerScope",Oa:"sdkFlavor"};class q{constructor(){this.an="",this.Ta="",this.Ra=void 0,this.Pa=null,this.hn=null,this.S=null,this.Fi=null,this.B=null,this.T=null,this.C=null,this.Cs=null,this.La="",this.isInitialized=!1,this.Ua=!1,this.Wa=new r.A,this.Va=new r.A,this.options={},this.Fa=[],this.Ka=[],this.Mi=[],this.Ta="5.9.1"}Ga(t){this.Wa.Dt(t)}Nh(t){this.Va.Dt(t)}initialize(t,e){if(this.nn())return o.A.info("Braze has already been initialized with an API key."),!0;this.options=e||{};let n=this.ee(j.$h),a=function(t){null==t&&(t="");let e=t.split("?").slice(1).join("?"),i={};if(null!=e){let t=e.split("&");for(let e=0;e<t.length;e++){let s=t[e].split("=");""!==s[0]&&(i[s[0]]=s[1])}}return i}(M.$a());if(a&&"true"===a.brazeLogging&&(n=!0),o.A.init(n),o.A.info(`Initialization Options: ${JSON.stringify(this.options,null,2)}`),null==t||""===t||"string"!=typeof t)return o.A.error("Braze requires a valid API key to be initialized."),!1;this.an=t;let h=this.ee(j.Zo);if(null==h||""===h||"string"!=typeof h)return o.A.error("Braze requires a valid baseUrl to be initialized."),!1;!1===/^https?:/.test(h)&&(h=`https://${h}`);let g=h;if((h=document.createElement("a")).href=g,"/"===h.pathname&&(h=`${h}api/v3`),this.La=h.toString(),u.A.Ja&&!this.ee(j.Yo))return o.A.info("Ignoring activity from crawler bot "+navigator.userAgent),this.Ua=!0,!1;let p=this.ee(j.Wh)||!1;if(this.C=P.Ya(t,p),p&&this.C.Ha(t),new s.A.se(null,!0).gr(s.d.me))return o.A.info("Ignoring all activity due to previous opt out"),this.Ua=!0,!1;for(let t of(0,f.HP)(this.options))-1===(0,f.zu)(z).indexOf(t)&&o.A.warn(`Ignoring unknown initialization option '${t}'.`);if(null!=this.ee(j.Oa)){let t=this.ee(j.Oa);-1!==["mparticle","wordpress","tealium"].indexOf(t)?this.Ra=t:o.A.error("Invalid sdk flavor passed: "+t)}let b=this.ee(z.Vh);if(null!=b)if((0,f.cy)(b)){let t=[];for(let e=0;e<b.length;e++)(0,f.BY)(c,b[e],"devicePropertyAllowlist contained an invali
1d value.","DeviceProperties")&&t.push(b[e]);b=t}else o.A.error("devicePropertyAllowlist must be an array. Defaulting to all properties."),b=null;let v=this.ee(j.Na);if(v){let t=new d.A(v);this.C.uu(s.d.iu.Na,t)}this.hn=new m(this.C,b),this.B=new D(this.C),this.Cs=new F(this.B,this.C),this.T=new x(this.C,this.Cs,this.B,this.ee(j.Zh));let A=new r.A;return this.Pa=new l(this.C,this.ee(j.Yh),A),this.F(A),this.S=new _(this.hn,this.C,this.Pa,this.Cs,this.T,this.B,this.an,this.La,this.Ta,this.Ra||"",this.ee(j.Qh),this.ee(j.Ea)),this.Fi=new k(this.an,this.La,this.T,this.hn,this.Cs,this.B,this.C,t=>{if(this.nn())for(let e of this.ar())e.U(t)},this.Pa,this.S),this.Fi.initialize(),p||this.C.Xa(),o.A.info(`Initialized for the Braze backend at "${this.ee(j.Zo)}" with API key "${this.an}".`),$.B.p(),this.B.Ke(()=>{var t;this.isInitialized&&(null==(t=this.B)?void 0:t.ke())&&i.e(9506).then(i.bind(i,49506)).then(t=>{this.isInitialized&&(0,t.default)()})}),this.Fi.on(()=>{var t;this.isInitialized&&(null==(t=this.B)?void 0:t.ke())&&i.e(9506).then(i.bind(i,49506)).then(t=>{this.isInitialized&&(0,t.default)(void 0,void 0,!0)})}),this.Wa.X(this.options),this.isInitialized=!0,window.dispatchEvent(new CustomEvent("braze.initialized")),!0}destroy(t){if(o.A.destroy(),this.nn()){for(let t of(this.Va.X(),this.Va.removeAllSubscriptions(),this.Fa))t.destroy();for(let t of(this.Fa=[],this.Ka))t.clearData(!1);this.S&&this.S.fo(),this.Ka=[],this.removeAllSubscriptions(),this.Mi=[],null!=this.Fi&&this.Fi.destroy(),this.Fi=null,this.Pa=null,this.hn=null,this.S=null,this.B=null,this.T=null,this.Cs=null,this.options={},this.Ra=void 0,this.isInitialized=!1,this.Ua=!1,t&&(this.C=null)}}rr(){return!this.Za()&&(!!this.nn()||(console.warn(C.xE),!1))}Ma(){return this.an}Sr(){return this.Pa}Z(){return this.La}ue(){return this.hn}g(){return this.S}ee(t){return this.options[t]}ar(){return this.Ka}rn(){return this.Fi}v(){return this.B}P(){return this.T}j(){return this.C}mr(){if(this.Cs&&this.Fi)return new U.A(this.Cs,this.Fi)}ir(){return this.Cs}tr(){return!0===this.ee(j.re)}h(t){let e=!1;for(let i of this.Fa)i===t&&(e=!0);e||this.Fa.push(t)}_(t){let e=!1;for(let i of this.Ka)i.constructor===t.constructor&&(e=!0);t instanceof a.A&&!e&&this.Ka.push(t)}F(t){t instanceof r.A&&this.Mi.push(t)}removeAllSubscriptions(){if(this.rr())for(let t of this.Mi)t.removeAllSubscriptions()}removeSubscription(t){if(this.rr())for(let e of this.Mi)e.removeSubscription(t)}fe(t){this.Ua=t}nn(){return this.isInitialized}Za(){return this.Ua}fi(){return this.Ta}}let V=new q},79472:(t,e,i)=>{i.d(e,{A:()=>s});let s={Du:"invalid_api_key",Tu:"blacklisted",ku:"no_device_identifier",Au:"invalid_json_response",bu:"empty_response",__:"sdk_auth_error"}},80336:(t,e,i)=>{i.d(e,{A:()=>r});let s={mn:()=>"serviceWorker"in navigator&&"undefined"!=typeof ServiceWorkerRegistration&&"showNotification"in ServiceWorkerRegistration.prototype&&"PushManager"in window,vn:()=>"safari"in window&&"pushNotification"in window.safari&&"function"==typeof window.safari.pushNotification.permission&&"function"==typeof window.safari.pushNotification.requestPermission,isPushSupported:()=>s.mn()||s.vn(),isPushBlocked:()=>{let t=s.isPushSupported()&&"Notification"in window&&null!=window.Notification&&null!=window.Notification.permission&&"denied"===window.Notification.permission,e=s.isPushSupported()&&(!("Notification"in window)||null==window.Notification);return t||e},isPushPermissionGranted:()=>s.isPushSupported()&&"Notification"in window&&null!=window.Notification&&null!=window.Notification.permission&&"granted"===window.Notification.permission,Tr:()=>!s.isPushBlocked()&&s.isPushSupported()&&!s.isPushPermissionGranted()},r=s},83736:(t,e,i)=>{i.d(e,{u:()=>s});let s=t=>t instanceof Error?t.message:String(t)},88166:(t,e,i)=>{i.d(e,{A:()=>r});let s={init:function(t){void 0===t&&void 0!==s.zg||(s.zg=!!t),s.l||(s.l=!0)},destroy:function(){s.l=!1,s.zg=void 0,s.vd=void 0},setLogger:function(t){"function"==typeof t?(s.init(),s.vd=t):s.info("Ignoring setLogger call since logger is not a function")},toggleLogging:function(){s.init(),s.zg?(console.log("Disabling Braze logging"),s.zg=!1):(console.log("Enabled Braze logging"),s.zg=!0)},info:function(t){if(s.zg){let e="Braze: "+t;null!=s.vd?s.vd(e):console.log(e)}},warn:function(t){if(s.zg){let e="Braze SDK Warning: "+t+" (v5.9.1)";null!=s.vd?s.vd(e):console.warn(e)}},error:function(t){if(s.zg){let e="Braze SDK Error: "+t+" (v5.9.1)";null!=s.vd?s.vd(e):console.error(e)}}},r=s},95718:(t,e,i)=>{i.d(e,{A:()=>s});class s{constructor(t,e){this.database=t,this.vd=e,this.parent="undefined"==typeof window?self:window,this.database=t,this.vd=e}Dd(){if("indexedDB"in this.parent)return this.parent.indexedDB}isSupported(){var t;try{if(null==this.Dd())return!1;{let e=null==(t=this.Dd())?void 0:t.open("Braze IndexedDB Support Test");
1if(e&&(e.onupgradeneeded=()=>e.result.close(),e.onsuccess=()=>e.result.close()),"undefined"!=typeof window){let t=window,e=t.chrome||t.browser||t.pd;if(e&&e.runtime&&e.runtime.id)return this.vd.info("Not using IndexedDB for storage because we are running inside an extension"),!1}return!0}}catch(t){return this.vd.info("Not using IndexedDB for storage due to following error: "+t),!1}}Bd(t,e){var i;let s=null==(i=this.Dd())?void 0:i.open(this.database.Sd,this.database.VERSION);if(null==s)return"function"==typeof e&&e(),!1;let r=this;return s.onupgradeneeded=t=>{var e;r.vd.info("Upgrading indexedDB "+r.database.Sd+" to v"+r.database.VERSION+"...");let i=null==(e=t.target)?void 0:e.result;for(let t in r.database.Ms)r.database.Ms.hasOwnProperty(t)&&!i.objectStoreNames.contains(r.database.Ms[t])&&i.createObjectStore(r.database.Ms[t])},s.onsuccess=i=>{var s;let n=null==(s=i.target)?void 0:s.result;n.onversionchange=()=>{n.close(),"function"==typeof e&&e(),r.vd.error("Needed to close the database unexpectedly because of an upgrade in another tab")},t(n)},s.onerror=t=>{var i;return r.vd.info("Could not open indexedDB "+r.database.Sd+" v"+r.database.VERSION+": "+(null==(i=t.target)?void 0:i.errorCode)),"function"==typeof e&&e(),!0},!0}setItem(t,e,i,s,r){if(!this.isSupported())return"function"==typeof r&&r(),!1;let n=this;return this.Bd(o=>{if(!o.objectStoreNames.contains(t))return n.vd.error("Could not store object "+e+" in "+t+" on indexedDB "+n.database.Sd+" - "+t+" is not a valid objectStore"),"function"==typeof r&&r(),void o.close();let l=o.transaction([t],"readwrite");l.oncomplete=()=>o.close();let a=l.objectStore(t).put(i,e);a.onerror=()=>{n.vd.error("Could not store object "+e+" in "+t+" on indexedDB "+n.database.Sd),"function"==typeof r&&r()},a.onsuccess=()=>{"function"==typeof s&&s()}},r)}getItem(t,e,i){if(!this.isSupported())return!1;let s=this;return this.Bd(r=>{if(!r.objectStoreNames.contains(t))return s.vd.error("Could not retrieve object "+e+" in "+t+" on indexedDB "+s.database.Sd+" - "+t+" is not a valid objectStore"),void r.close();let n=r.transaction([t],"readonly");n.oncomplete=()=>r.close();let o=n.objectStore(t).get(e);o.onerror=()=>{s.vd.error("Could not retrieve object "+e+" in "+t+" on indexedDB "+s.database.Sd)},o.onsuccess=t=>{var e;let s=null==(e=t.target)?void 0:e.result;null!=s&&i(s)}})}cr(t,e,i){if(!this.isSupported())return"function"==typeof i&&i(),!1;let s=this;return this.Bd(r=>{if(!r.objectStoreNames.contains(t))return s.vd.error("Could not retrieve last record from "+t+" on indexedDB "+s.database.Sd+" - "+t+" is not a valid objectStore"),"function"==typeof i&&i(),void r.close();let n=r.transaction([t],"readonly");n.oncomplete=()=>r.close();let o=n.objectStore(t).openCursor(null,"prev");o.onerror=()=>{s.vd.error("Could not open cursor for "+t+" on indexedDB "+s.database.Sd),"function"==typeof i&&i()},o.onsuccess=t=>{var s;let r=null==(s=t.target)?void 0:s.result;null!=r&&null!=r.value&&null!=r.key?e(r.key,r.value):"function"==typeof i&&i()}},i)}ge(t,e){if(!this.isSupported())return!1;let i=this;return this.Bd(s=>{if(!s.objectStoreNames.contains(t))return i.vd.error("Could not delete record "+e+" from "+t+" on indexedDB "+i.database.Sd+" - "+t+" is not a valid objectStore"),void s.close();let r=s.transaction([t],"readwrite");r.oncomplete=()=>s.close(),r.objectStore(t).delete(e).onerror=()=>{i.vd.error("Could not delete record "+e+" from "+t+" on indexedDB "+i.database.Sd)}})}Ns(t,e){if(!this.isSupported())return!1;let i=this;return this.Bd(s=>{if(!s.objectStoreNames.contains(t))return i.vd.error("Could not retrieve objects from "+t+" on indexedDB "+i.database.Sd+" - "+t+" is not a valid objectStore"),void s.close();let r=s.transaction([t],"readwrite");r.oncomplete=()=>s.close();let n=r.objectStore(t),o=n.openCursor(),l=[];o.onerror=()=>{l.length>0?(i.vd.info("Cursor closed midway through for "+t+" on indexedDB "+i.database.Sd),e(l)):i.vd.error("Could not open cursor for "+t+" on indexedDB "+i.database.Sd)},o.onsuccess=t=>{var i;let s=null==(i=t.target)?void 0:i.result;null!=s?(null!=s.value&&null!=s.key&&(n.delete(s.key).onsuccess=()=>{l.push(s.value)}),"function"==typeof s.continue&&s.continue()):l.length>0&&e(l)}})}clearData(){if(!this.isSupported())return!1;let t=[];for(let e in this.database.Ms)this.database.Ms.hasOwnProperty(e)&&this.database.Ms[e]!==this.database.Ms.pe&&t.push(this.database.Ms[e]);let e=this;return this.Bd(function(i){let s=i.transaction(t,"readwrite");s.oncomplete=()=>i.close();for(let i=0;i<t.length;i++){let r=t[i];s.objectStore(r).clear().onerror=function(){e.vd.error("Could not clear "+this.source.name+" on indexedDB "+e.database.Sd)}}s.onerror=function(){e.vd.error("Could not clear object stores on indexedDB "+e.database.Sd)}})}}s.Ls={Fs:{Sd:"AppboyServiceWorkerAsyncStorage",VERSION:6,Ms:{Nu:"data",jr:"pushClicks",cu:"pushSubscribed",Cd:"fallbackDevice",Js:"cardUpdates",pe:"optOut",kr:"pendingData",yh:"sdkAuthenticationSignature"},be:1}}},95883:(t,e,i)=>{i.d(e,{A:()=>l});var s=i(76892),r=i(53007),n=i(44259),o=i(59606);class l{constructor(t,e,i,s,r){this.userId=t,this.type=e,this.time=i,this.sessionId=s,this.data=r,this.userId=t,this.type=e,this.time=(0,o.S3)(i),this.sessionId=s,this.data=r}Nr(){var t;let e={name:this.type,time:(0,o.UK)(this.time),data:this.data||{},session_id:this.sessionId};null!=this.userId&&(e.user_id=this.userId);let i=(null==(t=s.Ay.Sr())?void 0:t.jh())||!1;if(!e.user_id&&!i){let t=(0,r.b)(s.Ay.j());t&&(e.alias=t)}return e}
1bt(){return{u:this.userId,t:this.type,ts:this.time,s:this.sessionId,d:this.data}}static fromJson(t){return new l(t.user_id,t.name,t.time,t.session_id,t.data)}static RE(t){return null!=t&&(0,n.Gv)(t)&&null!=t.t&&""!==t.t}static Rn(t){return new l(t.u,t.t,t.ts,t.s,t.d)}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.