@mparticle/web-braze-kit 3.0.4 → 4.0.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/CHANGELOG.md +58 -0
- package/README.md +45 -26
- package/dist/BrazeKit.common.js +513 -359
- package/package.json +5 -5
package/dist/BrazeKit.common.js
CHANGED
|
@@ -1,294 +1,451 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
function getAugmentedNamespace(n) {
|
|
4
|
+
var f = n.default;
|
|
5
|
+
if (typeof f == "function") {
|
|
6
|
+
var a = function () {
|
|
7
|
+
return f.apply(this, arguments);
|
|
8
|
+
};
|
|
9
|
+
a.prototype = f.prototype;
|
|
10
|
+
} else a = {};
|
|
11
|
+
Object.defineProperty(a, '__esModule', {value: true});
|
|
12
|
+
Object.keys(n).forEach(function (k) {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
14
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () {
|
|
17
|
+
return n[k];
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
return a;
|
|
7
22
|
}
|
|
8
23
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
b
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
fa.Object.defineProperties(Lc.prototype,{Bd:{configurable:!0,enumerable:!0,get:function(){return tc}}});J.FullScreenMessage=Lc;var qd=new function(){this.$e=".ab-pause-scrolling,body.ab-pause-scrolling,html.ab-pause-scrolling{overflow:hidden;touch-action:none}.ab-centering-div,.ab-iam-root.v3{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:1050;-webkit-tap-highlight-color:transparent}.ab-centering-div:focus,.ab-iam-root.v3:focus{outline:0}.ab-centering-div.ab-effect-fullscreen,.ab-centering-div.ab-effect-html,.ab-centering-div.ab-effect-modal,.ab-iam-root.v3.ab-effect-fullscreen,.ab-iam-root.v3.ab-effect-html,.ab-iam-root.v3.ab-effect-modal{opacity:0}.ab-centering-div.ab-effect-fullscreen.ab-show,.ab-centering-div.ab-effect-html.ab-show,.ab-centering-div.ab-effect-modal.ab-show,.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-centering-div.ab-effect-fullscreen.ab-show.ab-animate-in,.ab-centering-div.ab-effect-html.ab-show.ab-animate-in,.ab-centering-div.ab-effect-modal.ab-show.ab-animate-in,.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-centering-div.ab-effect-fullscreen.ab-hide,.ab-centering-div.ab-effect-html.ab-hide,.ab-centering-div.ab-effect-modal.ab-hide,.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-centering-div.ab-effect-fullscreen.ab-hide.ab-animate-out,.ab-centering-div.ab-effect-html.ab-hide.ab-animate-out,.ab-centering-div.ab-effect-modal.ab-hide.ab-animate-out,.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-centering-div.ab-effect-slide .ab-in-app-message,.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-centering-div.ab-effect-slide.ab-show .ab-in-app-message,.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-centering-div.ab-effect-slide.ab-show.ab-animate-in .ab-in-app-message,.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-centering-div.ab-effect-slide.ab-hide .ab-in-app-message,.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-centering-div.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-left,.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-centering-div.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-up,.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-centering-div.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-down,.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-centering-div.ab-effect-slide.ab-hide.ab-animate-out .ab-in-app-message,.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-centering-div .ab-ios-scroll-wrapper,.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-centering-div .ab-in-app-message,.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:1050;max-width:100%;overflow:hidden;display:inline-block;pointer-events:all;color:#333}.ab-centering-div .ab-in-app-message.ab-no-shadow,.ab-iam-root.v3 .ab-in-app-message.ab-no-shadow{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ab-centering-div .ab-in-app-message :focus,.ab-centering-div .ab-in-app-message:focus,.ab-iam-root.v3 .ab-in-app-message :focus,.ab-iam-root.v3 .ab-in-app-message:focus{outline:0}.ab-centering-div .ab-in-app-message.ab-clickable,.ab-iam-root.v3 .ab-in-app-message.ab-clickable{cursor:pointer}.ab-centering-div .ab-in-app-message.ab-background,.ab-iam-root.v3 .ab-in-app-message.ab-background{background-color:#fff}.ab-centering-div .ab-in-app-message .ab-close-button,.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:1060}.ab-centering-div .ab-in-app-message .ab-close-button svg,.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}.ab-centering-div .ab-in-app-message .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg.ab-chevron{display:none}.ab-centering-div .ab-in-app-message .ab-close-button:active,.ab-iam-root.v3 .ab-in-app-message .ab-close-button:active{background-color:transparent}.ab-centering-div .ab-in-app-message .ab-close-button:focus,.ab-iam-root.v3 .ab-in-app-message .ab-close-button:focus{background-color:transparent}.ab-centering-div .ab-in-app-message .ab-close-button:hover,.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover{background-color:transparent}.ab-centering-div .ab-in-app-message .ab-close-button:hover svg,.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover svg{fill-opacity:.8}.ab-centering-div .ab-in-app-message .ab-message-text,.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-centering-div .ab-in-app-message .ab-message-text.start-aligned,.ab-iam-root.v3 .ab-in-app-message .ab-message-text.start-aligned{text-align:left;text-align:start}.ab-centering-div .ab-in-app-message .ab-message-text.end-aligned,.ab-iam-root.v3 .ab-in-app-message .ab-message-text.end-aligned{text-align:right;text-align:end}.ab-centering-div .ab-in-app-message .ab-message-text.center-aligned,.ab-iam-root.v3 .ab-in-app-message .ab-message-text.center-aligned{text-align:center}.ab-centering-div .ab-in-app-message .ab-message-text::-webkit-scrollbar,.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar{-webkit-appearance:none;width:14px}.ab-centering-div .ab-in-app-message .ab-message-text::-webkit-scrollbar-thumb,.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-centering-div .ab-in-app-message .ab-message-text::-webkit-scrollbar-button,.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-button{width:0;height:0;display:none}.ab-centering-div .ab-in-app-message .ab-message-text::-webkit-scrollbar-corner,.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-corner{background-color:transparent}.ab-centering-div .ab-in-app-message .ab-message-header,.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-centering-div .ab-in-app-message .ab-message-header.start-aligned,.ab-iam-root.v3 .ab-in-app-message .ab-message-header.start-aligned{text-align:left;text-align:start}.ab-centering-div .ab-in-app-message .ab-message-header.end-aligned,.ab-iam-root.v3 .ab-in-app-message .ab-message-header.end-aligned{text-align:right;text-align:end}.ab-centering-div .ab-in-app-message .ab-message-header.center-aligned,.ab-iam-root.v3 .ab-in-app-message .ab-message-header.center-aligned{text-align:center}.ab-centering-div .ab-in-app-message.ab-fullscreen,.ab-centering-div .ab-in-app-message.ab-modal,.ab-centering-div .ab-in-app-message.ab-slideup,.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-centering-div .ab-in-app-message.ab-slideup,.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-centering-div .ab-in-app-message.ab-slideup.simulate-phone,.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-centering-div .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button{display:none}.ab-centering-div .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button svg:not(.ab-chevron),.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button svg:not(.ab-chevron){display:none}.ab-centering-div .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button,.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-centering-div .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-centering-div .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-message-text{border-right-width:40px}.ab-centering-div .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text{max-width:100%;border-right-width:10px}.ab-centering-div .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text span,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text span{max-height:66px}.ab-centering-div .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-icon,.ab-centering-div .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-image,.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-centering-div .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area{width:50px;height:50px}.ab-centering-div .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area img,.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-centering-div .ab-in-app-message.ab-slideup.ab-clickable:active .ab-message-text,.ab-centering-div .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-message-text,.ab-centering-div .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-message-text,.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-centering-div .ab-in-app-message.ab-slideup.ab-clickable:active .ab-close-button svg.ab-chevron,.ab-centering-div .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-close-button svg.ab-chevron,.ab-centering-div .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-close-button svg.ab-chevron,.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-centering-div .ab-in-app-message.ab-slideup .ab-message-text,.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-centering-div .ab-in-app-message.ab-slideup .ab-message-text span,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{display:block;max-height:150px;overflow:auto}.ab-centering-div .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-centering-div .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image,.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-centering-div .ab-in-app-message.ab-slideup .ab-close-button,.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:1060}.ab-centering-div .ab-in-app-message.ab-slideup .ab-close-button svg,.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}.ab-centering-div .ab-in-app-message.ab-slideup .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg.ab-chevron{display:none}.ab-centering-div .ab-in-app-message.ab-slideup .ab-close-button:active,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:active{background-color:transparent}.ab-centering-div .ab-in-app-message.ab-slideup .ab-close-button:focus,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:focus{background-color:transparent}.ab-centering-div .ab-in-app-message.ab-slideup .ab-close-button:hover,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover{background-color:transparent}.ab-centering-div .ab-in-app-message.ab-slideup .ab-close-button:hover svg,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover svg{fill-opacity:.8}.ab-centering-div .ab-in-app-message.ab-slideup .ab-image-area,.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-centering-div .ab-in-app-message.ab-slideup .ab-image-area.ab-icon-area,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area.ab-icon-area{width:auto}.ab-centering-div .ab-in-app-message.ab-slideup .ab-image-area img,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{float:none;width:100%}.ab-centering-div .ab-in-app-message.ab-fullscreen,.ab-centering-div .ab-in-app-message.ab-modal,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal{font-size:14px}.ab-centering-div .ab-in-app-message.ab-fullscreen .ab-image-area,.ab-centering-div .ab-in-app-message.ab-modal .ab-image-area,.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-centering-div .ab-in-app-message.ab-fullscreen .ab-image-area .ab-center-cropped-img,.ab-centering-div .ab-in-app-message.ab-modal .ab-image-area .ab-center-cropped-img,.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-centering-div .ab-in-app-message.ab-fullscreen .ab-icon,.ab-centering-div .ab-in-app-message.ab-modal .ab-icon,.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-centering-div .ab-in-app-message.ab-fullscreen.graphic,.ab-centering-div .ab-in-app-message.ab-modal.graphic,.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-centering-div .ab-in-app-message.ab-fullscreen.graphic .ab-message-text,.ab-centering-div .ab-in-app-message.ab-modal.graphic .ab-message-text,.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-centering-div .ab-in-app-message.ab-fullscreen.graphic .ab-message-buttons,.ab-centering-div .ab-in-app-message.ab-modal.graphic .ab-message-buttons,.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-centering-div .ab-in-app-message.ab-fullscreen.graphic .ab-image-area,.ab-centering-div .ab-in-app-message.ab-modal.graphic .ab-image-area,.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-centering-div .ab-in-app-message.ab-fullscreen.graphic .ab-image-area img,.ab-centering-div .ab-in-app-message.ab-modal.graphic .ab-image-area img,.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-centering-div .ab-in-app-message.ab-modal,.ab-iam-root.v3 .ab-in-app-message.ab-modal{padding-top:20px;width:450px;max-width:450px;max-height:720px}.ab-centering-div .ab-in-app-message.ab-modal.simulate-phone,.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone{max-width:91%;max-width:calc(100% - 30px)}.ab-centering-div .ab-in-app-message.ab-modal.simulate-phone.graphic .ab-image-area img,.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-centering-div .ab-in-app-message.ab-modal .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text{max-height:660px}.ab-centering-div .ab-in-app-message.ab-modal .ab-message-text.ab-with-image,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-image{max-height:524.82758621px}.ab-centering-div .ab-in-app-message.ab-modal .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-icon{max-height:610px}.ab-centering-div .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons{margin-bottom:93px;max-height:587px}.ab-centering-div .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-image,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-image{max-height:451.82758621px}.ab-centering-div .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-icon{max-height:537px}.ab-centering-div .ab-in-app-message.ab-modal .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{margin-top:-20px;max-height:155.17241379px}.ab-centering-div .ab-in-app-message.ab-modal .ab-image-area img,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area img{max-width:100%;max-height:155.17241379px}.ab-centering-div .ab-in-app-message.ab-modal .ab-image-area.ab-icon-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area.ab-icon-area{height:auto}.ab-centering-div .ab-in-app-message.ab-modal.graphic,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{width:auto;overflow:hidden}.ab-centering-div .ab-in-app-message.ab-modal.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{display:inline}.ab-centering-div .ab-in-app-message.ab-modal.graphic .ab-image-area img,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{max-height:720px;max-width:450px}.ab-centering-div .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen{width:450px;max-height:720px}.ab-centering-div .ab-in-app-message.ab-fullscreen.landscape,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape{width:720px;max-height:450px}.ab-centering-div .ab-in-app-message.ab-fullscreen.landscape .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-image-area{height:225px}.ab-centering-div .ab-in-app-message.ab-fullscreen.landscape.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape.graphic .ab-image-area{height:450px}.ab-centering-div .ab-in-app-message.ab-fullscreen.landscape .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-message-text{max-height:112px}.ab-centering-div .ab-in-app-message.ab-fullscreen .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text{max-height:247px}.ab-centering-div .ab-in-app-message.ab-fullscreen .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text.ab-with-buttons{margin-bottom:93px}.ab-centering-div .ab-in-app-message.ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area{height:360px}.ab-centering-div .ab-in-app-message.ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area{height:720px}.ab-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone,.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-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-close-button,.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-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone .ab-image-area,.ab-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-image-area,.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-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text,.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-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text.ab-with-buttons,.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-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-message-text.ab-with-buttons,.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-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic),.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-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic) .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone.graphic,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic{display:block}.ab-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-image-area{height:100%}.ab-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-message-button,.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-centering-div .ab-in-app-message.ab-html-message,.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-centering-div .ab-in-app-message .ab-message-buttons,.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-centering-div .ab-in-app-message .ab-message-button,.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-centering-div .ab-in-app-message .ab-message-button:first-of-type,.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type{float:left;background-color:#fff;color:#1b78cf}.ab-centering-div .ab-in-app-message .ab-message-button:last-of-type,.ab-iam-root.v3 .ab-in-app-message .ab-message-button:last-of-type{float:right;background-color:#1b78cf;color:#fff}.ab-centering-div .ab-in-app-message .ab-message-button:first-of-type:last-of-type,.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type:last-of-type{float:none;width:auto}.ab-centering-div .ab-in-app-message .ab-message-button:after,.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-centering-div .ab-in-app-message .ab-message-button:after,.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-centering-div .ab-in-app-message .ab-message-button:hover,.ab-iam-root.v3 .ab-in-app-message .ab-message-button:hover{opacity:.8}.ab-centering-div .ab-in-app-message .ab-message-button:active:after,.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-centering-div .ab-in-app-message .ab-message-button:focus:after,.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-centering-div .ab-in-app-message .ab-message-button a,.ab-iam-root.v3 .ab-in-app-message .ab-message-button a{color:inherit;text-decoration:inherit}.ab-centering-div .ab-in-app-message img,.ab-iam-root.v3 .ab-in-app-message img{float:none;display:inline-block}.ab-centering-div .ab-in-app-message .ab-icon,.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-centering-div .ab-in-app-message .ab-icon .fa,.ab-iam-root.v3 .ab-in-app-message .ab-icon .fa{float:none;font-size:30px;width:30px}.ab-centering-div .ab-start-hidden,.ab-iam-root.v3 .ab-start-hidden{visibility:hidden}.ab-centering-div .ab-centered,.ab-centering-div.ab-centering-div .ab-modal,.ab-iam-root.v3 .ab-centered,.ab-iam-root.v3.ab-centering-div .ab-modal{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-email-capture,.ab-iam-root.v3{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ab-email-capture .ab-page-blocker,.ab-iam-root.v3 .ab-page-blocker{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1040;pointer-events:all;background-color:rgba(51,51,51,.75)}.ab-email-capture .ab-in-app-message.ab-modal .ab-email-capture-input{margin-bottom:30px}.ab-email-capture .ab-in-app-message.ab-modal .ab-message-buttons~.ab-message-text{max-height:541px;margin-bottom:160px}.ab-email-capture .ab-in-app-message.ab-modal .ab-message-buttons~.ab-message-text.with-explanatory-link{max-height:513px;margin-bottom:188px}.ab-email-capture .ab-in-app-message.ab-modal .ab-image-area~.ab-message-text{max-height:385.82758621px}.ab-email-capture .ab-in-app-message.ab-modal .ab-image-area~.ab-message-text.with-explanatory-link{max-height:357.82758621px}.ab-email-capture .ab-in-app-message.ab-modal .ab-email-validation-error{margin-top:62px}.ab-email-capture .ab-in-app-message.ab-modal .ab-explanatory-link{display:block}.ab-email-capture .ab-in-app-message.ab-modal .ab-background,.ab-email-capture .ab-in-app-message.ab-modal .ab-mask{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.ab-email-capture .ab-in-app-message.ab-modal .ab-close-button{line-height:normal}.ab-email-capture .ab-in-app-message.ab-modal .ab-html-close-button{right:3px;top:-1px;font-size:34px;padding-top:0}@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-email-capture .ab-in-app-message.ab-modal:not(.force-desktop),.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-width:91%;max-width:calc(100% - 30px)}.ab-email-capture .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img,.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-email-capture .ab-in-app-message.ab-modal:not(.force-desktop),.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-height:91%;max-height:calc(100% - 30px)}.ab-email-capture .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img,.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-email-capture .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text,.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-email-capture .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-image,.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-email-capture .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-icon,.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-email-capture .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons,.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-email-capture .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-image,.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-email-capture .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-icon,.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)}}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:1050;-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:1060;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}.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%}}";};function rd(a){null==a&&(a="");var b=a.split("?").slice(1).join("?");a={};if(null!=b){b=b.split("&");for(var c=0;c<b.length;c++){var d=b[c].split("=");""!==d[0]&&(a[d[0]]=d[1]);}}return a}function sd(a){return a&&(a=a.toString().toLowerCase(),0===a.lastIndexOf("javascript:",0)||0===a.lastIndexOf("data:",0))?!0:!1}function Qc(a,b,c,d,e,f,g,h,l,k,m,q,v){null!=a&&0<a.length&&0<a.indexOf('"ab-in-app-message ab-html-message ab-email-capture"')&&0<a.indexOf('"ab-in-app-message ab-show ab-modal ab-effect-modal"')&&(l=h=!0);W.call(this,a,null,null,b,c,d,e,null,null,null,f||"SWIPE",g,null,null,null,null,null,null,null,null,h,l,null,null,null,k,void 0,void 0,void 0,m,q);this.messageFields=v;}na(Qc,W);Qc.prototype.xf=function(){return !1};
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
(
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
"
|
|
150
|
-
|
|
151
|
-
function zd(a,b,c){var d=document.createElement("div");d.className="ab-feed-body";d.setAttribute("aria-label","Feed");d.setAttribute("role","feed");if(null==a.lastUpdated){c=document.createElement("div");c.className="ab-no-cards-message";var e=document.createElement("i");e.className="fa fa-spinner fa-spin fa-4x ab-initial-spinner";c.appendChild(e);d.appendChild(c);}else{e=!1;for(var f=function(k){a.La(b,k);},g=function(k){b.Hc(k);},h=0;h<a.cards.length;h++){var l=a.cards[h]instanceof mc;!l||a instanceof
|
|
152
|
-
|
|
153
|
-
function
|
|
154
|
-
|
|
155
|
-
function
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
function
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
function
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
"
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
function
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
function
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
e
|
|
216
|
-
|
|
217
|
-
(
|
|
218
|
-
|
|
219
|
-
g)
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
function
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
function
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
Z.logInAppMessageImpression=X.Qb;Z.logInAppMessageClick=X.Jc;Z.logInAppMessageButtonClick=X.Ic;Z.logInAppMessageHtmlClick=X.Pb;Z.subscribeToNewInAppMessages=X.Ph;Z.subscribeToInAppMessage=X.vf;Z.removeSubscription=X.N;Z.removeAllSubscriptions=X.K;Z.logCustomEvent=X.Jd;Z.logPurchase=X.Kd;Z.isPushSupported=X.qa;Z.isPushBlocked=X.Ka;Z.isPushGranted=X.Id;Z.isPushPermissionGranted=X.Mb;Z.registerAppboyPushMessages=X.ph;Z.unregisterAppboyPushMessages=X.Uh;Z.setSdkAuthenticationSignature=X.Tb;
|
|
273
|
-
Z.subscribeToSdkAuthenticationFailures=X.Xd;Z.trackLocation=X.Sh;Z.addSdkMetadata=X.zd;Z.stopWebTracking=X.Mh;Z.disableSDK=X.bh;Z.resumeWebTracking=X.vh;Z.enableSDK=X.dh;Z.wipeData=X.Xh;Z.isDisabled=X.mh;for(var Of in Z)"object"===typeof appboyInterface?appboyInterface[Of]=Z[Of]:Mf[Of]=Z[Of];var Pf="object"===typeof appboyInterface?appboyInterface:Mf,Qf=new function(a,b){var c=!1,d=!1,e=!1,f=!1,g=null,h=null,l=null,k=null;a.Oh(function(m){function q(t){if(27===t.keyCode&&!e&&0<document.querySelectorAll(".ab-modal-interactions").length){t=document.getElementsByClassName("ab-html-message");for(var w=!1,r=0;r<t.length;r++){var F=t[r].contentWindow.document.getElementsByClassName("ab-programmatic-close-button")[0];null!=F&&(Ub(F),w=!0);}w||(t=document.querySelectorAll(".ab-modal-interactions > .ab-close-button")[0],
|
|
274
|
-
null!=t&&Ub(t));}}c=m[C.pg]||!1;d=m[C.og]||m[C.qg]||!1;e=m[C.tg]||!1;f=m[C.fe]||!1;!0===m[C.Zd]&&(f=!0);g=null;l=m[C.be]||null;k=m[C.bg]||null;m[C.Xf]||null!==document.querySelector('link[rel=stylesheet][href="https://use.fontawesome.com/7f85a56ba4.css"]')||(m=document.createElement("link"),m.setAttribute("rel","stylesheet"),m.setAttribute("href","https://use.fontawesome.com/7f85a56ba4.css"),document.getElementsByTagName("head")[0].appendChild(m));m="ab-css-definitions-"+"3.5.0".replace(/\./g,
|
|
275
|
-
"-");if(null==document.getElementById(m)){var v=document.createElement("style");v.innerHTML=qd.$e;v.id=m;null!=l&&v.setAttribute("nonce",l);document.getElementsByTagName("head")[0].appendChild(v);}e||(document.addEventListener("keydown",q,!1),a.Nh(function(){document.removeEventListener("keydown",q);}));});return {Tg:function(){null==g&&(g=a.vf(function(m){a.display.sf(m);}));return g},sf:function(m,q,v){if(null==m)return !1;if(m instanceof Fc)return x.info("User received control for a multivariate test, logging to Braze servers."),
|
|
276
|
-
a.Qb(m),!0;if(!(m instanceof W))return !1;var t=m instanceof Qc;if(t&&!m.Th&&!f)return x.error('HTML in-app messages are disabled. Use the "allowUserSuppliedJavascript" option for appboy.initialize to enable these messages.'),a.M(m,dd.ge),!1;null==q&&(q=document.body);if(m.Ja()&&0<q.querySelectorAll(".ab-modal-interactions").length)return x.info("Cannot show in-app message '"+m.message+"' because another message is being shown."),a.M(m,dd.Bf),!1;if(bc.nh()){var w=bc.hh();if(w===bc.Sa.jc&&m.orientation===
|
|
277
|
-
Zc||w===bc.Sa.Zc&&"PORTRAIT"===m.orientation)return x.info("Not showing "+("PORTRAIT"===m.orientation?"portrait":"landscape")+" in-app message '"+m.message+"' because the screen is currently "+(w===bc.Sa.jc?"portrait":"landscape")),a.M(m,dd.rg),!1}if(!f){w=!1;if(m.buttons&&0<m.buttons.length)for(var r=m.buttons,F=0;F<r.length;F++)r[F].clickAction===$c&&(w=sd(r[F].uri));else m.clickAction===$c&&(w=sd(m.uri));if(w)return x.error('Javascript click actions are disabled. Use the "allowUserSuppliedJavascript" option for appboy.initialize to enable these actions.'),
|
|
278
|
-
a.M(m,dd.ge),!1}var D=document.createElement("div");D.className="ab-iam-root v3";D.className+=m.oa();D.setAttribute("role","complementary");Bc(m)&&(D.id=m.htmlId);k&&(D.style.zIndex=k+1);q.appendChild(D);Cc(m)&&(q=document.createElement("style"),q.innerHTML=m.css,q.id=Dc(m),null!=l&&q.setAttribute("nonce",l),document.getElementsByTagName("head")[0].appendChild(q));var G=m instanceof Nc;q=m.aa(a,b,function(){a.display.Vd();},function(H){if(m.Ja()&&m.xf()){var A=document.createElement("div");A.className=
|
|
279
|
-
"ab-page-blocker";Cc(m)||(A.style.backgroundColor=sc(m.frameColor));k&&(A.style.zIndex=k);D.appendChild(A);if(!e){var N=(new Date).valueOf();A.onclick=function(V){200<(new Date).valueOf()-N&&(Wc(m,H),V.stopPropagation());};}D.appendChild(H);H.focus();m.Kc(D);}else if(G){var L=document.querySelectorAll(".ab-slideup");A=null;for(var I=L.length-1;0<=I;I--)if(L[I]!==H){A=L[I];break}"TOP"===m.slideFrom?(L=0,null!=A&&(L=A.offsetTop+A.offsetHeight),H.style.top=Math.max(L,0)+"px"):(L=0,null!=A&&(L=(window.innerHeight||
|
|
280
|
-
document.documentElement.clientHeight)-A.offsetTop),H.style.bottom=Math.max(L,0)+"px");}else t&&!e&&H.contentWindow.addEventListener("keydown",function(V){27===V.keyCode&&m.Ye();});a.Qb(m);m.dismissType===xc&&setTimeout(function(){D.contains(H)&&Wc(m,H);},m.duration);"function"===typeof v&&v();},c,k);if(t||G)D.appendChild(q),m.Kc(D);return !0},Vd:function(m,q,v){function t(A){for(var N=A.querySelectorAll(".ab-feed"),L=null,I=0;I<N.length;I++)N[I].parentNode===A&&(L=N[I]);null!=L?(xd(a,L),L.parentNode.replaceChild(G,
|
|
281
|
-
L)):A.appendChild(G);setTimeout(function(){G.className=G.className.replace("ab-hide","ab-show");},0);r&&G.focus();a.jf();Bd(D,a,G);}function w(A,N){if(null==N)return A;for(var L=[],I=0;I<N.length;I++)L.push(N[I].toLowerCase());N=[];for(I=0;I<A.length;I++){for(var V=[],Q=0;Q<A[I].categories.length;Q++)V.push(A[I].categories[Q].toLowerCase());0<Fa(V,L).length&&N.push(A[I]);}return N}var r=!1;null==m&&(m=document.body,r=!0);var F=!1,D=null;null==q?(D=a.Fc(),Fd(D,w(D.cards,v),D.lastUpdated,null,a,d),F=!0):
|
|
282
|
-
D=new wd(w(q,v),new Date);var G=D.aa(a,d);if(F){if(null==D.lastUpdated||6E4<(new Date).valueOf()-D.lastUpdated.valueOf())x.info("Cached feed was older than max TTL of 60000 ms, requesting an update from the server."),Cd(D,a,G);var H=(new Date).valueOf();q=a.uf(function(A){var N=G.querySelectorAll(".ab-refresh-button")[0];if(null!=N){var L=500,I=parseInt(G.getAttribute(Dd));L=isNaN(I)?L-((new Date).valueOf()-H):L-((new Date).valueOf()-I);setTimeout(function(){N.className=N.className.replace(/fa-spin/g,
|
|
283
|
-
"");},Math.max(L,0));}Fd(D,w(A.cards,v),A.lastUpdated,G,a,d);});G.setAttribute(yd,q);}null!=m?t(m):window.onload=function(A){return function(){"function"===typeof A&&A();t(document.body);}}(window.onload);},af:function(){for(var m=document.querySelectorAll(".ab-feed"),q=0;q<m.length;q++)xd(a,m[q]);},Rh:function(m,q,v){0<document.querySelectorAll(".ab-feed").length?a.display.af():a.display.Vd(m,q,v);},rf:function(m,q){function v(G){for(var H=G.querySelectorAll(".ab-feed"),A=null,N=0;N<H.length;N++)H[N].parentNode===
|
|
284
|
-
G&&(A=H[N]);null!=A?(xd(a,A),A.parentNode.replaceChild(r,A)):G.appendChild(r);setTimeout(function(){r.className=r.className.replace("ab-hide","ab-show");},0);t&&r.focus();a.hf();Bd(w,a,r);}var t=!1;null==m&&(m=document.body,t=!0);var w=null;w=a.pb();"function"===typeof q&&Fd(w,q(w.cards.slice()),w.lastUpdated,null,a,d);var r=w.aa(a,d);(null==w.lastUpdated||6E4<(new Date).valueOf()-w.lastUpdated.valueOf())&&(null==h||6E4<(new Date).valueOf()-h.valueOf())&&(x.info("Cached content cards were older than max TTL of 60000 ms, requesting a sync from the server."),
|
|
285
|
-
Cd(w,a,r),h=(new Date).valueOf());var F=(new Date).valueOf(),D=a.tf(function(G){var H=r.querySelectorAll(".ab-refresh-button")[0];if(null!=H){var A=500,N=parseInt(r.getAttribute(Dd));A=isNaN(N)?A-((new Date).valueOf()-F):A-((new Date).valueOf()-N);setTimeout(function(){H.className=H.className.replace(/fa-spin/g,"");},Math.max(A,0));}A=G.cards;"function"===typeof q&&(A=q(A.slice()));Fd(w,A,G.lastUpdated,r,a,d);});r.setAttribute(yd,D);null!=m?v(m):window.onload=function(G){return function(){"function"===
|
|
286
|
-
typeof G&&G();v(document.body);}}(window.onload);},gf:function(m){for(var q=document.querySelectorAll(".ab-feed"),v=0;v<q.length;v++)(null==m||null!=m&&q[v].parentNode===m)&&xd(a,q[v]);},Qh:function(m,q){0<document.querySelectorAll(".ab-feed").length?a.display.gf():a.display.rf(m,q);}}}(X,Pf);Pf.display={};Pf.display.automaticallyShowNewInAppMessages=Qf.Tg;Pf.display.showInAppMessage=Qf.sf;Pf.display.showFeed=Qf.Vd;Pf.display.destroyFeed=Qf.af;Pf.display.toggleFeed=Qf.Rh;Pf.display.showContentCards=Qf.rf;
|
|
287
|
-
Pf.display.hideContentCards=Qf.gf;Pf.display.toggleContentCards=Qf.Qh;X.display=Qf;return appboyInterface});}).call(window);
|
|
24
|
+
const je={pn:function(t){const r=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(r),o=new Uint8Array(n.length);for(let t=0;t<n.length;++t)o[t]=n.charCodeAt(t);return o}};
|
|
25
|
+
|
|
26
|
+
const ve={CustomEvent:"ce",Pr:"p",Sl:"pc",oc:"ca",Ra:"i",qs:"ie",T:"cci",W:"ccic",_:"ccc",L:"ccd",Wh:"ss",bh:"se",Je:"si",Re:"sc",He:"sbc",Pe:"sfe",ro:"iec",vl:"lr",yl:"uae",U:"ci",F:"cc",Al:"lcaa",$l:"lcar",En:"inc",An:"add",Un:"rem",Sn:"set",Cl:"sgu"},De={Fr:"feed_displayed",ac:"content_cards_displayed"};
|
|
27
|
+
|
|
28
|
+
const Be={nt:()=>{const t=t=>{const e=(Math.random().toString(16)+"000000000").substr(2,8);return t?"-"+e.substr(0,4)+"-"+e.substr(4,4):e};return t()+t(!0)+t(!0)+t()}};
|
|
29
|
+
|
|
30
|
+
class Ae{constructor(t,e){this.td="undefined"==typeof window?self:window,this.ed=t,this.nd=e;}od(){if("indexedDB"in this.td)return this.td.indexedDB}rd(){try{if(null==this.od())return !1;if(this.od().open("Braze IndexedDB Support Test"),"undefined"!=typeof window){const t=window.chrome||window.browser||window.msBrowser;if(t&&t.runtime&&t.runtime.id)return this.nd.info("Not using IndexedDB for storage because we are running inside an extension"),!1}return !0}catch(t){return this.nd.info("Not using IndexedDB for storage due to following error: "+t),!1}}dd(t,e){const n=this.od().open(this.ed.sd,this.ed.VERSION);if(null==n)return "function"==typeof e&&e(),!1;const o=this;return n.onupgradeneeded=t=>{o.nd.info("Upgrading indexedDB "+o.ed.sd+" to v"+o.ed.VERSION+"...");const e=t.target.result;for(const t in o.ed.$t)o.ed.$t.hasOwnProperty(t)&&!e.objectStoreNames.contains(o.ed.$t[t])&&e.createObjectStore(o.ed.$t[t]);},n.onsuccess=n=>{const i=n.target.result;i.onversionchange=()=>{i.close(),"function"==typeof e&&e(),o.nd.error("Needed to close the database unexpectedly because of an upgrade in another tab");},t(i);},n.onerror=t=>(o.nd.info("Could not open indexedDB "+o.ed.sd+" v"+o.ed.VERSION+": "+t.target.errorCode),"function"==typeof e&&e(),!0),!0}setItem(t,e,n,o,i){if(!this.rd())return "function"==typeof i&&i(),!1;const r=this;return this.dd((d=>{if(!d.objectStoreNames.contains(t))return r.nd.error("Could not store object "+e+" in "+t+" on indexedDB "+r.ed.sd+" - "+t+" is not a valid objectStore"),void("function"==typeof i&&i());const s=d.transaction([t],"readwrite").objectStore(t).put(n,e);s.onerror=()=>{r.nd.error("Could not store object "+e+" in "+t+" on indexedDB "+r.ed.sd),"function"==typeof i&&i();},s.onsuccess=()=>{"function"==typeof o&&o();};}),i)}getItem(t,e,n){if(!this.rd())return !1;const o=this;return this.dd((i=>{if(!i.objectStoreNames.contains(t))return void o.nd.error("Could not retrieve object "+e+" in "+t+" on indexedDB "+o.ed.sd+" - "+t+" is not a valid objectStore");const r=i.transaction([t],"readonly").objectStore(t).get(e);r.onerror=()=>{o.nd.error("Could not retrieve object "+e+" in "+t+" on indexedDB "+o.ed.sd);},r.onsuccess=t=>{const e=t.target.result;null!=e&&n(e);};}))}hr(t,e,n){if(!this.rd())return "function"==typeof n&&n(),!1;const o=this;return this.dd((i=>{if(!i.objectStoreNames.contains(t))return o.nd.error("Could not retrieve last record from "+t+" on indexedDB "+o.ed.sd+" - "+t+" is not a valid objectStore"),void("function"==typeof n&&n());const r=i.transaction([t],"readonly").objectStore(t).openCursor(null,"prev");r.onerror=()=>{o.nd.error("Could not open cursor for "+t+" on indexedDB "+o.ed.sd),"function"==typeof n&&n();},r.onsuccess=t=>{const o=t.target.result;null!=o&&null!=o.value&&null!=o.key?e(o.key,o.value):"function"==typeof n&&n();};}),n)}br(t,e){if(!this.rd())return !1;const n=this;return this.dd((o=>{if(!o.objectStoreNames.contains(t))return void n.nd.error("Could not delete record "+e+" from "+t+" on indexedDB "+n.ed.sd+" - "+t+" is not a valid objectStore");o.transaction([t],"readwrite").objectStore(t).delete(e).onerror=()=>{n.nd.error("Could not delete record "+e+" from "+t+" on indexedDB "+n.ed.sd);};}))}Jt(t,e){if(!this.rd())return !1;const n=this;return this.dd((o=>{if(!o.objectStoreNames.contains(t))return void n.nd.error("Could not retrieve objects from "+t+" on indexedDB "+n.ed.sd+" - "+t+" is not a valid objectStore");const i=o.transaction([t],"readwrite").objectStore(t),r=i.openCursor(),d=[];r.onerror=()=>{d.length>0?(n.nd.info("Cursor closed midway through for "+t+" on indexedDB "+n.ed.sd),e(d)):n.nd.error("Could not open cursor for "+t+" on indexedDB "+n.ed.sd);},r.onsuccess=t=>{const n=t.target.result;if(null!=n){if(null!=n.value&&null!=n.key){i.delete(n.key).onsuccess=()=>{d.push(n.value);};}n.continue();}else d.length>0&&e(d);};}))}clearData(){if(!this.rd())return !1;const t=[];for(const e in this.ed.$t)this.ed.$t.hasOwnProperty(e)&&this.ed.$t[e]!==this.ed.$t.oe&&t.push(this.ed.$t[e]);const e=this;return this.dd((function(n){const o=n.transaction(t,"readwrite");for(let n=0;n<t.length;n++){const i=t[n];o.objectStore(i).clear().onerror=function(){e.nd.error("Could not clear "+this.source.name+" on indexedDB "+e.ed.sd);};}o.onerror=function(){e.nd.error("Could not clear object stores on indexedDB "+e.ed.sd);};}))}}Ae.ep={Ft:{sd:"AppboyServiceWorkerAsyncStorage",VERSION:6,$t:{jl:"data",jr:"pushClicks",pu:"pushSubscribed",ud:"fallbackDevice",Mt:"cardUpdates",oe:"optOut",$r:"pendingData",Kn:"sdkAuthenticationSignature"},se:1}};
|
|
31
|
+
|
|
32
|
+
const Ge={init:function(n){void 0===n&&void 0!==Ge.zg||(Ge.zg=!!n),Ge.Dg||(Ge.Dg=!0);},destroy:function(){Ge.Dg=!1,Ge.zg=void 0,Ge.nd=void 0;},setLogger:function(n){"function"==typeof n?(Ge.init(),Ge.nd=n):Ge.info("Ignoring setLogger call since logger is not a function");},toggleLogging:function(){Ge.init(),Ge.zg?(console.log("Disabling Braze logging"),Ge.zg=!1):(console.log("Enabled Braze logging"),Ge.zg=!0);},info:function(n){if(Ge.zg){const o="Braze: "+n;null!=Ge.nd?Ge.nd(o):console.log(o);}},warn:function(n){if(Ge.zg){const o="Braze SDK Warning: "+n+" (v4.2.1)";null!=Ge.nd?Ge.nd(o):console.warn(o);}},error:function(n){if(Ge.zg){const o="Braze SDK Error: "+n+" (v4.2.1)";null!=Ge.nd?Ge.nd(o):console.error(o);}}};
|
|
33
|
+
|
|
34
|
+
var Oe = {Rn:"allowCrawlerActivity",Wn:"baseUrl",Vn:"noCookies",Yn:"devicePropertyAllowlist",ta:"disablePushTokenMaintenance",Xn:"enableLogging",Zn:"enableSdkAuthentication",ia:"manageServiceWorkerExternally",ho:"minimumIntervalBetweenTriggerActionsInSeconds",po:"sessionTimeoutInSeconds",Eo:"appVersion",na:"serviceWorkerLocation",ra:"safariWebsitePushId",jn:"localization",ao:"contentSecurityNonce",_o:"enableHtmlInAppMessages",Io:"allowUserSuppliedJavascript",no:"inAppMessageZIndex",lo:"openInAppMessagesInNewTab",en:"openNewsFeedCardsInNewTab",Ui:"requireExplicitInAppMessageDismissal",Ao:"doNotLoadFontAwesome",So:"sdkFlavor",tn:"openCardsInNewTab"};
|
|
35
|
+
|
|
36
|
+
const r={bn:je,A:ve,qr:De,it:Be,qt:Ae,xt:Ae.ep,D:Ge,zo:Oe};var r$1 = r;
|
|
37
|
+
|
|
38
|
+
function values(t){const e=[];for(let r in t)t.hasOwnProperty(r)&&void 0!==t[r]&&e.push(t[r]);return e}function validateValueIsFromEnum(t,e,n,o){const c=values(t);return -1!==c.indexOf(e)||(r$1.D.error(`${n} Valid values from ${o} are "${c.join('"/"')}".`),!1)}function isArray(t){return Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)}function isDate(t){return "[object Date]"===Object.prototype.toString.call(t)}function isObject$1(t){return "[object Object]"===Object.prototype.toString.call(t)}function intersection(t){null==t&&(t=[]);const e=[],r=arguments.length;for(let n=0,o=t.length;n<o;n++){const o=t[n];if(-1!==e.indexOf(o))continue;let c=1;for(c=1;c<r&&-1!==arguments[c].indexOf(o);c++);c===r&&e.push(o);}return e}function keys(t){const e=[];for(let r in t)t.hasOwnProperty(r)&&e.push(r);return e}function isEqual(t,e){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return t===e;const r=t.toString();if(r!==e.toString())return !1;switch(r){case"[object RegExp]":case"[object String]":return ""+t==""+e;case"[object Number]":return +t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return +t==+e}const n="[object Array]"===r;if(!n){if("object"!=typeof t||"object"!=typeof e)return !1;const r=t.constructor,n=e.constructor;if(r!==n&&!("function"==typeof r&&r instanceof r&&"function"==typeof n&&n instanceof n)&&"constructor"in t&&"constructor"in e)return !1}const o=[],c=[];let i=o.length;for(;i--;)if(o[i]===t)return c[i]===e;if(o.push(t),c.push(e),n){if(i=t.length,i!==e.length)return !1;for(;i--;)if(!isEqual(t[i],e[i]))return !1}else {let r,n=keys(t);if(i=n.length,keys(e).length!==i)return !1;for(;i--;)if(r=n[i],!e.hasOwnProperty(r)||!isEqual(t[r],e[r]))return !1}return o.pop(),c.pop(),!0}
|
|
39
|
+
|
|
40
|
+
function convertMsToSeconds(e,n){let t=e/1e3;return n&&(t=Math.floor(t)),t}function convertSecondsToMs(e){return 1e3*e}function dateFromUnixTimestamp(e){const n=parseInt(e);return null==e||isNaN(n)?null:new Date(1e3*n)}function toValidBackendTimeString(e){return null!=e&&isDate(e)?e.toISOString().replace(/\.[0-9]{3}Z$/,""):e}function rehydrateDateAfterJsonization(e){return null==e||""===e?null:new Date(e)}function timestampOrNow(e){return null==e||""===e?(new Date).valueOf():e}function secondsAgo(e){return ((new Date).valueOf()-e.valueOf())/1e3}function secondsInTheFuture(e){return (e.valueOf()-(new Date).valueOf())/1e3}
|
|
41
|
+
|
|
42
|
+
const MAX_PURCHASE_QUANTITY=100;const MUST_BE_IN_APP_MESSAGE_WARNING="inAppMessage must be an InAppMessage object";const MUST_BE_CARD_WARNING_SUFFIX="must be a Card object";const FEED_ANIMATION_DURATION=500;
|
|
43
|
+
|
|
44
|
+
class u{constructor(){this.De={};}ut(t){if("function"!=typeof t)return null;const i=r$1.it.nt();return this.De[i]=t,i}removeSubscription(t){delete this.De[t];}removeAllSubscriptions(){this.De={};}St(t){const i=[];for(let r in this.De)i.push(this.De[r](t));return i}}
|
|
45
|
+
|
|
46
|
+
class Card{constructor(t,i,s,n,l,h,e,r,E,u,T,o,I,a,N,S){this.id=t,this.viewed=i||!1,this.title=s||"",this.imageUrl=n,this.description=l||"",this.created=h||null,this.updated=e||null,this.categories=r||[],this.expiresAt=E||null,this.url=u,this.linkText=T,o=parseFloat(o),this.aspectRatio=isNaN(o)?null:o,this.extras=I,this.pinned=a||!1,this.dismissible=N||!1,this.dismissed=!1,this.clicked=S||!1,this.test=!1,this.lt=null,this.Et=null;}subscribeToClickedEvent(t){return this.Tt().ut(t)}subscribeToDismissedEvent(t){return this.It().ut(t)}removeSubscription(t){this.Tt().removeSubscription(t),this.It().removeSubscription(t);}removeAllSubscriptions(){this.Tt().removeAllSubscriptions(),this.It().removeAllSubscriptions();}dismissCard(){if(this.dismissible&&!this.dismissed){this.tt&&this.tt(this);var t=this.X;t&&(t.style.height=t.offsetHeight+"px",t.className=t.className+" ab-hide",setTimeout((function(){t&&t.parentNode&&(t.style.height="0",t.style.margin="0",setTimeout((function(){t&&t.parentNode&&t.parentNode.removeChild(t);}),Card.Nt));}),FEED_ANIMATION_DURATION));}}Tt(){return null==this.lt&&(this.lt=new u),this.lt}It(){return null==this.Et&&(this.Et=new u),this.Et}R(){this.viewed=!0;}k(){this.viewed=!0,this.clicked=!0,this.Tt().St();}J(){return !(!this.dismissible||this.dismissed)&&(this.dismissed=!0,this.It().St(),!0)}ct(t){if(null==t||t[Card.At.ns]!==this.id)return !0;if(t[Card.At.Dt])return !1;if(null!=t[Card.At.us]&&null!=this.updated&&t[Card.At.us]<convertMsToSeconds(this.updated.valueOf()))return !0;if(t[Card.At.ls]&&!this.viewed&&(this.viewed=!0),t[Card.At.gs]&&!this.clicked&&(this.clicked=t[Card.At.gs]),null!=t[Card.At.ht]&&(this.title=t[Card.At.ht]),null!=t[Card.At.os]&&(this.imageUrl=t[Card.At.os]),null!=t[Card.At.rt]&&(this.description=t[Card.At.rt]),null!=t[Card.At.us]){const i=dateFromUnixTimestamp(t[Card.At.us]);null!=i&&(this.updated=i);}if(null!=t[Card.At.ps]){let i;i=t[Card.At.ps]===Card.Ct?null:dateFromUnixTimestamp(t[Card.At.ps]),this.expiresAt=i;}if(null!=t[Card.At.URL]&&(this.url=t[Card.At.URL]),null!=t[Card.At.bs]&&(this.linkText=t[Card.At.bs]),null!=t[Card.At.fs]){const i=parseFloat(t[Card.At.fs]);this.aspectRatio=isNaN(i)?null:i;}return null!=t[Card.At.xs]&&(this.extras=t[Card.At.xs]),null!=t[Card.At.js]&&(this.pinned=t[Card.At.js]),null!=t[Card.At.zs]&&(this.dismissible=t[Card.At.zs]),null!=t[Card.At.ks]&&(this.test=t[Card.At.ks]),!0}}Card.Ct=-1,Card.es={st:"captioned_image",dt:"text_announcement",Rt:"short_news",rs:"banner_image",_t:"control"},Card.At={ns:"id",ls:"v",zs:"db",Dt:"r",us:"ca",js:"p",ps:"ea",xs:"e",ts:"tp",os:"i",ht:"tt",rt:"ds",URL:"u",bs:"dm",fs:"ar",gs:"cl",ks:"t"},Card.hs={ns:"id",ls:"v",zs:"db",cs:"cr",us:"ca",js:"p",ds:"t",ps:"ea",xs:"e",ts:"tp",os:"i",ht:"tt",rt:"ds",URL:"u",bs:"dm",fs:"ar",gs:"cl",ks:"s"},Card.Lt={Ot:"ADVERTISING",bt:"ANNOUNCEMENTS",ft:"NEWS",Pt:"SOCIAL"},Card.Nt=400;
|
|
47
|
+
|
|
48
|
+
class Banner extends Card{constructor(s,t,i,h,r,e,n,l,a,o,u,c,d,p){super(s,t,null,i,null,h,r,e,n,l,a,o,u,c,d,p),this.Y="ab-banner",this.Z=!1;}ss(){const s={};return s[Card.hs.ts]=Card.es.rs,s[Card.hs.ns]=this.id,s[Card.hs.ls]=this.viewed,s[Card.hs.os]=this.imageUrl,s[Card.hs.us]=this.updated,s[Card.hs.cs]=this.created,s[Card.hs.ds]=this.categories,s[Card.hs.ps]=this.expiresAt,s[Card.hs.URL]=this.url,s[Card.hs.bs]=this.linkText,s[Card.hs.fs]=this.aspectRatio,s[Card.hs.xs]=this.extras,s[Card.hs.js]=this.pinned,s[Card.hs.zs]=this.dismissible,s[Card.hs.gs]=this.clicked,s[Card.hs.ks]=this.test,s}}
|
|
49
|
+
|
|
50
|
+
class CaptionedImage extends Card{constructor(t,s,i,h,e,r,a,o,c,n,d,p,u,l,m,f){super(t,s,i,h,e,r,a,o,c,n,d,p,u,l,m,f),this.Y="ab-captioned-image",this.Z=!0;}ss(){const t={};return t[Card.hs.ts]=Card.es.st,t[Card.hs.ns]=this.id,t[Card.hs.ls]=this.viewed,t[Card.hs.ht]=this.title,t[Card.hs.os]=this.imageUrl,t[Card.hs.rt]=this.description,t[Card.hs.us]=this.updated,t[Card.hs.cs]=this.created,t[Card.hs.ds]=this.categories,t[Card.hs.ps]=this.expiresAt,t[Card.hs.URL]=this.url,t[Card.hs.bs]=this.linkText,t[Card.hs.fs]=this.aspectRatio,t[Card.hs.xs]=this.extras,t[Card.hs.js]=this.pinned,t[Card.hs.zs]=this.dismissible,t[Card.hs.gs]=this.clicked,t[Card.hs.ks]=this.test,t}}
|
|
51
|
+
|
|
52
|
+
class ClassicCard extends Card{constructor(s,t,i,h,r,c,e,a,o,d,l,n,u,p,f,m){super(s,t,i,h,r,c,e,a,o,d,l,n,u,p,f,m),this.Y="ab-classic-card",this.Z=!0;}ss(){const s={};return s[Card.hs.ts]=Card.es.Rt,s[Card.hs.ns]=this.id,s[Card.hs.ls]=this.viewed,s[Card.hs.ht]=this.title,s[Card.hs.os]=this.imageUrl,s[Card.hs.rt]=this.description,s[Card.hs.us]=this.updated,s[Card.hs.cs]=this.created,s[Card.hs.ds]=this.categories,s[Card.hs.ps]=this.expiresAt,s[Card.hs.URL]=this.url,s[Card.hs.bs]=this.linkText,s[Card.hs.fs]=this.aspectRatio,s[Card.hs.xs]=this.extras,s[Card.hs.js]=this.pinned,s[Card.hs.zs]=this.dismissible,s[Card.hs.gs]=this.clicked,s[Card.hs.ks]=this.test,s}}
|
|
53
|
+
|
|
54
|
+
class ControlCard extends Card{constructor(l,t,s,n,u,i){super(l,t,null,null,null,null,s,null,n,null,null,null,u,i,null),this.Y="ab-control-card",this.Z=!1;}ss(){const l={};return l[Card.hs.ts]=Card.es._t,l[Card.hs.ns]=this.id,l[Card.hs.ls]=this.viewed,l[Card.hs.us]=this.updated,l[Card.hs.ps]=this.expiresAt,l[Card.hs.xs]=this.extras,l[Card.hs.js]=this.pinned,l[Card.hs.ks]=this.test,l}}
|
|
55
|
+
|
|
56
|
+
class Zt{constructor(){}tf(){}ef(){}Ko(t){}static rf(t,e){if(t&&e)if(t=t.toLowerCase(),isArray(e.if)){for(let r=0;r<e.if.length;r++)if(-1!==t.indexOf(e.if[r].toLowerCase()))return e.identity}else if(-1!==t.indexOf(e.if.toLowerCase()))return e.identity}}
|
|
57
|
+
|
|
58
|
+
const Browsers={rE:"Chrome",eE:"Edge",vg:"Internet Explorer",EE:"Opera",yg:"Safari",oE:"Firefox"};const OperatingSystems={Og:"Android",ln:"iOS",Bg:"Mac",mg:"Windows"};
|
|
59
|
+
|
|
60
|
+
class ti extends Zt{constructor(){if(super(),this.userAgentData=navigator.userAgentData,this.userAgentData){const t=this.sc();this.browser=t.browser||"Unknown Browser",this.version=t.version||"Unknown Version";}}tf(){return this.browser}ef(){return this.version}Ko(t){if(this.OS)return Promise.resolve(this.OS);const r=r=>{for(let s=0;s<t.length;s++){const e=ti.rf(r,t[s]);if(e)return this.OS=e,this.OS}return r};return this.userAgentData.platform?Promise.resolve(r(this.userAgentData.platform)):this.ic().then((t=>r(t.platform))).catch((()=>navigator.platform))}sc(){const t={},r=this.userAgentData.brands;if(r&&r.length)for(const s of r){const r=this.nc(Browsers),e=s.brand.match(r);if(e&&e.length>0){t.browser=e[0],t.version=s.version;break}}return t}nc(t){const r=[];for(const s in t)t[s]!==Browsers.vg&&r.push(t[s]);return new RegExp("("+r.join("|")+")","i")}ic(){return this.userAgentData.getHighEntropyValues?this.userAgentData.getHighEntropyValues(["platform"]):Promise.reject()}}
|
|
61
|
+
|
|
62
|
+
class ni extends Zt{constructor(){super(),this.au=ni.du(navigator.userAgent||"");}tf(){return this.au[0]||"Unknown Browser"}ef(){return this.au[1]||"Unknown Version"}Ko(r){for(let e=0;e<r.length;e++){let n=r[e].string,i=ni.rf(n,r[e]);if(i)return i===OperatingSystems.Bg&&navigator.maxTouchPoints>1&&(i=OperatingSystems.ln),Promise.resolve(i)}return Promise.resolve(navigator.platform)}static du(r){let e,n=r.match(/(samsungbrowser|tizen|roku|konqueror|icab|crios|opera|ucbrowser|chrome|safari|firefox|camino|msie|trident(?=\/))\/?\s*(\.?\d+(\.\d+)*)/i)||[];if(/trident/i.test(n[1]))return e=/\brv[ :]+(\.?\d+(\.\d+)*)/g.exec(r)||[],[Browsers.vg,e[1]||""];if(-1!==r.indexOf("(Web0S; Linux/SmartTV)"))return ["LG Smart TV",null];if(-1!==r.indexOf("CrKey"))return ["Chromecast",null];if(-1!==r.indexOf("BRAVIA")||-1!==r.indexOf("SonyCEBrowser")||-1!==r.indexOf("SonyDTV"))return ["Sony Smart TV",null];if(-1!==r.indexOf("PhilipsTV"))return ["Philips Smart TV",null];if(r.match(/\b(Roku)\b/))return ["Roku",null];if(r.match(/\bAFTM\b/))return ["Amazon Fire Stick",null];if(n[1]===Browsers.rE&&(e=r.match(/\b(OPR|Edge|EdgA|Edg|UCBrowser)\/(\.?\d+(\.\d+)*)/),null!=e))return e=e.slice(1),e[0]=e[0].replace("OPR",Browsers.EE),e[0]=e[0].replace("EdgA",Browsers.eE),"Edg"===e[0]&&(e[0]=Browsers.eE),[e[0],e[1]];if(n[1]===Browsers.yg&&(e=r.match(/\b(EdgiOS)\/(\.?\d+(\.\d+)*)/),null!=e))return e=e.slice(1),e[0]=e[0].replace("EdgiOS",Browsers.eE),[e[0],e[1]];if(n=n[2]?[n[1],n[2]]:[null,null],n[0]===Browsers.yg&&null!=(e=r.match(/version\/(\.?\d+(\.\d+)*)/i))&&n.splice(1,1,e[1]),null!=(e=r.match(/\b(UCBrowser)\/(\.?\d+(\.\d+)*)/))&&n.splice(1,1,e[2]),n[0]===Browsers.EE&&null!=(e=r.match(/mini\/(\.?\d+(\.\d+)*)/i)))return ["Opera Mini",e[1]||""];if(n[0]){const r=n[0].toLowerCase();"msie"===r&&(n[0]=Browsers.vg),"crios"===r&&(n[0]=Browsers.rE),"tizen"===r&&(n[0]="Samsung Smart TV",n[1]=null),"samsungbrowser"===r&&(n[0]="Samsung Browser");}return n}}
|
|
63
|
+
|
|
64
|
+
class si{constructor(){const t=navigator.userAgentData?ti:ni;this.dg=new t,this.userAgent=navigator.userAgent,this.browser=this.dg.tf(),this.version=this.dg.ef(),this.Ko().then((t=>this.OS=t)),this.language=(navigator.userLanguage||navigator.language||navigator.browserLanguage||navigator.systemLanguage||"").toLowerCase(),this.Do=si.Sg(this.userAgent);}bg(){return this.browser!==Browsers.vg||this.version>8}La(){return this.browser===Browsers.yg}qo(){return this.OS||null}Ko(){return this.OS?Promise.resolve(this.OS):this.dg.Ko(si.pg).then((t=>(this.OS=t,t)))}static Sg(t){t=t.toLowerCase();const i=["googlebot","bingbot","slurp","duckduckbot","baiduspider","yandex","facebookexternalhit","sogou","ia_archiver","https://github.com/prerender/prerender","aolbuild","bingpreview","msnbot","adsbot","mediapartners-google","teoma"];for(let n=0;n<i.length;n++)if(-1!==t.indexOf(i[n]))return !0;return !1}}si.pg=[{string:navigator.platform,if:"Win",identity:OperatingSystems.mg},{string:navigator.platform,if:"Mac",identity:OperatingSystems.Bg},{string:navigator.platform,if:"BlackBerry",identity:"BlackBerry"},{string:navigator.platform,if:"FreeBSD",identity:"FreeBSD"},{string:navigator.platform,if:"OpenBSD",identity:"OpenBSD"},{string:navigator.platform,if:"Nintendo",identity:"Nintendo"},{string:navigator.platform,if:"SunOS",identity:"SunOS"},{string:navigator.platform,if:"PlayStation",identity:"PlayStation"},{string:navigator.platform,if:"X11",identity:"X11"},{string:navigator.userAgent,if:["iPhone","iPad","iPod"],identity:OperatingSystems.ln},{string:navigator.platform,if:"Pike v",identity:OperatingSystems.ln},{string:navigator.userAgent,if:["Web0S"],identity:"WebOS"},{string:navigator.platform,if:["Linux armv7l","Android"],identity:OperatingSystems.Og},{string:navigator.userAgent,if:["Android"],identity:OperatingSystems.Og},{string:navigator.platform,if:"Linux",identity:"Linux"}];const et=new si;
|
|
65
|
+
|
|
66
|
+
class ue{constructor(t,i,s,r,e){this.userId=t,this.type=i,this.time=timestampOrNow(s),this.sessionId=r,this.data=e;}li(){const t={name:this.type,time:convertMsToSeconds(this.time),data:this.data||{},session_id:this.sessionId};return null!=this.userId&&(t.user_id=this.userId),t}ss(){return {u:this.userId,t:this.type,ts:this.time,s:this.sessionId,d:this.data}}static fromJson(t){return new ue(t.user_id,t.name,t.time,t.session_id,t.data)}static Ma(t){return null!=t&&isObject$1(t)&&null!=t.t&&""!==t.t}static yn(t){return new ue(t.u,t.t,t.ts,t.s,t.d)}}
|
|
67
|
+
|
|
68
|
+
class _t{constructor(t,e,s){null==t&&(t=r$1.it.nt()),s=parseInt(s),(isNaN(s)||0===s)&&(s=(new Date).valueOf()),this.eu=t,this.xh=s,this._h=(new Date).valueOf(),this.Nh=e;}ss(){return {g:this.eu,e:this.Nh,c:this.xh,l:this._h}}static yn(t){if(null==t||null==t.g)return null;const e=new _t(t.g,t.e,t.c);return e._h=t.l,e}}
|
|
69
|
+
|
|
70
|
+
function getByteLength(e){let t=e.length;for(let r=e.length-1;r>=0;r--){const n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&r--;}return t}function decodeBrazeActions(e){try{e=e.replace(/-/g,"+").replace(/_/g,"/");let t=window.atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);let n=new Uint16Array(r.buffer);return String.fromCharCode(...n)}catch(e){return r$1.D.error("Unable to decode Base64: "+e),null}}
|
|
71
|
+
|
|
72
|
+
const BRAZE_ACTIONS={types:{ue:"container",logCustomEvent:"logCustomEvent",setEmailNotificationSubscriptionType:"setEmailNotificationSubscriptionType",setPushNotificationSubscriptionType:"setPushNotificationSubscriptionType",setCustomUserAttribute:"setCustomUserAttribute",requestPushPermission:"requestPushPermission",addToSubscriptionGroup:"addToSubscriptionGroup",removeFromSubscriptionGroup:"removeFromSubscriptionGroup",addToCustomAttributeArray:"addToCustomAttributeArray",removeFromCustomAttributeArray:"removeFromCustomAttributeArray",de:"openLink",pe:"openLinkInWebView"},properties:{type:"type",me:"steps",fe:"args"}};const INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES={We:"unknownBrazeAction",Ye:"noPushPrompt"};const ineligibleBrazeActionURLErrorMessage=(t,o)=>{switch(t){case INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.We:return `${o} contains an unknown braze action type and will not be displayed.`;case INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.Ye:return `${o} contains a push prompt braze action, but is not eligible for a push prompt. Ignoring.`;default:return ""}};function getDecodedBrazeAction(t){try{let o=t.match(BRAZE_ACTION_URI_REGEX)[0].length;const e=t.substring(o);if(o>t.length-1||!e)return void r$1.D.error(`Did not find base64 encoded brazeAction in url to process : ${t}`);const n=decodeBrazeActions(e);return n?JSON.parse(n):void r$1.D.error(`Failed to decode base64 encoded brazeAction: ${e}`)}catch(o){return void r$1.D.error(`Failed to process brazeAction URL ${t} : ${o.message}`)}}function oo(t,o){let r=!1;for(const e of o)if(r=r||t(e),r)return !0;return !1}function containsUnknownBrazeAction(t){try{const o=t[BRAZE_ACTIONS.properties.type];return o===BRAZE_ACTIONS.types.ue?oo(containsUnknownBrazeAction,t[BRAZE_ACTIONS.properties.me]):!isValidBrazeActionType(o)}catch(t){return !0}}function containsPushPrimerBrazeAction(t){if(!isValidBrazeActionJson(t))return !1;const o=t[BRAZE_ACTIONS.properties.type];return o===BRAZE_ACTIONS.types.ue?oo(containsPushPrimerBrazeAction,t[BRAZE_ACTIONS.properties.me]):o===BRAZE_ACTIONS.types.requestPushPermission}
|
|
73
|
+
|
|
74
|
+
const CUSTOM_DATA_REGEX=/^[^\x00-\x1F\x22]+$/;const EMAIL_ADDRESS_REGEX=new RegExp(/^.+@.+\..+$/);const BRAZE_ACTION_URI_REGEX=/^brazeActions:\/\/v\d+\//;function _validatePropertyType(e){const t=typeof e;return null==e||"number"===t||"boolean"===t||isDate(e)||"string"===t}function _validateNestedProperties(e,t){if(isArray(e)&&isArray(t)){for(let r=0;r<e.length&&r<t.length;r++)if(isDate(e[r])&&(t[r]=toValidBackendTimeString(e[r])),!_validateNestedProperties(e[r],t[r]))return !1}else {if(!isObject$1(e))return _validatePropertyType(e);for(const r of keys(e))if(isDate(e[r])&&(t[r]=toValidBackendTimeString(e[r])),!_validateNestedProperties(e[r],t[r]))return !1}return !0}function _validateEventPropertyValue(e,t,n,o){let i;return i=isObject$1(e)||isArray(e)?_validateNestedProperties(e,t):_validatePropertyType(e),i||r$1.D.error(`Cannot ${n} because ${o} "${e}" is invalid.`),i}function validateStandardString(e,t,n,o){const i="string"==typeof e||null===e&&o;return i||r$1.D.error(`Cannot ${t} because ${n} "${e}" is invalid.`),i}function validateCustomString(e,t,n){const o=null!=e&&"string"==typeof e&&(""===e||e.match(CUSTOM_DATA_REGEX));return o||r$1.D.error(`Cannot ${t} because ${n} "${e}" is invalid.`),o}function validateCustomProperties(e,t,n,o,i){if(null==e&&(e={}),"object"!=typeof e||isArray(e))return r$1.D.error(`${t} requires that ${n} be an object. Ignoring ${i}.`),[!1,null];const a=JSON.stringify(e);if(getByteLength(a)>51200)return r$1.D.error(`Could not ${o} because ${n} was greater than the max size of 50KB.`),[!1,null];let s;try{s=JSON.parse(a);}catch(e){return r$1.D.error(`Could not ${o} because ${n} did not contain valid JSON.`),[!1,null]}for(let t in e){if(!validateCustomString(t,o,`the ${i} property name`))return [!1,null];const r=e[t];if(null==r){delete e[t],delete s[t];continue}isDate(r)&&(s[t]=toValidBackendTimeString(r));if(!_validateEventPropertyValue(r,s[t],o,`the ${i} property "${t}"`))return [!1,null]}return [!0,s]}function isValidEmail(e){return "string"==typeof e&&null!=e.toLowerCase().match(EMAIL_ADDRESS_REGEX)}function isValidBrazeActionJson(e){if(!(BRAZE_ACTIONS.properties.type in e))return !1;switch(e[BRAZE_ACTIONS.properties.type]){case BRAZE_ACTIONS.types.ue:if(BRAZE_ACTIONS.properties.me in e)return !0;break;case BRAZE_ACTIONS.types.logCustomEvent:case BRAZE_ACTIONS.types.setEmailNotificationSubscriptionType:case BRAZE_ACTIONS.types.setPushNotificationSubscriptionType:case BRAZE_ACTIONS.types.setCustomUserAttribute:case BRAZE_ACTIONS.types.addToSubscriptionGroup:case BRAZE_ACTIONS.types.removeFromSubscriptionGroup:case BRAZE_ACTIONS.types.addToCustomAttributeArray:case BRAZE_ACTIONS.types.removeFromCustomAttributeArray:case BRAZE_ACTIONS.types.de:case BRAZE_ACTIONS.types.pe:if(BRAZE_ACTIONS.properties.fe in e)return !0;break;case BRAZE_ACTIONS.types.requestPushPermission:return !0;default:return !1}return !1}function isValidBrazeActionType(e){let t=!1;return Object.keys(BRAZE_ACTIONS.types).forEach((r=>{BRAZE_ACTIONS.types[r]!==e.toString()||(t=!0);})),t}
|
|
75
|
+
|
|
76
|
+
class User{constructor(t,e){this.v=t,this.si=e;}getUserId(t){null==t&&r$1.D.error("getUserId must be supplied with a callback. e.g., braze.getUser().getUserId(function(userId) {console.log('the user id is ' + userId)})"),"function"==typeof t&&t(this.v.getUserId());}addAlias(t,e){return !validateStandardString(t,"add alias","the alias",!1)||t.length<=0?(r$1.D.error("addAlias requires a non-empty alias"),!1):!validateStandardString(e,"add alias","the label",!1)||e.length<=0?(r$1.D.error("addAlias requires a non-empty label"),!1):this.si.Nn(t,e).S}setFirstName(t){return !!validateStandardString(t,"set first name","the firstName",!0)&&this.v.nu("first_name",t)}setLastName(t){return !!validateStandardString(t,"set last name","the lastName",!0)&&this.v.nu("last_name",t)}setEmail(t){return null===t||isValidEmail(t)?this.v.nu("email",t):(r$1.D.error(`Cannot set email address - "${t}" did not pass RFC-5322 validation.`),!1)}setGender(t){return "string"==typeof t&&(t=t.toLowerCase()),!(null!==t&&!validateValueIsFromEnum(User.Genders,t,`Gender "${t}" is not a valid gender.`,"User.Genders"))&&this.v.nu("gender",t)}setDateOfBirth(t,e,s){return null===t&&null===e&&null===s?this.v.nu("dob",null):(t=parseInt(t),e=parseInt(e),s=parseInt(s),isNaN(t)||isNaN(e)||isNaN(s)||e>12||e<1||s>31||s<1?(r$1.D.error("Cannot set date of birth - parameters should comprise a valid date e.g. setDateOfBirth(1776, 7, 4);"),!1):this.v.nu("dob",`${t}-${e}-${s}`))}setCountry(t){return !!validateStandardString(t,"set country","the country",!0)&&this.v.nu("country",t)}setHomeCity(t){return !!validateStandardString(t,"set home city","the homeCity",!0)&&this.v.nu("home_city",t)}setLanguage(t){return !!validateStandardString(t,"set language","the language",!0)&&this.v.nu("language",t)}setEmailNotificationSubscriptionType(t){return !!validateValueIsFromEnum(User.NotificationSubscriptionTypes,t,`Email notification setting "${t}" is not a valid subscription type.`,"User.NotificationSubscriptionTypes")&&this.v.nu("email_subscribe",t)}setPushNotificationSubscriptionType(t){return !!validateValueIsFromEnum(User.NotificationSubscriptionTypes,t,`Push notification setting "${t}" is not a valid subscription type.`,"User.NotificationSubscriptionTypes")&&this.v.nu("push_subscribe",t)}setPhoneNumber(t){return !!validateStandardString(t,"set phone number","the phoneNumber",!0)&&(null===t||t.match(User.Cn)?this.v.nu("phone",t):(r$1.D.error(`Cannot set phone number - "${t}" did not pass validation.`),!1))}setLastKnownLocation(t,e,s,i,n){return null==t||null==e?(r$1.D.error("Cannot set last-known location - latitude and longitude are required."),!1):(t=parseFloat(t),e=parseFloat(e),null!=s&&(s=parseFloat(s)),null!=i&&(i=parseFloat(i)),null!=n&&(n=parseFloat(n)),isNaN(t)||isNaN(e)||null!=s&&isNaN(s)||null!=i&&isNaN(i)||null!=n&&isNaN(n)?(r$1.D.error("Cannot set last-known location - all supplied parameters must be numeric."),!1):t>90||t<-90||e>180||e<-180?(r$1.D.error("Cannot set last-known location - latitude and longitude are bounded by ±90 and ±180 respectively."),!1):null!=s&&s<0||null!=n&&n<0?(r$1.D.error("Cannot set last-known location - accuracy and altitudeAccuracy may not be negative."),!1):this.si.setLastKnownLocation(this.v.getUserId(),t,e,i,s,n).S)}setCustomUserAttribute(t,e){if(!validateCustomString(t,"set custom user attribute","the given key"))return !1;const s=typeof e,i=isDate(e),n=isArray(e);if("number"!==s&&"boolean"!==s&&!i&&!n&&null!==e&&!validateCustomString(e,`set custom user attribute "${t}"`,"the given value"))return !1;if(i&&(e=toValidBackendTimeString(e)),n){for(let s=0;s<e.length;s++){const r=e[s];if(!validateCustomString(r,`set custom user attribute "${t}"`,"the element in the given array"))return !1}return this.si.In(r$1.A.Sn,t,e).S}return this.v.setCustomUserAttribute(t,e)}addToCustomAttributeArray(t,e){return !!validateCustomString(t,"add to custom user attribute array","the given key")&&(!(null!=e&&!validateCustomString(e,"add to custom user attribute array","the given value"))&&this.si.In(r$1.A.An,t,e).S)}removeFromCustomAttributeArray(t,e){return !!validateCustomString(t,"remove from custom user attribute array","the given key")&&(!(null!=e&&!validateCustomString(e,"remove from custom user attribute array","the given value"))&&this.si.In(r$1.A.Un,t,e).S)}incrementCustomUserAttribute(t,e){if(!validateCustomString(t,"increment custom user attribute","the given key"))return !1;null==e&&(e=1);const s=parseInt(e);return isNaN(s)||s!==parseFloat(e)?(r$1.D.error(`Cannot increment custom user attribute because the given incrementValue "${e}" is not an integer.`),!1):this.si.In(r$1.A.En,t,s).S}setCustomLocationAttribute(t,e,s){return !!validateCustomString(t,"set custom location attribute","the given key")&&((null!==e||null!==s)&&(e=parseFloat(e),s=parseFloat(s),isNaN(e)||e>90||e<-90||isNaN(s)||s>180||s<-180)?(r$1.D.error("Received invalid values for latitude and/or longitude. Latitude and longitude are bounded by ±90 and ±180 respectively, or must both be null for removal."),!1):this.si.Fn(t,e,s).S)}addToSubscriptionGroup(t){return !validateStandardString(t,"add user to subscription group","subscription group ID",!1)||t.length<=0?(r$1.D.error("addToSubscriptionGroup requires a non-empty subscription group ID"),!1):this.si.Tn(t,User.kn.SUBSCRIBED).S}removeFromSubscriptionGroup(t){return !validateStandardString(t,"remove user from subscription group","subscription group ID",!1)||t.length<=0?(r$1.D.error("removeFromSubscriptionGroup requires a non-empty subscription group ID"),!1):this.si.Tn(t,User.kn.UNSUBSCRIBED).S}Gr(t,e,s,r,i){this.v.Gr(t,e,s,r,i),this.si.$n();}Jr(t){this.v.Jr(t);}}User.Cn=/^[0-9 .\\(\\)\\+\\-]+$/,User.Genders={MALE:"m",FEMALE:"f",OTHER:"o",UNKNOWN:"u",NOT_APPLICABLE:"n",PREFER_NOT_TO_SAY:"p"},User.NotificationSubscriptionTypes={OPTED_IN:"opted_in",SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed"},User.kn={SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed"},User._n="user_id",User.lu="custom",User.ee=997;
|
|
77
|
+
|
|
78
|
+
const STORAGE_KEYS={iu:{su:"ab.storage.userId",Go:"ab.storage.deviceId",Dh:"ab.storage.sessionId"},q:{ga:"ab.test",Ta:"ab.storage.events",Aa:"ab.storage.attributes",Oa:"ab.storage.attributes.anonymous_user",Ho:"ab.storage.device",Yo:"ab.storage.sdk_metadata",Zo:"ab.storage.session_id_for_cached_metadata",gn:"ab.storage.pushToken",ei:"ab.storage.newsFeed",hi:"ab.storage.lastNewsFeedRefresh",P:"ab.storage.cardImpressions",nh:"ab.storage.serverConfig",ba:"ab.storage.triggers",Ia:"ab.storage.triggers.ts",Ch:"ab.storage.messagingSessionStart",Yt:"ab.storage.cc",vs:"ab.storage.ccLastFullSync",ys:"ab.storage.ccLastCardUpdated",$:"ab.storage.ccClicks",O:"ab.storage.ccImpressions",K:"ab.storage.ccDismissals",Ka:"ab.storage.lastDisplayedTriggerTimesById",Ya:"ab.storage.lastDisplayedTriggerTime",Da:"ab.storage.triggerFireInstancesById",Jn:"ab.storage.signature",As:"ab.storage.brazeSyncRetryCount",_s:"ab.storage.sdkVersion"},ae:"ab.optOut"};class G{constructor(t,e){this.Ga=t,this.Na=e;}ru(t,e){let s=e;null!=e&&e instanceof _t&&(s=e.ss()),this.Ga.store(t,s);}va(t){const e=this.tu(t);null!=e&&(e._h=(new Date).valueOf(),this.ru(t,e));}tu(t){return _t.yn(this.Ga.lr(t))}qh(t){this.Ga.remove(t);}bo(t){if(null==t||0===t.length)return !1;isArray(t)||(t=[t]);let e=this.Na.lr(STORAGE_KEYS.q.Ta);null!=e&&isArray(e)||(e=[]);for(let s=0;s<t.length;s++)e.push(t[s].ss());return this.Na.store(STORAGE_KEYS.q.Ta,e)}Hh(t){return null!=t&&this.bo([t])}Ca(){let t=this.Na.lr(STORAGE_KEYS.q.Ta);this.Na.remove(STORAGE_KEYS.q.Ta),null==t&&(t=[]);const e=[];let s=!1,o=null;if(isArray(t))for(let s=0;s<t.length;s++)ue.Ma(t[s])?e.push(ue.yn(t[s])):o=s;else s=!0;if(s||null!=o){let n="Stored events could not be deserialized as Events";s&&(n+=", was "+Object.prototype.toString.call(t)+" not an array"),null!=o&&(n+=", value at index "+o+" does not look like an event"),n+=", serialized values were of type "+typeof t+": "+JSON.stringify(t),e.push(new ue(null,r$1.A.qs,(new Date).valueOf(),null,{e:n}));}return e}B(t,e){return !!validateValueIsFromEnum(STORAGE_KEYS.q,t,"StorageManager cannot store object.","STORAGE_KEYS.OBJECTS")&&this.Na.store(t,e)}I(t){return !!validateValueIsFromEnum(STORAGE_KEYS.q,t,"StorageManager cannot retrieve object.","STORAGE_KEYS.OBJECTS")&&this.Na.lr(t)}Xs(t){return !!validateValueIsFromEnum(STORAGE_KEYS.q,t,"StorageManager cannot remove object.","STORAGE_KEYS.OBJECTS")&&(this.Na.remove(t),!0)}clearData(){const t=keys(STORAGE_KEYS.iu),e=keys(STORAGE_KEYS.q);for(let e=0;e<t.length;e++){const s=t[e];this.Ga.remove(STORAGE_KEYS.iu[s]);}for(let t=0;t<e.length;t++){const s=e[t];this.Na.remove(STORAGE_KEYS.q[s]);}}ya(t){return t||STORAGE_KEYS.q.Oa}pa(t){let e=this.Na.lr(STORAGE_KEYS.q.Aa);null==e&&(e={});const s=this.ya(t[User._n]);for(let r in t)r===User._n||null!=e[s]&&null!=e[s][r]||this.mu(t[User._n],r,t[r]);}mu(t,e,s){let r=this.Na.lr(STORAGE_KEYS.q.Aa);null==r&&(r={});const o=this.ya(t);let n=r[o];if(null==n&&(n={},null!=t&&(n[User._n]=t)),e===User.lu){null==n[e]&&(n[e]={});for(let t in s)n[e][t]=s[t];}else n[e]=s;return r[o]=n,this.Na.store(STORAGE_KEYS.q.Aa,r)}Ua(){const t=this.Na.lr(STORAGE_KEYS.q.Aa);this.Na.remove(STORAGE_KEYS.q.Aa);const e=[];for(let s in t)null!=t[s]&&e.push(t[s]);return e}ou(t){const e=this.Na.lr(STORAGE_KEYS.q.Aa);if(null!=e){const s=this.ya(null),r=e[s];null!=r&&(e[s]=void 0,this.Na.store(STORAGE_KEYS.q.Aa,e),r[User._n]=t,this.pa(r));}const s=this.tu(STORAGE_KEYS.iu.Dh);let r=null;null!=s&&(r=s.eu);const o=this.Ca();if(null!=o)for(let e=0;e<o.length;e++){const s=o[e];null==s.userId&&s.sessionId==r&&(s.userId=t),this.Hh(s);}}Ba(){return this.Na.Fa}}G.wa=class{constructor(t){this.Ji=t,this.Fa=et.La()?3:10;}Pa(t){return t+"."+this.Ji}store(t,e){const s={v:e};try{return localStorage.setItem(this.Pa(t),JSON.stringify(s)),!0}catch(t){return r$1.D.info("Storage failure: "+t.message),!1}}lr(t){try{const e=JSON.parse(localStorage.getItem(this.Pa(t)));return null==e?null:e.v}catch(t){return r$1.D.info("Storage retrieval failure: "+t.message),null}}remove(t){try{localStorage.removeItem(this.Pa(t));}catch(t){return r$1.D.info("Storage removal failure: "+t.message),!1}}};G.ne=class{constructor(t,e){this.Ji=t,this.xa=this.Ja(),this.ka=576e3,this.Va=!!e;}Pa(t){return null!=this.Ji?t+"."+this.Ji:t}Ja(){let t=0,e=document.location.hostname;const s=e.split("."),r="ab._gd";for(;t<s.length-1&&-1===document.cookie.indexOf(r+"="+r);)t++,e="."+s.slice(-1-t).join("."),document.cookie=r+"="+r+";domain="+e+";";return document.cookie=r+"=;expires="+new Date(0).toGMTString()+";domain="+e+";",e}ie(){const t=new Date;return t.setTime(t.getTime()+60*this.ka*1e3),t.getFullYear()}za(){const t=values(STORAGE_KEYS.iu),e=document.cookie.split(";");for(let s=0;s<e.length;s++){let r=e[s];for(;" "===r.charAt(0);)r=r.substring(1);let o=!1;for(let e=0;e<t.length;e++)if(0===r.indexOf(t[e])){o=!0;break}if(o){const t=r.split("=")[0];-1===t.indexOf("."+this.Ji)&&this.Qa(t);}}}store(t,e){this.za();const s=new Date;s.setTime(s.getTime()+60*this.ka*1e3);const o="expires="+s.toUTCString(),n="domain="+this.xa;let i;i=this.Va?e:encodeURIComponent(JSON.stringify(e));const a=this.Pa(t)+"="+i+";"+o+";"+n+";path=/";return a.length>=4093?(r$1.D.info("Storage failure: string is "+a.length+" chars which is too large to store as a cookie."),!1):(document.cookie=a,!0)}lr(t){const e=[],s=this.Pa(t)+"=",o=document.cookie.split(";");for(let n=0;n<o.length;n++){let i=o[n];for(;" "===i.charAt(0);)i=i.substring(1);if(0===i.indexOf(s))try{let t;t=this.Va?i.substring(s.length,i.length):JSON.parse(decodeURIComponent(i.substring(s.length,i.length))),e.push(t);}catch(e){return r$1.D.info("Storage retrieval failure: "+e.message),this.remove(t),null}}return e.length>0?e[e.length-1]:null}remove(t){this.Qa(this.Pa(t));}Qa(t){const e=t+"=;expires="+new Date(0).toGMTString();document.cookie=e,document.cookie=e+";path=/";const s=e+";domain="+this.xa;document.cookie=s,document.cookie=s+";path=/";}};G._a=class{constructor(){this.Ha={},this.Wa=5242880,this.Fa=3;}store(t,e){const s={value:e},o=this.Xa(e);return o>this.Wa?(r$1.D.info("Storage failure: object is ≈"+o+" bytes which is greater than the max of "+this.Wa),!1):(this.Ha[t]=s,!0)}Xa(t){const e=[],s=[t];let r=0;for(;s.length;){const t=s.pop();if("boolean"==typeof t)r+=4;else if("string"==typeof t)r+=2*t.length;else if("number"==typeof t)r+=8;else if("object"==typeof t&&-1===e.indexOf(t)){e.push(t);for(let e in t)s.push(t[e]);}}return r}lr(t){const e=this.Ha[t];return null==e?null:e.value}remove(t){this.Ha[t]=null;}};G.Ea=class{constructor(t,e,s){this.Za=[],e&&this.Za.push(new G.ne(t)),s&&this.Za.push(new G.wa(t)),this.Za.push(new G._a(t));}store(t,e){let s=!0;for(let r=0;r<this.Za.length;r++)s=this.Za[r].store(t,e)&&s;return s}lr(t){for(let e=0;e<this.Za.length;e++){const s=this.Za[e].lr(t);if(null!=s)return s}return null}remove(t){for(let e=0;e<this.Za.length;e++)this.Za[e].remove(t);}};
|
|
79
|
+
|
|
80
|
+
class St{constructor(t,i,s){this.h=t,this.xn=i||!1,this.zn=s,this.qn=new u,this.Bn=0,this.Dn=1;}Gn(){return this.xn}Hn(){return this.h.I(STORAGE_KEYS.q.Jn)}setSdkAuthenticationSignature(t){const i=this.Hn();this.h.B(STORAGE_KEYS.q.Jn,t);const s=r$1.xt.Ft;new r$1.qt(s,r$1.D).setItem(s.$t.Kn,this.Dn,t),i!==t&&this.Qs();}Ln(){this.h.Xs(STORAGE_KEYS.q.Jn);const t=r$1.xt.Ft;new r$1.qt(t,r$1.D).br(t.$t.Kn,this.Dn);}subscribeToSdkAuthenticationFailures(t){return this.zn.ut(t)}Mn(t){this.zn.St(t);}On(){this.qn.removeAllSubscriptions();}Pn(){this.Bn+=1;}Qn(){return this.Bn}Qs(){this.Bn=0;}}
|
|
81
|
+
|
|
82
|
+
class y{constructor(){}Rs(){}changeUser(a){}clearData(){}}
|
|
83
|
+
|
|
84
|
+
var DeviceProperties = {BROWSER:"browser",BROWSER_VERSION:"browserVersion",OS:"os",RESOLUTION:"resolution",LANGUAGE:"language",TIME_ZONE:"timeZone",USER_AGENT:"userAgent"};
|
|
85
|
+
|
|
86
|
+
class Ie{constructor(s){this.id=s;}li(){const s={};return null!=this[DeviceProperties.BROWSER]&&(s.browser=this[DeviceProperties.BROWSER]),null!=this[DeviceProperties.BROWSER_VERSION]&&(s.browser_version=this[DeviceProperties.BROWSER_VERSION]),null!=this[DeviceProperties.OS]&&(s.os_version=this[DeviceProperties.OS]),null!=this[DeviceProperties.RESOLUTION]&&(s.resolution=this[DeviceProperties.RESOLUTION]),null!=this[DeviceProperties.LANGUAGE]&&(s.locale=this[DeviceProperties.LANGUAGE]),null!=this[DeviceProperties.TIME_ZONE]&&(s.time_zone=this[DeviceProperties.TIME_ZONE]),null!=this[DeviceProperties.USER_AGENT]&&(s.user_agent=this[DeviceProperties.USER_AGENT]),s}}
|
|
87
|
+
|
|
88
|
+
class It{constructor(e,t){this.h=e,null==t&&(t=values(DeviceProperties)),this.xo=t;}te(){let e=this.h.tu(STORAGE_KEYS.iu.Go);null==e&&(e=new _t(r$1.it.nt()),this.h.ru(STORAGE_KEYS.iu.Go,e));const t=new Ie(e.eu);for(let e=0;e<this.xo.length;e++){const r=this.xo[e];switch(r){case DeviceProperties.BROWSER:t[r]=et.browser;break;case DeviceProperties.BROWSER_VERSION:t[r]=et.version;break;case DeviceProperties.OS:t[r]=this.Fo();break;case DeviceProperties.RESOLUTION:t[r]=screen.width+"x"+screen.height;break;case DeviceProperties.LANGUAGE:t[r]=et.language;break;case DeviceProperties.TIME_ZONE:t[r]=this.Jo(new Date);break;case DeviceProperties.USER_AGENT:t[r]=et.userAgent;}}return t}Fo(){if(et.qo())return et.qo();const e=this.h.I(STORAGE_KEYS.q.Ho);return e&&e.os_version?e.os_version:et.Ko()}Jo(e){if("undefined"!=typeof Intl&&"function"==typeof Intl.DateTimeFormat)try{if("function"==typeof Intl.DateTimeFormat().resolvedOptions){const e=Intl.DateTimeFormat().resolvedOptions().timeZone;if(null!=e&&""!==e)return e}}catch(e){r$1.D.info("Intl.DateTimeFormat threw an error, probably https://bugs.chromium.org/p/chromium/issues/detail?id=811403, falling back to GTM offset: "+e.message);}const t=e.getTimezoneOffset();return this.Qo(t)}Qo(e){const t=parseInt(e/60),r=parseInt(e%60);let s="GMT";return 0!==e&&(s+=e<0?"+":"-",s+=("00"+Math.abs(t)).slice(-2)+":"+("00"+Math.abs(r)).slice(-2)),s}}
|
|
89
|
+
|
|
90
|
+
function logDeprecationWarning(e,a,i){let s=`The '${e}' ${a} is deprecated.`;i&&(s+=` Please use '${i}' instead.`),r$1.D.warn(s);}
|
|
91
|
+
|
|
92
|
+
var qt = {ua:"invalid_api_key",ca:"blacklisted",la:"no_device_identifier",ha:"invalid_json_response",oa:"empty_response",__:"sdk_auth_error"};
|
|
93
|
+
|
|
94
|
+
class wt{constructor(t,e,s,i,r,o,n,a,h,u,c){this.Qi=t,this.h=e,this.Bo=s,this.v=i,this.j=r,this.gt=o,this.Ji=n,this.yo=a,this.Po=h,this.Uo=u,this.Xo=c,this.$o=["npm"];}Ps(t,e){const s=this.Qi.te(),i=s.li(),r=this.h.I(STORAGE_KEYS.q.Ho);isEqual(r,i)||(t.device=i),t.api_key=this.Ji,t.time=convertMsToSeconds((new Date).valueOf(),!0);const n=this.h.I(STORAGE_KEYS.q.Yo)||[],a=this.h.I(STORAGE_KEYS.q.Zo)||"";if(this.$o.length>0&&(!isEqual(n,this.$o)||a!==this.j.Vo())&&(t.sdk_metadata=this.$o),t.sdk_version=this.Po,this.Uo&&(t.sdk_flavor=this.Uo),t.app_version=this.Xo,t.device_id=s.id,e){const e=this.v.getUserId();null!=e&&(t.user_id=e);}return t}Os(t,e,i){const o=e.auth_error,n=e.error;if(!o&&!n)return !0;if(o){let e;this.Bo.Pn();const s={errorCode:o.error_code};for(const t of i)isArray(t)&&"X-Braze-Auth-Signature"===t[0]&&(s.signature=t[1]);t.respond_with&&t.respond_with.user_id?s.userId=t.respond_with.user_id:t.user_id&&(s.userId=t.user_id);const n=o.reason;return n?(s.reason=n,e=`due to ${n}`):e=`with error code ${o.error_code}.`,this.Bo.Gn()||(e+=' Please use the "enableSdkAuthentication" initialization option to enable authentication.'),r$1.D.error(`SDK Authentication failed ${e}`),this.sa(t.events,t.attributes),this.Bo.Mn(s),!1}if(n){let i=n;switch(i){case qt.oa:const o="Received successful response with empty body.";return s$1.G(r$1.A.qs,{e:o}),r$1.D.info(o),!1;case qt.ha:const n="Received successful response with invalid JSON";return s$1.G(r$1.A.qs,{e:n+": "+e.response}),r$1.D.info(n),!1;case qt.ua:i=`The API key "${t.api_key}" is invalid for the baseUrl ${this.yo}`;break;case qt.ca:i="Sorry, we are not currently accepting your requests. If you think this is in error, please contact us.";break;case qt.la:i="No device identifier. Please contact support@braze.com";}r$1.D.error("Backend error: "+i);}return !1}fa(t,e,s,i){return !!(t&&0!==t.length||e&&0!==e.length||s||i)}ma(t,e,s,i){const r=[],o=t=>t||"",n=o(this.v.getUserId());let a,h,u,c,l=this.ni(t,e);if(s.length>0){const t=[];for(const e of s){if(a=e.li(),this.Bo.Gn()){if(n&&!a.user_id){c||(c={},c.events=[]),c.events.push(a);continue}if(o(a.user_id)!==n){h||(h=[]),h.push(a);continue}}t.push(a);}t.length>0&&(l.events=t);}if(i.length>0){const t=[];for(const e of i)this.Bo.Gn()&&o(e.user_id)!==n?(u||(u=[]),u.push(e)):t.push(e);t.length>0&&(l.attributes=t);}if(this.sa(h,u),l=this.Ps(l,!0),c){c=this.Ps(c,!1);const t={requestData:c,headers:this.Bs(c)};r.push(t);}if(l&&!this.fa(l.events,l.attributes,t,e))return c?r:null;const f={requestData:l,headers:this.Bs(l)};return r.push(f),r}sa(t,e){if(t){const e=[];for(const s of t){const t=ue.fromJson(s);t.time=convertSecondsToMs(t.time),e.push(t);}this.h.bo(e);}if(e)for(const t of e)this.h.pa(t);}Vs(t,e){let s="HTTP error ";null!=t&&(s+=t+" "),s+=e,r$1.D.error(s);}yr(t){return s$1.G(r$1.A.Ra,{n:t})}ni(t,e,s){const i={};t&&(i.feed=!0),e&&(i.triggers=!0);const r=null!=s?s:this.v.getUserId();return r&&(i.user_id=r),i.config={config_time:this.gt.Zs()},{respond_with:i}}Bs(t,e,s){const i=[["X-Braze-Api-Key",this.Ji]];let r=!1;if(null!=t.respond_with&&t.respond_with.triggers&&(i.push(["X-Braze-TriggersRequest","true"]),r=!0),null!=t.respond_with&&t.respond_with.feed&&(i.push(["X-Braze-FeedRequest","true"]),r=!0),e){i.push(["X-Braze-ContentCardsRequest","true"]);let t=this.h.I(STORAGE_KEYS.q.As);t&&s||(t=0,this.h.B(STORAGE_KEYS.q.As,t)),i.push(["BRAZE-SYNC-RETRY-COUNT",t.toString()]),r=!0;}if(r&&i.push(["X-Braze-DataRequest","true"]),this.Bo.Gn()){const t=this.Bo.Hn();null!=t&&i.push(["X-Braze-Auth-Signature",t]);}return i}Gs(t,e){const s=t.device;s&&s.os_version instanceof Promise?s.os_version.then((s=>{t.device.os_version=s,e();})):e();}Qs(){this.Bo.Qs();}Ks(){return this.yo}addSdkMetadata(t){for(const e of t)-1===this.$o.indexOf(e)&&this.$o.push(e);}}
|
|
95
|
+
|
|
96
|
+
const b={Hs:t=>{let e,o;try{const n=()=>{r$1.D.error("This browser does not have any supported ajax options!");};if(window.XMLHttpRequest?(e=new XMLHttpRequest,e||n()):n(),null!=e){const r=()=>{"function"==typeof t.error&&t.error(e.status),"function"==typeof t.fl&&t.fl(!1);};e.onload=()=>{let o=!1;if(4===e.readyState)if(o=e.status>=200&&e.status<300||304===e.status,o){if("function"==typeof t.S){let o,r;try{o=JSON.parse(e.responseText),r=e.getAllResponseHeaders();}catch(o){const n={error:""===e.responseText?qt.oa:qt.ha,response:e.responseText};t.S(n,r);}o&&t.S(o,r);}"function"==typeof t.fl&&t.fl(!0);}else r();},e.onerror=()=>{r();},e.ontimeout=()=>{r();},o=JSON.stringify(t.data),e.open("POST",t.url,!0),e.setRequestHeader("Content-type","application/json"),e.setRequestHeader("X-Requested-With","XMLHttpRequest");const n=t.headers||[];for(const t of n)e.setRequestHeader(t[0],t[1]);e.send(o);}}catch(t){r$1.D.error(`Network request error: ${t.message}`);}}};const readResponseHeaders=t=>{let e={};const o=t.toString().split("\r\n");if(!o)return e;let r,n;for(const t of o)t&&(r=t.slice(0,t.indexOf(":")).toLowerCase().trim(),n=t.slice(t.indexOf(":")+1).trim(),e[r]=n);return e};
|
|
97
|
+
|
|
98
|
+
const randomInclusive=(t,a)=>(t=Math.ceil(t),a=Math.floor(a),Math.floor(Math.random()*(a-t+1))+t);
|
|
99
|
+
|
|
100
|
+
class t{constructor(t,s){this.S=!!t,this.ve=s||[];}V(t){this.S=this.S&&t.S,this.ve.push(...t.ve);}}
|
|
101
|
+
|
|
102
|
+
const ht={Ir:()=>"serviceWorker"in navigator&&"undefined"!=typeof ServiceWorkerRegistration&&"showNotification"in ServiceWorkerRegistration.prototype&&"PushManager"in window,Cr:()=>"safari"in window&&"pushNotification"in window.safari&&"function"==typeof window.safari.pushNotification.permission&&"function"==typeof window.safari.pushNotification.requestPermission,isPushSupported:()=>ht.Ir()||ht.Cr(),isPushBlocked:()=>{const i=ht.isPushSupported()&&"Notification"in window&&null!=window.Notification&&null!=window.Notification.permission&&"denied"===window.Notification.permission,n=ht.isPushSupported()&&(!("Notification"in window)||null==window.Notification);return i||n},isPushPermissionGranted:()=>ht.isPushSupported()&&"Notification"in window&&null!=window.Notification&&null!=window.Notification.permission&&"granted"===window.Notification.permission,Xe:()=>!ht.isPushBlocked()&&ht.isPushSupported()&&!ht.isPushPermissionGranted()};var ht$1 = ht;
|
|
103
|
+
|
|
104
|
+
class Ot{constructor(t,s,i,e,n,l,h,o,r,a){this.Ji=t,this.yo=s,this.sl=0,this.il=h.Ba(),this.hl=null,this.j=i,this.Qi=e,this.v=n,this.gt=l,this.h=h,this.Bo=r,this.vt=a,this.ol=o,this.rl=new u,this.ul=50;}al(t,s){return !t&&!s&&this.Bo.Qn()>=this.ul}cl(t){let s=this.j.Eh();if(t.length>0){const i=this.v.getUserId();for(const e of t){const t=!e.userId&&!i||e.userId===i;e.type===r$1.A.Wh&&t&&(s=!0);}}return s}ml(t,s,i,e,n,l,h){null==i&&(i=!0),i&&this.dl();const u=this.h.Ca(),a=this.h.Ua();let c=!1;const m=(t,s)=>{let h=!1;b.Hs({url:this.yo+"/data/",data:t,headers:s,S:i=>{null!=t.respond_with&&t.respond_with.triggers&&(this.sl=Math.max(this.sl-1,0)),this.vt.Os(t,i,s)?(this.Bo.Qs(),this.gt.lh(i),null!=t.respond_with&&t.respond_with.user_id!=this.v.getUserId()||(null!=t.device&&this.h.B(STORAGE_KEYS.q.Ho,t.device),null!=t.sdk_metadata&&(this.h.B(STORAGE_KEYS.q.Yo,t.sdk_metadata),this.h.B(STORAGE_KEYS.q.Zo,this.j.Vo())),this.ol(i),"function"==typeof e&&e())):i.auth_error&&(h=!0);},error:()=>{null!=t.respond_with&&t.respond_with.triggers&&(this.sl=Math.max(this.sl-1,0)),this.vt.sa(t.events,t.attributes),"function"==typeof n&&n();},fl:t=>{if("function"==typeof l&&l(t),i&&!c){if(t&&!h)this.gl();else {let t=this.hl;(null==t||t<1e3*this.il)&&(t=1e3*this.il),this.gl(Math.min(3e5,randomInclusive(1e3*this.il,3*t)));}c=!0;}}});},d=this.cl(u),f=s||d;if(this.al(h,d))return void r$1.D.info("Declining to flush data due to 50 consecutive authentication failures");if(i&&!this.vt.fa(u,a,t,f))return this.gl(),void("function"==typeof l&&l(!0));const g=this.vt.ma(t,f,u,a);f&&this.sl++;let p=!1;if(g)for(const t of g)this.vt.Gs(t.requestData,(()=>m(t.requestData,t.headers))),p=!0;this.Bo.Gn()&&i&&!p?this.gl():d&&(r$1.D.info("Invoking new session subscriptions"),this.rl.St());}bl(){return this.sl>0}gl(t){this.kl||(null==t&&(t=1e3*this.il),this.dl(),this.wl=setTimeout((()=>{if(document.hidden){const t="visibilitychange",s=()=>{document.hidden||(document.removeEventListener(t,s,!1),this.ml());};document.addEventListener(t,s,!1);}else this.ml();}),t),this.hl=t);}dl(){null!=this.wl&&(clearTimeout(this.wl),this.wl=null);}initialize(){this.kl=!1,this.gl();}destroy(){this.rl.removeAllSubscriptions(),this.Bo.On(),this.dl(),this.kl=!0,this.ml(null,null,!1),this.wl=null;}cr(t){return this.rl.ut(t)}openSession(){const t=this.j.Vo()!==this.j.mo();t&&(this.h.va(STORAGE_KEYS.iu.Go),this.h.va(STORAGE_KEYS.iu.su)),this.ml(null,!1,null,null,null),this.$n(),t&&Promise.resolve().then(function () { return pushManagerFactory; }).then((t=>{if(this.kl)return;const s=t.default.aa();if(null!=s&&(ht$1.isPushPermissionGranted()||ht$1.isPushBlocked())){const t=()=>{s.Er()?r$1.D.info("Push token maintenance is disabled, not refreshing token for backend."):s.subscribe();},i=(s,i)=>{i&&t();},e=()=>{const s=this.h.I(STORAGE_KEYS.q.gn);(null==s||s)&&t();},n=r$1.xt.Ft;new r$1.qt(n,r$1.D).hr(n.$t.pu,i,e);}}));}changeUser(t,s,i){const e=this.v.getUserId();if(e!==t){this.j.kh(),null!=e&&this.ml(null,!1,null,null,null),this.v.uu(t),i?this.Bo.setSdkAuthenticationSignature(i):this.Bo.Ln();for(let t=0;t<s.length;t++)s[t].changeUser(null==e);null!=e&&this.h.Xs(STORAGE_KEYS.q.P),this.h.Xs(STORAGE_KEYS.q.Ho),this.openSession(),r$1.D.info('Changed user to "'+t+'".');}else {let s="Doing nothing.";i&&this.Bo.Hn()!==i&&(this.Bo.setSdkAuthenticationSignature(i),s="Updated SDK authentication signature"),r$1.D.info(`Current user is already ${t}. ${s}`);}}requestImmediateDataFlush(t){this.dl(),this.j.mo(),this.ml(null,null,null,null,null,t,!0);}requestFeedRefresh(){this.j.mo(),this.ml(!0);}zr(t,s){this.j.mo(),r$1.D.info("Requesting explicit trigger refresh."),this.ml(null,!0,null,t,s);}Nn(t,i){const e=r$1.A.yl,n={a:t,l:i},l=s$1.G(e,n);return l&&r$1.D.info(`Logged alias ${t} with label ${i}`),l}In(i,e,n){if(this.gt.hu(e))return r$1.D.info(`Custom Attribute "${e}" is blocklisted, ignoring.`),new t;const l={key:e,value:n},h=s$1.G(i,l);return h&&r$1.D.info(`Logged custom attribute: ${e} with value: ${n}`),h}setLastKnownLocation(t,i,e,n,l,h){const o={latitude:i,longitude:e};null!=n&&(o.altitude=n),null!=l&&(o.ll_accuracy=l),null!=h&&(o.alt_accuracy=h);const u=s$1.G(r$1.A.vl,o,t);return u&&r$1.D.info(`Set user last known location as ${JSON.stringify(o,null,2)}`),u}kr(t,s){const i=this.j.mo();return new ue(this.v.getUserId(),r$1.A.Sl,t,i,{cid:s})}$n(){const t=r$1.xt.Ft;new r$1.qt(t,r$1.D).setItem(t.$t.jl,1,{baseUrl:this.yo,data:{api_key:this.Ji,device_id:this.Qi.te().id},userId:this.v.getUserId(),sdkAuthEnabled:this.Bo.Gn()});}wr(t){for(const s of t)if(s.api_key===this.Ji)this.vt.sa(s.events,s.attributes);else {const t=r$1.xt.Ft;new r$1.qt(t,r$1.D).setItem(t.$t.$r,r$1.it.nt(),s);}}Fn(i,e,n){if(this.gt.hu(i))return r$1.D.info(`Custom Attribute "${i}" is blocklisted, ignoring.`),new t;let l,h;return null===e&&null===n?(l=r$1.A.$l,h={key:i}):(l=r$1.A.Al,h={key:i,latitude:e,longitude:n}),s$1.G(l,h)}Tn(t,i){const e={group_id:t,status:i};return s$1.G(r$1.A.Cl,e)}}
|
|
105
|
+
|
|
106
|
+
class jt{constructor(t,s,i,h,l,e,r){this.hh=t||0,this.gh=s||[],this.mh=i||[],this.fh=h||[],this.ph=l,null!=l&&""!==l||(this.ph=null),this.oh=e||null,this.uh=r||{};}ss(){return {s:"4.2.1",l:this.hh,e:this.gh,a:this.mh,p:this.fh,m:this.ph,v:this.oh,c:this.uh}}static yn(t){let s=t.l;return "4.2.1"!==t.s&&(s=0),new jt(s,t.e,t.a,t.p,t.m,t.v,t.c)}}
|
|
107
|
+
|
|
108
|
+
class Ct{constructor(t){this.h=t,this.sh=new u,this.eh=new u,this.ih=null;}rh(){if(null==this.ih){const t=this.h.I(STORAGE_KEYS.q.nh);this.ih=null!=t?jt.yn(t):new jt;}return this.ih}Zs(){return this.rh().hh}lh(t){if(null!=t&&null!=t.config){const s=t.config;if(s.time>this.rh().hh){const t=new jt(s.time,s.events_blacklist,s.attributes_blacklist,s.purchases_blacklist,s.messaging_session_timeout,s.vapid_public_key,s.content_cards);let e=!1;null!=t.oh&&this.fn()!==t.oh&&(e=!0);let i=!1;null!=t.uh.enabled&&this.Ys()!==t.uh.enabled&&(i=!0),this.ih=t,this.h.B(STORAGE_KEYS.q.nh,t.ss()),e&&this.sh.St(),i&&this.eh.St();}}}dn(t){let s=this.sh.ut(t);return this.ah&&this.sh.removeSubscription(this.ah),this.ah=s,s}Ms(t){return this.eh.ut(t)}ge(t){return -1!==this.rh().gh.indexOf(t)}hu(t){return -1!==this.rh().mh.indexOf(t)}Dr(t){return -1!==this.rh().fh.indexOf(t)}dh(){return this.rh().ph}fn(){return this.rh().oh}Ys(){return this.rh().uh.enabled||!1}}
|
|
109
|
+
|
|
110
|
+
class Lt{constructor(s,t,e,i){this.h=s,this.v=t,this.gt=e,this.wh=1e3,i=parseFloat(i),isNaN(i)&&(i=1800),i<this.wh/1e3&&(r$1.D.info("Specified session timeout of "+i+"s is too small, using the minimum session timeout of "+this.wh/1e3+"s instead."),i=this.wh/1e3),this.Sh=i;}jh(s,t){return new ue(this.v.getUserId(),r$1.A.bh,s,t.eu,{d:convertMsToSeconds(s-t.xh)})}Vo(){const s=this.h.tu(STORAGE_KEYS.iu.Dh);return null==s?null:s.eu}Eh(){const s=(new Date).valueOf(),t=this.gt.dh(),e=this.h.I(STORAGE_KEYS.q.Ch);if(null!=e&&null==t)return !1;const i=null==e||s-e>1e3*t;return i&&this.h.B(STORAGE_KEYS.q.Ch,s),i}Gh(s,t){return null==t||!(s-t.xh<this.wh)&&t.Nh<s}mo(){const s=(new Date).valueOf(),t=s+1e3*this.Sh,e=this.h.tu(STORAGE_KEYS.iu.Dh);if(this.Gh(s,e)){let i="Generating session start event with time "+s;if(null!=e){let s=e._h;s-e.xh<this.wh&&(s=e.xh+this.Fh),this.h.Hh(this.jh(s,e)),i+=" (old session ended "+s+")";}i+=". Will expire "+t.valueOf(),r$1.D.info(i);const n=new _t(r$1.it.nt(),t);this.h.Hh(new ue(this.v.getUserId(),r$1.A.Wh,s,n.eu)),this.h.ru(STORAGE_KEYS.iu.Dh,n);return null==this.h.I(STORAGE_KEYS.q.Ch)&&this.h.B(STORAGE_KEYS.q.Ch,s),n.eu}return e._h=s,e.Nh=t,this.h.ru(STORAGE_KEYS.iu.Dh,e),e.eu}kh(){const s=this.h.tu(STORAGE_KEYS.iu.Dh);null!=s&&(this.h.qh(STORAGE_KEYS.iu.Dh),this.h.Hh(this.jh((new Date).valueOf(),s)));}}
|
|
111
|
+
|
|
112
|
+
const Pt={jo:(e,t)=>{let a=!1;try{if(localStorage&&localStorage.getItem)try{localStorage.setItem(STORAGE_KEYS.q.ga,!0),localStorage.getItem(STORAGE_KEYS.q.ga)&&(localStorage.removeItem(STORAGE_KEYS.q.ga),a=!0);}catch(e){if("QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||!(localStorage.length>0))throw e;a=!0;}}catch(e){r$1.D.info("Local Storage not supported!");}const l=Pt.Sa(),c=new G.Ea(e,l&&!t,a);let n=null;return n=a?new G.wa(e):new G._a,new G(c,n)},Sa:()=>navigator.cookieEnabled||"cookie"in document&&(document.cookie.length>0||(document.cookie="test").indexOf.call(document.cookie,"test")>-1)};
|
|
113
|
+
|
|
114
|
+
class ControlMessage{constructor(t){this.triggerId=t;}static fromJson(t){return new ControlMessage(t.trigger_id)}}
|
|
115
|
+
|
|
116
|
+
function _isInView(t,n,e,s){if(null==t)return !1;n=n||!1,e=e||!1;const i=t.getBoundingClientRect();return null!=i&&((i.top>=0&&i.top<=(window.innerHeight||document.documentElement.clientHeight)||!n)&&(i.left>=0||!s)&&(i.bottom>=0&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)||!e)&&(i.right<=(window.innerWidth||document.documentElement.clientWidth)||!s))}const DOMUtils={cu:null,eo:_isInView};const DIRECTIONS={Te:"up",$e:"down",ot:"left",et:"right"};function supportsPassive(){if(null==DOMUtils.cu){DOMUtils.cu=!1;try{const t=Object.defineProperty({},"passive",{get:()=>{DOMUtils.cu=!0;}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t);}catch(t){}}return DOMUtils.cu}function addPassiveEventListener(t,n,e){t.addEventListener(n,e,!!supportsPassive()&&{passive:!0});}function topIsInView(t){return DOMUtils.eo(t,!0,!1,!1)}function bottomIsInView(t){return DOMUtils.eo(t,!1,!0,!1)}function clickElement(t){if(t.onclick){const n=document.createEvent("MouseEvents");n.initEvent("click",!0,!0),t.onclick.apply(t,[n]);}}function detectSwipe(t,n,e){let s=null,i=null;addPassiveEventListener(t,"touchstart",(t=>{s=t.touches[0].clientX,i=t.touches[0].clientY;})),addPassiveEventListener(t,"touchmove",(o=>{if(null==s||null==i)return;const l=s-o.touches[0].clientX,u=i-o.touches[0].clientY;Math.abs(l)>Math.abs(u)&&Math.abs(l)>=25?((l>0&&n===DIRECTIONS.ot||l<0&&n===DIRECTIONS.et)&&e(o),s=null,i=null):Math.abs(u)>=25&&((u>0&&n===DIRECTIONS.Te&&t.scrollTop===t.scrollHeight-t.offsetHeight||u<0&&n===DIRECTIONS.$e&&0===t.scrollTop)&&e(o),s=null,i=null);}));}function buildSvg(t,n,e){const s="http://www.w3.org/2000/svg",i=document.createElementNS(s,"svg");i.setAttribute("viewBox",t),i.setAttribute("xmlns",s);const o=document.createElementNS(s,"path");return o.setAttribute("d",n),null!=e&&o.setAttribute("fill",e),i.appendChild(o),i}
|
|
117
|
+
|
|
118
|
+
const KeyCodes={fo:32,oo:9,co:13,Ci:27};
|
|
119
|
+
|
|
120
|
+
class InAppMessage{constructor(t,s,i,e,h,n,r,o,l,E,T,a,m,c,I,A,N,_,L,d,O,S,D,M,R,b,P,C,U){this.message=t,this.messageAlignment=s||InAppMessage.TextAlignment.CENTER,this.duration=E||5e3,this.slideFrom=i||InAppMessage.SlideFrom.BOTTOM,this.extras=e||{},this.triggerId=h,this.clickAction=n||InAppMessage.ClickAction.NONE,this.uri=r,this.openTarget=o||InAppMessage.OpenTarget.NONE,this.dismissType=l||InAppMessage.DismissType.AUTO_DISMISS,this.icon=T,this.imageUrl=a,this.imageStyle=m||InAppMessage.ImageStyle.TOP,this.iconColor=c||InAppMessage.ji.ki,this.iconBackgroundColor=I||InAppMessage.ji.bi,this.backgroundColor=A||InAppMessage.ji.ki,this.textColor=N||InAppMessage.ji.Ei,this.closeButtonColor=_||InAppMessage.ji.Ti,this.animateIn=L,null==this.animateIn&&(this.animateIn=!0),this.animateOut=d,null==this.animateOut&&(this.animateOut=!0),this.header=O,this.headerAlignment=S||InAppMessage.TextAlignment.CENTER,this.headerTextColor=D||InAppMessage.ji.Ei,this.frameColor=M||InAppMessage.ji.Ii,this.buttons=R||[],this.cropType=b||InAppMessage.CropType.FIT_CENTER,this.orientation=P,this.htmlId=C,this.css=U,this.Ai=!1,this.nl=!1,this.Ni=!1,this.lt=new u,this._i=new u;}subscribeToClickedEvent(t){return this.lt.ut(t)}subscribeToDismissedEvent(t){return this._i.ut(t)}removeSubscription(t){this.lt.removeSubscription(t),this._i.removeSubscription(t);}removeAllSubscriptions(){this.lt.removeAllSubscriptions(),this._i.removeAllSubscriptions();}closeMessage(){this.on(this.mn);}we(){return !0}ll(){return this.we()}an(){return null!=this.htmlId&&this.htmlId.length>4}sn(){return this.an()&&null!=this.css&&this.css.length>0}rn(){if(this.an()&&this.sn())return this.htmlId+"-css"}R(){return !this.Ai&&(this.Ai=!0,!0)}k(){return !this.nl&&(this.nl=!0,this.lt.St(),!0)}J(){return !this.Ni&&(this.Ni=!0,this._i.St(),!0)}Li(t){if(t&&t.parentNode){let s=t.closest(".ab-iam-root");if(null==s&&(s=t),this.we()&&null!=s.parentNode){const t=s.parentNode.classList;t&&t.contains(InAppMessage.Oi)&&t.remove(InAppMessage.Oi),document.body.removeEventListener("touchmove",InAppMessage.Si);}s.className=s.className.replace(InAppMessage.Di,InAppMessage._);}return this.animateOut}on(t,s){if(null==t)return;let i;this.mn=null,i=-1===t.className.indexOf("ab-in-app-message")?t.getElementsByClassName("ab-in-app-message")[0]:t;let e=!1;i&&(e=this.Li(i));const h=document.body;if(null!=h)var n=h.scrollTop;const r=()=>{if(t&&t.parentNode){let s=t.closest(".ab-iam-root");null==s&&(s=t),s.parentNode&&s.parentNode.removeChild(s);}if(null!=this.rn()){const t=document.getElementById(this.rn());t&&t.parentNode&&t.parentNode.removeChild(t);}null!=h&&"Safari"===et.browser&&(h.scrollTop=n),s?s():this.J();};e?setTimeout(r,InAppMessage.Mi):r(),this.he&&this.he.focus();}Me(){return document.createTextNode(this.message)}xe(t){let s="";this.message||this.header||!this.we()||(s="Modal Image"),t.setAttribute("alt",s);}static Si(t){t.targetTouches&&t.targetTouches.length>1||t.target.classList&&t.target.classList.contains("ab-message-text")&&t.target.scrollHeight>t.target.clientHeight||document.querySelector(`.${InAppMessage.Oi}`)&&t.preventDefault();}Ri(t){this.we()&&null!=t.parentNode&&this.orientation!==InAppMessage.Orientation.LANDSCAPE&&(null!=t.parentNode.classList&&t.parentNode.classList.add(InAppMessage.Oi),document.body.addEventListener("touchmove",InAppMessage.Si,!!supportsPassive()&&{passive:!1})),t.className+=" "+InAppMessage.Di;}static Pi(t){if(t.keyCode===KeyCodes.Ci&&!e.nn(T.Ui)&&document.querySelectorAll(".ab-modal-interactions").length>0){const t=document.getElementsByClassName("ab-html-message");let s=!1;for(let i=0;i<t.length;i++){const e=t[i].contentWindow.document.getElementsByClassName("ab-programmatic-close-button")[0];null!=e&&(clickElement(e),s=!0);}if(!s){const t=document.querySelectorAll(".ab-modal-interactions > .ab-close-button")[0];null!=t&&clickElement(t);}}}Hi(){this.Fi||e.nn(T.Ui)||(document.addEventListener("keydown",InAppMessage.Pi,!1),e.Bi((()=>{document.removeEventListener("keydown",InAppMessage.Pi);})),this.Fi=!0);}}InAppMessage.ji={Ei:4281545523,ki:4294967295,bi:4278219733,Gi:4293914607,Wi:4283782485,Ii:3224580915,Ti:4288387995},InAppMessage.Oe={wi:"hd",yi:"ias",xi:"of",Ki:"do",ci:"umt",ui:"tf",Yi:"te"},InAppMessage.SlideFrom={TOP:"TOP",BOTTOM:"BOTTOM"},InAppMessage.ClickAction={NEWS_FEED:"NEWS_FEED",URI:"URI",NONE:"NONE"},InAppMessage.DismissType={AUTO_DISMISS:"AUTO_DISMISS",MANUAL:"SWIPE"},InAppMessage.OpenTarget={NONE:"NONE",BLANK:"BLANK"},InAppMessage.ImageStyle={TOP:"TOP",GRAPHIC:"GRAPHIC"},InAppMessage.Orientation={PORTRAIT:"PORTRAIT",LANDSCAPE:"LANDSCAPE"},InAppMessage.TextAlignment={START:"START",CENTER:"CENTER",END:"END"},InAppMessage.CropType={CENTER_CROP:"CENTER_CROP",FIT_CENTER:"FIT_CENTER"},InAppMessage.es={Xi:"SLIDEUP",zi:"MODAL",ye:"MODAL_STYLED",Tr:"FULL",el:"WEB_HTML",cn:"HTML"},InAppMessage.Mi=500,InAppMessage.Vi=200,InAppMessage.Di="ab-show",InAppMessage.$i="ab-hide",InAppMessage.Oi="ab-pause-scrolling";
|
|
121
|
+
|
|
122
|
+
class HtmlMessage extends InAppMessage{constructor(l,e,n,u,s,a,t,i,r,o,m){u=u||InAppMessage.DismissType.MANUAL,null!=l&&l.length>0&&l.indexOf('"ab-in-app-message ab-html-message ab-email-capture"')>0&&l.indexOf('"ab-in-app-message ab-show ab-modal ab-effect-modal"')>0&&(a=!0,t=!0),super(l,null,null,e,n,null,null,null,u,s,null,null,null,null,null,null,null,null,a,t,null,null,null,i,void 0,void 0,void 0,r,o),this.messageFields=m;}ll(){return !1}k(l){if(this.un===InAppMessage.es.el){if(this.nl)return !1;this.nl=!0;}return this.lt.St(l),!0}}HtmlMessage.es=InAppMessage.es.el;
|
|
123
|
+
|
|
124
|
+
class InAppMessageButton{constructor(s,t,i,r,e,h,n){this.text=s||"",this.backgroundColor=t||InAppMessage.ji.bi,this.textColor=i||InAppMessage.ji.ki,this.borderColor=r||this.backgroundColor,this.clickAction=e||InAppMessage.ClickAction.NONE,this.uri=h,null==n&&(n=InAppMessageButton.Ue),this.id=n,this.nl=!1,this.lt=new u;}subscribeToClickedEvent(s){return this.lt.ut(s)}removeSubscription(s){this.lt.removeSubscription(s);}removeAllSubscriptions(){this.lt.removeAllSubscriptions();}k(){return !this.nl&&(this.nl=!0,this.lt.St(),!0)}static fromJson(s){return new InAppMessageButton(s.text,s.bg_color,s.text_color,s.border_color,s.click_action,s.uri,s.id)}}InAppMessageButton.Ue=-1;
|
|
125
|
+
|
|
126
|
+
class FullScreenMessage extends InAppMessage{constructor(e,t,r,s,n,l,u,a,o,p,m,c,d,f,g,i,x,j,A,T,b,h,k,q,v,w,y,z){a=a||InAppMessage.DismissType.MANUAL,w=w||InAppMessage.Orientation.PORTRAIT,super(e,t,null,r,s,n,l,u,a,o,p,m,c,d,f,g,i,x,j,A,T,b,h,k,q,v=v||InAppMessage.CropType.CENTER_CROP,w,y,z);}get ke(){return InAppMessage.TextAlignment.CENTER}}FullScreenMessage.es=InAppMessage.es.Tr;
|
|
127
|
+
|
|
128
|
+
class ModalMessage extends InAppMessage{constructor(e,t,r,s,n,l,o,u,a,p,d,i,m,c,f,g,x,j,v,A,T,b,h,k,q,w,y){super(e,t,null,r,s,n,l,o,u=u||InAppMessage.DismissType.MANUAL,a,p,d,i,m,c,f,g,x,j,v,A,T,b,h,k,q=q||InAppMessage.CropType.FIT_CENTER,void 0,w,y);}get ke(){return InAppMessage.TextAlignment.CENTER}}ModalMessage.es=InAppMessage.es.zi;
|
|
129
|
+
|
|
130
|
+
class SlideUpMessage extends InAppMessage{constructor(t,e,o,s,n,i,r,d,u,a,p,l,m,c,v,x,g,f,h,I,M){x=x||InAppMessage.ji.Wi,v=v||InAppMessage.ji.Gi,super(t,e=e||InAppMessage.TextAlignment.START,o,s,n,i,r,d,u,a,p,l,null,m,c,v,x,g,f,h,void 0,void 0,void 0,void 0,void 0,void 0,void 0,I,M);}we(){return !1}get ke(){return InAppMessage.TextAlignment.START}Me(){const t=document.createElement("span");return t.appendChild(document.createTextNode(this.message)),t}Ri(t){const e=t.getElementsByClassName("ab-in-app-message")[0];DOMUtils.eo(e,!0,!0)||(this.slideFrom===InAppMessage.SlideFrom.TOP?e.style.top="0px":e.style.bottom="0px"),super.Ri(t);}}SlideUpMessage.es=InAppMessage.es.Xi;
|
|
131
|
+
|
|
132
|
+
function newInAppMessageFromJson(e){if(e.is_control)return ControlMessage.fromJson(e);let s=e.type;null!=s&&(s=s.toUpperCase());const o=e.message,m=e.text_align_message,l=e.slide_from,n=e.extras,t=e.trigger_id,i=e.click_action,p=e.uri,f=e.open_target,a=e.message_close,d=e.duration,u=e.icon,g=e.image_url,j=e.image_style,w=e.icon_color,c=e.icon_bg_color,b=e.bg_color,h=e.text_color,v=e.close_btn_color,I=e.header,k=e.text_align_header,x=e.header_text_color,y=e.frame_color,z=[];let A=e.btns;null==A&&(A=[]);for(let e=0;e<A.length;e++)z.push(InAppMessageButton.fromJson(A[e]));const F=e.crop_type,J=e.orientation,M=e.animate_in,q=e.animate_out;let B,C=e.html_id,D=e.css;if(null!=C&&""!==C&&null!=D&&""!==D||(C=void 0,D=void 0),s===ModalMessage.es||s===InAppMessage.es.ye)B=new ModalMessage(o,m,n,t,i,p,f,a,d,u,g,j,w,c,b,h,v,M,q,I,k,x,y,z,F,C,D);else if(s===FullScreenMessage.es)B=new FullScreenMessage(o,m,n,t,i,p,f,a,d,u,g,j,w,c,b,h,v,M,q,I,k,x,y,z,F,J,C,D);else if(s===SlideUpMessage.es)B=new SlideUpMessage(o,m,l,n,t,i,p,f,a,d,u,g,w,c,b,h,v,M,q,C,D);else {if(s!==HtmlMessage.es&&s!==InAppMessage.es.cn)return void r$1.D.error("Ignoring message with unknown type "+s);{const s=e.message_fields;B=new HtmlMessage(o,n,t,a,d,M,q,y,C,D,s),B.trusted=e.trusted||!1;}}return B.un=s,B}
|
|
133
|
+
|
|
134
|
+
class xt{constructor(t){this.xl=t;}zl(t){return null==this.xl||this.xl===t[0]}static fromJson(t){return new xt(t?t.event_name:null)}ss(){return this.xl}}
|
|
135
|
+
|
|
136
|
+
class kt{constructor(t,s,e,i){this.El=t,this.Tl=s,this.comparator=e,this._l=i,this.Tl===kt.Ml.Nl&&this.comparator!==kt.Hl.Rl&&this.comparator!==kt.Hl.Ll&&this.comparator!==kt.Hl.Il&&this.comparator!==kt.Hl.Ol&&(this._l=dateFromUnixTimestamp(this._l));}zl(t){let s=null;switch(null!=t&&(s=t[this.El]),this.comparator){case kt.Hl.Ul:return null!=s&&s.valueOf()===this._l.valueOf();case kt.Hl.Dl:return null==s||s.valueOf()!==this._l.valueOf();case kt.Hl.Ql:return typeof s==typeof this._l&&s>this._l;case kt.Hl.Rl:return this.Tl===kt.Ml.Nl?null!=s&&isDate(s)&&secondsAgo(s)<=this._l:typeof s==typeof this._l&&s>=this._l;case kt.Hl.Xl:return typeof s==typeof this._l&&s<this._l;case kt.Hl.Ll:return this.Tl===kt.Ml.Nl?null!=s&&isDate(s)&&secondsAgo(s)>=this._l:typeof s==typeof this._l&&s<=this._l;case kt.Hl.Gl:return null!=s&&"string"==typeof s&&typeof s==typeof this._l&&null!=s.match(this._l);case kt.Hl.Fl:return null!=s;case kt.Hl.Jl:return null==s;case kt.Hl.Il:return null!=s&&isDate(s)&&secondsInTheFuture(s)<this._l;case kt.Hl.Ol:return null!=s&&isDate(s)&&secondsInTheFuture(s)>this._l;case kt.Hl.Vl:return null==s||typeof s!=typeof this._l||"string"!=typeof s||null==s.match(this._l)}return !1}static fromJson(t){return new kt(t.property_key,t.property_type,t.comparator,t.property_value)}ss(){let t=this._l;return isDate(this._l)&&(t=convertMsToSeconds(t.valueOf())),{k:this.El,t:this.Tl,c:this.comparator,v:t}}static yn(t){return new kt(t.k,t.t,t.c,t.v)}}kt.Hl={Ul:1,Dl:2,Ql:3,Rl:4,Xl:5,Ll:6,Gl:10,Fl:11,Jl:12,Il:15,Ol:16,Vl:17},kt.Ml={ql:"boolean",Kl:"number",Pl:"string",Nl:"date"};
|
|
137
|
+
|
|
138
|
+
class Bt{constructor(t){this.filters=t;}zl(t){let r=!0;for(let e=0;e<this.filters.length;e++){const o=this.filters[e];let s=!1;for(let r=0;r<o.length;r++)if(o[r].zl(t)){s=!0;break}if(!s){r=!1;break}}return r}static fromJson(t){if(null==t||!isArray(t))return null;const r=[];for(let e=0;e<t.length;e++){const o=[],s=t[e];for(let t=0;t<s.length;t++)o.push(kt.fromJson(s[t]));r.push(o);}return new Bt(r)}ss(){const t=[];for(let r=0;r<this.filters.length;r++){const e=this.filters[r],o=[];for(let t=0;t<e.length;t++)o.push(e[t].ss());t.push(o);}return t}static yn(t){const r=[];for(let e=0;e<t.length;e++){const o=[],s=t[e];for(let t=0;t<s.length;t++)o.push(kt.yn(s[t]));r.push(o);}return new Bt(r)}}
|
|
139
|
+
|
|
140
|
+
class Mt{constructor(t,s){this.xl=t,this.Bl=s;}zl(t){if(null==this.xl||null==this.Bl)return !1;const s=t[0],r=t[1];return s===this.xl&&this.Bl.zl(r)}static fromJson(t){return new Mt(t?t.event_name:null,t?Bt.fromJson(t.property_filters):null)}ss(){return {e:this.xl,pf:this.Bl.ss()}}}
|
|
141
|
+
|
|
142
|
+
class Gt{constructor(t,i){this.Wl=t,this.Yl=i;}zl(t){if(null==this.Wl)return !1;const i=Ft.Zl(t[0],this.Wl);if(!i)return !1;let r=null==this.Yl||0===this.Yl.length;if(null!=this.Yl)for(let i=0;i<this.Yl.length;i++)if(this.Yl[i]===t[1]){r=!0;break}return i&&r}static fromJson(t){return new Gt(t?t.id:null,t?t.buttons:null)}ss(){return this.Wl}}
|
|
143
|
+
|
|
144
|
+
class Kt{constructor(t){this.productId=t;}zl(t){return null==this.productId||t[0]===this.productId}static fromJson(t){return new Kt(t?t.product_id:null)}ss(){return this.productId}}
|
|
145
|
+
|
|
146
|
+
class Qt{constructor(t,s){this.productId=t,this.Bl=s;}zl(t){if(null==this.productId||null==this.Bl)return !1;const s=t[0],i=t[1];return s===this.productId&&this.Bl.zl(i)}static fromJson(t){return new Qt(t?t.product_id:null,t?Bt.fromJson(t.property_filters):null)}ss(){return {id:this.productId,pf:this.Bl.ss()}}}
|
|
147
|
+
|
|
148
|
+
class Wt{constructor(t){this.Wl=t;}zl(t){return null==this.Wl||Ft.Zl(t[0],this.Wl)}static fromJson(t){return new Wt(t?t.campaign_id:null)}ss(){return this.Wl}}
|
|
149
|
+
|
|
150
|
+
var V = {OPEN:"open",Rr:"purchase",vr:"push_click",be:"custom_event",Ar:"iam_click",ks:"test"};
|
|
151
|
+
|
|
152
|
+
class Ft{constructor(e,t){this.type=e,this.data=t;}qa(e,t){return Ft.$a[this.type]===e&&(null==this.data||this.data.zl(t))}static Zl(e,t){let a=null;try{a=window.atob(e);}catch(t){return r$1.D.info("Failed to unencode analytics id "+e+": "+t.message),!1}return t===a.split("_")[0]}static fromJson(e){const t=e.type;let r;switch(t){case Ft.ec.OPEN:r=null;break;case Ft.ec.Rr:r=Kt.fromJson(e.data);break;case Ft.ec.tc:r=Qt.fromJson(e.data);break;case Ft.ec.vr:r=Wt.fromJson(e.data);break;case Ft.ec.be:r=xt.fromJson(e.data);break;case Ft.ec.rc:r=Mt.fromJson(e.data);break;case Ft.ec.Ar:r=Gt.fromJson(e.data);break;case Ft.ec.ks:r=null;}return new Ft(t,r)}ss(){return {t:this.type,d:this.data?this.data.ss():null}}static yn(e){let t,r;switch(e.t){case Ft.ec.OPEN:t=null;break;case Ft.ec.Rr:t=new Kt(e.d);break;case Ft.ec.tc:r=e.d||{},t=new Qt(r.id,Bt.yn(r.pf||[]));break;case Ft.ec.vr:t=new Wt(e.d);break;case Ft.ec.be:t=new xt(e.d);break;case Ft.ec.rc:r=e.d||{},t=new Mt(r.e,Bt.yn(r.pf||[]));break;case Ft.ec.Ar:t=new Gt(e.d);break;case Ft.ec.ks:t=null;}return new Ft(e.t,t)}}Ft.ec={OPEN:"open",Rr:"purchase",tc:"purchase_property",vr:"push_click",be:"custom_event",rc:"custom_event_property",Ar:"iam_click",ks:"test"},Ft.$a={},Ft.$a[Ft.ec.OPEN]=V.OPEN,Ft.$a[Ft.ec.Rr]=V.Rr,Ft.$a[Ft.ec.tc]=V.Rr,Ft.$a[Ft.ec.vr]=V.vr,Ft.$a[Ft.ec.be]=V.be,Ft.$a[Ft.ec.rc]=V.be,Ft.$a[Ft.ec.Ar]=V.Ar,Ft.$a[Ft.ec.ks]=V.ks;
|
|
153
|
+
|
|
154
|
+
class ut{constructor(t,i,s,e,r,l,o,n,h,a,u,d){this.id=t,this.Th=i||[],void 0===s&&(s=null),this.startTime=s,void 0===e&&(e=null),this.endTime=e,this.priority=r||0,this.type=l,this.Ph=n||0,null==a&&(a=1e3*(this.Ph+30)),this.vi=a,this.data=o,null==h&&(h=ut.yh),this.Ah=h,this.Ih=u,this.$h=d||null;}Mh(t){return null==this.$h||this.Ah!==ut.yh&&t-this.$h>=1e3*this.Ah}Bh(t){this.$h=t;}Jh(t){const i=t+1e3*this.Ph;return Math.max(i-(new Date).valueOf(),0)}Lh(t){const i=(new Date).valueOf()-t,s=null==t||isNaN(i)||null==this.vi||i<this.vi;return s||r$1.D.info(`Trigger action ${this.type} is no longer eligible for display - fired ${i}ms ago and has a timeout of ${this.vi}ms.`),!s}static fromJson(t){const i=t.id,s=[];for(let i=0;i<t.trigger_condition.length;i++)s.push(Ft.fromJson(t.trigger_condition[i]));const e=dateFromUnixTimestamp(t.start_time),r=dateFromUnixTimestamp(t.end_time),l=t.priority,o=t.type,n=t.delay,a=t.re_eligibility,u=t.timeout,d=t.data,m=t.min_seconds_since_last_trigger;return validateValueIsFromEnum(ut.gi,o,"Could not construct Trigger from server data","Trigger.Types")?new ut(i,s,e,r,l,o,d,n,a,u,m):null}ss(){const t=[];for(let i=0;i<this.Th.length;i++)t.push(this.Th[i].ss());return {i:this.id,c:t,s:this.startTime,e:this.endTime,p:this.priority,t:this.type,da:this.data,d:this.Ph,r:this.Ah,tm:this.vi,ss:this.Ih,ld:this.$h}}static yn(t){const i=[];for(let s=0;s<t.c.length;s++)i.push(Ft.yn(t.c[s]));return new ut(t.i,i,rehydrateDateAfterJsonization(t.s),rehydrateDateAfterJsonization(t.e),t.p,t.t,t.da,t.d,t.r,t.tm,t.ss,t.ld)}}ut.yh=-1,ut.gi={mi:"inapp",Rh:"templated_iam"};
|
|
155
|
+
|
|
156
|
+
class ge{constructor(t,s,i,r){this.vt=t,this.j=s,this.h=i,this.v=r,this.De=new u,e.jt(this.De),this._e=1e3,this.Se=6e4;}Be(){return this.De}Ee(t){return this.De.ut(t)}Fe(){return this.Ge}Ne(t){this.Ge=t;}qe(e,i){if(!validateValueIsFromEnum(InAppMessage.Oe,i,`${i} is not a valid in-app message display failure`,"InAppMessage.DisplayFailures"))return new t;const n={trigger_ids:[e],error_code:i};return s$1.G(r$1.A.Pe,n)}G(e,i,n,o){const a=new t;let l;if(e instanceof ControlMessage)l={trigger_ids:[e.triggerId]};else {if(i===r$1.A.Re||e instanceof HtmlMessage&&i===r$1.A.He){if(!e.k(o))return r$1.D.info("This in-app message has already received a click. Ignoring analytics event."),a}else if(i===r$1.A.Je){if(!e.R())return r$1.D.info("This in-app message has already received an impression. Ignoring analytics event."),a}l=this.Ke(e);}return null==l?a:(null!=n&&(l.bid=n),s$1.G(i,l))}Qe(e,i){const n=new t;if(!e.k())return r$1.D.info("This in-app message button has already received a click. Ignoring analytics event."),n;const o=this.Ke(i);return null==o?n:e.id===InAppMessageButton.Ue?(r$1.D.info("This in-app message button does not have a tracking id. Not logging event to Braze servers."),n):(null!=e.id&&(o.bid=e.id),s$1.G(r$1.A.He,o))}Ve(t){if(!(t instanceof InAppMessage))return;const s=t=>{const s=getDecodedBrazeAction(t);return containsUnknownBrazeAction(s)?ineligibleBrazeActionURLErrorMessage(INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.We,"In-App Message"):containsPushPrimerBrazeAction(s)&&!ht$1.Xe()?ineligibleBrazeActionURLErrorMessage(INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.Ye,"In-App Message"):void 0},e=t.buttons;let i;for(const t of e)if(t.clickAction===InAppMessage.ClickAction.URI&&BRAZE_ACTION_URI_REGEX.test(t.uri)&&(i=s(t.uri),i))return i;return t.clickAction===InAppMessage.ClickAction.URI&&BRAZE_ACTION_URI_REGEX.test(t.uri)?s(t.uri):void 0}Ze(t,s,e,i){let n=this.vt.ni(!1,!1);n=this.vt.Ps(n),n.template={trigger_id:t.triggerId,trigger_event_type:s},null!=e&&(n.template.data=e.li());const o=this.vt.Bs(n);this.vt.Gs(n,(()=>{b.Hs({url:`${this.vt.Ks()}/template/`,data:n,headers:o,S:async s=>{if(!this.vt.Os(n,s,o))return this.qe(t.triggerId,InAppMessage.Oe.ui),void("function"==typeof t.pi&&t.pi());if(this.vt.Qs(),null==s||null==s.templated_message)return void this.qe(t.triggerId,InAppMessage.Oe.ui);const e=s.templated_message;if(e.type!==ut.gi.mi)return void this.qe(t.triggerId,InAppMessage.Oe.ci);const i=newInAppMessageFromJson(e.data);if(null==i)return void this.qe(t.triggerId,InAppMessage.Oe.ci);let a=this.Ve(i);if(a)return r$1.D.error(a),void("function"==typeof t.pi&&t.pi());"function"==typeof t.fi?t.fi(i):this.qe(t.triggerId,InAppMessage.Oe.ui);},error:r=>{let n=`getting user personalization for message ${t.triggerId}`;if((new Date).valueOf()-t.di>t.vi)this.qe(t.triggerId,InAppMessage.Oe.ui);else {const r=Math.min(t.vi,this.Se),o=this._e;null==i&&(i=o);const a=Math.min(r,randomInclusive(o,3*i));n+=`. Retrying in ${a} ms`,setTimeout((()=>{this.Ze(t,s,e,a);}),a);}this.vt.Vs(r,n);}});}));}Ke(t){if(null==t.triggerId)return r$1.D.info("The in-app message has no analytics id. Not logging event to Braze servers."),null;const s={};return null!=t.triggerId&&(s.trigger_ids=[t.triggerId]),s}}
|
|
157
|
+
|
|
158
|
+
const pe={Ae:null,t:!1,m:()=>(pe.o(),pe.Ae||(pe.Ae=new ge(e.nr(),e.g(),e.l(),e.p())),pe.Ae),o:()=>{pe.t||(e.u(pe),pe.t=!0);},destroy:()=>{pe.Ae=null,pe.t=!1;}};var pe$1 = pe;
|
|
159
|
+
|
|
160
|
+
function attachCSS(n,t,o){const c=n||document.querySelector("head"),s=`ab-${t}-css-definitions-${"4.2.1".replace(/\./g,"-")}`,a=c.ownerDocument||document;if(null==a.getElementById(s)){const n=a.createElement("style");n.innerHTML=o,n.id=s;const t=e.nn(T.ao);null!=t&&n.setAttribute("nonce",t),c.appendChild(n);}}
|
|
161
|
+
|
|
162
|
+
function loadFontAwesome(){if(e.nn(T.Ao))return;const t="https://use.fontawesome.com/7f85a56ba4.css";if(!(null!==document.querySelector('link[rel=stylesheet][href="'+t+'"]'))){const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),document.getElementsByTagName("head")[0].appendChild(e);}}
|
|
163
|
+
|
|
164
|
+
function attachFeedCSS(t){attachCSS(t,"feed","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}.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%}}");}function setupFeedUI(){attachFeedCSS(),loadFontAwesome();}
|
|
165
|
+
|
|
166
|
+
function attachInAppMessageCSS(t){attachCSS(t,"iam",".ab-pause-scrolling,body.ab-pause-scrolling,html.ab-pause-scrolling{overflow:hidden;touch-action:none}.ab-centering-div,.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-centering-div:focus,.ab-iam-root.v3:focus{outline:0}.ab-centering-div.ab-effect-fullscreen,.ab-centering-div.ab-effect-html,.ab-centering-div.ab-effect-modal,.ab-iam-root.v3.ab-effect-fullscreen,.ab-iam-root.v3.ab-effect-html,.ab-iam-root.v3.ab-effect-modal{opacity:0}.ab-centering-div.ab-effect-fullscreen.ab-show,.ab-centering-div.ab-effect-html.ab-show,.ab-centering-div.ab-effect-modal.ab-show,.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-centering-div.ab-effect-fullscreen.ab-show.ab-animate-in,.ab-centering-div.ab-effect-html.ab-show.ab-animate-in,.ab-centering-div.ab-effect-modal.ab-show.ab-animate-in,.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-centering-div.ab-effect-fullscreen.ab-hide,.ab-centering-div.ab-effect-html.ab-hide,.ab-centering-div.ab-effect-modal.ab-hide,.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-centering-div.ab-effect-fullscreen.ab-hide.ab-animate-out,.ab-centering-div.ab-effect-html.ab-hide.ab-animate-out,.ab-centering-div.ab-effect-modal.ab-hide.ab-animate-out,.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-centering-div.ab-effect-slide .ab-in-app-message,.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-centering-div.ab-effect-slide.ab-show .ab-in-app-message,.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-centering-div.ab-effect-slide.ab-show.ab-animate-in .ab-in-app-message,.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-centering-div.ab-effect-slide.ab-hide .ab-in-app-message,.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-centering-div.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-left,.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-centering-div.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-up,.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-centering-div.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-down,.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-centering-div.ab-effect-slide.ab-hide.ab-animate-out .ab-in-app-message,.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-centering-div .ab-ios-scroll-wrapper,.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-centering-div .ab-in-app-message,.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-centering-div .ab-in-app-message.ab-no-shadow,.ab-iam-root.v3 .ab-in-app-message.ab-no-shadow{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ab-centering-div .ab-in-app-message :focus,.ab-centering-div .ab-in-app-message:focus,.ab-iam-root.v3 .ab-in-app-message :focus,.ab-iam-root.v3 .ab-in-app-message:focus{outline:0}.ab-centering-div .ab-in-app-message.ab-clickable,.ab-iam-root.v3 .ab-in-app-message.ab-clickable{cursor:pointer}.ab-centering-div .ab-in-app-message.ab-background,.ab-iam-root.v3 .ab-in-app-message.ab-background{background-color:#fff}.ab-centering-div .ab-in-app-message .ab-close-button,.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-centering-div .ab-in-app-message .ab-close-button svg,.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}.ab-centering-div .ab-in-app-message .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg.ab-chevron{display:none}.ab-centering-div .ab-in-app-message .ab-close-button:active,.ab-iam-root.v3 .ab-in-app-message .ab-close-button:active{background-color:transparent}.ab-centering-div .ab-in-app-message .ab-close-button:focus,.ab-iam-root.v3 .ab-in-app-message .ab-close-button:focus{background-color:transparent}.ab-centering-div .ab-in-app-message .ab-close-button:hover,.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover{background-color:transparent}.ab-centering-div .ab-in-app-message .ab-close-button:hover svg,.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover svg{fill-opacity:.8}.ab-centering-div .ab-in-app-message .ab-message-text,.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-centering-div .ab-in-app-message .ab-message-text.start-aligned,.ab-iam-root.v3 .ab-in-app-message .ab-message-text.start-aligned{text-align:left;text-align:start}.ab-centering-div .ab-in-app-message .ab-message-text.end-aligned,.ab-iam-root.v3 .ab-in-app-message .ab-message-text.end-aligned{text-align:right;text-align:end}.ab-centering-div .ab-in-app-message .ab-message-text.center-aligned,.ab-iam-root.v3 .ab-in-app-message .ab-message-text.center-aligned{text-align:center}.ab-centering-div .ab-in-app-message .ab-message-text::-webkit-scrollbar,.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar{-webkit-appearance:none;width:14px}.ab-centering-div .ab-in-app-message .ab-message-text::-webkit-scrollbar-thumb,.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-centering-div .ab-in-app-message .ab-message-text::-webkit-scrollbar-button,.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-button{width:0;height:0;display:none}.ab-centering-div .ab-in-app-message .ab-message-text::-webkit-scrollbar-corner,.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-corner{background-color:transparent}.ab-centering-div .ab-in-app-message .ab-message-header,.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-centering-div .ab-in-app-message .ab-message-header.start-aligned,.ab-iam-root.v3 .ab-in-app-message .ab-message-header.start-aligned{text-align:left;text-align:start}.ab-centering-div .ab-in-app-message .ab-message-header.end-aligned,.ab-iam-root.v3 .ab-in-app-message .ab-message-header.end-aligned{text-align:right;text-align:end}.ab-centering-div .ab-in-app-message .ab-message-header.center-aligned,.ab-iam-root.v3 .ab-in-app-message .ab-message-header.center-aligned{text-align:center}.ab-centering-div .ab-in-app-message.ab-fullscreen,.ab-centering-div .ab-in-app-message.ab-modal,.ab-centering-div .ab-in-app-message.ab-slideup,.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-centering-div .ab-in-app-message.ab-slideup,.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-centering-div .ab-in-app-message.ab-slideup.simulate-phone,.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-centering-div .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button{display:none}.ab-centering-div .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button svg:not(.ab-chevron),.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button svg:not(.ab-chevron){display:none}.ab-centering-div .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button,.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-centering-div .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-centering-div .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-message-text{border-right-width:40px}.ab-centering-div .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text{max-width:100%;border-right-width:10px}.ab-centering-div .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text span,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text span{max-height:66px}.ab-centering-div .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-icon,.ab-centering-div .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-image,.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-centering-div .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area{width:50px;height:50px}.ab-centering-div .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area img,.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-centering-div .ab-in-app-message.ab-slideup.ab-clickable:active .ab-message-text,.ab-centering-div .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-message-text,.ab-centering-div .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-message-text,.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-centering-div .ab-in-app-message.ab-slideup.ab-clickable:active .ab-close-button svg.ab-chevron,.ab-centering-div .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-close-button svg.ab-chevron,.ab-centering-div .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-close-button svg.ab-chevron,.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-centering-div .ab-in-app-message.ab-slideup .ab-message-text,.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-centering-div .ab-in-app-message.ab-slideup .ab-message-text span,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{display:block;max-height:150px;overflow:auto}.ab-centering-div .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-centering-div .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image,.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-centering-div .ab-in-app-message.ab-slideup .ab-close-button,.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-centering-div .ab-in-app-message.ab-slideup .ab-close-button svg,.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}.ab-centering-div .ab-in-app-message.ab-slideup .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg.ab-chevron{display:none}.ab-centering-div .ab-in-app-message.ab-slideup .ab-close-button:active,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:active{background-color:transparent}.ab-centering-div .ab-in-app-message.ab-slideup .ab-close-button:focus,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:focus{background-color:transparent}.ab-centering-div .ab-in-app-message.ab-slideup .ab-close-button:hover,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover{background-color:transparent}.ab-centering-div .ab-in-app-message.ab-slideup .ab-close-button:hover svg,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover svg{fill-opacity:.8}.ab-centering-div .ab-in-app-message.ab-slideup .ab-image-area,.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-centering-div .ab-in-app-message.ab-slideup .ab-image-area.ab-icon-area,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area.ab-icon-area{width:auto}.ab-centering-div .ab-in-app-message.ab-slideup .ab-image-area img,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{float:none;width:100%}.ab-centering-div .ab-in-app-message.ab-fullscreen,.ab-centering-div .ab-in-app-message.ab-modal,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal{font-size:14px}.ab-centering-div .ab-in-app-message.ab-fullscreen .ab-image-area,.ab-centering-div .ab-in-app-message.ab-modal .ab-image-area,.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-centering-div .ab-in-app-message.ab-fullscreen .ab-image-area .ab-center-cropped-img,.ab-centering-div .ab-in-app-message.ab-modal .ab-image-area .ab-center-cropped-img,.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-centering-div .ab-in-app-message.ab-fullscreen .ab-icon,.ab-centering-div .ab-in-app-message.ab-modal .ab-icon,.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-centering-div .ab-in-app-message.ab-fullscreen.graphic,.ab-centering-div .ab-in-app-message.ab-modal.graphic,.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-centering-div .ab-in-app-message.ab-fullscreen.graphic .ab-message-text,.ab-centering-div .ab-in-app-message.ab-modal.graphic .ab-message-text,.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-centering-div .ab-in-app-message.ab-fullscreen.graphic .ab-message-buttons,.ab-centering-div .ab-in-app-message.ab-modal.graphic .ab-message-buttons,.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-centering-div .ab-in-app-message.ab-fullscreen.graphic .ab-image-area,.ab-centering-div .ab-in-app-message.ab-modal.graphic .ab-image-area,.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-centering-div .ab-in-app-message.ab-fullscreen.graphic .ab-image-area img,.ab-centering-div .ab-in-app-message.ab-modal.graphic .ab-image-area img,.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-centering-div .ab-in-app-message.ab-modal,.ab-iam-root.v3 .ab-in-app-message.ab-modal{padding-top:20px;width:450px;max-width:450px;max-height:720px}.ab-centering-div .ab-in-app-message.ab-modal.simulate-phone,.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone{max-width:91%;max-width:calc(100% - 30px)}.ab-centering-div .ab-in-app-message.ab-modal.simulate-phone.graphic .ab-image-area img,.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-centering-div .ab-in-app-message.ab-modal .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text{max-height:660px}.ab-centering-div .ab-in-app-message.ab-modal .ab-message-text.ab-with-image,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-image{max-height:524.82758621px}.ab-centering-div .ab-in-app-message.ab-modal .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-icon{max-height:610px}.ab-centering-div .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons{margin-bottom:93px;max-height:587px}.ab-centering-div .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-image,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-image{max-height:451.82758621px}.ab-centering-div .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-icon{max-height:537px}.ab-centering-div .ab-in-app-message.ab-modal .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{margin-top:-20px;max-height:155.17241379px}.ab-centering-div .ab-in-app-message.ab-modal .ab-image-area img,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area img{max-width:100%;max-height:155.17241379px}.ab-centering-div .ab-in-app-message.ab-modal .ab-image-area.ab-icon-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area.ab-icon-area{height:auto}.ab-centering-div .ab-in-app-message.ab-modal.graphic,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{width:auto;overflow:hidden}.ab-centering-div .ab-in-app-message.ab-modal.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{display:inline}.ab-centering-div .ab-in-app-message.ab-modal.graphic .ab-image-area img,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{max-height:720px;max-width:450px}.ab-centering-div .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen{width:450px;max-height:720px}.ab-centering-div .ab-in-app-message.ab-fullscreen.landscape,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape{width:720px;max-height:450px}.ab-centering-div .ab-in-app-message.ab-fullscreen.landscape .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-image-area{height:225px}.ab-centering-div .ab-in-app-message.ab-fullscreen.landscape.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape.graphic .ab-image-area{height:450px}.ab-centering-div .ab-in-app-message.ab-fullscreen.landscape .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-message-text{max-height:112px}.ab-centering-div .ab-in-app-message.ab-fullscreen .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text{max-height:247px}.ab-centering-div .ab-in-app-message.ab-fullscreen .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text.ab-with-buttons{margin-bottom:93px}.ab-centering-div .ab-in-app-message.ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area{height:360px}.ab-centering-div .ab-in-app-message.ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area{height:720px}.ab-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone,.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-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-close-button,.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-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone .ab-image-area,.ab-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-image-area,.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-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text,.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-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text.ab-with-buttons,.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-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-message-text.ab-with-buttons,.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-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic),.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-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic) .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone.graphic,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic{display:block}.ab-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-image-area{height:100%}.ab-centering-div .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-message-button,.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-centering-div .ab-in-app-message.ab-html-message,.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-centering-div .ab-in-app-message .ab-message-buttons,.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-centering-div .ab-in-app-message .ab-message-button,.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-centering-div .ab-in-app-message .ab-message-button:first-of-type,.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type{float:left;background-color:#fff;color:#1b78cf}.ab-centering-div .ab-in-app-message .ab-message-button:last-of-type,.ab-iam-root.v3 .ab-in-app-message .ab-message-button:last-of-type{float:right;background-color:#1b78cf;color:#fff}.ab-centering-div .ab-in-app-message .ab-message-button:first-of-type:last-of-type,.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type:last-of-type{float:none;width:auto}.ab-centering-div .ab-in-app-message .ab-message-button:after,.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-centering-div .ab-in-app-message .ab-message-button:after,.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-centering-div .ab-in-app-message .ab-message-button:hover,.ab-iam-root.v3 .ab-in-app-message .ab-message-button:hover{opacity:.8}.ab-centering-div .ab-in-app-message .ab-message-button:active:after,.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-centering-div .ab-in-app-message .ab-message-button:focus:after,.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-centering-div .ab-in-app-message .ab-message-button a,.ab-iam-root.v3 .ab-in-app-message .ab-message-button a{color:inherit;text-decoration:inherit}.ab-centering-div .ab-in-app-message img,.ab-iam-root.v3 .ab-in-app-message img{float:none;display:inline-block}.ab-centering-div .ab-in-app-message .ab-icon,.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-centering-div .ab-in-app-message .ab-icon .fa,.ab-iam-root.v3 .ab-in-app-message .ab-icon .fa{float:none;font-size:30px;width:30px}.ab-centering-div .ab-start-hidden,.ab-iam-root.v3 .ab-start-hidden{visibility:hidden}.ab-centering-div .ab-centered,.ab-centering-div.ab-centering-div .ab-modal,.ab-iam-root.v3 .ab-centered,.ab-iam-root.v3.ab-centering-div .ab-modal{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-email-capture,.ab-iam-root.v3{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ab-email-capture .ab-page-blocker,.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)}.ab-email-capture .ab-in-app-message.ab-modal .ab-email-capture-input{margin-bottom:30px}.ab-email-capture .ab-in-app-message.ab-modal .ab-message-buttons~.ab-message-text{max-height:541px;margin-bottom:160px}.ab-email-capture .ab-in-app-message.ab-modal .ab-message-buttons~.ab-message-text.with-explanatory-link{max-height:513px;margin-bottom:188px}.ab-email-capture .ab-in-app-message.ab-modal .ab-image-area~.ab-message-text{max-height:385.82758621px}.ab-email-capture .ab-in-app-message.ab-modal .ab-image-area~.ab-message-text.with-explanatory-link{max-height:357.82758621px}.ab-email-capture .ab-in-app-message.ab-modal .ab-email-validation-error{margin-top:62px}.ab-email-capture .ab-in-app-message.ab-modal .ab-explanatory-link{display:block}.ab-email-capture .ab-in-app-message.ab-modal .ab-background,.ab-email-capture .ab-in-app-message.ab-modal .ab-mask{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.ab-email-capture .ab-in-app-message.ab-modal .ab-close-button{line-height:normal}.ab-email-capture .ab-in-app-message.ab-modal .ab-html-close-button{right:3px;top:-1px;font-size:34px;padding-top:0}@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-email-capture .ab-in-app-message.ab-modal:not(.force-desktop),.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-width:91%;max-width:calc(100% - 30px)}.ab-email-capture .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img,.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-email-capture .ab-in-app-message.ab-modal:not(.force-desktop),.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-height:91%;max-height:calc(100% - 30px)}.ab-email-capture .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img,.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-email-capture .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text,.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-email-capture .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-image,.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-email-capture .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-icon,.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-email-capture .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons,.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-email-capture .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-image,.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-email-capture .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-icon,.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)}}");}function setupInAppMessageUI(){attachInAppMessageCSS(),loadFontAwesome();}
|
|
167
|
+
|
|
168
|
+
function se(e){let s="";return e.animateIn&&(s+=" ab-animate-in"),e.animateOut&&(s+=" ab-animate-out"),e instanceof FullScreenMessage?s+=" ab-effect-fullscreen":e instanceof HtmlMessage?s+=" ab-effect-html":e instanceof ModalMessage?s+=" ab-effect-modal":e instanceof SlideUpMessage&&(s+=" ab-effect-slide"),s}
|
|
169
|
+
|
|
170
|
+
function createCloseButton(t,o,e){const n=document.createElement("button");n.setAttribute("aria-label",t),n.setAttribute("tabindex","0"),n.setAttribute("role","button"),addPassiveEventListener(n,"touchstart",(()=>{})),n.className="ab-close-button";const r=buildSvg("0 0 15 15","M15 1.5L13.5 0l-6 6-6-6L0 1.5l6 6-6 6L1.5 15l6-6 6 6 1.5-1.5-6-6 6-6z",o);return n.appendChild(r),n.addEventListener("keydown",(t=>{t.keyCode!==KeyCodes.fo&&t.keyCode!==KeyCodes.co||(e(),t.stopPropagation());})),n.onclick=t=>{e(),t.stopPropagation();},n}
|
|
171
|
+
|
|
172
|
+
function isTransparent(r){return r=parseInt(r),!isNaN(r)&&(4278190080&r)>>>24==0}function toRgba(r,t){if(r=parseInt(r),isNaN(r))return "";t=parseFloat(t),isNaN(t)&&(t=1);const n=255&(r>>>=0),e=(65280&r)>>>8,o=(16711680&r)>>>16,a=((4278190080&r)>>>24)/255;return et.bg()?"rgba("+[o,e,n,a*t].join(",")+")":"rgb("+[o,e,n].join(",")+")"}
|
|
173
|
+
|
|
174
|
+
function logInAppMessageClick(o){if(!e.rr())return !1;if(!(o instanceof InAppMessage))return r$1.D.error(MUST_BE_IN_APP_MESSAGE_WARNING),!1;const s=pe$1.m().G(o,r$1.A.Re);if(s)for(let r=0;r<s.ve.length;r++)TriggersProviderFactory.er().je(V.Ar,[o.triggerId],s.ve[r]);return s.S}
|
|
175
|
+
|
|
176
|
+
const ORIENTATION={PORTRAIT:0,LANDSCAPE:1};function _isPhone(){return screen.width<=600}function _getOrientation(){if("orientation"in window)return 90===Math.abs(window.orientation)||270===window.orientation?ORIENTATION.LANDSCAPE:ORIENTATION.PORTRAIT;if("screen"in window){let n=window.screen.orientation||screen.mozOrientation||screen.msOrientation;return null!=n&&"object"==typeof n&&(n=n.type),"landscape-primary"===n||"landscape-secondary"===n?ORIENTATION.LANDSCAPE:ORIENTATION.PORTRAIT}return ORIENTATION.PORTRAIT}function _openUri(n,e,r){e||null!=r&&r.metaKey?window.open(n):window.location=n;}function _getCurrentUrl(){return window.location.href}const WindowUtils={openUri:_openUri,so:_isPhone,io:_getOrientation,hn:_getCurrentUrl};
|
|
177
|
+
|
|
178
|
+
function getUser(){if(e.rr())return e.gr()}
|
|
179
|
+
|
|
180
|
+
function _handleBrazeAction(a,s,i){if(e.rr())if(BRAZE_ACTION_URI_REGEX.test(a)){const e=getDecodedBrazeAction(a);if(!e)return;const s=async e=>{if(!isValidBrazeActionJson(e))return void r$1.D.error(`Decoded Braze Action json is invalid: ${JSON.stringify(e,null,2)}`);const a=e[BRAZE_ACTIONS.properties.type];if(a===BRAZE_ACTIONS.types.ue)for(const r of e[BRAZE_ACTIONS.properties.me])s(r);else {const s=e[BRAZE_ACTIONS.properties.fe];let i,o;switch(a){case BRAZE_ACTIONS.types.logCustomEvent:i=await Promise.resolve().then(function () { return logCustomEvent$1; }),i.logCustomEvent.apply(null,Array.prototype.slice.call(s));break;case BRAZE_ACTIONS.types.requestPushPermission:i=await Promise.resolve().then(function () { return requestPushPermission$1; }),i.requestPushPermission();break;case BRAZE_ACTIONS.types.setEmailNotificationSubscriptionType:case BRAZE_ACTIONS.types.setPushNotificationSubscriptionType:case BRAZE_ACTIONS.types.setCustomUserAttribute:case BRAZE_ACTIONS.types.addToSubscriptionGroup:case BRAZE_ACTIONS.types.removeFromSubscriptionGroup:case BRAZE_ACTIONS.types.addToCustomAttributeArray:case BRAZE_ACTIONS.types.removeFromCustomAttributeArray:o=getUser(),o[a].apply(o,Array.prototype.slice.call(s));break;case BRAZE_ACTIONS.types.de:case BRAZE_ACTIONS.types.pe:WindowUtils.openUri.apply(null,Array.prototype.slice.call(s));break;default:r$1.D.info(`Ignoring unknown Braze Action: ${a}`);}}};s(e);}else WindowUtils.openUri(a,i,s);}function handleBrazeAction(e,r){_handleBrazeAction(e,r);}
|
|
181
|
+
|
|
182
|
+
function logInAppMessageHtmlClick(s,t,o){if(!e.rr())return !1;if(!(s instanceof HtmlMessage))return r$1.D.error("inAppMessage argument to logInAppMessageHtmlClick must be an HtmlMessage object."),!1;let m=r$1.A.Re;null!=t&&(m=r$1.A.He);const i=pe$1.m().G(s,m,t,o);if(i.S)for(let r=0;r<i.ve.length;r++)TriggersProviderFactory.er().je(V.Ar,[s.triggerId,t],i.ve[r]);return i.S}
|
|
183
|
+
|
|
184
|
+
function parseQueryStringKeyValues(t){null==t&&(t="");const r=t.split("?").slice(1).join("?"),n={};if(null!=r){const t=r.split("&");for(let r=0;r<t.length;r++){const a=t[r].split("=");""!==a[0]&&(n[a[0]]=a[1]);}}return n}function isURIJavascriptOrData(t){return !(!t||0!==(t=t.toString().toLowerCase()).lastIndexOf("javascript:",0)&&0!==t.lastIndexOf("data:",0))}
|
|
185
|
+
|
|
186
|
+
function rt(t,n,e,o,s,r){const i=document.createElement("iframe");i.setAttribute("title","Modal Message"),s&&(i.style.zIndex=s+1);const u=n=>{const e=n.getAttribute("href"),s=n.onclick;return r=>{if(null!=s&&"function"==typeof s&&!1===s())return;let u=parseQueryStringKeyValues(e).abButtonId;if(null!=u&&""!==u||(u=n.getAttribute("id")),null!=e&&""!==e&&0!==e.indexOf("#")){const s="blank"===(n.getAttribute("target")||"").toLowerCase().replace("_",""),c=o||t.openTarget===InAppMessage.OpenTarget.BLANK||s,a=()=>{logInAppMessageHtmlClick(t,u,e),WindowUtils.openUri(e,c,r);};c?a():t.on(i,a);}else logInAppMessageHtmlClick(t,u,e);return r.stopPropagation(),!1}},c=(t,n,e)=>{const o=`([\\w]+)\\s*=\\s*document.createElement\\(['"]${e}['"]\\)`,s=t.match(new RegExp(o));if(s){const e=`${s[1]}.setAttribute("nonce", "${n}")`;return `${t.slice(0,s.index+s[0].length)};${e};${t.slice(s.index+s[0].length)}`}return null};if(i.onload=()=>{let o=null;if(null!=r){o=document.createElement("html"),o.innerHTML=t.message;const n=o.getElementsByTagName("style");for(let t=0;t<n.length;t++)n[t].setAttribute("nonce",r);const e=o.getElementsByTagName("script");for(let t=0;t<e.length;t++){e[t].setAttribute("nonce",r),e[t].innerHTML=e[t].innerHTML.replace(/<style>/g,`<style nonce='${r}'>`);const n=c(e[t].innerHTML,r,"script");n&&(e[t].innerHTML=n);const o=c(e[t].innerHTML,r,"style");o&&(e[t].innerHTML=o);}}i.contentWindow.focus(),i.contentWindow.document.write(o?o.innerHTML:t.message);const s=i.contentWindow.document.getElementsByTagName("head")[0];if(null!=s){if(attachInAppMessageCSS(s),t.sn()){const n=document.createElement("style");n.innerHTML=t.css,n.id=t.rn(),null!=r&&n.setAttribute("nonce",r),s.appendChild(n);}const n=i.contentWindow.document.createElement("base");n.setAttribute("target","_parent"),s.appendChild(n);}const a=i.contentWindow.document.getElementsByTagName("title");a.length>0&&i.setAttribute("title",a[0].textContent);const l={closeMessage:function(){t.on(i);},logClick:function(){const n=[t,...arguments];logInAppMessageHtmlClick.apply(t,Array.prototype.slice.call(n));},display:{},web:{}},requestPushPermission=function(){return function(){const t=arguments;Promise.resolve().then(function () { return requestPushPermission$1; }).then((n=>{n.requestPushPermission.apply(null,Array.prototype.slice.call(t));}));}},m={requestImmediateDataFlush:async function(){const t=arguments,n=await Promise.resolve().then(function () { return requestImmediateDataFlush$1; });n.requestImmediateDataFlush.apply(null,Array.prototype.slice.call(t));},logCustomEvent:async function(){const t=arguments,n=await Promise.resolve().then(function () { return logCustomEvent$1; });n.logCustomEvent.apply(null,Array.prototype.slice.call(t));},logPurchase:async function(){const t=arguments,n=await Promise.resolve().then(function () { return logPurchase$1; });n.logPurchase.apply(null,Array.prototype.slice.call(t));},unregisterPush:async function(){const t=arguments,n=await Promise.resolve().then(function () { return unregisterPush$1; });n.unregisterPush.apply(null,Array.prototype.slice.call(t));},requestPushPermission:requestPushPermission()},f=function(t){return function(){m[t].apply(null,Array.prototype.slice.call(arguments));}};for(const t of keys(m))l[t]=f(t);const p=["setFirstName","setLastName","setEmail","setGender","setDateOfBirth","setCountry","setHomeCity","setEmailNotificationSubscriptionType","setLanguage","addAlias","setPushNotificationSubscriptionType","setPhoneNumber","setCustomUserAttribute","addToCustomAttributeArray","removeFromCustomAttributeArray","incrementCustomUserAttribute","setCustomLocationAttribute","addToSubscriptionGroup","removeFromSubscriptionGroup"],d=function(t){return function(){const n=getUser();n[t].apply(n,Array.prototype.slice.call(arguments));}},y={};for(let t=0;t<p.length;t++)y[p[t]]=d(p[t]);l.getUser=function(){return y};const b={showFeed:n},g=function(n){return function(){const e=arguments;t.on(i,(function(){b[n].apply(null,Array.prototype.slice.call(e));}));}};for(const t of keys(b))l.display[t]=g(t);const h={registerAppboyPushMessages:requestPushPermission()},A=function(t){return function(){h[t].apply(null,Array.prototype.slice.call(arguments));}};for(const t of keys(h))l.web[t]=A(t);if(i.contentWindow.appboyBridge=l,i.contentWindow.brazeBridge=l,t.un!==InAppMessage.es.cn){const t=i.contentWindow.document.getElementsByTagName("a");for(let n=0;n<t.length;n++)t[n].onclick=u(t[n]);const n=i.contentWindow.document.getElementsByTagName("button");for(let t=0;t<n.length;t++)n[t].onclick=u(n[t]);}const j=i.contentWindow.document.body;if(null!=j){t.an()&&(j.id=t.htmlId);const n=document.createElement("hidden");n.onclick=l.closeMessage,n.className="ab-programmatic-close-button",j.appendChild(n);}i.contentWindow.dispatchEvent(new CustomEvent("ab.BridgeReady")),-1!==i.className.indexOf("ab-start-hidden")&&(i.className=i.className.replace("ab-start-hidden",""),e(i)),document.activeElement!==i&&i.focus();},i.className="ab-in-app-message ab-start-hidden ab-html-message ab-modal-interactions",et.OS===OperatingSystems.ln){const n=document.createElement("div");return n.className="ab-ios-scroll-wrapper",n.appendChild(i),t.mn=n,n}return t.mn=i,i}
|
|
187
|
+
|
|
188
|
+
function logInAppMessageButtonClick(t,o){if(!e.rr())return !1;if(!(t instanceof InAppMessageButton))return r$1.D.error("button must be an InAppMessageButton object"),!1;if(!(o instanceof InAppMessage))return r$1.D.error(MUST_BE_IN_APP_MESSAGE_WARNING),!1;const s=pe$1.m().Qe(t,o);if(s.S)for(let r=0;r<s.ve.length;r++)TriggersProviderFactory.er().je(V.Ar,[o.triggerId,t.id],s.ve[r]);return s.S}
|
|
189
|
+
|
|
190
|
+
const me={Le:t=>{const o=t.querySelectorAll(".ab-close-button, .ab-message-text, .ab-message-button");for(let t=0;t<o.length;t++)o[t].tabIndex=0;if(o.length>0){const e=o[0],s=o[o.length-1];t.addEventListener("keydown",(o=>{var a=document.activeElement;o.keyCode===KeyCodes.oo&&(o.shiftKey||a!==s&&a!==t?!o.shiftKey||a!==e&&a!==t||(o.preventDefault(),s.focus()):(o.preventDefault(),e.focus()));}));}},Ie:(t,o)=>{o.setAttribute("role","dialog"),o.setAttribute("aria-modal",!0),o.setAttribute("aria-label","Modal Message"),t&&o.setAttribute("aria-labelledby",t);},Ce:(t,o,e,s)=>{if(t.buttons.length>0){const a=document.createElement("div");a.className="ab-message-buttons",e.appendChild(a);const l=e.getElementsByClassName("ab-message-text")[0];null!=l&&(l.className+=" ab-with-buttons");const n=a=>l=>(t.on(e,(()=>{logInAppMessageButtonClick(a,t),a.clickAction===InAppMessage.ClickAction.URI?_handleBrazeAction(a.uri,l,s||t.openTarget===InAppMessage.OpenTarget.BLANK):a.clickAction===InAppMessage.ClickAction.NEWS_FEED&&o();})),l.stopPropagation(),!1);for(let o=0;o<t.buttons.length;o++){const e=t.buttons[o],s=document.createElement("button");s.className="ab-message-button",s.setAttribute("type","button"),addPassiveEventListener(s,"touchstart",(function(){}));let l=e.text;""===e.text&&(l=" "),s.appendChild(document.createTextNode(l)),t.sn()||(s.style.backgroundColor=toRgba(e.backgroundColor),s.style.color=toRgba(e.textColor),s.style.borderColor=toRgba(e.borderColor)),s.onclick=n(e),a.appendChild(s);}}}};
|
|
191
|
+
|
|
192
|
+
function ce(e,o,s,t,a,n){if(e.he=document.activeElement,e instanceof HtmlMessage)return rt(e,o,s,t,a,n);const l=function(e,o,s,t,a){const n=document.createElement("div");n.className="ab-in-app-message ab-start-hidden ab-background",a&&(n.style.zIndex=a+1),e.we()&&(n.className+=" ab-modal-interactions",n.setAttribute("tabindex","-1")),e.sn()||(n.style.color=toRgba(e.textColor),n.style.backgroundColor=toRgba(e.backgroundColor),isTransparent(e.backgroundColor)&&(n.className+=" ab-no-shadow"));const c=()=>{-1!==n.className.indexOf("ab-start-hidden")&&(n.className=n.className.replace("ab-start-hidden",""),s(n));};e.imageStyle===InAppMessage.ImageStyle.GRAPHIC&&(n.className+=" graphic"),e.orientation===InAppMessage.Orientation.LANDSCAPE&&(n.className+=" landscape"),0===e.buttons.length&&(e.clickAction!==InAppMessage.ClickAction.NONE&&(n.className+=" ab-clickable"),n.onclick=s=>(e.on(n,(()=>{logInAppMessageClick(e),e.clickAction===InAppMessage.ClickAction.URI?_handleBrazeAction(e.uri,s,t||e.openTarget===InAppMessage.OpenTarget.BLANK):e.clickAction===InAppMessage.ClickAction.NEWS_FEED&&o();})),s.stopPropagation(),!1));const l=createCloseButton("Close Message",e.sn()?void 0:toRgba(e.closeButtonColor),(()=>{e.on(n);}));n.appendChild(l),a&&(l.style.zIndex=a+2);const d=document.createElement("div");d.className="ab-message-text";const u=(e.messageAlignment||e.ke).toLowerCase();d.className+=" "+u+"-aligned";let b=!1;const f=document.createElement("div");if(f.className="ab-image-area",e.imageUrl){if(e.cropType===InAppMessage.CropType.CENTER_CROP){const o=document.createElement("span");o.className="ab-center-cropped-img",o.style.backgroundImage="url("+e.imageUrl+")",o.setAttribute("role","img"),o.setAttribute("aria-label","Modal Image"),e.xe(o),f.appendChild(o);}else {const o=document.createElement("img");o.setAttribute("src",e.imageUrl),e.xe(o),b=!0,o.onload=c,setTimeout(c,1e3),f.appendChild(o);}n.appendChild(f),d.className+=" ab-with-image";}else if(e.icon){f.className+=" ab-icon-area";const o=document.createElement("span");o.className="ab-icon",e.sn()||(o.style.backgroundColor=toRgba(e.iconBackgroundColor),o.style.color=toRgba(e.iconColor));const s=document.createElement("i");s.className="fa",s.appendChild(document.createTextNode(e.icon)),s.setAttribute("aria-hidden",!0),o.appendChild(s),f.appendChild(o),n.appendChild(f),d.className+=" ab-with-icon";}if(addPassiveEventListener(d,"touchstart",(function(){})),e.header&&e.header.length>0){const o=document.createElement("h1");o.className="ab-message-header",e.ze=r$1.it.nt(),o.id=e.ze;const s=(e.headerAlignment||InAppMessage.TextAlignment.CENTER).toLowerCase();o.className+=" "+s+"-aligned",e.sn()||(o.style.color=toRgba(e.headerTextColor)),o.appendChild(document.createTextNode(e.header)),d.appendChild(o);}return d.appendChild(e.Me()),n.appendChild(d),b||c(),e.mn=n,n}(e,o,s,t,a);if(e instanceof FullScreenMessage||e instanceof ModalMessage){const s=e instanceof FullScreenMessage?"ab-fullscreen":"ab-modal";l.className+=` ${s} ab-centered`,me.Ce(e,o,l,t),me.Le(l),me.Ie(e.ze,l);}else if(e instanceof SlideUpMessage){l.className+=" ab-slideup";const o=l.getElementsByClassName("ab-close-button")[0];if(null!=o){const s=buildSvg("0 0 11.38 19.44","M11.38 9.72l-9.33 9.72L0 17.3l7.27-7.58L0 2.14 2.05 0l9.33 9.72z",e.sn()?void 0:toRgba(e.closeButtonColor));s.setAttribute("class","ab-chevron"),o.appendChild(s);}let s,t;detectSwipe(l,DIRECTIONS.ot,(e=>{l.className+=" ab-swiped-left",o.onclick(e);})),detectSwipe(l,DIRECTIONS.et,(e=>{l.className+=" ab-swiped-right",o.onclick(e);})),e.slideFrom===InAppMessage.SlideFrom.TOP?(s=DIRECTIONS.Te,t=" ab-swiped-up"):(s=DIRECTIONS.$e,t=" ab-swiped-down"),detectSwipe(l,s,(e=>{l.className+=t,o.onclick(e);}));}return l}
|
|
193
|
+
|
|
194
|
+
function logInAppMessageImpression(o){if(!e.rr())return !1;if(!(o instanceof InAppMessage||o instanceof ControlMessage))return r$1.D.error(MUST_BE_IN_APP_MESSAGE_WARNING),!1;const s=o instanceof ControlMessage?r$1.A.ro:r$1.A.Je;return pe$1.m().G(o,s).S}
|
|
195
|
+
|
|
196
|
+
function showInAppMessage(t,s,o){if(!e.rr())return;if(setupInAppMessageUI(),null==t)return !1;if(t instanceof ControlMessage)return r$1.D.info("User received control for a multivariate test, logging to Braze servers."),logInAppMessageImpression(t),!0;if(!(t instanceof InAppMessage))return !1;const i=pe$1.m();t.Hi();const n=t instanceof HtmlMessage;if(n&&!t.trusted&&!e.tr())return r$1.D.error('HTML in-app messages are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these messages.'),i.qe(t.triggerId,InAppMessage.Oe.wi),!1;if(null==s&&(s=document.body),t.we()){if(s.querySelectorAll(".ab-modal-interactions").length>0)return r$1.D.info(`Cannot show in-app message ${t.message} because another message is being shown.`),i.qe(t.triggerId,InAppMessage.Oe.yi),!1}if(WindowUtils.so()){const e=WindowUtils.io();if(e===ORIENTATION.PORTRAIT&&t.orientation===InAppMessage.Orientation.LANDSCAPE||e===ORIENTATION.LANDSCAPE&&t.orientation===InAppMessage.Orientation.PORTRAIT){const s=e===ORIENTATION.PORTRAIT?"portrait":"landscape",o=t.orientation===InAppMessage.Orientation.PORTRAIT?"portrait":"landscape";return r$1.D.info(`Not showing ${o} in-app message ${t.message} because the screen is currently ${s}`),i.qe(t.triggerId,InAppMessage.Oe.xi),!1}}if(!e.tr()){let e=!1;if(t.buttons&&t.buttons.length>0){const s=t.buttons;for(let t=0;t<s.length;t++)if(s[t].clickAction===InAppMessage.ClickAction.URI){const o=s[t].uri;e=isURIJavascriptOrData(o);}}else t.clickAction===InAppMessage.ClickAction.URI&&(e=isURIJavascriptOrData(t.uri));if(e)return r$1.D.error('Javascript click actions are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these actions.'),i.qe(t.triggerId,InAppMessage.Oe.wi),!1}const a=document.createElement("div");if(a.className="ab-iam-root v3",a.className+=se(t),a.setAttribute("role","complementary"),t.an()&&(a.id=t.htmlId),e.nn(T.no)&&(a.style.zIndex=e.nn(T.no)+1),s.appendChild(a),t.sn()){const s=document.createElement("style");s.innerHTML=t.css,s.id=t.rn(),null!=e.nn(T.ao)&&s.setAttribute("nonce",e.nn(T.ao)),document.getElementsByTagName("head")[0].appendChild(s);}const l=t instanceof SlideUpMessage,m=ce(t,(()=>{Promise.resolve().then(function () { return showFeed$1; }).then((e=>e.showFeed()));}),(s=>{if(t.we()&&t.ll()){const o=document.createElement("div");if(o.className="ab-page-blocker",t.sn()||(o.style.backgroundColor=toRgba(t.frameColor)),e.nn(T.no)&&(o.style.zIndex=e.nn(T.no)),a.appendChild(o),!e.nn(T.Ui)){const e=(new Date).valueOf();o.onclick=o=>{(new Date).valueOf()-e>InAppMessage.Vi&&(t.on(s),o.stopPropagation());};}a.appendChild(s),s.focus(),t.Ri(a);}else if(l){const e=document.querySelectorAll(".ab-slideup");let o=null;for(let t=e.length-1;t>=0;t--)if(e[t]!==s){o=e[t];break}if(t.slideFrom===InAppMessage.SlideFrom.TOP){let e=0;null!=o&&(e=o.offsetTop+o.offsetHeight),s.style.top=Math.max(e,0)+"px";}else {let e=0;null!=o&&(e=(window.innerHeight||document.documentElement.clientHeight)-o.offsetTop),s.style.bottom=Math.max(e,0)+"px";}}else if(n&&!e.nn(T.Ui)){const e=t;s.contentWindow.addEventListener("keydown",(function(t){t.keyCode===KeyCodes.Ci&&e.closeMessage();}));}logInAppMessageImpression(t),t.dismissType===InAppMessage.DismissType.AUTO_DISMISS&&setTimeout((()=>{a.contains(s)&&t.on(s);}),t.duration),"function"==typeof o&&o();}),e.nn(T.lo),e.nn(T.no),e.nn(T.ao));return (n||l)&&(a.appendChild(m),t.Ri(a)),!0}
|
|
197
|
+
|
|
198
|
+
function subscribeToInAppMessage(n){if(e.rr())return "function"!=typeof n?null:pe$1.m().Ee((function(r){return n(r[0]),r.slice(1)}))}
|
|
199
|
+
|
|
200
|
+
function automaticallyShowInAppMessages(){if(!e.rr())return;setupInAppMessageUI();const s=pe$1.m();if(null==s.Fe()){const r=subscribeToInAppMessage((s=>showInAppMessage(s)));s.Ne(r);}return s.Fe()}
|
|
201
|
+
|
|
202
|
+
class ft{constructor(t,s,l,n,i){this.triggerId=t,this.fi=s,this.pi=l,this.di=n,this.vi=i;}static fromJson(t,s,l,n,i){return null==t||null==t.trigger_id?null:new ft(t.trigger_id,s,l,n,i)}}
|
|
203
|
+
|
|
204
|
+
class ir extends y{constructor(t,i,s,e,r){super(),this.Oh=t,this.yt=i,this.h=s,this.si=e,this.Uh=r,this.Kh=[],this.Qh=[],this.Vh=null,this.Xh={},this.Yh={},this.Zh(),this.tg();}ig(){this.Vh=this.h.I(STORAGE_KEYS.q.Ya)||this.Vh,this.Xh=this.h.I(STORAGE_KEYS.q.Da)||this.Xh,this.Yh=this.h.I(STORAGE_KEYS.q.Ka)||this.Yh;for(let t=0;t<this.sg.length;t++){const i=this.sg[t];null!=this.Yh[i.id]&&i.Bh(this.Yh[i.id]);}}Zh(){this.eg=this.h.I(STORAGE_KEYS.q.Ia)||0;const t=this.h.I(STORAGE_KEYS.q.ba)||[],i=[];for(let s=0;s<t.length;s++)i.push(ut.yn(t[s]));this.sg=i,this.ig();}tg(){const t=this,i=function(i,s,e,r,h){return function(){t.hg(i,s,e,r,h);}},s={};for(let t=0;t<this.sg.length;t++)s[this.sg[t].id]=this.sg[t];let e=!1;for(let t=0;t<this.sg.length;t++){const r=this.sg[t];if(null!=this.Xh[r.id]){const t=this.Xh[r.id],h=[];for(let e=0;e<t.length;e++){const o=t[e],n=r.Jh(o.di);if(n>0){let t,e;h.push(o),null!=o.og&&(t=o.og),null!=o.ng&&ue.Ma(o.ng)&&(e=ue.yn(o.ng));const l=[];if(isArray(o.lg))for(let t=0;t<o.lg.length;t++){const i=s[o.lg[t]];null!=i&&l.push(i);}this.Qh.push(setTimeout(i(r,o.di,t,e,l),n));}}this.Xh[r.id].length>h.length&&(this.Xh[r.id]=h,e=!0,0===this.Xh[r.id].length&&delete this.Xh[r.id]);}}e&&this.h.B(STORAGE_KEYS.q.Da,this.Xh);}ag(){const t=[];for(let i=0;i<this.sg.length;i++)t.push(this.sg[i].ss());this.eg=(new Date).valueOf(),this.h.B(STORAGE_KEYS.q.ba,t),this.h.B(STORAGE_KEYS.q.Ia,this.eg);}gg(){(this.h.I(STORAGE_KEYS.q.Ia)||0)>this.eg?this.Zh():this.ig();}Rs(t){let i=!1;if(null!=t&&t.triggers){this.ig();const s={},e={};this.sg=[];for(let r=0;r<t.triggers.length;r++){const h=ut.fromJson(t.triggers[r]);null!=this.Yh[h.id]&&(h.Bh(this.Yh[h.id]),s[h.id]=this.Yh[h.id]),null!=this.Xh[h.id]&&(e[h.id]=this.Xh[h.id]);for(let t=0;t<h.Th.length;t++)if(h.Th[t].qa(V.ks,null)){i=!0;break}null!=h&&this.sg.push(h);}isEqual(this.Yh,s)||(this.Yh=s,this.h.B(STORAGE_KEYS.q.Ka,this.Yh)),isEqual(this.Xh,e)||(this.Xh=e,this.h.B(STORAGE_KEYS.q.Da,this.Xh)),this.ag(),i&&(r$1.D.info("Trigger with test condition found, firing test."),this.je(V.ks)),this.je(V.OPEN);const h=this.Kh;this.Kh=[];for(let t=0;t<h.length;t++)this.je.apply(this,h[t]);}}async hg(t,i,s,e,h){const o=e=>{this.ig();const h=(new Date).valueOf();if(!t.Lh(i))return !1===navigator.onLine&&t.type===ut.gi.mi&&e.imageUrl?(r$1.D.info(`Not showing ${t.type} trigger action ${t.id} due to offline state.`),void this.Uh.qe(t.id,InAppMessage.Oe.Ki)):void(t.Mh(h)&&this.fg(t,h,s)?(this.yt.St([e]),this.cg(t,h)):r$1.D.info(`Not displaying trigger ${t.id} because display time fell outside of the acceptable time window.`));t.type===ut.gi.Rh?this.Uh.qe(t.id,InAppMessage.Oe.ui):this.Uh.qe(t.id,InAppMessage.Oe.Yi);},n=()=>{this.ig();const o=h.pop();if(null!=o)if(this.ug(o,i,s,e,h),o.Lh(i)){let t=`Server aborted in-app message display, but the timeout on fallback trigger ${o.id} has already elapsed.`;h.length>0&&(t+=" Continuing to fall back."),r$1.D.info(t),this.Uh.qe(o.id,InAppMessage.Oe.Yi),n();}else {r$1.D.info(`Server aborted in-app message display. Falling back to lower priority ${o.type} trigger action ${t.id}.`);const n=1e3*o.Ph-((new Date).valueOf()-i);n>0?this.Qh.push(setTimeout((()=>{this.hg(o,i,s,e,h);}),n)):this.hg(o,i,s,e,h);}};switch(t.type){case ut.gi.mi:const h=newInAppMessageFromJson(t.data);if(null==h){r$1.D.error(`Could not parse trigger data for trigger ${t.id}, ignoring.`),this.Uh.qe(t.id,InAppMessage.Oe.ci);break}let l=this.Uh.Ve(h);if(l){r$1.D.error(l),n();break}o(h);break;case ut.gi.Rh:const a=ft.fromJson(t.data,o,n,i,t.vi);if(null==a){r$1.D.error(`Could not parse trigger data for trigger ${t.id}, ignoring.`),this.Uh.qe(t.id,InAppMessage.Oe.ci);break}this.Uh.Ze(a,s,e);break;default:r$1.D.error(`Trigger ${t.id} was of unexpected type ${t.type}, ignoring.`),this.Uh.qe(t.id,InAppMessage.Oe.ci);}}je(t,i,s){if(!validateValueIsFromEnum(V,t,"Cannot fire trigger action.","TriggerEvents"))return;if(this.si.bl())return r$1.D.info("Trigger sync is currently in progress, awaiting sync completion before firing trigger event."),void this.Kh.push(arguments);this.gg();const e=(new Date).valueOf(),h=e-this.Vh;let o=!0,n=!0;const l=[];for(let s=0;s<this.sg.length;s++){const r=this.sg[s],h=e+1e3*r.Ph;if(r.Mh(h)&&(null==r.startTime||r.startTime<=e)&&(null==r.endTime||r.endTime>=e)){let s=!1;for(let e=0;e<r.Th.length;e++)if(r.Th[e].qa(t,i)){s=!0;break}s&&(o=!1,this.fg(r,h,t)&&(n=!1,l.push(r)));}}if(o)return void r$1.D.info(`Trigger event ${t} did not match any trigger conditions.`);if(n)return void r$1.D.info(`Ignoring ${t} trigger event because a trigger was displayed ${h/1e3}s ago.`);l.sort(((t,i)=>t.priority-i.priority));const a=l.pop();null!=a&&(r$1.D.info(`Firing ${a.type} trigger action ${a.id} from trigger event ${t}.`),this.ug(a,e,t,s,l),0===a.Ph?this.hg(a,e,t,s,l):this.Qh.push(setTimeout((()=>{this.hg(a,e,t,s,l);}),1e3*a.Ph)));}changeUser(t){if(this.sg=[],this.h.Xs(STORAGE_KEYS.q.ba),!t){this.Kh=[],this.Vh=null,this.Yh={},this.Xh={};for(let t=0;t<this.Qh.length;t++)clearTimeout(this.Qh[t]);this.Qh=[],this.h.Xs(STORAGE_KEYS.q.Ya),this.h.Xs(STORAGE_KEYS.q.Ka),this.h.Xs(STORAGE_KEYS.q.Da);}}clearData(){this.sg=[],this.Vh=null,this.Yh={},this.Xh={};for(let t=0;t<this.Qh.length;t++)clearTimeout(this.Qh[t]);this.Qh=[];}fg(t,i,s){if(null==this.Vh)return !0;if(s===V.ks)return r$1.D.info("Ignoring minimum interval between trigger because it is a test type."),!0;let e=t.Ih;return null==e&&(e=this.Oh),i-this.Vh>=1e3*e}ug(t,i,s,e,r){this.ig(),this.Xh[t.id]=this.Xh[t.id]||[];const h={};let n;h.di=i,h.og=s,null!=e&&(n=e.ss()),h.ng=n;const l=[];for(let t=0;t<r.length;t++)l.push(r[t].id);h.lg=l,this.Xh[t.id].push(h),this.h.B(STORAGE_KEYS.q.Da,this.Xh);}cg(t,i){this.ig(),t.Bh(i),this.Vh=i,this.h.B(STORAGE_KEYS.q.Ya,i),this.Yh[t.id]=i,this.h.B(STORAGE_KEYS.q.Ka,this.Yh);}}
|
|
205
|
+
|
|
206
|
+
const TriggersProviderFactory={t:!1,provider:null,er:()=>(TriggersProviderFactory.init(),TriggersProviderFactory.provider),rg:()=>{if(!TriggersProviderFactory.provider){const r=e.nn(T.ho);TriggersProviderFactory.provider=new ir(null!=r?r:30,pe$1.m().Be(),e.l(),e.mr(),pe$1.m()),e.ar(TriggersProviderFactory.provider);}},init:()=>{TriggersProviderFactory.t||(TriggersProviderFactory.rg(),e.u(TriggersProviderFactory),TriggersProviderFactory.t=!0);},destroy:()=>{TriggersProviderFactory.provider=null,TriggersProviderFactory.t=!1;}};
|
|
207
|
+
|
|
208
|
+
class ei{constructor(t,i,l,s,u){this.endpoint=t||null,this.wn=i||null,this.publicKey=l||null,this.tl=s||null,this.oh=u||null;}ss(){return {e:this.endpoint,c:this.wn,p:this.publicKey,u:this.tl,v:this.oh}}static yn(t){return new ei(t.e,rehydrateDateAfterJsonization(t.c),t.p,t.u,t.v)}}
|
|
209
|
+
|
|
210
|
+
class bt{constructor(t,s){this.gt=t,this.h=s;}getUserId(){const t=this.h.tu(STORAGE_KEYS.iu.su);if(null==t)return null;let s=t.eu,i=getByteLength(s);if(i>User.ee){for(;i>User.ee;)s=s.slice(0,s.length-1),i=getByteLength(s);t.eu=s,this.h.ru(STORAGE_KEYS.iu.su,t);}return s}uu(t){const s=null==this.getUserId();this.h.ru(STORAGE_KEYS.iu.su,new _t(t)),s&&this.h.ou(t);}setCustomUserAttribute(t,s){if(this.gt.hu(t))return r$1.D.info('Custom Attribute "'+t+'" is blocklisted, ignoring.'),!1;const i={};return i[t]=s,this.nu(User.lu,i,!0)}nu(t,s,i,e){const u=this.h.mu(this.getUserId(),t,s);return !e&&u&&r$1.D.info(`Logged${i?" custom":""} attribute ${t} with value ${s}`),u}Gr(t,s,i,e,u){this.nu("push_token",t,!1,!0),this.nu("custom_push_public_key",i,!1,!0),this.nu("custom_push_user_auth",e,!1,!0),this.nu("custom_push_vapid_public_key",u,!1,!0);const h=r$1.xt.Ft,n=new r$1.qt(h,r$1.D),l=new ei(t,s,i,e,u);this.h.B(STORAGE_KEYS.q.gn,l.ss()),n.setItem(h.$t.pu,h.se,!0);}Jr(t){if(this.nu("push_token",null,!1,!0),this.nu("custom_push_public_key",null,!1,!0),this.nu("custom_push_user_auth",null,!1,!0),this.nu("custom_push_vapid_public_key",null,!1,!0),t){const t=r$1.xt.Ft,s=new r$1.qt(t,r$1.D);this.h.B(STORAGE_KEYS.q.gn,!1),s.setItem(t.$t.pu,t.se,!1);}}}
|
|
211
|
+
|
|
212
|
+
const T={Rn:"allowCrawlerActivity",Wn:"baseUrl",Vn:"noCookies",Yn:"devicePropertyAllowlist",ta:"disablePushTokenMaintenance",Xn:"enableLogging",Zn:"enableSdkAuthentication",ia:"manageServiceWorkerExternally",ho:"minimumIntervalBetweenTriggerActionsInSeconds",po:"sessionTimeoutInSeconds",Eo:"appVersion",na:"serviceWorkerLocation",ra:"safariWebsitePushId",jn:"localization",ao:"contentSecurityNonce",_o:"enableHtmlInAppMessages",Io:"allowUserSuppliedJavascript",no:"inAppMessageZIndex",lo:"openInAppMessagesInNewTab",tn:"openCardsInNewTab",en:"openNewsFeedCardsInNewTab",Ui:"requireExplicitInAppMessageDismissal",Ao:"doNotLoadFontAwesome",So:"sdkFlavor"};class Rt{constructor(){this.No=!1,this.wo=!1,this.To=new u,this.Oo=new u,this.vo={},this.Co=[],this.Lo=[],this.De=[],this.Po="4.2.1";}Ro(t){this.To.ut(t);}Bi(t){this.Oo.ut(t);}initialize(t,i){if(this.Mo())return r$1.D.info("Braze has already been initialized with an API key."),!0;this.vo=i||{};let s=this.nn(T.Xn);const e=parseQueryStringKeyValues(WindowUtils.hn());if(e&&"true"===e.brazeLogging&&(s=!0),r$1.D.init(s),r$1.D.info(`Initialization Options: ${JSON.stringify(this.vo,null,2)}`),null==t||""===t||"string"!=typeof t)return r$1.D.error("Braze requires a valid API key to be initialized."),!1;this.Ji=t;let n=this.nn(T.Wn);if(null==n||""===n||"string"!=typeof n)return r$1.D.error("Braze requires a valid baseUrl to be initialized."),!1;if(n=n.replace(/(\.[a-z]+)[^\.]*$/i,"$1/api/v3"),0!==n.indexOf("http")&&(n="https://"+n),this.yo=n,et.Do&&!this.nn(T.Rn))return r$1.D.info("Ignoring activity from crawler bot "+navigator.userAgent),this.wo=!0,!1;const a=this.nn(Rt.Vn)||!1;if(this.h=Pt.jo(t,a),new G.ne(null,!0).lr(STORAGE_KEYS.ae))return r$1.D.info("Ignoring all activity due to previous opt out"),this.wo=!0,!1;for(const t of keys(this.vo))-1===values(r$1.zo).indexOf(t)&&r$1.D.warn(`Ignoring unknown initialization option '${t}'.`);const h=["mparticle","wordpress","tealium"];if(null!=this.nn(T.So)){const t=this.nn(T.So);-1!==h.indexOf(t)?this.Uo=t:r$1.D.error("Invalid sdk flavor passed: "+t);}let l=this.nn(r$1.zo.Yn);if(null!=l)if(isArray(l)){const t=[];for(let i=0;i<l.length;i++)validateValueIsFromEnum(DeviceProperties,l[i],"devicePropertyAllowlist contained an invalid value.","DeviceProperties")&&t.push(l[i]);l=t;}else r$1.D.error("devicePropertyAllowlist must be an array. Defaulting to all properties."),l=null;this.Qi=new It(this.h,l),this.gt=new Ct(this.h),this.v=new bt(this.gt,this.h),this.j=new Lt(this.h,this.v,this.gt,this.nn(T.po));const c=new u;return this.Bo=new St(this.h,this.nn(T.Zn),c),this.jt(c),this.vt=new wt(this.Qi,this.h,this.Bo,this.v,this.j,this.gt,this.Ji,this.yo,this.Po,this.Uo,this.nn(T.Eo)),this.si=new Ot(this.Ji,this.yo,this.j,this.Qi,this.v,this.gt,this.h,(t=>{if(this.Mo())for(const i of this.re())i.Rs(t);}),this.Bo,this.vt),this.si.initialize(),r$1.D.info(`Initialized for the Braze backend at "${this.nn(T.Wn)}" with API key "${this.Ji}".`),null!=this.nn(T._o)&&logDeprecationWarning("enableHtmlInAppMessages","initialization option","allowUserSuppliedJavascript"),TriggersProviderFactory.init(),this.To.St(this.vo),this.No=!0,!0}destroy(t){if(r$1.D.destroy(),this.Mo()){this.Oo.St(),this.Oo.removeAllSubscriptions();for(const t of this.Co)t.destroy();this.Co=[];for(const t of this.Lo)t.clearData(!1);this.Lo=[],this.removeAllSubscriptions(),this.De=[],this.si.destroy(),this.si=null,this.Bo=null,this.Qi=null,this.vt=null,this.gt=null,this.j=null,this.v=null,this.vo={},this.Uo=void 0,this.No=!1,this.wo=!1,t&&(this.h=null);}}rr(){if(this.Wo())return !1;if(!this.Mo())throw new Error("Braze must be initialized before calling methods.");return !0}ea(){return this.Ji}ii(){return this.Bo}Ks(){return this.yo}ce(){return this.Qi}nr(){return this.vt}nn(t){return this.vo[t]}re(){return this.Lo}mr(){return this.si}ir(){return this.gt}g(){return this.j}l(){return this.h}gr(){if(this.v&&this.si)return new User(this.v,this.si)}p(){return this.v}tr(){return !0===this.nn(T.Io)||!0===this.nn(T._o)}u(t){let i=!1;for(const s of this.Co)s===t&&(i=!0);i||this.Co.push(t);}ar(t){let i=!1;for(const s of this.Lo)s.constructor===t.constructor&&(i=!0);t instanceof y&&!i&&this.Lo.push(t);}jt(t){t instanceof u&&this.De.push(t);}removeAllSubscriptions(){if(this.rr())for(const t of this.De)t.removeAllSubscriptions();}removeSubscription(t){if(this.rr())for(const i of this.De)i.removeSubscription(t);}le(t){this.wo=t;}Mo(){return this.No}Wo(){return this.wo}Ds(){return this.Po}}const e=new Rt;
|
|
213
|
+
|
|
214
|
+
const s={G:(o,n,s)=>{const a=new t,i=e.g();if(!i)return r$1.D.info(`Not logging event with type "${o}" because the current session ID could not be found.`),a;const m=i.mo();return a.ve.push(new ue(s||e.p().getUserId(),o,(new Date).valueOf(),m,n)),a.S=e.l().bo(a.ve),a}};var s$1 = s;
|
|
215
|
+
|
|
216
|
+
class a{constructor(s,t,r){this.h=s,this.j=t,this.v=r;}C(n,i){const e=new t;if(n.k(),null==n.url||""===n.url)return r$1.D.info(`Card ${n.id} has no url. Not logging click to Braze servers.`),e;if(i){const s=this.h.I(STORAGE_KEYS.q.$)||{};s[n.id]=!0,this.h.B(STORAGE_KEYS.q.$,s);}const l=this.N([n]);if(null==l)return e;const u=i?r$1.A._:r$1.A.F;return s$1.G(u,l)}H(n){const i=new t;if(!n.J())return r$1.D.info(`Card ${n.id} refused this dismissal. Ignoring analytics event.`),i;const e=this.h.I(STORAGE_KEYS.q.K)||{};e[n.id]=!0,this.h.B(STORAGE_KEYS.q.K,e);const l=this.N([n]);return null==l?i:s$1.G(r$1.A.L,l)}M(n,i){const e=new t(!0),l=[],u=[];let a;a=i?this.h.I(STORAGE_KEYS.q.O)||{}:this.h.I(STORAGE_KEYS.q.P)||{};for(const s of n)s.R(),s instanceof ControlCard?u.push(s):l.push(s),a[s.id]=!0;const c=this.N(l),h=this.N(u);if(null==c&&null==h)return e.S=!1,e;if(i?this.h.B(STORAGE_KEYS.q.O,a):this.h.B(STORAGE_KEYS.q.P,a),null!=c){const t=i?r$1.A.T:r$1.A.U,n=s$1.G(t,c);e.V(n);}if(null!=h&&i){const t=s$1.G(r$1.A.W,h);e.V(t);}return e}N(s){let t=null;for(let r=0;r<s.length;r++)null!=s[r].id&&""!==s[r].id&&(t=t||{},t.ids=t.ids||[],t.ids.push(s[r].id));return t}}
|
|
217
|
+
|
|
218
|
+
const n={t:!1,i:null,m:()=>(n.o(),n.i||(n.i=new a(e.l(),e.g(),e.p())),n.i),o:()=>{n.t||(e.u(n),n.t=!0);},destroy:()=>{n.i=null,n.t=!1;}};var n$1 = n;
|
|
219
|
+
|
|
220
|
+
function logCardClick(o,a){return !!e.rr()&&(o instanceof Card?n$1.m().C(o,a).S:(r$1.D.error("card "+MUST_BE_CARD_WARNING_SUFFIX),!1))}
|
|
221
|
+
|
|
222
|
+
function logCardDismissal(o){return !!e.rr()&&(o instanceof Card?n$1.m().H(o).S:(r$1.D.error("card "+MUST_BE_CARD_WARNING_SUFFIX),!1))}
|
|
223
|
+
|
|
224
|
+
function logCardImpressions(o,s){if(!e.rr())return !1;if(!isArray(o))return r$1.D.error("cards must be an array"),!1;for(const s of o)if(!(s instanceof Card))return r$1.D.error(`Each card in cards ${MUST_BE_CARD_WARNING_SUFFIX}`),!1;return n$1.m().M(o,s).S}
|
|
225
|
+
|
|
226
|
+
function logContentCardImpressions(o){return logCardImpressions(o,!0)}
|
|
227
|
+
|
|
228
|
+
class x{constructor(e,r){this.cards=e,this.lastUpdated=r;}getUnreadCardCount(){let e=0;for(const r of this.cards)r.viewed||r instanceof ControlCard||e++;return e}dr(){throw new Error("Must be implemented in a subclass")}logCardImpressions(){throw new Error("Must be implemented in subclass")}logCardClick(){throw new Error("Must be implemented in subclass")}sr(){throw new Error("Must be implemented in subclass")}}x.ur=6e4,x.Mi=500,x.uo=1e4;
|
|
229
|
+
|
|
230
|
+
function newCard(e,n,t,o,i,l,u,d,a,s,w,f,m,C,p,c,x,F){let b;if(n===Card.es.dt||n===Card.es.Rt)b=new ClassicCard(e,t,o,i,l,u,d,a,s,w,f,m,C,p,c,x);else if(n===Card.es.st)b=new CaptionedImage(e,t,o,i,l,u,d,a,s,w,f,m,C,p,c,x);else if(n===Card.es.rs)b=new Banner(e,t,i,u,d,a,s,w,f,m,C,p,c,x);else {if(n!==Card.es._t)return r$1.D.error("Ignoring card with unknown type "+n),null;b=new ControlCard(e,t,d,s,C,p);}return F&&(b.test=F),b}function newCardFromContentCardsJson(e){if(e[Card.At.Dt])return null;const n=e[Card.At.ns],r=e[Card.At.ts],t=e[Card.At.ls],o=e[Card.At.ht],i=e[Card.At.os],l=e[Card.At.rt],u=dateFromUnixTimestamp(e[Card.At.us]),d=u;let a;a=e[Card.At.ps]===Card.Ct?null:dateFromUnixTimestamp(e[Card.At.ps]);return newCard(n,r,t,o,i,l,d,u,null,a,e[Card.At.URL],e[Card.At.bs],e[Card.At.fs],e[Card.At.xs],e[Card.At.js],e[Card.At.zs],e[Card.At.gs],e[Card.At.ks]||!1)}function newCardFromFeedJson(e){return newCard(e.id,e.type,e.viewed,e.title,e.image,e.description,dateFromUnixTimestamp(e.created),dateFromUnixTimestamp(e.updated),e.categories,dateFromUnixTimestamp(e.expires_at),e.url,e.domain,e.aspect_ratio,e.extras,!1,!1)}function newCardFromSerializedValue(e){return newCard(e[Card.hs.ns],e[Card.hs.ts],e[Card.hs.ls],e[Card.hs.ht],e[Card.hs.os],e[Card.hs.rt],rehydrateDateAfterJsonization(e[Card.hs.cs]),rehydrateDateAfterJsonization(e[Card.hs.us]),e[Card.hs.ds],rehydrateDateAfterJsonization(e[Card.hs.ps]),e[Card.hs.URL],e[Card.hs.bs],e[Card.hs.fs],e[Card.hs.xs],e[Card.hs.js],e[Card.hs.zs],e[Card.hs.gs],e[Card.hs.ks]||!1)||void 0}
|
|
231
|
+
|
|
232
|
+
class v extends y{constructor(t,s,i,h,n){super(),this.v=t,this.h=s,this.gt=i,this.wt=h,this.vt=n,this.yt=new u,e.jt(this.yt),this.Ut=0,this.kt=0,this.zt();const o=r$1.xt.Ft;new r$1.qt(o,r$1.D).Jt(o.$t.Mt,(t=>{this.Bt(t);})),this.Gt=null;}Ht(){return this.Kt}Qt(t){this.Kt=t;}Vt(){return this.Wt}Xt(t){this.Wt=t;}zt(){const t=this.h.I(STORAGE_KEYS.q.Yt)||[],s=[];for(let i=0;i<t.length;i++){const e=newCardFromSerializedValue(t[i]);null!=e&&s.push(e);}this.Zt=this.Cs(this.ws(s,!1)),this.Ut=this.h.I(STORAGE_KEYS.q.vs)||this.Ut,this.kt=this.h.I(STORAGE_KEYS.q.ys)||this.kt;}Ns(t,s,i,e){let h;if(s){h=[];for(const t of this.Zt)t.test&&h.push(t);}else h=this.Zt.slice();for(let i=0;i<t.length;i++){const e=t[i];let r=null;for(let t=0;t<this.Zt.length;t++)if(e.id===this.Zt[t].id){r=this.Zt[t];break}if(s){const t=newCardFromContentCardsJson(e);null!=r&&r.viewed&&(t.viewed=!0),null!=t&&h.push(t);}else if(null==r){const t=newCardFromContentCardsJson(e);null!=t&&h.push(t);}else {if(!r.ct(e))for(let t=0;t<h.length;t++)if(e.id===h[t].id){h.splice(t,1);break}}}this.Zt=this.Cs(this.ws(h,s)),this.Ss(),this.Ut=i||0,this.h.B(STORAGE_KEYS.q.vs,this.Ut),this.kt=e||0,this.h.B(STORAGE_KEYS.q.ys,this.kt);}Rs(t){if(this.Ts()&&null!=t&&t.cards){this.h.B(STORAGE_KEYS.q._s,e.Ds());const s=t.full_sync;s||this.zt(),this.Ns(t.cards,s,t.last_full_sync_at,t.last_card_updated_at),this.yt.St(this.Us(!0));}}Fs(t){this.h.B(STORAGE_KEYS.q.As,t);}Ls(t,i,e){const h=()=>{this.Is(i,e,!0);},n=readResponseHeaders(t);let a,l;if(this.Js(),!n["retry-after"])return void this.Fs(0);if(a=n["retry-after"],isNaN(a)&&!isNaN(Date.parse(a)))l=Date.parse(a)-(new Date).getTime(),l<0&&h();else {if(isNaN(parseFloat(a))){const t="Received unexpected value for retry-after header in /sync response";return s$1.G(r$1.A.qs,{e:t+": "+a}),void this.Fs(0)}l=1e3*a;}this.Gt=setTimeout((()=>{h();}),l);let c=this.h.I(STORAGE_KEYS.q.As);c&&!isNaN(parseInt(c))||(c=0),this.Fs(parseInt(c)+1);}Bt(t){if(!this.Ts())return;this.zt();const s=this.Zt.slice(),i=this.v.getUserId();for(let e=0;e<t.length;e++)if(i===t[e].userId||null==i&&null==t[e].userId){const i=t[e].card;let h=null;for(let t=0;t<this.Zt.length;t++)if(i.id===this.Zt[t].id){h=this.Zt[t];break}if(null==h){const t=newCardFromContentCardsJson(i);null!=t&&s.push(t);}else {if(!h.ct(i))for(let t=0;t<s.length;t++)if(i.id===s[t].id){s.splice(t,1);break}}}this.Zt=this.Cs(this.ws(s,!1)),this.Ss(),this.yt.St(this.Us(!0));}ws(t,s){const i=this.h.I(STORAGE_KEYS.q.$)||{},e=this.h.I(STORAGE_KEYS.q.O)||{},h=this.h.I(STORAGE_KEYS.q.K)||{},r={},n={},a={};for(let s=0;s<t.length;s++)i[t[s].id]&&(t[s].clicked=!0,r[t[s].id]=!0),e[t[s].id]&&(t[s].viewed=!0,n[t[s].id]=!0),h[t[s].id]&&(t[s].dismissed=!0,a[t[s].id]=!0);return s&&(this.h.B(STORAGE_KEYS.q.$,r),this.h.B(STORAGE_KEYS.q.O,n),this.h.B(STORAGE_KEYS.q.K,a)),t}Cs(t){const s=[],i=new Date,e=this.h.I(STORAGE_KEYS.q.K)||{};let h=!1;for(let n=0;n<t.length;n++){const o=t[n].url;!this.wt&&o&&isURIJavascriptOrData(o)?r$1.D.error(`Card with url ${o} will not be displayed because Javascript URLs are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable this card.`):(null==t[n].expiresAt||t[n].expiresAt>=i)&&!t[n].dismissed?s.push(t[n]):(e[t[n].id]=!0,h=!0);}return h&&this.h.B(STORAGE_KEYS.q.K,e),s}Ss(){const t=[];for(let s=0;s<this.Zt.length;s++)t.push(this.Zt[s].ss());this.h.B(STORAGE_KEYS.q.Yt,t);}Js(){this.Gt&&(clearTimeout(this.Gt),this.Gt=null);}Is(t,s,i){if(i||(this.Js(),this.Fs(0)),!this.Ts())return void(this.Es||(this.Es=this.gt.Ms((()=>{this.Is(t,s);}))));const h=this.vt.Ps({},!0);this.h.I(STORAGE_KEYS.q._s)!==e.Ds()&&this.$s(),h.last_full_sync_at=this.Ut,h.last_card_updated_at=this.kt;const r=this.vt.Bs(h,!0,i);this.vt.Gs(h,(()=>{b.Hs({url:this.vt.Ks()+"/content_cards/sync",data:h,headers:r,S:(i,e)=>{this.vt.Os(h,i,r)?(this.vt.Qs(),this.Ls(e,t,s),this.Rs(i),"function"==typeof t&&t()):"function"==typeof s&&s();},error:t=>{this.vt.Vs(t,"retrieving content cards"),"function"==typeof s&&s();}});}));}Us(t){t||this.zt();const s=this.Cs(this.Zt);s.sort(((t,s)=>t.pinned&&!s.pinned?-1:s.pinned&&!t.pinned?1:t.updated>s.updated?-1:s.updated>t.updated?1:0));let i=Math.max(this.kt||0,this.Ut||0);return 0===i&&(i=void 0),this.h.I(STORAGE_KEYS.q.ys)===this.kt&&void 0===i&&(i=this.kt),new ContentCards(s,dateFromUnixTimestamp(i))}Ws(t){return this.yt.ut(t)}$s(){this.Ut=0,this.kt=0,this.h.Xs(STORAGE_KEYS.q.vs),this.h.Xs(STORAGE_KEYS.q.ys);}changeUser(t){t||(this.Zt=[],this.yt.St(new ContentCards(this.Zt.slice(),null)),this.h.Xs(STORAGE_KEYS.q.Yt),this.h.Xs(STORAGE_KEYS.q.$),this.h.Xs(STORAGE_KEYS.q.O),this.h.Xs(STORAGE_KEYS.q.K)),this.$s();}clearData(t){this.Ut=0,this.kt=0,this.Zt=[],this.yt.St(new ContentCards(this.Zt.slice(),null)),t&&(this.h.Xs(STORAGE_KEYS.q.Yt),this.h.Xs(STORAGE_KEYS.q.$),this.h.Xs(STORAGE_KEYS.q.O),this.h.Xs(STORAGE_KEYS.q.K),this.h.Xs(STORAGE_KEYS.q.vs),this.h.Xs(STORAGE_KEYS.q.ys));}Ts(){return !!this.gt.Ys()||(0!==this.gt.Zs()&&this.ti(),!1)}ti(){this.yt.St(new ContentCards([],(new Date).valueOf())),this.h.Xs(STORAGE_KEYS.q.Yt);}}
|
|
233
|
+
|
|
234
|
+
const g={t:!1,provider:null,er:()=>(g.o(),g.provider||(g.provider=new v(e.p(),e.l(),e.ir(),e.tr(),e.nr()),e.ar(g.provider)),g.provider),o:()=>{g.t||(e.u(g),g.t=!0);},destroy:()=>{g.provider=null,g.t=!1;}};var g$1 = g;
|
|
235
|
+
|
|
236
|
+
function requestContentCardsRefresh(r,t){if(e.rr())return g$1.er().Is(r,t)}
|
|
237
|
+
|
|
238
|
+
class ContentCards extends x{constructor(r,e){super(r,e);}getUnviewedCardCount(){return super.getUnreadCardCount()}logCardImpressions(r){logCardImpressions(r,!0);}logCardClick(r){logCardClick(r,!0);}sr(){requestContentCardsRefresh();}dr(){return !0}}ContentCards.ur=6e4;
|
|
239
|
+
|
|
240
|
+
function getCachedContentCards(){if(e.rr())return g$1.er().Us(!1)}
|
|
241
|
+
|
|
242
|
+
function topHadImpression(t){return null!=t&&!!t.getAttribute("data-ab-had-top-impression")}function impressOnTop(t){null!=t&&t.setAttribute("data-ab-had-top-impression",!0);}function bottomHadImpression(t){return null!=t&&!!t.getAttribute("data-ab-had-bottom-impression")}function impressOnBottom(t){null!=t&&t.setAttribute("data-ab-had-bottom-impression",!0);}function markCardAsRead(t){if(null!=t){const o=t.querySelectorAll(".ab-unread-indicator")[0];null!=o&&(o.className+=" read");}}function getCardId(t){return t.getAttribute("data-ab-card-id")}function _setImageAltText(t,o){let a="";t.title||t.description||(a="Feed Image"),o.setAttribute("alt",a);}function setCardHeight(t,o){const a=o.querySelectorAll(".ab-image-area");let e,n=0;a.length>0&&(n=a[0].offsetWidth);for(const o of t)if(e=o.X,e&&o.imageUrl&&!isNaN(o.aspectRatio)){const t=n/o.aspectRatio;t&&(e.style.height=`${t}px`);}}function cardToHtml(t,logCardClick,o){const a=document.createElement("div");a.className="ab-card ab-effect-card "+t.Y,a.setAttribute("data-ab-card-id",t.id),a.setAttribute("role","article"),a.setAttribute("tabindex","0");const e=t.url&&""!==t.url,n=n=>(markCardAsRead(a),e&&(logCardClick(t),_handleBrazeAction(t.url,n,o)),!1);if(t.pinned){const t=document.createElement("div");t.className="ab-pinned-indicator";const o=document.createElement("i");o.className="fa fa-star",t.appendChild(o),a.appendChild(t);}if(t.imageUrl&&""!==t.imageUrl){const o=document.createElement("div");o.className="ab-image-area";const i=document.createElement("img");if(i.setAttribute("src",t.imageUrl),i.onload=()=>{a.style.height="auto";},_setImageAltText(t,i),o.appendChild(i),a.className+=" with-image",e&&!t.Z){const e=document.createElement("a");e.setAttribute("href",t.url),e.onclick=n,e.appendChild(o),a.appendChild(e);}else a.appendChild(o);}const s=document.createElement("div");if(s.className="ab-card-body",t.dismissible){t.tt=()=>logCardDismissal(t);const o=createCloseButton("Dismiss Card",void 0,t.dismissCard.bind(t));a.appendChild(o),detectSwipe(s,DIRECTIONS.ot,(t=>{a.className+=" ab-swiped-left",o.onclick(t);})),detectSwipe(s,DIRECTIONS.et,(t=>{a.className+=" ab-swiped-right",o.onclick(t);}));}const u=t.title&&""!==t.title;if(u){const o=document.createElement("h1");if(o.className="ab-title",o.id=r$1.it.nt(),a.setAttribute("aria-labelledby",o.id),e){const a=document.createElement("a");a.setAttribute("href",t.url),a.onclick=n,a.appendChild(document.createTextNode(t.title)),o.appendChild(a);}else o.appendChild(document.createTextNode(t.title));s.appendChild(o);}const p=document.createElement("div");if(p.className=u?"ab-description":"ab-description ab-no-title",p.id=r$1.it.nt(),a.setAttribute("aria-describedby",p.id),p.appendChild(document.createTextNode(t.description)),e){const o=document.createElement("div");o.className="ab-url-area";const a=document.createElement("a");a.setAttribute("href",t.url),a.appendChild(document.createTextNode(t.linkText)),a.onclick=n,o.appendChild(a),p.appendChild(o);}s.appendChild(p),a.appendChild(s);const b=document.createElement("div");return b.className="ab-unread-indicator",t.viewed&&(b.className+=" read"),a.appendChild(b),t.X=a,a}
|
|
243
|
+
|
|
244
|
+
var zt = {en:{NO_CARDS_MESSAGE:"We have no updates for you at this time.<br/>Please check again later.",FEED_TIMEOUT_MESSAGE:"Sorry, this refresh timed out.<br/>Please try again later."},ar:{NO_CARDS_MESSAGE:"ليس لدينا أي تحديث. يرجى التحقق مرة أخرى لاحقاً",FEED_TIMEOUT_MESSAGE:"يرجى تكرار المحاولة لاحقا"},cs:{NO_CARDS_MESSAGE:"V tuto chvíli pro vás nemáme žádné aktualizace.<br/>Zkontrolujte prosím znovu později.",FEED_TIMEOUT_MESSAGE:"Prosím zkuste to znovu později."},da:{NO_CARDS_MESSAGE:"Vi har ingen updates.<br/>Prøv venligst senere.",FEED_TIMEOUT_MESSAGE:"Prøv venligst senere."},de:{NO_CARDS_MESSAGE:"Derzeit sind keine Updates verfügbar.<br/>Bitte später noch einmal versuchen.",FEED_TIMEOUT_MESSAGE:"Bitte später noch einmal versuchen."},es:{NO_CARDS_MESSAGE:"No tenemos actualizaciones.<br/>Por favor compruébelo más tarde.",FEED_TIMEOUT_MESSAGE:"Por favor inténtelo más tarde."},"es-mx":{NO_CARDS_MESSAGE:"No tenemos ninguna actualización.<br/>Vuelva a verificar más tarde.",FEED_TIMEOUT_MESSAGE:"Por favor, vuelva a intentarlo más tarde."},et:{NO_CARDS_MESSAGE:"Uuendusi pole praegu saadaval.<br/>Proovige hiljem uuesti.",FEED_TIMEOUT_MESSAGE:"Palun proovige hiljem uuesti."},fi:{NO_CARDS_MESSAGE:"Päivityksiä ei ole saatavilla.<br/>Tarkista myöhemmin uudelleen.",FEED_TIMEOUT_MESSAGE:"Yritä myöhemmin uudelleen."},fr:{NO_CARDS_MESSAGE:"Aucune mise à jour disponible.<br/>Veuillez vérifier ultérieurement.",FEED_TIMEOUT_MESSAGE:"Veuillez réessayer ultérieurement."},he:{NO_CARDS_MESSAGE:".אין לנו עדכונים. בבקשה בדוק שוב בקרוב",FEED_TIMEOUT_MESSAGE:".בבקשה נסה שוב בקרוב"},hi:{NO_CARDS_MESSAGE:"हमारे पास कोई अपडेट नहीं हैं। कृपया बाद में फिर से जाँच करें.।",FEED_TIMEOUT_MESSAGE:"कृपया बाद में दोबारा प्रयास करें।."},id:{NO_CARDS_MESSAGE:"Kami tidak memiliki pembaruan. Coba lagi nanti.",FEED_TIMEOUT_MESSAGE:"Coba lagi nanti."},it:{NO_CARDS_MESSAGE:"Non ci sono aggiornamenti.<br/>Ricontrollare più tardi.",FEED_TIMEOUT_MESSAGE:"Riprovare più tardi."},ja:{NO_CARDS_MESSAGE:"アップデートはありません。<br/>後でもう一度確認してください。",FEED_TIMEOUT_MESSAGE:"後でもう一度試してください。"},ko:{NO_CARDS_MESSAGE:"업데이트가 없습니다. 다음에 다시 확인해 주십시오.",FEED_TIMEOUT_MESSAGE:"나중에 다시 시도해 주십시오."},ms:{NO_CARDS_MESSAGE:"Tiada kemas kini. Sila periksa kemudian.",FEED_TIMEOUT_MESSAGE:"Sila cuba kemudian."},nl:{NO_CARDS_MESSAGE:"Er zijn geen updates.<br/>Probeer het later opnieuw.",FEED_TIMEOUT_MESSAGE:"Probeer het later opnieuw."},no:{NO_CARDS_MESSAGE:"Vi har ingen oppdateringer.<br/>Vennligst sjekk igjen senere.",FEED_TIMEOUT_MESSAGE:"Vennligst prøv igjen senere."},pl:{NO_CARDS_MESSAGE:"Brak aktualizacji.<br/>Proszę sprawdzić ponownie później.",FEED_TIMEOUT_MESSAGE:"Proszę spróbować ponownie później."},pt:{NO_CARDS_MESSAGE:"Não temos atualizações.<br/>Por favor, verifique mais tarde.",FEED_TIMEOUT_MESSAGE:"Por favor, tente mais tarde."},"pt-br":{NO_CARDS_MESSAGE:"Não temos nenhuma atualização.<br/>Verifique novamente mais tarde.",FEED_TIMEOUT_MESSAGE:"Tente novamente mais tarde."},ru:{NO_CARDS_MESSAGE:"Обновления недоступны.<br/>Пожалуйста, проверьте снова позже.",FEED_TIMEOUT_MESSAGE:"Пожалуйста, повторите попытку позже."},sv:{NO_CARDS_MESSAGE:"Det finns inga uppdateringar.<br/>Försök igen senare.",FEED_TIMEOUT_MESSAGE:"Försök igen senare."},th:{NO_CARDS_MESSAGE:"เราไม่มีการอัพเดต กรุณาตรวจสอบภายหลัง.",FEED_TIMEOUT_MESSAGE:"กรุณาลองใหม่ภายหลัง."},uk:{NO_CARDS_MESSAGE:"Оновлення недоступні.<br/>ласка, перевірте знову пізніше.",FEED_TIMEOUT_MESSAGE:"Будь ласка, спробуйте ще раз пізніше."},vi:{NO_CARDS_MESSAGE:"Chúng tôi không có cập nhật nào.<br/>Vui lòng kiểm tra lại sau.",FEED_TIMEOUT_MESSAGE:"Vui lòng thử lại sau."},"zh-hk":{NO_CARDS_MESSAGE:"暫時沒有更新.<br/>請稍候再試.",FEED_TIMEOUT_MESSAGE:"請稍候再試."},"zh-hans":{NO_CARDS_MESSAGE:"暂时没有更新.<br/>请稍后再试.",FEED_TIMEOUT_MESSAGE:"请稍候再试."},"zh-hant":{NO_CARDS_MESSAGE:"暫時沒有更新.<br/>請稍候再試.",FEED_TIMEOUT_MESSAGE:"請稍候再試."},"zh-tw":{NO_CARDS_MESSAGE:"暫時沒有更新.<br/>請稍候再試.",FEED_TIMEOUT_MESSAGE:"請稍候再試."},zh:{NO_CARDS_MESSAGE:"暂时没有更新.<br/>请稍后再试.",FEED_TIMEOUT_MESSAGE:"请稍候再试."}};
|
|
245
|
+
|
|
246
|
+
class er{constructor(t,l){if(null!=t&&(t=t.toLowerCase()),null!=t&&null==zt[t]){const l=t.indexOf("-");l>0&&(t=t.substring(0,l));}if(null==zt[t]){const a="Braze does not yet have a localization for language "+t+", defaulting to English. Please contact us if you are willing and able to help us translate our SDK into this language.";l?r$1.D.error(a):r$1.D.info(a),t="en";}this.language=t;}get(t){return zt[this.language][t]}}
|
|
247
|
+
|
|
248
|
+
const Ee={t:!1,i:null,m:()=>{if(Ee.o(),!Ee.i){let r=et.language,t=!1;e.nn(T.jn)&&(r=e.nn(T.jn),t=!0),Ee.i=new er(r,t);}return Ee.i},o:()=>{Ee.t||(e.u(Ee),Ee.t=!0);},destroy:()=>{Ee.i=null,Ee.t=!1;}};
|
|
249
|
+
|
|
250
|
+
function removeSubscription(r){e.rr()&&e.removeSubscription(r);}
|
|
251
|
+
|
|
252
|
+
const LAST_REQUESTED_REFRESH_DATA_ATTRIBUTE="data-last-requested-refresh";function destroyFeedHtml(e){e&&(e.className=e.className.replace("ab-show","ab-hide"),setTimeout((()=>{e&&e.parentNode&&e.parentNode.removeChild(e);}),x.Mi));const t=e.getAttribute("data-update-subscription-id");null!=t&&removeSubscription(t);}function _generateFeedBody(e,t){const o=document.createElement("div");if(o.className="ab-feed-body",o.setAttribute("aria-label","Feed"),o.setAttribute("role","feed"),null==e.lastUpdated){const e=document.createElement("div");e.className="ab-no-cards-message";const t=document.createElement("i");t.className="fa fa-spinner fa-spin fa-4x ab-initial-spinner",e.appendChild(t),o.appendChild(e);}else {let s=!1;const logCardClick=t=>{e.logCardClick(t);};for(const n of e.cards){const a=n instanceof ControlCard;!a||e.dr()?(o.appendChild(cardToHtml(n,logCardClick,t)),s=s||!a):r$1.D.error("Received a control card for a legacy news feed. Control cards are only supported with content cards.");}if(!s){const e=document.createElement("div");e.className="ab-no-cards-message",e.innerHTML=Ee.m().get("NO_CARDS_MESSAGE"),e.setAttribute("role","article"),o.appendChild(e);}}return o}function detectFeedImpressions(e,t){if(null!=t){const o=[],r=t.querySelectorAll(".ab-card");e.do||(e.do={});for(let t=0;t<r.length;t++){const s=getCardId(r[t]);if(e.do[s])continue;let n=topHadImpression(r[t]),a=bottomHadImpression(r[t]);const i=n,d=a,f=topIsInView(r[t]),c=bottomIsInView(r[t]);if(!n&&f&&(n=!0,impressOnTop(r[t])),!a&&c&&(a=!0,impressOnBottom(r[t])),n&&a){if(f||c||markCardAsRead(r[t]),i&&d)continue;for(const t of e.cards)if(t.id===s){e.do[t.id]=!0,o.push(t);break}}}o.length>0&&e.logCardImpressions(o);}}function refreshFeed(e,t){t.setAttribute("aria-busy","true");const o=t.querySelectorAll(".ab-refresh-button")[0];null!=o&&(o.className+=" fa-spin");const r=(new Date).valueOf().toString();t.setAttribute("data-last-requested-refresh",r),setTimeout((()=>{if(t.getAttribute("data-last-requested-refresh")===r){const e=t.querySelectorAll(".fa-spin");for(let t=0;t<e.length;t++)e[t].className=e[t].className.replace(/fa-spin/g,"");const o=t.querySelectorAll(".ab-initial-spinner")[0];if(null!=o){const e=document.createElement("span");e.innerHTML=Ee.m().get("FEED_TIMEOUT_MESSAGE"),o.parentNode.appendChild(e),o.parentNode.removeChild(o);}"true"===t.getAttribute("aria-busy")&&t.setAttribute("aria-busy","false");}}),x.uo),e.sr();}function feedToHtml(e,t){const o=document.createElement("div");o.className="ab-feed ab-hide ab-effect-slide",o.setAttribute("role","dialog"),o.setAttribute("aria-label","Feed"),o.setAttribute("tabindex","-1");const r=document.createElement("div");r.className="ab-feed-buttons-wrapper",r.setAttribute("role","group"),o.appendChild(r);const s=document.createElement("i");s.className="fa fa-times ab-close-button",s.setAttribute("aria-label","Close Feed"),s.setAttribute("tabindex","0"),s.setAttribute("role","button");const n=e=>{destroyFeedHtml(o),e.stopPropagation();};s.addEventListener("keydown",(e=>{e.keyCode!==KeyCodes.fo&&e.keyCode!==KeyCodes.co||n(e);})),s.onclick=n;const a=document.createElement("i");a.className="fa fa-refresh ab-refresh-button",null==e.lastUpdated&&(a.className+=" fa-spin"),a.setAttribute("aria-label","Refresh Feed"),a.setAttribute("tabindex","0"),a.setAttribute("role","button");const i=t=>{refreshFeed(e,o),t.stopPropagation();};return a.addEventListener("keydown",(e=>{e.keyCode!==KeyCodes.fo&&e.keyCode!==KeyCodes.co||i(e);})),a.onclick=i,r.appendChild(a),r.appendChild(s),o.appendChild(_generateFeedBody(e,t)),o.onscroll=()=>{detectFeedImpressions(e,o);},o}function updateFeedCards(e,t,o,s,n){if(!isArray(t))return;const a=[];for(const e of t)if(e instanceof Card){if(e.url&&BRAZE_ACTION_URI_REGEX.test(e.url)){let t=getDecodedBrazeAction(e.url);if(containsUnknownBrazeAction(t)){r$1.D.error(ineligibleBrazeActionURLErrorMessage(INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.We,"Content Card"));continue}}a.push(e);}if(e.cards=a,e.lastUpdated=o,null!=s)if(s.setAttribute("aria-busy","false"),null==e.lastUpdated)destroyFeedHtml(s);else {const t=s.querySelectorAll(".ab-feed-body")[0];if(null!=t){const o=_generateFeedBody(e,n);t.parentNode.replaceChild(o,t),detectFeedImpressions(e,o.parentNode);}}}function registerFeedSubscriptionId(e,t){t.setAttribute("data-update-subscription-id",e);}
|
|
253
|
+
|
|
254
|
+
function hideContentCards(n){if(!e.rr())return;const o=document.querySelectorAll(".ab-feed");for(let e=0;e<o.length;e++)(null==n||null!=n&&o[e].parentNode===n)&&destroyFeedHtml(o[e]);}
|
|
255
|
+
|
|
256
|
+
function logContentCardsDisplayed(){if(e.rr())return logDeprecationWarning("logContentCardsDisplayed","method"),!0}
|
|
257
|
+
|
|
258
|
+
function showContentCards(n,t){if(!e.rr())return;setupFeedUI();let o=!1;null==n&&(n=document.body,o=!0);const a=e.nn(T.tn)||e.nn(T.en)||!1;let i=g$1.er().Us(!1);"function"==typeof t&&updateFeedCards(i,t(i.cards.slice()),i.lastUpdated,null,a);const s=feedToHtml(i,a),f=g$1.er();(null==i.lastUpdated||(new Date).valueOf()-i.lastUpdated.valueOf()>ContentCards.ur)&&(null==f.Ht()||(new Date).valueOf()-f.Ht()>ContentCards.ur)&&(r$1.D.info(`Cached content cards were older than max TTL of ${ContentCards.ur} ms, requesting an update from the server.`),refreshFeed(i,s),f.Qt((new Date).valueOf()));const l=(new Date).valueOf(),c=subscribeToContentCardsUpdates((function(n){const e=s.querySelectorAll(".ab-refresh-button")[0];if(null!=e){let n=500;const t=parseInt(s.getAttribute(LAST_REQUESTED_REFRESH_DATA_ATTRIBUTE));isNaN(t)?n-=(new Date).valueOf()-l:n-=(new Date).valueOf()-t,setTimeout((function(){e.className=e.className.replace(/fa-spin/g,"");}),Math.max(n,0));}let o=n.cards;"function"==typeof t&&(o=t(o.slice())),updateFeedCards(i,o,n.lastUpdated,s,a);}));registerFeedSubscriptionId(c,s);const u=function(n){const t=n.querySelectorAll(".ab-feed");let e=null;for(let o=0;o<t.length;o++)t[o].parentNode===n&&(e=t[o]);null!=e?(destroyFeedHtml(e),e.parentNode.replaceChild(s,e)):n.appendChild(s),setTimeout((function(){s.className=s.className.replace("ab-hide","ab-show");}),0),o&&s.focus(),detectFeedImpressions(i,s),setCardHeight(i.cards,n);};var m;null!=n?u(n):window.onload=(m=window.onload,function(){"function"==typeof m&&m(),u(document.body);});}
|
|
259
|
+
|
|
260
|
+
function subscribeToContentCardsUpdates(r){if(!e.rr())return;const t=g$1.er(),n=t.Ws(r);if(!t.Vt()){const r=e.mr().cr((()=>{t.Is();}));t.Xt(r);}return n}
|
|
261
|
+
|
|
262
|
+
function toggleContentCards(n,o){e.rr()&&(document.querySelectorAll(".ab-feed").length>0?hideContentCards():showContentCards(n,o));}
|
|
263
|
+
|
|
264
|
+
var BrazeSdkMetadata = {GOOGLE_TAG_MANAGER:"gg",MPARTICLE:"mp",SEGMENT:"sg",TEALIUM:"tl",MANUAL:"manu",NPM:"npm",CDN:"wcd",SHOPIFY:"shp"};
|
|
265
|
+
|
|
266
|
+
function addSdkMetadata(a){if(e.rr()){if(!isArray(a))return r$1.D.error("Cannot set SDK metadata because metadata is not an array."),!1;for(const t of a)if(!validateValueIsFromEnum(BrazeSdkMetadata,t,"sdkMetadata contained an invalid value.","BrazeSdkMetadata"))return !1;return e.nr().addSdkMetadata(a),!0}}
|
|
267
|
+
|
|
268
|
+
function changeUser(s,i){return !!e.rr()&&(null==s||0===s.length||s!=s?(r$1.D.error("changeUser requires a non-empty userId."),!1):getByteLength(s)>User.ee?(r$1.D.error(`Rejected user id "${s}" because it is longer than ${User.ee} bytes.`),!1):!(null!=i&&!validateStandardString(i,"set signature for new user","signature"))&&void e.mr().changeUser(s.toString(),e.re(),i))}
|
|
269
|
+
|
|
270
|
+
function destroy(){r$1.D.info("Destroying Braze instance"),e.destroy(!0);}
|
|
271
|
+
|
|
272
|
+
function disableSDK(){null!=e.mr()&&e.mr().requestImmediateDataFlush();const n=new G.ne(null,!0);n.store(STORAGE_KEYS.ae,"This-cookie-will-expire-in-"+n.ie());const a=r$1.xt.Ft;new r$1.qt(a,r$1.D).setItem(a.$t.oe,a.se,!0),e.destroy(!1),e.le(!0);}
|
|
273
|
+
|
|
274
|
+
function enableSDK(){new G.ne(null,!0).remove(STORAGE_KEYS.ae);const a=r$1.xt.Ft;new r$1.qt(a,r$1.D).br(a.$t.oe,a.se),e.destroy(!1),e.le(!1);}
|
|
275
|
+
|
|
276
|
+
function getDeviceId(i){e.rr()&&(null==i&&r$1.D.error("getDeviceId must be supplied with a callback. e.g., braze.getDeviceId(function(deviceId) {console.log('the device id is ' + deviceId)})"),"function"==typeof i&&i(e.ce().te().id));}
|
|
277
|
+
|
|
278
|
+
function initialize(i,n){return e.initialize(i,n)}
|
|
279
|
+
|
|
280
|
+
function isDisabled(){return !!new G.ne(null,!0).lr(STORAGE_KEYS.ae)}
|
|
281
|
+
|
|
282
|
+
function logCustomEvent(t,o){if(!e.rr())return !1;if(null==t||t.length<=0)return r$1.D.error(`logCustomEvent requires a non-empty eventName, got "${t}". Ignoring event.`),!1;if(!validateCustomString(t,"log custom event","the event name"))return !1;const[n,i]=validateCustomProperties(o,"logCustomEvent","eventProperties",`log custom event "${t}"`,"event");if(!n)return !1;if(e.ir().ge(t))return r$1.D.info(`Custom Event "${t}" is blocklisted, ignoring.`),!1;const m=s$1.G(r$1.A.CustomEvent,{n:t,p:i});if(m.S){r$1.D.info(`Logged custom event "${t}".`);for(const e of m.ve)TriggersProviderFactory.er().je(V.be,[t,o],e);}return m.S}
|
|
283
|
+
|
|
284
|
+
var logCustomEvent$1 = /*#__PURE__*/Object.freeze({
|
|
285
|
+
__proto__: null,
|
|
286
|
+
logCustomEvent: logCustomEvent
|
|
288
287
|
});
|
|
289
288
|
|
|
289
|
+
function logPurchase(o,i,t,n,D){if(!e.rr())return !1;if(null==t&&(t="USD"),null==n&&(n=1),null==o||o.length<=0)return r$1.D.error(`logPurchase requires a non-empty productId, got "${o}", ignoring.`),!1;if(!validateCustomString(o,"log purchase","the purchase name"))return !1;let a=parseFloat(i);if(isNaN(a))return r$1.D.error(`logPurchase requires a numeric price, got ${i}, ignoring.`),!1;a=a.toFixed(2);const g=parseInt(n);if(isNaN(g))return r$1.D.error(`logPurchase requires an integer quantity, got ${n}, ignoring.`),!1;if(g<1||g>MAX_PURCHASE_QUANTITY)return r$1.D.error(`logPurchase requires a quantity >1 and <${MAX_PURCHASE_QUANTITY}, got ${g}, ignoring.`),!1;t=t.toUpperCase();if(-1===["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTC","BTN","BWP","BYR","BZD","CAD","CDF","CHF","CLF","CLP","CNY","COP","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EEK","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GGP","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","IMP","INR","IQD","IRR","ISK","JEP","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LVL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MTL","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","STD","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VEF","VND","VUV","WST","XAF","XAG","XAU","XCD","XDR","XOF","XPD","XPF","XPT","YER","ZAR","ZMK","ZMW","ZWL"].indexOf(t))return r$1.D.error(`logPurchase requires a valid currencyCode, got ${t}, ignoring.`),!1;const[u,P]=validateCustomProperties(D,"logPurchase","purchaseProperties",`log purchase "${o}"`,"purchase");if(!u)return !1;if(e.ir().Dr(o))return r$1.D.info(`Purchase "${o}" is blocklisted, ignoring.`),!1;const R=s$1.G(r$1.A.Pr,{pid:o,c:t,p:a,q:g,pr:P});if(R.S){r$1.D.info(`Logged ${g} purchase${g>1?"s":""} of "${o}" for ${t} ${a}.`);for(const r of R.ve)TriggersProviderFactory.er().je(V.Rr,[o,D],r);}return R.S}
|
|
290
|
+
|
|
291
|
+
var logPurchase$1 = /*#__PURE__*/Object.freeze({
|
|
292
|
+
__proto__: null,
|
|
293
|
+
logPurchase: logPurchase
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
function openSession(){if(!e.rr())return;e.mr().openSession();const i=r$1.xt.Ft,o=new r$1.qt(i,r$1.D);o.hr(i.$t.jr,(function(t,n){const s=n.lastClick,c=n.trackingString;r$1.D.info(`Firing push click trigger from ${c} push click at ${s}`);const g=e.mr().kr(s,c),f=function(){TriggersProviderFactory.er().je(V.vr,[c],g);};e.mr().zr(f,f),o.br(i.$t.jr,t);})),o.Jt(i.$t.$r,(function(r){e.mr().wr(r);}));}
|
|
297
|
+
|
|
298
|
+
function removeAllSubscriptions(){e.rr()&&e.removeAllSubscriptions();}
|
|
299
|
+
|
|
300
|
+
function requestImmediateDataFlush(a){e.rr()&&e.mr().requestImmediateDataFlush(a);}
|
|
301
|
+
|
|
302
|
+
var requestImmediateDataFlush$1 = /*#__PURE__*/Object.freeze({
|
|
303
|
+
__proto__: null,
|
|
304
|
+
requestImmediateDataFlush: requestImmediateDataFlush
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
function setLogger(e){r$1.D.setLogger(e);}
|
|
308
|
+
|
|
309
|
+
function setSdkAuthenticationSignature(t){return !!e.rr()&&(!(""===t||!validateStandardString(t,"set signature","signature",!1))&&(e.ii().setSdkAuthenticationSignature(t),!0))}
|
|
310
|
+
|
|
311
|
+
function subscribeToSdkAuthenticationFailures(r){if(e.rr())return e.ii().subscribeToSdkAuthenticationFailures(r)}
|
|
312
|
+
|
|
313
|
+
function toggleLogging(){r$1.D.toggleLogging();}
|
|
314
|
+
|
|
315
|
+
function wipeData(){if(null==e.l())throw new Error("Braze must be initialized before calling methods.");e.l().clearData();const o=keys(r$1.xt);for(let e=0;e<o.length;e++){const i=o[e],t=r$1.xt[i];new r$1.qt(t,r$1.D).clearData();}if(e.rr())for(const r of e.re())r.clearData(!0);}
|
|
316
|
+
|
|
317
|
+
class ee extends y{constructor(t,s){super(),this.h=t,this.si=s,this.yt=new u,e.jt(this.yt),this.zt();}zt(){const t=this.h.I(STORAGE_KEYS.q.ei)||[],s=[];for(let i=0;i<t.length;i++){const e=newCardFromSerializedValue(t[i]);null!=e&&s.push(e);}this.Zt=s,this.ri=rehydrateDateAfterJsonization(this.h.I(STORAGE_KEYS.q.hi));}oi(t){const s=[];let i=null;const e=this.h.I(STORAGE_KEYS.q.P)||{},r={};for(let h=0;h<t.length;h++){i=t[h];const o=newCardFromFeedJson(i);null!=o&&(e[o.id]&&(o.viewed=!0,r[o.id]=!0),s.push(o));}this.h.B(STORAGE_KEYS.q.P,r),this.Zt=s,this.Ss(),this.ri=new Date,this.h.B(STORAGE_KEYS.q.hi,this.ri);}Ss(){const t=[];for(let s=0;s<this.Zt.length;s++)t.push(this.Zt[s].ss());this.h.B(STORAGE_KEYS.q.ei,t);}Rs(t){null!=t&&t.feed&&(this.zt(),this.oi(t.feed),this.yt.St(new Feed(this.Zt.slice(),this.ri)));}ai(){this.zt();const t=[],s=new Date;for(let i=0;i<this.Zt.length;i++)(null==this.Zt[i].expiresAt||this.Zt[i].expiresAt>=s)&&t.push(this.Zt[i]);return new Feed(t,this.ri)}Is(){this.si.requestFeedRefresh();}Ws(t){return this.yt.ut(t)}clearData(t){null==t&&(t=!1),this.Zt=[],this.ri=null,t&&(this.h.Xs(STORAGE_KEYS.q.ei),this.h.Xs(STORAGE_KEYS.q.hi)),this.yt.St(new Feed(this.Zt.slice(),this.ri));}}
|
|
318
|
+
|
|
319
|
+
const re={t:!1,provider:null,er:()=>(re.o(),re.provider||(re.provider=new ee(e.l(),e.mr()),e.ar(re.provider)),re.provider),o:()=>{re.t||(e.u(re),re.t=!0);},destroy:()=>{re.provider=null,re.t=!1;}};var re$1 = re;
|
|
320
|
+
|
|
321
|
+
function requestFeedRefresh(){if(e.rr())return re$1.er().Is()}
|
|
322
|
+
|
|
323
|
+
class Feed extends x{constructor(r,e){super(r,e);}logCardImpressions(r){logCardImpressions(r,!1);}logCardClick(r){logCardClick(r,!1);}sr(){requestFeedRefresh();}dr(){return !1}}
|
|
324
|
+
|
|
325
|
+
function getCachedFeed(){if(e.rr())return re$1.er().ai()}
|
|
326
|
+
|
|
327
|
+
function destroyFeed(){if(!e.rr())return;const o=document.querySelectorAll(".ab-feed");for(let e=0;e<o.length;e++)destroyFeedHtml(o[e]);}
|
|
328
|
+
|
|
329
|
+
function logFeedDisplayed(){if(e.rr())return e.nr().yr(r$1.qr.Fr).S}
|
|
330
|
+
|
|
331
|
+
function showFeed(t,n,o){if(!e.rr())return;setupFeedUI();const s=(e,t)=>{if(null==t)return e;const n=[];for(let e=0;e<t.length;e++)n.push(t[e].toLowerCase());const o=[];for(let t=0;t<e.length;t++){const r=[];for(let n=0;n<e[t].categories.length;n++)r.push(e[t].categories[n].toLowerCase());intersection(r,n).length>0&&o.push(e[t]);}return o},i=e.nn(T.tn)||e.nn(T.en)||!1;let l=!1;null==t&&(t=document.body,l=!0);let a=!1,f=null;null==n?(f=re$1.er().ai(),updateFeedCards(f,s(f.cards,o),f.lastUpdated,null,i),a=!0):f=new Feed(s(n,o),new Date);const u=feedToHtml(f,i);if(a){(null==f.lastUpdated||(new Date).valueOf()-f.lastUpdated.valueOf()>Feed.ur)&&(r$1.D.info(`Cached feed was older than max TTL of ${Feed.ur} ms, requesting an update from the server.`),refreshFeed(f,u));const e=(new Date).valueOf(),t=subscribeToFeedUpdates((function(t){const n=u.querySelectorAll(".ab-refresh-button")[0];if(null!=n){let t=500;const o=parseInt(u.getAttribute(LAST_REQUESTED_REFRESH_DATA_ATTRIBUTE));isNaN(o)?t-=(new Date).valueOf()-e:t-=(new Date).valueOf()-o,setTimeout((function(){n.className=n.className.replace(/fa-spin/g,"");}),Math.max(t,0));}updateFeedCards(f,s(t.cards,o),t.lastUpdated,u,i);}));registerFeedSubscriptionId(t,u);}const m=e=>{const t=e.querySelectorAll(".ab-feed");let n=null;for(let o=0;o<t.length;o++)t[o].parentNode===e&&(n=t[o]);null!=n?(destroyFeedHtml(n),n.parentNode.replaceChild(u,n)):e.appendChild(u),setTimeout((function(){u.className=u.className.replace("ab-hide","ab-show");}),0),l&&u.focus(),logFeedDisplayed(),detectFeedImpressions(f,u),setCardHeight(f.cards,e);};var c;null!=t?m(t):window.onload=(c=window.onload,function(){"function"==typeof c&&c(),m(document.body);});}
|
|
332
|
+
|
|
333
|
+
var showFeed$1 = /*#__PURE__*/Object.freeze({
|
|
334
|
+
__proto__: null,
|
|
335
|
+
showFeed: showFeed
|
|
336
|
+
});
|
|
337
|
+
|
|
338
|
+
function subscribeToFeedUpdates(r){if(e.rr())return re$1.er().Ws(r)}
|
|
339
|
+
|
|
340
|
+
function toggleFeed(o,n,r){e.rr()&&(document.querySelectorAll(".ab-feed").length>0?destroyFeed():showFeed(o,n,r));}
|
|
341
|
+
|
|
342
|
+
function isPushBlocked(){if(e.rr())return ht$1.isPushBlocked()}
|
|
343
|
+
|
|
344
|
+
function isPushPermissionGranted(){if(e.rr())return ht$1.isPushPermissionGranted()}
|
|
345
|
+
|
|
346
|
+
function isPushSupported(){if(e.rr())return ht$1.isPushSupported()}
|
|
347
|
+
|
|
348
|
+
class aa{constructor(i,e,t,s,r,n,o,u,a,h){this.qi=i,this.Ji=e,this.Qi=t,this.Zi=s+"/safari/"+e,this.Sr=r||"/service-worker.js",this._r=n,this.gt=o,this.Ur=u||!1,this.Wr=a||!1,this.h=h,this.Nr=ht$1.Ir(),this.Vr=ht$1.Cr();}Er(){return this.Wr}Or(i,e,t,s,n){i.unsubscribe().then((i=>{i?this.Br(e,t,s,n):(r$1.D.error("Failed to unsubscribe device from push."),"function"==typeof n&&n(!1));})).catch((i=>{r$1.D.error("Push unsubscription error: "+i),"function"==typeof n&&n(!1);}));}Mr(i,e,t){const s=(i=>{if("string"==typeof i)return i;if(0!==i.endpoint.indexOf("https://android.googleapis.com/gcm/send"))return i.endpoint;let e=i.endpoint;return i.Yr&&-1===i.endpoint.indexOf(i.Yr)&&(e=i.endpoint+"/"+i.Yr),e})(i);let r=null,n=null;if(null!=i.getKey)try{r=btoa(String.fromCharCode.apply(null,new Uint8Array(i.getKey("p256dh")))),n=btoa(String.fromCharCode.apply(null,new Uint8Array(i.getKey("auth"))));}catch(i){if("invalid arguments"!==i.message)throw i}const o=(i=>{let e;return i.options&&(e=i.options.applicationServerKey)&&e.byteLength&&e.byteLength>0?btoa(String.fromCharCode.apply(null,new Uint8Array(e))).replace(/\+/g,"-").replace(/\//g,"_"):null})(i);this.qi.Gr(s,t,r,n,o),s&&"function"==typeof e&&e(s,r,n);}Hr(){this.qi.Jr(!0);}Kr(i,e){this.qi.Jr(!1),r$1.D.info(i),"function"==typeof e&&e(!1);}Lr(i,e,t,s){if("default"===e.permission)try{window.safari.pushNotification.requestPermission(this.Zi,i,{api_key:this.Ji,device_id:this.Qi.te().id},(e=>{"granted"===e.permission&&this.qi.setPushNotificationSubscriptionType(User.NotificationSubscriptionTypes.OPTED_IN),this.Lr(i,e,t,s);}));}catch(i){this.Kr("Could not request permission for push: "+i,s);}else "denied"===e.permission?this.Kr("The user has blocked notifications from this site, or Safari push is not configured in the Braze dashboard.",s):"granted"===e.permission&&(r$1.D.info("Device successfully subscribed to push."),this.Mr(e.deviceToken,t,new Date));}Qr(i,e,t){const s=s=>{switch(s){case"granted":return void("function"==typeof i&&i());case"default":return void("function"==typeof e&&e());case"denied":return void("function"==typeof t&&t());default:r$1.D.error("Received unexpected permission result "+s);}};let n=!1;const o=window.Notification.requestPermission((i=>{n&&s(i);}));o?o.then((i=>{s(i);})):n=!0;}Br(i,e,t,s){const n={userVisibleOnly:!0};null!=e&&(n.applicationServerKey=e),i.pushManager.subscribe(n).then((i=>{r$1.D.info("Device successfully subscribed to push."),this.Mr(i,t,new Date);})).catch((i=>{ht$1.isPushBlocked()?(r$1.D.info("Permission for push notifications was denied."),"function"==typeof s&&s(!1)):r$1.D.error("Push subscription failed: "+i);}));}Xr(){return this.Ur?navigator.serviceWorker.getRegistration():navigator.serviceWorker.register(this.Sr).then((()=>navigator.serviceWorker.ready.then((i=>(i&&"function"==typeof i.update&&i.update().catch((i=>{r$1.D.info("ServiceWorker update failed: "+i);})),i)))))}Zr(i){this.Ur||(i.unregister(),r$1.D.info("Service worker successfully unregistered."));}subscribe(i,e){if(ht$1.isPushSupported()){if(this.Nr){if(!this.Ur&&null!=window.location){let i=this.Sr;-1===i.indexOf(window.location.host)&&(i=window.location.host+i),-1===i.indexOf(window.location.protocol)&&(i=window.location.protocol+"//"+i);const e=i.substr(0,i.lastIndexOf("/")+1);if(0!==WindowUtils.hn().indexOf(e))return void r$1.D.error("Cannot subscribe to push from a path higher than the service worker location (tried to subscribe from "+window.location.pathname+" but service worker is at "+i+")")}if(ht$1.isPushBlocked())return void this.Kr("Notifications from this site are blocked. This may be a temporary embargo or a permanent denial.",e);if(this.gt&&!this.gt.fn()&&0===this.gt.Zs())return r$1.D.info("Waiting for VAPID key from server config before subscribing to push."),void this.gt.dn((()=>{this.subscribe(i,e);}));const t=()=>{r$1.D.info("Permission for push notifications was denied."),"function"==typeof e&&e(!1);},s=()=>{let i="Permission for push notifications was ignored.";ht$1.isPushBlocked()&&(i+=" The browser has automatically blocked further permission requests for a period (probably 1 week)."),r$1.D.info(i),"function"==typeof e&&e(!0);},n=ht$1.isPushPermissionGranted(),u=()=>{n||this.qi.setPushNotificationSubscriptionType(User.NotificationSubscriptionTypes.OPTED_IN),this.Xr().then((t=>{if(null==t)return r$1.D.error("No service worker registration. Set the `manageServiceWorkerExternally` initialization option to false or ensure that your service worker is registered before calling registerPush."),void("function"==typeof e&&e());t.pushManager.getSubscription().then((s=>{let n=null;if(this.gt&&null!=this.gt.fn()&&(n=r$1.bn.pn(this.gt.fn())),s){let u=null,a=null;const h=this.h.I(STORAGE_KEYS.q.gn);if(h&&!isArray(h)){let i;try{i=ei.yn(h).wn;}catch(e){i=null;}null==i||isNaN(i.getTime())||0===i.getTime()||(u=i,a=new Date(u),a.setMonth(u.getMonth()+6));}null!=n&&s.options&&s.options.applicationServerKey&&s.options.applicationServerKey.byteLength&&s.options.applicationServerKey.byteLength>0&&!isEqual(n,new Uint8Array(s.options.applicationServerKey))?(s.options.applicationServerKey.byteLength>12?r$1.D.info("Device was already subscribed to push using a different VAPID provider, creating new subscription."):r$1.D.info("Attempting to upgrade a gcm_sender_id-based push registration to VAPID - depending on the browser this may or may not result in the same gcm_sender_id-based subscription."),this.Or(s,t,n,i,e)):s.expirationTime&&new Date(s.expirationTime)<=(new Date).valueOf()?(r$1.D.info("Push subscription is expired, creating new subscription."),this.Or(s,t,n,i,e)):h&&isArray(h)?this.Or(s,t,n,i,e):null==a?(r$1.D.info("No push subscription creation date found, creating new subscription."),this.Or(s,t,n,i,e)):a<=(new Date).valueOf()?(r$1.D.info("Push subscription older than 6 months, creating new subscription."),this.Or(s,t,n,i,e)):(r$1.D.info("Device already subscribed to push, sending existing subscription to backend."),this.Mr(s,i,u));}else this.Br(t,n,i,e);})).catch((i=>{r$1.D.error("Error checking current push subscriptions: "+i);}));})).catch((i=>{r$1.D.error("ServiceWorker registration failed: "+i);}));};this.Qr(u,s,t);}else if(this.Vr){if(null==this._r||""===this._r)return void r$1.D.error("You must supply the safariWebsitePushId initialization option in order to use registerPush on Safari");const t=window.safari.pushNotification.permission(this._r);this.Lr(this._r,t,i,e);}}else r$1.D.info(this.vn);}unsubscribe(i,e){ht$1.isPushSupported()?this.Nr?navigator.serviceWorker.getRegistration().then((t=>{t?t.pushManager.getSubscription().then((s=>{s&&(this.Hr(),s.unsubscribe().then((s=>{s?(r$1.D.info("Device successfully unsubscribed from push."),"function"==typeof i&&i()):(r$1.D.error("Failed to unsubscribe device from push."),"function"==typeof e&&e()),this.Zr(t);})).catch((i=>{r$1.D.error("Push unsubscription error: "+i),"function"==typeof e&&e();})));})).catch((i=>{r$1.D.error("Error unsubscribing from push: "+i),"function"==typeof e&&e();})):(r$1.D.info("Device already unsubscribed from push."),"function"==typeof i&&i());})):this.Vr&&(this.Hr(),r$1.D.info("Device unsubscribed from push."),"function"==typeof i&&i()):r$1.D.info(this.vn);}}aa.vn="Push notifications are not supported in this browser.";
|
|
349
|
+
|
|
350
|
+
const ea={t:!1,pushManager:null,aa:()=>(ea.o(),ea.pushManager||(ea.pushManager=new aa(e.gr(),e.ea(),e.ce(),e.Ks(),e.nn(T.na),e.nn(T.ra),e.ir(),e.nn(T.ta),e.nn(T.ia),e.l())),ea.pushManager),o:()=>{ea.t||(e.u(ea),ea.t=!0);},destroy:()=>{ea.pushManager=null,ea.t=!1;}};var ea$1 = ea;
|
|
351
|
+
|
|
352
|
+
var pushManagerFactory = /*#__PURE__*/Object.freeze({
|
|
353
|
+
__proto__: null,
|
|
354
|
+
'default': ea$1
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
function requestPushPermission(r,n){if(e.rr())return ea$1.aa().subscribe(((n,o,t)=>{e.mr().requestImmediateDataFlush(),"function"==typeof r&&r(n,o,t);}),n)}
|
|
358
|
+
|
|
359
|
+
var requestPushPermission$1 = /*#__PURE__*/Object.freeze({
|
|
360
|
+
__proto__: null,
|
|
361
|
+
requestPushPermission: requestPushPermission
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
function unregisterPush(r,n){if(e.rr())return ea$1.aa().unsubscribe(r,n)}
|
|
365
|
+
|
|
366
|
+
var unregisterPush$1 = /*#__PURE__*/Object.freeze({
|
|
367
|
+
__proto__: null,
|
|
368
|
+
unregisterPush: unregisterPush
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
var src = /*#__PURE__*/Object.freeze({
|
|
372
|
+
__proto__: null,
|
|
373
|
+
WindowUtils: WindowUtils,
|
|
374
|
+
logCardClick: logCardClick,
|
|
375
|
+
logCardDismissal: logCardDismissal,
|
|
376
|
+
logCardImpressions: logCardImpressions,
|
|
377
|
+
logContentCardImpressions: logContentCardImpressions,
|
|
378
|
+
Card: Card,
|
|
379
|
+
Banner: Banner,
|
|
380
|
+
CaptionedImage: CaptionedImage,
|
|
381
|
+
ClassicCard: ClassicCard,
|
|
382
|
+
ControlCard: ControlCard,
|
|
383
|
+
ContentCards: ContentCards,
|
|
384
|
+
getCachedContentCards: getCachedContentCards,
|
|
385
|
+
hideContentCards: hideContentCards,
|
|
386
|
+
logContentCardsDisplayed: logContentCardsDisplayed,
|
|
387
|
+
requestContentCardsRefresh: requestContentCardsRefresh,
|
|
388
|
+
showContentCards: showContentCards,
|
|
389
|
+
subscribeToContentCardsUpdates: subscribeToContentCardsUpdates,
|
|
390
|
+
toggleContentCards: toggleContentCards,
|
|
391
|
+
addSdkMetadata: addSdkMetadata,
|
|
392
|
+
changeUser: changeUser,
|
|
393
|
+
destroy: destroy,
|
|
394
|
+
BrazeSdkMetadata: BrazeSdkMetadata,
|
|
395
|
+
DeviceProperties: DeviceProperties,
|
|
396
|
+
disableSDK: disableSDK,
|
|
397
|
+
enableSDK: enableSDK,
|
|
398
|
+
getDeviceId: getDeviceId,
|
|
399
|
+
getUser: getUser,
|
|
400
|
+
initialize: initialize,
|
|
401
|
+
isDisabled: isDisabled,
|
|
402
|
+
logCustomEvent: logCustomEvent,
|
|
403
|
+
logPurchase: logPurchase,
|
|
404
|
+
openSession: openSession,
|
|
405
|
+
removeAllSubscriptions: removeAllSubscriptions,
|
|
406
|
+
removeSubscription: removeSubscription,
|
|
407
|
+
requestImmediateDataFlush: requestImmediateDataFlush,
|
|
408
|
+
setLogger: setLogger,
|
|
409
|
+
setSdkAuthenticationSignature: setSdkAuthenticationSignature,
|
|
410
|
+
subscribeToSdkAuthenticationFailures: subscribeToSdkAuthenticationFailures,
|
|
411
|
+
toggleLogging: toggleLogging,
|
|
412
|
+
wipeData: wipeData,
|
|
413
|
+
handleBrazeAction: handleBrazeAction,
|
|
414
|
+
Feed: Feed,
|
|
415
|
+
getCachedFeed: getCachedFeed,
|
|
416
|
+
destroyFeed: destroyFeed,
|
|
417
|
+
logFeedDisplayed: logFeedDisplayed,
|
|
418
|
+
requestFeedRefresh: requestFeedRefresh,
|
|
419
|
+
showFeed: showFeed,
|
|
420
|
+
subscribeToFeedUpdates: subscribeToFeedUpdates,
|
|
421
|
+
toggleFeed: toggleFeed,
|
|
422
|
+
InAppMessage: InAppMessage,
|
|
423
|
+
InAppMessageButton: InAppMessageButton,
|
|
424
|
+
ControlMessage: ControlMessage,
|
|
425
|
+
FullScreenMessage: FullScreenMessage,
|
|
426
|
+
HtmlMessage: HtmlMessage,
|
|
427
|
+
ModalMessage: ModalMessage,
|
|
428
|
+
SlideUpMessage: SlideUpMessage,
|
|
429
|
+
automaticallyShowInAppMessages: automaticallyShowInAppMessages,
|
|
430
|
+
logInAppMessageButtonClick: logInAppMessageButtonClick,
|
|
431
|
+
logInAppMessageClick: logInAppMessageClick,
|
|
432
|
+
logInAppMessageHtmlClick: logInAppMessageHtmlClick,
|
|
433
|
+
logInAppMessageImpression: logInAppMessageImpression,
|
|
434
|
+
showInAppMessage: showInAppMessage,
|
|
435
|
+
subscribeToInAppMessage: subscribeToInAppMessage,
|
|
436
|
+
isPushBlocked: isPushBlocked,
|
|
437
|
+
isPushPermissionGranted: isPushPermissionGranted,
|
|
438
|
+
isPushSupported: isPushSupported,
|
|
439
|
+
requestPushPermission: requestPushPermission,
|
|
440
|
+
unregisterPush: unregisterPush,
|
|
441
|
+
User: User
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
var require$$0 = /*@__PURE__*/getAugmentedNamespace(src);
|
|
445
|
+
|
|
290
446
|
/* eslint-disable no-undef */
|
|
291
|
-
|
|
447
|
+
|
|
448
|
+
window.braze = require$$0;
|
|
292
449
|
// Copyright 2015 mParticle, Inc.
|
|
293
450
|
//
|
|
294
451
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -303,9 +460,10 @@ window.appboy = appboy_min;
|
|
|
303
460
|
// See the License for the specific language governing permissions and
|
|
304
461
|
// limitations under the License.
|
|
305
462
|
|
|
463
|
+
// This should remain Appboy and not Braze until the core SDK is able to parse the moduleID and not the name (go.mparticle.com/work/SQDSDKS-4655)
|
|
306
464
|
var name = 'Appboy',
|
|
307
465
|
moduleId = 28,
|
|
308
|
-
version = '
|
|
466
|
+
version = '4.0.0',
|
|
309
467
|
MessageType = {
|
|
310
468
|
PageView: 3,
|
|
311
469
|
PageEvent: 4,
|
|
@@ -351,7 +509,6 @@ var constructor = function () {
|
|
|
351
509
|
email_subscribe: 'setEmailNotificationSubscriptionType',
|
|
352
510
|
push_subscribe: 'setPushNotificationSubscriptionType',
|
|
353
511
|
phone: 'setPhoneNumber',
|
|
354
|
-
image_url: 'setAvatarImageUrl',
|
|
355
512
|
dob: 'setDateOfBirth',
|
|
356
513
|
};
|
|
357
514
|
|
|
@@ -366,11 +523,11 @@ var constructor = function () {
|
|
|
366
523
|
|
|
367
524
|
var sanitizedProductName;
|
|
368
525
|
if (forwarderSettings.forwardSkuAsProductName === 'True') {
|
|
369
|
-
sanitizedProductName =
|
|
526
|
+
sanitizedProductName = getSanitizedValueForBraze(
|
|
370
527
|
String(product.Sku)
|
|
371
528
|
);
|
|
372
529
|
} else {
|
|
373
|
-
sanitizedProductName =
|
|
530
|
+
sanitizedProductName = getSanitizedValueForBraze(
|
|
374
531
|
String(product.Name)
|
|
375
532
|
);
|
|
376
533
|
}
|
|
@@ -391,7 +548,7 @@ var constructor = function () {
|
|
|
391
548
|
var price = parseFloat(product.Price);
|
|
392
549
|
|
|
393
550
|
kitLogger(
|
|
394
|
-
'
|
|
551
|
+
'braze.logPurchase',
|
|
395
552
|
sanitizedProductName,
|
|
396
553
|
price,
|
|
397
554
|
event.CurrencyCode,
|
|
@@ -399,7 +556,7 @@ var constructor = function () {
|
|
|
399
556
|
sanitizedProperties
|
|
400
557
|
);
|
|
401
558
|
|
|
402
|
-
reportEvent =
|
|
559
|
+
reportEvent = braze.logPurchase(
|
|
403
560
|
sanitizedProductName,
|
|
404
561
|
price,
|
|
405
562
|
event.CurrencyCode,
|
|
@@ -411,7 +568,7 @@ var constructor = function () {
|
|
|
411
568
|
return reportEvent === true;
|
|
412
569
|
}
|
|
413
570
|
|
|
414
|
-
function
|
|
571
|
+
function logBrazePageViewEvent(event) {
|
|
415
572
|
var sanitizedEventName,
|
|
416
573
|
sanitizedAttrs,
|
|
417
574
|
eventName,
|
|
@@ -425,12 +582,12 @@ var constructor = function () {
|
|
|
425
582
|
} else {
|
|
426
583
|
eventName = window.location.pathname;
|
|
427
584
|
}
|
|
428
|
-
sanitizedEventName =
|
|
585
|
+
sanitizedEventName = getSanitizedValueForBraze(eventName);
|
|
429
586
|
sanitizedAttrs = getSanitizedCustomProperties(attrs);
|
|
430
587
|
|
|
431
|
-
kitLogger('
|
|
588
|
+
kitLogger('braze.logCustomEvent', sanitizedEventName, sanitizedAttrs);
|
|
432
589
|
|
|
433
|
-
var reportEvent =
|
|
590
|
+
var reportEvent = braze.logCustomEvent(
|
|
434
591
|
sanitizedEventName,
|
|
435
592
|
sanitizedAttrs
|
|
436
593
|
);
|
|
@@ -447,13 +604,13 @@ var constructor = function () {
|
|
|
447
604
|
);
|
|
448
605
|
} else {
|
|
449
606
|
kitLogger(
|
|
450
|
-
'
|
|
607
|
+
'braze.getUser().setDateOfBirth',
|
|
451
608
|
value.getFullYear(),
|
|
452
609
|
value.getMonth() + 1,
|
|
453
610
|
value.getDate()
|
|
454
611
|
);
|
|
455
612
|
|
|
456
|
-
|
|
613
|
+
braze
|
|
457
614
|
.getUser()
|
|
458
615
|
.setDateOfBirth(
|
|
459
616
|
value.getFullYear(),
|
|
@@ -465,9 +622,9 @@ var constructor = function () {
|
|
|
465
622
|
if (typeof value === 'number') {
|
|
466
623
|
var year = new Date().getFullYear() - value;
|
|
467
624
|
|
|
468
|
-
kitLogger('
|
|
625
|
+
kitLogger('braze.getUser().setDateOfBirth', year, 1, 1);
|
|
469
626
|
|
|
470
|
-
|
|
627
|
+
braze.getUser().setDateOfBirth(year, 1, 1);
|
|
471
628
|
} else {
|
|
472
629
|
return '$Age must be a number';
|
|
473
630
|
}
|
|
@@ -486,11 +643,12 @@ var constructor = function () {
|
|
|
486
643
|
params.push(value);
|
|
487
644
|
|
|
488
645
|
kitLogger(
|
|
489
|
-
'
|
|
646
|
+
'braze.getUser().' + DefaultAttributeMethods[key],
|
|
490
647
|
params
|
|
491
648
|
);
|
|
492
649
|
|
|
493
|
-
var u =
|
|
650
|
+
var u = braze.getUser();
|
|
651
|
+
|
|
494
652
|
//This method uses the setLastName, setFirstName, setEmail, setCountry, setHomeCity, setPhoneNumber, setAvatarImageUrl, setDateOfBirth, setGender, setEmailNotificationSubscriptionType, and setPushNotificationSubscriptionType methods
|
|
495
653
|
if (!u[DefaultAttributeMethods[key]].apply(u, params)) {
|
|
496
654
|
return (
|
|
@@ -502,8 +660,8 @@ var constructor = function () {
|
|
|
502
660
|
}
|
|
503
661
|
}
|
|
504
662
|
|
|
505
|
-
function
|
|
506
|
-
var sanitizedEventName =
|
|
663
|
+
function logBrazeEvent(event) {
|
|
664
|
+
var sanitizedEventName = getSanitizedValueForBraze(event.EventName);
|
|
507
665
|
var sanitizedProperties = getSanitizedCustomProperties(
|
|
508
666
|
event.EventAttributes
|
|
509
667
|
);
|
|
@@ -515,12 +673,12 @@ var constructor = function () {
|
|
|
515
673
|
}
|
|
516
674
|
|
|
517
675
|
kitLogger(
|
|
518
|
-
'
|
|
676
|
+
'braze.logCustomEvent',
|
|
519
677
|
sanitizedEventName,
|
|
520
678
|
sanitizedProperties
|
|
521
679
|
);
|
|
522
680
|
|
|
523
|
-
var reportEvent =
|
|
681
|
+
var reportEvent = braze.logCustomEvent(
|
|
524
682
|
sanitizedEventName,
|
|
525
683
|
sanitizedProperties
|
|
526
684
|
);
|
|
@@ -544,10 +702,10 @@ var constructor = function () {
|
|
|
544
702
|
mParticle.eCommerce.expandCommerceEvent(event);
|
|
545
703
|
if (listOfPageEvents != null) {
|
|
546
704
|
for (var i = 0; i < listOfPageEvents.length; i++) {
|
|
547
|
-
// finalLoopResult keeps track of if any
|
|
705
|
+
// finalLoopResult keeps track of if any logBrazeEvent in this loop returns true or not
|
|
548
706
|
var finalLoopResult = false;
|
|
549
707
|
try {
|
|
550
|
-
reportEvent =
|
|
708
|
+
reportEvent = logBrazeEvent(listOfPageEvents[i]);
|
|
551
709
|
if (reportEvent === true) {
|
|
552
710
|
finalLoopResult = true;
|
|
553
711
|
}
|
|
@@ -558,10 +716,10 @@ var constructor = function () {
|
|
|
558
716
|
reportEvent = finalLoopResult === true;
|
|
559
717
|
}
|
|
560
718
|
} else if (event.EventDataType == MessageType.PageEvent) {
|
|
561
|
-
reportEvent =
|
|
719
|
+
reportEvent = logBrazeEvent(event);
|
|
562
720
|
} else if (event.EventDataType == MessageType.PageView) {
|
|
563
721
|
if (forwarderSettings.forwardScreenViews == 'True') {
|
|
564
|
-
reportEvent =
|
|
722
|
+
reportEvent = logBrazePageViewEvent(event);
|
|
565
723
|
}
|
|
566
724
|
} else {
|
|
567
725
|
return (
|
|
@@ -578,15 +736,15 @@ var constructor = function () {
|
|
|
578
736
|
|
|
579
737
|
function removeUserAttribute(key) {
|
|
580
738
|
if (!(key in DefaultAttributeMethods)) {
|
|
581
|
-
var sanitizedKey =
|
|
739
|
+
var sanitizedKey = getSanitizedValueForBraze(key);
|
|
582
740
|
|
|
583
741
|
kitLogger(
|
|
584
|
-
'
|
|
742
|
+
'braze.getUser().setCustomUserAttribute',
|
|
585
743
|
sanitizedKey,
|
|
586
744
|
null
|
|
587
745
|
);
|
|
588
746
|
|
|
589
|
-
|
|
747
|
+
braze.getUser().setCustomUserAttribute(sanitizedKey, null);
|
|
590
748
|
} else {
|
|
591
749
|
return setDefaultAttribute(key, null);
|
|
592
750
|
}
|
|
@@ -594,19 +752,19 @@ var constructor = function () {
|
|
|
594
752
|
|
|
595
753
|
function setUserAttribute(key, value) {
|
|
596
754
|
if (!(key in DefaultAttributeMethods)) {
|
|
597
|
-
var sanitizedKey =
|
|
598
|
-
var sanitizedValue =
|
|
755
|
+
var sanitizedKey = getSanitizedValueForBraze(key);
|
|
756
|
+
var sanitizedValue = getSanitizedValueForBraze(value);
|
|
599
757
|
if (value != null && sanitizedValue == null) {
|
|
600
758
|
return 'Value did not pass validation for ' + key;
|
|
601
759
|
}
|
|
602
760
|
|
|
603
761
|
kitLogger(
|
|
604
|
-
'
|
|
762
|
+
'braze.getUser().setCustomUserAttribute',
|
|
605
763
|
sanitizedKey,
|
|
606
764
|
sanitizedValue
|
|
607
765
|
);
|
|
608
766
|
|
|
609
|
-
|
|
767
|
+
braze
|
|
610
768
|
.getUser()
|
|
611
769
|
.setCustomUserAttribute(sanitizedKey, sanitizedValue);
|
|
612
770
|
} else {
|
|
@@ -619,13 +777,13 @@ var constructor = function () {
|
|
|
619
777
|
// Other versions use onUserIdentified, which is called after setUserIdentity from core SDK
|
|
620
778
|
if (window.mParticle.getVersion().split('.')[0] === '1') {
|
|
621
779
|
if (type == window.mParticle.IdentityType.CustomerId) {
|
|
622
|
-
kitLogger('
|
|
780
|
+
kitLogger('braze.changeUser', id);
|
|
623
781
|
|
|
624
|
-
|
|
782
|
+
braze.changeUser(id);
|
|
625
783
|
} else if (type == window.mParticle.IdentityType.Email) {
|
|
626
|
-
kitLogger('
|
|
784
|
+
kitLogger('braze.getUser().setEmail', id);
|
|
627
785
|
|
|
628
|
-
|
|
786
|
+
braze.getUser().setEmail(id);
|
|
629
787
|
} else {
|
|
630
788
|
return (
|
|
631
789
|
"Can't call setUserIdentity on forwarder " +
|
|
@@ -638,37 +796,37 @@ var constructor = function () {
|
|
|
638
796
|
|
|
639
797
|
// onUserIdentified is not used in version 1 so there is no need to check for version number
|
|
640
798
|
function onUserIdentified(user) {
|
|
641
|
-
var
|
|
799
|
+
var brazeUserIDType,
|
|
642
800
|
userIdentities = user.getUserIdentities().userIdentities;
|
|
643
801
|
|
|
644
802
|
if (forwarderSettings.userIdentificationType === 'MPID') {
|
|
645
|
-
|
|
803
|
+
brazeUserIDType = user.getMPID();
|
|
646
804
|
} else {
|
|
647
|
-
|
|
805
|
+
brazeUserIDType =
|
|
648
806
|
userIdentities[
|
|
649
807
|
forwarderSettings.userIdentificationType.toLowerCase()
|
|
650
808
|
];
|
|
651
809
|
}
|
|
652
810
|
|
|
653
|
-
kitLogger('
|
|
811
|
+
kitLogger('braze.changeUser', brazeUserIDType);
|
|
654
812
|
|
|
655
|
-
|
|
813
|
+
braze.changeUser(brazeUserIDType);
|
|
656
814
|
|
|
657
815
|
if (userIdentities.email) {
|
|
658
|
-
kitLogger('
|
|
816
|
+
kitLogger('braze.getUser().setEmail', userIdentities.email);
|
|
659
817
|
|
|
660
|
-
|
|
818
|
+
braze.getUser().setEmail(userIdentities.email);
|
|
661
819
|
}
|
|
662
820
|
}
|
|
663
821
|
|
|
664
|
-
function
|
|
822
|
+
function primeBrazeWebPush() {
|
|
665
823
|
// The following code block is based on Braze's best practice for implementing
|
|
666
824
|
// their push primer. We only modify it to include pushPrimer and register_inapp settings.
|
|
667
825
|
// https://www.braze.com/docs/developer_guide/platform_integration_guides/web/push_notifications/integration/#soft-push-prompts
|
|
668
|
-
|
|
826
|
+
braze.subscribeToInAppMessage(function (inAppMessage) {
|
|
669
827
|
var shouldDisplay = true;
|
|
670
828
|
var pushPrimer = false;
|
|
671
|
-
if (inAppMessage instanceof
|
|
829
|
+
if (inAppMessage instanceof braze.InAppMessage) {
|
|
672
830
|
// Read the key-value pair for msg-id
|
|
673
831
|
var msgId = inAppMessage.extras['msg-id'];
|
|
674
832
|
|
|
@@ -678,17 +836,17 @@ var constructor = function () {
|
|
|
678
836
|
// We don't want to display the soft push prompt to users on browsers that don't support push, or if the user
|
|
679
837
|
// has already granted/blocked permission
|
|
680
838
|
if (
|
|
681
|
-
!
|
|
682
|
-
|
|
683
|
-
|
|
839
|
+
!braze.isPushSupported() ||
|
|
840
|
+
braze.isPushPermissionGranted() ||
|
|
841
|
+
braze.isPushBlocked()
|
|
684
842
|
) {
|
|
685
843
|
shouldDisplay = false;
|
|
686
844
|
}
|
|
687
845
|
if (inAppMessage.buttons[0] != null) {
|
|
688
846
|
// Prompt the user when the first button is clicked
|
|
689
847
|
inAppMessage.buttons[0].subscribeToClickedEvent(
|
|
690
|
-
function
|
|
691
|
-
|
|
848
|
+
function() {
|
|
849
|
+
braze.requestPushPermission();
|
|
692
850
|
}
|
|
693
851
|
);
|
|
694
852
|
}
|
|
@@ -700,20 +858,20 @@ var constructor = function () {
|
|
|
700
858
|
(pushPrimer && shouldDisplay) ||
|
|
701
859
|
(!pushPrimer && forwarderSettings.register_inapp === 'True')
|
|
702
860
|
) {
|
|
703
|
-
|
|
861
|
+
braze.showInAppMessage(inAppMessage);
|
|
704
862
|
}
|
|
705
863
|
});
|
|
706
864
|
}
|
|
707
865
|
|
|
708
866
|
function openSession(forwarderSettings) {
|
|
709
|
-
|
|
867
|
+
braze.openSession();
|
|
710
868
|
if (forwarderSettings.softPushCustomEventName) {
|
|
711
869
|
kitLogger(
|
|
712
|
-
'
|
|
870
|
+
'braze.logCustomEvent',
|
|
713
871
|
forwarderSettings.softPushCustomEventName
|
|
714
872
|
);
|
|
715
873
|
|
|
716
|
-
|
|
874
|
+
braze.logCustomEvent(forwarderSettings.softPushCustomEventName);
|
|
717
875
|
}
|
|
718
876
|
}
|
|
719
877
|
|
|
@@ -740,7 +898,7 @@ var constructor = function () {
|
|
|
740
898
|
try {
|
|
741
899
|
forwarderSettings = settings;
|
|
742
900
|
reportingService = service;
|
|
743
|
-
// 30 min is
|
|
901
|
+
// 30 min is Braze default
|
|
744
902
|
options.sessionTimeoutInSeconds =
|
|
745
903
|
forwarderSettings.ABKSessionTimeoutKey || 1800;
|
|
746
904
|
options.sdkFlavor = 'mparticle';
|
|
@@ -780,13 +938,13 @@ var constructor = function () {
|
|
|
780
938
|
}
|
|
781
939
|
|
|
782
940
|
if (testMode !== true) {
|
|
783
|
-
|
|
784
|
-
|
|
941
|
+
braze.initialize(forwarderSettings.apiKey, options);
|
|
942
|
+
finishBrazeInitialization(forwarderSettings);
|
|
785
943
|
} else {
|
|
786
|
-
if (!
|
|
944
|
+
if (!braze.initialize(forwarderSettings.apiKey, options)) {
|
|
787
945
|
return 'Failed to initialize: ' + name;
|
|
788
946
|
}
|
|
789
|
-
|
|
947
|
+
finishBrazeInitialization(forwarderSettings);
|
|
790
948
|
}
|
|
791
949
|
return 'Successfully initialized: ' + name;
|
|
792
950
|
} catch (e) {
|
|
@@ -796,9 +954,9 @@ var constructor = function () {
|
|
|
796
954
|
}
|
|
797
955
|
}
|
|
798
956
|
|
|
799
|
-
function
|
|
800
|
-
|
|
801
|
-
|
|
957
|
+
function finishBrazeInitialization(forwarderSettings) {
|
|
958
|
+
braze.addSdkMetadata(['mp']);
|
|
959
|
+
primeBrazeWebPush();
|
|
802
960
|
openSession(forwarderSettings);
|
|
803
961
|
}
|
|
804
962
|
|
|
@@ -817,13 +975,13 @@ var constructor = function () {
|
|
|
817
975
|
}
|
|
818
976
|
} catch (e) {
|
|
819
977
|
console.log(
|
|
820
|
-
'Unable to configure custom
|
|
978
|
+
'Unable to configure custom Braze cluster: ' + e.toString()
|
|
821
979
|
);
|
|
822
980
|
}
|
|
823
981
|
}
|
|
824
982
|
}
|
|
825
983
|
|
|
826
|
-
function
|
|
984
|
+
function getSanitizedStringForBraze(value) {
|
|
827
985
|
if (typeof value === 'string') {
|
|
828
986
|
if (value.substr(0, 1) === '$') {
|
|
829
987
|
return value.replace(/^\$+/g, '');
|
|
@@ -834,16 +992,16 @@ var constructor = function () {
|
|
|
834
992
|
return null;
|
|
835
993
|
}
|
|
836
994
|
|
|
837
|
-
function
|
|
995
|
+
function getSanitizedValueForBraze(value) {
|
|
838
996
|
if (typeof value === 'string') {
|
|
839
|
-
return
|
|
997
|
+
return getSanitizedStringForBraze(value);
|
|
840
998
|
}
|
|
841
999
|
|
|
842
1000
|
if (Array.isArray(value)) {
|
|
843
1001
|
var sanitizedArray = [];
|
|
844
1002
|
for (var i in value) {
|
|
845
1003
|
var element = value[i];
|
|
846
|
-
var sanitizedElement =
|
|
1004
|
+
var sanitizedElement = getSanitizedStringForBraze(element);
|
|
847
1005
|
if (sanitizedElement == null) {
|
|
848
1006
|
return null;
|
|
849
1007
|
}
|
|
@@ -870,10 +1028,10 @@ var constructor = function () {
|
|
|
870
1028
|
|
|
871
1029
|
for (var propertyName in customProperties) {
|
|
872
1030
|
value = customProperties[propertyName];
|
|
873
|
-
sanitizedPropertyName =
|
|
1031
|
+
sanitizedPropertyName = getSanitizedValueForBraze(propertyName);
|
|
874
1032
|
sanitizedValue =
|
|
875
1033
|
typeof value === 'string'
|
|
876
|
-
?
|
|
1034
|
+
? getSanitizedValueForBraze(value)
|
|
877
1035
|
: value;
|
|
878
1036
|
sanitizedProperties[sanitizedPropertyName] = sanitizedValue;
|
|
879
1037
|
}
|
|
@@ -892,7 +1050,7 @@ var constructor = function () {
|
|
|
892
1050
|
with a SKU of iphoneSku that cost $999 with a product attribute of
|
|
893
1051
|
color: blue would be:
|
|
894
1052
|
mParticle - Braze Web Kit log:
|
|
895
|
-
|
|
1053
|
+
braze.logPurchase:
|
|
896
1054
|
iphone,
|
|
897
1055
|
999,
|
|
898
1056
|
USD,
|
|
@@ -984,9 +1142,5 @@ var BrazeKitDev = {
|
|
|
984
1142
|
return version;
|
|
985
1143
|
},
|
|
986
1144
|
};
|
|
987
|
-
var BrazeKitDev_1 = BrazeKitDev.register;
|
|
988
|
-
var BrazeKitDev_2 = BrazeKitDev.getVersion;
|
|
989
1145
|
|
|
990
|
-
exports
|
|
991
|
-
exports.getVersion = BrazeKitDev_2;
|
|
992
|
-
exports.register = BrazeKitDev_1;
|
|
1146
|
+
exports["default"] = BrazeKitDev;
|