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.
@@ -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
- B(m.next(q));
78
- } catch (O) {
79
- S(O);
77
+ P(m.next(q));
78
+ } catch (N) {
79
+ S(N);
80
80
  }
81
81
  }
82
82
  function D(q) {
83
83
  try {
84
- B(m.throw(q));
85
- } catch (O) {
86
- S(O);
84
+ P(m.throw(q));
85
+ } catch (N) {
86
+ S(N);
87
87
  }
88
88
  }
89
- function B(q) {
90
- var O;
91
- q.done ? g(q.value) : (O = q.value, O instanceof h ? O : new h(function(W) {
92
- W(O);
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
- B((m = m.apply(v, f || [])).next());
95
+ P((m = m.apply(v, f || [])).next());
96
96
  });
97
97
  }
98
- function a(v, f) {
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(B) {
107
+ function D(P) {
108
108
  return function(q) {
109
- return function(O) {
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 & O[0] ? m.return : O[0] ? m.throw || ((g = m.return) && g.call(m), 0) : m.next) && !(g = g.call(m, O[1])).done)
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 && (O = [2 & O[0], g.value]), O[0]) {
116
+ switch (m = 0, g && (N = [2 & N[0], g.value]), N[0]) {
117
117
  case 0:
118
118
  case 1:
119
- g = O;
119
+ g = N;
120
120
  break;
121
121
  case 4:
122
- return x.label++, { value: O[1], done: !1 };
122
+ return x.label++, { value: N[1], done: !1 };
123
123
  case 5:
124
- x.label++, m = O[1], O = [0];
124
+ x.label++, m = N[1], N = [0];
125
125
  continue;
126
126
  case 7:
127
- O = x.ops.pop(), x.trys.pop();
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]) || O[0] !== 6 && O[0] !== 2)) {
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 (O[0] === 3 && (!g || O[1] > g[0] && O[1] < g[3])) {
135
- x.label = O[1];
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 (O[0] === 6 && x.label < g[1]) {
139
- x.label = g[1], g = O;
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(O);
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
- O = f.call(v, x);
149
+ N = f.call(v, x);
150
150
  } catch (W) {
151
- O = [6, W], m = 0;
151
+ N = [6, W], m = 0;
152
152
  } finally {
153
153
  h = g = 0;
154
154
  }
155
- if (5 & O[0])
156
- throw O[1];
157
- return { value: O[0] ? O[1] : void 0, done: !0 };
158
- }([B, q]);
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 o = function v(f, h) {
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 !o(g, S);
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 c, d;
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
- })(c || (c = {}));
232
- var E, R = null, j = "BULLET_TRAIN_DB", A = "BULLET_TRAIN_EVENT", k = "https://edge.api.flagsmith.com/api/v1/", C = "flagsmith_value_", _ = "flagsmith_enabled_", M = "flagsmith_trait_", I = function() {
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(B) {
239
- var q, O, W, ee;
240
- if (B && x === "".concat(h.getContext().identity)) {
241
- var oe = B.flags, te = B.traits, ne = B.identifier;
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, c.SERVER)), h.datadogRum)
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(((O = h.evaluationContext.identity) === null || O === void 0 ? void 0 : O.traits) || {}).map(function(K) {
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, C + K, h.getValue(K, { skipAnalytics: !0 })), p(se, _ + K, h.hasFeature(K, { skipAnalytics: !0 }));
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(B) {
277
- var q = B[0], O = B[1];
278
- return { trait_key: q, trait_value: O == null ? void 0 : O.value, transient: O == null ? void 0 : O.transient };
279
- }).filter(function(B) {
280
- return B.trait_value !== void 0 || (h.log("Warning - attempted to set an undefined trait value for key", B.trait_key), !1);
281
- }) })) : h.getJSON(g + "identities/?identifier=" + encodeURIComponent(S.identity.identifier) + (S.identity.transient ? "&transient=true" : ""))]).then(function(B) {
282
- return h.evaluationContext.identity = i(i({}, h.evaluationContext.identity), { traits: {} }), D(B == null ? void 0 : B[0]);
283
- }).catch(function(B) {
284
- var q = B.message, O = new Error(q);
285
- return Promise.reject(O);
286
- }) : h.getJSON(g + "flags/").then(function(B) {
287
- return D({ flags: B, traits: void 0 });
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: c.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) {
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 B = 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"), B && Object.assign(q.headers, B), d || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
347
- var O = "".concat((x = h.evaluationContext.identity) === null || x === void 0 ? void 0 : x.identifier);
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 (O === te) {
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(O, ", Current: ").concat(te));
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(C + m, h.getValue(m, {}, !0)) : h.datadogRum.client.addFeatureFlagEvaluation(_ + m, h.hasFeature(m, !0)) : console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")), h.enableAnalytics) {
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 && (R = 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, B, q, O, W, ee, oe, te, ne, ae, ce, ge, Ge, Ke, Me, se, K, Ct, Je, Pn, Xe, _t, Bn, jn, Nt, zn, Ot, Ye, Fe, Un, ie = this;
388
- return a(this, function(fe) {
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, B = D === void 0 ? k : D, q = f.headers, O = 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)
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 = B, this.headers = q, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = O, 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) {
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 = R !== void 0 && !!W, K && (R = 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: c.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) {
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, Le = ve.body;
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, Le, { headers: Te }).subscribe(function(xe) {
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)), R && this.canUseStorage && R.getItem(A).then(function(le) {
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), R && this.canUseStorage && R.getItem(A, function(le, me) {
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 (!R || !this.canUseStorage)
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, Le, Oe, xe, Rt, Hn, Dt, At, Mt, Ft, Lt, Pt, Bt, jt, zt, Ut, Ht, $t, qt, Wt, Vt, Gt;
442
- return a(this, function(Ee) {
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), Le = !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 && ((Lt = (Ft = X.evaluationContext) === null || Ft === void 0 ? void 0 : Ft.identity) === null || Lt === void 0 ? void 0 : Lt.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 && (Le = !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))), Le ? (Rt = !ae && (!this.cacheOptions.skipAPI || Oe), this._onChange(null, { isFromServer: !1, flagsChanged: ve, traitsChanged: Te }, this._loadedState(null, c.CACHE, Rt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && Le && !Oe && this.log("Skipping API, using cache"), Rt && this.getFlags(), [3, 4]) : [3, 2];
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, c.DEFAULT_FLAGS));
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, c.DEFAULT_FLAGS));
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]), R.getItemSync ? (Ot = R.getItemSync(j), [3, 5]) : [3, 3];
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, R.getItem(j)];
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, c.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, c.DEFAULT_FLAGS)), 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 Fe = fe.sent(), this.log("Error during initialisation ", Fe), Un = Fe instanceof Error ? Fe : new Error("".concat(Fe)), (g = this.onError) === null || g === void 0 || g.call(this, Un), Fe;
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), R.setItem(j, 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
- R.setItem(A, f);
543
+ O.setItem(A, f);
544
544
  }
545
545
  }, v.prototype.setLoadingState = function(f) {
546
546
  var h;
547
- o(f, this.loadingState) || (this.loadingState = i({}, f), this.log("Loading state changed", f), (h = this._triggerLoadingState) === null || h === void 0 || h.call(this));
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, $ = (F = function(v, 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
- }), L = function(v) {
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
- }, N = function(v, f, h) {
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
- }, P = function(v) {
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 $(f, v), f;
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 P();
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(B) {
632
- m._onopen(B);
633
- }, this._eventSource.onerror = function(B) {
634
- m._onerror(B);
635
- }, this._eventSource.onmessage = function(B) {
636
- m.onmessage(B);
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 = L(Object.keys(this._listeners)), x = S.next(); !x.done; x = S.next()) {
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 (B) {
644
- f = { error: B };
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 = L(N([], z(g), !1)), x = S.next(); !x.done; x = S.next())
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] = N(N([], z(g), !1), [h], !1));
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 = {}, B = function() {
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: B, headers: { keys: function() {
709
+ }, clone: P, headers: { keys: function() {
710
710
  return S;
711
711
  }, entries: function() {
712
712
  return x;
713
- }, get: function(O) {
714
- return D[O.toLowerCase()];
715
- }, has: function(O) {
716
- return O.toLowerCase() in D;
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(O, W, ee) {
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(B());
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
- }, H = T({ AsyncStorage: s, fetch: G, eventSource: V });
728
- typeof window < "u" && (window.flagsmith = H), n.createFlagsmithInstance = function() {
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 = H, Object.defineProperty(n, "__esModule", { value: !0 });
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(a) {
738
- var l = a.data, o = l.$e$;
739
- if (o) {
740
- var u = new Error(o[0]);
741
- u.code = o[1], u.stack = o[2], i(u, null);
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 a = new re(e);
831
+ var o = new re(e);
832
832
  for (i = 1; i < e; ++i)
833
- a[i] = a[i - 1] + r[i - 1] << 1;
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 o = 15 - e;
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], c = e - t[i], d = a[t[i] - 1]++ << c, p = d | (1 << c) - 1; d <= p; ++d)
841
- l[ft[d] >> o] = u;
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[a[t[i] - 1]++] >> 15 - t[i]);
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), Fs = /* @__PURE__ */ qe(tt, 5, 0), Tn = function(t) {
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
- }, Ls = function(t, e, n) {
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 a = new de(n[0].s + 1);
899
- return a[n[0].s] = 1, { t: a, l: 1 };
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(C, _) {
902
- return C.f - _.f;
901
+ n.sort(function(_, R) {
902
+ return _.f - R.f;
903
903
  }), n.push({ s: -1, f: 25001 });
904
- var l = n[0], o = n[1], u = 0, c = 1, d = 2;
905
- for (n[0] = { s: -1, f: l.f + o.f, l, r: o }; c != i - 1; )
906
- l = n[n[u].f < n[d].f ? u++ : d++], o = n[u != c && n[u].f < n[d].f ? u++ : d++], n[c++] = { s: -1, f: l.f + o.f, l, r: o };
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[c - 1], b, 0);
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, R = 1 << E;
912
- for (r.sort(function(_, M) {
913
- return b[M.s] - b[_.s] || _.f - M.f;
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 j = r[s].s;
916
- if (b[j] > e)
917
- y += R - (1 << w - b[j]), b[j] = e;
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, a = function(o) {
938
- n[s++] = o;
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
- a(32754);
946
- r > 2 && (a(r > 10 ? r - 11 << 5 | 28690 : r - 3 << 5 | 12305), r = 0);
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 (a(i), --r; r > 6; r -= 6)
949
- a(8304);
950
- r > 2 && (a(r - 3 << 5 | 8208), r = 0);
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
- a(i);
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, a, l, o, u, c) {
968
- be(e, c++, 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, R = ln(p), j = R.c, A = R.n, k = ln(y), C = k.c, _ = k.n, M = new re(19), I = 0; I < j.length; ++I)
970
- ++M[j[I] & 31];
971
- for (var I = 0; I < C.length; ++I)
972
- ++M[C[I] & 31];
973
- for (var T = ct(M, 7), F = T.t, $ = T.l, L = 19; L > 4 && !F[an[L - 1]]; --L)
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, N = Ue(i, Ne) + Ue(r, tt) + a, P = Ue(i, p) + Ue(r, y) + a + 14 + 3 * L + Ue(M, F) + 2 * M[16] + 3 * M[17] + 7 * M[18];
976
- if (o >= 0 && z <= N && z <= P)
977
- return En(e, c, t.subarray(o, o + u));
978
- var V, G, H, v;
979
- if (be(e, c, 1 + (P < N)), c += 2, P < N) {
980
- V = qe(p, b, 0), G = p, H = qe(y, E, 0), v = y;
981
- var f = qe(F, $, 0);
982
- be(e, c, A - 257), be(e, c + 5, _ - 1), be(e, c + 10, L - 4), c += 14;
983
- for (var I = 0; I < L; ++I)
984
- be(e, c + 3 * I, F[an[I]]);
985
- c += 3 * L;
986
- for (var h = [j, C], m = 0; m < 2; ++m)
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, c, f[S]), c += F[S], S > 15 && (be(e, c, g[I] >> 5 & 127), c += g[I] >> 12);
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, H = Fs, v = tt;
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, c, V[S + 257]), c += G[S + 257], S > 7 && (be(e, c, x >> 23 & 31), c += kt[S]);
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, c, H[D]), c += v[D], D > 3 && (ze(e, c, x >> 5 & 8191), c += Tt[D]);
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, c, V[x]), c += G[x];
1001
+ ze(e, a, V[x]), a += G[x];
1002
1002
  }
1003
- return ze(e, c, V[256]), c + G[256];
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 a = r.z || t.length, l = new de(s + a + 5 * (1 + Math.ceil(a / 7e3)) + i), o = l.subarray(s, l.length - i), u = r.l, c = (r.r || 0) & 7;
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
- c && (o[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), R = Math.ceil(n / 3), j = 2 * R, A = function(ne) {
1009
- return (t[ne] ^ t[ne + 1] << R ^ t[ne + 2] << j) & w;
1010
- }, k = new xt(25e3), C = new re(288), _ = new re(32), M = 0, I = 0, T = r.i || 0, F = 0, $ = r.w || 0, L = 0; T + 2 < a; ++T) {
1011
- var z = A(T), N = T & 32767, P = E[z];
1012
- if (y[N] = P, E[z] = N, $ <= T) {
1013
- var V = a - T;
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
- c = un(t, o, 0, k, C, _, I, F, L, T - L, c), F = M = I = 0, L = T;
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 H = 2, v = 0, f = b, h = N - P & 32767;
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 && N != P; ) {
1024
- if (t[T + H] == t[T + H - h]) {
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 > H) {
1028
- if (H = x, v = h, x > m)
1027
+ if (x > $) {
1028
+ if ($ = x, v = h, x > m)
1029
1029
  break;
1030
- for (var D = Math.min(h, x - 2), B = 0, G = 0; G < D; ++G) {
1031
- var q = T - h + G & 32767, O = y[q], W = q - O & 32767;
1032
- W > B && (B = W, P = q);
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
- N = P, P = y[N], h += N - P & 32767;
1036
+ C = L, L = y[C], h += C - L & 32767;
1037
1037
  }
1038
1038
  if (v) {
1039
- k[F++] = 268435456 | dt[H] << 18 | cn[v];
1040
- var ee = dt[H] & 31, oe = cn[v] & 31;
1041
- I += kt[ee] + Tt[oe], ++C[257 + ee], ++_[oe], $ = T + H, ++M;
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], ++C[t[T]];
1043
+ k[F++] = t[T], ++_[t[T]];
1044
1044
  }
1045
1045
  }
1046
- for (T = Math.max(T, $); T < a; ++T)
1047
- k[F++] = t[T], ++C[t[T]];
1048
- c = un(t, o, u, k, C, _, I, F, L, T - L, c), u || (r.r = c & 7 | o[c / 8 | 0] << 3, c -= 7, r.h = E, r.p = y, r.i = T, r.w = $);
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 < a + u; T += 65535) {
1050
+ for (var T = r.w || 0; T < o + u; T += 65535) {
1051
1051
  var te = T + 65535;
1052
- te >= a && (o[c / 8 | 0] = u, te = a), c = En(o, c + 1, t.subarray(T, 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 = a;
1054
+ r.i = o;
1055
1055
  }
1056
- return Ls(l, 0, s + Tn(c) + i);
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), a = new de(r.length + t.length);
1079
- a.set(r), a.set(t, r.length), t = a, i.w = r.length;
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(","), a = 0; a < s.length; ++a) {
1091
- var l = s[a], o = r[a];
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 += ";" + o + "=";
1093
+ e += ";" + c + "=";
1094
1094
  var u = l.toString();
1095
1095
  if (l.prototype)
1096
1096
  if (u.indexOf("[native code]") != -1) {
1097
- var c = u.indexOf(" ", 8) + 1;
1098
- e += u.slice(c, u.indexOf("(", c));
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 += ";" + o + ".prototype." + d + "=" + l.prototype[d].toString();
1102
+ e += ";" + c + ".prototype." + d + "=" + l.prototype[d].toString();
1103
1103
  }
1104
1104
  else
1105
1105
  e += u;
1106
1106
  } else
1107
- n[o] = l;
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 = {}, a = t.length - 1, l = 0; l < a; ++l)
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[a], i, r), e: r };
1119
+ nt[n] = { c: Wn(t[o], i, r), e: r };
1120
1120
  }
1121
- var o = 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, o, ki(o), s);
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, Fs, tt, ft, Bs, In, qe, be, ze, ct, pt, ln, Ue, En, un, Tn, Ls, js, Cn, _i, Hs];
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 a = Ti(n, s, i, function(l, o) {
1131
- a.terminate(), r(l, o);
1130
+ var o = Ti(n, s, i, function(l, c) {
1131
+ o.terminate(), r(l, c);
1132
1132
  });
1133
- return a.postMessage([t, e], e.consume ? [t.buffer] : []), function() {
1134
- a.terminate();
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((a) => {
1232
- a.filters.forEach((o) => {
1231
+ i.forEach((o) => {
1232
+ o.filters.forEach((c) => {
1233
1233
  let u;
1234
- o.type === "fetch" ? (u = {
1234
+ c.type === "fetch" ? (u = {
1235
1235
  type: "network_request",
1236
1236
  subConditions: [],
1237
- name: a.name
1238
- }, o.filters.forEach((c) => {
1239
- const d = this.createConditionFromFilter(c);
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(o), u && (u.type === "session_duration" && this.processDuration(u.value[0], a.name), r.push({ ...u, name: a.name }));
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((a) => {
1294
+ i.length ? i.every((o) => {
1295
1295
  let l;
1296
- switch (a.key) {
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 o = Pe[a.operator];
1311
- if (o && o(l, a.value))
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((a) => r(a, i.value)) && this.trigger(i.name);
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 Fi {
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((c) => {
1486
- const d = JSON.parse(c);
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, a = {
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(), o = await fetch(this.app.options.ingestPoint + "/v1/web/feature-flags", {
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(a)
1507
+ body: JSON.stringify(o)
1508
1508
  });
1509
- if (o.status === 200) {
1510
- const u = await o.json();
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((a) => {
1518
- a.is_persist && n.push(a);
1517
+ e.forEach((o) => {
1518
+ o.is_persist && n.push(o);
1519
1519
  });
1520
1520
  let s = "";
1521
- return this.diffPersist(n).forEach((a) => {
1522
- s += `${JSON.stringify(a)};`;
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((a) => a.key === r.key) === -1);
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"), Li = Se && navigator.userAgent.match(/firefox|fxios/i), Pi = 1e5;
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 a = r.message;
1604
+ const o = r.message;
1605
1605
  console.debug(
1606
1606
  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
1607
- `Openreplay: ${a}; if this error is caused by an IframeObserver, ignore it`
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 a = r.message;
1616
+ const o = r.message;
1617
1617
  console.debug(
1618
1618
  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
1619
- `Openreplay: ${a}; if this error is caused by an IframeObserver, ignore it`
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, a, l, o) {
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
- a,
1779
+ o,
1780
1780
  l,
1781
- o
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, a, l, o) {
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
- a,
1960
+ o,
1961
1961
  l,
1962
- o
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, a, l, o, u) {
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 a = () => {
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, a(), r();
2073
+ i = s = -1, o(), r();
2074
2074
  }), t.attachStopCallback(() => {
2075
2075
  i = s = void 0;
2076
- }), t.ticker.attach(a, 40, !1), document.hidden !== void 0 && t.attachEventListener(document, "visibilitychange", a, !1, !1);
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((a) => {
2085
- if (a.isIntersecting && a.target) {
2086
- const l = a.target.__or_watcher_tagname;
2087
- l && this.onTagRendered(l), this.observer.unobserve(a.target);
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
- }, Fr = {
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
- }, Lr = {
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 = (a) => {
2374
- a.data.size > 0 && this.recordedChunks.push(a.data);
2373
+ }), this.recordedChunks = [], this.mediaRecorder.ondataavailable = (o) => {
2374
+ o.data.size > 0 && this.recordedChunks.push(o.data);
2375
2375
  }, this.mediaRecorder.start();
2376
- } catch (a) {
2377
- console.error(a);
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, a(n.pageX, n.pageY);
2423
- function a(u, c) {
2424
- let d = u - i, p = c - r;
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
- a(u.pageX, u.pageY);
2428
+ o(u.pageX, u.pageY);
2429
2429
  }
2430
2430
  document.addEventListener("mousemove", l);
2431
- const o = () => {
2432
- document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", o);
2431
+ const c = () => {
2432
+ document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", c);
2433
2433
  };
2434
- document.addEventListener("mouseup", o);
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 U(t, e, n, s, i) {
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, a, l, o, u) {
2499
- this.ingestPoint = e, this.getTimestamp = n, this.token = s, this.testId = i, this.storageKey = r, this.setStorageKey = a, this.removeStorageKey = l, this.getStorageKey = o, this.getSessionId = u, this.durations = {
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((R) => R.taskId === d), y = this.getTimestamp(), E = w ? y - w.started : 0;
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 c = this.getStorageKey(ut);
2546
- c && (this.durations.testStart = parseInt(c, 10));
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 = U("div", "bg", Er, void 0, "__or_ut_bg"), this.container = U("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 = (a, l, o) => {
2552
- this.testId = a;
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/${a}`, {
2554
+ return fetch(`${u}/v1/web/uxt/test/${o}`, {
2555
2555
  headers: {
2556
2556
  Authorization: `Bearer ${l}`
2557
2557
  }
2558
- }).then((c) => c.json()).then(({ test: c }) => {
2559
- this.isActive = !0, this.test = c, this.signalManager = new Wr(this.app.options.ingestPoint, () => this.app.timestamp(), l, a, 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(c.title, c.reqMic, c.reqCamera), o && ((c.reqMic || c.reqCamera) && this.userRecorder.startRecording(30, ds.Standard, c.reqMic, c.reqCamera), this.showWidget(c.description, c.tasks, !0), this.showTaskSection());
2560
- }).then(() => a).catch((c) => {
2561
- console.log("OR: Error fetching test", c);
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 = U("div", "title", Cr, e), r = U("div", "description", _r, `Welcome, you're here to help us improve, not to be judged. Your insights matter!
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.`), a = U("div", "button", Nr, "Read guidelines to begin");
2578
- this.removeGreeting = () => ((n || s) && this.userRecorder.startRecording(30, ds.Standard, n, s), this.container.removeChild(a), this.container.removeChild(r), this.container.removeChild(i), !1), a.onclick = () => {
2579
- var o, u, c, d;
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 = (o = this.signalManager) == null ? void 0 : o.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(((c = this.test) == null ? void 0 : c.guidelines) || "", ((d = this.test) == null ? void 0 : d.tasks) || []);
2583
- }, this.container.append(i, r, a), this.bg.appendChild(this.container), document.body.appendChild(this.bg);
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), a = this.createTasksSection(n), l = U("div", "stop_bn_or", cs, "Abort Session"), o = U("div", "stop_ct_or", { fontSize: "13px!important" });
2602
- o.style.fontSize = "13px", o.append(l), this.container.append(i, r, a, o), this.taskSection = a, this.descriptionSection = r, this.stopButton = l, this.stopButtonContainer = o, l.onclick = () => {
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 = U("div", "title", Or), n = zr(), s = U("div", "title_text", {
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 = (o) => (this.widgetVisible = o, 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" }), o), a = () => {
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 = a, i.onclick = a, jr(this.bg, n), this.collapseWidget = () => r(!1), e;
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 = U("div", "description_section_or", He), s = U("div", "description_s_title_or", rs), i = U("div", "title", {
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 = U("div", "icon", os, "-"), a = U("div", "content", Be), l = U("div", "text_description", {
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 o = U("div", "button_begin_or", as, "Begin Test");
2641
- s.append(i, r), a.append(l, o), n.append(s, a);
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(a.style, this.widgetGuidelinesVisible ? Be : { display: "none" });
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(a.style, this.widgetGuidelinesVisible ? Be : { display: "none" }), a.removeChild(o);
2647
- }, o.onclick = () => {
2648
- var c, d, p;
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 = (c = this.signalManager) == null ? void 0 : c.getDurations(), w = b ? b.tasks.findIndex((y) => this.test && y.taskId === this.test.tasks[0].task_id) : null;
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(), a.removeChild(o);
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 = U("div", "task_section_or", He), s = U("div", "description_t_title_or", rs), i = U("div", "title", {
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 = U("div", "icon", os, "-"), a = U("div", "content", Be), l = U("div", "pagination", Dr), o = U("div", "taskCard", us), u = U("div", "taskText", hs), c = U("div", "taskDescription", Mr), d = U("div", "taskButtons", Lr), p = U("div", "taskText", hs);
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 = U("textarea", "taskDescription", {
2667
+ const b = H("textarea", "taskDescription", {
2668
2668
  resize: "vertical"
2669
- }), w = U("div", "inputArea", us);
2669
+ }), w = H("div", "inputArea", us);
2670
2670
  w.append(p, b);
2671
- const y = U("div", "closePanelButton", Zs, "Collapse Panel"), E = U("div", "nextButton", Fr, "Done, Next");
2672
- s.append(i, r), o.append(u, c), d.append(y, E), a.append(l, o, w, d), n.append(s, a);
2673
- const R = () => {
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, c.textContent = k.description, k.allow_typing ? w.style.display = "flex" : w.style.display = "none";
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, C) => {
2678
- const _ = U("span", `or_task_${C}`, {
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
- }, (C + 1).toString());
2689
- _.id = `or_task_${C}`, l.append(_);
2688
+ }, (_ + 1).toString());
2689
+ R.id = `or_task_${_}`, l.append(R);
2690
2690
  });
2691
- const j = () => {
2692
- this.widgetTasksVisible = !this.widgetTasksVisible, r.textContent = this.widgetTasksVisible ? "-" : "+", Object.assign(a.style, this.widgetTasksVisible ? Be : { display: "none" });
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(a.style, {
2694
+ this.hideTaskSection = () => (r.textContent = "+", Object.assign(o.style, {
2695
2695
  display: "none"
2696
- }), this.widgetTasksVisible = !1, !1), this.showTaskSection = () => (r.textContent = "-", Object.assign(a.style, Be), this.widgetTasksVisible = !0, !0);
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 C = 0; C < this.currentTaskIndex; C++) {
2701
- const _ = document.getElementById(`or_task_${C}`);
2702
- _ && Object.assign(_.style, Ar);
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 = j, y.onclick = this.collapseWidget, E.onclick = () => {
2706
- var C, _, M, I;
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 = "", (C = this.signalManager) == null || C.signalTask(e[this.currentTaskIndex].task_id, "done", k), this.currentTaskIndex < e.length - 1) {
2709
- this.currentTaskIndex++, R();
2710
- const T = (_ = this.signalManager) == null ? void 0 : _.getDurations();
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), R(), A();
2720
+ k && Object.assign(k.style, ls), O(), A();
2721
2721
  }, 1), n;
2722
2722
  }
2723
2723
  showEndSection() {
2724
- var l, o, u, c;
2724
+ var l, c, u, a;
2725
2725
  let e = !0;
2726
2726
  (l = this.signalManager) == null || l.signalTest("done");
2727
- const n = U("div", "end_section_or", Rr), s = U("div", "end_title_or", {
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 = U("div", "end_description_or", {}, ((o = this.test) == null ? void 0 : o.conclusion) ?? `Thank you for participating in our usability test. Your feedback has been captured and will be used to enhance our website.
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 = U("div", "end_button_or", as, "Submitting Feedback"), a = $r();
2733
- r.appendChild(a), (u = this.test) != null && u.reqMic || (c = this.test) != null && c.reqCamera ? this.userRecorder.sendToAPI().then(() => {
2734
- r.removeChild(a), r.textContent = "End Session", e = !1;
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(a), r.textContent = "End Session", e = !1;
2737
- }) : (r.removeChild(a), 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 = () => {
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((o) => {
2776
- o.isIntersecting && (o.target ? this.snapshots[i] && this.snapshots[i].createdAt ? this.snapshots[i].paused = !1 : this.recordCanvas(o.target, i) : this.snapshots[i] && (this.snapshots[i].paused = !0));
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 a = wr(i.toString(), r);
2788
- this.app.send(a);
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, (c) => {
2791
- c && (this.snapshots[i].images.push({ id: this.app.timestamp(), data: c }), this.snapshots[i].images.length > 9 && (this.sendSnaps(this.snapshots[i].images, i, this.snapshots[i].createdAt), this.snapshots[i].images = []));
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
- }, o = setInterval(() => {
2794
- const u = this.app.nodes.getID(s), c = u ? this.app.nodes.getNode(u) : void 0;
2795
- !c || !Q(c, "canvas") || c !== s ? (this.app.debug.log("Canvas element not in sync"), clearInterval(o)) : this.snapshots[i].paused || (this.options.useAnimationFrame ? requestAnimationFrame(() => {
2796
- l(c);
2797
- }) : l(c));
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(o);
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 a = r.data;
2815
- a && (i.append("snapshot", a, `${s}_${n}_${r.id}.${this.fileExt}`), this.options.isDebug && Xr(a, `${s}_${n}_${r.id}.${this.fileExt}`));
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 a = `image/${i}`;
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 o = n.getContext("2d");
2841
- if (!o)
2840
+ const c = n.getContext("2d");
2841
+ if (!c)
2842
2842
  return "";
2843
- o.clearRect(0, 0, n.width, n.height), o.drawImage(t, 0, 0, n.width, n.height), n.toBlob(r, a, fs[e]);
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, a, fs[e]);
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 a = this.elementListeners.get(r);
2891
- a === void 0 && (a = [], this.elementListeners.set(r, a)), a.push([n, s, i]);
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, a = i.type;
2959
+ const r = i.target, o = i.type;
2960
2960
  if (!Qt(r))
2961
2961
  continue;
2962
- if (a === "childList") {
2963
- for (let o = 0; o < i.removedNodes.length; o++)
2964
- Qt(i.removedNodes[o]) && this.bindNode(i.removedNodes[o]);
2965
- for (let o = 0; o < i.addedNodes.length; o++)
2966
- this.bindTree(i.addedNodes[o]);
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), a === "attributes") {
2972
- const o = i.attributeName;
2973
- if (o === null)
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(o);
2976
+ u === void 0 && this.attributesMap.set(l, u = /* @__PURE__ */ new Set()), u.add(c);
2977
2977
  continue;
2978
2978
  }
2979
- if (a === "characterData") {
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 a = Math.floor(i / r * 100);
3053
- a > 30 && this.app.send(yr(a));
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 c = this.app.nodes.getID(r);
3075
- if (c !== void 0) {
3076
- this.commitNode(c), this.indexes[e] = this.indexes[c] + 1;
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 a = this.recents.get(e), l = a === ye.New, o = this.indexes[e];
3083
- if (o === void 0)
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 c = n;
3087
+ let a = n;
3088
3088
  if (i !== void 0) {
3089
3089
  if (this.app.sanitizer.isHidden(e)) {
3090
- const d = c.clientWidth, p = c.clientHeight;
3091
- c = n.cloneNode(), c.style.width = `${d}px`, c.style.height = `${p}px`;
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, o, c.tagName, bn(n)));
3093
+ this.app.send(Gi(e, i, c, a.tagName, bn(n)));
3094
3094
  }
3095
- for (let d = 0; d < c.attributes.length; d++) {
3096
- const p = c.attributes[d];
3097
- this.sendNodeAttribute(e, c, p.nodeName, p.value);
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, o)), this.sendNodeData(e, s, n.data));
3100
+ yn(n) && (this.app.send(Ki(e, i, c)), this.sendNodeData(e, s, n.data));
3101
3101
  return !0;
3102
3102
  }
3103
- a === ye.Removed && i !== void 0 && this.app.send(Ji(e, i, o));
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 c of u)
3109
- this.sendNodeAttribute(e, n, c, n.getAttribute(c));
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: a, top: l } = e.iFrame.getBoundingClientRect();
3188
- e.offset = [a, l];
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 o;
3208
- s.removeEventListener("scroll", a), (o = s.defaultView) == null || o.removeEventListener("resize", a);
3207
+ var c;
3208
+ s.removeEventListener("scroll", o), (c = s.defaultView) == null || c.removeEventListener("resize", o);
3209
3209
  }
3210
- }, a = () => {
3210
+ }, o = () => {
3211
3211
  r.offset = null;
3212
3212
  };
3213
- s.addEventListener("scroll", a), (l = s.defaultView) == null || l.addEventListener("resize", a), this.states.set(n, r);
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, a = e.contentDocument;
3242
- if (a && a !== n) {
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 = a, this.iframeOffsets.observe(e);
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("@"), [a, l] = r.split(".");
3298
- return `${Jt(i)}@${Jt(a)}.${Jt(l)}`;
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 o;
3443
- (o = this.canvasRecorder) == null || o.restartTracking();
3444
- }, this.flushBuffer = async (o) => new Promise((u) => {
3445
- let c = !1;
3446
- const d = [o.shift()];
3447
- for (; !c; ) {
3448
- const p = o[0];
3449
- !p || p[0] === 0 ? c = !0 : d.push(o.shift());
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((o) => ["fixedCanvasScaling", "disableCanvas"].includes(o)) !== -1 && (console.warn('Openreplay: canvas options are moving to separate key "canvas" in next update. Please update your configuration.'), s = {
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 a = {
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(a, s), !this.insideIframe && !this.options.forceSingleTab && globalThis && "BroadcastChannel" in globalThis) {
3495
- const o = location.hostname.split(".").slice(-2).join("_");
3496
- this.bc = new BroadcastChannel(`rick_${o}`);
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 Fi(this), this.tagWatcher = new Tr(this.sessionStorage, this.debug.error, (o) => {
3499
- this.send(Sr(o));
3500
- }), this.session.attachUpdateCallback(({ userID: o, metadata: u }) => {
3501
- o != null && this.send(or(o)), u != null && Object.entries(u).forEach(([c, d]) => this.send(Qn(c, d)));
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 o = (c) => {
3506
- const { data: d } = c;
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", o), this.attachStopCallback(() => {
3510
- window.removeEventListener("message", o);
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 o = 0;
3521
- const u = (c) => {
3522
- const { data: d } = c;
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
- o++;
3533
- const R = this.session.getSessionToken(), j = {
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: R,
3539
- frameOrderNumber: o
3538
+ token: O,
3539
+ frameOrderNumber: c
3540
3540
  };
3541
- this.debug.log("iframe_data", j), (A = c.source) == null || A.postMessage(j, "*");
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 === c.data.domain) {
3555
- const [R, j, A] = w, { left: k, top: C } = E.getBoundingClientRect();
3556
- y = [R, j + k, A + C];
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 === c.data.domain) {
3564
- const [R, j, A, k, C, _, M] = w, { left: I, top: T, width: F, height: $ } = E.getBoundingClientRect(), L = document.documentElement.scrollWidth, z = document.documentElement.scrollHeight, N = _ / 100 * F + I, P = M / 100 * $ + T, V = N / L, G = P / z;
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
- R,
3567
- j,
3566
+ O,
3567
+ B,
3568
3568
  A,
3569
3569
  k,
3570
- C,
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 = (o) => {
3593
- if (o.data.context !== this.contextId) {
3594
- if (o.data.line === ue.resp) {
3595
- const u = o.data.token;
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 (o.data.line === ue.reg) {
3599
- const u = o.data.token;
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 (o.data.line === ue.ask) {
3602
+ if (c.data.line === ue.ask) {
3603
3603
  const u = this.session.getSessionToken();
3604
3604
  u && this.bc && this.bc.postMessage({
3605
- line: o.data.source === l ? ue.reg : ue.resp,
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, a) => {
3651
- var l, o;
3652
- r ? (this.debug.error("Openreplay compression error:", r), (l = this.worker) == null || l.postMessage({ type: "uncompressed", batch: s })) : (o = this.worker) == null || o.postMessage({ type: "compressed", batch: a });
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 a = () => e ? Ks(e, n, s, r) : null, l = () => e ? Js(e, n, s, r) : null;
3744
- this.attachStartCallback(a, i), this.attachStopCallback(l, i);
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, o = (/api\.openreplay\.com/.test(r) ? "https://app.openreplay.com/ingest" : r).replace(/ingest$/, `${n}/session/${s}`);
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 `${o}?jumpto=${u}`;
3789
+ return `${c}?jumpto=${u}`;
3790
3790
  }
3791
- return o;
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: a,
3866
+ userCountry: o,
3867
3867
  userDevice: l,
3868
- userOS: o,
3868
+ userOS: c,
3869
3869
  userState: u,
3870
- projectID: c
3870
+ projectID: a
3871
3871
  } = await n.json();
3872
- this.session.assign({ projectID: c }), this.session.setUserInfo({
3872
+ this.session.assign({ projectID: a }), this.session.setUserInfo({
3873
3873
  userBrowser: i,
3874
3874
  userCity: r,
3875
- userCountry: a,
3875
+ userCountry: o,
3876
3876
  userDevice: l,
3877
- userOS: o,
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(c, s)), await this.featureFlags.reloadFlags(s), await this.tagWatcher.fetchTags(this.options.ingestPoint, s), (b = this.conditionsManager) == null || b.processFlags(this.featureFlags.flags);
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 a = JSON.parse(i);
3895
- this.bufferedMessages1 = Array.isArray(a) ? a : this.bufferedMessages1, this.localStorage.removeItem(en);
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((a) => a(r)), s || this.send(lt(this.session.getTabId())), this.observer.observe(), this.ticker.start(), {
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: a, userDevice: l, userOS: o, userState: u, beaconSizeLimit: c, projectID: d } = await n.json();
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: c
3971
+ beaconSizeLimit: a
3972
3972
  }), this.session.assign({ projectID: d }), this.session.setUserInfo({
3973
3973
  userBrowser: i,
3974
3974
  userCity: r,
3975
- userCountry: a,
3975
+ userCountry: o,
3976
3976
  userDevice: l,
3977
- userOS: o,
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 o = "No worker found: perhaps, CSP is not set.";
3987
- return this.signalError(o, []), Promise.resolve(Ce(o));
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 a = 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: ", a);
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 o = await window.fetch(this.options.ingestPoint + "/v1/web/start", {
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 : a,
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 (o.status !== 200) {
4032
- const N = await o.text(), P = N === Qe ? Qe : `Server error: ${o.status}. ${N}`;
4033
- return Ce(P);
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 N = "no worker found after start request (this should not happen in real world)";
4037
- return this.signalError(N, []), Ce(N);
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: c,
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: R,
4053
- userCity: j,
4052
+ userBrowser: O,
4053
+ userCity: B,
4054
4054
  userCountry: A,
4055
4055
  userDevice: k,
4056
- userOS: C,
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 o.json();
4063
- if (typeof u != "string" || typeof c != "string" || typeof E != "number" && typeof E < "u" || typeof y != "string" || typeof w != "number" || typeof p != "number" && typeof p < "u") {
4064
- const N = `Incorrect server response: ${JSON.stringify(o)}`;
4065
- return this.signalError(N, []), Ce(N);
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: R,
4069
- userCity: j,
4068
+ userBrowser: O,
4069
+ userCity: B,
4070
4070
  userCountry: A,
4071
4071
  userDevice: k,
4072
- userOS: C,
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 === a && (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(lt(this.session.getTabId()))), Object.entries(this.session.getInfo().metadata).forEach(([N, P]) => this.send(Qn(N, P))), this.localStorage.setItem(this.options.local_uuid_key, c), this.compressionThreshold = b;
4083
- const $ = { sessionToken: u, userUUID: c, sessionID: y };
4084
- if (this.startCallbacks.forEach((N) => N($)), 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, {
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 N = this.bufferedMessages1.length > this.bufferedMessages2.length ? this.bufferedMessages1 : this.bufferedMessages2;
4092
- for (; N.length > 0; )
4093
- await this.flushBuffer(N);
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 L;
4098
+ let j;
4099
4099
  const z = this.localStorage.getItem(gs);
4100
- if (z && (L = parseInt(z, 10)), location != null && location.search) {
4101
- const N = new URLSearchParams(location.search);
4102
- if (N.has("oruxt")) {
4103
- const P = N.get("oruxt");
4104
- L = P ? parseInt(P, 10) : void 0;
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 L && (this.uxtManager.isActive ? this.onUxtCb.forEach((N) => N(L)) : this.uxtManager.getTest(L, u, !!z).then((N) => {
4108
- N && this.onUxtCb.forEach((P) => P(N));
4109
- })), ao($);
4110
- } catch (o) {
4111
- if (this.stop(), this.session.reset(), o === Qe)
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", o);
4114
- const u = o instanceof Error ? o.message : o.toString();
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((o, u) => t.send(nr(o, po(u))));
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 a = (o, u) => {
4261
- const c = {
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
- o[d] = new Proxy(p, c);
4272
+ c[d] = new Proxy(p, a);
4273
4273
  });
4274
- }, l = t.safe((o) => a(o.console, o));
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"], a = ["columnNumber", "lineNumber"], l = ["fileName", "functionName", "source"], o = ["args"], u = ["evalOrigin"], c = r.concat(a, l, o, u);
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 < c.length; E++)
4298
- y[c[E]] !== void 0 && this["set" + s(c[E])](y[c[E]]);
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() || "", R = this.getColumnNumber() || "", j = this.getFunctionName() || "";
4322
- return this.getIsEval() ? y ? "[eval] (" + y + ":" + E + ":" + R + ")" : "[eval]:" + E + ":" + R : j ? j + " (" + y + ":" + E + ":" + R + ")" : y + ":" + E + ":" + R;
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 R = E.indexOf("("), j = E.lastIndexOf(")"), A = E.substring(0, R), k = E.substring(R + 1, j).split(","), C = E.substring(j + 1);
4326
- if (C.indexOf("@") === 0)
4327
- var _ = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(C, ""), M = _[1], I = _[2], T = _[3];
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 < a.length; b++)
4343
- d.prototype["get" + s(a[b])] = i(a[b]), d.prototype["set" + s(a[b])] = /* @__PURE__ */ function(y) {
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
- }(a[b]);
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, a = /^(eval@)?(\[native code])?$/;
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(o) {
4373
- if (typeof o.stacktrace < "u" || typeof o["opera#sourceloc"] < "u")
4374
- return this.parseOpera(o);
4375
- if (o.stack && o.stack.match(r))
4376
- return this.parseV8OrIE(o);
4377
- if (o.stack)
4378
- return this.parseFFOrSafari(o);
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(o) {
4383
- if (o.indexOf(":") === -1)
4384
- return [o];
4385
- var u = /(.+?)(?::(\d+))?(?::(\d+))?$/, c = u.exec(o.replace(/[()]/g, ""));
4386
- return [c[1], c[2] || void 0, c[3] || void 0];
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(o) {
4389
- var u = o.stack.split(`
4390
- `).filter(function(c) {
4391
- return !!c.match(r);
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(c) {
4394
- c.indexOf("(eval ") > -1 && (c = c.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(,.*$)/g, ""));
4395
- var d = c.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, ""), p = d.match(/ (\(.+\)$)/);
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: c
4403
+ source: a
4404
4404
  });
4405
4405
  }, this);
4406
4406
  },
4407
- parseFFOrSafari: function(o) {
4408
- var u = o.stack.split(`
4409
- `).filter(function(c) {
4410
- return !c.match(a);
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(c) {
4413
- if (c.indexOf(" > eval") > -1 && (c = c.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), c.indexOf("@") === -1 && c.indexOf(":") === -1)
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: c
4415
+ functionName: a
4416
4416
  });
4417
- var d = /((.*".+"[^@]*)?[^@]*)(?:@)/, p = c.match(d), b = p && p[1] ? p[1] : void 0, w = this.extractLocation(c.replace(d, ""));
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: c
4423
+ source: a
4424
4424
  });
4425
4425
  }, this);
4426
4426
  },
4427
- parseOpera: function(o) {
4428
- return !o.stacktrace || o.message.indexOf(`
4429
- `) > -1 && o.message.split(`
4430
- `).length > o.stacktrace.split(`
4431
- `).length ? this.parseOpera9(o) : o.stack ? this.parseOpera11(o) : this.parseOpera10(o);
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(o) {
4434
- for (var u = /Line (\d+).*script (?:in )?(\S+)/i, c = o.message.split(`
4435
- `), d = [], p = 2, b = c.length; p < b; p += 2) {
4436
- var w = u.exec(c[p]);
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: c[p]
4440
+ source: a[p]
4441
4441
  }));
4442
4442
  }
4443
4443
  return d;
4444
4444
  },
4445
- parseOpera10: function(o) {
4446
- for (var u = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, c = o.stacktrace.split(`
4447
- `), d = [], p = 0, b = c.length; p < b; p += 2) {
4448
- var w = u.exec(c[p]);
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: c[p]
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(o) {
4462
- var u = o.stack.split(`
4463
- `).filter(function(c) {
4464
- return !!c.match(i) && !c.match(/^Error created at/);
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(c) {
4467
- var d = c.split("@"), p = this.extractLocation(d.pop()), b = d.shift() || "", w = b.replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0, y;
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: c
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(a) {
4533
- const l = ii(a, i);
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 Li && (t.startsWith("data:image/svg+xml") || t.match(/.svg$|/i));
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, o) {
4548
+ function e(l, c) {
4549
4549
  t.attributeSender.sendSetAttribute(l, "src", So);
4550
- const { width: u, height: c } = o.getBoundingClientRect();
4551
- o.hasAttribute("width") || t.attributeSender.sendSetAttribute(l, "width", String(u)), o.hasAttribute("height") || t.attributeSender.sendSetAttribute(l, "height", String(c));
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, o) {
4554
- const { srcset: u } = o;
4553
+ const n = function(l, c) {
4554
+ const { srcset: u } = c;
4555
4555
  if (!u)
4556
4556
  return;
4557
- const c = u.split(u.match(/,\s+/) ? /,\s+/ : ",").map((d) => ws(d)).join(", ");
4558
- t.attributeSender.sendSetAttribute(l, "srcset", c);
4559
- }, s = function(l, o) {
4560
- o.src.length > Pi && e(l, o), t.send(hn(l, "src", o.src, t.getBaseHref()));
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 o = ws(l.src || "");
4563
- Vs(o) && t.send(Qs(t.timestamp(), 0, 0, 0, 0, 0, o, "img", 0, !1));
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 o = t.nodes.getID(l);
4566
- o !== void 0 && l.complete && (l.naturalHeight === 0 && l.naturalWidth === 0 && !wo(l.src) ? i(l) : t.sanitizer.isHidden(o) || t.sanitizer.isObscured(o) ? e(o, l) : (s(o, l), n(o, l)));
4567
- }), a = Gs(t.safe((l) => {
4568
- for (const o of l)
4569
- if (o.type === "attributes") {
4570
- const u = o.target, c = t.nodes.getID(u);
4571
- if (c === void 0)
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
- o.attributeName === "src" && s(c, u), o.attributeName === "srcset" && n(c, u);
4573
+ c.attributeName === "src" && s(a, u), c.attributeName === "srcset" && n(a, u);
4574
4574
  }
4575
4575
  }));
4576
4576
  t.attachStopCallback(() => {
4577
- a.disconnect();
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), a.observe(l, { attributes: !0, attributeFilter: ["src", "srcset"] }));
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(c, d) {
4642
+ function s(a, d) {
4643
4643
  let p = d.value, b = n.defaultInputMode;
4644
- d.type === "password" || t.sanitizer.isHidden(c) ? b = je.Hidden : (t.sanitizer.isObscured(c) || 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);
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(c, d) {
4657
- const { value: p, mask: b } = s(c, d);
4658
- t.send(Zi(c, p, b));
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(), a = /* @__PURE__ */ new Map();
4660
+ const r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
4661
4661
  t.attachStopCallback(() => {
4662
- r.clear(), a.clear();
4662
+ r.clear(), o.clear();
4663
4663
  });
4664
- function l(c, d) {
4665
- r.get(c) !== d.value && (r.set(c, d.value), i(c, d));
4664
+ function l(a, d) {
4665
+ r.get(a) !== d.value && (r.set(a, d.value), i(a, d));
4666
4666
  }
4667
- function o(c, d) {
4668
- a.get(c) !== d && (a.set(c, d), t.send(er(c, d)));
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((c, d) => {
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
- }), a.forEach((c, d) => {
4676
+ }), o.forEach((a, d) => {
4677
4677
  const p = t.nodes.getNode(d);
4678
4678
  if (!p)
4679
- return a.delete(d);
4680
- o(d, p.checked);
4679
+ return o.delete(d);
4680
+ c(d, p.checked);
4681
4681
  });
4682
4682
  }, 3);
4683
- function u(c, d, p, b) {
4684
- const { value: w, mask: y } = s(c, d), E = ri(d);
4685
- t.send(vr(c, w, y !== 0, E, p, b));
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((c) => {
4688
- const d = t.nodes.getID(c);
4687
+ t.nodes.attachNodeCallback(t.safe((a) => {
4688
+ const d = t.nodes.getID(a);
4689
4689
  if (d !== void 0) {
4690
- if (Q(c, "select") && (i(d, c), t.nodes.attachNodeListener(c, "change", () => i(d, c))), To(c)) {
4691
- l(d, c);
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
- }, R = () => {
4698
- p !== 0 && (w = pe() - p), u(d, c, b, w), b = 0, w = 0, p = 0;
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(c, "focus", y), t.nodes.attachNodeListener(c, "input", E), t.nodes.attachNodeListener(c, "change", R);
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(c)) {
4704
- o(d, c.checked), t.nodes.attachNodeListener(c, "change", () => o(d, c.checked));
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, a = 0;
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 o = ot(Oo(r)) || ot(...Ro(r)) || ot(...Do(r)) || ot(Ao(r)) || [ks()];
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 && (o = o.concat(o.filter(sn).map((c) => rt(c, u))));
4748
+ u && (c = c.concat(c.filter(sn).map((a) => rt(a, u))));
4749
4749
  else if (e == "two")
4750
- o = o.slice(0, 1), u && (o = o.concat(o.filter(sn).map((c) => rt(c, u))));
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 [c] = o = o.slice(0, 1);
4753
- u && sn(c) && (o = [rt(c, u)]);
4752
+ const [a] = c = c.slice(0, 1);
4753
+ u && sn(a) && (c = [rt(a, u)]);
4754
4754
  } else
4755
- e == "none" && (o = [ks()], u && (o = [rt(o[0], u)]));
4756
- for (let c of o)
4757
- c.level = a;
4758
- if (i.push(o), i.length >= he.seedMinLength && (s = Ss(i, n), s))
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, a++;
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(Fo);
4849
+ const e = t.filter(Lo);
4850
4850
  return e.length > 0 ? e : null;
4851
4851
  }
4852
- function Fo(t) {
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) && Lo(i, e) && (yield i, n.visited.set(r, !0), yield* ui(i, e, n));
4879
+ ai(i) && Fo(i, e) && (yield i, n.visited.set(r, !0), yield* ui(i, e, n));
4880
4880
  }
4881
4881
  }
4882
- function Lo(t, e) {
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 C = Nn(k);
4927
- if (C !== null)
4928
- return C;
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 && (_ = t.sanitizer.getInnerTextSecure(k)), _ = _ || k.id || k.className, Ws(_).slice(0, 100);
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, a = !1, l = null, o = 0, u = {}, c = 0, d = 0, p = 0, b = 0, w;
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 R() {
4939
+ function O() {
4940
4940
  const k = b / E;
4941
- if (!c) {
4942
- c = k;
4941
+ if (!a) {
4942
+ a = k;
4943
4943
  return;
4944
4944
  }
4945
- const C = (k - c) / E;
4946
- p > 4 && C > y && t.send(br(pe())), b = 0, p = 0, c = k;
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(() => R(), E);
4949
+ w = setInterval(() => O(), E);
4950
4950
  }), t.attachStopCallback(() => {
4951
- i = -1, r = -1, a = !1, l = null, u = {}, w && clearInterval(w);
4951
+ i = -1, r = -1, o = !1, l = null, u = {}, w && clearInterval(w);
4952
4952
  });
4953
- const j = () => {
4954
- a && (t.send(tr(i, r)), a = !1);
4955
- }, A = (k, C = !1) => {
4956
- function _(I, T, F) {
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 = C ? t.attachEventListener.bind(t) : t.nodes.attachNodeListener.bind(t.nodes);
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, o = performance.now());
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, a = !0;
4966
- const $ = Math.sign(I.movementX);
4967
- b += Math.abs(I.movementX) + Math.abs(I.movementY), $ !== d && (d = $, p++);
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 $ = I.pageX, L = I.pageY, z = k.documentElement.scrollWidth, N = k.documentElement.scrollHeight, P = Es($ / z), V = Es(L / N);
4975
- j(), t.send(pr(F, l === T ? Math.round(performance.now() - o) : 0, s(T), xn(T) && !n ? _(F, T, e) : "", P, V), !0);
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(j, (e == null ? void 0 : e.trackingOffset) || 7);
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 a = "";
4992
- if (Q(r, "img") && (a = r.currentSrc || r.src), !a) {
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 && (a = y[1], (a.startsWith('"') || a.startsWith("'")) && (a = a.substr(1, a.length - 2)));
4996
+ y !== null && (o = y[1], (o.startsWith('"') || o.startsWith("'")) && (o = o.substr(1, o.length - 2)));
4997
4997
  }
4998
4998
  }
4999
- if (!a)
4999
+ if (!o)
5000
5000
  continue;
5001
- const l = a.substr(0, 10) === "data:image" ? 0 : t[a];
5001
+ const l = o.substr(0, 10) === "data:image" ? 0 : t[o];
5002
5002
  if (l === void 0)
5003
5003
  continue;
5004
- const o = r.getBoundingClientRect(), u = Math.max(o.top, 0), c = Math.max(o.left, 0), d = Math.min(o.bottom, window.innerHeight || document.documentElement && document.documentElement.clientHeight || 0), p = Math.min(o.right, window.innerWidth || document.documentElement && document.documentElement.clientWidth || 0);
5005
- if (d <= u || p <= c)
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 - c);
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: a } = e[i];
5016
- n += a, s += a * (r > t ? r : t);
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 c = !1;
5035
+ let a = !1;
5036
5036
  (d = n.excludedResourceUrls) == null || d.forEach((p) => {
5037
5037
  if (u.name.startsWith(p)) {
5038
- c = !0;
5038
+ a = !0;
5039
5039
  return;
5040
5040
  }
5041
- }), !c && t.send(Qs(
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 a;
5056
+ let o;
5057
5057
  t.attachStartCallback(function({ sessionID: u }) {
5058
- u !== a && (performance.getEntriesByType("resource").forEach(i), a = u), r.observe({ entryTypes: ["resource"] });
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, o = 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 || o === 0) && performance.getEntriesByType("paint").forEach((c) => {
5067
- const { name: d, startTime: p } = c;
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
- o = p;
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: c,
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: R
5089
+ loadEventEnd: O
5090
5090
  } = performance.timing;
5091
- t.send(sr(d - c || 0, p - c || 0, b - c || 0, w - c || 0, y - c || 0, E - c || 0, R - c || 0, l, o));
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, c = 0, d = 0, p = null, b = !1;
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 && (c = w), d = w - c > 5e3 ? null : w), p !== null && d === null || w > 3e4) {
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(o || l, p), { domContentLoadedEventEnd: E, navigationStart: R } = performance.timing, j = d === null ? Math.max(c, o, E - R || 0) : 0;
5104
- t.send(ir(y, o > u ? o : u, j));
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
- }), a = t.safe((l, o) => {
5125
- const u = t.nodes.getID(o);
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, o) => {
5131
- o && (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) => {
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 o = l.target;
5136
- if (o === document) {
5135
+ const c = l.target;
5136
+ if (c === document) {
5137
5137
  n = !0;
5138
5138
  return;
5139
5139
  }
5140
- i(o);
5140
+ i(c);
5141
5141
  }), t.ticker.attach(() => {
5142
- n && (r(), n = !1), s.forEach(a), s.clear();
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 a = t.safe(() => {
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: c } = window;
5152
- (u !== n || c !== s) && (n = u, s = c, t.send(qi(n, s)));
5153
- }), o = document.hidden === void 0 ? Function.prototype : t.safe(() => t.send(ur(document.hidden)));
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, a(), l(), o();
5156
- }), document.hidden !== void 0 && t.attachEventListener(document, "visibilitychange", o, !1, !1), t.ticker.attach(a, 1, !1), t.ticker.attach(l, 5, !1);
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 = (a) => setTimeout(() => {
5171
- let l = t.nodes.getID(a);
5172
- if (a === document && (l = 0), l === void 0)
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 o = n.get(l);
5175
- o || (o = []);
5176
- const u = [], c = a.adoptedStyleSheets;
5177
- if (c && Symbol.iterator in c)
5178
- for (const d of c) {
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)), o.includes(p) || t.send(Ys(p, l)), b) {
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 o)
5189
- for (const d of o)
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(a) {
5194
- const l = Object.getOwnPropertyDescriptor(a, "adoptedStyleSheets");
5195
- l && Object.defineProperty(a, "adoptedStyleSheets", {
5193
+ function i(o) {
5194
+ const l = Object.getOwnPropertyDescriptor(o, "adoptedStyleSheets");
5195
+ l && Object.defineProperty(o, "adoptedStyleSheets", {
5196
5196
  ...l,
5197
- set: function(o) {
5198
- const u = l.set.call(this, o);
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 = (a) => {
5204
- if (a.__openreplay_adpss_patched__)
5203
+ const r = (o) => {
5204
+ if (o.__openreplay_adpss_patched__)
5205
5205
  return;
5206
- a.__openreplay_adpss_patched__ = !0, i(a.Document.prototype), i(a.ShadowRoot.prototype);
5207
- const { replace: l, replaceSync: o } = a.CSSStyleSheet.prototype;
5208
- a.CSSStyleSheet.prototype.replace = function(u) {
5209
- return l.call(this, u).then((c) => {
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())), c;
5211
+ return d && t.send(ts(d, u, t.getBaseHref())), a;
5212
5212
  });
5213
- }, a.CSSStyleSheet.prototype.replaceSync = function(u) {
5214
- const c = e.get(this);
5215
- return c && t.send(ts(c, u, t.getBaseHref())), o.call(this, u);
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((a) => {
5223
- Is(a) && s(a);
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, a) => {
5233
+ const e = t.safe((i, r, o) => {
5234
5234
  const l = at.get(i);
5235
- l && (typeof a == "string" ? t.send(fn(l, a, r, t.getBaseHref())) : t.send(ns(l, r)));
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 a = r.parentStyleSheet;
5241
- if (!a) {
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(a);
5245
+ const l = at.get(o);
5246
5246
  if (!l) {
5247
- t.debug.warn("No sheedID found for", a, at);
5247
+ t.debug.warn("No sheedID found for", o, at);
5248
5248
  return;
5249
5249
  }
5250
- const o = r.cssText, u = a.cssRules, c = Array.from(u).indexOf(r);
5251
- c >= 0 ? (t.send(fn(l, o, c, t.getBaseHref())), t.send(ns(l, c + 1))) : t.debug.warn("Rule index not found in", a, r);
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: a } = i.CSSStyleSheet.prototype, { insertRule: l, deleteRule: o } = i.CSSGroupingRule.prototype;
5254
- i.CSSStyleSheet.prototype.insertRule = function(u, c = 0) {
5255
- return e(this, c, u), r.call(this, u, c);
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), a.call(this, u);
5258
- }, i.CSSGroupingRule.prototype.insertRule = function(u, c = 0) {
5259
- const d = l.call(this, u, c);
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 c = o.call(this, u);
5263
- return n(this), c;
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 a = i.sheet, l = hi();
5273
- at.set(a, l), t.send(Ys(l, r));
5274
- const o = a.cssRules;
5275
- for (let u = 0; u < o.length; u++)
5276
- e(a, u, o[u].cssText);
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(...a) {
5306
- if (typeof a[1] == "string") {
5305
+ constructor(...o) {
5306
+ if (typeof o[1] == "string") {
5307
5307
  let l = "";
5308
- a[2] && t.safe(() => {
5309
- l = JSON.stringify(a[2]);
5308
+ o[2] && t.safe(() => {
5309
+ l = JSON.stringify(o[2]);
5310
5310
  });
5311
- const o = [a[0], a[1], l], u = e.get(s.document) || [];
5312
- u.push(o), e.set(s.document, u);
5313
- const c = s === window ? 0 : t.nodes.getID(s.document);
5314
- if (c === void 0)
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(c, ...o));
5316
+ t.active() && t.send(Zn(a, ...c));
5317
5317
  }
5318
- super(...a);
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((a) => {
5331
- t.send(Zn(r, ...a));
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: R } = p.config, { data: j, headers: A, status: k, response: C } = p, { data: _, headers: M, status: I } = C || {}, T = n.ignoreHeaders, F = Array.isArray(T) ? (H) => T.includes(H) : () => T;
5340
- function $(H, v) {
5341
- F(v[0]) || (H[v[0]] = v[1]);
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 L = {}, z = {};
5344
- b.toJSON ? L = b.toJSON() : b instanceof Headers ? b.forEach((H, v) => $(L, [v, H])) : Array.isArray(b) ? b.forEach((H) => $(L, H)) : typeof b == "object" && Object.entries(b).forEach((H) => $(L, H));
5345
- const N = M || A;
5346
- N.toJSON ? z = N.toJSON() : N instanceof Headers ? N.forEach((H, v) => $(z, [v, H])) : Array.isArray(N) ? N.forEach((H) => $(z, H)) : typeof N == "object" && Object.entries(N).forEach(([H, v]) => {
5347
- F(H) || (z[H] = v);
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 P = s({
5349
+ const L = s({
5350
5350
  url: E,
5351
5351
  method: y || "",
5352
5352
  status: k || I || 0,
5353
5353
  request: {
5354
- headers: L,
5354
+ headers: j,
5355
5355
  body: w
5356
5356
  },
5357
5357
  response: {
5358
5358
  headers: z,
5359
- body: _ || j
5359
+ body: R || B
5360
5360
  }
5361
5361
  });
5362
- if (!P) {
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", P), t.send(vt("xhr", String(y), String(P.url), i(P.request), i(P.response), P.status, V + Ve(), G, 0));
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 a(p) {
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 o(p) {
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 c = e.interceptors.request.use(a, u, {
5385
+ const a = e.interceptors.request.use(o, u, {
5386
5386
  synchronous: !0
5387
- }), d = e.interceptors.response.use(l, o, {
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, c), (y = (w = e.interceptors.response).eject) == null || y.call(w, d);
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 : Fn(e) || Array.isArray(e) ? n = JSON.stringify(e) : typeof e < "u" && (n = Object.prototype.toString.call(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" : Fn(t) ? e = t : e = `can't parse body ${typeof t}`;
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
- Fn(e) || (e = {});
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 Fn(t) {
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((a) => {
5526
+ return this.item.responseType = "arraybuffer", s.read = () => i.apply(s).then((o) => {
5527
5527
  if (!e)
5528
- e = new Uint8Array(a.value);
5528
+ e = new Uint8Array(o.value);
5529
5529
  else {
5530
- const l = new Uint8Array(e.length + a.value.length);
5531
- l.set(e), l.set(a.value, e.length), e = l;
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 = a.done ? 4 : 3, this.item.statusText = a.done ? String(this.item.status) : "Loading", this.item.responseSize = e.length, this.item.responseSizeText = St(this.item.responseSize), a.done && (this.item.response = et(this.item.responseType, e)), a;
5534
- }), s.cancel = (...a) => (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, a)), s;
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, a) {
5540
- this.ignoredHeaders = e, this.setSessionTokenHeader = n, this.sanitize = s, this.sendMessage = i, this.isServiceUrl = r, this.tokenUrlMatcher = a;
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((o, u) => {
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(o, 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(o, u) : Array.isArray(s[1].headers) ? s[1].headers.push([o, u]) : s[1].headers[o] = u;
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((o) => {
5555
- throw l.endTime = performance.now(), l.duration = l.endTime - (l.startTime || l.endTime), o;
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", a = {};
5560
- if (typeof n == "string" ? (r = (s == null ? void 0 : s.method) || "GET", i = kn(n), a = (s == null ? void 0 : s.headers) || {}) : (r = n.method || "GET", i = kn(n.url), a = n.headers), e.method = r, e.requestType = "fetch", e.requestHeader = a, 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(a) === "[object Headers]") {
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, o] of a)
5563
- e.requestHeader[l] = o;
5562
+ for (const [l, c] of o)
5563
+ e.requestHeader[l] = c;
5564
5564
  } else
5565
- e.requestHeader = a;
5565
+ e.requestHeader = o;
5566
5566
  if (i.search && i.searchParams) {
5567
5567
  e.getData = {};
5568
- for (const [l, o] of i.searchParams)
5569
- e.getData[l] = o;
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, a) {
5597
- return new Proxy(fetch, new na(e, n, s, i, r, a));
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, a, l) {
5602
- this.ignoredHeaders = n, this.setSessionTokenHeader = s, this.sanitize = i, this.sendMessage = r, this.isServiceUrl = a, this.tokenUrlMatcher = l, this.XMLReq = e, this.XMLReq.onreadystatechange = () => {
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 a, l;
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 = ((a = r.toString) == null ? void 0 : a.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);
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(": "), a = r[0];
5706
- this.item.header[a] = r.slice(1).join(": ");
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, a) {
5722
+ static create(e, n, s, i, r, o) {
5723
5723
  return new Proxy(XMLHttpRequest, {
5724
5724
  construct(l) {
5725
- const o = new l();
5726
- return new Proxy(o, new ia(o, e, n, s, i, r, a));
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], a = new An(this.ignoredHeaders, this.setSessionTokenHeader, this.sanitize);
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 (a.method = "POST", a.url = i, a.name = (l.pathname.split("/").pop() || "") + l.search, a.requestType = "beacon", a.requestHeader = { "Content-Type": oa(r) }, a.status = 0, a.statusText = "Pending", l.search && l.searchParams) {
5742
- a.getData = {};
5743
- for (const [c, d] of l.searchParams)
5744
- a.getData[c] = d;
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
- a.requestData = Mn(r), a.startTime || (a.startTime = performance.now());
5747
- const o = e.apply(n, s);
5748
- o ? (a.endTime = performance.now(), a.duration = a.endTime - (a.startTime || a.endTime), a.status = 0, a.statusText = "Sent", a.readyState = 4) : (a.status = 500, a.statusText = "Unknown");
5749
- const u = a.getMessage();
5750
- return u && this.sendMessage(u), o;
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, a) {
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, a) : Cs("XMLHttpRequest"), t.fetch ? t.fetch = sa.create(e, n, s, i, r, a) : Cs("fetch"), (l = t == null ? void 0 : t.navigator) != null && l.sendBeacon && (t.navigator.sendBeacon = We.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) ? (c) => s.includes(c) : () => s, r = n.sessionTokenHeader === !0 ? "X-OpenReplay-SessionToken" : n.sessionTokenHeader;
5788
- function a(c) {
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(c)(r, d);
5791
+ d && t.safe(a)(r, d);
5792
5792
  }
5793
5793
  }
5794
- function l(c) {
5795
- if (n.capturePayload || (delete c.request.body, delete c.response.body), n.sanitizer) {
5796
- const d = c.response.body;
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
- c.response.body = JSON.parse(d);
5799
+ a.response.body = JSON.parse(d);
5800
5800
  } catch {
5801
5801
  }
5802
- return n.sanitizer(c);
5802
+ return n.sanitizer(a);
5803
5803
  }
5804
- return c;
5804
+ return a;
5805
5805
  }
5806
- function o(c) {
5807
- if (c && typeof c.body != "string")
5806
+ function c(a) {
5807
+ if (a && typeof a.body != "string")
5808
5808
  try {
5809
- c.body = JSON.stringify(c.body);
5809
+ a.body = JSON.stringify(a.body);
5810
5810
  } catch {
5811
- c.body = "<unable to stringify>", t.notify.warn("Openreplay fetch couldn't stringify body:", c.body);
5811
+ a.body = "<unable to stringify>", t.notify.warn("Openreplay fetch couldn't stringify body:", a.body);
5812
5812
  }
5813
- return JSON.stringify(c);
5813
+ return JSON.stringify(a);
5814
5814
  }
5815
- const u = (c) => {
5815
+ const u = (a) => {
5816
5816
  if (n.useProxy)
5817
- return ca(c, n.ignoreHeaders, a, l, (A) => t.send(A), (A) => t.isServiceURL(A), n.tokenUrlMatcher);
5818
- const d = c.fetch.bind(c), p = (A, k = {}) => {
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
- a(function(_, M) {
5822
- k.headers === void 0 && (k.headers = {}), k.headers instanceof Headers ? k.headers.append(_, M) : Array.isArray(k.headers) ? k.headers.push([_, M]) : k.headers[_] = M;
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 C = performance.now();
5825
- return d(A, k).then((_) => {
5826
- const M = performance.now() - C;
5827
- if (n.failuresOnly && _.status < 400)
5828
- return _;
5829
- const I = _.clone();
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 N = ([P, V]) => {
5834
- i(P) || (F[P] = V);
5833
+ const C = ([L, V]) => {
5834
+ i(L) || (F[L] = V);
5835
5835
  };
5836
- k.headers instanceof Headers ? k.headers.forEach((P, V) => N([V, P])) : Array.isArray(k.headers) ? k.headers.forEach(N) : typeof k.headers == "object" && Object.entries(k.headers).forEach(N), I.headers.forEach((P, V) => {
5837
- i(V) || ($[V] = P);
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 L = _s(k.method), z = l({
5840
+ const j = _s(k.method), z = l({
5841
5841
  url: String(A),
5842
- method: L,
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", L, String(z.url), o(z.request), o(z.response), I.status, C + Ve(), M, 0));
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
- c.fetch = p;
5859
- const b = c.XMLHttpRequest.prototype.open, w = c.XMLHttpRequest.prototype.setRequestHeader, y = c.XMLHttpRequest.prototype.send;
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 C = this;
5862
- a((M, I) => C.setRequestHeader(M, I));
5863
- let _ = 0;
5864
- return C.addEventListener("loadstart", (M) => {
5865
- _ = M.timeStamp;
5866
- }), C.addEventListener("load", t.safe((M) => {
5867
- const { headers: I, body: T } = on(C), F = _ > 0 ? M.timeStamp - _ : 0, L = (C.getAllResponseHeaders() || "").trim().split(/[\r\n]+/), z = {};
5868
- L.forEach(function(V) {
5869
- const G = V.split(": "), H = G.shift();
5870
- i(H) || (z[H] = G.join(": "));
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 N = _s(A), P = l({
5872
+ const C = _s(A), L = l({
5873
5873
  url: String(k),
5874
- method: N,
5875
- status: C.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: C.response
5883
+ body: _.response
5884
5884
  }
5885
5885
  });
5886
- P && t.send(vt("xhr", N, String(P.url), o(P.request), o(P.response), C.status, _ + Ve(), F, 0));
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 R(A) {
5889
+ function O(A) {
5890
5890
  const k = on(this);
5891
5891
  return k.body = A, y.apply(this, arguments);
5892
5892
  }
5893
- function j(A, k) {
5893
+ function B(A, k) {
5894
5894
  if (!i(A)) {
5895
- const C = on(this);
5896
- C.headers[A] = k;
5895
+ const _ = on(this);
5896
+ _.headers[A] = k;
5897
5897
  }
5898
5898
  return w.apply(this, arguments);
5899
5899
  }
5900
- n.axiosInstances || (c.XMLHttpRequest.prototype.open = E, c.XMLHttpRequest.prototype.send = R, c.XMLHttpRequest.prototype.setRequestHeader = j);
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((c) => {
5903
- Xo(t, c, n, l, o);
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 = (o, u) => {
5940
- const c = this.checkDoNotTrack(), d = new XMLHttpRequest(), p = this.options.ingestPoint || ti;
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: c,
5945
- reason: u.length ? `missing api: ${u.join(",")}` : o
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 = (o, u = {}) => {
5949
+ }, this.handleError = (c, u = {}) => {
5950
5950
  if (this.app !== null) {
5951
- if (o instanceof Error) {
5952
- const c = wt(o, [], u);
5953
- this.app.send(c);
5954
- } else if (o instanceof ErrorEvent || "PromiseRejectionEvent" in window && o instanceof PromiseRejectionEvent) {
5955
- const c = ii(o, void 0, u);
5956
- c != null && this.app.send(c);
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 o of i)
5983
- if (o === "timing") {
5984
- if ("performance" in window && !(o in performance)) {
5985
- s.push(o);
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 (o === "startsWith") {
5989
- if (!(o in String.prototype)) {
5990
- s.push(o);
5988
+ } else if (c === "startsWith") {
5989
+ if (!(c in String.prototype)) {
5990
+ s.push(c);
5991
5991
  break;
5992
5992
  }
5993
- } else if (!(o in window)) {
5994
- s.push(o);
5993
+ } else if (!(c in window)) {
5994
+ s.push(c);
5995
5995
  break;
5996
5996
  }
5997
5997
  if (s.length > 0) {
5998
- const o = s.join(",");
5999
- console.error(`OpenReplay: browser doesn't support API required for tracking or doNotTrack is set to 1. Reason: ${o}`), this.signalStartIssue("missing_api", s);
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 a = window.open;
6004
+ const o = window.open;
6005
6005
  (e.autoResetOnWindowOpen || e.resetTabOnWindowOpen) && (r.attachStartCallback(() => {
6006
- const o = r.getTabId(), u = r.sessionStorage ?? window.sessionStorage;
6007
- window.open = function(...c) {
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", o), a.call(window, ...c);
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 = a;
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
- `, Ln = document.createElement("link");
6983
- Ln.rel = "stylesheet";
6984
- Ln.href = "https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap";
6985
- document.head.appendChild(Ln);
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((a) => a.classList.remove("selected")), r.target.classList.add("selected"), this.selectedFilters[n] = r.target.dataset.value, this.handleSearch();
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 = (o, u) => o[u] || o[u.charAt(0).toUpperCase() + u.slice(1)], r = (o, u) => u.map((c) => i(o, c)).filter(Boolean).join(" • "), a = (o) => Array.isArray(o) ? o.map((u) => `<span class="popup-tag">${u}</span>`).join("") : "", l = (o) => {
7629
- const u = o.tags || o.Tags, c = o.reason || o["Short Description"];
7630
- return !c && !u ? "" : `
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
- ${c ? `<div class="popup-reason">${c}</div>` : ""}
7633
- ${u ? `<div class="popup-tags">${a(u)}</div>` : ""}
7696
+ ${d ? `<div class="popup-reason">${d}</div>` : ""}
7697
+ ${a ? `<div class="popup-tags">${o(a)}</div>` : ""}
7634
7698
  </div>`;
7635
7699
  };
7636
- e.forEach((o, u) => {
7637
- const c = i(o, "title"), d = i(o, "image"), p = i(o, "total"), b = i(o, "url"), w = o.tags || o.Tags, y = r(o, ["type", "country", "region", "grape"]), E = w ? a(w) : "", R = l(o), j = o["Short Description"], A = o.pairing_recommendation, k = o.isSommSelection, C = `
7638
- <div class="wine-recommendation-tile ${k ? "somm-selection" : ""}">
7639
- ${k ? `<div class="somm-selection-badge">${Z.translate("wineDetails.sommSelection")}</div>` : ""}
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
- ${d ? `<img src="${d}" alt="${c}" class="wine-image" />` : ""}
7643
- <div class="wine-price">${p} ${Z.getCurrency("label")}</div>
7644
- <h3 class="wine-title">${c}</h3>
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
- ${y ? `<div class="wine-params">${y}</div>` : ""}
7714
+ ${E ? `<div class="wine-params">${E}</div>` : ""}
7648
7715
 
7649
7716
  <div class="bottom-row">
7650
- ${b ? `<a class="buy-btn" href="${b}" target="_blank">${Z.translate("wineDetails.buy")}</a>` : `<button class="buy-btn" data-toggle-info>${Z.translate("moreInfo")}</button>`}
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>${c}</h2>
7722
+ <h2>${d}</h2>
7656
7723
  <span class="card-popup-close">&times;</span>
7657
7724
  </div>
7658
- ${j ? `<p>${j}</p>` : ""}
7659
- ${o.reason ? `<div class="popup-reason">${o.reason}</div>` : A ? `<p>${A}</p>` : ""}
7660
- ${E ? `<div class="popup-tags">${E}</div>` : ""}
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
- ${R}
7730
+ ${B}
7664
7731
  </div>
7665
7732
  `;
7666
- s.insertAdjacentHTML("beforeend", C);
7667
- const _ = s.children[u];
7668
- if (!b) {
7669
- const M = _.querySelector("[data-toggle-info]"), I = _.querySelector(".card-popup"), T = _.querySelector(".card-popup-close");
7670
- T == null || T.addEventListener("click", (F) => {
7671
- F.stopPropagation(), I.classList.add("hidden");
7672
- }), document.addEventListener("click", (F) => {
7673
- F.target.closest(".card-popup") || F.target.closest(".mobile-fullscreen-popup") || F.target.closest("[data-toggle-info]") || (document.querySelectorAll(".card-popup").forEach((L) => L.classList.add("hidden")), document.querySelectorAll(".mobile-fullscreen-wrapper").forEach((L) => L.remove()));
7674
- }), M == null || M.addEventListener("click", (F) => {
7675
- var $;
7676
- if (F.stopPropagation(), document.querySelectorAll(".card-popup").forEach((L) => L.classList.add("hidden")), document.querySelectorAll(".mobile-fullscreen-wrapper").forEach((L) => L.remove()), window.innerWidth <= 768) {
7677
- const L = I.innerHTML, z = document.createElement("div");
7678
- z.className = "mobile-fullscreen-wrapper", z.innerHTML = `
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">${L}</div>
7681
- `, ($ = z.querySelector(".card-popup-close")) == null || $.addEventListener("click", () => z.remove()), document.body.appendChild(z);
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
- I.classList.remove("hidden");
7750
+ T.classList.remove("hidden");
7684
7751
  });
7685
7752
  }
7686
7753
  setTimeout(() => {
7687
- _.style.opacity = "1", _.style.transform = "translateY(0)";
7688
- }, n ? u * 200 : 0);
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, a = !1;
7801
+ let s = 0, i = 0, r = !0, o = !1;
7735
7802
  const l = () => {
7736
- a || (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)));
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 = "", a = !0;
7806
+ e.placeholder = "", o = !0;
7740
7807
  }), e.addEventListener("blur", () => {
7741
- a = !1, i = 0, r = !0, l();
7808
+ o = !1, i = 0, r = !0, l();
7742
7809
  });
7743
7810
  }
7744
7811
  }