@braze/web-sdk 6.4.0 → 6.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.d.ts +11 -5
- package/package.json +1 -1
- package/shared-lib/encoding-utils.js +3 -3
- package/shared-lib/event-types.js +30 -30
- package/shared-lib/guid.js +3 -3
- package/shared-lib/indexed-db-adapter.js +58 -58
- package/shared-lib/logger.js +7 -7
- package/shared-lib/supported-options.js +17 -16
- package/src/Banner/banner-provider.js +95 -81
- package/src/Banner/banner.js +9 -9
- package/src/Banner/constants.js +4 -0
- package/src/Banner/display/banner-to-html.js +1 -1
- package/src/Banner/display/destroy-banner-html.js +3 -3
- package/src/Banner/display/detect-banner-impressions.js +14 -14
- package/src/Banner/get-all-banners.js +4 -4
- package/src/Banner/get-banner.js +5 -4
- package/src/Banner/log-banner-click.js +2 -2
- package/src/Banner/log-banner-impressions.js +6 -6
- package/src/Banner/request-banners-refresh.js +18 -20
- package/src/Banner/subscribe-to-banners-updates.js +5 -5
- package/src/Banner/ui/insert-banner.js +17 -14
- package/src/Card/card-manager-factory.js +3 -3
- package/src/Card/card-manager.js +32 -32
- package/src/Card/constants.js +1 -0
- package/src/Card/display/card-display.js +11 -11
- package/src/Card/log-card-dismissal.js +2 -2
- package/src/Card/log-content-card-click.js +2 -2
- package/src/Card/log-content-card-impressions.js +5 -5
- package/src/Card/models/captioned-image.js +3 -3
- package/src/Card/models/card.js +16 -16
- package/src/Card/models/classic-card.js +3 -3
- package/src/Card/models/control-card.js +3 -3
- package/src/Card/models/image-only.js +3 -3
- package/src/Card/util/card-factory.js +6 -6
- package/src/ContentCards/content-cards-provider-factory.js +11 -11
- package/src/ContentCards/content-cards-provider.js +110 -96
- package/src/ContentCards/get-cached-content-cards.js +2 -2
- package/src/ContentCards/request-content-cards-refresh.js +2 -2
- package/src/ContentCards/subscribe-to-content-cards-updates.js +5 -5
- package/src/ContentCards/ui/show-content-cards.js +5 -5
- package/src/Core/add-sdk-metadata.js +2 -2
- package/src/Core/change-user.js +4 -4
- package/src/Core/disable-sdk.js +9 -8
- package/src/Core/enable-sdk.js +5 -5
- package/src/Core/get-device-id.js +2 -2
- package/src/Core/handle-braze-action.js +3 -3
- package/src/Core/is-disabled.js +1 -1
- package/src/Core/log-custom-event.js +13 -13
- package/src/Core/log-purchase.js +10 -10
- package/src/Core/open-session.js +7 -7
- package/src/Core/set-sdk-authentication-signature.js +2 -2
- package/src/Core/wipe-data.js +6 -6
- package/src/DUST/dust-connection-core.js +23 -0
- package/src/DUST/dust-provider-factory.js +10 -8
- package/src/DUST/dust-provider.js +408 -176
- package/src/DUST/dust-shared-worker-code.js +2 -0
- package/src/DUST/dust-shared-worker-impl.js +240 -0
- package/src/DUST/dust-worker-bridge.js +136 -0
- package/src/DUST/index.js +10 -0
- package/src/DUST/subscribe-to-dust.js +13 -13
- package/src/FeatureFlags/feature-flag-factory.js +8 -8
- package/src/FeatureFlags/feature-flag.js +6 -6
- package/src/FeatureFlags/feature-flags-provider-factory.js +9 -9
- package/src/FeatureFlags/feature-flags-provider.js +98 -84
- package/src/FeatureFlags/get-all-feature-flags.js +3 -3
- package/src/FeatureFlags/get-feature-flag.js +3 -3
- package/src/FeatureFlags/log-feature-flag-impression.js +7 -7
- package/src/FeatureFlags/refresh-feature-flags.js +2 -2
- package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +4 -4
- package/src/InAppMessage/constants.js +4 -0
- package/src/InAppMessage/defer-in-app-message.js +2 -2
- package/src/InAppMessage/display/get-animation-effect.js +1 -1
- package/src/InAppMessage/display/html-message-to-html.js +6 -6
- package/src/InAppMessage/display/in-app-message-to-html.js +40 -40
- package/src/InAppMessage/display/modal-utils.js +16 -16
- package/src/InAppMessage/get-deferred-in-app-message.js +2 -2
- package/src/InAppMessage/in-app-message-factory.js +4 -4
- package/src/InAppMessage/in-app-message-manager-factory.js +7 -7
- package/src/InAppMessage/in-app-message-manager.js +97 -97
- package/src/InAppMessage/log-in-app-message-button-click.js +14 -14
- package/src/InAppMessage/log-in-app-message-click.js +13 -13
- package/src/InAppMessage/log-in-app-message-html-click.js +11 -11
- package/src/InAppMessage/log-in-app-message-impression.js +8 -8
- package/src/InAppMessage/models/control-message.js +5 -5
- package/src/InAppMessage/models/full-screen-message.js +18 -18
- package/src/InAppMessage/models/html-message.js +19 -19
- package/src/InAppMessage/models/in-app-message-button.js +7 -7
- package/src/InAppMessage/models/in-app-message.js +121 -119
- package/src/InAppMessage/models/modal-message.js +18 -18
- package/src/InAppMessage/models/slide-up-message.js +23 -23
- package/src/InAppMessage/models/templated-in-app-message.js +8 -8
- package/src/InAppMessage/subscribe-to-in-app-message.js +2 -2
- package/src/InAppMessage/ui/automatically-show-in-app-messages.js +5 -5
- package/src/InAppMessage/ui/remove-all-visible-in-app-messages.js +8 -8
- package/src/InAppMessage/ui/show-in-app-message.js +34 -34
- package/src/Push/push-manager-factory.js +14 -14
- package/src/Push/push-manager.js +90 -90
- package/src/Push/request-push-permission.js +1 -1
- package/src/Push/unregister-push.js +1 -1
- package/src/Push/utils/push-utils.js +9 -9
- package/src/User/user-manager.js +32 -32
- package/src/User/user.js +71 -71
- package/src/common/constants.js +8 -11
- package/src/common/content-cards-display.js +32 -32
- package/src/common/event-logger.js +10 -10
- package/src/common/properties-base.js +16 -16
- package/src/l10n/l10n-manager-factory.js +11 -11
- package/src/l10n/l10n-manager.js +2 -2
- package/src/managers/auth-manager.js +14 -14
- package/src/managers/braze-instance.js +163 -159
- package/src/managers/device-manager.js +11 -11
- package/src/managers/network-manager.js +154 -154
- package/src/managers/server-config-manager.js +116 -88
- package/src/managers/session-manager.js +41 -41
- package/src/managers/storage-manager-factory.js +13 -13
- package/src/managers/storage-manager.js +130 -131
- package/src/managers/subscription-manager.js +12 -12
- package/src/managers/utils.js +1 -1
- package/src/models/backend-errors.js +5 -5
- package/src/models/braze-event.js +10 -10
- package/src/models/device.js +2 -2
- package/src/models/identifier.js +17 -17
- package/src/models/push-token.js +14 -14
- package/src/models/request-result.js +4 -4
- package/src/models/server-config.js +41 -37
- package/src/request-controller.js +163 -160
- package/src/triggers/models/custom-event-data.js +5 -5
- package/src/triggers/models/custom-event-property-data.js +6 -6
- package/src/triggers/models/filter-set.js +8 -8
- package/src/triggers/models/filter.js +7 -7
- package/src/triggers/models/in-app-message-click-data.js +13 -13
- package/src/triggers/models/purchase-data.js +2 -2
- package/src/triggers/models/purchase-property-data.js +6 -6
- package/src/triggers/models/push-click-data.js +6 -6
- package/src/triggers/models/trigger-condition.js +47 -47
- package/src/triggers/models/trigger-events.js +2 -2
- package/src/triggers/models/trigger.js +42 -42
- package/src/triggers/triggers-provider-factory.js +5 -5
- package/src/triggers/triggers-provider.js +66 -66
- package/src/ui/js/attach-css.js +3 -3
- package/src/ui/js/load-font-awesome.js +2 -2
- package/src/util/base-device-parser.js +8 -8
- package/src/util/braze-actions.js +5 -5
- package/src/util/browser-detector.js +33 -33
- package/src/util/client-hints-parser.js +10 -10
- package/src/util/component-utils.js +5 -5
- package/src/util/dom-utils.js +13 -13
- package/src/util/html-display-utils.js +7 -7
- package/src/util/key-codes.js +1 -1
- package/src/util/net.js +6 -6
- package/src/util/request-header-utils.js +26 -26
- package/src/util/user-agent-parser.js +20 -20
- package/src/util/validation-utils.js +16 -16
- package/src/util/window-utils.js +3 -3
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class
|
|
1
|
+
import fi from "./trigger-condition.js";
|
|
2
|
+
export default class mi {
|
|
3
3
|
constructor(t, i) {
|
|
4
|
-
(this.
|
|
4
|
+
(this.rf = t), (this.nf = i), (this.rf = t), (this.nf = i);
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
if (null == this.
|
|
8
|
-
const i =
|
|
6
|
+
sf(t) {
|
|
7
|
+
if (null == this.rf) return !1;
|
|
8
|
+
const i = fi.ef(t[0], this.rf);
|
|
9
9
|
if (!i) return !1;
|
|
10
|
-
let r = null == this.
|
|
11
|
-
if (null != this.
|
|
12
|
-
for (let i = 0; i < this.
|
|
13
|
-
if (this.
|
|
10
|
+
let r = null == this.nf || 0 === this.nf.length;
|
|
11
|
+
if (null != this.nf)
|
|
12
|
+
for (let i = 0; i < this.nf.length; i++)
|
|
13
|
+
if (this.nf[i] === t[1]) {
|
|
14
14
|
r = !0;
|
|
15
15
|
break;
|
|
16
16
|
}
|
|
17
17
|
return i && r;
|
|
18
18
|
}
|
|
19
19
|
static fromJson(t) {
|
|
20
|
-
return new
|
|
20
|
+
return new mi(t ? t.id : null, t ? t.buttons : null);
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
return this.
|
|
22
|
+
gt() {
|
|
23
|
+
return this.rf;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -2,13 +2,13 @@ export default class ns {
|
|
|
2
2
|
constructor(t) {
|
|
3
3
|
(this.productId = t), (this.productId = t);
|
|
4
4
|
}
|
|
5
|
-
|
|
5
|
+
sf(t) {
|
|
6
6
|
return null == this.productId || t[0] === this.productId;
|
|
7
7
|
}
|
|
8
8
|
static fromJson(t) {
|
|
9
9
|
return new ns(t ? t.product_id : null);
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
gt() {
|
|
12
12
|
return this.productId;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import is from "./filter-set.js";
|
|
2
2
|
export default class us {
|
|
3
3
|
constructor(t, s) {
|
|
4
|
-
(this.productId = t), (this.
|
|
4
|
+
(this.productId = t), (this.if = s), (this.productId = t), (this.if = s);
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
if (null == this.productId || null == this.
|
|
6
|
+
sf(t) {
|
|
7
|
+
if (null == this.productId || null == this.if) return !1;
|
|
8
8
|
const s = t[0],
|
|
9
9
|
i = t[1];
|
|
10
|
-
return s === this.productId && this.
|
|
10
|
+
return s === this.productId && this.if.sf(i);
|
|
11
11
|
}
|
|
12
12
|
static fromJson(t) {
|
|
13
13
|
return new us(
|
|
@@ -15,7 +15,7 @@ export default class us {
|
|
|
15
15
|
t ? is.fromJson(t.property_filters) : null,
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
return { id: this.productId, pf: this.
|
|
18
|
+
gt() {
|
|
19
|
+
return { id: this.productId, pf: this.if ? this.if.gt() : null };
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import fi from "./trigger-condition.js";
|
|
2
2
|
export default class ur {
|
|
3
3
|
constructor(t) {
|
|
4
|
-
(this.
|
|
4
|
+
(this.rf = t), (this.rf = t);
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
return null == this.
|
|
6
|
+
sf(t) {
|
|
7
|
+
return null == this.rf || fi.ef(t[0], this.rf);
|
|
8
8
|
}
|
|
9
9
|
static fromJson(t) {
|
|
10
10
|
return new ur(t ? t.campaign_id : null);
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
return this.
|
|
12
|
+
gt() {
|
|
13
|
+
return this.rf;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import rs from "./custom-event-data.js";
|
|
2
2
|
import ls from "./custom-event-property-data.js";
|
|
3
3
|
import is from "./filter-set.js";
|
|
4
|
-
import
|
|
4
|
+
import mi from "./in-app-message-click-data.js";
|
|
5
5
|
import ns from "./purchase-data.js";
|
|
6
6
|
import us from "./purchase-property-data.js";
|
|
7
7
|
import ur from "./push-click-data.js";
|
|
8
|
-
import
|
|
8
|
+
import ot from "./trigger-events.js";
|
|
9
9
|
import { logger as E } from "../../../shared-lib/index.js";
|
|
10
|
-
import { getErrorMessage as
|
|
11
|
-
export default class
|
|
10
|
+
import { getErrorMessage as ai } from "../../util/error-utils.js";
|
|
11
|
+
export default class fi {
|
|
12
12
|
constructor(e, t) {
|
|
13
13
|
(this.type = e), (this.data = t), (this.type = e), (this.data = t);
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
return
|
|
15
|
+
km(e, t) {
|
|
16
|
+
return fi._m[this.type] === e && (null == this.data || this.data.sf(t));
|
|
17
17
|
}
|
|
18
|
-
static
|
|
18
|
+
static ef(e, t) {
|
|
19
19
|
let r = null;
|
|
20
20
|
try {
|
|
21
21
|
r = window.atob(e);
|
|
22
22
|
} catch (t) {
|
|
23
|
-
return E.info("Failed to unencode analytics id " + e + ": " +
|
|
23
|
+
return E.info("Failed to unencode analytics id " + e + ": " + ai(t)), !1;
|
|
24
24
|
}
|
|
25
25
|
return t === r.split("_")[0];
|
|
26
26
|
}
|
|
@@ -28,76 +28,76 @@ export default class ri {
|
|
|
28
28
|
const t = e.type;
|
|
29
29
|
let r = null;
|
|
30
30
|
switch (t) {
|
|
31
|
-
case
|
|
32
|
-
case
|
|
31
|
+
case fi.Qn.OPEN:
|
|
32
|
+
case fi.Qn.qs:
|
|
33
33
|
break;
|
|
34
|
-
case
|
|
34
|
+
case fi.Qn.Rr:
|
|
35
35
|
r = ns.fromJson(e.data);
|
|
36
36
|
break;
|
|
37
|
-
case
|
|
37
|
+
case fi.Qn.bm:
|
|
38
38
|
r = us.fromJson(e.data);
|
|
39
39
|
break;
|
|
40
|
-
case
|
|
40
|
+
case fi.Qn.wr:
|
|
41
41
|
r = ur.fromJson(e.data);
|
|
42
42
|
break;
|
|
43
|
-
case
|
|
43
|
+
case fi.Qn.xe:
|
|
44
44
|
r = rs.fromJson(e.data);
|
|
45
45
|
break;
|
|
46
|
-
case
|
|
46
|
+
case fi.Qn.Em:
|
|
47
47
|
r = ls.fromJson(e.data);
|
|
48
48
|
break;
|
|
49
|
-
case
|
|
50
|
-
r =
|
|
49
|
+
case fi.Qn.rm:
|
|
50
|
+
r = mi.fromJson(e.data);
|
|
51
51
|
}
|
|
52
|
-
return new
|
|
52
|
+
return new fi(t, r);
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
return { t: this.type, d: this.data ? this.data.
|
|
54
|
+
gt() {
|
|
55
|
+
return { t: this.type, d: this.data ? this.data.gt() : null };
|
|
56
56
|
}
|
|
57
|
-
static
|
|
57
|
+
static _u(e) {
|
|
58
58
|
let t,
|
|
59
59
|
r = null;
|
|
60
60
|
switch (e.t) {
|
|
61
|
-
case
|
|
62
|
-
case
|
|
61
|
+
case fi.Qn.OPEN:
|
|
62
|
+
case fi.Qn.qs:
|
|
63
63
|
break;
|
|
64
|
-
case
|
|
64
|
+
case fi.Qn.Rr:
|
|
65
65
|
r = new ns(e.d);
|
|
66
66
|
break;
|
|
67
|
-
case
|
|
68
|
-
(t = e.d || {}), (r = new us(t.id, is.
|
|
67
|
+
case fi.Qn.bm:
|
|
68
|
+
(t = e.d || {}), (r = new us(t.id, is._u(t.pf || [])));
|
|
69
69
|
break;
|
|
70
|
-
case
|
|
70
|
+
case fi.Qn.wr:
|
|
71
71
|
r = new ur(e.d);
|
|
72
72
|
break;
|
|
73
|
-
case
|
|
73
|
+
case fi.Qn.xe:
|
|
74
74
|
r = new rs(e.d);
|
|
75
75
|
break;
|
|
76
|
-
case
|
|
77
|
-
(t = e.d || {}), (r = new ls(t.e, is.
|
|
76
|
+
case fi.Qn.Em:
|
|
77
|
+
(t = e.d || {}), (r = new ls(t.e, is._u(t.pf || [])));
|
|
78
78
|
break;
|
|
79
|
-
case
|
|
80
|
-
r = new
|
|
79
|
+
case fi.Qn.rm:
|
|
80
|
+
r = new mi(e.d);
|
|
81
81
|
}
|
|
82
|
-
return new
|
|
82
|
+
return new fi(e.t, r);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
(
|
|
85
|
+
(fi.Qn = {
|
|
86
86
|
OPEN: "open",
|
|
87
87
|
Rr: "purchase",
|
|
88
|
-
|
|
88
|
+
bm: "purchase_property",
|
|
89
89
|
wr: "push_click",
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
xe: "custom_event",
|
|
91
|
+
Em: "custom_event_property",
|
|
92
|
+
rm: "iam_click",
|
|
93
93
|
qs: "test",
|
|
94
94
|
}),
|
|
95
|
-
(
|
|
96
|
-
(
|
|
97
|
-
(
|
|
98
|
-
(
|
|
99
|
-
(
|
|
100
|
-
(
|
|
101
|
-
(
|
|
102
|
-
(
|
|
103
|
-
(
|
|
95
|
+
(fi._m = {}),
|
|
96
|
+
(fi._m[fi.Qn.OPEN] = ot.OPEN),
|
|
97
|
+
(fi._m[fi.Qn.Rr] = ot.Rr),
|
|
98
|
+
(fi._m[fi.Qn.bm] = ot.Rr),
|
|
99
|
+
(fi._m[fi.Qn.wr] = ot.wr),
|
|
100
|
+
(fi._m[fi.Qn.xe] = ot.xe),
|
|
101
|
+
(fi._m[fi.Qn.Em] = ot.xe),
|
|
102
|
+
(fi._m[fi.Qn.rm] = ot.rm),
|
|
103
|
+
(fi._m[fi.Qn.qs] = ot.qs);
|
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
import {
|
|
2
|
-
dateFromUnixTimestamp as
|
|
3
|
-
rehydrateDateAfterJsonization as
|
|
2
|
+
dateFromUnixTimestamp as V,
|
|
3
|
+
rehydrateDateAfterJsonization as Y,
|
|
4
4
|
} from "../../util/date-utils.js";
|
|
5
5
|
import { logger as E } from "../../../shared-lib/index.js";
|
|
6
|
-
import
|
|
6
|
+
import fi from "./trigger-condition.js";
|
|
7
7
|
import { validateValueIsFromEnum as ta } from "../../util/code-utils.js";
|
|
8
8
|
export default class pt {
|
|
9
|
-
constructor(t, i = [], s, e, r = 0, h, l, o = 0, n = pt.
|
|
9
|
+
constructor(t, i = [], s, e, r = 0, h, l, o = 0, n = pt.Td, a, u, d) {
|
|
10
10
|
(this.id = t),
|
|
11
|
-
(this.
|
|
11
|
+
(this.Pd = i),
|
|
12
12
|
(this.startTime = s),
|
|
13
13
|
(this.endTime = e),
|
|
14
14
|
(this.priority = r),
|
|
15
15
|
(this.type = h),
|
|
16
16
|
(this.data = l),
|
|
17
|
-
(this.
|
|
18
|
-
(this.
|
|
19
|
-
(this.
|
|
20
|
-
(this.
|
|
21
|
-
(this.
|
|
17
|
+
(this.Ed = o),
|
|
18
|
+
(this.Nd = n),
|
|
19
|
+
(this.Wn = a),
|
|
20
|
+
(this._d = u),
|
|
21
|
+
(this.Id = d),
|
|
22
22
|
(this.id = t),
|
|
23
|
-
(this.
|
|
23
|
+
(this.Pd = i || []),
|
|
24
24
|
void 0 === s && (s = null),
|
|
25
25
|
(this.startTime = s),
|
|
26
26
|
void 0 === e && (e = null),
|
|
27
27
|
(this.endTime = e),
|
|
28
28
|
(this.priority = r || 0),
|
|
29
29
|
(this.type = h),
|
|
30
|
-
(this.
|
|
31
|
-
null == a && (a = 1e3 * (this.
|
|
32
|
-
(this.
|
|
30
|
+
(this.Ed = o || 0),
|
|
31
|
+
null == a && (a = 1e3 * (this.Ed + 30)),
|
|
32
|
+
(this.Wn = a),
|
|
33
33
|
(this.data = l),
|
|
34
|
-
null != n && (this.
|
|
35
|
-
(this.
|
|
36
|
-
(this.
|
|
34
|
+
null != n && (this.Nd = n),
|
|
35
|
+
(this._d = u),
|
|
36
|
+
(this.Id = d || null);
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
xd(t) {
|
|
39
39
|
return (
|
|
40
|
-
null == this.
|
|
40
|
+
null == this.Id || (this.Nd !== pt.Td && t - this.Id >= 1e3 * this.Nd)
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
this.
|
|
43
|
+
zd(t) {
|
|
44
|
+
this.Id = t;
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
const i = t + 1e3 * this.
|
|
46
|
+
Md(t) {
|
|
47
|
+
const i = t + 1e3 * this.Ed;
|
|
48
48
|
return Math.max(i - new Date().valueOf(), 0);
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
Bd(t) {
|
|
51
51
|
const i = new Date().valueOf() - t,
|
|
52
|
-
s = null == t || isNaN(i) || null == this.
|
|
52
|
+
s = null == t || isNaN(i) || null == this.Wn || i < this.Wn;
|
|
53
53
|
return (
|
|
54
54
|
s ||
|
|
55
55
|
E.info(
|
|
56
|
-
`Trigger action ${this.type} is no longer eligible for display - fired ${i}ms ago and has a timeout of ${this.
|
|
56
|
+
`Trigger action ${this.type} is no longer eligible for display - fired ${i}ms ago and has a timeout of ${this.Wn}ms.`,
|
|
57
57
|
),
|
|
58
58
|
!s
|
|
59
59
|
);
|
|
@@ -62,9 +62,9 @@ export default class pt {
|
|
|
62
62
|
const i = t.id,
|
|
63
63
|
s = [];
|
|
64
64
|
for (let i = 0; i < t.trigger_condition.length; i++)
|
|
65
|
-
s.push(
|
|
66
|
-
const e =
|
|
67
|
-
r =
|
|
65
|
+
s.push(fi.fromJson(t.trigger_condition[i]));
|
|
66
|
+
const e = V(t.start_time),
|
|
67
|
+
r = V(t.end_time),
|
|
68
68
|
h = t.priority,
|
|
69
69
|
l = t.type,
|
|
70
70
|
o = t.delay,
|
|
@@ -73,7 +73,7 @@ export default class pt {
|
|
|
73
73
|
u = t.data,
|
|
74
74
|
d = t.min_seconds_since_last_trigger;
|
|
75
75
|
return ta(
|
|
76
|
-
pt.
|
|
76
|
+
pt.Qn,
|
|
77
77
|
l,
|
|
78
78
|
"Could not construct Trigger from server data",
|
|
79
79
|
"Trigger.Types",
|
|
@@ -81,9 +81,9 @@ export default class pt {
|
|
|
81
81
|
? new pt(i, s, e, r, h, l, u, o, n, a, d)
|
|
82
82
|
: null;
|
|
83
83
|
}
|
|
84
|
-
|
|
84
|
+
gt() {
|
|
85
85
|
const t = [];
|
|
86
|
-
for (let i = 0; i < this.
|
|
86
|
+
for (let i = 0; i < this.Pd.length; i++) t.push(this.Pd[i].gt());
|
|
87
87
|
return {
|
|
88
88
|
i: this.id,
|
|
89
89
|
c: t,
|
|
@@ -92,22 +92,22 @@ export default class pt {
|
|
|
92
92
|
p: this.priority,
|
|
93
93
|
t: this.type,
|
|
94
94
|
da: this.data,
|
|
95
|
-
d: this.
|
|
96
|
-
r: this.
|
|
97
|
-
tm: this.
|
|
98
|
-
ss: this.
|
|
99
|
-
ld: this.
|
|
95
|
+
d: this.Ed,
|
|
96
|
+
r: this.Nd,
|
|
97
|
+
tm: this.Wn,
|
|
98
|
+
ss: this._d,
|
|
99
|
+
ld: this.Id,
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
static
|
|
102
|
+
static _u(t) {
|
|
103
103
|
const i = [],
|
|
104
104
|
s = t.c || [];
|
|
105
|
-
for (let t = 0; t < s.length; t++) i.push(
|
|
105
|
+
for (let t = 0; t < s.length; t++) i.push(fi._u(s[t]));
|
|
106
106
|
return new pt(
|
|
107
107
|
t.i,
|
|
108
108
|
i,
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
Y(t.s),
|
|
110
|
+
Y(t.e),
|
|
111
111
|
t.p,
|
|
112
112
|
t.t,
|
|
113
113
|
t.da,
|
|
@@ -119,4 +119,4 @@ export default class pt {
|
|
|
119
119
|
);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
(pt.
|
|
122
|
+
(pt.Qn = { Ln: "inapp", Cd: "templated_iam" }), (pt.Td = -1);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import r, { OPTIONS as
|
|
1
|
+
import je from "../InAppMessage/in-app-message-manager-factory.js";
|
|
2
|
+
import r, { OPTIONS as D } from "../managers/braze-instance.js";
|
|
3
3
|
import gr from "./triggers-provider.js";
|
|
4
4
|
export const TriggersProviderFactory = {
|
|
5
5
|
i: !1,
|
|
@@ -11,13 +11,13 @@ export const TriggersProviderFactory = {
|
|
|
11
11
|
),
|
|
12
12
|
rg: () => {
|
|
13
13
|
if (!TriggersProviderFactory.provider) {
|
|
14
|
-
const i = r.
|
|
14
|
+
const i = r.re(D.Xh);
|
|
15
15
|
(TriggersProviderFactory.provider = new gr(
|
|
16
16
|
null != i ? i : 30,
|
|
17
|
-
|
|
17
|
+
je.ra().Tn(),
|
|
18
18
|
r.p(),
|
|
19
19
|
r.nn(),
|
|
20
|
-
|
|
20
|
+
je.ra(),
|
|
21
21
|
)),
|
|
22
22
|
r.v(TriggersProviderFactory.provider);
|
|
23
23
|
}
|