PageSourceSearch

https://boilerroom.tv/_next/static/chunks/056zjpfk_im8s.js?dpl=e931b034b0bd6323e6f965d05fd8504727c01c39

js boilerroom.tv collected 2026-10-02 02:23:26 UTC 94,266 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="48ea6981-f105-2d4f-0884-22a246e2601e")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,340941,607021,813971,434657,598626,204530,355705,249776,877064,313526,310911,653814,575236,894984,500469,344183,800414,767762,t=>{"use strict";function e(t){let e,i=null==t?void 0:t.lt(X.ct.uE);return i&&(e={label:i.l,name:i.a}),e}t.s(["OPTIONS",()=>tY,"default",()=>t0],340941),t.s(["STORAGE_KEYS",()=>X,"default",()=>Z],249776),t.s(["BRAZE_ACTION_URI_REGEX",()=>B,"isValidBrazeActionJson",()=>F,"isValidBrazeActionType",()=>z,"isValidEmail",()=>q,"validateCustomAttributeArrayType",()=>P,"validateCustomAttributeKey",()=>R,"validateCustomProperties",()=>$,"validateCustomString",()=>L,"validatePropertyType",()=>D,"validateStandardString",()=>U],204530),t.s(["default",()=>tc],653814),t.s(["TriggersProviderFactory",()=>tH],800414);let i={init:function(t){void 0===t&&void 0!==i.zg||(i.zg=!!t),i.i||(i.i=!0)},destroy:function(){i.i=!1,i.zg=void 0,i.vd=void 0},setLogger:function(t){"function"==typeof t?(i.init(),i.vd=t):i.info("Ignoring setLogger call since logger is not a function")},toggleLogging:function(){i.init(),i.zg?(console.log("Disabling Braze logging"),i.zg=!1):(console.log("Enabled Braze logging"),i.zg=!0)},info:function(t){if(i.zg){let e="Braze: "+t;null!=i.vd?i.vd(e):console.log(e)}},warn:function(t){if(i.zg){let e="Braze SDK Warning: "+t+" (v6.3.0)";null!=i.vd?i.vd(e):console.warn(e)}},error:function(t){if(i.zg){let e="Braze SDK Error: "+t+" (v6.3.0)";null!=i.vd?i.vd(e):console.error(e)}}};function s(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 r(t,e,r,n){let o=s(t);return -1!==o.indexOf(e)||(i.error(`${r} Valid values from ${n} are "${o.join('"/"')}".`),!1)}function n(t){return Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)}function o(t){return"[object Date]"===Object.prototype.toString.call(t)}function l(t){return"[object Object]"===Object.prototype.toString.call(t)}function a(t){let e=[];for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.push(i);return e}function u(t,e){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return t===e;let i=t.toString();if(i!==e.toString())return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e}let s="[object Array]"===i;if(!s){if("object"!=typeof t||"object"!=typeof e)return!1;let i=t.constructor,s=e.constructor;if(i!==s&&!("function"==typeof i&&i instanceof i&&"function"==typeof s&&s instanceof s)&&"constructor"in t&&"constructor"in e)return!1}let r=[],n=[],o=r.length;for(;o--;)if(r[o]===t)return n[o]===e;if(r.push(t),n.push(e),s){if((o=t.length)!==e.length)return!1;for(;o--;)if(!u(t[o],e[o]))return!1}else{let i,s=a(t);if(o=s.length,a(e).length!==o)return!1;for(;o--;)if(i=s[o],!Object.prototype.hasOwnProperty.call(e,i)||!u(t[i],e[i]))return!1}return r.pop(),n.pop(),!0}function h(t,e=!1){let i=t/1e3;return e&&(i=Math.floor(i)),i}function c(t){if(null==t)return null;let e=parseInt(t.toString());return isNaN(e)?null:new Date(1e3*e)}function d(t){return null!=t&&o(t)?t.toISOString().replace(/\.[0-9]{3}Z$/,""):t}function f(t){return null==t||""===t?null:new Date(t)}function g(t){return(new Date().valueOf()-t.valueOf())/1e3}function p(t){return(t.valueOf()-new Date().valueOf())/1e3}t.s(["logger",0,i],607021),t.s(["isArray",0,n,"isDate",0,o,"isEqual",0,u,"isObject",0,l,"keys",0,a,"validateValueIsFromEnum",0,r,"values",0,s],813971);class m{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=function(t){return null==t||""===t?new Date().valueOf():t}(i),this.sessionId=s,this.data=r}Ar(){var t;
2let i={name:this.type,time:h(this.time),data:this.data||{},session_id:this.sessionId};null!=this.userId&&(i.user_id=this.userId);let s=(null==(t=t0.Sr())?void 0:t.fh())||!1;if(!i.user_id&&!s){let t=e(t0.p());t&&(i.alias=t)}return i}dt(){return{u:this.userId,t:this.type,ts:this.time,s:this.sessionId,d:this.data}}static fromJson(t){return new m(t.user_id,t.name,t.time,t.session_id,t.data)}static gE(t){return null!=t&&l(t)&&null!=t.t&&""!==t.t}static qn(t){return new m(t.u,t.t,t.ts,t.s,t.d)}}let b=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()},v=t=>t instanceof Error?t.message:String(t);t.s(["getErrorMessage",0,v],434657);class y{constructor(t,e,i){this.eu=t,null==t&&(t=b()),!i||isNaN(i)?this.Gl=new Date().valueOf():this.Gl=i,this.eu=t,this.ql=new Date().valueOf(),this.kl=e}dt(){return`g:${encodeURIComponent(this.eu)}|e:${this.kl}|c:${this.Gl}|l:${this.ql}`}static AE(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 qn(t){let e;if("string"==typeof t)try{let i=t.split("|");if(!n(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 y(decodeURIComponent(s(i[0])),r(i[1]),r(i[2]))).ql=r(i[3])}catch(e){i.info(`Unable to parse cookie string ${t}, failed with error: ${v(e)}`)}else{if(null==t||null==t.g)return null;(e=new y(t.g,t.e,t.c)).ql=t.l}return e}}function E(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 w(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 i.error("Unable to decode Base64: "+t),null}}t.s(["decodeBrazeActions",0,w,"getByteLength",0,E],598626);let S={io:"container",logCustomEvent:"logCustomEvent",setEmailNotificationSubscriptionType:"setEmailNotificationSubscriptionType",setPushNotificationSubscriptionType:"setPushNotificationSubscriptionType",setCustomUserAttribute:"setCustomUserAttribute",requestPushPermission:"requestPushPermission",addToSubscriptionGroup:"addToSubscriptionGroup",removeFromSubscriptionGroup:"removeFromSubscriptionGroup",addToCustomAttributeArray:"addToCustomAttributeArray",removeFromCustomAttributeArray:"removeFromCustomAttributeArray",mo:"openLink",uo:"openLinkInWebView"},C="type",_="steps",T="args",I="unknownBrazeAction";function N(t,e){let i=!1;if(e){for(let s of e)if(i=i||t(s))return!0}return!1}let A="setCustomUserAttribute",k=/^[^\x00-\x1F\x22]+$/,O=/[$.]/,j=["$add","$update","$remove","$identifier_key","$identifier_value","$new_object","$time","$google_ad_personalization","$google_ad_user_data"],x=new RegExp(/^.+@.+\..+$/),B=/^brazeActions:\/\/v\d+\//;function L(t,e,s){let r=null!=t&&"string"==typeof t&&(""===t||null!=t.match(k));return r||i.error(`Cannot ${e} because ${s} "${t}" is invalid.`),r}function R(t){return null!=t&&t.match(O)&&-1===j.indexOf(t)&&i.warn("Custom attribute keys cannot contain '$' or '.'"),L(t,"set custom user attribute","the given key")}function D(t){let e=typeof t;return null==t||"number"===e||"boolean"===e||o(t)||"string"===e}function U(t,e,s,r=!1){let n="string"==typeof t||null===t&&r;return n||i.error(`Cannot ${e} because ${s} "${t}" is invalid.`),n}function $(t,e,s,r,u){let h,c,f;if(null==t&&(t={}),"object"!=typeof t||n(t))return i.error(`${e} requires that ${s} be an object. Ignoring ${u}.`),[!1,null];e===A?(h=76800,c="75KB"):(h=51200,c="50KB");let g=JSON.stringify(t);if(E(g)>h)return i.error(`Could not ${r} because ${s} was greater than the max size of ${c}.`),[!1,null];try{f=JSON.parse(g)}catch(t){return i.error(`Could not ${r} because ${s} did not contain valid JSON.`),[!1,null]}for(let s in t){if(e===A&&!R(s)||!L(s,r,`the ${u} property name`))return[!1,null];let h=t[s];if(e!==A&&null==h){delete t[s],delete f[s];continue}
2if(o(h)&&(f[s]=d(h)),!function(t,e,s,r,u){let h;return(h=l(t)||n(t)?function t(e,s,r){let u=-1!==r;if(u&&r>50)return i.error("Nested attributes cannot be more than 50 levels deep."),!1;let h=u?r+1:-1;if(n(e)&&n(s)){for(let i=0;i<e.length&&i<s.length;i++)if(o(e[i])&&(s[i]=d(e[i])),!t(e[i],s[i],h))return!1}else{if(!l(e))return D(e);for(let i of a(e)){let r=e[i];if(u&&!R(i)||(o(r)&&(s[i]=d(r)),!t(r,s[i],h)))return!1}}return!0}(t,e,u?1:-1):D(t))||i.error(`Cannot ${s} because ${r} "${t}" is invalid.`),h}(h,f[s],r,`the ${u} property "${s}"`,e===A))return[!1,null]}return[!0,f]}function P(t,e){let s=!1,r=!1,n=()=>{i.error("Custom attribute arrays must be either string arrays or object arrays.")};for(let i of e)if("string"==typeof i){if(r)return n(),[!1,!1];if(!L(i,`set custom user attribute "${t}"`,"the element in the given array"))return[!1,!1];s=!0}else{if(!l(i)||s)return n(),[!1,!1];if(!$(i,A,"attribute value",`set custom user attribute "${t}"`,"custom user attribute"))return[!1,!1];r=!0}return[s,r]}function q(t){return"string"==typeof t&&null!=t.toLowerCase().match(x)}function F(t){if(!(C in t))return!1;switch(t[C]){case S.io:if(_ in t)return!0;break;case S.logCustomEvent:case S.setEmailNotificationSubscriptionType:case S.setPushNotificationSubscriptionType:case S.setCustomUserAttribute:case S.addToSubscriptionGroup:case S.removeFromSubscriptionGroup:case S.addToCustomAttributeArray:case S.removeFromCustomAttributeArray:case S.mo:case S.uo:if(T in t)return!0;break;case S.requestPushPermission:return!0}return!1}function z(t){let e=!1;return Object.keys(S).forEach(i=>{S[i]!==t.toString()||(e=!0)}),e}class M{constructor(t,e){this.Cs=t,this.Cn=e,this.Cs=t,this.Cn=e}getUserId(t){let e=this.Cs.getUserId();if("function"!=typeof t)return e;i.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!U(t,"add alias","the alias",!1)||t.length<=0?(i.error("addAlias requires a non-empty alias"),!1):!U(e,"add alias","the label",!1)||e.length<=0?(i.error("addAlias requires a non-empty label"),!1):this.Cn.En(t,e).W}setFirstName(t){return!!U(t,"set first name","the firstName",!0)&&this.Cs.nu("first_name",t)}setLastName(t){return!!U(t,"set last name","the lastName",!0)&&this.Cs.nu("last_name",t)}setEmail(t){return null===t||q(t)?this.Cs.nu("email",t):(i.error(`Cannot set email address - "${t}" did not pass RFC-5322 validation.`),!1)}setGender(t){return"string"==typeof t&&(t=t.toLowerCase()),!(null!==t&&!r(M.Genders,t,`Gender "${t}" is not a valid gender.`,"User.Genders"))&&this.Cs.nu("gender",t)}setDateOfBirth(t,e,s){return null===t&&null===e&&null===s?this.Cs.nu("dob",null):(t=null!=t?parseInt(t.toString()):null,e=null!=e?parseInt(e.toString()):null,s=null!=s?parseInt(s.toString()):null,null==t||null==e||null==s||isNaN(t)||isNaN(e)||isNaN(s)||e>12||e<1||s>31||s<1?(i.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}-${s}`))}setCountry(t){return!!U(t,"set country","the country",!0)&&this.Cs.nu("country",t)}setHomeCity(t){return!!U(t,"set home city","the homeCity",!0)&&this.Cs.nu("home_city",t)}setLanguage(t){return!!U(t,"set language","the language",!0)&&this.Cs.nu("language",t)}setEmailNotificationSubscriptionType(t){return!!r(M.NotificationSubscriptionTypes,t,`Email notification setting "${t}" is not a valid subscription type.`,"User.NotificationSubscriptionTypes")&&this.Cs.nu("email_subscribe",t)}setPushNotificationSubscriptionType(t){return!!r(M.NotificationSubscriptionTypes,t,`Push notification setting "${t}" is not a valid subscription type.`,"User.NotificationSubscriptionTypes")&&this.Cs.nu("push_subscribe",t)}setPhoneNumber(t){return!!U(t,"set phone number","the phoneNumber",!0)&&(null===t||t.match(M.Fn)?this.Cs.nu("phone",t):(i.error(`Cannot set phone number - "${t}" did not pass validation.`),!1))}setLastKnownLocation(t,e,s,r,n){return null==t||null==e?(i.error("Cannot set last-known location - latitude and longitude are required."),!1):(t=parseFloat(t.toString()),e=parseFloat(e.toString()),null!=s&&(s=parseFloat(s.toString())),null!=r&&(r=parseFloat(r.toString())),null!=n&&(n=parseFloat(n.toString())),isNaN(t)||isNaN(e)||null!=s&&isNaN(s)||null!=r&&isNaN(r)||null!=n&&isNaN(n)?(i.error("Cannot set last-known location - all supplied parameters must be numeric."),!1):t>90||t<-90||e>180||e<-180?(i.error("Cannot set last-known location - latitude and longitude are bounded by ±90 and ±180 respectively."),!1):null!=s&&s<0||null!=n&&n<0?(i.error("Cannot set last-known location - accuracy and altitudeAccuracy may not be negative."),
2!1):this.Cn.setLastKnownLocation(this.Cs.getUserId(),t,e,r,s,n).W)}setCustomUserAttribute(t,e,i){if(!R(t))return!1;let s=e=>{let[i]=$(e,A,"attribute value",`set custom user attribute "${t}"`,"custom user attribute");return i};if(n(e)){let[i,r]=P(t,e);if(!i&&!r&&0!==e.length)return!1;if(i||0===e.length)return this.Cn.Ln("set",t,e).W;for(let t of e)if(!s(t))return!1}else if(l(e)){if(!s(e))return!1;if(i)return this.Cn.Ln("ncam",t,e).W}else if(!(void 0!==e&&D(e))||(o(e)&&(e=d(e)),"string"==typeof e&&!L(e,`set custom user attribute "${t}"`,"the element in the given array")))return!1;return this.Cs.setCustomUserAttribute(t,e)}addToCustomAttributeArray(t,e){return!!L(t,"add to custom user attribute array","the given key")&&!(null!=e&&!L(e,"add to custom user attribute array","the given value"))&&this.Cn.Ln("add",t,e).W}removeFromCustomAttributeArray(t,e){return!!L(t,"remove from custom user attribute array","the given key")&&!(null!=e&&!L(e,"remove from custom user attribute array","the given value"))&&this.Cn.Ln("rem",t,e).W}incrementCustomUserAttribute(t,e){if(!L(t,"increment custom user attribute","the given key"))return!1;null==e&&(e=1);let s=parseInt(e.toString());return isNaN(s)||s!==parseFloat(e.toString())?(i.error(`Cannot increment custom user attribute because the given incrementValue "${e}" is not an integer.`),!1):this.Cn.Ln("inc",t,s).W}setCustomLocationAttribute(t,e,s){return!!L(t,"set custom location attribute","the given key")&&((null!==e||null!==s)&&(e=null!=e?parseFloat(e.toString()):null,s=null!=s?parseFloat(s.toString()):null,null==e&&null!=s||null!=e&&null==s||null!=e&&(isNaN(e)||e>90||e<-90)||null!=s&&(isNaN(s)||s>180||s<-180))?(i.error("Received invalid values for latitude and/or longitude. Latitude and longitude are bounded by ±90 and ±180 respectively, or must both be null for removal."),!1):this.Cn.Hn(t,e,s).W)}addToSubscriptionGroup(t){return!U(t,"add user to subscription group","subscription group ID",!1)||t.length<=0?(i.error("addToSubscriptionGroup requires a non-empty subscription group ID"),!1):this.Cn.Kn(t,M.Mn.SUBSCRIBED).W}removeFromSubscriptionGroup(t){return!U(t,"remove user from subscription group","subscription group ID",!1)||t.length<=0?(i.error("removeFromSubscriptionGroup requires a non-empty subscription group ID"),!1):this.Cn.Kn(t,M.Mn.UNSUBSCRIBED).W}setLineId(t){return U(t,"set LINE user ID","the ID",!0)&&0!==(null==t?void 0:t.length)?t&&t.length>M.Yn?(i.error(`Rejected LINE user ID ${t} because it is longer than ${M.Yn} characters.`),!1):this.Cs.nu("native_line_id",t):(i.error("setLineId requires a non-empty ID"),!1)}Pn(t,e,i,s,r){this.Cs.Pn(t,e,i,s,r),this.Cn.zn()}Sn(t){this.Cs.Sn(t)}}M.Genders={MALE:"m",FEMALE:"f",OTHER:"o",UNKNOWN:"u",NOT_APPLICABLE:"n",PREFER_NOT_TO_SAY:"p"},M.NotificationSubscriptionTypes={OPTED_IN:"opted_in",SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed"},M.Fn=/^[0-9 .\\(\\)\\+\\-]+$/,M.Mn={SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed"},M.Jn="user_id",M.lu="custom",M.mr=997,M.Yn=33,t.s(["User",0,M],355705);class J{ef(){}ff(){}Ja(t){}static nf(t,e){if(t&&e){if(t=t.toLowerCase(),n(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 G={rO:"Chrome",eO:"Edge",oO:"Opera",Bg:"Safari",OO:"Firefox",Sg:"ChatGPTBrowser"},W="Android";class K extends J{constructor(){if(super(),this.userAgentData=navigator.userAgentData,this.browser=null,this.version=null,this.userAgentData){const t=this.gc();this.browser=t.browser||"Unknown Browser",this.version=t.version||"Unknown Version"}this.OS=null}ef(){return this.browser}ff(){return this.version}Ja(t){if(this.OS)return Promise.resolve(this.OS);let e=e=>{for(let i=0;i<t.length;i++){let s=K.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)}gc(){let t={},e=this.userAgentData.brands;if(e&&e.length)for(let i of e){let e=this.vc(G),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 V extends J{constructor(){super(),this.fd=V.gc(navigator.userAgent||"")}ef(){return this.fd[0]||"Unknown Browser"}ff(){return this.fd[1]||"Unknown Version"}Ja(t){for(let e=0;e<t.length;
2e++){let i=t[e].string,s=V.nf(i,t[e]);if(s)return"Mac"===s&&navigator.maxTouchPoints>1&&(s="iOS"),Promise.resolve(s)}return Promise.resolve(navigator.platform)}static gc(t){let e,i=t.match(/(samsungbrowser|tizen|roku|konqueror|icab|crios|opera|ucbrowser|chatgptbrowser|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]===G.rO){if(t.includes(G.Sg))return[G.Sg,i[2]];if(null!=(e=t.match(/\b(OPR|Edge|EdgA|Edg|UCBrowser)\/(\.?\d+(\.\d+)*)/)))return(e=e.slice(1))[0]=e[0].replace("OPR",G.oO),e[0]=e[0].replace("EdgA",G.eO),"Edg"===e[0]&&(e[0]=G.eO),[e[0],e[1]]}if(i[1]===G.Bg&&null!=(e=t.match(/\b(EdgiOS)\/(\.?\d+(\.\d+)*)/)))return(e=e.slice(1))[0]=e[0].replace("EdgiOS",G.eO),[e[0],e[1]];if((i=i[2]?[i[1],i[2]]:[null,null])[0]===G.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]===G.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]=G.rO),"tizen"===t&&(i[0]="Samsung Smart TV",i[1]=null),"samsungbrowser"===t&&(i[0]="Samsung Browser")}return i}}class H{constructor(){let t;t=navigator.userAgent.toLowerCase().includes(G.Sg.toLowerCase())||!navigator.userAgentData?V:K,this.vg=new t,this.userAgent=navigator.userAgent,this.browser=this.vg.ef(),this.version=this.vg.ff(),this.OS=null,this.Ja().then(t=>this.OS=t);const e=navigator;this.language=(e.userLanguage||e.language||e.browserLanguage||e.systemLanguage||"").toLowerCase(),this.Pa=H.xg(this.userAgent)}bE(){return this.browser===G.Bg}Ka(){return this.OS||null}Ja(){return this.OS?Promise.resolve(this.OS):this.vg.Ja(H.Og).then(t=>(this.OS=t,t))}static xg(t){t=t.toLowerCase();let e=["bot","slurp","baiduspider","yandex","facebookexternalhit","sogou","ia_archiver","https://github.com/prerender/prerender","aolbuild","bingpreview","mediapartners-google","teoma","taiko","facebookexternalhit","facebookcatalog","meta-webindexer","meta-externalads","meta-externalagent","meta-externalfetcher"];for(let i=0;i<e.length;i++)if(-1!==t.indexOf(e[i]))return!0;return!1}}H.Og=[{string:navigator.platform,cf:"Win",identity:"Windows"},{string:navigator.platform,cf:"Mac",identity:"Mac"},{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:"iOS"},{string:navigator.platform,cf:"Pike v",identity:"iOS"},{string:navigator.userAgent,cf:["Web0S"],identity:"WebOS"},{string:navigator.userAgent,cf:"Tizen",identity:"Tizen"},{string:navigator.userAgent,cf:"Coolita",identity:"Other Smart TV"},{string:navigator.userAgent,cf:"WhaleTV",identity:"Other Smart TV"},{string:navigator.platform,cf:["Linux armv7l","Android"],identity:W},{string:navigator.userAgent,cf:["Android"],identity:W},{string:navigator.platform,cf:"Linux",identity:"Linux"}];let Q=new H,X={iu:{su:"ab.storage.userId",Jh:"ab.storage.deviceId",Nl:"ab.storage.sessionId"},ct:{ec:"ab.test",tE:"ab.storage.events",eE:"ab.storage.attributes",sE:"ab.storage.attributes.anonymous_user",Qa:"ab.storage.device",au:"ab.storage.sdk_metadata",du:"ab.storage.session_id_for_cached_metadata",In:"ab.storage.pushToken",rE:"ab.storage.cardImpressions",hl:"ab.storage.serverConfig",oE:"ab.storage.triggers",nE:"ab.storage.triggers.ts",Hl:"ab.storage.messagingSessionStart",Ps:"ab.storage.cc",Gs:"ab.storage.ccLastFullSync",Hs:"ab.storage.ccLastCardUpdated",Pu:"ab.storage.globalRateLimitCurrentTokenCount",Hu:"ab.storage.dynamicRateLimitCurrentTokenCount",Et:"ab.storage.ccClicks",Pt:"ab.storage.ccImpressions",Lt:"ab.storage.ccDismissals",aE:"ab.storage.lastDisplayedTriggerTimesById",iE:"ab.storage.lastDisplayedTriggerTime",EE:"ab.storage.triggerFireInstancesById",jh:"ab.storage.signature",lE:"ab.storage.brazeSyncRetryCount",Qs:"ab.storage.sdkVersion",Ie:"ab.storage.ff",qe:"ab.storage.ffImpressions",Ae:"ab.storage.ff
2LastRefreshAt",Me:"ab.storage.ff.sessionId",SE:"ab.storage.lastReqToEndpoint",_E:"ab.storage.requestAttempts",Nr:"ab.storage.deferredIam",Lu:"ab.storage.lastSdkReq",uE:"ab.storage.alias",ut:"ab.storage.banners",It:"ab.storage.banners.impressions",gt:"ab.storage.banners.sessionId"},ie:"ab.optOut"};class Z{constructor(t,e){this.cE=t,this.TE=e,this.cE=t,this.TE=e}Da(t){let e=a(X.iu),i=new Z.ne(t);for(let t of e)i.remove(X.iu[t])}uu(t,e){let i=null;null!=e&&e instanceof y&&(i=e.dt()),this.cE.store(t,i)}hE(t){let e=this.tu(t);null!=e&&(e.ql=new Date().valueOf(),this.uu(t,e))}tu(t){let e,i=this.cE.br(t),s=(t=>{let e;try{e=JSON.parse(t)}catch(t){e=null}return e})(i);if(s)(e=y.qn(s)||null)&&this.uu(t,e);else{let s=y.AE(i);e=y.qn(s)||null,s!==i&&e&&this.uu(t,e)}return e}Fl(t){this.cE.remove(t)}Ua(){let t;for(let e of a(X.iu))null!=(t=this.tu(X.iu[e]))&&this.uu(X.iu[e],t)}Eo(t){let e;if(null==t||0===t.length)return!1;e=n(t)?t:[t];let i=this.TE.br(X.ct.tE);null!=i&&n(i)||(i=[]);for(let t=0;t<e.length;t++)i.push(e[t].dt());return this.TE.store(X.ct.tE,i)}yl(t){return null!=t&&this.Eo([t])}RE(){let t=this.TE.br(X.ct.tE);this.TE.remove(X.ct.tE),null==t&&(t=[]);let e=[],i=!1,s=null;if(n(t))for(let i=0;i<t.length;i++)m.gE(t[i])?e.push(m.qn(t[i])):s=i;else i=!0;if(i||null!=s){let r="Stored events could not be deserialized as Events";i&&(r+=", was "+Object.prototype.toString.call(t)+" not an array"),null!=s&&(r+=", value at index "+s+" does not look like an event"),r+=", serialized values were of type "+typeof t+": "+JSON.stringify(t),e.push(new m(null,"ie",new Date().valueOf(),null,{e:r}))}return e}ft(t,e){return!!r(X.ct,t,"StorageManager cannot store object.","STORAGE_KEYS.OBJECTS")&&this.TE.store(t,e)}lt(t){return!!r(X.ct,t,"StorageManager cannot retrieve object.","STORAGE_KEYS.OBJECTS")&&this.TE.br(t)}Nt(t){return!!r(X.ct,t,"StorageManager cannot remove object.","STORAGE_KEYS.OBJECTS")&&(this.TE.remove(t),!0)}clearData(){let t=a(X.iu),e=a(X.ct);for(let e=0;e<t.length;e++){let i=t[e];this.cE.remove(X.iu[i])}for(let t=0;t<e.length;t++){let i=e[t];this.TE.remove(X.ct[i])}}OE(t){return t||X.ct.sE}ku(t){let e=this.TE.br(X.ct.eE);null==e&&(e={});let i=this.OE(t[M.Jn]),s=e[i];for(let r in t)r!==M.Jn&&(null==e[i]||s&&null==s[r])&&this.mu(t[M.Jn],r,t[r])}mu(t,e,i){let s=this.TE.br(X.ct.eE);null==s&&(s={});let r=this.OE(t),n=s[r];if(null==n&&(n={},null!=t&&(n[M.Jn]=t)),e===M.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.TE.store(X.ct.eE,s)}IE(){let t=this.TE.br(X.ct.eE);this.TE.remove(X.ct.eE);let e=[];for(let i in t)null!=t[i]&&e.push(t[i]);return e}ru(t){let e=this.TE.br(X.ct.eE);if(null!=e){let i=this.OE(null),s=e[i];null!=s&&(e[i]=void 0,this.TE.store(X.ct.eE,e),s[M.Jn]=t,this.ku(s))}let i=this.tu(X.iu.Nl),s=null;null!=i&&(s=i.eu);let r=this.RE();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.yl(i)}}dE(){return this.TE.fE}}Z.rc=class{constructor(t){this.sn=t,this.sn=t,this.fE=Q.bE()?3:10}mE(t){return t+"."+this.sn}store(t,e){try{return localStorage.setItem(this.mE(t),JSON.stringify({v:e})),!0}catch(t){return i.info("Storage failure: "+v(t)),!1}}br(t){try{let e=null,i=localStorage.getItem(this.mE(t));return null!=i&&(e=JSON.parse(i)),null==e?null:e.v}catch(t){return i.info("Storage retrieval failure: "+v(t)),null}}remove(t){try{localStorage.removeItem(this.mE(t))}catch(t){return i.info("Storage removal failure: "+v(t)),!1}}},Z.ac=class{constructor(){this.KE={},this.YE=5242880,this.fE=3}store(t,e){let s=this.NE(e);return s>this.YE?(i.info("Storage failure: object is ≈"+s+" bytes which is greater than the max of "+this.YE),!1):(this.KE[t]={value:e},!0)}NE(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}br(t){let e=this.KE[t];return null==e?null:e.value}remove(t){this.KE[t]=null}},Z.ne=class{constructor(t,e){this.sn=t,this.GE=e,this.sn=t,this.CE=this.DE(),this.ME=576e3,this.GE=!!e}mE(t){return null!=this.sn?t+"."+this.sn:t}DE(){let t=0,e=document.location.hostname,i=e.split("."),s="ab._gd";
2for(;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}se(){let t=new Date;return t.setTime(t.getTime()+60*this.ME*1e3),t.getFullYear()}pE(){let t=s(X.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.sn)&&this.vE(t)}}}store(t,e){let s;this.pE();let r=new Date;r.setTime(r.getTime()+60*this.ME*1e3);let n="expires="+r.toUTCString(),o="domain="+this.CE;s=this.GE?e:encodeURIComponent(e);let l=this.mE(t)+"="+s+";"+n+";"+o+";path=/";return l.length>=4093?(i.info("Storage failure: string is "+l.length+" chars which is too large to store as a cookie."),!1):(document.cookie=l,!0)}br(t){let e=[],s=this.mE(t)+"=",r=document.cookie.split(";");for(let n=0;n<r.length;n++){let o=r[n];for(;" "===o.charAt(0);)o=o.substring(1);if(0===o.indexOf(s))try{let t;t=this.GE?o.substring(s.length,o.length):decodeURIComponent(o.substring(s.length,o.length)),e.push(t)}catch(e){return i.info("Storage retrieval failure: "+v(e)),this.remove(t),null}}return e.length>0?e[e.length-1]:null}remove(t){this.vE(this.mE(t))}vE(t){let e=t+"=;expires="+new Date(0).toUTCString();document.cookie=e,document.cookie=e+";path=/";let i=e+";domain="+this.CE;document.cookie=i,document.cookie=i+";path=/"}},Z.tc=class{constructor(t,e,i){this.sn=t,this.UE=[],e&&this.UE.push(new Z.ne(t)),i&&this.UE.push(new Z.rc(t)),this.UE.push(new Z.ac)}store(t,e){let i=!0;for(let s=0;s<this.UE.length;s++)i=this.UE[s].store(t,e)&&i;return i}br(t){for(let e=0;e<this.UE.length;e++){let i=this.UE[e].br(t);if(null!=i)return i}return null}remove(t){new Z.ne(this.sn).remove(t);for(let e=0;e<this.UE.length;e++)this.UE[e].remove(t)}};class Y{constructor(){this.yi={}}wt(t){if("function"!=typeof t)return null;let e=b();return this.yi[e]=t,e}removeSubscription(t){delete this.yi[t]}removeAllSubscriptions(){this.yi={}}sc(){return Object.keys(this.yi).length}L(t){let e=[];for(let i in this.yi){let s=this.yi[i];e.push(s(t))}return e}}t.s(["default",0,Y],877064);class tt{constructor(t,e){this.database=t,this.vd=e,this.parent="u"<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");if(e&&(e.onupgradeneeded=()=>e.result.close(),e.onsuccess=()=>e.result.close()),"u">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.Fs)r.database.Fs.hasOwnProperty(t)&&!i.objectStoreNames.contains(r.database.Fs[t])&&i.createObjectStore(r.database.Fs[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)}})}jr(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)}be(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)}})}Ds(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.Fs)this.database.Fs.hasOwnProperty(e)&&this.database.Fs[e]!==this.database.Fs.le&&t.push(this.database.Fs[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)}})}}tt.Us={Rs:{Sd:"AppboyServiceWorkerAsyncStorage",VERSION:6,Fs:{Tu:"data",hr:"pushClicks",cu:"pushSubscribed",Cd:"fallbackDevice",As:"cardUpdates",le:"optOut",wr:"pendingData",xh:"sdkAuthenticationSignature"},me:1}},t.s(["IndexedDBAdapter",0,tt],313526);class te{constructor(t,e,i){this.j=t,this.Zn=e,this.gh=i,this.j=t,this.Zn=e||!1,this.gh=i,this.ph=new Y,this.Fh=0,this.kh=1}fh(){return this.Zn}wh(){return this.j.lt(X.ct.jh)}setSdkAuthenticationSignature(t){let e=this.wh();this.j.ft(X.ct.jh,t);let s=tt.Us.Rs;new tt(s,i).setItem(s.Fs.xh,this.kh,t),e!==t&&this.Z()}qh(){this.j.Nt(X.ct.jh);let t=tt.Us.Rs;new tt(t,i).be(t.Fs.xh,this.kh)}subscribeToSdkAuthenticationFailures(t){return this.gh.wt(t)}yh(t){this.gh.L(t)}Bh(){this.ph.removeAllSubscriptions()}Gh(){this.Fh+=1}Hh(){return this.Fh}Z(){this.Fh=0}}class ti{N(t){}changeUser(t=!1){}clearData(t=!1){}}t.s(["default",0,ti],310911);class ts{constructor(t){this.id=t,this.id=t}Ar(){let t={};return null!=this.browser&&(t.browser=this.browser),null!=this.Ga&&(t.browser_version=this.Ga),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 tr={BROWSER:"browser",BROWSER_VERSION:"browserVersion",OS:"os",RESOLUTION:"resolution",LANGUAGE:"language",TIME_ZONE:"timeZone",USER_AGENT:"userAgent"};class tn{constructor(t,e){this.j=t,this.Fa=e,this.j=t,null==e&&(e=s(tr)),this.Fa=e}fe(t=!0){let e=this.j.tu(X.iu.Jh);null==e&&(e=new y(b()),t&&this.j.uu(X.iu.Jh,e));let i=new ts(e.eu);for(let t=0;t<this.Fa.length;t++)switch(this.Fa[t]){case tr.BROWSER:i.browser=Q.browser;break;case tr.BROWSER_VERSION:i.Ga=Q.version;break;case tr.OS:i.os=this.Ja();break;case tr.RESOLUTION:i.Ba=screen.width+"x"+screen.height;break;case tr.LANGUAGE:i.language=Q.language;break;case tr.TIME_ZONE:i.timeZone=this.Ha(new Date);break;case tr.USER_AGENT:i.userAgent=Q.userAgent}return i}Ja(){if(Q.Ka())return Q.Ka();let t=this.j.lt(X.ct.Qa);return t&&t.os_version?t.os_version:Q.Ja()}Ha(t){let e=!1;if("u">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){i.info("Intl.DateTimeFormat threw an error, cannot detect user's time zone:"+v(t)),e=!0}if(e)return"";let s=t.getTimezoneOffset();return this.Va(s)}Va(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}}let to="invalid_json_response",tl="empty_response";class ta{constructor(t=!1,e=[]){this.W=t,this.ue=e,this.W=t,this.ue=e}Vt(t){this.W=this.W&&t.W,this.ue.push(...t.ue)}}let tu=(t,e,s)=>{var r,n;let o=new ta,l=t0.u();if(!l)return i.info(`Not logging event with type "${t}" because the current session ID could not be found.`),o;let a=l.qo();return o.ue.push(new m(s||(null==(r=t0.ir())?void 0:r.getUserId()),t,new Date().valueOf(),a,e)),o.W=(null==(n=t0.p())?void 0:n.Eo(o.ue))||!1,o}
2,th={H:{Tu:"data",bi:"content_cards/sync",$e:"feature_flags/sync",Ir:"template",G:"banners/sync"},Yu:t=>null==t?void 0:t.lt(X.ct.SE),sm:t=>null==t?void 0:t.lt(X.ct._E),nm:(t,e)=>{null==t||t.ft(X.ct.SE,e)},rm:(t,e)=>{null==t||t.ft(X.ct._E,e)},Cu:(t,e)=>{if(!t||!e)return -1;let i=th.Yu(t);if(null==i)return -1;let s=i[e];return null==s||isNaN(s)?-1:s},Su:(t,e)=>{let i=1;if(!t||!e)return i;let s=th.sm(t);return null==s?i:null==(i=s[e])||isNaN(i)?1:i},K:(t,e,i)=>{if(!t||!e)return;let s=th.Yu(t);null==s&&(s={}),s[e]=i,th.nm(t,s)},Bu:(t,e,i)=>{if(!t||!e)return;let s=th.sm(t);null==s&&(s={}),s[e]=i,th.rm(t,s)},Ci:(t,e)=>{t&&e&&th.Bu(t,e,1)},Ku:(t,e)=>{if(!t||!e)return;let i=th.Su(t,e);th.Bu(t,e,i+1)}},tc=th,td=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},tf={O:t=>{let e,s;try{let r=!1;if(window.XMLHttpRequest&&(r=!0),!r)return void i.error("This browser does not have any supported ajax options!");e=new XMLHttpRequest;let n=i=>{"function"==typeof t.error&&t.error(e.status),"function"==typeof t.tt&&t.tt(!1,i)};for(let i 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.W){let i;try{i=JSON.parse(e.responseText)}catch(r){let i={error:""===e.responseText?tl:to,response:e.responseText};(0,t.W)(i,s)}i&&t.W(i,s)}"function"==typeof t.tt&&t.tt(!0,s)}else n(s)},e.onerror=()=>{n(e.getAllResponseHeaders())},e.ontimeout=()=>{n()},s=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(i[0],i[1]);e.send(s)}catch(t){i.error(`Network request error: ${v(t)}`)}}};t.s(["default",0,tf,"readResponseHeaders",0,td],575236);class tg{constructor(t,e,i,s,r,n,o,l,a,u,h,c){this.on=t,this.j=e,this.Qh=i,this.Cs=s,this.C=r,this.h=n,this.sn=o,this.Ea=l,this.Xh=a,this.Zh=u,this.appVersion=h,this.$a=c,this.Xa=t=>null==t?"":`${t} `,this.on=t,this.j=e,this.Qh=i,this.Cs=s,this.C=r,this.h=n,this.sn=o,this.Ea=l,this.Xh=a,this.Zh=u,this.appVersion=h,this.$a=c,this.Ya=["npm"],this.Za={}}$(t,i=!1,s=!1){let r=this.on.fe(!s),n=r.Ar();u(this.j.lt(X.ct.Qa),n)||(t.device=n),t.api_key=this.sn,t.time=h(new Date().valueOf(),!0);let o=this.j.lt(X.ct.au)||[],l=this.j.lt(X.ct.du)||"";this.Ya.length>0&&(!u(o,this.Ya)||l!==this.C.bt())&&(t.sdk_metadata=this.Ya),t.sdk_version=this.Xh,this.Zh&&(t.sdk_flavor=this.Zh),t.app_version=this.appVersion,t.app_version_code=this.$a,t.device_id=r.id;let a=this.Cs.getUserId();if(i&&null!==a&&(t.user_id=a),!a&&!this.Qh.fh()){let i=e(this.j);i&&(t.alias=i)}return t}Y(t,e,s){let r=e.auth_error,o=e.error;if(!r&&!o)return!0;if(r){let e;this.Qh.Gh();let o={errorCode:r.error_code};for(let t of s)n(t)&&"X-Braze-Auth-Signature"===t[0]&&(o.signature=t[1]);t.respond_with&&t.respond_with.user_id?o.userId=t.respond_with.user_id:t.user_id&&(o.userId=t.user_id);let l=r.reason;return l?(o.reason=l,e=`due to ${l}`):e=`with error code ${r.error_code}.`,this.Qh.fh()||(e+=' Please use the "enableSdkAuthentication" initialization option to enable authentication.'),i.error(`SDK Authentication failed ${e}`),this.fu(t.events||[],t.attributes||[]),this.Qh.yh(o),!1}if(o){let s,r=o;switch(r){case tl:return tu("ie",{e:s="Received successful response with empty body."}),i.info(s),!1;case to:return tu("ie",{e:(s="Received successful response with invalid JSON")+": "+e.response}),i.info(s),!1;case"invalid_api_key":r=`The API key "${t.api_key}" is invalid for the baseUrl ${this.Ea}`;break;case"blacklisted":r="Sorry, we are not currently accepting your requests. If you think this is in error, please contact us.";break;case"no_device_identifier":r="No device identifier. Please contact [email protected]"}i.error("Backend error: "+r)}return!1}Au(t,e,i){return!!(t&&0!==t.length||e&&0!==e.length||i)}Du(t,e,i,s=!1){let r=[],n=t=>t||"",o=n(this.Cs.getUserId()),l=this.Mr(t),a=[],u=[],h,c=null;if(e.length>0){let t=[];
2for(let i of e){if(h=i.Ar(),this.Qh.fh()){if(o&&!h.user_id){c||(c={}),c.events||(c.events=[]),c.events.push(h);continue}if(n(h.user_id)!==o){u.push(h);continue}}t.push(h)}t.length>0&&(l.events=t)}if(i.length>0){let t=[];for(let e of i)e&&(this.Qh.fh()&&n(e.user_id)!==o?a.push(e):t.push(e));t.length>0&&(l.attributes=t)}if(this.fu(u,a),l=this.$(l,!1,s),c){let t={requestData:c=this.$(c,!1,s),headers:this.A(c,tc.H.Tu)};r.push(t)}if(l&&!this.Au(l.events,l.attributes,t))return c?r:null;let d={requestData:l,headers:this.A(l,tc.H.Tu)};return r.push(d),r}fu(t,e){if(t){let e=[];for(let i of t){let t=m.fromJson(i);t.time=1e3*t.time,e.push(t)}this.j.Eo(e)}if(e)for(let t of e)this.j.ku(t)}_(t,e){let s="HTTP error ";null!=t&&(s+=t+" "),s+=e,i.error(s)}yu(t){return tu("i",{n:t})}Mr(t,i){let s={};t&&(s.triggers=!0);let r=null!=i?i:this.Cs.getUserId();if(r&&(s.user_id=r),!s.user_id&&!this.Qh.fh()){let t=e(this.j);t&&(s.alias=t)}return s.config={config_time:this.h.Ft()},{respond_with:s}}Nu(t){let e=new Date().valueOf(),i="7200000",s=tc.Cu(this.j,t);return -1!==s&&(i=(e-s).toString()),i}A(t,e,i=!1){let s=[["X-Braze-Api-Key",this.sn]],r=this.Nu(e);s.push(["X-Braze-Last-Req-Ms-Ago",r]);let n=tc.Su(this.j,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),e===tc.H.bi){s.push(["X-Braze-ContentCardsRequest","true"]);let t=tc.Su(this.j,tc.H.bi);t&&!i||(t=1,tc.Bu(this.j,tc.H.bi,t));let e=Math.max(0,t-1);s.push(["BRAZE-SYNC-RETRY-COUNT",e.toString()]),o=!0}if(e===tc.H.$e&&(s.push(["X-Braze-FeatureFlagsRequest","true"]),o=!0),o&&s.push(["X-Braze-DataRequest","true"]),this.Qh.fh()){let t=this.Qh.wh();null!=t&&s.push(["X-Braze-Auth-Signature",t])}return s}zu(t,e,s,r){if(this.Za[r])return;let n=window.setTimeout(()=>{i.info(`Retrying rate limited ${this.Xa(r)}SDK request.`),this.J(e,s,r)},t);this.Za[r]=n}fo(){for(let t in this.Za){let e=this.Za[t];window.clearTimeout(e)}this.Za={}}J(t,e,s,r){if(!this.ju(s))return i.info(`${this.Xa(s)}SDK request being rate limited.`),void("function"==typeof r&&r());let n=this.Mu();if(!n.$u)return this.zu(n.Xu,t,e,s),void i.info(`${this.Xa(s)}SDK request being rate limited. Request will be retried in ${Math.trunc(n.Xu/1e3)} seconds.`);this.j.ft(X.ct.Lu,new Date().valueOf());let o=t.device;o&&o.os_version instanceof Promise?o.os_version.then(i=>{t.device.os_version=i,e(n.Eu)}):e(n.Eu)}Fu(t){let e=t?td(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()))?(tu("ie",{e:"Received unexpected value for retry-after header in /sync response: "+i}),null):{type:"timestamp",value:1e3*parseFloat(i.toString())}}st(t,e,i,s,r,n){let o;if(tc.Su(this.j,i)>=15)return;n=n||0;let l=this.Fu(t);r();let a=t=>{s(window.setTimeout(()=>{e()},t)),tc.Ku(this.j,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}a(o)}else n?a(n):tc.Ci(this.j,i)}Iu(t){var e;null==(e=this.j)||e.ft(X.ct.Pu,t)}Uu(t,e){let i=this.xu();null==i&&(i={}),i[t]=e,this.j.ft(X.ct.Hu,i)}Ou(){var t;return null==(t=this.j)?void 0:t.lt(X.ct.Pu)}xu(){var t;return null==(t=this.j)?void 0:t.lt(X.ct.Hu)}Gu(t,e,i,s,r=""){let n;if(r){let t=this.xu();n=null==t||isNaN(t[r])?e:t[r]}else(null==(n=this.Ou())||isNaN(n))&&(n=e);return Math.min(n+(t-s)/1e3/i,e)}_u(t,e){return Math.max(0,(1-t)*e*1e3)}Wu(t,e=""){var i,s,r,n,o;let l={$u:!0,Eu:-1,Xu:0};if(null==t&&(t=!0),!t&&!e)return l;let a,u,h=null;if(t)h=null==(i=this.j)?void 0:i.lt(X.ct.Lu);else{let t=tc.Yu(this.j);if(null==t||null==t[e])return l;h=t[e]}
2if(null==h||isNaN(h)||(t?(a=(null==(s=this.h)?void 0:s.Ju())||-1,u=(null==(r=this.h)?void 0:r.Qu())||-1):(a=(null==(n=this.h)?void 0:n.Vu(e))||-1,u=(null==(o=this.h)?void 0:o.Zu(e))||-1),-1===a||-1===u))return l;let c=new Date().valueOf(),d=this.Gu(c,a,u,h,e);return d<1?(l.$u=!1,l.Xu=this._u(d,u)):(l.Eu=d=Math.trunc(d)-1,t?this.Iu(d):this.Uu(e,d)),l}Mu(){return this.Wu(!0)}ju(t){let e=this.Wu(!1,t);return!(e&&!e.$u)}Z(){this.Qh.Z()}V(){return this.Ea}addSdkMetadata(t){for(let e of t)-1===this.Ya.indexOf(e)&&this.Ya.push(e)}}let tp=(t,e)=>(t=Math.ceil(t),Math.floor(Math.random()*((e=Math.floor(e))-t+1))+t);t.s(["randomInclusive",0,tp],894984);let tm={pn:()=>"serviceWorker"in navigator&&"u">typeof ServiceWorkerRegistration&&"showNotification"in ServiceWorkerRegistration.prototype&&"PushManager"in window,yn:()=>"safari"in window&&"pushNotification"in window.safari&&"function"==typeof window.safari.pushNotification.permission&&"function"==typeof window.safari.pushNotification.requestPermission,isPushSupported:()=>tm.pn()||tm.yn(),isPushBlocked:()=>{let t=tm.isPushSupported()&&"Notification"in window&&null!=window.Notification&&null!=window.Notification.permission&&"denied"===window.Notification.permission,e=tm.isPushSupported()&&(!("Notification"in window)||null==window.Notification);return t||e},isPushPermissionGranted:()=>tm.isPushSupported()&&"Notification"in window&&null!=window.Notification&&null!=window.Notification.permission&&"granted"===window.Notification.permission,Qi:()=>tm.isPushBlocked()?{Ui:!1,reason:"blocked"}:tm.isPushSupported()?tm.isPushPermissionGranted()?{Ui:!1,reason:"permissionGranted"}:{Ui:!0}:{Ui:!1,reason:"unsupported"},Vi:(t,e)=>"blocked"===t?`${e} containing a push prompt is not being shown because the user has already declined push permission prompt.`:"unsupported"===t?`${e} containing a push prompt is not being shown because the browser doesn't support push notifications.`:`${e} containing a push prompt is not being shown because the user has already accepted the permission prompt.`};t.s(["default",0,tm],500469);class tb{constructor(t,e,i,s,r,n,o,l,a,u){this.sn=t,this.baseUrl=e,this.C=i,this.on=s,this.Cs=r,this.h=n,this.j=o,this.$l=l,this.Qh=a,this.B=u,this.sn=t,this.baseUrl=e,this.Tl=0,this.fE=o.dE()||0,this.Ll=null,this.C=i,this.on=s,this.Cs=r,this.h=n,this.j=o,this.Qh=a,this.B=u,this.$l=l,this.Ml=new Y,this.Pl=null,this.Il=50,this.Ol=!1,this.Ul=!1}_l(t,e){return!t&&!e&&this.Qh.Hh()>=this.Il}Jl(t){let e=this.C.zl();if(t.length>0){let i=this.Cs.getUserId();for(let s of t){let t=!s.userId&&!i||s.userId===i;"ss"===s.type&&t&&(e=!0)}}return e}Kl(t=!1,e=!0,s,r,n,o=!1,l=!1){e&&this.Xl();let a=this.j.RE(),u=this.j.IE(),h=!1,c=(t,i,o=-1)=>{let l=new Date().valueOf();tc.K(this.j,tc.H.Tu,l),-1!==o&&i.push(["X-Braze-Req-Tokens-Remaining",o.toString()]);let a=!1;tf.O({url:this.baseUrl+"/data/",data:t,headers:i,W:e=>{null!=t.respond_with&&t.respond_with.triggers&&(this.Tl=Math.max(this.Tl-1,0)),this.B.Y(t,e,i)?(this.Qh.Z(),this.h.cl(e),null!=t.respond_with&&t.respond_with.user_id!=this.Cs.getUserId()||(null!=t.device&&this.j.ft(X.ct.Qa,t.device),null!=t.sdk_metadata&&(this.j.ft(X.ct.au,t.sdk_metadata),this.j.ft(X.ct.du,this.C.bt())),this.$l(e),tc.Bu(this.j,tc.H.Tu,1),"function"==typeof s&&s())):e.auth_error&&(a=!0)},error:()=>{a=!0,null!=t.respond_with&&t.respond_with.triggers&&(this.Tl=Math.max(this.Tl-1,0)),this.B.fu(t.events,t.attributes),"function"==typeof r&&r()},tt:(t,i)=>{"function"==typeof n&&n(!a);let s=this.B.Fu(i),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(e&&!h){if(a){tc.Ku(this.j,tc.H.Tu);let t=this.Ll;(null==t||t<1e3*this.fE)&&(t=1e3*this.fE);let e=Math.min(3e5,tp(1e3*this.fE,3*t))+r;this.Ql(e)}else this.Ql(Math.max(1e3*this.fE,r));h=!0}}})},d=this.Jl(a),f=t||d;if(this._l(o,d))return void i.info("Declining to flush data due to 50 consecutive authentication failures");if(e&&!this.B.Au(a,u,f))return this.Ql(),void("function"==typeof n&&n(!0));let g=this.B.Du(f,a,u,l);f&&this.Tl++;let p=!1;if(g)for(let t of g)this.B.J(t.requestData,e=>c(t.requestData,t.headers,e),tc.H.Tu,r),p=!0;this.Qh.fh()&&e&&!p?this.Ql():d&&(i.info("Invoking new session subscriptions"),this.Ml.L(),this.Ul=!0)}Yl(){return this.Tl>0}Ql(t=1e3*this.fE){this.Ol||(this.Xl(),this.Pl=window.setTimeout(()=>{if(document.hidden){let t="visibilitychange",e=()=>{document.hidden||(document.removeEventListener(t,e,!1),this.Kl())};document.addEventListener(t,e,!1)}else this.Kl()},t),this.Ll=t)}
2Xl(){null!=this.Pl&&(clearTimeout(this.Pl),this.Pl=null)}initialize(){this.Ol=!1,this.Ql()}destroy(){this.Ml.removeAllSubscriptions(),this.Qh.Bh(),this.Xl(),this.Ol=!0,this.Kl(void 0,!1,void 0,void 0,void 0,void 0,!0),this.Pl=null,this.Ul=!1}rn(t){return this.Ul?(t(),null):this.Ml.wt(t)}openSession(){let e=this.C.bt()!==this.C.qo();e&&(this.j.hE(X.iu.Jh),this.j.hE(X.iu.su)),this.Kl(!1,void 0,()=>{this.j.Nt(X.ct.qe)}),this.zn(),e&&t.A(121432).then(t=>{if(this.Ol)return;let e=t.default.ea();if(null!=e&&(tm.isPushPermissionGranted()||tm.isPushBlocked())){let t=()=>{e.mn()?i.info("Push token maintenance is disabled, not refreshing token for backend."):e.subscribe()},s=()=>{let e=this.j.lt(X.ct.In);(null==e||e)&&t()},r=tt.Us.Rs;new tt(r,i).jr(r.Fs.cu,(e,i)=>{i&&t()},s)}})}Zl(){this.j.Nt(X.ct.Ie),this.j.Nt(X.ct.Ps),this.j.Nt(X.ct.Nr)}hc(){var t,e;this.j.Nt(X.ct.Lu),this.j.Nt(X.ct.SE);let i=tc.H;for(let e in i){let s=i[e];this.B.Uu(s,null==(t=this.h)?void 0:t.Vu(s))}this.B.Iu(null==(e=this.h)?void 0:e.Ju())}changeUser(t,e,s){let r=this.Cs.getUserId();if(r!==t){this.C.Bl(),this.Zl(),null!=r&&this.Kl(void 0,!1,void 0,void 0,void 0),this.Cs.ou(t),s?this.Qh.setSdkAuthenticationSignature(s):this.Qh.qh();for(let t=0;t<e.length;t++)e[t].changeUser(null==r);this.B.fo(),null!=r&&this.j.Nt(X.ct.rE),this.j.Nt(X.ct.Qa),this.j.Nt(X.ct.uE),this.hc(),this.openSession(),i.info('Changed user to "'+t+'".')}else{let e="Doing nothing.";s&&this.Qh.wh()!==s&&(this.Qh.setSdkAuthenticationSignature(s),e="Updated SDK authentication signature"),i.info(`Current user is already ${t}. ${e}`)}}requestImmediateDataFlush(t){this.Xl(),this.C.qo(),this.Kl(void 0,void 0,void 0,()=>{i.error("Failed to flush data, request will be retried automatically.")},t,!0)}$r(t,e){this.C.qo(),i.info("Requesting explicit trigger refresh."),this.Kl(!0,void 0,t,e)}En(t,e){let s={a:t,l:e},r=tu("uae",s);return r&&(i.info(`Logged alias ${t} with label ${e}`),this.j.ft(X.ct.uE,s)),r}Ln(t,e,s){if(this.h.hu(e))return i.info(`Custom Attribute "${e}" is blocklisted, ignoring.`),new ta;let r=tu(t,{key:e,value:s});if(r){let t="object"==typeof s?JSON.stringify(s,null,2):s;i.info(`Logged custom attribute: ${e} with value: ${t}`)}return r}setLastKnownLocation(t,e,s,r,n,o){let l={latitude:e,longitude:s};null!=r&&(l.altitude=r),null!=n&&(l.ll_accuracy=n),null!=o&&(l.alt_accuracy=o);let a=tu("lr",l,t||void 0);return a&&i.info(`Set user last known location as ${JSON.stringify(l,null,2)}`),a}kr(t,e){let i=this.C.qo();return new m(this.Cs.getUserId(),"pc",t,i,{cid:e})}cc(t,e){return new tt(t,e)}zn(){let t=tt.Us.Rs;this.cc(t,i).setItem(t.Fs.Tu,1,{baseUrl:this.baseUrl,data:{api_key:this.sn,device_id:this.on.fe().id},userId:this.Cs.getUserId(),sdkAuthEnabled:this.Qh.fh()})}yr(t){for(let e of t)if(e.api_key===this.sn)this.B.fu(e.events,e.attributes);else{let t=tt.Us.Rs;new tt(t,i).setItem(t.Fs.wr,b(),e)}}Hn(t,e,s){let r,n;return this.h.hu(t)?(i.info(`Custom Attribute "${t}" is blocklisted, ignoring.`),new ta):(null===e&&null===s?(r="lcar",n={key:t}):(r="lcaa",n={key:t,latitude:e,longitude:s}),tu(r,n))}Kn(t,e){return tu("sgu",{group_id:t,status:e})}}class tv{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:30,refill_rate:30,endpoint_overrides:{}},u=null){this.ol=t,this.bl=e,this.fl=i,this.vl=s,this.Cl=r,this.dl=n,this.gl=o,this.he=l,this.ml=a,this.banners=u,this.ol=t,this.bl=e,this.fl=i,this.vl=s,this.Cl=r,this.dl=n,this.gl=o,this.he=l,this.ml=a,this.banners=u}dt(){return{s:"6.3.0",l:this.ol,e:this.bl,a:this.fl,p:this.vl,m:this.Cl,v:this.dl,c:this.gl,f:this.he,grl:this.ml,b:this.banners}}static qn(t){let e=t.l;return"6.3.0"!==t.s&&(e=0),new tv(e,t.e,t.a,t.p,t.m,t.v,t.c,t.f,t.grl,t.b)}}class ty{constructor(t){this.j=t,this.j=t,this.tl=new Y,this.il=new Y,this.el=new Y,this.sl=new Y,this.rl=null,this.ul=null}al(){if(null==this.ul){let t=this.j.lt(X.ct.hl);this.ul=null!=t?tv.qn(t):new tv}return this.ul}Ft(){return this.al().ol}cl(t){var e,i;if(null!=t&&null!=t.config){let s=t.config;if(s.time>this.al().ol){let t=t=>null==t?this.al().ml:t,r=new tv(s.time,s.events_blacklist,s.attributes_blacklist,s.purchases_blacklist,s.messaging_session_timeout,s.vapid_public_key,s.content_cards,s.feature_flags,t(s.global_request_rate_limit),s.banners),n=!1;null!=r.dl&&this.Wn()!==r.dl&&(n=!0);let o=!1;null!=r.gl.enabled&&this.gi()!==r.gl.enabled&&(o=!0);let l=!1;null!=r.he.enabled&&this.Re()!==r.he.enabled&&(l=!0);let a=!1;null!=(null==(e=r.banners)?void 0:e.enabled)&&this.Dt()!==(null==(i=r.banners)?void 0:i.enabled)&&(a=!0),this.ul=r,this.j.ft(X.ct.hl,r.dt()),n&&this.tl.L(),o&&this.il.L(),l&&this.el.L(),a&&this.sl.L()}}}_n(t){let e=this.tl.wt(t);return this.rl&&this.tl.removeSubscription(this.rl),this.rl=e,e}vi(t){return this.il.wt(t)}Ue(t){return this.el.wt(t)}P(t){return this.sl.wt(t)}ge(t){return -1!==this.al().bl.indexOf(t)}hu(t){return -1!==this.al().fl.indexOf(t)}Dr(t){return -1!==this.al().vl.indexOf(t)}Rl(){return this.al().Cl}Wn(){return this.al().dl}gi(){return this.al().gl.enabled||!1}El(){let t=this.al().ml;return!(!t||null==t.enabled)&&t.enabled}Ju(){if(!this.El())return -1;let t=this.al().ml;return null==t.capacity||t.capacity<10?-1:t.capacity}Qu(){if(!this.El())return -1;let t=this.al().ml;return null==t.refill_rate||t.refill_rate<=0?-1:t.refill_rate}wl(t){let e=this.al().ml.endpoint_overrides;return null==e?null:e[t]}Vu(t){let e=this.wl(t);return null==e||isNaN(e.capacity)||e.capacity<=0?-1:e.capacity}Zu(t){let e=this.wl(t);return null==e||isNaN(e.refill_rate)||e.refill_rate<=0?-1:e.refill_rate}Re(){return this.al().he.enabled&&null==this.ke()?(tu("ie",{e:"Missing feature flag refresh_rate_limit."}),!1):this.al().he.enabled||!1}ke(){return this.al().he.refresh_rate_limit}Dt(){var t;return(null==(t=this.al().banners)?void 0:t.enabled)||null}te(){var t;return(null==(t=this.al().banners)?void 0:t.max_placements)||0}}class tE{constructor(t,e,s,r){this.j=t,this.Cs=e,this.h=s,this.Sl=r,this.j=t,this.Cs=e,this.h=s,this.jl=1e3,(null==r||isNaN(r))&&(r=1800),r<this.jl/1e3&&(i.info("Specified session timeout of "+r+"s is too small, using the minimum session timeout of "+this.jl/1e3+"s instead."),r=this.jl/1e3),this.Sl=r}xl(t,e){return new m(this.Cs.getUserId(),"se",t,e.eu,{d:h(t-e.Gl)})}bt(){let t=this.j.tu(X.iu.Nl);return null==t?null:t.eu}zl(){let t=new Date().valueOf(),e=this.h.Rl();if(null==e)return!1;let i=this.j.lt(X.ct.Hl),s=null==i||t-i>1e3*e;return s&&this.j.ft(X.ct.Hl,t),s}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,s=this.j.tu(X.iu.Nl);
2if(this.Wl(t,s)){let r="Generating session start event with time "+t;if(null!=s){let t=s.ql;t-s.Gl<this.jl&&(t=s.Gl+this.jl),this.j.yl(this.xl(t,s)),r+=" (old session ended "+t+")"}r+=". Will expire "+e.valueOf(),i.info(r);let n=new y(b(),e);return this.j.yl(new m(this.Cs.getUserId(),"ss",t,n.eu)),this.j.uu(X.iu.Nl,n),null==this.j.lt(X.ct.Hl)&&this.j.ft(X.ct.Hl,t),n.eu}if(null!=s)return s.ql=t,s.kl=e,this.j.uu(X.iu.Nl,s),s.eu}Bl(){let t=this.j.tu(X.iu.Nl);null!=t&&(this.j.Fl(X.iu.Nl),this.j.yl(this.xl(new Date().valueOf(),t)))}}let tw={La:function(t,e=!1){let s,r=!1;try{if(localStorage&&localStorage.getItem)try{localStorage.setItem(X.ct.ec,"true"),localStorage.getItem(X.ct.ec)&&(localStorage.removeItem(X.ct.ec),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){i.info("Local Storage not supported!")}let n=tw.oc(),o=new Z.tc(t,n&&!e,r);return s=r?new Z.rc(t):new Z.ac,new Z(o,s)},oc:function(){return navigator.cookieEnabled||"cookie"in document&&(document.cookie.length>0||(document.cookie="test").indexOf.call(document.cookie,"test")>-1)}};class tS{constructor(t,e){this.triggerId=t,this.messageExtras=e,this.triggerId=t,this.messageExtras=e,this.extras={},this.isControl=!0,this.kt=!1}static fromJson(t){return new tS(t.trigger_id,t.message_extras)}Qt(){return!this.kt&&(this.kt=!0,!0)}Ur(){return this.kt}}let tC={Ic:null,Mo: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 t_(t){if(t.onclick){let e=document.createEvent("MouseEvents");e.initEvent("click",!0,!0),t.onclick.apply(t,[e])}}let tT=t=>null!==t&&"IFRAME"===t.tagName;class tI{constructor(t,e,i,s,r,n,o,l,a,u,h,c,d,f,g,p,m,b,v,y,E,w,S,C,_,T,I,N,A,k,O,j){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=d,this.iconColor=f,this.iconBackgroundColor=g,this.backgroundColor=p,this.textColor=m,this.closeButtonColor=b,this.animateIn=v,this.animateOut=y,this.header=E,this.headerAlignment=w,this.headerTextColor=S,this.frameColor=C,this.buttons=_,this.cropType=T,this.orientation=I,this.htmlId=N,this.css=A,this.messageExtras=k,this.language=O,this.altImageText=j,this.message=t,this.messageAlignment=e||tI.TextAlignment.CENTER,this.duration=u||5e3,this.slideFrom=i||tI.SlideFrom.BOTTOM,this.extras=s||{},this.triggerId=r,this.clickAction=n||tI.ClickAction.NONE,this.uri=o,this.openTarget=l||tI.OpenTarget.NONE,this.dismissType=a||tI.DismissType.AUTO_DISMISS,this.icon=h,this.imageUrl=c,this.imageStyle=d||tI.ImageStyle.TOP,this.iconColor=f||tI.th.ih,this.iconBackgroundColor=g||tI.th.sh,this.backgroundColor=p||tI.th.ih,this.textColor=m||tI.th.hh,this.closeButtonColor=b||tI.th.eh,this.animateIn=v,null==this.animateIn&&(this.animateIn=!0),this.animateOut=y,null==this.animateOut&&(this.animateOut=!0),this.header=E,this.headerAlignment=w||tI.TextAlignment.CENTER,this.headerTextColor=S||tI.th.hh,this.frameColor=C||tI.th.Eh,this.buttons=_||[],this.cropType=T||tI.CropType.FIT_CENTER,this.orientation=I,this.htmlId=N,this.css=A,this.isControl=!1,this.messageExtras=k,this.language=O,this.altImageText=j,this.nh=!1,this.kt=!1,this.Co=!1,this.Th=!1,this.Pe=null,this.Qe=null,this.ti=new Y,this.oh=new Y,this.do=tI.TextAlignment.CENTER}subscribeToClickedEvent(t){return this.ti.wt(t)}subscribeToDismissedEvent(t){return this.oh.wt(t)}removeSubscription(t){this.ti.removeSubscription(t),this.oh.removeSubscription(t)}removeAllSubscriptions(){this.ti.removeAllSubscriptions(),this.oh.removeAllSubscriptions()}closeMessage(){this.ll(this.Pe)}Ve(){return!0}Bo(){return this.Ve()}Le(){return null!=this.htmlId&&this.htmlId.length>4}Oe(){return this.Le()&&null!=this.css&&this.css.length>0}Ge(){if(this.Le()&&this.Oe())return this.htmlId+"-css"}Qt(){return!this.kt&&(this.kt=!0,!0)}Ur(){return this.kt}$t(t){return!this.Co&&(this.Co=!0,this.ti.L(),!0)}Kt(){return!this.Th&&(this.Th=!0,this.oh.L(),!0)}hide(t){if(t&&t.parentNode){let e=t.closest(".ab-iam-root");
2if(null==e&&(e=t),this.Ve()&&null!=e.parentNode){let t=e.parentNode.classList;t&&t.contains(tI.rh)&&t.remove(tI.rh),document.body.removeEventListener("touchmove",tI.lh)}e.className=e.className.replace(tI.uh,tI.ah)}return this.animateOut||!1}ll(t,e){let i,s;if(null==t)return;this.Pe=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 o=()=>{if(t&&t.parentNode){let e=t.closest(".ab-iam-root");null==e&&(e=t),e.parentNode&&e.parentNode.removeChild(e)}let i=this.Ge();if(null!=i){let t=document.getElementById(i);t&&t.parentNode&&t.parentNode.removeChild(t)}null!=n&&"Safari"===Q.browser&&(n.scrollTop=s),e?e():this.Kt()};r?setTimeout(o,tI.cr):o(),this.Qe&&this.Qe.focus()}ho(){return document.createTextNode(this.message||"")}bo(t){t.setAttribute("alt",this.altImageText||"")}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(`.${tI.rh}`)&&t.cancelable&&t.preventDefault()}Ah(t){let e=t.parentNode;this.Ve()&&null!=e&&this.orientation!==tI.Orientation.LANDSCAPE&&(null!=e.classList&&e.classList.add(tI.rh),document.body.addEventListener("touchmove",tI.lh,!!function(){if(null==tC.Ic){tC.Ic=!1;try{let t=Object.defineProperty({},"passive",{get:()=>{tC.Ic=!0}});window.addEventListener("testPassive",()=>{},t),window.removeEventListener("testPassive",()=>{},t)}catch(t){i.error(v(t))}}return tC.Ic}()&&{passive:!1})),t.className+=" "+tI.uh}static Ih(t){if(27===t.keyCode&&!t0.ee(tY.Lh)&&document.querySelectorAll(".ab-modal-interactions").length>0){let t=document.getElementsByClassName("ab-html-message"),e=!1;for(let i of t){let t=null;tT(i)&&i.contentWindow&&(t=i.contentWindow.document.getElementsByClassName("ab-programmatic-close-button")[0]),null!=t&&(t_(t),e=!0)}if(!e){let t=document.querySelectorAll(".ab-modal-interactions > .ab-close-button")[0];null!=t&&t_(t)}}}_h(){this.nh||t0.ee(tY.Lh)||(document.addEventListener("keydown",tI.Ih,!1),t0.mh(()=>{document.removeEventListener("keydown",tI.Ih)}),this.nh=!0)}dt(t){let e={};return t&&(e[tI.ss.Vr]=this.message,e[tI.ss.Wr]=this.messageAlignment,e[tI.ss.Nh]=this.slideFrom,e[tI.ss.xs]=this.extras,e[tI.ss.Yr]=this.triggerId,e[tI.ss.Zr]=this.clickAction,e[tI.ss.URI]=this.uri,e[tI.ss.ra]=this.openTarget,e[tI.ss.sa]=this.dismissType,e[tI.ss.ta]=this.duration,e[tI.ss.ia]=this.icon,e[tI.ss.ns]=this.imageUrl,e[tI.ss.oa]=this.imageStyle,e[tI.ss.pa]=this.iconColor,e[tI.ss.ma]=this.iconBackgroundColor,e[tI.ss.na]=this.backgroundColor,e[tI.ss.ua]=this.textColor,e[tI.ss.ca]=this.closeButtonColor,e[tI.ss.fa]=this.animateIn,e[tI.ss.da]=this.animateOut,e[tI.ss.la]=this.header,e[tI.ss.ga]=this.headerAlignment,e[tI.ss.ja]=this.headerTextColor,e[tI.ss.xa]=this.frameColor,e[tI.ss.za]=this.buttons,e[tI.ss.ha]=this.cropType,e[tI.ss.va]=this.orientation,e[tI.ss.wa]=this.htmlId,e[tI.ss.CSS]=this.css,e[tI.ss.ts]=t,e[tI.ss.ya]=this.messageExtras,e[tI.ss.LANGUAGE]=this.language,e[tI.ss.ks]=this.altImageText),e}}tI.th={hh:0xff333333,ih:0xffffffff,sh:0xff0073d5,Rh:0xffefefef,Sh:0xff555555,Eh:0xc0333333,eh:0xff9b9b9b},tI.Ye={Mh:"hd",We:"ias",Dh:"of",Ch:"do",dh:"umt",Uh:"tf",bh:"te"},tI.SlideFrom={TOP:"TOP",BOTTOM:"BOTTOM"},tI.ClickAction={URI:"URI",NONE:"NONE"},tI.DismissType={AUTO_DISMISS:"AUTO_DISMISS",MANUAL:"SWIPE"},tI.OpenTarget={NONE:"NONE",BLANK:"BLANK"},tI.ImageStyle={TOP:"TOP",GRAPHIC:"GRAPHIC"},tI.Orientation={PORTRAIT:"PORTRAIT",LANDSCAPE:"LANDSCAPE"},tI.TextAlignment={START:"START",CENTER:"CENTER",END:"END"},tI.CropType={CENTER_CROP:"CENTER_CROP",FIT_CENTER:"FIT_CENTER"},tI.Ke={Kr:"SLIDEUP",Jr:"MODAL",Io:"MODAL_STYLED",Or:"FULL",Hr:"WEB_HTML",Je:"HTML",Ao:"HTML_FULL"},tI.cr=500,tI.Ph=200,tI.uh="ab-show",tI.ah="ab-hide",tI.rh="ab-pause-scrolling",tI.ss={Vr:"m",Wr:"ma",Nh:"sf",xs:"e",Yr:"ti",Zr:"ca",URI:"u",ra:"oa",sa:"dt",ta:"d",ia:"i",ns:"iu",oa:"is",pa:"ic",ma:"ibc",na:"bc",ua:"tc",ca:"cbc",fa:"ai",da:"ao",la:"h",ga:"ha",ja:"htc",xa:"fc",za:"b",ha:"ct",va:"o",wa:"hi",CSS:"css",ts:"type",Po:"messageFields",ya:"me",LANGUAGE:"l",ks:"ia"};class tN extends tI{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||tI.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,void 0,void 0),this.messageFields=h,this.messageFields=h}Bo(){return!1}$t(t){if(this.He===tI.Ke.Hr){if(this.Co)return!1;this.Co=!0}return this.ti.L(t),!0}dt(){let t=super.dt(tN.es);return t[tI.ss.Po]=this.messageFields,t}static Xr(t){return new tN(t[tI.ss.Vr],t[tI.ss.xs],t[tI.ss.Yr],t[tI.ss.sa],t[tI.ss.ta],t[tI.ss.fa],t[tI.ss.da],t[tI.ss.xa],t[tI.ss.wa],t[tI.ss.CSS],t[tI.ss.Po],t[tI.ss.ya])}}tN.es=tI.Ke.Hr;class tA{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||tI.th.sh,this.textColor=i||tI.th.ih,this.borderColor=s||this.backgroundColor,this.clickAction=r||tI.ClickAction.NONE,this.uri=n,null==o&&(o=tA.Hi),this.id=o,this.Co=!1,this.ti=new Y}subscribeToClickedEvent(t){return this.ti.wt(t)}removeSubscription(t){this.ti.removeSubscription(t)}removeAllSubscriptions(){this.ti.removeAllSubscriptions()}$t(){return!this.Co&&(this.Co=!0,this.ti.L(),!0)}static fromJson(t){return new tA(t.text,t.bg_color,t.text_color,t.border_color,t.click_action,t.uri,t.id)}}tA.Hi=-1;class tk extends tI{constructor(t,e,i,s,r,n,o,l,a,u,h,c,d,f,g,p,m,b,v,y,E,w,S,C,_,T,I,N,A,k,O){l=l||tI.DismissType.MANUAL,T=T||tI.Orientation.PORTRAIT,super(t,e,void 0,i,s,r,n,o,l,a,u,h,c,d,f,g,p,m,b,v,y,E,w,S,C,_=_||tI.CropType.CENTER_CROP,T,I,N,A,k,O),this.do=tI.TextAlignment.CENTER}dt(){return super.dt(tk.es)}static Xr(t){return new tk(t[tI.ss.Vr],t[tI.ss.Wr],t[tI.ss.xs],t[tI.ss.Yr],t[tI.ss.Zr],t[tI.ss.URI],t[tI.ss.ra],t[tI.ss.sa],t[tI.ss.ta],t[tI.ss.ia],t[tI.ss.ns],t[tI.ss.oa],t[tI.ss.pa],t[tI.ss.ma],t[tI.ss.na],t[tI.ss.ua],t[tI.ss.ca],t[tI.ss.fa],t[tI.ss.da],t[tI.ss.la],t[tI.ss.ga],t[tI.ss.ja],t[tI.ss.xa],tB(t[tI.ss.za]),t[tI.ss.ha],t[tI.ss.va],t[tI.ss.wa],t[tI.ss.CSS],t[tI.ss.ya],t[tI.ss.LANGUAGE],t[tI.ss.ks])}}tk.es=tI.Ke.Or;class tO extends tI{constructor(t,e,i,s,r,n,o,l,a,u,h,c,d,f,g,p,m,b,v,y,E,w,S,C,_,T,I,N,A,k){super(t,e,void 0,i,s,r,n,o,l=l||tI.DismissType.MANUAL,a,u,h,c,d,f,g,p,m,b,v,y,E,w,S,C,_=_||tI.CropType.FIT_CENTER,void 0,T,I,N,A,k),this.do=tI.TextAlignment.CENTER}dt(){return super.dt(tO.es)}static Xr(t){return new tO(t[tI.ss.Vr],t[tI.ss.Wr],t[tI.ss.xs],t[tI.ss.Yr],t[tI.ss.Zr],t[tI.ss.URI],t[tI.ss.ra],t[tI.ss.sa],t[tI.ss.ta],t[tI.ss.ia],t[tI.ss.ns],t[tI.ss.oa],t[tI.ss.pa],t[tI.ss.ma],t[tI.ss.na],t[tI.ss.ua],t[tI.ss.ca],t[tI.ss.fa],t[tI.ss.da],t[tI.ss.la],t[tI.ss.ga],t[tI.ss.ja],t[tI.ss.xa],tB(t[tI.ss.za]),t[tI.ss.ha],t[tI.ss.wa],t[tI.ss.CSS],t[tI.ss.ya],t[tI.ss.LANGUAGE],t[tI.ss.ks])}}tO.es=tI.Ke.Jr;class tj extends tI{constructor(t,e,i,s,r,n,o,l,a,u,h,c,d,f,g,p,m,b,v,y,E,w,S,C){p=p||tI.th.Sh,g=g||tI.th.Rh,super(t,e=e||tI.TextAlignment.START,i,s,r,n,o,l,a,u,h,c,void 0,d,f,g,p,m,b,v,void 0,void 0,void 0,void 0,void 0,void 0,void 0,y,E,w,S,C),this.do=tI.TextAlignment.START}Ve(){return!1}ho(){let t=document.createElement("span");return t.appendChild(document.createTextNode(this.message||"")),t}Ah(t){let e=t.getElementsByClassName("ab-in-app-message")[0];tC.Mo(e,!0,!0)||(this.slideFrom===tI.SlideFrom.TOP?e.style.top="0px":e.style.bottom="0px"),super.Ah(t)}dt(){return super.dt(tj.es)}static Xr(t){return new tj(t[tI.ss.Vr],t[tI.ss.Wr],t[tI.ss.Nh],t[tI.ss.xs],t[tI.ss.Yr],t[tI.ss.Zr],t[tI.ss.URI],t[tI.ss.ra],t[tI.ss.sa],t[tI.ss.ta],t[tI.ss.ia],t[tI.ss.ns],t[tI.ss.pa],t[tI.ss.ma],t[tI.ss.na],t[tI.ss.ua],t[tI.ss.ca],t[tI.ss.fa],t[tI.ss.da],t[tI.ss.wa],t[tI.ss.CSS],t[tI.ss.ya],t[tI.ss.LANGUAGE],t[tI.ss.ks])}}function tx(t){let e;if(!t)return null;if(t.is_control)return tS.fromJson(t);let s=t.type;null!=s&&(s=s.toUpperCase());let r=t.message,n=t.text_align_message,o=t.slide_from,l=t.extras,a=t.trigger_id,u=t.click_action,h=t.uri,c=t.open_target,d=t.message_close,f=t.duration,g=t.icon,p=t.image_url,m=t.image_style,b=t.icon_color,v=t.icon_bg_color,y=t.bg_color,E=t.text_color,w=t.close_btn_color,S=t.header,C=t.text_align_header,_=t.header_text_color,T=t.frame_color,I=[],N=t.btns;null==N&&(N=[]);for(let t=0;t<N.length;t++)I.push(tA.fromJson(N[t]));let A=t.crop_type,k=t.orientation,O=t.animate_in,j=t.animate_out,x=t.html_id,B=t.css;null!=x&&""!==x&&null!=B&&""!==B||(x=void 0,B=void 0);let L=t.message_extras,R=t.language,D=t.image_alt;if(s===tO.es||s===tI.Ke.Io)e=new tO(r,n,l,a,u,h,c,d,f,g,p,m,b,v,y,E,w,O,j,S,C,_,T,I,A,x,B,L,R,D);else if(s===tk.es)e=new tk(r,n,l,a,u,h,c,d,f,g,p,m,b,v,y,E,w,O,j,S,C,_,T,I,A,k,x,B,L,R,D);else if(s===tj.es)e=new tj(r,n,o,l,a,u,h,c,d,f,g,p,b,v,y,E,w,O,j,x,B,L,R,D);else{if(s!==tN.es&&s!==tI.Ke.Je&&s!==tI.Ke.Ao)return void i.error("Ignoring message with unknown type "+s);(e=new tN(r,l,a,d,f,O,j,T,x,B,t.message_fields,L)).trusted=t.trusted||!1}return e.He=s,e}function tB(t){let e=[];for(let i of t)e.push(new tA(i.text,i.backgroundColor,i.textColor,i.borderColor,i.clickAction,i.uri,i.id));return e}tj.es=tI.Ke.Kr;class tL{constructor(t){this.wc=t,this.wc=t}xc(t){return null==this.wc||this.wc===t[0]}static fromJson(t){return new tL(t?t.event_name:null)}dt(){return this.wc}}class tR{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===tR.XE.QE&&this.comparator!==tR.BE.wE&&this.comparator!==tR.BE.jE&&this.comparator!==tR.BE.zE&&this.comparator!==tR.BE.FE&&(this.LE=c(this.LE))}xc(t){let e=null;switch(null!=t&&(e=t[this.yE]),this.comparator){case tR.BE.kE:return null!=e&&e.valueOf()===this.LE.valueOf();case tR.BE.xE:return null==e||e.valueOf()!==this.LE.valueOf();case tR.BE.JE:return null!=e&&typeof e==typeof this.LE&&e>this.LE;case tR.BE.wE:return this.HE===tR.XE.QE?null!=e&&o(e)&&g(e)<=this.LE.valueOf():null!=e&&typeof e==typeof this.LE&&e>=this.LE;case tR.BE.VE:return null!=e&&typeof e==typeof this.LE&&e<this.LE;case tR.BE.jE:return this.HE===tR.XE.QE?null!=e&&o(e)&&g(e)>=this.LE.valueOf():null!=e&&typeof e==typeof this.LE&&e<=this.LE;case tR.BE.qE:return null!=e&&"string"==typeof e&&typeof e==typeof this.LE&&null!=e.match(this.LE);case tR.BE.PE:return null!=e;case tR.BE.WE:return null==e;case tR.BE.zE:return null!=e&&o(e)&&p(e)<this.LE;case tR.BE.FE:return null!=e&&o(e)&&p(e)>this.LE;case tR.BE.ZE:return null==e||typeof e!=typeof this.LE||"string"!=typeof e||null==e.match(this.LE)}return!1}static fromJson(t){return new tR(t.property_key,t.property_type,t.comparator,t.property_value)}dt(){let t=this.LE;return o(this.LE)&&(t=h(t.valueOf())),{k:this.yE,t:this.HE,c:this.comparator,v:t}}static qn(t){return new tR(t.k,t.t,t.c,t.v)}}tR.XE={$E:"boolean",tT:"number",sT:"string",QE:"date"},tR.BE={kE:1,xE:2,JE:3,wE:4,VE:5,jE:6,qE:10,PE:11,WE:12,zE:15,FE:16,ZE:17};class tD{constructor(t){this.filters=t,this.filters=t}xc(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].xc(t)){r=!0;break}if(!r){e=!1;break}}return e}static fromJson(t){if(null==t||!n(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(tR.fromJson(r[t]));e.push(s)}return new tD(e)}dt(){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].dt());t.push(s)}return t}static qn(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(tR.qn(r[t]));e.push(s)}return new tD(e)}}class tU{constructor(t,e){this.wc=t,this.tf=e,this.wc=t,this.tf=e}xc(t){if(null==this.wc||null==this.tf)return!1;let e=t[0],i=t[1];return e===this.wc&&this.tf.xc(i)}static fromJson(t){return new tU(t?t.event_name:null,t?tD.fromJson(t.property_filters):null)}dt(){return{e:this.wc,pf:this.tf?this.tf.dt():null}}}class t${constructor(t,e){this.if=t,this.rf=e,this.if=t,this.rf=e}xc(t){if(null==this.if)return!1;let e=tM.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 t$(t?t.id:null,t?t.buttons:null)}dt(){return this.if}}class tP{constructor(t){this.productId=t,this.productId=t}xc(t){return null==this.productId||t[0]===this.productId}static fromJson(t){return new tP(t?t.product_id:null)}dt(){return this.productId}}class tq{constructor(t,e){this.productId=t,this.tf=e,this.productId=t,this.tf=e}xc(t){if(null==this.productId||null==this.tf)return!1;let e=t[0],i=t[1];return e===this.productId&&this.tf.xc(i)}static fromJson(t){return new tq(t?t.product_id:null,t?tD.fromJson(t.property_filters):null)}dt(){return{id:this.productId,pf:this.tf?this.tf.dt():null}}}class tF{constructor(t){this.if=t,this.if=t}xc(t){return null==this.if||tM.sf(t[0],this.if)}static fromJson(t){return new tF(t?t.campaign_id:null)}dt(){return this.if}}let tz={OPEN:"open",Rr:"purchase",vr:"push_click",pe:"custom_event",Qr:"iam_click",qs:"test"};t.s(["default",0,tz],344183);class tM{constructor(t,e){this.type=t,this.data=e,this.type=t,this.data=e}kc(t,e){return tM._c[this.type]===t&&(null==this.data||this.data.xc(e))}static sf(t,e){let s=null;try{s=window.atob(t)}catch(e){return i.info("Failed to unencode analytics id "+t+": "+v(e)),!1}return e===s.split("_")[0]}static fromJson(t){let e=t.type,i=null;switch(e){case tM._r.OPEN:case tM._r.qs:break;case tM._r.Rr:i=tP.fromJson(t.data);break;case tM._r.bc:i=tq.fromJson(t.data);break;case tM._r.vr:i=tF.fromJson(t.data);break;case tM._r.pe:i=tL.fromJson(t.data);break;case tM._r.Ec:i=tU.fromJson(t.data);break;case tM._r.Qr:i=t$.fromJson(t.data)}return new tM(e,i)}
2dt(){return{t:this.type,d:this.data?this.data.dt():null}}static qn(t){let e,i=null;switch(t.t){case tM._r.OPEN:case tM._r.qs:break;case tM._r.Rr:i=new tP(t.d);break;case tM._r.bc:i=new tq((e=t.d||{}).id,tD.qn(e.pf||[]));break;case tM._r.vr:i=new tF(t.d);break;case tM._r.pe:i=new tL(t.d);break;case tM._r.Ec:i=new tU((e=t.d||{}).e,tD.qn(e.pf||[]));break;case tM._r.Qr:i=new t$(t.d)}return new tM(t.t,i)}}tM._r={OPEN:"open",Rr:"purchase",bc:"purchase_property",vr:"push_click",pe:"custom_event",Ec:"custom_event_property",Qr:"iam_click",qs:"test"},tM._c={},tM._c[tM._r.OPEN]=tz.OPEN,tM._c[tM._r.Rr]=tz.Rr,tM._c[tM._r.bc]=tz.Rr,tM._c[tM._r.vr]=tz.vr,tM._c[tM._r.pe]=tz.pe,tM._c[tM._r.Ec]=tz.pe,tM._c[tM._r.Qr]=tz.Qr,tM._c[tM._r.qs]=tz.qs;class tJ{constructor(t,e=[],i,s,r=0,n,o,l=0,a=tJ.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.Gr=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.Gr=u,this.data=o,null!=a&&(this.rd=a),this.hd=h,this.od=c||null}nd(t){return null==this.od||this.rd!==tJ.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,s=null==t||isNaN(e)||null==this.Gr||e<this.Gr;return s||i.info(`Trigger action ${this.type} is no longer eligible for display - fired ${e}ms ago and has a timeout of ${this.Gr}ms.`),!s}static fromJson(t){let e=t.id,i=[];for(let e=0;e<t.trigger_condition.length;e++)i.push(tM.fromJson(t.trigger_condition[e]));let s=c(t.start_time),n=c(t.end_time),o=t.priority,l=t.type,a=t.delay,u=t.re_eligibility,h=t.timeout,d=t.data,f=t.min_seconds_since_last_trigger;return r(tJ._r,l,"Could not construct Trigger from server data","Trigger.Types")?new tJ(e,i,s,n,o,l,d,a,u,h,f):null}dt(){let t=[];for(let e=0;e<this.sd.length;e++)t.push(this.sd[e].dt());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.Gr,ss:this.hd,ld:this.od}}static qn(t){let e=[],i=t.c||[];for(let t=0;t<i.length;t++)e.push(tM.qn(i[t]));return new tJ(t.i,e,f(t.s),f(t.e),t.p,t.t,t.da,t.d,t.r,t.tm,t.ss,t.ld)}}tJ._r={Br:"inapp",md:"templated_iam"},tJ.td=-1;class tG{constructor(t,e,i,s){this.B=t,this.C=e,this.j=i,this.Cs=s,this.B=t,this.C=e,this.j=i,this.Cs=s,this.yi=new Y,t0.q(this.yi),this.Mi=1e3,this.ki=6e4,this.zi=null,this.Bi=null,this.Ri=null}_i(){return this.yi}qi(t){return this.yi.wt(t)}xi(){return this.zi}Pi(t){this.zi=t}rt(t,e,s,r){let n,o=new ta;if("si"===e||t instanceof tS){if(!t.Qt())return i.info("This in-app message has already received an impression. Ignoring analytics event."),o}else if(("sc"===e||t instanceof tN&&"sbc"===e)&&!t.$t(r))return i.info("This in-app message has already received a click. Ignoring analytics event."),o;return null==(n=t instanceof tS?{trigger_ids:[t.triggerId]}:this.Oi(t))?o:(t.messageExtras&&(n.message_extras=t.messageExtras),null!=s&&(n.bid=s),tu(e,n))}Xi(t,e){let s=new ta;if(!t.$t())return i.info("This in-app message button has already received a click. Ignoring analytics event."),s;let r=this.Oi(e);return null==r?s:t.id===tA.Hi?(i.info("This in-app message button does not have a tracking id. Not logging event to Braze servers."),s):(null!=t.id&&(r.bid=t.id),tu("sbc",r))}Ji(t){let e=t.messageFields;return null!=e&&e.is_push_primer||!1}Ki(t){let e;if(!(t instanceof tI))return;let s=t=>{if(!t)return;let e=function(t){try{let e=t.match(B),s=e?e[0].length:null,r=s?t.substring(s):null;if(null==s||s>t.length-1||!r)return void i.error(`Did not find base64 encoded brazeAction in url to process : ${t}`);let n=w(r);return n?JSON.parse(n):void i.error(`Failed to decode base64 encoded brazeAction: ${r}`)}catch(e){return void i.error(`Failed to process brazeAction URL ${t} : ${v(e)}`)}}(t);if(function t(e){try{if(null==e)return!0;let i=e[C];return i===S.io?N(t,e[_]):!z(i)}catch(t){return!0}}(e))return I==I?"In-App Message contains an unknown braze action type and will not be displayed.":"";if(function t(e){if(!e||!F(e))return!1;let i=e[C];return i===S.io?N(t,e[_]):i===S.requestPushPermission}(e)){let t=tm.Qi();if(!t.Ui)return tm.Vi(t.reason,"In-App Message")}};if(this.Ji(t)){let t=tm.Qi();if(!t.Ui)return tm.Vi(t.reason,"In-App Message")}for(let i of t.buttons||[])if(i.clickAction===tI.ClickAction.URI&&i.uri&&B.test(i.uri)&&(e=s(i.uri)))return e;return t.clickAction===tI.ClickAction.URI&&t.uri&&B.test(t.uri)?s(t.uri):void 0}Wi(t,e){e!==this.Ri&&this.Yi(),this.Bi=t,this.Ri=e}Yi(){null!=this.Bi&&(clearTimeout(this.Bi),this.Bi=null,this.Ri=null)}Zi(t,e,s,r){let n=this.B;if(!n)return;this.Ri&&t.triggerId!==this.Ri&&(this.Yi(),tc.Ci(this.j,tc.H.Ir));let o=n.Mr(!1),l=n.$(o);l.template={trigger_id:t.triggerId,trigger_event_type:e},null!=s&&(l.template.data=s.Ar());let a=n.A(l,tc.H.Ir);n.J(l,(n=-1)=>{let o=this.B;if(!o)return;let u=new Date().valueOf();tc.K(this.j,tc.H.Ir,u),-1!==n&&a.push(["X-Braze-Req-Tokens-Remaining",n.toString()]);let h,c,d=!1;tf.O({url:`${o.V()}/template/`,data:l,headers:a,W:e=>{if(!o.Y(l,e,a))return void("function"==typeof t.Tr&&t.Tr());if(o.Z(),null==e||null==e.templated_message)return;let s=e.templated_message;if(s.type!==tJ._r.Br)return;let r=tx(s.data);if(null==r)return;let n=this.Ki(r);n?(i.error(n),"function"==typeof t.Tr&&t.Tr()):"function"==typeof t.qr&&t.qr(r)},error:e=>{d=!0,h=e,c=`getting user personalization for message ${t.triggerId}.`},tt:(i,n)=>{if(new Date().valueOf()-t.Er<t.Gr){let i=0;if(d){let e=Math.min(t.Gr,this.ki),s=this.Mi;null==r&&(r=s),i=Math.min(e,tp(s,3*r))}
2o.st(n,()=>{this.Zi(t,e,s,i)},tc.H.Ir,e=>this.Wi(e,t.triggerId),()=>this.Yi(),i)}d&&o._(h,c)}})},tc.H.Ir)}Oi(t){if(null==t.triggerId)return i.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}Ee(t){return!!this.j&&!(!(t&&t instanceof tI&&t.constructor!==tI)||t instanceof tS)&&this.j.ft(X.ct.Nr,t.dt())}zr(){let t;if(!this.j)return null;let e=this.j.lt(X.ct.Nr);if(!e)return null;switch(e.type){case tI.Ke.Or:t=tk.Xr(e);break;case tI.Ke.Hr:case tI.Ke.Je:case tI.Ke.Ao:t=tN.Xr(e);break;case tI.Ke.Jr:case tI.Ke.Io:t=tO.Xr(e);break;case tI.Ke.Kr:t=tj.Xr(e)}return t&&this.Lr(),t}Lr(){this.j&&this.j.Nt(X.ct.Nr)}}let tW={aa:null,i:!1,ea:()=>(tW.t(),tW.aa||(tW.aa=new tG(t0.m(),t0.u(),t0.p(),t0.ir())),tW.aa),t:()=>{tW.i||(t0.g(tW),tW.i=!0)},destroy:()=>{tW.aa=null,tW.i=!1}};class tK{constructor(t,e,i,s,r){this.triggerId=t,this.qr=e,this.Tr=i,this.Er=s,this.Gr=r,this.triggerId=t,this.qr=e,this.Tr=i,this.Er=s,this.Gr=r}static fromJson(t,e,i,s,r){return null==t||null==t.trigger_id?null:new tK(t.trigger_id,e,i,s,r)}}class tV extends ti{constructor(t,e,i,s,r){super(),this.tg=t,this.ws=e,this.j=i,this.Cn=s,this.ig=r,this.tg=t,this.ws=e,this.j=i,this.Cn=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.j){this.hg=this.j.lt(X.ct.iE)||this.hg,this.ng=this.j.lt(X.ct.EE)||this.ng,this.og=this.j.lt(X.ct.aE)||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.j)return;this.lg=this.j.lt(X.ct.nE)||0;let t=this.j.lt(X.ct.oE)||[],e=[];for(let i=0;i<t.length;i++)e.push(tJ.qn(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],o=[];for(let s=0;s<t.length;s++){let l=t[s],a=r.ud(l.Er||0);if(a>0){let t,s;o.push(l),null!=l.ug&&(t=l.ug),null!=l.dg&&m.gE(l.dg)&&(s=m.qn(l.dg));let u=[];if(l.pg&&n(l.pg))for(let t=0;t<l.pg.length;t++){let e=i[l.pg[t]];null!=e&&u.push(e)}this.eg.push(window.setTimeout(e(r,l.Er||0,t,s,u),a))}}this.ng[r.id].length>o.length&&(this.ng[r.id]=o,s=!0,0===this.ng[r.id].length&&delete this.ng[r.id])}}s&&this.j&&this.j.ft(X.ct.EE,this.ng)}mg(){if(!this.j)return;let t=[];for(let e=0;e<this.triggers.length;e++)t.push(this.triggers[e].dt());this.lg=new Date().valueOf(),this.j.ft(X.ct.oE,t),this.j.ft(X.ct.nE,this.lg)}bg(){this.j&&((this.j.lt(X.ct.nE)||0)>this.lg?this.ag():this.fg())}N(t){let e=!1;if(null!=t&&t.triggers){let s;this.ig.Lr(),this.fg();let r={},n={};this.triggers=[];for(let i=0;i<t.triggers.length;i++){let s=tJ.fromJson(t.triggers[i]);if(s){s.id&&null!=this.og[s.id]&&(s.ad(this.og[s.id]),r[s.id]=this.og[s.id]),s.id&&null!=this.ng[s.id]&&(n[s.id]=this.ng[s.id]);for(let t=0;t<s.sd.length;t++)if(s.sd[t].kc(tz.qs,null)){e=!0;break}this.triggers.push(s)}}u(this.og,r)||(this.og=r,this.j&&this.j.ft(X.ct.aE,this.og)),u(this.ng,n)||(this.ng=n,this.j&&this.j.ft(X.ct.EE,this.ng)),this.mg(),e&&(i.info("Trigger with test condition found, firing test."),this.ve(tz.qs)),this.ve(tz.OPEN);let o=this.sg;this.sg=[];for(let t=0;t<o.length;t++)s=Array.prototype.slice.call(o[t]),this.ve(...s)}}cg(t,e,s,r,n){let o,l,a,u=r=>{this.fg();let n=new Date().valueOf();t.dd(e)||(!1===navigator.onLine&&t.type===tJ._r.Br&&r.imageUrl?i.info(`Not showing ${t.type} trigger action ${t.id} due to offline state.`):t.nd(n)&&this.wg(t,n,s)?0===this.ws.sc()?i.info(`Not displaying trigger ${t.id} because neither automaticallyShowInAppMessages() nor subscribeToInAppMessage() were called.`):(this.ws.L([r]),this.yg(t,n)):i.info(`Not displaying trigger ${t.id} because display time fell outside of the acceptable time window.`))},h=()=>{this.fg();let o=n.pop();if(null!=o)if(this.Tg(o,e,s,r,n),o.dd(e)){let t=`Server aborted in-app message display, but the timeout on fallback trigger ${o.id} has already elapsed.`;n.length>0&&(t+=" Continuing to fall back."),i.info(t),h()}else{i.info(`Server aborted in-app message display. Falling back to lower priority ${o.type} trigger action ${t.id}.`);let l=1e3*o.ed-(new Date().valueOf()-e);l>0?this.eg.push(window.setTimeout(()=>{this.cg(o,e,s,r,n)},l)):this.cg(o,e,s,r,n)}};switch(t.type){case tJ._r.Br:if(null==(o=tx(t.data))){i.error(`Could not parse trigger data for trigger ${t.id}, ignoring.`);break}if(l=this.ig.Ki(o)){i.error(l),h();break}u(o);break;case tJ._r.md:if(null==(a=tK.fromJson(t.data,u,h,e,t.Gr||0))){i.error(`Could not parse trigger data for trigger ${t.id}, ignoring.`);break}this.ig.Zi(a,s,r);break;default:i.error(`Trigger ${t.id} was of unexpected type ${t.type}, ignoring.`)}}ve(t,e=null,s){if(!r(tz,t,"Cannot fire trigger action.","TriggerEvents"))return;if(this.Cn&&this.Cn.Yl())return i.info("Trigger sync is currently in progress, awaiting sync completion before firing trigger event."),void this.sg.push(arguments);this.bg();let n=new Date().valueOf(),o=n-(this.hg||0),l=!0,a=!0,u=[];for(let i=0;i<this.triggers.length;i++){let s=this.triggers[i],r=n+1e3*s.ed;if(s.nd(r)&&(null==s.startTime||s.startTime.valueOf()<=n)&&(null==s.endTime||s.endTime.valueOf()>=n)){let i=!1;for(let r=0;r<s.sd.length;r++)if(s.sd[r].kc(t,e)){i=!0;break}i&&(l=!1,this.wg(s,r,t)&&(a=!1,u.push(s)))}}if(l)return void i.info(`Trigger event ${t} did not match any trigger conditions.`);if(a)return void i.info(`Ignoring ${t} trigger event because a trigger was displayed ${o/1e3}s ago.`);u.sort((t,e)=>t.priority-e.priority);let h=u.pop();null!=h&&(i.info(`Firing ${h.type} trigger action ${h.id} from trigger event ${t}.`),this.Tg(h,n,t,s,u),0===h.ed?this.cg(h,n,t,s,u):this.eg.push(window.setTimeout(()=>{this.cg(h,n,t,s,u)},1e3*h.ed)))}changeUser(t=!1){if(this.triggers=[],this.j&&this.j.Nt(X.ct.oE),!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.j&&(this.j.Nt(X.ct.iE),this.j.Nt(X.ct.aE),this.j.Nt(X.ct.EE))}}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,s){if(null==this.hg)return!0;
2if(s===tz.qs)return i.info("Ignoring minimum interval between trigger because it is a test type."),!0;let r=t.hd;return null==r&&(r=this.tg),e-this.hg>=1e3*r}Tg(t,e,i,s,r){let n;this.fg(),t.id&&(this.ng[t.id]=this.ng[t.id]||[]);let o={};o.Er=e,o.ug=i,null!=s&&(n=s.dt()),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.j&&this.j.ft(X.ct.EE,this.ng)}yg(t,e){this.fg(),t.ad(e),this.hg=e,t.id&&(this.og[t.id]=e),this.j&&(this.j.ft(X.ct.iE,e),this.j.ft(X.ct.aE,this.og))}}let tH={i:!1,provider:null,o:()=>(tH.t(),tH.provider||tH.rg(),tH.provider),rg:()=>{if(!tH.provider){let t=t0.ee(tY.Zo);tH.provider=new tV(null!=t?t:30,tW.ea()._i(),t0.p(),t0.nn(),tW.ea()),t0.v(tH.provider)}},t:()=>{tH.i||(tH.rg(),t0.g(tH),tH.i=!0)},destroy:()=>{tH.provider=null,tH.i=!1}};class tQ{constructor(t,e,i,s,r){this.endpoint=t,this.Vn=e,this.publicKey=i,this.Vl=s,this.dl=r,this.endpoint=t||null,this.Vn=e||null,this.publicKey=i||null,this.Vl=s||null,this.dl=r||null}dt(){return{e:this.endpoint,c:this.Vn,p:this.publicKey,u:this.Vl,v:this.dl}}static qn(t){return new tQ(t.e,f(t.c),t.p,t.u,t.v)}}t.s(["default",0,tQ],767762);class tX{constructor(t,e){this.h=t,this.j=e,this.h=t,this.j=e}getUserId(){let t=this.j.tu(X.iu.su);if(null==t)return null;let e=t.eu,i=E(e);if(i>M.mr){for(;i>M.mr;)i=E(e=e.slice(0,e.length-1));t.eu=e,this.j.uu(X.iu.su,t)}return e}ou(t){let e=null==this.getUserId();this.j.uu(X.iu.su,new y(t)),e&&this.j.ru(t)}setCustomUserAttribute(t,e){if(this.h.hu(t))return i.info('Custom Attribute "'+t+'" is blocklisted, ignoring.'),!1;let s={};return s[t]=e,this.nu(M.lu,s,!0)}nu(t,e,s=!1,r=!1){let n=this.j.mu(this.getUserId(),t,e),o="",l=t,a=e;return s&&(o=" custom","object"==typeof e&&(l=Object.keys(e)[0],"object"==typeof(a=e[l])&&(a=JSON.stringify(a,null,2)))),!r&&n&&i.info(`Logged${o} attribute ${l} with value ${a}`),n}Pn(t,e,s,r,n){this.nu("push_token",t,!1,!0),this.nu("custom_push_public_key",s,!1,!0),this.nu("custom_push_user_auth",r,!1,!0),this.nu("custom_push_vapid_public_key",n,!1,!0);let o=tt.Us.Rs,l=new tt(o,i),a=new tQ(t,e,s,r,n);this.j.ft(X.ct.In,a.dt()),l.setItem(o.Fs.cu,o.me,!0)}Sn(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=tt.Us.Rs,e=new tt(t,i);this.j.ft(X.ct.In,!1),e.setItem(t.Fs.cu,t.me,!1)}}}let tZ={_o:"allowCrawlerActivity",Ro:"baseUrl",Wo:"noCookies",Vo:"devicePropertyAllowlist",Aa:"disablePushTokenMaintenance",Yo:"enableLogging",Xo:"enableSdkAuthentication",qa:"manageServiceWorkerExternally",Zo:"minimumIntervalBetweenTriggerActionsInSeconds",Wh:"sessionTimeoutInSeconds",Vh:"appVersion",Kh:"appVersionNumber",Ma:"serviceWorkerLocation",ka:"safariWebsitePushId",Xn:"localization",er:"contentSecurityNonce",re:"allowUserSuppliedJavascript",Jo:"inAppMessageZIndex",Do:"openInAppMessagesInNewTab",Lh:"requireExplicitInAppMessageDismissal",$h:"doNotLoadFontAwesome",Jh:"deviceId",_a:"serviceWorkerScope",Yh:"sdkFlavor",tn:"openCardsInNewTab"},tY={_o:"allowCrawlerActivity",Ro:"baseUrl",Wo:"noCookies",Vo:"devicePropertyAllowlist",Aa:"disablePushTokenMaintenance",Yo:"enableLogging",Xo:"enableSdkAuthentication",qa:"manageServiceWorkerExternally",Zo:"minimumIntervalBetweenTriggerActionsInSeconds",Wh:"sessionTimeoutInSeconds",Vh:"appVersion",Kh:"appVersionNumber",Ma:"serviceWorkerLocation",ka:"safariWebsitePushId",Xn:"localization",er:"contentSecurityNonce",re:"allowUserSuppliedJavascript",Jo:"inAppMessageZIndex",Do:"openInAppMessagesInNewTab",tn:"openCardsInNewTab",Lh:"requireExplicitInAppMessageDismissal",$h:"doNotLoadFontAwesome",Jh:"deviceId",_a:"serviceWorkerScope",Yh:"sdkFlavor"},t0=new class{constructor(){this.sn="",this.Xh="",this.Zh=void 0,this.Qh=null,this.on=null,this.B=null,this.Cn=null,this.h=null,this.C=null,this.j=null,this.Cs=null,this.Ea="",this.isInitialized=!1,this.Ia=!1,this.Sa=new Y,this.Na=new Y,this.options={},this.Oa=[],this.Ta=[],this.yi=[],this.Xh="6.3.0"}Ra(t){this.Sa.wt(t)}mh(t){this.Na.wt(t)}initialize(e,o){if(this.ao())return i.info("Braze has already been initialized with an API key."),!0;this.options=o||{};let l=this.ee(tY.Yo),u=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}(window.location.href);if(u&&"true"===u.brazeLogging&&(l=!0),i.init(l),i.info(`Initialization Options: ${JSON.stringify(this.options,null,2)}`),null==e||""===e||"string"!=typeof e)return i.error("Braze requires a valid API key to be initialized."),!1;this.sn=e;let h=this.ee(tY.Ro);if(null==h||""===h||"string"!=typeof h)return i.error("Braze requires a valid baseUrl to be initialized."),!1;!1===/^https?:/.test(h)&&(h=`https://${h}`);let c=h;if((h=document.createElement("a")).href=c,"/"===h.pathname&&(h=`${h}api/v3`),this.Ea=h.toString(),Q.Pa&&!this.ee(tY._o))return i.info("Ignoring activity from crawler bot "+navigator.userAgent),this.Ia=!0,!1;let d=this.ee(tY.Wo)||!1;if(this.j=tw.La(e,d),d&&this.j.Da(e),new Z.ne(null,!0).br(X.ie))return i.info("Ignoring all activity due to previous opt out"),this.Ia=!0,!1;for(let t of a(this.options))-1===s(tZ).indexOf(t)&&i.warn(`Ignoring unknown initialization option '${t}'.`);if(null!=this.ee(tY.Yh)){let t=this.ee(tY.Yh);-1!==["mparticle","wordpress","tealium"].indexOf(t)?this.Zh=t:i.error("Invalid sdk flavor passed: "+t)}let f=this.ee(tZ.Vo);if(null!=f)if(n(f)){let t=[];for(let e=0;e<f.length;
2e++)r(tr,f[e],"devicePropertyAllowlist contained an invalid value.","DeviceProperties")&&t.push(f[e]);f=t}else i.error("devicePropertyAllowlist must be an array. Defaulting to all properties."),f=null;let g=this.ee(tY.Jh);if(g){let t=new y(g);this.j.uu(X.iu.Jh,t)}this.on=new tn(this.j,f),this.h=new ty(this.j),this.Cs=new tX(this.h,this.j),this.C=new tE(this.j,this.Cs,this.h,this.ee(tY.Wh));let p=new Y;return this.Qh=new te(this.j,this.ee(tY.Xo),p),this.q(p),this.B=new tg(this.on,this.j,this.Qh,this.Cs,this.C,this.h,this.sn,this.Ea,this.Xh,this.Zh||"",this.ee(tY.Vh),this.ee(tY.Kh)),this.Cn=new tb(this.sn,this.Ea,this.C,this.on,this.Cs,this.h,this.j,t=>{if(this.ao())for(let e of this.lr())e.N(t)},this.Qh,this.B),this.Cn.initialize(),d||this.j.Ua(),i.info(`Initialized for the Braze backend at "${this.ee(tY.Ro)}" with API key "${this.sn}".`),tH.t(),this.h.Ue(()=>{var e;this.isInitialized&&(null==(e=this.h)?void 0:e.Re())&&t.A(884419).then(t=>{this.isInitialized&&(0,t.default)()})}),this.Cn.rn(()=>{var e;this.isInitialized&&(null==(e=this.h)?void 0:e.Re())&&t.A(884419).then(t=>{this.isInitialized&&(0,t.default)(void 0,void 0,!0)})}),this.Sa.L(this.options),this.isInitialized=!0,window.dispatchEvent(new CustomEvent("braze.initialized")),!0}destroy(t){if(i.destroy(),this.ao()){for(let t of(this.Na.L(),this.Na.removeAllSubscriptions(),this.Oa))t.destroy();for(let t of(this.Oa=[],this.Ta))t.clearData(!1);this.B&&this.B.fo(),this.Ta=[],this.removeAllSubscriptions(),this.yi=[],null!=this.Cn&&this.Cn.destroy(),this.Cn=null,this.Qh=null,this.on=null,this.B=null,this.h=null,this.C=null,this.Cs=null,this.options={},this.Zh=void 0,this.isInitialized=!1,this.Ia=!1,t&&(this.j=null)}}rr(){return!this.Wa()&&(!!this.ao()||(console.warn("Braze must be initialized before calling methods."),!1))}ba(){return this.sn}Sr(){return this.Qh}V(){return this.Ea}de(){return this.on}m(){return this.B}ee(t){return this.options[t]}lr(){return this.Ta}nn(){return this.Cn}l(){return this.h}u(){return this.C}p(){return this.j}gr(){if(this.Cs&&this.Cn)return new M(this.Cs,this.Cn)}ir(){return this.Cs}tr(){return!0===this.ee(tY.re)}g(t){let e=!1;for(let i of this.Oa)i===t&&(e=!0);e||this.Oa.push(t)}v(t){let e=!1;for(let i of this.Ta)i.constructor===t.constructor&&(e=!0);t instanceof ti&&!e&&this.Ta.push(t)}q(t){t instanceof Y&&this.yi.push(t)}removeAllSubscriptions(){if(this.rr())for(let t of this.yi)t.removeAllSubscriptions()}removeSubscription(t){if(this.rr())for(let e of this.yi)e.removeSubscription(t)}ce(t){this.Ia=t}ao(){return this.isInitialized}Wa(){return this.Ia}Vs(){return this.Xh}}}]);
3
4//# debugId=48ea6981-f105-2d4f-0884-22a246e2601e

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.