wineater-bot 3.1.12 → 3.1.13

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.
@@ -1,4 +1,4 @@
1
- const _s = `
1
+ const Cs = `
2
2
  :root {
3
3
  --wineater-corp-color: #0044FF;
4
4
  --wineater-color: #7B2BEB;
@@ -644,10 +644,10 @@ visibility: visible;
644
644
  height: 80px;
645
645
  }
646
646
  }
647
- `, qi = document.createElement("style");
648
- qi.textContent = _s;
649
- document.head.appendChild(qi);
650
- function Ns() {
647
+ `, $i = document.createElement("style");
648
+ $i.textContent = Cs;
649
+ document.head.appendChild($i);
650
+ function _s() {
651
651
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
652
652
  const e = Math.random() * 16 | 0;
653
653
  return (t === "x" ? e : e & 3 | 8).toString(16);
@@ -673,13 +673,13 @@ function oe(t) {
673
673
  }
674
674
  return null;
675
675
  }
676
- function Os(t) {
676
+ function Ns(t) {
677
677
  document.cookie = t + "=; Max-Age=-99999999;";
678
678
  }
679
- function Rs() {
679
+ function Os() {
680
680
  const t = "uniqueUserID";
681
681
  let e = oe(t);
682
- return e || (e = Ns(), mt(t, e, 365)), e;
682
+ return e || (e = _s(), mt(t, e, 365)), e;
683
683
  }
684
684
  function it(t, e) {
685
685
  fetch("https://wineater-backend.vercel.app/proxy/track", {
@@ -697,23 +697,23 @@ function it(t, e) {
697
697
  console.error("Mixpanel tracking error", s);
698
698
  });
699
699
  }
700
- function As() {
700
+ function Rs() {
701
701
  it("Chatbot Opened", { distinct_id: oe("uniqueUserID"), client: oe("chatbotToken") });
702
702
  }
703
- function Wi() {
703
+ function qi() {
704
704
  it("Chatbot Closed", { distinct_id: oe("uniqueUserID"), client: oe("chatbotToken") });
705
705
  }
706
- function Ds(t) {
706
+ function As(t) {
707
707
  it("Message Sent", { distinct_id: oe("uniqueUserID"), message_content: t, client: oe("chatbotToken") });
708
708
  }
709
- function Ls(t) {
709
+ function Ds(t) {
710
710
  it("Products Got", { distinct_id: oe("uniqueUserID"), products: t, client: oe("chatbotToken") });
711
711
  }
712
- function Fs(t) {
712
+ function Ls(t) {
713
713
  it("Product Clicked", { distinct_id: oe("uniqueUserID"), product_id: t, client: oe("chatbotToken") });
714
714
  }
715
715
  var qe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
716
- function Gi(t) {
716
+ function Wi(t) {
717
717
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
718
718
  }
719
719
  var pn = { exports: {} };
@@ -757,25 +757,25 @@ var pn = { exports: {} };
757
757
  return new (h || (h = Promise))(function(g, w) {
758
758
  function x(H) {
759
759
  try {
760
- M(m.next(H));
760
+ F(m.next(H));
761
761
  } catch (_) {
762
762
  w(_);
763
763
  }
764
764
  }
765
765
  function R(H) {
766
766
  try {
767
- M(m.throw(H));
767
+ F(m.throw(H));
768
768
  } catch (_) {
769
769
  w(_);
770
770
  }
771
771
  }
772
- function M(H) {
772
+ function F(H) {
773
773
  var _;
774
- H.done ? g(H.value) : (_ = H.value, _ instanceof h ? _ : new h(function(W) {
775
- W(_);
774
+ H.done ? g(H.value) : (_ = H.value, _ instanceof h ? _ : new h(function(q) {
775
+ q(_);
776
776
  })).then(x, R);
777
777
  }
778
- M((m = m.apply(b, f || [])).next());
778
+ F((m = m.apply(b, f || [])).next());
779
779
  });
780
780
  }
781
781
  function o(b, f) {
@@ -787,7 +787,7 @@ var pn = { exports: {} };
787
787
  return w = { next: R(0), throw: R(1), return: R(2) }, typeof Symbol == "function" && (w[Symbol.iterator] = function() {
788
788
  return this;
789
789
  }), w;
790
- function R(M) {
790
+ function R(F) {
791
791
  return function(H) {
792
792
  return function(_) {
793
793
  if (h)
@@ -830,15 +830,15 @@ var pn = { exports: {} };
830
830
  continue;
831
831
  }
832
832
  _ = f.call(b, x);
833
- } catch (W) {
834
- _ = [6, W], m = 0;
833
+ } catch (q) {
834
+ _ = [6, q], m = 0;
835
835
  } finally {
836
836
  h = g = 0;
837
837
  }
838
838
  if (5 & _[0])
839
839
  throw _[1];
840
840
  return { value: _[0] ? _[1] : void 0, done: !0 };
841
- }([M, H]);
841
+ }([F, H]);
842
842
  };
843
843
  }
844
844
  }
@@ -918,56 +918,56 @@ var pn = { exports: {} };
918
918
  this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
919
919
  var m = h, g = m.api, w = m.evaluationContext;
920
920
  h.log("Get Flags"), h.isLoading = !0, h.loadingState.isFetching || h.setLoadingState(s(s({}, h.loadingState), { isFetching: !0 }));
921
- var x = "".concat(h.getContext().identity), R = function(M) {
922
- var H, _, W, ee;
923
- if (M && x === "".concat(h.getContext().identity)) {
924
- var ae = M.flags, te = M.traits, ne = M.identifier;
921
+ var x = "".concat(h.getContext().identity), R = function(F) {
922
+ var H, _, q, ee;
923
+ if (F && x === "".concat(h.getContext().identity)) {
924
+ var ae = F.flags, te = F.traits, ne = F.identifier;
925
925
  h.isLoading = !1;
926
926
  var ce = {}, le = {};
927
- te = te || [], (ae = ae || []).forEach(function(X) {
928
- ce[X.feature.name.toLowerCase().replace(/ /g, "_")] = { id: X.feature.id, enabled: X.enabled, value: X.feature_state_value };
929
- }), te.forEach(function(X) {
930
- le[X.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: X.transient, value: X.trait_value };
927
+ te = te || [], (ae = ae || []).forEach(function(K) {
928
+ ce[K.feature.name.toLowerCase().replace(/ /g, "_")] = { id: K.feature.id, enabled: K.enabled, value: K.feature_state_value };
929
+ }), te.forEach(function(K) {
930
+ le[K.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: K.transient, value: K.trait_value };
931
931
  }), h.oldFlags = s({}, h.flags);
932
932
  var me = d(h.oldFlags, ce), Ke = d((H = h.evaluationContext.identity) === null || H === void 0 ? void 0 : H.traits, le);
933
933
  if ((ne || Object.keys(le).length) && (h.evaluationContext.identity = { traits: le }, ne && (h.evaluationContext.identity.identifier = ne)), h.flags = ce, h.updateStorage(), h._onChange(h.oldFlags, { isFromServer: !0, flagsChanged: me, traitsChanged: Ke }, h._loadedState(null, c.SERVER)), h.datadogRum)
934
934
  try {
935
935
  if (h.datadogRum.trackTraits) {
936
- var Xe = {};
937
- Object.keys(((_ = h.evaluationContext.identity) === null || _ === void 0 ? void 0 : _.traits) || {}).map(function(X) {
938
- Xe[L + X] = h.getTrait(X);
936
+ var Je = {};
937
+ Object.keys(((_ = h.evaluationContext.identity) === null || _ === void 0 ? void 0 : _.traits) || {}).map(function(K) {
938
+ Je[L + K] = h.getTrait(K);
939
939
  });
940
- var Fe = s(s(s({}, h.datadogRum.client.getUser()), { id: h.datadogRum.client.getUser().id || ((W = h.evaluationContext.identity) === null || W === void 0 ? void 0 : W.identifier) }), Xe);
941
- h.log("Setting Datadog user", Fe), h.datadogRum.client.setUser(Fe);
940
+ var Me = s(s(s({}, h.datadogRum.client.getUser()), { id: h.datadogRum.client.getUser().id || ((q = h.evaluationContext.identity) === null || q === void 0 ? void 0 : q.identifier) }), Je);
941
+ h.log("Setting Datadog user", Me), h.datadogRum.client.setUser(Me);
942
942
  }
943
- } catch (X) {
944
- console.error(X);
943
+ } catch (K) {
944
+ console.error(K);
945
945
  }
946
946
  if (h.dtrum)
947
947
  try {
948
948
  var ie = { javaDouble: {}, date: {}, shortString: {}, javaLongOrObject: {} };
949
- Object.keys(h.flags).map(function(X) {
950
- p(ie, N + X, h.getValue(X, { skipAnalytics: !0 })), p(ie, O + X, h.hasFeature(X, { skipAnalytics: !0 }));
951
- }), Object.keys(((ee = h.evaluationContext.identity) === null || ee === void 0 ? void 0 : ee.traits) || {}).map(function(X) {
952
- p(ie, L + X, h.getTrait(X));
949
+ Object.keys(h.flags).map(function(K) {
950
+ p(ie, N + K, h.getValue(K, { skipAnalytics: !0 })), p(ie, O + K, h.hasFeature(K, { skipAnalytics: !0 }));
951
+ }), Object.keys(((ee = h.evaluationContext.identity) === null || ee === void 0 ? void 0 : ee.traits) || {}).map(function(K) {
952
+ p(ie, L + K, h.getTrait(K));
953
953
  }), h.log("Sending javaLongOrObject traits to dynatrace", ie.javaLongOrObject), h.log("Sending date traits to dynatrace", ie.date), h.log("Sending shortString traits to dynatrace", ie.shortString), h.log("Sending javaDouble to dynatrace", ie.javaDouble), h.dtrum.sendSessionProperties(ie.javaLongOrObject, ie.date, ie.shortString, ie.javaDouble);
954
- } catch (X) {
955
- console.error(X);
954
+ } catch (K) {
955
+ console.error(K);
956
956
  }
957
957
  }
958
958
  };
959
- return w.identity ? Promise.all([w.identity.traits && Object.keys(w.identity.traits).length || !w.identity.identifier ? h.getJSON(g + "identities/", "POST", JSON.stringify({ identifier: w.identity.identifier, transient: w.identity.transient, traits: Object.entries(w.identity.traits).map(function(M) {
960
- var H = M[0], _ = M[1];
959
+ return w.identity ? Promise.all([w.identity.traits && Object.keys(w.identity.traits).length || !w.identity.identifier ? h.getJSON(g + "identities/", "POST", JSON.stringify({ identifier: w.identity.identifier, transient: w.identity.transient, traits: Object.entries(w.identity.traits).map(function(F) {
960
+ var H = F[0], _ = F[1];
961
961
  return { trait_key: H, trait_value: _ == null ? void 0 : _.value, transient: _ == null ? void 0 : _.transient };
962
- }).filter(function(M) {
963
- return M.trait_value !== void 0 || (h.log("Warning - attempted to set an undefined trait value for key", M.trait_key), !1);
964
- }) })) : h.getJSON(g + "identities/?identifier=" + encodeURIComponent(w.identity.identifier) + (w.identity.transient ? "&transient=true" : ""))]).then(function(M) {
965
- return h.evaluationContext.identity = s(s({}, h.evaluationContext.identity), { traits: {} }), R(M == null ? void 0 : M[0]);
966
- }).catch(function(M) {
967
- var H = M.message, _ = new Error(H);
962
+ }).filter(function(F) {
963
+ return F.trait_value !== void 0 || (h.log("Warning - attempted to set an undefined trait value for key", F.trait_key), !1);
964
+ }) })) : h.getJSON(g + "identities/?identifier=" + encodeURIComponent(w.identity.identifier) + (w.identity.transient ? "&transient=true" : ""))]).then(function(F) {
965
+ return h.evaluationContext.identity = s(s({}, h.evaluationContext.identity), { traits: {} }), R(F == null ? void 0 : F[0]);
966
+ }).catch(function(F) {
967
+ var H = F.message, _ = new Error(H);
968
968
  return Promise.reject(_);
969
- }) : h.getJSON(g + "flags/").then(function(M) {
970
- return R({ flags: M, traits: void 0 });
969
+ }) : h.getJSON(g + "flags/").then(function(F) {
970
+ return R({ flags: F, traits: void 0 });
971
971
  });
972
972
  }, this.analyticsFlags = function() {
973
973
  var m = h.api;
@@ -1025,13 +1025,13 @@ var pn = { exports: {} };
1025
1025
  }, this.getJSON = function(m, g, w) {
1026
1026
  var x, R = h;
1027
1027
  R.evaluationContext;
1028
- var M = R.headers, H = { method: g || "GET", body: w, cache: "no-cache", headers: {} };
1029
- h.evaluationContext.environment && (H.headers["X-Environment-Key"] = h.evaluationContext.environment.apiKey), g && g !== "GET" && (H.headers["Content-Type"] = "application/json; charset=utf-8"), M && Object.assign(H.headers, M), u || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
1028
+ var F = R.headers, H = { method: g || "GET", body: w, cache: "no-cache", headers: {} };
1029
+ h.evaluationContext.environment && (H.headers["X-Environment-Key"] = h.evaluationContext.environment.apiKey), g && g !== "GET" && (H.headers["Content-Type"] = "application/json; charset=utf-8"), F && Object.assign(H.headers, F), u || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
1030
1030
  var _ = "".concat((x = h.evaluationContext.identity) === null || x === void 0 ? void 0 : x.identifier);
1031
- return u(m, H).then(function(W) {
1031
+ return u(m, H).then(function(q) {
1032
1032
  var ee, ae, te = "".concat((ee = h.evaluationContext.identity) === null || ee === void 0 ? void 0 : ee.identifier);
1033
1033
  if (_ === te) {
1034
- var ne = (ae = W.headers) === null || ae === void 0 ? void 0 : ae.get("x-flagsmith-document-updated-at");
1034
+ var ne = (ae = q.headers) === null || ae === void 0 ? void 0 : ae.get("x-flagsmith-document-updated-at");
1035
1035
  if (ne)
1036
1036
  try {
1037
1037
  var ce = parseFloat(ne);
@@ -1041,13 +1041,13 @@ var pn = { exports: {} };
1041
1041
  } catch (le) {
1042
1042
  h.log(le, "Failed to parse x-flagsmith-document-updated-at", ne);
1043
1043
  }
1044
- return h.log("Fetch response: " + W.status + " " + (g || "GET") + 0 + m), W.text().then(function(le) {
1044
+ return h.log("Fetch response: " + q.status + " " + (g || "GET") + 0 + m), q.text().then(function(le) {
1045
1045
  var me = le;
1046
1046
  try {
1047
1047
  me = JSON.parse(le);
1048
1048
  } catch {
1049
1049
  }
1050
- return !me && W.status && (me = "API Response: ".concat(W.status)), W.status && W.status >= 200 && W.status < 300 ? me : Promise.reject(new Error(me));
1050
+ return !me && q.status && (me = "API Response: ".concat(q.status)), q.status && q.status >= 200 && q.status < 300 ? me : Promise.reject(new Error(me));
1051
1051
  });
1052
1052
  }
1053
1053
  h.log("Received response with identity mismatch, ignoring response. Requested: ".concat(_, ", Current: ").concat(te));
@@ -1067,19 +1067,19 @@ var pn = { exports: {} };
1067
1067
  return b.prototype.init = function(f) {
1068
1068
  var h, m, g;
1069
1069
  return r(this, void 0, void 0, function() {
1070
- var w, x, R, M, H, _, W, ee, ae, te, ne, ce, le, me, Ke, Xe, Fe, ie, X, Dt, Je, Wn, Ye, Lt, Gn, Vn, Ft, Kn, Mt, Qe, Me, Xn, se = this;
1070
+ var w, x, R, F, H, _, q, ee, ae, te, ne, ce, le, me, Ke, Je, Me, ie, K, Dt, Xe, Wn, Ye, Lt, Gn, Vn, Mt, Kn, Ft, Qe, Fe, Jn, se = this;
1071
1071
  return o(this, function(pe) {
1072
1072
  switch (pe.label) {
1073
1073
  case 0:
1074
1074
  w = v(f.evaluationContext || this.evaluationContext), pe.label = 1;
1075
1075
  case 1:
1076
- if (pe.trys.push([1, 13, , 14]), x = f.environmentID, R = f.api, M = R === void 0 ? k : R, H = f.headers, _ = f.onChange, W = f.cacheFlags, ee = f.datadogRum, ae = f.onError, te = f.defaultFlags, ne = f.fetch, ce = f.preventFetch, le = f.enableLogs, me = f.enableDynatrace, Ke = f.enableAnalytics, Xe = f.realtime, Fe = f.eventSourceUrl, ie = Fe === void 0 ? "https://realtime.flagsmith.com/" : Fe, X = f.AsyncStorage, Dt = f.identity, Je = f.traits, Wn = f.state, Ye = f.cacheOptions, Lt = f.angularHttpClient, Gn = f._trigger, Vn = f._triggerLoadingState, w.environment = x ? { apiKey: x } : w.environment, !w.environment || !w.environment.apiKey)
1076
+ if (pe.trys.push([1, 13, , 14]), x = f.environmentID, R = f.api, F = R === void 0 ? k : R, H = f.headers, _ = f.onChange, q = f.cacheFlags, ee = f.datadogRum, ae = f.onError, te = f.defaultFlags, ne = f.fetch, ce = f.preventFetch, le = f.enableLogs, me = f.enableDynatrace, Ke = f.enableAnalytics, Je = f.realtime, Me = f.eventSourceUrl, ie = Me === void 0 ? "https://realtime.flagsmith.com/" : Me, K = f.AsyncStorage, Dt = f.identity, Xe = f.traits, Wn = f.state, Ye = f.cacheOptions, Lt = f.angularHttpClient, Gn = f._trigger, Vn = f._triggerLoadingState, w.environment = x ? { apiKey: x } : w.environment, !w.environment || !w.environment.apiKey)
1077
1077
  throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
1078
- if (w.identity = Dt || Je ? { identifier: Dt, traits: Je ? Object.fromEntries(Object.entries(Je).map(function(de) {
1078
+ if (w.identity = Dt || Xe ? { identifier: Dt, traits: Xe ? Object.fromEntries(Object.entries(Xe).map(function(de) {
1079
1079
  return [de[0], { value: de[1] }];
1080
- })) : {} } : w.identity, this.evaluationContext = w, this.api = M, this.headers = H, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = _, Ft = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Gn || this._trigger, this._triggerLoadingState = Vn || this._triggerLoadingState, this.onError = function(de) {
1080
+ })) : {} } : w.identity, this.evaluationContext = w, this.api = F, this.headers = H, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = _, Mt = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Gn || this._trigger, this._triggerLoadingState = Vn || this._triggerLoadingState, this.onError = function(de) {
1081
1081
  se.setLoadingState(s(s({}, se.loadingState), { isFetching: !1, isLoading: !1, error: de })), ae == null || ae(de);
1082
- }, this.enableLogs = le || !1, this.cacheOptions = Ye ? { skipAPI: !!Ye.skipAPI, ttl: Ye.ttl || 0, loadStale: !!Ye.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 && (u = ne), this.enableAnalytics = Ke || !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 = A !== void 0 && !!W, X && (A = X), Xe && typeof window < "u" && this.setupRealtime(ie, w.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = s(s({}, this.loadingState), { isLoading: !1, source: c.DEFAULT_FLAGS })), this.setState(Wn), this.log("Initialising with properties", f, this), me && (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), Lt && (u = /* @__PURE__ */ function(de) {
1082
+ }, this.enableLogs = le || !1, this.cacheOptions = Ye ? { skipAPI: !!Ye.skipAPI, ttl: Ye.ttl || 0, loadStale: !!Ye.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 && (u = ne), this.enableAnalytics = Ke || !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 = A !== void 0 && !!q, K && (A = K), Je && typeof window < "u" && this.setupRealtime(ie, w.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = s(s({}, this.loadingState), { isLoading: !1, source: c.DEFAULT_FLAGS })), this.setState(Wn), this.log("Initialising with properties", f, this), me && (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), Lt && (u = /* @__PURE__ */ function(de) {
1083
1083
  return function(be, ye) {
1084
1084
  var Ee = ye.headers, Y = ye.method, Pe = ye.body;
1085
1085
  return new Promise(function(Re) {
@@ -1115,13 +1115,13 @@ var pn = { exports: {} };
1115
1115
  se.log("Retrieved events from cache", be), se.setState(s(s({}, Ee), { evaluationEvent: ye[se.evaluationContext.environment.apiKey] }));
1116
1116
  }
1117
1117
  }
1118
- })), !W)
1118
+ })), !q)
1119
1119
  return [3, 9];
1120
1120
  if (!A || !this.canUseStorage)
1121
1121
  return [3, 8];
1122
1122
  Kn = function(de, be) {
1123
1123
  return r(se, void 0, void 0, function() {
1124
- var ye, Ee, Y, Pe, Re, ke, Pt, Jn, Bt, jt, zt, Ut, Ht, $t, qt, Wt, Gt, Vt, Kt, Xt, Jt, Yt, Qt, Zt;
1124
+ var ye, Ee, Y, Pe, Re, ke, Pt, Xn, Bt, jt, zt, Ut, Ht, $t, qt, Wt, Gt, Vt, Kt, Jt, Xt, Yt, Qt, Zt;
1125
1125
  return o(this, function(Ie) {
1126
1126
  switch (Ie.label) {
1127
1127
  case 0:
@@ -1129,7 +1129,7 @@ var pn = { exports: {} };
1129
1129
  return [3, 7];
1130
1130
  ye = null, Ee = null, Ie.label = 1;
1131
1131
  case 1:
1132
- return Ie.trys.push([1, 5, , 6]), Y = JSON.parse(be), Pe = !1, Re = !1, Y && Y.api === this.api && ((jt = (Bt = Y.evaluationContext) === null || Bt === void 0 ? void 0 : Bt.environment) === null || jt === void 0 ? void 0 : jt.apiKey) === ((zt = this.evaluationContext.environment) === null || zt === void 0 ? void 0 : zt.apiKey) && (ke = !0, this.evaluationContext.identity && ((Ht = (Ut = Y.evaluationContext) === null || Ut === void 0 ? void 0 : Ut.identity) === null || Ht === void 0 ? void 0 : Ht.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((qt = ($t = Y.evaluationContext) === null || $t === void 0 ? void 0 : $t.identity) === null || qt === void 0 ? void 0 : qt.identifier) + " to " + this.evaluationContext.identity.identifier), ke = !1), this.cacheOptions.ttl && (!Y.ts || (/* @__PURE__ */ new Date()).valueOf() - Y.ts > this.cacheOptions.ttl) && (Y.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), ke = !1) : Y.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), Re = !0, ke = !0)), ke && (Pe = !0, Ee = d((Wt = this.evaluationContext.identity) === null || Wt === void 0 ? void 0 : Wt.traits, (Vt = (Gt = Y.evaluationContext) === null || Gt === void 0 ? void 0 : Gt.identity) === null || Vt === void 0 ? void 0 : Vt.traits), ye = d(this.flags, Y.flags), this.setState(s(s({}, Y), { evaluationContext: v(s(s({}, Y.evaluationContext), { identity: !((Kt = Y.evaluationContext) === null || Kt === void 0) && Kt.identity ? s(s({}, (Xt = Y.evaluationContext) === null || Xt === void 0 ? void 0 : Xt.identity), { traits: s(s({}, ((Yt = (Jt = Y.evaluationContext) === null || Jt === void 0 ? void 0 : Jt.identity) === null || Yt === void 0 ? void 0 : Yt.traits) || {}), Je || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", Y))), Pe ? (Pt = !ce && (!this.cacheOptions.skipAPI || Re), this._onChange(null, { isFromServer: !1, flagsChanged: ye, traitsChanged: Ee }, this._loadedState(null, c.CACHE, Pt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && Pe && !Re && this.log("Skipping API, using cache"), Pt && this.getFlags(), [3, 4]) : [3, 2];
1132
+ return Ie.trys.push([1, 5, , 6]), Y = JSON.parse(be), Pe = !1, Re = !1, Y && Y.api === this.api && ((jt = (Bt = Y.evaluationContext) === null || Bt === void 0 ? void 0 : Bt.environment) === null || jt === void 0 ? void 0 : jt.apiKey) === ((zt = this.evaluationContext.environment) === null || zt === void 0 ? void 0 : zt.apiKey) && (ke = !0, this.evaluationContext.identity && ((Ht = (Ut = Y.evaluationContext) === null || Ut === void 0 ? void 0 : Ut.identity) === null || Ht === void 0 ? void 0 : Ht.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((qt = ($t = Y.evaluationContext) === null || $t === void 0 ? void 0 : $t.identity) === null || qt === void 0 ? void 0 : qt.identifier) + " to " + this.evaluationContext.identity.identifier), ke = !1), this.cacheOptions.ttl && (!Y.ts || (/* @__PURE__ */ new Date()).valueOf() - Y.ts > this.cacheOptions.ttl) && (Y.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), ke = !1) : Y.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), Re = !0, ke = !0)), ke && (Pe = !0, Ee = d((Wt = this.evaluationContext.identity) === null || Wt === void 0 ? void 0 : Wt.traits, (Vt = (Gt = Y.evaluationContext) === null || Gt === void 0 ? void 0 : Gt.identity) === null || Vt === void 0 ? void 0 : Vt.traits), ye = d(this.flags, Y.flags), this.setState(s(s({}, Y), { evaluationContext: v(s(s({}, Y.evaluationContext), { identity: !((Kt = Y.evaluationContext) === null || Kt === void 0) && Kt.identity ? s(s({}, (Jt = Y.evaluationContext) === null || Jt === void 0 ? void 0 : Jt.identity), { traits: s(s({}, ((Yt = (Xt = Y.evaluationContext) === null || Xt === void 0 ? void 0 : Xt.identity) === null || Yt === void 0 ? void 0 : Yt.traits) || {}), Xe || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", Y))), Pe ? (Pt = !ce && (!this.cacheOptions.skipAPI || Re), this._onChange(null, { isFromServer: !1, flagsChanged: ye, traitsChanged: Ee }, this._loadedState(null, c.CACHE, Pt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && Pe && !Re && this.log("Skipping API, using cache"), Pt && this.getFlags(), [3, 4]) : [3, 2];
1133
1133
  case 2:
1134
1134
  return ce ? [3, 4] : [4, this.getFlags()];
1135
1135
  case 3:
@@ -1137,7 +1137,7 @@ var pn = { exports: {} };
1137
1137
  case 4:
1138
1138
  return [3, 6];
1139
1139
  case 5:
1140
- return Jn = Ie.sent(), this.log("Exception fetching cached logs", Jn), [3, 6];
1140
+ return Xn = Ie.sent(), this.log("Exception fetching cached logs", Xn), [3, 6];
1141
1141
  case 6:
1142
1142
  return [3, 10];
1143
1143
  case 7:
@@ -1149,7 +1149,7 @@ var pn = { exports: {} };
1149
1149
  this._onChange(null, { isFromServer: !1, flagsChanged: d({}, this.flags), traitsChanged: d({}, (Qt = this.evaluationContext.identity) === null || Qt === void 0 ? void 0 : Qt.traits) }, this._loadedState(null, c.DEFAULT_FLAGS));
1150
1150
  else {
1151
1151
  if (!this.flags)
1152
- throw new Error(Ft);
1152
+ throw new Error(Mt);
1153
1153
  this._onChange(null, { isFromServer: !1, flagsChanged: d({}, this.flags), traitsChanged: d({}, (Zt = this.evaluationContext.identity) === null || Zt === void 0 ? void 0 : Zt.traits) }, this._loadedState(null, c.DEFAULT_FLAGS));
1154
1154
  }
1155
1155
  Ie.label = 10;
@@ -1160,13 +1160,13 @@ var pn = { exports: {} };
1160
1160
  });
1161
1161
  }, pe.label = 2;
1162
1162
  case 2:
1163
- return pe.trys.push([2, 7, , 8]), A.getItemSync ? (Mt = A.getItemSync(B), [3, 5]) : [3, 3];
1163
+ return pe.trys.push([2, 7, , 8]), A.getItemSync ? (Ft = A.getItemSync(B), [3, 5]) : [3, 3];
1164
1164
  case 3:
1165
1165
  return [4, A.getItem(B)];
1166
1166
  case 4:
1167
- Mt = pe.sent(), pe.label = 5;
1167
+ Ft = pe.sent(), pe.label = 5;
1168
1168
  case 5:
1169
- return [4, Kn(null, Mt)];
1169
+ return [4, Kn(null, Ft)];
1170
1170
  case 6:
1171
1171
  case 7:
1172
1172
  return pe.sent(), [3, 8];
@@ -1179,13 +1179,13 @@ var pn = { exports: {} };
1179
1179
  case 11:
1180
1180
  if (te)
1181
1181
  this._onChange(null, { isFromServer: !1, flagsChanged: d({}, te), traitsChanged: d({}, (h = w.identity) === null || h === void 0 ? void 0 : h.traits) }, this._loadedState(null, c.DEFAULT_FLAGS));
1182
- else if (this.flags && (Qe = null, Object.keys(this.flags).length === 0 && (Qe = Ft), this._onChange(null, { isFromServer: !1, flagsChanged: d({}, this.flags), traitsChanged: d({}, (m = w.identity) === null || m === void 0 ? void 0 : m.traits) }, this._loadedState(Qe, c.DEFAULT_FLAGS)), Qe))
1182
+ else if (this.flags && (Qe = null, Object.keys(this.flags).length === 0 && (Qe = Mt), this._onChange(null, { isFromServer: !1, flagsChanged: d({}, this.flags), traitsChanged: d({}, (m = w.identity) === null || m === void 0 ? void 0 : m.traits) }, this._loadedState(Qe, c.DEFAULT_FLAGS)), Qe))
1183
1183
  throw new Error(Qe);
1184
1184
  pe.label = 12;
1185
1185
  case 12:
1186
1186
  return [3, 14];
1187
1187
  case 13:
1188
- throw Me = pe.sent(), this.log("Error during initialisation ", Me), Xn = Me instanceof Error ? Me : new Error("".concat(Me)), (g = this.onError) === null || g === void 0 || g.call(this, Xn), Me;
1188
+ throw Fe = pe.sent(), this.log("Error during initialisation ", Fe), Jn = Fe instanceof Error ? Fe : new Error("".concat(Fe)), (g = this.onError) === null || g === void 0 || g.call(this, Jn), Fe;
1189
1189
  case 14:
1190
1190
  return [2];
1191
1191
  }
@@ -1245,7 +1245,7 @@ var pn = { exports: {} };
1245
1245
  var f = b.fetch, h = b.AsyncStorage, m = b.eventSource;
1246
1246
  return new I({ fetch: f, AsyncStorage: h, eventSource: m });
1247
1247
  }
1248
- var P, V = (P = function(b, f) {
1248
+ var P, G = (P = function(b, f) {
1249
1249
  return P = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, m) {
1250
1250
  h.__proto__ = m;
1251
1251
  } || function(h, m) {
@@ -1268,7 +1268,7 @@ var pn = { exports: {} };
1268
1268
  return b && m >= b.length && (b = void 0), { value: b && b[m++], done: !b };
1269
1269
  } };
1270
1270
  throw new TypeError(f ? "Object is not iterable." : "Symbol.iterator is not defined.");
1271
- }, q = function(b, f) {
1271
+ }, $ = function(b, f) {
1272
1272
  var h = typeof Symbol == "function" && b[Symbol.iterator];
1273
1273
  if (!h)
1274
1274
  return b;
@@ -1292,17 +1292,17 @@ var pn = { exports: {} };
1292
1292
  for (var m, g = 0, w = f.length; g < w; g++)
1293
1293
  !m && g in f || (m || (m = Array.prototype.slice.call(f, 0, g)), m[g] = f[g]);
1294
1294
  return b.concat(m || Array.prototype.slice.call(f));
1295
- }, F = function(b) {
1295
+ }, M = function(b) {
1296
1296
  function f() {
1297
1297
  return b.call(this, `EventSource not available.
1298
1298
  Consider loading an EventSource polyfill and making it available globally as EventSource, or passing one in as eventSourceClass to the ReconnectingEventSource constructor.`) || this;
1299
1299
  }
1300
- return V(f, b), f;
1301
- }(Error), G = function() {
1300
+ return G(f, b), f;
1301
+ }(Error), W = function() {
1302
1302
  function b(f, h) {
1303
1303
  var m = this;
1304
1304
  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")
1305
- throw new F();
1305
+ throw new M();
1306
1306
  this._onevent_wrapped = function(g) {
1307
1307
  m._onevent(g);
1308
1308
  }, this._start();
@@ -1311,20 +1311,20 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1311
1311
  throw new Error("Method not implemented.");
1312
1312
  }, b.prototype._start = function() {
1313
1313
  var f, h, m = this, g = this.url;
1314
- this._lastEventId && (g.indexOf("?") === -1 ? g += "?" : g += "&", g += "lastEventId=" + encodeURIComponent(this._lastEventId)), this._eventSource = new this.eventSourceClass(g, this._configuration), this._eventSource.onopen = function(M) {
1315
- m._onopen(M);
1316
- }, this._eventSource.onerror = function(M) {
1317
- m._onerror(M);
1318
- }, this._eventSource.onmessage = function(M) {
1319
- m.onmessage(M);
1314
+ this._lastEventId && (g.indexOf("?") === -1 ? g += "?" : g += "&", g += "lastEventId=" + encodeURIComponent(this._lastEventId)), this._eventSource = new this.eventSourceClass(g, this._configuration), this._eventSource.onopen = function(F) {
1315
+ m._onopen(F);
1316
+ }, this._eventSource.onerror = function(F) {
1317
+ m._onerror(F);
1318
+ }, this._eventSource.onmessage = function(F) {
1319
+ m.onmessage(F);
1320
1320
  };
1321
1321
  try {
1322
1322
  for (var w = j(Object.keys(this._listeners)), x = w.next(); !x.done; x = w.next()) {
1323
1323
  var R = x.value;
1324
1324
  this._eventSource.addEventListener(R, this._onevent_wrapped);
1325
1325
  }
1326
- } catch (M) {
1327
- f = { error: M };
1326
+ } catch (F) {
1327
+ f = { error: F };
1328
1328
  } finally {
1329
1329
  try {
1330
1330
  x && !x.done && (h = w.return) && h.call(w);
@@ -1350,7 +1350,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1350
1350
  var g = this._listeners[f.type];
1351
1351
  if (g != null)
1352
1352
  try {
1353
- for (var w = j(C([], q(g), !1)), x = w.next(); !x.done; x = w.next())
1353
+ for (var w = j(C([], $(g), !1)), x = w.next(); !x.done; x = w.next())
1354
1354
  x.value.call(this, f);
1355
1355
  } catch (R) {
1356
1356
  h = { error: R };
@@ -1371,7 +1371,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1371
1371
  }, b.prototype.addEventListener = function(f, h, m) {
1372
1372
  this._listeners[f] == null && (this._listeners[f] = [], this._eventSource != null && this._eventSource.addEventListener(f, this._onevent_wrapped));
1373
1373
  var g = this._listeners[f];
1374
- g.includes(h) || (this._listeners[f] = C(C([], q(g), !1), [h], !1));
1374
+ g.includes(h) || (this._listeners[f] = C(C([], $(g), !1), [h], !1));
1375
1375
  }, b.prototype.removeEventListener = function(f, h, m) {
1376
1376
  var g = this._listeners[f];
1377
1377
  this._listeners[f] = g.filter(function(w) {
@@ -1380,16 +1380,16 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1380
1380
  }, b;
1381
1381
  }();
1382
1382
  globalThis.FlagsmithEventSource = typeof EventSource < "u" ? EventSource : null;
1383
- var K = function(b, f) {
1383
+ var V = function(b, f) {
1384
1384
  return f = f || {}, new Promise(function(h, m) {
1385
- var g = new XMLHttpRequest(), w = [], x = [], R = {}, M = function() {
1385
+ var g = new XMLHttpRequest(), w = [], x = [], R = {}, F = function() {
1386
1386
  return { ok: (g.status / 100 | 0) == 2, statusText: g.statusText, status: g.status, url: g.responseURL, text: function() {
1387
1387
  return Promise.resolve(g.responseText);
1388
1388
  }, json: function() {
1389
1389
  return Promise.resolve(g.responseText).then(JSON.parse);
1390
1390
  }, blob: function() {
1391
1391
  return Promise.resolve(new Blob([g.response]));
1392
- }, clone: M, headers: { keys: function() {
1392
+ }, clone: F, headers: { keys: function() {
1393
1393
  return w;
1394
1394
  }, entries: function() {
1395
1395
  return x;
@@ -1400,23 +1400,23 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1400
1400
  } } };
1401
1401
  };
1402
1402
  for (var H in g.open(f.method || "get", b, !0), g.onload = function() {
1403
- g.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(_, W, ee) {
1404
- w.push(W = W.toLowerCase()), x.push([W, ee]), R[W] = R[W] ? R[W] + "," + ee : ee;
1405
- }), h(M());
1403
+ g.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(_, q, ee) {
1404
+ w.push(q = q.toLowerCase()), x.push([q, ee]), R[q] = R[q] ? R[q] + "," + ee : ee;
1405
+ }), h(F());
1406
1406
  }, g.onerror = m, g.withCredentials = f.credentials == "include", f.headers)
1407
1407
  g.setRequestHeader(H, f.headers[H]);
1408
1408
  g.send(f.body || null);
1409
1409
  });
1410
- }, U = E({ AsyncStorage: i, fetch: K, eventSource: G });
1410
+ }, U = E({ AsyncStorage: i, fetch: V, eventSource: W });
1411
1411
  typeof window < "u" && (window.flagsmith = U), n.createFlagsmithInstance = function() {
1412
- return E({ AsyncStorage: i, fetch: K, eventSource: G });
1412
+ return E({ AsyncStorage: i, fetch: V, eventSource: W });
1413
1413
  }, n.default = U, Object.defineProperty(n, "__esModule", { value: !0 });
1414
1414
  });
1415
1415
  })(pn, pn.exports);
1416
1416
  var Ms = pn.exports;
1417
- const Yn = /* @__PURE__ */ Gi(Ms);
1418
- var Qn = {}, Ps = function(t, e, n, i, s) {
1419
- var r = new Worker(Qn[e] || (Qn[e] = URL.createObjectURL(new Blob([
1417
+ const Fs = /* @__PURE__ */ Wi(Ms);
1418
+ var Yn = {}, Ps = function(t, e, n, i, s) {
1419
+ var r = new Worker(Yn[e] || (Yn[e] = URL.createObjectURL(new Blob([
1420
1420
  t + ';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'
1421
1421
  ], { type: "text/javascript" }))));
1422
1422
  return r.onmessage = function(o) {
@@ -1496,19 +1496,19 @@ var Qn = {}, Ps = function(t, e, n, i, s) {
1496
1496
  /* unused */
1497
1497
  0,
1498
1498
  0
1499
- ]), gn = new fe([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Vi = function(t, e) {
1499
+ ]), gn = new fe([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Gi = function(t, e) {
1500
1500
  for (var n = new re(31), i = 0; i < 31; ++i)
1501
1501
  n[i] = e += 1 << t[i - 1];
1502
1502
  for (var s = new Ct(n[30]), i = 1; i < 30; ++i)
1503
1503
  for (var r = n[i]; r < n[i + 1]; ++r)
1504
1504
  s[r] = r - n[i] << 5 | i;
1505
1505
  return { b: n, r: s };
1506
- }, Ki = Vi(_t, 2), Bs = Ki.b, bt = Ki.r;
1506
+ }, Vi = Gi(_t, 2), Bs = Vi.b, bt = Vi.r;
1507
1507
  Bs[28] = 258, bt[258] = 28;
1508
- var js = Vi(Nt, 0), mn = js.r, yt = new re(32768);
1509
- for (var J = 0; J < 32768; ++J) {
1510
- var Ce = (J & 43690) >> 1 | (J & 21845) << 1;
1511
- Ce = (Ce & 52428) >> 2 | (Ce & 13107) << 2, Ce = (Ce & 61680) >> 4 | (Ce & 3855) << 4, yt[J] = ((Ce & 65280) >> 8 | (Ce & 255) << 8) >> 1;
1508
+ var js = Gi(Nt, 0), mn = js.r, yt = new re(32768);
1509
+ for (var X = 0; X < 32768; ++X) {
1510
+ var Ce = (X & 43690) >> 1 | (X & 21845) << 1;
1511
+ Ce = (Ce & 52428) >> 2 | (Ce & 13107) << 2, Ce = (Ce & 61680) >> 4 | (Ce & 3855) << 4, yt[X] = ((Ce & 65280) >> 8 | (Ce & 255) << 8) >> 1;
1512
1512
  }
1513
1513
  var We = function(t, e, n) {
1514
1514
  for (var i = t.length, s = 0, r = new re(e); s < i; ++s)
@@ -1529,20 +1529,20 @@ var We = function(t, e, n) {
1529
1529
  t[s] && (l[s] = yt[o[t[s] - 1]++] >> 15 - t[s]);
1530
1530
  return l;
1531
1531
  }, Oe = new fe(288);
1532
- for (var J = 0; J < 144; ++J)
1533
- Oe[J] = 8;
1534
- for (var J = 144; J < 256; ++J)
1535
- Oe[J] = 9;
1536
- for (var J = 256; J < 280; ++J)
1537
- Oe[J] = 7;
1538
- for (var J = 280; J < 288; ++J)
1539
- Oe[J] = 8;
1532
+ for (var X = 0; X < 144; ++X)
1533
+ Oe[X] = 8;
1534
+ for (var X = 144; X < 256; ++X)
1535
+ Oe[X] = 9;
1536
+ for (var X = 256; X < 280; ++X)
1537
+ Oe[X] = 7;
1538
+ for (var X = 280; X < 288; ++X)
1539
+ Oe[X] = 8;
1540
1540
  var nt = new fe(32);
1541
- for (var J = 0; J < 32; ++J)
1542
- nt[J] = 5;
1543
- var Xi = /* @__PURE__ */ We(Oe, 9, 0), Ji = /* @__PURE__ */ We(nt, 5, 0), An = function(t) {
1541
+ for (var X = 0; X < 32; ++X)
1542
+ nt[X] = 5;
1543
+ var Ki = /* @__PURE__ */ We(Oe, 9, 0), Ji = /* @__PURE__ */ We(nt, 5, 0), An = function(t) {
1544
1544
  return (t + 7) / 8 | 0;
1545
- }, Yi = function(t, e, n) {
1545
+ }, Xi = function(t, e, n) {
1546
1546
  return (e == null || e < 0) && (e = 0), (n == null || n > t.length) && (n = t.length), new fe(t.subarray(e, n));
1547
1547
  }, zs = [
1548
1548
  "unexpected EOF",
@@ -1560,9 +1560,9 @@ var Xi = /* @__PURE__ */ We(Oe, 9, 0), Ji = /* @__PURE__ */ We(nt, 5, 0), An = f
1560
1560
  "stream finishing",
1561
1561
  "invalid zip data"
1562
1562
  // determined by unknown compression method
1563
- ], Qi = function(t, e, n) {
1563
+ ], Yi = function(t, e, n) {
1564
1564
  var i = new Error(e || zs[t]);
1565
- if (i.code = t, Error.captureStackTrace && Error.captureStackTrace(i, Qi), !n)
1565
+ if (i.code = t, Error.captureStackTrace && Error.captureStackTrace(i, Yi), !n)
1566
1566
  throw i;
1567
1567
  return i;
1568
1568
  }, ve = function(t, e, n) {
@@ -1655,15 +1655,15 @@ var Xi = /* @__PURE__ */ We(Oe, 9, 0), Ji = /* @__PURE__ */ We(nt, 5, 0), An = f
1655
1655
  ++L[B[I] & 31];
1656
1656
  for (var I = 0; I < N.length; ++I)
1657
1657
  ++L[N[I] & 31];
1658
- for (var E = ht(L, 7), P = E.t, V = E.l, j = 19; j > 4 && !P[gn[j - 1]]; --j)
1658
+ for (var E = ht(L, 7), P = E.t, G = E.l, j = 19; j > 4 && !P[gn[j - 1]]; --j)
1659
1659
  ;
1660
- var q = d + 5 << 3, C = He(s, Oe) + He(r, nt) + o, F = He(s, p) + He(r, v) + o + 14 + 3 * j + He(L, P) + 2 * L[16] + 3 * L[17] + 7 * L[18];
1661
- if (a >= 0 && q <= C && q <= F)
1660
+ var $ = d + 5 << 3, C = He(s, Oe) + He(r, nt) + o, M = He(s, p) + He(r, v) + o + 14 + 3 * j + He(L, P) + 2 * L[16] + 3 * L[17] + 7 * L[18];
1661
+ if (a >= 0 && $ <= C && $ <= M)
1662
1662
  return Dn(e, c, t.subarray(a, a + d));
1663
- var G, K, U, b;
1664
- if (ve(e, c, 1 + (F < C)), c += 2, F < C) {
1665
- G = We(p, y, 0), K = p, U = We(v, T, 0), b = v;
1666
- var f = We(P, V, 0);
1663
+ var W, V, U, b;
1664
+ if (ve(e, c, 1 + (M < C)), c += 2, M < C) {
1665
+ W = We(p, y, 0), V = p, U = We(v, T, 0), b = v;
1666
+ var f = We(P, G, 0);
1667
1667
  ve(e, c, D - 257), ve(e, c + 5, O - 1), ve(e, c + 10, j - 4), c += 14;
1668
1668
  for (var I = 0; I < j; ++I)
1669
1669
  ve(e, c + 3 * I, P[gn[I]]);
@@ -1674,63 +1674,63 @@ var Xi = /* @__PURE__ */ We(Oe, 9, 0), Ji = /* @__PURE__ */ We(nt, 5, 0), An = f
1674
1674
  ve(e, c, f[w]), c += P[w], w > 15 && (ve(e, c, g[I] >> 5 & 127), c += g[I] >> 12);
1675
1675
  }
1676
1676
  } else
1677
- G = Xi, K = Oe, U = Ji, b = nt;
1677
+ W = Ki, V = Oe, U = Ji, b = nt;
1678
1678
  for (var I = 0; I < l; ++I) {
1679
1679
  var x = i[I];
1680
1680
  if (x > 255) {
1681
1681
  var w = x >> 18 & 31;
1682
- Ue(e, c, G[w + 257]), c += K[w + 257], w > 7 && (ve(e, c, x >> 23 & 31), c += _t[w]);
1682
+ Ue(e, c, W[w + 257]), c += V[w + 257], w > 7 && (ve(e, c, x >> 23 & 31), c += _t[w]);
1683
1683
  var R = x & 31;
1684
1684
  Ue(e, c, U[R]), c += b[R], R > 3 && (Ue(e, c, x >> 5 & 8191), c += Nt[R]);
1685
1685
  } else
1686
- Ue(e, c, G[x]), c += K[x];
1686
+ Ue(e, c, W[x]), c += V[x];
1687
1687
  }
1688
- return Ue(e, c, G[256]), c + K[256];
1689
- }, Zi = /* @__PURE__ */ new Ct([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), Ln = /* @__PURE__ */ new fe(0), es = function(t, e, n, i, s, r) {
1688
+ return Ue(e, c, W[256]), c + V[256];
1689
+ }, Qi = /* @__PURE__ */ new Ct([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), Ln = /* @__PURE__ */ new fe(0), Zi = function(t, e, n, i, s, r) {
1690
1690
  var o = r.z || t.length, l = new fe(i + o + 5 * (1 + Math.ceil(o / 7e3)) + s), a = l.subarray(i, l.length - s), d = r.l, c = (r.r || 0) & 7;
1691
1691
  if (e) {
1692
1692
  c && (a[0] = r.r >> 3);
1693
- for (var u = Zi[e - 1], p = u >> 13, y = u & 8191, S = (1 << n) - 1, v = r.p || new re(32768), T = r.h || new re(S + 1), A = Math.ceil(n / 3), B = 2 * A, D = function(ne) {
1693
+ for (var u = Qi[e - 1], p = u >> 13, y = u & 8191, S = (1 << n) - 1, v = r.p || new re(32768), T = r.h || new re(S + 1), A = Math.ceil(n / 3), B = 2 * A, D = function(ne) {
1694
1694
  return (t[ne] ^ t[ne + 1] << A ^ t[ne + 2] << B) & S;
1695
- }, k = new Ct(25e3), N = new re(288), O = new re(32), L = 0, I = 0, E = r.i || 0, P = 0, V = r.w || 0, j = 0; E + 2 < o; ++E) {
1696
- var q = D(E), C = E & 32767, F = T[q];
1697
- if (v[C] = F, T[q] = C, V <= E) {
1698
- var G = o - E;
1699
- if ((L > 7e3 || P > 24576) && (G > 423 || !d)) {
1695
+ }, k = new Ct(25e3), N = new re(288), O = new re(32), L = 0, I = 0, E = r.i || 0, P = 0, G = r.w || 0, j = 0; E + 2 < o; ++E) {
1696
+ var $ = D(E), C = E & 32767, M = T[$];
1697
+ if (v[C] = M, T[$] = C, G <= E) {
1698
+ var W = o - E;
1699
+ if ((L > 7e3 || P > 24576) && (W > 423 || !d)) {
1700
1700
  c = yn(t, a, 0, k, N, O, I, P, j, E - j, c), P = L = I = 0, j = E;
1701
- for (var K = 0; K < 286; ++K)
1702
- N[K] = 0;
1703
- for (var K = 0; K < 30; ++K)
1704
- O[K] = 0;
1701
+ for (var V = 0; V < 286; ++V)
1702
+ N[V] = 0;
1703
+ for (var V = 0; V < 30; ++V)
1704
+ O[V] = 0;
1705
1705
  }
1706
- var U = 2, b = 0, f = y, h = C - F & 32767;
1707
- if (G > 2 && q == D(E - h))
1708
- for (var m = Math.min(p, G) - 1, g = Math.min(32767, E), w = Math.min(258, G); h <= g && --f && C != F; ) {
1706
+ var U = 2, b = 0, f = y, h = C - M & 32767;
1707
+ if (W > 2 && $ == D(E - h))
1708
+ for (var m = Math.min(p, W) - 1, g = Math.min(32767, E), w = Math.min(258, W); h <= g && --f && C != M; ) {
1709
1709
  if (t[E + U] == t[E + U - h]) {
1710
1710
  for (var x = 0; x < w && t[E + x] == t[E + x - h]; ++x)
1711
1711
  ;
1712
1712
  if (x > U) {
1713
1713
  if (U = x, b = h, x > m)
1714
1714
  break;
1715
- for (var R = Math.min(h, x - 2), M = 0, K = 0; K < R; ++K) {
1716
- var H = E - h + K & 32767, _ = v[H], W = H - _ & 32767;
1717
- W > M && (M = W, F = H);
1715
+ for (var R = Math.min(h, x - 2), F = 0, V = 0; V < R; ++V) {
1716
+ var H = E - h + V & 32767, _ = v[H], q = H - _ & 32767;
1717
+ q > F && (F = q, M = H);
1718
1718
  }
1719
1719
  }
1720
1720
  }
1721
- C = F, F = v[C], h += C - F & 32767;
1721
+ C = M, M = v[C], h += C - M & 32767;
1722
1722
  }
1723
1723
  if (b) {
1724
1724
  k[P++] = 268435456 | bt[U] << 18 | mn[b];
1725
1725
  var ee = bt[U] & 31, ae = mn[b] & 31;
1726
- I += _t[ee] + Nt[ae], ++N[257 + ee], ++O[ae], V = E + U, ++L;
1726
+ I += _t[ee] + Nt[ae], ++N[257 + ee], ++O[ae], G = E + U, ++L;
1727
1727
  } else
1728
1728
  k[P++] = t[E], ++N[t[E]];
1729
1729
  }
1730
1730
  }
1731
- for (E = Math.max(E, V); E < o; ++E)
1731
+ for (E = Math.max(E, G); E < o; ++E)
1732
1732
  k[P++] = t[E], ++N[t[E]];
1733
- c = yn(t, a, d, k, N, O, I, P, j, E - j, c), d || (r.r = c & 7 | a[c / 8 | 0] << 3, c -= 7, r.h = T, r.p = v, r.i = E, r.w = V);
1733
+ c = yn(t, a, d, k, N, O, I, P, j, E - j, c), d || (r.r = c & 7 | a[c / 8 | 0] << 3, c -= 7, r.h = T, r.p = v, r.i = E, r.w = G);
1734
1734
  } else {
1735
1735
  for (var E = r.w || 0; E < o + d; E += 65535) {
1736
1736
  var te = E + 65535;
@@ -1738,32 +1738,32 @@ var Xi = /* @__PURE__ */ We(Oe, 9, 0), Ji = /* @__PURE__ */ We(nt, 5, 0), An = f
1738
1738
  }
1739
1739
  r.i = o;
1740
1740
  }
1741
- return Yi(l, 0, i + An(c) + s);
1742
- }, ts = /* @__PURE__ */ function() {
1741
+ return Xi(l, 0, i + An(c) + s);
1742
+ }, es = /* @__PURE__ */ function() {
1743
1743
  for (var t = new Int32Array(256), e = 0; e < 256; ++e) {
1744
1744
  for (var n = e, i = 9; --i; )
1745
1745
  n = (n & 1 && -306674912) ^ n >>> 1;
1746
1746
  t[e] = n;
1747
1747
  }
1748
1748
  return t;
1749
- }(), ns = function() {
1749
+ }(), ts = function() {
1750
1750
  var t = -1;
1751
1751
  return {
1752
1752
  p: function(e) {
1753
1753
  for (var n = t, i = 0; i < e.length; ++i)
1754
- n = ts[n & 255 ^ e[i]] ^ n >>> 8;
1754
+ n = es[n & 255 ^ e[i]] ^ n >>> 8;
1755
1755
  t = n;
1756
1756
  },
1757
1757
  d: function() {
1758
1758
  return ~t;
1759
1759
  }
1760
1760
  };
1761
- }, Fn = function(t, e, n, i, s) {
1761
+ }, Mn = function(t, e, n, i, s) {
1762
1762
  if (!s && (s = { l: 1 }, e.dictionary)) {
1763
1763
  var r = e.dictionary.subarray(-32768), o = new fe(r.length + t.length);
1764
1764
  o.set(r), o.set(t, r.length), t = o, s.w = r.length;
1765
1765
  }
1766
- return es(t, e.level == null ? 6 : e.level, e.mem == null ? s.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(t.length))) * 1.5) : 20 : 12 + e.mem, n, i, s);
1766
+ return Zi(t, e.level == null ? 6 : e.level, e.mem == null ? s.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(t.length))) * 1.5) : 20 : 12 + e.mem, n, i, s);
1767
1767
  }, Us = function(t, e) {
1768
1768
  var n = {};
1769
1769
  for (var i in t)
@@ -1771,7 +1771,7 @@ var Xi = /* @__PURE__ */ We(Oe, 9, 0), Ji = /* @__PURE__ */ We(nt, 5, 0), An = f
1771
1771
  for (var i in e)
1772
1772
  n[i] = e[i];
1773
1773
  return n;
1774
- }, Zn = function(t, e, n) {
1774
+ }, Qn = function(t, e, n) {
1775
1775
  for (var i = t(), s = t.toString(), r = s.slice(s.indexOf("[") + 1, s.lastIndexOf("]")).replace(/\s+/g, "").split(","), o = 0; o < i.length; ++o) {
1776
1776
  var l = i[o], a = r[o];
1777
1777
  if (typeof l == "function") {
@@ -1800,16 +1800,16 @@ var Xi = /* @__PURE__ */ We(Oe, 9, 0), Ji = /* @__PURE__ */ We(nt, 5, 0), An = f
1800
1800
  }, $s = function(t, e, n, i) {
1801
1801
  if (!st[n]) {
1802
1802
  for (var s = "", r = {}, o = t.length - 1, l = 0; l < o; ++l)
1803
- s = Zn(t[l], s, r);
1804
- st[n] = { c: Zn(t[o], s, r), e: r };
1803
+ s = Qn(t[l], s, r);
1804
+ st[n] = { c: Qn(t[o], s, r), e: r };
1805
1805
  }
1806
1806
  var a = Us({}, st[n].e);
1807
1807
  return Ps(st[n].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + e.toString() + "}", n, a, Hs(a), i);
1808
1808
  }, qs = function() {
1809
- return [fe, re, Ct, _t, Nt, gn, bt, mn, Xi, Oe, Ji, nt, yt, Zi, Ln, We, ve, Ue, ht, vt, bn, He, Dn, yn, An, Yi, es, Fn, Vs, is];
1809
+ return [fe, re, Ct, _t, Nt, gn, bt, mn, Ki, Oe, Ji, nt, yt, Qi, Ln, We, ve, Ue, ht, vt, bn, He, Dn, yn, An, Xi, Zi, Mn, Vs, ns];
1810
1810
  }, Ws = function() {
1811
- return [ss, rs, wt, ns, ts];
1812
- }, is = function(t) {
1811
+ return [is, ss, wt, ts, es];
1812
+ }, ns = function(t) {
1813
1813
  return postMessage(t, [t.buffer]);
1814
1814
  }, Gs = function(t, e, n, i, s, r) {
1815
1815
  var o = $s(n, i, s, function(l, a) {
@@ -1821,43 +1821,43 @@ var Xi = /* @__PURE__ */ We(Oe, 9, 0), Ji = /* @__PURE__ */ We(nt, 5, 0), An = f
1821
1821
  }, wt = function(t, e, n) {
1822
1822
  for (; n; ++e)
1823
1823
  t[e] = n, n >>>= 8;
1824
- }, ss = function(t, e) {
1824
+ }, is = function(t, e) {
1825
1825
  var n = e.filename;
1826
1826
  if (t[0] = 31, t[1] = 139, t[2] = 8, t[8] = e.level < 2 ? 4 : e.level == 9 ? 2 : 0, t[9] = 3, e.mtime != 0 && wt(t, 4, Math.floor(new Date(e.mtime || Date.now()) / 1e3)), n) {
1827
1827
  t[3] = 8;
1828
1828
  for (var i = 0; i <= n.length; ++i)
1829
1829
  t[i + 10] = n.charCodeAt(i);
1830
1830
  }
1831
- }, rs = function(t) {
1831
+ }, ss = function(t) {
1832
1832
  return 10 + (t.filename ? t.filename.length + 1 : 0);
1833
1833
  };
1834
1834
  function Vs(t, e) {
1835
- return Fn(t, e || {}, 0, 0);
1835
+ return Mn(t, e || {}, 0, 0);
1836
1836
  }
1837
1837
  function Ks(t, e, n) {
1838
- return n || (n = e, e = {}), typeof n != "function" && Qi(7), Gs(t, e, [
1838
+ return n || (n = e, e = {}), typeof n != "function" && Yi(7), Gs(t, e, [
1839
1839
  qs,
1840
1840
  Ws,
1841
1841
  function() {
1842
- return [ei];
1842
+ return [Zn];
1843
1843
  }
1844
1844
  ], function(i) {
1845
- return is(ei(i.data[0], i.data[1]));
1845
+ return ns(Zn(i.data[0], i.data[1]));
1846
1846
  }, 2, n);
1847
1847
  }
1848
- function ei(t, e) {
1848
+ function Zn(t, e) {
1849
1849
  e || (e = {});
1850
- var n = ns(), i = t.length;
1850
+ var n = ts(), i = t.length;
1851
1851
  n.p(t);
1852
- var s = Fn(t, e, rs(e), 8), r = s.length;
1853
- return ss(s, e), wt(s, r - 8, n.d()), wt(s, r - 4, i), s;
1852
+ var s = Mn(t, e, ss(e), 8), r = s.length;
1853
+ return is(s, e), wt(s, r - 8, n.d()), wt(s, r - 4, i), s;
1854
1854
  }
1855
- var Xs = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), Js = 0;
1855
+ var Js = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), Xs = 0;
1856
1856
  try {
1857
- Xs.decode(Ln, { stream: !0 }), Js = 1;
1857
+ Js.decode(Ln, { stream: !0 }), Xs = 1;
1858
1858
  } catch {
1859
1859
  }
1860
- class ti {
1860
+ class ei {
1861
1861
  constructor() {
1862
1862
  this.idx = 1, this.backDict = {};
1863
1863
  }
@@ -1868,7 +1868,7 @@ class ti {
1868
1868
  }
1869
1869
  class Ys {
1870
1870
  constructor(e, n) {
1871
- this.app = e, this.isDictDisabled = n, this.dict = new ti();
1871
+ this.app = e, this.isDictDisabled = n, this.dict = new ei();
1872
1872
  }
1873
1873
  sendSetAttribute(e, n, i) {
1874
1874
  if (this.isDictDisabled) {
@@ -1889,7 +1889,7 @@ class Ys {
1889
1889
  return i && this.app.send([50, n, e]), n;
1890
1890
  }
1891
1891
  clear() {
1892
- this.dict = new ti();
1892
+ this.dict = new ei();
1893
1893
  }
1894
1894
  }
1895
1895
  class Qs {
@@ -2218,24 +2218,24 @@ class er {
2218
2218
  return e.filter((r) => s.findIndex((o) => o.key === r.key) === -1);
2219
2219
  }
2220
2220
  }
2221
- const ni = { htmlmasked: "hidden", masked: "obscured" }, xe = !(typeof window > "u"), tr = xe && navigator.userAgent.match(/firefox|fxios/i), nr = 1e5;
2222
- let Mn = xe ? Date.now() - performance.now() : 0;
2221
+ const ti = { htmlmasked: "hidden", masked: "obscured" }, xe = !(typeof window > "u"), tr = xe && navigator.userAgent.match(/firefox|fxios/i), nr = 1e5;
2222
+ let Fn = xe ? Date.now() - performance.now() : 0;
2223
2223
  function en() {
2224
- Mn = Date.now() - performance.now();
2224
+ Fn = Date.now() - performance.now();
2225
2225
  }
2226
2226
  function Ve() {
2227
- return Mn;
2227
+ return Fn;
2228
2228
  }
2229
- const ge = xe && performance.now ? () => Math.round(performance.now() + Mn) : () => Date.now(), tn = "repeat" in String.prototype ? (t) => "*".repeat(t.length) : (t) => t.replace(/./g, "*");
2230
- function os(t) {
2229
+ const ge = xe && performance.now ? () => Math.round(performance.now() + Fn) : () => Date.now(), tn = "repeat" in String.prototype ? (t) => "*".repeat(t.length) : (t) => t.replace(/./g, "*");
2230
+ function rs(t) {
2231
2231
  return t.trim().replace(/\s+/g, " ");
2232
2232
  }
2233
- function as(t) {
2233
+ function os(t) {
2234
2234
  return t.startsWith("https://") || t.startsWith("http://");
2235
2235
  }
2236
- const St = "https://docs.openreplay.com", ii = {};
2236
+ const St = "https://docs.openreplay.com", ni = {};
2237
2237
  function Ne(t, e, n = "/") {
2238
- ii[t] || (console.warn(`OpenReplay: ${t} is deprecated. ${e ? `Please, use ${e} instead.` : ""} Visit ${St}${n} for more information.`), ii[t] = !0);
2238
+ ni[t] || (console.warn(`OpenReplay: ${t} is deprecated. ${e ? `Please, use ${e} instead.` : ""} Visit ${St}${n} for more information.`), ni[t] = !0);
2239
2239
  }
2240
2240
  function Pn(t) {
2241
2241
  let e = t.getAttribute("data-openreplay-label");
@@ -2243,10 +2243,10 @@ function Pn(t) {
2243
2243
  }
2244
2244
  function Le(t, e) {
2245
2245
  const n = `data-openreplay-${e}`;
2246
- return t.hasAttribute(n) ? (ni[e] && Ne(
2246
+ return t.hasAttribute(n) ? (ti[e] && Ne(
2247
2247
  `"${n}" attribute`,
2248
2248
  // @ts-ignore
2249
- `"${ni[e]}" attribute`,
2249
+ `"${ti[e]}" attribute`,
2250
2250
  "/installation/sanitize-data"
2251
2251
  ), !0) : !1;
2252
2252
  }
@@ -2257,12 +2257,12 @@ function ir(t) {
2257
2257
  return !1;
2258
2258
  }
2259
2259
  }
2260
- function si(t) {
2260
+ function ii(t) {
2261
2261
  return t.toString(16).padStart(2, "0");
2262
2262
  }
2263
2263
  function sr(t) {
2264
2264
  const e = new Uint8Array((t || 40) / 2), n = window.crypto || window.msCrypto;
2265
- return n ? (n.getRandomValues(e), Array.from(e, si).join("")) : Array.from({ length: t || 40 }, () => si(Math.floor(Math.random() * 16))).join("");
2265
+ return n ? (n.getRandomValues(e), Array.from(e, ii).join("")) : Array.from({ length: t || 40 }, () => ii(Math.floor(Math.random() * 16))).join("");
2266
2266
  }
2267
2267
  function rr() {
2268
2268
  try {
@@ -2277,11 +2277,11 @@ function Bn(t) {
2277
2277
  window.Zone.__symbol__(t)
2278
2278
  ) : t;
2279
2279
  }
2280
- function cs(t) {
2280
+ function as(t) {
2281
2281
  const e = Bn("MutationObserver");
2282
2282
  return new window[e](t);
2283
2283
  }
2284
- function ls(t, e, n, i) {
2284
+ function cs(t, e, n, i) {
2285
2285
  const s = Bn("addEventListener");
2286
2286
  try {
2287
2287
  t[s](e, n, i);
@@ -2293,7 +2293,7 @@ function ls(t, e, n, i) {
2293
2293
  );
2294
2294
  }
2295
2295
  }
2296
- function ds(t, e, n, i) {
2296
+ function ls(t, e, n, i) {
2297
2297
  const s = Bn("removeEventListener");
2298
2298
  try {
2299
2299
  t[s](e, n, i);
@@ -2335,12 +2335,12 @@ const ar = new or();
2335
2335
  function cr(t) {
2336
2336
  ar.addTask(t);
2337
2337
  }
2338
- function hs(t, e) {
2338
+ function ds(t, e) {
2339
2339
  const n = { ...t };
2340
2340
  for (const i in e)
2341
2341
  if (e.hasOwnProperty(i)) {
2342
2342
  const s = e[i], r = t[i];
2343
- typeof s == "object" && !Array.isArray(s) && s !== null ? n[i] = hs(r || {}, s) : n[i] = s;
2343
+ typeof s == "object" && !Array.isArray(s) && s !== null ? n[i] = ds(r || {}, s) : n[i] = s;
2344
2344
  }
2345
2345
  return n;
2346
2346
  }
@@ -2401,7 +2401,7 @@ function gr(t) {
2401
2401
  t
2402
2402
  ];
2403
2403
  }
2404
- function ri(t, e) {
2404
+ function si(t, e) {
2405
2405
  return [
2406
2406
  13,
2407
2407
  t,
@@ -2493,7 +2493,7 @@ function Ir(t) {
2493
2493
  t
2494
2494
  ];
2495
2495
  }
2496
- function oi(t, e) {
2496
+ function ri(t, e) {
2497
2497
  return [
2498
2498
  30,
2499
2499
  t,
@@ -2522,7 +2522,7 @@ function Nr(t) {
2522
2522
  t
2523
2523
  ];
2524
2524
  }
2525
- function ai(t, e, n, i) {
2525
+ function oi(t, e, n, i) {
2526
2526
  return [
2527
2527
  57,
2528
2528
  t,
@@ -2531,7 +2531,7 @@ function ai(t, e, n, i) {
2531
2531
  i
2532
2532
  ];
2533
2533
  }
2534
- function ci(t) {
2534
+ function ai(t) {
2535
2535
  return [
2536
2536
  58,
2537
2537
  t
@@ -2586,7 +2586,7 @@ function wn(t, e) {
2586
2586
  e
2587
2587
  ];
2588
2588
  }
2589
- function li(t, e, n) {
2589
+ function ci(t, e, n) {
2590
2590
  return [
2591
2591
  71,
2592
2592
  t,
@@ -2603,14 +2603,14 @@ function Sn(t, e, n, i) {
2603
2603
  i
2604
2604
  ];
2605
2605
  }
2606
- function di(t, e) {
2606
+ function li(t, e) {
2607
2607
  return [
2608
2608
  75,
2609
2609
  t,
2610
2610
  e
2611
2611
  ];
2612
2612
  }
2613
- function us(t, e) {
2613
+ function hs(t, e) {
2614
2614
  return [
2615
2615
  76,
2616
2616
  t,
@@ -2647,7 +2647,7 @@ function xt(t, e, n, i, s, r, o, l, a) {
2647
2647
  a
2648
2648
  ];
2649
2649
  }
2650
- function Fr(t, e, n, i, s, r) {
2650
+ function Mr(t, e, n, i, s, r) {
2651
2651
  return [
2652
2652
  84,
2653
2653
  t,
@@ -2658,7 +2658,7 @@ function Fr(t, e, n, i, s, r) {
2658
2658
  r
2659
2659
  ];
2660
2660
  }
2661
- function Mr(t, e, n, i, s, r) {
2661
+ function Fr(t, e, n, i, s, r) {
2662
2662
  return [
2663
2663
  112,
2664
2664
  t,
@@ -2669,7 +2669,7 @@ function Mr(t, e, n, i, s, r) {
2669
2669
  r
2670
2670
  ];
2671
2671
  }
2672
- function hi(t, e, n) {
2672
+ function di(t, e, n) {
2673
2673
  return [
2674
2674
  113,
2675
2675
  t,
@@ -2689,7 +2689,7 @@ function Br(t) {
2689
2689
  t
2690
2690
  ];
2691
2691
  }
2692
- function fs(t, e, n, i, s, r, o, l, a, d) {
2692
+ function us(t, e, n, i, s, r, o, l, a, d) {
2693
2693
  return [
2694
2694
  116,
2695
2695
  t,
@@ -2760,11 +2760,11 @@ function Hr(t, e) {
2760
2760
  s = i = void 0;
2761
2761
  }), t.ticker.attach(o, 40, !1), document.hidden !== void 0 && t.attachEventListener(document, "visibilitychange", o, !1, !1);
2762
2762
  }
2763
- const ui = "__or__watched_tags__";
2763
+ const hi = "__or__watched_tags__";
2764
2764
  class $r {
2765
2765
  constructor(e, n, i) {
2766
2766
  this.sessionStorage = e, this.errLog = n, this.onTag = i, this.intervals = {}, this.tags = [];
2767
- const s = JSON.parse(e.getItem(ui) ?? "[]");
2767
+ const s = JSON.parse(e.getItem(hi) ?? "[]");
2768
2768
  this.setTags(s), this.observer = new IntersectionObserver((r) => {
2769
2769
  r.forEach((o) => {
2770
2770
  if (o.isIntersecting && o.target) {
@@ -2784,7 +2784,7 @@ class $r {
2784
2784
  if (i && i.length) {
2785
2785
  this.setTags(i);
2786
2786
  const s = JSON.stringify(i);
2787
- this.sessionStorage.setItem(ui, s || "");
2787
+ this.sessionStorage.setItem(hi, s || "");
2788
2788
  }
2789
2789
  }).catch((i) => this.errLog(i));
2790
2790
  }
@@ -2877,7 +2877,7 @@ const qr = {
2877
2877
  fontWeight: "500",
2878
2878
  lineHeight: "1.5rem",
2879
2879
  cursor: "pointer"
2880
- }, fi = {
2880
+ }, ui = {
2881
2881
  fontFamily: "Verdana, sans-serif",
2882
2882
  fontSize: "13px",
2883
2883
  fontWeight: "500",
@@ -2893,7 +2893,7 @@ const qr = {
2893
2893
  gap: "0.625rem",
2894
2894
  fontSize: "13px",
2895
2895
  lineHeight: "auto"
2896
- }, Xr = {
2896
+ }, Jr = {
2897
2897
  padding: "0.5rem",
2898
2898
  gap: "0.5rem",
2899
2899
  fontFamily: "Verdana, sans-serif",
@@ -2922,18 +2922,18 @@ const qr = {
2922
2922
  fontStyle: "normal",
2923
2923
  fontWeight: "400"
2924
2924
  // lineHeight: '1.375rem',
2925
- }, Jr = {
2925
+ }, Xr = {
2926
2926
  ...$e,
2927
2927
  display: "flex",
2928
2928
  flexDirection: "column",
2929
2929
  alignItems: "center",
2930
2930
  gap: "0.625rem"
2931
- }, pi = {
2931
+ }, fi = {
2932
2932
  fontSize: "1.25rem",
2933
2933
  fontWeight: "500",
2934
2934
  cursor: "pointer",
2935
2935
  color: "#394EFF"
2936
- }, gi = {
2936
+ }, pi = {
2937
2937
  display: "flex",
2938
2938
  padding: "0.4rem 0.9375rem",
2939
2939
  justifyContent: "center",
@@ -2953,7 +2953,7 @@ const qr = {
2953
2953
  width: "100%",
2954
2954
  boxSizing: "border-box",
2955
2955
  cursor: "pointer"
2956
- }, mi = {
2956
+ }, gi = {
2957
2957
  marginTop: "1rem",
2958
2958
  marginBottom: "1rem",
2959
2959
  cursor: "pointer",
@@ -2969,7 +2969,7 @@ const qr = {
2969
2969
  padding: "0.5rem",
2970
2970
  width: "100%",
2971
2971
  boxSizing: "border-box"
2972
- }, bi = {
2972
+ }, mi = {
2973
2973
  display: "flex",
2974
2974
  flexDirection: "column",
2975
2975
  alignItems: "center",
@@ -2991,7 +2991,7 @@ const qr = {
2991
2991
  fontSize: "13px",
2992
2992
  height: "24px",
2993
2993
  width: "24px"
2994
- }, yi = {
2994
+ }, bi = {
2995
2995
  borderRadius: "0.375rem",
2996
2996
  border: "1px solid rgba(0, 0, 0, 0.06)",
2997
2997
  background: "#F5F7FF",
@@ -3001,12 +3001,12 @@ const qr = {
3001
3001
  padding: "0.625rem 0.9375rem",
3002
3002
  gap: "0.5rem",
3003
3003
  alignSelf: "stretch"
3004
- }, vi = {
3004
+ }, yi = {
3005
3005
  fontWeight: "bold"
3006
3006
  }, Zr = {
3007
3007
  fontSize: "13px",
3008
3008
  lineHeight: "auto"
3009
- }, ps = {
3009
+ }, fs = {
3010
3010
  marginRight: "0.5rem",
3011
3011
  cursor: "pointer",
3012
3012
  color: "#394EFF",
@@ -3017,7 +3017,7 @@ const qr = {
3017
3017
  fontWeight: "500",
3018
3018
  lineHeight: "auto"
3019
3019
  }, eo = {
3020
- ...ps,
3020
+ ...fs,
3021
3021
  display: "flex",
3022
3022
  padding: "0.25rem 0.9375rem",
3023
3023
  justifyContent: "center",
@@ -3038,7 +3038,7 @@ const qr = {
3038
3038
  borderRadius: "50%",
3039
3039
  borderLeftColor: "#fff",
3040
3040
  animation: "spin 0.5s linear infinite"
3041
- }, wi = {
3041
+ }, vi = {
3042
3042
  Standard: { width: 1280, height: 720 },
3043
3043
  High: { width: 1920, height: 1080 }
3044
3044
  };
@@ -3241,7 +3241,7 @@ class uo {
3241
3241
  Authorization: `Bearer ${l}`
3242
3242
  }
3243
3243
  }).then((c) => c.json()).then(({ test: c }) => {
3244
- this.isActive = !0, this.test = c, this.signalManager = new ho(this.app.options.ingestPoint, () => this.app.timestamp(), l, o, this.storageKey, (u, p) => this.app.localStorage.setItem(u, p), (u) => this.app.localStorage.removeItem(u), (u) => this.app.localStorage.getItem(u), () => this.app.getSessionID()), this.createGreeting(c.title, c.reqMic, c.reqCamera), a && ((c.reqMic || c.reqCamera) && this.userRecorder.startRecording(30, wi.Standard, c.reqMic, c.reqCamera), this.showWidget(c.description, c.tasks, !0), this.showTaskSection());
3244
+ this.isActive = !0, this.test = c, this.signalManager = new ho(this.app.options.ingestPoint, () => this.app.timestamp(), l, o, this.storageKey, (u, p) => this.app.localStorage.setItem(u, p), (u) => this.app.localStorage.removeItem(u), (u) => this.app.localStorage.getItem(u), () => this.app.getSessionID()), this.createGreeting(c.title, c.reqMic, c.reqCamera), a && ((c.reqMic || c.reqCamera) && this.userRecorder.startRecording(30, vi.Standard, c.reqMic, c.reqCamera), this.showWidget(c.description, c.tasks, !0), this.showTaskSection());
3245
3245
  }).then(() => o).catch((c) => {
3246
3246
  console.log("OR: Error fetching test", c);
3247
3247
  });
@@ -3260,7 +3260,7 @@ class uo {
3260
3260
 
3261
3261
  📹 We're recording this browser tab to learn from your experience.
3262
3262
  🎤 Please enable mic and camera if asked, to give us a complete picture.`), o = z("div", "button", Kr, "Read guidelines to begin");
3263
- this.removeGreeting = () => ((n || i) && this.userRecorder.startRecording(30, wi.Standard, n, i), this.container.removeChild(o), this.container.removeChild(r), this.container.removeChild(s), !1), o.onclick = () => {
3263
+ this.removeGreeting = () => ((n || i) && this.userRecorder.startRecording(30, vi.Standard, n, i), this.container.removeChild(o), this.container.removeChild(r), this.container.removeChild(s), !1), o.onclick = () => {
3264
3264
  var a, d, c, u;
3265
3265
  this.removeGreeting();
3266
3266
  const l = (a = this.signalManager) == null ? void 0 : a.getDurations();
@@ -3283,7 +3283,7 @@ class uo {
3283
3283
  });
3284
3284
  const s = this.createTitleSection();
3285
3285
  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, rt);
3286
- const r = this.createDescriptionSection(e), o = this.createTasksSection(n), l = z("div", "stop_bn_or", mi, "Abort Session"), a = z("div", "stop_ct_or", { fontSize: "13px!important" });
3286
+ const r = this.createDescriptionSection(e), o = this.createTasksSection(n), l = z("div", "stop_bn_or", gi, "Abort Session"), a = z("div", "stop_ct_or", { fontSize: "13px!important" });
3287
3287
  a.style.fontSize = "13px", a.append(l), this.container.append(s, r, o, a), this.taskSection = o, this.descriptionSection = r, this.stopButton = l, this.stopButtonContainer = a, l.onclick = () => {
3288
3288
  var d;
3289
3289
  this.userRecorder.discard(), (d = this.signalManager) == null || d.signalTest("skipped"), document.body.removeChild(this.bg), window.close();
@@ -3291,7 +3291,7 @@ class uo {
3291
3291
  }
3292
3292
  createTitleSection() {
3293
3293
  var l;
3294
- const e = z("div", "title", Xr), n = ro(), i = z("div", "title_text", {
3294
+ const e = z("div", "title", Jr), n = ro(), i = z("div", "title_text", {
3295
3295
  maxWidth: "19rem",
3296
3296
  overflow: "hidden",
3297
3297
  textOverflow: "ellipsis",
@@ -3301,7 +3301,7 @@ class uo {
3301
3301
  cursor: "pointer"
3302
3302
  }, (l = this.test) == null ? void 0 : l.title), s = oo();
3303
3303
  e.append(n, i, s);
3304
- const r = (a) => (this.widgetVisible = a, 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 ? rt : { border: "none", background: "none", padding: 0 }), this.taskSection && Object.assign(this.taskSection.style, this.widgetVisible ? $e : { display: "none" }), this.descriptionSection && Object.assign(this.descriptionSection.style, this.widgetVisible ? $e : { display: "none" }), this.endSection && Object.assign(this.endSection.style, this.widgetVisible ? $e : { display: "none" }), this.stopButton && Object.assign(this.stopButton.style, this.widgetVisible ? mi : { display: "none" }), a), o = () => {
3304
+ const r = (a) => (this.widgetVisible = a, 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 ? rt : { border: "none", background: "none", padding: 0 }), this.taskSection && Object.assign(this.taskSection.style, this.widgetVisible ? $e : { display: "none" }), this.descriptionSection && Object.assign(this.descriptionSection.style, this.widgetVisible ? $e : { display: "none" }), this.endSection && Object.assign(this.endSection.style, this.widgetVisible ? $e : { display: "none" }), this.stopButton && Object.assign(this.stopButton.style, this.widgetVisible ? gi : { display: "none" }), a), o = () => {
3305
3305
  Object.assign(s.style, {
3306
3306
  transform: this.widgetVisible ? "rotate(0deg)" : "rotate(180deg)"
3307
3307
  }), r(!this.widgetVisible);
@@ -3309,11 +3309,11 @@ class uo {
3309
3309
  return i.onclick = o, s.onclick = o, so(this.bg, n), this.collapseWidget = () => r(!1), e;
3310
3310
  }
3311
3311
  createDescriptionSection(e) {
3312
- const n = z("div", "description_section_or", $e), i = z("div", "description_s_title_or", fi), s = z("div", "title", {
3312
+ const n = z("div", "description_section_or", $e), i = z("div", "description_s_title_or", ui), s = z("div", "title", {
3313
3313
  fontSize: 13,
3314
3314
  fontWeight: 500,
3315
3315
  lineHeight: "auto"
3316
- }, "Introduction & Guidelines"), r = z("div", "icon", pi, "-"), o = z("div", "content", je), l = z("div", "text_description", {
3316
+ }, "Introduction & Guidelines"), r = z("div", "icon", fi, "-"), o = z("div", "content", je), l = z("div", "text_description", {
3317
3317
  maxHeight: "250px",
3318
3318
  overflowY: "auto",
3319
3319
  whiteSpace: "pre-wrap",
@@ -3322,7 +3322,7 @@ class uo {
3322
3322
  lineHeight: "auto"
3323
3323
  });
3324
3324
  l.innerHTML = e;
3325
- const a = z("div", "button_begin_or", gi, "Begin Test");
3325
+ const a = z("div", "button_begin_or", pi, "Begin Test");
3326
3326
  i.append(s, r), o.append(l, a), n.append(i, o);
3327
3327
  const d = () => {
3328
3328
  this.widgetGuidelinesVisible = !this.widgetGuidelinesVisible, r.textContent = this.widgetGuidelinesVisible ? "-" : "+", Object.assign(o.style, this.widgetGuidelinesVisible ? je : { display: "none" });
@@ -3343,17 +3343,17 @@ class uo {
3343
3343
  }
3344
3344
  createTasksSection(e) {
3345
3345
  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, rt);
3346
- const n = z("div", "task_section_or", $e), i = z("div", "description_t_title_or", fi), s = z("div", "title", {
3346
+ const n = z("div", "task_section_or", $e), i = z("div", "description_t_title_or", ui), s = z("div", "title", {
3347
3347
  fontSize: "13px",
3348
3348
  fontWeight: "500",
3349
3349
  lineHeight: "auto"
3350
- }, "Tasks"), r = z("div", "icon", pi, "-"), o = z("div", "content", je), l = z("div", "pagination", Yr), a = z("div", "taskCard", yi), d = z("div", "taskText", vi), c = z("div", "taskDescription", Zr), u = z("div", "taskButtons", to), p = z("div", "taskText", vi);
3350
+ }, "Tasks"), r = z("div", "icon", fi, "-"), o = z("div", "content", je), l = z("div", "pagination", Yr), a = z("div", "taskCard", bi), d = z("div", "taskText", yi), c = z("div", "taskDescription", Zr), u = z("div", "taskButtons", to), p = z("div", "taskText", yi);
3351
3351
  p.textContent = "Your answer";
3352
3352
  const y = z("textarea", "taskDescription", {
3353
3353
  resize: "vertical"
3354
- }), S = z("div", "inputArea", yi);
3354
+ }), S = z("div", "inputArea", bi);
3355
3355
  S.append(p, y);
3356
- const v = z("div", "closePanelButton", ps, "Collapse Panel"), T = z("div", "nextButton", eo, "Done, Next");
3356
+ const v = z("div", "closePanelButton", fs, "Collapse Panel"), T = z("div", "nextButton", eo, "Done, Next");
3357
3357
  i.append(s, r), a.append(d, c), u.append(v, T), o.append(l, a, S, u), n.append(i, o);
3358
3358
  const A = () => {
3359
3359
  const k = e[this.currentTaskIndex];
@@ -3381,7 +3381,7 @@ class uo {
3381
3381
  }), this.widgetTasksVisible = !1, !1), this.showTaskSection = () => (r.textContent = "-", Object.assign(o.style, je), this.widgetTasksVisible = !0, !0);
3382
3382
  const D = () => {
3383
3383
  const k = document.getElementById(`or_task_${this.currentTaskIndex}`);
3384
- k && Object.assign(k.style, bi);
3384
+ k && Object.assign(k.style, mi);
3385
3385
  for (let N = 0; N < this.currentTaskIndex; N++) {
3386
3386
  const O = document.getElementById(`or_task_${N}`);
3387
3387
  O && Object.assign(O.style, Qr);
@@ -3402,19 +3402,19 @@ class uo {
3402
3402
  this.app.localStorage.setItem("or_uxt_task_index", this.currentTaskIndex.toString());
3403
3403
  }, setTimeout(() => {
3404
3404
  const k = document.getElementById("or_task_0");
3405
- k && Object.assign(k.style, bi), A(), D();
3405
+ k && Object.assign(k.style, mi), A(), D();
3406
3406
  }, 1), n;
3407
3407
  }
3408
3408
  showEndSection() {
3409
3409
  var l, a, d, c;
3410
3410
  let e = !0;
3411
3411
  (l = this.signalManager) == null || l.signalTest("done");
3412
- const n = z("div", "end_section_or", Jr), i = z("div", "end_title_or", {
3412
+ const n = z("div", "end_section_or", Xr), i = z("div", "end_title_or", {
3413
3413
  fontSize: "1.25rem",
3414
3414
  fontWeight: "500"
3415
3415
  }, "Thank you! 👍"), s = z("div", "end_description_or", {}, ((a = this.test) == null ? void 0 : a.conclusion) ?? `Thank you for participating in our usability test. Your feedback has been captured and will be used to enhance our website.
3416
3416
 
3417
- We appreciate your time and valuable input.`), r = z("div", "end_button_or", gi, "Submitting Feedback"), o = co();
3417
+ We appreciate your time and valuable input.`), r = z("div", "end_button_or", pi, "Submitting Feedback"), o = co();
3418
3418
  r.appendChild(o), (d = this.test) != null && d.reqMic || (c = this.test) != null && c.reqCamera ? this.userRecorder.sendToAPI().then(() => {
3419
3419
  r.removeChild(o), r.textContent = "End Session", e = !1;
3420
3420
  }).catch((u) => {
@@ -3424,7 +3424,7 @@ We appreciate your time and valuable input.`), r = z("div", "end_button_or", gi,
3424
3424
  }, n.append(i, s, r), this.endSection = n, this.container.append(n);
3425
3425
  }
3426
3426
  }
3427
- function gs(t) {
3427
+ function ps(t) {
3428
3428
  return !!t && t.nodeType != null;
3429
3429
  }
3430
3430
  function In(t) {
@@ -3512,7 +3512,7 @@ class po {
3512
3512
  this.intervals.forEach((e) => clearInterval(e)), this.snapshots = {};
3513
3513
  }
3514
3514
  }
3515
- const Si = {
3515
+ const wi = {
3516
3516
  low: 0.35,
3517
3517
  medium: 0.55,
3518
3518
  high: 0.8
@@ -3525,9 +3525,9 @@ function go(t, e = "medium", n, i = !1, s, r) {
3525
3525
  const a = n.getContext("2d");
3526
3526
  if (!a)
3527
3527
  return "";
3528
- a.clearRect(0, 0, n.width, n.height), a.drawImage(t, 0, 0, n.width, n.height), n.toBlob(r, o, Si[e]);
3528
+ a.clearRect(0, 0, n.width, n.height), a.drawImage(t, 0, 0, n.width, n.height), n.toBlob(r, o, wi[e]);
3529
3529
  } else
3530
- t.toBlob(r, o, Si[e]);
3530
+ t.toBlob(r, o, wi[e]);
3531
3531
  }
3532
3532
  function mo(t, e) {
3533
3533
  const n = URL.createObjectURL(t), i = document.createElement("a");
@@ -3571,7 +3571,7 @@ class yo {
3571
3571
  const r = this.getID(e);
3572
3572
  if (r === void 0)
3573
3573
  return;
3574
- ls(e, n, i, s);
3574
+ cs(e, n, i, s);
3575
3575
  let o = this.elementListeners.get(r);
3576
3576
  o === void 0 && (o = [], this.elementListeners.set(r, o)), o.push([n, i, s]);
3577
3577
  }
@@ -3585,7 +3585,7 @@ class yo {
3585
3585
  if (n !== void 0) {
3586
3586
  e[this.node_id] = void 0, delete e[this.node_id], delete this.nodes[n];
3587
3587
  const i = this.elementListeners.get(n);
3588
- i !== void 0 && (this.elementListeners.delete(n), i.forEach((s) => ds(e, s[0], s[1], s[2]))), this.totalNodeAmount--;
3588
+ i !== void 0 && (this.elementListeners.delete(n), i.forEach((s) => ls(e, s[0], s[1], s[2]))), this.totalNodeAmount--;
3589
3589
  }
3590
3590
  return n;
3591
3591
  }
@@ -3639,7 +3639,7 @@ var we;
3639
3639
  })(we || (we = {}));
3640
3640
  class jn {
3641
3641
  constructor(e, n = !1) {
3642
- 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 = cs(this.app.safe((i) => {
3642
+ 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 = as(this.app.safe((i) => {
3643
3643
  for (const s of i) {
3644
3644
  const r = s.target, o = s.type;
3645
3645
  if (!rn(r))
@@ -3675,12 +3675,12 @@ class jn {
3675
3675
  }
3676
3676
  sendNodeAttribute(e, n, i, s) {
3677
3677
  if (In(n)) {
3678
- i.substr(0, 6) === "xlink:" && (i = i.substr(6)), s === null ? this.app.send(ri(e, i)) : i === "href" ? (s.length > 1e5 && (s = ""), this.app.send(vn(e, i, s, this.app.getBaseHref()))) : this.app.attributeSender.sendSetAttribute(e, i, s);
3678
+ i.substr(0, 6) === "xlink:" && (i = i.substr(6)), s === null ? this.app.send(si(e, i)) : i === "href" ? (s.length > 1e5 && (s = ""), this.app.send(vn(e, i, s, this.app.getBaseHref()))) : this.app.attributeSender.sendSetAttribute(e, i, s);
3679
3679
  return;
3680
3680
  }
3681
3681
  if (!(i === "src" || i === "srcset" || i === "integrity" || i === "crossorigin" || i === "autocomplete" || i.substr(0, 2) === "on") && !(i === "value" && Z(n, "input") && n.type !== "button" && n.type !== "reset" && n.type !== "submit")) {
3682
3682
  if (s === null) {
3683
- this.app.send(ri(e, i));
3683
+ this.app.send(si(e, i));
3684
3684
  return;
3685
3685
  }
3686
3686
  if (i === "style" || i === "href" && Z(n, "link")) {
@@ -3829,7 +3829,7 @@ class jn {
3829
3829
  this.observer.disconnect(), this.clear();
3830
3830
  }
3831
3831
  }
3832
- class xi extends jn {
3832
+ class Si extends jn {
3833
3833
  observe(e) {
3834
3834
  const n = e.contentDocument, i = this.app.nodes.getID(e);
3835
3835
  !n || i === void 0 || this.observeRoot(n, (s) => {
@@ -3925,7 +3925,7 @@ class So extends jn {
3925
3925
  return;
3926
3926
  const r = e.contentWindow, o = e.contentDocument;
3927
3927
  if (o && o !== n) {
3928
- const l = new xi(this.app);
3928
+ const l = new Si(this.app);
3929
3929
  this.iframeObservers.push(l), l.observe(e), n = o, this.iframeOffsets.observe(e);
3930
3930
  }
3931
3931
  r && // Sometimes currentWin.window is null (not in specification). Such window object is not functional
@@ -3952,7 +3952,7 @@ class So extends jn {
3952
3952
  const r = on.apply(this, arguments);
3953
3953
  return i.handleShadowRoot(r), r;
3954
3954
  }, this.app.nodes.clear(), this.app.nodes.syntheticMode(n);
3955
- const s = new xi(this.app);
3955
+ const s = new Si(this.app);
3956
3956
  this.iframeObservers.push(s), s.syntheticObserve(e, window.document);
3957
3957
  }
3958
3958
  disconnect() {
@@ -4096,12 +4096,12 @@ class Io {
4096
4096
  this.timer !== null && (clearInterval(this.timer), this.timer = null);
4097
4097
  }
4098
4098
  }
4099
- const Ze = "canceled", ki = "or_uxt_active", an = "or_buffer_1", _e = (t) => ({ reason: t, success: !1 }), Co = (t) => ({ ...t, success: !0 });
4099
+ const Ze = "canceled", xi = "or_uxt_active", an = "or_buffer_1", _e = (t) => ({ reason: t, success: !1 }), Co = (t) => ({ ...t, success: !0 });
4100
4100
  var Q;
4101
4101
  (function(t) {
4102
4102
  t[t.NotActive = 0] = "NotActive", t[t.Starting = 1] = "Starting", t[t.Active = 2] = "Active", t[t.ColdStart = 3] = "ColdStart";
4103
4103
  })(Q || (Q = {}));
4104
- const ms = "https://api.openreplay.com/ingest";
4104
+ const gs = "https://api.openreplay.com/ingest";
4105
4105
  function cn() {
4106
4106
  const t = (/* @__PURE__ */ new Date()).getTimezoneOffset() * -1, e = t >= 0 ? "+" : "-", n = Math.floor(Math.abs(t) / 60), i = Math.abs(t) % 60;
4107
4107
  return `UTC${e}${String(n).padStart(2, "0")}:${String(i).padStart(2, "0")}`;
@@ -4150,7 +4150,7 @@ let No = class {
4150
4150
  session_reset_key: "__openreplay_reset",
4151
4151
  session_tabid_key: "__openreplay_tabid",
4152
4152
  local_uuid_key: "__openreplay_uuid",
4153
- ingestPoint: ms,
4153
+ ingestPoint: gs,
4154
4154
  resourceBaseHref: null,
4155
4155
  __is_snippet: !1,
4156
4156
  __debug_report_edp: null,
@@ -4176,14 +4176,14 @@ let No = class {
4176
4176
  useAnimationFrame: !1
4177
4177
  }
4178
4178
  };
4179
- if (this.options = hs(o, i), !this.insideIframe && !this.options.forceSingleTab && globalThis && "BroadcastChannel" in globalThis) {
4179
+ if (this.options = ds(o, i), !this.insideIframe && !this.options.forceSingleTab && globalThis && "BroadcastChannel" in globalThis) {
4180
4180
  const a = location.hostname.split(".").slice(-2).join("_");
4181
4181
  this.bc = new BroadcastChannel(`rick_${a}`);
4182
4182
  }
4183
4183
  this.revID = this.options.revID, this.localStorage = this.options.localStorage ?? window.localStorage, this.sessionStorage = this.options.sessionStorage ?? window.sessionStorage, this.sanitizer = new ko(this, i), this.nodes = new yo(this.options.node_id), this.observer = new So(this, i), this.ticker = new Io(this), this.ticker.attach(() => this.commit()), this.debug = new bo(this.options.__debug__), this.session = new To(this, this.options), this.attributeSender = new Ys(this, !!this.options.disableStringDict), this.featureFlags = new er(this), this.tagWatcher = new $r(this.sessionStorage, this.debug.error, (a) => {
4184
4184
  this.send(zr(a));
4185
4185
  }), this.session.attachUpdateCallback(({ userID: a, metadata: d }) => {
4186
- a != null && this.send(Er(a)), d != null && Object.entries(d).forEach(([c, u]) => this.send(oi(c, u)));
4186
+ a != null && this.send(Er(a)), d != null && Object.entries(d).forEach(([c, u]) => this.send(ri(c, u)));
4187
4187
  }), n != null && this.session.applySessionHash(n), this.initWorker();
4188
4188
  const l = this.session.getTabId();
4189
4189
  if (this.insideIframe) {
@@ -4246,15 +4246,15 @@ let No = class {
4246
4246
  let v = S;
4247
4247
  return this.pageFrames.forEach((T) => {
4248
4248
  if (T.dataset.domain === c.data.domain) {
4249
- const [A, B, D, k, N, O, L] = S, { left: I, top: E, width: P, height: V } = T.getBoundingClientRect(), j = document.documentElement.scrollWidth, q = document.documentElement.scrollHeight, C = O / 100 * P + I, F = L / 100 * V + E, G = C / j, K = F / q;
4249
+ const [A, B, D, k, N, O, L] = S, { left: I, top: E, width: P, height: G } = T.getBoundingClientRect(), j = document.documentElement.scrollWidth, $ = document.documentElement.scrollHeight, C = O / 100 * P + I, M = L / 100 * G + E, W = C / j, V = M / $;
4250
4250
  v = [
4251
4251
  A,
4252
4252
  B,
4253
4253
  D,
4254
4254
  k,
4255
4255
  N,
4256
- Math.round(G * 1e3) / 10,
4257
- Math.round(K * 1e3) / 10
4256
+ Math.round(W * 1e3) / 10,
4257
+ Math.round(V * 1e3) / 10
4258
4258
  ];
4259
4259
  }
4260
4260
  }), v;
@@ -4425,7 +4425,7 @@ let No = class {
4425
4425
  // Use app.nodes.attachNodeListener for registered nodes instead
4426
4426
  attachEventListener(e, n, i, s = !0, r = !0) {
4427
4427
  s && (i = this.safe(i));
4428
- const o = () => e ? ls(e, n, i, r) : null, l = () => e ? ds(e, n, i, r) : null;
4428
+ const o = () => e ? cs(e, n, i, r) : null, l = () => e ? ls(e, n, i, r) : null;
4429
4429
  this.attachStartCallback(o, s), this.attachStopCallback(l, s);
4430
4430
  }
4431
4431
  // TODO: full correct semantic
@@ -4714,8 +4714,8 @@ let No = class {
4714
4714
  })
4715
4715
  });
4716
4716
  if (a.status !== 200) {
4717
- const C = await a.text(), F = C === Ze ? Ze : `Server error: ${a.status}. ${C}`;
4718
- return _e(F);
4717
+ const C = await a.text(), M = C === Ze ? Ze : `Server error: ${a.status}. ${C}`;
4718
+ return _e(M);
4719
4719
  }
4720
4720
  if (!this.worker) {
4721
4721
  const C = "no worker found after start request (this should not happen in real world)";
@@ -4764,9 +4764,9 @@ let No = class {
4764
4764
  type: "auth",
4765
4765
  token: d,
4766
4766
  beaconSizeLimit: p
4767
- }), !l && d === o && (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(ut(this.session.getTabId()))), Object.entries(this.session.getInfo().metadata).forEach(([C, F]) => this.send(oi(C, F))), this.localStorage.setItem(this.options.local_uuid_key, c), this.compressionThreshold = y;
4768
- const V = { sessionToken: d, userUUID: c, sessionID: v };
4769
- if (this.startCallbacks.forEach((C) => C(V)), this.featureFlags.reloadFlags(), await this.tagWatcher.fetchTags(this.options.ingestPoint, d), this.activityState = Q.Active, L && !this.options.canvas.disableCanvas && (this.canvasRecorder = this.canvasRecorder ?? new po(this, {
4767
+ }), !l && d === o && (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(ut(this.session.getTabId()))), Object.entries(this.session.getInfo().metadata).forEach(([C, M]) => this.send(ri(C, M))), this.localStorage.setItem(this.options.local_uuid_key, c), this.compressionThreshold = y;
4768
+ const G = { sessionToken: d, userUUID: c, sessionID: v };
4769
+ if (this.startCallbacks.forEach((C) => C(G)), this.featureFlags.reloadFlags(), await this.tagWatcher.fetchTags(this.options.ingestPoint, d), this.activityState = Q.Active, L && !this.options.canvas.disableCanvas && (this.canvasRecorder = this.canvasRecorder ?? new po(this, {
4770
4770
  fps: E,
4771
4771
  quality: I,
4772
4772
  isDebug: this.options.canvas.__save_canvas_locally,
@@ -4779,19 +4779,19 @@ let No = class {
4779
4779
  this.clearBuffers(), this.commit();
4780
4780
  } else
4781
4781
  this.insideIframe && this.rootId ? this.observer.crossdomainObserve(this.rootId, this.frameOderNumber) : this.observer.observe(), this.ticker.start();
4782
- this.uxtManager = this.uxtManager ? this.uxtManager : new uo(this, ki);
4782
+ this.uxtManager = this.uxtManager ? this.uxtManager : new uo(this, xi);
4783
4783
  let j;
4784
- const q = this.localStorage.getItem(ki);
4785
- if (q && (j = parseInt(q, 10)), location != null && location.search) {
4784
+ const $ = this.localStorage.getItem(xi);
4785
+ if ($ && (j = parseInt($, 10)), location != null && location.search) {
4786
4786
  const C = new URLSearchParams(location.search);
4787
4787
  if (C.has("oruxt")) {
4788
- const F = C.get("oruxt");
4789
- j = F ? parseInt(F, 10) : void 0;
4788
+ const M = C.get("oruxt");
4789
+ j = M ? parseInt(M, 10) : void 0;
4790
4790
  }
4791
4791
  }
4792
- return j && (this.uxtManager.isActive ? this.onUxtCb.forEach((C) => C(j)) : this.uxtManager.getTest(j, d, !!q).then((C) => {
4793
- C && this.onUxtCb.forEach((F) => F(C));
4794
- })), Co(V);
4792
+ return j && (this.uxtManager.isActive ? this.onUxtCb.forEach((C) => C(j)) : this.uxtManager.getTest(j, d, !!$).then((C) => {
4793
+ C && this.onUxtCb.forEach((M) => M(C));
4794
+ })), Co(G);
4795
4795
  } catch (a) {
4796
4796
  if (this.stop(), this.session.reset(), a === Ze)
4797
4797
  return this.signalError(Ze, []), _e(Ze);
@@ -4853,7 +4853,7 @@ let No = class {
4853
4853
  trackWs(e) {
4854
4854
  const n = e;
4855
4855
  return (i, s, r = "down") => {
4856
- typeof i != "string" || typeof s != "string" || s.length > 5 * 1024 * 1024 || i.length > 255 || this.send(Fr("websocket", n, s, this.timestamp(), r, i));
4856
+ typeof i != "string" || typeof s != "string" || s.length > 5 * 1024 * 1024 || i.length > 255 || this.send(Mr("websocket", n, s, this.timestamp(), r, i));
4857
4857
  };
4858
4858
  }
4859
4859
  stop(e = !0) {
@@ -4873,10 +4873,10 @@ function Oo(t) {
4873
4873
  const n = () => t.send(_r(Math.round(e.downlink * 1e3), e.type || "unknown"));
4874
4874
  n(), e.addEventListener("change", n);
4875
4875
  }
4876
- const bs = xe && "InstallTrigger" in window ? (t) => t.message + `
4876
+ const ms = xe && "InstallTrigger" in window ? (t) => t.message + `
4877
4877
  ` + t.stack : (t) => t.stack || t.message;
4878
4878
  function Nn(t) {
4879
- return t === void 0 ? "undefined" : t === null ? "null" : t instanceof Error ? bs(t) : Array.isArray(t) ? `Array(${t.length})` : String(t);
4879
+ return t === void 0 ? "undefined" : t === null ? "null" : t instanceof Error ? ms(t) : Array.isArray(t) ? `Array(${t.length})` : String(t);
4880
4880
  }
4881
4881
  function Ro(t) {
4882
4882
  return typeof t != "number" ? "NaN" : t.toString();
@@ -4884,13 +4884,13 @@ function Ro(t) {
4884
4884
  function Ao(t) {
4885
4885
  return typeof t != "number" ? "NaN" : Math.floor(t).toString();
4886
4886
  }
4887
- function Ti(t) {
4887
+ function ki(t) {
4888
4888
  if (t === void 0)
4889
4889
  return "undefined";
4890
4890
  if (t === null)
4891
4891
  return "null";
4892
4892
  if (t instanceof Error)
4893
- return bs(t);
4893
+ return ms(t);
4894
4894
  if (Array.isArray(t)) {
4895
4895
  const e = t.length, n = t.slice(0, 10).map(Nn).join(", ");
4896
4896
  return `Array(${e})[${n}]`;
@@ -4915,7 +4915,7 @@ function Do(t) {
4915
4915
  return e;
4916
4916
  switch (n) {
4917
4917
  case "o":
4918
- return Ti(i);
4918
+ return ki(i);
4919
4919
  case "s":
4920
4920
  return Nn(i);
4921
4921
  case "f":
@@ -4926,12 +4926,12 @@ function Do(t) {
4926
4926
  default:
4927
4927
  return e;
4928
4928
  }
4929
- })), t.map(Ti).join(" ");
4929
+ })), t.map(ki).join(" ");
4930
4930
  }
4931
- const Ei = ["log", "info", "warn", "error", "debug", "assert"];
4931
+ const Ti = ["log", "info", "warn", "error", "debug", "assert"];
4932
4932
  function Lo(t, e) {
4933
4933
  const n = Object.assign({
4934
- consoleMethods: Ei,
4934
+ consoleMethods: Ti,
4935
4935
  consoleThrottling: 30
4936
4936
  }, e);
4937
4937
  if (!Array.isArray(n.consoleMethods) || n.consoleMethods.length === 0)
@@ -4949,7 +4949,7 @@ function Lo(t, e) {
4949
4949
  }
4950
4950
  };
4951
4951
  n.consoleMethods.forEach((u) => {
4952
- if (Ei.indexOf(u) === -1) {
4952
+ if (Ti.indexOf(u) === -1) {
4953
4953
  t.debug.error(`OpenReplay: unsupported console method "${u}"`);
4954
4954
  return;
4955
4955
  }
@@ -4959,9 +4959,9 @@ function Lo(t, e) {
4959
4959
  }, l = t.safe((a) => o(a.console, a));
4960
4960
  l(window), t.observer.attachContextCallback(l);
4961
4961
  }
4962
- var ys = { exports: {} }, ln = { exports: {} }, Ii;
4963
- function Fo() {
4964
- return Ii || (Ii = 1, function(t, e) {
4962
+ var bs = { exports: {} }, ln = { exports: {} }, Ei;
4963
+ function Mo() {
4964
+ return Ei || (Ei = 1, function(t, e) {
4965
4965
  (function(n, i) {
4966
4966
  t.exports = i();
4967
4967
  })(qe, function() {
@@ -5044,7 +5044,7 @@ function Fo() {
5044
5044
  }
5045
5045
  (function(t, e) {
5046
5046
  (function(n, i) {
5047
- t.exports = i(Fo());
5047
+ t.exports = i(Mo());
5048
5048
  })(qe, function(i) {
5049
5049
  var s = /(^|@)\S+:\d+/, r = /^\s*at .*(\S+:\d+|\(native\))/m, o = /^(eval@)?(\[native code])?$/;
5050
5050
  return {
@@ -5164,10 +5164,10 @@ function Fo() {
5164
5164
  }
5165
5165
  };
5166
5166
  });
5167
- })(ys);
5168
- var Mo = ys.exports;
5169
- const Po = /* @__PURE__ */ Gi(Mo);
5170
- function Ci(t) {
5167
+ })(bs);
5168
+ var Fo = bs.exports;
5169
+ const Po = /* @__PURE__ */ Wi(Fo);
5170
+ function Ii(t) {
5171
5171
  return [
5172
5172
  {
5173
5173
  columnNumber: t.colno,
@@ -5186,13 +5186,13 @@ function Et(t, e, n = {}) {
5186
5186
  }
5187
5187
  return xn(t.name, t.message, JSON.stringify(i), JSON.stringify(n));
5188
5188
  }
5189
- function vs(t, e = window, n = {}) {
5189
+ function ys(t, e = window, n = {}) {
5190
5190
  if (t instanceof ErrorEvent) {
5191
5191
  if (t.error instanceof Error)
5192
- return Et(t.error, Ci(t), n);
5192
+ return Et(t.error, Ii(t), n);
5193
5193
  {
5194
5194
  let [i, s] = t.message.split(":");
5195
- return s || (i = "Error", s = t.message), xn(i, s, JSON.stringify(Ci(t)), JSON.stringify(n));
5195
+ return s || (i = "Error", s = t.message), xn(i, s, JSON.stringify(Ii(t)), JSON.stringify(n));
5196
5196
  }
5197
5197
  } else if ("PromiseRejectionEvent" in e && t instanceof e.PromiseRejectionEvent) {
5198
5198
  if (t.reason instanceof Error)
@@ -5215,14 +5215,14 @@ function Bo(t, e) {
5215
5215
  }, e);
5216
5216
  function i(s) {
5217
5217
  function r(o) {
5218
- const l = vs(o, s);
5218
+ const l = ys(o, s);
5219
5219
  l != null && t.send(l);
5220
5220
  }
5221
5221
  t.attachEventListener(s, "unhandledrejection", r), t.attachEventListener(s, "error", r);
5222
5222
  }
5223
5223
  n.captureExceptions && (t.observer.attachContextCallback(i), i(window));
5224
5224
  }
5225
- function _i(t, e = document.location) {
5225
+ function Ci(t, e = document.location) {
5226
5226
  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;
5227
5227
  }
5228
5228
  function jo(t) {
@@ -5239,17 +5239,17 @@ function Uo(t) {
5239
5239
  const { srcset: d } = a;
5240
5240
  if (!d)
5241
5241
  return;
5242
- const c = d.split(d.match(/,\s+/) ? /,\s+/ : ",").map((u) => _i(u)).join(", ");
5242
+ const c = d.split(d.match(/,\s+/) ? /,\s+/ : ",").map((u) => Ci(u)).join(", ");
5243
5243
  t.attributeSender.sendSetAttribute(l, "srcset", c);
5244
5244
  }, i = function(l, a) {
5245
5245
  a.src.length > nr && e(l, a), t.send(vn(l, "src", a.src, t.getBaseHref()));
5246
5246
  }, s = t.safe(function(l) {
5247
- const a = _i(l.src || "");
5248
- as(a) && t.send(fs(t.timestamp(), 0, 0, 0, 0, 0, a, "img", 0, !1));
5247
+ const a = Ci(l.src || "");
5248
+ os(a) && t.send(us(t.timestamp(), 0, 0, 0, 0, 0, a, "img", 0, !1));
5249
5249
  }), r = t.safe(function(l) {
5250
5250
  const a = t.nodes.getID(l);
5251
5251
  a !== void 0 && l.complete && (l.naturalHeight === 0 && l.naturalWidth === 0 && !jo(l.src) ? s(l) : t.sanitizer.isHidden(a) || t.sanitizer.isObscured(a) ? e(a, l) : (i(a, l), n(a, l)));
5252
- }), o = cs(t.safe((l) => {
5252
+ }), o = as(t.safe((l) => {
5253
5253
  for (const a of l)
5254
5254
  if (a.type === "attributes") {
5255
5255
  const d = a.target, c = t.nodes.getID(d);
@@ -5304,13 +5304,13 @@ const Wo = xe && "labels" in HTMLInputElement.prototype ? (t) => {
5304
5304
  return i[0];
5305
5305
  }
5306
5306
  };
5307
- function ws(t) {
5307
+ function vs(t) {
5308
5308
  let e = Pn(t);
5309
5309
  if (e === null) {
5310
5310
  const n = Wo(t);
5311
5311
  e = n && n.innerText || t.placeholder || t.name || t.id || t.className || t.type;
5312
5312
  }
5313
- return os(e).slice(0, 100);
5313
+ return rs(e).slice(0, 100);
5314
5314
  }
5315
5315
  const ze = {
5316
5316
  Plain: 0,
@@ -5366,8 +5366,8 @@ function Go(t, e) {
5366
5366
  });
5367
5367
  }, 3);
5368
5368
  function d(c, u, p, y) {
5369
- const { value: S, mask: v } = i(c, u), T = ws(u);
5370
- t.send(Mr(c, S, v !== 0, T, p, y));
5369
+ const { value: S, mask: v } = i(c, u), T = vs(u);
5370
+ t.send(Fr(c, S, v !== 0, T, p, y));
5371
5371
  }
5372
5372
  t.nodes.attachNodeCallback(t.safe((c) => {
5373
5373
  const u = t.nodes.getID(c);
@@ -5392,9 +5392,9 @@ function Go(t, e) {
5392
5392
  }
5393
5393
  }));
5394
5394
  }
5395
- let ue, zn, Ss;
5395
+ let ue, zn, ws;
5396
5396
  function Vo(t, e) {
5397
- if (Ss = /* @__PURE__ */ new Date(), t.nodeType !== Node.ELEMENT_NODE)
5397
+ if (ws = /* @__PURE__ */ new Date(), t.nodeType !== Node.ELEMENT_NODE)
5398
5398
  throw new Error("Can't generate CSS selector for non-element node type.");
5399
5399
  if (t.tagName.toLowerCase() === "html")
5400
5400
  return "html";
@@ -5413,7 +5413,7 @@ function Vo(t, e) {
5413
5413
  ue = { ...n, ...e }, zn = Ko(ue.root, n);
5414
5414
  let i = ot(t, "all", () => ot(t, "two", () => ot(t, "one", () => ot(t, "none"))));
5415
5415
  if (i) {
5416
- const s = Ts(Es(i, t));
5416
+ const s = ks(Ts(i, t));
5417
5417
  return s.length > 0 && (i = s[0]), Rt(i);
5418
5418
  } else
5419
5419
  throw new Error("Selector was not found.");
@@ -5424,10 +5424,10 @@ function Ko(t, e) {
5424
5424
  function ot(t, e, n) {
5425
5425
  let i = null, s = [], r = t, o = 0;
5426
5426
  for (; r; ) {
5427
- const l = (/* @__PURE__ */ new Date()).getTime() - Ss.getTime();
5427
+ const l = (/* @__PURE__ */ new Date()).getTime() - ws.getTime();
5428
5428
  if (ue.timeoutMs !== void 0 && l > ue.timeoutMs)
5429
5429
  throw new Error(`Timeout: Can't find a unique selector after ${l}ms`);
5430
- let a = ct(Xo(r)) || ct(...Jo(r)) || ct(...Yo(r)) || ct(Qo(r)) || [Ri()];
5430
+ let a = ct(Jo(r)) || ct(...Xo(r)) || ct(...Yo(r)) || ct(Qo(r)) || [Oi()];
5431
5431
  const d = Zo(r);
5432
5432
  if (e == "all")
5433
5433
  d && (a = a.concat(a.filter(dn).map((c) => at(c, d))));
@@ -5437,21 +5437,21 @@ function ot(t, e, n) {
5437
5437
  const [c] = a = a.slice(0, 1);
5438
5438
  d && dn(c) && (a = [at(c, d)]);
5439
5439
  } else
5440
- e == "none" && (a = [Ri()], d && (a = [at(a[0], d)]));
5440
+ e == "none" && (a = [Oi()], d && (a = [at(a[0], d)]));
5441
5441
  for (let c of a)
5442
5442
  c.level = o;
5443
- if (s.push(a), s.length >= ue.seedMinLength && (i = Ni(s, n), i))
5443
+ if (s.push(a), s.length >= ue.seedMinLength && (i = _i(s, n), i))
5444
5444
  break;
5445
5445
  r = r.parentElement, o++;
5446
5446
  }
5447
- return i || (i = Ni(s, n)), !i && n ? n() : i;
5447
+ return i || (i = _i(s, n)), !i && n ? n() : i;
5448
5448
  }
5449
- function Ni(t, e) {
5450
- const n = Ts(ks(t));
5449
+ function _i(t, e) {
5450
+ const n = ks(xs(t));
5451
5451
  if (n.length > ue.threshold)
5452
5452
  return e ? e() : null;
5453
5453
  for (let i of n)
5454
- if (xs(i))
5454
+ if (Ss(i))
5455
5455
  return i;
5456
5456
  return null;
5457
5457
  }
@@ -5463,10 +5463,10 @@ function Rt(t) {
5463
5463
  }
5464
5464
  return n;
5465
5465
  }
5466
- function Oi(t) {
5466
+ function Ni(t) {
5467
5467
  return t.map((e) => e.penalty).reduce((e, n) => e + n, 0);
5468
5468
  }
5469
- function xs(t) {
5469
+ function Ss(t) {
5470
5470
  const e = Rt(t);
5471
5471
  switch (zn.querySelectorAll(e).length) {
5472
5472
  case 0:
@@ -5477,14 +5477,14 @@ function xs(t) {
5477
5477
  return !1;
5478
5478
  }
5479
5479
  }
5480
- function Xo(t) {
5480
+ function Jo(t) {
5481
5481
  const e = t.getAttribute("id");
5482
5482
  return e && ue.idName(e) ? {
5483
5483
  name: "#" + CSS.escape(e),
5484
5484
  penalty: 0
5485
5485
  } : null;
5486
5486
  }
5487
- function Jo(t) {
5487
+ function Xo(t) {
5488
5488
  return Array.from(t.attributes).filter((n) => ue.attr(n.name, n.value)).map((n) => ({
5489
5489
  name: `[${CSS.escape(n.name)}="${CSS.escape(n.value)}"]`,
5490
5490
  penalty: 0.5
@@ -5503,7 +5503,7 @@ function Qo(t) {
5503
5503
  penalty: 2
5504
5504
  } : null;
5505
5505
  }
5506
- function Ri() {
5506
+ function Oi() {
5507
5507
  return {
5508
5508
  name: "*",
5509
5509
  penalty: 3
@@ -5537,17 +5537,17 @@ function ct(...t) {
5537
5537
  function ea(t) {
5538
5538
  return t != null;
5539
5539
  }
5540
- function* ks(t, e = []) {
5540
+ function* xs(t, e = []) {
5541
5541
  if (t.length > 0)
5542
5542
  for (let n of t[0])
5543
- yield* ks(t.slice(1, t.length), e.concat(n));
5543
+ yield* xs(t.slice(1, t.length), e.concat(n));
5544
5544
  else
5545
5545
  yield e;
5546
5546
  }
5547
- function Ts(t) {
5548
- return [...t].sort((e, n) => Oi(e) - Oi(n));
5547
+ function ks(t) {
5548
+ return [...t].sort((e, n) => Ni(e) - Ni(n));
5549
5549
  }
5550
- function* Es(t, e, n = {
5550
+ function* Ts(t, e, n = {
5551
5551
  counter: 0,
5552
5552
  visited: /* @__PURE__ */ new Map()
5553
5553
  }) {
@@ -5561,7 +5561,7 @@ function* Es(t, e, n = {
5561
5561
  const r = Rt(s);
5562
5562
  if (n.visited.has(r))
5563
5563
  return;
5564
- xs(s) && ta(s, e) && (yield s, n.visited.set(r, !0), yield* Es(s, e, n));
5564
+ Ss(s) && ta(s, e) && (yield s, n.visited.set(r, !0), yield* Ts(s, e, n));
5565
5565
  }
5566
5566
  }
5567
5567
  function ta(t, e) {
@@ -5580,7 +5580,7 @@ function On(t) {
5580
5580
  const e = t.tagName.toUpperCase();
5581
5581
  return e === "BUTTON" || e === "A" || e === "LI" || e === "SELECT" || e === "TR" || e === "TH" || t.onclick != null || t.getAttribute("role") === "button";
5582
5582
  }
5583
- function Ai(t, e) {
5583
+ function Ri(t, e) {
5584
5584
  return t instanceof Element ? ia(t, e) : null;
5585
5585
  }
5586
5586
  function ia(t, e) {
@@ -5612,10 +5612,10 @@ function sa(t, e) {
5612
5612
  if (N !== null)
5613
5613
  return N;
5614
5614
  if (Z(k, "input"))
5615
- return ws(k);
5615
+ return vs(k);
5616
5616
  if (On(k)) {
5617
5617
  let O = "";
5618
- return k instanceof HTMLElement && (O = t.sanitizer.getInnerTextSecure(k)), O = O || k.id || k.className, os(O).slice(0, 100);
5618
+ return k instanceof HTMLElement && (O = t.sanitizer.getInnerTextSecure(k)), O = O || k.id || k.className, rs(O).slice(0, 100);
5619
5619
  }
5620
5620
  return "";
5621
5621
  }
@@ -5643,21 +5643,21 @@ function sa(t, e) {
5643
5643
  }
5644
5644
  const L = N ? t.attachEventListener.bind(t) : t.nodes.attachNodeListener.bind(t.nodes);
5645
5645
  L(k.documentElement, "mouseover", (I) => {
5646
- const E = Ai(I.target, k);
5646
+ const E = Ri(I.target, k);
5647
5647
  E !== l && (l = E, a = performance.now());
5648
5648
  }), L(k, "mousemove", (I) => {
5649
5649
  const [E, P] = t.observer.getDocumentOffset(k);
5650
5650
  s = I.clientX + E, r = I.clientY + P, o = !0;
5651
- const V = Math.sign(I.movementX);
5652
- y += Math.abs(I.movementX) + Math.abs(I.movementY), V !== u && (u = V, p++);
5651
+ const G = Math.sign(I.movementX);
5652
+ y += Math.abs(I.movementX) + Math.abs(I.movementY), G !== u && (u = G, p++);
5653
5653
  }, !1), L(k, "click", (I) => {
5654
- const E = Ai(I.target, k);
5654
+ const E = Ri(I.target, k);
5655
5655
  if (!I.clientX && !I.clientY || E === null)
5656
5656
  return;
5657
5657
  const P = t.nodes.getID(E);
5658
5658
  if (P !== void 0) {
5659
- const V = I.pageX, j = I.pageY, q = k.documentElement.scrollWidth, C = k.documentElement.scrollHeight, F = Di(V / q), G = Di(j / C);
5660
- B(), t.send(Dr(P, l === E ? Math.round(performance.now() - a) : 0, i(E), On(E) && !n ? O(P, E, e) : "", F, G), !0);
5659
+ const G = I.pageX, j = I.pageY, $ = k.documentElement.scrollWidth, C = k.documentElement.scrollHeight, M = Ai(G / $), W = Ai(j / C);
5660
+ B(), t.send(Dr(P, l === E ? Math.round(performance.now() - a) : 0, i(E), On(E) && !n ? O(P, E, e) : "", M, W), !0);
5661
5661
  }
5662
5662
  l = null;
5663
5663
  });
@@ -5666,7 +5666,7 @@ function sa(t, e) {
5666
5666
  kt(k) && D(k);
5667
5667
  }), D(document, !0), t.ticker.attach(B, (e == null ? void 0 : e.trackingOffset) || 7);
5668
5668
  }
5669
- function Di(t) {
5669
+ function Ai(t) {
5670
5670
  return Math.round(t * 1e4);
5671
5671
  }
5672
5672
  function ra(t) {
@@ -5714,7 +5714,7 @@ function aa(t, e) {
5714
5714
  let i = {};
5715
5715
  function s(d) {
5716
5716
  var u;
5717
- if (d.duration < 0 || !as(d.name) || t.isServiceURL(d.name))
5717
+ if (d.duration < 0 || !os(d.name) || t.isServiceURL(d.name))
5718
5718
  return;
5719
5719
  i !== null && (i[d.name] = d.startTime + d.duration);
5720
5720
  let c = !1;
@@ -5723,7 +5723,7 @@ function aa(t, e) {
5723
5723
  c = !0;
5724
5724
  return;
5725
5725
  }
5726
- }), !c && t.send(fs(
5726
+ }), !c && t.send(us(
5727
5727
  d.startTime + Ve(),
5728
5728
  d.duration,
5729
5729
  d.responseStart && d.startTime ? d.responseStart - d.startTime : 0,
@@ -5802,7 +5802,7 @@ function ca(t, e) {
5802
5802
  let n = !1;
5803
5803
  const i = /* @__PURE__ */ new Map();
5804
5804
  function s(l) {
5805
- gs(l) && (Te(l) && i.set(l, [l.scrollLeft, l.scrollTop]), kt(l) && i.set(l, hn(l)));
5805
+ ps(l) && (Te(l) && i.set(l, [l.scrollLeft, l.scrollTop]), kt(l) && i.set(l, hn(l)));
5806
5806
  }
5807
5807
  const r = t.safe(() => {
5808
5808
  e || t.send(dr(...hn(document)));
@@ -5840,17 +5840,17 @@ function la(t) {
5840
5840
  e = null, s = Ve(), n = i = -1, o(), l(), a();
5841
5841
  }), document.hidden !== void 0 && t.attachEventListener(document, "visibilitychange", a, !1, !1), t.ticker.attach(o, 1, !1), t.ticker.attach(l, 5, !1);
5842
5842
  }
5843
- function Li(t) {
5843
+ function Di(t) {
5844
5844
  return Ot(t) && // @ts-ignore
5845
5845
  !!t.adoptedStyleSheets;
5846
5846
  }
5847
5847
  let da = 15;
5848
- function Is() {
5848
+ function Es() {
5849
5849
  return da++;
5850
5850
  }
5851
5851
  const lt = /* @__PURE__ */ new Map();
5852
5852
  function ha(t) {
5853
- if (t === null || !Li(document))
5853
+ if (t === null || !Di(document))
5854
5854
  return;
5855
5855
  const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), i = (o) => setTimeout(() => {
5856
5856
  let l = t.nodes.getID(o);
@@ -5863,7 +5863,7 @@ function ha(t) {
5863
5863
  for (const u of c) {
5864
5864
  let p = e.get(u);
5865
5865
  const y = !p;
5866
- if (p || (p = Is(), e.set(u, p)), a.includes(p) || t.send(us(p, l)), y) {
5866
+ if (p || (p = Es(), e.set(u, p)), a.includes(p) || t.send(hs(p, l)), y) {
5867
5867
  const S = u.cssRules;
5868
5868
  for (let v = 0; v < S.length; v++)
5869
5869
  t.send(Sn(p, S[v].cssText, v, t.getBaseHref()));
@@ -5893,11 +5893,11 @@ function ha(t) {
5893
5893
  o.CSSStyleSheet.prototype.replace = function(d) {
5894
5894
  return l.call(this, d).then((c) => {
5895
5895
  const u = e.get(this);
5896
- return u && t.send(li(u, d, t.getBaseHref())), c;
5896
+ return u && t.send(ci(u, d, t.getBaseHref())), c;
5897
5897
  });
5898
5898
  }, o.CSSStyleSheet.prototype.replaceSync = function(d) {
5899
5899
  const c = e.get(this);
5900
- return c && t.send(li(c, d, t.getBaseHref())), a.call(this, d);
5900
+ return c && t.send(ci(c, d, t.getBaseHref())), a.call(this, d);
5901
5901
  };
5902
5902
  };
5903
5903
  r(window), t.observer.attachContextCallback(t.safe(r)), t.attachStopCallback(() => {
@@ -5905,7 +5905,7 @@ function ha(t) {
5905
5905
  }), t.attachStartCallback(() => {
5906
5906
  i(document);
5907
5907
  }), t.nodes.attachNodeCallback((o) => {
5908
- Li(o) && i(o);
5908
+ Di(o) && i(o);
5909
5909
  });
5910
5910
  }
5911
5911
  function ua(t) {
@@ -5917,7 +5917,7 @@ function ua(t) {
5917
5917
  }
5918
5918
  const e = t.safe((s, r, o) => {
5919
5919
  const l = lt.get(s);
5920
- l && (typeof o == "string" ? t.send(Sn(l, o, r, t.getBaseHref())) : t.send(di(l, r)));
5920
+ l && (typeof o == "string" ? t.send(Sn(l, o, r, t.getBaseHref())) : t.send(li(l, r)));
5921
5921
  }), n = t.safe((s) => {
5922
5922
  let r = s;
5923
5923
  for (; r.parentRule; )
@@ -5933,7 +5933,7 @@ function ua(t) {
5933
5933
  return;
5934
5934
  }
5935
5935
  const a = r.cssText, d = o.cssRules, c = Array.from(d).indexOf(r);
5936
- c >= 0 ? (t.send(Sn(l, a, c, t.getBaseHref())), t.send(di(l, c + 1))) : t.debug.warn("Rule index not found in", o, r);
5936
+ c >= 0 ? (t.send(Sn(l, a, c, t.getBaseHref())), t.send(li(l, c + 1))) : t.debug.warn("Rule index not found in", o, r);
5937
5937
  }), i = t.safe((s) => {
5938
5938
  const { insertRule: r, deleteRule: o } = s.CSSStyleSheet.prototype, { insertRule: l, deleteRule: a } = s.CSSGroupingRule.prototype;
5939
5939
  s.CSSStyleSheet.prototype.insertRule = function(d, c = 0) {
@@ -5954,8 +5954,8 @@ function ua(t) {
5954
5954
  const r = t.nodes.getID(s);
5955
5955
  if (!r)
5956
5956
  return;
5957
- const o = s.sheet, l = Is();
5958
- lt.set(o, l), t.send(us(l, r));
5957
+ const o = s.sheet, l = Es();
5958
+ lt.set(o, l), t.send(hs(l, r));
5959
5959
  const a = o.cssRules;
5960
5960
  for (let d = 0; d < a.length; d++)
5961
5961
  e(o, d, a[d].cssText);
@@ -5964,15 +5964,15 @@ function ua(t) {
5964
5964
  function fa(t) {
5965
5965
  function e(i) {
5966
5966
  const s = t.nodes.getID(i);
5967
- s !== void 0 && t.send(ci(s));
5967
+ s !== void 0 && t.send(ai(s));
5968
5968
  }
5969
5969
  let n = !1;
5970
5970
  t.nodes.attachNodeCallback((i) => {
5971
5971
  Z(i, "body") && (t.nodes.attachNodeListener(i, "focus", (s) => {
5972
- gs(s.target) && (e(s.target), n = !1);
5972
+ ps(s.target) && (e(s.target), n = !1);
5973
5973
  }), t.nodes.attachNodeListener(i, "blur", (s) => {
5974
5974
  s.relatedTarget === null && (n = !0, setTimeout(() => {
5975
- n && t.send(ci(-1));
5975
+ n && t.send(ai(-1));
5976
5976
  }, 0));
5977
5977
  }));
5978
5978
  }), t.attachStartCallback(() => {
@@ -5998,7 +5998,7 @@ function pa(t) {
5998
5998
  const c = i === window ? 0 : t.nodes.getID(i.document);
5999
5999
  if (c === void 0)
6000
6000
  return;
6001
- t.active() && t.send(ai(c, ...a));
6001
+ t.active() && t.send(oi(c, ...a));
6002
6002
  }
6003
6003
  super(...o);
6004
6004
  }
@@ -6013,7 +6013,7 @@ function pa(t) {
6013
6013
  return;
6014
6014
  const r = i.defaultView === window ? 0 : t.nodes.getID(i);
6015
6015
  r !== void 0 && s.forEach((o) => {
6016
- t.send(ai(r, ...o));
6016
+ t.send(oi(r, ...o));
6017
6017
  });
6018
6018
  }));
6019
6019
  }
@@ -6022,16 +6022,16 @@ function ga(t, e, n, i, s) {
6022
6022
  function r(p) {
6023
6023
  t.debug.log("Openreplay: capturing axios response data", p);
6024
6024
  const { headers: y, data: S, method: v, url: T, baseURL: A } = p.config, { data: B, headers: D, status: k, response: N } = p, { data: O, headers: L, status: I } = N || {}, E = n.ignoreHeaders, P = Array.isArray(E) ? (U) => E.includes(U) : () => E;
6025
- function V(U, b) {
6025
+ function G(U, b) {
6026
6026
  P(b[0]) || (U[b[0]] = b[1]);
6027
6027
  }
6028
- let j = {}, q = {};
6029
- y.toJSON ? j = y.toJSON() : y instanceof Headers ? y.forEach((U, b) => V(j, [b, U])) : Array.isArray(y) ? y.forEach((U) => V(j, U)) : typeof y == "object" && Object.entries(y).forEach((U) => V(j, U));
6028
+ let j = {}, $ = {};
6029
+ y.toJSON ? j = y.toJSON() : y instanceof Headers ? y.forEach((U, b) => G(j, [b, U])) : Array.isArray(y) ? y.forEach((U) => G(j, U)) : typeof y == "object" && Object.entries(y).forEach((U) => G(j, U));
6030
6030
  const C = L || D;
6031
- C.toJSON ? q = C.toJSON() : C instanceof Headers ? C.forEach((U, b) => V(q, [b, U])) : Array.isArray(C) ? C.forEach((U) => V(q, U)) : typeof C == "object" && Object.entries(C).forEach(([U, b]) => {
6032
- P(U) || (q[U] = b);
6031
+ C.toJSON ? $ = C.toJSON() : C instanceof Headers ? C.forEach((U, b) => G($, [b, U])) : Array.isArray(C) ? C.forEach((U) => G($, U)) : typeof C == "object" && Object.entries(C).forEach(([U, b]) => {
6032
+ P(U) || ($[U] = b);
6033
6033
  });
6034
- const F = i({
6034
+ const M = i({
6035
6035
  url: T,
6036
6036
  method: v || "",
6037
6037
  status: k || I || 0,
@@ -6040,16 +6040,16 @@ function ga(t, e, n, i, s) {
6040
6040
  body: S
6041
6041
  },
6042
6042
  response: {
6043
- headers: q,
6043
+ headers: $,
6044
6044
  body: O || B
6045
6045
  }
6046
6046
  });
6047
- if (!F) {
6047
+ if (!M) {
6048
6048
  t.debug.log("Openreplay: empty request/response info, skipping");
6049
6049
  return;
6050
6050
  }
6051
- const G = p.config.__openreplay_timing, K = performance.now() - G;
6052
- t.debug.log("Openreplay: final req object", F), t.send(xt("xhr", String(v), String(F.url), s(F.request), s(F.response), F.status, G + Ve(), K, 0));
6051
+ const W = p.config.__openreplay_timing, V = performance.now() - W;
6052
+ t.debug.log("Openreplay: final req object", M), t.send(xt("xhr", String(v), String(M.url), s(M.request), s(M.response), M.status, W + Ve(), V, 0));
6053
6053
  }
6054
6054
  function o(p) {
6055
6055
  if (t.debug.log("Openreplay: capturing API request", p), p.__openreplay_timing = performance.now(), n.sessionTokenHeader) {
@@ -6444,13 +6444,13 @@ class Ge {
6444
6444
  return new Proxy(Ge.origSendBeacon, new Ia(e, n, i, s, r));
6445
6445
  }
6446
6446
  }
6447
- var Bi;
6448
- Ge.origSendBeacon = (Bi = window == null ? void 0 : window.navigator) == null ? void 0 : Bi.sendBeacon;
6449
- const Fi = (t) => console.warn(`Openreplay: Can't find ${t} in global context.
6447
+ var Pi;
6448
+ Ge.origSendBeacon = (Pi = window == null ? void 0 : window.navigator) == null ? void 0 : Pi.sendBeacon;
6449
+ const Li = (t) => console.warn(`Openreplay: Can't find ${t} in global context.
6450
6450
  If you're using serverside rendering in your app, make sure that tracker is loaded dynamically, otherwise ${t} won't be tracked.`);
6451
6451
  function Ca(t, e, n, i, s, r, o) {
6452
6452
  var l;
6453
- t.XMLHttpRequest ? t.XMLHttpRequest = Ta.create(e, n, i, s, r, o) : Fi("XMLHttpRequest"), t.fetch ? t.fetch = xa.create(e, n, i, s, r, o) : Fi("fetch"), (l = t == null ? void 0 : t.navigator) != null && l.sendBeacon && (t.navigator.sendBeacon = Ge.create(e, n, i, s, r));
6453
+ t.XMLHttpRequest ? t.XMLHttpRequest = Ta.create(e, n, i, s, r, o) : Li("XMLHttpRequest"), t.fetch ? t.fetch = xa.create(e, n, i, s, r, o) : Li("fetch"), (l = t == null ? void 0 : t.navigator) != null && l.sendBeacon && (t.navigator.sendBeacon = Ge.create(e, n, i, s, r));
6454
6454
  }
6455
6455
  function un(t) {
6456
6456
  return t.__or_req_data__ || (t.__or_req_data__ = { body: void 0, headers: {} }), t.__or_req_data__;
@@ -6513,16 +6513,16 @@ function _a(t, e = {}) {
6513
6513
  return O;
6514
6514
  const I = O.clone();
6515
6515
  return I.text().then((E) => {
6516
- const P = {}, V = {};
6516
+ const P = {}, G = {};
6517
6517
  if (i !== !0) {
6518
- const C = ([F, G]) => {
6519
- s(F) || (P[F] = G);
6518
+ const C = ([M, W]) => {
6519
+ s(M) || (P[M] = W);
6520
6520
  };
6521
- k.headers instanceof Headers ? k.headers.forEach((F, G) => C([G, F])) : Array.isArray(k.headers) ? k.headers.forEach(C) : typeof k.headers == "object" && Object.entries(k.headers).forEach(C), I.headers.forEach((F, G) => {
6522
- s(G) || (V[G] = F);
6521
+ k.headers instanceof Headers ? k.headers.forEach((M, W) => C([W, M])) : Array.isArray(k.headers) ? k.headers.forEach(C) : typeof k.headers == "object" && Object.entries(k.headers).forEach(C), I.headers.forEach((M, W) => {
6522
+ s(W) || (G[W] = M);
6523
6523
  });
6524
6524
  }
6525
- const j = Mi(k.method), q = l({
6525
+ const j = Mi(k.method), $ = l({
6526
6526
  url: String(D),
6527
6527
  method: j,
6528
6528
  status: I.status,
@@ -6532,11 +6532,11 @@ function _a(t, e = {}) {
6532
6532
  body: k.body || null
6533
6533
  },
6534
6534
  response: {
6535
- headers: V,
6535
+ headers: G,
6536
6536
  body: E
6537
6537
  }
6538
6538
  });
6539
- q && t.send(xt("fetch", j, String(q.url), a(q.request), a(q.response), I.status, N + Ve(), L, 0));
6539
+ $ && t.send(xt("fetch", j, String($.url), a($.request), a($.response), I.status, N + Ve(), L, 0));
6540
6540
  }).catch((E) => t.debug.error("Could not process Fetch response:", E)), O;
6541
6541
  });
6542
6542
  };
@@ -6549,12 +6549,12 @@ function _a(t, e = {}) {
6549
6549
  return N.addEventListener("loadstart", (L) => {
6550
6550
  O = L.timeStamp;
6551
6551
  }), N.addEventListener("load", t.safe((L) => {
6552
- const { headers: I, body: E } = un(N), P = O > 0 ? L.timeStamp - O : 0, j = (N.getAllResponseHeaders() || "").trim().split(/[\r\n]+/), q = {};
6553
- j.forEach(function(G) {
6554
- const K = G.split(": "), U = K.shift();
6555
- s(U) || (q[U] = K.join(": "));
6552
+ const { headers: I, body: E } = un(N), P = O > 0 ? L.timeStamp - O : 0, j = (N.getAllResponseHeaders() || "").trim().split(/[\r\n]+/), $ = {};
6553
+ j.forEach(function(W) {
6554
+ const V = W.split(": "), U = V.shift();
6555
+ s(U) || ($[U] = V.join(": "));
6556
6556
  });
6557
- const C = Mi(D), F = l({
6557
+ const C = Mi(D), M = l({
6558
6558
  url: String(k),
6559
6559
  method: C,
6560
6560
  status: N.status,
@@ -6564,11 +6564,11 @@ function _a(t, e = {}) {
6564
6564
  body: E || null
6565
6565
  },
6566
6566
  response: {
6567
- headers: q,
6567
+ headers: $,
6568
6568
  body: N.response
6569
6569
  }
6570
6570
  });
6571
- F && t.send(xt("xhr", C, String(F.url), a(F.request), a(F.response), N.status, O + Ve(), P, 0));
6571
+ M && t.send(xt("xhr", C, String(M.url), a(M.request), a(M.response), N.status, O + Ve(), P, 0));
6572
6572
  })), y.apply(this, arguments);
6573
6573
  }
6574
6574
  function A(D) {
@@ -6593,9 +6593,9 @@ function Na(t) {
6593
6593
  const e = document.getSelection();
6594
6594
  if (e !== null && !e.isCollapsed) {
6595
6595
  const n = t.nodes.getID(e.anchorNode), i = t.nodes.getID(e.focusNode), s = e.toString().replace(/\s+/g, " ");
6596
- n && i && t.send(hi(n, i, s));
6596
+ n && i && t.send(di(n, i, s));
6597
6597
  } else
6598
- t.send(hi(-1, -1, ""));
6598
+ t.send(di(-1, -1, ""));
6599
6599
  });
6600
6600
  }
6601
6601
  function Oa(t) {
@@ -6622,7 +6622,7 @@ class Aa {
6622
6622
  var l;
6623
6623
  if (this.options = e, this.app = null, this.crossdomainMode = !1, this.checkDoNotTrack = () => this.options.respectDoNotTrack && (navigator.doNotTrack == "1" || // @ts-ignore
6624
6624
  window.doNotTrack == "1"), this.signalStartIssue = (a, d) => {
6625
- const c = this.checkDoNotTrack(), u = new XMLHttpRequest(), p = this.options.ingestPoint || ms;
6625
+ const c = this.checkDoNotTrack(), u = new XMLHttpRequest(), p = this.options.ingestPoint || gs;
6626
6626
  u.open("POST", p + "/v1/web/not-started"), u.send(JSON.stringify({
6627
6627
  trackerVersion: "14.0.4",
6628
6628
  projectKey: this.options.projectKey,
@@ -6637,7 +6637,7 @@ class Aa {
6637
6637
  const c = Et(a, [], d);
6638
6638
  this.app.send(c);
6639
6639
  } else if (a instanceof ErrorEvent || "PromiseRejectionEvent" in window && a instanceof PromiseRejectionEvent) {
6640
- const c = vs(a, void 0, d);
6640
+ const c = ys(a, void 0, d);
6641
6641
  c != null && this.app.send(c);
6642
6642
  }
6643
6643
  }
@@ -7443,16 +7443,16 @@ margin-top: auto; /* прижимает .bottom-row к низу
7443
7443
  qn.rel = "stylesheet";
7444
7444
  qn.href = "https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap";
7445
7445
  document.head.appendChild(qn);
7446
- const Cs = document.createElement("style");
7447
- var ji;
7448
- document.documentElement.style.setProperty("--wineater-color", ((ji = window == null ? void 0 : window.wineaterData) == null ? void 0 : ji.COLOR) || "#7B2BEB");
7449
- Cs.textContent = Da;
7450
- document.head.appendChild(Cs);
7451
- const La = ["climats", "telckel", "biobio", "weinpoint", "vinigrandi", "ampely", "test"], Fa = "HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG";
7446
+ const Is = document.createElement("style");
7447
+ var Bi;
7448
+ document.documentElement.style.setProperty("--wineater-color", ((Bi = window == null ? void 0 : window.wineaterData) == null ? void 0 : Bi.COLOR) || "#7B2BEB");
7449
+ Is.textContent = Da;
7450
+ document.head.appendChild(Is);
7451
+ const La = ["climats", "telckel", "biobio", "weinpoint", "vinigrandi", "ampely", "test"], Ma = "HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG";
7452
7452
  class At {
7453
7453
  constructor(e) {
7454
7454
  var n;
7455
- this.baseURL = "https://wineater-backend.vercel.app/", this.store = La.find((i) => window.location.href.includes(i)), this.token = ((n = window == null ? void 0 : window.wineaterData) == null ? void 0 : n.CLIENT_TOKEN) || Fa;
7455
+ this.baseURL = "https://wineater-backend.vercel.app/", this.store = La.find((i) => window.location.href.includes(i)), this.token = ((n = window == null ? void 0 : window.wineaterData) == null ? void 0 : n.CLIENT_TOKEN) || Ma;
7456
7456
  }
7457
7457
  async getStoreConfig(e) {
7458
7458
  console.log(e);
@@ -7547,7 +7547,7 @@ class At {
7547
7547
  }
7548
7548
  }
7549
7549
  }
7550
- class Ma {
7550
+ class Fa {
7551
7551
  constructor() {
7552
7552
  this.api = new At(), this.language = "en", this.translations = {
7553
7553
  fr: {
@@ -7953,7 +7953,7 @@ class Ma {
7953
7953
  return i;
7954
7954
  }
7955
7955
  }
7956
- const $ = new Ma(), fn = {
7956
+ const J = new Fa(), fn = {
7957
7957
  barName: "LENEZ",
7958
7958
  dishGroups: [
7959
7959
  {
@@ -8016,18 +8016,18 @@ class Pa {
8016
8016
  }
8017
8017
  getTitle(e) {
8018
8018
  return e ? `<h1 class="wine-widget-big-title">${e}</h1>` : `<h1 class="wine-widget-big-title">
8019
- ${$.translate("headerLine1")}
8019
+ ${J.translate("headerLine1")}
8020
8020
  <span class="icon icon-meal"></span>
8021
- <span class="icon-label">${$.translate("headerMeal")}</span>,
8021
+ <span class="icon-label">${J.translate("headerMeal")}</span>,
8022
8022
  <span class="icon icon-mood"></span>
8023
- <span class="icon-label">${$.translate("headerMood")}</span>
8023
+ <span class="icon-label">${J.translate("headerMood")}</span>
8024
8024
  </br>
8025
8025
  <!-- <span class="icon icon-budget"></span> -->
8026
- <!-- <span class="icon-label">${$.translate("headerBudget")}</span>, -->
8027
- ${$.translate("headerOr")}
8026
+ <!-- <span class="icon-label">${J.translate("headerBudget")}</span>, -->
8027
+ ${J.translate("headerOr")}
8028
8028
  <span class="icon icon-occasion"></span>
8029
- <span class="icon-label">${$.translate("headerOccasion")}</span>
8030
- ${$.translate("headerLine2")}
8029
+ <span class="icon-label">${J.translate("headerOccasion")}</span>
8030
+ ${J.translate("headerLine2")}
8031
8031
  </h1>`;
8032
8032
  }
8033
8033
  initializeWidget() {
@@ -8048,11 +8048,11 @@ class Pa {
8048
8048
  <input
8049
8049
  type="text"
8050
8050
  id="wine-search-input"
8051
- placeholder="${$.translate("searchPlaceholder")}">
8051
+ placeholder="${J.translate("searchPlaceholder")}">
8052
8052
 
8053
8053
  <!-- Кнопка -->
8054
8054
  <button id="wine-search-button">
8055
- ${$.translate("searchButton")}
8055
+ ${J.translate("searchButton")}
8056
8056
  </button>
8057
8057
  </div>
8058
8058
  <div id="wine-widget-right">
@@ -8065,9 +8065,9 @@ class Pa {
8065
8065
  </div>
8066
8066
  <div id="powered-by-widget">
8067
8067
  <a href="https://wineater.com" target="_blank">
8068
- <span>${$.translate("poweredBy")}</span>
8069
- <img src="${$.translate("lang") === "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">
8070
- <span>${$.translate("AI sommelier")}</span>
8068
+ <span>${J.translate("poweredBy")}</span>
8069
+ <img src="${J.translate("lang") === "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">
8070
+ <span>${J.translate("AI sommelier")}</span>
8071
8071
  </a>
8072
8072
  </div>
8073
8073
  </div>
@@ -8106,13 +8106,13 @@ class Pa {
8106
8106
  <input
8107
8107
  type="text"
8108
8108
  id="bar-notes-input"
8109
- placeholder="${$.translate("barNotesPlaceholder")}"
8109
+ placeholder="${J.translate("barNotesPlaceholder")}"
8110
8110
  />
8111
8111
  <button id="bar-send-button">
8112
- ${$.translate("barSendButton")}
8112
+ ${J.translate("barSendButton")}
8113
8113
  </button>
8114
8114
  <button id="bar-reset-button" class="hidden">
8115
- ${$.translate("barResetButton")}
8115
+ ${J.translate("barResetButton")}
8116
8116
  </button>
8117
8117
  </div>
8118
8118
 
@@ -8158,7 +8158,7 @@ class Pa {
8158
8158
  const a = l.slice(0, 3).join(" • "), d = l.slice(3).join(" • "), c = `
8159
8159
  <div class="wine-recommendation-tile ${s.isSommSelection ? "somm-selection" : ""}">
8160
8160
  ${s.isSommSelection ? `<div class="somm-selection-badge">
8161
- ${$.translate("wineDetails.sommSelection")}
8161
+ ${J.translate("wineDetails.sommSelection")}
8162
8162
  </div>` : ""}
8163
8163
 
8164
8164
  <div class="tile-top">
@@ -8185,7 +8185,7 @@ class Pa {
8185
8185
  <!-- Кнопка Buy, видна только при наведении -->
8186
8186
  <div class="bottom-row">
8187
8187
  <a class="buy-btn" href="${s.url || s.Url}" target="_blank">
8188
- ${$.translate("wineDetails.buy")}
8188
+ ${J.translate("wineDetails.buy")}
8189
8189
  </a>
8190
8190
  </div>
8191
8191
  </div>
@@ -8217,7 +8217,7 @@ class Pa {
8217
8217
  const e = document.getElementById("wine-placeholder");
8218
8218
  e.innerHTML = `
8219
8219
  <div class="no-results">
8220
- <p>${$.translate("noResultsMessage") || "No recommendations found for your query."}</p>
8220
+ <p>${J.translate("noResultsMessage") || "No recommendations found for your query."}</p>
8221
8221
  </div>
8222
8222
  `;
8223
8223
  }
@@ -8225,7 +8225,7 @@ class Pa {
8225
8225
  const e = document.getElementById("wine-placeholder");
8226
8226
  e.innerHTML = `
8227
8227
  <div class="error-message">
8228
- <p>${$.translate("errorMessage") || "Something went wrong. Please try again later."}</p>
8228
+ <p>${J.translate("errorMessage") || "Something went wrong. Please try again later."}</p>
8229
8229
  </div>
8230
8230
  `;
8231
8231
  }
@@ -8269,7 +8269,7 @@ class Pa {
8269
8269
  }));
8270
8270
  }
8271
8271
  initializeSearchAnimation() {
8272
- const e = document.getElementById("wine-search-input"), n = $.translate("placeholderSuggestions");
8272
+ const e = document.getElementById("wine-search-input"), n = J.translate("placeholderSuggestions");
8273
8273
  let i = 0, s = 0, r = !0, o = !1;
8274
8274
  const l = () => {
8275
8275
  o || (r ? (e.placeholder = n[i].substring(0, s++), s > n[i].length ? (r = !1, setTimeout(l, 2e3)) : setTimeout(l, 100)) : (e.placeholder = n[i].substring(0, s--), s < 0 ? (r = !0, i = (i + 1) % n.length, setTimeout(l, 500)) : setTimeout(l, 50)));
@@ -8285,7 +8285,7 @@ class Ba {
8285
8285
  constructor() {
8286
8286
  var n;
8287
8287
  this.api = new At();
8288
- const e = ((n = window == null ? void 0 : window.wineaterData) == null ? void 0 : n.FIRST_MESSAGE_TEXT) || $.translate("welcomeMessage");
8288
+ const e = ((n = window == null ? void 0 : window.wineaterData) == null ? void 0 : n.FIRST_MESSAGE_TEXT) || J.translate("welcomeMessage");
8289
8289
  this.displayFirstMessage(e);
8290
8290
  }
8291
8291
  initialize() {
@@ -8302,11 +8302,11 @@ class Ba {
8302
8302
  if (n) {
8303
8303
  this.displayMessage(n, "user"), e.value = "", this.showTypingIndicator();
8304
8304
  try {
8305
- Ds(n);
8305
+ As(n);
8306
8306
  const i = await this.api.getWineRecommendations(n);
8307
8307
  this.hideTypingIndicator(), i && i.length ? this.displayResults(i) : this.displayMessage("No results found.", "api");
8308
8308
  } catch {
8309
- this.hideTypingIndicator(), this.displayMessage($.translate("somethingWentWrong"), "api");
8309
+ this.hideTypingIndicator(), this.displayMessage(J.translate("somethingWentWrong"), "api");
8310
8310
  }
8311
8311
  }
8312
8312
  }
@@ -8321,12 +8321,12 @@ class Ba {
8321
8321
  s.textContent = e, s.className = "message " + n, i.appendChild(s), i.scrollTop = i.scrollHeight;
8322
8322
  }
8323
8323
  sendAnalytics(e) {
8324
- console.log(e), Fs(e);
8324
+ console.log(e), Ls(e);
8325
8325
  }
8326
8326
  displayResults(e) {
8327
8327
  console.log(e);
8328
8328
  const n = document.getElementById("message-container");
8329
- Ls(e.map((i) => i.Title)), e.forEach((i) => {
8329
+ Ds(e.map((i) => i.Title)), e.forEach((i) => {
8330
8330
  const s = document.createElement("div");
8331
8331
  s.className = "wine-recommendation";
8332
8332
  const r = document.createElement("div");
@@ -8336,10 +8336,10 @@ class Ba {
8336
8336
  const l = document.createElement("div");
8337
8337
  l.innerHTML = `
8338
8338
  <strong>${i.Title}</strong><br>
8339
- ${$.translate("price")}: ${i.Price}<br>
8340
- ${$.translate("region")}: ${i.Region}<br>
8341
- ${$.translate("type")}: ${i.Type}<br>
8342
- <a href="${i.Url}" target="_blank">${$.translate("moreInfo")}</a>
8339
+ ${J.translate("price")}: ${i.Price}<br>
8340
+ ${J.translate("region")}: ${i.Region}<br>
8341
+ ${J.translate("type")}: ${i.Type}<br>
8342
+ <a href="${i.Url}" target="_blank">${J.translate("moreInfo")}</a>
8343
8343
  `, l.querySelector("a").addEventListener("click", (c) => {
8344
8344
  c.preventDefault(), this.sendAnalytics(i.Title), window.open(i.Url, "_blank");
8345
8345
  }), r.appendChild(l);
@@ -8352,12 +8352,12 @@ const ja = 3;
8352
8352
  let gt = null;
8353
8353
  function za() {
8354
8354
  const t = document.getElementById("chat-window"), e = document.getElementById("chat-icon");
8355
- t.classList.contains("visible") ? (Wi(), Ua(), e.style.display = "flex") : (gt && (clearTimeout(gt), gt = null), As(), t.classList.add("visible"), e.style.display = "none");
8355
+ t.classList.contains("visible") ? (qi(), Ua(), e.style.display = "flex") : (gt && (clearTimeout(gt), gt = null), Rs(), t.classList.add("visible"), e.style.display = "none");
8356
8356
  }
8357
8357
  function Ua() {
8358
- console.log("ghbdtn"), Wi(), document.getElementById("chat-window").classList.remove("visible");
8358
+ console.log("ghbdtn"), qi(), document.getElementById("chat-window").classList.remove("visible");
8359
8359
  let e = parseInt(oe("chatCloseCount")) || 0;
8360
- e += 1, e >= ja ? (console.log(e), mt("disableAutoOpen", "true", 1), Os("chatCloseCount")) : (console.log(e), mt("chatCloseCount", e, 1));
8360
+ e += 1, e >= ja ? (console.log(e), mt("disableAutoOpen", "true", 1), Ns("chatCloseCount")) : (console.log(e), mt("chatCloseCount", e, 1));
8361
8361
  }
8362
8362
  document.addEventListener("DOMContentLoaded", () => {
8363
8363
  setupCloseButton(), setupOutsideClick();
@@ -8370,21 +8370,21 @@ const dt = {
8370
8370
  PRODUCT_PAGES: /producto\/[^\/]+\/$/
8371
8371
  // Matches any product page like 'producto/any-product-name/'
8372
8372
  // CART_PAGE: /carrito\/$/ // Matches the cart page like 'carrito/'
8373
- }, Pi = {
8373
+ }, Fi = {
8374
8374
  FESTIVAL_PAGES: /festival/,
8375
8375
  // Matches any URL containing 'festival'
8376
8376
  TASTING_PAGES: /tasting/
8377
8377
  // Matches any URL containing 'tasting'
8378
8378
  };
8379
- var zi, Ui;
8379
+ var ji, zi;
8380
8380
  const $a = {
8381
- FESTIVAL_PAGES: ((zi = window.wineaterData) == null ? void 0 : zi.FESTIVAL_PAGES) || Pi.FESTIVAL_PAGES,
8382
- TASTING_PAGES: ((Ui = window.wineaterData) == null ? void 0 : Ui.TASTING_PAGES) || Pi.TASTING_PAGES
8381
+ FESTIVAL_PAGES: ((ji = window.wineaterData) == null ? void 0 : ji.FESTIVAL_PAGES) || Fi.FESTIVAL_PAGES,
8382
+ TASTING_PAGES: ((zi = window.wineaterData) == null ? void 0 : zi.TASTING_PAGES) || Fi.TASTING_PAGES
8383
8383
  };
8384
- var Hi, $i;
8384
+ var Ui, Hi;
8385
8385
  const qa = {
8386
- PRODUCT_PAGES: ((Hi = window.wineaterData) == null ? void 0 : Hi.PRODUCT_PAGES) || dt.PRODUCT_PAGES,
8387
- CART_PAGE: (($i = window.wineaterData) == null ? void 0 : $i.CART_PAGE) || (dt == null ? void 0 : dt.CART_PAGE)
8386
+ PRODUCT_PAGES: ((Ui = window.wineaterData) == null ? void 0 : Ui.PRODUCT_PAGES) || dt.PRODUCT_PAGES,
8387
+ CART_PAGE: ((Hi = window.wineaterData) == null ? void 0 : Hi.CART_PAGE) || (dt == null ? void 0 : dt.CART_PAGE)
8388
8388
  };
8389
8389
  async function Wa() {
8390
8390
  const t = window.location.href;
@@ -8415,7 +8415,7 @@ class Va {
8415
8415
  }
8416
8416
  async initFlagsmith() {
8417
8417
  try {
8418
- await Yn.init({
8418
+ await Fs.init({
8419
8419
  environmentID: "5RfiDoiqb4dHrNdQvzbkfM",
8420
8420
  cacheFlags: !1,
8421
8421
  enableAnalytics: !0,
@@ -8427,47 +8427,17 @@ class Va {
8427
8427
  }
8428
8428
  async initTranslator() {
8429
8429
  const e = this.store ? this.store.charAt(0).toUpperCase() + this.store.slice(1) : "Test";
8430
- await $.fetchConfig(e || "Test");
8430
+ await J.fetchConfig(e || "Test");
8431
8431
  }
8432
8432
  initCookies() {
8433
8433
  var e;
8434
- mt("chatbotToken", ((e = window.wineaterData) == null ? void 0 : e.CLIENT_TOKEN) || Ga, 365), Rs();
8434
+ mt("chatbotToken", ((e = window.wineaterData) == null ? void 0 : e.CLIENT_TOKEN) || Ga, 365), Os();
8435
8435
  }
8436
8436
  async initializeChatbotOrWidget() {
8437
8437
  this.type === "widget" ? new Pa() : (this.createChatbotUI(), this.setupChatListeners(), this.setupChatButtonListener(), Ka(this.position), new Ba().initialize());
8438
8438
  }
8439
8439
  createChatbotUI() {
8440
- var s;
8441
- const e = Yn.getValue("chat-btn-txt"), i = `
8442
- <div id="chatbot-container">
8443
- <div id="chat-icon">
8444
- <img src="https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/chat-icon.svg" alt="Chat Icon">
8445
- <span>${((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.BUTTON_TEXT) || $.translate(`chatButton${e}`)}</span>
8446
- </div>
8447
- <div id="chat-window" class="hidden">
8448
- <div id="chat-header">
8449
- <div id="chat-title">
8450
- <h1>${$.translate("chatTitle")}</h1>
8451
- </div>
8452
- <div id="close-btn">&times;</div>
8453
- </div>
8454
- <div id="message-container"></div>
8455
- <div id="typing-indicator" class="typing-indicator hidden">
8456
- <span></span><span></span><span></span>
8457
- </div>
8458
- <div id="input-container">
8459
- <input type="text" id="user-input" placeholder="${$.translate("inputPlaceholder")}">
8460
- <button id="send-button">${$.translate("sendButton")}</button>
8461
- </div>
8462
- <div id="powered-by">
8463
- <a href="https://wineater.com" target="_blank">
8464
- <span>${$.translate("poweredBy")}</span>
8465
- <img src="https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/logo.svg" alt="Wineater Logo" id="chatbot-logo">
8466
- </a>
8467
- </div>
8468
- </div>
8469
- `;
8470
- document.body.insertAdjacentHTML("beforeend", i);
8440
+ document.body.insertAdjacentHTML("beforeend", "");
8471
8441
  }
8472
8442
  setupChatListeners() {
8473
8443
  document.getElementById("close-btn").addEventListener("click", za), window.addEventListener("click", (n) => {