wineater-bot 3.4.2 → 3.4.4
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/dist/wineater-chatbot.mjs +1046 -979
- package/dist/wineater-chatbot.umd.js +38 -38
- package/index.html +1 -1
- package/package.json +1 -1
- package/src/js/i18n.js +65 -0
- package/src/js/widget.js +9 -1
|
@@ -74,28 +74,28 @@ var $n = { exports: {} };
|
|
|
74
74
|
return new (h || (h = Promise))(function(g, S) {
|
|
75
75
|
function x(q) {
|
|
76
76
|
try {
|
|
77
|
-
|
|
78
|
-
} catch (
|
|
79
|
-
S(
|
|
77
|
+
P(m.next(q));
|
|
78
|
+
} catch (N) {
|
|
79
|
+
S(N);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
function D(q) {
|
|
83
83
|
try {
|
|
84
|
-
|
|
85
|
-
} catch (
|
|
86
|
-
S(
|
|
84
|
+
P(m.throw(q));
|
|
85
|
+
} catch (N) {
|
|
86
|
+
S(N);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
var
|
|
91
|
-
q.done ? g(q.value) : (
|
|
92
|
-
W(
|
|
89
|
+
function P(q) {
|
|
90
|
+
var N;
|
|
91
|
+
q.done ? g(q.value) : (N = q.value, N instanceof h ? N : new h(function(W) {
|
|
92
|
+
W(N);
|
|
93
93
|
})).then(x, D);
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
P((m = m.apply(v, f || [])).next());
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function o(v, f) {
|
|
99
99
|
var h, m, g, S, x = { label: 0, sent: function() {
|
|
100
100
|
if (1 & g[0])
|
|
101
101
|
throw g[1];
|
|
@@ -104,58 +104,58 @@ var $n = { exports: {} };
|
|
|
104
104
|
return S = { next: D(0), throw: D(1), return: D(2) }, typeof Symbol == "function" && (S[Symbol.iterator] = function() {
|
|
105
105
|
return this;
|
|
106
106
|
}), S;
|
|
107
|
-
function D(
|
|
107
|
+
function D(P) {
|
|
108
108
|
return function(q) {
|
|
109
|
-
return function(
|
|
109
|
+
return function(N) {
|
|
110
110
|
if (h)
|
|
111
111
|
throw new TypeError("Generator is already executing.");
|
|
112
112
|
for (; x; )
|
|
113
113
|
try {
|
|
114
|
-
if (h = 1, m && (g = 2 &
|
|
114
|
+
if (h = 1, m && (g = 2 & N[0] ? m.return : N[0] ? m.throw || ((g = m.return) && g.call(m), 0) : m.next) && !(g = g.call(m, N[1])).done)
|
|
115
115
|
return g;
|
|
116
|
-
switch (m = 0, g && (
|
|
116
|
+
switch (m = 0, g && (N = [2 & N[0], g.value]), N[0]) {
|
|
117
117
|
case 0:
|
|
118
118
|
case 1:
|
|
119
|
-
g =
|
|
119
|
+
g = N;
|
|
120
120
|
break;
|
|
121
121
|
case 4:
|
|
122
|
-
return x.label++, { value:
|
|
122
|
+
return x.label++, { value: N[1], done: !1 };
|
|
123
123
|
case 5:
|
|
124
|
-
x.label++, m =
|
|
124
|
+
x.label++, m = N[1], N = [0];
|
|
125
125
|
continue;
|
|
126
126
|
case 7:
|
|
127
|
-
|
|
127
|
+
N = x.ops.pop(), x.trys.pop();
|
|
128
128
|
continue;
|
|
129
129
|
default:
|
|
130
|
-
if (g = x.trys, !((g = g.length > 0 && g[g.length - 1]) ||
|
|
130
|
+
if (g = x.trys, !((g = g.length > 0 && g[g.length - 1]) || N[0] !== 6 && N[0] !== 2)) {
|
|
131
131
|
x = 0;
|
|
132
132
|
continue;
|
|
133
133
|
}
|
|
134
|
-
if (
|
|
135
|
-
x.label =
|
|
134
|
+
if (N[0] === 3 && (!g || N[1] > g[0] && N[1] < g[3])) {
|
|
135
|
+
x.label = N[1];
|
|
136
136
|
break;
|
|
137
137
|
}
|
|
138
|
-
if (
|
|
139
|
-
x.label = g[1], g =
|
|
138
|
+
if (N[0] === 6 && x.label < g[1]) {
|
|
139
|
+
x.label = g[1], g = N;
|
|
140
140
|
break;
|
|
141
141
|
}
|
|
142
142
|
if (g && x.label < g[2]) {
|
|
143
|
-
x.label = g[2], x.ops.push(
|
|
143
|
+
x.label = g[2], x.ops.push(N);
|
|
144
144
|
break;
|
|
145
145
|
}
|
|
146
146
|
g[2] && x.ops.pop(), x.trys.pop();
|
|
147
147
|
continue;
|
|
148
148
|
}
|
|
149
|
-
|
|
149
|
+
N = f.call(v, x);
|
|
150
150
|
} catch (W) {
|
|
151
|
-
|
|
151
|
+
N = [6, W], m = 0;
|
|
152
152
|
} finally {
|
|
153
153
|
h = g = 0;
|
|
154
154
|
}
|
|
155
|
-
if (5 &
|
|
156
|
-
throw
|
|
157
|
-
return { value:
|
|
158
|
-
}([
|
|
155
|
+
if (5 & N[0])
|
|
156
|
+
throw N[1];
|
|
157
|
+
return { value: N[0] ? N[1] : void 0, done: !0 };
|
|
158
|
+
}([P, q]);
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
161
|
}
|
|
@@ -165,7 +165,7 @@ var $n = { exports: {} };
|
|
|
165
165
|
!m && g in f || (m || (m = Array.prototype.slice.call(f, 0, g)), m[g] = f[g]);
|
|
166
166
|
return v.concat(m || Array.prototype.slice.call(f));
|
|
167
167
|
}
|
|
168
|
-
var
|
|
168
|
+
var c = function v(f, h) {
|
|
169
169
|
if (f === h)
|
|
170
170
|
return !0;
|
|
171
171
|
if (f && h && typeof f == "object" && typeof h == "object") {
|
|
@@ -203,13 +203,13 @@ var $n = { exports: {} };
|
|
|
203
203
|
function u(v, f) {
|
|
204
204
|
var h = Object.keys(f || {}).filter(function(m) {
|
|
205
205
|
var g = v == null ? void 0 : v[m], S = f == null ? void 0 : f[m];
|
|
206
|
-
return !
|
|
206
|
+
return !c(g, S);
|
|
207
207
|
});
|
|
208
208
|
return Object.keys(v || {}).filter(function(m) {
|
|
209
209
|
Object.keys(f || {}).includes(m) || h.push(m);
|
|
210
210
|
}), Object.keys(h).length ? h : null;
|
|
211
211
|
}
|
|
212
|
-
var
|
|
212
|
+
var a, d;
|
|
213
213
|
function p(v, f, h) {
|
|
214
214
|
var m = "shortString", g = !0;
|
|
215
215
|
typeof h == "number" && (m = "javaDouble", g = !1), v[m] = v[m] || {}, v[m][f] = g ? h + "" : h;
|
|
@@ -228,17 +228,17 @@ var $n = { exports: {} };
|
|
|
228
228
|
}
|
|
229
229
|
(function(v) {
|
|
230
230
|
v.NONE = "NONE", v.DEFAULT_FLAGS = "DEFAULT_FLAGS", v.CACHE = "CACHE", v.SERVER = "SERVER";
|
|
231
|
-
})(
|
|
232
|
-
var E,
|
|
231
|
+
})(a || (a = {}));
|
|
232
|
+
var E, O = null, B = "BULLET_TRAIN_DB", A = "BULLET_TRAIN_EVENT", k = "https://edge.api.flagsmith.com/api/v1/", _ = "flagsmith_value_", R = "flagsmith_enabled_", M = "flagsmith_trait_", I = function() {
|
|
233
233
|
function v(f) {
|
|
234
234
|
var h = this;
|
|
235
235
|
this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
|
|
236
236
|
var m = h, g = m.api, S = m.evaluationContext;
|
|
237
237
|
h.log("Get Flags"), h.isLoading = !0, h.loadingState.isFetching || h.setLoadingState(i(i({}, h.loadingState), { isFetching: !0 }));
|
|
238
|
-
var x = "".concat(h.getContext().identity), D = function(
|
|
239
|
-
var q,
|
|
240
|
-
if (
|
|
241
|
-
var oe =
|
|
238
|
+
var x = "".concat(h.getContext().identity), D = function(P) {
|
|
239
|
+
var q, N, W, ee;
|
|
240
|
+
if (P && x === "".concat(h.getContext().identity)) {
|
|
241
|
+
var oe = P.flags, te = P.traits, ne = P.identifier;
|
|
242
242
|
h.isLoading = !1;
|
|
243
243
|
var ae = {}, ce = {};
|
|
244
244
|
te = te || [], (oe = oe || []).forEach(function(K) {
|
|
@@ -247,11 +247,11 @@ var $n = { exports: {} };
|
|
|
247
247
|
ce[K.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: K.transient, value: K.trait_value };
|
|
248
248
|
}), h.oldFlags = i({}, h.flags);
|
|
249
249
|
var ge = u(h.oldFlags, ae), Ge = u((q = h.evaluationContext.identity) === null || q === void 0 ? void 0 : q.traits, ce);
|
|
250
|
-
if ((ne || Object.keys(ce).length) && (h.evaluationContext.identity = { traits: ce }, ne && (h.evaluationContext.identity.identifier = ne)), h.flags = ae, h.updateStorage(), h._onChange(h.oldFlags, { isFromServer: !0, flagsChanged: ge, traitsChanged: Ge }, h._loadedState(null,
|
|
250
|
+
if ((ne || Object.keys(ce).length) && (h.evaluationContext.identity = { traits: ce }, ne && (h.evaluationContext.identity.identifier = ne)), h.flags = ae, h.updateStorage(), h._onChange(h.oldFlags, { isFromServer: !0, flagsChanged: ge, traitsChanged: Ge }, h._loadedState(null, a.SERVER)), h.datadogRum)
|
|
251
251
|
try {
|
|
252
252
|
if (h.datadogRum.trackTraits) {
|
|
253
253
|
var Ke = {};
|
|
254
|
-
Object.keys(((
|
|
254
|
+
Object.keys(((N = h.evaluationContext.identity) === null || N === void 0 ? void 0 : N.traits) || {}).map(function(K) {
|
|
255
255
|
Ke[M + K] = h.getTrait(K);
|
|
256
256
|
});
|
|
257
257
|
var Me = i(i(i({}, h.datadogRum.client.getUser()), { id: h.datadogRum.client.getUser().id || ((W = h.evaluationContext.identity) === null || W === void 0 ? void 0 : W.identifier) }), Ke);
|
|
@@ -264,7 +264,7 @@ var $n = { exports: {} };
|
|
|
264
264
|
try {
|
|
265
265
|
var se = { javaDouble: {}, date: {}, shortString: {}, javaLongOrObject: {} };
|
|
266
266
|
Object.keys(h.flags).map(function(K) {
|
|
267
|
-
p(se,
|
|
267
|
+
p(se, _ + K, h.getValue(K, { skipAnalytics: !0 })), p(se, R + K, h.hasFeature(K, { skipAnalytics: !0 }));
|
|
268
268
|
}), Object.keys(((ee = h.evaluationContext.identity) === null || ee === void 0 ? void 0 : ee.traits) || {}).map(function(K) {
|
|
269
269
|
p(se, M + K, h.getTrait(K));
|
|
270
270
|
}), h.log("Sending javaLongOrObject traits to dynatrace", se.javaLongOrObject), h.log("Sending date traits to dynatrace", se.date), h.log("Sending shortString traits to dynatrace", se.shortString), h.log("Sending javaDouble to dynatrace", se.javaDouble), h.dtrum.sendSessionProperties(se.javaLongOrObject, se.date, se.shortString, se.javaDouble);
|
|
@@ -273,18 +273,18 @@ var $n = { exports: {} };
|
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
};
|
|
276
|
-
return S.identity ? Promise.all([S.identity.traits && Object.keys(S.identity.traits).length || !S.identity.identifier ? h.getJSON(g + "identities/", "POST", JSON.stringify({ identifier: S.identity.identifier, transient: S.identity.transient, traits: Object.entries(S.identity.traits).map(function(
|
|
277
|
-
var q =
|
|
278
|
-
return { trait_key: q, trait_value:
|
|
279
|
-
}).filter(function(
|
|
280
|
-
return
|
|
281
|
-
}) })) : h.getJSON(g + "identities/?identifier=" + encodeURIComponent(S.identity.identifier) + (S.identity.transient ? "&transient=true" : ""))]).then(function(
|
|
282
|
-
return h.evaluationContext.identity = i(i({}, h.evaluationContext.identity), { traits: {} }), D(
|
|
283
|
-
}).catch(function(
|
|
284
|
-
var q =
|
|
285
|
-
return Promise.reject(
|
|
286
|
-
}) : h.getJSON(g + "flags/").then(function(
|
|
287
|
-
return D({ flags:
|
|
276
|
+
return S.identity ? Promise.all([S.identity.traits && Object.keys(S.identity.traits).length || !S.identity.identifier ? h.getJSON(g + "identities/", "POST", JSON.stringify({ identifier: S.identity.identifier, transient: S.identity.transient, traits: Object.entries(S.identity.traits).map(function(P) {
|
|
277
|
+
var q = P[0], N = P[1];
|
|
278
|
+
return { trait_key: q, trait_value: N == null ? void 0 : N.value, transient: N == null ? void 0 : N.transient };
|
|
279
|
+
}).filter(function(P) {
|
|
280
|
+
return P.trait_value !== void 0 || (h.log("Warning - attempted to set an undefined trait value for key", P.trait_key), !1);
|
|
281
|
+
}) })) : h.getJSON(g + "identities/?identifier=" + encodeURIComponent(S.identity.identifier) + (S.identity.transient ? "&transient=true" : ""))]).then(function(P) {
|
|
282
|
+
return h.evaluationContext.identity = i(i({}, h.evaluationContext.identity), { traits: {} }), D(P == null ? void 0 : P[0]);
|
|
283
|
+
}).catch(function(P) {
|
|
284
|
+
var q = P.message, N = new Error(q);
|
|
285
|
+
return Promise.reject(N);
|
|
286
|
+
}) : h.getJSON(g + "flags/").then(function(P) {
|
|
287
|
+
return D({ flags: P, traits: void 0 });
|
|
288
288
|
});
|
|
289
289
|
}, this.analyticsFlags = function() {
|
|
290
290
|
var m = h.api;
|
|
@@ -297,7 +297,7 @@ var $n = { exports: {} };
|
|
|
297
297
|
}).catch(function(g) {
|
|
298
298
|
h.log("Exception fetching evaluationEvent", g);
|
|
299
299
|
}) : void 0;
|
|
300
|
-
}, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source:
|
|
300
|
+
}, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source: a.NONE }, this.canUseStorage = !1, this.analyticsInterval = null, this.api = null, this.cacheFlags = !1, this.ts = null, this.enableAnalytics = !1, this.enableLogs = !1, this.evaluationContext = {}, this.evaluationEvent = null, this.flags = null, this.getFlagInterval = null, this.headers = null, this.initialised = !1, this.oldFlags = null, this.onChange = null, this.onError = null, this.ticks = null, this.timer = null, this.dtrum = null, this.withTraits = null, this.cacheOptions = { ttl: 0, skipAPI: !1, loadStale: !1 }, this.getValue = function(m, g, S) {
|
|
301
301
|
var x = h.flags && h.flags[m.toLowerCase().replace(/ /g, "_")], D = null;
|
|
302
302
|
if (x && (D = x.value), g != null && g.skipAnalytics || S || h.evaluateFlag(m, "VALUE"), D === null && (g == null ? void 0 : g.fallback) !== void 0)
|
|
303
303
|
return g.fallback;
|
|
@@ -342,12 +342,12 @@ var $n = { exports: {} };
|
|
|
342
342
|
}, this.getJSON = function(m, g, S) {
|
|
343
343
|
var x, D = h;
|
|
344
344
|
D.evaluationContext;
|
|
345
|
-
var
|
|
346
|
-
h.evaluationContext.environment && (q.headers["X-Environment-Key"] = h.evaluationContext.environment.apiKey), g && g !== "GET" && (q.headers["Content-Type"] = "application/json; charset=utf-8"),
|
|
347
|
-
var
|
|
345
|
+
var P = D.headers, q = { method: g || "GET", body: S, cache: "no-cache", headers: {} };
|
|
346
|
+
h.evaluationContext.environment && (q.headers["X-Environment-Key"] = h.evaluationContext.environment.apiKey), g && g !== "GET" && (q.headers["Content-Type"] = "application/json; charset=utf-8"), P && Object.assign(q.headers, P), d || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
|
|
347
|
+
var N = "".concat((x = h.evaluationContext.identity) === null || x === void 0 ? void 0 : x.identifier);
|
|
348
348
|
return d(m, q).then(function(W) {
|
|
349
349
|
var ee, oe, te = "".concat((ee = h.evaluationContext.identity) === null || ee === void 0 ? void 0 : ee.identifier);
|
|
350
|
-
if (
|
|
350
|
+
if (N === te) {
|
|
351
351
|
var ne = (oe = W.headers) === null || oe === void 0 ? void 0 : oe.get("x-flagsmith-document-updated-at");
|
|
352
352
|
if (ne)
|
|
353
353
|
try {
|
|
@@ -367,10 +367,10 @@ var $n = { exports: {} };
|
|
|
367
367
|
return !ge && W.status && (ge = "API Response: ".concat(W.status)), W.status && W.status >= 200 && W.status < 300 ? ge : Promise.reject(new Error(ge));
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
|
-
h.log("Received response with identity mismatch, ignoring response. Requested: ".concat(
|
|
370
|
+
h.log("Received response with identity mismatch, ignoring response. Requested: ".concat(N, ", Current: ").concat(te));
|
|
371
371
|
});
|
|
372
372
|
}, this.evaluateFlag = function(m, g) {
|
|
373
|
-
if (h.datadogRum && (h.datadogRum.client.addFeatureFlagEvaluation ? g === "VALUE" ? h.datadogRum.client.addFeatureFlagEvaluation(
|
|
373
|
+
if (h.datadogRum && (h.datadogRum.client.addFeatureFlagEvaluation ? g === "VALUE" ? h.datadogRum.client.addFeatureFlagEvaluation(_ + m, h.getValue(m, {}, !0)) : h.datadogRum.client.addFeatureFlagEvaluation(R + m, h.hasFeature(m, !0)) : console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")), h.enableAnalytics) {
|
|
374
374
|
if (!h.evaluationEvent || !h.evaluationContext.environment)
|
|
375
375
|
return;
|
|
376
376
|
h.evaluationEvent[h.evaluationContext.environment.apiKey] || (h.evaluationEvent[h.evaluationContext.environment.apiKey] = {}), h.evaluationEvent[h.evaluationContext.environment.apiKey][m] === void 0 && (h.evaluationEvent[h.evaluationContext.environment.apiKey][m] = 0), h.evaluationEvent[h.evaluationContext.environment.apiKey][m] += 1;
|
|
@@ -379,26 +379,26 @@ var $n = { exports: {} };
|
|
|
379
379
|
}, this._onChange = function(m, g, S) {
|
|
380
380
|
var x, D;
|
|
381
381
|
h.setLoadingState(S), (x = h.onChange) === null || x === void 0 || x.call(h, m, g, h.loadingState), (D = h._trigger) === null || D === void 0 || D.call(h);
|
|
382
|
-
}, d = f.fetch ? f.fetch : typeof fetch < "u" ? fetch : $e == null ? void 0 : $e.fetch, this.canUseStorage = typeof window < "u" || !!f.browserlessStorage, this.log("Constructing flagsmith instance " + f), f.eventSource && (E = f.eventSource), f.AsyncStorage && (
|
|
382
|
+
}, d = f.fetch ? f.fetch : typeof fetch < "u" ? fetch : $e == null ? void 0 : $e.fetch, this.canUseStorage = typeof window < "u" || !!f.browserlessStorage, this.log("Constructing flagsmith instance " + f), f.eventSource && (E = f.eventSource), f.AsyncStorage && (O = f.AsyncStorage);
|
|
383
383
|
}
|
|
384
384
|
return v.prototype.init = function(f) {
|
|
385
385
|
var h, m, g;
|
|
386
386
|
return r(this, void 0, void 0, function() {
|
|
387
|
-
var S, x, D,
|
|
388
|
-
return
|
|
387
|
+
var S, x, D, P, q, N, W, ee, oe, te, ne, ae, ce, ge, Ge, Ke, Me, se, K, Ct, Je, Pn, Xe, _t, Bn, jn, Nt, zn, Ot, Ye, Le, Un, ie = this;
|
|
388
|
+
return o(this, function(fe) {
|
|
389
389
|
switch (fe.label) {
|
|
390
390
|
case 0:
|
|
391
391
|
S = y(f.evaluationContext || this.evaluationContext), fe.label = 1;
|
|
392
392
|
case 1:
|
|
393
|
-
if (fe.trys.push([1, 13, , 14]), x = f.environmentID, D = f.api,
|
|
393
|
+
if (fe.trys.push([1, 13, , 14]), x = f.environmentID, D = f.api, P = D === void 0 ? k : D, q = f.headers, N = f.onChange, W = f.cacheFlags, ee = f.datadogRum, oe = f.onError, te = f.defaultFlags, ne = f.fetch, ae = f.preventFetch, ce = f.enableLogs, ge = f.enableDynatrace, Ge = f.enableAnalytics, Ke = f.realtime, Me = f.eventSourceUrl, se = Me === void 0 ? "https://realtime.flagsmith.com/" : Me, K = f.AsyncStorage, Ct = f.identity, Je = f.traits, Pn = f.state, Xe = f.cacheOptions, _t = f.angularHttpClient, Bn = f._trigger, jn = f._triggerLoadingState, S.environment = x ? { apiKey: x } : S.environment, !S.environment || !S.environment.apiKey)
|
|
394
394
|
throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
|
|
395
395
|
if (S.identity = Ct || Je ? { identifier: Ct, traits: Je ? Object.fromEntries(Object.entries(Je).map(function(le) {
|
|
396
396
|
return [le[0], { value: le[1] }];
|
|
397
|
-
})) : {} } : S.identity, this.evaluationContext = S, this.api =
|
|
397
|
+
})) : {} } : S.identity, this.evaluationContext = S, this.api = P, this.headers = q, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = N, Nt = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Bn || this._trigger, this._triggerLoadingState = jn || this._triggerLoadingState, this.onError = function(le) {
|
|
398
398
|
ie.setLoadingState(i(i({}, ie.loadingState), { isFetching: !1, isLoading: !1, error: le })), oe == null || oe(le);
|
|
399
|
-
}, this.enableLogs = ce || !1, this.cacheOptions = Xe ? { skipAPI: !!Xe.skipAPI, ttl: Xe.ttl || 0, loadStale: !!Xe.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), ne && (d = ne), this.enableAnalytics = Ge || !1, this.flags = Object.assign({}, te) || {}, this.datadogRum = ee || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags =
|
|
399
|
+
}, this.enableLogs = ce || !1, this.cacheOptions = Xe ? { skipAPI: !!Xe.skipAPI, ttl: Xe.ttl || 0, loadStale: !!Xe.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), ne && (d = ne), this.enableAnalytics = Ge || !1, this.flags = Object.assign({}, te) || {}, this.datadogRum = ee || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = O !== void 0 && !!W, K && (O = K), Ke && typeof window < "u" && this.setupRealtime(se, S.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = i(i({}, this.loadingState), { isLoading: !1, source: a.DEFAULT_FLAGS })), this.setState(Pn), this.log("Initialising with properties", f, this), ge && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), _t && (d = /* @__PURE__ */ function(le) {
|
|
400
400
|
return function(me, ve) {
|
|
401
|
-
var Te = ve.headers, X = ve.method,
|
|
401
|
+
var Te = ve.headers, X = ve.method, Fe = ve.body;
|
|
402
402
|
return new Promise(function(Oe) {
|
|
403
403
|
switch (X) {
|
|
404
404
|
case "GET":
|
|
@@ -409,7 +409,7 @@ var $n = { exports: {} };
|
|
|
409
409
|
});
|
|
410
410
|
case "POST":
|
|
411
411
|
case "PUT":
|
|
412
|
-
return le.post(me,
|
|
412
|
+
return le.post(me, Fe, { headers: Te }).subscribe(function(xe) {
|
|
413
413
|
Oe({ ok: !0, text: function() {
|
|
414
414
|
return Promise.resolve(xe);
|
|
415
415
|
} });
|
|
@@ -417,14 +417,14 @@ var $n = { exports: {} };
|
|
|
417
417
|
}
|
|
418
418
|
});
|
|
419
419
|
};
|
|
420
|
-
}(_t)),
|
|
420
|
+
}(_t)), O && this.canUseStorage && O.getItem(A).then(function(le) {
|
|
421
421
|
try {
|
|
422
422
|
ie.evaluationEvent = JSON.parse(le) || {};
|
|
423
423
|
} catch {
|
|
424
424
|
ie.evaluationEvent = {};
|
|
425
425
|
}
|
|
426
426
|
ie.analyticsInterval = setInterval(ie.analyticsFlags, ie.ticks);
|
|
427
|
-
}), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval),
|
|
427
|
+
}), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), O && this.canUseStorage && O.getItem(A, function(le, me) {
|
|
428
428
|
if (me && ie.evaluationContext.environment) {
|
|
429
429
|
var ve = JSON.parse(me);
|
|
430
430
|
if (ve[ie.evaluationContext.environment.apiKey]) {
|
|
@@ -434,19 +434,19 @@ var $n = { exports: {} };
|
|
|
434
434
|
}
|
|
435
435
|
})), !W)
|
|
436
436
|
return [3, 9];
|
|
437
|
-
if (!
|
|
437
|
+
if (!O || !this.canUseStorage)
|
|
438
438
|
return [3, 8];
|
|
439
439
|
zn = function(le, me) {
|
|
440
440
|
return r(ie, void 0, void 0, function() {
|
|
441
|
-
var ve, Te, X,
|
|
442
|
-
return
|
|
441
|
+
var ve, Te, X, Fe, Oe, xe, Rt, Hn, Dt, At, Mt, Lt, Ft, Pt, Bt, jt, zt, Ut, Ht, $t, qt, Wt, Vt, Gt;
|
|
442
|
+
return o(this, function(Ee) {
|
|
443
443
|
switch (Ee.label) {
|
|
444
444
|
case 0:
|
|
445
445
|
if (!me)
|
|
446
446
|
return [3, 7];
|
|
447
447
|
ve = null, Te = null, Ee.label = 1;
|
|
448
448
|
case 1:
|
|
449
|
-
return Ee.trys.push([1, 5, , 6]), X = JSON.parse(me),
|
|
449
|
+
return Ee.trys.push([1, 5, , 6]), X = JSON.parse(me), Fe = !1, Oe = !1, X && X.api === this.api && ((At = (Dt = X.evaluationContext) === null || Dt === void 0 ? void 0 : Dt.environment) === null || At === void 0 ? void 0 : At.apiKey) === ((Mt = this.evaluationContext.environment) === null || Mt === void 0 ? void 0 : Mt.apiKey) && (xe = !0, this.evaluationContext.identity && ((Ft = (Lt = X.evaluationContext) === null || Lt === void 0 ? void 0 : Lt.identity) === null || Ft === void 0 ? void 0 : Ft.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((Bt = (Pt = X.evaluationContext) === null || Pt === void 0 ? void 0 : Pt.identity) === null || Bt === void 0 ? void 0 : Bt.identifier) + " to " + this.evaluationContext.identity.identifier), xe = !1), this.cacheOptions.ttl && (!X.ts || (/* @__PURE__ */ new Date()).valueOf() - X.ts > this.cacheOptions.ttl) && (X.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + X.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - X.ts) + "ms"), xe = !1) : X.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + X.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - X.ts) + "ms"), Oe = !0, xe = !0)), xe && (Fe = !0, Te = u((jt = this.evaluationContext.identity) === null || jt === void 0 ? void 0 : jt.traits, (Ut = (zt = X.evaluationContext) === null || zt === void 0 ? void 0 : zt.identity) === null || Ut === void 0 ? void 0 : Ut.traits), ve = u(this.flags, X.flags), this.setState(i(i({}, X), { evaluationContext: y(i(i({}, X.evaluationContext), { identity: !((Ht = X.evaluationContext) === null || Ht === void 0) && Ht.identity ? i(i({}, ($t = X.evaluationContext) === null || $t === void 0 ? void 0 : $t.identity), { traits: i(i({}, ((Wt = (qt = X.evaluationContext) === null || qt === void 0 ? void 0 : qt.identity) === null || Wt === void 0 ? void 0 : Wt.traits) || {}), Je || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", X))), Fe ? (Rt = !ae && (!this.cacheOptions.skipAPI || Oe), this._onChange(null, { isFromServer: !1, flagsChanged: ve, traitsChanged: Te }, this._loadedState(null, a.CACHE, Rt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && Fe && !Oe && this.log("Skipping API, using cache"), Rt && this.getFlags(), [3, 4]) : [3, 2];
|
|
450
450
|
case 2:
|
|
451
451
|
return ae ? [3, 4] : [4, this.getFlags()];
|
|
452
452
|
case 3:
|
|
@@ -463,11 +463,11 @@ var $n = { exports: {} };
|
|
|
463
463
|
return Ee.sent(), [3, 10];
|
|
464
464
|
case 9:
|
|
465
465
|
if (te)
|
|
466
|
-
this._onChange(null, { isFromServer: !1, flagsChanged: u({}, this.flags), traitsChanged: u({}, (Vt = this.evaluationContext.identity) === null || Vt === void 0 ? void 0 : Vt.traits) }, this._loadedState(null,
|
|
466
|
+
this._onChange(null, { isFromServer: !1, flagsChanged: u({}, this.flags), traitsChanged: u({}, (Vt = this.evaluationContext.identity) === null || Vt === void 0 ? void 0 : Vt.traits) }, this._loadedState(null, a.DEFAULT_FLAGS));
|
|
467
467
|
else {
|
|
468
468
|
if (!this.flags)
|
|
469
469
|
throw new Error(Nt);
|
|
470
|
-
this._onChange(null, { isFromServer: !1, flagsChanged: u({}, this.flags), traitsChanged: u({}, (Gt = this.evaluationContext.identity) === null || Gt === void 0 ? void 0 : Gt.traits) }, this._loadedState(null,
|
|
470
|
+
this._onChange(null, { isFromServer: !1, flagsChanged: u({}, this.flags), traitsChanged: u({}, (Gt = this.evaluationContext.identity) === null || Gt === void 0 ? void 0 : Gt.traits) }, this._loadedState(null, a.DEFAULT_FLAGS));
|
|
471
471
|
}
|
|
472
472
|
Ee.label = 10;
|
|
473
473
|
case 10:
|
|
@@ -477,9 +477,9 @@ var $n = { exports: {} };
|
|
|
477
477
|
});
|
|
478
478
|
}, fe.label = 2;
|
|
479
479
|
case 2:
|
|
480
|
-
return fe.trys.push([2, 7, , 8]),
|
|
480
|
+
return fe.trys.push([2, 7, , 8]), O.getItemSync ? (Ot = O.getItemSync(B), [3, 5]) : [3, 3];
|
|
481
481
|
case 3:
|
|
482
|
-
return [4,
|
|
482
|
+
return [4, O.getItem(B)];
|
|
483
483
|
case 4:
|
|
484
484
|
Ot = fe.sent(), fe.label = 5;
|
|
485
485
|
case 5:
|
|
@@ -495,14 +495,14 @@ var $n = { exports: {} };
|
|
|
495
495
|
return fe.sent(), [3, 12];
|
|
496
496
|
case 11:
|
|
497
497
|
if (te)
|
|
498
|
-
this._onChange(null, { isFromServer: !1, flagsChanged: u({}, te), traitsChanged: u({}, (h = S.identity) === null || h === void 0 ? void 0 : h.traits) }, this._loadedState(null,
|
|
499
|
-
else if (this.flags && (Ye = null, Object.keys(this.flags).length === 0 && (Ye = Nt), this._onChange(null, { isFromServer: !1, flagsChanged: u({}, this.flags), traitsChanged: u({}, (m = S.identity) === null || m === void 0 ? void 0 : m.traits) }, this._loadedState(Ye,
|
|
498
|
+
this._onChange(null, { isFromServer: !1, flagsChanged: u({}, te), traitsChanged: u({}, (h = S.identity) === null || h === void 0 ? void 0 : h.traits) }, this._loadedState(null, a.DEFAULT_FLAGS));
|
|
499
|
+
else if (this.flags && (Ye = null, Object.keys(this.flags).length === 0 && (Ye = Nt), this._onChange(null, { isFromServer: !1, flagsChanged: u({}, this.flags), traitsChanged: u({}, (m = S.identity) === null || m === void 0 ? void 0 : m.traits) }, this._loadedState(Ye, a.DEFAULT_FLAGS)), Ye))
|
|
500
500
|
throw new Error(Ye);
|
|
501
501
|
fe.label = 12;
|
|
502
502
|
case 12:
|
|
503
503
|
return [3, 14];
|
|
504
504
|
case 13:
|
|
505
|
-
throw
|
|
505
|
+
throw Le = fe.sent(), this.log("Error during initialisation ", Le), Un = Le instanceof Error ? Le : new Error("".concat(Le)), (g = this.onError) === null || g === void 0 || g.call(this, Un), Le;
|
|
506
506
|
case 14:
|
|
507
507
|
return [2];
|
|
508
508
|
}
|
|
@@ -535,16 +535,16 @@ var $n = { exports: {} };
|
|
|
535
535
|
if (this.cacheFlags) {
|
|
536
536
|
this.ts = (/* @__PURE__ */ new Date()).valueOf();
|
|
537
537
|
var f = JSON.stringify(this.getState());
|
|
538
|
-
this.log("Setting storage", f),
|
|
538
|
+
this.log("Setting storage", f), O.setItem(B, f);
|
|
539
539
|
}
|
|
540
540
|
}, v.prototype.updateEventStorage = function() {
|
|
541
541
|
if (this.enableAnalytics) {
|
|
542
542
|
var f = JSON.stringify(this.getState().evaluationEvent);
|
|
543
|
-
|
|
543
|
+
O.setItem(A, f);
|
|
544
544
|
}
|
|
545
545
|
}, v.prototype.setLoadingState = function(f) {
|
|
546
546
|
var h;
|
|
547
|
-
|
|
547
|
+
c(f, this.loadingState) || (this.loadingState = i({}, f), this.log("Loading state changed", f), (h = this._triggerLoadingState) === null || h === void 0 || h.call(this));
|
|
548
548
|
}, v.prototype.setupRealtime = function(f, h) {
|
|
549
549
|
var m = this, g = f + "sse/environments/" + h + "/stream";
|
|
550
550
|
E ? this.eventSource || (this.log("Creating event source with url " + g), this.eventSource = new E(g), this.eventSource.addEventListener("environment_updated", function(S) {
|
|
@@ -562,7 +562,7 @@ var $n = { exports: {} };
|
|
|
562
562
|
var f = v.fetch, h = v.AsyncStorage, m = v.eventSource;
|
|
563
563
|
return new I({ fetch: f, AsyncStorage: h, eventSource: m });
|
|
564
564
|
}
|
|
565
|
-
var F,
|
|
565
|
+
var F, U = (F = function(v, f) {
|
|
566
566
|
return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, m) {
|
|
567
567
|
h.__proto__ = m;
|
|
568
568
|
} || function(h, m) {
|
|
@@ -576,7 +576,7 @@ var $n = { exports: {} };
|
|
|
576
576
|
this.constructor = v;
|
|
577
577
|
}
|
|
578
578
|
F(v, f), v.prototype = f === null ? Object.create(f) : (h.prototype = f.prototype, new h());
|
|
579
|
-
}),
|
|
579
|
+
}), j = function(v) {
|
|
580
580
|
var f = typeof Symbol == "function" && Symbol.iterator, h = f && v[f], m = 0;
|
|
581
581
|
if (h)
|
|
582
582
|
return h.call(v);
|
|
@@ -604,22 +604,22 @@ var $n = { exports: {} };
|
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
606
|
return x;
|
|
607
|
-
},
|
|
607
|
+
}, C = function(v, f, h) {
|
|
608
608
|
if (h || arguments.length === 2)
|
|
609
609
|
for (var m, g = 0, S = f.length; g < S; g++)
|
|
610
610
|
!m && g in f || (m || (m = Array.prototype.slice.call(f, 0, g)), m[g] = f[g]);
|
|
611
611
|
return v.concat(m || Array.prototype.slice.call(f));
|
|
612
|
-
},
|
|
612
|
+
}, L = function(v) {
|
|
613
613
|
function f() {
|
|
614
614
|
return v.call(this, `EventSource not available.
|
|
615
615
|
Consider loading an EventSource polyfill and making it available globally as EventSource, or passing one in as eventSourceClass to the ReconnectingEventSource constructor.`) || this;
|
|
616
616
|
}
|
|
617
|
-
return
|
|
617
|
+
return U(f, v), f;
|
|
618
618
|
}(Error), V = function() {
|
|
619
619
|
function v(f, h) {
|
|
620
620
|
var m = this;
|
|
621
621
|
if (this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, this._configuration = h != null ? Object.assign({}, h) : void 0, this.withCredentials = !1, this._eventSource = null, this._lastEventId = null, this._timer = null, this._listeners = { open: [], error: [], message: [] }, this.url = f.toString(), this.readyState = this.CONNECTING, this.max_retry_time = 3e3, this.eventSourceClass = globalThis.FlagsmithEventSource, this._configuration != null && (this._configuration.lastEventId && (this._lastEventId = this._configuration.lastEventId, delete this._configuration.lastEventId), this._configuration.max_retry_time && (this.max_retry_time = this._configuration.max_retry_time, delete this._configuration.max_retry_time), this._configuration.eventSourceClass && (this.eventSourceClass = this._configuration.eventSourceClass, delete this._configuration.eventSourceClass)), this.eventSourceClass == null || typeof this.eventSourceClass != "function")
|
|
622
|
-
throw new
|
|
622
|
+
throw new L();
|
|
623
623
|
this._onevent_wrapped = function(g) {
|
|
624
624
|
m._onevent(g);
|
|
625
625
|
}, this._start();
|
|
@@ -628,20 +628,20 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
628
628
|
throw new Error("Method not implemented.");
|
|
629
629
|
}, v.prototype._start = function() {
|
|
630
630
|
var f, h, m = this, g = this.url;
|
|
631
|
-
this._lastEventId && (g.indexOf("?") === -1 ? g += "?" : g += "&", g += "lastEventId=" + encodeURIComponent(this._lastEventId)), this._eventSource = new this.eventSourceClass(g, this._configuration), this._eventSource.onopen = function(
|
|
632
|
-
m._onopen(
|
|
633
|
-
}, this._eventSource.onerror = function(
|
|
634
|
-
m._onerror(
|
|
635
|
-
}, this._eventSource.onmessage = function(
|
|
636
|
-
m.onmessage(
|
|
631
|
+
this._lastEventId && (g.indexOf("?") === -1 ? g += "?" : g += "&", g += "lastEventId=" + encodeURIComponent(this._lastEventId)), this._eventSource = new this.eventSourceClass(g, this._configuration), this._eventSource.onopen = function(P) {
|
|
632
|
+
m._onopen(P);
|
|
633
|
+
}, this._eventSource.onerror = function(P) {
|
|
634
|
+
m._onerror(P);
|
|
635
|
+
}, this._eventSource.onmessage = function(P) {
|
|
636
|
+
m.onmessage(P);
|
|
637
637
|
};
|
|
638
638
|
try {
|
|
639
|
-
for (var S =
|
|
639
|
+
for (var S = j(Object.keys(this._listeners)), x = S.next(); !x.done; x = S.next()) {
|
|
640
640
|
var D = x.value;
|
|
641
641
|
this._eventSource.addEventListener(D, this._onevent_wrapped);
|
|
642
642
|
}
|
|
643
|
-
} catch (
|
|
644
|
-
f = { error:
|
|
643
|
+
} catch (P) {
|
|
644
|
+
f = { error: P };
|
|
645
645
|
} finally {
|
|
646
646
|
try {
|
|
647
647
|
x && !x.done && (h = S.return) && h.call(S);
|
|
@@ -667,7 +667,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
667
667
|
var g = this._listeners[f.type];
|
|
668
668
|
if (g != null)
|
|
669
669
|
try {
|
|
670
|
-
for (var S =
|
|
670
|
+
for (var S = j(C([], z(g), !1)), x = S.next(); !x.done; x = S.next())
|
|
671
671
|
x.value.call(this, f);
|
|
672
672
|
} catch (D) {
|
|
673
673
|
h = { error: D };
|
|
@@ -688,7 +688,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
688
688
|
}, v.prototype.addEventListener = function(f, h, m) {
|
|
689
689
|
this._listeners[f] == null && (this._listeners[f] = [], this._eventSource != null && this._eventSource.addEventListener(f, this._onevent_wrapped));
|
|
690
690
|
var g = this._listeners[f];
|
|
691
|
-
g.includes(h) || (this._listeners[f] =
|
|
691
|
+
g.includes(h) || (this._listeners[f] = C(C([], z(g), !1), [h], !1));
|
|
692
692
|
}, v.prototype.removeEventListener = function(f, h, m) {
|
|
693
693
|
var g = this._listeners[f];
|
|
694
694
|
this._listeners[f] = g.filter(function(S) {
|
|
@@ -699,46 +699,46 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
699
699
|
globalThis.FlagsmithEventSource = typeof EventSource < "u" ? EventSource : null;
|
|
700
700
|
var G = function(v, f) {
|
|
701
701
|
return f = f || {}, new Promise(function(h, m) {
|
|
702
|
-
var g = new XMLHttpRequest(), S = [], x = [], D = {},
|
|
702
|
+
var g = new XMLHttpRequest(), S = [], x = [], D = {}, P = function() {
|
|
703
703
|
return { ok: (g.status / 100 | 0) == 2, statusText: g.statusText, status: g.status, url: g.responseURL, text: function() {
|
|
704
704
|
return Promise.resolve(g.responseText);
|
|
705
705
|
}, json: function() {
|
|
706
706
|
return Promise.resolve(g.responseText).then(JSON.parse);
|
|
707
707
|
}, blob: function() {
|
|
708
708
|
return Promise.resolve(new Blob([g.response]));
|
|
709
|
-
}, clone:
|
|
709
|
+
}, clone: P, headers: { keys: function() {
|
|
710
710
|
return S;
|
|
711
711
|
}, entries: function() {
|
|
712
712
|
return x;
|
|
713
|
-
}, get: function(
|
|
714
|
-
return D[
|
|
715
|
-
}, has: function(
|
|
716
|
-
return
|
|
713
|
+
}, get: function(N) {
|
|
714
|
+
return D[N.toLowerCase()];
|
|
715
|
+
}, has: function(N) {
|
|
716
|
+
return N.toLowerCase() in D;
|
|
717
717
|
} } };
|
|
718
718
|
};
|
|
719
719
|
for (var q in g.open(f.method || "get", v, !0), g.onload = function() {
|
|
720
|
-
g.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(
|
|
720
|
+
g.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(N, W, ee) {
|
|
721
721
|
S.push(W = W.toLowerCase()), x.push([W, ee]), D[W] = D[W] ? D[W] + "," + ee : ee;
|
|
722
|
-
}), h(
|
|
722
|
+
}), h(P());
|
|
723
723
|
}, g.onerror = m, g.withCredentials = f.credentials == "include", f.headers)
|
|
724
724
|
g.setRequestHeader(q, f.headers[q]);
|
|
725
725
|
g.send(f.body || null);
|
|
726
726
|
});
|
|
727
|
-
},
|
|
728
|
-
typeof window < "u" && (window.flagsmith =
|
|
727
|
+
}, $ = T({ AsyncStorage: s, fetch: G, eventSource: V });
|
|
728
|
+
typeof window < "u" && (window.flagsmith = $), n.createFlagsmithInstance = function() {
|
|
729
729
|
return T({ AsyncStorage: s, fetch: G, eventSource: V });
|
|
730
|
-
}, n.default =
|
|
730
|
+
}, n.default = $, Object.defineProperty(n, "__esModule", { value: !0 });
|
|
731
731
|
});
|
|
732
732
|
})($n, $n.exports);
|
|
733
733
|
var qn = {}, bi = function(t, e, n, s, i) {
|
|
734
734
|
var r = new Worker(qn[e] || (qn[e] = URL.createObjectURL(new Blob([
|
|
735
735
|
t + ';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'
|
|
736
736
|
], { type: "text/javascript" }))));
|
|
737
|
-
return r.onmessage = function(
|
|
738
|
-
var l =
|
|
739
|
-
if (
|
|
740
|
-
var u = new Error(
|
|
741
|
-
u.code =
|
|
737
|
+
return r.onmessage = function(o) {
|
|
738
|
+
var l = o.data, c = l.$e$;
|
|
739
|
+
if (c) {
|
|
740
|
+
var u = new Error(c[0]);
|
|
741
|
+
u.code = c[1], u.stack = c[2], i(u, null);
|
|
742
742
|
} else
|
|
743
743
|
i(null, l);
|
|
744
744
|
}, r.postMessage(n, s), r;
|
|
@@ -828,20 +828,20 @@ for (var J = 0; J < 32768; ++J) {
|
|
|
828
828
|
var qe = function(t, e, n) {
|
|
829
829
|
for (var s = t.length, i = 0, r = new re(e); i < s; ++i)
|
|
830
830
|
t[i] && ++r[t[i] - 1];
|
|
831
|
-
var
|
|
831
|
+
var o = new re(e);
|
|
832
832
|
for (i = 1; i < e; ++i)
|
|
833
|
-
|
|
833
|
+
o[i] = o[i - 1] + r[i - 1] << 1;
|
|
834
834
|
var l;
|
|
835
835
|
if (n) {
|
|
836
836
|
l = new re(1 << e);
|
|
837
|
-
var
|
|
837
|
+
var c = 15 - e;
|
|
838
838
|
for (i = 0; i < s; ++i)
|
|
839
839
|
if (t[i])
|
|
840
|
-
for (var u = i << 4 | t[i],
|
|
841
|
-
l[ft[d] >>
|
|
840
|
+
for (var u = i << 4 | t[i], a = e - t[i], d = o[t[i] - 1]++ << a, p = d | (1 << a) - 1; d <= p; ++d)
|
|
841
|
+
l[ft[d] >> c] = u;
|
|
842
842
|
} else
|
|
843
843
|
for (l = new re(s), i = 0; i < s; ++i)
|
|
844
|
-
t[i] && (l[i] = ft[
|
|
844
|
+
t[i] && (l[i] = ft[o[t[i] - 1]++] >> 15 - t[i]);
|
|
845
845
|
return l;
|
|
846
846
|
}, Ne = new de(288);
|
|
847
847
|
for (var J = 0; J < 144; ++J)
|
|
@@ -855,9 +855,9 @@ for (var J = 280; J < 288; ++J)
|
|
|
855
855
|
var tt = new de(32);
|
|
856
856
|
for (var J = 0; J < 32; ++J)
|
|
857
857
|
tt[J] = 5;
|
|
858
|
-
var Ms = /* @__PURE__ */ qe(Ne, 9, 0),
|
|
858
|
+
var Ms = /* @__PURE__ */ qe(Ne, 9, 0), Ls = /* @__PURE__ */ qe(tt, 5, 0), Tn = function(t) {
|
|
859
859
|
return (t + 7) / 8 | 0;
|
|
860
|
-
},
|
|
860
|
+
}, Fs = function(t, e, n) {
|
|
861
861
|
return (e == null || e < 0) && (e = 0), (n == null || n > t.length) && (n = t.length), new de(t.subarray(e, n));
|
|
862
862
|
}, Si = [
|
|
863
863
|
"unexpected EOF",
|
|
@@ -895,26 +895,26 @@ var Ms = /* @__PURE__ */ qe(Ne, 9, 0), Fs = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
|
|
|
895
895
|
if (!i)
|
|
896
896
|
return { t: In, l: 0 };
|
|
897
897
|
if (i == 1) {
|
|
898
|
-
var
|
|
899
|
-
return
|
|
898
|
+
var o = new de(n[0].s + 1);
|
|
899
|
+
return o[n[0].s] = 1, { t: o, l: 1 };
|
|
900
900
|
}
|
|
901
|
-
n.sort(function(
|
|
902
|
-
return
|
|
901
|
+
n.sort(function(_, R) {
|
|
902
|
+
return _.f - R.f;
|
|
903
903
|
}), n.push({ s: -1, f: 25001 });
|
|
904
|
-
var l = n[0],
|
|
905
|
-
for (n[0] = { s: -1, f: l.f +
|
|
906
|
-
l = n[n[u].f < n[d].f ? u++ : d++],
|
|
904
|
+
var l = n[0], c = n[1], u = 0, a = 1, d = 2;
|
|
905
|
+
for (n[0] = { s: -1, f: l.f + c.f, l, r: c }; a != i - 1; )
|
|
906
|
+
l = n[n[u].f < n[d].f ? u++ : d++], c = n[u != a && n[u].f < n[d].f ? u++ : d++], n[a++] = { s: -1, f: l.f + c.f, l, r: c };
|
|
907
907
|
for (var p = r[0].s, s = 1; s < i; ++s)
|
|
908
908
|
r[s].s > p && (p = r[s].s);
|
|
909
|
-
var b = new re(p + 1), w = pt(n[
|
|
909
|
+
var b = new re(p + 1), w = pt(n[a - 1], b, 0);
|
|
910
910
|
if (w > e) {
|
|
911
|
-
var s = 0, y = 0, E = w - e,
|
|
912
|
-
for (r.sort(function(
|
|
913
|
-
return b[M.s] - b[
|
|
911
|
+
var s = 0, y = 0, E = w - e, O = 1 << E;
|
|
912
|
+
for (r.sort(function(R, M) {
|
|
913
|
+
return b[M.s] - b[R.s] || R.f - M.f;
|
|
914
914
|
}); s < i; ++s) {
|
|
915
|
-
var
|
|
916
|
-
if (b[
|
|
917
|
-
y +=
|
|
915
|
+
var B = r[s].s;
|
|
916
|
+
if (b[B] > e)
|
|
917
|
+
y += O - (1 << w - b[B]), b[B] = e;
|
|
918
918
|
else
|
|
919
919
|
break;
|
|
920
920
|
}
|
|
@@ -934,23 +934,23 @@ var Ms = /* @__PURE__ */ qe(Ne, 9, 0), Fs = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
|
|
|
934
934
|
}, ln = function(t) {
|
|
935
935
|
for (var e = t.length; e && !t[--e]; )
|
|
936
936
|
;
|
|
937
|
-
for (var n = new re(++e), s = 0, i = t[0], r = 1,
|
|
938
|
-
n[s++] =
|
|
937
|
+
for (var n = new re(++e), s = 0, i = t[0], r = 1, o = function(c) {
|
|
938
|
+
n[s++] = c;
|
|
939
939
|
}, l = 1; l <= e; ++l)
|
|
940
940
|
if (t[l] == i && l != e)
|
|
941
941
|
++r;
|
|
942
942
|
else {
|
|
943
943
|
if (!i && r > 2) {
|
|
944
944
|
for (; r > 138; r -= 138)
|
|
945
|
-
|
|
946
|
-
r > 2 && (
|
|
945
|
+
o(32754);
|
|
946
|
+
r > 2 && (o(r > 10 ? r - 11 << 5 | 28690 : r - 3 << 5 | 12305), r = 0);
|
|
947
947
|
} else if (r > 3) {
|
|
948
|
-
for (
|
|
949
|
-
|
|
950
|
-
r > 2 && (
|
|
948
|
+
for (o(i), --r; r > 6; r -= 6)
|
|
949
|
+
o(8304);
|
|
950
|
+
r > 2 && (o(r - 3 << 5 | 8208), r = 0);
|
|
951
951
|
}
|
|
952
952
|
for (; r--; )
|
|
953
|
-
|
|
953
|
+
o(i);
|
|
954
954
|
r = 1, i = t[l];
|
|
955
955
|
}
|
|
956
956
|
return { c: n.subarray(0, s), n: e };
|
|
@@ -964,96 +964,96 @@ var Ms = /* @__PURE__ */ qe(Ne, 9, 0), Fs = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
|
|
|
964
964
|
for (var r = 0; r < s; ++r)
|
|
965
965
|
t[i + r + 4] = n[r];
|
|
966
966
|
return (i + 4 + s) * 8;
|
|
967
|
-
}, un = function(t, e, n, s, i, r,
|
|
968
|
-
be(e,
|
|
969
|
-
for (var d = ct(i, 15), p = d.t, b = d.l, w = ct(r, 15), y = w.t, E = w.l,
|
|
970
|
-
++M[
|
|
971
|
-
for (var I = 0; I <
|
|
972
|
-
++M[
|
|
973
|
-
for (var T = ct(M, 7), F = T.t,
|
|
967
|
+
}, un = function(t, e, n, s, i, r, o, l, c, u, a) {
|
|
968
|
+
be(e, a++, n), ++i[256];
|
|
969
|
+
for (var d = ct(i, 15), p = d.t, b = d.l, w = ct(r, 15), y = w.t, E = w.l, O = ln(p), B = O.c, A = O.n, k = ln(y), _ = k.c, R = k.n, M = new re(19), I = 0; I < B.length; ++I)
|
|
970
|
+
++M[B[I] & 31];
|
|
971
|
+
for (var I = 0; I < _.length; ++I)
|
|
972
|
+
++M[_[I] & 31];
|
|
973
|
+
for (var T = ct(M, 7), F = T.t, U = T.l, j = 19; j > 4 && !F[an[j - 1]]; --j)
|
|
974
974
|
;
|
|
975
|
-
var z = u + 5 << 3,
|
|
976
|
-
if (
|
|
977
|
-
return En(e,
|
|
978
|
-
var V, G,
|
|
979
|
-
if (be(e,
|
|
980
|
-
V = qe(p, b, 0), G = p,
|
|
981
|
-
var f = qe(F,
|
|
982
|
-
be(e,
|
|
983
|
-
for (var I = 0; I <
|
|
984
|
-
be(e,
|
|
985
|
-
|
|
986
|
-
for (var h = [
|
|
975
|
+
var z = u + 5 << 3, C = Ue(i, Ne) + Ue(r, tt) + o, L = Ue(i, p) + Ue(r, y) + o + 14 + 3 * j + Ue(M, F) + 2 * M[16] + 3 * M[17] + 7 * M[18];
|
|
976
|
+
if (c >= 0 && z <= C && z <= L)
|
|
977
|
+
return En(e, a, t.subarray(c, c + u));
|
|
978
|
+
var V, G, $, v;
|
|
979
|
+
if (be(e, a, 1 + (L < C)), a += 2, L < C) {
|
|
980
|
+
V = qe(p, b, 0), G = p, $ = qe(y, E, 0), v = y;
|
|
981
|
+
var f = qe(F, U, 0);
|
|
982
|
+
be(e, a, A - 257), be(e, a + 5, R - 1), be(e, a + 10, j - 4), a += 14;
|
|
983
|
+
for (var I = 0; I < j; ++I)
|
|
984
|
+
be(e, a + 3 * I, F[an[I]]);
|
|
985
|
+
a += 3 * j;
|
|
986
|
+
for (var h = [B, _], m = 0; m < 2; ++m)
|
|
987
987
|
for (var g = h[m], I = 0; I < g.length; ++I) {
|
|
988
988
|
var S = g[I] & 31;
|
|
989
|
-
be(e,
|
|
989
|
+
be(e, a, f[S]), a += F[S], S > 15 && (be(e, a, g[I] >> 5 & 127), a += g[I] >> 12);
|
|
990
990
|
}
|
|
991
991
|
} else
|
|
992
|
-
V = Ms, G = Ne,
|
|
992
|
+
V = Ms, G = Ne, $ = Ls, v = tt;
|
|
993
993
|
for (var I = 0; I < l; ++I) {
|
|
994
994
|
var x = s[I];
|
|
995
995
|
if (x > 255) {
|
|
996
996
|
var S = x >> 18 & 31;
|
|
997
|
-
ze(e,
|
|
997
|
+
ze(e, a, V[S + 257]), a += G[S + 257], S > 7 && (be(e, a, x >> 23 & 31), a += kt[S]);
|
|
998
998
|
var D = x & 31;
|
|
999
|
-
ze(e,
|
|
999
|
+
ze(e, a, $[D]), a += v[D], D > 3 && (ze(e, a, x >> 5 & 8191), a += Tt[D]);
|
|
1000
1000
|
} else
|
|
1001
|
-
ze(e,
|
|
1001
|
+
ze(e, a, V[x]), a += G[x];
|
|
1002
1002
|
}
|
|
1003
|
-
return ze(e,
|
|
1003
|
+
return ze(e, a, V[256]), a + G[256];
|
|
1004
1004
|
}, Bs = /* @__PURE__ */ new xt([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), In = /* @__PURE__ */ new de(0), js = function(t, e, n, s, i, r) {
|
|
1005
|
-
var
|
|
1005
|
+
var o = r.z || t.length, l = new de(s + o + 5 * (1 + Math.ceil(o / 7e3)) + i), c = l.subarray(s, l.length - i), u = r.l, a = (r.r || 0) & 7;
|
|
1006
1006
|
if (e) {
|
|
1007
|
-
|
|
1008
|
-
for (var d = Bs[e - 1], p = d >> 13, b = d & 8191, w = (1 << n) - 1, y = r.p || new re(32768), E = r.h || new re(w + 1),
|
|
1009
|
-
return (t[ne] ^ t[ne + 1] <<
|
|
1010
|
-
}, k = new xt(25e3),
|
|
1011
|
-
var z = A(T),
|
|
1012
|
-
if (y[
|
|
1013
|
-
var V =
|
|
1007
|
+
a && (c[0] = r.r >> 3);
|
|
1008
|
+
for (var d = Bs[e - 1], p = d >> 13, b = d & 8191, w = (1 << n) - 1, y = r.p || new re(32768), E = r.h || new re(w + 1), O = Math.ceil(n / 3), B = 2 * O, A = function(ne) {
|
|
1009
|
+
return (t[ne] ^ t[ne + 1] << O ^ t[ne + 2] << B) & w;
|
|
1010
|
+
}, k = new xt(25e3), _ = new re(288), R = new re(32), M = 0, I = 0, T = r.i || 0, F = 0, U = r.w || 0, j = 0; T + 2 < o; ++T) {
|
|
1011
|
+
var z = A(T), C = T & 32767, L = E[z];
|
|
1012
|
+
if (y[C] = L, E[z] = C, U <= T) {
|
|
1013
|
+
var V = o - T;
|
|
1014
1014
|
if ((M > 7e3 || F > 24576) && (V > 423 || !u)) {
|
|
1015
|
-
|
|
1015
|
+
a = un(t, c, 0, k, _, R, I, F, j, T - j, a), F = M = I = 0, j = T;
|
|
1016
1016
|
for (var G = 0; G < 286; ++G)
|
|
1017
|
-
C[G] = 0;
|
|
1018
|
-
for (var G = 0; G < 30; ++G)
|
|
1019
1017
|
_[G] = 0;
|
|
1018
|
+
for (var G = 0; G < 30; ++G)
|
|
1019
|
+
R[G] = 0;
|
|
1020
1020
|
}
|
|
1021
|
-
var
|
|
1021
|
+
var $ = 2, v = 0, f = b, h = C - L & 32767;
|
|
1022
1022
|
if (V > 2 && z == A(T - h))
|
|
1023
|
-
for (var m = Math.min(p, V) - 1, g = Math.min(32767, T), S = Math.min(258, V); h <= g && --f &&
|
|
1024
|
-
if (t[T +
|
|
1023
|
+
for (var m = Math.min(p, V) - 1, g = Math.min(32767, T), S = Math.min(258, V); h <= g && --f && C != L; ) {
|
|
1024
|
+
if (t[T + $] == t[T + $ - h]) {
|
|
1025
1025
|
for (var x = 0; x < S && t[T + x] == t[T + x - h]; ++x)
|
|
1026
1026
|
;
|
|
1027
|
-
if (x >
|
|
1028
|
-
if (
|
|
1027
|
+
if (x > $) {
|
|
1028
|
+
if ($ = x, v = h, x > m)
|
|
1029
1029
|
break;
|
|
1030
|
-
for (var D = Math.min(h, x - 2),
|
|
1031
|
-
var q = T - h + G & 32767,
|
|
1032
|
-
W >
|
|
1030
|
+
for (var D = Math.min(h, x - 2), P = 0, G = 0; G < D; ++G) {
|
|
1031
|
+
var q = T - h + G & 32767, N = y[q], W = q - N & 32767;
|
|
1032
|
+
W > P && (P = W, L = q);
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
1035
1035
|
}
|
|
1036
|
-
|
|
1036
|
+
C = L, L = y[C], h += C - L & 32767;
|
|
1037
1037
|
}
|
|
1038
1038
|
if (v) {
|
|
1039
|
-
k[F++] = 268435456 | dt[
|
|
1040
|
-
var ee = dt[
|
|
1041
|
-
I += kt[ee] + Tt[oe], ++
|
|
1039
|
+
k[F++] = 268435456 | dt[$] << 18 | cn[v];
|
|
1040
|
+
var ee = dt[$] & 31, oe = cn[v] & 31;
|
|
1041
|
+
I += kt[ee] + Tt[oe], ++_[257 + ee], ++R[oe], U = T + $, ++M;
|
|
1042
1042
|
} else
|
|
1043
|
-
k[F++] = t[T], ++
|
|
1043
|
+
k[F++] = t[T], ++_[t[T]];
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
|
-
for (T = Math.max(T,
|
|
1047
|
-
k[F++] = t[T], ++
|
|
1048
|
-
|
|
1046
|
+
for (T = Math.max(T, U); T < o; ++T)
|
|
1047
|
+
k[F++] = t[T], ++_[t[T]];
|
|
1048
|
+
a = un(t, c, u, k, _, R, I, F, j, T - j, a), u || (r.r = a & 7 | c[a / 8 | 0] << 3, a -= 7, r.h = E, r.p = y, r.i = T, r.w = U);
|
|
1049
1049
|
} else {
|
|
1050
|
-
for (var T = r.w || 0; T <
|
|
1050
|
+
for (var T = r.w || 0; T < o + u; T += 65535) {
|
|
1051
1051
|
var te = T + 65535;
|
|
1052
|
-
te >=
|
|
1052
|
+
te >= o && (c[a / 8 | 0] = u, te = o), a = En(c, a + 1, t.subarray(T, te));
|
|
1053
1053
|
}
|
|
1054
|
-
r.i =
|
|
1054
|
+
r.i = o;
|
|
1055
1055
|
}
|
|
1056
|
-
return
|
|
1056
|
+
return Fs(l, 0, s + Tn(a) + i);
|
|
1057
1057
|
}, zs = /* @__PURE__ */ function() {
|
|
1058
1058
|
for (var t = new Int32Array(256), e = 0; e < 256; ++e) {
|
|
1059
1059
|
for (var n = e, s = 9; --s; )
|
|
@@ -1075,8 +1075,8 @@ var Ms = /* @__PURE__ */ qe(Ne, 9, 0), Fs = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
|
|
|
1075
1075
|
};
|
|
1076
1076
|
}, Cn = function(t, e, n, s, i) {
|
|
1077
1077
|
if (!i && (i = { l: 1 }, e.dictionary)) {
|
|
1078
|
-
var r = e.dictionary.subarray(-32768),
|
|
1079
|
-
|
|
1078
|
+
var r = e.dictionary.subarray(-32768), o = new de(r.length + t.length);
|
|
1079
|
+
o.set(r), o.set(t, r.length), t = o, i.w = r.length;
|
|
1080
1080
|
}
|
|
1081
1081
|
return js(t, e.level == null ? 6 : e.level, e.mem == null ? i.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(t.length))) * 1.5) : 20 : 12 + e.mem, n, s, i);
|
|
1082
1082
|
}, xi = function(t, e) {
|
|
@@ -1087,24 +1087,24 @@ var Ms = /* @__PURE__ */ qe(Ne, 9, 0), Fs = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
|
|
|
1087
1087
|
n[s] = e[s];
|
|
1088
1088
|
return n;
|
|
1089
1089
|
}, Wn = function(t, e, n) {
|
|
1090
|
-
for (var s = t(), i = t.toString(), r = i.slice(i.indexOf("[") + 1, i.lastIndexOf("]")).replace(/\s+/g, "").split(","),
|
|
1091
|
-
var l = s[
|
|
1090
|
+
for (var s = t(), i = t.toString(), r = i.slice(i.indexOf("[") + 1, i.lastIndexOf("]")).replace(/\s+/g, "").split(","), o = 0; o < s.length; ++o) {
|
|
1091
|
+
var l = s[o], c = r[o];
|
|
1092
1092
|
if (typeof l == "function") {
|
|
1093
|
-
e += ";" +
|
|
1093
|
+
e += ";" + c + "=";
|
|
1094
1094
|
var u = l.toString();
|
|
1095
1095
|
if (l.prototype)
|
|
1096
1096
|
if (u.indexOf("[native code]") != -1) {
|
|
1097
|
-
var
|
|
1098
|
-
e += u.slice(
|
|
1097
|
+
var a = u.indexOf(" ", 8) + 1;
|
|
1098
|
+
e += u.slice(a, u.indexOf("(", a));
|
|
1099
1099
|
} else {
|
|
1100
1100
|
e += u;
|
|
1101
1101
|
for (var d in l.prototype)
|
|
1102
|
-
e += ";" +
|
|
1102
|
+
e += ";" + c + ".prototype." + d + "=" + l.prototype[d].toString();
|
|
1103
1103
|
}
|
|
1104
1104
|
else
|
|
1105
1105
|
e += u;
|
|
1106
1106
|
} else
|
|
1107
|
-
n[
|
|
1107
|
+
n[c] = l;
|
|
1108
1108
|
}
|
|
1109
1109
|
return e;
|
|
1110
1110
|
}, nt = [], ki = function(t) {
|
|
@@ -1114,24 +1114,24 @@ var Ms = /* @__PURE__ */ qe(Ne, 9, 0), Fs = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
|
|
|
1114
1114
|
return e;
|
|
1115
1115
|
}, Ti = function(t, e, n, s) {
|
|
1116
1116
|
if (!nt[n]) {
|
|
1117
|
-
for (var i = "", r = {},
|
|
1117
|
+
for (var i = "", r = {}, o = t.length - 1, l = 0; l < o; ++l)
|
|
1118
1118
|
i = Wn(t[l], i, r);
|
|
1119
|
-
nt[n] = { c: Wn(t[
|
|
1119
|
+
nt[n] = { c: Wn(t[o], i, r), e: r };
|
|
1120
1120
|
}
|
|
1121
|
-
var
|
|
1122
|
-
return bi(nt[n].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + e.toString() + "}", n,
|
|
1121
|
+
var c = xi({}, nt[n].e);
|
|
1122
|
+
return bi(nt[n].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + e.toString() + "}", n, c, ki(c), s);
|
|
1123
1123
|
}, Ei = function() {
|
|
1124
|
-
return [de, re, xt, kt, Tt, an, dt, cn, Ms, Ne,
|
|
1124
|
+
return [de, re, xt, kt, Tt, an, dt, cn, Ms, Ne, Ls, tt, ft, Bs, In, qe, be, ze, ct, pt, ln, Ue, En, un, Tn, Fs, js, Cn, _i, Hs];
|
|
1125
1125
|
}, Ii = function() {
|
|
1126
1126
|
return [$s, qs, gt, Us, zs];
|
|
1127
1127
|
}, Hs = function(t) {
|
|
1128
1128
|
return postMessage(t, [t.buffer]);
|
|
1129
1129
|
}, Ci = function(t, e, n, s, i, r) {
|
|
1130
|
-
var
|
|
1131
|
-
|
|
1130
|
+
var o = Ti(n, s, i, function(l, c) {
|
|
1131
|
+
o.terminate(), r(l, c);
|
|
1132
1132
|
});
|
|
1133
|
-
return
|
|
1134
|
-
|
|
1133
|
+
return o.postMessage([t, e], e.consume ? [t.buffer] : []), function() {
|
|
1134
|
+
o.terminate();
|
|
1135
1135
|
};
|
|
1136
1136
|
}, gt = function(t, e, n) {
|
|
1137
1137
|
for (; n; ++e)
|
|
@@ -1228,17 +1228,17 @@ class Ai {
|
|
|
1228
1228
|
Authorization: `Bearer ${n}`
|
|
1229
1229
|
}
|
|
1230
1230
|
}), { conditions: i } = await s.json(), r = [];
|
|
1231
|
-
i.forEach((
|
|
1232
|
-
|
|
1231
|
+
i.forEach((o) => {
|
|
1232
|
+
o.filters.forEach((c) => {
|
|
1233
1233
|
let u;
|
|
1234
|
-
|
|
1234
|
+
c.type === "fetch" ? (u = {
|
|
1235
1235
|
type: "network_request",
|
|
1236
1236
|
subConditions: [],
|
|
1237
|
-
name:
|
|
1238
|
-
},
|
|
1239
|
-
const d = this.createConditionFromFilter(
|
|
1237
|
+
name: o.name
|
|
1238
|
+
}, c.filters.forEach((a) => {
|
|
1239
|
+
const d = this.createConditionFromFilter(a);
|
|
1240
1240
|
d && u.subConditions.push(d);
|
|
1241
|
-
})) : u = this.createConditionFromFilter(
|
|
1241
|
+
})) : u = this.createConditionFromFilter(c), u && (u.type === "session_duration" && this.processDuration(u.value[0], o.name), r.push({ ...u, name: o.name }));
|
|
1242
1242
|
});
|
|
1243
1243
|
}), this.conditions = r;
|
|
1244
1244
|
} catch {
|
|
@@ -1291,9 +1291,9 @@ class Ai {
|
|
|
1291
1291
|
const n = this.conditions.filter((s) => s.type === "network_request");
|
|
1292
1292
|
n.length && n.forEach((s) => {
|
|
1293
1293
|
const i = s.subConditions.filter((r) => r.operator !== "isAny");
|
|
1294
|
-
i.length ? i.every((
|
|
1294
|
+
i.length ? i.every((o) => {
|
|
1295
1295
|
let l;
|
|
1296
|
-
switch (
|
|
1296
|
+
switch (o.key) {
|
|
1297
1297
|
case "url":
|
|
1298
1298
|
l = e[3];
|
|
1299
1299
|
break;
|
|
@@ -1307,8 +1307,8 @@ class Ai {
|
|
|
1307
1307
|
l = e[8];
|
|
1308
1308
|
break;
|
|
1309
1309
|
}
|
|
1310
|
-
const
|
|
1311
|
-
if (
|
|
1310
|
+
const c = Pe[o.operator];
|
|
1311
|
+
if (c && c(l, o.value))
|
|
1312
1312
|
return !0;
|
|
1313
1313
|
}) && this.trigger(s.name) : i.length === 0 && s.subConditions.length && this.trigger(s.name);
|
|
1314
1314
|
});
|
|
@@ -1338,7 +1338,7 @@ class Ai {
|
|
|
1338
1338
|
const n = [e[1], e[2], e[3]], s = this.conditions.filter((i) => i.type === "exception");
|
|
1339
1339
|
s && s.forEach((i) => {
|
|
1340
1340
|
const r = Pe[i.operator];
|
|
1341
|
-
r && n.some((
|
|
1341
|
+
r && n.some((o) => r(o, i.value)) && this.trigger(i.name);
|
|
1342
1342
|
});
|
|
1343
1343
|
}
|
|
1344
1344
|
}
|
|
@@ -1462,7 +1462,7 @@ const Pe = {
|
|
|
1462
1462
|
}
|
|
1463
1463
|
return s;
|
|
1464
1464
|
};
|
|
1465
|
-
class
|
|
1465
|
+
class Li {
|
|
1466
1466
|
constructor(e) {
|
|
1467
1467
|
this.app = e, this.flags = [], this.storageKey = "__openreplay_flags";
|
|
1468
1468
|
const n = this.app.sessionStorage.getItem(this.storageKey);
|
|
@@ -1482,11 +1482,11 @@ class Fi {
|
|
|
1482
1482
|
}
|
|
1483
1483
|
async reloadFlags(e) {
|
|
1484
1484
|
const n = this.app.sessionStorage.getItem(this.storageKey), s = {};
|
|
1485
|
-
n && n.split(";").filter(Boolean).forEach((
|
|
1486
|
-
const d = JSON.parse(
|
|
1485
|
+
n && n.split(";").filter(Boolean).forEach((a) => {
|
|
1486
|
+
const d = JSON.parse(a);
|
|
1487
1487
|
s[d.key] = { key: d.key, value: d.value };
|
|
1488
1488
|
});
|
|
1489
|
-
const i = this.app.session.getInfo(), r = this.app.session.userInfo,
|
|
1489
|
+
const i = this.app.session.getInfo(), r = this.app.session.userInfo, o = {
|
|
1490
1490
|
projectID: i.projectID,
|
|
1491
1491
|
userID: i.userID,
|
|
1492
1492
|
metadata: i.metadata,
|
|
@@ -1498,28 +1498,28 @@ class Fi {
|
|
|
1498
1498
|
city: r.userCity,
|
|
1499
1499
|
browser: r.userBrowser,
|
|
1500
1500
|
persistFlags: s
|
|
1501
|
-
}, l = e ?? this.app.session.getSessionToken(),
|
|
1501
|
+
}, l = e ?? this.app.session.getSessionToken(), c = await fetch(this.app.options.ingestPoint + "/v1/web/feature-flags", {
|
|
1502
1502
|
method: "POST",
|
|
1503
1503
|
headers: {
|
|
1504
1504
|
"Content-Type": "application/json",
|
|
1505
1505
|
Authorization: `Bearer ${l}`
|
|
1506
1506
|
},
|
|
1507
|
-
body: JSON.stringify(
|
|
1507
|
+
body: JSON.stringify(o)
|
|
1508
1508
|
});
|
|
1509
|
-
if (
|
|
1510
|
-
const u = await
|
|
1509
|
+
if (c.status === 200) {
|
|
1510
|
+
const u = await c.json();
|
|
1511
1511
|
return this.handleFlags(u.flags);
|
|
1512
1512
|
}
|
|
1513
1513
|
}
|
|
1514
1514
|
handleFlags(e) {
|
|
1515
1515
|
var r;
|
|
1516
1516
|
const n = [];
|
|
1517
|
-
e.forEach((
|
|
1518
|
-
|
|
1517
|
+
e.forEach((o) => {
|
|
1518
|
+
o.is_persist && n.push(o);
|
|
1519
1519
|
});
|
|
1520
1520
|
let s = "";
|
|
1521
|
-
return this.diffPersist(n).forEach((
|
|
1522
|
-
s += `${JSON.stringify(
|
|
1521
|
+
return this.diffPersist(n).forEach((o) => {
|
|
1522
|
+
s += `${JSON.stringify(o)};`;
|
|
1523
1523
|
}), this.app.sessionStorage.setItem(this.storageKey, s), this.flags = e, (r = this.onFlagsCb) == null ? void 0 : r.call(this, e);
|
|
1524
1524
|
}
|
|
1525
1525
|
clearPersistFlags() {
|
|
@@ -1530,10 +1530,10 @@ class Fi {
|
|
|
1530
1530
|
if (!n)
|
|
1531
1531
|
return e;
|
|
1532
1532
|
const i = n.split(";").filter(Boolean).map((r) => JSON.parse(r));
|
|
1533
|
-
return e.filter((r) => i.findIndex((
|
|
1533
|
+
return e.filter((r) => i.findIndex((o) => o.key === r.key) === -1);
|
|
1534
1534
|
}
|
|
1535
1535
|
}
|
|
1536
|
-
const Kn = { htmlmasked: "hidden", masked: "obscured" }, Se = !(typeof window > "u"),
|
|
1536
|
+
const Kn = { htmlmasked: "hidden", masked: "obscured" }, Se = !(typeof window > "u"), Fi = Se && navigator.userAgent.match(/firefox|fxios/i), Pi = 1e5;
|
|
1537
1537
|
let _n = Se ? Date.now() - performance.now() : 0;
|
|
1538
1538
|
function Kt() {
|
|
1539
1539
|
_n = Date.now() - performance.now();
|
|
@@ -1601,10 +1601,10 @@ function Ks(t, e, n, s) {
|
|
|
1601
1601
|
try {
|
|
1602
1602
|
t[i](e, n, s);
|
|
1603
1603
|
} catch (r) {
|
|
1604
|
-
const
|
|
1604
|
+
const o = r.message;
|
|
1605
1605
|
console.debug(
|
|
1606
1606
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
1607
|
-
`Openreplay: ${
|
|
1607
|
+
`Openreplay: ${o}; if this error is caused by an IframeObserver, ignore it`
|
|
1608
1608
|
);
|
|
1609
1609
|
}
|
|
1610
1610
|
}
|
|
@@ -1613,10 +1613,10 @@ function Js(t, e, n, s) {
|
|
|
1613
1613
|
try {
|
|
1614
1614
|
t[i](e, n, s);
|
|
1615
1615
|
} catch (r) {
|
|
1616
|
-
const
|
|
1616
|
+
const o = r.message;
|
|
1617
1617
|
console.debug(
|
|
1618
1618
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
1619
|
-
`Openreplay: ${
|
|
1619
|
+
`Openreplay: ${o}; if this error is caused by an IframeObserver, ignore it`
|
|
1620
1620
|
);
|
|
1621
1621
|
}
|
|
1622
1622
|
}
|
|
@@ -1767,7 +1767,7 @@ function nr(t, e) {
|
|
|
1767
1767
|
e
|
|
1768
1768
|
];
|
|
1769
1769
|
}
|
|
1770
|
-
function sr(t, e, n, s, i, r,
|
|
1770
|
+
function sr(t, e, n, s, i, r, o, l, c) {
|
|
1771
1771
|
return [
|
|
1772
1772
|
23,
|
|
1773
1773
|
t,
|
|
@@ -1776,9 +1776,9 @@ function sr(t, e, n, s, i, r, a, l, o) {
|
|
|
1776
1776
|
s,
|
|
1777
1777
|
i,
|
|
1778
1778
|
r,
|
|
1779
|
-
|
|
1779
|
+
o,
|
|
1780
1780
|
l,
|
|
1781
|
-
|
|
1781
|
+
c
|
|
1782
1782
|
];
|
|
1783
1783
|
}
|
|
1784
1784
|
function ir(t, e, n) {
|
|
@@ -1948,7 +1948,7 @@ function pn(t, e, n, s) {
|
|
|
1948
1948
|
s
|
|
1949
1949
|
];
|
|
1950
1950
|
}
|
|
1951
|
-
function vt(t, e, n, s, i, r,
|
|
1951
|
+
function vt(t, e, n, s, i, r, o, l, c) {
|
|
1952
1952
|
return [
|
|
1953
1953
|
83,
|
|
1954
1954
|
t,
|
|
@@ -1957,9 +1957,9 @@ function vt(t, e, n, s, i, r, a, l, o) {
|
|
|
1957
1957
|
s,
|
|
1958
1958
|
i,
|
|
1959
1959
|
r,
|
|
1960
|
-
|
|
1960
|
+
o,
|
|
1961
1961
|
l,
|
|
1962
|
-
|
|
1962
|
+
c
|
|
1963
1963
|
];
|
|
1964
1964
|
}
|
|
1965
1965
|
function mr(t, e, n, s, i, r) {
|
|
@@ -2004,7 +2004,7 @@ function yr(t) {
|
|
|
2004
2004
|
t
|
|
2005
2005
|
];
|
|
2006
2006
|
}
|
|
2007
|
-
function Qs(t, e, n, s, i, r,
|
|
2007
|
+
function Qs(t, e, n, s, i, r, o, l, c, u) {
|
|
2008
2008
|
return [
|
|
2009
2009
|
116,
|
|
2010
2010
|
t,
|
|
@@ -2013,9 +2013,9 @@ function Qs(t, e, n, s, i, r, a, l, o, u) {
|
|
|
2013
2013
|
s,
|
|
2014
2014
|
i,
|
|
2015
2015
|
r,
|
|
2016
|
-
a,
|
|
2017
|
-
l,
|
|
2018
2016
|
o,
|
|
2017
|
+
l,
|
|
2018
|
+
c,
|
|
2019
2019
|
u
|
|
2020
2020
|
];
|
|
2021
2021
|
}
|
|
@@ -2066,14 +2066,14 @@ function kr(t, e) {
|
|
|
2066
2066
|
t.ticker.attach(() => {
|
|
2067
2067
|
i === void 0 || i === -1 || i++;
|
|
2068
2068
|
}, 0, !1);
|
|
2069
|
-
const
|
|
2069
|
+
const o = () => {
|
|
2070
2070
|
s === void 0 || i === void 0 || (t.send(cr(s, i, gn.memory.totalJSHeapSize || 0, gn.memory.usedJSHeapSize || 0)), i = s = document.hidden ? -1 : 0);
|
|
2071
2071
|
};
|
|
2072
2072
|
t.attachStartCallback(() => {
|
|
2073
|
-
i = s = -1,
|
|
2073
|
+
i = s = -1, o(), r();
|
|
2074
2074
|
}), t.attachStopCallback(() => {
|
|
2075
2075
|
i = s = void 0;
|
|
2076
|
-
}), t.ticker.attach(
|
|
2076
|
+
}), t.ticker.attach(o, 40, !1), document.hidden !== void 0 && t.attachEventListener(document, "visibilitychange", o, !1, !1);
|
|
2077
2077
|
}
|
|
2078
2078
|
const is = "__or__watched_tags__";
|
|
2079
2079
|
class Tr {
|
|
@@ -2081,10 +2081,10 @@ class Tr {
|
|
|
2081
2081
|
this.sessionStorage = e, this.errLog = n, this.onTag = s, this.intervals = {}, this.tags = [];
|
|
2082
2082
|
const i = JSON.parse(e.getItem(is) ?? "[]");
|
|
2083
2083
|
this.setTags(i), this.observer = new IntersectionObserver((r) => {
|
|
2084
|
-
r.forEach((
|
|
2085
|
-
if (
|
|
2086
|
-
const l =
|
|
2087
|
-
l && this.onTagRendered(l), this.observer.unobserve(
|
|
2084
|
+
r.forEach((o) => {
|
|
2085
|
+
if (o.isIntersecting && o.target) {
|
|
2086
|
+
const l = o.target.__or_watcher_tagname;
|
|
2087
|
+
l && this.onTagRendered(l), this.observer.unobserve(o.target);
|
|
2088
2088
|
}
|
|
2089
2089
|
});
|
|
2090
2090
|
});
|
|
@@ -2331,7 +2331,7 @@ const Er = {
|
|
|
2331
2331
|
fontStyle: "normal",
|
|
2332
2332
|
fontWeight: "500",
|
|
2333
2333
|
lineHeight: "auto"
|
|
2334
|
-
},
|
|
2334
|
+
}, Lr = {
|
|
2335
2335
|
...Zs,
|
|
2336
2336
|
display: "flex",
|
|
2337
2337
|
padding: "0.25rem 0.9375rem",
|
|
@@ -2340,7 +2340,7 @@ const Er = {
|
|
|
2340
2340
|
gap: "0.5rem",
|
|
2341
2341
|
borderRadius: "0.25rem",
|
|
2342
2342
|
border: "1px solid #394EFF"
|
|
2343
|
-
},
|
|
2343
|
+
}, Fr = {
|
|
2344
2344
|
display: "flex",
|
|
2345
2345
|
justifyContent: "space-between",
|
|
2346
2346
|
alignItems: "center",
|
|
@@ -2370,11 +2370,11 @@ class Br {
|
|
|
2370
2370
|
audio: s
|
|
2371
2371
|
}), this.mediaRecorder = new MediaRecorder(this.stream, {
|
|
2372
2372
|
mimeType: "video/webm;codecs=vp9"
|
|
2373
|
-
}), this.recordedChunks = [], this.mediaRecorder.ondataavailable = (
|
|
2374
|
-
|
|
2373
|
+
}), this.recordedChunks = [], this.mediaRecorder.ondataavailable = (o) => {
|
|
2374
|
+
o.data.size > 0 && this.recordedChunks.push(o.data);
|
|
2375
2375
|
}, this.mediaRecorder.start();
|
|
2376
|
-
} catch (
|
|
2377
|
-
console.error(
|
|
2376
|
+
} catch (o) {
|
|
2377
|
+
console.error(o);
|
|
2378
2378
|
}
|
|
2379
2379
|
}
|
|
2380
2380
|
async stopRecording() {
|
|
@@ -2419,19 +2419,19 @@ class Br {
|
|
|
2419
2419
|
function jr(t, e) {
|
|
2420
2420
|
e.onmousedown = function(n) {
|
|
2421
2421
|
const s = t.getBoundingClientRect(), i = n.clientX - s.left, r = n.clientY - s.top;
|
|
2422
|
-
t.style.position = "fixed", t.style.zIndex = 99999999999999,
|
|
2423
|
-
function
|
|
2424
|
-
let d = u - i, p =
|
|
2422
|
+
t.style.position = "fixed", t.style.zIndex = 99999999999999, o(n.pageX, n.pageY);
|
|
2423
|
+
function o(u, a) {
|
|
2424
|
+
let d = u - i, p = a - r;
|
|
2425
2425
|
d <= 5 && (d = 5), p <= 5 && (p = 5), d >= window.innerWidth - s.width && (d = window.innerWidth - s.width), p >= window.innerHeight - s.height && (p = window.innerHeight - s.height), t.style.left = `${d}px`, t.style.top = `${p}px`;
|
|
2426
2426
|
}
|
|
2427
2427
|
function l(u) {
|
|
2428
|
-
|
|
2428
|
+
o(u.pageX, u.pageY);
|
|
2429
2429
|
}
|
|
2430
2430
|
document.addEventListener("mousemove", l);
|
|
2431
|
-
const
|
|
2432
|
-
document.removeEventListener("mousemove", l), document.removeEventListener("mouseup",
|
|
2431
|
+
const c = () => {
|
|
2432
|
+
document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", c);
|
|
2433
2433
|
};
|
|
2434
|
-
document.addEventListener("mouseup",
|
|
2434
|
+
document.addEventListener("mouseup", c);
|
|
2435
2435
|
}, e.ondragstart = function() {
|
|
2436
2436
|
return !1;
|
|
2437
2437
|
};
|
|
@@ -2489,14 +2489,14 @@ function $r() {
|
|
|
2489
2489
|
const t = document.createElement("div");
|
|
2490
2490
|
return t.classList.add("spinner"), Object.assign(t.style, Pr), t;
|
|
2491
2491
|
}
|
|
2492
|
-
function
|
|
2492
|
+
function H(t, e, n, s, i) {
|
|
2493
2493
|
const r = document.createElement(t);
|
|
2494
2494
|
return r.className = e, Object.assign(r.style, n), s && (r.textContent = s), i && (r.id = i), r;
|
|
2495
2495
|
}
|
|
2496
2496
|
const ut = "or_uxt_test_start", mn = "or_uxt_task_index", vn = "or_uxt_session_id", qr = "or_uxt_test_id";
|
|
2497
2497
|
class Wr {
|
|
2498
|
-
constructor(e, n, s, i, r,
|
|
2499
|
-
this.ingestPoint = e, this.getTimestamp = n, this.token = s, this.testId = i, this.storageKey = r, this.setStorageKey =
|
|
2498
|
+
constructor(e, n, s, i, r, o, l, c, u) {
|
|
2499
|
+
this.ingestPoint = e, this.getTimestamp = n, this.token = s, this.testId = i, this.storageKey = r, this.setStorageKey = o, this.removeStorageKey = l, this.getStorageKey = c, this.getSessionId = u, this.durations = {
|
|
2500
2500
|
testStart: 0,
|
|
2501
2501
|
tasks: []
|
|
2502
2502
|
}, this.getDurations = () => this.durations, this.setDurations = (d) => {
|
|
@@ -2504,7 +2504,7 @@ class Wr {
|
|
|
2504
2504
|
}, this.signalTask = (d, p, b) => {
|
|
2505
2505
|
if (!d)
|
|
2506
2506
|
return console.error("User Testing: No Task ID Given");
|
|
2507
|
-
const w = this.durations.tasks.find((
|
|
2507
|
+
const w = this.durations.tasks.find((O) => O.taskId === d), y = this.getTimestamp(), E = w ? y - w.started : 0;
|
|
2508
2508
|
return fetch(`${this.ingestPoint}/v1/web/uxt/signals/task`, {
|
|
2509
2509
|
method: "POST",
|
|
2510
2510
|
headers: {
|
|
@@ -2542,23 +2542,23 @@ class Wr {
|
|
|
2542
2542
|
})
|
|
2543
2543
|
});
|
|
2544
2544
|
};
|
|
2545
|
-
const
|
|
2546
|
-
|
|
2545
|
+
const a = this.getStorageKey(ut);
|
|
2546
|
+
a && (this.durations.testStart = parseInt(a, 10));
|
|
2547
2547
|
}
|
|
2548
2548
|
}
|
|
2549
2549
|
class Vr {
|
|
2550
2550
|
constructor(e, n) {
|
|
2551
|
-
this.app = e, this.storageKey = n, this.bg =
|
|
2552
|
-
this.testId =
|
|
2551
|
+
this.app = e, this.storageKey = n, this.bg = H("div", "bg", Er, void 0, "__or_ut_bg"), this.container = H("div", "container", Ir, void 0, "__or_ut_ct"), this.widgetGuidelinesVisible = !0, this.widgetTasksVisible = !1, this.widgetVisible = !0, this.isActive = !1, this.descriptionSection = null, this.taskSection = null, this.endSection = null, this.stopButton = null, this.stopButtonContainer = null, this.test = null, this.testId = null, this.signalManager = null, this.getTest = (o, l, c) => {
|
|
2552
|
+
this.testId = o;
|
|
2553
2553
|
const u = this.app.options.ingestPoint;
|
|
2554
|
-
return fetch(`${u}/v1/web/uxt/test/${
|
|
2554
|
+
return fetch(`${u}/v1/web/uxt/test/${o}`, {
|
|
2555
2555
|
headers: {
|
|
2556
2556
|
Authorization: `Bearer ${l}`
|
|
2557
2557
|
}
|
|
2558
|
-
}).then((
|
|
2559
|
-
this.isActive = !0, this.test =
|
|
2560
|
-
}).then(() =>
|
|
2561
|
-
console.log("OR: Error fetching test",
|
|
2558
|
+
}).then((a) => a.json()).then(({ test: a }) => {
|
|
2559
|
+
this.isActive = !0, this.test = a, this.signalManager = new Wr(this.app.options.ingestPoint, () => this.app.timestamp(), l, o, this.storageKey, (d, p) => this.app.localStorage.setItem(d, p), (d) => this.app.localStorage.removeItem(d), (d) => this.app.localStorage.getItem(d), () => this.app.getSessionID()), this.createGreeting(a.title, a.reqMic, a.reqCamera), c && ((a.reqMic || a.reqCamera) && this.userRecorder.startRecording(30, ds.Standard, a.reqMic, a.reqCamera), this.showWidget(a.description, a.tasks, !0), this.showTaskSection());
|
|
2560
|
+
}).then(() => o).catch((a) => {
|
|
2561
|
+
console.log("OR: Error fetching test", a);
|
|
2562
2562
|
});
|
|
2563
2563
|
}, this.hideTaskSection = () => !1, this.showTaskSection = () => !0, this.collapseWidget = () => !1, this.removeGreeting = () => !1, this.toggleDescriptionVisibility = () => {
|
|
2564
2564
|
}, this.currentTaskIndex = 0, this.userRecorder = new Br(e);
|
|
@@ -2571,16 +2571,16 @@ class Vr {
|
|
|
2571
2571
|
return this.testId;
|
|
2572
2572
|
}
|
|
2573
2573
|
createGreeting(e, n, s) {
|
|
2574
|
-
const i =
|
|
2574
|
+
const i = H("div", "title", Cr, e), r = H("div", "description", _r, `Welcome, you're here to help us improve, not to be judged. Your insights matter!
|
|
2575
2575
|
|
|
2576
2576
|
📹 We're recording this browser tab to learn from your experience.
|
|
2577
|
-
🎤 Please enable mic and camera if asked, to give us a complete picture.`),
|
|
2578
|
-
this.removeGreeting = () => ((n || s) && this.userRecorder.startRecording(30, ds.Standard, n, s), this.container.removeChild(
|
|
2579
|
-
var
|
|
2577
|
+
🎤 Please enable mic and camera if asked, to give us a complete picture.`), o = H("div", "button", Nr, "Read guidelines to begin");
|
|
2578
|
+
this.removeGreeting = () => ((n || s) && this.userRecorder.startRecording(30, ds.Standard, n, s), this.container.removeChild(o), this.container.removeChild(r), this.container.removeChild(i), !1), o.onclick = () => {
|
|
2579
|
+
var c, u, a, d;
|
|
2580
2580
|
this.removeGreeting();
|
|
2581
|
-
const l = (
|
|
2582
|
-
l && this.signalManager && (l.testStart = this.app.timestamp(), this.signalManager.setDurations(l)), (u = this.signalManager) == null || u.signalTest("begin"), this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, st), this.showWidget(((
|
|
2583
|
-
}, this.container.append(i, r,
|
|
2581
|
+
const l = (c = this.signalManager) == null ? void 0 : c.getDurations();
|
|
2582
|
+
l && this.signalManager && (l.testStart = this.app.timestamp(), this.signalManager.setDurations(l)), (u = this.signalManager) == null || u.signalTest("begin"), this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, st), this.showWidget(((a = this.test) == null ? void 0 : a.guidelines) || "", ((d = this.test) == null ? void 0 : d.tasks) || []);
|
|
2583
|
+
}, this.container.append(i, r, o), this.bg.appendChild(this.container), document.body.appendChild(this.bg);
|
|
2584
2584
|
}
|
|
2585
2585
|
showWidget(e, n, s) {
|
|
2586
2586
|
this.container.innerHTML = "", Object.assign(this.bg.style, {
|
|
@@ -2598,15 +2598,15 @@ class Vr {
|
|
|
2598
2598
|
});
|
|
2599
2599
|
const i = this.createTitleSection();
|
|
2600
2600
|
this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, st);
|
|
2601
|
-
const r = this.createDescriptionSection(e),
|
|
2602
|
-
|
|
2601
|
+
const r = this.createDescriptionSection(e), o = this.createTasksSection(n), l = H("div", "stop_bn_or", cs, "Abort Session"), c = H("div", "stop_ct_or", { fontSize: "13px!important" });
|
|
2602
|
+
c.style.fontSize = "13px", c.append(l), this.container.append(i, r, o, c), this.taskSection = o, this.descriptionSection = r, this.stopButton = l, this.stopButtonContainer = c, l.onclick = () => {
|
|
2603
2603
|
var u;
|
|
2604
2604
|
this.userRecorder.discard(), (u = this.signalManager) == null || u.signalTest("skipped"), document.body.removeChild(this.bg), window.close();
|
|
2605
2605
|
}, s ? this.toggleDescriptionVisibility() : this.hideTaskSection();
|
|
2606
2606
|
}
|
|
2607
2607
|
createTitleSection() {
|
|
2608
2608
|
var l;
|
|
2609
|
-
const e =
|
|
2609
|
+
const e = H("div", "title", Or), n = zr(), s = H("div", "title_text", {
|
|
2610
2610
|
maxWidth: "19rem",
|
|
2611
2611
|
overflow: "hidden",
|
|
2612
2612
|
textOverflow: "ellipsis",
|
|
@@ -2616,19 +2616,19 @@ class Vr {
|
|
|
2616
2616
|
cursor: "pointer"
|
|
2617
2617
|
}, (l = this.test) == null ? void 0 : l.title), i = Ur();
|
|
2618
2618
|
e.append(n, s, i);
|
|
2619
|
-
const r = (
|
|
2619
|
+
const r = (c) => (this.widgetVisible = c, this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, this.widgetVisible ? st : { border: "none", background: "none", padding: 0 }), this.taskSection && Object.assign(this.taskSection.style, this.widgetVisible ? He : { display: "none" }), this.descriptionSection && Object.assign(this.descriptionSection.style, this.widgetVisible ? He : { display: "none" }), this.endSection && Object.assign(this.endSection.style, this.widgetVisible ? He : { display: "none" }), this.stopButton && Object.assign(this.stopButton.style, this.widgetVisible ? cs : { display: "none" }), c), o = () => {
|
|
2620
2620
|
Object.assign(i.style, {
|
|
2621
2621
|
transform: this.widgetVisible ? "rotate(0deg)" : "rotate(180deg)"
|
|
2622
2622
|
}), r(!this.widgetVisible);
|
|
2623
2623
|
};
|
|
2624
|
-
return s.onclick =
|
|
2624
|
+
return s.onclick = o, i.onclick = o, jr(this.bg, n), this.collapseWidget = () => r(!1), e;
|
|
2625
2625
|
}
|
|
2626
2626
|
createDescriptionSection(e) {
|
|
2627
|
-
const n =
|
|
2627
|
+
const n = H("div", "description_section_or", He), s = H("div", "description_s_title_or", rs), i = H("div", "title", {
|
|
2628
2628
|
fontSize: 13,
|
|
2629
2629
|
fontWeight: 500,
|
|
2630
2630
|
lineHeight: "auto"
|
|
2631
|
-
}, "Introduction & Guidelines"), r =
|
|
2631
|
+
}, "Introduction & Guidelines"), r = H("div", "icon", os, "-"), o = H("div", "content", Be), l = H("div", "text_description", {
|
|
2632
2632
|
maxHeight: "250px",
|
|
2633
2633
|
overflowY: "auto",
|
|
2634
2634
|
whiteSpace: "pre-wrap",
|
|
@@ -2637,45 +2637,45 @@ class Vr {
|
|
|
2637
2637
|
lineHeight: "auto"
|
|
2638
2638
|
});
|
|
2639
2639
|
l.innerHTML = e;
|
|
2640
|
-
const
|
|
2641
|
-
s.append(i, r),
|
|
2640
|
+
const c = H("div", "button_begin_or", as, "Begin Test");
|
|
2641
|
+
s.append(i, r), o.append(l, c), n.append(s, o);
|
|
2642
2642
|
const u = () => {
|
|
2643
|
-
this.widgetGuidelinesVisible = !this.widgetGuidelinesVisible, r.textContent = this.widgetGuidelinesVisible ? "-" : "+", Object.assign(
|
|
2643
|
+
this.widgetGuidelinesVisible = !this.widgetGuidelinesVisible, r.textContent = this.widgetGuidelinesVisible ? "-" : "+", Object.assign(o.style, this.widgetGuidelinesVisible ? Be : { display: "none" });
|
|
2644
2644
|
};
|
|
2645
2645
|
return s.onclick = u, this.toggleDescriptionVisibility = () => {
|
|
2646
|
-
this.widgetGuidelinesVisible = !1, r.textContent = this.widgetGuidelinesVisible ? "-" : "+", Object.assign(
|
|
2647
|
-
},
|
|
2648
|
-
var
|
|
2646
|
+
this.widgetGuidelinesVisible = !1, r.textContent = this.widgetGuidelinesVisible ? "-" : "+", Object.assign(o.style, this.widgetGuidelinesVisible ? Be : { display: "none" }), o.removeChild(c);
|
|
2647
|
+
}, c.onclick = () => {
|
|
2648
|
+
var a, d, p;
|
|
2649
2649
|
if (u(), this.test) {
|
|
2650
|
-
const b = (
|
|
2650
|
+
const b = (a = this.signalManager) == null ? void 0 : a.getDurations(), w = b ? b.tasks.findIndex((y) => this.test && y.taskId === this.test.tasks[0].task_id) : null;
|
|
2651
2651
|
b && w === -1 && (b.tasks.push({
|
|
2652
2652
|
taskId: this.test.tasks[0].task_id,
|
|
2653
2653
|
started: this.app.timestamp()
|
|
2654
2654
|
}), (d = this.signalManager) == null || d.setDurations(b)), (p = this.signalManager) == null || p.signalTask(this.test.tasks[0].task_id, "begin");
|
|
2655
2655
|
}
|
|
2656
|
-
this.showTaskSection(),
|
|
2656
|
+
this.showTaskSection(), o.removeChild(c);
|
|
2657
2657
|
}, n;
|
|
2658
2658
|
}
|
|
2659
2659
|
createTasksSection(e) {
|
|
2660
2660
|
this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, st);
|
|
2661
|
-
const n =
|
|
2661
|
+
const n = H("div", "task_section_or", He), s = H("div", "description_t_title_or", rs), i = H("div", "title", {
|
|
2662
2662
|
fontSize: "13px",
|
|
2663
2663
|
fontWeight: "500",
|
|
2664
2664
|
lineHeight: "auto"
|
|
2665
|
-
}, "Tasks"), r =
|
|
2665
|
+
}, "Tasks"), r = H("div", "icon", os, "-"), o = H("div", "content", Be), l = H("div", "pagination", Dr), c = H("div", "taskCard", us), u = H("div", "taskText", hs), a = H("div", "taskDescription", Mr), d = H("div", "taskButtons", Fr), p = H("div", "taskText", hs);
|
|
2666
2666
|
p.textContent = "Your answer";
|
|
2667
|
-
const b =
|
|
2667
|
+
const b = H("textarea", "taskDescription", {
|
|
2668
2668
|
resize: "vertical"
|
|
2669
|
-
}), w =
|
|
2669
|
+
}), w = H("div", "inputArea", us);
|
|
2670
2670
|
w.append(p, b);
|
|
2671
|
-
const y =
|
|
2672
|
-
s.append(i, r),
|
|
2673
|
-
const
|
|
2671
|
+
const y = H("div", "closePanelButton", Zs, "Collapse Panel"), E = H("div", "nextButton", Lr, "Done, Next");
|
|
2672
|
+
s.append(i, r), c.append(u, a), d.append(y, E), o.append(l, c, w, d), n.append(s, o);
|
|
2673
|
+
const O = () => {
|
|
2674
2674
|
const k = e[this.currentTaskIndex];
|
|
2675
|
-
u.textContent = k.title,
|
|
2675
|
+
u.textContent = k.title, a.textContent = k.description, k.allow_typing ? w.style.display = "flex" : w.style.display = "none";
|
|
2676
2676
|
};
|
|
2677
|
-
e.forEach((k,
|
|
2678
|
-
const
|
|
2677
|
+
e.forEach((k, _) => {
|
|
2678
|
+
const R = H("span", `or_task_${_}`, {
|
|
2679
2679
|
outline: "1px solid #efefef",
|
|
2680
2680
|
fontSize: "13px",
|
|
2681
2681
|
height: "24px",
|
|
@@ -2685,29 +2685,29 @@ class Vr {
|
|
|
2685
2685
|
alignItems: "center",
|
|
2686
2686
|
justifyContent: "center",
|
|
2687
2687
|
borderRadius: "6.25em"
|
|
2688
|
-
}, (
|
|
2689
|
-
|
|
2688
|
+
}, (_ + 1).toString());
|
|
2689
|
+
R.id = `or_task_${_}`, l.append(R);
|
|
2690
2690
|
});
|
|
2691
|
-
const
|
|
2692
|
-
this.widgetTasksVisible = !this.widgetTasksVisible, r.textContent = this.widgetTasksVisible ? "-" : "+", Object.assign(
|
|
2691
|
+
const B = () => {
|
|
2692
|
+
this.widgetTasksVisible = !this.widgetTasksVisible, r.textContent = this.widgetTasksVisible ? "-" : "+", Object.assign(o.style, this.widgetTasksVisible ? Be : { display: "none" });
|
|
2693
2693
|
};
|
|
2694
|
-
this.hideTaskSection = () => (r.textContent = "+", Object.assign(
|
|
2694
|
+
this.hideTaskSection = () => (r.textContent = "+", Object.assign(o.style, {
|
|
2695
2695
|
display: "none"
|
|
2696
|
-
}), this.widgetTasksVisible = !1, !1), this.showTaskSection = () => (r.textContent = "-", Object.assign(
|
|
2696
|
+
}), this.widgetTasksVisible = !1, !1), this.showTaskSection = () => (r.textContent = "-", Object.assign(o.style, Be), this.widgetTasksVisible = !0, !0);
|
|
2697
2697
|
const A = () => {
|
|
2698
2698
|
const k = document.getElementById(`or_task_${this.currentTaskIndex}`);
|
|
2699
2699
|
k && Object.assign(k.style, ls);
|
|
2700
|
-
for (let
|
|
2701
|
-
const
|
|
2702
|
-
|
|
2700
|
+
for (let _ = 0; _ < this.currentTaskIndex; _++) {
|
|
2701
|
+
const R = document.getElementById(`or_task_${_}`);
|
|
2702
|
+
R && Object.assign(R.style, Ar);
|
|
2703
2703
|
}
|
|
2704
2704
|
};
|
|
2705
|
-
return s.onclick =
|
|
2706
|
-
var
|
|
2705
|
+
return s.onclick = B, y.onclick = this.collapseWidget, E.onclick = () => {
|
|
2706
|
+
var _, R, M, I;
|
|
2707
2707
|
const k = e[this.currentTaskIndex].allow_typing ? b.value : void 0;
|
|
2708
|
-
if (b.value = "", (
|
|
2709
|
-
this.currentTaskIndex++,
|
|
2710
|
-
const T = (
|
|
2708
|
+
if (b.value = "", (_ = this.signalManager) == null || _.signalTask(e[this.currentTaskIndex].task_id, "done", k), this.currentTaskIndex < e.length - 1) {
|
|
2709
|
+
this.currentTaskIndex++, O();
|
|
2710
|
+
const T = (R = this.signalManager) == null ? void 0 : R.getDurations();
|
|
2711
2711
|
T && T.tasks.findIndex((F) => F.taskId === e[this.currentTaskIndex].task_id) === -1 && (T.tasks.push({
|
|
2712
2712
|
taskId: e[this.currentTaskIndex].task_id,
|
|
2713
2713
|
started: this.app.timestamp()
|
|
@@ -2717,24 +2717,24 @@ class Vr {
|
|
|
2717
2717
|
this.app.localStorage.setItem("or_uxt_task_index", this.currentTaskIndex.toString());
|
|
2718
2718
|
}, setTimeout(() => {
|
|
2719
2719
|
const k = document.getElementById("or_task_0");
|
|
2720
|
-
k && Object.assign(k.style, ls),
|
|
2720
|
+
k && Object.assign(k.style, ls), O(), A();
|
|
2721
2721
|
}, 1), n;
|
|
2722
2722
|
}
|
|
2723
2723
|
showEndSection() {
|
|
2724
|
-
var l,
|
|
2724
|
+
var l, c, u, a;
|
|
2725
2725
|
let e = !0;
|
|
2726
2726
|
(l = this.signalManager) == null || l.signalTest("done");
|
|
2727
|
-
const n =
|
|
2727
|
+
const n = H("div", "end_section_or", Rr), s = H("div", "end_title_or", {
|
|
2728
2728
|
fontSize: "1.25rem",
|
|
2729
2729
|
fontWeight: "500"
|
|
2730
|
-
}, "Thank you! 👍"), i =
|
|
2730
|
+
}, "Thank you! 👍"), i = H("div", "end_description_or", {}, ((c = this.test) == null ? void 0 : c.conclusion) ?? `Thank you for participating in our usability test. Your feedback has been captured and will be used to enhance our website.
|
|
2731
2731
|
|
|
2732
|
-
We appreciate your time and valuable input.`), r =
|
|
2733
|
-
r.appendChild(
|
|
2734
|
-
r.removeChild(
|
|
2732
|
+
We appreciate your time and valuable input.`), r = H("div", "end_button_or", as, "Submitting Feedback"), o = $r();
|
|
2733
|
+
r.appendChild(o), (u = this.test) != null && u.reqMic || (a = this.test) != null && a.reqCamera ? this.userRecorder.sendToAPI().then(() => {
|
|
2734
|
+
r.removeChild(o), r.textContent = "End Session", e = !1;
|
|
2735
2735
|
}).catch((d) => {
|
|
2736
|
-
console.error(d), r.removeChild(
|
|
2737
|
-
}) : (r.removeChild(
|
|
2736
|
+
console.error(d), r.removeChild(o), r.textContent = "End Session", e = !1;
|
|
2737
|
+
}) : (r.removeChild(o), r.textContent = "End Session", e = !1), this.taskSection && this.container.removeChild(this.taskSection), this.descriptionSection && this.container.removeChild(this.descriptionSection), this.stopButton && this.stopButtonContainer && this.container.removeChild(this.stopButtonContainer), r.onclick = () => {
|
|
2738
2738
|
e || (window.close(), document.body.removeChild(this.bg));
|
|
2739
2739
|
}, n.append(s, i, r), this.endSection = n, this.container.append(n);
|
|
2740
2740
|
}
|
|
@@ -2772,8 +2772,8 @@ class Kr {
|
|
|
2772
2772
|
if (!i || !Q(s, "canvas") || this.app.sanitizer.isObscured(i) || this.app.sanitizer.isHidden(i) || !Q(s, "canvas") || this.snapshots[i])
|
|
2773
2773
|
return;
|
|
2774
2774
|
new IntersectionObserver((l) => {
|
|
2775
|
-
l.forEach((
|
|
2776
|
-
|
|
2775
|
+
l.forEach((c) => {
|
|
2776
|
+
c.isIntersecting && (c.target ? this.snapshots[i] && this.snapshots[i].createdAt ? this.snapshots[i].paused = !1 : this.recordCanvas(c.target, i) : this.snapshots[i] && (this.snapshots[i].paused = !0));
|
|
2777
2777
|
});
|
|
2778
2778
|
}).observe(s);
|
|
2779
2779
|
}, this.recordCanvas = (s, i) => {
|
|
@@ -2784,19 +2784,19 @@ class Kr {
|
|
|
2784
2784
|
paused: !1,
|
|
2785
2785
|
dummy: document.createElement("canvas")
|
|
2786
2786
|
};
|
|
2787
|
-
const
|
|
2788
|
-
this.app.send(
|
|
2787
|
+
const o = wr(i.toString(), r);
|
|
2788
|
+
this.app.send(o);
|
|
2789
2789
|
const l = (u) => {
|
|
2790
|
-
Jr(u, this.options.quality, this.snapshots[i].dummy, this.options.fixedScaling, this.fileExt, (
|
|
2791
|
-
|
|
2790
|
+
Jr(u, this.options.quality, this.snapshots[i].dummy, this.options.fixedScaling, this.fileExt, (a) => {
|
|
2791
|
+
a && (this.snapshots[i].images.push({ id: this.app.timestamp(), data: a }), this.snapshots[i].images.length > 9 && (this.sendSnaps(this.snapshots[i].images, i, this.snapshots[i].createdAt), this.snapshots[i].images = []));
|
|
2792
2792
|
});
|
|
2793
|
-
},
|
|
2794
|
-
const u = this.app.nodes.getID(s),
|
|
2795
|
-
!
|
|
2796
|
-
l(
|
|
2797
|
-
}) : l(
|
|
2793
|
+
}, c = setInterval(() => {
|
|
2794
|
+
const u = this.app.nodes.getID(s), a = u ? this.app.nodes.getNode(u) : void 0;
|
|
2795
|
+
!a || !Q(a, "canvas") || a !== s ? (this.app.debug.log("Canvas element not in sync"), clearInterval(c)) : this.snapshots[i].paused || (this.options.useAnimationFrame ? requestAnimationFrame(() => {
|
|
2796
|
+
l(a);
|
|
2797
|
+
}) : l(a));
|
|
2798
2798
|
}, this.interval);
|
|
2799
|
-
this.intervals.push(
|
|
2799
|
+
this.intervals.push(c);
|
|
2800
2800
|
}, this.fileExt = n.fileExt ?? "webp", this.interval = 1e3 / n.fps;
|
|
2801
2801
|
}
|
|
2802
2802
|
startTracking() {
|
|
@@ -2811,8 +2811,8 @@ class Kr {
|
|
|
2811
2811
|
return;
|
|
2812
2812
|
const i = new FormData();
|
|
2813
2813
|
e.forEach((r) => {
|
|
2814
|
-
const
|
|
2815
|
-
|
|
2814
|
+
const o = r.data;
|
|
2815
|
+
o && (i.append("snapshot", o, `${s}_${n}_${r.id}.${this.fileExt}`), this.options.isDebug && Xr(o, `${s}_${n}_${r.id}.${this.fileExt}`));
|
|
2816
2816
|
}), fetch(this.app.options.ingestPoint + "/v1/web/images", {
|
|
2817
2817
|
method: "POST",
|
|
2818
2818
|
headers: {
|
|
@@ -2833,16 +2833,16 @@ const fs = {
|
|
|
2833
2833
|
high: 0.8
|
|
2834
2834
|
};
|
|
2835
2835
|
function Jr(t, e = "medium", n, s = !1, i, r) {
|
|
2836
|
-
const
|
|
2836
|
+
const o = `image/${i}`;
|
|
2837
2837
|
if (s) {
|
|
2838
2838
|
const l = window.devicePixelRatio || 1;
|
|
2839
2839
|
n.width = t.width / l, n.height = t.height / l;
|
|
2840
|
-
const
|
|
2841
|
-
if (!
|
|
2840
|
+
const c = n.getContext("2d");
|
|
2841
|
+
if (!c)
|
|
2842
2842
|
return "";
|
|
2843
|
-
|
|
2843
|
+
c.clearRect(0, 0, n.width, n.height), c.drawImage(t, 0, 0, n.width, n.height), n.toBlob(r, o, fs[e]);
|
|
2844
2844
|
} else
|
|
2845
|
-
t.toBlob(r,
|
|
2845
|
+
t.toBlob(r, o, fs[e]);
|
|
2846
2846
|
}
|
|
2847
2847
|
function Xr(t, e) {
|
|
2848
2848
|
const n = URL.createObjectURL(t), s = document.createElement("a");
|
|
@@ -2887,8 +2887,8 @@ class Qr {
|
|
|
2887
2887
|
if (r === void 0)
|
|
2888
2888
|
return;
|
|
2889
2889
|
Ks(e, n, s, i);
|
|
2890
|
-
let
|
|
2891
|
-
|
|
2890
|
+
let o = this.elementListeners.get(r);
|
|
2891
|
+
o === void 0 && (o = [], this.elementListeners.set(r, o)), o.push([n, s, i]);
|
|
2892
2892
|
}
|
|
2893
2893
|
registerNode(e) {
|
|
2894
2894
|
let n = e[this.node_id];
|
|
@@ -2956,27 +2956,27 @@ class Rn {
|
|
|
2956
2956
|
constructor(e, n = !1) {
|
|
2957
2957
|
this.app = e, this.isTopContext = n, this.commited = [], this.recents = /* @__PURE__ */ new Map(), this.indexes = [], this.attributesMap = /* @__PURE__ */ new Map(), this.textSet = /* @__PURE__ */ new Set(), this.observer = Gs(this.app.safe((s) => {
|
|
2958
2958
|
for (const i of s) {
|
|
2959
|
-
const r = i.target,
|
|
2959
|
+
const r = i.target, o = i.type;
|
|
2960
2960
|
if (!Qt(r))
|
|
2961
2961
|
continue;
|
|
2962
|
-
if (
|
|
2963
|
-
for (let
|
|
2964
|
-
Qt(i.removedNodes[
|
|
2965
|
-
for (let
|
|
2966
|
-
this.bindTree(i.addedNodes[
|
|
2962
|
+
if (o === "childList") {
|
|
2963
|
+
for (let c = 0; c < i.removedNodes.length; c++)
|
|
2964
|
+
Qt(i.removedNodes[c]) && this.bindNode(i.removedNodes[c]);
|
|
2965
|
+
for (let c = 0; c < i.addedNodes.length; c++)
|
|
2966
|
+
this.bindTree(i.addedNodes[c]);
|
|
2967
2967
|
continue;
|
|
2968
2968
|
}
|
|
2969
2969
|
const l = this.app.nodes.getID(r);
|
|
2970
2970
|
if (l !== void 0) {
|
|
2971
|
-
if (this.recents.has(l) || this.recents.set(l, ye.Changed),
|
|
2972
|
-
const
|
|
2973
|
-
if (
|
|
2971
|
+
if (this.recents.has(l) || this.recents.set(l, ye.Changed), o === "attributes") {
|
|
2972
|
+
const c = i.attributeName;
|
|
2973
|
+
if (c === null)
|
|
2974
2974
|
continue;
|
|
2975
2975
|
let u = this.attributesMap.get(l);
|
|
2976
|
-
u === void 0 && this.attributesMap.set(l, u = /* @__PURE__ */ new Set()), u.add(
|
|
2976
|
+
u === void 0 && this.attributesMap.set(l, u = /* @__PURE__ */ new Set()), u.add(c);
|
|
2977
2977
|
continue;
|
|
2978
2978
|
}
|
|
2979
|
-
if (
|
|
2979
|
+
if (o === "characterData") {
|
|
2980
2980
|
this.textSet.add(l);
|
|
2981
2981
|
continue;
|
|
2982
2982
|
}
|
|
@@ -3049,8 +3049,8 @@ class Rn {
|
|
|
3049
3049
|
const r = this.app.nodes.getNodeCount();
|
|
3050
3050
|
for (; s.nextNode(); )
|
|
3051
3051
|
i += 1, this.app.nodes.unregisterNode(s.currentNode);
|
|
3052
|
-
const
|
|
3053
|
-
|
|
3052
|
+
const o = Math.floor(i / r * 100);
|
|
3053
|
+
o > 30 && this.app.send(yr(o));
|
|
3054
3054
|
}
|
|
3055
3055
|
}
|
|
3056
3056
|
// A top-consumption function on the infinite lists test. (~1% of performance resources)
|
|
@@ -3071,42 +3071,42 @@ class Rn {
|
|
|
3071
3071
|
}
|
|
3072
3072
|
let r = n.previousSibling;
|
|
3073
3073
|
for (; r !== null; ) {
|
|
3074
|
-
const
|
|
3075
|
-
if (
|
|
3076
|
-
this.commitNode(
|
|
3074
|
+
const a = this.app.nodes.getID(r);
|
|
3075
|
+
if (a !== void 0) {
|
|
3076
|
+
this.commitNode(a), this.indexes[e] = this.indexes[a] + 1;
|
|
3077
3077
|
break;
|
|
3078
3078
|
}
|
|
3079
3079
|
r = r.previousSibling;
|
|
3080
3080
|
}
|
|
3081
3081
|
r === null && (this.indexes[e] = 0);
|
|
3082
|
-
const
|
|
3083
|
-
if (
|
|
3082
|
+
const o = this.recents.get(e), l = o === ye.New, c = this.indexes[e];
|
|
3083
|
+
if (c === void 0)
|
|
3084
3084
|
throw "commitNode: missing node index";
|
|
3085
3085
|
if (l) {
|
|
3086
3086
|
if (ke(n)) {
|
|
3087
|
-
let
|
|
3087
|
+
let a = n;
|
|
3088
3088
|
if (i !== void 0) {
|
|
3089
3089
|
if (this.app.sanitizer.isHidden(e)) {
|
|
3090
|
-
const d =
|
|
3091
|
-
|
|
3090
|
+
const d = a.clientWidth, p = a.clientHeight;
|
|
3091
|
+
a = n.cloneNode(), a.style.width = `${d}px`, a.style.height = `${p}px`;
|
|
3092
3092
|
}
|
|
3093
|
-
this.app.send(Gi(e, i,
|
|
3093
|
+
this.app.send(Gi(e, i, c, a.tagName, bn(n)));
|
|
3094
3094
|
}
|
|
3095
|
-
for (let d = 0; d <
|
|
3096
|
-
const p =
|
|
3097
|
-
this.sendNodeAttribute(e,
|
|
3095
|
+
for (let d = 0; d < a.attributes.length; d++) {
|
|
3096
|
+
const p = a.attributes[d];
|
|
3097
|
+
this.sendNodeAttribute(e, a, p.nodeName, p.value);
|
|
3098
3098
|
}
|
|
3099
3099
|
} else
|
|
3100
|
-
yn(n) && (this.app.send(Ki(e, i,
|
|
3100
|
+
yn(n) && (this.app.send(Ki(e, i, c)), this.sendNodeData(e, s, n.data));
|
|
3101
3101
|
return !0;
|
|
3102
3102
|
}
|
|
3103
|
-
|
|
3103
|
+
o === ye.Removed && i !== void 0 && this.app.send(Ji(e, i, c));
|
|
3104
3104
|
const u = this.attributesMap.get(e);
|
|
3105
3105
|
if (u !== void 0) {
|
|
3106
3106
|
if (!ke(n))
|
|
3107
3107
|
throw "commitNode: node is not an element";
|
|
3108
|
-
for (const
|
|
3109
|
-
this.sendNodeAttribute(e, n,
|
|
3108
|
+
for (const a of u)
|
|
3109
|
+
this.sendNodeAttribute(e, n, a, n.getAttribute(a));
|
|
3110
3110
|
}
|
|
3111
3111
|
if (this.textSet.has(e)) {
|
|
3112
3112
|
if (!yn(n))
|
|
@@ -3184,8 +3184,8 @@ class eo {
|
|
|
3184
3184
|
calcOffset(e) {
|
|
3185
3185
|
let n = 0, s = 0;
|
|
3186
3186
|
if (e.parent && ([n, s] = this.calcOffset(e.parent)), !e.offset) {
|
|
3187
|
-
const { left:
|
|
3188
|
-
e.offset = [
|
|
3187
|
+
const { left: o, top: l } = e.iFrame.getBoundingClientRect();
|
|
3188
|
+
e.offset = [o, l];
|
|
3189
3189
|
}
|
|
3190
3190
|
const [i, r] = e.offset;
|
|
3191
3191
|
return [n + i, s + r];
|
|
@@ -3204,13 +3204,13 @@ class eo {
|
|
|
3204
3204
|
iFrame: e,
|
|
3205
3205
|
parent: i || null,
|
|
3206
3206
|
clear: () => {
|
|
3207
|
-
var
|
|
3208
|
-
s.removeEventListener("scroll",
|
|
3207
|
+
var c;
|
|
3208
|
+
s.removeEventListener("scroll", o), (c = s.defaultView) == null || c.removeEventListener("resize", o);
|
|
3209
3209
|
}
|
|
3210
|
-
},
|
|
3210
|
+
}, o = () => {
|
|
3211
3211
|
r.offset = null;
|
|
3212
3212
|
};
|
|
3213
|
-
s.addEventListener("scroll",
|
|
3213
|
+
s.addEventListener("scroll", o), (l = s.defaultView) == null || l.addEventListener("resize", o), this.states.set(n, r);
|
|
3214
3214
|
}
|
|
3215
3215
|
clear() {
|
|
3216
3216
|
this.states.forEach((e) => e.clear()), this.states.clear();
|
|
@@ -3238,10 +3238,10 @@ class to extends Rn {
|
|
|
3238
3238
|
const s = this.app.safe(() => setTimeout(() => {
|
|
3239
3239
|
if (this.app.nodes.getID(e) === void 0 || !Bi(e))
|
|
3240
3240
|
return;
|
|
3241
|
-
const r = e.contentWindow,
|
|
3242
|
-
if (
|
|
3241
|
+
const r = e.contentWindow, o = e.contentDocument;
|
|
3242
|
+
if (o && o !== n) {
|
|
3243
3243
|
const l = new ps(this.app);
|
|
3244
|
-
this.iframeObservers.push(l), l.observe(e), n =
|
|
3244
|
+
this.iframeObservers.push(l), l.observe(e), n = o, this.iframeOffsets.observe(e);
|
|
3245
3245
|
}
|
|
3246
3246
|
r && // Sometimes currentWin.window is null (not in specification). Such window object is not functional
|
|
3247
3247
|
r === r.window && !this.contextsSet.has(r) && (this.contextsSet.add(r), this.contextCallbacks.forEach((l) => l(r)));
|
|
@@ -3294,8 +3294,8 @@ class so {
|
|
|
3294
3294
|
}
|
|
3295
3295
|
sanitize(e, n) {
|
|
3296
3296
|
return this.obscured.has(e) ? no(n) : (this.options.obscureTextNumbers && (n = n.replace(/\d/g, "0")), this.options.obscureTextEmails && (n = n.replace(/^\w+([+.-]\w+)*@\w+([.-]\w+)*\.\w{2,3}$/g, (s) => {
|
|
3297
|
-
const [i, r] = s.split("@"), [
|
|
3298
|
-
return `${Jt(i)}@${Jt(
|
|
3297
|
+
const [i, r] = s.split("@"), [o, l] = r.split(".");
|
|
3298
|
+
return `${Jt(i)}@${Jt(o)}.${Jt(l)}`;
|
|
3299
3299
|
})), n);
|
|
3300
3300
|
}
|
|
3301
3301
|
isObscured(e) {
|
|
@@ -3439,17 +3439,17 @@ let lo = class {
|
|
|
3439
3439
|
constructor(e, n, s, i, r) {
|
|
3440
3440
|
this.signalError = i, this.insideIframe = r, this.messages = [], this.bufferedMessages1 = [], this.bufferedMessages2 = [], this.startCallbacks = [], this.stopCallbacks = [], this.commitCallbacks = [], this.activityState = Y.NotActive, this.version = "14.0.4", this.socketMode = !1, this.compressionThreshold = 24 * 1e3, this.bc = null, this.canvasRecorder = null, this.conditionsManager = null, this.canStart = !1, this.rootId = null, this.pageFrames = [], this.frameOderNumber = 0, this.initialHostName = location.hostname, this.startTimeout = null, this.coldStartCommitN = 0, this.delay = 0, this.coldInterval = null, this.orderNumber = 0, this.coldStartTs = 0, this.singleBuffer = !1, this.onSessionSent = () => {
|
|
3441
3441
|
}, this.restartCanvasTracking = () => {
|
|
3442
|
-
var
|
|
3443
|
-
(
|
|
3444
|
-
}, this.flushBuffer = async (
|
|
3445
|
-
let
|
|
3446
|
-
const d = [
|
|
3447
|
-
for (; !
|
|
3448
|
-
const p =
|
|
3449
|
-
!p || p[0] === 0 ?
|
|
3442
|
+
var c;
|
|
3443
|
+
(c = this.canvasRecorder) == null || c.restartTracking();
|
|
3444
|
+
}, this.flushBuffer = async (c) => new Promise((u) => {
|
|
3445
|
+
let a = !1;
|
|
3446
|
+
const d = [c.shift()];
|
|
3447
|
+
for (; !a; ) {
|
|
3448
|
+
const p = c[0];
|
|
3449
|
+
!p || p[0] === 0 ? a = !0 : d.push(c.shift());
|
|
3450
3450
|
}
|
|
3451
3451
|
this.postToWorker(d), u(null);
|
|
3452
|
-
}), this.onUxtCb = [], this.contextId = Math.random().toString(36).slice(2), this.projectKey = e, Object.keys(s).findIndex((
|
|
3452
|
+
}), this.onUxtCb = [], this.contextId = Math.random().toString(36).slice(2), this.projectKey = e, Object.keys(s).findIndex((c) => ["fixedCanvasScaling", "disableCanvas"].includes(c)) !== -1 && (console.warn('Openreplay: canvas options are moving to separate key "canvas" in next update. Please update your configuration.'), s = {
|
|
3453
3453
|
...s,
|
|
3454
3454
|
canvas: {
|
|
3455
3455
|
__save_canvas_locally: s.__save_canvas_locally,
|
|
@@ -3457,7 +3457,7 @@ let lo = class {
|
|
|
3457
3457
|
disableCanvas: s.disableCanvas
|
|
3458
3458
|
}
|
|
3459
3459
|
}), this.networkOptions = s.network;
|
|
3460
|
-
const
|
|
3460
|
+
const o = {
|
|
3461
3461
|
revID: "",
|
|
3462
3462
|
node_id: "__openreplay_id",
|
|
3463
3463
|
session_token_key: "__openreplay_token",
|
|
@@ -3491,23 +3491,23 @@ let lo = class {
|
|
|
3491
3491
|
useAnimationFrame: !1
|
|
3492
3492
|
}
|
|
3493
3493
|
};
|
|
3494
|
-
if (this.options = Xs(
|
|
3495
|
-
const
|
|
3496
|
-
this.bc = new BroadcastChannel(`rick_${
|
|
3494
|
+
if (this.options = Xs(o, s), !this.insideIframe && !this.options.forceSingleTab && globalThis && "BroadcastChannel" in globalThis) {
|
|
3495
|
+
const c = location.hostname.split(".").slice(-2).join("_");
|
|
3496
|
+
this.bc = new BroadcastChannel(`rick_${c}`);
|
|
3497
3497
|
}
|
|
3498
|
-
this.revID = this.options.revID, this.localStorage = this.options.localStorage ?? window.localStorage, this.sessionStorage = this.options.sessionStorage ?? window.sessionStorage, this.sanitizer = new so(this, s), this.nodes = new Qr(this.options.node_id), this.observer = new to(this, s), this.ticker = new oo(this), this.ticker.attach(() => this.commit()), this.debug = new Yr(this.options.__debug__), this.session = new io(this, this.options), this.attributeSender = new Di(this, !!this.options.disableStringDict), this.featureFlags = new
|
|
3499
|
-
this.send(Sr(
|
|
3500
|
-
}), this.session.attachUpdateCallback(({ userID:
|
|
3501
|
-
|
|
3498
|
+
this.revID = this.options.revID, this.localStorage = this.options.localStorage ?? window.localStorage, this.sessionStorage = this.options.sessionStorage ?? window.sessionStorage, this.sanitizer = new so(this, s), this.nodes = new Qr(this.options.node_id), this.observer = new to(this, s), this.ticker = new oo(this), this.ticker.attach(() => this.commit()), this.debug = new Yr(this.options.__debug__), this.session = new io(this, this.options), this.attributeSender = new Di(this, !!this.options.disableStringDict), this.featureFlags = new Li(this), this.tagWatcher = new Tr(this.sessionStorage, this.debug.error, (c) => {
|
|
3499
|
+
this.send(Sr(c));
|
|
3500
|
+
}), this.session.attachUpdateCallback(({ userID: c, metadata: u }) => {
|
|
3501
|
+
c != null && this.send(or(c)), u != null && Object.entries(u).forEach(([a, d]) => this.send(Qn(a, d)));
|
|
3502
3502
|
}), n != null && this.session.applySessionHash(n), this.initWorker();
|
|
3503
3503
|
const l = this.session.getTabId();
|
|
3504
3504
|
if (this.insideIframe) {
|
|
3505
|
-
const
|
|
3506
|
-
const { data: d } =
|
|
3505
|
+
const c = (a) => {
|
|
3506
|
+
const { data: d } = a;
|
|
3507
3507
|
d.line === ue.iframeId && (this.rootId = d.id, this.session.setSessionToken(d.token), this.frameOderNumber = d.frameOrderNumber, this.debug.log("starting iframe tracking", d), this.allowAppStart());
|
|
3508
3508
|
};
|
|
3509
|
-
window.addEventListener("message",
|
|
3510
|
-
window.removeEventListener("message",
|
|
3509
|
+
window.addEventListener("message", c), this.attachStopCallback(() => {
|
|
3510
|
+
window.removeEventListener("message", c);
|
|
3511
3511
|
});
|
|
3512
3512
|
const u = this.initialHostName;
|
|
3513
3513
|
window.parent.postMessage({
|
|
@@ -3517,9 +3517,9 @@ let lo = class {
|
|
|
3517
3517
|
domain: u
|
|
3518
3518
|
}, "*");
|
|
3519
3519
|
} else {
|
|
3520
|
-
let
|
|
3521
|
-
const u = (
|
|
3522
|
-
const { data: d } =
|
|
3520
|
+
let c = 0;
|
|
3521
|
+
const u = (a) => {
|
|
3522
|
+
const { data: d } = a;
|
|
3523
3523
|
if (d.line === ue.iframeSignal) {
|
|
3524
3524
|
const p = d.domain, b = Array.from(document.querySelectorAll("iframe"));
|
|
3525
3525
|
this.pageFrames = b, (async () => {
|
|
@@ -3529,16 +3529,16 @@ let lo = class {
|
|
|
3529
3529
|
if (E) {
|
|
3530
3530
|
this.waitStarted().then(() => {
|
|
3531
3531
|
var A;
|
|
3532
|
-
|
|
3533
|
-
const
|
|
3532
|
+
c++;
|
|
3533
|
+
const O = this.session.getSessionToken(), B = {
|
|
3534
3534
|
line: ue.iframeId,
|
|
3535
3535
|
context: this.contextId,
|
|
3536
3536
|
domain: p,
|
|
3537
3537
|
id: E,
|
|
3538
|
-
token:
|
|
3539
|
-
frameOrderNumber:
|
|
3538
|
+
token: O,
|
|
3539
|
+
frameOrderNumber: c
|
|
3540
3540
|
};
|
|
3541
|
-
this.debug.log("iframe_data",
|
|
3541
|
+
this.debug.log("iframe_data", B), (A = a.source) == null || A.postMessage(B, "*");
|
|
3542
3542
|
}).catch(console.error), y = 10;
|
|
3543
3543
|
break;
|
|
3544
3544
|
}
|
|
@@ -3551,23 +3551,23 @@ let lo = class {
|
|
|
3551
3551
|
if (w[0] === 20) {
|
|
3552
3552
|
let y = w;
|
|
3553
3553
|
return this.pageFrames.forEach((E) => {
|
|
3554
|
-
if (E.dataset.domain ===
|
|
3555
|
-
const [
|
|
3556
|
-
y = [
|
|
3554
|
+
if (E.dataset.domain === a.data.domain) {
|
|
3555
|
+
const [O, B, A] = w, { left: k, top: _ } = E.getBoundingClientRect();
|
|
3556
|
+
y = [O, B + k, A + _];
|
|
3557
3557
|
}
|
|
3558
3558
|
}), y;
|
|
3559
3559
|
}
|
|
3560
3560
|
if (w[0] === 68) {
|
|
3561
3561
|
let y = w;
|
|
3562
3562
|
return this.pageFrames.forEach((E) => {
|
|
3563
|
-
if (E.dataset.domain ===
|
|
3564
|
-
const [
|
|
3563
|
+
if (E.dataset.domain === a.data.domain) {
|
|
3564
|
+
const [O, B, A, k, _, R, M] = w, { left: I, top: T, width: F, height: U } = E.getBoundingClientRect(), j = document.documentElement.scrollWidth, z = document.documentElement.scrollHeight, C = R / 100 * F + I, L = M / 100 * U + T, V = C / j, G = L / z;
|
|
3565
3565
|
y = [
|
|
3566
|
-
|
|
3567
|
-
|
|
3566
|
+
O,
|
|
3567
|
+
B,
|
|
3568
3568
|
A,
|
|
3569
3569
|
k,
|
|
3570
|
-
|
|
3570
|
+
_,
|
|
3571
3571
|
Math.round(V * 1e3) / 10,
|
|
3572
3572
|
Math.round(G * 1e3) / 10
|
|
3573
3573
|
];
|
|
@@ -3589,20 +3589,20 @@ let lo = class {
|
|
|
3589
3589
|
context: this.contextId
|
|
3590
3590
|
}), this.startTimeout = setTimeout(() => {
|
|
3591
3591
|
this.allowAppStart();
|
|
3592
|
-
}, 500), this.bc.onmessage = (
|
|
3593
|
-
if (
|
|
3594
|
-
if (
|
|
3595
|
-
const u =
|
|
3592
|
+
}, 500), this.bc.onmessage = (c) => {
|
|
3593
|
+
if (c.data.context !== this.contextId) {
|
|
3594
|
+
if (c.data.line === ue.resp) {
|
|
3595
|
+
const u = c.data.token;
|
|
3596
3596
|
this.session.setSessionToken(u), this.allowAppStart();
|
|
3597
3597
|
}
|
|
3598
|
-
if (
|
|
3599
|
-
const u =
|
|
3598
|
+
if (c.data.line === ue.reg) {
|
|
3599
|
+
const u = c.data.token;
|
|
3600
3600
|
this.session.regenerateTabId(), this.session.setSessionToken(u), this.allowAppStart();
|
|
3601
3601
|
}
|
|
3602
|
-
if (
|
|
3602
|
+
if (c.data.line === ue.ask) {
|
|
3603
3603
|
const u = this.session.getSessionToken();
|
|
3604
3604
|
u && this.bc && this.bc.postMessage({
|
|
3605
|
-
line:
|
|
3605
|
+
line: c.data.source === l ? ue.reg : ue.resp,
|
|
3606
3606
|
token: u,
|
|
3607
3607
|
source: l,
|
|
3608
3608
|
context: this.contextId
|
|
@@ -3647,9 +3647,9 @@ let lo = class {
|
|
|
3647
3647
|
this.stop(!1), this.debug.error("worker_failed", e.reason), this._debug("worker_failed", e.reason);
|
|
3648
3648
|
else if (e.type === "compress") {
|
|
3649
3649
|
const s = e.batch;
|
|
3650
|
-
s.byteLength > this.compressionThreshold ? Ni(e.batch, { mtime: 0 }, (r,
|
|
3651
|
-
var l,
|
|
3652
|
-
r ? (this.debug.error("Openreplay compression error:", r), (l = this.worker) == null || l.postMessage({ type: "uncompressed", batch: s })) : (
|
|
3650
|
+
s.byteLength > this.compressionThreshold ? Ni(e.batch, { mtime: 0 }, (r, o) => {
|
|
3651
|
+
var l, c;
|
|
3652
|
+
r ? (this.debug.error("Openreplay compression error:", r), (l = this.worker) == null || l.postMessage({ type: "uncompressed", batch: s })) : (c = this.worker) == null || c.postMessage({ type: "compressed", batch: o });
|
|
3653
3653
|
}) : (n = this.worker) == null || n.postMessage({ type: "uncompressed", batch: s });
|
|
3654
3654
|
} else
|
|
3655
3655
|
e.type === "queue_empty" && this.onSessionSent();
|
|
@@ -3740,8 +3740,8 @@ let lo = class {
|
|
|
3740
3740
|
// Use app.nodes.attachNodeListener for registered nodes instead
|
|
3741
3741
|
attachEventListener(e, n, s, i = !0, r = !0) {
|
|
3742
3742
|
i && (s = this.safe(s));
|
|
3743
|
-
const
|
|
3744
|
-
this.attachStartCallback(
|
|
3743
|
+
const o = () => e ? Ks(e, n, s, r) : null, l = () => e ? Js(e, n, s, r) : null;
|
|
3744
|
+
this.attachStartCallback(o, i), this.attachStopCallback(l, i);
|
|
3745
3745
|
}
|
|
3746
3746
|
// TODO: full correct semantic
|
|
3747
3747
|
checkRequiredVersion(e) {
|
|
@@ -3783,12 +3783,12 @@ let lo = class {
|
|
|
3783
3783
|
this.debug.error("OpenReplay error: Unable to build session URL");
|
|
3784
3784
|
return;
|
|
3785
3785
|
}
|
|
3786
|
-
const r = this.options.ingestPoint,
|
|
3786
|
+
const r = this.options.ingestPoint, c = (/api\.openreplay\.com/.test(r) ? "https://app.openreplay.com/ingest" : r).replace(/ingest$/, `${n}/session/${s}`);
|
|
3787
3787
|
if (e != null && e.withCurrentTime) {
|
|
3788
3788
|
const u = pe() - i;
|
|
3789
|
-
return `${
|
|
3789
|
+
return `${c}?jumpto=${u}`;
|
|
3790
3790
|
}
|
|
3791
|
-
return
|
|
3791
|
+
return c;
|
|
3792
3792
|
}
|
|
3793
3793
|
getHost() {
|
|
3794
3794
|
return new URL(this.options.ingestPoint).host;
|
|
@@ -3863,22 +3863,22 @@ let lo = class {
|
|
|
3863
3863
|
token: s,
|
|
3864
3864
|
userBrowser: i,
|
|
3865
3865
|
userCity: r,
|
|
3866
|
-
userCountry:
|
|
3866
|
+
userCountry: o,
|
|
3867
3867
|
userDevice: l,
|
|
3868
|
-
userOS:
|
|
3868
|
+
userOS: c,
|
|
3869
3869
|
userState: u,
|
|
3870
|
-
projectID:
|
|
3870
|
+
projectID: a
|
|
3871
3871
|
} = await n.json();
|
|
3872
|
-
this.session.assign({ projectID:
|
|
3872
|
+
this.session.assign({ projectID: a }), this.session.setUserInfo({
|
|
3873
3873
|
userBrowser: i,
|
|
3874
3874
|
userCity: r,
|
|
3875
|
-
userCountry:
|
|
3875
|
+
userCountry: o,
|
|
3876
3876
|
userDevice: l,
|
|
3877
|
-
userOS:
|
|
3877
|
+
userOS: c,
|
|
3878
3878
|
userState: u
|
|
3879
3879
|
});
|
|
3880
3880
|
const d = { sessionToken: s, userUUID: "", sessionID: "" };
|
|
3881
|
-
this.startCallbacks.forEach((w) => w(d)), await ((p = this.conditionsManager) == null ? void 0 : p.fetchConditions(
|
|
3881
|
+
this.startCallbacks.forEach((w) => w(d)), await ((p = this.conditionsManager) == null ? void 0 : p.fetchConditions(a, s)), await this.featureFlags.reloadFlags(s), await this.tagWatcher.fetchTags(this.options.ingestPoint, s), (b = this.conditionsManager) == null || b.processFlags(this.featureFlags.flags);
|
|
3882
3882
|
}
|
|
3883
3883
|
/**
|
|
3884
3884
|
* Starts offline session recording
|
|
@@ -3891,15 +3891,15 @@ let lo = class {
|
|
|
3891
3891
|
Kt(), this.coldStartTs = pe();
|
|
3892
3892
|
const i = this.localStorage.getItem(en);
|
|
3893
3893
|
if (i) {
|
|
3894
|
-
const
|
|
3895
|
-
this.bufferedMessages1 = Array.isArray(
|
|
3894
|
+
const o = JSON.parse(i);
|
|
3895
|
+
this.bufferedMessages1 = Array.isArray(o) ? o : this.bufferedMessages1, this.localStorage.removeItem(en);
|
|
3896
3896
|
}
|
|
3897
3897
|
this.bufferedMessages1.push(Re(this.timestamp())), this.bufferedMessages1.push(De(this.session.getTabId())), this.activityState = Y.ColdStart, e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
|
|
3898
3898
|
userID: e.userID,
|
|
3899
3899
|
metadata: e.metadata
|
|
3900
3900
|
});
|
|
3901
3901
|
const r = { sessionToken: "", userUUID: "", sessionID: "" };
|
|
3902
|
-
return this.startCallbacks.forEach((
|
|
3902
|
+
return this.startCallbacks.forEach((o) => o(r)), s || this.send(lt(this.session.getTabId())), this.observer.observe(), this.ticker.start(), {
|
|
3903
3903
|
saveBuffer: this.saveBuffer,
|
|
3904
3904
|
getBuffer: this.getBuffer,
|
|
3905
3905
|
setBuffer: this.setBuffer
|
|
@@ -3964,17 +3964,17 @@ let lo = class {
|
|
|
3964
3964
|
jsHeapSizeLimit: Yt,
|
|
3965
3965
|
timezone: tn()
|
|
3966
3966
|
})
|
|
3967
|
-
}), { token: s, userBrowser: i, userCity: r, userCountry:
|
|
3967
|
+
}), { token: s, userBrowser: i, userCity: r, userCountry: o, userDevice: l, userOS: c, userState: u, beaconSizeLimit: a, projectID: d } = await n.json();
|
|
3968
3968
|
for ((b = this.worker) == null || b.postMessage({
|
|
3969
3969
|
type: "auth",
|
|
3970
3970
|
token: s,
|
|
3971
|
-
beaconSizeLimit:
|
|
3971
|
+
beaconSizeLimit: a
|
|
3972
3972
|
}), this.session.assign({ projectID: d }), this.session.setUserInfo({
|
|
3973
3973
|
userBrowser: i,
|
|
3974
3974
|
userCity: r,
|
|
3975
|
-
userCountry:
|
|
3975
|
+
userCountry: o,
|
|
3976
3976
|
userDevice: l,
|
|
3977
|
-
userOS:
|
|
3977
|
+
userOS: c,
|
|
3978
3978
|
userState: u
|
|
3979
3979
|
}); this.bufferedMessages1.length > 0; )
|
|
3980
3980
|
await this.flushBuffer(this.bufferedMessages1);
|
|
@@ -3983,8 +3983,8 @@ let lo = class {
|
|
|
3983
3983
|
async _start(e = {}, n = !1, s) {
|
|
3984
3984
|
const i = this.activityState === Y.ColdStart;
|
|
3985
3985
|
if (i && this.coldInterval && clearInterval(this.coldInterval), !this.worker) {
|
|
3986
|
-
const
|
|
3987
|
-
return this.signalError(
|
|
3986
|
+
const c = "No worker found: perhaps, CSP is not set.";
|
|
3987
|
+
return this.signalError(c, []), Promise.resolve(Ce(c));
|
|
3988
3988
|
}
|
|
3989
3989
|
if (this.activityState === Y.Active || this.activityState === Y.Starting)
|
|
3990
3990
|
return Promise.resolve(Ce("OpenReplay: trying to call `start()` on the instance that has been started already."));
|
|
@@ -4004,10 +4004,10 @@ let lo = class {
|
|
|
4004
4004
|
connAttemptGap: this.options.connAttemptGap,
|
|
4005
4005
|
tabId: this.session.getTabId()
|
|
4006
4006
|
});
|
|
4007
|
-
const
|
|
4008
|
-
this.sessionStorage.removeItem(this.options.session_reset_key), this.debug.log("OpenReplay: starting session; need new session id?", l, "session token: ",
|
|
4007
|
+
const o = this.session.getSessionToken(), l = this.checkSessionToken(e.forceNew);
|
|
4008
|
+
this.sessionStorage.removeItem(this.options.session_reset_key), this.debug.log("OpenReplay: starting session; need new session id?", l, "session token: ", o);
|
|
4009
4009
|
try {
|
|
4010
|
-
const
|
|
4010
|
+
const c = await window.fetch(this.options.ingestPoint + "/v1/web/start", {
|
|
4011
4011
|
method: "POST",
|
|
4012
4012
|
headers: {
|
|
4013
4013
|
"Content-Type": "application/json"
|
|
@@ -4018,7 +4018,7 @@ let lo = class {
|
|
|
4018
4018
|
doNotRecord: !1,
|
|
4019
4019
|
bufferDiff: r - this.coldStartTs,
|
|
4020
4020
|
userID: this.session.getInfo().userID,
|
|
4021
|
-
token: l ? void 0 :
|
|
4021
|
+
token: l ? void 0 : o,
|
|
4022
4022
|
deviceMemory: Xt,
|
|
4023
4023
|
jsHeapSizeLimit: Yt,
|
|
4024
4024
|
timezone: tn(),
|
|
@@ -4028,17 +4028,17 @@ let lo = class {
|
|
|
4028
4028
|
height: window.screen.height
|
|
4029
4029
|
})
|
|
4030
4030
|
});
|
|
4031
|
-
if (
|
|
4032
|
-
const
|
|
4033
|
-
return Ce(
|
|
4031
|
+
if (c.status !== 200) {
|
|
4032
|
+
const C = await c.text(), L = C === Qe ? Qe : `Server error: ${c.status}. ${C}`;
|
|
4033
|
+
return Ce(L);
|
|
4034
4034
|
}
|
|
4035
4035
|
if (!this.worker) {
|
|
4036
|
-
const
|
|
4037
|
-
return this.signalError(
|
|
4036
|
+
const C = "no worker found after start request (this should not happen in real world)";
|
|
4037
|
+
return this.signalError(C, []), Ce(C);
|
|
4038
4038
|
}
|
|
4039
4039
|
const {
|
|
4040
4040
|
token: u,
|
|
4041
|
-
userUUID:
|
|
4041
|
+
userUUID: a,
|
|
4042
4042
|
projectID: d,
|
|
4043
4043
|
beaconSizeLimit: p,
|
|
4044
4044
|
compressionThreshold: b,
|
|
@@ -4049,28 +4049,28 @@ let lo = class {
|
|
|
4049
4049
|
// derived from token
|
|
4050
4050
|
startTimestamp: E,
|
|
4051
4051
|
// real startTS (server time), derived from sessionID
|
|
4052
|
-
userBrowser:
|
|
4053
|
-
userCity:
|
|
4052
|
+
userBrowser: O,
|
|
4053
|
+
userCity: B,
|
|
4054
4054
|
userCountry: A,
|
|
4055
4055
|
userDevice: k,
|
|
4056
|
-
userOS:
|
|
4057
|
-
userState:
|
|
4056
|
+
userOS: _,
|
|
4057
|
+
userState: R,
|
|
4058
4058
|
canvasEnabled: M,
|
|
4059
4059
|
canvasQuality: I,
|
|
4060
4060
|
canvasFPS: T,
|
|
4061
4061
|
assistOnly: F
|
|
4062
|
-
} = await
|
|
4063
|
-
if (typeof u != "string" || typeof
|
|
4064
|
-
const
|
|
4065
|
-
return this.signalError(
|
|
4062
|
+
} = await c.json();
|
|
4063
|
+
if (typeof u != "string" || typeof a != "string" || typeof E != "number" && typeof E < "u" || typeof y != "string" || typeof w != "number" || typeof p != "number" && typeof p < "u") {
|
|
4064
|
+
const C = `Incorrect server response: ${JSON.stringify(c)}`;
|
|
4065
|
+
return this.signalError(C, []), Ce(C);
|
|
4066
4066
|
}
|
|
4067
4067
|
this.delay = w, this.session.setSessionToken(u), this.session.setUserInfo({
|
|
4068
|
-
userBrowser:
|
|
4069
|
-
userCity:
|
|
4068
|
+
userBrowser: O,
|
|
4069
|
+
userCity: B,
|
|
4070
4070
|
userCountry: A,
|
|
4071
4071
|
userDevice: k,
|
|
4072
|
-
userOS:
|
|
4073
|
-
userState:
|
|
4072
|
+
userOS: _,
|
|
4073
|
+
userState: R
|
|
4074
4074
|
}), this.session.assign({
|
|
4075
4075
|
sessionID: y,
|
|
4076
4076
|
timestamp: E || r,
|
|
@@ -4079,39 +4079,39 @@ let lo = class {
|
|
|
4079
4079
|
type: "auth",
|
|
4080
4080
|
token: u,
|
|
4081
4081
|
beaconSizeLimit: p
|
|
4082
|
-
}), !l && u ===
|
|
4083
|
-
const
|
|
4084
|
-
if (this.startCallbacks.forEach((
|
|
4082
|
+
}), !l && u === o && (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(lt(this.session.getTabId()))), Object.entries(this.session.getInfo().metadata).forEach(([C, L]) => this.send(Qn(C, L))), this.localStorage.setItem(this.options.local_uuid_key, a), this.compressionThreshold = b;
|
|
4083
|
+
const U = { sessionToken: u, userUUID: a, sessionID: y };
|
|
4084
|
+
if (this.startCallbacks.forEach((C) => C(U)), this.featureFlags.reloadFlags(), await this.tagWatcher.fetchTags(this.options.ingestPoint, u), this.activityState = Y.Active, M && !this.options.canvas.disableCanvas && (this.canvasRecorder = this.canvasRecorder ?? new Kr(this, {
|
|
4085
4085
|
fps: T,
|
|
4086
4086
|
quality: I,
|
|
4087
4087
|
isDebug: this.options.canvas.__save_canvas_locally,
|
|
4088
4088
|
fixedScaling: this.options.canvas.fixedCanvasScaling,
|
|
4089
4089
|
useAnimationFrame: this.options.canvas.useAnimationFrame
|
|
4090
4090
|
}), this.canvasRecorder.startTracking()), i) {
|
|
4091
|
-
const
|
|
4092
|
-
for (;
|
|
4093
|
-
await this.flushBuffer(
|
|
4091
|
+
const C = this.bufferedMessages1.length > this.bufferedMessages2.length ? this.bufferedMessages1 : this.bufferedMessages2;
|
|
4092
|
+
for (; C.length > 0; )
|
|
4093
|
+
await this.flushBuffer(C);
|
|
4094
4094
|
this.clearBuffers(), this.commit();
|
|
4095
4095
|
} else
|
|
4096
4096
|
this.insideIframe && this.rootId ? this.observer.crossdomainObserve(this.rootId, this.frameOderNumber) : this.observer.observe(), this.ticker.start();
|
|
4097
4097
|
this.uxtManager = this.uxtManager ? this.uxtManager : new Vr(this, gs);
|
|
4098
|
-
let
|
|
4098
|
+
let j;
|
|
4099
4099
|
const z = this.localStorage.getItem(gs);
|
|
4100
|
-
if (z && (
|
|
4101
|
-
const
|
|
4102
|
-
if (
|
|
4103
|
-
const
|
|
4104
|
-
|
|
4100
|
+
if (z && (j = parseInt(z, 10)), location != null && location.search) {
|
|
4101
|
+
const C = new URLSearchParams(location.search);
|
|
4102
|
+
if (C.has("oruxt")) {
|
|
4103
|
+
const L = C.get("oruxt");
|
|
4104
|
+
j = L ? parseInt(L, 10) : void 0;
|
|
4105
4105
|
}
|
|
4106
4106
|
}
|
|
4107
|
-
return
|
|
4108
|
-
|
|
4109
|
-
})), ao(
|
|
4110
|
-
} catch (
|
|
4111
|
-
if (this.stop(), this.session.reset(),
|
|
4107
|
+
return j && (this.uxtManager.isActive ? this.onUxtCb.forEach((C) => C(j)) : this.uxtManager.getTest(j, u, !!z).then((C) => {
|
|
4108
|
+
C && this.onUxtCb.forEach((L) => L(C));
|
|
4109
|
+
})), ao(U);
|
|
4110
|
+
} catch (c) {
|
|
4111
|
+
if (this.stop(), this.session.reset(), c === Qe)
|
|
4112
4112
|
return this.signalError(Qe, []), Ce(Qe);
|
|
4113
|
-
this._debug("session_start",
|
|
4114
|
-
const u =
|
|
4113
|
+
this._debug("session_start", c);
|
|
4114
|
+
const u = c instanceof Error ? c.message : c.toString();
|
|
4115
4115
|
return this.signalError(u, []), Ce(u);
|
|
4116
4116
|
}
|
|
4117
4117
|
}
|
|
@@ -4251,14 +4251,14 @@ function go(t, e) {
|
|
|
4251
4251
|
}, e);
|
|
4252
4252
|
if (!Array.isArray(n.consoleMethods) || n.consoleMethods.length === 0)
|
|
4253
4253
|
return;
|
|
4254
|
-
const s = t.safe((
|
|
4254
|
+
const s = t.safe((c, u) => t.send(nr(c, po(u))));
|
|
4255
4255
|
let i = 0;
|
|
4256
4256
|
const r = () => {
|
|
4257
4257
|
i = 0;
|
|
4258
4258
|
};
|
|
4259
4259
|
t.attachStartCallback(r), t.ticker.attach(r, 33, !1);
|
|
4260
|
-
const
|
|
4261
|
-
const
|
|
4260
|
+
const o = (c, u) => {
|
|
4261
|
+
const a = {
|
|
4262
4262
|
apply: function(d, p, b) {
|
|
4263
4263
|
Reflect.apply(d, u, b), i = i + 1, !(i > n.consoleThrottling) && s(d.name, b);
|
|
4264
4264
|
}
|
|
@@ -4269,9 +4269,9 @@ function go(t, e) {
|
|
|
4269
4269
|
return;
|
|
4270
4270
|
}
|
|
4271
4271
|
const p = u.console[d];
|
|
4272
|
-
|
|
4272
|
+
c[d] = new Proxy(p, a);
|
|
4273
4273
|
});
|
|
4274
|
-
}, l = t.safe((
|
|
4274
|
+
}, l = t.safe((c) => o(c.console, c));
|
|
4275
4275
|
l(window), t.observer.attachContextCallback(l);
|
|
4276
4276
|
}
|
|
4277
4277
|
var si = { exports: {} }, nn = { exports: {} }, bs;
|
|
@@ -4291,11 +4291,11 @@ function mo() {
|
|
|
4291
4291
|
return this[y];
|
|
4292
4292
|
};
|
|
4293
4293
|
}
|
|
4294
|
-
var r = ["isConstructor", "isEval", "isNative", "isToplevel"],
|
|
4294
|
+
var r = ["isConstructor", "isEval", "isNative", "isToplevel"], o = ["columnNumber", "lineNumber"], l = ["fileName", "functionName", "source"], c = ["args"], u = ["evalOrigin"], a = r.concat(o, l, c, u);
|
|
4295
4295
|
function d(y) {
|
|
4296
4296
|
if (y)
|
|
4297
|
-
for (var E = 0; E <
|
|
4298
|
-
y[
|
|
4297
|
+
for (var E = 0; E < a.length; E++)
|
|
4298
|
+
y[a[E]] !== void 0 && this["set" + s(a[E])](y[a[E]]);
|
|
4299
4299
|
}
|
|
4300
4300
|
d.prototype = {
|
|
4301
4301
|
getArgs: function() {
|
|
@@ -4318,13 +4318,13 @@ function mo() {
|
|
|
4318
4318
|
throw new TypeError("Eval Origin must be an Object or StackFrame");
|
|
4319
4319
|
},
|
|
4320
4320
|
toString: function() {
|
|
4321
|
-
var y = this.getFileName() || "", E = this.getLineNumber() || "",
|
|
4322
|
-
return this.getIsEval() ? y ? "[eval] (" + y + ":" + E + ":" +
|
|
4321
|
+
var y = this.getFileName() || "", E = this.getLineNumber() || "", O = this.getColumnNumber() || "", B = this.getFunctionName() || "";
|
|
4322
|
+
return this.getIsEval() ? y ? "[eval] (" + y + ":" + E + ":" + O + ")" : "[eval]:" + E + ":" + O : B ? B + " (" + y + ":" + E + ":" + O + ")" : y + ":" + E + ":" + O;
|
|
4323
4323
|
}
|
|
4324
4324
|
}, d.fromString = function(E) {
|
|
4325
|
-
var
|
|
4326
|
-
if (
|
|
4327
|
-
var
|
|
4325
|
+
var O = E.indexOf("("), B = E.lastIndexOf(")"), A = E.substring(0, O), k = E.substring(O + 1, B).split(","), _ = E.substring(B + 1);
|
|
4326
|
+
if (_.indexOf("@") === 0)
|
|
4327
|
+
var R = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(_, ""), M = R[1], I = R[2], T = R[3];
|
|
4328
4328
|
return new d({
|
|
4329
4329
|
functionName: A,
|
|
4330
4330
|
args: k || void 0,
|
|
@@ -4339,14 +4339,14 @@ function mo() {
|
|
|
4339
4339
|
this[y] = !!E;
|
|
4340
4340
|
};
|
|
4341
4341
|
}(r[p]);
|
|
4342
|
-
for (var b = 0; b <
|
|
4343
|
-
d.prototype["get" + s(
|
|
4342
|
+
for (var b = 0; b < o.length; b++)
|
|
4343
|
+
d.prototype["get" + s(o[b])] = i(o[b]), d.prototype["set" + s(o[b])] = /* @__PURE__ */ function(y) {
|
|
4344
4344
|
return function(E) {
|
|
4345
4345
|
if (!n(E))
|
|
4346
4346
|
throw new TypeError(y + " must be a Number");
|
|
4347
4347
|
this[y] = Number(E);
|
|
4348
4348
|
};
|
|
4349
|
-
}(
|
|
4349
|
+
}(o[b]);
|
|
4350
4350
|
for (var w = 0; w < l.length; w++)
|
|
4351
4351
|
d.prototype["get" + s(l[w])] = i(l[w]), d.prototype["set" + s(l[w])] = /* @__PURE__ */ function(y) {
|
|
4352
4352
|
return function(E) {
|
|
@@ -4361,7 +4361,7 @@ function mo() {
|
|
|
4361
4361
|
(function(n, s) {
|
|
4362
4362
|
t.exports = s(mo());
|
|
4363
4363
|
})($e, function(s) {
|
|
4364
|
-
var i = /(^|@)\S+:\d+/, r = /^\s*at .*(\S+:\d+|\(native\))/m,
|
|
4364
|
+
var i = /(^|@)\S+:\d+/, r = /^\s*at .*(\S+:\d+|\(native\))/m, o = /^(eval@)?(\[native code])?$/;
|
|
4365
4365
|
return {
|
|
4366
4366
|
/**
|
|
4367
4367
|
* Given an Error object, extract the most information from it.
|
|
@@ -4369,30 +4369,30 @@ function mo() {
|
|
|
4369
4369
|
* @param {Error} error object
|
|
4370
4370
|
* @return {Array} of StackFrames
|
|
4371
4371
|
*/
|
|
4372
|
-
parse: function(
|
|
4373
|
-
if (typeof
|
|
4374
|
-
return this.parseOpera(
|
|
4375
|
-
if (
|
|
4376
|
-
return this.parseV8OrIE(
|
|
4377
|
-
if (
|
|
4378
|
-
return this.parseFFOrSafari(
|
|
4372
|
+
parse: function(c) {
|
|
4373
|
+
if (typeof c.stacktrace < "u" || typeof c["opera#sourceloc"] < "u")
|
|
4374
|
+
return this.parseOpera(c);
|
|
4375
|
+
if (c.stack && c.stack.match(r))
|
|
4376
|
+
return this.parseV8OrIE(c);
|
|
4377
|
+
if (c.stack)
|
|
4378
|
+
return this.parseFFOrSafari(c);
|
|
4379
4379
|
throw new Error("Cannot parse given Error object");
|
|
4380
4380
|
},
|
|
4381
4381
|
// Separate line and column numbers from a string of the form: (URI:Line:Column)
|
|
4382
|
-
extractLocation: function(
|
|
4383
|
-
if (
|
|
4384
|
-
return [
|
|
4385
|
-
var u = /(.+?)(?::(\d+))?(?::(\d+))?$/,
|
|
4386
|
-
return [
|
|
4382
|
+
extractLocation: function(c) {
|
|
4383
|
+
if (c.indexOf(":") === -1)
|
|
4384
|
+
return [c];
|
|
4385
|
+
var u = /(.+?)(?::(\d+))?(?::(\d+))?$/, a = u.exec(c.replace(/[()]/g, ""));
|
|
4386
|
+
return [a[1], a[2] || void 0, a[3] || void 0];
|
|
4387
4387
|
},
|
|
4388
|
-
parseV8OrIE: function(
|
|
4389
|
-
var u =
|
|
4390
|
-
`).filter(function(
|
|
4391
|
-
return !!
|
|
4388
|
+
parseV8OrIE: function(c) {
|
|
4389
|
+
var u = c.stack.split(`
|
|
4390
|
+
`).filter(function(a) {
|
|
4391
|
+
return !!a.match(r);
|
|
4392
4392
|
}, this);
|
|
4393
|
-
return u.map(function(
|
|
4394
|
-
|
|
4395
|
-
var d =
|
|
4393
|
+
return u.map(function(a) {
|
|
4394
|
+
a.indexOf("(eval ") > -1 && (a = a.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(,.*$)/g, ""));
|
|
4395
|
+
var d = a.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, ""), p = d.match(/ (\(.+\)$)/);
|
|
4396
4396
|
d = p ? d.replace(p[0], "") : d;
|
|
4397
4397
|
var b = this.extractLocation(p ? p[1] : d), w = p && d || void 0, y = ["eval", "<anonymous>"].indexOf(b[0]) > -1 ? void 0 : b[0];
|
|
4398
4398
|
return new s({
|
|
@@ -4400,71 +4400,71 @@ function mo() {
|
|
|
4400
4400
|
fileName: y,
|
|
4401
4401
|
lineNumber: b[1],
|
|
4402
4402
|
columnNumber: b[2],
|
|
4403
|
-
source:
|
|
4403
|
+
source: a
|
|
4404
4404
|
});
|
|
4405
4405
|
}, this);
|
|
4406
4406
|
},
|
|
4407
|
-
parseFFOrSafari: function(
|
|
4408
|
-
var u =
|
|
4409
|
-
`).filter(function(
|
|
4410
|
-
return !
|
|
4407
|
+
parseFFOrSafari: function(c) {
|
|
4408
|
+
var u = c.stack.split(`
|
|
4409
|
+
`).filter(function(a) {
|
|
4410
|
+
return !a.match(o);
|
|
4411
4411
|
}, this);
|
|
4412
|
-
return u.map(function(
|
|
4413
|
-
if (
|
|
4412
|
+
return u.map(function(a) {
|
|
4413
|
+
if (a.indexOf(" > eval") > -1 && (a = a.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), a.indexOf("@") === -1 && a.indexOf(":") === -1)
|
|
4414
4414
|
return new s({
|
|
4415
|
-
functionName:
|
|
4415
|
+
functionName: a
|
|
4416
4416
|
});
|
|
4417
|
-
var d = /((.*".+"[^@]*)?[^@]*)(?:@)/, p =
|
|
4417
|
+
var d = /((.*".+"[^@]*)?[^@]*)(?:@)/, p = a.match(d), b = p && p[1] ? p[1] : void 0, w = this.extractLocation(a.replace(d, ""));
|
|
4418
4418
|
return new s({
|
|
4419
4419
|
functionName: b,
|
|
4420
4420
|
fileName: w[0],
|
|
4421
4421
|
lineNumber: w[1],
|
|
4422
4422
|
columnNumber: w[2],
|
|
4423
|
-
source:
|
|
4423
|
+
source: a
|
|
4424
4424
|
});
|
|
4425
4425
|
}, this);
|
|
4426
4426
|
},
|
|
4427
|
-
parseOpera: function(
|
|
4428
|
-
return !
|
|
4429
|
-
`) > -1 &&
|
|
4430
|
-
`).length >
|
|
4431
|
-
`).length ? this.parseOpera9(
|
|
4427
|
+
parseOpera: function(c) {
|
|
4428
|
+
return !c.stacktrace || c.message.indexOf(`
|
|
4429
|
+
`) > -1 && c.message.split(`
|
|
4430
|
+
`).length > c.stacktrace.split(`
|
|
4431
|
+
`).length ? this.parseOpera9(c) : c.stack ? this.parseOpera11(c) : this.parseOpera10(c);
|
|
4432
4432
|
},
|
|
4433
|
-
parseOpera9: function(
|
|
4434
|
-
for (var u = /Line (\d+).*script (?:in )?(\S+)/i,
|
|
4435
|
-
`), d = [], p = 2, b =
|
|
4436
|
-
var w = u.exec(
|
|
4433
|
+
parseOpera9: function(c) {
|
|
4434
|
+
for (var u = /Line (\d+).*script (?:in )?(\S+)/i, a = c.message.split(`
|
|
4435
|
+
`), d = [], p = 2, b = a.length; p < b; p += 2) {
|
|
4436
|
+
var w = u.exec(a[p]);
|
|
4437
4437
|
w && d.push(new s({
|
|
4438
4438
|
fileName: w[2],
|
|
4439
4439
|
lineNumber: w[1],
|
|
4440
|
-
source:
|
|
4440
|
+
source: a[p]
|
|
4441
4441
|
}));
|
|
4442
4442
|
}
|
|
4443
4443
|
return d;
|
|
4444
4444
|
},
|
|
4445
|
-
parseOpera10: function(
|
|
4446
|
-
for (var u = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,
|
|
4447
|
-
`), d = [], p = 0, b =
|
|
4448
|
-
var w = u.exec(
|
|
4445
|
+
parseOpera10: function(c) {
|
|
4446
|
+
for (var u = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, a = c.stacktrace.split(`
|
|
4447
|
+
`), d = [], p = 0, b = a.length; p < b; p += 2) {
|
|
4448
|
+
var w = u.exec(a[p]);
|
|
4449
4449
|
w && d.push(
|
|
4450
4450
|
new s({
|
|
4451
4451
|
functionName: w[3] || void 0,
|
|
4452
4452
|
fileName: w[2],
|
|
4453
4453
|
lineNumber: w[1],
|
|
4454
|
-
source:
|
|
4454
|
+
source: a[p]
|
|
4455
4455
|
})
|
|
4456
4456
|
);
|
|
4457
4457
|
}
|
|
4458
4458
|
return d;
|
|
4459
4459
|
},
|
|
4460
4460
|
// Opera 10.65+ Error.stack very similar to FF/Safari
|
|
4461
|
-
parseOpera11: function(
|
|
4462
|
-
var u =
|
|
4463
|
-
`).filter(function(
|
|
4464
|
-
return !!
|
|
4461
|
+
parseOpera11: function(c) {
|
|
4462
|
+
var u = c.stack.split(`
|
|
4463
|
+
`).filter(function(a) {
|
|
4464
|
+
return !!a.match(i) && !a.match(/^Error created at/);
|
|
4465
4465
|
}, this);
|
|
4466
|
-
return u.map(function(
|
|
4467
|
-
var d =
|
|
4466
|
+
return u.map(function(a) {
|
|
4467
|
+
var d = a.split("@"), p = this.extractLocation(d.pop()), b = d.shift() || "", w = b.replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0, y;
|
|
4468
4468
|
b.match(/\(([^)]*)\)/) && (y = b.replace(/^[^(]+\(([^)]*)\)$/, "$1"));
|
|
4469
4469
|
var E = y === void 0 || y === "[arguments not available]" ? void 0 : y.split(",");
|
|
4470
4470
|
return new s({
|
|
@@ -4473,7 +4473,7 @@ function mo() {
|
|
|
4473
4473
|
fileName: p[0],
|
|
4474
4474
|
lineNumber: p[1],
|
|
4475
4475
|
columnNumber: p[2],
|
|
4476
|
-
source:
|
|
4476
|
+
source: a
|
|
4477
4477
|
});
|
|
4478
4478
|
}, this);
|
|
4479
4479
|
}
|
|
@@ -4529,8 +4529,8 @@ function yo(t, e) {
|
|
|
4529
4529
|
captureExceptions: !0
|
|
4530
4530
|
}, e);
|
|
4531
4531
|
function s(i) {
|
|
4532
|
-
function r(
|
|
4533
|
-
const l = ii(
|
|
4532
|
+
function r(o) {
|
|
4533
|
+
const l = ii(o, i);
|
|
4534
4534
|
l != null && t.send(l);
|
|
4535
4535
|
}
|
|
4536
4536
|
t.attachEventListener(i, "unhandledrejection", r), t.attachEventListener(i, "error", r);
|
|
@@ -4541,42 +4541,42 @@ function ws(t, e = document.location) {
|
|
|
4541
4541
|
return t = t.trim(), t.startsWith("//") || t.startsWith("http://") || t.startsWith("https://") || t.startsWith("data:") ? t : t.startsWith("/") ? e.origin + t : e.origin + e.pathname + t;
|
|
4542
4542
|
}
|
|
4543
4543
|
function wo(t) {
|
|
4544
|
-
return
|
|
4544
|
+
return Fi && (t.startsWith("data:image/svg+xml") || t.match(/.svg$|/i));
|
|
4545
4545
|
}
|
|
4546
4546
|
const So = "https://static.openreplay.com/tracker/placeholder.jpeg";
|
|
4547
4547
|
function xo(t) {
|
|
4548
|
-
function e(l,
|
|
4548
|
+
function e(l, c) {
|
|
4549
4549
|
t.attributeSender.sendSetAttribute(l, "src", So);
|
|
4550
|
-
const { width: u, height:
|
|
4551
|
-
|
|
4550
|
+
const { width: u, height: a } = c.getBoundingClientRect();
|
|
4551
|
+
c.hasAttribute("width") || t.attributeSender.sendSetAttribute(l, "width", String(u)), c.hasAttribute("height") || t.attributeSender.sendSetAttribute(l, "height", String(a));
|
|
4552
4552
|
}
|
|
4553
|
-
const n = function(l,
|
|
4554
|
-
const { srcset: u } =
|
|
4553
|
+
const n = function(l, c) {
|
|
4554
|
+
const { srcset: u } = c;
|
|
4555
4555
|
if (!u)
|
|
4556
4556
|
return;
|
|
4557
|
-
const
|
|
4558
|
-
t.attributeSender.sendSetAttribute(l, "srcset",
|
|
4559
|
-
}, s = function(l,
|
|
4560
|
-
|
|
4557
|
+
const a = u.split(u.match(/,\s+/) ? /,\s+/ : ",").map((d) => ws(d)).join(", ");
|
|
4558
|
+
t.attributeSender.sendSetAttribute(l, "srcset", a);
|
|
4559
|
+
}, s = function(l, c) {
|
|
4560
|
+
c.src.length > Pi && e(l, c), t.send(hn(l, "src", c.src, t.getBaseHref()));
|
|
4561
4561
|
}, i = t.safe(function(l) {
|
|
4562
|
-
const
|
|
4563
|
-
Vs(
|
|
4562
|
+
const c = ws(l.src || "");
|
|
4563
|
+
Vs(c) && t.send(Qs(t.timestamp(), 0, 0, 0, 0, 0, c, "img", 0, !1));
|
|
4564
4564
|
}), r = t.safe(function(l) {
|
|
4565
|
-
const
|
|
4566
|
-
|
|
4567
|
-
}),
|
|
4568
|
-
for (const
|
|
4569
|
-
if (
|
|
4570
|
-
const u =
|
|
4571
|
-
if (
|
|
4565
|
+
const c = t.nodes.getID(l);
|
|
4566
|
+
c !== void 0 && l.complete && (l.naturalHeight === 0 && l.naturalWidth === 0 && !wo(l.src) ? i(l) : t.sanitizer.isHidden(c) || t.sanitizer.isObscured(c) ? e(c, l) : (s(c, l), n(c, l)));
|
|
4567
|
+
}), o = Gs(t.safe((l) => {
|
|
4568
|
+
for (const c of l)
|
|
4569
|
+
if (c.type === "attributes") {
|
|
4570
|
+
const u = c.target, a = t.nodes.getID(u);
|
|
4571
|
+
if (a === void 0)
|
|
4572
4572
|
return;
|
|
4573
|
-
|
|
4573
|
+
c.attributeName === "src" && s(a, u), c.attributeName === "srcset" && n(a, u);
|
|
4574
4574
|
}
|
|
4575
4575
|
}));
|
|
4576
4576
|
t.attachStopCallback(() => {
|
|
4577
|
-
|
|
4577
|
+
o.disconnect();
|
|
4578
4578
|
}), t.nodes.attachNodeCallback((l) => {
|
|
4579
|
-
Q(l, "img") && (t.nodes.attachNodeListener(l, "error", () => i(l)), t.nodes.attachNodeListener(l, "load", () => r(l)), r(l),
|
|
4579
|
+
Q(l, "img") && (t.nodes.attachNodeListener(l, "error", () => i(l)), t.nodes.attachNodeListener(l, "load", () => r(l)), r(l), o.observe(l, { attributes: !0, attributeFilter: ["src", "srcset"] }));
|
|
4580
4580
|
});
|
|
4581
4581
|
}
|
|
4582
4582
|
const ko = [
|
|
@@ -4639,9 +4639,9 @@ function Co(t, e) {
|
|
|
4639
4639
|
defaultInputMode: je.Obscured,
|
|
4640
4640
|
obscureInputDates: !1
|
|
4641
4641
|
}, e);
|
|
4642
|
-
function s(
|
|
4642
|
+
function s(a, d) {
|
|
4643
4643
|
let p = d.value, b = n.defaultInputMode;
|
|
4644
|
-
d.type === "password" || t.sanitizer.isHidden(
|
|
4644
|
+
d.type === "password" || t.sanitizer.isHidden(a) ? b = je.Hidden : (t.sanitizer.isObscured(a) || b === je.Plain && (n.obscureInputNumbers && d.type !== "date" && /\d\d\d\d/.test(p) || n.obscureInputDates && d.type === "date" || n.obscureInputEmails && (d.type === "email" || ~p.indexOf("@")))) && (b = je.Obscured);
|
|
4645
4645
|
let w = 0;
|
|
4646
4646
|
switch (b) {
|
|
4647
4647
|
case je.Hidden:
|
|
@@ -4653,55 +4653,55 @@ function Co(t, e) {
|
|
|
4653
4653
|
}
|
|
4654
4654
|
return { value: p, mask: w };
|
|
4655
4655
|
}
|
|
4656
|
-
function i(
|
|
4657
|
-
const { value: p, mask: b } = s(
|
|
4658
|
-
t.send(Zi(
|
|
4656
|
+
function i(a, d) {
|
|
4657
|
+
const { value: p, mask: b } = s(a, d);
|
|
4658
|
+
t.send(Zi(a, p, b));
|
|
4659
4659
|
}
|
|
4660
|
-
const r = /* @__PURE__ */ new Map(),
|
|
4660
|
+
const r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
4661
4661
|
t.attachStopCallback(() => {
|
|
4662
|
-
r.clear(),
|
|
4662
|
+
r.clear(), o.clear();
|
|
4663
4663
|
});
|
|
4664
|
-
function l(
|
|
4665
|
-
r.get(
|
|
4664
|
+
function l(a, d) {
|
|
4665
|
+
r.get(a) !== d.value && (r.set(a, d.value), i(a, d));
|
|
4666
4666
|
}
|
|
4667
|
-
function
|
|
4668
|
-
|
|
4667
|
+
function c(a, d) {
|
|
4668
|
+
o.get(a) !== d && (o.set(a, d), t.send(er(a, d)));
|
|
4669
4669
|
}
|
|
4670
4670
|
t.ticker.attach(() => {
|
|
4671
|
-
r.forEach((
|
|
4671
|
+
r.forEach((a, d) => {
|
|
4672
4672
|
const p = t.nodes.getNode(d);
|
|
4673
4673
|
if (!p)
|
|
4674
4674
|
return r.delete(d);
|
|
4675
4675
|
l(d, p);
|
|
4676
|
-
}),
|
|
4676
|
+
}), o.forEach((a, d) => {
|
|
4677
4677
|
const p = t.nodes.getNode(d);
|
|
4678
4678
|
if (!p)
|
|
4679
|
-
return
|
|
4680
|
-
|
|
4679
|
+
return o.delete(d);
|
|
4680
|
+
c(d, p.checked);
|
|
4681
4681
|
});
|
|
4682
4682
|
}, 3);
|
|
4683
|
-
function u(
|
|
4684
|
-
const { value: w, mask: y } = s(
|
|
4685
|
-
t.send(vr(
|
|
4683
|
+
function u(a, d, p, b) {
|
|
4684
|
+
const { value: w, mask: y } = s(a, d), E = ri(d);
|
|
4685
|
+
t.send(vr(a, w, y !== 0, E, p, b));
|
|
4686
4686
|
}
|
|
4687
|
-
t.nodes.attachNodeCallback(t.safe((
|
|
4688
|
-
const d = t.nodes.getID(
|
|
4687
|
+
t.nodes.attachNodeCallback(t.safe((a) => {
|
|
4688
|
+
const d = t.nodes.getID(a);
|
|
4689
4689
|
if (d !== void 0) {
|
|
4690
|
-
if (Q(
|
|
4691
|
-
l(d,
|
|
4690
|
+
if (Q(a, "select") && (i(d, a), t.nodes.attachNodeListener(a, "change", () => i(d, a))), To(a)) {
|
|
4691
|
+
l(d, a);
|
|
4692
4692
|
let p = 0, b = 0, w = 0;
|
|
4693
4693
|
const y = () => {
|
|
4694
4694
|
p = pe();
|
|
4695
4695
|
}, E = () => {
|
|
4696
4696
|
b === 0 && p !== 0 && (b = pe() - p);
|
|
4697
|
-
},
|
|
4698
|
-
p !== 0 && (w = pe() - p), u(d,
|
|
4697
|
+
}, O = () => {
|
|
4698
|
+
p !== 0 && (w = pe() - p), u(d, a, b, w), b = 0, w = 0, p = 0;
|
|
4699
4699
|
};
|
|
4700
|
-
t.nodes.attachNodeListener(
|
|
4700
|
+
t.nodes.attachNodeListener(a, "focus", y), t.nodes.attachNodeListener(a, "input", E), t.nodes.attachNodeListener(a, "change", O);
|
|
4701
4701
|
return;
|
|
4702
4702
|
}
|
|
4703
|
-
if (Eo(
|
|
4704
|
-
|
|
4703
|
+
if (Eo(a)) {
|
|
4704
|
+
c(d, a.checked), t.nodes.attachNodeListener(a, "change", () => c(d, a.checked));
|
|
4705
4705
|
return;
|
|
4706
4706
|
}
|
|
4707
4707
|
}
|
|
@@ -4737,27 +4737,27 @@ function No(t, e) {
|
|
|
4737
4737
|
return t.nodeType === Node.DOCUMENT_NODE ? t : t === e.root ? t.ownerDocument : t;
|
|
4738
4738
|
}
|
|
4739
4739
|
function it(t, e, n) {
|
|
4740
|
-
let s = null, i = [], r = t,
|
|
4740
|
+
let s = null, i = [], r = t, o = 0;
|
|
4741
4741
|
for (; r; ) {
|
|
4742
4742
|
const l = (/* @__PURE__ */ new Date()).getTime() - oi.getTime();
|
|
4743
4743
|
if (he.timeoutMs !== void 0 && l > he.timeoutMs)
|
|
4744
4744
|
throw new Error(`Timeout: Can't find a unique selector after ${l}ms`);
|
|
4745
|
-
let
|
|
4745
|
+
let c = ot(Oo(r)) || ot(...Ro(r)) || ot(...Do(r)) || ot(Ao(r)) || [ks()];
|
|
4746
4746
|
const u = Mo(r);
|
|
4747
4747
|
if (e == "all")
|
|
4748
|
-
u && (
|
|
4748
|
+
u && (c = c.concat(c.filter(sn).map((a) => rt(a, u))));
|
|
4749
4749
|
else if (e == "two")
|
|
4750
|
-
|
|
4750
|
+
c = c.slice(0, 1), u && (c = c.concat(c.filter(sn).map((a) => rt(a, u))));
|
|
4751
4751
|
else if (e == "one") {
|
|
4752
|
-
const [
|
|
4753
|
-
u && sn(
|
|
4752
|
+
const [a] = c = c.slice(0, 1);
|
|
4753
|
+
u && sn(a) && (c = [rt(a, u)]);
|
|
4754
4754
|
} else
|
|
4755
|
-
e == "none" && (
|
|
4756
|
-
for (let
|
|
4757
|
-
|
|
4758
|
-
if (i.push(
|
|
4755
|
+
e == "none" && (c = [ks()], u && (c = [rt(c[0], u)]));
|
|
4756
|
+
for (let a of c)
|
|
4757
|
+
a.level = o;
|
|
4758
|
+
if (i.push(c), i.length >= he.seedMinLength && (s = Ss(i, n), s))
|
|
4759
4759
|
break;
|
|
4760
|
-
r = r.parentElement,
|
|
4760
|
+
r = r.parentElement, o++;
|
|
4761
4761
|
}
|
|
4762
4762
|
return s || (s = Ss(i, n)), !s && n ? n() : s;
|
|
4763
4763
|
}
|
|
@@ -4846,10 +4846,10 @@ function sn(t) {
|
|
|
4846
4846
|
return t.name !== "html" && !t.name.startsWith("#");
|
|
4847
4847
|
}
|
|
4848
4848
|
function ot(...t) {
|
|
4849
|
-
const e = t.filter(
|
|
4849
|
+
const e = t.filter(Lo);
|
|
4850
4850
|
return e.length > 0 ? e : null;
|
|
4851
4851
|
}
|
|
4852
|
-
function
|
|
4852
|
+
function Lo(t) {
|
|
4853
4853
|
return t != null;
|
|
4854
4854
|
}
|
|
4855
4855
|
function* ci(t, e = []) {
|
|
@@ -4876,10 +4876,10 @@ function* ui(t, e, n = {
|
|
|
4876
4876
|
const r = It(i);
|
|
4877
4877
|
if (n.visited.has(r))
|
|
4878
4878
|
return;
|
|
4879
|
-
ai(i) &&
|
|
4879
|
+
ai(i) && Fo(i, e) && (yield i, n.visited.set(r, !0), yield* ui(i, e, n));
|
|
4880
4880
|
}
|
|
4881
4881
|
}
|
|
4882
|
-
function
|
|
4882
|
+
function Fo(t, e) {
|
|
4883
4883
|
return Dn.querySelector(It(t)) === e;
|
|
4884
4884
|
}
|
|
4885
4885
|
function Po(t, e, n) {
|
|
@@ -4923,63 +4923,63 @@ function Bo(t, e) {
|
|
|
4923
4923
|
function jo(t, e) {
|
|
4924
4924
|
const { disableClickmaps: n = !1 } = e || {};
|
|
4925
4925
|
function s(k) {
|
|
4926
|
-
const
|
|
4927
|
-
if (
|
|
4928
|
-
return
|
|
4926
|
+
const _ = Nn(k);
|
|
4927
|
+
if (_ !== null)
|
|
4928
|
+
return _;
|
|
4929
4929
|
if (Q(k, "input"))
|
|
4930
4930
|
return ri(k);
|
|
4931
4931
|
if (xn(k)) {
|
|
4932
|
-
let
|
|
4933
|
-
return k instanceof HTMLElement && (
|
|
4932
|
+
let R = "";
|
|
4933
|
+
return k instanceof HTMLElement && (R = t.sanitizer.getInnerTextSecure(k)), R = R || k.id || k.className, Ws(R).slice(0, 100);
|
|
4934
4934
|
}
|
|
4935
4935
|
return "";
|
|
4936
4936
|
}
|
|
4937
|
-
let i = -1, r = -1,
|
|
4937
|
+
let i = -1, r = -1, o = !1, l = null, c = 0, u = {}, a = 0, d = 0, p = 0, b = 0, w;
|
|
4938
4938
|
const y = 8e-3, E = 225;
|
|
4939
|
-
function
|
|
4939
|
+
function O() {
|
|
4940
4940
|
const k = b / E;
|
|
4941
|
-
if (!
|
|
4942
|
-
|
|
4941
|
+
if (!a) {
|
|
4942
|
+
a = k;
|
|
4943
4943
|
return;
|
|
4944
4944
|
}
|
|
4945
|
-
const
|
|
4946
|
-
p > 4 &&
|
|
4945
|
+
const _ = (k - a) / E;
|
|
4946
|
+
p > 4 && _ > y && t.send(br(pe())), b = 0, p = 0, a = k;
|
|
4947
4947
|
}
|
|
4948
4948
|
t.attachStartCallback(() => {
|
|
4949
|
-
w = setInterval(() =>
|
|
4949
|
+
w = setInterval(() => O(), E);
|
|
4950
4950
|
}), t.attachStopCallback(() => {
|
|
4951
|
-
i = -1, r = -1,
|
|
4951
|
+
i = -1, r = -1, o = !1, l = null, u = {}, w && clearInterval(w);
|
|
4952
4952
|
});
|
|
4953
|
-
const
|
|
4954
|
-
|
|
4955
|
-
}, A = (k,
|
|
4956
|
-
function
|
|
4953
|
+
const B = () => {
|
|
4954
|
+
o && (t.send(tr(i, r)), o = !1);
|
|
4955
|
+
}, A = (k, _ = !1) => {
|
|
4956
|
+
function R(I, T, F) {
|
|
4957
4957
|
return u[I] = u[I] || Po(T, k, F);
|
|
4958
4958
|
}
|
|
4959
|
-
const M =
|
|
4959
|
+
const M = _ ? t.attachEventListener.bind(t) : t.nodes.attachNodeListener.bind(t.nodes);
|
|
4960
4960
|
M(k.documentElement, "mouseover", (I) => {
|
|
4961
4961
|
const T = Ts(I.target, k);
|
|
4962
|
-
T !== l && (l = T,
|
|
4962
|
+
T !== l && (l = T, c = performance.now());
|
|
4963
4963
|
}), M(k, "mousemove", (I) => {
|
|
4964
4964
|
const [T, F] = t.observer.getDocumentOffset(k);
|
|
4965
|
-
i = I.clientX + T, r = I.clientY + F,
|
|
4966
|
-
const
|
|
4967
|
-
b += Math.abs(I.movementX) + Math.abs(I.movementY),
|
|
4965
|
+
i = I.clientX + T, r = I.clientY + F, o = !0;
|
|
4966
|
+
const U = Math.sign(I.movementX);
|
|
4967
|
+
b += Math.abs(I.movementX) + Math.abs(I.movementY), U !== d && (d = U, p++);
|
|
4968
4968
|
}, !1), M(k, "click", (I) => {
|
|
4969
4969
|
const T = Ts(I.target, k);
|
|
4970
4970
|
if (!I.clientX && !I.clientY || T === null)
|
|
4971
4971
|
return;
|
|
4972
4972
|
const F = t.nodes.getID(T);
|
|
4973
4973
|
if (F !== void 0) {
|
|
4974
|
-
const
|
|
4975
|
-
|
|
4974
|
+
const U = I.pageX, j = I.pageY, z = k.documentElement.scrollWidth, C = k.documentElement.scrollHeight, L = Es(U / z), V = Es(j / C);
|
|
4975
|
+
B(), t.send(pr(F, l === T ? Math.round(performance.now() - c) : 0, s(T), xn(T) && !n ? R(F, T, e) : "", L, V), !0);
|
|
4976
4976
|
}
|
|
4977
4977
|
l = null;
|
|
4978
4978
|
});
|
|
4979
4979
|
};
|
|
4980
4980
|
t.nodes.attachNodeCallback((k) => {
|
|
4981
4981
|
bt(k) && A(k);
|
|
4982
|
-
}), A(document, !0), t.ticker.attach(
|
|
4982
|
+
}), A(document, !0), t.ticker.attach(B, (e == null ? void 0 : e.trackingOffset) || 7);
|
|
4983
4983
|
}
|
|
4984
4984
|
function Es(t) {
|
|
4985
4985
|
return Math.round(t * 1e4);
|
|
@@ -4988,23 +4988,23 @@ function zo(t) {
|
|
|
4988
4988
|
const e = [], n = document.getElementsByTagName("*"), s = /url\(("[^"]*"|'[^']*'|[^)]*)\)/i;
|
|
4989
4989
|
for (let i = 0; i < n.length; i++) {
|
|
4990
4990
|
const r = n[i];
|
|
4991
|
-
let
|
|
4992
|
-
if (Q(r, "img") && (
|
|
4991
|
+
let o = "";
|
|
4992
|
+
if (Q(r, "img") && (o = r.currentSrc || r.src), !o) {
|
|
4993
4993
|
const w = getComputedStyle(r).getPropertyValue("background-image");
|
|
4994
4994
|
if (w) {
|
|
4995
4995
|
const y = s.exec(w);
|
|
4996
|
-
y !== null && (
|
|
4996
|
+
y !== null && (o = y[1], (o.startsWith('"') || o.startsWith("'")) && (o = o.substr(1, o.length - 2)));
|
|
4997
4997
|
}
|
|
4998
4998
|
}
|
|
4999
|
-
if (!
|
|
4999
|
+
if (!o)
|
|
5000
5000
|
continue;
|
|
5001
|
-
const l =
|
|
5001
|
+
const l = o.substr(0, 10) === "data:image" ? 0 : t[o];
|
|
5002
5002
|
if (l === void 0)
|
|
5003
5003
|
continue;
|
|
5004
|
-
const
|
|
5005
|
-
if (d <= u || p <=
|
|
5004
|
+
const c = r.getBoundingClientRect(), u = Math.max(c.top, 0), a = Math.max(c.left, 0), d = Math.min(c.bottom, window.innerHeight || document.documentElement && document.documentElement.clientHeight || 0), p = Math.min(c.right, window.innerWidth || document.documentElement && document.documentElement.clientWidth || 0);
|
|
5005
|
+
if (d <= u || p <= a)
|
|
5006
5006
|
continue;
|
|
5007
|
-
const b = (d - u) * (p -
|
|
5007
|
+
const b = (d - u) * (p - a);
|
|
5008
5008
|
e.push({ time: l, area: b });
|
|
5009
5009
|
}
|
|
5010
5010
|
return e;
|
|
@@ -5012,8 +5012,8 @@ function zo(t) {
|
|
|
5012
5012
|
function Uo(t, e) {
|
|
5013
5013
|
let n = Math.max(document.documentElement && document.documentElement.clientWidth || 0, window.innerWidth || 0) * Math.max(document.documentElement && document.documentElement.clientHeight || 0, window.innerHeight || 0) / 10, s = n * t;
|
|
5014
5014
|
for (let i = 0; i < e.length; i++) {
|
|
5015
|
-
const { time: r, area:
|
|
5016
|
-
n +=
|
|
5015
|
+
const { time: r, area: o } = e[i];
|
|
5016
|
+
n += o, s += o * (r > t ? r : t);
|
|
5017
5017
|
}
|
|
5018
5018
|
return n === 0 ? 0 : s / n;
|
|
5019
5019
|
}
|
|
@@ -5032,13 +5032,13 @@ function Ho(t, e) {
|
|
|
5032
5032
|
if (u.duration < 0 || !Vs(u.name) || t.isServiceURL(u.name))
|
|
5033
5033
|
return;
|
|
5034
5034
|
s !== null && (s[u.name] = u.startTime + u.duration);
|
|
5035
|
-
let
|
|
5035
|
+
let a = !1;
|
|
5036
5036
|
(d = n.excludedResourceUrls) == null || d.forEach((p) => {
|
|
5037
5037
|
if (u.name.startsWith(p)) {
|
|
5038
|
-
|
|
5038
|
+
a = !0;
|
|
5039
5039
|
return;
|
|
5040
5040
|
}
|
|
5041
|
-
}), !
|
|
5041
|
+
}), !a && t.send(Qs(
|
|
5042
5042
|
u.startTime + Ve(),
|
|
5043
5043
|
u.duration,
|
|
5044
5044
|
u.responseStart && u.startTime ? u.responseStart - u.startTime : 0,
|
|
@@ -5053,24 +5053,24 @@ function Ho(t, e) {
|
|
|
5053
5053
|
));
|
|
5054
5054
|
}
|
|
5055
5055
|
const r = new PerformanceObserver((u) => u.getEntries().forEach(i));
|
|
5056
|
-
let
|
|
5056
|
+
let o;
|
|
5057
5057
|
t.attachStartCallback(function({ sessionID: u }) {
|
|
5058
|
-
u !==
|
|
5058
|
+
u !== o && (performance.getEntriesByType("resource").forEach(i), o = u), r.observe({ entryTypes: ["resource"] });
|
|
5059
5059
|
}), t.attachStopCallback(function() {
|
|
5060
5060
|
r.disconnect();
|
|
5061
5061
|
});
|
|
5062
|
-
let l = 0,
|
|
5062
|
+
let l = 0, c = 0;
|
|
5063
5063
|
if (n.capturePageLoadTimings) {
|
|
5064
5064
|
let u = !1;
|
|
5065
5065
|
t.ticker.attach(() => {
|
|
5066
|
-
if (!u && ((l === 0 ||
|
|
5067
|
-
const { name: d, startTime: p } =
|
|
5066
|
+
if (!u && ((l === 0 || c === 0) && performance.getEntriesByType("paint").forEach((a) => {
|
|
5067
|
+
const { name: d, startTime: p } = a;
|
|
5068
5068
|
switch (d) {
|
|
5069
5069
|
case "first-paint":
|
|
5070
5070
|
l = p;
|
|
5071
5071
|
break;
|
|
5072
5072
|
case "first-contentful-paint":
|
|
5073
|
-
|
|
5073
|
+
c = p;
|
|
5074
5074
|
break;
|
|
5075
5075
|
}
|
|
5076
5076
|
}), performance.timing.loadEventEnd || performance.now() > 3e4)) {
|
|
@@ -5079,29 +5079,29 @@ function Ho(t, e) {
|
|
|
5079
5079
|
// should be ok to use here, (https://github.com/mdn/content/issues/4713)
|
|
5080
5080
|
// since it is compared with the values obtained on the page load (before any possible sleep state)
|
|
5081
5081
|
// deprecated though
|
|
5082
|
-
navigationStart:
|
|
5082
|
+
navigationStart: a,
|
|
5083
5083
|
requestStart: d,
|
|
5084
5084
|
responseStart: p,
|
|
5085
5085
|
responseEnd: b,
|
|
5086
5086
|
domContentLoadedEventStart: w,
|
|
5087
5087
|
domContentLoadedEventEnd: y,
|
|
5088
5088
|
loadEventStart: E,
|
|
5089
|
-
loadEventEnd:
|
|
5089
|
+
loadEventEnd: O
|
|
5090
5090
|
} = performance.timing;
|
|
5091
|
-
t.send(sr(d -
|
|
5091
|
+
t.send(sr(d - a || 0, p - a || 0, b - a || 0, w - a || 0, y - a || 0, E - a || 0, O - a || 0, l, c));
|
|
5092
5092
|
}
|
|
5093
5093
|
}, 30);
|
|
5094
5094
|
}
|
|
5095
5095
|
if (n.capturePageRenderTimings) {
|
|
5096
|
-
let u = 0,
|
|
5096
|
+
let u = 0, a = 0, d = 0, p = null, b = !1;
|
|
5097
5097
|
t.ticker.attach(() => {
|
|
5098
5098
|
if (b)
|
|
5099
5099
|
return;
|
|
5100
5100
|
const w = performance.now();
|
|
5101
|
-
if (s !== null && (u = Math.max.apply(null, Object.keys(s).map((y) => s[y])), w - u > 1e3 && (p = zo(s), s = null)), d !== null && (w - d > 50 && (
|
|
5101
|
+
if (s !== null && (u = Math.max.apply(null, Object.keys(s).map((y) => s[y])), w - u > 1e3 && (p = zo(s), s = null)), d !== null && (w - d > 50 && (a = w), d = w - a > 5e3 ? null : w), p !== null && d === null || w > 3e4) {
|
|
5102
5102
|
b = !0, s = null;
|
|
5103
|
-
const y = p === null ? 0 : Uo(
|
|
5104
|
-
t.send(ir(y,
|
|
5103
|
+
const y = p === null ? 0 : Uo(c || l, p), { domContentLoadedEventEnd: E, navigationStart: O } = performance.timing, B = d === null ? Math.max(a, c, E - O || 0) : 0;
|
|
5104
|
+
t.send(ir(y, c > u ? c : u, B));
|
|
5105
5105
|
}
|
|
5106
5106
|
});
|
|
5107
5107
|
}
|
|
@@ -5121,39 +5121,39 @@ function $o(t, e) {
|
|
|
5121
5121
|
}
|
|
5122
5122
|
const r = t.safe(() => {
|
|
5123
5123
|
e || t.send(Wi(...rn(document)));
|
|
5124
|
-
}),
|
|
5125
|
-
const u = t.nodes.getID(
|
|
5124
|
+
}), o = t.safe((l, c) => {
|
|
5125
|
+
const u = t.nodes.getID(c);
|
|
5126
5126
|
u !== void 0 && t.send(Qi(u, l[0], l[1]));
|
|
5127
5127
|
});
|
|
5128
5128
|
t.attachStartCallback(r), t.attachStopCallback(() => {
|
|
5129
5129
|
n = !1, s.clear();
|
|
5130
|
-
}), t.nodes.attachNodeCallback((l,
|
|
5131
|
-
|
|
5130
|
+
}), t.nodes.attachNodeCallback((l, c) => {
|
|
5131
|
+
c && (ke(l) && l.scrollLeft + l.scrollTop > 0 ? s.set(l, [l.scrollLeft, l.scrollTop]) : bt(l) && s.set(l, rn(l))), Et(l) && t.nodes.attachNodeListener(l, "scroll", (u) => {
|
|
5132
5132
|
i(u.target);
|
|
5133
5133
|
});
|
|
5134
5134
|
}), t.attachEventListener(document, "scroll", (l) => {
|
|
5135
|
-
const
|
|
5136
|
-
if (
|
|
5135
|
+
const c = l.target;
|
|
5136
|
+
if (c === document) {
|
|
5137
5137
|
n = !0;
|
|
5138
5138
|
return;
|
|
5139
5139
|
}
|
|
5140
|
-
i(
|
|
5140
|
+
i(c);
|
|
5141
5141
|
}), t.ticker.attach(() => {
|
|
5142
|
-
n && (r(), n = !1), s.forEach(
|
|
5142
|
+
n && (r(), n = !1), s.forEach(o), s.clear();
|
|
5143
5143
|
}, 5, !1);
|
|
5144
5144
|
}
|
|
5145
5145
|
function qo(t) {
|
|
5146
5146
|
let e, n, s, i, r = document.referrer;
|
|
5147
|
-
const
|
|
5147
|
+
const o = t.safe(() => {
|
|
5148
5148
|
const { URL: u } = document;
|
|
5149
5149
|
u !== e && (e = u, t.send(xr(e, r, i, document.title)), i = 0, r = e);
|
|
5150
5150
|
}), l = t.safe(() => {
|
|
5151
|
-
const { innerWidth: u, innerHeight:
|
|
5152
|
-
(u !== n ||
|
|
5153
|
-
}),
|
|
5151
|
+
const { innerWidth: u, innerHeight: a } = window;
|
|
5152
|
+
(u !== n || a !== s) && (n = u, s = a, t.send(qi(n, s)));
|
|
5153
|
+
}), c = document.hidden === void 0 ? Function.prototype : t.safe(() => t.send(ur(document.hidden)));
|
|
5154
5154
|
t.attachStartCallback(() => {
|
|
5155
|
-
e = null, i = Ve(), n = s = -1,
|
|
5156
|
-
}), document.hidden !== void 0 && t.attachEventListener(document, "visibilitychange",
|
|
5155
|
+
e = null, i = Ve(), n = s = -1, o(), l(), c();
|
|
5156
|
+
}), document.hidden !== void 0 && t.attachEventListener(document, "visibilitychange", c, !1, !1), t.ticker.attach(o, 1, !1), t.ticker.attach(l, 5, !1);
|
|
5157
5157
|
}
|
|
5158
5158
|
function Is(t) {
|
|
5159
5159
|
return Et(t) && // @ts-ignore
|
|
@@ -5167,60 +5167,60 @@ const at = /* @__PURE__ */ new Map();
|
|
|
5167
5167
|
function Vo(t) {
|
|
5168
5168
|
if (t === null || !Is(document))
|
|
5169
5169
|
return;
|
|
5170
|
-
const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), s = (
|
|
5171
|
-
let l = t.nodes.getID(
|
|
5172
|
-
if (
|
|
5170
|
+
const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), s = (o) => setTimeout(() => {
|
|
5171
|
+
let l = t.nodes.getID(o);
|
|
5172
|
+
if (o === document && (l = 0), l === void 0)
|
|
5173
5173
|
return;
|
|
5174
|
-
let
|
|
5175
|
-
|
|
5176
|
-
const u = [],
|
|
5177
|
-
if (
|
|
5178
|
-
for (const d of
|
|
5174
|
+
let c = n.get(l);
|
|
5175
|
+
c || (c = []);
|
|
5176
|
+
const u = [], a = o.adoptedStyleSheets;
|
|
5177
|
+
if (a && Symbol.iterator in a)
|
|
5178
|
+
for (const d of a) {
|
|
5179
5179
|
let p = e.get(d);
|
|
5180
5180
|
const b = !p;
|
|
5181
|
-
if (p || (p = hi(), e.set(d, p)),
|
|
5181
|
+
if (p || (p = hi(), e.set(d, p)), c.includes(p) || t.send(Ys(p, l)), b) {
|
|
5182
5182
|
const w = d.cssRules;
|
|
5183
5183
|
for (let y = 0; y < w.length; y++)
|
|
5184
5184
|
t.send(fn(p, w[y].cssText, y, t.getBaseHref()));
|
|
5185
5185
|
}
|
|
5186
5186
|
u.push(p);
|
|
5187
5187
|
}
|
|
5188
|
-
if (Symbol.iterator in
|
|
5189
|
-
for (const d of
|
|
5188
|
+
if (Symbol.iterator in c)
|
|
5189
|
+
for (const d of c)
|
|
5190
5190
|
u.includes(d) || t.send(gr(d, l));
|
|
5191
5191
|
n.set(l, u);
|
|
5192
5192
|
}, 20);
|
|
5193
|
-
function i(
|
|
5194
|
-
const l = Object.getOwnPropertyDescriptor(
|
|
5195
|
-
l && Object.defineProperty(
|
|
5193
|
+
function i(o) {
|
|
5194
|
+
const l = Object.getOwnPropertyDescriptor(o, "adoptedStyleSheets");
|
|
5195
|
+
l && Object.defineProperty(o, "adoptedStyleSheets", {
|
|
5196
5196
|
...l,
|
|
5197
|
-
set: function(
|
|
5198
|
-
const u = l.set.call(this,
|
|
5197
|
+
set: function(c) {
|
|
5198
|
+
const u = l.set.call(this, c);
|
|
5199
5199
|
return s(this), u;
|
|
5200
5200
|
}
|
|
5201
5201
|
});
|
|
5202
5202
|
}
|
|
5203
|
-
const r = (
|
|
5204
|
-
if (
|
|
5203
|
+
const r = (o) => {
|
|
5204
|
+
if (o.__openreplay_adpss_patched__)
|
|
5205
5205
|
return;
|
|
5206
|
-
|
|
5207
|
-
const { replace: l, replaceSync:
|
|
5208
|
-
|
|
5209
|
-
return l.call(this, u).then((
|
|
5206
|
+
o.__openreplay_adpss_patched__ = !0, i(o.Document.prototype), i(o.ShadowRoot.prototype);
|
|
5207
|
+
const { replace: l, replaceSync: c } = o.CSSStyleSheet.prototype;
|
|
5208
|
+
o.CSSStyleSheet.prototype.replace = function(u) {
|
|
5209
|
+
return l.call(this, u).then((a) => {
|
|
5210
5210
|
const d = e.get(this);
|
|
5211
|
-
return d && t.send(ts(d, u, t.getBaseHref())),
|
|
5211
|
+
return d && t.send(ts(d, u, t.getBaseHref())), a;
|
|
5212
5212
|
});
|
|
5213
|
-
},
|
|
5214
|
-
const
|
|
5215
|
-
return
|
|
5213
|
+
}, o.CSSStyleSheet.prototype.replaceSync = function(u) {
|
|
5214
|
+
const a = e.get(this);
|
|
5215
|
+
return a && t.send(ts(a, u, t.getBaseHref())), c.call(this, u);
|
|
5216
5216
|
};
|
|
5217
5217
|
};
|
|
5218
5218
|
r(window), t.observer.attachContextCallback(t.safe(r)), t.attachStopCallback(() => {
|
|
5219
5219
|
e.clear(), n.clear();
|
|
5220
5220
|
}), t.attachStartCallback(() => {
|
|
5221
5221
|
s(document);
|
|
5222
|
-
}), t.nodes.attachNodeCallback((
|
|
5223
|
-
Is(
|
|
5222
|
+
}), t.nodes.attachNodeCallback((o) => {
|
|
5223
|
+
Is(o) && s(o);
|
|
5224
5224
|
});
|
|
5225
5225
|
}
|
|
5226
5226
|
function Go(t) {
|
|
@@ -5230,37 +5230,37 @@ function Go(t) {
|
|
|
5230
5230
|
t.send(dr("no_stylesheet_prototype_in_window", ""));
|
|
5231
5231
|
return;
|
|
5232
5232
|
}
|
|
5233
|
-
const e = t.safe((i, r,
|
|
5233
|
+
const e = t.safe((i, r, o) => {
|
|
5234
5234
|
const l = at.get(i);
|
|
5235
|
-
l && (typeof
|
|
5235
|
+
l && (typeof o == "string" ? t.send(fn(l, o, r, t.getBaseHref())) : t.send(ns(l, r)));
|
|
5236
5236
|
}), n = t.safe((i) => {
|
|
5237
5237
|
let r = i;
|
|
5238
5238
|
for (; r.parentRule; )
|
|
5239
5239
|
r = r.parentRule;
|
|
5240
|
-
const
|
|
5241
|
-
if (!
|
|
5240
|
+
const o = r.parentStyleSheet;
|
|
5241
|
+
if (!o) {
|
|
5242
5242
|
t.debug.warn("No parent StyleSheet found for", r, i);
|
|
5243
5243
|
return;
|
|
5244
5244
|
}
|
|
5245
|
-
const l = at.get(
|
|
5245
|
+
const l = at.get(o);
|
|
5246
5246
|
if (!l) {
|
|
5247
|
-
t.debug.warn("No sheedID found for",
|
|
5247
|
+
t.debug.warn("No sheedID found for", o, at);
|
|
5248
5248
|
return;
|
|
5249
5249
|
}
|
|
5250
|
-
const
|
|
5251
|
-
|
|
5250
|
+
const c = r.cssText, u = o.cssRules, a = Array.from(u).indexOf(r);
|
|
5251
|
+
a >= 0 ? (t.send(fn(l, c, a, t.getBaseHref())), t.send(ns(l, a + 1))) : t.debug.warn("Rule index not found in", o, r);
|
|
5252
5252
|
}), s = t.safe((i) => {
|
|
5253
|
-
const { insertRule: r, deleteRule:
|
|
5254
|
-
i.CSSStyleSheet.prototype.insertRule = function(u,
|
|
5255
|
-
return e(this,
|
|
5253
|
+
const { insertRule: r, deleteRule: o } = i.CSSStyleSheet.prototype, { insertRule: l, deleteRule: c } = i.CSSGroupingRule.prototype;
|
|
5254
|
+
i.CSSStyleSheet.prototype.insertRule = function(u, a = 0) {
|
|
5255
|
+
return e(this, a, u), r.call(this, u, a);
|
|
5256
5256
|
}, i.CSSStyleSheet.prototype.deleteRule = function(u) {
|
|
5257
|
-
return e(this, u),
|
|
5258
|
-
}, i.CSSGroupingRule.prototype.insertRule = function(u,
|
|
5259
|
-
const d = l.call(this, u,
|
|
5257
|
+
return e(this, u), o.call(this, u);
|
|
5258
|
+
}, i.CSSGroupingRule.prototype.insertRule = function(u, a = 0) {
|
|
5259
|
+
const d = l.call(this, u, a);
|
|
5260
5260
|
return n(this), d;
|
|
5261
5261
|
}, i.CSSGroupingRule.prototype.deleteRule = function(u = 0) {
|
|
5262
|
-
const
|
|
5263
|
-
return n(this),
|
|
5262
|
+
const a = c.call(this, u);
|
|
5263
|
+
return n(this), a;
|
|
5264
5264
|
};
|
|
5265
5265
|
});
|
|
5266
5266
|
s(window), t.observer.attachContextCallback(s), t.nodes.attachNodeCallback((i) => {
|
|
@@ -5269,11 +5269,11 @@ function Go(t) {
|
|
|
5269
5269
|
const r = t.nodes.getID(i);
|
|
5270
5270
|
if (!r)
|
|
5271
5271
|
return;
|
|
5272
|
-
const
|
|
5273
|
-
at.set(
|
|
5274
|
-
const
|
|
5275
|
-
for (let u = 0; u <
|
|
5276
|
-
e(
|
|
5272
|
+
const o = i.sheet, l = hi();
|
|
5273
|
+
at.set(o, l), t.send(Ys(l, r));
|
|
5274
|
+
const c = o.cssRules;
|
|
5275
|
+
for (let u = 0; u < c.length; u++)
|
|
5276
|
+
e(o, u, c[u].cssText);
|
|
5277
5277
|
});
|
|
5278
5278
|
}
|
|
5279
5279
|
function Ko(t) {
|
|
@@ -5302,20 +5302,20 @@ function Jo(t) {
|
|
|
5302
5302
|
return;
|
|
5303
5303
|
const e = /* @__PURE__ */ new Map(), n = (s) => {
|
|
5304
5304
|
class i extends s.FontFace {
|
|
5305
|
-
constructor(...
|
|
5306
|
-
if (typeof
|
|
5305
|
+
constructor(...o) {
|
|
5306
|
+
if (typeof o[1] == "string") {
|
|
5307
5307
|
let l = "";
|
|
5308
|
-
|
|
5309
|
-
l = JSON.stringify(
|
|
5308
|
+
o[2] && t.safe(() => {
|
|
5309
|
+
l = JSON.stringify(o[2]);
|
|
5310
5310
|
});
|
|
5311
|
-
const
|
|
5312
|
-
u.push(
|
|
5313
|
-
const
|
|
5314
|
-
if (
|
|
5311
|
+
const c = [o[0], o[1], l], u = e.get(s.document) || [];
|
|
5312
|
+
u.push(c), e.set(s.document, u);
|
|
5313
|
+
const a = s === window ? 0 : t.nodes.getID(s.document);
|
|
5314
|
+
if (a === void 0)
|
|
5315
5315
|
return;
|
|
5316
|
-
t.active() && t.send(Zn(
|
|
5316
|
+
t.active() && t.send(Zn(a, ...c));
|
|
5317
5317
|
}
|
|
5318
|
-
super(...
|
|
5318
|
+
super(...o);
|
|
5319
5319
|
}
|
|
5320
5320
|
}
|
|
5321
5321
|
s.FontFace = i;
|
|
@@ -5327,8 +5327,8 @@ function Jo(t) {
|
|
|
5327
5327
|
if (!i)
|
|
5328
5328
|
return;
|
|
5329
5329
|
const r = s.defaultView === window ? 0 : t.nodes.getID(s);
|
|
5330
|
-
r !== void 0 && i.forEach((
|
|
5331
|
-
t.send(Zn(r, ...
|
|
5330
|
+
r !== void 0 && i.forEach((o) => {
|
|
5331
|
+
t.send(Zn(r, ...o));
|
|
5332
5332
|
});
|
|
5333
5333
|
}));
|
|
5334
5334
|
}
|
|
@@ -5336,37 +5336,37 @@ function Xo(t, e, n, s, i) {
|
|
|
5336
5336
|
t.debug.log("Openreplay: attaching axios spy to instance", e);
|
|
5337
5337
|
function r(p) {
|
|
5338
5338
|
t.debug.log("Openreplay: capturing axios response data", p);
|
|
5339
|
-
const { headers: b, data: w, method: y, url: E, baseURL:
|
|
5340
|
-
function
|
|
5341
|
-
F(v[0]) || (
|
|
5339
|
+
const { headers: b, data: w, method: y, url: E, baseURL: O } = p.config, { data: B, headers: A, status: k, response: _ } = p, { data: R, headers: M, status: I } = _ || {}, T = n.ignoreHeaders, F = Array.isArray(T) ? ($) => T.includes($) : () => T;
|
|
5340
|
+
function U($, v) {
|
|
5341
|
+
F(v[0]) || ($[v[0]] = v[1]);
|
|
5342
5342
|
}
|
|
5343
|
-
let
|
|
5344
|
-
b.toJSON ?
|
|
5345
|
-
const
|
|
5346
|
-
|
|
5347
|
-
F(
|
|
5343
|
+
let j = {}, z = {};
|
|
5344
|
+
b.toJSON ? j = b.toJSON() : b instanceof Headers ? b.forEach(($, v) => U(j, [v, $])) : Array.isArray(b) ? b.forEach(($) => U(j, $)) : typeof b == "object" && Object.entries(b).forEach(($) => U(j, $));
|
|
5345
|
+
const C = M || A;
|
|
5346
|
+
C.toJSON ? z = C.toJSON() : C instanceof Headers ? C.forEach(($, v) => U(z, [v, $])) : Array.isArray(C) ? C.forEach(($) => U(z, $)) : typeof C == "object" && Object.entries(C).forEach(([$, v]) => {
|
|
5347
|
+
F($) || (z[$] = v);
|
|
5348
5348
|
});
|
|
5349
|
-
const
|
|
5349
|
+
const L = s({
|
|
5350
5350
|
url: E,
|
|
5351
5351
|
method: y || "",
|
|
5352
5352
|
status: k || I || 0,
|
|
5353
5353
|
request: {
|
|
5354
|
-
headers:
|
|
5354
|
+
headers: j,
|
|
5355
5355
|
body: w
|
|
5356
5356
|
},
|
|
5357
5357
|
response: {
|
|
5358
5358
|
headers: z,
|
|
5359
|
-
body:
|
|
5359
|
+
body: R || B
|
|
5360
5360
|
}
|
|
5361
5361
|
});
|
|
5362
|
-
if (!
|
|
5362
|
+
if (!L) {
|
|
5363
5363
|
t.debug.log("Openreplay: empty request/response info, skipping");
|
|
5364
5364
|
return;
|
|
5365
5365
|
}
|
|
5366
5366
|
const V = p.config.__openreplay_timing, G = performance.now() - V;
|
|
5367
|
-
t.debug.log("Openreplay: final req object",
|
|
5367
|
+
t.debug.log("Openreplay: final req object", L), t.send(vt("xhr", String(y), String(L.url), i(L.request), i(L.response), L.status, V + Ve(), G, 0));
|
|
5368
5368
|
}
|
|
5369
|
-
function
|
|
5369
|
+
function o(p) {
|
|
5370
5370
|
if (t.debug.log("Openreplay: capturing API request", p), p.__openreplay_timing = performance.now(), n.sessionTokenHeader) {
|
|
5371
5371
|
const b = typeof n.sessionTokenHeader == "string" ? n.sessionTokenHeader : "X-OpenReplay-Session-Token", w = t.getSessionToken();
|
|
5372
5372
|
w && p.headers.set(b, w);
|
|
@@ -5376,20 +5376,20 @@ function Xo(t, e, n, s, i) {
|
|
|
5376
5376
|
function l(p) {
|
|
5377
5377
|
return n.failuresOnly || r(p), p;
|
|
5378
5378
|
}
|
|
5379
|
-
function
|
|
5379
|
+
function c(p) {
|
|
5380
5380
|
return t.debug.log("Openreplay: capturing API request error", p), Yo(p) && p.response ? r(p.response) : p instanceof Error && t.send(wt(p, [])), Promise.reject(p);
|
|
5381
5381
|
}
|
|
5382
5382
|
function u(p) {
|
|
5383
5383
|
t.debug.log("Openreplay: failed API request, skipping", p);
|
|
5384
5384
|
}
|
|
5385
|
-
const
|
|
5385
|
+
const a = e.interceptors.request.use(o, u, {
|
|
5386
5386
|
synchronous: !0
|
|
5387
|
-
}), d = e.interceptors.response.use(l,
|
|
5387
|
+
}), d = e.interceptors.response.use(l, c, {
|
|
5388
5388
|
synchronous: !0
|
|
5389
5389
|
});
|
|
5390
5390
|
t.attachStopCallback(() => {
|
|
5391
5391
|
var p, b, w, y;
|
|
5392
|
-
(b = (p = e.interceptors.request).eject) == null || b.call(p,
|
|
5392
|
+
(b = (p = e.interceptors.request).eject) == null || b.call(p, a), (y = (w = e.interceptors.response).eject) == null || y.call(w, d);
|
|
5393
5393
|
});
|
|
5394
5394
|
}
|
|
5395
5395
|
function Yo(t) {
|
|
@@ -5442,7 +5442,7 @@ const et = (t, e) => {
|
|
|
5442
5442
|
case "":
|
|
5443
5443
|
case "text":
|
|
5444
5444
|
case "json":
|
|
5445
|
-
typeof e == "string" ? n = e :
|
|
5445
|
+
typeof e == "string" ? n = e : Ln(e) || Array.isArray(e) ? n = JSON.stringify(e) : typeof e < "u" && (n = Object.prototype.toString.call(e));
|
|
5446
5446
|
break;
|
|
5447
5447
|
case "blob":
|
|
5448
5448
|
case "document":
|
|
@@ -5466,10 +5466,10 @@ const et = (t, e) => {
|
|
|
5466
5466
|
n.push(`${s}=${typeof i == "string" ? i : "[object Object]"}`);
|
|
5467
5467
|
e = n.join(",");
|
|
5468
5468
|
} else
|
|
5469
|
-
t instanceof Blob || t instanceof ReadableStream || t instanceof ArrayBuffer ? e = "byte data" :
|
|
5469
|
+
t instanceof Blob || t instanceof ReadableStream || t instanceof ArrayBuffer ? e = "byte data" : Ln(t) ? e = t : e = `can't parse body ${typeof t}`;
|
|
5470
5470
|
return e;
|
|
5471
5471
|
}, Zo = (t, e = {}) => {
|
|
5472
|
-
|
|
5472
|
+
Ln(e) || (e = {});
|
|
5473
5473
|
let n = t ? t.split("?") : [];
|
|
5474
5474
|
if (n.shift(), n.length > 0) {
|
|
5475
5475
|
n = n.join("?").split("&");
|
|
@@ -5484,7 +5484,7 @@ const et = (t, e) => {
|
|
|
5484
5484
|
}
|
|
5485
5485
|
return e;
|
|
5486
5486
|
};
|
|
5487
|
-
function
|
|
5487
|
+
function Ln(t) {
|
|
5488
5488
|
return t !== null && typeof t == "object";
|
|
5489
5489
|
}
|
|
5490
5490
|
function ea(t) {
|
|
@@ -5523,21 +5523,21 @@ class ta {
|
|
|
5523
5523
|
if (this.item.readyState === we.DONE)
|
|
5524
5524
|
return s;
|
|
5525
5525
|
const i = s.read, r = s.cancel;
|
|
5526
|
-
return this.item.responseType = "arraybuffer", s.read = () => i.apply(s).then((
|
|
5526
|
+
return this.item.responseType = "arraybuffer", s.read = () => i.apply(s).then((o) => {
|
|
5527
5527
|
if (!e)
|
|
5528
|
-
e = new Uint8Array(
|
|
5528
|
+
e = new Uint8Array(o.value);
|
|
5529
5529
|
else {
|
|
5530
|
-
const l = new Uint8Array(e.length +
|
|
5531
|
-
l.set(e), l.set(
|
|
5530
|
+
const l = new Uint8Array(e.length + o.value.length);
|
|
5531
|
+
l.set(e), l.set(o.value, e.length), e = l;
|
|
5532
5532
|
}
|
|
5533
|
-
return this.item.endTime = performance.now(), this.item.duration = this.item.endTime - (this.item.startTime || this.item.endTime), this.item.readyState =
|
|
5534
|
-
}), s.cancel = (...
|
|
5533
|
+
return this.item.endTime = performance.now(), this.item.duration = this.item.endTime - (this.item.startTime || this.item.endTime), this.item.readyState = o.done ? 4 : 3, this.item.statusText = o.done ? String(this.item.status) : "Loading", this.item.responseSize = e.length, this.item.responseSizeText = St(this.item.responseSize), o.done && (this.item.response = et(this.item.responseType, e)), o;
|
|
5534
|
+
}), s.cancel = (...o) => (this.item.cancelState = 2, this.item.statusText = "Cancel", this.item.endTime = performance.now(), this.item.duration = this.item.endTime - (this.item.startTime || this.item.endTime), this.item.response = et(this.item.responseType, e), r.apply(s, o)), s;
|
|
5535
5535
|
};
|
|
5536
5536
|
}
|
|
5537
5537
|
}
|
|
5538
5538
|
class na {
|
|
5539
|
-
constructor(e, n, s, i, r,
|
|
5540
|
-
this.ignoredHeaders = e, this.setSessionTokenHeader = n, this.sanitize = s, this.sendMessage = i, this.isServiceUrl = r, this.tokenUrlMatcher =
|
|
5539
|
+
constructor(e, n, s, i, r, o) {
|
|
5540
|
+
this.ignoredHeaders = e, this.setSessionTokenHeader = n, this.sanitize = s, this.sendMessage = i, this.isServiceUrl = r, this.tokenUrlMatcher = o;
|
|
5541
5541
|
}
|
|
5542
5542
|
apply(e, n, s) {
|
|
5543
5543
|
const i = s[0], r = s[1];
|
|
@@ -5545,28 +5545,28 @@ class na {
|
|
|
5545
5545
|
typeof i != "string" && !(i != null && i.url) || (i instanceof URL || typeof i == "string" ? this.isServiceUrl(String(i)) : this.isServiceUrl(String(i.url))))
|
|
5546
5546
|
return e.apply(window, s);
|
|
5547
5547
|
const l = new An(this.ignoredHeaders, this.setSessionTokenHeader, this.sanitize);
|
|
5548
|
-
return this.beforeFetch(l, i, r), this.setSessionTokenHeader((
|
|
5548
|
+
return this.beforeFetch(l, i, r), this.setSessionTokenHeader((c, u) => {
|
|
5549
5549
|
if (!(this.tokenUrlMatcher !== void 0 && !this.tokenUrlMatcher(l.url))) {
|
|
5550
5550
|
if (s[1] === void 0 && s[0] instanceof Request)
|
|
5551
|
-
return s[0].headers.append(
|
|
5552
|
-
s[1] || (s[1] = {}), s[1].headers === void 0 && (s[1] = { ...s[1], headers: {} }), s[1].headers instanceof Headers ? s[1].headers.append(
|
|
5551
|
+
return s[0].headers.append(c, u);
|
|
5552
|
+
s[1] || (s[1] = {}), s[1].headers === void 0 && (s[1] = { ...s[1], headers: {} }), s[1].headers instanceof Headers ? s[1].headers.append(c, u) : Array.isArray(s[1].headers) ? s[1].headers.push([c, u]) : s[1].headers[c] = u;
|
|
5553
5553
|
}
|
|
5554
|
-
}), e.apply(window, s).then(this.afterFetch(l)).catch((
|
|
5555
|
-
throw l.endTime = performance.now(), l.duration = l.endTime - (l.startTime || l.endTime),
|
|
5554
|
+
}), e.apply(window, s).then(this.afterFetch(l)).catch((c) => {
|
|
5555
|
+
throw l.endTime = performance.now(), l.duration = l.endTime - (l.startTime || l.endTime), c;
|
|
5556
5556
|
});
|
|
5557
5557
|
}
|
|
5558
5558
|
beforeFetch(e, n, s) {
|
|
5559
|
-
let i, r = "GET",
|
|
5560
|
-
if (typeof n == "string" ? (r = (s == null ? void 0 : s.method) || "GET", i = kn(n),
|
|
5559
|
+
let i, r = "GET", o = {};
|
|
5560
|
+
if (typeof n == "string" ? (r = (s == null ? void 0 : s.method) || "GET", i = kn(n), o = (s == null ? void 0 : s.headers) || {}) : (r = n.method || "GET", i = kn(n.url), o = n.headers), e.method = r, e.requestType = "fetch", e.requestHeader = o, e.url = i.toString(), e.name = (i.pathname.split("/").pop() || "") + i.search, e.status = 0, e.statusText = "Pending", e.readyState = 1, e.startTime || (e.startTime = performance.now()), Object.prototype.toString.call(o) === "[object Headers]") {
|
|
5561
5561
|
e.requestHeader = {};
|
|
5562
|
-
for (const [l,
|
|
5563
|
-
e.requestHeader[l] =
|
|
5562
|
+
for (const [l, c] of o)
|
|
5563
|
+
e.requestHeader[l] = c;
|
|
5564
5564
|
} else
|
|
5565
|
-
e.requestHeader =
|
|
5565
|
+
e.requestHeader = o;
|
|
5566
5566
|
if (i.search && i.searchParams) {
|
|
5567
5567
|
e.getData = {};
|
|
5568
|
-
for (const [l,
|
|
5569
|
-
e.getData[l] =
|
|
5568
|
+
for (const [l, c] of i.searchParams)
|
|
5569
|
+
e.getData[l] = c;
|
|
5570
5570
|
}
|
|
5571
5571
|
s != null && s.body && (e.requestData = Mn(s.body));
|
|
5572
5572
|
}
|
|
@@ -5593,13 +5593,13 @@ class na {
|
|
|
5593
5593
|
}
|
|
5594
5594
|
}
|
|
5595
5595
|
class sa {
|
|
5596
|
-
static create(e, n, s, i, r,
|
|
5597
|
-
return new Proxy(fetch, new na(e, n, s, i, r,
|
|
5596
|
+
static create(e, n, s, i, r, o) {
|
|
5597
|
+
return new Proxy(fetch, new na(e, n, s, i, r, o));
|
|
5598
5598
|
}
|
|
5599
5599
|
}
|
|
5600
5600
|
class ia {
|
|
5601
|
-
constructor(e, n, s, i, r,
|
|
5602
|
-
this.ignoredHeaders = n, this.setSessionTokenHeader = s, this.sanitize = i, this.sendMessage = r, this.isServiceUrl =
|
|
5601
|
+
constructor(e, n, s, i, r, o, l) {
|
|
5602
|
+
this.ignoredHeaders = n, this.setSessionTokenHeader = s, this.sanitize = i, this.sendMessage = r, this.isServiceUrl = o, this.tokenUrlMatcher = l, this.XMLReq = e, this.XMLReq.onreadystatechange = () => {
|
|
5603
5603
|
this.onReadyStateChange();
|
|
5604
5604
|
}, this.XMLReq.onabort = () => {
|
|
5605
5605
|
this.onAbort();
|
|
@@ -5654,9 +5654,9 @@ class ia {
|
|
|
5654
5654
|
getOpen(e) {
|
|
5655
5655
|
const n = Reflect.get(e, "open");
|
|
5656
5656
|
return (...s) => {
|
|
5657
|
-
var
|
|
5657
|
+
var o, l;
|
|
5658
5658
|
const i = s[0], r = s[1];
|
|
5659
|
-
return this.item.method = i ? i.toUpperCase() : "GET", this.item.url = ((
|
|
5659
|
+
return this.item.method = i ? i.toUpperCase() : "GET", this.item.url = ((o = r.toString) == null ? void 0 : o.call(r)) || "", this.item.name = ((l = this.item.url) == null ? void 0 : l.replace(new RegExp("/*$"), "").split("/").pop()) ?? "", this.item.getData = Zo(this.item.url, {}), n.apply(e, s);
|
|
5660
5660
|
};
|
|
5661
5661
|
}
|
|
5662
5662
|
getSend(e) {
|
|
@@ -5702,8 +5702,8 @@ class ia {
|
|
|
5702
5702
|
const i = n[s];
|
|
5703
5703
|
if (!i)
|
|
5704
5704
|
continue;
|
|
5705
|
-
const r = i.split(": "),
|
|
5706
|
-
this.item.header[
|
|
5705
|
+
const r = i.split(": "), o = r[0];
|
|
5706
|
+
this.item.header[o] = r.slice(1).join(": ");
|
|
5707
5707
|
}
|
|
5708
5708
|
break;
|
|
5709
5709
|
case we.LOADING:
|
|
@@ -5719,11 +5719,11 @@ class ia {
|
|
|
5719
5719
|
}
|
|
5720
5720
|
}
|
|
5721
5721
|
class ra {
|
|
5722
|
-
static create(e, n, s, i, r,
|
|
5722
|
+
static create(e, n, s, i, r, o) {
|
|
5723
5723
|
return new Proxy(XMLHttpRequest, {
|
|
5724
5724
|
construct(l) {
|
|
5725
|
-
const
|
|
5726
|
-
return new Proxy(
|
|
5725
|
+
const c = new l();
|
|
5726
|
+
return new Proxy(c, new ia(c, e, n, s, i, r, o));
|
|
5727
5727
|
}
|
|
5728
5728
|
});
|
|
5729
5729
|
}
|
|
@@ -5734,20 +5734,20 @@ class aa {
|
|
|
5734
5734
|
this.ignoredHeaders = e, this.setSessionTokenHeader = n, this.sanitize = s, this.sendMessage = i, this.isServiceUrl = r;
|
|
5735
5735
|
}
|
|
5736
5736
|
apply(e, n, s) {
|
|
5737
|
-
const i = s[0], r = s[1],
|
|
5737
|
+
const i = s[0], r = s[1], o = new An(this.ignoredHeaders, this.setSessionTokenHeader, this.sanitize);
|
|
5738
5738
|
if (this.isServiceUrl(i))
|
|
5739
5739
|
return e.apply(n, s);
|
|
5740
5740
|
const l = kn(i);
|
|
5741
|
-
if (
|
|
5742
|
-
|
|
5743
|
-
for (const [
|
|
5744
|
-
|
|
5741
|
+
if (o.method = "POST", o.url = i, o.name = (l.pathname.split("/").pop() || "") + l.search, o.requestType = "beacon", o.requestHeader = { "Content-Type": oa(r) }, o.status = 0, o.statusText = "Pending", l.search && l.searchParams) {
|
|
5742
|
+
o.getData = {};
|
|
5743
|
+
for (const [a, d] of l.searchParams)
|
|
5744
|
+
o.getData[a] = d;
|
|
5745
5745
|
}
|
|
5746
|
-
|
|
5747
|
-
const
|
|
5748
|
-
|
|
5749
|
-
const u =
|
|
5750
|
-
return u && this.sendMessage(u),
|
|
5746
|
+
o.requestData = Mn(r), o.startTime || (o.startTime = performance.now());
|
|
5747
|
+
const c = e.apply(n, s);
|
|
5748
|
+
c ? (o.endTime = performance.now(), o.duration = o.endTime - (o.startTime || o.endTime), o.status = 0, o.statusText = "Sent", o.readyState = 4) : (o.status = 500, o.statusText = "Unknown");
|
|
5749
|
+
const u = o.getMessage();
|
|
5750
|
+
return u && this.sendMessage(u), c;
|
|
5751
5751
|
}
|
|
5752
5752
|
}
|
|
5753
5753
|
class We {
|
|
@@ -5763,9 +5763,9 @@ var Ns;
|
|
|
5763
5763
|
We.origSendBeacon = (Ns = window == null ? void 0 : window.navigator) == null ? void 0 : Ns.sendBeacon;
|
|
5764
5764
|
const Cs = (t) => console.warn(`Openreplay: Can't find ${t} in global context.
|
|
5765
5765
|
If you're using serverside rendering in your app, make sure that tracker is loaded dynamically, otherwise ${t} won't be tracked.`);
|
|
5766
|
-
function ca(t, e, n, s, i, r,
|
|
5766
|
+
function ca(t, e, n, s, i, r, o) {
|
|
5767
5767
|
var l;
|
|
5768
|
-
t.XMLHttpRequest ? t.XMLHttpRequest = ra.create(e, n, s, i, r,
|
|
5768
|
+
t.XMLHttpRequest ? t.XMLHttpRequest = ra.create(e, n, s, i, r, o) : Cs("XMLHttpRequest"), t.fetch ? t.fetch = sa.create(e, n, s, i, r, o) : Cs("fetch"), (l = t == null ? void 0 : t.navigator) != null && l.sendBeacon && (t.navigator.sendBeacon = We.create(e, n, s, i, r));
|
|
5769
5769
|
}
|
|
5770
5770
|
function on(t) {
|
|
5771
5771
|
return t.__or_req_data__ || (t.__or_req_data__ = { body: void 0, headers: {} }), t.__or_req_data__;
|
|
@@ -5784,62 +5784,62 @@ function la(t, e = {}) {
|
|
|
5784
5784
|
useProxy: !0
|
|
5785
5785
|
}, e);
|
|
5786
5786
|
n.useProxy === !1 && t.debug.warn("Network module is migrating to proxy api, to gradually migrate and test it set useProxy to true");
|
|
5787
|
-
const s = n.ignoreHeaders, i = Array.isArray(s) ? (
|
|
5788
|
-
function a
|
|
5787
|
+
const s = n.ignoreHeaders, i = Array.isArray(s) ? (a) => s.includes(a) : () => s, r = n.sessionTokenHeader === !0 ? "X-OpenReplay-SessionToken" : n.sessionTokenHeader;
|
|
5788
|
+
function o(a) {
|
|
5789
5789
|
if (r) {
|
|
5790
5790
|
const d = t.getSessionToken();
|
|
5791
|
-
d && t.safe(
|
|
5791
|
+
d && t.safe(a)(r, d);
|
|
5792
5792
|
}
|
|
5793
5793
|
}
|
|
5794
|
-
function l(
|
|
5795
|
-
if (n.capturePayload || (delete
|
|
5796
|
-
const d =
|
|
5794
|
+
function l(a) {
|
|
5795
|
+
if (n.capturePayload || (delete a.request.body, delete a.response.body), n.sanitizer) {
|
|
5796
|
+
const d = a.response.body;
|
|
5797
5797
|
if (typeof d == "string")
|
|
5798
5798
|
try {
|
|
5799
|
-
|
|
5799
|
+
a.response.body = JSON.parse(d);
|
|
5800
5800
|
} catch {
|
|
5801
5801
|
}
|
|
5802
|
-
return n.sanitizer(
|
|
5802
|
+
return n.sanitizer(a);
|
|
5803
5803
|
}
|
|
5804
|
-
return
|
|
5804
|
+
return a;
|
|
5805
5805
|
}
|
|
5806
|
-
function
|
|
5807
|
-
if (
|
|
5806
|
+
function c(a) {
|
|
5807
|
+
if (a && typeof a.body != "string")
|
|
5808
5808
|
try {
|
|
5809
|
-
|
|
5809
|
+
a.body = JSON.stringify(a.body);
|
|
5810
5810
|
} catch {
|
|
5811
|
-
|
|
5811
|
+
a.body = "<unable to stringify>", t.notify.warn("Openreplay fetch couldn't stringify body:", a.body);
|
|
5812
5812
|
}
|
|
5813
|
-
return JSON.stringify(
|
|
5813
|
+
return JSON.stringify(a);
|
|
5814
5814
|
}
|
|
5815
|
-
const u = (
|
|
5815
|
+
const u = (a) => {
|
|
5816
5816
|
if (n.useProxy)
|
|
5817
|
-
return ca(
|
|
5818
|
-
const d =
|
|
5817
|
+
return ca(a, n.ignoreHeaders, o, l, (A) => t.send(A), (A) => t.isServiceURL(A), n.tokenUrlMatcher);
|
|
5818
|
+
const d = a.fetch.bind(a), p = (A, k = {}) => {
|
|
5819
5819
|
if (!(typeof A == "string" || A instanceof URL) || t.isServiceURL(String(A)))
|
|
5820
5820
|
return d(A, k);
|
|
5821
|
-
|
|
5822
|
-
k.headers === void 0 && (k.headers = {}), k.headers instanceof Headers ? k.headers.append(
|
|
5821
|
+
o(function(R, M) {
|
|
5822
|
+
k.headers === void 0 && (k.headers = {}), k.headers instanceof Headers ? k.headers.append(R, M) : Array.isArray(k.headers) ? k.headers.push([R, M]) : k.headers[R] = M;
|
|
5823
5823
|
});
|
|
5824
|
-
const
|
|
5825
|
-
return d(A, k).then((
|
|
5826
|
-
const M = performance.now() -
|
|
5827
|
-
if (n.failuresOnly &&
|
|
5828
|
-
return
|
|
5829
|
-
const I =
|
|
5824
|
+
const _ = performance.now();
|
|
5825
|
+
return d(A, k).then((R) => {
|
|
5826
|
+
const M = performance.now() - _;
|
|
5827
|
+
if (n.failuresOnly && R.status < 400)
|
|
5828
|
+
return R;
|
|
5829
|
+
const I = R.clone();
|
|
5830
5830
|
return I.text().then((T) => {
|
|
5831
|
-
const F = {},
|
|
5831
|
+
const F = {}, U = {};
|
|
5832
5832
|
if (s !== !0) {
|
|
5833
|
-
const
|
|
5834
|
-
i(
|
|
5833
|
+
const C = ([L, V]) => {
|
|
5834
|
+
i(L) || (F[L] = V);
|
|
5835
5835
|
};
|
|
5836
|
-
k.headers instanceof Headers ? k.headers.forEach((
|
|
5837
|
-
i(V) || (
|
|
5836
|
+
k.headers instanceof Headers ? k.headers.forEach((L, V) => C([V, L])) : Array.isArray(k.headers) ? k.headers.forEach(C) : typeof k.headers == "object" && Object.entries(k.headers).forEach(C), I.headers.forEach((L, V) => {
|
|
5837
|
+
i(V) || (U[V] = L);
|
|
5838
5838
|
});
|
|
5839
5839
|
}
|
|
5840
|
-
const
|
|
5840
|
+
const j = _s(k.method), z = l({
|
|
5841
5841
|
url: String(A),
|
|
5842
|
-
method:
|
|
5842
|
+
method: j,
|
|
5843
5843
|
status: I.status,
|
|
5844
5844
|
request: {
|
|
5845
5845
|
headers: F,
|
|
@@ -5847,32 +5847,32 @@ function la(t, e = {}) {
|
|
|
5847
5847
|
body: k.body || null
|
|
5848
5848
|
},
|
|
5849
5849
|
response: {
|
|
5850
|
-
headers:
|
|
5850
|
+
headers: U,
|
|
5851
5851
|
body: T
|
|
5852
5852
|
}
|
|
5853
5853
|
});
|
|
5854
|
-
z && t.send(vt("fetch",
|
|
5855
|
-
}).catch((T) => t.debug.error("Could not process Fetch response:", T)),
|
|
5854
|
+
z && t.send(vt("fetch", j, String(z.url), c(z.request), c(z.response), I.status, _ + Ve(), M, 0));
|
|
5855
|
+
}).catch((T) => t.debug.error("Could not process Fetch response:", T)), R;
|
|
5856
5856
|
});
|
|
5857
5857
|
};
|
|
5858
|
-
|
|
5859
|
-
const b =
|
|
5858
|
+
a.fetch = p;
|
|
5859
|
+
const b = a.XMLHttpRequest.prototype.open, w = a.XMLHttpRequest.prototype.setRequestHeader, y = a.XMLHttpRequest.prototype.send;
|
|
5860
5860
|
function E(A, k) {
|
|
5861
|
-
const
|
|
5862
|
-
|
|
5863
|
-
let
|
|
5864
|
-
return
|
|
5865
|
-
|
|
5866
|
-
}),
|
|
5867
|
-
const { headers: I, body: T } = on(
|
|
5868
|
-
|
|
5869
|
-
const G = V.split(": "),
|
|
5870
|
-
i(
|
|
5861
|
+
const _ = this;
|
|
5862
|
+
o((M, I) => _.setRequestHeader(M, I));
|
|
5863
|
+
let R = 0;
|
|
5864
|
+
return _.addEventListener("loadstart", (M) => {
|
|
5865
|
+
R = M.timeStamp;
|
|
5866
|
+
}), _.addEventListener("load", t.safe((M) => {
|
|
5867
|
+
const { headers: I, body: T } = on(_), F = R > 0 ? M.timeStamp - R : 0, j = (_.getAllResponseHeaders() || "").trim().split(/[\r\n]+/), z = {};
|
|
5868
|
+
j.forEach(function(V) {
|
|
5869
|
+
const G = V.split(": "), $ = G.shift();
|
|
5870
|
+
i($) || (z[$] = G.join(": "));
|
|
5871
5871
|
});
|
|
5872
|
-
const
|
|
5872
|
+
const C = _s(A), L = l({
|
|
5873
5873
|
url: String(k),
|
|
5874
|
-
method:
|
|
5875
|
-
status:
|
|
5874
|
+
method: C,
|
|
5875
|
+
status: _.status,
|
|
5876
5876
|
request: {
|
|
5877
5877
|
headers: I,
|
|
5878
5878
|
// @ts-ignore
|
|
@@ -5880,27 +5880,27 @@ function la(t, e = {}) {
|
|
|
5880
5880
|
},
|
|
5881
5881
|
response: {
|
|
5882
5882
|
headers: z,
|
|
5883
|
-
body:
|
|
5883
|
+
body: _.response
|
|
5884
5884
|
}
|
|
5885
5885
|
});
|
|
5886
|
-
|
|
5886
|
+
L && t.send(vt("xhr", C, String(L.url), c(L.request), c(L.response), _.status, R + Ve(), F, 0));
|
|
5887
5887
|
})), b.apply(this, arguments);
|
|
5888
5888
|
}
|
|
5889
|
-
function
|
|
5889
|
+
function O(A) {
|
|
5890
5890
|
const k = on(this);
|
|
5891
5891
|
return k.body = A, y.apply(this, arguments);
|
|
5892
5892
|
}
|
|
5893
|
-
function
|
|
5893
|
+
function B(A, k) {
|
|
5894
5894
|
if (!i(A)) {
|
|
5895
|
-
const
|
|
5896
|
-
|
|
5895
|
+
const _ = on(this);
|
|
5896
|
+
_.headers[A] = k;
|
|
5897
5897
|
}
|
|
5898
5898
|
return w.apply(this, arguments);
|
|
5899
5899
|
}
|
|
5900
|
-
n.axiosInstances || (
|
|
5900
|
+
n.axiosInstances || (a.XMLHttpRequest.prototype.open = E, a.XMLHttpRequest.prototype.send = O, a.XMLHttpRequest.prototype.setRequestHeader = B);
|
|
5901
5901
|
};
|
|
5902
|
-
u(window), n.axiosInstances && n.axiosInstances.forEach((
|
|
5903
|
-
Xo(t,
|
|
5902
|
+
u(window), n.axiosInstances && n.axiosInstances.forEach((a) => {
|
|
5903
|
+
Xo(t, a, n, l, c);
|
|
5904
5904
|
}), n.captureInIframes && t.observer.attachContextCallback(t.safe(u));
|
|
5905
5905
|
}
|
|
5906
5906
|
function ua(t) {
|
|
@@ -5936,24 +5936,24 @@ class fa {
|
|
|
5936
5936
|
constructor(e) {
|
|
5937
5937
|
var l;
|
|
5938
5938
|
if (this.options = e, this.app = null, this.crossdomainMode = !1, this.checkDoNotTrack = () => this.options.respectDoNotTrack && (navigator.doNotTrack == "1" || // @ts-ignore
|
|
5939
|
-
window.doNotTrack == "1"), this.signalStartIssue = (
|
|
5940
|
-
const
|
|
5939
|
+
window.doNotTrack == "1"), this.signalStartIssue = (c, u) => {
|
|
5940
|
+
const a = this.checkDoNotTrack(), d = new XMLHttpRequest(), p = this.options.ingestPoint || ti;
|
|
5941
5941
|
d.open("POST", p + "/v1/web/not-started"), d.send(JSON.stringify({
|
|
5942
5942
|
trackerVersion: "14.0.4",
|
|
5943
5943
|
projectKey: this.options.projectKey,
|
|
5944
|
-
doNotTrack:
|
|
5945
|
-
reason: u.length ? `missing api: ${u.join(",")}` :
|
|
5944
|
+
doNotTrack: a,
|
|
5945
|
+
reason: u.length ? `missing api: ${u.join(",")}` : c
|
|
5946
5946
|
}));
|
|
5947
5947
|
}, this.restartCanvasTracking = () => {
|
|
5948
5948
|
this.app !== null && this.app.restartCanvasTracking();
|
|
5949
|
-
}, this.handleError = (
|
|
5949
|
+
}, this.handleError = (c, u = {}) => {
|
|
5950
5950
|
if (this.app !== null) {
|
|
5951
|
-
if (
|
|
5952
|
-
const
|
|
5953
|
-
this.app.send(
|
|
5954
|
-
} else if (
|
|
5955
|
-
const
|
|
5956
|
-
|
|
5951
|
+
if (c instanceof Error) {
|
|
5952
|
+
const a = wt(c, [], u);
|
|
5953
|
+
this.app.send(a);
|
|
5954
|
+
} else if (c instanceof ErrorEvent || "PromiseRejectionEvent" in window && c instanceof PromiseRejectionEvent) {
|
|
5955
|
+
const a = ii(c, void 0, u);
|
|
5956
|
+
a != null && this.app.send(a);
|
|
5957
5957
|
}
|
|
5958
5958
|
}
|
|
5959
5959
|
}, this.crossdomainMode = !!(zi() && ((l = e.crossdomain) != null && l.enabled)), !Se || !da(e))
|
|
@@ -5979,36 +5979,36 @@ class fa {
|
|
|
5979
5979
|
if (n)
|
|
5980
5980
|
s.push("doNotTrack");
|
|
5981
5981
|
else
|
|
5982
|
-
for (const
|
|
5983
|
-
if (
|
|
5984
|
-
if ("performance" in window && !(
|
|
5985
|
-
s.push(
|
|
5982
|
+
for (const c of i)
|
|
5983
|
+
if (c === "timing") {
|
|
5984
|
+
if ("performance" in window && !(c in performance)) {
|
|
5985
|
+
s.push(c);
|
|
5986
5986
|
break;
|
|
5987
5987
|
}
|
|
5988
|
-
} else if (
|
|
5989
|
-
if (!(
|
|
5990
|
-
s.push(
|
|
5988
|
+
} else if (c === "startsWith") {
|
|
5989
|
+
if (!(c in String.prototype)) {
|
|
5990
|
+
s.push(c);
|
|
5991
5991
|
break;
|
|
5992
5992
|
}
|
|
5993
|
-
} else if (!(
|
|
5994
|
-
s.push(
|
|
5993
|
+
} else if (!(c in window)) {
|
|
5994
|
+
s.push(c);
|
|
5995
5995
|
break;
|
|
5996
5996
|
}
|
|
5997
5997
|
if (s.length > 0) {
|
|
5998
|
-
const
|
|
5999
|
-
console.error(`OpenReplay: browser doesn't support API required for tracking or doNotTrack is set to 1. Reason: ${
|
|
5998
|
+
const c = s.join(",");
|
|
5999
|
+
console.error(`OpenReplay: browser doesn't support API required for tracking or doNotTrack is set to 1. Reason: ${c}`), this.signalStartIssue("missing_api", s);
|
|
6000
6000
|
return;
|
|
6001
6001
|
}
|
|
6002
6002
|
const r = new lo(e.projectKey, e.sessionToken, e, this.signalStartIssue, this.crossdomainMode);
|
|
6003
6003
|
this.app = r, this.crossdomainMode || (qo(r), uo(r), kr(r, e), ha(r)), jo(r, e.mouse), $o(r, this.crossdomainMode), Go(r), Vo(r), go(r, e), yo(r, e), xo(r), Co(r, e), Ho(r, e), Ko(r), Jo(r), la(r, e.network), ua(r), window.__OPENREPLAY__ = this, e.flags && e.flags.onFlagsLoad && this.onFlagsLoad(e.flags.onFlagsLoad);
|
|
6004
|
-
const
|
|
6004
|
+
const o = window.open;
|
|
6005
6005
|
(e.autoResetOnWindowOpen || e.resetTabOnWindowOpen) && (r.attachStartCallback(() => {
|
|
6006
|
-
const
|
|
6007
|
-
window.open = function(...
|
|
6008
|
-
return e.autoResetOnWindowOpen && r.resetNextPageSession(!0), e.resetTabOnWindowOpen && u.removeItem(e.session_tabid_key || "__openreplay_tabid"), r.resetNextPageSession(!1), u.setItem(e.session_tabid_key || "__openreplay_tabid",
|
|
6006
|
+
const c = r.getTabId(), u = r.sessionStorage ?? window.sessionStorage;
|
|
6007
|
+
window.open = function(...a) {
|
|
6008
|
+
return e.autoResetOnWindowOpen && r.resetNextPageSession(!0), e.resetTabOnWindowOpen && u.removeItem(e.session_tabid_key || "__openreplay_tabid"), r.resetNextPageSession(!1), u.setItem(e.session_tabid_key || "__openreplay_tabid", c), o.call(window, ...a);
|
|
6009
6009
|
};
|
|
6010
6010
|
}), r.attachStopCallback(() => {
|
|
6011
|
-
window.open =
|
|
6011
|
+
window.open = o;
|
|
6012
6012
|
}));
|
|
6013
6013
|
}
|
|
6014
6014
|
isFlagEnabled(e) {
|
|
@@ -6979,10 +6979,10 @@ margin: 5px 0;
|
|
|
6979
6979
|
|
|
6980
6980
|
|
|
6981
6981
|
/* Пример более узких экранов (i.e. <480px) можно добавить при необходимости */
|
|
6982
|
-
`,
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
document.head.appendChild(
|
|
6982
|
+
`, Fn = document.createElement("link");
|
|
6983
|
+
Fn.rel = "stylesheet";
|
|
6984
|
+
Fn.href = "https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap";
|
|
6985
|
+
document.head.appendChild(Fn);
|
|
6986
6986
|
const di = document.createElement("style");
|
|
6987
6987
|
var Os;
|
|
6988
6988
|
document.documentElement.style.setProperty("--wineater-color", ((Os = window == null ? void 0 : window.wineaterData) == null ? void 0 : Os.COLOR) || "#7B2BEB");
|
|
@@ -7292,6 +7292,70 @@ class va {
|
|
|
7292
7292
|
headerOccasion: "occasion",
|
|
7293
7293
|
headerOr: "or"
|
|
7294
7294
|
},
|
|
7295
|
+
sr: {
|
|
7296
|
+
lang: "sr",
|
|
7297
|
+
welcomeMessage: "Šta planirate da jedete? Podelite svoje jelo i preporučiću vam savršeno vino uz obrok.",
|
|
7298
|
+
noResultsFound: "Nema rezultata.",
|
|
7299
|
+
somethingWentWrong: "Izvinite, nešto je pošlo po zlu.",
|
|
7300
|
+
chatButton1: "Pronađi vino",
|
|
7301
|
+
chatButton2: "Upari vino sada",
|
|
7302
|
+
chatButton3: "Zatraži preporuku",
|
|
7303
|
+
chatTitle: "Asistent za uparivanje vina 🍷",
|
|
7304
|
+
chatSubtitle: "Opišite svoj obrok i dobijte preporuku za 30 sekundi",
|
|
7305
|
+
inputPlaceholder: "npr. Tuna salata",
|
|
7306
|
+
sendButton: "Upari",
|
|
7307
|
+
poweredBy: "Pokreće",
|
|
7308
|
+
price: "Cena",
|
|
7309
|
+
region: "Regija",
|
|
7310
|
+
type: "Tip",
|
|
7311
|
+
reason: "Preporuka",
|
|
7312
|
+
moreInfo: "Više informacija",
|
|
7313
|
+
winePairingIntro: "Za ovo vino, preporučuju se sledeća jela:",
|
|
7314
|
+
askForDinner: "Šta biste želeli za večeru?",
|
|
7315
|
+
clearChatButton: "Obriši razgovor",
|
|
7316
|
+
widgetTitle: "PRONAĐITE SAVRŠENO VINO",
|
|
7317
|
+
widgetSubtitle: "Podelite bilo šta — obrok, raspoloženje, budžet ili priliku — i naš AI somelijer će vam za par sekundi preporučiti vino",
|
|
7318
|
+
searchPlaceholder: "Unesite ključnu reč ili opis",
|
|
7319
|
+
wineDetails: {
|
|
7320
|
+
price: "Cena",
|
|
7321
|
+
region: "Regija",
|
|
7322
|
+
type: "Tip",
|
|
7323
|
+
moreInfo: "Više informacija",
|
|
7324
|
+
reason: "Razlog",
|
|
7325
|
+
sommSelection: "Izbor somelijera",
|
|
7326
|
+
code: "Šifra",
|
|
7327
|
+
buy: "Kupi"
|
|
7328
|
+
},
|
|
7329
|
+
searchButton: "Pretraga",
|
|
7330
|
+
priceRange: "Cenovni raspon",
|
|
7331
|
+
wineColor: "Boja vina",
|
|
7332
|
+
intensity: "Intenzitet",
|
|
7333
|
+
red: "Crveno",
|
|
7334
|
+
white: "Belo",
|
|
7335
|
+
rose: "Roze",
|
|
7336
|
+
light: "Lako",
|
|
7337
|
+
medium: "Srednje",
|
|
7338
|
+
full: "Puno",
|
|
7339
|
+
/* -- Novi ključevi za bar -- */
|
|
7340
|
+
barTitle: "Jela iz bara",
|
|
7341
|
+
barSubtitle: "Izaberite jela ispod i kliknite ‘Pošalji’",
|
|
7342
|
+
barSendButton: "Pošalji",
|
|
7343
|
+
barResetButton: "Resetuj",
|
|
7344
|
+
barName: "Naziv bara",
|
|
7345
|
+
barNotesPlaceholder: "Dodajte svoje želje ovde...",
|
|
7346
|
+
placeholderSuggestions: [
|
|
7347
|
+
"Vino uz pastu",
|
|
7348
|
+
"Savršeno uz ribu",
|
|
7349
|
+
"Preporuka za žurku"
|
|
7350
|
+
],
|
|
7351
|
+
headerLine1: "Podelite bilo šta što vam je na umu —",
|
|
7352
|
+
headerLine2: "— i dobijte preporuke za savršeno vino za par sekundi",
|
|
7353
|
+
headerMeal: "obrok",
|
|
7354
|
+
headerMood: "raspoloženje",
|
|
7355
|
+
headerBudget: "budžet",
|
|
7356
|
+
headerOccasion: "prilika",
|
|
7357
|
+
headerOr: "ili"
|
|
7358
|
+
},
|
|
7295
7359
|
de: {
|
|
7296
7360
|
lang: "de",
|
|
7297
7361
|
welcomeMessage: "Was möchten Sie essen? Beschreiben Sie Ihr Gericht und ich empfehle Ihnen den perfekten Wein dazu.",
|
|
@@ -7596,7 +7660,7 @@ class ba {
|
|
|
7596
7660
|
const s = document.querySelectorAll(`#${e} button`);
|
|
7597
7661
|
s.forEach((i) => {
|
|
7598
7662
|
i.addEventListener("click", (r) => {
|
|
7599
|
-
s.forEach((
|
|
7663
|
+
s.forEach((o) => o.classList.remove("selected")), r.target.classList.add("selected"), this.selectedFilters[n] = r.target.dataset.value, this.handleSearch();
|
|
7600
7664
|
});
|
|
7601
7665
|
});
|
|
7602
7666
|
}
|
|
@@ -7625,67 +7689,70 @@ class ba {
|
|
|
7625
7689
|
displayResults(e, n = !1) {
|
|
7626
7690
|
const s = document.getElementById("wine-placeholder");
|
|
7627
7691
|
this.hideLoadingIndicator(), s.innerHTML = "", this.sendEvent("resultsDisplayed", { resultsCount: e.length });
|
|
7628
|
-
const i = (
|
|
7629
|
-
const
|
|
7630
|
-
return !
|
|
7692
|
+
const i = (u, a) => u[a] || u[a.charAt(0).toUpperCase() + a.slice(1)], r = (u, a) => a.map((d) => i(u, d)).filter(Boolean).join(" • "), o = (u) => Array.isArray(u) ? u.map((a) => `<span class="popup-tag">${a}</span>`).join("") : "", l = (u) => {
|
|
7693
|
+
const a = u.tags || u.Tags, d = u.reason || u["Short Description"];
|
|
7694
|
+
return !d && !a ? "" : `
|
|
7631
7695
|
<div class="wine-hover-popup">
|
|
7632
|
-
${
|
|
7633
|
-
${
|
|
7696
|
+
${d ? `<div class="popup-reason">${d}</div>` : ""}
|
|
7697
|
+
${a ? `<div class="popup-tags">${o(a)}</div>` : ""}
|
|
7634
7698
|
</div>`;
|
|
7635
7699
|
};
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
|
|
7700
|
+
function c(u) {
|
|
7701
|
+
return typeof u != "number" && (u = Number(u)), u.toLocaleString("en-US");
|
|
7702
|
+
}
|
|
7703
|
+
e.forEach((u, a) => {
|
|
7704
|
+
const d = i(u, "title"), p = i(u, "image"), b = i(u, "total"), w = i(u, "url"), y = u.tags || u.Tags, E = r(u, ["type", "country", "region", "grape"]), O = y ? o(y) : "", B = l(u), A = u["Short Description"], k = u.pairing_recommendation, _ = u.isSommSelection, R = `
|
|
7705
|
+
<div class="wine-recommendation-tile ${_ ? "somm-selection" : ""}">
|
|
7706
|
+
${_ ? `<div class="somm-selection-badge">${Z.translate("wineDetails.sommSelection")}</div>` : ""}
|
|
7640
7707
|
|
|
7641
7708
|
<div class="tile-top">
|
|
7642
|
-
${
|
|
7643
|
-
<div class="wine-price">${
|
|
7644
|
-
<h3 class="wine-title">${
|
|
7709
|
+
${p ? `<img src="${p}" alt="${d}" class="wine-image" />` : ""}
|
|
7710
|
+
<div class="wine-price">${c(b)} ${Z.getCurrency("label")}</div>
|
|
7711
|
+
<h3 class="wine-title">${d}</h3>
|
|
7645
7712
|
</div>
|
|
7646
7713
|
|
|
7647
|
-
${
|
|
7714
|
+
${E ? `<div class="wine-params">${E}</div>` : ""}
|
|
7648
7715
|
|
|
7649
7716
|
<div class="bottom-row">
|
|
7650
|
-
${
|
|
7717
|
+
${w ? `<a class="buy-btn" href="${w}" target="_blank">${Z.translate("wineDetails.buy")}</a>` : `<button class="buy-btn" data-toggle-info>${Z.translate("moreInfo")}</button>`}
|
|
7651
7718
|
</div>
|
|
7652
7719
|
|
|
7653
7720
|
<div class="card-popup hidden">
|
|
7654
7721
|
<div class="card-popup-header">
|
|
7655
|
-
<h2>${
|
|
7722
|
+
<h2>${d}</h2>
|
|
7656
7723
|
<span class="card-popup-close">×</span>
|
|
7657
7724
|
</div>
|
|
7658
|
-
${
|
|
7659
|
-
${
|
|
7660
|
-
${
|
|
7725
|
+
${A ? `<p>${A}</p>` : ""}
|
|
7726
|
+
${u.reason ? `<div class="popup-reason">${u.reason}</div>` : k ? `<p>${k}</p>` : ""}
|
|
7727
|
+
${O ? `<div class="popup-tags">${O}</div>` : ""}
|
|
7661
7728
|
</div>
|
|
7662
7729
|
|
|
7663
|
-
${
|
|
7730
|
+
${B}
|
|
7664
7731
|
</div>
|
|
7665
7732
|
`;
|
|
7666
|
-
s.insertAdjacentHTML("beforeend",
|
|
7667
|
-
const
|
|
7668
|
-
if (!
|
|
7669
|
-
const
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
}), document.addEventListener("click", (
|
|
7673
|
-
|
|
7674
|
-
}),
|
|
7675
|
-
var
|
|
7676
|
-
if (
|
|
7677
|
-
const
|
|
7678
|
-
|
|
7733
|
+
s.insertAdjacentHTML("beforeend", R);
|
|
7734
|
+
const M = s.children[a];
|
|
7735
|
+
if (!w) {
|
|
7736
|
+
const I = M.querySelector("[data-toggle-info]"), T = M.querySelector(".card-popup"), F = M.querySelector(".card-popup-close");
|
|
7737
|
+
F == null || F.addEventListener("click", (U) => {
|
|
7738
|
+
U.stopPropagation(), T.classList.add("hidden");
|
|
7739
|
+
}), document.addEventListener("click", (U) => {
|
|
7740
|
+
U.target.closest(".card-popup") || U.target.closest(".mobile-fullscreen-popup") || U.target.closest("[data-toggle-info]") || (document.querySelectorAll(".card-popup").forEach((z) => z.classList.add("hidden")), document.querySelectorAll(".mobile-fullscreen-wrapper").forEach((z) => z.remove()));
|
|
7741
|
+
}), I == null || I.addEventListener("click", (U) => {
|
|
7742
|
+
var j;
|
|
7743
|
+
if (U.stopPropagation(), document.querySelectorAll(".card-popup").forEach((z) => z.classList.add("hidden")), document.querySelectorAll(".mobile-fullscreen-wrapper").forEach((z) => z.remove()), window.innerWidth <= 768) {
|
|
7744
|
+
const z = T.innerHTML, C = document.createElement("div");
|
|
7745
|
+
C.className = "mobile-fullscreen-wrapper", C.innerHTML = `
|
|
7679
7746
|
<div class="mobile-fullscreen-overlay"></div>
|
|
7680
|
-
<div class="card-popup mobile-fullscreen-popup">${
|
|
7681
|
-
`, (
|
|
7747
|
+
<div class="card-popup mobile-fullscreen-popup">${z}</div>
|
|
7748
|
+
`, (j = C.querySelector(".card-popup-close")) == null || j.addEventListener("click", () => C.remove()), document.body.appendChild(C);
|
|
7682
7749
|
} else
|
|
7683
|
-
|
|
7750
|
+
T.classList.remove("hidden");
|
|
7684
7751
|
});
|
|
7685
7752
|
}
|
|
7686
7753
|
setTimeout(() => {
|
|
7687
|
-
|
|
7688
|
-
}, n ?
|
|
7754
|
+
M.style.opacity = "1", M.style.transform = "translateY(0)";
|
|
7755
|
+
}, n ? a * 200 : 0);
|
|
7689
7756
|
}), this.widgetType === "store" && this.enableHoverPopups();
|
|
7690
7757
|
}
|
|
7691
7758
|
animateCardDisappearance() {
|
|
@@ -7731,14 +7798,14 @@ class ba {
|
|
|
7731
7798
|
}
|
|
7732
7799
|
initializeSearchAnimation() {
|
|
7733
7800
|
const e = document.getElementById("wine-search-input"), n = Z.translate("placeholderSuggestions");
|
|
7734
|
-
let s = 0, i = 0, r = !0,
|
|
7801
|
+
let s = 0, i = 0, r = !0, o = !1;
|
|
7735
7802
|
const l = () => {
|
|
7736
|
-
|
|
7803
|
+
o || (r ? (e.placeholder = n[s].substring(0, i++), i > n[s].length ? (r = !1, setTimeout(l, 2e3)) : setTimeout(l, 100)) : (e.placeholder = n[s].substring(0, i--), i < 0 ? (r = !0, s = (s + 1) % n.length, setTimeout(l, 500)) : setTimeout(l, 50)));
|
|
7737
7804
|
};
|
|
7738
7805
|
l(), e.addEventListener("focus", () => {
|
|
7739
|
-
e.placeholder = "",
|
|
7806
|
+
e.placeholder = "", o = !0;
|
|
7740
7807
|
}), e.addEventListener("blur", () => {
|
|
7741
|
-
|
|
7808
|
+
o = !1, i = 0, r = !0, l();
|
|
7742
7809
|
});
|
|
7743
7810
|
}
|
|
7744
7811
|
}
|