@braze/web-sdk 4.8.1 → 4.8.3
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/index.d.ts +4 -1
- package/package.json +1 -1
- package/shared-lib/braze-shared-lib.js +5 -5
- package/shared-lib/guid.js +2 -2
- package/shared-lib/indexed-db-adapter.js +2 -2
- package/shared-lib/logger.js +18 -18
- package/src/ContentCards/content-cards.js +1 -1
- package/src/FeatureFlags/feature-flags-provider.js +1 -1
- package/src/Feed/feed.js +1 -1
- package/src/Feed/ui/show-feed.js +14 -14
- package/src/InAppMessage/display/in-app-message-to-html.js +64 -47
- package/src/Push/push-manager.js +10 -9
- package/src/common/base-feed.js +6 -3
- package/src/common/base-provider.js +2 -2
- package/src/common/event-logger.js +14 -7
- package/src/common/feed-display.js +30 -30
- package/src/l10n/l10n-manager-factory.js +7 -7
- package/src/managers/braze-instance.js +2 -2
- package/src/managers/network-manager.js +1 -1
- package/src/managers/session-manager.js +1 -1
- package/src/managers/storage-manager.js +2 -2
- package/src/models/server-config.js +2 -2
- package/src/request-controller.js +5 -5
- package/src/ui/js/attach-css.js +1 -1
- package/src/ui/js/feed-css.js +4 -4
- package/src/ui/js/iam-css.js +4 -4
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Type definitions for @braze/web-sdk v4.8.
|
|
2
|
+
* Type definitions for @braze/web-sdk v4.8.3
|
|
3
3
|
* Project: https://github.com/braze-inc/braze-web-sdk
|
|
4
4
|
* (c) Braze, Inc. 2023 - http://braze.com
|
|
5
5
|
* License available at https://github.com/braze-inc/braze-web-sdk/blob/master/LICENSE
|
|
@@ -1993,6 +1993,9 @@
|
|
|
1993
1993
|
* When a new session is opened, this refreshes In-App Messages. Content Cards are refreshed automatically if
|
|
1994
1994
|
* the `subscribeToContentCardsUpdates` has been registered prior to `openSession`. If the user has previously
|
|
1995
1995
|
* granted the site permission to send push, automatically sends the push registration to the Braze backend.
|
|
1996
|
+
*
|
|
1997
|
+
* Be sure to call `openSession` at the end of your initialization code section, after any calls to `changeUser` or subscribing to Content Cards,
|
|
1998
|
+
* In-App Message, and Feature Flag updates. Calling `openSession` before `changeUser` may result in a second session start event.
|
|
1996
1999
|
*/
|
|
1997
2000
|
export function openSession(): void;
|
|
1998
2001
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import je from "./encoding-utils.js";
|
|
2
2
|
import { EventTypes as ve, InternalEventTypes as De } from "./event-types.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const r = { xn: je, q: ve, Cr: De, Z:
|
|
3
|
+
import Be from "./guid.js";
|
|
4
|
+
import Ae from "./indexed-db-adapter.js";
|
|
5
|
+
import Ge from "./logger.js";
|
|
6
|
+
import Oe from "./supported-options.js";
|
|
7
|
+
const r = { xn: je, q: ve, Cr: De, Z: Be, xt: Ae, zt: Ae.ep, j: Ge, xo: Oe };
|
|
8
8
|
export default r;
|
package/shared-lib/guid.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default class
|
|
1
|
+
export default class Ae {
|
|
2
2
|
constructor(t, e) {
|
|
3
3
|
(this.nd = "undefined" == typeof window ? self : window),
|
|
4
4
|
(this.od = t),
|
|
@@ -296,7 +296,7 @@ export default class Be {
|
|
|
296
296
|
});
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
|
|
299
|
+
Ae.ep = {
|
|
300
300
|
Ft: {
|
|
301
301
|
ad: "AppboyServiceWorkerAsyncStorage",
|
|
302
302
|
VERSION: 6,
|
package/shared-lib/logger.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
const
|
|
1
|
+
const Ge = {
|
|
2
2
|
init: function(n) {
|
|
3
|
-
(void 0 === n && void 0 !==
|
|
3
|
+
(void 0 === n && void 0 !== Ge.zg) || (Ge.zg = !!n), Ge.Eg || (Ge.Eg = !0);
|
|
4
4
|
},
|
|
5
5
|
destroy: function() {
|
|
6
|
-
(
|
|
6
|
+
(Ge.Eg = !1), (Ge.zg = void 0), (Ge.sd = void 0);
|
|
7
7
|
},
|
|
8
8
|
setLogger: function(n) {
|
|
9
9
|
"function" == typeof n
|
|
10
|
-
? (
|
|
11
|
-
:
|
|
10
|
+
? (Ge.init(), (Ge.sd = n))
|
|
11
|
+
: Ge.info("Ignoring setLogger call since logger is not a function");
|
|
12
12
|
},
|
|
13
13
|
toggleLogging: function() {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
? (console.log("Disabling Braze logging"), (
|
|
17
|
-
: (console.log("Enabled Braze logging"), (
|
|
14
|
+
Ge.init(),
|
|
15
|
+
Ge.zg
|
|
16
|
+
? (console.log("Disabling Braze logging"), (Ge.zg = !1))
|
|
17
|
+
: (console.log("Enabled Braze logging"), (Ge.zg = !0));
|
|
18
18
|
},
|
|
19
19
|
info: function(n) {
|
|
20
|
-
if (
|
|
20
|
+
if (Ge.zg) {
|
|
21
21
|
const o = "Braze: " + n;
|
|
22
|
-
null !=
|
|
22
|
+
null != Ge.sd ? Ge.sd(o) : console.log(o);
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
warn: function(n) {
|
|
26
|
-
if (
|
|
27
|
-
const o = "Braze SDK Warning: " + n + " (v4.8.
|
|
28
|
-
null !=
|
|
26
|
+
if (Ge.zg) {
|
|
27
|
+
const o = "Braze SDK Warning: " + n + " (v4.8.3)";
|
|
28
|
+
null != Ge.sd ? Ge.sd(o) : console.warn(o);
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
error: function(n) {
|
|
32
|
-
if (
|
|
33
|
-
const o = "Braze SDK Error: " + n + " (v4.8.
|
|
34
|
-
null !=
|
|
32
|
+
if (Ge.zg) {
|
|
33
|
+
const o = "Braze SDK Error: " + n + " (v4.8.3)";
|
|
34
|
+
null != Ge.sd ? Ge.sd(o) : console.error(o);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
export default
|
|
38
|
+
export default Ge;
|
|
@@ -96,7 +96,7 @@ export default class er extends y {
|
|
|
96
96
|
qi() {
|
|
97
97
|
null != this.ji && (clearTimeout(this.ji), (this.ji = null));
|
|
98
98
|
}
|
|
99
|
-
zi(t = 1e3 * this.yi, s, i, e) {
|
|
99
|
+
zi(t = 1e3 * this.yi, s, i, e = !1) {
|
|
100
100
|
this.qi(),
|
|
101
101
|
(this.ji = window.setTimeout(() => {
|
|
102
102
|
this.refreshFeatureFlags(s, i, e);
|
package/src/Feed/feed.js
CHANGED
package/src/Feed/ui/show-feed.js
CHANGED
|
@@ -33,21 +33,21 @@ export function showFeed(t, n, o) {
|
|
|
33
33
|
i = e.nn(L.tn) || e.nn(L.en) || !1;
|
|
34
34
|
let l = !1;
|
|
35
35
|
null == t && ((t = document.body), (l = !0));
|
|
36
|
-
let a
|
|
37
|
-
f =
|
|
36
|
+
let a,
|
|
37
|
+
f = !1;
|
|
38
38
|
null == n
|
|
39
|
-
? ((
|
|
40
|
-
B(
|
|
41
|
-
(
|
|
42
|
-
: (
|
|
43
|
-
const u = I(
|
|
44
|
-
if (
|
|
45
|
-
(null ==
|
|
46
|
-
new Date().valueOf() -
|
|
39
|
+
? ((a = ie.er().Ei()),
|
|
40
|
+
B(a, s(a.cards, o), a.lastUpdated, null, i),
|
|
41
|
+
(f = !0))
|
|
42
|
+
: (a = new Feed(s(n, o), new Date()));
|
|
43
|
+
const u = I(a, i, l);
|
|
44
|
+
if (f) {
|
|
45
|
+
(null == a.lastUpdated ||
|
|
46
|
+
new Date().valueOf() - a.lastUpdated.valueOf() > Feed.mr) &&
|
|
47
47
|
(r.j.info(
|
|
48
48
|
`Cached feed was older than max TTL of ${Feed.mr} ms, requesting an update from the server.`
|
|
49
49
|
),
|
|
50
|
-
$(
|
|
50
|
+
$(a, u));
|
|
51
51
|
const e = new Date().valueOf(),
|
|
52
52
|
t = subscribeToFeedUpdates(function(t) {
|
|
53
53
|
const n = u.querySelectorAll(".ab-refresh-button")[0];
|
|
@@ -63,7 +63,7 @@ export function showFeed(t, n, o) {
|
|
|
63
63
|
n.className = n.className.replace(/fa-spin/g, "");
|
|
64
64
|
}, Math.max(t, 0));
|
|
65
65
|
}
|
|
66
|
-
B(
|
|
66
|
+
B(a, s(t.cards, o), t.lastUpdated, u, i);
|
|
67
67
|
});
|
|
68
68
|
A(t, u);
|
|
69
69
|
}
|
|
@@ -79,8 +79,8 @@ export function showFeed(t, n, o) {
|
|
|
79
79
|
}, 0),
|
|
80
80
|
l && u.focus(),
|
|
81
81
|
logFeedDisplayed(),
|
|
82
|
-
q(
|
|
83
|
-
|
|
82
|
+
q(a, u),
|
|
83
|
+
a && F(a.cards, e);
|
|
84
84
|
};
|
|
85
85
|
var m;
|
|
86
86
|
null != t
|
|
@@ -16,49 +16,58 @@ import { _handleBrazeAction as m } from "../../Core/handle-braze-action.js";
|
|
|
16
16
|
import at from "./html-message-to-html.js";
|
|
17
17
|
import le from "./modal-utils.js";
|
|
18
18
|
import r from "../../../shared-lib/braze-shared-lib.js";
|
|
19
|
-
export default function ce(e, a, s,
|
|
19
|
+
export default function ce(e, a, s, n, t, i, l) {
|
|
20
20
|
if (((e.ke = document.activeElement), e instanceof HtmlMessage))
|
|
21
|
-
return at(e, a, s,
|
|
22
|
-
const u = (function(e, a, s,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
return at(e, a, s, t, i, l);
|
|
22
|
+
const u = (function(e, a, s, n, t, i) {
|
|
23
|
+
let l = null;
|
|
24
|
+
const c = document.createElement("div");
|
|
25
|
+
(c.className = "ab-in-app-message ab-start-hidden ab-background"),
|
|
26
|
+
i && (c.style.zIndex = (i + 1).toString()),
|
|
26
27
|
e.xe() &&
|
|
27
|
-
((
|
|
28
|
-
|
|
28
|
+
((c.className += " ab-modal-interactions"),
|
|
29
|
+
c.setAttribute("tabindex", "-1")),
|
|
29
30
|
e.ye() ||
|
|
30
|
-
((
|
|
31
|
-
(
|
|
32
|
-
ne(e.backgroundColor) && (
|
|
33
|
-
const
|
|
34
|
-
-1 !==
|
|
35
|
-
((
|
|
31
|
+
((c.style.color = me(e.textColor)),
|
|
32
|
+
(c.style.backgroundColor = me(e.backgroundColor)),
|
|
33
|
+
ne(e.backgroundColor) && (c.className += " ab-no-shadow"));
|
|
34
|
+
const d = () => {
|
|
35
|
+
-1 !== c.className.indexOf("ab-start-hidden") &&
|
|
36
|
+
((c.className = c.className.replace("ab-start-hidden", "")),
|
|
36
37
|
document.querySelectorAll(".ab-iam-img-loading").length > 0
|
|
37
|
-
?
|
|
38
|
+
? n(
|
|
38
39
|
`Cannot show in-app message ${e.message} because another message is being shown.`,
|
|
39
40
|
InAppMessage.Me.ze
|
|
40
41
|
)
|
|
41
|
-
: s(
|
|
42
|
+
: s(c));
|
|
42
43
|
},
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
44
|
+
u = (o = !0) => {
|
|
45
|
+
const a = document.querySelectorAll(".ab-iam-root");
|
|
46
|
+
a &&
|
|
47
|
+
a.length > 0 &&
|
|
48
|
+
(a[0].classList.remove("ab-iam-img-loading"),
|
|
49
|
+
l && (clearTimeout(l), (l = null)),
|
|
50
|
+
o
|
|
51
|
+
? d()
|
|
52
|
+
: r.j.error(
|
|
53
|
+
`Cannot show in-app message ${e.message} because the image failed to load.`
|
|
54
|
+
));
|
|
46
55
|
};
|
|
47
56
|
e.imageStyle === InAppMessage.ImageStyle.GRAPHIC &&
|
|
48
|
-
(
|
|
57
|
+
(c.className += " graphic"),
|
|
49
58
|
e.orientation === InAppMessage.Orientation.LANDSCAPE &&
|
|
50
|
-
(
|
|
59
|
+
(c.className += " landscape"),
|
|
51
60
|
null != e.buttons &&
|
|
52
61
|
0 === e.buttons.length &&
|
|
53
62
|
(e.clickAction !== InAppMessage.ClickAction.NONE &&
|
|
54
|
-
(
|
|
55
|
-
(
|
|
56
|
-
e.he(
|
|
63
|
+
(c.className += " ab-clickable"),
|
|
64
|
+
(c.onclick = o => (
|
|
65
|
+
e.he(c, () => {
|
|
57
66
|
logInAppMessageClick(e),
|
|
58
67
|
e.clickAction === InAppMessage.ClickAction.URI
|
|
59
68
|
? m(
|
|
60
69
|
e.uri || "",
|
|
61
|
-
|
|
70
|
+
t || e.openTarget === InAppMessage.OpenTarget.BLANK,
|
|
62
71
|
o
|
|
63
72
|
)
|
|
64
73
|
: e.clickAction === InAppMessage.ClickAction.NEWS_FEED && a();
|
|
@@ -66,21 +75,21 @@ export default function ce(e, a, s, t, n, i, l) {
|
|
|
66
75
|
o.stopPropagation(),
|
|
67
76
|
!1
|
|
68
77
|
)));
|
|
69
|
-
const
|
|
78
|
+
const b = o(
|
|
70
79
|
"Close Message",
|
|
71
80
|
e.ye() ? void 0 : me(e.closeButtonColor),
|
|
72
81
|
() => {
|
|
73
|
-
e.he(
|
|
82
|
+
e.he(c);
|
|
74
83
|
}
|
|
75
84
|
);
|
|
76
|
-
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
|
|
85
|
+
c.appendChild(b), i && (b.style.zIndex = (i + 2).toString());
|
|
86
|
+
const p = document.createElement("div");
|
|
87
|
+
p.className = "ab-message-text";
|
|
88
|
+
const g = (e.messageAlignment || e.Le).toLowerCase();
|
|
89
|
+
p.className += " " + g + "-aligned";
|
|
81
90
|
let f = !1;
|
|
82
|
-
const
|
|
83
|
-
if (((
|
|
91
|
+
const h = document.createElement("div");
|
|
92
|
+
if (((h.className = "ab-image-area"), e.imageUrl)) {
|
|
84
93
|
if (e.cropType === InAppMessage.CropType.CENTER_CROP) {
|
|
85
94
|
const o = document.createElement("span");
|
|
86
95
|
(o.className = "ab-center-cropped-img"),
|
|
@@ -88,7 +97,7 @@ export default function ce(e, a, s, t, n, i, l) {
|
|
|
88
97
|
o.setAttribute("role", "img"),
|
|
89
98
|
o.setAttribute("aria-label", "Modal Image"),
|
|
90
99
|
e.Ie(o),
|
|
91
|
-
|
|
100
|
+
h.appendChild(o);
|
|
92
101
|
} else {
|
|
93
102
|
const o = document.createElement("img");
|
|
94
103
|
if (
|
|
@@ -99,13 +108,21 @@ export default function ce(e, a, s, t, n, i, l) {
|
|
|
99
108
|
f = !0;
|
|
100
109
|
const e = document.querySelectorAll(".ab-iam-root");
|
|
101
110
|
e && e.length > 0 && e[0].classList.add("ab-iam-img-loading"),
|
|
102
|
-
(
|
|
111
|
+
(l = window.setTimeout(() => {
|
|
112
|
+
u(!1);
|
|
113
|
+
}, 6e4)),
|
|
114
|
+
(o.onload = () => {
|
|
115
|
+
u();
|
|
116
|
+
}),
|
|
117
|
+
(o.onerror = () => {
|
|
118
|
+
u(!1);
|
|
119
|
+
});
|
|
103
120
|
}
|
|
104
|
-
|
|
121
|
+
h.appendChild(o);
|
|
105
122
|
}
|
|
106
|
-
|
|
123
|
+
c.appendChild(h), (p.className += " ab-with-image");
|
|
107
124
|
} else if (e.icon) {
|
|
108
|
-
|
|
125
|
+
h.className += " ab-icon-area";
|
|
109
126
|
const o = document.createElement("span");
|
|
110
127
|
(o.className = "ab-icon"),
|
|
111
128
|
e.ye() ||
|
|
@@ -116,11 +133,11 @@ export default function ce(e, a, s, t, n, i, l) {
|
|
|
116
133
|
a.appendChild(document.createTextNode(e.icon)),
|
|
117
134
|
a.setAttribute("aria-hidden", "true"),
|
|
118
135
|
o.appendChild(a),
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
(
|
|
136
|
+
h.appendChild(o),
|
|
137
|
+
c.appendChild(h),
|
|
138
|
+
(p.className += " ab-with-icon");
|
|
122
139
|
}
|
|
123
|
-
if ((oe(
|
|
140
|
+
if ((oe(p, "touchstart"), e.header && e.header.length > 0)) {
|
|
124
141
|
const o = document.createElement("h1");
|
|
125
142
|
(o.className = "ab-message-header"), (e.Te = r.Z.Y()), (o.id = e.Te);
|
|
126
143
|
const a = (
|
|
@@ -129,14 +146,14 @@ export default function ce(e, a, s, t, n, i, l) {
|
|
|
129
146
|
(o.className += " " + a + "-aligned"),
|
|
130
147
|
e.ye() || (o.style.color = me(e.headerTextColor)),
|
|
131
148
|
o.appendChild(document.createTextNode(e.header)),
|
|
132
|
-
|
|
149
|
+
p.appendChild(o);
|
|
133
150
|
}
|
|
134
|
-
return
|
|
135
|
-
})(e, a, s,
|
|
151
|
+
return p.appendChild(e.Be()), c.appendChild(p), f || d(), (e.qe = c), c;
|
|
152
|
+
})(e, a, s, n, t, i);
|
|
136
153
|
if (e instanceof FullScreenMessage || e instanceof ModalMessage) {
|
|
137
154
|
const o = e instanceof FullScreenMessage ? "ab-fullscreen" : "ab-modal";
|
|
138
155
|
(u.className += ` ${o} ab-centered`),
|
|
139
|
-
le.De(e, a, u,
|
|
156
|
+
le.De(e, a, u, t),
|
|
140
157
|
le.Ge(u),
|
|
141
158
|
le.He(e.Te, u);
|
|
142
159
|
} else if (e instanceof SlideUpMessage) {
|
package/src/Push/push-manager.js
CHANGED
|
@@ -62,16 +62,17 @@ export default class na {
|
|
|
62
62
|
})(i);
|
|
63
63
|
let r = null,
|
|
64
64
|
n = null;
|
|
65
|
-
|
|
65
|
+
const o = i;
|
|
66
|
+
if (null != o.getKey)
|
|
66
67
|
try {
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
(r = btoa(String.fromCharCode.apply(null,
|
|
70
|
-
(n = btoa(String.fromCharCode.apply(null,
|
|
68
|
+
const i = Array.from(new Uint8Array(o.getKey("p256dh"))),
|
|
69
|
+
t = Array.from(new Uint8Array(o.getKey("auth")));
|
|
70
|
+
(r = btoa(String.fromCharCode.apply(null, i))),
|
|
71
|
+
(n = btoa(String.fromCharCode.apply(null, t)));
|
|
71
72
|
} catch (i) {
|
|
72
73
|
if ("invalid arguments" !== ei(i)) throw i;
|
|
73
74
|
}
|
|
74
|
-
const
|
|
75
|
+
const u = (i => {
|
|
75
76
|
let t;
|
|
76
77
|
return i.options &&
|
|
77
78
|
(t = i.options.applicationServerKey) &&
|
|
@@ -81,8 +82,8 @@ export default class na {
|
|
|
81
82
|
.replace(/\+/g, "-")
|
|
82
83
|
.replace(/\//g, "_")
|
|
83
84
|
: null;
|
|
84
|
-
})(
|
|
85
|
-
this.Yr && this.Yr.gn(s, t, r, n,
|
|
85
|
+
})(o);
|
|
86
|
+
this.Yr && this.Yr.gn(s, t, r, n, u),
|
|
86
87
|
s && "function" == typeof e && e(s, r, n);
|
|
87
88
|
}
|
|
88
89
|
wn() {
|
|
@@ -168,7 +169,7 @@ export default class na {
|
|
|
168
169
|
}
|
|
169
170
|
Dn() {
|
|
170
171
|
return this.on
|
|
171
|
-
? navigator.serviceWorker.getRegistration()
|
|
172
|
+
? navigator.serviceWorker.getRegistration(this.sn)
|
|
172
173
|
: navigator.serviceWorker.register(this.sn).then(() =>
|
|
173
174
|
navigator.serviceWorker.ready.then(
|
|
174
175
|
i => (
|
package/src/common/base-feed.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { ControlCard } from "../Card/index.js";
|
|
2
2
|
export const FEED_ANIMATION_DURATION = 500;
|
|
3
3
|
export default class x {
|
|
4
|
-
constructor(e,
|
|
5
|
-
(this.cards = e),
|
|
4
|
+
constructor(e, s) {
|
|
5
|
+
(this.cards = e),
|
|
6
|
+
(this.lastUpdated = s),
|
|
7
|
+
(this.cards = e),
|
|
8
|
+
(this.lastUpdated = s);
|
|
6
9
|
}
|
|
7
10
|
getUnreadCardCount() {
|
|
8
11
|
let e = 0;
|
|
9
|
-
for (const
|
|
12
|
+
for (const s of this.cards) s.viewed || s instanceof ControlCard || e++;
|
|
10
13
|
return e;
|
|
11
14
|
}
|
|
12
15
|
ur() {
|
|
@@ -4,21 +4,28 @@ import ue from "../models/braze-event.js";
|
|
|
4
4
|
import t from "../models/request-result.js";
|
|
5
5
|
const s = {
|
|
6
6
|
N: (o, n, s) => {
|
|
7
|
+
var i;
|
|
7
8
|
const a = new t(),
|
|
8
|
-
|
|
9
|
-
if (!
|
|
9
|
+
l = e.aa();
|
|
10
|
+
if (!l)
|
|
10
11
|
return (
|
|
11
12
|
r.j.info(
|
|
12
13
|
`Not logging event with type "${o}" because the current session ID could not be found.`
|
|
13
14
|
),
|
|
14
15
|
a
|
|
15
16
|
);
|
|
16
|
-
const m =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
const m = l.co();
|
|
18
|
+
a.ve.push(
|
|
19
|
+
new ue(
|
|
20
|
+
s || (null === (i = e.ir()) || void 0 === i ? void 0 : i.getUserId()),
|
|
21
|
+
o,
|
|
22
|
+
new Date().valueOf(),
|
|
23
|
+
m,
|
|
24
|
+
n
|
|
25
|
+
)
|
|
21
26
|
);
|
|
27
|
+
const u = e.l();
|
|
28
|
+
return u && (a.O = u.bo(a.ve)), a;
|
|
22
29
|
}
|
|
23
30
|
};
|
|
24
31
|
export default s;
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
impressOnBottom as be,
|
|
6
6
|
impressOnTop as ye,
|
|
7
7
|
markCardAsRead as Fe,
|
|
8
|
-
topHadImpression as
|
|
8
|
+
topHadImpression as Te
|
|
9
9
|
} from "../Card/display/card-display.js";
|
|
10
|
-
import { bottomIsInView as
|
|
10
|
+
import { bottomIsInView as xe, topIsInView as Ee } from "../util/dom-utils.js";
|
|
11
11
|
import { Card, ControlCard } from "../Card/index.js";
|
|
12
|
-
import { cardToHtml as
|
|
12
|
+
import { cardToHtml as he } from "../Card/display/card-display.js";
|
|
13
13
|
import { isArray as p } from "../util/code-utils.js";
|
|
14
14
|
import { KeyCodes as lt } from "../util/key-codes.js";
|
|
15
|
-
import
|
|
15
|
+
import Se from "../l10n/l10n-manager-factory.js";
|
|
16
16
|
import { removeSubscription } from "../Core/remove-subscription.js";
|
|
17
17
|
import r from "../../shared-lib/braze-shared-lib.js";
|
|
18
18
|
import { BRAZE_ACTION_URI_REGEX as X } from "../util/validation-utils.js";
|
|
@@ -24,8 +24,8 @@ import {
|
|
|
24
24
|
} from "../util/braze-actions.js";
|
|
25
25
|
export const LAST_REQUESTED_REFRESH_DATA_ATTRIBUTE =
|
|
26
26
|
"data-last-requested-refresh";
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
27
|
+
export const SUBSCRIPTION_ID_DATA_ATTRIBUTE = "data-update-subscription-id";
|
|
28
|
+
export const SCROLL_LISTENER_ID = "data-listener-id";
|
|
29
29
|
export const scrollListeners = {};
|
|
30
30
|
export function destroyFeedHtml(e) {
|
|
31
31
|
e &&
|
|
@@ -40,7 +40,7 @@ export function destroyFeedHtml(e) {
|
|
|
40
40
|
(window.removeEventListener("scroll", scrollListeners[o]),
|
|
41
41
|
delete scrollListeners[o]);
|
|
42
42
|
}
|
|
43
|
-
export function
|
|
43
|
+
export function generateFeedBody(e, t) {
|
|
44
44
|
const o = document.createElement("div");
|
|
45
45
|
if (
|
|
46
46
|
((o.className = "ab-feed-body"),
|
|
@@ -56,13 +56,11 @@ export function _generateFeedBody(e, t) {
|
|
|
56
56
|
o.appendChild(e);
|
|
57
57
|
} else {
|
|
58
58
|
let s = !1;
|
|
59
|
-
const logCardClick = t =>
|
|
60
|
-
e.logCardClick(t);
|
|
61
|
-
};
|
|
59
|
+
const logCardClick = t => e.logCardClick(t);
|
|
62
60
|
for (const n of e.cards) {
|
|
63
61
|
const i = n instanceof ControlCard;
|
|
64
62
|
!i || e.ur()
|
|
65
|
-
? (o.appendChild(
|
|
63
|
+
? (o.appendChild(he(n, logCardClick, t)), (s = s || !i))
|
|
66
64
|
: r.j.error(
|
|
67
65
|
"Received a control card for a legacy news feed. Control cards are only supported with content cards."
|
|
68
66
|
);
|
|
@@ -70,7 +68,7 @@ export function _generateFeedBody(e, t) {
|
|
|
70
68
|
if (!s) {
|
|
71
69
|
const e = document.createElement("div");
|
|
72
70
|
(e.className = "ab-no-cards-message"),
|
|
73
|
-
(e.innerHTML =
|
|
71
|
+
(e.innerHTML = Se.m().get("NO_CARDS_MESSAGE")),
|
|
74
72
|
e.setAttribute("role", "article"),
|
|
75
73
|
o.appendChild(e);
|
|
76
74
|
}
|
|
@@ -78,30 +76,30 @@ export function _generateFeedBody(e, t) {
|
|
|
78
76
|
return o;
|
|
79
77
|
}
|
|
80
78
|
export function detectFeedImpressions(e, t) {
|
|
81
|
-
if (null != t) {
|
|
79
|
+
if (null != e && null != t) {
|
|
82
80
|
const o = [],
|
|
83
81
|
s = t.querySelectorAll(".ab-card");
|
|
84
82
|
e.fo || (e.fo = {});
|
|
85
83
|
for (let t = 0; t < s.length; t++) {
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
i =
|
|
89
|
-
if (e.fo[
|
|
90
|
-
|
|
84
|
+
const n = fe(s[t]),
|
|
85
|
+
r = Ee(s[t]),
|
|
86
|
+
i = xe(s[t]);
|
|
87
|
+
if (e.fo[n]) {
|
|
88
|
+
r || i || Fe(s[t]);
|
|
91
89
|
continue;
|
|
92
90
|
}
|
|
93
|
-
let a =
|
|
91
|
+
let a = Te(s[t]),
|
|
94
92
|
d = de(s[t]);
|
|
95
93
|
const l = a,
|
|
96
94
|
c = d;
|
|
97
95
|
if (
|
|
98
|
-
(!a &&
|
|
96
|
+
(!a && r && ((a = !0), ye(s[t])),
|
|
99
97
|
!d && i && ((d = !0), be(s[t])),
|
|
100
98
|
a && d)
|
|
101
99
|
) {
|
|
102
100
|
if (l && c) continue;
|
|
103
101
|
for (const t of e.cards)
|
|
104
|
-
if (t.id ===
|
|
102
|
+
if (t.id === n) {
|
|
105
103
|
(e.fo[t.id] = !0), o.push(t);
|
|
106
104
|
break;
|
|
107
105
|
}
|
|
@@ -111,6 +109,7 @@ export function detectFeedImpressions(e, t) {
|
|
|
111
109
|
}
|
|
112
110
|
}
|
|
113
111
|
export function refreshFeed(e, t) {
|
|
112
|
+
if (null == e || null == t) return;
|
|
114
113
|
t.setAttribute("aria-busy", "true");
|
|
115
114
|
const o = t.querySelectorAll(".ab-refresh-button")[0];
|
|
116
115
|
null != o && (o.className += " fa-spin");
|
|
@@ -124,9 +123,9 @@ export function refreshFeed(e, t) {
|
|
|
124
123
|
const o = t.querySelectorAll(".ab-initial-spinner")[0];
|
|
125
124
|
if (null != o) {
|
|
126
125
|
const e = document.createElement("span");
|
|
127
|
-
(e.innerHTML =
|
|
128
|
-
o.parentNode
|
|
129
|
-
|
|
126
|
+
(e.innerHTML = Se.m().get("FEED_TIMEOUT_MESSAGE")),
|
|
127
|
+
null != o.parentNode &&
|
|
128
|
+
(o.parentNode.appendChild(e), o.parentNode.removeChild(o));
|
|
130
129
|
}
|
|
131
130
|
"true" === t.getAttribute("aria-busy") &&
|
|
132
131
|
t.setAttribute("aria-busy", "false");
|
|
@@ -158,7 +157,7 @@ export function feedToHtml(e, t, o) {
|
|
|
158
157
|
(i.onclick = a);
|
|
159
158
|
const d = document.createElement("i");
|
|
160
159
|
(d.className = "fa fa-refresh ab-refresh-button"),
|
|
161
|
-
null == e.lastUpdated && (d.className += " fa-spin"),
|
|
160
|
+
e && null == e.lastUpdated && (d.className += " fa-spin"),
|
|
162
161
|
d.setAttribute("aria-label", "Refresh Feed"),
|
|
163
162
|
d.setAttribute("tabindex", "0"),
|
|
164
163
|
d.setAttribute("role", "button");
|
|
@@ -171,7 +170,7 @@ export function feedToHtml(e, t, o) {
|
|
|
171
170
|
(d.onclick = l),
|
|
172
171
|
n.appendChild(d),
|
|
173
172
|
n.appendChild(i),
|
|
174
|
-
s.appendChild(
|
|
173
|
+
s.appendChild(generateFeedBody(e, t));
|
|
175
174
|
const c = () => detectFeedImpressions(e, s);
|
|
176
175
|
if ((s.addEventListener("scroll", c), !o)) {
|
|
177
176
|
window.addEventListener("scroll", c);
|
|
@@ -186,7 +185,7 @@ export function updateFeedCards(e, t, o, s, n) {
|
|
|
186
185
|
for (const e of t)
|
|
187
186
|
if (e instanceof Card) {
|
|
188
187
|
if (e.url && X.test(e.url)) {
|
|
189
|
-
|
|
188
|
+
const t = Q(e.url);
|
|
190
189
|
if (ft(t)) {
|
|
191
190
|
r.j.error(dt(vt.Ki, "Content Card"));
|
|
192
191
|
continue;
|
|
@@ -200,11 +199,12 @@ export function updateFeedCards(e, t, o, s, n) {
|
|
|
200
199
|
else {
|
|
201
200
|
const t = s.querySelectorAll(".ab-feed-body")[0];
|
|
202
201
|
if (null != t) {
|
|
203
|
-
const o =
|
|
204
|
-
t.parentNode.replaceChild(o, t),
|
|
202
|
+
const o = generateFeedBody(e, n);
|
|
203
|
+
t.parentNode && t.parentNode.replaceChild(o, t),
|
|
204
|
+
detectFeedImpressions(e, o.parentNode);
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
export function registerFeedSubscriptionId(e, t) {
|
|
209
|
-
t.setAttribute("data-update-subscription-id", e);
|
|
209
|
+
e && t.setAttribute("data-update-subscription-id", e);
|
|
210
210
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import e, { OPTIONS as L } from "../managers/braze-instance.js";
|
|
2
2
|
import V from "../util/browser-detector.js";
|
|
3
3
|
import nr from "./l10n-manager.js";
|
|
4
|
-
const
|
|
4
|
+
const Se = {
|
|
5
5
|
t: !1,
|
|
6
6
|
i: null,
|
|
7
7
|
m: () => {
|
|
8
|
-
if ((
|
|
8
|
+
if ((Se.o(), !Se.i)) {
|
|
9
9
|
let r = V.language,
|
|
10
10
|
t = !1;
|
|
11
|
-
e.nn(L.Mn) && ((r = e.nn(L.Mn)), (t = !0)), (
|
|
11
|
+
e.nn(L.Mn) && ((r = e.nn(L.Mn)), (t = !0)), (Se.i = new nr(r, t));
|
|
12
12
|
}
|
|
13
|
-
return
|
|
13
|
+
return Se.i;
|
|
14
14
|
},
|
|
15
15
|
o: () => {
|
|
16
|
-
|
|
16
|
+
Se.t || (e.g(Se), (Se.t = !0));
|
|
17
17
|
},
|
|
18
18
|
destroy: () => {
|
|
19
|
-
(
|
|
19
|
+
(Se.i = null), (Se.t = !1);
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
export default
|
|
22
|
+
export default Se;
|
|
@@ -72,7 +72,7 @@ class Wt {
|
|
|
72
72
|
(this.Vo = []),
|
|
73
73
|
(this.Go = []),
|
|
74
74
|
(this.Se = []),
|
|
75
|
-
(this.Ro = "4.8.
|
|
75
|
+
(this.Ro = "4.8.3");
|
|
76
76
|
}
|
|
77
77
|
Ko(t) {
|
|
78
78
|
this.Wo.lt(t);
|
|
@@ -214,7 +214,7 @@ class Wt {
|
|
|
214
214
|
this.wt.bi() &&
|
|
215
215
|
import("../FeatureFlags/refresh-feature-flags.js").then(t => {
|
|
216
216
|
if (!this.Uo) return;
|
|
217
|
-
(0, t.default)(
|
|
217
|
+
(0, t.default)(void 0, void 0, !0);
|
|
218
218
|
});
|
|
219
219
|
}),
|
|
220
220
|
this.Wo.Et(this.options),
|
|
@@ -75,7 +75,7 @@ export default class O {
|
|
|
75
75
|
ql(t) {
|
|
76
76
|
this.La.remove(t);
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
bo(t) {
|
|
79
79
|
let e;
|
|
80
80
|
if (null == t || 0 === t.length) return !1;
|
|
81
81
|
e = p(t) ? t : [t];
|
|
@@ -85,7 +85,7 @@ export default class O {
|
|
|
85
85
|
return this.Fa.store(STORAGE_KEYS.k.Ia, s);
|
|
86
86
|
}
|
|
87
87
|
Hl(t) {
|
|
88
|
-
return null != t && this.
|
|
88
|
+
return null != t && this.bo([t]);
|
|
89
89
|
}
|
|
90
90
|
Ja() {
|
|
91
91
|
let t = this.Fa.wr(STORAGE_KEYS.k.Ia);
|
|
@@ -28,7 +28,7 @@ export default class Kt {
|
|
|
28
28
|
}
|
|
29
29
|
ss() {
|
|
30
30
|
return {
|
|
31
|
-
s: "4.8.
|
|
31
|
+
s: "4.8.3",
|
|
32
32
|
l: this.ol,
|
|
33
33
|
e: this.cl,
|
|
34
34
|
a: this.gl,
|
|
@@ -42,7 +42,7 @@ export default class Kt {
|
|
|
42
42
|
static zn(t) {
|
|
43
43
|
let i = t.l;
|
|
44
44
|
return (
|
|
45
|
-
"4.8.
|
|
45
|
+
"4.8.3" !== t.s && (i = 0), new Kt(i, t.e, t.a, t.p, t.m, t.v, t.c, t.f)
|
|
46
46
|
);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -144,7 +144,7 @@ export default class Rt {
|
|
|
144
144
|
return this.Jh.lt(t);
|
|
145
145
|
}
|
|
146
146
|
openSession() {
|
|
147
|
-
const t = this.Bl.pa() !== this.Bl.
|
|
147
|
+
const t = this.Bl.pa() !== this.Bl.co();
|
|
148
148
|
t && (this.yh.Pa(i.eu.Xo), this.yh.Pa(i.eu.su)),
|
|
149
149
|
this.Gh(null, !1, null, null, null),
|
|
150
150
|
this.Hn(),
|
|
@@ -197,7 +197,7 @@ export default class Rt {
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
requestImmediateDataFlush(t) {
|
|
200
|
-
this.Hh(), this.Bl.
|
|
200
|
+
this.Hh(), this.Bl.co();
|
|
201
201
|
this.Gh(
|
|
202
202
|
null,
|
|
203
203
|
null,
|
|
@@ -213,10 +213,10 @@ export default class Rt {
|
|
|
213
213
|
);
|
|
214
214
|
}
|
|
215
215
|
requestFeedRefresh() {
|
|
216
|
-
this.Bl.
|
|
216
|
+
this.Bl.co(), this.Gh(!0);
|
|
217
217
|
}
|
|
218
218
|
$r(t, s) {
|
|
219
|
-
this.Bl.
|
|
219
|
+
this.Bl.co(),
|
|
220
220
|
r.j.info("Requesting explicit trigger refresh."),
|
|
221
221
|
this.Gh(null, !0, null, t, s);
|
|
222
222
|
}
|
|
@@ -254,7 +254,7 @@ export default class Rt {
|
|
|
254
254
|
);
|
|
255
255
|
}
|
|
256
256
|
vr(t, s) {
|
|
257
|
-
const i = this.Bl.
|
|
257
|
+
const i = this.Bl.co();
|
|
258
258
|
return new ue(this.Xl.getUserId(), r.q.du, t, i, { cid: s });
|
|
259
259
|
}
|
|
260
260
|
Hn() {
|
package/src/ui/js/attach-css.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e, { OPTIONS as L } from "../../managers/braze-instance.js";
|
|
2
2
|
export function attachCSS(n, t, o) {
|
|
3
3
|
const c = n || document.querySelector("head"),
|
|
4
|
-
s = `ab-${t}-css-definitions-${"4.8.
|
|
4
|
+
s = `ab-${t}-css-definitions-${"4.8.3".replace(/\./g, "-")}`,
|
|
5
5
|
a = c.ownerDocument || document;
|
|
6
6
|
if (null == a.getElementById(s)) {
|
|
7
7
|
const n = a.createElement("style");
|
package/src/ui/js/feed-css.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { attachCSS as
|
|
2
|
-
import { loadFontAwesome as
|
|
1
|
+
import { attachCSS as Ce } from "./attach-css.js";
|
|
2
|
+
import { loadFontAwesome as Ie } from "./load-font-awesome.js";
|
|
3
3
|
export function attachFeedCSS(t) {
|
|
4
|
-
|
|
4
|
+
Ce(
|
|
5
5
|
t,
|
|
6
6
|
"feed",
|
|
7
7
|
"body>.ab-feed{position:fixed;top:0;right:0;bottom:0;width:421px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}body>.ab-feed .ab-feed-body{position:absolute;top:0;left:0;right:0;border:none;border-left:1px solid #d0d0d0;padding-top:70px;min-height:100%}body>.ab-feed .ab-initial-spinner{float:none}body>.ab-feed .ab-no-cards-message{position:absolute;width:100%;margin-left:-20px;top:40%}.ab-feed{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);-moz-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);box-shadow:0 1px 7px 1px rgba(66,82,113,.15);width:402px;background-color:#eee;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:13px;line-height:130%;letter-spacing:normal;overflow-y:auto;overflow-x:visible;z-index:9011;-webkit-overflow-scrolling:touch}.ab-feed :focus,.ab-feed:focus{outline:0}.ab-feed .ab-feed-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #d0d0d0;border-top:none;padding:20px 20px 0 20px}.ab-feed.ab-effect-slide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px);-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-feed.ab-effect-slide.ab-show{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-feed.ab-effect-slide.ab-hide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card{position:relative;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:100%;border:1px solid #d0d0d0;margin-bottom:20px;overflow:hidden;background-color:#fff;-webkit-transition:height .4s ease-in-out,margin .4s ease-in-out;-moz-transition:height .4s ease-in-out,margin .4s ease-in-out;-o-transition:height .4s ease-in-out,margin .4s ease-in-out;transition:height .4s ease-in-out,margin .4s ease-in-out}.ab-feed .ab-card .ab-pinned-indicator{position:absolute;right:0;top:0;margin-right:-1px;width:0;height:0;border-style:solid;border-width:0 24px 24px 0;border-color:transparent #1676d0 transparent transparent}.ab-feed .ab-card .ab-pinned-indicator .fa-star{position:absolute;right:-21px;top:2px;font-size:9px;color:#fff}.ab-feed .ab-card.ab-effect-card.ab-hide{-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-left{-webkit-transform:translateX(-450px);-moz-transform:translateX(-450px);-ms-transform:translateX(-450px);transform:translateX(-450px)}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-right{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card.ab-effect-card.ab-hide:not(.ab-swiped-left):not(.ab-swiped-right){opacity:0}.ab-feed .ab-card .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;right:0;top:0;z-index:9021;opacity:0;-webkit-transition:.5s;-moz-transition:.5s;-o-transition:.5s;transition:.5s}.ab-feed .ab-card .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-feed .ab-card .ab-close-button svg.ab-chevron{display:none}.ab-feed .ab-card .ab-close-button:active{background-color:transparent}.ab-feed .ab-card .ab-close-button:focus{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover svg{fill-opacity:.8}.ab-feed .ab-card .ab-close-button:hover{opacity:1}.ab-feed .ab-card .ab-close-button:focus{opacity:1}.ab-feed .ab-card a{float:none;color:inherit;text-decoration:none}.ab-feed .ab-card a:hover{text-decoration:underline}.ab-feed .ab-card .ab-image-area{float:none;display:inline-block;vertical-align:top;line-height:0;overflow:hidden;width:100%;-webkit-box-sizing:initial;-moz-box-sizing:initial;box-sizing:initial}.ab-feed .ab-card .ab-image-area img{float:none;height:auto;width:100%}.ab-feed .ab-card.ab-banner .ab-card-body{display:none}.ab-feed .ab-card .ab-card-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:inline-block;width:100%;position:relative}.ab-feed .ab-card .ab-unread-indicator{position:absolute;bottom:0;margin-right:-1px;width:100%;height:5px;background-color:#1676d0}.ab-feed .ab-card .ab-unread-indicator.read{background-color:transparent}.ab-feed .ab-card .ab-title{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;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:18px;line-height:130%;padding:20px 25px 0 25px}.ab-feed .ab-card .ab-description{float:none;color:#545454;padding:15px 25px 20px 25px;word-wrap:break-word;white-space:pre-wrap}.ab-feed .ab-card .ab-description.ab-no-title{padding-top:20px}.ab-feed .ab-card .ab-url-area{float:none;color:#1676d0;margin-top:12px;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif}.ab-feed .ab-card.ab-classic-card .ab-card-body{min-height:40px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.ab-feed .ab-card.ab-classic-card.with-image .ab-card-body{min-height:100px;padding-left:72px}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area{width:60px;height:60px;padding:20px 0 25px 25px;position:absolute}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area img{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;max-width:100%;max-height:100%;width:auto;height:auto}.ab-feed .ab-card.ab-classic-card.with-image .ab-title{background-color:transparent;font-size:16px}.ab-feed .ab-card.ab-classic-card.with-image .ab-description{padding-top:10px}.ab-feed .ab-card.ab-control-card{height:0;width:0;margin:0;border:0}.ab-feed .ab-feed-buttons-wrapper{float:none;position:relative;background-color:#282828;height:50px;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);z-index:1}.ab-feed .ab-feed-buttons-wrapper .ab-close-button,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{float:none;cursor:pointer;color:#fff;font-size:18px;padding:16px;-webkit-transition:.2s;-moz-transition:.2s;-o-transition:.2s;transition:.2s}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{font-size:22px}.ab-feed .ab-feed-buttons-wrapper .ab-close-button{float:right}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover{padding-top:12px;padding-right:14px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{padding-left:17px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{padding-top:13px;padding-left:14px}.ab-feed .ab-no-cards-message{text-align:center;margin-bottom:20px}@media (max-width:600px){body>.ab-feed{width:100%}}"
|
|
8
8
|
);
|
|
9
9
|
}
|
|
10
10
|
export function setupFeedUI() {
|
|
11
|
-
attachFeedCSS(),
|
|
11
|
+
attachFeedCSS(), Ie();
|
|
12
12
|
}
|
package/src/ui/js/iam-css.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { attachCSS as
|
|
2
|
-
import { loadFontAwesome as
|
|
1
|
+
import { attachCSS as Ce } from "./attach-css.js";
|
|
2
|
+
import { loadFontAwesome as Ie } from "./load-font-awesome.js";
|
|
3
3
|
export function attachInAppMessageCSS(t) {
|
|
4
|
-
|
|
4
|
+
Ce(
|
|
5
5
|
t,
|
|
6
6
|
"iam",
|
|
7
7
|
".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}.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;right:0;top:0;z-index:9021}.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 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;right:0;top:0;z-index:9021}.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)}}"
|
|
8
8
|
);
|
|
9
9
|
}
|
|
10
10
|
export function setupInAppMessageUI() {
|
|
11
|
-
attachInAppMessageCSS(),
|
|
11
|
+
attachInAppMessageCSS(), Ie();
|
|
12
12
|
}
|