@braze/web-sdk 5.1.1 → 5.2.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/index.d.ts +14 -8
- package/package.json +1 -1
- package/shared-lib/encoding-utils.js +1 -1
- package/shared-lib/event-types.js +18 -18
- package/shared-lib/indexed-db-adapter.js +32 -32
- package/shared-lib/logger.js +2 -2
- package/shared-lib/supported-options.js +22 -21
- package/src/InAppMessage/display/html-message-to-html.js +38 -35
- package/src/InAppMessage/display/in-app-message-to-html.js +2 -2
- package/src/InAppMessage/display/modal-utils.js +2 -2
- package/src/InAppMessage/in-app-message-factory.js +21 -19
- package/src/InAppMessage/in-app-message-manager.js +58 -78
- package/src/InAppMessage/log-in-app-message-button-click.js +2 -2
- package/src/InAppMessage/log-in-app-message-click.js +3 -3
- package/src/InAppMessage/log-in-app-message-html-click.js +3 -3
- package/src/InAppMessage/log-in-app-message-impression.js +1 -1
- package/src/InAppMessage/models/control-message.js +4 -2
- package/src/InAppMessage/models/full-screen-message.js +5 -2
- package/src/InAppMessage/models/html-message.js +6 -4
- package/src/InAppMessage/models/in-app-message-button.js +2 -2
- package/src/InAppMessage/models/in-app-message.js +51 -46
- package/src/InAppMessage/models/modal-message.js +5 -2
- package/src/InAppMessage/models/slide-up-message.js +33 -8
- package/src/InAppMessage/models/templated-in-app-message.js +8 -8
- package/src/InAppMessage/ui/show-in-app-message.js +28 -34
- package/src/InAppMessage/utils/in-app-message-utils.js +18 -1
- package/src/Push/push-manager-factory.js +3 -3
- package/src/Push/push-manager.js +118 -110
- package/src/Push/utils/push-utils.js +4 -4
- package/src/User/user-manager.js +4 -4
- package/src/User/user.js +17 -17
- package/src/common/base-feed.js +1 -1
- package/src/common/feed-display.js +12 -12
- package/src/l10n/l10n-manager-factory.js +1 -1
- package/src/l10n/l10n-manager.js +4 -4
- package/src/managers/auth-manager.js +26 -26
- package/src/managers/braze-instance.js +59 -52
- package/src/managers/device-manager.js +15 -15
- package/src/managers/network-manager.js +98 -93
- package/src/managers/server-config-manager.js +9 -9
- package/src/managers/storage-manager.js +99 -96
- package/src/managers/utils.js +6 -0
- package/src/models/backend-errors.js +5 -5
- package/src/models/braze-event.js +20 -12
- package/src/models/device.js +3 -3
- package/src/models/identifier.js +33 -19
- package/src/models/push-token.js +4 -4
- package/src/models/server-config.js +6 -6
- package/src/request-controller.js +76 -73
- package/src/triggers/models/custom-event-data.js +2 -2
- package/src/triggers/models/custom-event-property-data.js +4 -4
- package/src/triggers/models/filter-set.js +5 -5
- package/src/triggers/models/filter.js +6 -6
- package/src/triggers/models/in-app-message-click-data.js +1 -1
- package/src/triggers/models/purchase-data.js +2 -2
- package/src/triggers/models/purchase-property-data.js +4 -4
- package/src/triggers/models/push-click-data.js +1 -1
- package/src/triggers/models/trigger-condition.js +41 -41
- package/src/triggers/models/trigger-events.js +1 -1
- package/src/triggers/models/trigger.js +36 -36
- package/src/triggers/triggers-provider-factory.js +1 -1
- package/src/triggers/triggers-provider.js +71 -82
- package/src/ui/js/attach-css.js +2 -2
- package/src/ui/js/load-font-awesome.js +1 -1
- package/src/util/base-device-parser.js +1 -1
- package/src/util/braze-actions.js +4 -4
- package/src/util/browser-detector.js +9 -8
- package/src/util/client-hints-parser.js +1 -1
- package/src/util/component-utils.js +2 -2
- package/src/util/device-constants.js +2 -2
- package/src/util/key-codes.js +1 -1
- package/src/util/net.js +1 -1
- package/src/util/request-header-utils.js +6 -6
- package/src/util/user-agent-parser.js +5 -5
- package/src/util/validation-utils.js +2 -0
- package/src/util/window-utils.js +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
GLOBAL_RATE_LIMIT_CAPACITY_DEFAULT as
|
|
3
|
-
GLOBAL_RATE_LIMIT_REFILL_RATE_DEFAULT as
|
|
2
|
+
GLOBAL_RATE_LIMIT_CAPACITY_DEFAULT as Zt,
|
|
3
|
+
GLOBAL_RATE_LIMIT_REFILL_RATE_DEFAULT as hi,
|
|
4
4
|
} from "../common/constants.js";
|
|
5
5
|
export default class Gt {
|
|
6
6
|
constructor(
|
|
@@ -12,7 +12,7 @@ export default class Gt {
|
|
|
12
12
|
l = null,
|
|
13
13
|
r = { enabled: !1 },
|
|
14
14
|
a = { enabled: !1, refresh_rate_limit: void 0 },
|
|
15
|
-
n = { enabled: !0, capacity:
|
|
15
|
+
n = { enabled: !0, capacity: Zt, refill_rate: hi },
|
|
16
16
|
) {
|
|
17
17
|
(this.ol = t),
|
|
18
18
|
(this.gl = i),
|
|
@@ -35,7 +35,7 @@ export default class Gt {
|
|
|
35
35
|
}
|
|
36
36
|
Y() {
|
|
37
37
|
return {
|
|
38
|
-
s: "5.
|
|
38
|
+
s: "5.2.0",
|
|
39
39
|
l: this.ol,
|
|
40
40
|
e: this.gl,
|
|
41
41
|
a: this.fl,
|
|
@@ -47,10 +47,10 @@ export default class Gt {
|
|
|
47
47
|
grl: this.al,
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
-
static
|
|
50
|
+
static qn(t) {
|
|
51
51
|
let i = t.l;
|
|
52
52
|
return (
|
|
53
|
-
"5.
|
|
53
|
+
"5.2.0" !== t.s && (i = 0),
|
|
54
54
|
new Gt(i, t.e, t.a, t.p, t.m, t.v, t.c, t.f, t.grl)
|
|
55
55
|
);
|
|
56
56
|
}
|
|
@@ -15,23 +15,23 @@ import vt from "./Push/utils/push-utils.js";
|
|
|
15
15
|
import S from "./util/request-header-utils.js";
|
|
16
16
|
export default class Lt {
|
|
17
17
|
constructor(t, i, s, e, h, o, n, r, u, l) {
|
|
18
|
-
(this.
|
|
18
|
+
(this.rn = t),
|
|
19
19
|
(this.baseUrl = i),
|
|
20
20
|
(this.di = s),
|
|
21
|
-
(this.
|
|
21
|
+
(this.on = e),
|
|
22
22
|
(this.wt = h),
|
|
23
23
|
(this.yt = o),
|
|
24
24
|
(this.u = n),
|
|
25
25
|
(this.bu = r),
|
|
26
26
|
(this.Go = u),
|
|
27
27
|
(this.qt = l),
|
|
28
|
-
(this.
|
|
28
|
+
(this.rn = t),
|
|
29
29
|
(this.baseUrl = i),
|
|
30
30
|
(this.wu = 0),
|
|
31
|
-
(this.
|
|
31
|
+
(this.fE = n.OE() || 0),
|
|
32
32
|
(this.ku = null),
|
|
33
33
|
(this.di = s),
|
|
34
|
-
(this.
|
|
34
|
+
(this.on = e),
|
|
35
35
|
(this.wt = h),
|
|
36
36
|
(this.yt = o),
|
|
37
37
|
(this.u = n),
|
|
@@ -44,9 +44,9 @@ export default class Lt {
|
|
|
44
44
|
(this.Au = !1);
|
|
45
45
|
}
|
|
46
46
|
$u(t, i) {
|
|
47
|
-
return !t && !i && this.Go.
|
|
47
|
+
return !t && !i && this.Go.Gh() >= this.Su;
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
qu(t) {
|
|
50
50
|
let s = this.di.El();
|
|
51
51
|
if (t.length > 0) {
|
|
52
52
|
const e = this.wt.getUserId();
|
|
@@ -57,14 +57,14 @@ export default class Lt {
|
|
|
57
57
|
}
|
|
58
58
|
return s;
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
s && this.
|
|
62
|
-
const a = this.u.
|
|
63
|
-
c = this.u.
|
|
60
|
+
Cu(t = !1, i = !1, s = !0, e, h, n, u = !1, l = !1) {
|
|
61
|
+
s && this.Du();
|
|
62
|
+
const a = this.u.hE(),
|
|
63
|
+
c = this.u.gE();
|
|
64
64
|
let d = !1;
|
|
65
65
|
const f = (t, i) => {
|
|
66
66
|
let r = !1;
|
|
67
|
-
S.Os(this.u, S.Gs.
|
|
67
|
+
S.Os(this.u, S.Gs.La, new Date().valueOf()),
|
|
68
68
|
C.Qs({
|
|
69
69
|
url: this.baseUrl + "/data/",
|
|
70
70
|
data: t,
|
|
@@ -78,12 +78,12 @@ export default class Lt {
|
|
|
78
78
|
this.yt.ul(s),
|
|
79
79
|
(null != t.respond_with &&
|
|
80
80
|
t.respond_with.user_id != this.wt.getUserId()) ||
|
|
81
|
-
(null != t.device && this.u.k(o.C.
|
|
81
|
+
(null != t.device && this.u.k(o.C.Ga, t.device),
|
|
82
82
|
null != t.sdk_metadata &&
|
|
83
|
-
(this.u.k(o.C.
|
|
84
|
-
this.u.k(o.C
|
|
83
|
+
(this.u.k(o.C.Jh, t.sdk_metadata),
|
|
84
|
+
this.u.k(o.C.Qh, this.di.ki())),
|
|
85
85
|
this.bu(s),
|
|
86
|
-
S.Ys(this.u, S.Gs.
|
|
86
|
+
S.Ys(this.u, S.Gs.La, 1),
|
|
87
87
|
"function" == typeof e && e()))
|
|
88
88
|
: s.auth_error && (r = !0);
|
|
89
89
|
},
|
|
@@ -91,72 +91,72 @@ export default class Lt {
|
|
|
91
91
|
null != t.respond_with &&
|
|
92
92
|
t.respond_with.triggers &&
|
|
93
93
|
(this.wu = Math.max(this.wu - 1, 0)),
|
|
94
|
-
this.qt.
|
|
94
|
+
this.qt.Zh(t.events, t.attributes),
|
|
95
95
|
"function" == typeof h && h();
|
|
96
96
|
},
|
|
97
97
|
ti: (t) => {
|
|
98
98
|
if (("function" == typeof n && n(t), s && !d)) {
|
|
99
|
-
if (t && !r) this.
|
|
99
|
+
if (t && !r) this.Fu();
|
|
100
100
|
else {
|
|
101
|
-
S.si(this.u, S.Gs.
|
|
101
|
+
S.si(this.u, S.Gs.La);
|
|
102
102
|
let t = this.ku;
|
|
103
|
-
(null == t || t < 1e3 * this.
|
|
104
|
-
this.
|
|
103
|
+
(null == t || t < 1e3 * this.fE) && (t = 1e3 * this.fE),
|
|
104
|
+
this.Fu(Math.min(3e5, k(1e3 * this.fE, 3 * t)));
|
|
105
105
|
}
|
|
106
106
|
d = !0;
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
109
|
});
|
|
110
110
|
},
|
|
111
|
-
m = this.
|
|
111
|
+
m = this.qu(a),
|
|
112
112
|
g = i || m;
|
|
113
113
|
if (this.$u(u, m))
|
|
114
114
|
return void r.info(
|
|
115
115
|
"Declining to flush data due to 50 consecutive authentication failures",
|
|
116
116
|
);
|
|
117
|
-
if (s && !this.qt.
|
|
118
|
-
return this.
|
|
119
|
-
const v = this.qt.
|
|
117
|
+
if (s && !this.qt.Ea(a, c, t, g))
|
|
118
|
+
return this.Fu(), void ("function" == typeof n && n(!0));
|
|
119
|
+
const v = this.qt.Ka(t, g, a, c, l);
|
|
120
120
|
g && this.wu++;
|
|
121
121
|
let p = !1;
|
|
122
122
|
if (v)
|
|
123
123
|
for (const t of v)
|
|
124
|
-
this.qt.Hs(t.requestData, () => f(t.requestData, t.headers), S.ii.
|
|
124
|
+
this.qt.Hs(t.requestData, () => f(t.requestData, t.headers), S.ii.La),
|
|
125
125
|
(p = !0);
|
|
126
|
-
this.Go.
|
|
127
|
-
? this.
|
|
126
|
+
this.Go.Fh() && s && !p
|
|
127
|
+
? this.Fu()
|
|
128
128
|
: m && (r.info("Invoking new session subscriptions"), this.yu.Dt());
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
Tu() {
|
|
131
131
|
return this.wu > 0;
|
|
132
132
|
}
|
|
133
|
-
|
|
133
|
+
Fu(t = 1e3 * this.fE) {
|
|
134
134
|
this.Au ||
|
|
135
|
-
(this.
|
|
135
|
+
(this.Du(),
|
|
136
136
|
(this.ju = window.setTimeout(() => {
|
|
137
137
|
if (document.hidden) {
|
|
138
138
|
const t = "visibilitychange",
|
|
139
139
|
i = () => {
|
|
140
140
|
document.hidden ||
|
|
141
|
-
(document.removeEventListener(t, i, !1), this.
|
|
141
|
+
(document.removeEventListener(t, i, !1), this.Cu());
|
|
142
142
|
};
|
|
143
143
|
document.addEventListener(t, i, !1);
|
|
144
|
-
} else this.
|
|
144
|
+
} else this.Cu();
|
|
145
145
|
}, t)),
|
|
146
146
|
(this.ku = t));
|
|
147
147
|
}
|
|
148
|
-
|
|
148
|
+
Du() {
|
|
149
149
|
null != this.ju && (clearTimeout(this.ju), (this.ju = null));
|
|
150
150
|
}
|
|
151
151
|
initialize() {
|
|
152
|
-
(this.Au = !1), this.
|
|
152
|
+
(this.Au = !1), this.Fu();
|
|
153
153
|
}
|
|
154
154
|
destroy() {
|
|
155
155
|
this.yu.removeAllSubscriptions(),
|
|
156
|
-
this.Go.
|
|
157
|
-
this.
|
|
156
|
+
this.Go.yh(),
|
|
157
|
+
this.Du(),
|
|
158
158
|
(this.Au = !0),
|
|
159
|
-
this.
|
|
159
|
+
this.Cu(void 0, void 0, !1, void 0, void 0, void 0, void 0, !0),
|
|
160
160
|
(this.ju = null);
|
|
161
161
|
}
|
|
162
162
|
mr(t) {
|
|
@@ -164,11 +164,11 @@ export default class Lt {
|
|
|
164
164
|
}
|
|
165
165
|
openSession() {
|
|
166
166
|
const t = this.di.ki() !== this.di.xo();
|
|
167
|
-
t && (this.u.
|
|
168
|
-
this.
|
|
167
|
+
t && (this.u.cE(o.iu.Uo), this.u.cE(o.iu.su)),
|
|
168
|
+
this.Cu(void 0, !1, void 0, () => {
|
|
169
169
|
this.u.hi(o.C.Ii);
|
|
170
170
|
}),
|
|
171
|
-
this.
|
|
171
|
+
this.Mn(),
|
|
172
172
|
t &&
|
|
173
173
|
import("./Push/push-manager-factory.js").then((t) => {
|
|
174
174
|
if (this.Au) return;
|
|
@@ -178,7 +178,7 @@ export default class Lt {
|
|
|
178
178
|
(vt.isPushPermissionGranted() || vt.isPushBlocked())
|
|
179
179
|
) {
|
|
180
180
|
const t = () => {
|
|
181
|
-
i.
|
|
181
|
+
i.mn()
|
|
182
182
|
? r.info(
|
|
183
183
|
"Push token maintenance is disabled, not refreshing token for backend.",
|
|
184
184
|
)
|
|
@@ -188,7 +188,7 @@ export default class Lt {
|
|
|
188
188
|
s && t();
|
|
189
189
|
},
|
|
190
190
|
e = () => {
|
|
191
|
-
const i = this.u.j(o.C.
|
|
191
|
+
const i = this.u.j(o.C.In);
|
|
192
192
|
(null == i || i) && t();
|
|
193
193
|
},
|
|
194
194
|
h = A.Yt.Qt;
|
|
@@ -196,35 +196,36 @@ export default class Lt {
|
|
|
196
196
|
}
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
|
-
|
|
200
|
-
this.u.hi(o.C.Ti), this.u.hi(o.C.Cs), this.u.hi(o.C.
|
|
199
|
+
Lu() {
|
|
200
|
+
this.u.hi(o.C.Ti), this.u.hi(o.C.Cs), this.u.hi(o.C.Lr);
|
|
201
201
|
}
|
|
202
202
|
changeUser(t, i, s) {
|
|
203
203
|
const e = this.wt.getUserId();
|
|
204
204
|
if (e !== t) {
|
|
205
205
|
this.di.ql(),
|
|
206
|
-
this.
|
|
207
|
-
null != e && this.
|
|
206
|
+
this.Lu(),
|
|
207
|
+
null != e && this.Cu(void 0, !1, void 0, void 0, void 0),
|
|
208
208
|
this.wt.ou(t),
|
|
209
|
-
s ? this.Go.setSdkAuthenticationSignature(s) : this.Go.
|
|
209
|
+
s ? this.Go.setSdkAuthenticationSignature(s) : this.Go.xh();
|
|
210
210
|
for (let t = 0; t < i.length; t++) i[t].changeUser(null == e);
|
|
211
211
|
null != e && this.u.hi(o.C.J),
|
|
212
|
-
this.u.hi(o.C.
|
|
212
|
+
this.u.hi(o.C.Ga),
|
|
213
213
|
this.u.hi(o.C.ai),
|
|
214
|
+
this.u.hi(o.C.SE),
|
|
214
215
|
this.openSession(),
|
|
215
216
|
r.info('Changed user to "' + t + '".');
|
|
216
217
|
} else {
|
|
217
218
|
let i = "Doing nothing.";
|
|
218
219
|
s &&
|
|
219
|
-
this.Go.
|
|
220
|
+
this.Go.kh() !== s &&
|
|
220
221
|
(this.Go.setSdkAuthenticationSignature(s),
|
|
221
222
|
(i = "Updated SDK authentication signature")),
|
|
222
223
|
r.info(`Current user is already ${t}. ${i}`);
|
|
223
224
|
}
|
|
224
225
|
}
|
|
225
226
|
requestImmediateDataFlush(t) {
|
|
226
|
-
this.
|
|
227
|
-
this.
|
|
227
|
+
this.Du(), this.di.xo();
|
|
228
|
+
this.Cu(
|
|
228
229
|
void 0,
|
|
229
230
|
void 0,
|
|
230
231
|
void 0,
|
|
@@ -237,20 +238,22 @@ export default class Lt {
|
|
|
237
238
|
);
|
|
238
239
|
}
|
|
239
240
|
requestFeedRefresh() {
|
|
240
|
-
this.di.xo(), this.
|
|
241
|
+
this.di.xo(), this.Cu(!0);
|
|
241
242
|
}
|
|
242
243
|
$r(t, i) {
|
|
243
244
|
this.di.xo(),
|
|
244
245
|
r.info("Requesting explicit trigger refresh."),
|
|
245
|
-
this.
|
|
246
|
+
this.Cu(void 0, !0, void 0, t, i);
|
|
246
247
|
}
|
|
247
|
-
|
|
248
|
-
const h = i.
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
return
|
|
248
|
+
Cn(t, e) {
|
|
249
|
+
const h = i.Mu,
|
|
250
|
+
n = { a: t, l: e },
|
|
251
|
+
u = s.q(h, n);
|
|
252
|
+
return (
|
|
253
|
+
u && (r.info(`Logged alias ${t} with label ${e}`), this.u.k(o.C.SE, n)), u
|
|
254
|
+
);
|
|
252
255
|
}
|
|
253
|
-
|
|
256
|
+
Fn(i, e, h) {
|
|
254
257
|
if (this.yt.hu(e))
|
|
255
258
|
return (
|
|
256
259
|
r.info(`Custom Attribute "${e}" is blocklisted, ignoring.`), new t()
|
|
@@ -268,7 +271,7 @@ export default class Lt {
|
|
|
268
271
|
null != o && (l.altitude = o),
|
|
269
272
|
null != n && (l.ll_accuracy = n),
|
|
270
273
|
null != u && (l.alt_accuracy = u);
|
|
271
|
-
const a = s.q(i.
|
|
274
|
+
const a = s.q(i.Pu, l, t || void 0);
|
|
272
275
|
return (
|
|
273
276
|
a &&
|
|
274
277
|
r.info(`Set user last known location as ${JSON.stringify(l, null, 2)}`),
|
|
@@ -277,29 +280,29 @@ export default class Lt {
|
|
|
277
280
|
}
|
|
278
281
|
kr(t, s) {
|
|
279
282
|
const e = this.di.xo();
|
|
280
|
-
return new ue(this.wt.getUserId(), i.
|
|
283
|
+
return new ue(this.wt.getUserId(), i.xu, t, e, { cid: s });
|
|
281
284
|
}
|
|
282
|
-
|
|
285
|
+
Iu(t, i) {
|
|
283
286
|
return new A(t, i);
|
|
284
287
|
}
|
|
285
|
-
|
|
288
|
+
Mn() {
|
|
286
289
|
const t = A.Yt.Qt;
|
|
287
|
-
this.
|
|
290
|
+
this.Iu(t, r).setItem(t.ss.La, 1, {
|
|
288
291
|
baseUrl: this.baseUrl,
|
|
289
|
-
data: { api_key: this.
|
|
292
|
+
data: { api_key: this.rn, device_id: this.on.ce().id },
|
|
290
293
|
userId: this.wt.getUserId(),
|
|
291
|
-
sdkAuthEnabled: this.Go.
|
|
294
|
+
sdkAuthEnabled: this.Go.Fh(),
|
|
292
295
|
});
|
|
293
296
|
}
|
|
294
297
|
yr(t) {
|
|
295
298
|
for (const i of t)
|
|
296
|
-
if (i.api_key === this.
|
|
299
|
+
if (i.api_key === this.rn) this.qt.Zh(i.events, i.attributes);
|
|
297
300
|
else {
|
|
298
301
|
const t = A.Yt.Qt;
|
|
299
302
|
new A(t, r).setItem(t.ss.wr, p.W(), i);
|
|
300
303
|
}
|
|
301
304
|
}
|
|
302
|
-
|
|
305
|
+
Gn(e, h, o) {
|
|
303
306
|
if (this.yt.hu(e))
|
|
304
307
|
return (
|
|
305
308
|
r.info(`Custom Attribute "${e}" is blocklisted, ignoring.`), new t()
|
|
@@ -307,13 +310,13 @@ export default class Lt {
|
|
|
307
310
|
let n, u;
|
|
308
311
|
return (
|
|
309
312
|
null === h && null === o
|
|
310
|
-
? ((n = i.
|
|
311
|
-
: ((n = i.
|
|
313
|
+
? ((n = i.Nu), (u = { key: e }))
|
|
314
|
+
: ((n = i.Ou), (u = { key: e, latitude: h, longitude: o })),
|
|
312
315
|
s.q(n, u)
|
|
313
316
|
);
|
|
314
317
|
}
|
|
315
|
-
|
|
318
|
+
Hn(t, e) {
|
|
316
319
|
const h = { group_id: t, status: e };
|
|
317
|
-
return s.q(i.
|
|
320
|
+
return s.q(i.Uu, h);
|
|
318
321
|
}
|
|
319
322
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default class
|
|
1
|
+
export default class ts {
|
|
2
2
|
constructor(t) {
|
|
3
3
|
(this.Bl = t), (this.Bl = t);
|
|
4
4
|
}
|
|
@@ -6,7 +6,7 @@ export default class Zt {
|
|
|
6
6
|
return null == this.Bl || this.Bl === t[0];
|
|
7
7
|
}
|
|
8
8
|
static fromJson(t) {
|
|
9
|
-
return new
|
|
9
|
+
return new ts(t ? t.event_name : null);
|
|
10
10
|
}
|
|
11
11
|
Y() {
|
|
12
12
|
return this.Bl;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class
|
|
1
|
+
import is from "./filter-set.js";
|
|
2
|
+
export default class rs {
|
|
3
3
|
constructor(t, s) {
|
|
4
4
|
(this.Bl = t), (this.Ml = s), (this.Bl = t), (this.Ml = s);
|
|
5
5
|
}
|
|
@@ -10,9 +10,9 @@ export default class is {
|
|
|
10
10
|
return s === this.Bl && this.Ml.Jl(i);
|
|
11
11
|
}
|
|
12
12
|
static fromJson(t) {
|
|
13
|
-
return new
|
|
13
|
+
return new rs(
|
|
14
14
|
t ? t.event_name : null,
|
|
15
|
-
t ?
|
|
15
|
+
t ? is.fromJson(t.property_filters) : null,
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
18
|
Y() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import lr from "./filter.js";
|
|
2
2
|
import { isArray as j } from "../../util/code-utils.js";
|
|
3
|
-
export default class
|
|
3
|
+
export default class is {
|
|
4
4
|
constructor(t) {
|
|
5
5
|
(this.filters = t), (this.filters = t);
|
|
6
6
|
}
|
|
@@ -30,7 +30,7 @@ export default class ts {
|
|
|
30
30
|
for (let t = 0; t < s.length; t++) o.push(lr.fromJson(s[t]));
|
|
31
31
|
r.push(o);
|
|
32
32
|
}
|
|
33
|
-
return new
|
|
33
|
+
return new is(r);
|
|
34
34
|
}
|
|
35
35
|
Y() {
|
|
36
36
|
const t = [];
|
|
@@ -42,14 +42,14 @@ export default class ts {
|
|
|
42
42
|
}
|
|
43
43
|
return t;
|
|
44
44
|
}
|
|
45
|
-
static
|
|
45
|
+
static qn(t) {
|
|
46
46
|
const r = [];
|
|
47
47
|
for (let e = 0; e < t.length; e++) {
|
|
48
48
|
const o = [],
|
|
49
49
|
s = t[e];
|
|
50
|
-
for (let t = 0; t < s.length; t++) o.push(lr.
|
|
50
|
+
for (let t = 0; t < s.length; t++) o.push(lr.qn(s[t]));
|
|
51
51
|
r.push(o);
|
|
52
52
|
}
|
|
53
|
-
return new
|
|
53
|
+
return new is(r);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -50,13 +50,13 @@ export default class lr {
|
|
|
50
50
|
);
|
|
51
51
|
case lr.Ul.Eu:
|
|
52
52
|
return null != s;
|
|
53
|
-
case lr.Ul.
|
|
53
|
+
case lr.Ul._u:
|
|
54
54
|
return null == s;
|
|
55
55
|
case lr.Ul.Xl:
|
|
56
56
|
return null != s && yt(s) && ls(s) < this._l;
|
|
57
57
|
case lr.Ul.Fl:
|
|
58
58
|
return null != s && yt(s) && ls(s) > this._l;
|
|
59
|
-
case lr.Ul.
|
|
59
|
+
case lr.Ul.Hu:
|
|
60
60
|
return (
|
|
61
61
|
null == s ||
|
|
62
62
|
typeof s != typeof this._l ||
|
|
@@ -81,11 +81,11 @@ export default class lr {
|
|
|
81
81
|
{ k: this.Tl, t: this.Al, c: this.comparator, v: t }
|
|
82
82
|
);
|
|
83
83
|
}
|
|
84
|
-
static
|
|
84
|
+
static qn(t) {
|
|
85
85
|
return new lr(t.k, t.t, t.c, t.v);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
(lr.Il = {
|
|
88
|
+
(lr.Il = { Qu: "boolean", Xu: "number", Bu: "string", Ll: "date" }),
|
|
89
89
|
(lr.Ul = {
|
|
90
90
|
Kl: 1,
|
|
91
91
|
Pl: 2,
|
|
@@ -95,8 +95,8 @@ export default class lr {
|
|
|
95
95
|
Ql: 6,
|
|
96
96
|
$l: 10,
|
|
97
97
|
Eu: 11,
|
|
98
|
-
|
|
98
|
+
_u: 12,
|
|
99
99
|
Xl: 15,
|
|
100
100
|
Fl: 16,
|
|
101
|
-
|
|
101
|
+
Hu: 17,
|
|
102
102
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default class
|
|
1
|
+
export default class ns {
|
|
2
2
|
constructor(t) {
|
|
3
3
|
(this.productId = t), (this.productId = t);
|
|
4
4
|
}
|
|
@@ -6,7 +6,7 @@ export default class rs {
|
|
|
6
6
|
return null == this.productId || t[0] === this.productId;
|
|
7
7
|
}
|
|
8
8
|
static fromJson(t) {
|
|
9
|
-
return new
|
|
9
|
+
return new ns(t ? t.product_id : null);
|
|
10
10
|
}
|
|
11
11
|
Y() {
|
|
12
12
|
return this.productId;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class
|
|
1
|
+
import is from "./filter-set.js";
|
|
2
|
+
export default class hs {
|
|
3
3
|
constructor(t, s) {
|
|
4
4
|
(this.productId = t), (this.Ml = s), (this.productId = t), (this.Ml = s);
|
|
5
5
|
}
|
|
@@ -10,9 +10,9 @@ export default class ns {
|
|
|
10
10
|
return s === this.productId && this.Ml.Jl(i);
|
|
11
11
|
}
|
|
12
12
|
static fromJson(t) {
|
|
13
|
-
return new
|
|
13
|
+
return new hs(
|
|
14
14
|
t ? t.product_id : null,
|
|
15
|
-
t ?
|
|
15
|
+
t ? is.fromJson(t.property_filters) : null,
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
18
|
Y() {
|