wineater-bot 3.4.4 → 3.5.1

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.
@@ -229,7 +229,7 @@ var $n = { exports: {} };
229
229
  (function(v) {
230
230
  v.NONE = "NONE", v.DEFAULT_FLAGS = "DEFAULT_FLAGS", v.CACHE = "CACHE", v.SERVER = "SERVER";
231
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() {
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_", L = "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() {
@@ -252,10 +252,10 @@ var $n = { exports: {} };
252
252
  if (h.datadogRum.trackTraits) {
253
253
  var Ke = {};
254
254
  Object.keys(((N = h.evaluationContext.identity) === null || N === void 0 ? void 0 : N.traits) || {}).map(function(K) {
255
- Ke[M + K] = h.getTrait(K);
255
+ Ke[L + K] = h.getTrait(K);
256
256
  });
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);
258
- h.log("Setting Datadog user", Me), h.datadogRum.client.setUser(Me);
257
+ var Le = 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);
258
+ h.log("Setting Datadog user", Le), h.datadogRum.client.setUser(Le);
259
259
  }
260
260
  } catch (K) {
261
261
  console.error(K);
@@ -266,7 +266,7 @@ var $n = { exports: {} };
266
266
  Object.keys(h.flags).map(function(K) {
267
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
- p(se, M + K, h.getTrait(K));
269
+ p(se, L + 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);
271
271
  } catch (K) {
272
272
  console.error(K);
@@ -384,13 +384,13 @@ var $n = { exports: {} };
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, 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;
387
+ var S, x, D, P, q, N, W, ee, oe, te, ne, ae, ce, ge, Ge, Ke, Le, se, K, Ct, Je, Pn, Xe, _t, Bn, jn, Nt, zn, Ot, Ye, Me, Un, ie = this;
388
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, 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)
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, Le = f.eventSourceUrl, se = Le === void 0 ? "https://realtime.flagsmith.com/" : Le, 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] }];
@@ -438,7 +438,7 @@ var $n = { exports: {} };
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, Fe, Oe, xe, Rt, Hn, Dt, At, Mt, Lt, Ft, Pt, Bt, jt, zt, Ut, Ht, $t, qt, Wt, Vt, Gt;
441
+ var ve, Te, X, Fe, Oe, xe, Rt, Hn, Dt, At, Lt, Mt, Ft, Pt, Bt, jt, zt, Ut, Ht, $t, qt, Wt, Vt, Gt;
442
442
  return o(this, function(Ee) {
443
443
  switch (Ee.label) {
444
444
  case 0:
@@ -446,7 +446,7 @@ var $n = { exports: {} };
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), 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];
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) === ((Lt = this.evaluationContext.environment) === null || Lt === void 0 ? void 0 : Lt.apiKey) && (xe = !0, this.evaluationContext.identity && ((Ft = (Mt = X.evaluationContext) === null || Mt === void 0 ? void 0 : Mt.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:
@@ -502,7 +502,7 @@ var $n = { exports: {} };
502
502
  case 12:
503
503
  return [3, 14];
504
504
  case 13:
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;
505
+ throw Me = fe.sent(), this.log("Error during initialisation ", Me), Un = Me instanceof Error ? Me : new Error("".concat(Me)), (g = this.onError) === null || g === void 0 || g.call(this, Un), Me;
506
506
  case 14:
507
507
  return [2];
508
508
  }
@@ -609,7 +609,7 @@ var $n = { exports: {} };
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
- }, L = function(v) {
612
+ }, M = 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;
@@ -619,7 +619,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
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 L();
622
+ throw new M();
623
623
  this._onevent_wrapped = function(g) {
624
624
  m._onevent(g);
625
625
  }, this._start();
@@ -855,7 +855,7 @@ 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), Ls = /* @__PURE__ */ qe(tt, 5, 0), Tn = function(t) {
858
+ var Ls = /* @__PURE__ */ qe(Ne, 9, 0), Ms = /* @__PURE__ */ qe(tt, 5, 0), Tn = function(t) {
859
859
  return (t + 7) / 8 | 0;
860
860
  }, Fs = function(t, e, n) {
861
861
  return (e == null || e < 0) && (e = 0), (n == null || n > t.length) && (n = t.length), new de(t.subarray(e, n));
@@ -909,8 +909,8 @@ var Ms = /* @__PURE__ */ qe(Ne, 9, 0), Ls = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
909
909
  var b = new re(p + 1), w = pt(n[a - 1], b, 0);
910
910
  if (w > e) {
911
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;
912
+ for (r.sort(function(R, L) {
913
+ return b[L.s] - b[R.s] || R.f - L.f;
914
914
  }); s < i; ++s) {
915
915
  var B = r[s].s;
916
916
  if (b[B] > e)
@@ -966,17 +966,17 @@ var Ms = /* @__PURE__ */ qe(Ne, 9, 0), Ls = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
966
966
  return (i + 4 + s) * 8;
967
967
  }, un = function(t, e, n, s, i, r, o, l, c, u, a) {
968
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];
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, L = new re(19), I = 0; I < B.length; ++I)
970
+ ++L[B[I] & 31];
971
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)
972
+ ++L[_[I] & 31];
973
+ for (var T = ct(L, 7), F = T.t, U = T.l, j = 19; j > 4 && !F[an[j - 1]]; --j)
974
974
  ;
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)
975
+ var z = u + 5 << 3, C = Ue(i, Ne) + Ue(r, tt) + o, M = Ue(i, p) + Ue(r, y) + o + 14 + 3 * j + Ue(L, F) + 2 * L[16] + 3 * L[17] + 7 * L[18];
976
+ if (c >= 0 && z <= C && z <= M)
977
977
  return En(e, a, t.subarray(c, c + u));
978
978
  var V, G, $, v;
979
- if (be(e, a, 1 + (L < C)), a += 2, L < C) {
979
+ if (be(e, a, 1 + (M < C)), a += 2, M < C) {
980
980
  V = qe(p, b, 0), G = p, $ = qe(y, E, 0), v = y;
981
981
  var f = qe(F, U, 0);
982
982
  be(e, a, A - 257), be(e, a + 5, R - 1), be(e, a + 10, j - 4), a += 14;
@@ -989,7 +989,7 @@ var Ms = /* @__PURE__ */ qe(Ne, 9, 0), Ls = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
989
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, $ = Ls, v = tt;
992
+ V = Ls, G = Ne, $ = Ms, v = tt;
993
993
  for (var I = 0; I < l; ++I) {
994
994
  var x = s[I];
995
995
  if (x > 255) {
@@ -1007,20 +1007,20 @@ var Ms = /* @__PURE__ */ qe(Ne, 9, 0), Ls = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
1007
1007
  a && (c[0] = r.r >> 3);
1008
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
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) {
1010
+ }, k = new xt(25e3), _ = new re(288), R = new re(32), L = 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, M = E[z];
1012
+ if (y[C] = M, E[z] = C, U <= T) {
1013
1013
  var V = o - T;
1014
- if ((M > 7e3 || F > 24576) && (V > 423 || !u)) {
1015
- a = un(t, c, 0, k, _, R, I, F, j, T - j, a), F = M = I = 0, j = T;
1014
+ if ((L > 7e3 || F > 24576) && (V > 423 || !u)) {
1015
+ a = un(t, c, 0, k, _, R, I, F, j, T - j, a), F = L = I = 0, j = T;
1016
1016
  for (var G = 0; G < 286; ++G)
1017
1017
  _[G] = 0;
1018
1018
  for (var G = 0; G < 30; ++G)
1019
1019
  R[G] = 0;
1020
1020
  }
1021
- var $ = 2, v = 0, f = b, h = C - L & 32767;
1021
+ var $ = 2, v = 0, f = b, h = C - M & 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 && C != L; ) {
1023
+ for (var m = Math.min(p, V) - 1, g = Math.min(32767, T), S = Math.min(258, V); h <= g && --f && C != M; ) {
1024
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
  ;
@@ -1029,16 +1029,16 @@ var Ms = /* @__PURE__ */ qe(Ne, 9, 0), Ls = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
1029
1029
  break;
1030
1030
  for (var D = Math.min(h, x - 2), P = 0, G = 0; G < D; ++G) {
1031
1031
  var q = T - h + G & 32767, N = y[q], W = q - N & 32767;
1032
- W > P && (P = W, L = q);
1032
+ W > P && (P = W, M = q);
1033
1033
  }
1034
1034
  }
1035
1035
  }
1036
- C = L, L = y[C], h += C - L & 32767;
1036
+ C = M, M = y[C], h += C - M & 32767;
1037
1037
  }
1038
1038
  if (v) {
1039
1039
  k[F++] = 268435456 | dt[$] << 18 | cn[v];
1040
1040
  var ee = dt[$] & 31, oe = cn[v] & 31;
1041
- I += kt[ee] + Tt[oe], ++_[257 + ee], ++R[oe], U = T + $, ++M;
1041
+ I += kt[ee] + Tt[oe], ++_[257 + ee], ++R[oe], U = T + $, ++L;
1042
1042
  } else
1043
1043
  k[F++] = t[T], ++_[t[T]];
1044
1044
  }
@@ -1121,7 +1121,7 @@ var Ms = /* @__PURE__ */ qe(Ne, 9, 0), Ls = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
1121
1121
  var c = xi({}, nt[n].e);
1122
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, Ls, tt, ft, Bs, In, qe, be, ze, ct, pt, ln, Ue, En, un, Tn, Fs, js, Cn, _i, Hs];
1124
+ return [de, re, xt, kt, Tt, an, dt, cn, Ls, Ne, Ms, 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) {
@@ -1211,7 +1211,7 @@ class Ai {
1211
1211
  constructor(e, n) {
1212
1212
  this.app = e, this.startParams = n, this.conditions = [], this.hasStarted = !1, this.createConditionFromFilter = (s) => {
1213
1213
  if (s.value.length) {
1214
- const i = Mi(s);
1214
+ const i = Li(s);
1215
1215
  if (i.type)
1216
1216
  return i;
1217
1217
  }
@@ -1354,7 +1354,7 @@ const Pe = {
1354
1354
  greaterOrEqual: (t, e) => t >= e,
1355
1355
  lessOrEqual: (t, e) => t <= e,
1356
1356
  lessThan: (t, e) => t < e
1357
- }, Mi = (t) => {
1357
+ }, Li = (t) => {
1358
1358
  const e = {
1359
1359
  on: "is",
1360
1360
  notOn: "isNot",
@@ -1462,7 +1462,7 @@ const Pe = {
1462
1462
  }
1463
1463
  return s;
1464
1464
  };
1465
- class Li {
1465
+ class Mi {
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);
@@ -2318,7 +2318,7 @@ const Er = {
2318
2318
  alignSelf: "stretch"
2319
2319
  }, hs = {
2320
2320
  fontWeight: "bold"
2321
- }, Mr = {
2321
+ }, Lr = {
2322
2322
  fontSize: "13px",
2323
2323
  lineHeight: "auto"
2324
2324
  }, Zs = {
@@ -2331,7 +2331,7 @@ const Er = {
2331
2331
  fontStyle: "normal",
2332
2332
  fontWeight: "500",
2333
2333
  lineHeight: "auto"
2334
- }, Lr = {
2334
+ }, Mr = {
2335
2335
  ...Zs,
2336
2336
  display: "flex",
2337
2337
  padding: "0.25rem 0.9375rem",
@@ -2662,13 +2662,13 @@ class Vr {
2662
2662
  fontSize: "13px",
2663
2663
  fontWeight: "500",
2664
2664
  lineHeight: "auto"
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);
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", Lr), d = H("div", "taskButtons", Fr), p = H("div", "taskText", hs);
2666
2666
  p.textContent = "Your answer";
2667
2667
  const b = H("textarea", "taskDescription", {
2668
2668
  resize: "vertical"
2669
2669
  }), w = H("div", "inputArea", us);
2670
2670
  w.append(p, b);
2671
- const y = H("div", "closePanelButton", Zs, "Collapse Panel"), E = H("div", "nextButton", Lr, "Done, Next");
2671
+ const y = H("div", "closePanelButton", Zs, "Collapse Panel"), E = H("div", "nextButton", Mr, "Done, Next");
2672
2672
  s.append(i, r), c.append(u, a), d.append(y, E), o.append(l, c, w, d), n.append(s, o);
2673
2673
  const O = () => {
2674
2674
  const k = e[this.currentTaskIndex];
@@ -2703,7 +2703,7 @@ class Vr {
2703
2703
  }
2704
2704
  };
2705
2705
  return s.onclick = B, y.onclick = this.collapseWidget, E.onclick = () => {
2706
- var _, R, M, I;
2706
+ var _, R, L, I;
2707
2707
  const k = e[this.currentTaskIndex].allow_typing ? b.value : void 0;
2708
2708
  if (b.value = "", (_ = this.signalManager) == null || _.signalTask(e[this.currentTaskIndex].task_id, "done", k), this.currentTaskIndex < e.length - 1) {
2709
2709
  this.currentTaskIndex++, O();
@@ -2711,7 +2711,7 @@ class Vr {
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()
2714
- }), (M = this.signalManager) == null || M.setDurations(T)), (I = this.signalManager) == null || I.signalTask(e[this.currentTaskIndex].task_id, "begin"), A();
2714
+ }), (L = this.signalManager) == null || L.setDurations(T)), (I = this.signalManager) == null || I.signalTask(e[this.currentTaskIndex].task_id, "begin"), A();
2715
2715
  } else
2716
2716
  this.showEndSection();
2717
2717
  this.app.localStorage.setItem("or_uxt_task_index", this.currentTaskIndex.toString());
@@ -2760,7 +2760,7 @@ function bt(t) {
2760
2760
  function Et(t) {
2761
2761
  return t.nodeType === Node.DOCUMENT_NODE || t.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
2762
2762
  }
2763
- function Q(t, e) {
2763
+ function Z(t, e) {
2764
2764
  return t.localName === e;
2765
2765
  }
2766
2766
  class Kr {
@@ -2769,7 +2769,7 @@ class Kr {
2769
2769
  this.clear(), this.app.nodes.scanTree(this.captureCanvas);
2770
2770
  }, this.captureCanvas = (s) => {
2771
2771
  const i = this.app.nodes.getID(s);
2772
- if (!i || !Q(s, "canvas") || this.app.sanitizer.isObscured(i) || this.app.sanitizer.isHidden(i) || !Q(s, "canvas") || this.snapshots[i])
2772
+ if (!i || !Z(s, "canvas") || this.app.sanitizer.isObscured(i) || this.app.sanitizer.isHidden(i) || !Z(s, "canvas") || this.snapshots[i])
2773
2773
  return;
2774
2774
  new IntersectionObserver((l) => {
2775
2775
  l.forEach((c) => {
@@ -2792,7 +2792,7 @@ class Kr {
2792
2792
  });
2793
2793
  }, c = setInterval(() => {
2794
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(() => {
2795
+ !a || !Z(a, "canvas") || a !== s ? (this.app.debug.log("Canvas element not in sync"), clearInterval(c)) : this.snapshots[i].paused || (this.options.useAnimationFrame ? requestAnimationFrame(() => {
2796
2796
  l(a);
2797
2797
  }) : l(a));
2798
2798
  }, this.interval);
@@ -2993,12 +2993,12 @@ class Rn {
2993
2993
  s.substr(0, 6) === "xlink:" && (s = s.substr(6)), i === null ? this.app.send(Yn(e, s)) : s === "href" ? (i.length > 1e5 && (i = ""), this.app.send(hn(e, s, i, this.app.getBaseHref()))) : this.app.attributeSender.sendSetAttribute(e, s, i);
2994
2994
  return;
2995
2995
  }
2996
- if (!(s === "src" || s === "srcset" || s === "integrity" || s === "crossorigin" || s === "autocomplete" || s.substr(0, 2) === "on") && !(s === "value" && Q(n, "input") && n.type !== "button" && n.type !== "reset" && n.type !== "submit")) {
2996
+ if (!(s === "src" || s === "srcset" || s === "integrity" || s === "crossorigin" || s === "autocomplete" || s.substr(0, 2) === "on") && !(s === "value" && Z(n, "input") && n.type !== "button" && n.type !== "reset" && n.type !== "submit")) {
2997
2997
  if (i === null) {
2998
2998
  this.app.send(Yn(e, s));
2999
2999
  return;
3000
3000
  }
3001
- if (s === "style" || s === "href" && Q(n, "link")) {
3001
+ if (s === "style" || s === "href" && Z(n, "link")) {
3002
3002
  this.app.send(hn(e, s, i, this.app.getBaseHref()));
3003
3003
  return;
3004
3004
  }
@@ -3006,7 +3006,7 @@ class Rn {
3006
3006
  }
3007
3007
  }
3008
3008
  sendNodeData(e, n, s) {
3009
- if (Q(n, "style")) {
3009
+ if (Z(n, "style")) {
3010
3010
  this.app.send(hr(e, s, this.app.getBaseHref()));
3011
3011
  return;
3012
3012
  }
@@ -3059,7 +3059,7 @@ class Rn {
3059
3059
  return !0;
3060
3060
  const s = n.parentNode;
3061
3061
  let i;
3062
- if (!Q(n, "html") || !this.isTopContext) {
3062
+ if (!Z(n, "html") || !this.isTopContext) {
3063
3063
  if (s === null)
3064
3064
  return this.unbindTree(n), !1;
3065
3065
  if (i = this.app.nodes.getID(s), i === void 0)
@@ -3222,7 +3222,7 @@ class to extends Rn {
3222
3222
  super(e, !0), this.iframeOffsets = new eo(), this.contextCallbacks = [], this.contextsSet = /* @__PURE__ */ new Set(), this.iframeObservers = [], this.shadowRootObservers = [], this.options = Object.assign({
3223
3223
  captureIFrames: !0
3224
3224
  }, n), this.app.nodes.attachNodeCallback((s) => {
3225
- Q(s, "iframe") && (this.options.captureIFrames && !Ae(s, "obscured") || Ae(s, "capture")) && this.handleIframe(s);
3225
+ Z(s, "iframe") && (this.options.captureIFrames && !Ae(s, "obscured") || Ae(s, "capture")) && this.handleIframe(s);
3226
3226
  }), this.app.nodes.attachNodeCallback((s) => {
3227
3227
  ke(s) && s.shadowRoot !== null && this.handleShadowRoot(s.shadowRoot);
3228
3228
  });
@@ -3412,10 +3412,10 @@ class oo {
3412
3412
  }
3413
3413
  }
3414
3414
  const Qe = "canceled", gs = "or_uxt_active", en = "or_buffer_1", Ce = (t) => ({ reason: t, success: !1 }), ao = (t) => ({ ...t, success: !0 });
3415
- var Y;
3415
+ var Q;
3416
3416
  (function(t) {
3417
3417
  t[t.NotActive = 0] = "NotActive", t[t.Starting = 1] = "Starting", t[t.Active = 2] = "Active", t[t.ColdStart = 3] = "ColdStart";
3418
- })(Y || (Y = {}));
3418
+ })(Q || (Q = {}));
3419
3419
  const ti = "https://api.openreplay.com/ingest";
3420
3420
  function tn() {
3421
3421
  const t = (/* @__PURE__ */ new Date()).getTimezoneOffset() * -1, e = t >= 0 ? "+" : "-", n = Math.floor(Math.abs(t) / 60), s = Math.abs(t) % 60;
@@ -3437,7 +3437,7 @@ const co = (t) => new Promise((e) => setTimeout(e, t)), ue = {
3437
3437
  };
3438
3438
  let lo = class {
3439
3439
  constructor(e, n, s, i, r) {
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 = () => {
3440
+ this.signalError = i, this.insideIframe = r, this.messages = [], this.bufferedMessages1 = [], this.bufferedMessages2 = [], this.startCallbacks = [], this.stopCallbacks = [], this.commitCallbacks = [], this.activityState = Q.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
3442
  var c;
3443
3443
  (c = this.canvasRecorder) == null || c.restartTracking();
@@ -3495,7 +3495,7 @@ let lo = class {
3495
3495
  const c = location.hostname.split(".").slice(-2).join("_");
3496
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 Li(this), this.tagWatcher = new Tr(this.sessionStorage, this.debug.error, (c) => {
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 Mi(this), this.tagWatcher = new Tr(this.sessionStorage, this.debug.error, (c) => {
3499
3499
  this.send(Sr(c));
3500
3500
  }), this.session.attachUpdateCallback(({ userID: c, metadata: u }) => {
3501
3501
  c != null && this.send(or(c)), u != null && Object.entries(u).forEach(([a, d]) => this.send(Qn(a, d)));
@@ -3561,7 +3561,7 @@ let lo = class {
3561
3561
  let y = w;
3562
3562
  return this.pageFrames.forEach((E) => {
3563
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;
3564
+ const [O, B, A, k, _, R, L] = w, { left: I, top: T, width: F, height: U } = E.getBoundingClientRect(), j = document.documentElement.scrollWidth, z = document.documentElement.scrollHeight, C = R / 100 * F + I, M = L / 100 * U + T, V = C / j, G = M / z;
3565
3565
  y = [
3566
3566
  O,
3567
3567
  B,
@@ -3667,7 +3667,7 @@ let lo = class {
3667
3667
  }
3668
3668
  send(e, n = !1) {
3669
3669
  var s;
3670
- this.activityState !== Y.NotActive && (this.activityState === Y.ColdStart ? (this.bufferedMessages1.push(e), this.singleBuffer || this.bufferedMessages2.push(e), (s = this.conditionsManager) == null || s.processMessage(e)) : this.messages.push(e), this.activityState === Y.Active && n && this.commit());
3670
+ this.activityState !== Q.NotActive && (this.activityState === Q.ColdStart ? (this.bufferedMessages1.push(e), this.singleBuffer || this.bufferedMessages2.push(e), (s = this.conditionsManager) == null || s.processMessage(e)) : this.messages.push(e), this.activityState === Q.Active && n && this.commit());
3671
3671
  }
3672
3672
  /**
3673
3673
  * Normal workflow: add timestamp and tab data to batch, then commit it
@@ -3709,7 +3709,7 @@ let lo = class {
3709
3709
  this.coldStartCommitN += 1, this.coldStartCommitN === 2 && (this.bufferedMessages1.push(Re(this.timestamp())), this.bufferedMessages1.push(De(this.session.getTabId())), this.bufferedMessages2.push(Re(this.timestamp())), this.bufferedMessages2.push(De(this.session.getTabId())), this.coldStartCommitN = 0);
3710
3710
  }
3711
3711
  commit() {
3712
- this.activityState === Y.ColdStart ? this._cStartCommit() : this._nCommit();
3712
+ this.activityState === Q.ColdStart ? this._cStartCommit() : this._nCommit();
3713
3713
  }
3714
3714
  postToWorker(e) {
3715
3715
  var n;
@@ -3808,7 +3808,7 @@ let lo = class {
3808
3808
  return e.startsWith(this.options.ingestPoint);
3809
3809
  }
3810
3810
  active() {
3811
- return this.activityState === Y.Active;
3811
+ return this.activityState === Q.Active;
3812
3812
  }
3813
3813
  resetNextPageSession(e) {
3814
3814
  e ? this.sessionStorage.setItem(this.options.session_reset_key, "t") : this.sessionStorage.removeItem(this.options.session_reset_key);
@@ -3827,7 +3827,7 @@ let lo = class {
3827
3827
  const s = 1e3, i = this.checkSessionToken(e.forceNew);
3828
3828
  n && await this.setupConditionalStart(e);
3829
3829
  const r = () => {
3830
- this.orderNumber += 1, Kt(), this.coldStartTs = pe(), this.orderNumber % 2 === 0 ? (this.bufferedMessages1.length = 0, this.bufferedMessages1.push(Re(this.timestamp())), this.bufferedMessages1.push(De(this.session.getTabId()))) : (this.bufferedMessages2.length = 0, this.bufferedMessages2.push(Re(this.timestamp())), this.bufferedMessages2.push(De(this.session.getTabId()))), this.stop(!1), this.activityState = Y.ColdStart, e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
3830
+ this.orderNumber += 1, Kt(), this.coldStartTs = pe(), this.orderNumber % 2 === 0 ? (this.bufferedMessages1.length = 0, this.bufferedMessages1.push(Re(this.timestamp())), this.bufferedMessages1.push(De(this.session.getTabId()))) : (this.bufferedMessages2.length = 0, this.bufferedMessages2.push(Re(this.timestamp())), this.bufferedMessages2.push(De(this.session.getTabId()))), this.stop(!1), this.activityState = Q.ColdStart, e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
3831
3831
  userID: e.userID,
3832
3832
  metadata: e.metadata
3833
3833
  }), i || (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(lt(this.session.getTabId()))), this.observer.observe(), this.ticker.start();
@@ -3894,7 +3894,7 @@ let lo = class {
3894
3894
  const o = JSON.parse(i);
3895
3895
  this.bufferedMessages1 = Array.isArray(o) ? o : this.bufferedMessages1, this.localStorage.removeItem(en);
3896
3896
  }
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({
3897
+ this.bufferedMessages1.push(Re(this.timestamp())), this.bufferedMessages1.push(De(this.session.getTabId())), this.activityState = Q.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
  });
@@ -3981,14 +3981,14 @@ let lo = class {
3981
3981
  this.postToWorker([["q_end"]]), this.clearBuffers();
3982
3982
  }
3983
3983
  async _start(e = {}, n = !1, s) {
3984
- const i = this.activityState === Y.ColdStart;
3984
+ const i = this.activityState === Q.ColdStart;
3985
3985
  if (i && this.coldInterval && clearInterval(this.coldInterval), !this.worker) {
3986
3986
  const c = "No worker found: perhaps, CSP is not set.";
3987
3987
  return this.signalError(c, []), Promise.resolve(Ce(c));
3988
3988
  }
3989
- if (this.activityState === Y.Active || this.activityState === Y.Starting)
3989
+ if (this.activityState === Q.Active || this.activityState === Q.Starting)
3990
3990
  return Promise.resolve(Ce("OpenReplay: trying to call `start()` on the instance that has been started already."));
3991
- this.activityState = Y.Starting, i || Kt(), e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
3991
+ this.activityState = Q.Starting, i || Kt(), e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
3992
3992
  // MBTODO: maybe it would make sense to `forceNew` if the `userID` was changed
3993
3993
  userID: e.userID,
3994
3994
  metadata: e.metadata
@@ -4029,8 +4029,8 @@ let lo = class {
4029
4029
  })
4030
4030
  });
4031
4031
  if (c.status !== 200) {
4032
- const C = await c.text(), L = C === Qe ? Qe : `Server error: ${c.status}. ${C}`;
4033
- return Ce(L);
4032
+ const C = await c.text(), M = C === Qe ? Qe : `Server error: ${c.status}. ${C}`;
4033
+ return Ce(M);
4034
4034
  }
4035
4035
  if (!this.worker) {
4036
4036
  const C = "no worker found after start request (this should not happen in real world)";
@@ -4055,7 +4055,7 @@ let lo = class {
4055
4055
  userDevice: k,
4056
4056
  userOS: _,
4057
4057
  userState: R,
4058
- canvasEnabled: M,
4058
+ canvasEnabled: L,
4059
4059
  canvasQuality: I,
4060
4060
  canvasFPS: T,
4061
4061
  assistOnly: F
@@ -4079,9 +4079,9 @@ let lo = class {
4079
4079
  type: "auth",
4080
4080
  token: u,
4081
4081
  beaconSizeLimit: p
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;
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, M]) => this.send(Qn(C, M))), this.localStorage.setItem(this.options.local_uuid_key, a), this.compressionThreshold = b;
4083
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, {
4084
+ if (this.startCallbacks.forEach((C) => C(U)), this.featureFlags.reloadFlags(), await this.tagWatcher.fetchTags(this.options.ingestPoint, u), this.activityState = Q.Active, L && !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,
@@ -4100,12 +4100,12 @@ let lo = class {
4100
4100
  if (z && (j = parseInt(z, 10)), location != null && location.search) {
4101
4101
  const C = new URLSearchParams(location.search);
4102
4102
  if (C.has("oruxt")) {
4103
- const L = C.get("oruxt");
4104
- j = L ? parseInt(L, 10) : void 0;
4103
+ const M = C.get("oruxt");
4104
+ j = M ? parseInt(M, 10) : void 0;
4105
4105
  }
4106
4106
  }
4107
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));
4108
+ C && this.onUxtCb.forEach((M) => M(C));
4109
4109
  })), ao(U);
4110
4110
  } catch (c) {
4111
4111
  if (this.stop(), this.session.reset(), c === Qe)
@@ -4133,7 +4133,7 @@ let lo = class {
4133
4133
  async waitStarted() {
4134
4134
  return new Promise((e) => {
4135
4135
  const n = () => {
4136
- this.activityState === Y.Active ? e(!0) : setTimeout(n, 25);
4136
+ this.activityState === Q.Active ? e(!0) : setTimeout(n, 25);
4137
4137
  };
4138
4138
  n();
4139
4139
  });
@@ -4143,7 +4143,7 @@ let lo = class {
4143
4143
  * and here we just apply 10ms delay just in case
4144
4144
  * */
4145
4145
  async start(...e) {
4146
- return this.activityState === Y.Active || this.activityState === Y.Starting ? Promise.resolve(Ce("OpenReplay: trying to call `start()` on the instance that has been started already.")) : document.hidden ? new Promise((n) => {
4146
+ return this.activityState === Q.Active || this.activityState === Q.Starting ? Promise.resolve(Ce("OpenReplay: trying to call `start()` on the instance that has been started already.")) : document.hidden ? new Promise((n) => {
4147
4147
  const s = async () => {
4148
4148
  document.hidden || (await this.waitStart(), document.removeEventListener("visibilitychange", s), n(this._start(...e)));
4149
4149
  };
@@ -4173,11 +4173,11 @@ let lo = class {
4173
4173
  }
4174
4174
  stop(e = !0) {
4175
4175
  var n;
4176
- if (this.activityState !== Y.NotActive)
4176
+ if (this.activityState !== Q.NotActive)
4177
4177
  try {
4178
4178
  this.attributeSender.clear(), this.sanitizer.clear(), this.observer.disconnect(), this.nodes.clear(), this.ticker.stop(), this.stopCallbacks.forEach((s) => s()), this.debug.log("OpenReplay tracking stopped."), this.tagWatcher.clear(), this.worker && e && this.worker.postMessage("stop"), (n = this.canvasRecorder) == null || n.clear();
4179
4179
  } finally {
4180
- this.activityState = Y.NotActive;
4180
+ this.activityState = Q.NotActive;
4181
4181
  }
4182
4182
  }
4183
4183
  };
@@ -4324,11 +4324,11 @@ function mo() {
4324
4324
  }, d.fromString = function(E) {
4325
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
4326
  if (_.indexOf("@") === 0)
4327
- var R = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(_, ""), M = R[1], I = R[2], T = R[3];
4327
+ var R = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(_, ""), L = R[1], I = R[2], T = R[3];
4328
4328
  return new d({
4329
4329
  functionName: A,
4330
4330
  args: k || void 0,
4331
- fileName: M,
4331
+ fileName: L,
4332
4332
  lineNumber: I || void 0,
4333
4333
  columnNumber: T || void 0
4334
4334
  });
@@ -4576,7 +4576,7 @@ function xo(t) {
4576
4576
  t.attachStopCallback(() => {
4577
4577
  o.disconnect();
4578
4578
  }), t.nodes.attachNodeCallback((l) => {
4579
- Q(l, "img") && (t.nodes.attachNodeListener(l, "error", () => i(l)), t.nodes.attachNodeListener(l, "load", () => r(l)), r(l), o.observe(l, { attributes: !0, attributeFilter: ["src", "srcset"] }));
4579
+ Z(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 = [
@@ -4591,10 +4591,10 @@ const ko = [
4591
4591
  "time"
4592
4592
  ];
4593
4593
  function To(t) {
4594
- return Q(t, "textarea") ? !0 : Q(t, "input") ? ko.includes(t.type) : !1;
4594
+ return Z(t, "textarea") ? !0 : Z(t, "input") ? ko.includes(t.type) : !1;
4595
4595
  }
4596
4596
  function Eo(t) {
4597
- if (!Q(t, "input"))
4597
+ if (!Z(t, "input"))
4598
4598
  return !1;
4599
4599
  const e = t.type;
4600
4600
  return e === "checkbox" || e === "radio";
@@ -4602,7 +4602,7 @@ function Eo(t) {
4602
4602
  const Io = Se && "labels" in HTMLInputElement.prototype ? (t) => {
4603
4603
  let e = t;
4604
4604
  for (; (e = e.parentNode) !== null; )
4605
- if (Q(e, "label"))
4605
+ if (Z(e, "label"))
4606
4606
  return e;
4607
4607
  const n = t.labels;
4608
4608
  if (n !== null && n.length === 1)
@@ -4610,7 +4610,7 @@ const Io = Se && "labels" in HTMLInputElement.prototype ? (t) => {
4610
4610
  } : (t) => {
4611
4611
  let e = t;
4612
4612
  for (; (e = e.parentNode) !== null; )
4613
- if (Q(e, "label"))
4613
+ if (Z(e, "label"))
4614
4614
  return e;
4615
4615
  const n = t.id;
4616
4616
  if (n) {
@@ -4687,7 +4687,7 @@ function Co(t, e) {
4687
4687
  t.nodes.attachNodeCallback(t.safe((a) => {
4688
4688
  const d = t.nodes.getID(a);
4689
4689
  if (d !== void 0) {
4690
- if (Q(a, "select") && (i(d, a), t.nodes.attachNodeListener(a, "change", () => i(d, a))), To(a)) {
4690
+ if (Z(a, "select") && (i(d, a), t.nodes.attachNodeListener(a, "change", () => i(d, a))), To(a)) {
4691
4691
  l(d, a);
4692
4692
  let p = 0, b = 0, w = 0;
4693
4693
  const y = () => {
@@ -4743,7 +4743,7 @@ function it(t, e, n) {
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
4745
  let c = ot(Oo(r)) || ot(...Ro(r)) || ot(...Do(r)) || ot(Ao(r)) || [ks()];
4746
- const u = Mo(r);
4746
+ const u = Lo(r);
4747
4747
  if (e == "all")
4748
4748
  u && (c = c.concat(c.filter(sn).map((a) => rt(a, u))));
4749
4749
  else if (e == "two")
@@ -4824,7 +4824,7 @@ function ks() {
4824
4824
  penalty: 3
4825
4825
  };
4826
4826
  }
4827
- function Mo(t) {
4827
+ function Lo(t) {
4828
4828
  const e = t.parentNode;
4829
4829
  if (!e)
4830
4830
  return null;
@@ -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(Lo);
4849
+ const e = t.filter(Mo);
4850
4850
  return e.length > 0 ? e : null;
4851
4851
  }
4852
- function Lo(t) {
4852
+ function Mo(t) {
4853
4853
  return t != null;
4854
4854
  }
4855
4855
  function* ci(t, e = []) {
@@ -4926,7 +4926,7 @@ function jo(t, e) {
4926
4926
  const _ = Nn(k);
4927
4927
  if (_ !== null)
4928
4928
  return _;
4929
- if (Q(k, "input"))
4929
+ if (Z(k, "input"))
4930
4930
  return ri(k);
4931
4931
  if (xn(k)) {
4932
4932
  let R = "";
@@ -4956,23 +4956,23 @@ function jo(t, e) {
4956
4956
  function R(I, T, F) {
4957
4957
  return u[I] = u[I] || Po(T, k, F);
4958
4958
  }
4959
- const M = _ ? t.attachEventListener.bind(t) : t.nodes.attachNodeListener.bind(t.nodes);
4960
- M(k.documentElement, "mouseover", (I) => {
4959
+ const L = _ ? t.attachEventListener.bind(t) : t.nodes.attachNodeListener.bind(t.nodes);
4960
+ L(k.documentElement, "mouseover", (I) => {
4961
4961
  const T = Ts(I.target, k);
4962
4962
  T !== l && (l = T, c = performance.now());
4963
- }), M(k, "mousemove", (I) => {
4963
+ }), L(k, "mousemove", (I) => {
4964
4964
  const [T, F] = t.observer.getDocumentOffset(k);
4965
4965
  i = I.clientX + T, r = I.clientY + F, o = !0;
4966
4966
  const U = Math.sign(I.movementX);
4967
4967
  b += Math.abs(I.movementX) + Math.abs(I.movementY), U !== d && (d = U, p++);
4968
- }, !1), M(k, "click", (I) => {
4968
+ }, !1), L(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 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);
4974
+ const U = I.pageX, j = I.pageY, z = k.documentElement.scrollWidth, C = k.documentElement.scrollHeight, M = 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) : "", M, V), !0);
4976
4976
  }
4977
4977
  l = null;
4978
4978
  });
@@ -4989,7 +4989,7 @@ function zo(t) {
4989
4989
  for (let i = 0; i < n.length; i++) {
4990
4990
  const r = n[i];
4991
4991
  let o = "";
4992
- if (Q(r, "img") && (o = r.currentSrc || r.src), !o) {
4992
+ if (Z(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);
@@ -5264,7 +5264,7 @@ function Go(t) {
5264
5264
  };
5265
5265
  });
5266
5266
  s(window), t.observer.attachContextCallback(s), t.nodes.attachNodeCallback((i) => {
5267
- if (!Q(i, "style") || !i.sheet || i.textContent !== null && i.textContent.trim().length > 0)
5267
+ if (!Z(i, "style") || !i.sheet || i.textContent !== null && i.textContent.trim().length > 0)
5268
5268
  return;
5269
5269
  const r = t.nodes.getID(i);
5270
5270
  if (!r)
@@ -5283,7 +5283,7 @@ function Ko(t) {
5283
5283
  }
5284
5284
  let n = !1;
5285
5285
  t.nodes.attachNodeCallback((s) => {
5286
- Q(s, "body") && (t.nodes.attachNodeListener(s, "focus", (i) => {
5286
+ Z(s, "body") && (t.nodes.attachNodeListener(s, "focus", (i) => {
5287
5287
  ei(i.target) && (e(i.target), n = !1);
5288
5288
  }), t.nodes.attachNodeListener(s, "blur", (i) => {
5289
5289
  i.relatedTarget === null && (n = !0, setTimeout(() => {
@@ -5292,7 +5292,7 @@ function Ko(t) {
5292
5292
  }));
5293
5293
  }), t.attachStartCallback(() => {
5294
5294
  let s = document.activeElement;
5295
- for (; s && Q(s, "iframe") && s.contentDocument; )
5295
+ for (; s && Z(s, "iframe") && s.contentDocument; )
5296
5296
  s = s.contentDocument.activeElement;
5297
5297
  s && s !== s.ownerDocument.body && e(s);
5298
5298
  }, !0);
@@ -5336,17 +5336,17 @@ 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: 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;
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: L, status: I } = _ || {}, T = n.ignoreHeaders, F = Array.isArray(T) ? ($) => T.includes($) : () => T;
5340
5340
  function U($, v) {
5341
5341
  F(v[0]) || ($[v[0]] = v[1]);
5342
5342
  }
5343
5343
  let j = {}, z = {};
5344
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;
5345
+ const C = L || A;
5346
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
5347
  F($) || (z[$] = v);
5348
5348
  });
5349
- const L = s({
5349
+ const M = s({
5350
5350
  url: E,
5351
5351
  method: y || "",
5352
5352
  status: k || I || 0,
@@ -5359,12 +5359,12 @@ function Xo(t, e, n, s, i) {
5359
5359
  body: R || B
5360
5360
  }
5361
5361
  });
5362
- if (!L) {
5362
+ if (!M) {
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", L), t.send(vt("xhr", String(y), String(L.url), i(L.request), i(L.response), L.status, V + Ve(), G, 0));
5367
+ t.debug.log("Openreplay: final req object", M), t.send(vt("xhr", String(y), String(M.url), i(M.request), i(M.response), M.status, V + Ve(), G, 0));
5368
5368
  }
5369
5369
  function o(p) {
5370
5370
  if (t.debug.log("Openreplay: capturing API request", p), p.__openreplay_timing = performance.now(), n.sessionTokenHeader) {
@@ -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 : Ln(e) || Array.isArray(e) ? n = JSON.stringify(e) : typeof e < "u" && (n = Object.prototype.toString.call(e));
5445
+ typeof e == "string" ? n = e : Mn(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":
@@ -5452,7 +5452,7 @@ const et = (t, e) => {
5452
5452
  break;
5453
5453
  }
5454
5454
  return n;
5455
- }, Mn = (t) => {
5455
+ }, Ln = (t) => {
5456
5456
  if (!t)
5457
5457
  return null;
5458
5458
  let e;
@@ -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" : Ln(t) ? e = t : e = `can't parse body ${typeof t}`;
5469
+ t instanceof Blob || t instanceof ReadableStream || t instanceof ArrayBuffer ? e = "byte data" : Mn(t) ? e = t : e = `can't parse body ${typeof t}`;
5470
5470
  return e;
5471
5471
  }, Zo = (t, e = {}) => {
5472
- Ln(e) || (e = {});
5472
+ Mn(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 Ln(t) {
5487
+ function Mn(t) {
5488
5488
  return t !== null && typeof t == "object";
5489
5489
  }
5490
5490
  function ea(t) {
@@ -5568,7 +5568,7 @@ class na {
5568
5568
  for (const [l, c] of i.searchParams)
5569
5569
  e.getData[l] = c;
5570
5570
  }
5571
- s != null && s.body && (e.requestData = Mn(s.body));
5571
+ s != null && s.body && (e.requestData = Ln(s.body));
5572
5572
  }
5573
5573
  afterFetch(e) {
5574
5574
  return (n) => {
@@ -5663,7 +5663,7 @@ class ia {
5663
5663
  const n = Reflect.get(e, "send");
5664
5664
  return (...s) => {
5665
5665
  const i = s[0];
5666
- return this.item.requestData = Mn(i), n.apply(e, s);
5666
+ return this.item.requestData = Ln(i), n.apply(e, s);
5667
5667
  };
5668
5668
  }
5669
5669
  getSetRequestHeader(e) {
@@ -5743,7 +5743,7 @@ class aa {
5743
5743
  for (const [a, d] of l.searchParams)
5744
5744
  o.getData[a] = d;
5745
5745
  }
5746
- o.requestData = Mn(r), o.startTime || (o.startTime = performance.now());
5746
+ o.requestData = Ln(r), o.startTime || (o.startTime = performance.now());
5747
5747
  const c = e.apply(n, s);
5748
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
5749
  const u = o.getMessage();
@@ -5818,23 +5818,23 @@ function la(t, e = {}) {
5818
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
- 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;
5821
+ o(function(R, L) {
5822
+ k.headers === void 0 && (k.headers = {}), k.headers instanceof Headers ? k.headers.append(R, L) : Array.isArray(k.headers) ? k.headers.push([R, L]) : k.headers[R] = L;
5823
5823
  });
5824
5824
  const _ = performance.now();
5825
5825
  return d(A, k).then((R) => {
5826
- const M = performance.now() - _;
5826
+ const L = performance.now() - _;
5827
5827
  if (n.failuresOnly && R.status < 400)
5828
5828
  return R;
5829
5829
  const I = R.clone();
5830
5830
  return I.text().then((T) => {
5831
5831
  const F = {}, U = {};
5832
5832
  if (s !== !0) {
5833
- const C = ([L, V]) => {
5834
- i(L) || (F[L] = V);
5833
+ const C = ([M, V]) => {
5834
+ i(M) || (F[M] = V);
5835
5835
  };
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);
5836
+ k.headers instanceof Headers ? k.headers.forEach((M, V) => C([V, M])) : Array.isArray(k.headers) ? k.headers.forEach(C) : typeof k.headers == "object" && Object.entries(k.headers).forEach(C), I.headers.forEach((M, V) => {
5837
+ i(V) || (U[V] = M);
5838
5838
  });
5839
5839
  }
5840
5840
  const j = _s(k.method), z = l({
@@ -5851,7 +5851,7 @@ function la(t, e = {}) {
5851
5851
  body: T
5852
5852
  }
5853
5853
  });
5854
- z && t.send(vt("fetch", j, String(z.url), c(z.request), c(z.response), I.status, _ + Ve(), M, 0));
5854
+ z && t.send(vt("fetch", j, String(z.url), c(z.request), c(z.response), I.status, _ + Ve(), L, 0));
5855
5855
  }).catch((T) => t.debug.error("Could not process Fetch response:", T)), R;
5856
5856
  });
5857
5857
  };
@@ -5859,17 +5859,17 @@ function la(t, e = {}) {
5859
5859
  const b = a.XMLHttpRequest.prototype.open, w = a.XMLHttpRequest.prototype.setRequestHeader, y = a.XMLHttpRequest.prototype.send;
5860
5860
  function E(A, k) {
5861
5861
  const _ = this;
5862
- o((M, I) => _.setRequestHeader(M, I));
5862
+ o((L, I) => _.setRequestHeader(L, I));
5863
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 = {};
5864
+ return _.addEventListener("loadstart", (L) => {
5865
+ R = L.timeStamp;
5866
+ }), _.addEventListener("load", t.safe((L) => {
5867
+ const { headers: I, body: T } = on(_), F = R > 0 ? L.timeStamp - R : 0, j = (_.getAllResponseHeaders() || "").trim().split(/[\r\n]+/), z = {};
5868
5868
  j.forEach(function(V) {
5869
5869
  const G = V.split(": "), $ = G.shift();
5870
5870
  i($) || (z[$] = G.join(": "));
5871
5871
  });
5872
- const C = _s(A), L = l({
5872
+ const C = _s(A), M = l({
5873
5873
  url: String(k),
5874
5874
  method: C,
5875
5875
  status: _.status,
@@ -5883,7 +5883,7 @@ function la(t, e = {}) {
5883
5883
  body: _.response
5884
5884
  }
5885
5885
  });
5886
- L && t.send(vt("xhr", C, String(L.url), c(L.request), c(L.response), _.status, R + Ve(), F, 0));
5886
+ M && t.send(vt("xhr", C, String(M.url), c(M.request), c(M.response), _.status, R + Ve(), F, 0));
5887
5887
  })), b.apply(this, arguments);
5888
5888
  }
5889
5889
  function O(A) {
@@ -6789,14 +6789,44 @@ visibility: visible;
6789
6789
 
6790
6790
  /* ===================== 13) Блок Powered by ===================== */
6791
6791
  #powered-by-widget {
6792
- border-top:2px solid #f6f7fd; /* разделительная линия сверху */
6792
+ position: relative;
6793
+ border-top: 2px solid #f6f7fd;
6793
6794
  font-family: 'Bricolage Grotesque', sans-serif;
6794
6795
  font-weight: 200;
6795
- display: flex;
6796
- align-items: center;
6797
- justify-content: center;
6798
6796
  padding: 12px 24px;
6797
+ min-height: 40px;
6798
+ }
6799
+
6800
+ #powered-by-widget .powered-by-center {
6801
+ position: absolute;
6802
+ left: 50%;
6803
+ transform: translateX(-50%);
6804
+ text-align: center;
6805
+ }
6806
+
6807
+ #powered-by-widget .powered-by-lang {
6808
+ position: absolute;
6809
+ right: 0px;
6810
+ top: 50%;
6811
+ transform: translateY(-50%);
6812
+ }
6813
+
6814
+ .language-dropdown {
6815
+ padding: 4px;
6816
+ border-radius: 6px;
6817
+ border: 2px solid var(--wineater-color);
6818
+ background-color: white;
6819
+ color: var(--wineater-color);
6820
+ font-weight: 500;
6821
+ font-family: 'Bricolage Grotesque', sans-serif;
6822
+ font-size: 12px;
6823
+ cursor: pointer;
6824
+ transition: all 0.2sease;
6825
+ }
6826
+ .language-dropdown:hover {
6827
+ box-shadow: 0 4px 8px rgba(123, 43, 235, 0.2);
6799
6828
  }
6829
+
6800
6830
  #powered-by-widget a {
6801
6831
  text-decoration: none;
6802
6832
  display: flex;
@@ -6821,7 +6851,7 @@ visibility: visible;
6821
6851
  @media screen and (max-width: 768px) {
6822
6852
  #wine-widget-container {
6823
6853
  flex-direction: column;
6824
- padding: 16px;
6854
+ padding: 0px 16px;
6825
6855
  min-width: 100vw;
6826
6856
  }
6827
6857
  #wine-widget-header h1 {
@@ -6848,6 +6878,9 @@ visibility: visible;
6848
6878
  #wine-widget-container .tile-details {
6849
6879
  text-align: center;
6850
6880
  }
6881
+ .powered-by-sommelier {
6882
+ display:none;
6883
+ }
6851
6884
  }
6852
6885
 
6853
6886
  .card-popup {
@@ -6977,7 +7010,6 @@ margin: 5px 0;
6977
7010
  border: none;
6978
7011
  }
6979
7012
 
6980
-
6981
7013
  /* Пример более узких экранов (i.e. <480px) можно добавить при необходимости */
6982
7014
  `, Fn = document.createElement("link");
6983
7015
  Fn.rel = "stylesheet";
@@ -7274,7 +7306,7 @@ class va {
7274
7306
  full: "Full",
7275
7307
  /* -- Новые ключи bar -- */
7276
7308
  barTitle: "Bar Dishes",
7277
- barSubtitle: "Select dishes below and click ‘Send’",
7309
+ barSubtitle: "Select dishes below and click 'Send'",
7278
7310
  barSendButton: "Send",
7279
7311
  barResetButton: "Reset",
7280
7312
  barName: "Bar Name",
@@ -7338,7 +7370,7 @@ class va {
7338
7370
  full: "Puno",
7339
7371
  /* -- Novi ključevi za bar -- */
7340
7372
  barTitle: "Jela iz bara",
7341
- barSubtitle: "Izaberite jela ispod i kliknite ‘Pošalji’",
7373
+ barSubtitle: "Izaberite jela ispod i kliknite 'Pošalji'",
7342
7374
  barSendButton: "Pošalji",
7343
7375
  barResetButton: "Resetuj",
7344
7376
  barName: "Naziv bara",
@@ -7407,7 +7439,7 @@ class va {
7407
7439
  full: "Voll",
7408
7440
  /* -- Новые ключи bar -- */
7409
7441
  barTitle: "Bar-Auswahl",
7410
- barSubtitle: "Wählen Sie Ihre Gerichte und klicken Sie auf „Senden“",
7442
+ barSubtitle: "Wählen Sie Ihre Gerichte und klicken Sie auf 'Senden'",
7411
7443
  barSendButton: "Senden",
7412
7444
  barResetButton: "Zurücksetzen",
7413
7445
  barName: "Name der Bar",
@@ -7503,7 +7535,7 @@ class va {
7503
7535
  winePairingIntro: "К этому вину подходят следующие блюда:",
7504
7536
  askForDinner: "Что бы вы хотели на ужин?",
7505
7537
  clearChatButton: "Очистить чат",
7506
- widgetTitle: "НАЙДИТЕ ИДЕАЛЬНОЕ ВИНО",
7538
+ widgetTitle: "НАЙДИТЬ ИДЕАЛЬНОЕ ВИНО",
7507
7539
  widgetSubtitle: "Поделитесь вашими предпочтениями — блюдом, настроением, бюджетом или случаем — и наш AI-сомелье подберёт идеальное вино за секунды",
7508
7540
  searchPlaceholder: "Введите ключевое слово или описание",
7509
7541
  wineDetails: {
@@ -7528,7 +7560,7 @@ class va {
7528
7560
  full: "Полное",
7529
7561
  /* -- Новые ключи для бара -- */
7530
7562
  barTitle: "Закуски к вину",
7531
- barSubtitle: "Выберите блюда ниже и нажмите ‘Отправить’",
7563
+ barSubtitle: "Выберите блюда ниже и нажмите 'Отправить'",
7532
7564
  barSendButton: "Отправить",
7533
7565
  barResetButton: "Сбросить",
7534
7566
  barName: "Название бара",
@@ -7550,10 +7582,10 @@ class va {
7550
7582
  }
7551
7583
  async fetchConfig(e) {
7552
7584
  try {
7553
- const n = await this.api.getStoreConfig(e);
7554
- this.language = n.lang, this.currency = n.currency;
7585
+ const n = await this.api.getStoreConfig(e), s = localStorage.getItem("selectedLanguage");
7586
+ s && this.translations[s] ? this.language = s : n.lang && this.translations[n.lang] ? (this.language = n.lang, localStorage.setItem("selectedLanguage", n.lang)) : this.language = "en", this.currency = n.currency || "USD";
7555
7587
  } catch {
7556
- this.language = "en", this.currency = "USD";
7588
+ this.language = localStorage.getItem("selectedLanguage") || "en", this.currency = "USD";
7557
7589
  }
7558
7590
  }
7559
7591
  getCurrency(e) {
@@ -7576,8 +7608,11 @@ class va {
7576
7608
  return e;
7577
7609
  return s;
7578
7610
  }
7611
+ getSupportedLanguages() {
7612
+ return Object.keys(this.translations);
7613
+ }
7579
7614
  }
7580
- const Z = new va();
7615
+ const Y = new va();
7581
7616
  class ba {
7582
7617
  constructor() {
7583
7618
  var e, n, s, i, r;
@@ -7585,25 +7620,25 @@ class ba {
7585
7620
  price: null,
7586
7621
  color: null,
7587
7622
  intensity: null
7588
- }, this.initializeWidget(), this.initializeSearchAnimation(), this.sendEvent("widgetInitialized", { widgetType: this.widgetType }), this.loadInstantRecommendations();
7623
+ }, this.initializeWidget(), this.initializeSearchAnimation(), this.sendEvent("widgetInitialized", { widgetType: this.widgetType }), this.loadInstantRecommendations(), this.createLanguageSwitcher();
7589
7624
  }
7590
7625
  sendEvent(e, n) {
7591
7626
  console.log("Event sent:", e, n);
7592
7627
  }
7593
7628
  getTitle(e) {
7594
7629
  return e ? `<h1 class="wine-widget-big-title">${e}</h1>` : `<h1 class="wine-widget-big-title">
7595
- ${Z.translate("headerLine1")}
7630
+ ${Y.translate("headerLine1")}
7596
7631
  <span class="icon icon-meal"></span>
7597
- <span class="icon-label">${Z.translate("headerMeal")}</span>,
7632
+ <span class="icon-label">${Y.translate("headerMeal")}</span>,
7598
7633
  <span class="icon icon-mood"></span>
7599
- <span class="icon-label">${Z.translate("headerMood")}</span>
7634
+ <span class="icon-label">${Y.translate("headerMood")}</span>
7600
7635
  </br>
7601
7636
  <!-- <span class="icon icon-budget"></span> -->
7602
- <!-- <span class="icon-label">${Z.translate("headerBudget")}</span>, -->
7603
- ${Z.translate("headerOr")}
7637
+ <!-- <span class="icon-label">${Y.translate("headerBudget")}</span>, -->
7638
+ ${Y.translate("headerOr")}
7604
7639
  <span class="icon icon-occasion"></span>
7605
- <span class="icon-label">${Z.translate("headerOccasion")}</span>
7606
- ${Z.translate("headerLine2")}
7640
+ <span class="icon-label">${Y.translate("headerOccasion")}</span>
7641
+ ${Y.translate("headerLine2")}
7607
7642
  </h1>`;
7608
7643
  }
7609
7644
  initializeWidget() {
@@ -7622,11 +7657,11 @@ class ba {
7622
7657
  <input
7623
7658
  type="text"
7624
7659
  id="wine-search-input"
7625
- placeholder="${Z.translate("searchPlaceholder")}">
7660
+ placeholder="${Y.translate("searchPlaceholder")}">
7626
7661
 
7627
7662
  <!-- Кнопка -->
7628
7663
  <button id="wine-search-button">
7629
- ${Z.translate("searchButton")}
7664
+ ${Y.translate("searchButton")}
7630
7665
  </button>
7631
7666
  </div>
7632
7667
  <div id="wine-widget-right">
@@ -7638,12 +7673,15 @@ class ba {
7638
7673
  <div id="wine-placeholder"></div>
7639
7674
  </div>
7640
7675
  <div id="powered-by-widget">
7641
- <a href="https://wineater.com" target="_blank">
7642
- <span>${Z.translate("poweredBy")}</span>
7643
- <img src="${this.countryCode === "ru" ? "https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/divino_logo.svg?x=5" : "https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/logo_medium_gray.svg"}" alt="Wineater Logo">
7644
- <span>${Z.translate("AI sommelier")}</span>
7645
- </a>
7646
- </div>
7676
+ <div class="powered-by-center">
7677
+ <a href="https://wineater.com" target="_blank">
7678
+ <span>${Y.translate("poweredBy")}</span>
7679
+ <img src="${this.countryCode === "ru" ? "https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/divino_logo.svg?x=5" : "https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/logo_medium_gray.svg"}" alt="Wineater Logo">
7680
+ <span class="powered-by-sommelier">${Y.translate("AI sommelier")}</span>
7681
+ </a>
7682
+ </div>
7683
+ <div class="powered-by-lang"></div>
7684
+ </div>
7647
7685
  </div>
7648
7686
  </div>
7649
7687
  `;
@@ -7703,18 +7741,18 @@ class ba {
7703
7741
  e.forEach((u, a) => {
7704
7742
  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
7743
  <div class="wine-recommendation-tile ${_ ? "somm-selection" : ""}">
7706
- ${_ ? `<div class="somm-selection-badge">${Z.translate("wineDetails.sommSelection")}</div>` : ""}
7744
+ ${_ ? `<div class="somm-selection-badge">${Y.translate("wineDetails.sommSelection")}</div>` : ""}
7707
7745
 
7708
7746
  <div class="tile-top">
7709
7747
  ${p ? `<img src="${p}" alt="${d}" class="wine-image" />` : ""}
7710
- <div class="wine-price">${c(b)} ${Z.getCurrency("label")}</div>
7748
+ <div class="wine-price">${c(b)} ${Y.getCurrency("label")}</div>
7711
7749
  <h3 class="wine-title">${d}</h3>
7712
7750
  </div>
7713
7751
 
7714
7752
  ${E ? `<div class="wine-params">${E}</div>` : ""}
7715
7753
 
7716
7754
  <div class="bottom-row">
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>`}
7755
+ ${w ? `<a class="buy-btn" href="${w}" target="_blank">${Y.translate("wineDetails.buy")}</a>` : `<button class="buy-btn" data-toggle-info>${Y.translate("moreInfo")}</button>`}
7718
7756
  </div>
7719
7757
 
7720
7758
  <div class="card-popup hidden">
@@ -7731,9 +7769,9 @@ class ba {
7731
7769
  </div>
7732
7770
  `;
7733
7771
  s.insertAdjacentHTML("beforeend", R);
7734
- const M = s.children[a];
7772
+ const L = s.children[a];
7735
7773
  if (!w) {
7736
- const I = M.querySelector("[data-toggle-info]"), T = M.querySelector(".card-popup"), F = M.querySelector(".card-popup-close");
7774
+ const I = L.querySelector("[data-toggle-info]"), T = L.querySelector(".card-popup"), F = L.querySelector(".card-popup-close");
7737
7775
  F == null || F.addEventListener("click", (U) => {
7738
7776
  U.stopPropagation(), T.classList.add("hidden");
7739
7777
  }), document.addEventListener("click", (U) => {
@@ -7751,7 +7789,7 @@ class ba {
7751
7789
  });
7752
7790
  }
7753
7791
  setTimeout(() => {
7754
- M.style.opacity = "1", M.style.transform = "translateY(0)";
7792
+ L.style.opacity = "1", L.style.transform = "translateY(0)";
7755
7793
  }, n ? a * 200 : 0);
7756
7794
  }), this.widgetType === "store" && this.enableHoverPopups();
7757
7795
  }
@@ -7775,7 +7813,7 @@ class ba {
7775
7813
  const e = document.getElementById("wine-placeholder");
7776
7814
  e.innerHTML = `
7777
7815
  <div class="no-results">
7778
- <p>${Z.translate("noResultsMessage") || "No recommendations found for your query."}</p>
7816
+ <p>${Y.translate("noResultsMessage") || "No recommendations found for your query."}</p>
7779
7817
  </div>
7780
7818
  `;
7781
7819
  }
@@ -7783,7 +7821,7 @@ class ba {
7783
7821
  const e = document.getElementById("wine-placeholder");
7784
7822
  e.innerHTML = `
7785
7823
  <div class="error-message">
7786
- <p>${Z.translate("errorMessage") || "Something went wrong. Please try again later."}</p>
7824
+ <p>${Y.translate("errorMessage") || "Something went wrong. Please try again later."}</p>
7787
7825
  </div>
7788
7826
  `;
7789
7827
  }
@@ -7797,7 +7835,7 @@ class ba {
7797
7835
  }
7798
7836
  }
7799
7837
  initializeSearchAnimation() {
7800
- const e = document.getElementById("wine-search-input"), n = Z.translate("placeholderSuggestions");
7838
+ const e = document.getElementById("wine-search-input"), n = Y.translate("placeholderSuggestions");
7801
7839
  let s = 0, i = 0, r = !0, o = !1;
7802
7840
  const l = () => {
7803
7841
  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)));
@@ -7808,6 +7846,16 @@ class ba {
7808
7846
  o = !1, i = 0, r = !0, l();
7809
7847
  });
7810
7848
  }
7849
+ createLanguageSwitcher() {
7850
+ const e = document.querySelector("#powered-by-widget .powered-by-lang"), n = Y.getSupportedLanguages(), s = Y.language, i = document.createElement("select");
7851
+ i.id = "language-dropdown", i.className = "language-dropdown", n.forEach((r) => {
7852
+ const o = document.createElement("option");
7853
+ o.value = r, o.textContent = r.toUpperCase(), o.selected = r === s, i.appendChild(o);
7854
+ }), i.onchange = (r) => {
7855
+ const o = r.target.value;
7856
+ Y.language = o, localStorage.setItem("selectedLanguage", o), location.reload();
7857
+ }, e.appendChild(i);
7858
+ }
7811
7859
  }
7812
7860
  const ya = "HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG";
7813
7861
  class wa {
@@ -7816,7 +7864,7 @@ class wa {
7816
7864
  }
7817
7865
  async initTranslator() {
7818
7866
  const e = this.store ? this.store.charAt(0).toUpperCase() + this.store.slice(1) : "Test";
7819
- await Z.fetchConfig(e || "Test");
7867
+ await Y.fetchConfig(e || "Test");
7820
7868
  }
7821
7869
  initCookies() {
7822
7870
  var e;