New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@braze/web-sdk

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@braze/web-sdk - npm Package Compare versions

Comparing version 5.6.1 to 5.7.0

2

package.json
{
"name": "@braze/web-sdk",
"version": "5.6.1",
"version": "5.7.0",
"description": "Braze SDK for web sites and other JS platforms.",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -11,3 +11,3 @@ # Braze Web SDK

(c) Braze, Inc. 2024 - http://braze.com
(c) Braze, Inc. 2025 - http://braze.com
License available at https://github.com/braze-inc/braze-web-sdk/blob/master/LICENSE
const ei = {
Jn: function (t) {
On: function (t) {
const r = (t + "=".repeat((4 - (t.length % 4)) % 4))

@@ -4,0 +4,0 @@ .replace(/\-/g, "+")

const d = {
CustomEvent: "ce",
Pr: "p",
mc: "pc",
Cc: "ca",
gc: "pc",
Ac: "ca",
Mu: "i",
Li: "ie",
Tu: "ie",
xt: "cci",

@@ -12,26 +12,26 @@ $t: "ccic",

dt: "ccd",
Jl: "ss",
Kl: "ss",
Gl: "se",
Nr: "si",
Cr: "sc",
Or: "sbc",
yc: "sfe",
Ir: "si",
Mr: "sc",
Tr: "sbc",
Mc: "sfe",
zo: "iec",
dc: "lr",
cc: "uae",
fc: "lr",
mc: "uae",
yt: "ci",
ut: "cc",
vc: "lcaa",
gc: "lcar",
fu: "inc",
pu: "add",
bu: "rem",
au: "set",
du: "ncam",
bc: "sgu",
wc: "lcaa",
bc: "lcar",
Xn: "inc",
Jn: "add",
Qn: "rem",
Hn: "set",
Kn: "ncam",
kc: "sgu",
yr: "ffi",
ro: "bi",
fs: "bc",
ds: "bc",
},
dr = { Fr: "feed_displayed", Mc: "content_cards_displayed" };
dr = { Fr: "feed_displayed", Sc: "content_cards_displayed" };
export { d as EventTypes, dr as InternalEventTypes };

@@ -1,2 +0,2 @@

export default class it {
export default class tt {
constructor(t, e) {

@@ -67,7 +67,7 @@ (this.database = t),

const n = null === (e = t.target) || void 0 === e ? void 0 : e.result;
for (const t in i.database.Os) {
for (const t in i.database.Ks) {
const e = t;
i.database.Os.hasOwnProperty(t) &&
!n.objectStoreNames.contains(i.database.Os[e]) &&
n.createObjectStore(i.database.Os[e]);
i.database.Ks.hasOwnProperty(t) &&
!n.objectStoreNames.contains(i.database.Ks[e]) &&
n.createObjectStore(i.database.Ks[e]);
}

@@ -253,3 +253,3 @@ }),

}
Hs(t, e) {
Gs(t, e) {
if (!this.isSupported()) return !1;

@@ -309,7 +309,7 @@ const n = this;

const t = [];
for (const e in this.database.Os) {
for (const e in this.database.Ks) {
const n = e;
this.database.Os.hasOwnProperty(e) &&
this.database.Os[n] !== this.database.Os.ie &&
t.push(this.database.Os[n]);
this.database.Ks.hasOwnProperty(e) &&
this.database.Ks[n] !== this.database.Ks.ie &&
t.push(this.database.Ks[n]);
}

@@ -339,12 +339,12 @@ const e = this;

}
it.Gs = {
_s: {
tt._s = {
Xs: {
Sd: "AppboyServiceWorkerAsyncStorage",
VERSION: 6,
Os: {
Xu: "data",
Ks: {
zu: "data",
hr: "pushClicks",
cu: "pushSubscribed",
Cd: "fallbackDevice",
Ks: "cardUpdates",
Hs: "cardUpdates",
ie: "optOut",

@@ -351,0 +351,0 @@ $r: "pendingData",

@@ -27,3 +27,3 @@ const N = {

if (N.zg) {
const o = "Braze SDK Warning: " + n + " (v5.6.1)";
const o = "Braze SDK Warning: " + n + " (v5.7.0)";
null != N.vd ? N.vd(o) : console.warn(o);

@@ -34,3 +34,3 @@ }

if (N.zg) {
const o = "Braze SDK Error: " + n + " (v5.6.1)";
const o = "Braze SDK Error: " + n + " (v5.7.0)";
null != N.vd ? N.vd(o) : console.error(o);

@@ -37,0 +37,0 @@ }

export default {
Oo: "allowCrawlerActivity",
Ro: "baseUrl",
Lo: "noCookies",
Wo: "devicePropertyAllowlist",
Wo: "baseUrl",
Vo: "noCookies",
Ko: "devicePropertyAllowlist",
Da: "disablePushTokenMaintenance",
Vo: "enableLogging",
Ko: "enableSdkAuthentication",
Yo: "enableLogging",
Ho: "enableSdkAuthentication",
Ca: "manageServiceWorkerExternally",
Go: "minimumIntervalBetweenTriggerActionsInSeconds",
Yo: "sessionTimeoutInSeconds",
Ho: "appVersion",
Xo: "appVersionNumber",
Xo: "minimumIntervalBetweenTriggerActionsInSeconds",
Zo: "sessionTimeoutInSeconds",
Qo: "appVersion",
Wh: "appVersionNumber",
_a: "serviceWorkerLocation",

@@ -19,11 +19,11 @@ Ba: "safariWebsitePushId",

er: "allowUserSuppliedJavascript",
Jo: "inAppMessageZIndex",
Do: "openInAppMessagesInNewTab",
Do: "inAppMessageZIndex",
To: "openInAppMessagesInNewTab",
en: "openNewsFeedCardsInNewTab",
mh: "requireExplicitInAppMessageDismissal",
Zo: "doNotLoadFontAwesome",
Qo: "deviceId",
Vh: "doNotLoadFontAwesome",
$h: "deviceId",
Aa: "serviceWorkerScope",
Wh: "sdkFlavor",
Yh: "sdkFlavor",
tn: "openCardsInNewTab",
};

@@ -71,29 +71,36 @@ import s from "../common/base-provider.js";

u,
(n = -1) => {
if (!this.S) return void r();
(e = -1) => {
const n = this.S;
if (!n) return void r();
const o = new Date().valueOf();
h.W(this.C, h.O.K, o),
-1 !== n && d.push(["X-Braze-Req-Tokens-Remaining", n.toString()]),
-1 !== e && d.push(["X-Braze-Req-Tokens-Remaining", e.toString()]),
l.Y({
url: `${this.S.Z()}/banners/sync`,
url: `${n.Z()}/banners/sync`,
headers: d,
data: u,
ss: (s) => {
if (!this.S.ts(u, s, d)) return (m = !0), void r();
this.S.es(),
this.U(s),
(m = !1),
h.ns(this.C, h.O.K, 1),
"function" == typeof t && t();
if (!n.ts(u, s, d)) return (m = !0), void r();
n.es(), this.U(s), (m = !1), "function" == typeof t && t();
},
error: (s) => {
this.S.rs(s, "retrieving banners"), (m = !0), r();
n.ns(s, "retrieving banners"), (m = !0), r();
},
os: () => {
if (((this.D = s), e && m && !this.q)) {
h.hs(this.C, h.O.K);
let e = this.I;
(null == e || e < 1e3 * this.R) && (e = 1e3 * this.R),
this.ls(s, t, i, Math.min(3e5, a(1e3 * this.R, 3 * e)));
rs: (e, r) => {
let o;
if (((this.D = s), m)) {
let s = this.I;
(null == s || s < 1e3 * this.R) && (s = 1e3 * this.R),
(o = Math.min(3e5, a(1e3 * this.R, 3 * s)));
}
n.os(
r,
() => {
this.$(s, t, i, !1);
},
h.O.K,
(s) => this.hs(s),
() => this.G(),
o,
);
},

@@ -106,9 +113,9 @@ });

}
us() {
ls() {
return this.D;
}
cs(s, t) {
us(s, t) {
const i = { id: s.id };
t && (i.bid = t);
return c.ds(d.fs, i).ss;
return c.cs(d.ds, i).ss;
}

@@ -118,12 +125,8 @@ G() {

}
ls(s, t, i, e = 1e3 * this.R) {
this.G(),
(this.q = window.setTimeout(() => {
this.$(s, t, i);
}, e)),
(this.I = e);
hs(s) {
this.G(), (this.q = s);
}
vs() {
fs() {
let s = {};
this.C && (s = this.C.ps(t.bs.gs));
this.C && (s = this.C.vs(t.gs.ps));
const i = {};

@@ -142,61 +145,61 @@ for (const t in s) {

const e =
(null === (s = this.banners[t]) || void 0 === s ? void 0 : s.Bs()) ||
(null === (s = this.banners[t]) || void 0 === s ? void 0 : s.bs()) ||
null;
i[t] = e;
}
this.C.js(t.bs.gs, i), this.ws();
this.C.Bs(t.gs.ps, i), this.js();
}
ws() {
js() {
var s, i;
null === (s = this.C) ||
void 0 === s ||
s.js(t.bs.ys, null === (i = this.T) || void 0 === i ? void 0 : i.Ss());
s.Bs(t.gs.ys, null === (i = this.T) || void 0 === i ? void 0 : i.Ss());
}
Cs() {
ws() {
var s;
return (
(null === (s = this.C) || void 0 === s ? void 0 : s.ps(t.bs.ys)) || null
(null === (s = this.C) || void 0 === s ? void 0 : s.vs(t.gs.ys)) || null
);
}
Ts() {
Cs() {
return this.k;
}
Rs(s) {
Ts(s) {
this.k = s;
}
Is() {
Rs() {
var s;
const t = null === (s = this.T) || void 0 === s ? void 0 : s.Ss(),
i = this.Cs();
i = this.ws();
return null != i && t === i;
}
qs() {
Is() {
var s;
const t = null === (s = this.T) || void 0 === s ? void 0 : s.Ss(),
i = this.Cs();
i = this.ws();
return null == i || t === i;
}
Fs(s) {
return this.F.Ns(s);
qs(s) {
return this.F.Fs(s);
}
ks() {
Ns() {
var s;
return (
(null === (s = this.C) || void 0 === s ? void 0 : s.ps(t.bs.xs)) || {}
(null === (s = this.C) || void 0 === s ? void 0 : s.vs(t.gs.ks)) || {}
);
}
zs(s) {
this.C && this.C.js(t.bs.xs, s);
xs(s) {
this.C && this.C.Bs(t.gs.ks, s);
}
changeUser() {
this.Ds();
this.zs();
}
L() {
return !!this.B && (!!this.B.Us() || (0 !== this.B.Es() && this.Ds(), !1));
return !!this.B && (!!this.B.Ds() || (0 !== this.B.Us() && this.zs(), !1));
}
Ds() {
zs() {
(this.banners = {}),
this.C && (this.C.Ls(t.bs.gs), this.C.Ls(t.bs.xs)),
this.C && (this.C.Es(t.gs.ps), this.C.Es(t.gs.ks)),
this.F.X({});
}
}

@@ -20,3 +20,3 @@ export default class Banner {

}
Bs() {
bs() {
return {

@@ -23,0 +23,0 @@ id: this.id,

@@ -9,6 +9,6 @@ import { logger as N } from "../../shared-lib/index.js";

e = r.v();
if (e && !e.Us()) return N.info("Banners are not enabled."), n;
const o = i.m().vs();
if (e && !e.Ds()) return N.info("Banners are not enabled."), n;
const o = i.m().fs();
for (const r in o) n[r] = v(o, r);
return n;
}

@@ -17,4 +17,4 @@ import { logger as N } from "../../shared-lib/index.js";

const e = r.v();
if (e && !e.Us()) return N.info("Banners are not enabled."), null;
return getBannerIfNotExpired(i.m().vs(), n);
if (e && !e.Ds()) return N.info("Banners are not enabled."), null;
return getBannerIfNotExpired(i.m().fs(), n);
}

@@ -13,3 +13,3 @@ import r from "../managers/braze-instance.js";

const e = i.m(),
t = e.vs();
t = e.fs();
return 0 === y(t).length

@@ -16,0 +16,0 @@ ? (N.info("Not logging banner click. No banners exist."), !1)

@@ -10,6 +10,6 @@ import { logger as N, EventTypes as d } from "../../shared-lib/index.js";

const n = i.m(),
s = n.vs();
s = n.fs();
if (0 === y(s).length)
return N.info("Not logging banners impression. No banners exist."), !1;
const e = n.ks(),
const e = n.Ns(),
t = [];

@@ -29,5 +29,5 @@ for (const r of o) {

if (0 === t.length) return !1;
n.zs(e);
n.xs(e);
const a = { ids: t };
return c.ds(d.ro, a).ss;
return c.cs(d.ro, a).ss;
}

@@ -11,6 +11,6 @@ import { logger as N } from "../../shared-lib/index.js";

if (!t) return void N.warn(p);
if (!t.Us()) return void N.info("Banners are not enabled.");
if (!t.Ds()) return void N.info("Banners are not enabled.");
if (!w(e) || 0 === e.length)
return void N.warn("placementIds should be a non-empty array.");
if (i.m().Is())
if (i.m().Rs())
return void N.warn(

@@ -17,0 +17,0 @@ "Banners can be refreshed only once per session per user.",

@@ -7,15 +7,15 @@ import r from "../managers/braze-instance.js";

const o = i.m();
if (o.qs()) {
if (o.Is()) {
const r = getAllBanners();
r && "function" == typeof n && n(r);
}
const t = o.Fs(n);
if (!o.Ts()) {
const t = o.qs(n);
if (!o.Cs()) {
const n = r.nn();
if (n) {
const r = n.rn(() => {
const n = o.us();
const n = o.ls();
n && n.length > 0 && o.$(n);
});
r && o.Rs(r);
r && o.Ts(r);
}

@@ -22,0 +22,0 @@ }

@@ -18,4 +18,4 @@ import { ControlCard } from "./models/index.js";

if (n && s.id && this.C) {
const n = this.C.ps(t.bs.ot) || {};
(n[s.id] = !0), this.C.js(t.bs.ot, n);
const n = this.C.vs(t.gs.ot) || {};
(n[s.id] = !0), this.C.Bs(t.gs.ot, n);
}

@@ -25,3 +25,3 @@ const i = this.et([s]);

const o = n ? d.lt : d.ut;
return c.ds(o, i);
return c.cs(o, i);
}

@@ -38,7 +38,7 @@ ct(s) {

if (s.id && this.C) {
const n = this.C.ps(t.bs.gt) || {};
(n[s.id] = !0), this.C.js(t.bs.gt, n);
const n = this.C.vs(t.gs.gt) || {};
(n[s.id] = !0), this.C.Bs(t.gs.gt, n);
}
const r = this.et([s]);
return null == r ? n : c.ds(d.dt, r);
return null == r ? n : c.cs(d.dt, r);
}

@@ -50,3 +50,3 @@ jt(s, n) {

let e = {};
this.C && (e = n ? this.C.ps(t.bs.vt) || {} : this.C.ps(t.bs.Ct) || {});
this.C && (e = n ? this.C.vs(t.gs.vt) || {} : this.C.vs(t.gs.Ct) || {});
for (const t of s) {

@@ -64,10 +64,10 @@ t.wt()

if (
(this.C && (n ? this.C.js(t.bs.vt, e) : this.C.js(t.bs.Ct, e)), null != l)
(this.C && (n ? this.C.Bs(t.gs.vt, e) : this.C.Bs(t.gs.Ct, e)), null != l)
) {
const t = n ? d.xt : d.yt,
s = c.ds(t, l);
s = c.cs(t, l);
r.It(s);
}
if (null != a && n) {
const t = c.ds(d.$t, a);
const t = c.cs(d.$t, a);
r.It(t);

@@ -74,0 +74,0 @@ }

@@ -9,3 +9,3 @@ import Card from "./card.js";

}
Bs() {
bs() {
const t = {};

@@ -12,0 +12,0 @@ return (

@@ -53,6 +53,6 @@ import {

subscribeToClickedEvent(t) {
return this.ti().Ns(t);
return this.ti().Fs(t);
}
subscribeToDismissedEvent(t) {
return this.ii().Ns(t);
return this.ii().Fs(t);
}

@@ -146,3 +146,3 @@ removeSubscription(t) {

}
Bs() {
bs() {
N.error("Must be implemented in a subclass");

@@ -149,0 +149,0 @@ }

@@ -8,3 +8,3 @@ import Card from "./card.js";

}
Bs() {
bs() {
const s = {};

@@ -11,0 +11,0 @@ return (

@@ -9,3 +9,3 @@ import Card from "./card.js";

}
Bs() {
bs() {
const l = {};

@@ -12,0 +12,0 @@ return (

@@ -9,3 +9,3 @@ import Card from "./card.js";

}
Bs() {
bs() {
const s = {};

@@ -12,0 +12,0 @@ return (

@@ -13,4 +13,4 @@ export const MAX_PURCHASE_QUANTITY = 100;

export const LAST_REQUEST_TO_ENDPOINT_MS_AGO_DEFAULT = 72e5;
export const MAX_ERROR_RETRIES_CONTENT_CARDS = 3;
export const MAX_RETRY_COUNT_PER_REQUEST = 15;
export const REQUEST_ATTEMPT_DEFAULT = 1;
export const SUBSCRIPTION_ID_DATA_ATTRIBUTE = "data-update-subscription-id";

@@ -6,3 +6,3 @@ import { logger as N } from "../../shared-lib/index.js";

const c = {
ds: (e, o, t) => {
cs: (e, o, t) => {
var n, s;

@@ -18,3 +18,3 @@ const i = new E(),

);
const d = l.qo();
const d = l.Eo();
return (

@@ -31,3 +31,3 @@ i.fe.push(

(i.ss =
(null === (s = r.j()) || void 0 === s ? void 0 : s.Eo(i.fe)) || !1),
(null === (s = r.j()) || void 0 === s ? void 0 : s.Go(i.fe)) || !1),
i

@@ -34,0 +34,0 @@ );

@@ -10,3 +10,3 @@ import rr from "./base-feed.js";

import { isArray as w } from "../util/code-utils.js";
import { KeyCodes as bt } from "../util/key-codes.js";
import { KeyCodes as mt } from "../util/key-codes.js";
import ge from "../l10n/l10n-manager-factory.js";

@@ -17,4 +17,4 @@ import { removeSubscription } from "../Core/remove-subscription.js";

import {
INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES as vt,
ineligibleBrazeActionURLErrorMessage as jt,
INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES as jt,
ineligibleBrazeActionURLErrorMessage as dt,
getDecodedBrazeAction as eo,

@@ -68,3 +68,3 @@ containsUnknownBrazeAction as ft,

!i || e.ur()
? (s.appendChild(Fe(r, logCardClick, t, o.So())), (n = n || !i))
? (s.appendChild(Fe(r, logCardClick, t, o.Fo())), (n = n || !i))
: N.error(

@@ -88,3 +88,3 @@ "Received a control card for a legacy news feed. Control cards are only supported with content cards.",

s = t.querySelectorAll(".ab-card");
e.Fo || (e.Fo = {});
e._o || (e._o = {});
for (let t = 0; t < s.length; t++) {

@@ -94,3 +94,3 @@ const n = be(s[t]),

i = B(s[t]);
if (e.Fo[n]) {
if (e._o[n]) {
r || i || ye(s[t]);

@@ -109,3 +109,3 @@ continue;

if (t.id === n) {
(e.Fo[t.id] = !0), o.push(t);
(e._o[t.id] = !0), o.push(t);
break;

@@ -162,3 +162,3 @@ }

r.addEventListener("keydown", (e) => {
(e.keyCode !== bt.To && e.keyCode !== bt._o) || i(e);
(e.keyCode !== mt.Ro && e.keyCode !== mt.Lo) || i(e);
}),

@@ -176,3 +176,3 @@ (r.onclick = i);

a.addEventListener("keydown", (e) => {
(e.keyCode !== bt.To && e.keyCode !== bt._o) || d(e);
(e.keyCode !== mt.Ro && e.keyCode !== mt.Lo) || d(e);
}),

@@ -199,3 +199,3 @@ (a.onclick = d),

if (ft(t)) {
N.error(jt(vt.Qr, "Content Card"));
N.error(dt(jt.Nr, "Content Card"));
continue;

@@ -202,0 +202,0 @@ }

@@ -1,2 +0,2 @@

import l, { readResponseHeaders as X } from "../util/net.js";
import l from "../util/net.js";
import s from "../common/base-provider.js";

@@ -6,18 +6,12 @@ import r from "../managers/braze-instance.js";

import { dateFromUnixTimestamp as O } from "../util/date-utils.js";
import { isURIJavascriptOrData as Y } from "../util/url-utils.js";
import { isURIJavascriptOrData as X } from "../util/url-utils.js";
import {
newCardFromContentCardsJson as Z,
newCardFromSerializedValue as tt,
newCardFromContentCardsJson as Y,
newCardFromSerializedValue as Z,
} from "../Card/util/card-factory.js";
import { STORAGE_KEYS as t } from "../managers/storage-manager.js";
import u from "../managers/subscription-manager.js";
import c from "../common/event-logger.js";
import h from "../util/request-header-utils.js";
import { randomInclusive as a } from "../util/math.js";
import { MAX_ERROR_RETRIES_CONTENT_CARDS as st } from "../common/constants.js";
import {
logger as N,
IndexedDBAdapter as it,
EventTypes as d,
} from "../../shared-lib/index.js";
import { logger as N, IndexedDBAdapter as tt } from "../../shared-lib/index.js";
export default class Q extends s {

@@ -29,3 +23,3 @@ constructor(t, s, i, e, h) {

(this.B = i),
(this.Js = e),
(this.Ls = e),
(this.S = h),

@@ -35,47 +29,45 @@ (this.As = t),

(this.B = i),
(this.Js = e),
(this.Ls = e),
(this.S = h),
(this.Ms = new u()),
r.N(this.Ms),
(this.Js = new u()),
r.N(this.Js),
(this.Ms = 0),
(this.$s = 0),
(this.Ps = 0),
(this.cards = []),
this.Xs();
const n = it.Gs._s;
new it(n, N).Hs(n.Os.Ks, (t) => {
this.Qs(t);
this.Ps();
const n = tt._s.Xs;
new tt(n, N).Gs(n.Ks.Hs, (t) => {
this.Os(t);
}),
(this.Qs = null),
(this.k = null),
(this.Vs = null),
(this.k = null),
(this.Ws = null),
(this.Ys = null),
(this.Zs = null),
(this.fi = 10),
(this.di = 0);
(this.Ys = 10);
}
pi() {
return this.Vs;
Zs() {
return this.Qs;
}
vi(t) {
this.Vs = t;
fi(t) {
this.Qs = t;
}
Ts() {
Cs() {
return this.k;
}
Rs(t) {
Ts(t) {
this.k = t;
}
Xs() {
Ps() {
if (!this.C) return;
const s = this.C.ps(t.bs.wi) || [],
const s = this.C.vs(t.gs.di) || [],
i = [];
for (let t = 0; t < s.length; t++) {
const e = tt(s[t]);
const e = Z(s[t]);
null != e && i.push(e);
}
(this.cards = this.Ci(this.bi(i, !1))),
(this.$s = this.C.ps(t.bs.gi) || this.$s),
(this.Ps = this.C.ps(t.bs.yi) || this.Ps);
(this.cards = this.pi(this.Ci(i, !1))),
(this.Ms = this.C.vs(t.gs.bi) || this.Ms),
(this.$s = this.C.vs(t.gs.vi) || this.$s);
}
ji(s, i = !1, e = 0, h = 0) {
wi(s, i = !1, e = 0, h = 0) {
let r;

@@ -95,6 +87,6 @@ if (i) {

if (i) {
const t = Z(e);
const t = Y(e);
null != h && h.viewed && t && (t.viewed = !0), null != t && r.push(t);
} else if (null == h) {
const t = Z(e);
const t = Y(e);
null != t && r.push(t);

@@ -110,50 +102,24 @@ } else {

}
(this.cards = this.Ci(this.bi(r, i))),
this.Ri(),
(this.$s = e),
(this.Ps = h),
this.C && (this.C.js(t.bs.gi, this.$s), this.C.js(t.bs.yi, this.Ps));
(this.cards = this.pi(this.Ci(r, i))),
this.gi(),
(this.Ms = e),
(this.$s = h),
this.C && (this.C.Bs(t.gs.bi, this.Ms), this.C.Bs(t.gs.vi, this.$s));
}
U(s) {
if (this.Si() && null != s && s.cards) {
this.C && this.C.js(t.bs.Di, r.Ui());
if (this.ji() && null != s && s.cards) {
this.C && this.C.Bs(t.gs.yi, r.Si());
const i = s.full_sync;
i || this.Xs(),
this.ji(s.cards, i, s.last_full_sync_at, s.last_card_updated_at),
this.Ms.X(this.ki(!0));
i || this.Ps(),
this.wi(s.cards, i, s.last_full_sync_at, s.last_card_updated_at),
this.Js.X(this.Ri(!0));
}
}
Ai(s) {
this.C && this.C.js(t.bs.Fi, s);
Ui(t) {
this.ki(), (this.Vs = t);
}
xi(s, i, e) {
const h = () => {
this.zi(i, e, !0);
},
r = s ? X(s) : null;
let n;
if ((this.qi(), !r || !r["retry-after"])) return void this.Ai(0);
const o = r["retry-after"];
if (isNaN(o) && !isNaN(Date.parse(o)))
(n = Date.parse(o) - new Date().getTime()), n < 0 && h();
else {
if (isNaN(parseFloat(o.toString()))) {
const t =
"Received unexpected value for retry-after header in /sync response";
return c.ds(d.Li, { e: t + ": " + o }), void this.Ai(0);
}
n = 1e3 * parseFloat(o.toString());
}
this.Ws = window.setTimeout(() => {
h();
}, n);
let l = 0;
this.C && (l = this.C.ps(t.bs.Fi)),
(null == l || isNaN(parseInt(l.toString()))) && (l = 0),
this.Ai(parseInt(l.toString()) + 1);
}
Qs(t) {
Os(t) {
var s;
if (!this.Si()) return;
this.Xs();
if (!this.ji()) return;
this.Ps();
const i = this.cards.slice();

@@ -172,3 +138,3 @@ let e = null;

if (null == h) {
const t = Z(e);
const t = Y(e);
null != t && i.push(t);

@@ -184,5 +150,5 @@ } else {

}
(this.cards = this.Ci(this.bi(i, !1))), this.Ri(), this.Ms.X(this.ki(!0));
(this.cards = this.pi(this.Ci(i, !1))), this.gi(), this.Js.X(this.Ri(!0));
}
bi(s, i) {
Ci(s, i) {
let e = {},

@@ -192,5 +158,5 @@ h = {},

this.C &&
((e = this.C.ps(t.bs.ot) || {}),
(h = this.C.ps(t.bs.vt) || {}),
(r = this.C.ps(t.bs.gt) || {}));
((e = this.C.vs(t.gs.ot) || {}),
(h = this.C.vs(t.gs.vt) || {}),
(r = this.C.vs(t.gs.gt) || {}));
const n = {},

@@ -209,15 +175,15 @@ o = {},

this.C &&
(this.C.js(t.bs.ot, n), this.C.js(t.bs.vt, o), this.C.js(t.bs.gt, l)),
(this.C.Bs(t.gs.ot, n), this.C.Bs(t.gs.vt, o), this.C.Bs(t.gs.gt, l)),
s
);
}
Ci(s) {
pi(s) {
const i = [],
e = new Date();
let h = {};
this.C && (h = this.C.ps(t.bs.gt) || {});
this.C && (h = this.C.vs(t.gs.gt) || {});
let r = !1;
for (let t = 0; t < s.length; t++) {
const n = s[t].url;
if (!this.Js && n && Y(n)) {
if (!this.Ls && n && X(n)) {
N.error(

@@ -237,88 +203,81 @@ `Card with url ${n} will not be displayed because Javascript URLs are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable this card.`,

}
return r && this.C && this.C.js(t.bs.gt, h), i;
return r && this.C && this.C.Bs(t.gs.gt, h), i;
}
Ri() {
gi() {
var s;
const i = [];
for (let t = 0; t < this.cards.length; t++) i.push(this.cards[t].Bs());
null === (s = this.C) || void 0 === s || s.js(t.bs.wi, i);
for (let t = 0; t < this.cards.length; t++) i.push(this.cards[t].bs());
null === (s = this.C) || void 0 === s || s.Bs(t.gs.di, i);
}
qi() {
this.Ws && (clearTimeout(this.Ws), (this.Ws = null));
ki() {
this.Vs && (clearTimeout(this.Vs), (this.Vs = null));
}
Ji() {
null != this.Ys && (clearTimeout(this.Ys), (this.Ys = null));
}
Mi(t = 1e3 * this.fi, s, i) {
this.Ji(),
(this.Ys = window.setTimeout(() => {
this.zi(s, i, !0);
}, t)),
(this.Zs = t);
}
zi(s, i, e = !1, n = !0) {
var o;
const u = this.S,
c = this.C;
if (!u || !c) return void ("function" == typeof i && i());
if ((!e && (this.qi(), this.Ai(0)), !this.Si()))
Di(s, i, e = !1) {
var n;
const o = this.S,
u = this.C;
if (!o || !u) return void ("function" == typeof i && i());
if ((e && (h.zi(u, h.O.Ai), this.ki()), !this.ji()))
return void (
null === (o = this.B) ||
void 0 === o ||
o.$i(() => {
this.zi(s, i);
null === (n = this.B) ||
void 0 === n ||
n.qi(() => {
this.Di(s, i, !0);
})
);
n && this.Ji();
const f = u.H({}, !0);
c.ps(t.bs.Di) !== r.Ui() && this.Bi(),
(f.last_full_sync_at = this.$s),
(f.last_card_updated_at = this.Ps);
const d = u.J(f, h.O.Pi, e);
let m = !1;
u.V(
f,
const c = o.H({}, !0);
u.vs(t.gs.yi) !== r.Si() && this.xi(),
(c.last_full_sync_at = this.Ms),
(c.last_card_updated_at = this.$s);
const f = o.J(c, h.O.Ai, e);
let d = !1;
o.V(
c,
(t = -1) => {
if (this.C) {
const t = new Date().valueOf();
h.W(this.C, h.O.Pi, t);
h.W(this.C, h.O.Ai, t);
}
-1 !== t && d.push(["X-Braze-Req-Tokens-Remaining", t.toString()]),
-1 !== t && f.push(["X-Braze-Req-Tokens-Remaining", t.toString()]),
l.Y({
url: `${u.Z()}/content_cards/sync`,
data: f,
headers: d,
ss: (t, e) => {
if (!u.ts(f, t, d))
return (m = !0), void ("function" == typeof i && i());
u.es(),
this.xi(e, s, i),
this.U(t),
(m = !1),
h.ns(this.C, h.O.Pi, 1),
"function" == typeof s && s();
url: `${o.Z()}/content_cards/sync`,
data: c,
headers: f,
ss: (t) => {
if (!o.ts(c, t, f))
return (d = !0), void ("function" == typeof i && i());
o.es(), this.U(t), (d = !1), "function" == typeof s && s();
},
error: (t) => {
u.rs(t, "retrieving content cards"),
(m = !0),
o.ns(t, "retrieving content cards"),
(d = !0),
"function" == typeof i && i();
},
os: () => {
if (m && n && !this.Ys && this.di + 1 < st) {
h.hs(this.C, h.O.Pi);
let t = this.Zs;
(null == t || t < 1e3 * this.fi) && (t = 1e3 * this.fi),
this.Mi(Math.min(3e5, a(1e3 * this.fi, 3 * t)), s, i),
(this.di = this.di + 1);
rs: (t, e) => {
let r;
if (d) {
let t = this.Ws;
(null == t || t < 1e3 * this.Ys) && (t = 1e3 * this.Ys),
(r = Math.min(3e5, a(1e3 * this.Ys, 3 * t)));
}
o.os(
e,
() => {
this.Di(s, i, !1);
},
h.O.Ai,
(t) => this.Ui(t),
() => this.ki(),
r,
);
},
});
},
h.O.Pi,
h.O.Ai,
i,
);
}
ki(s) {
s || this.Xs();
const i = this.Ci(this.cards);
Ri(s) {
s || this.Ps();
const i = this.pi(this.cards);
i.sort((t, s) =>

@@ -335,16 +294,16 @@ t.pinned && !s.pinned

);
let e = Math.max(this.Ps || 0, this.$s || 0);
let e = Math.max(this.$s || 0, this.Ms || 0);
return (
0 === e && (e = void 0),
this.C && this.C.ps(t.bs.yi) === this.Ps && void 0 === e && (e = this.Ps),
this.C && this.C.vs(t.gs.vi) === this.$s && void 0 === e && (e = this.$s),
new ContentCards(i, O(e))
);
}
Fs(t) {
return this.Ms.Ns(t);
qs(t) {
return this.Js.Fs(t);
}
Bi() {
(this.$s = 0),
(this.Ps = 0),
this.C && (this.C.Ls(t.bs.gi), this.C.Ls(t.bs.yi));
xi() {
(this.Ms = 0),
(this.$s = 0),
this.C && (this.C.Es(t.gs.bi), this.C.Es(t.gs.vi));
}

@@ -354,30 +313,30 @@ changeUser(s) {

((this.cards = []),
this.Ms.X(new ContentCards(this.cards.slice(), null)),
this.Js.X(new ContentCards(this.cards.slice(), null)),
this.C &&
(this.C.Ls(t.bs.wi),
this.C.Ls(t.bs.ot),
this.C.Ls(t.bs.vt),
this.C.Ls(t.bs.gt))),
this.Bi();
(this.C.Es(t.gs.di),
this.C.Es(t.gs.ot),
this.C.Es(t.gs.vt),
this.C.Es(t.gs.gt))),
this.xi();
}
clearData(s) {
(this.$s = 0),
(this.Ps = 0),
(this.Ms = 0),
(this.$s = 0),
(this.cards = []),
this.Ms.X(new ContentCards(this.cards.slice(), null)),
this.Js.X(new ContentCards(this.cards.slice(), null)),
s &&
this.C &&
(this.C.Ls(t.bs.wi),
this.C.Ls(t.bs.ot),
this.C.Ls(t.bs.vt),
this.C.Ls(t.bs.gt),
this.C.Ls(t.bs.gi),
this.C.Ls(t.bs.yi));
(this.C.Es(t.gs.di),
this.C.Es(t.gs.ot),
this.C.Es(t.gs.vt),
this.C.Es(t.gs.gt),
this.C.Es(t.gs.bi),
this.C.Es(t.gs.vi));
}
Si() {
return !!this.B && (!!this.B.Xi() || (0 !== this.B.Es() && this._i(), !1));
ji() {
return !!this.B && (!!this.B.Fi() || (0 !== this.B.Us() && this.Li(), !1));
}
_i() {
this.Ms.X(new ContentCards([], new Date())), this.C && this.C.Ls(t.bs.wi);
Li() {
this.Js.X(new ContentCards([], new Date())), this.C && this.C.Es(t.gs.di);
}
}
import W from "./content-cards-provider-factory.js";
import r from "../managers/braze-instance.js";
export function getCachedContentCards() {
if (r.rr()) return W.m().ki(!1);
if (r.rr()) return W.m().Ri(!1);
}
import r from "../managers/braze-instance.js";
import W from "./content-cards-provider-factory.js";
export function requestContentCardsRefresh(e, t) {
if (r.rr()) return W.m().zi(e, t);
if (r.rr()) return W.m().Di(e, t, !0);
}
import r from "../managers/braze-instance.js";
import W from "./content-cards-provider-factory.js";
export function subscribeToContentCardsUpdates(t) {
export function subscribeToContentCardsUpdates(o) {
if (!r.rr()) return;
const n = W.m(),
o = n.Fs(t);
if (!n.Ts()) {
const t = r.nn();
if (t) {
const r = t.rn(() => {
n.zi();
const t = W.m(),
n = t.qs(o);
if (!t.Cs()) {
const o = r.nn();
if (o) {
const r = o.rn(() => {
t.Di(void 0, void 0, !0);
});
r && n.Rs(r);
r && t.Ts(r);
}
}
return o;
return n;
}

@@ -22,7 +22,7 @@ import r, { OPTIONS as z } from "../../managers/braze-instance.js";

const o = r.sr(z.tn) || r.sr(z.en) || !1,
i = W.m().ki(!1);
i = W.m().Ri(!1);
"function" == typeof t && an(i, t(i.cards.slice()), i.lastUpdated, null, o);
const a = tn(i, o, e),
s = W.m(),
f = s.pi();
f = s.Zs();
(null == i.lastUpdated ||

@@ -35,3 +35,3 @@ new Date().valueOf() - i.lastUpdated.valueOf() > ContentCards.ar) &&

on(i, a),
s.vi(new Date().valueOf()));
s.fi(new Date().valueOf()));
const l = new Date().valueOf(),

@@ -38,0 +38,0 @@ c = subscribeToContentCardsUpdates(function (n) {

import r from "../managers/braze-instance.js";
import { logger as N, IndexedDBAdapter as it } from "../../shared-lib/index.js";
import { logger as N, IndexedDBAdapter as tt } from "../../shared-lib/index.js";
import ne, { STORAGE_KEYS as t } from "../managers/storage-manager.js";

@@ -10,4 +10,4 @@ export function disableSDK() {

n.store(t.ae, s);
const a = it.Gs._s;
new it(a, N).setItem(a.Os.ie, a.oe, !0),
const a = tt._s.Xs;
new tt(a, N).setItem(a.Ks.ie, a.oe, !0),
N.info("disableSDK was called"),

@@ -14,0 +14,0 @@ r.destroy(!1),

import r from "../managers/braze-instance.js";
import { logger as N, IndexedDBAdapter as it } from "../../shared-lib/index.js";
import { logger as N, IndexedDBAdapter as tt } from "../../shared-lib/index.js";
import ne, { STORAGE_KEYS as t } from "../managers/storage-manager.js";
export function enableSDK() {
new ne.ne(null, !0).remove(t.ae);
const e = it.Gs._s;
new it(e, N).me(e.Os.ie, e.oe),
const e = tt._s.Xs;
new tt(e, N).me(e.Ks.ie, e.oe),
N.info("enableSDK was called"),

@@ -9,0 +9,0 @@ r.destroy(!1),

@@ -10,3 +10,3 @@ import r from "../managers/braze-instance.js";

} from "../util/validation-utils.js";
import { LOG_CUSTOM_EVENT_STRING as mt } from "../common/constants.js";
import { LOG_CUSTOM_EVENT_STRING as it } from "../common/constants.js";
export function logCustomEvent(t, e) {

@@ -24,3 +24,3 @@ if (!r.rr()) return !1;

e,
mt,
it,
"eventProperties",

@@ -34,3 +34,3 @@ `log custom event "${t}"`,

return N.info(`Custom Event "${t}" is blocklisted, ignoring.`), !1;
const s = c.ds(d.CustomEvent, { n: t, p: n });
const s = c.cs(d.CustomEvent, { n: t, p: n });
if (s.ss) {

@@ -37,0 +37,0 @@ N.info(`Logged custom event "${t}".`);

@@ -233,3 +233,3 @@ import r from "../managers/braze-instance.js";

return N.info(`Purchase "${e}" is blocklisted, ignoring.`), !1;
const P = c.ds(d.Pr, { pid: e, c: i, p: s, q: D, pr: a });
const P = c.cs(d.Pr, { pid: e, c: i, p: s, q: D, pr: a });
if (P.ss) {

@@ -236,0 +236,0 @@ N.info(`Logged ${D} purchase${D > 1 ? "s" : ""} of "${e}" for ${i} ${s}.`);

import r from "../managers/braze-instance.js";
import { logger as N, IndexedDBAdapter as it } from "../../shared-lib/index.js";
import { logger as N, IndexedDBAdapter as tt } from "../../shared-lib/index.js";
import et from "../triggers/models/trigger-events.js";

@@ -10,5 +10,5 @@ import { TriggersProviderFactory as ot } from "../triggers/triggers-provider-factory.js";

i.openSession();
const t = it.Gs._s,
o = new it(t, N);
o.jr(t.Os.hr, (r, n) => {
const t = tt._s.Xs,
o = new tt(t, N);
o.jr(t.Ks.hr, (r, n) => {
const e = n.lastClick,

@@ -21,7 +21,7 @@ s = n.trackingString;

};
i.vr(g, g), o.me(t.Os.hr, r);
i.vr(g, g), o.me(t.Ks.hr, r);
}),
o.Hs(t.Os.$r, function (r) {
o.Gs(t.Ks.$r, function (r) {
i.wr(r);
});
}
import r from "../managers/braze-instance.js";
import { keys as y } from "../util/code-utils.js";
import { logger as N, IndexedDBAdapter as it } from "../../shared-lib/index.js";
import { logger as N, IndexedDBAdapter as tt } from "../../shared-lib/index.js";
import { BRAZE_MUST_BE_INITIALIZED_ERROR as p } from "../common/constants.js";

@@ -9,9 +9,9 @@ export function wipeData() {

o.clearData();
const t = y(it.Gs);
const t = y(tt._s);
for (let o = 0; o < t.length; o++) {
const n = t[o],
r = it.Gs[n];
new it(r, N).clearData();
r = tt._s[n];
new tt(r, N).clearData();
}
if (r.rr()) for (const o of r.lr()) o.clearData(!0);
}

@@ -35,3 +35,3 @@ import { logger as N } from "../../shared-lib/index.js";

}
Bs() {
bs() {
const t = {};

@@ -38,0 +38,0 @@ return (

@@ -9,25 +9,25 @@ import { logger as N } from "../../shared-lib/index.js";

import {
newFeatureFlagFromJson as ht,
newFeatureFlagFromSerializedValue as at,
newFeatureFlagFromJson as st,
newFeatureFlagFromSerializedValue as ht,
} from "./feature-flag-factory.js";
import h from "../util/request-header-utils.js";
export default class tr extends s {
constructor(t, s, i, e) {
constructor(t, s, e, i) {
super(),
(this.B = t),
(this.S = s),
(this.C = i),
(this.T = e),
(this.Gi = []),
(this.Hi = 0),
(this.C = e),
(this.T = i),
(this.je = []),
(this.we = 0),
(this.B = t),
(this.S = s),
(this.C = i),
(this.T = e),
(this.Ki = null),
(this.Oi = new u()),
(this.C = e),
(this.T = i),
(this.Ce = null),
(this.Re = new u()),
(this.R = 10),
(this.I = null),
(this.q = null),
r.N(this.Oi);
r.N(this.Re);
}

@@ -37,45 +37,45 @@ U(t) {

if (
(null === (s = this.B) || void 0 === s ? void 0 : s.Qi()) &&
(null === (s = this.B) || void 0 === s ? void 0 : s.De()) &&
null != t &&
t.feature_flags
) {
this.Gi = [];
this.je = [];
for (const s of t.feature_flags) {
const t = ht(s);
t && this.Gi.push(t);
const t = st(s);
t && this.je.push(t);
}
(this.Hi = new Date().getTime()), this.Vi(), this.Oi.X(this.Gi);
(this.we = new Date().getTime()), this.Se(), this.Re.X(this.je);
}
}
Wi() {
qe() {
let s = {};
this.C && (s = this.C.ps(t.bs.Yi));
const i = {};
this.C && (s = this.C.vs(t.gs.xe));
const e = {};
for (const t in s) {
const e = at(s[t]);
e && (i[e.id] = e);
const i = ht(s[t]);
i && (e[i.id] = i);
}
return i;
return e;
}
Zi() {
ze() {
var s;
return (
(null === (s = this.C) || void 0 === s ? void 0 : s.ps(t.bs.we)) || {}
(null === (s = this.C) || void 0 === s ? void 0 : s.vs(t.gs.$e)) || {}
);
}
je(s) {
this.C && this.C.js(t.bs.we, s);
ke(s) {
this.C && this.C.Bs(t.gs.$e, s);
}
Fs(t) {
return this.Oi.Ns(t);
qs(t) {
return this.Re.Fs(t);
}
refreshFeatureFlags(t, s, i = !1, e = !0) {
refreshFeatureFlags(t, s, e = !1, i = !0) {
const r = () => {
"function" == typeof s && s(), this.Oi.X(this.Gi);
"function" == typeof s && s(), this.Re.X(this.je);
};
if (!this.Ce(i))
if (!this.Be(e))
return (
!this.Ki &&
!this.Ce &&
this.B &&
(this.Ki = this.B.Re(() => {
(this.Ce = this.B.Me(() => {
this.refreshFeatureFlags(t, s);

@@ -87,39 +87,46 @@ })),

if (!o) return void r();
e && this.G();
i && this.G();
const n = o.H({}, !0),
u = o.J(n, h.O.De);
u = o.J(n, h.O.Ue);
let f = !1;
o.V(
n,
(o = -1) => {
if (!this.S) return void r();
(i = -1) => {
const o = this.S;
if (!o) return void r();
const c = new Date().valueOf();
h.W(this.C, h.O.De, c),
-1 !== o && u.push(["X-Braze-Req-Tokens-Remaining", o.toString()]),
h.W(this.C, h.O.Ue, c),
-1 !== i && u.push(["X-Braze-Req-Tokens-Remaining", i.toString()]),
l.Y({
url: `${this.S.Z()}/feature_flags/sync`,
url: `${o.Z()}/feature_flags/sync`,
headers: u,
data: n,
ss: (s) => {
if (!this.S.ts(n, s, u)) return (f = !0), void r();
this.S.es(),
this.U(s),
(f = !1),
h.ns(this.C, h.O.De, 1),
"function" == typeof t && t();
if (!o.ts(n, s, u)) return (f = !0), void r();
o.es(), this.U(s), (f = !1), "function" == typeof t && t();
},
error: (t) => {
this.S.rs(t, "retrieving feature flags"), (f = !0), r();
o.ns(t, "retrieving feature flags"), (f = !0), r();
},
os: () => {
if (e && f && !this.q) {
h.hs(this.C, h.O.De);
let e = this.I;
(null == e || e < 1e3 * this.R) && (e = 1e3 * this.R),
this.ls(Math.min(3e5, a(1e3 * this.R, 3 * e)), t, s, i);
rs: (i, r) => {
let n;
if (f) {
let t = this.I;
(null == t || t < 1e3 * this.R) && (t = 1e3 * this.R),
(n = Math.min(3e5, a(1e3 * this.R, 3 * t)));
}
o.os(
r,
() => {
this.refreshFeatureFlags(t, s, e, !0);
},
h.O.Ue,
(t) => this.hs(t),
() => this.G(),
n,
);
},
});
},
h.O.De,
h.O.Ue,
s,

@@ -131,13 +138,9 @@ );

}
ls(t = 1e3 * this.R, s, i, e = !1) {
this.G(),
(this.q = window.setTimeout(() => {
this.refreshFeatureFlags(s, i, e);
}, t)),
(this.I = t);
hs(t) {
this.G(), (this.q = t);
}
Ce(t) {
Be(t) {
if (!this.B) return !1;
if (!t) {
const t = this.B.Se();
const t = this.B.Xe();
if (null == t) return !1;

@@ -147,3 +150,3 @@ let s = !1;

if (-1 === t) return N.info("Feature flag refreshes not allowed"), !1;
s = new Date().getTime() >= (this.Hi || 0) + 1e3 * t;
s = new Date().getTime() >= (this.we || 0) + 1e3 * t;
}

@@ -155,31 +158,31 @@ if (!s)

}
return this.B.Qi();
return this.B.De();
}
qe() {
_e() {
var s;
return (
(null === (s = this.C) || void 0 === s ? void 0 : s.ps(t.bs.xe)) || null
(null === (s = this.C) || void 0 === s ? void 0 : s.vs(t.gs.Ae)) || null
);
}
ze() {
var s, i;
Ge() {
var s, e;
null === (s = this.C) ||
void 0 === s ||
s.js(t.bs.xe, null === (i = this.T) || void 0 === i ? void 0 : i.Ss());
s.Bs(t.gs.Ae, null === (e = this.T) || void 0 === e ? void 0 : e.Ss());
}
$e() {
He() {
var t;
const s = null === (t = this.T) || void 0 === t ? void 0 : t.Ss(),
i = this.qe();
return null == i || s === i;
e = this._e();
return null == e || s === e;
}
Vi() {
Se() {
if (!this.C) return;
const s = {};
for (const t of this.Gi) {
const i = t.Bs();
s[t.id] = i;
for (const t of this.je) {
const e = t.bs();
s[t.id] = e;
}
this.C.js(t.bs.Yi, s), this.C.js(t.bs.ke, this.Hi), this.ze();
this.C.Bs(t.gs.xe, s), this.C.Bs(t.gs.Je, this.we), this.Ge();
}
}

@@ -8,6 +8,6 @@ import { logger as N } from "../../shared-lib/index.js";

t = r.v();
if (t && !t.Qi()) return N.info("Feature flags are not enabled."), e;
const n = nr.m().Wi();
if (t && !t.De()) return N.info("Feature flags are not enabled."), e;
const n = nr.m().qe();
for (const r in n) e.push(n[r]);
return e;
}

@@ -7,5 +7,5 @@ import { logger as N } from "../../shared-lib/index.js";

const t = r.v();
if (t && !t.Qi()) return N.info("Feature flags are not enabled."), null;
const n = nr.m().Wi();
if (t && !t.De()) return N.info("Feature flags are not enabled."), null;
const n = nr.m().qe();
return n[e] ? n[e] : null;
}

@@ -10,7 +10,7 @@ import { logger as N, EventTypes as d } from "../../shared-lib/index.js";

"Not logging a feature flag impression. The feature flag was not part of any matching experiment.",
o = nr.m().Wi();
o = nr.m().qe();
if (!o[e]) return N.info(t), !1;
const n = o[e].trackingString;
if (!n) return N.info(t), !1;
const i = nr.m().Zi();
const i = nr.m().ze();
if (i[n])

@@ -23,5 +23,5 @@ return (

);
(i[n] = !0), nr.m().je(i);
(i[n] = !0), nr.m().ke(i);
const s = { fid: e, fts: n };
return c.ds(d.yr, s).ss;
return c.cs(d.yr, s).ss;
}

@@ -7,7 +7,7 @@ import r from "../managers/braze-instance.js";

const e = nr.m();
if (e.$e()) {
if (e.He()) {
const r = getAllFeatureFlags();
r && "function" == typeof t && t(r);
}
return e.Fs(t);
return e.qs(t);
}

@@ -5,4 +5,4 @@ import s from "../common/base-provider.js";

import {
newCardFromFeedJson as lt,
newCardFromSerializedValue as tt,
newCardFromFeedJson as at,
newCardFromSerializedValue as Z,
} from "../Card/util/card-factory.js";

@@ -16,30 +16,30 @@ import { rehydrateDateAfterJsonization as V } from "../util/date-utils.js";

(this.C = t),
(this.Ue = s),
(this.Bi = s),
(this.cards = []),
(this.Ae = null),
(this.Gi = null),
(this.C = t),
(this.Ue = s),
(this.Ms = new u()),
r.N(this.Ms),
this.Xs();
(this.Bi = s),
(this.Js = new u()),
r.N(this.Js),
this.Ps();
}
Xs() {
Ps() {
let s = [];
this.C && (s = this.C.ps(t.bs.Be) || []);
this.C && (s = this.C.vs(t.gs.Hi) || []);
const i = [];
for (let t = 0; t < s.length; t++) {
const e = tt(s[t]);
const e = Z(s[t]);
null != e && i.push(e);
}
(this.cards = i), this.C && (this.Ae = V(this.C.ps(t.bs.Ge)));
(this.cards = i), this.C && (this.Gi = V(this.C.vs(t.gs.Ji)));
}
He(s) {
Ki(s) {
const i = [];
let e = null,
r = {};
this.C && (r = this.C.ps(t.bs.Ct) || {});
this.C && (r = this.C.vs(t.gs.Ct) || {});
const h = {};
for (let t = 0; t < s.length; t++) {
e = s[t];
const o = lt(e);
const o = at(e);
if (null != o) {

@@ -51,11 +51,11 @@ const t = o.id;

(this.cards = i),
this.Ri(),
(this.Ae = new Date()),
this.C && (this.C.js(t.bs.Ct, h), this.C.js(t.bs.Ge, this.Ae));
this.gi(),
(this.Gi = new Date()),
this.C && (this.C.Bs(t.gs.Ct, h), this.C.Bs(t.gs.Ji, this.Gi));
}
Ri() {
gi() {
var s;
const i = [];
for (let t = 0; t < this.cards.length; t++) i.push(this.cards[t].Bs());
null === (s = this.C) || void 0 === s || s.js(t.bs.Be, i);
for (let t = 0; t < this.cards.length; t++) i.push(this.cards[t].bs());
null === (s = this.C) || void 0 === s || s.Bs(t.gs.Hi, i);
}

@@ -65,8 +65,8 @@ U(t) {

t.feed &&
(this.Xs(),
this.He(t.feed),
this.Ms.X(new Feed(this.cards.slice(), this.Ae)));
(this.Ps(),
this.Ki(t.feed),
this.Js.X(new Feed(this.cards.slice(), this.Gi)));
}
Je() {
this.Xs();
Mi() {
this.Ps();
const t = [],

@@ -79,9 +79,9 @@ s = new Date();

}
return new Feed(t, this.Ae);
return new Feed(t, this.Gi);
}
zi() {
this.Ue && this.Ue.requestFeedRefresh();
Di() {
this.Bi && this.Bi.requestFeedRefresh();
}
Fs(t) {
return this.Ms.Ns(t);
qs(t) {
return this.Js.Fs(t);
}

@@ -91,6 +91,6 @@ clearData(s) {

(this.cards = []),
(this.Ae = null),
s && this.C && (this.C.Ls(t.bs.Be), this.C.Ls(t.bs.Ge)),
this.Ms.X(new Feed(this.cards.slice(), this.Ae));
(this.Gi = null),
s && this.C && (this.C.Es(t.gs.Hi), this.C.Es(t.gs.Ji)),
this.Js.X(new Feed(this.cards.slice(), this.Gi));
}
}
import r from "../managers/braze-instance.js";
import ie from "./feed-provider-factory.js";
export function getCachedFeed() {
if (r.rr()) return ie.m().Je();
if (r.rr()) return ie.m().Mi();
}
import r from "../managers/braze-instance.js";
import ie from "./feed-provider-factory.js";
export function requestFeedRefresh() {
if (r.rr()) return ie.m().zi();
if (r.rr()) return ie.m().Di();
}
import r from "../managers/braze-instance.js";
import ie from "./feed-provider-factory.js";
export function subscribeToFeedUpdates(e) {
if (r.rr()) return ie.m().Fs(e);
if (r.rr()) return ie.m().qs(e);
}

@@ -39,3 +39,3 @@ import r, { OPTIONS as z } from "../../managers/braze-instance.js";

null == t
? ((l = ie.m().Je()),
? ((l = ie.m().Mi()),
an(l, o(l.cards, n), l.lastUpdated, null, i),

@@ -42,0 +42,0 @@ (f = !0))

@@ -11,4 +11,4 @@ import InAppMessage from "./models/in-app-message.js";

: e instanceof InAppMessage
? se.ea().Me(e)
? se.ea().Ke(e)
: (N.info("Not an instance of InAppMessage, ignoring."), !1);
}
import ro from "../../util/browser-detector.js";
import { InAppMessage, logInAppMessageHtmlClick } from "../index.js";
import { OperatingSystems as so } from "../../util/device-constants.js";
import { buildHtmlClickHandler as ct } from "./html-message-display-utils.js";
import { buildHtmlClickHandler as lt } from "./html-message-display-utils.js";
import { attachHtmlToIframeWithNonce as m } from "../../util/html-display-utils.js";
import { buildBrazeBridge as b } from "../../util/html-display-utils.js";
export default function dt(t, e, o, s, n, i) {
export default function ct(t, e, o, s, n, i) {
const l = document.createElement("iframe");

@@ -21,3 +21,3 @@ l.setAttribute("title", "Modal Message"),

(e.innerHTML = t.css || ""),
(e.id = t._e() || ""),
(e.id = t.Le() || ""),
null != i && e.setAttribute("nonce", i),

@@ -46,12 +46,12 @@ a.appendChild(e);

if (
((n.appboyBridge = c), (n.brazeBridge = c), t.Ke !== InAppMessage.Qe.Le)
((n.appboyBridge = c), (n.brazeBridge = c), t.Qe !== InAppMessage.We.Ve)
) {
const e = n.document.getElementsByTagName("a");
for (let o = 0; o < e.length; o++) e[o].onclick = ct(t, l, e[o], s);
for (let o = 0; o < e.length; o++) e[o].onclick = lt(t, l, e[o], s);
const o = n.document.getElementsByTagName("button");
for (let e = 0; e < o.length; e++) o[e].onclick = ct(t, l, o[e], s);
for (let e = 0; e < o.length; e++) o[e].onclick = lt(t, l, o[e], s);
}
const m = n.document.body;
if (null != m) {
t.Ve() && (m.id = t.htmlId || "");
t.Ye() && (m.id = t.htmlId || "");
const e = document.createElement("hidden");

@@ -72,6 +72,6 @@ (e.onclick = c.closeMessage),

return (
(e.className = "ab-ios-scroll-wrapper"), e.appendChild(l), (t.We = e), e
(e.className = "ab-ios-scroll-wrapper"), e.appendChild(l), (t.Ze = e), e
);
}
return (t.We = l), l;
return (t.Ze = l), l;
}

@@ -16,8 +16,8 @@ import {

import { _handleBrazeAction as F } from "../../Core/handle-braze-action.js";
import dt from "./html-message-to-html.js";
import ct from "./html-message-to-html.js";
import ce from "./modal-utils.js";
import { logger as N, Guid as G } from "../../../shared-lib/index.js";
export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
if (((e.Xe = document.activeElement), e instanceof HtmlMessage))
return dt(e, o, a, n, s, i);
if (((e.lo = document.activeElement), e instanceof HtmlMessage))
return ct(e, o, a, n, s, i);
const c = (function (e, o, a, t, n, s, i = document.body, m = "ltr") {

@@ -29,3 +29,3 @@ let l = null;

s && (c.style.zIndex = (s + 1).toString()),
e.Ye() &&
e.do() &&
((c.className += " ab-modal-interactions"),

@@ -43,3 +43,3 @@ c.setAttribute("tabindex", "-1")),

`Cannot show in-app message ${e.message} because another message is being shown.`,
InAppMessage.lo.Ze,
InAppMessage.bo.uo,
)

@@ -94,3 +94,3 @@ : a(c));

(b.className = "ab-message-text"), (b.dir = m);
const p = (e.messageAlignment || e.do).toLowerCase();
const p = (e.messageAlignment || e.po).toLowerCase();
b.className += " " + p + "-aligned";

@@ -106,3 +106,3 @@ let g = !1;

o.setAttribute("aria-label", "Modal Image"),
e.uo(o),
e.fo(o),
f.appendChild(o);

@@ -113,3 +113,3 @@ } else {

(o.setAttribute("src", e.imageUrl),
e.uo(o),
e.fo(o),
0 === document.querySelectorAll(".ab-iam-img-loading").length)

@@ -151,3 +151,3 @@ ) {

const o = document.createElement("h1");
(o.className = "ab-message-header"), (e.bo = G.Rt()), (o.id = e.bo);
(o.className = "ab-message-header"), (e.ho = G.Rt()), (o.id = e.ho);
const a = (

@@ -161,3 +161,3 @@ e.headerAlignment || InAppMessage.TextAlignment.CENTER

}
return b.appendChild(e.po()), c.appendChild(b), g || d(), (e.We = c), c;
return b.appendChild(e.jo()), c.appendChild(b), g || d(), (e.Ze = c), c;
})(e, o, a, t, n, s, m, l);

@@ -167,5 +167,5 @@ if (e instanceof FullScreenMessage || e instanceof ModalMessage) {

(c.className += ` ${a} ab-centered`),
ce.fo(e, o, c, n),
ce.ho(c),
ce.jo(e.bo, c);
ce.wo(e, o, c, n),
ce.vo(c),
ce.xo(e.ho, c);
} else if (e instanceof SlideUpMessage) {

@@ -180,3 +180,3 @@ c.className += " ab-slideup";

);
a.setAttribute("class", "ab-chevron"), o.appendChild(a);
a.setAttribute("class", `ab-chevron ${l}`), o.appendChild(a);
}

@@ -193,4 +193,4 @@ let a, t;

e.slideFrom === InAppMessage.SlideFrom.TOP
? ((a = R.wo), (t = " ab-swiped-up"))
: ((a = R.vo), (t = " ab-swiped-down")),
? ((a = R.Co), (t = " ab-swiped-up"))
: ((a = R.$o), (t = " ab-swiped-down")),
H(c, a, (e) => {

@@ -197,0 +197,0 @@ (c.className += t), null != o && null != o.onclick && o.onclick(e);

@@ -6,5 +6,5 @@ import InAppMessage from "../models/in-app-message.js";

import { addPassiveEventListener as J } from "../../util/dom-utils.js";
import { KeyCodes as bt } from "../../util/key-codes.js";
import { KeyCodes as mt } from "../../util/key-codes.js";
const ce = {
ho: (t) => {
vo: (t) => {
const o = t.querySelectorAll(

@@ -20,3 +20,3 @@ ".ab-close-button, .ab-message-text, .ab-message-button",

const a = document.activeElement;
o.keyCode === bt.yo &&
o.keyCode === mt.yo &&
(o.shiftKey || (a !== s && a !== t)

@@ -30,3 +30,3 @@ ? !o.shiftKey ||

},
jo: (t, o) => {
xo: (t, o) => {
o.setAttribute("role", "dialog"),

@@ -37,3 +37,3 @@ o.setAttribute("aria-modal", "true"),

},
fo: (t, o, e, s) => {
wo: (t, o, e, s) => {
if (t.buttons && t.buttons.length > 0) {

@@ -40,0 +40,0 @@ const a = document.createElement("div");

@@ -50,3 +50,3 @@ import InAppMessage from "./models/in-app-message.js";

let C;
if (o === ModalMessage.Dt || o === InAppMessage.Qe.xo)
if (o === ModalMessage.Dt || o === InAppMessage.We.Io)
C = new ModalMessage(

@@ -142,4 +142,4 @@ s,

o !== HtmlMessage.Dt &&
o !== InAppMessage.Qe.Le &&
o !== InAppMessage.Qe.Io
o !== InAppMessage.We.Ve &&
o !== InAppMessage.We.Ao
)

@@ -153,3 +153,3 @@ return void N.error("Ignoring message with unknown type " + o);

}
return (C.Ke = o), C;
return (C.Qe = o), C;
}

@@ -156,0 +156,0 @@ export function buttonsFromSerializedInAppMessage(e) {

@@ -19,6 +19,6 @@ import l from "../util/net.js";

getDecodedBrazeAction as eo,
ineligibleBrazeActionURLErrorMessage as jt,
INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES as vt,
ineligibleBrazeActionURLErrorMessage as dt,
INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES as jt,
} from "../util/braze-actions.js";
import yt from "../Push/utils/push-utils.js";
import vt from "../Push/utils/push-utils.js";
import h from "../util/request-header-utils.js";

@@ -37,24 +37,26 @@ import { STORAGE_KEYS as t } from "../managers/storage-manager.js";

(this.As = i),
(this.Ir = new u()),
r.N(this.Ir),
(this.Mr = 1e3),
(this.Tr = 6e4),
(this.Br = null);
(this._i = new u()),
r.N(this._i),
(this.Pi = 1e3),
(this.$i = 6e4),
(this.Oi = null),
(this.Xi = null),
(this.Qi = null);
}
_r() {
return this.Ir;
Vi() {
return this._i;
}
qr(t) {
return this.Ir.Ns(t);
Wi(t) {
return this._i.Fs(t);
}
Er() {
return this.Br;
Yi() {
return this.Oi;
}
Gr(t) {
this.Br = t;
Zi(t) {
this.Oi = t;
}
ds(t, e, s, i) {
cs(t, e, s, i) {
const r = new E();
let n;
if (e === d.Nr || t instanceof ControlMessage) {
if (e === d.Ir || t instanceof ControlMessage) {
if (!t.wt())

@@ -67,3 +69,3 @@ return (

);
} else if (e === d.Cr || (t instanceof HtmlMessage && e === d.Or)) {
} else if (e === d.Mr || (t instanceof HtmlMessage && e === d.Tr)) {
if (!t.rt(i))

@@ -81,3 +83,3 @@ return (

? { trigger_ids: [t.triggerId] }
: this.Xr(t)),
: this.Br(t)),
null == n

@@ -87,6 +89,6 @@ ? r

null != s && (n.bid = s),
c.ds(e, n))
c.cs(e, n))
);
}
Hr(t, e) {
_r(t, e) {
const s = new E();

@@ -100,6 +102,6 @@ if (!t.rt())

);
const i = this.Xr(e);
const i = this.Br(e);
return null == i
? s
: t.id === InAppMessageButton.Jr
: t.id === InAppMessageButton.qr
? (N.info(

@@ -109,9 +111,9 @@ "This in-app message button does not have a tracking id. Not logging event to Braze servers.",

s)
: (null != t.id && (i.bid = t.id), c.ds(d.Or, i));
: (null != t.id && (i.bid = t.id), c.cs(d.Tr, i));
}
Kr(t) {
Er(t) {
const e = t.messageFields;
return (null != e && e.is_push_primer) || !1;
}
Lr(t) {
Gr(t) {
if (!(t instanceof InAppMessage)) return;

@@ -122,8 +124,8 @@ const e = (t) => {

return ft(e)
? jt(vt.Qr, "In-App Message")
: gt(e) && !yt.Ur()
? jt(vt.Vr, "In-App Message")
? dt(jt.Nr, "In-App Message")
: gt(e) && !vt.Cr()
? dt(jt.Or, "In-App Message")
: void 0;
};
if (this.Kr(t) && !yt.Ur())
if (this.Er(t) && !vt.Cr())
return "In-App Message contains a push prompt, but is not eligible for a push prompt. Ignoring.";

@@ -146,56 +148,78 @@ const s = t.buttons || [];

}
Wr(t, e, s, i) {
Xr(t, e) {
e !== this.Qi && this.Hr(), (this.Xi = t), (this.Qi = e);
}
Hr() {
null != this.Xi &&
(clearTimeout(this.Xi), (this.Xi = null), (this.Qi = null));
}
Jr(t, e, s, i) {
const r = this.S;
if (!r) return;
const n = r.Yr(!1, !1),
this.Qi && t.triggerId !== this.Qi && (this.Hr(), h.zi(this.C, h.O.Kr));
const n = r.Lr(!1, !1),
o = r.H(n);
(o.template = { trigger_id: t.triggerId, trigger_event_type: e }),
null != s && (o.template.data = s.Zr());
const u = r.J(o, h.O.sn);
null != s && (o.template.data = s.Qr());
const u = r.J(o, h.O.Kr);
r.V(
o,
(r = -1) => {
if (!this.S) return;
const n = new Date().valueOf();
h.W(this.C, h.O.sn, n),
-1 !== r && u.push(["X-Braze-Req-Tokens-Remaining", r.toString()]),
l.Y({
url: `${this.S.Z()}/template/`,
data: o,
headers: u,
ss: (e) => {
if ((h.ns(this.C, h.O.sn, 1), !this.S.ts(o, e, u)))
return void ("function" == typeof t.on && t.on());
if ((this.S.es(), null == e || null == e.templated_message))
return;
const s = e.templated_message;
if (s.type !== pt.ln.an) return;
const i = ut(s.data);
if (null == i) return;
const r = this.Lr(i);
if (r)
return N.error(r), void ("function" == typeof t.on && t.on());
"function" == typeof t.un && t.un(i);
},
error: (r) => {
let n = `getting user personalization for message ${t.triggerId}`;
if (new Date().valueOf() - t.pn < t.mn) {
h.hs(this.C, h.O.sn);
const r = Math.min(t.mn, this.Tr),
o = this.Mr;
null == i && (i = o);
const l = Math.min(r, a(o, 3 * i));
(n += `. Retrying in ${l} ms`),
setTimeout(() => {
this.Wr(t, e, s, l);
}, l);
const n = this.S;
if (!n) return;
const p = new Date().valueOf();
h.W(this.C, h.O.Kr, p),
-1 !== r && u.push(["X-Braze-Req-Tokens-Remaining", r.toString()]);
let m,
c,
g = !1;
l.Y({
url: `${n.Z()}/template/`,
data: o,
headers: u,
ss: (e) => {
if (!n.ts(o, e, u))
return void ("function" == typeof t.Ur && t.Ur());
if ((n.es(), null == e || null == e.templated_message)) return;
const s = e.templated_message;
if (s.type !== pt.Wr.Vr) return;
const i = ut(s.data);
if (null == i) return;
const r = this.Gr(i);
if (r)
return N.error(r), void ("function" == typeof t.Ur && t.Ur());
"function" == typeof t.Yr && t.Yr(i);
},
error: (e) => {
(g = !0),
(m = e),
(c = `getting user personalization for message ${t.triggerId}.`);
},
rs: (r, o) => {
if (new Date().valueOf() - t.Zr < t.sn) {
let r = 0;
if (g) {
const e = Math.min(t.sn, this.$i),
s = this.Pi;
null == i && (i = s), (r = Math.min(e, a(s, 3 * i)));
}
this.S.rs(r, n);
},
});
n.os(
o,
() => {
this.Jr(t, e, s, r);
},
h.O.Kr,
(e) => this.Xr(e, t.triggerId),
() => this.Hr(),
r,
);
}
g && n.ns(m, c);
},
});
},
h.O.sn,
h.O.Kr,
);
}
Xr(t) {
Br(t) {
if (null == t.triggerId)

@@ -211,3 +235,3 @@ return (

}
Me(e) {
Ke(e) {
return (

@@ -219,3 +243,3 @@ !!this.C &&

) &&
this.C.js(t.bs.cn, e.Bs())
this.C.Bs(t.gs.on, e.bs())
);

@@ -225,26 +249,26 @@ }

if (!this.C) return null;
const e = this.C.ps(t.bs.cn);
const e = this.C.vs(t.gs.on);
if (!e) return null;
let s;
switch (e.type) {
case InAppMessage.Qe.gn:
s = FullScreenMessage.hn(e);
case InAppMessage.We.an:
s = FullScreenMessage.ln(e);
break;
case InAppMessage.Qe.fn:
case InAppMessage.Qe.Le:
case InAppMessage.Qe.Io:
s = HtmlMessage.hn(e);
case InAppMessage.We.un:
case InAppMessage.We.Ve:
case InAppMessage.We.Ao:
s = HtmlMessage.ln(e);
break;
case InAppMessage.Qe.dn:
case InAppMessage.Qe.xo:
s = ModalMessage.hn(e);
case InAppMessage.We.pn:
case InAppMessage.We.Io:
s = ModalMessage.ln(e);
break;
case InAppMessage.Qe.jn:
s = SlideUpMessage.hn(e);
case InAppMessage.We.mn:
s = SlideUpMessage.ln(e);
}
return s && this.vn(), s;
return s && this.hn(), s;
}
vn() {
this.C && this.C.Ls(t.bs.cn);
hn() {
this.C && this.C.Es(t.gs.on);
}
}

@@ -15,7 +15,7 @@ import r from "../managers/braze-instance.js";

if (!(t instanceof InAppMessage)) return N.error(sr), !1;
const s = se.ea().Hr(o, t);
const s = se.ea()._r(o, t);
if (s.ss)
for (let r = 0; r < s.fe.length; r++)
ot.m().ue(
et.Ao,
et.Bo,
[

@@ -22,0 +22,0 @@ t.triggerId,

@@ -12,9 +12,9 @@ import r from "../managers/braze-instance.js";

if (!(o instanceof InAppMessage)) return N.error(sr), !1;
const s = se.ea().ds(o, d.Cr);
const s = se.ea().cs(o, d.Mr);
if (s) {
o.ko() || logInAppMessageImpression(o);
for (let r = 0; r < s.fe.length; r++)
ot.m().ue(et.Ao, [o.triggerId], s.fe[r]);
ot.m().ue(et.Bo, [o.triggerId], s.fe[r]);
}
return s.ss;
}

@@ -16,9 +16,9 @@ import r from "../managers/braze-instance.js";

);
let o = d.Cr;
null != t && (o = d.Or);
const m = se.ea().ds(e, o, t, s);
let o = d.Mr;
null != t && (o = d.Tr);
const m = se.ea().cs(e, o, t, s);
if (m.ss)
for (let r = 0; r < m.fe.length; r++)
ot.m().ue(et.Ao, [e.triggerId, t], m.fe[r]);
ot.m().ue(et.Bo, [e.triggerId, t], m.fe[r]);
return m.ss;
}

@@ -11,4 +11,4 @@ import r from "../managers/braze-instance.js";

return N.error(sr), !1;
const s = o instanceof ControlMessage ? d.zo : d.Nr;
return se.ea().ds(o, s).ss;
const s = o instanceof ControlMessage ? d.zo : d.Ir;
return se.ea().cs(o, s).ss;
}

@@ -69,8 +69,8 @@ import { buttonsFromSerializedInAppMessage as pe } from "../in-app-message-factory.js";

),
(this.do = InAppMessage.TextAlignment.CENTER);
(this.po = InAppMessage.TextAlignment.CENTER);
}
Bs() {
return super.Bs(FullScreenMessage.Dt);
bs() {
return super.bs(FullScreenMessage.Dt);
}
static hn(e) {
static ln(e) {
return new FullScreenMessage(

@@ -109,2 +109,2 @@ e[InAppMessage.qt.ra],

}
FullScreenMessage.Dt = InAppMessage.Qe.gn;
FullScreenMessage.Dt = InAppMessage.We.an;

@@ -39,17 +39,17 @@ import InAppMessage from "./in-app-message.js";

}
Bo() {
Po() {
return !1;
}
rt(i) {
if (this.Ke === InAppMessage.Qe.fn) {
if (this.Co) return !1;
this.Co = !0;
if (this.Qe === InAppMessage.We.un) {
if (this.So) return !1;
this.So = !0;
}
return this._t.X(i), !0;
}
Bs() {
const i = super.Bs(HtmlMessage.Dt);
return (i[InAppMessage.qt.Po] = this.messageFields), i;
bs() {
const i = super.bs(HtmlMessage.Dt);
return (i[InAppMessage.qt.qo] = this.messageFields), i;
}
static hn(i) {
static ln(i) {
return new HtmlMessage(

@@ -66,3 +66,3 @@ i[InAppMessage.qt.ra],

i[InAppMessage.qt.CSS],
i[InAppMessage.qt.Po],
i[InAppMessage.qt.qo],
i[InAppMessage.qt.qa],

@@ -72,2 +72,2 @@ );

}
HtmlMessage.Dt = InAppMessage.Qe.fn;
HtmlMessage.Dt = InAppMessage.We.un;

@@ -18,9 +18,9 @@ import InAppMessage from "./in-app-message.js";

(this.uri = e),
null == n && (n = InAppMessageButton.Jr),
null == n && (n = InAppMessageButton.qr),
(this.id = n),
(this.Co = !1),
(this.So = !1),
(this._t = new u());
}
subscribeToClickedEvent(s) {
return this._t.Ns(s);
return this._t.Fs(s);
}

@@ -34,3 +34,3 @@ removeSubscription(s) {

rt() {
return !this.Co && ((this.Co = !0), this._t.X(), !0);
return !this.So && ((this.So = !0), this._t.X(), !0);
}

@@ -49,2 +49,2 @@ static fromJson(s) {

}
InAppMessageButton.Jr = -1;
InAppMessageButton.qr = -1;

@@ -7,3 +7,3 @@ import r, { OPTIONS as z } from "../../managers/braze-instance.js";

} from "../../util/dom-utils.js";
import { KeyCodes as bt } from "../../util/key-codes.js";
import { KeyCodes as mt } from "../../util/key-codes.js";
import u from "../../managers/subscription-manager.js";

@@ -109,15 +109,15 @@ import { isIFrame as It } from "../utils/in-app-message-utils.js";

(this.st = !1),
(this.Co = !1),
(this.So = !1),
(this.Th = !1),
(this.We = null),
(this.Xe = null),
(this.Ze = null),
(this.lo = null),
(this._t = new u()),
(this.oh = new u()),
(this.do = InAppMessage.TextAlignment.CENTER);
(this.po = InAppMessage.TextAlignment.CENTER);
}
subscribeToClickedEvent(t) {
return this._t.Ns(t);
return this._t.Fs(t);
}
subscribeToDismissedEvent(t) {
return this.oh.Ns(t);
return this.oh.Fs(t);
}

@@ -131,18 +131,18 @@ removeSubscription(t) {

closeMessage() {
this.ll(this.We);
this.ll(this.Ze);
}
Ye() {
do() {
return !0;
}
Bo() {
return this.Ye();
Po() {
return this.do();
}
Ve() {
Ye() {
return null != this.htmlId && this.htmlId.length > 4;
}
Oe() {
return this.Ve() && null != this.css && this.css.length > 0;
return this.Ye() && null != this.css && this.css.length > 0;
}
_e() {
if (this.Ve() && this.Oe()) return this.htmlId + "-css";
Le() {
if (this.Ye() && this.Oe()) return this.htmlId + "-css";
}

@@ -156,3 +156,3 @@ wt() {

rt(t) {
return !this.Co && ((this.Co = !0), this._t.X(), !0);
return !this.So && ((this.So = !0), this._t.X(), !0);
}

@@ -165,3 +165,3 @@ ft() {

let s = t.closest(".ab-iam-root");
if ((null == s && (s = t), this.Ye() && null != s.parentNode)) {
if ((null == s && (s = t), this.do() && null != s.parentNode)) {
const t = s.parentNode.classList;

@@ -178,3 +178,3 @@ t && t.contains(InAppMessage.rh) && t.remove(InAppMessage.rh),

let i;
(this.We = null),
(this.Ze = null),
(i =

@@ -194,3 +194,3 @@ -1 === t.className.indexOf("ab-in-app-message")

}
const i = this._e();
const i = this.Le();
if (null != i) {

@@ -203,10 +203,10 @@ const t = document.getElementById(i);

};
h ? setTimeout(n, InAppMessage.Ih) : n(), this.Xe && this.Xe.focus();
h ? setTimeout(n, InAppMessage.Ih) : n(), this.lo && this.lo.focus();
}
po() {
jo() {
return document.createTextNode(this.message || "");
}
uo(t) {
fo(t) {
let s = "";
this.message || this.header || !this.Ye() || (s = "Modal Image"),
this.message || this.header || !this.do() || (s = "Modal Image"),
t.setAttribute("alt", s);

@@ -227,3 +227,3 @@ }

const s = t.parentNode;
this.Ye() &&
this.do() &&
null != s &&

@@ -241,3 +241,3 @@ this.orientation !== InAppMessage.Orientation.LANDSCAPE &&

if (
t.keyCode === bt._h &&
t.keyCode === mt._h &&
!r.sr(z.mh) &&

@@ -274,3 +274,3 @@ document.querySelectorAll(".ab-modal-interactions").length > 0

}
Bs(t) {
bs(t) {
const s = {};

@@ -322,5 +322,5 @@ return t

}),
(InAppMessage.lo = {
(InAppMessage.bo = {
Dh: "hd",
Ze: "ias",
uo: "ias",
Ch: "of",

@@ -354,10 +354,10 @@ dh: "do",

}),
(InAppMessage.Qe = {
jn: "SLIDEUP",
dn: "MODAL",
xo: "MODAL_STYLED",
gn: "FULL",
fn: "WEB_HTML",
Le: "HTML",
Io: "HTML_FULL",
(InAppMessage.We = {
mn: "SLIDEUP",
pn: "MODAL",
Io: "MODAL_STYLED",
an: "FULL",
un: "WEB_HTML",
Ve: "HTML",
Ao: "HTML_FULL",
}),

@@ -400,4 +400,4 @@ (InAppMessage.Ih = 500),

zt: "type",
Po: "messageFields",
qo: "messageFields",
qa: "me",
});

@@ -66,8 +66,8 @@ import { buttonsFromSerializedInAppMessage as pe } from "../in-app-message-factory.js";

),
(this.do = InAppMessage.TextAlignment.CENTER);
(this.po = InAppMessage.TextAlignment.CENTER);
}
Bs() {
return super.Bs(ModalMessage.Dt);
bs() {
return super.bs(ModalMessage.Dt);
}
static hn(e) {
static ln(e) {
return new ModalMessage(

@@ -105,2 +105,2 @@ e[InAppMessage.qt.ra],

}
ModalMessage.Dt = InAppMessage.Qe.dn;
ModalMessage.Dt = InAppMessage.We.pn;

@@ -62,8 +62,8 @@ import InAppMessage from "./in-app-message.js";

),
(this.do = InAppMessage.TextAlignment.START);
(this.po = InAppMessage.TextAlignment.START);
}
Ye() {
do() {
return !1;
}
po() {
jo() {
const e = document.createElement("span");

@@ -80,6 +80,6 @@ return e.appendChild(document.createTextNode(this.message || "")), e;

}
Bs() {
return super.Bs(SlideUpMessage.Dt);
bs() {
return super.bs(SlideUpMessage.Dt);
}
static hn(e) {
static ln(e) {
return new SlideUpMessage(

@@ -111,2 +111,2 @@ e[InAppMessage.qt.ra],

}
SlideUpMessage.Dt = InAppMessage.Qe.jn;
SlideUpMessage.Dt = InAppMessage.We.mn;
export default class wt {
constructor(t, s, i, h, l) {
(this.triggerId = t),
(this.un = s),
(this.on = i),
(this.pn = h),
(this.mn = l),
(this.Yr = s),
(this.Ur = i),
(this.Zr = h),
(this.sn = l),
(this.triggerId = t),
(this.un = s),
(this.on = i),
(this.pn = h),
(this.mn = l);
(this.Yr = s),
(this.Ur = i),
(this.Zr = h),
(this.sn = l);
}

@@ -14,0 +14,0 @@ static fromJson(t, s, i, h, l) {

@@ -7,5 +7,5 @@ import r from "../managers/braze-instance.js";

? null
: se.ea().qr(function (r) {
: se.ea().Wi(function (r) {
return n(r[0]), r.slice(1);
});
}

@@ -10,7 +10,7 @@ import se from "../in-app-message-manager-factory.js";

const s = se.ea();
if (null == s.Er()) {
if (null == s.Yi()) {
const r = subscribeToInAppMessage((s) => showInAppMessage(s));
s.Gr(r);
s.Zi(r);
}
return s.Er();
return s.Yi();
}

@@ -13,4 +13,4 @@ import r, { OPTIONS as z } from "../../managers/braze-instance.js";

} from "../../util/window-utils.js";
import { isURIJavascriptOrData as Y } from "../../util/url-utils.js";
import { KeyCodes as bt } from "../../util/key-codes.js";
import { isURIJavascriptOrData as X } from "../../util/url-utils.js";
import { KeyCodes as mt } from "../../util/key-codes.js";
import { setupInAppMessageUI as ss } from "../../ui/js/index.js";

@@ -44,3 +44,3 @@ import { logger as N } from "../../../shared-lib/index.js";

);
if ((null == t && (t = document.body), e.Ye())) {
if ((null == t && (t = document.body), e.do())) {
if (t.querySelectorAll(".ab-modal-interactions").length > 0)

@@ -55,3 +55,3 @@ return (

if (no.Uo()) {
const t = no.$o();
const t = no.Jo();
if (

@@ -83,5 +83,5 @@ (t === fe.PORTRAIT &&

const s = o[e].uri;
t = Y(s);
t = X(s);
}
} else e.clickAction === InAppMessage.ClickAction.URI && (t = Y(e.uri));
} else e.clickAction === InAppMessage.ClickAction.URI && (t = X(e.uri));
if (t)

@@ -100,4 +100,4 @@ return (

i.setAttribute("role", "complementary"),
e.Ve() && (i.id = e.htmlId),
r.sr(z.Jo) && (i.style.zIndex = (r.sr(z.Jo) + 1).toString()),
e.Ye() && (i.id = e.htmlId),
r.sr(z.Do) && (i.style.zIndex = (r.sr(z.Do) + 1).toString()),
t.appendChild(i),

@@ -108,3 +108,3 @@ e.Oe())

(t.innerHTML = e.css),
(t.id = e._e()),
(t.id = e.Le()),
null != r.sr(z.ir) && t.setAttribute("nonce", r.sr(z.ir)),

@@ -122,3 +122,3 @@ document.getElementsByTagName("head")[0].appendChild(t);

(t) => {
if (e.Ye() && e.Bo()) {
if (e.do() && e.Po()) {
const o = document.createElement("div");

@@ -128,3 +128,3 @@ if (

e.Oe() || (o.style.backgroundColor = le(e.frameColor)),
r.sr(z.Jo) && (o.style.zIndex = r.sr(z.Jo).toString()),
r.sr(z.Do) && (o.style.zIndex = r.sr(z.Do).toString()),
i.appendChild(o),

@@ -165,3 +165,3 @@ !r.sr(z.mh))

t.contentWindow.addEventListener("keydown", function (e) {
e.keyCode === bt._h && o.closeMessage();
e.keyCode === mt._h && o.closeMessage();
});

@@ -179,9 +179,9 @@ }

},
r.sr(z.To),
r.sr(z.Do),
r.sr(z.Jo),
r.sr(z.ir),
t,
ge.ea().So(),
ge.ea().Fo(),
);
return (s || n) && (i.appendChild(a), e.Ah(i)), !0;
}

@@ -25,3 +25,3 @@ import { logger as N } from "../../shared-lib/index.js";

}
So() {
Fo() {
switch (this.language) {

@@ -28,0 +28,0 @@ case "ar":

import { STORAGE_KEYS as t } from "./storage-manager.js";
import u from "./subscription-manager.js";
import { logger as N, IndexedDBAdapter as it } from "../../shared-lib/index.js";
export default class qt {
import { logger as N, IndexedDBAdapter as tt } from "../../shared-lib/index.js";
export default class kt {
constructor(t, i, s) {

@@ -20,17 +20,17 @@ (this.C = t),

xh() {
return this.C.ps(t.bs.qh);
return this.C.vs(t.gs.qh);
}
setSdkAuthenticationSignature(i) {
const s = this.xh();
this.C.js(t.bs.qh, i);
const e = it.Gs._s;
new it(e, N).setItem(e.Os.yh, this.wh, i), s !== i && this.es();
this.C.Bs(t.gs.qh, i);
const e = tt._s.Xs;
new tt(e, N).setItem(e.Ks.yh, this.wh, i), s !== i && this.es();
}
Bh() {
this.C.Ls(t.bs.qh);
const i = it.Gs._s;
new it(i, N).me(i.Os.yh, this.wh);
this.C.Es(t.gs.qh);
const i = tt._s.Xs;
new tt(i, N).me(i.Ks.yh, this.wh);
}
subscribeToSdkAuthenticationFailures(t) {
return this.Fh.Ns(t);
return this.Fh.Fs(t);
}

@@ -37,0 +37,0 @@ Gh(t) {

@@ -1,2 +0,2 @@

import qt from "./auth-manager.js";
import kt from "./auth-manager.js";
import s from "../common/base-provider.js";

@@ -14,9 +14,9 @@ import ro from "../util/browser-detector.js";

import Lt from "../request-controller.js";
import Dt from "./server-config-manager.js";
import Mt from "./session-manager.js";
import Mt from "./server-config-manager.js";
import Wt from "./session-manager.js";
import ne, { STORAGE_KEYS as t } from "./storage-manager.js";
import Wt from "./storage-manager-factory.js";
import Bt from "./storage-manager-factory.js";
import u from "./subscription-manager.js";
import { TriggersProviderFactory as ot } from "../triggers/triggers-provider-factory.js";
import kt from "../User/user-manager.js";
import bt from "../User/user-manager.js";
import { User } from "../User/index.js";

@@ -30,13 +30,13 @@ import { parseQueryStringKeyValues as ll } from "../util/url-utils.js";

Oo: "allowCrawlerActivity",
Ro: "baseUrl",
Lo: "noCookies",
Wo: "devicePropertyAllowlist",
Wo: "baseUrl",
Vo: "noCookies",
Ko: "devicePropertyAllowlist",
Da: "disablePushTokenMaintenance",
Vo: "enableLogging",
Ko: "enableSdkAuthentication",
Yo: "enableLogging",
Ho: "enableSdkAuthentication",
Ca: "manageServiceWorkerExternally",
Go: "minimumIntervalBetweenTriggerActionsInSeconds",
Yo: "sessionTimeoutInSeconds",
Ho: "appVersion",
Xo: "appVersionNumber",
Xo: "minimumIntervalBetweenTriggerActionsInSeconds",
Zo: "sessionTimeoutInSeconds",
Qo: "appVersion",
Wh: "appVersionNumber",
_a: "serviceWorkerLocation",

@@ -47,21 +47,21 @@ Ba: "safariWebsitePushId",

er: "allowUserSuppliedJavascript",
Jo: "inAppMessageZIndex",
Do: "openInAppMessagesInNewTab",
Do: "inAppMessageZIndex",
To: "openInAppMessagesInNewTab",
tn: "openCardsInNewTab",
en: "openNewsFeedCardsInNewTab",
mh: "requireExplicitInAppMessageDismissal",
Zo: "doNotLoadFontAwesome",
Qo: "deviceId",
Vh: "doNotLoadFontAwesome",
$h: "deviceId",
Aa: "serviceWorkerScope",
Wh: "sdkFlavor",
Yh: "sdkFlavor",
};
class Vt {
constructor() {
(this.yn = ""),
(this.Vh = ""),
(this.$h = void 0),
(this.Yh = null),
(this.wn = null),
(this.fn = ""),
(this.Xh = ""),
(this.Zh = void 0),
(this.Qh = null),
(this.dn = null),
(this.S = null),
(this.Ue = null),
(this.Bi = null),
(this.B = null),

@@ -71,18 +71,18 @@ (this.T = null),

(this.As = null),
(this.Xh = ""),
(this.Ia = ""),
(this.isInitialized = !1),
(this.Zh = !1),
(this.Qh = new u()),
(this.Ia = new u()),
(this.Na = !1),
(this.Oa = new u()),
(this.Ta = new u()),
(this.options = {}),
(this.Na = []),
(this.Oa = []),
(this.Ir = []),
(this.Vh = "5.6.1");
(this.Ra = []),
(this.Pa = []),
(this._i = []),
(this.Xh = "5.7.0");
}
Ta(t) {
this.Qh.Ns(t);
La(t) {
this.Oa.Fs(t);
}
Nh(t) {
this.Ia.Ns(t);
this.Ta.Fs(t);
}

@@ -93,4 +93,4 @@ initialize(i, s) {

this.options = s || {};
let e = this.sr(z.Vo);
const r = ll(no.Ra());
let e = this.sr(z.Yo);
const r = ll(no.Ua());
if (

@@ -105,4 +105,4 @@ (r && "true" === r.brazeLogging && (e = !0),

return N.error("Braze requires a valid API key to be initialized."), !1;
this.yn = i;
let n = this.sr(z.Ro);
this.fn = i;
let n = this.sr(z.Wo);
if (null == n || "" === n || "string" != typeof n)

@@ -116,17 +116,17 @@ return N.error("Braze requires a valid baseUrl to be initialized."), !1;

"/" === n.pathname && (n = `${n}api/v3`),
(this.Xh = n.toString()),
ro.Pa && !this.sr(z.Oo))
(this.Ia = n.toString()),
ro.Wa && !this.sr(z.Oo))
)
return (
N.info("Ignoring activity from crawler bot " + navigator.userAgent),
(this.Zh = !0),
(this.Na = !0),
!1
);
const h = this.sr(z.Lo) || !1;
const h = this.sr(z.Vo) || !1;
if (
((this.C = Wt.La(i, h)), h && this.C.Ua(i), new ne.ne(null, !0).gr(t.ae))
((this.C = Bt.Va(i, h)), h && this.C.Fa(i), new ne.ne(null, !0).gr(t.ae))
)
return (
N.info("Ignoring all activity due to previous opt out"),
(this.Zh = !0),
(this.Na = !0),
!1

@@ -138,9 +138,9 @@ );

const a = ["mparticle", "wordpress", "tealium"];
if (null != this.sr(z.Wh)) {
const t = this.sr(z.Wh);
if (null != this.sr(z.Yh)) {
const t = this.sr(z.Yh);
-1 !== a.indexOf(t)
? (this.$h = t)
? (this.Zh = t)
: N.error("Invalid sdk flavor passed: " + t);
}
let l = this.sr(zt.Wo);
let l = this.sr(zt.Ko);
if (null != l)

@@ -162,34 +162,34 @@ if (w(l)) {

(l = null);
const c = this.sr(z.Qo);
const c = this.sr(z.$h);
if (c) {
const i = new _t(c);
this.C.uu(t.iu.Qo, i);
this.C.uu(t.iu.$h, i);
}
(this.wn = new Ot(this.C, l)),
(this.B = new Dt(this.C)),
(this.As = new kt(this.B, this.C)),
(this.T = new Mt(this.C, this.As, this.B, this.sr(z.Yo)));
(this.dn = new Ot(this.C, l)),
(this.B = new Mt(this.C)),
(this.As = new bt(this.B, this.C)),
(this.T = new Wt(this.C, this.As, this.B, this.sr(z.Zo)));
const f = new u();
return (
(this.Yh = new qt(this.C, this.sr(z.Ko), f)),
(this.Qh = new kt(this.C, this.sr(z.Ho), f)),
this.N(f),
(this.S = new Pt(
this.wn,
this.dn,
this.C,
this.Yh,
this.Qh,
this.As,
this.T,
this.B,
this.yn,
this.fn,
this.Ia,
this.Xh,
this.Vh,
this.$h || "",
this.sr(z.Ho),
this.sr(z.Xo),
this.Zh || "",
this.sr(z.Qo),
this.sr(z.Wh),
)),
(this.Ue = new Lt(
this.yn,
this.Xh,
(this.Bi = new Lt(
this.fn,
this.Ia,
this.T,
this.wn,
this.dn,
this.As,

@@ -201,17 +201,17 @@ this.B,

},
this.Yh,
this.Qh,
this.S,
)),
this.Ue.initialize(),
h || this.C.Wa(),
this.Bi.initialize(),
h || this.C.Ka(),
N.info(
`Initialized for the Braze backend at "${this.sr(
z.Ro,
)}" with API key "${this.yn}".`,
z.Wo,
)}" with API key "${this.fn}".`,
),
ot.p(),
this.B.Re(() => {
this.B.Me(() => {
var t;
this.isInitialized &&
(null === (t = this.B) || void 0 === t ? void 0 : t.Qi()) &&
(null === (t = this.B) || void 0 === t ? void 0 : t.De()) &&
import("../FeatureFlags/refresh-feature-flags.js").then((t) => {

@@ -222,6 +222,6 @@ if (!this.isInitialized) return;

}),
this.Ue.rn(() => {
this.Bi.rn(() => {
var t;
this.isInitialized &&
(null === (t = this.B) || void 0 === t ? void 0 : t.Qi()) &&
(null === (t = this.B) || void 0 === t ? void 0 : t.De()) &&
import("../FeatureFlags/refresh-feature-flags.js").then((t) => {

@@ -232,3 +232,3 @@ if (!this.isInitialized) return;

}),
this.Qh.X(this.options),
this.Oa.X(this.options),
(this.isInitialized = !0),

@@ -241,13 +241,13 @@ window.dispatchEvent(new CustomEvent("braze.initialized")),

if ((N.destroy(), this.nt())) {
this.Ia.X(), this.Ia.removeAllSubscriptions();
for (const t of this.Na) t.destroy();
this.Na = [];
for (const t of this.Oa) t.clearData(!1);
(this.Oa = []),
this.Ta.X(), this.Ta.removeAllSubscriptions();
for (const t of this.Ra) t.destroy();
this.Ra = [];
for (const t of this.Pa) t.clearData(!1);
(this.Pa = []),
this.removeAllSubscriptions(),
(this.Ir = []),
null != this.Ue && this.Ue.destroy(),
(this.Ue = null),
(this.Yh = null),
(this.wn = null),
(this._i = []),
null != this.Bi && this.Bi.destroy(),
(this.Bi = null),
(this.Qh = null),
(this.dn = null),
(this.S = null),

@@ -258,5 +258,5 @@ (this.B = null),

(this.options = {}),
(this.$h = void 0),
(this.Zh = void 0),
(this.isInitialized = !1),
(this.Zh = !1),
(this.Na = !1),
t && (this.C = null);

@@ -266,15 +266,15 @@ }

rr() {
return !this.Va() && (!!this.nt() || (console.warn(p), !1));
return !this.Ga() && (!!this.nt() || (console.warn(p), !1));
}
Ma() {
return this.yn;
return this.fn;
}
Sr() {
return this.Yh;
return this.Qh;
}
Z() {
return this.Xh;
return this.Ia;
}
te() {
return this.wn;
return this.dn;
}

@@ -288,6 +288,6 @@ g() {

lr() {
return this.Oa;
return this.Pa;
}
nn() {
return this.Ue;
return this.Bi;
}

@@ -304,3 +304,3 @@ v() {

cr() {
if (this.As && this.Ue) return new User(this.As, this.Ue);
if (this.As && this.Bi) return new User(this.As, this.Bi);
}

@@ -315,21 +315,21 @@ tr() {

let i = !1;
for (const s of this.Na) s === t && (i = !0);
i || this.Na.push(t);
for (const s of this.Ra) s === t && (i = !0);
i || this.Ra.push(t);
}
_(t) {
let i = !1;
for (const s of this.Oa) s.constructor === t.constructor && (i = !0);
t instanceof s && !i && this.Oa.push(t);
for (const s of this.Pa) s.constructor === t.constructor && (i = !0);
t instanceof s && !i && this.Pa.push(t);
}
N(t) {
t instanceof u && this.Ir.push(t);
t instanceof u && this._i.push(t);
}
removeAllSubscriptions() {
if (this.rr()) for (const t of this.Ir) t.removeAllSubscriptions();
if (this.rr()) for (const t of this._i) t.removeAllSubscriptions();
}
removeSubscription(t) {
if (this.rr()) for (const i of this.Ir) i.removeSubscription(t);
if (this.rr()) for (const i of this._i) i.removeSubscription(t);
}
re(t) {
this.Zh = t;
this.Na = t;
}

@@ -339,7 +339,7 @@ nt() {

}
Va() {
return this.Zh;
Ga() {
return this.Na;
}
Ui() {
return this.Vh;
Si() {
return this.Xh;
}

@@ -346,0 +346,0 @@ }

@@ -12,13 +12,13 @@ import ro from "../util/browser-detector.js";

(this.C = t),
(this.Fa = e),
(this.Ja = e),
(this.C = t),
null == e && (e = Rt(DeviceProperties)),
(this.Fa = e);
(this.Ja = e);
}
ce(e = !0) {
let r = this.C.tu(t.iu.Qo);
null == r && ((r = new _t(G.Rt())), e && this.C.uu(t.iu.Qo, r));
let r = this.C.tu(t.iu.$h);
null == r && ((r = new _t(G.Rt())), e && this.C.uu(t.iu.$h, r));
const s = new Gt(r.eu);
for (let t = 0; t < this.Fa.length; t++) {
switch (this.Fa[t]) {
for (let t = 0; t < this.Ja.length; t++) {
switch (this.Ja[t]) {
case DeviceProperties.BROWSER:

@@ -28,9 +28,9 @@ s.browser = ro.browser;

case DeviceProperties.BROWSER_VERSION:
s.Ga = ro.version;
s.Ha = ro.version;
break;
case DeviceProperties.OS:
s.os = this.Ja();
s.os = this.Qa();
break;
case DeviceProperties.RESOLUTION:
s.Ha = screen.width + "x" + screen.height;
s.Xa = screen.width + "x" + screen.height;
break;

@@ -41,3 +41,3 @@ case DeviceProperties.LANGUAGE:

case DeviceProperties.TIME_ZONE:
s.timeZone = this.Ka(new Date());
s.timeZone = this.Ya(new Date());
break;

@@ -50,8 +50,8 @@ case DeviceProperties.USER_AGENT:

}
Ja() {
if (ro.Qa()) return ro.Qa();
const e = this.C.ps(t.bs.Xa);
return e && e.os_version ? e.os_version : ro.Ja();
Qa() {
if (ro.Za()) return ro.Za();
const e = this.C.vs(t.gs.$a);
return e && e.os_version ? e.os_version : ro.Qa();
}
Ka(t) {
Ya(t) {
let e = !1;

@@ -73,5 +73,5 @@ if ("undefined" != typeof Intl && "function" == typeof Intl.DateTimeFormat)

const r = t.getTimezoneOffset();
return this.Ya(r);
return this.tc(r);
}
Ya(t) {
tc(t) {
const e = Math.trunc(t / 60),

@@ -78,0 +78,0 @@ r = Math.trunc(t % 60);

@@ -1,6 +0,6 @@

import Xt from "../models/backend-errors.js";
import qt from "../models/backend-errors.js";
import ve from "../models/braze-event.js";
import {
convertMsToSeconds as L,
convertSecondsToMs as Kt,
convertSecondsToMs as Xt,
} from "../util/date-utils.js";

@@ -12,58 +12,57 @@ import c from "../common/event-logger.js";

import h from "../util/request-header-utils.js";
import { LAST_REQUEST_TO_ENDPOINT_MS_AGO_DEFAULT as Ht } from "../common/constants.js";
import { getAlias as Yt } from "./utils.js";
import {
LAST_REQUEST_TO_ENDPOINT_MS_AGO_DEFAULT as $t,
MAX_RETRY_COUNT_PER_REQUEST as Kt,
} from "../common/constants.js";
import { getAlias as Ht } from "./utils.js";
import { readResponseHeaders as Yt } from "../util/net.js";
export default class Pt {
constructor(t, e, i, s, r, n, o, h, a, u, l, c) {
(this.wn = t),
constructor(t, e, i, s, r, n, o, a, h, u, l, c) {
(this.dn = t),
(this.C = e),
(this.Yh = i),
(this.Qh = i),
(this.As = s),
(this.T = r),
(this.B = n),
(this.yn = o),
(this.fn = o),
(this.Ia = a),
(this.Xh = h),
(this.Vh = a),
(this.$h = u),
(this.Zh = u),
(this.appVersion = l),
(this.$a = c),
(this.Za = (t) => (null == t ? "" : `${t} `)),
(this.wn = t),
(this.vu = c),
(this.Ru = (t) => (null == t ? "" : `${t} `)),
(this.dn = t),
(this.C = e),
(this.Yh = i),
(this.Qh = i),
(this.As = s),
(this.T = r),
(this.B = n),
(this.yn = o),
(this.fn = o),
(this.Ia = a),
(this.Xh = h),
(this.Vh = a),
(this.$h = u),
(this.Zh = u),
(this.appVersion = l),
(this.$a = c),
(this.Ru = ["npm"]);
(this.vu = c),
(this.gu = ["npm"]);
}
H(e, i = !1, s = !1) {
const r = this.wn.ce(!s),
n = r.Zr(),
o = this.C.ps(t.bs.Xa);
const r = this.dn.ce(!s),
n = r.Qr(),
o = this.C.vs(t.gs.$a);
ii(o, n) || (e.device = n),
(e.api_key = this.yn),
(e.api_key = this.fn),
(e.time = L(new Date().valueOf(), !0));
const h = this.C.ps(t.bs.qu) || [],
a = this.C.ps(t.bs.Au) || "";
if (
(this.Ru.length > 0 &&
(!ii(h, this.Ru) || a !== this.T.Ss()) &&
(e.sdk_metadata = this.Ru),
(e.sdk_version = this.Vh),
this.$h && (e.sdk_flavor = this.$h),
const a = this.C.vs(t.gs.qu) || [],
h = this.C.vs(t.gs.Au) || "";
this.gu.length > 0 &&
(!ii(a, this.gu) || h !== this.T.Ss()) &&
(e.sdk_metadata = this.gu),
(e.sdk_version = this.Xh),
this.Zh && (e.sdk_flavor = this.Zh),
(e.app_version = this.appVersion),
(e.app_version_code = this.$a),
(e.device_id = r.id),
i)
) {
const t = this.As.getUserId();
null != t && (e.user_id = t);
}
if (!e.user_id && !this.Yh.jh()) {
const t = Yt(this.C);
(e.app_version_code = this.vu),
(e.device_id = r.id);
const u = this.As.getUserId();
if ((i && null !== u && (e.user_id = u), !u && !this.Qh.jh())) {
const t = Ht(this.C);
t && (e.alias = t);

@@ -79,3 +78,3 @@ }

let e;
this.Yh.Jh();
this.Qh.Jh();
const r = { errorCode: s.error_code };

@@ -92,3 +91,3 @@ for (const t of i)

: (e = `with error code ${s.error_code}.`),
this.Yh.jh() ||
this.Qh.jh() ||
(e +=

@@ -98,3 +97,3 @@ ' Please use the "enableSdkAuthentication" initialization option to enable authentication.'),

this.Du(t.events || [], t.attributes || []),
this.Yh.Gh(r),
this.Qh.Gh(r),
!1

@@ -107,24 +106,24 @@ );

switch (s) {
case Xt.Tu:
case qt.ku:
return (
(i = "Received successful response with empty body."),
c.ds(d.Li, { e: i }),
c.cs(d.Tu, { e: i }),
N.info(i),
!1
);
case Xt.ku:
case qt.yu:
return (
(i = "Received successful response with invalid JSON"),
c.ds(d.Li, { e: i + ": " + e.response }),
c.cs(d.Tu, { e: i + ": " + e.response }),
N.info(i),
!1
);
case Xt.Su:
s = `The API key "${t.api_key}" is invalid for the baseUrl ${this.Xh}`;
case qt.Nu:
s = `The API key "${t.api_key}" is invalid for the baseUrl ${this.Ia}`;
break;
case Xt.Bu:
case qt.wu:
s =
"Sorry, we are not currently accepting your requests. If you think this is in error, please contact us.";
break;
case Xt.wu:
case qt.Cu:
s = "No device identifier. Please contact support@braze.com";

@@ -136,10 +135,10 @@ }

}
zu(t, e, i, s) {
Su(t, e, i, s) {
return !!((t && 0 !== t.length) || (e && 0 !== e.length) || i || s);
}
ju(t, e, i, s, r = !1) {
Bu(t, e, i, s, r = !1) {
const n = [],
o = (t) => t || "",
a = o(this.As.getUserId());
let u = this.Yr(t, e);
let u = this.Lr(t, e);
const l = [],

@@ -152,3 +151,3 @@ c = [];

for (const e of i) {
if (((d = e.Zr()), this.Yh.jh())) {
if (((d = e.Qr()), this.Qh.jh())) {
if (a && !d.user_id) {

@@ -170,12 +169,12 @@ f || (f = {}), f.events || (f.events = []), f.events.push(d);

for (const e of s)
e && (this.Yh.jh() && o(e.user_id) !== a ? l.push(e) : t.push(e));
e && (this.Qh.jh() && o(e.user_id) !== a ? l.push(e) : t.push(e));
t.length > 0 && (u.attributes = t);
}
if ((this.Du(c, l), (u = this.H(u, !0, r)), f)) {
if ((this.Du(c, l), (u = this.H(u, !1, r)), f)) {
f = this.H(f, !1, r);
const t = { requestData: f, headers: this.J(f, h.O.Xu) };
const t = { requestData: f, headers: this.J(f, h.O.zu) };
n.push(t);
}
if (u && !this.zu(u.events, u.attributes, t, e)) return f ? n : null;
const m = { requestData: u, headers: this.J(u, h.O.Xu) };
if (u && !this.Su(u.events, u.attributes, t, e)) return f ? n : null;
const m = { requestData: u, headers: this.J(u, h.O.zu) };
return n.push(m), n;

@@ -188,9 +187,9 @@ }

const t = ve.fromJson(i);
(t.time = Kt(t.time)), e.push(t);
(t.time = Xt(t.time)), e.push(t);
}
this.C.Eo(e);
this.C.Go(e);
}
if (e) for (const t of e) this.C.$u(t);
if (e) for (const t of e) this.C.ju(t);
}
rs(t, e) {
ns(t, e) {
let i = "HTTP error ";

@@ -200,18 +199,18 @@ null != t && (i += t + " "), (i += e), N.error(i);

zr(t) {
return c.ds(d.Mu, { n: t });
return c.cs(d.Mu, { n: t });
}
Yr(t, e, i) {
Lr(t, e, i) {
const s = {};
t && (s.feed = !0), e && (s.triggers = !0);
const r = null != i ? i : this.As.getUserId();
if ((r && (s.user_id = r), !s.user_id && !this.Yh.jh())) {
const t = Yt(this.C);
if ((r && (s.user_id = r), !s.user_id && !this.Qh.jh())) {
const t = Ht(this.C);
t && (s.alias = t);
}
return (s.config = { config_time: this.B.Es() }), { respond_with: s };
return (s.config = { config_time: this.B.Us() }), { respond_with: s };
}
Lu(t) {
Xu(t) {
const e = new Date().valueOf();
let i = Ht.toString();
const s = h.Eu(this.C, t);
let i = $t.toString();
const s = h.$u(this.C, t);
if (-1 !== s) {

@@ -222,38 +221,38 @@ i = (e - s).toString();

}
J(e, i, s = !1) {
const r = [["X-Braze-Api-Key", this.yn]],
n = this.Lu(i);
r.push(["X-Braze-Last-Req-Ms-Ago", n]);
const o = h.Fu(this.C, i).toString();
r.push(["X-Braze-Req-Attempt", o]);
let a = !1;
J(t, e, i = !1) {
const s = [["X-Braze-Api-Key", this.fn]],
r = this.Xu(e);
s.push(["X-Braze-Last-Req-Ms-Ago", r]);
const n = h.Fu(this.C, e).toString();
s.push(["X-Braze-Req-Attempt", n]);
let o = !1;
if (
(null != e.respond_with &&
e.respond_with.triggers &&
(r.push(["X-Braze-TriggersRequest", "true"]), (a = !0)),
null != e.respond_with &&
e.respond_with.feed &&
(r.push(["X-Braze-FeedRequest", "true"]), (a = !0)),
i === h.O.Pi)
(null != t.respond_with &&
t.respond_with.triggers &&
(s.push(["X-Braze-TriggersRequest", "true"]), (o = !0)),
null != t.respond_with &&
t.respond_with.feed &&
(s.push(["X-Braze-FeedRequest", "true"]), (o = !0)),
e === h.O.Ai)
) {
r.push(["X-Braze-ContentCardsRequest", "true"]);
let e = this.C.ps(t.bs.Fi);
(e && s) || ((e = 0), this.C.js(t.bs.Fi, e)),
r.push(["BRAZE-SYNC-RETRY-COUNT", e.toString()]),
(a = !0);
s.push(["X-Braze-ContentCardsRequest", "true"]);
let t = h.Fu(this.C, h.O.Ai);
(t && !i) || ((t = 1), h.Lu(this.C, h.O.Ai, t));
const e = Math.max(0, t - 1);
s.push(["BRAZE-SYNC-RETRY-COUNT", e.toString()]), (o = !0);
}
if (
(i === h.O.De &&
(r.push(["X-Braze-FeatureFlagsRequest", "true"]), (a = !0)),
a && r.push(["X-Braze-DataRequest", "true"]),
this.Yh.jh())
(e === h.O.Ue &&
(s.push(["X-Braze-FeatureFlagsRequest", "true"]), (o = !0)),
o && s.push(["X-Braze-DataRequest", "true"]),
this.Qh.jh())
) {
const t = this.Yh.xh();
null != t && r.push(["X-Braze-Auth-Signature", t]);
const t = this.Qh.xh();
null != t && s.push(["X-Braze-Auth-Signature", t]);
}
return r;
return s;
}
Ku(t, e, i, s) {
Eu(t, e, i, s) {
window.setTimeout(() => {
N.info(`Retrying rate limited ${this.Za(s)}SDK request.`),
N.info(`Retrying rate limited ${this.Ru(s)}SDK request.`),
this.V(e, i, s);

@@ -263,58 +262,96 @@ }, t);

V(e, i, s, r) {
if (!this.Iu(s))
if (!this.Ku(s))
return (
N.info(`${this.Za(s)}SDK request being rate limited.`),
N.info(`${this.Ru(s)}SDK request being rate limited.`),
void ("function" == typeof r && r())
);
const n = this.Pu();
if (!n.Uu)
const n = this.Iu();
if (!n.Pu)
return (
N.info(
`${this.Za(
`${this.Ru(
s,
)}SDK request being rate limited. Request will be retried in ${Math.trunc(
n.Ou / 1e3,
n.Uu / 1e3,
)} seconds.`,
),
void this.Ku(n.Ou, e, i, s)
void this.Eu(n.Uu, e, i, s)
);
this.C.js(t.bs.xu, new Date().valueOf());
this.C.Bs(t.gs.xu, new Date().valueOf());
const o = e.device;
o && o.os_version instanceof Promise
? o.os_version.then((t) => {
(e.device.os_version = t), i(n.Gu);
(e.device.os_version = t), i(n.Hu);
})
: i(n.Gu);
: i(n.Hu);
}
Hu(e) {
Ou(t) {
const e = t ? Yt(t) : null;
if (!e || !e["retry-after"]) return null;
const i = e["retry-after"];
if (isNaN(i) && !isNaN(Date.parse(i)))
return { type: "date", value: Date.parse(i) };
if (!isNaN(parseFloat(i.toString())))
return { type: "timestamp", value: 1e3 * parseFloat(i.toString()) };
{
const t =
"Received unexpected value for retry-after header in /sync response";
c.cs(d.Tu, { e: t + ": " + i });
}
return null;
}
os(t, e, i, s, r, n) {
if (h.Fu(this.C, i) >= Kt) return;
let o;
n = n || 0;
const a = this.Ou(t);
r();
const u = (t) => {
const r = window.setTimeout(() => {
e();
}, t);
s(r), h.Gu(this.C, i);
};
if (a && !isNaN(a.value)) {
switch (a.type) {
case "date":
(o = a.value - new Date().getTime() + n), o < 0 && e();
break;
case "timestamp":
o = a.value + n;
}
u(o);
} else n ? u(n) : h.zi(this.C, i);
}
_u(e) {
var i;
null === (i = this.C) || void 0 === i || i.js(t.bs._u, e);
null === (i = this.C) || void 0 === i || i.Bs(t.gs.Wu, e);
}
Wu(e, i) {
let s = this.Yu();
null == s && (s = {}), (s[e] = i), this.C.js(t.bs.Ju, s);
Yu(e, i) {
let s = this.Ju();
null == s && (s = {}), (s[e] = i), this.C.Bs(t.gs.Qu, s);
}
Qu() {
Vu() {
var e;
return null === (e = this.C) || void 0 === e ? void 0 : e.ps(t.bs._u);
return null === (e = this.C) || void 0 === e ? void 0 : e.vs(t.gs.Wu);
}
Yu() {
Ju() {
var e;
return null === (e = this.C) || void 0 === e ? void 0 : e.ps(t.bs.Ju);
return null === (e = this.C) || void 0 === e ? void 0 : e.vs(t.gs.Qu);
}
Vu(t, e, i, s, r = "") {
Zu(t, e, i, s, r = "") {
let n;
if (r) {
const t = this.Yu();
const t = this.Ju();
n = null == t || isNaN(t[r]) ? e : t[r];
} else (n = this.Qu()), (null == n || isNaN(n)) && (n = e);
} else (n = this.Vu()), (null == n || isNaN(n)) && (n = e);
const o = (t - s) / 1e3;
return (n = Math.min(n + o / i, e)), n;
}
Zu(t, e) {
tl(t, e) {
return Math.max(0, (1 - t) * e * 1e3);
}
tl(e, i = "") {
el(e, i = "") {
var s, r, n, o, a;
const u = { Uu: !0, Gu: -1, Ou: 0 };
const u = { Pu: !0, Hu: -1, Uu: 0 };
if ((null == e && (e = !0), !e && !i)) return u;

@@ -324,5 +361,5 @@ let l,

d = null;
if (e) d = null === (s = this.C) || void 0 === s ? void 0 : s.ps(t.bs.xu);
if (e) d = null === (s = this.C) || void 0 === s ? void 0 : s.vs(t.gs.xu);
else {
const t = h.el(this.C);
const t = h.il(this.C);
if (null == t || null == t[i]) return u;

@@ -335,8 +372,8 @@ d = t[i];

? ((l =
(null === (r = this.B) || void 0 === r ? void 0 : r.il()) || -1),
(c = (null === (n = this.B) || void 0 === n ? void 0 : n.sl()) || -1))
(null === (r = this.B) || void 0 === r ? void 0 : r.sl()) || -1),
(c = (null === (n = this.B) || void 0 === n ? void 0 : n.rl()) || -1))
: ((l =
(null === (o = this.B) || void 0 === o ? void 0 : o.rl(i)) || -1),
(null === (o = this.B) || void 0 === o ? void 0 : o.ol(i)) || -1),
(c =
(null === (a = this.B) || void 0 === a ? void 0 : a.ol(i)) || -1)),
(null === (a = this.B) || void 0 === a ? void 0 : a.al(i)) || -1)),
-1 === l || -1 === c)

@@ -346,26 +383,26 @@ )

const f = new Date().valueOf();
let m = this.Vu(f, l, c, d, i);
let m = this.Zu(f, l, c, d, i);
return m < 1
? ((u.Uu = !1), (u.Ou = this.Zu(m, c)), u)
? ((u.Pu = !1), (u.Uu = this.tl(m, c)), u)
: ((m = Math.trunc(m) - 1),
(u.Gu = m),
e ? this.Hu(m) : this.Wu(i, m),
(u.Hu = m),
e ? this._u(m) : this.Yu(i, m),
u);
}
Pu() {
return this.tl(!0);
Iu() {
return this.el(!0);
}
Iu(t) {
const e = this.tl(!1, t);
return !(e && !e.Uu);
Ku(t) {
const e = this.el(!1, t);
return !(e && !e.Pu);
}
es() {
this.Yh.es();
this.Qh.es();
}
Z() {
return this.Xh;
return this.Ia;
}
addSdkMetadata(t) {
for (const e of t) -1 === this.Ru.indexOf(e) && this.Ru.push(e);
for (const e of t) -1 === this.gu.indexOf(e) && this.gu.push(e);
}
}

@@ -6,28 +6,28 @@ import { STORAGE_KEYS as t } from "./storage-manager.js";

import { EventTypes as d } from "../../shared-lib/index.js";
export default class Dt {
export default class Mt {
constructor(t) {
(this.C = t),
(this.C = t),
(this.al = new u()),
(this.hl = new u()),
(this.ul = new u()),
(this.cl = new u()),
(this.ml = null),
(this.gl = null);
(this.ml = new u()),
(this.gl = null),
(this.bl = null);
}
bl() {
if (null == this.gl) {
const e = this.C.ps(t.bs.fl);
this.gl = null != e ? Jt.Qn(e) : new Jt();
fl() {
if (null == this.bl) {
const e = this.C.vs(t.gs.dl);
this.bl = null != e ? Jt.Yn(e) : new Jt();
}
return this.gl;
return this.bl;
}
Es() {
return this.bl().dl;
Us() {
return this.fl().Rl;
}
Rl(e) {
Cl(e) {
if (null != e && null != e.config) {
const i = e.config;
if (i.time > this.bl().dl) {
const e = (t) => (null == t ? this.bl().Cl : t),
if (i.time > this.fl().Rl) {
const e = (t) => (null == t ? this.fl().El : t),
s = new Jt(

@@ -46,75 +46,75 @@ i.time,

let n = !1;
null != s.El && this.Gn() !== s.El && (n = !0);
null != s.vl && this.Cn() !== s.vl && (n = !0);
let r = !1;
null != s.vl.enabled && this.Xi() !== s.vl.enabled && (r = !0);
null != s.wl.enabled && this.Fi() !== s.wl.enabled && (r = !0);
let l = !1;
null != s.Gi.enabled && this.Qi() !== s.Gi.enabled && (l = !0);
null != s.je.enabled && this.De() !== s.je.enabled && (l = !0);
let a = !1;
null != s.banners.enabled &&
this.Us() !== s.banners.enabled &&
this.Ds() !== s.banners.enabled &&
(a = !0),
(this.gl = s),
this.C.js(t.bs.fl, s.Bs()),
n && this.al.X(),
r && this.hl.X(),
l && this.ul.X(),
a && this.cl.X();
(this.bl = s),
this.C.Bs(t.gs.dl, s.bs()),
n && this.hl.X(),
r && this.ul.X(),
l && this.cl.X(),
a && this.ml.X();
}
}
}
Hn(t) {
const e = this.al.Ns(t);
return this.ml && this.al.removeSubscription(this.ml), (this.ml = e), e;
Fn(t) {
const e = this.hl.Fs(t);
return this.gl && this.hl.removeSubscription(this.gl), (this.gl = e), e;
}
$i(t) {
return this.hl.Ns(t);
qi(t) {
return this.ul.Fs(t);
}
Re(t) {
return this.ul.Ns(t);
Me(t) {
return this.cl.Fs(t);
}
A(t) {
return this.cl.Ns(t);
return this.ml.Fs(t);
}
ge(t) {
return -1 !== this.bl().wl.indexOf(t);
return -1 !== this.fl().yl.indexOf(t);
}
hu(t) {
return -1 !== this.bl().yl.indexOf(t);
return -1 !== this.fl().Ll.indexOf(t);
}
Dr(t) {
return -1 !== this.bl().Ll.indexOf(t);
return -1 !== this.fl().Bl.indexOf(t);
}
Bl() {
return this.bl().Fl;
Fl() {
return this.fl().Tl;
}
Gn() {
return this.bl().El;
Cn() {
return this.fl().vl;
}
Xi() {
return this.bl().vl.enabled || !1;
Fi() {
return this.fl().wl.enabled || !1;
}
Tl() {
const t = this.bl().Cl;
jl() {
const t = this.fl().El;
return !(!t || null == t.enabled) && t.enabled;
}
il() {
if (!this.Tl()) return -1;
const t = this.bl().Cl;
sl() {
if (!this.jl()) return -1;
const t = this.fl().El;
return null == t.capacity || t.capacity < 10 ? -1 : t.capacity;
}
sl() {
if (!this.Tl()) return -1;
const t = this.bl().Cl;
rl() {
if (!this.jl()) return -1;
const t = this.fl().El;
return null == t.refill_rate || t.refill_rate <= 0 ? -1 : t.refill_rate;
}
jl(t) {
const e = this.bl().Cl.endpoint_overrides;
Nl(t) {
const e = this.fl().El.endpoint_overrides;
return null == e ? null : e[t];
}
rl(t) {
const e = this.jl(t);
ol(t) {
const e = this.Nl(t);
return null == e || isNaN(e.capacity) || e.capacity <= 0 ? -1 : e.capacity;
}
ol(t) {
const e = this.jl(t);
al(t) {
const e = this.Nl(t);
return null == e || isNaN(e.refill_rate) || e.refill_rate <= 0

@@ -124,16 +124,16 @@ ? -1

}
Qi() {
return this.bl().Gi.enabled && null == this.Se()
? (c.ds(d.Li, { e: "Missing feature flag refresh_rate_limit." }), !1)
: this.bl().Gi.enabled || !1;
De() {
return this.fl().je.enabled && null == this.Xe()
? (c.cs(d.Tu, { e: "Missing feature flag refresh_rate_limit." }), !1)
: this.fl().je.enabled || !1;
}
Se() {
return this.bl().Gi.refresh_rate_limit;
Xe() {
return this.fl().je.refresh_rate_limit;
}
Us() {
return this.bl().banners.enabled || !1;
Ds() {
return this.fl().banners.enabled || !1;
}
ee() {
return this.bl().banners.max_placements || 0;
return this.fl().banners.max_placements || 0;
}
}

@@ -10,3 +10,3 @@ import { STORAGE_KEYS as t } from "../managers/storage-manager.js";

} from "../../shared-lib/index.js";
export default class Mt {
export default class Wt {
constructor(s, t, i, e) {

@@ -34,29 +34,29 @@ (this.C = s),

Dl(s, t) {
return new ve(this.As.getUserId(), d.Gl, s, t.eu, { d: L(s - t.Nl) });
return new ve(this.As.getUserId(), d.Gl, s, t.eu, { d: L(s - t.zl) });
}
Ss() {
const s = this.C.tu(t.iu.zl);
const s = this.C.tu(t.iu.Hl);
return null == s ? null : s.eu;
}
Hl() {
Wl() {
const s = new Date().valueOf(),
i = this.B.Bl();
i = this.B.Fl();
if (null == i) return !1;
const e = this.C.ps(t.bs.Wl),
const e = this.C.vs(t.gs.kl),
n = null == e || s - e > 1e3 * i;
return n && this.C.js(t.bs.Wl, s), n;
return n && this.C.Bs(t.gs.kl, s), n;
}
kl(s, t) {
return null == t || null == t.ql || (!(s - t.Nl < this.xl) && t.ql < s);
ql(s, t) {
return null == t || null == t.Al || (!(s - t.zl < this.xl) && t.Al < s);
}
qo() {
Eo() {
const s = new Date().valueOf(),
i = s + 1e3 * this.Sl,
e = this.C.tu(t.iu.zl);
if (this.kl(s, e)) {
e = this.C.tu(t.iu.Hl);
if (this.ql(s, e)) {
let n = "Generating session start event with time " + s;
if (null != e) {
let s = e.Al;
s - e.Nl < this.xl && (s = e.Nl + this.xl),
this.C.Il(this.Dl(s, e)),
let s = e.Il;
s - e.zl < this.xl && (s = e.zl + this.xl),
this.C.Jl(this.Dl(s, e)),
(n += " (old session ended " + s + ")");

@@ -66,13 +66,13 @@ }

const o = new _t(G.Rt(), i);
this.C.Il(new ve(this.As.getUserId(), d.Jl, s, o.eu)),
this.C.uu(t.iu.zl, o);
return null == this.C.ps(t.bs.Wl) && this.C.js(t.bs.Wl, s), o.eu;
this.C.Jl(new ve(this.As.getUserId(), d.Kl, s, o.eu)),
this.C.uu(t.iu.Hl, o);
return null == this.C.vs(t.gs.kl) && this.C.Bs(t.gs.kl, s), o.eu;
}
if (null != e) return (e.Al = s), (e.ql = i), this.C.uu(t.iu.zl, e), e.eu;
if (null != e) return (e.Il = s), (e.Al = i), this.C.uu(t.iu.Hl, e), e.eu;
}
Kl() {
const s = this.C.tu(t.iu.zl);
Ml() {
const s = this.C.tu(t.iu.Hl);
null != s &&
(this.C.Ml(t.iu.zl), this.C.Il(this.Dl(new Date().valueOf(), s)));
(this.C.Ol(t.iu.Hl), this.C.Jl(this.Dl(new Date().valueOf(), s)));
}
}
import ne, { STORAGE_KEYS as t } from "./storage-manager.js";
import { logger as N } from "../../shared-lib/index.js";
const Wt = {
La: function (e, o = !1) {
const Bt = {
Va: function (e, o = !1) {
let r = !1;

@@ -9,5 +9,5 @@ try {

try {
localStorage.setItem(t.bs.ec, "true"),
localStorage.getItem(t.bs.ec) &&
(localStorage.removeItem(t.bs.ec), (r = !0));
localStorage.setItem(t.gs.ec, "true"),
localStorage.getItem(t.gs.ec) &&
(localStorage.removeItem(t.gs.ec), (r = !0));
} catch (e) {

@@ -28,6 +28,6 @@ if (

}
const a = Wt.oc(),
n = new ne.tc(e, a && !o, r);
const a = Bt.oc(),
n = new ne.rc(e, a && !o, r);
let c;
return (c = r ? new ne.rc(e) : new ne.ac()), new ne(n, c);
return (c = r ? new ne.ac(e) : new ne.nc()), new ne(n, c);
},

@@ -44,2 +44,2 @@ oc: function () {

};
export default Wt;
export default Bt;

@@ -16,6 +16,6 @@ import ve from "../models/braze-event.js";

su: "ab.storage.userId",
Qo: "ab.storage.deviceId",
zl: "ab.storage.sessionId",
$h: "ab.storage.deviceId",
Hl: "ab.storage.sessionId",
},
bs: {
gs: {
ec: "ab.test",

@@ -25,18 +25,18 @@ tE: "ab.storage.events",

sE: "ab.storage.attributes.anonymous_user",
Xa: "ab.storage.device",
$a: "ab.storage.device",
qu: "ab.storage.sdk_metadata",
Au: "ab.storage.session_id_for_cached_metadata",
Kn: "ab.storage.pushToken",
Be: "ab.storage.newsFeed",
Ge: "ab.storage.lastNewsFeedRefresh",
Bn: "ab.storage.pushToken",
Hi: "ab.storage.newsFeed",
Ji: "ab.storage.lastNewsFeedRefresh",
Ct: "ab.storage.cardImpressions",
fl: "ab.storage.serverConfig",
dl: "ab.storage.serverConfig",
rE: "ab.storage.triggers",
oE: "ab.storage.triggers.ts",
Wl: "ab.storage.messagingSessionStart",
wi: "ab.storage.cc",
gi: "ab.storage.ccLastFullSync",
yi: "ab.storage.ccLastCardUpdated",
_u: "ab.storage.globalRateLimitCurrentTokenCount",
Ju: "ab.storage.dynamicRateLimitCurrentTokenCount",
kl: "ab.storage.messagingSessionStart",
di: "ab.storage.cc",
bi: "ab.storage.ccLastFullSync",
vi: "ab.storage.ccLastCardUpdated",
Wu: "ab.storage.globalRateLimitCurrentTokenCount",
Qu: "ab.storage.dynamicRateLimitCurrentTokenCount",
ot: "ab.storage.ccClicks",

@@ -49,15 +49,15 @@ vt: "ab.storage.ccImpressions",

qh: "ab.storage.signature",
Fi: "ab.storage.brazeSyncRetryCount",
Di: "ab.storage.sdkVersion",
Yi: "ab.storage.ff",
we: "ab.storage.ffImpressions",
ke: "ab.storage.ffLastRefreshAt",
xe: "ab.storage.ff.sessionId",
EE: "ab.storage.lastReqToEndpoint",
lE: "ab.storage.requestAttempts",
cn: "ab.storage.deferredIam",
EE: "ab.storage.brazeSyncRetryCount",
yi: "ab.storage.sdkVersion",
xe: "ab.storage.ff",
$e: "ab.storage.ffImpressions",
Je: "ab.storage.ffLastRefreshAt",
Ae: "ab.storage.ff.sessionId",
lE: "ab.storage.lastReqToEndpoint",
SE: "ab.storage.requestAttempts",
on: "ab.storage.deferredIam",
xu: "ab.storage.lastSdkReq",
SE: "ab.storage.alias",
gs: "ab.storage.banners",
xs: "ab.storage.banners.impressions",
_E: "ab.storage.alias",
ps: "ab.storage.banners",
ks: "ab.storage.banners.impressions",
ys: "ab.storage.banners.sessionId",

@@ -69,5 +69,5 @@ },

constructor(t, e) {
(this._E = t), (this.uE = e), (this._E = t), (this.uE = e);
(this.uE = t), (this.cE = e), (this.uE = t), (this.cE = e);
}
Ua(t) {
Fa(t) {
const e = y(STORAGE_KEYS.iu),

@@ -79,10 +79,10 @@ s = new ne.ne(t);

let s = null;
null != e && e instanceof _t && (s = e.Bs()), this._E.store(t, s);
null != e && e instanceof _t && (s = e.bs()), this.uE.store(t, s);
}
cE(t) {
TE(t) {
const e = this.tu(t);
null != e && ((e.Al = new Date().valueOf()), this.uu(t, e));
null != e && ((e.Il = new Date().valueOf()), this.uu(t, e));
}
tu(t) {
const e = this._E.gr(t),
const e = this.uE.gr(t),
s = ((t) => {

@@ -98,13 +98,13 @@ let e;

let r;
if (s) (r = _t.Qn(s) || null), r && this.uu(t, r);
if (s) (r = _t.Yn(s) || null), r && this.uu(t, r);
else {
const s = _t.TE(e);
(r = _t.Qn(s) || null), s !== e && r && this.uu(t, r);
const s = _t.hE(e);
(r = _t.Yn(s) || null), s !== e && r && this.uu(t, r);
}
return r;
}
Ml(t) {
this._E.remove(t);
Ol(t) {
this.uE.remove(t);
}
Wa() {
Ka() {
const t = y(STORAGE_KEYS.iu);

@@ -116,17 +116,17 @@ let e;

}
Eo(t) {
Go(t) {
let e;
if (null == t || 0 === t.length) return !1;
e = w(t) ? t : [t];
let s = this.uE.gr(STORAGE_KEYS.bs.tE);
let s = this.cE.gr(STORAGE_KEYS.gs.tE);
(null != s && w(s)) || (s = []);
for (let t = 0; t < e.length; t++) s.push(e[t].Bs());
return this.uE.store(STORAGE_KEYS.bs.tE, s);
for (let t = 0; t < e.length; t++) s.push(e[t].bs());
return this.cE.store(STORAGE_KEYS.gs.tE, s);
}
Il(t) {
return null != t && this.Eo([t]);
Jl(t) {
return null != t && this.Go([t]);
}
hE() {
let t = this.uE.gr(STORAGE_KEYS.bs.tE);
this.uE.remove(STORAGE_KEYS.bs.tE), null == t && (t = []);
AE() {
let t = this.cE.gr(STORAGE_KEYS.gs.tE);
this.cE.remove(STORAGE_KEYS.gs.tE), null == t && (t = []);
const e = [];

@@ -137,3 +137,3 @@ let s = !1,

for (let s = 0; s < t.length; s++)
ve.AE(t[s]) ? e.push(ve.Qn(t[s])) : (r = s);
ve.RE(t[s]) ? e.push(ve.Yn(t[s])) : (r = s);
else s = !0;

@@ -151,34 +151,34 @@ if (s || null != r) {

JSON.stringify(t)),
e.push(new ve(null, d.Li, new Date().valueOf(), null, { e: o }));
e.push(new ve(null, d.Tu, new Date().valueOf(), null, { e: o }));
}
return e;
}
js(t, e) {
Bs(t, e) {
return (
!!ta(
STORAGE_KEYS.bs,
STORAGE_KEYS.gs,
t,
"StorageManager cannot store object.",
"STORAGE_KEYS.OBJECTS",
) && this.uE.store(t, e)
) && this.cE.store(t, e)
);
}
ps(t) {
vs(t) {
return (
!!ta(
STORAGE_KEYS.bs,
STORAGE_KEYS.gs,
t,
"StorageManager cannot retrieve object.",
"STORAGE_KEYS.OBJECTS",
) && this.uE.gr(t)
) && this.cE.gr(t)
);
}
Ls(t) {
Es(t) {
return (
!!ta(
STORAGE_KEYS.bs,
STORAGE_KEYS.gs,
t,
"StorageManager cannot remove object.",
"STORAGE_KEYS.OBJECTS",
) && (this.uE.remove(t), !0)
) && (this.cE.remove(t), !0)
);

@@ -188,32 +188,32 @@ }

const t = y(STORAGE_KEYS.iu),
e = y(STORAGE_KEYS.bs);
e = y(STORAGE_KEYS.gs);
for (let e = 0; e < t.length; e++) {
const s = t[e];
this._E.remove(STORAGE_KEYS.iu[s]);
this.uE.remove(STORAGE_KEYS.iu[s]);
}
for (let t = 0; t < e.length; t++) {
const s = e[t];
this.uE.remove(STORAGE_KEYS.bs[s]);
this.cE.remove(STORAGE_KEYS.gs[s]);
}
}
RE(t) {
return t || STORAGE_KEYS.bs.sE;
gE(t) {
return t || STORAGE_KEYS.gs.sE;
}
$u(t) {
let e = this.uE.gr(STORAGE_KEYS.bs.eE);
ju(t) {
let e = this.cE.gr(STORAGE_KEYS.gs.eE);
null == e && (e = {});
const s = this.RE(t[User.Cu]),
const s = this.gE(t[User.fu]),
r = e[s];
for (const o in t)
o !== User.Cu &&
o !== User.fu &&
(null == e[s] || (r && null == r[o])) &&
this.mu(t[User.Cu], o, t[o]);
this.mu(t[User.fu], o, t[o]);
}
mu(t, e, s) {
let r = this.uE.gr(STORAGE_KEYS.bs.eE);
let r = this.cE.gr(STORAGE_KEYS.gs.eE);
null == r && (r = {});
const o = this.RE(t);
const o = this.gE(t);
let n = r[o];
if (
(null == n && ((n = {}), null != t && (n[User.Cu] = t)), e === User.lu)
(null == n && ((n = {}), null != t && (n[User.fu] = t)), e === User.lu)
) {

@@ -223,7 +223,7 @@ null == n[e] && (n[e] = {});

} else n[e] = s;
return (r[o] = n), this.uE.store(STORAGE_KEYS.bs.eE, r);
return (r[o] = n), this.cE.store(STORAGE_KEYS.gs.eE, r);
}
gE() {
const t = this.uE.gr(STORAGE_KEYS.bs.eE);
this.uE.remove(STORAGE_KEYS.bs.eE);
OE() {
const t = this.cE.gr(STORAGE_KEYS.gs.eE);
this.cE.remove(STORAGE_KEYS.gs.eE);
const e = [];

@@ -234,32 +234,32 @@ for (const s in t) null != t[s] && e.push(t[s]);

ru(t) {
const e = this.uE.gr(STORAGE_KEYS.bs.eE);
const e = this.cE.gr(STORAGE_KEYS.gs.eE);
if (null != e) {
const s = this.RE(null),
const s = this.gE(null),
r = e[s];
null != r &&
((e[s] = void 0),
this.uE.store(STORAGE_KEYS.bs.eE, e),
(r[User.Cu] = t),
this.$u(r));
this.cE.store(STORAGE_KEYS.gs.eE, e),
(r[User.fu] = t),
this.ju(r));
}
const s = this.tu(STORAGE_KEYS.iu.zl);
const s = this.tu(STORAGE_KEYS.iu.Hl);
let r = null;
null != s && (r = s.eu);
const o = this.hE();
const o = this.AE();
if (null != o)
for (let e = 0; e < o.length; e++) {
const s = o[e];
null == s.userId && s.sessionId == r && (s.userId = t), this.Il(s);
null == s.userId && s.sessionId == r && (s.userId = t), this.Jl(s);
}
}
OE() {
return this.uE.IE;
IE() {
return this.cE.dE;
}
}
(ne.rc = class {
(ne.ac = class {
constructor(t) {
(this.yn = t), (this.yn = t), (this.IE = ro.dE() ? 3 : 10);
(this.fn = t), (this.fn = t), (this.dE = ro.fE() ? 3 : 10);
}
fE(t) {
return t + "." + this.yn;
bE(t) {
return t + "." + this.fn;
}

@@ -269,3 +269,3 @@ store(t, e) {

try {
return localStorage.setItem(this.fE(t), JSON.stringify(s)), !0;
return localStorage.setItem(this.bE(t), JSON.stringify(s)), !0;
} catch (t) {

@@ -278,3 +278,3 @@ return N.info("Storage failure: " + si(t)), !1;

let e = null;
const s = localStorage.getItem(this.fE(t));
const s = localStorage.getItem(this.bE(t));
return null != s && (e = JSON.parse(s)), null == e ? null : e.v;

@@ -287,3 +287,3 @@ } catch (t) {

try {
localStorage.removeItem(this.fE(t));
localStorage.removeItem(this.bE(t));
} catch (t) {

@@ -294,10 +294,10 @@ return N.info("Storage removal failure: " + si(t)), !1;

}),
(ne.ac = class {
(ne.nc = class {
constructor() {
(this.bE = {}), (this.KE = 5242880), (this.IE = 3);
(this.KE = {}), (this.mE = 5242880), (this.dE = 3);
}
store(t, e) {
const s = { value: e },
r = this.mE(e);
return r > this.KE
r = this.YE(e);
return r > this.mE
? (N.info(

@@ -307,8 +307,8 @@ "Storage failure: object is ≈" +

" bytes which is greater than the max of " +
this.KE,
this.mE,
),
!1)
: ((this.bE[t] = s), !0);
: ((this.KE[t] = s), !0);
}
mE(t) {
YE(t) {
const e = [],

@@ -331,7 +331,7 @@ s = [t];

gr(t) {
const e = this.bE[t];
const e = this.KE[t];
return null == e ? null : e.value;
}
remove(t) {
this.bE[t] = null;
this.KE[t] = null;
}

@@ -341,13 +341,13 @@ }),

constructor(t, e) {
(this.yn = t),
(this.YE = e),
(this.yn = t),
(this.NE = this.GE()),
(this.DE = 576e3),
(this.YE = !!e);
(this.fn = t),
(this.NE = e),
(this.fn = t),
(this.GE = this.DE()),
(this.CE = 576e3),
(this.NE = !!e);
}
fE(t) {
return null != this.yn ? t + "." + this.yn : t;
bE(t) {
return null != this.fn ? t + "." + this.fn : t;
}
GE() {
DE() {
let t = 0,

@@ -369,5 +369,5 @@ e = document.location.hostname;

const t = new Date();
return t.setTime(t.getTime() + 60 * this.DE * 1e3), t.getFullYear();
return t.setTime(t.getTime() + 60 * this.CE * 1e3), t.getFullYear();
}
CE() {
ME() {
const t = Rt(STORAGE_KEYS.iu),

@@ -386,3 +386,3 @@ e = document.cookie.split(";");

const t = r.split("=")[0];
-1 === t.indexOf("." + this.yn) && this.ME(t);
-1 === t.indexOf("." + this.fn) && this.pE(t);
}

@@ -392,10 +392,10 @@ }

store(t, e) {
this.CE();
this.ME();
const s = new Date();
s.setTime(s.getTime() + 60 * this.DE * 1e3);
s.setTime(s.getTime() + 60 * this.CE * 1e3);
const r = "expires=" + s.toUTCString(),
o = "domain=" + this.NE;
o = "domain=" + this.GE;
let n;
n = this.YE ? e : encodeURIComponent(e);
const a = this.fE(t) + "=" + n + ";" + r + ";" + o + ";path=/";
n = this.NE ? e : encodeURIComponent(e);
const a = this.bE(t) + "=" + n + ";" + r + ";" + o + ";path=/";
return a.length >= 4093

@@ -412,3 +412,3 @@ ? (N.info(

const e = [],
s = this.fE(t) + "=",
s = this.bE(t) + "=",
r = document.cookie.split(";");

@@ -421,3 +421,3 @@ for (let o = 0; o < r.length; o++) {

let t;
(t = this.YE
(t = this.NE
? n.substring(s.length, n.length)

@@ -437,27 +437,27 @@ : decodeURIComponent(n.substring(s.length, n.length))),

remove(t) {
this.ME(this.fE(t));
this.pE(this.bE(t));
}
ME(t) {
pE(t) {
const e = t + "=;expires=" + new Date(0).toUTCString();
(document.cookie = e), (document.cookie = e + ";path=/");
const s = e + ";domain=" + this.NE;
const s = e + ";domain=" + this.GE;
(document.cookie = s), (document.cookie = s + ";path=/");
}
}),
(ne.tc = class {
(ne.rc = class {
constructor(t, e, s) {
(this.yn = t),
(this.pE = []),
e && this.pE.push(new ne.ne(t)),
s && this.pE.push(new ne.rc(t)),
this.pE.push(new ne.ac());
(this.fn = t),
(this.vE = []),
e && this.vE.push(new ne.ne(t)),
s && this.vE.push(new ne.ac(t)),
this.vE.push(new ne.nc());
}
store(t, e) {
let s = !0;
for (let r = 0; r < this.pE.length; r++) s = this.pE[r].store(t, e) && s;
for (let r = 0; r < this.vE.length; r++) s = this.vE[r].store(t, e) && s;
return s;
}
gr(t) {
for (let e = 0; e < this.pE.length; e++) {
const s = this.pE[e].gr(t);
for (let e = 0; e < this.vE.length; e++) {
const s = this.vE[e].gr(t);
if (null != s) return s;

@@ -468,5 +468,5 @@ }

remove(t) {
new ne.ne(this.yn).remove(t);
for (let e = 0; e < this.pE.length; e++) this.pE[e].remove(t);
new ne.ne(this.fn).remove(t);
for (let e = 0; e < this.vE.length; e++) this.vE[e].remove(t);
}
});
import { Guid as G } from "../../shared-lib/index.js";
export default class u {
constructor() {
this.Ir = {};
this._i = {};
}
Ns(t) {
Fs(t) {
if ("function" != typeof t) return null;
const i = G.Rt();
return (this.Ir[i] = t), i;
return (this._i[i] = t), i;
}
removeSubscription(t) {
delete this.Ir[t];
delete this._i[t];
}
removeAllSubscriptions() {
this.Ir = {};
this._i = {};
}
ic() {
return Object.keys(this.Ir).length;
return Object.keys(this._i).length;
}
X(t) {
const i = [];
for (const s in this.Ir) {
const r = this.Ir[s];
for (const s in this._i) {
const r = this._i[s];
i.push(r(t));

@@ -25,0 +25,0 @@ }

import { STORAGE_KEYS as t } from "./storage-manager.js";
export function getAlias(e) {
const n = null == e ? void 0 : e.ps(t.bs.SE);
const n = null == e ? void 0 : e.vs(t.gs._E);
let o;
return n && (o = { label: n.l, name: n.a }), o;
}
export default {
Su: "invalid_api_key",
Bu: "blacklisted",
wu: "no_device_identifier",
ku: "invalid_json_response",
Tu: "empty_response",
Nu: "invalid_api_key",
wu: "blacklisted",
Cu: "no_device_identifier",
yu: "invalid_json_response",
ku: "empty_response",
__: "sdk_auth_error",
};
import r from "../managers/braze-instance.js";
import { getAlias as Yt } from "../managers/utils.js";
import { isObject as Ct } from "../util/code-utils.js";
import { getAlias as Ht } from "../managers/utils.js";
import { isObject as yt } from "../util/code-utils.js";
import {

@@ -21,3 +21,3 @@ convertMsToSeconds as L,

}
Zr() {
Qr() {
var t;

@@ -33,3 +33,3 @@ const s = {

if (!s.user_id && !i) {
const t = Yt(r.j());
const t = Ht(r.j());
t && (s.alias = t);

@@ -39,3 +39,3 @@ }

}
Bs() {
bs() {
return {

@@ -52,8 +52,8 @@ u: this.userId,

}
static AE(t) {
return null != t && Ct(t) && null != t.t && "" !== t.t;
static RE(t) {
return null != t && yt(t) && null != t.t && "" !== t.t;
}
static Qn(t) {
static Yn(t) {
return new ve(t.u, t.t, t.ts, t.s, t.d);
}
}

@@ -5,7 +5,7 @@ export default class Gt {

}
Zr() {
Qr() {
const s = {};
return (
null != this.browser && (s.browser = this.browser),
null != this.Ga && (s.browser_version = this.Ga),
null != this.Ha && (s.browser_version = this.Ha),
null != this.os && (s.os_version = this.os),

@@ -12,0 +12,0 @@ null != this.resolution && (s.resolution = this.resolution),

@@ -8,13 +8,13 @@ import { Guid as G, logger as N } from "../../shared-lib/index.js";

null == t && (t = G.Rt()),
!i || isNaN(i) ? (this.Nl = new Date().valueOf()) : (this.Nl = i),
!i || isNaN(i) ? (this.zl = new Date().valueOf()) : (this.zl = i),
(this.eu = t),
(this.Al = new Date().valueOf()),
(this.ql = e);
(this.Il = new Date().valueOf()),
(this.Al = e);
}
Bs() {
return `g:${encodeURIComponent(this.eu)}|e:${this.ql}|c:${this.Nl}|l:${
this.Al
bs() {
return `g:${encodeURIComponent(this.eu)}|e:${this.Al}|c:${this.zl}|l:${
this.Il
}`;
}
static TE(t) {
static hE(t) {
if ("string" != typeof t) return null;

@@ -30,3 +30,3 @@ const e = t.lastIndexOf("|e:"),

}
static Qn(t) {
static Yn(t) {
let e;

@@ -43,3 +43,3 @@ if ("string" == typeof t)

(e = new _t(decodeURIComponent(r(i[0])), n(i[1]), n(i[2]))),
(e.Al = n(i[3]));
(e.Il = n(i[3]));
} catch (e) {

@@ -52,3 +52,3 @@ N.info(

if (null == t || null == t.g) return null;
(e = new _t(t.g, t.e, t.c)), (e.Al = t.l);
(e = new _t(t.g, t.e, t.c)), (e.Il = t.l);
}

@@ -55,0 +55,0 @@ return e;

@@ -5,24 +5,24 @@ import { rehydrateDateAfterJsonization as V } from "../util/date-utils.js";

(this.endpoint = t),
(this.Ln = i),
(this.Mn = i),
(this.publicKey = s),
(this.Vl = l),
(this.El = h),
(this.vl = h),
(this.endpoint = t || null),
(this.Ln = i || null),
(this.Mn = i || null),
(this.publicKey = s || null),
(this.Vl = l || null),
(this.El = h || null);
(this.vl = h || null);
}
Bs() {
bs() {
return {
e: this.endpoint,
c: this.Ln,
c: this.Mn,
p: this.publicKey,
u: this.Vl,
v: this.El,
v: this.vl,
};
}
static Qn(t) {
static Yn(t) {
return new ti(t.e, V(t.c), t.p, t.u, t.v);
}
}

@@ -18,42 +18,42 @@ import {

) {
(this.dl = t),
(this.wl = i),
(this.yl = s),
(this.Ll = h),
(this.Fl = e),
(this.El = l),
(this.vl = r),
(this.Gi = a),
(this.Cl = n),
(this.Rl = t),
(this.yl = i),
(this.Ll = s),
(this.Bl = h),
(this.Tl = e),
(this.vl = l),
(this.wl = r),
(this.je = a),
(this.El = n),
(this.banners = o),
(this.dl = t),
(this.wl = i),
(this.yl = s),
(this.Ll = h),
(this.Fl = e),
(this.El = l),
(this.vl = r),
(this.Gi = a),
(this.Cl = n),
(this.Rl = t),
(this.yl = i),
(this.Ll = s),
(this.Bl = h),
(this.Tl = e),
(this.vl = l),
(this.wl = r),
(this.je = a),
(this.El = n),
(this.banners = o);
}
Bs() {
bs() {
return {
s: "5.6.1",
l: this.dl,
e: this.wl,
a: this.yl,
p: this.Ll,
m: this.Fl,
v: this.El,
c: this.vl,
f: this.Gi,
grl: this.Cl,
s: "5.7.0",
l: this.Rl,
e: this.yl,
a: this.Ll,
p: this.Bl,
m: this.Tl,
v: this.vl,
c: this.wl,
f: this.je,
grl: this.El,
b: this.banners,
};
}
static Qn(t) {
static Yn(t) {
let i = t.l;
return (
"5.6.1" !== t.s && (i = 0),
"5.7.0" !== t.s && (i = 0),
new Jt(i, t.e, t.a, t.p, t.m, t.v, t.c, t.f, t.grl, t.b)

@@ -60,0 +60,0 @@ );

import r from "../managers/braze-instance.js";
import yt from "./utils/push-utils.js";
import vt from "./utils/push-utils.js";
export function isPushBlocked() {
if (r.rr()) return yt.isPushBlocked();
if (r.rr()) return vt.isPushBlocked();
}
import r from "../managers/braze-instance.js";
import yt from "./utils/push-utils.js";
import vt from "./utils/push-utils.js";
export function isPushPermissionGranted() {
if (r.rr()) return yt.isPushPermissionGranted();
if (r.rr()) return vt.isPushPermissionGranted();
}
import r from "../managers/braze-instance.js";
import yt from "./utils/push-utils.js";
import vt from "./utils/push-utils.js";
export function isPushSupported() {
if (r.rr()) return yt.isPushSupported();
if (r.rr()) return vt.isPushSupported();
}

@@ -6,37 +6,37 @@ import { isArray as w, isEqual as ii } from "../util/code-utils.js";

import { User } from "../User/index.js";
import yt from "./utils/push-utils.js";
import vt from "./utils/push-utils.js";
import { getErrorMessage as si } from "../util/error-utils.js";
export default class na {
constructor(i, t, e, s, r, n, o, u, a, h, c) {
(this.bn = i),
(this.yn = t),
(this.wn = e),
(this.kn = r),
(this.Pn = n),
(this.Dn = o),
(this.cn = i),
(this.fn = t),
(this.dn = e),
(this.bn = r),
(this.yn = n),
(this.gn = o),
(this.B = u),
(this.Sn = a),
(this.An = h),
(this.vn = a),
(this.wn = h),
(this.C = c),
(this.bn = i),
(this.yn = t),
(this.wn = e),
(this.xn = s + "/safari/" + t),
(this.kn = r || "/service-worker.js"),
(this.Dn = o),
(this.cn = i),
(this.fn = t),
(this.dn = e),
(this.kn = s + "/safari/" + t),
(this.bn = r || "/service-worker.js"),
(this.gn = o),
(this.B = u),
(this.Sn = a || !1),
(this.An = h || !1),
(this.vn = a || !1),
(this.wn = h || !1),
(this.C = c),
(this.Nn = yt.Un()),
(this.Wn = yt._n());
(this.Pn = vt.Dn()),
(this.Sn = vt.An());
}
Tn() {
return this.An;
jn() {
return this.wn;
}
In(i, t, e, s, r) {
xn(i, t, e, s, r) {
i.unsubscribe()
.then((i) => {
i
? this.Vn(t, e, s, r)
? this.Nn(t, e, s, r)
: (N.error("Failed to unsubscribe device from push."),

@@ -50,3 +50,3 @@ "function" == typeof r && r(!1));

}
qn(i, t, e) {
Un(i, t, e) {
var s;

@@ -60,5 +60,5 @@ const r = ((i) => {

return (
e.zn &&
-1 === i.endpoint.indexOf(e.zn) &&
(t = i.endpoint + "/" + e.zn),
e.Wn &&
-1 === i.endpoint.indexOf(e.Wn) &&
(t = i.endpoint + "/" + e.Wn),
t

@@ -90,16 +90,16 @@ );

})(u);
null === (s = this.bn) || void 0 === s || s.En(r, t, n, o, a),
null === (s = this.cn) || void 0 === s || s._n(r, t, n, o, a),
r && "function" == typeof e && e(r, n, o);
}
Rn() {
Tn() {
var i;
null === (i = this.bn) || void 0 === i || i.Cn(!0);
null === (i = this.cn) || void 0 === i || i.In(!0);
}
Fn(i, t) {
Vn(i, t) {
var e;
null === (e = this.bn) || void 0 === e || e.Cn(!1),
null === (e = this.cn) || void 0 === e || e.In(!1),
N.info(i),
"function" == typeof t && t(!1);
}
On(i, t, e, s) {
qn(i, t, e, s) {
var r;

@@ -109,8 +109,8 @@ if ("default" === t.permission)

window.safari.pushNotification.requestPermission(
this.xn,
this.kn,
i,
{
api_key: this.yn,
api_key: this.fn,
device_id:
(null === (r = this.wn) || void 0 === r ? void 0 : r.ce().id) ||
(null === (r = this.dn) || void 0 === r ? void 0 : r.ce().id) ||
"",

@@ -120,15 +120,15 @@ },

"granted" === t.permission &&
this.bn &&
this.bn.setPushNotificationSubscriptionType(
this.cn &&
this.cn.setPushNotificationSubscriptionType(
User.NotificationSubscriptionTypes.OPTED_IN,
),
this.On(i, t, e, s);
this.qn(i, t, e, s);
},
);
} catch (i) {
this.Fn("Could not request permission for push: " + i, s);
this.Vn("Could not request permission for push: " + i, s);
}
else
"denied" === t.permission
? this.Fn(
? this.Vn(
"The user has blocked notifications from this site, or Safari push is not configured in the Braze dashboard.",

@@ -139,3 +139,3 @@ s,

(N.info("Device successfully subscribed to push."),
this.qn(t.deviceToken, new Date(), e));
this.Un(t.deviceToken, new Date(), e));
}

@@ -169,3 +169,3 @@ requestPermission(i, t, e) {

}
Vn(i, t, e, s) {
Nn(i, t, e, s) {
const r = { userVisibleOnly: !0 };

@@ -177,6 +177,6 @@ null != t && (r.applicationServerKey = t),

N.info("Device successfully subscribed to push."),
this.qn(i, new Date(), e);
this.Un(i, new Date(), e);
})
.catch((i) => {
yt.isPushBlocked()
vt.isPushBlocked()
? (N.info("Permission for push notifications was denied."),

@@ -188,6 +188,6 @@ "function" == typeof s && s(!1))

}
Bn() {
if (this.Sn) return navigator.serviceWorker.getRegistration(this.kn);
const i = this.Pn ? { scope: this.Pn } : void 0;
return navigator.serviceWorker.register(this.kn, i).then(() =>
zn() {
if (this.vn) return navigator.serviceWorker.getRegistration(this.bn);
const i = this.yn ? { scope: this.yn } : void 0;
return navigator.serviceWorker.register(this.bn, i).then(() =>
navigator.serviceWorker.ready.then(

@@ -205,12 +205,12 @@ (i) => (

}
Mn(i) {
this.Sn ||
En(i) {
this.vn ||
(i.unregister(), N.info("Service worker successfully unregistered."));
}
subscribe(i, e) {
if (!yt.isPushSupported())
return N.info(na.Yn), void ("function" == typeof e && e(!1));
if (this.Nn) {
if (!this.Sn && null != window.location) {
let i = this.kn;
if (!vt.isPushSupported())
return N.info(na.Rn), void ("function" == typeof e && e(!1));
if (this.Pn) {
if (!this.vn && null != window.location) {
let i = this.bn;
-1 === i.indexOf(window.location.host) &&

@@ -221,8 +221,8 @@ (i = window.location.host + i),

}
if (yt.isPushBlocked())
return void this.Fn(
if (vt.isPushBlocked())
return void this.Vn(
"Notifications from this site are blocked. This may be a temporary embargo or a permanent denial.",
e,
);
if (this.B && !this.B.Gn() && 0 === this.B.Es())
if (this.B && !this.B.Cn() && 0 === this.B.Us())
return (

@@ -232,3 +232,3 @@ N.info(

),
void this.B.Hn(() => {
void this.B.Fn(() => {
this.subscribe(i, e);

@@ -243,3 +243,3 @@ })

let i = "Permission for push notifications was ignored.";
yt.isPushBlocked() &&
vt.isPushBlocked() &&
(i +=

@@ -250,10 +250,10 @@ " The browser has automatically blocked further permission requests for a period (probably 1 week)."),

},
n = yt.isPushPermissionGranted(),
n = vt.isPushPermissionGranted(),
o = () => {
!n &&
this.bn &&
this.bn.setPushNotificationSubscriptionType(
this.cn &&
this.cn.setPushNotificationSubscriptionType(
User.NotificationSubscriptionTypes.OPTED_IN,
),
this.Bn()
this.zn()
.then((s) => {

@@ -276,3 +276,3 @@ if (null == s)

? void 0
: n.Gn()) && (o = ei.Jn(this.B.Gn())),
: n.Cn()) && (o = ei.On(this.B.Cn())),
r)

@@ -283,6 +283,6 @@ ) {

a = null;
if ((this.C && (n = this.C.ps(t.bs.Kn)), n && !w(n))) {
if ((this.C && (n = this.C.vs(t.gs.Bn)), n && !w(n))) {
let i;
try {
i = ti.Qn(n).Ln;
i = ti.Yn(n).Mn;
} catch (t) {

@@ -311,3 +311,3 @@ i = null;

),
this.In(r, s, o, i, e))
this.xn(r, s, o, i, e))
: r.expirationTime &&

@@ -319,5 +319,5 @@ new Date(r.expirationTime).valueOf() <=

),
this.In(r, s, o, i, e))
this.xn(r, s, o, i, e))
: n && w(n)
? this.In(r, s, o, i, e)
? this.xn(r, s, o, i, e)
: null == a

@@ -327,3 +327,3 @@ ? (N.info(

),
this.In(r, s, o, i, e))
this.xn(r, s, o, i, e))
: a.valueOf() <= new Date().valueOf()

@@ -333,8 +333,8 @@ ? (N.info(

),
this.In(r, s, o, i, e))
this.xn(r, s, o, i, e))
: (N.info(
"Device already subscribed to push, sending existing subscription to backend.",
),
this.qn(r, u, i));
} else this.Vn(s, o, i, e);
this.Un(r, u, i));
} else this.Nn(s, o, i, e);
})

@@ -350,4 +350,4 @@ .catch((i) => {

this.requestPermission(o, r, s);
} else if (this.Wn) {
if (null == this.Dn || "" === this.Dn)
} else if (this.Sn) {
if (null == this.gn || "" === this.gn)
return (

@@ -359,11 +359,11 @@ N.error(

);
const t = window.safari.pushNotification.permission(this.Dn);
this.On(this.Dn, t, i, e);
const t = window.safari.pushNotification.permission(this.gn);
this.qn(this.gn, t, i, e);
}
}
unsubscribe(i, t) {
if (!yt.isPushSupported())
return N.info(na.Yn), void ("function" == typeof t && t());
this.Nn
? navigator.serviceWorker.getRegistration(this.kn).then((e) => {
if (!vt.isPushSupported())
return N.info(na.Rn), void ("function" == typeof t && t());
this.Pn
? navigator.serviceWorker.getRegistration(this.bn).then((e) => {
e

@@ -374,3 +374,3 @@ ? e.pushManager

s
? (this.Rn(),
? (this.Tn(),
s

@@ -388,3 +388,3 @@ .unsubscribe()

"function" == typeof t && t()),
this.Mn(e);
this.En(e);
})

@@ -405,4 +405,4 @@ .catch((i) => {

})
: this.Wn &&
(this.Rn(),
: this.Sn &&
(this.Tn(),
N.info("Device unsubscribed from push."),

@@ -412,2 +412,2 @@ "function" == typeof i && i());

}
na.Yn = "Push notifications are not supported in this browser.";
na.Rn = "Push notifications are not supported in this browser.";

@@ -1,3 +0,3 @@

const yt = {
Un: () =>
const vt = {
Dn: () =>
"serviceWorker" in navigator &&

@@ -7,3 +7,3 @@ "undefined" != typeof ServiceWorkerRegistration &&

"PushManager" in window,
_n: () =>
An: () =>
"safari" in window &&

@@ -13,6 +13,6 @@ "pushNotification" in window.safari &&

"function" == typeof window.safari.pushNotification.requestPermission,
isPushSupported: () => yt.Un() || yt._n(),
isPushSupported: () => vt.Dn() || vt.An(),
isPushBlocked: () => {
const i =
yt.isPushSupported() &&
vt.isPushSupported() &&
"Notification" in window &&

@@ -23,3 +23,3 @@ null != window.Notification &&

n =
yt.isPushSupported() &&
vt.isPushSupported() &&
(!("Notification" in window) || null == window.Notification);

@@ -29,3 +29,3 @@ return i || n;

isPushPermissionGranted: () =>
yt.isPushSupported() &&
vt.isPushSupported() &&
"Notification" in window &&

@@ -35,7 +35,7 @@ null != window.Notification &&

"granted" === window.Notification.permission,
Ur: () =>
!yt.isPushBlocked() &&
yt.isPushSupported() &&
!yt.isPushPermissionGranted(),
Cr: () =>
!vt.isPushBlocked() &&
vt.isPushSupported() &&
!vt.isPushPermissionGranted(),
};
export default yt;
export default vt;

@@ -8,3 +8,3 @@ import l from "./util/net.js";

logger as N,
IndexedDBAdapter as it,
IndexedDBAdapter as tt,
Guid as G,

@@ -15,10 +15,10 @@ EventTypes as d,

import u from "./managers/subscription-manager.js";
import yt from "./Push/utils/push-utils.js";
import vt from "./Push/utils/push-utils.js";
import h from "./util/request-header-utils.js";
export default class Lt {
constructor(t, i, s, e, h, o, n, r, l, a) {
(this.yn = t),
(this.fn = t),
(this.baseUrl = i),
(this.T = s),
(this.wn = e),
(this.dn = e),
(this.As = h),

@@ -28,27 +28,27 @@ (this.B = o),

(this.$l = r),
(this.Yh = l),
(this.Qh = l),
(this.S = a),
(this.yn = t),
(this.fn = t),
(this.baseUrl = i),
(this.Pl = 0),
(this.IE = n.OE() || 0),
(this.Ol = null),
(this.dE = n.IE() || 0),
(this.Ul = null),
(this.T = s),
(this.wn = e),
(this.dn = e),
(this.As = h),
(this.B = o),
(this.C = n),
(this.Yh = l),
(this.Qh = l),
(this.S = a),
(this.$l = r),
(this.Ul = new u()),
(this._l = null),
(this.Xl = 50),
(this.Ql = !1);
(this._l = new u()),
(this.Xl = null),
(this.Ql = 50),
(this.Yl = !1);
}
Yl(t, i) {
return !t && !i && this.Yh.Kh() >= this.Xl;
Zl(t, i) {
return !t && !i && this.Qh.Kh() >= this.Ql;
}
Zl(t) {
let i = this.T.Hl();
sc(t) {
let i = this.T.Wl();
if (t.length > 0) {

@@ -58,3 +58,3 @@ const s = this.As.getUserId();

const t = (!e.userId && !s) || e.userId === s;
e.type === d.Jl && t && (i = !0);
e.type === d.Kl && t && (i = !0);
}

@@ -64,65 +64,77 @@ }

}
sc(i = !1, s = !1, e = !0, o, n, r, u = !1, c = !1) {
e && this.hc();
const d = this.C.hE(),
m = this.C.gE();
hc(i = !1, s = !1, e = !0, o, n, r, u = !1, c = !1) {
e && this.uc();
const d = this.C.AE(),
m = this.C.OE();
let f = !1;
const g = (i, s, u = -1) => {
let c = !1;
const d = new Date().valueOf();
h.W(this.C, h.O.Xu, d),
-1 !== u && s.push(["X-Braze-Req-Tokens-Remaining", u.toString()]),
l.Y({
url: this.baseUrl + "/data/",
data: i,
headers: s,
ss: (e) => {
const c = new Date().valueOf();
h.W(this.C, h.O.zu, c),
-1 !== u && s.push(["X-Braze-Req-Tokens-Remaining", u.toString()]);
let d = !1;
l.Y({
url: this.baseUrl + "/data/",
data: i,
headers: s,
ss: (e) => {
null != i.respond_with &&
i.respond_with.triggers &&
(this.Pl = Math.max(this.Pl - 1, 0)),
this.S.ts(i, e, s)
? (this.Qh.es(),
this.B.Cl(e),
(null != i.respond_with &&
i.respond_with.user_id != this.As.getUserId()) ||
(null != i.device && this.C.Bs(t.gs.$a, i.device),
null != i.sdk_metadata &&
(this.C.Bs(t.gs.qu, i.sdk_metadata),
this.C.Bs(t.gs.Au, this.T.Ss())),
this.$l(e),
h.Lu(this.C, h.O.zu, 1),
"function" == typeof o && o()))
: e.auth_error && (d = !0);
},
error: () => {
(d = !0),
null != i.respond_with &&
i.respond_with.triggers &&
(this.Pl = Math.max(this.Pl - 1, 0)),
this.S.ts(i, e, s)
? (this.Yh.es(),
this.B.Rl(e),
(null != i.respond_with &&
i.respond_with.user_id != this.As.getUserId()) ||
(null != i.device && this.C.js(t.bs.Xa, i.device),
null != i.sdk_metadata &&
(this.C.js(t.bs.qu, i.sdk_metadata),
this.C.js(t.bs.Au, this.T.Ss())),
this.$l(e),
h.ns(this.C, h.O.Xu, 1),
"function" == typeof o && o()))
: e.auth_error && (c = !0);
},
error: () => {
null != i.respond_with &&
i.respond_with.triggers &&
(this.Pl = Math.max(this.Pl - 1, 0)),
this.S.Du(i.events, i.attributes),
"function" == typeof n && n();
},
os: (t) => {
if (("function" == typeof r && r(t), e && !f)) {
if (t && !c) this.nc();
else {
h.hs(this.C, h.O.Xu);
let t = this.Ol;
(null == t || t < 1e3 * this.IE) && (t = 1e3 * this.IE),
this.nc(Math.min(3e5, a(1e3 * this.IE, 3 * t)));
}
f = !0;
this.S.Du(i.events, i.attributes),
"function" == typeof n && n();
},
rs: (t, i) => {
"function" == typeof r && r(!d);
const s = this.S.Ou(i);
let o = 0;
if (s)
switch (s.type) {
case "date":
o = Math.max(s.value - new Date().valueOf(), 0);
break;
case "timestamp":
o = s.value;
}
},
});
if (e && !f) {
if (d) {
h.Gu(this.C, h.O.zu);
let t = this.Ul;
(null == t || t < 1e3 * this.dE) && (t = 1e3 * this.dE);
const i = Math.min(3e5, a(1e3 * this.dE, 3 * t)) + o;
this.lc(i);
} else this.lc(Math.max(1e3 * this.dE, o));
f = !0;
}
},
});
},
v = this.Zl(d),
p = s || v;
if (this.Yl(u, v))
p = this.sc(d),
v = s || p;
if (this.Zl(u, p))
return void N.info(
"Declining to flush data due to 50 consecutive authentication failures",
);
if (e && !this.S.zu(d, m, i, p))
return this.nc(), void ("function" == typeof r && r(!0));
const b = this.S.ju(i, p, d, m, c);
p && this.Pl++;
if (e && !this.S.Su(d, m, i, v))
return this.lc(), void ("function" == typeof r && r(!0));
const b = this.S.Bu(i, v, d, m, c);
v && this.Pl++;
let w = !1;

@@ -134,17 +146,17 @@ if (b)

(i) => g(t.requestData, t.headers, i),
h.O.Xu,
h.O.zu,
n,
),
(w = !0);
this.Yh.jh() && e && !w
? this.nc()
: v && (N.info("Invoking new session subscriptions"), this.Ul.X());
this.Qh.jh() && e && !w
? this.lc()
: p && (N.info("Invoking new session subscriptions"), this._l.X());
}
uc() {
cc() {
return this.Pl > 0;
}
nc(t = 1e3 * this.IE) {
this.Ql ||
(this.hc(),
(this._l = window.setTimeout(() => {
lc(t = 1e3 * this.dE) {
this.Yl ||
(this.uc(),
(this.Xl = window.setTimeout(() => {
if (document.hidden) {

@@ -154,43 +166,43 @@ const t = "visibilitychange",

document.hidden ||
(document.removeEventListener(t, i, !1), this.sc());
(document.removeEventListener(t, i, !1), this.hc());
};
document.addEventListener(t, i, !1);
} else this.sc();
} else this.hc();
}, t)),
(this.Ol = t));
(this.Ul = t));
}
hc() {
null != this._l && (clearTimeout(this._l), (this._l = null));
uc() {
null != this.Xl && (clearTimeout(this.Xl), (this.Xl = null));
}
initialize() {
(this.Ql = !1), this.nc();
(this.Yl = !1), this.lc();
}
destroy() {
this.Ul.removeAllSubscriptions(),
this.Yh.Hh(),
this.hc(),
(this.Ql = !0),
this.sc(void 0, void 0, !1, void 0, void 0, void 0, void 0, !0),
(this._l = null);
this._l.removeAllSubscriptions(),
this.Qh.Hh(),
this.uc(),
(this.Yl = !0),
this.hc(void 0, void 0, !1, void 0, void 0, void 0, void 0, !0),
(this.Xl = null);
}
rn(t) {
return this.Ul.Ns(t);
return this._l.Fs(t);
}
openSession() {
const i = this.T.Ss() !== this.T.qo();
i && (this.C.cE(t.iu.Qo), this.C.cE(t.iu.su)),
this.sc(void 0, !1, void 0, () => {
this.C.Ls(t.bs.we);
const i = this.T.Ss() !== this.T.Eo();
i && (this.C.TE(t.iu.$h), this.C.TE(t.iu.su)),
this.hc(void 0, !1, void 0, () => {
this.C.Es(t.gs.$e);
}),
this.vu(),
this.bu(),
i &&
import("./Push/push-manager-factory.js").then((i) => {
if (this.Ql) return;
if (this.Yl) return;
const s = i.default.ea();
if (
null != s &&
(yt.isPushPermissionGranted() || yt.isPushBlocked())
(vt.isPushPermissionGranted() || vt.isPushBlocked())
) {
const i = () => {
s.Tn()
s.jn()
? N.info(

@@ -205,12 +217,12 @@ "Push token maintenance is disabled, not refreshing token for backend.",

h = () => {
const s = this.C.ps(t.bs.Kn);
const s = this.C.vs(t.gs.Bn);
(null == s || s) && i();
},
o = it.Gs._s;
new it(o, N).jr(o.Os.cu, e, h);
o = tt._s.Xs;
new tt(o, N).jr(o.Ks.cu, e, h);
}
});
}
lc() {
this.C.Ls(t.bs.Yi), this.C.Ls(t.bs.wi), this.C.Ls(t.bs.cn);
dc() {
this.C.Es(t.gs.xe), this.C.Es(t.gs.di), this.C.Es(t.gs.on);
}

@@ -220,11 +232,11 @@ changeUser(i, s, e) {

if (h !== i) {
this.T.Kl(),
this.lc(),
null != h && this.sc(void 0, !1, void 0, void 0, void 0),
this.T.Ml(),
this.dc(),
null != h && this.hc(void 0, !1, void 0, void 0, void 0),
this.As.ou(i),
e ? this.Yh.setSdkAuthenticationSignature(e) : this.Yh.Bh();
e ? this.Qh.setSdkAuthenticationSignature(e) : this.Qh.Bh();
for (let t = 0; t < s.length; t++) s[t].changeUser(null == h);
null != h && this.C.Ls(t.bs.Ct),
this.C.Ls(t.bs.Xa),
this.C.Ls(t.bs.SE),
null != h && this.C.Es(t.gs.Ct),
this.C.Es(t.gs.$a),
this.C.Es(t.gs._E),
this.openSession(),

@@ -235,4 +247,4 @@ N.info('Changed user to "' + i + '".');

e &&
this.Yh.xh() !== e &&
(this.Yh.setSdkAuthenticationSignature(e),
this.Qh.xh() !== e &&
(this.Qh.setSdkAuthenticationSignature(e),
(t = "Updated SDK authentication signature")),

@@ -243,4 +255,4 @@ N.info(`Current user is already ${i}. ${t}`);

requestImmediateDataFlush(t) {
this.hc(), this.T.qo();
this.sc(
this.uc(), this.T.Eo();
this.hc(
void 0,

@@ -258,19 +270,19 @@ void 0,

requestFeedRefresh() {
this.T.qo(), this.sc(!0);
this.T.Eo(), this.hc(!0);
}
vr(t, i) {
this.T.qo(),
this.T.Eo(),
N.info("Requesting explicit trigger refresh."),
this.sc(void 0, !0, void 0, t, i);
this.hc(void 0, !0, void 0, t, i);
}
$n(i, s) {
const e = d.cc,
Ln(i, s) {
const e = d.mc,
h = { a: i, l: s },
o = c.ds(e, h);
o = c.cs(e, h);
return (
o && (N.info(`Logged alias ${i} with label ${s}`), this.C.js(t.bs.SE, h)),
o && (N.info(`Logged alias ${i} with label ${s}`), this.C.Bs(t.gs._E, h)),
o
);
}
Zn(t, i, s) {
Gn(t, i, s) {
if (this.B.hu(i))

@@ -281,3 +293,3 @@ return (

const e = { key: i, value: s },
h = c.ds(t, e);
h = c.cs(t, e);
if (h) {

@@ -294,3 +306,3 @@ const t = "object" == typeof s ? JSON.stringify(s, null, 2) : s;

null != o && (n.alt_accuracy = o);
const r = c.ds(d.dc, n, t || void 0);
const r = c.cs(d.fc, n, t || void 0);
return (

@@ -303,15 +315,15 @@ r &&

br(t, i) {
const s = this.T.qo();
return new ve(this.As.getUserId(), d.mc, t, s, { cid: i });
const s = this.T.Eo();
return new ve(this.As.getUserId(), d.gc, t, s, { cid: i });
}
fc(t, i) {
return new it(t, i);
vc(t, i) {
return new tt(t, i);
}
vu() {
const t = it.Gs._s;
this.fc(t, N).setItem(t.Os.Xu, 1, {
bu() {
const t = tt._s.Xs;
this.vc(t, N).setItem(t.Ks.zu, 1, {
baseUrl: this.baseUrl,
data: { api_key: this.yn, device_id: this.wn.ce().id },
data: { api_key: this.fn, device_id: this.dn.ce().id },
userId: this.As.getUserId(),
sdkAuthEnabled: this.Yh.jh(),
sdkAuthEnabled: this.Qh.jh(),
});

@@ -321,9 +333,9 @@ }

for (const i of t)
if (i.api_key === this.yn) this.S.Du(i.events, i.attributes);
if (i.api_key === this.fn) this.S.Du(i.events, i.attributes);
else {
const t = it.Gs._s;
new it(t, N).setItem(t.Os.$r, G.Rt(), i);
const t = tt._s.Xs;
new tt(t, N).setItem(t.Ks.$r, G.Rt(), i);
}
}
gu(t, i, s) {
Zn(t, i, s) {
if (this.B.hu(t))

@@ -336,11 +348,11 @@ return (

null === i && null === s
? ((e = d.gc), (h = { key: t }))
: ((e = d.vc), (h = { key: t, latitude: i, longitude: s })),
c.ds(e, h)
? ((e = d.bc), (h = { key: t }))
: ((e = d.wc), (h = { key: t, latitude: i, longitude: s })),
c.cs(e, h)
);
}
yu(t, i) {
au(t, i) {
const s = { group_id: t, status: i };
return c.ds(d.bc, s);
return c.cs(d.kc, s);
}
}
export default class ts {
constructor(t) {
(this.wc = t), (this.wc = t);
(this.xc = t), (this.xc = t);
}
xc(t) {
return null == this.wc || this.wc === t[0];
yc(t) {
return null == this.xc || this.xc === t[0];
}

@@ -11,5 +11,5 @@ static fromJson(t) {

}
Bs() {
return this.wc;
bs() {
return this.xc;
}
}
import is from "./filter-set.js";
export default class rs {
constructor(t, s) {
(this.wc = t), (this.tf = s), (this.wc = t), (this.tf = s);
(this.xc = t), (this.tf = s), (this.xc = t), (this.tf = s);
}
xc(t) {
if (null == this.wc || null == this.tf) return !1;
yc(t) {
if (null == this.xc || null == this.tf) return !1;
const s = t[0],
i = t[1];
return s === this.wc && this.tf.xc(i);
return s === this.xc && this.tf.yc(i);
}

@@ -18,5 +18,5 @@ static fromJson(t) {

}
Bs() {
return { e: this.wc, pf: this.tf ? this.tf.Bs() : null };
bs() {
return { e: this.xc, pf: this.tf ? this.tf.bs() : null };
}
}

@@ -7,3 +7,3 @@ import fr from "./filter.js";

}
xc(t) {
yc(t) {
let r = !0;

@@ -14,3 +14,3 @@ for (let e = 0; e < this.filters.length; e++) {

for (let r = 0; r < o.length; r++)
if (o[r].xc(t)) {
if (o[r].yc(t)) {
s = !0;

@@ -37,3 +37,3 @@ break;

}
Bs() {
bs() {
const t = [];

@@ -43,3 +43,3 @@ for (let r = 0; r < this.filters.length; r++) {

o = [];
for (let t = 0; t < e.length; t++) o.push(e[t].Bs());
for (let t = 0; t < e.length; t++) o.push(e[t].bs());
t.push(o);

@@ -49,3 +49,3 @@ }

}
static Qn(t) {
static Yn(t) {
const r = [];

@@ -55,3 +55,3 @@ for (let e = 0; e < t.length; e++) {

s = t[e];
for (let t = 0; t < s.length; t++) o.push(fr.Qn(s[t]));
for (let t = 0; t < s.length; t++) o.push(fr.Yn(s[t]));
r.push(o);

@@ -58,0 +58,0 @@ }

@@ -25,3 +25,3 @@ import { isDate as Nt } from "../../util/code-utils.js";

}
xc(t) {
yc(t) {
let s = null;

@@ -33,3 +33,3 @@ switch ((null != t && (s = t[this.yE]), this.comparator)) {

return null == s || s.valueOf() !== this.LE.valueOf();
case fr.wE.vE:
case fr.wE.xE:
return null != s && typeof s == typeof this.LE && s > this.LE;

@@ -40,3 +40,3 @@ case fr.wE.XE:

: null != s && typeof s == typeof this.LE && s >= this.LE;
case fr.wE.xE:
case fr.wE.JE:
return null != s && typeof s == typeof this.LE && s < this.LE;

@@ -47,3 +47,3 @@ case fr.wE.BE:

: null != s && typeof s == typeof this.LE && s <= this.LE;
case fr.wE.JE:
case fr.wE.VE:
return (

@@ -55,5 +55,5 @@ null != s &&

);
case fr.wE.VE:
case fr.wE.qE:
return null != s;
case fr.wE.qE:
case fr.wE.PE:
return null == s;

@@ -64,3 +64,3 @@ case fr.wE.jE:

return null != s && Nt(s) && ls(s) > this.LE;
case fr.wE.PE:
case fr.wE.WE:
return (

@@ -83,3 +83,3 @@ null == s ||

}
Bs() {
bs() {
let t = this.LE;

@@ -91,20 +91,20 @@ return (

}
static Qn(t) {
static Yn(t) {
return new fr(t.k, t.t, t.c, t.v);
}
}
(fr.QE = { WE: "boolean", ZE: "number", $E: "string", UE: "date" }),
(fr.QE = { ZE: "boolean", $E: "number", tT: "string", UE: "date" }),
(fr.wE = {
FE: 1,
kE: 2,
vE: 3,
xE: 3,
XE: 4,
xE: 5,
JE: 5,
BE: 6,
JE: 10,
VE: 11,
qE: 12,
VE: 10,
qE: 11,
PE: 12,
jE: 15,
zE: 16,
PE: 17,
WE: 17,
});

@@ -6,3 +6,3 @@ import ri from "./trigger-condition.js";

}
xc(t) {
yc(t) {
if (null == this.if) return !1;

@@ -23,5 +23,5 @@ const i = ri.sf(t[0], this.if);

}
Bs() {
bs() {
return this.if;
}
}

@@ -5,3 +5,3 @@ export default class ns {

}
xc(t) {
yc(t) {
return null == this.productId || t[0] === this.productId;

@@ -12,5 +12,5 @@ }

}
Bs() {
bs() {
return this.productId;
}
}

@@ -6,7 +6,7 @@ import is from "./filter-set.js";

}
xc(t) {
yc(t) {
if (null == this.productId || null == this.tf) return !1;
const s = t[0],
i = t[1];
return s === this.productId && this.tf.xc(i);
return s === this.productId && this.tf.yc(i);
}

@@ -19,5 +19,5 @@ static fromJson(t) {

}
Bs() {
return { id: this.productId, pf: this.tf ? this.tf.Bs() : null };
bs() {
return { id: this.productId, pf: this.tf ? this.tf.bs() : null };
}
}

@@ -6,3 +6,3 @@ import ri from "./trigger-condition.js";

}
xc(t) {
yc(t) {
return null == this.if || ri.sf(t[0], this.if);

@@ -13,5 +13,5 @@ }

}
Bs() {
bs() {
return this.if;
}
}

@@ -15,4 +15,4 @@ import ts from "./custom-event-data.js";

}
kc(e, t) {
return ri._c[this.type] === e && (null == this.data || this.data.xc(t));
_c(e, t) {
return ri.Ec[this.type] === e && (null == this.data || this.data.yc(t));
}

@@ -32,21 +32,21 @@ static sf(e, t) {

switch (t) {
case ri.ln.OPEN:
case ri.ln.Xt:
case ri.Wr.OPEN:
case ri.Wr.Xt:
break;
case ri.ln.Rr:
case ri.Wr.Rr:
r = ns.fromJson(e.data);
break;
case ri.ln.Ec:
case ri.Wr.jc:
r = hs.fromJson(e.data);
break;
case ri.ln.kr:
case ri.Wr.kr:
r = ur.fromJson(e.data);
break;
case ri.ln.ve:
case ri.Wr.ve:
r = ts.fromJson(e.data);
break;
case ri.ln.jc:
case ri.Wr.Cc:
r = rs.fromJson(e.data);
break;
case ri.ln.Ao:
case ri.Wr.Bo:
r = ni.fromJson(e.data);

@@ -56,28 +56,28 @@ }

}
Bs() {
return { t: this.type, d: this.data ? this.data.Bs() : null };
bs() {
return { t: this.type, d: this.data ? this.data.bs() : null };
}
static Qn(e) {
static Yn(e) {
let t,
r = null;
switch (e.t) {
case ri.ln.OPEN:
case ri.ln.Xt:
case ri.Wr.OPEN:
case ri.Wr.Xt:
break;
case ri.ln.Rr:
case ri.Wr.Rr:
r = new ns(e.d);
break;
case ri.ln.Ec:
(t = e.d || {}), (r = new hs(t.id, is.Qn(t.pf || [])));
case ri.Wr.jc:
(t = e.d || {}), (r = new hs(t.id, is.Yn(t.pf || [])));
break;
case ri.ln.kr:
case ri.Wr.kr:
r = new ur(e.d);
break;
case ri.ln.ve:
case ri.Wr.ve:
r = new ts(e.d);
break;
case ri.ln.jc:
(t = e.d || {}), (r = new rs(t.e, is.Qn(t.pf || [])));
case ri.Wr.Cc:
(t = e.d || {}), (r = new rs(t.e, is.Yn(t.pf || [])));
break;
case ri.ln.Ao:
case ri.Wr.Bo:
r = new ni(e.d);

@@ -88,20 +88,20 @@ }

}
(ri.ln = {
(ri.Wr = {
OPEN: "open",
Rr: "purchase",
Ec: "purchase_property",
jc: "purchase_property",
kr: "push_click",
ve: "custom_event",
jc: "custom_event_property",
Ao: "iam_click",
Cc: "custom_event_property",
Bo: "iam_click",
Xt: "test",
}),
(ri._c = {}),
(ri._c[ri.ln.OPEN] = et.OPEN),
(ri._c[ri.ln.Rr] = et.Rr),
(ri._c[ri.ln.Ec] = et.Rr),
(ri._c[ri.ln.kr] = et.kr),
(ri._c[ri.ln.ve] = et.ve),
(ri._c[ri.ln.jc] = et.ve),
(ri._c[ri.ln.Ao] = et.Ao),
(ri._c[ri.ln.Xt] = et.Xt);
(ri.Ec = {}),
(ri.Ec[ri.Wr.OPEN] = et.OPEN),
(ri.Ec[ri.Wr.Rr] = et.Rr),
(ri.Ec[ri.Wr.jc] = et.Rr),
(ri.Ec[ri.Wr.kr] = et.kr),
(ri.Ec[ri.Wr.ve] = et.ve),
(ri.Ec[ri.Wr.Cc] = et.ve),
(ri.Ec[ri.Wr.Bo] = et.Bo),
(ri.Ec[ri.Wr.Xt] = et.Xt);

@@ -6,4 +6,4 @@ export default {

ve: "custom_event",
Ao: "iam_click",
Bo: "iam_click",
Xt: "test",
};

@@ -19,3 +19,3 @@ import {

(this.rd = n),
(this.mn = a),
(this.sn = a),
(this.hd = u),

@@ -33,3 +33,3 @@ (this.od = d),

null == a && (a = 1e3 * (this.ed + 30)),
(this.mn = a),
(this.sn = a),
(this.data = l),

@@ -54,7 +54,7 @@ null != n && (this.rd = n),

const i = new Date().valueOf() - t,
s = null == t || isNaN(i) || null == this.mn || i < this.mn;
s = null == t || isNaN(i) || null == this.sn || i < this.sn;
return (
s ||
N.info(
`Trigger action ${this.type} is no longer eligible for display - fired ${i}ms ago and has a timeout of ${this.mn}ms.`,
`Trigger action ${this.type} is no longer eligible for display - fired ${i}ms ago and has a timeout of ${this.sn}ms.`,
),

@@ -79,3 +79,3 @@ !s

return ta(
pt.ln,
pt.Wr,
l,

@@ -88,5 +88,5 @@ "Could not construct Trigger from server data",

}
Bs() {
bs() {
const t = [];
for (let i = 0; i < this.sd.length; i++) t.push(this.sd[i].Bs());
for (let i = 0; i < this.sd.length; i++) t.push(this.sd[i].bs());
return {

@@ -102,3 +102,3 @@ i: this.id,

r: this.rd,
tm: this.mn,
tm: this.sn,
ss: this.hd,

@@ -108,6 +108,6 @@ ld: this.od,

}
static Qn(t) {
static Yn(t) {
const i = [],
s = t.c || [];
for (let t = 0; t < s.length; t++) i.push(ri.Qn(s[t]));
for (let t = 0; t < s.length; t++) i.push(ri.Yn(s[t]));
return new pt(

@@ -129,2 +129,2 @@ t.i,

}
(pt.ln = { an: "inapp", md: "templated_iam" }), (pt.td = -1);
(pt.Wr = { Vr: "inapp", md: "templated_iam" }), (pt.td = -1);

@@ -14,6 +14,6 @@ import se from "../InAppMessage/in-app-message-manager-factory.js";

if (!TriggersProviderFactory.provider) {
const i = r.sr(z.Go);
const i = r.sr(z.Xo);
(TriggersProviderFactory.provider = new gr(
null != i ? i : 30,
se.ea()._r(),
se.ea().Vi(),
r.j(),

@@ -20,0 +20,0 @@ r.nn(),

@@ -18,10 +18,10 @@ import s from "../common/base-provider.js";

(this.tg = t),
(this.Ms = i),
(this.Js = i),
(this.C = s),
(this.Ue = e),
(this.Bi = e),
(this.ig = r),
(this.tg = t),
(this.Ms = i),
(this.Js = i),
(this.C = s),
(this.Ue = e),
(this.Bi = e),
(this.ig = r),

@@ -40,5 +40,5 @@ (this.sg = []),

if (this.C) {
(this.hg = this.C.ps(t.bs.aE) || this.hg),
(this.ng = this.C.ps(t.bs.iE) || this.ng),
(this.og = this.C.ps(t.bs.nE) || this.og);
(this.hg = this.C.vs(t.gs.aE) || this.hg),
(this.ng = this.C.vs(t.gs.iE) || this.ng),
(this.og = this.C.vs(t.gs.nE) || this.og);
for (let t = 0; t < this.triggers.length; t++) {

@@ -52,6 +52,6 @@ const i = this.triggers[t];

if (!this.C) return;
this.lg = this.C.ps(t.bs.oE) || 0;
const i = this.C.ps(t.bs.rE) || [],
this.lg = this.C.vs(t.gs.oE) || 0;
const i = this.C.vs(t.gs.rE) || [],
s = [];
for (let t = 0; t < i.length; t++) s.push(pt.Qn(i[t]));
for (let t = 0; t < i.length; t++) s.push(pt.Yn(i[t]));
(this.triggers = s), this.fg();

@@ -76,3 +76,3 @@ }

const n = t[r],
o = i.ud(n.pn || 0);
o = i.ud(n.Zr || 0);
if (o > 0) {

@@ -82,3 +82,3 @@ let t, r;

null != n.ug && (t = n.ug),
null != n.dg && ve.AE(n.dg) && (r = ve.Qn(n.dg));
null != n.dg && ve.RE(n.dg) && (r = ve.Yn(n.dg));
const l = [];

@@ -90,3 +90,3 @@ if (n.pg && w(n.pg))

}
this.eg.push(window.setTimeout(s(i, n.pn || 0, t, r, l), o));
this.eg.push(window.setTimeout(s(i, n.Zr || 0, t, r, l), o));
}

@@ -100,3 +100,3 @@ }

}
r && this.C && this.C.js(t.bs.iE, this.ng);
r && this.C && this.C.Bs(t.gs.iE, this.ng);
}

@@ -107,10 +107,10 @@ mg() {

for (let t = 0; t < this.triggers.length; t++)
i.push(this.triggers[t].Bs());
i.push(this.triggers[t].bs());
(this.lg = new Date().valueOf()),
this.C.js(t.bs.rE, i),
this.C.js(t.bs.oE, this.lg);
this.C.Bs(t.gs.rE, i),
this.C.Bs(t.gs.oE, this.lg);
}
bg() {
if (!this.C) return;
(this.C.ps(t.bs.oE) || 0) > this.lg ? this.ag() : this.fg();
(this.C.vs(t.gs.oE) || 0) > this.lg ? this.ag() : this.fg();
}

@@ -120,3 +120,3 @@ U(i) {

if (null != i && i.triggers) {
this.ig.vn(), this.fg();
this.ig.hn(), this.fg();
const e = {},

@@ -133,3 +133,3 @@ r = {};

for (let t = 0; t < h.sd.length; t++)
if (h.sd[t].kc(et.Xt, null)) {
if (h.sd[t]._c(et.Xt, null)) {
s = !0;

@@ -141,5 +141,5 @@ break;

}
ii(this.og, e) || ((this.og = e), this.C && this.C.js(t.bs.nE, this.og)),
ii(this.og, e) || ((this.og = e), this.C && this.C.Bs(t.gs.nE, this.og)),
ii(this.ng, r) ||
((this.ng = r), this.C && this.C.js(t.bs.iE, this.ng)),
((this.ng = r), this.C && this.C.Bs(t.gs.iE, this.ng)),
this.mg(),

@@ -162,3 +162,3 @@ s &&

t.dd(i) ||
(!1 === navigator.onLine && t.type === pt.ln.an && e.imageUrl
(!1 === navigator.onLine && t.type === pt.Wr.Vr && e.imageUrl
? N.info(

@@ -168,7 +168,7 @@ `Not showing ${t.type} trigger action ${t.id} due to offline state.`,

: t.nd(r) && this.wg(t, r, s)
? 0 === this.Ms.ic()
? 0 === this.Js.ic()
? N.info(
`Not displaying trigger ${t.id} because neither automaticallyShowInAppMessages() nor subscribeToInAppMessage() were called.`,
)
: (this.Ms.X([e]), this.yg(t, r))
: (this.Js.X([e]), this.yg(t, r))
: N.info(

@@ -201,3 +201,3 @@ `Not displaying trigger ${t.id} because display time fell outside of the acceptable time window.`,

switch (t.type) {
case pt.ln.an:
case pt.Wr.Vr:
if (((o = ut(t.data)), null == o)) {

@@ -209,3 +209,3 @@ N.error(

}
if (((l = this.ig.Lr(o)), l)) {
if (((l = this.ig.Gr(o)), l)) {
N.error(l), n();

@@ -216,4 +216,4 @@ break;

break;
case pt.ln.md:
if (((a = wt.fromJson(t.data, h, n, i, t.mn || 0)), null == a)) {
case pt.Wr.md:
if (((a = wt.fromJson(t.data, h, n, i, t.sn || 0)), null == a)) {
N.error(

@@ -224,3 +224,3 @@ `Could not parse trigger data for trigger ${t.id}, ignoring.`,

}
this.ig.Wr(a, s, e);
this.ig.Jr(a, s, e);
break;

@@ -233,3 +233,3 @@ default:

if (!ta(et, t, "Cannot fire trigger action.", "TriggerEvents")) return;
if (this.Ue && this.Ue.uc())
if (this.Bi && this.Bi.cc())
return (

@@ -257,3 +257,3 @@ N.info(

for (let e = 0; e < r.sd.length; e++)
if (r.sd[e].kc(t, i)) {
if (r.sd[e]._c(t, i)) {
s = !0;

@@ -291,7 +291,7 @@ break;

changeUser(i = !1) {
if (((this.triggers = []), this.C && this.C.Ls(t.bs.rE), !i)) {
if (((this.triggers = []), this.C && this.C.Es(t.gs.rE), !i)) {
(this.sg = []), (this.hg = null), (this.og = {}), (this.ng = {});
for (let t = 0; t < this.eg.length; t++) clearTimeout(this.eg[t]);
(this.eg = []),
this.C && (this.C.Ls(t.bs.aE), this.C.Ls(t.bs.nE), this.C.Ls(t.bs.iE));
this.C && (this.C.Es(t.gs.aE), this.C.Es(t.gs.nE), this.C.Es(t.gs.iE));
}

@@ -320,3 +320,3 @@ }

let o;
(n.pn = s), (n.ug = e), null != r && (o = r.Bs()), (n.dg = o);
(n.Zr = s), (n.ug = e), null != r && (o = r.bs()), (n.dg = o);
const l = [];

@@ -326,3 +326,3 @@ for (const t of h) t.id && l.push(t.id);

i.id && this.ng[i.id].push(n),
this.C && this.C.js(t.bs.iE, this.ng);
this.C && this.C.Bs(t.gs.iE, this.ng);
}

@@ -334,4 +334,4 @@ yg(i, s) {

i.id && (this.og[i.id] = s),
this.C && (this.C.js(t.bs.aE, s), this.C.js(t.bs.nE, this.og));
this.C && (this.C.Bs(t.gs.aE, s), this.C.Bs(t.gs.nE, this.og));
}
}
import r, { OPTIONS as z } from "../../managers/braze-instance.js";
export function attachCSS(n, t, o) {
const c = n || document.querySelector("head"),
e = `ab-${t}-css-definitions-${"5.6.1".replace(/\./g, "-")}`;
e = `ab-${t}-css-definitions-${"5.7.0".replace(/\./g, "-")}`;
if (!c) return;

@@ -6,0 +6,0 @@ const s = c.ownerDocument || document;

@@ -7,3 +7,3 @@ import { attachCSS as Sn } from "./attach-css.js";

"iam",
".ab-pause-scrolling,body.ab-pause-scrolling,html.ab-pause-scrolling{overflow:hidden;touch-action:none}.ab-iam-root.v3{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:9011;-webkit-tap-highlight-color:transparent}.ab-iam-root.v3:focus{outline:0}.ab-iam-root.v3.ab-effect-fullscreen,.ab-iam-root.v3.ab-effect-html,.ab-iam-root.v3.ab-effect-modal{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-show,.ab-iam-root.v3.ab-effect-html.ab-show,.ab-iam-root.v3.ab-effect-modal.ab-show{opacity:1}.ab-iam-root.v3.ab-effect-fullscreen.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-html.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-modal.ab-show.ab-animate-in{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide,.ab-iam-root.v3.ab-effect-html.ab-hide,.ab-iam-root.v3.ab-effect-modal.ab-hide{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-html.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-modal.ab-hide.ab-animate-out{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-slide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-show .ab-in-app-message{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-iam-root.v3.ab-effect-slide.ab-show.ab-animate-in .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-left{-webkit-transform:translateX(-535px);-moz-transform:translateX(-535px);-ms-transform:translateX(-535px);transform:translateX(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-up{-webkit-transform:translateY(-535px);-moz-transform:translateY(-535px);-ms-transform:translateY(-535px);transform:translateY(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-down{-webkit-transform:translateY(535px);-moz-transform:translateY(535px);-ms-transform:translateY(535px);transform:translateY(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide.ab-animate-out .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3 .ab-ios-scroll-wrapper{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;pointer-events:all;touch-action:auto;-webkit-overflow-scrolling:touch}.ab-iam-root.v3 .ab-in-app-message{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:fixed;text-align:center;-webkit-box-shadow:0 0 4px rgba(0,0,0,.3);-moz-box-shadow:0 0 4px rgba(0,0,0,.3);box-shadow:0 0 4px rgba(0,0,0,.3);line-height:normal;letter-spacing:normal;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;z-index:9011;max-width:100%;overflow:hidden;display:inline-block;pointer-events:all;color:#333;color-scheme:normal}.ab-iam-root.v3 .ab-in-app-message.ab-no-shadow{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ab-iam-root.v3 .ab-in-app-message :focus,.ab-iam-root.v3 .ab-in-app-message:focus{outline:0}.ab-iam-root.v3 .ab-in-app-message.ab-clickable{cursor:pointer}.ab-iam-root.v3 .ab-in-app-message.ab-background{background-color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message .ab-close-button[dir=rtl]{left:0}.ab-iam-root.v3 .ab-in-app-message .ab-close-button[dir=ltr]{right:0}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-text{float:none;line-height:1.5;margin:20px 25px;max-width:100%;overflow:hidden;overflow-y:auto;vertical-align:text-bottom;word-wrap:break-word;white-space:pre-wrap;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar{-webkit-appearance:none;width:14px}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-thumb{-webkit-appearance:none;border:4px solid transparent;background-clip:padding-box;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;background-color:rgba(0,0,0,.2)}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-button{width:0;height:0;display:none}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-corner{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-header{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;font-size:20px;margin-bottom:10px;line-height:1.3}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal,.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:14px;font-weight:700;margin:20px;margin-top:calc(constant(safe-area-inset-top,0) + 20px);margin-right:calc(constant(safe-area-inset-right,0) + 20px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 20px);margin-left:calc(constant(safe-area-inset-left,0) + 20px);margin-top:calc(env(safe-area-inset-top,0) + 20px);margin-right:calc(env(safe-area-inset-right,0) + 20px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 20px);margin-left:calc(env(safe-area-inset-left,0) + 20px);max-height:150px;padding:10px;right:0;background-color:#efefef}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-message-text{opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-close-button svg.ab-chevron{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 25px 5px 10px;max-width:430px;vertical-align:middle;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text[dir=rtl]{border-width:5px 10px 5px 25px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{display:block;max-height:150px;overflow:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:365px;border-top:0;border-bottom:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button[dir=rtl]{left:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button[dir=ltr]{right:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{float:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;vertical-align:top;width:60px;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area.ab-icon-area{width:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{float:none;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal{font-size:14px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{float:none;position:relative;display:block;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area .ab-center-cropped-img,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area .ab-center-cropped-img{background-size:cover;background-repeat:no-repeat;background-position:50% 50%;position:absolute;top:0;right:0;bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-icon,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-icon{margin-top:20px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{padding:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-text{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-buttons{bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{float:none;height:auto;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area img,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{display:block;top:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none}.ab-iam-root.v3 .ab-in-app-message.ab-modal{padding-top:20px;width:450px;max-width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone{max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone.graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text{max-height:660px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-image{max-height:524.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-icon{max-height:610px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons{margin-bottom:93px;max-height:587px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-image{max-height:451.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-icon{max-height:537px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{margin-top:-20px;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area img{max-width:100%;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area.ab-icon-area{height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{width:auto;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{width:auto;max-height:720px;max-width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen{width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape{width:720px;max-height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-image-area{height:225px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape.graphic .ab-image-area{height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-message-text{max-height:112px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text{max-height:247px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text.ab-with-buttons{margin-bottom:93px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area{height:360px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area{height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-html-message{background-color:transparent;border:none;height:100%;overflow:auto;position:relative;touch-action:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-message-buttons{position:absolute;bottom:0;width:100%;padding:17px 25px 30px 25px;z-index:inherit;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ab-iam-root.v3 .ab-in-app-message .ab-message-button{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;height:44px;line-height:normal;letter-spacing:normal;margin:0;max-width:100%;min-width:80px;padding:0 12px;position:relative;text-transform:none;width:48%;width:calc(50% - 5px);border:1px solid #1b78cf;-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;word-wrap:normal;white-space:nowrap}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type{float:left;background-color:#fff;color:#1b78cf}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:last-of-type{float:right;background-color:#1b78cf;color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type:last-of-type{float:none;width:auto}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:hover{opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:active:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.08)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:focus:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.15)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button a{color:inherit;text-decoration:inherit}.ab-iam-root.v3 .ab-in-app-message img{float:none;display:inline-block}.ab-iam-root.v3 .ab-in-app-message .ab-icon{float:none;display:inline-block;padding:10px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message .ab-icon .fa{float:none;font-size:30px;width:30px}.ab-iam-root.v3 .ab-start-hidden{visibility:hidden}.ab-iam-root.v3 .ab-centered{margin:auto;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ab-iam-root.v3{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ab-iam-root.v3 .ab-page-blocker{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9001;pointer-events:all;background-color:rgba(51,51,51,.75)}@media (max-width:600px){.ab-iam-root.v3 .ab-in-app-message.ab-slideup{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-close-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic),.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic) .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-message-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:480px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}}@media (max-height:750px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-height:91%;max-height:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-height:91vh;max-height:calc(100vh - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text{max-height:65vh;max-height:calc(100vh - 30px - 60px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-image{max-height:45vh;max-height:calc(100vh - 30px - 155.17241379310346px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-icon{max-height:45vh;max-height:calc(100vh - 30px - 70px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons{max-height:50vh;max-height:calc(100vh - 30px - 93px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-image{max-height:30vh;max-height:calc(100vh - 30px - 155.17241379310346px - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-icon{max-height:30vh;max-height:calc(100vh - 30px - 70px - 93px - 20px)}}@media (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area img{max-height:100%;max-width:100%}}@media (max-height:750px) and (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important;width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-height:480px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:750px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}",
".ab-pause-scrolling,body.ab-pause-scrolling,html.ab-pause-scrolling{overflow:hidden;touch-action:none}.ab-iam-root.v3{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:9011;-webkit-tap-highlight-color:transparent}.ab-iam-root.v3:focus{outline:0}.ab-iam-root.v3.ab-effect-fullscreen,.ab-iam-root.v3.ab-effect-html,.ab-iam-root.v3.ab-effect-modal{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-show,.ab-iam-root.v3.ab-effect-html.ab-show,.ab-iam-root.v3.ab-effect-modal.ab-show{opacity:1}.ab-iam-root.v3.ab-effect-fullscreen.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-html.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-modal.ab-show.ab-animate-in{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide,.ab-iam-root.v3.ab-effect-html.ab-hide,.ab-iam-root.v3.ab-effect-modal.ab-hide{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-html.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-modal.ab-hide.ab-animate-out{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-slide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-show .ab-in-app-message{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-iam-root.v3.ab-effect-slide.ab-show.ab-animate-in .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-left{-webkit-transform:translateX(-535px);-moz-transform:translateX(-535px);-ms-transform:translateX(-535px);transform:translateX(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-up{-webkit-transform:translateY(-535px);-moz-transform:translateY(-535px);-ms-transform:translateY(-535px);transform:translateY(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-down{-webkit-transform:translateY(535px);-moz-transform:translateY(535px);-ms-transform:translateY(535px);transform:translateY(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide.ab-animate-out .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3 .ab-ios-scroll-wrapper{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;pointer-events:all;touch-action:auto;-webkit-overflow-scrolling:touch}.ab-iam-root.v3 .ab-in-app-message{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:fixed;text-align:center;-webkit-box-shadow:0 0 4px rgba(0,0,0,.3);-moz-box-shadow:0 0 4px rgba(0,0,0,.3);box-shadow:0 0 4px rgba(0,0,0,.3);line-height:normal;letter-spacing:normal;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;z-index:9011;max-width:100%;overflow:hidden;display:inline-block;pointer-events:all;color:#333;color-scheme:normal}.ab-iam-root.v3 .ab-in-app-message.ab-no-shadow{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ab-iam-root.v3 .ab-in-app-message :focus,.ab-iam-root.v3 .ab-in-app-message:focus{outline:0}.ab-iam-root.v3 .ab-in-app-message.ab-clickable{cursor:pointer}.ab-iam-root.v3 .ab-in-app-message.ab-background{background-color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message .ab-close-button[dir=rtl]{left:0}.ab-iam-root.v3 .ab-in-app-message .ab-close-button[dir=ltr]{right:0}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-text{float:none;line-height:1.5;margin:20px 25px;max-width:100%;overflow:hidden;overflow-y:auto;vertical-align:text-bottom;word-wrap:break-word;white-space:pre-wrap;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar{-webkit-appearance:none;width:14px}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-thumb{-webkit-appearance:none;border:4px solid transparent;background-clip:padding-box;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;background-color:rgba(0,0,0,.2)}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-button{width:0;height:0;display:none}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-corner{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-header{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;font-size:20px;margin-bottom:10px;line-height:1.3}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal,.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:14px;font-weight:700;margin:20px;margin-top:calc(constant(safe-area-inset-top,0) + 20px);margin-right:calc(constant(safe-area-inset-right,0) + 20px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 20px);margin-left:calc(constant(safe-area-inset-left,0) + 20px);margin-top:calc(env(safe-area-inset-top,0) + 20px);margin-right:calc(env(safe-area-inset-right,0) + 20px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 20px);margin-left:calc(env(safe-area-inset-left,0) + 20px);max-height:150px;padding:10px;right:0;background-color:#efefef}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron.rtl{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-message-text{opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-close-button svg.ab-chevron{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 25px 5px 10px;max-width:430px;vertical-align:middle;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text[dir=rtl]{border-width:5px 10px 5px 25px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{display:block;max-height:150px;overflow:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:365px;border-top:0;border-bottom:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button[dir=rtl]{left:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button[dir=ltr]{right:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{float:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;vertical-align:top;width:60px;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area.ab-icon-area{width:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{float:none;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal{font-size:14px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{float:none;position:relative;display:block;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area .ab-center-cropped-img,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area .ab-center-cropped-img{background-size:cover;background-repeat:no-repeat;background-position:50% 50%;position:absolute;top:0;right:0;bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-icon,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-icon{margin-top:20px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{padding:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-text{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-buttons{bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{float:none;height:auto;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area img,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{display:block;top:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none}.ab-iam-root.v3 .ab-in-app-message.ab-modal{padding-top:20px;width:450px;max-width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone{max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone.graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text{max-height:660px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-image{max-height:524.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-icon{max-height:610px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons{margin-bottom:93px;max-height:587px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-image{max-height:451.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-icon{max-height:537px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{margin-top:-20px;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area img{max-width:100%;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area.ab-icon-area{height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{width:auto;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{width:auto;max-height:720px;max-width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen{width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape{width:720px;max-height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-image-area{height:225px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape.graphic .ab-image-area{height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-message-text{max-height:112px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text{max-height:247px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text.ab-with-buttons{margin-bottom:93px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area{height:360px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area{height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-html-message{background-color:transparent;border:none;height:100%;overflow:auto;position:relative;touch-action:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-message-buttons{position:absolute;bottom:0;width:100%;padding:17px 25px 30px 25px;z-index:inherit;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ab-iam-root.v3 .ab-in-app-message .ab-message-button{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;height:44px;line-height:normal;letter-spacing:normal;margin:0;max-width:100%;min-width:80px;padding:0 12px;position:relative;text-transform:none;width:48%;width:calc(50% - 5px);border:1px solid #1b78cf;-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;word-wrap:normal;white-space:nowrap}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type{float:left;background-color:#fff;color:#1b78cf}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:last-of-type{float:right;background-color:#1b78cf;color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type:last-of-type{float:none;width:auto}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:hover{opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:active:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.08)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:focus:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.15)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button a{color:inherit;text-decoration:inherit}.ab-iam-root.v3 .ab-in-app-message img{float:none;display:inline-block}.ab-iam-root.v3 .ab-in-app-message .ab-icon{float:none;display:inline-block;padding:10px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message .ab-icon .fa{float:none;font-size:30px;width:30px}.ab-iam-root.v3 .ab-start-hidden{visibility:hidden}.ab-iam-root.v3 .ab-centered{margin:auto;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ab-iam-root.v3{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ab-iam-root.v3 .ab-page-blocker{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9001;pointer-events:all;background-color:rgba(51,51,51,.75)}@media (max-width:600px){.ab-iam-root.v3 .ab-in-app-message.ab-slideup{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button svg.ab-chevron.rtl{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-close-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic),.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic) .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-message-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:480px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}}@media (max-height:750px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-height:91%;max-height:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-height:91vh;max-height:calc(100vh - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text{max-height:65vh;max-height:calc(100vh - 30px - 60px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-image{max-height:45vh;max-height:calc(100vh - 30px - 155.17241379310346px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-icon{max-height:45vh;max-height:calc(100vh - 30px - 70px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons{max-height:50vh;max-height:calc(100vh - 30px - 93px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-image{max-height:30vh;max-height:calc(100vh - 30px - 155.17241379310346px - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-icon{max-height:30vh;max-height:calc(100vh - 30px - 70px - 93px - 20px)}}@media (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area img{max-height:100%;max-width:100%}}@media (max-height:750px) and (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important;width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-height:480px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:750px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}",
);

@@ -10,0 +10,0 @@ }

import r, { OPTIONS as z } from "../../managers/braze-instance.js";
export function loadFontAwesome() {
if (r.sr(z.Zo)) return;
if (r.sr(z.Vh)) return;
const e = "https://use.fontawesome.com/7f85a56ba4.css";

@@ -5,0 +5,0 @@ if (

import _t from "../models/identifier.js";
import { getByteLength as er } from "../util/string-utils.js";
import ti from "../models/push-token.js";
import { logger as N, IndexedDBAdapter as it } from "../../shared-lib/index.js";
import { logger as N, IndexedDBAdapter as tt } from "../../shared-lib/index.js";
import { STORAGE_KEYS as t } from "../managers/storage-manager.js";
import { User } from "../User/index.js";
export default class kt {
export default class bt {
constructor(t, s) {

@@ -50,3 +50,3 @@ (this.B = t), (this.C = s), (this.B = t), (this.C = s);

}
En(s, i, e, u, o) {
_n(s, i, e, u, o) {
this.nu("push_token", s, !1, !0),

@@ -56,8 +56,8 @@ this.nu("custom_push_public_key", e, !1, !0),

this.nu("custom_push_vapid_public_key", o, !1, !0);
const r = it.Gs._s,
h = new it(r, N),
const r = tt._s.Xs,
h = new tt(r, N),
n = new ti(s, i, e, u, o);
this.C.js(t.bs.Kn, n.Bs()), h.setItem(r.Os.cu, r.oe, !0);
this.C.Bs(t.gs.Bn, n.bs()), h.setItem(r.Ks.cu, r.oe, !0);
}
Cn(s) {
In(s) {
if (

@@ -70,7 +70,7 @@ (this.nu("push_token", null, !1, !0),

) {
const s = it.Gs._s,
i = new it(s, N);
this.C.js(t.bs.Kn, !1), i.setItem(s.Os.cu, s.oe, !1);
const s = tt._s.Xs,
i = new tt(s, N);
this.C.Bs(t.gs.Bn, !1), i.setItem(s.Ks.cu, s.oe, !1);
}
}
}
import {
isArray as w,
isDate as Nt,
isObject as Ct,
isObject as yt,
validateValueIsFromEnum as ta,

@@ -9,15 +9,15 @@ } from "../util/code-utils.js";

import {
isValidEmail as St,
validateCustomAttributeArrayType as At,
validateCustomAttributeKey as Ut,
isValidEmail as Ct,
validateCustomAttributeArrayType as St,
validateCustomAttributeKey as At,
validateCustomProperties as rt,
validateCustomString as nt,
validatePropertyType as Ft,
validatePropertyType as Ut,
validateStandardString as ir,
} from "../util/validation-utils.js";
import { SET_CUSTOM_USER_ATTRIBUTE_STRING as $t } from "../common/constants.js";
import { toValidBackendTimeString as Bt } from "../util/date-utils.js";
import { SET_CUSTOM_USER_ATTRIBUTE_STRING as Dt } from "../common/constants.js";
import { toValidBackendTimeString as Ft } from "../util/date-utils.js";
export default class User {
constructor(t, e) {
(this.As = t), (this.Ue = e), (this.As = t), (this.Ue = e);
(this.As = t), (this.Bi = e), (this.As = t), (this.Bi = e);
}

@@ -37,3 +37,3 @@ getUserId(t) {

? (N.error("addAlias requires a non-empty label"), !1)
: this.Ue.$n(t, e).ss;
: this.Bi.Ln(t, e).ss;
}

@@ -52,3 +52,3 @@ setFirstName(t) {

setEmail(t) {
return null === t || St(t)
return null === t || Ct(t)
? this.As.nu("email", t)

@@ -134,3 +134,3 @@ : (N.error(

!!ir(t, "set phone number", "the phoneNumber", !0) &&
(null === t || t.match(User.Xn)
(null === t || t.match(User.$n)
? this.As.nu("phone", t)

@@ -171,11 +171,11 @@ : (N.error(`Cannot set phone number - "${t}" did not pass validation.`),

!1)
: this.Ue.setLastKnownLocation(this.As.getUserId(), t, e, s, r, n)
: this.Bi.setLastKnownLocation(this.As.getUserId(), t, e, s, r, n)
.ss);
}
setCustomUserAttribute(t, e, r) {
if (!Ut(t)) return !1;
if (!At(t)) return !1;
const s = (e) => {
const [r] = rt(
e,
$t,
Dt,
"attribute value",

@@ -188,13 +188,13 @@ `set custom user attribute "${t}"`,

if (w(e)) {
const [r, n] = At(t, e);
const [r, n] = St(t, e);
if (!r && !n && 0 !== e.length) return !1;
if (r || 0 === e.length) return this.Ue.Zn(d.au, t, e).ss;
if (r || 0 === e.length) return this.Bi.Gn(d.Hn, t, e).ss;
for (const t of e) if (!s(t)) return !1;
} else if (Ct(e)) {
} else if (yt(e)) {
if (!s(e)) return !1;
if (r) return this.Ue.Zn(d.du, t, e).ss;
if (r) return this.Bi.Gn(d.Kn, t, e).ss;
} else {
if (!(void 0 !== e && Ft(e))) return !1;
if (!(void 0 !== e && Ut(e))) return !1;
if (
(Nt(e) && (e = Bt(e)),
(Nt(e) && (e = Ft(e)),
"string" == typeof e &&

@@ -218,3 +218,3 @@ !nt(

) &&
this.Ue.Zn(d.pu, t, e).ss
this.Bi.Gn(d.Jn, t, e).ss
);

@@ -229,3 +229,3 @@ }

) &&
this.Ue.Zn(d.bu, t, e).ss
this.Bi.Gn(d.Qn, t, e).ss
);

@@ -242,3 +242,3 @@ }

!1)
: this.Ue.Zn(d.fu, t, r).ss;
: this.Bi.Gn(d.Xn, t, r).ss;
}

@@ -259,3 +259,3 @@ setCustomLocationAttribute(t, e, r) {

!1)
: this.Ue.gu(t, e, r).ss)
: this.Bi.Zn(t, e, r).ss)
);

@@ -274,3 +274,3 @@ }

!1)
: this.Ue.yu(t, User.Nu.SUBSCRIBED).ss;
: this.Bi.au(t, User.du.SUBSCRIBED).ss;
}

@@ -288,10 +288,21 @@ removeFromSubscriptionGroup(t) {

!1)
: this.Ue.yu(t, User.Nu.UNSUBSCRIBED).ss;
: this.Bi.au(t, User.du.UNSUBSCRIBED).ss;
}
En(t, e, r, s, n) {
this.As.En(t, e, r, s, n), this.Ue.vu();
setLineId(t) {
return ir(t, "set LINE user ID", "the ID", !0) &&
0 !== (null == t ? void 0 : t.length)
? t && t.length > User.pu
? (N.error(
`Rejected LINE user ID ${t} because it is longer than ${User.pu} characters.`,
),
!1)
: this.As.nu("native_line_id", t)
: (N.error("setLineId requires a non-empty ID"), !1);
}
Cn(t) {
this.As.Cn(t);
_n(t, e, r, s, n) {
this.As._n(t, e, r, s, n), this.Bi.bu();
}
In(t) {
this.As.In(t);
}
}

@@ -311,6 +322,7 @@ (User.Genders = {

}),
(User.Xn = /^[0-9 .\\(\\)\\+\\-]+$/),
(User.Nu = { SUBSCRIBED: "subscribed", UNSUBSCRIBED: "unsubscribed" }),
(User.Cu = "user_id"),
(User.$n = /^[0-9 .\\(\\)\\+\\-]+$/),
(User.du = { SUBSCRIBED: "subscribed", UNSUBSCRIBED: "unsubscribed" }),
(User.fu = "user_id"),
(User.lu = "custom"),
(User.mr = 997);
(User.mr = 997),
(User.pu = 33);

@@ -6,3 +6,3 @@ import { isArray as w } from "./code-utils.js";

ff() {}
Ja(t) {}
Qa(t) {}
static nf(t, e) {

@@ -9,0 +9,0 @@ if (t && e)

@@ -28,10 +28,10 @@ import { logger as N } from "../../shared-lib/index.js";

export const INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES = {
Qr: "unknownBrazeAction",
Vr: "noPushPrompt",
Nr: "unknownBrazeAction",
Or: "noPushPrompt",
};
export const ineligibleBrazeActionURLErrorMessage = (t, o) => {
switch (t) {
case INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.Qr:
case INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.Nr:
return `${o} contains an unknown braze action type and will not be displayed.`;
case INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.Vr:
case INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.Or:
return `${o} contains a push prompt braze action, but is not eligible for a push prompt. Ignoring.`;

@@ -38,0 +38,0 @@ default:

@@ -12,3 +12,3 @@ import ai from "./client-hints-parser.js";

(this.OS = null),
this.Ja().then((t) => (this.OS = t));
this.Qa().then((t) => (this.OS = t));
const i = navigator;

@@ -22,14 +22,14 @@ (this.language = (

).toLowerCase()),
(this.Pa = ui.vg(this.userAgent));
(this.Wa = ui.vg(this.userAgent));
}
dE() {
fE() {
return this.browser === oi.Bg;
}
Qa() {
Za() {
return this.OS || null;
}
Ja() {
Qa() {
return this.OS
? Promise.resolve(this.OS)
: this.Sg.Ja(ui.kg).then((t) => ((this.OS = t), t));
: this.Sg.Qa(ui.kg).then((t) => ((this.OS = t), t));
}

@@ -36,0 +36,0 @@ static vg(t) {

@@ -24,3 +24,3 @@ import Oe from "./base-device-parser.js";

}
Ja(t) {
Qa(t) {
if (this.OS) return Promise.resolve(this.OS);

@@ -27,0 +27,0 @@ const s = (s) => {

import { addPassiveEventListener as J, buildSvg as oe } from "./dom-utils.js";
import { KeyCodes as bt } from "./key-codes.js";
import { KeyCodes as mt } from "./key-codes.js";
export function createCloseButton(t, o, e, n = "ltr") {

@@ -19,3 +19,3 @@ const r = document.createElement("button");

r.addEventListener("keydown", (t) => {
(t.keyCode !== bt.To && t.keyCode !== bt._o) ||
(t.keyCode !== mt.Ro && t.keyCode !== mt.Lo) ||
(e(), t.stopPropagation());

@@ -22,0 +22,0 @@ }),

@@ -22,3 +22,3 @@ import { logger as N } from "../../shared-lib/index.js";

export const DOMUtils = { Ic: null, Mo: _isInView };
export const DIRECTIONS = { wo: "up", vo: "down", kt: "left", Ht: "right" };
export const DIRECTIONS = { Co: "up", $o: "down", kt: "left", Ht: "right" };
export function supportsPassive() {

@@ -73,5 +73,5 @@ if (null == DOMUtils.Ic) {

(((u > 0 &&
n === DIRECTIONS.wo &&
n === DIRECTIONS.Co &&
t.scrollTop === t.scrollHeight - t.offsetHeight) ||
(u < 0 && n === DIRECTIONS.vo && 0 === t.scrollTop)) &&
(u < 0 && n === DIRECTIONS.$o && 0 === t.scrollTop)) &&
e(o),

@@ -78,0 +78,0 @@ (s = null),

@@ -92,2 +92,3 @@ import { logger as N } from "../../shared-lib/index.js";

"removeFromSubscriptionGroup",
"setLineId",
],

@@ -94,0 +95,0 @@ c = function (t) {

@@ -1,1 +0,1 @@

export const KeyCodes = { To: 32, yo: 9, _o: 13, _h: 27 };
export const KeyCodes = { Ro: 32, yo: 9, Lo: 13, _h: 27 };
import { logger as N } from "../../shared-lib/index.js";
import Xt from "../models/backend-errors.js";
import qt from "../models/backend-errors.js";
import { getErrorMessage as si } from "./error-utils.js";

@@ -14,31 +14,30 @@ const l = {

e = new XMLHttpRequest();
const s = () => {
const s = (o) => {
"function" == typeof t.error && t.error(e.status),
"function" == typeof t.os && t.os(!1);
"function" == typeof t.rs && t.rs(!1, o);
};
(e.onload = () => {
let o = !1;
if (4 === e.readyState)
if (
((o = (e.status >= 200 && e.status < 300) || 304 === e.status), o)
) {
if ("function" == typeof t.ss) {
let o, r;
try {
(o = JSON.parse(e.responseText)),
(r = e.getAllResponseHeaders());
} catch (o) {
const n = {
error: "" === e.responseText ? Xt.Tu : Xt.ku,
response: e.responseText,
};
(0, t.ss)(n, r);
}
o && t.ss(o, r);
if (4 !== e.readyState) return;
o = (e.status >= 200 && e.status < 300) || 304 === e.status;
const r = e.getAllResponseHeaders();
if (o) {
if ("function" == typeof t.ss) {
let o;
try {
o = JSON.parse(e.responseText);
} catch (o) {
const n = {
error: "" === e.responseText ? qt.ku : qt.yu,
response: e.responseText,
};
(0, t.ss)(n, r);
}
"function" == typeof t.os && t.os(!0);
} else s();
o && t.ss(o, r);
}
"function" == typeof t.rs && t.rs(!0, r);
} else s(r);
}),
(e.onerror = () => {
s();
s(e.getAllResponseHeaders());
}),

@@ -45,0 +44,0 @@ (e.ontimeout = () => {

@@ -5,19 +5,19 @@ import { REQUEST_ATTEMPT_DEFAULT as Ae } from "../common/constants.js";

O: {
Xu: "data",
Pi: "content_cards/sync",
De: "feature_flags/sync",
sn: "template",
zu: "data",
Ai: "content_cards/sync",
Ue: "feature_flags/sync",
Kr: "template",
K: "banners/sync",
},
el: (e) => (null == e ? void 0 : e.ps(t.bs.EE)),
Ac: (e) => (null == e ? void 0 : e.ps(t.bs.lE)),
Rc: (e, s) => {
null == e || e.js(t.bs.EE, s);
il: (e) => (null == e ? void 0 : e.vs(t.gs.lE)),
sm: (e) => (null == e ? void 0 : e.vs(t.gs.SE)),
nm: (e, s) => {
null == e || e.Bs(t.gs.lE, s);
},
qc: (e, s) => {
null == e || e.js(t.bs.lE, s);
rm: (e, s) => {
null == e || e.Bs(t.gs.SE, s);
},
Eu: (t, e) => {
$u: (t, e) => {
if (!t || !e) return -1;
const s = h.el(t);
const s = h.il(t);
if (null == s) return -1;

@@ -30,3 +30,3 @@ const n = s[e];

if (!t || !e) return s;
const n = h.Ac(t);
const n = h.sm(t);
return null == n ? s : ((s = n[e]), null == s || isNaN(s) ? Ae : s);

@@ -36,16 +36,19 @@ },

if (!t || !e) return;
let n = h.el(t);
null == n && (n = {}), (n[e] = s), h.Rc(t, n);
let n = h.il(t);
null == n && (n = {}), (n[e] = s), h.nm(t, n);
},
ns: (t, e, s) => {
Lu: (t, e, s) => {
if (!t || !e) return;
let n = h.Ac(t);
null == n && (n = {}), (n[e] = s), h.qc(t, n);
let n = h.sm(t);
null == n && (n = {}), (n[e] = s), h.rm(t, n);
},
hs: (t, e) => {
zi: (t, e) => {
t && e && h.Lu(t, e, Ae);
},
Gu: (t, e) => {
if (!t || !e) return;
const s = h.Fu(t, e);
h.ns(t, e, s + 1);
h.Lu(t, e, s + 1);
},
};
export default h;

@@ -13,3 +13,3 @@ import Oe from "./base-device-parser.js";

}
Ja(r) {
Qa(r) {
for (let n = 0; n < r.length; n++) {

@@ -16,0 +16,0 @@ const e = r[n].string;

import {
isArray as w,
isDate as Nt,
isObject as Ct,
isObject as yt,
keys as y,

@@ -9,5 +9,5 @@ } from "./code-utils.js";

import { logger as N } from "../../shared-lib/index.js";
import { toValidBackendTimeString as Bt } from "./date-utils.js";
import { toValidBackendTimeString as Ft } from "./date-utils.js";
import { BRAZE_ACTIONS as oo } from "./braze-actions.js";
import { SET_CUSTOM_USER_ATTRIBUTE_STRING as $t } from "../common/constants.js";
import { SET_CUSTOM_USER_ATTRIBUTE_STRING as Dt } from "../common/constants.js";
export const CUSTOM_DATA_REGEX = /^[^\x00-\x1F\x22]+$/;

@@ -64,3 +64,3 @@ export const CUSTOM_ATTRIBUTE_SPECIAL_CHARS_REGEX = /[$.]/;

if (
(Nt(t[r]) && (e[r] = Bt(t[r])),
(Nt(t[r]) && (e[r] = Ft(t[r])),
!_validateNestedProperties(t[r], e[r], o))

@@ -70,3 +70,3 @@ )

} else {
if (!Ct(t)) return validatePropertyType(t);
if (!yt(t)) return validatePropertyType(t);
for (const r of y(t)) {

@@ -76,3 +76,3 @@ const i = t[r];

if (Nt(i)) {
e[r] = Bt(i);
e[r] = Ft(i);
}

@@ -88,3 +88,3 @@ if (!_validateNestedProperties(i, e[r], o)) return !1;

(i =
Ct(t) || w(t)
yt(t) || w(t)
? _validateNestedProperties(t, e, o ? 1 : -1)

@@ -107,3 +107,3 @@ : validatePropertyType(t)),

let i, a;
e === $t ? ((i = 76800), (a = "75KB")) : ((i = 51200), (a = "50KB"));
e === Dt ? ((i = 76800), (a = "75KB")) : ((i = 51200), (a = "50KB"));
const s = JSON.stringify(t);

@@ -127,11 +127,11 @@ if (er(s) > i)

for (const r in t) {
if (e === $t && !validateCustomAttributeKey(r)) return [!1, null];
if (e === Dt && !validateCustomAttributeKey(r)) return [!1, null];
if (!validateCustomString(r, n, `the ${o} property name`))
return [!1, null];
const i = t[r];
if (e !== $t && null == i) {
if (e !== Dt && null == i) {
delete t[r], delete u[r];
continue;
}
Nt(i) && (u[r] = Bt(i));
Nt(i) && (u[r] = Ft(i));
if (

@@ -143,3 +143,3 @@ !_validateEventPropertyValue(

`the ${o} property "${r}"`,
e === $t,
e === Dt,
)

@@ -172,3 +172,3 @@ )

} else {
if (!Ct(i)) return o(), [!1, !1];
if (!yt(i)) return o(), [!1, !1];
if (r) return o(), [!1, !1];

@@ -178,3 +178,3 @@ if (

i,
$t,
Dt,
"attribute value",

@@ -181,0 +181,0 @@ `set custom user attribute "${t}"`,

@@ -32,4 +32,4 @@ export const ORIENTATION = { PORTRAIT: 0, LANDSCAPE: 1 };

Uo: _isPhone,
$o: _getOrientation,
Ra: _getCurrentUrl,
Jo: _getOrientation,
Ua: _getCurrentUrl,
};

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc