@montonio/montonio-js 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -90,7 +90,7 @@ class se {
90
90
  try {
91
91
  const i = {
92
92
  Accept: "application/json",
93
- "X-Montonio-Js-Version": "1.1.3"
93
+ "X-Montonio-Js-Version": "1.1.4"
94
94
  };
95
95
  r && (i["Content-Type"] = "application/json");
96
96
  const c = {
@@ -117,19 +117,18 @@ class tn {
117
117
  this.subscriptions = /* @__PURE__ */ new Map(), this.setupMessageListener();
118
118
  }
119
119
  /**
120
- * Subscribe to messages of a specific type from a specific source iframe
121
- * @param messageType The message type to listen for
122
- * @param handler Handler function to call when the message is received
123
- * @param iframe Iframe object to listen to
124
- * @returns Subscription ID that can be used to unsubscribe
120
+ * Subscribe to messages of a specific type from a specific source iframe.
121
+ * @param messageType The message type to listen for.
122
+ * @param handler Handler function to call when the message is received.
123
+ * @param iframe Iframe object to listen to.
124
+ * @returns Subscription ID that can be used to unsubscribe.
125
125
  */
126
126
  subscribe(t, n, r) {
127
127
  if (this.subscriptions.has(t))
128
128
  throw new Error(`Subscription for '${t}' already exists`);
129
- const o = this.extractWindowFromIframe(r);
130
129
  this.subscriptions.set(t, {
131
130
  handler: n,
132
- sources: [o]
131
+ sources: [r]
133
132
  });
134
133
  }
135
134
  /**
@@ -139,8 +138,7 @@ class tn {
139
138
  const r = this.subscriptions.get(t);
140
139
  if (!r)
141
140
  throw new Error(`Subscription for '${t}' not found`);
142
- const o = this.extractWindowFromIframe(n);
143
- r.sources.includes(o) || r.sources.push(o);
141
+ r.sources.includes(n) || r.sources.push(n);
144
142
  }
145
143
  /**
146
144
  * Wait for a specific message type from a specific source Iframe
@@ -163,7 +161,7 @@ class tn {
163
161
  * Post a message to a specific iframe window
164
162
  */
165
163
  postMessage(t, n, r = "*") {
166
- this.extractWindowFromIframe(t).postMessage(n, r);
164
+ t.getContentWindow().postMessage(n, r);
167
165
  }
168
166
  /**
169
167
  * Clear all subscriptions
@@ -185,8 +183,7 @@ class tn {
185
183
  const r = this.subscriptions.get(t);
186
184
  if (!r)
187
185
  throw new Error(`Subscription for '${t}' not found`);
188
- const o = this.extractWindowFromIframe(n);
189
- r.sources = r.sources.filter((s) => s !== o), r.sources.length === 0 && this.subscriptions.delete(t);
186
+ r.sources = r.sources.filter((o) => o !== n), r.sources.length === 0 && this.subscriptions.delete(t);
190
187
  }
191
188
  /**
192
189
  * Set up the message listener for capturing all window messages
@@ -198,7 +195,13 @@ class tn {
198
195
  return;
199
196
  const n = t.data;
200
197
  this.subscriptions.forEach((r, o) => {
201
- if (!(o !== n.name || !r.sources.some((i) => i === t.source)))
198
+ if (!(o !== n.name || !r.sources.some((i) => {
199
+ try {
200
+ return i.getContentWindow() === t.source;
201
+ } catch (c) {
202
+ return console.error("MONTONIO-JS: MessagingService: Failed to resolve contentWindow for source:", c), !1;
203
+ }
204
+ })))
202
205
  try {
203
206
  r.handler(n);
204
207
  } catch (i) {
@@ -210,12 +213,6 @@ class tn {
210
213
  }
211
214
  });
212
215
  }
213
- /**
214
- * Extract the window source from the Iframe object
215
- */
216
- extractWindowFromIframe(t) {
217
- return t.getContentWindow();
218
- }
219
216
  }
220
217
  const T = {
221
218
  log: "log",
@@ -307,7 +304,7 @@ function x() {
307
304
  let e = _dd_temp_;
308
305
  return delete Object.prototype._dd_temp_, typeof e != "object" && (typeof self == "object" ? e = self : typeof window == "object" ? e = window : e = {}), e;
309
306
  }
310
- const R = x(), Q = "WorkerGlobalScope" in R;
307
+ const I = x(), Q = "WorkerGlobalScope" in I;
311
308
  function le(e, t) {
312
309
  const n = x();
313
310
  let r;
@@ -363,7 +360,7 @@ function fn(e) {
363
360
  }
364
361
  function Ft(e) {
365
362
  var t;
366
- const n = (t = R.queueMicrotask) === null || t === void 0 ? void 0 : t.bind(R);
363
+ const n = (t = I.queueMicrotask) === null || t === void 0 ? void 0 : t.bind(I);
367
364
  typeof n == "function" ? n(b(e)) : Promise.resolve().then(b(e));
368
365
  }
369
366
  class S {
@@ -462,7 +459,7 @@ function Ar(e, t) {
462
459
  break;
463
460
  }
464
461
  }
465
- function Ir(e) {
462
+ function Rr(e) {
466
463
  const t = /* @__PURE__ */ new Map();
467
464
  for (He.lastIndex = 0; ; ) {
468
465
  const n = He.exec(e);
@@ -473,16 +470,16 @@ function Ir(e) {
473
470
  }
474
471
  return t;
475
472
  }
476
- function Rr(e, t, n = "") {
473
+ function Ir(e, t, n = "") {
477
474
  const r = e.charCodeAt(t - 1), s = r >= 55296 && r <= 56319 ? t + 1 : t;
478
475
  return e.length <= s ? e : `${e.slice(0, s)}${n}`;
479
476
  }
480
477
  function xr() {
481
478
  return Lr() === 0;
482
479
  }
483
- let Ie;
480
+ let Re;
484
481
  function Lr() {
485
- return Ie != null ? Ie : Ie = Nr();
482
+ return Re != null ? Re : Re = Nr();
486
483
  }
487
484
  function Nr(e = window) {
488
485
  var t;
@@ -512,7 +509,7 @@ function kr() {
512
509
  try {
513
510
  e = document.createElement("iframe"), e.style.display = "none", document.body.appendChild(e), t = e.contentWindow;
514
511
  } catch (n) {
515
- t = R;
512
+ t = I;
516
513
  }
517
514
  et = {
518
515
  URL: t.URL
@@ -531,7 +528,7 @@ function vt(e) {
531
528
  }
532
529
  let tt;
533
530
  function W(e) {
534
- return tt || (tt = Ir(document.cookie)), tt.get(e);
531
+ return tt || (tt = Rr(document.cookie)), tt.get(e);
535
532
  }
536
533
  function gn(e, t) {
537
534
  We(e, "", 0, t);
@@ -614,7 +611,7 @@ function On(e) {
614
611
  function Tn(e) {
615
612
  return Mr(e).map(([t, n]) => t === "anonymousId" ? `aid=${n}` : `${t}=${n}`).join(At);
616
613
  }
617
- function It(e) {
614
+ function Rt(e) {
618
615
  const t = {};
619
616
  return Fr(e) && e.split(At).forEach((n) => {
620
617
  const r = Sn.exec(n);
@@ -653,7 +650,7 @@ function Bt(e, t, n, r) {
653
650
  }
654
651
  function Cn() {
655
652
  const e = vt(H);
656
- return It(e);
653
+ return Rt(e);
657
654
  }
658
655
  function Wr(e) {
659
656
  const t = {};
@@ -689,7 +686,7 @@ function vn(e) {
689
686
  }
690
687
  function Zr() {
691
688
  const e = localStorage.getItem(H);
692
- return It(e);
689
+ return Rt(e);
693
690
  }
694
691
  function Qr(e, t) {
695
692
  vn(z(e, t));
@@ -716,29 +713,29 @@ function V(e, t, n = 0) {
716
713
  let u, d = a();
717
714
  if (o) {
718
715
  if (d.lock) {
719
- Re(e, t, n);
716
+ Ie(e, t, n);
720
717
  return;
721
718
  }
722
719
  if (u = ro(), c(d.session), d = a(), d.lock !== u) {
723
- Re(e, t, n);
720
+ Ie(e, t, n);
724
721
  return;
725
722
  }
726
723
  }
727
724
  let l = e.process(d.session);
728
725
  if (o && (d = a(), d.lock !== u)) {
729
- Re(e, t, n);
726
+ Ie(e, t, n);
730
727
  return;
731
728
  }
732
729
  if (l && (_e(l) ? i(l) : (On(l), o ? c(l) : s(l))), o && !(l && _e(l))) {
733
730
  if (d = a(), d.lock !== u) {
734
- Re(e, t, n);
731
+ Ie(e, t, n);
735
732
  return;
736
733
  }
737
734
  s(d.session), l = d.session;
738
735
  }
739
736
  (r = e.after) === null || r === void 0 || r.call(e, l || d.session), Kt(t);
740
737
  }
741
- function Re(e, t, n) {
738
+ function Ie(e, t, n) {
742
739
  ve(() => {
743
740
  V(e, t, n + 1);
744
741
  }, eo);
@@ -876,7 +873,7 @@ function ao(e) {
876
873
  observable: t
877
874
  };
878
875
  }
879
- function In(e) {
876
+ function Rn(e) {
880
877
  return e === null ? "null" : Array.isArray(e) ? "array" : typeof e;
881
878
  }
882
879
  function uo(e, t, n = !1) {
@@ -995,13 +992,13 @@ function Ao(e) {
995
992
  ])
996
993
  };
997
994
  }
998
- function Io(e) {
995
+ function Ro(e) {
999
996
  return So.every((t) => e.includes(t));
1000
997
  }
1001
998
  function rt(e, t) {
1002
999
  return e != null && typeof e != "string" ? (y.error(`${t} must be defined as a string`), !1) : !0;
1003
1000
  }
1004
- function Ro(e) {
1001
+ function Io(e) {
1005
1002
  return e && typeof e == "string" && !/(datadog|ddog|datad0g|dd0g)/.test(e) ? (y.error(`Site should be a valid Datadog site. ${_t} ${St}/getting_started/site/.`), !1) : !0;
1006
1003
  }
1007
1004
  function xe(e, t) {
@@ -1017,7 +1014,7 @@ function xo(e, t) {
1017
1014
  y.error("Allowed Tracking Origins must be an array");
1018
1015
  return;
1019
1016
  }
1020
- if (!(!Ro(e.site) || !xe(e.sessionSampleRate, "Session") || !xe(e.telemetrySampleRate, "Telemetry") || !xe(e.telemetryConfigurationSampleRate, "Telemetry Configuration") || !xe(e.telemetryUsageSampleRate, "Telemetry Usage") || !rt(e.version, "Version") || !rt(e.env, "Env") || !rt(e.service, "Service") || !mo(e, t != null ? t : ""))) {
1017
+ if (!(!Io(e.site) || !xe(e.sessionSampleRate, "Session") || !xe(e.telemetrySampleRate, "Telemetry") || !xe(e.telemetryConfigurationSampleRate, "Telemetry Configuration") || !xe(e.telemetryUsageSampleRate, "Telemetry Usage") || !rt(e.version, "Version") || !rt(e.env, "Env") || !rt(e.service, "Service") || !mo(e, t != null ? t : ""))) {
1021
1018
  if (e.trackingConsent !== void 0 && !un(gt, e.trackingConsent)) {
1022
1019
  y.error('Tracking Consent should be either "granted" or "not-granted"');
1023
1020
  return;
@@ -1093,20 +1090,20 @@ var Ge;
1093
1090
  (function(e) {
1094
1091
  e.TRACK_INTAKE_REQUESTS = "track_intake_requests", e.USE_TREE_WALKER_FOR_ACTION_NAME = "use_tree_walker_for_action_name", e.FEATURE_OPERATION_VITAL = "feature_operation_vital", e.SHORT_SESSION_INVESTIGATION = "short_session_investigation";
1095
1092
  })(Ge || (Ge = {}));
1096
- const Rt = /* @__PURE__ */ new Set();
1093
+ const It = /* @__PURE__ */ new Set();
1097
1094
  function No(e) {
1098
1095
  Array.isArray(e) && ko(e.filter((t) => un(Ge, t)));
1099
1096
  }
1100
1097
  function ko(e) {
1101
1098
  e.forEach((t) => {
1102
- Rt.add(t);
1099
+ It.add(t);
1103
1100
  });
1104
1101
  }
1105
1102
  function Uo(e) {
1106
- return Rt.has(e);
1103
+ return It.has(e);
1107
1104
  }
1108
1105
  function Po() {
1109
- return Rt;
1106
+ return It;
1110
1107
  }
1111
1108
  const fe = "?";
1112
1109
  function ge(e) {
@@ -1134,7 +1131,7 @@ function ge(e) {
1134
1131
  stack: r
1135
1132
  };
1136
1133
  }
1137
- const Rn = "((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)", pe = "(?::(\\d+))", Do = new RegExp(`^\\s*at (.*?) ?\\(${Rn}${pe}?${pe}?\\)?\\s*$`, "i"), Mo = new RegExp(`\\((\\S*)${pe}${pe}\\)`);
1134
+ const In = "((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)", pe = "(?::(\\d+))", Do = new RegExp(`^\\s*at (.*?) ?\\(${In}${pe}?${pe}?\\)?\\s*$`, "i"), Mo = new RegExp(`\\((\\S*)${pe}${pe}\\)`);
1138
1135
  function $o(e) {
1139
1136
  const t = Do.exec(e);
1140
1137
  if (!t)
@@ -1148,7 +1145,7 @@ function $o(e) {
1148
1145
  url: n ? void 0 : t[2]
1149
1146
  };
1150
1147
  }
1151
- const Fo = new RegExp(`^\\s*at ?${Rn}${pe}?${pe}??\\s*$`, "i");
1148
+ const Fo = new RegExp(`^\\s*at ?${In}${pe}?${pe}??\\s*$`, "i");
1152
1149
  function Ho(e) {
1153
1150
  const t = Fo.exec(e);
1154
1151
  if (t)
@@ -1555,7 +1552,7 @@ function gs(e) {
1555
1552
  csp: {
1556
1553
  disposition: e.disposition
1557
1554
  },
1558
- stack: Pn(e.effectiveDirective, e.originalPolicy ? `${t} of the policy "${Rr(e.originalPolicy, 100, "...")}"` : "no policy", e.sourceFile, e.lineNumber, e.columnNumber)
1555
+ stack: Pn(e.effectiveDirective, e.originalPolicy ? `${t} of the policy "${Ir(e.originalPolicy, 100, "...")}"` : "no policy", e.sourceFile, e.lineNumber, e.columnNumber)
1559
1556
  });
1560
1557
  }
1561
1558
  function Un(e) {
@@ -1603,7 +1600,7 @@ function ys() {
1603
1600
  }
1604
1601
  }
1605
1602
  function $n(e, t) {
1606
- const n = R.__ddBrowserSdkExtensionCallback;
1603
+ const n = I.__ddBrowserSdkExtensionCallback;
1607
1604
  n && n({ type: e, payload: t });
1608
1605
  }
1609
1606
  function je(e, t, n = Ss()) {
@@ -1632,7 +1629,7 @@ function je(e, t, n = Ss()) {
1632
1629
  o[s] = je(o[s], t[s], n);
1633
1630
  return o;
1634
1631
  }
1635
- const r = In(e) === "object" ? e : {};
1632
+ const r = Rn(e) === "object" ? e : {};
1636
1633
  for (const o in t)
1637
1634
  Object.prototype.hasOwnProperty.call(t, o) && (r[o] = je(r[o], t[o], n));
1638
1635
  return r;
@@ -1666,7 +1663,7 @@ function Ss() {
1666
1663
  }
1667
1664
  function _s() {
1668
1665
  var e;
1669
- const t = R.navigator;
1666
+ const t = I.navigator;
1670
1667
  return {
1671
1668
  status: t.onLine ? "connected" : "not_connected",
1672
1669
  interfaces: t.connection && t.connection.type ? [t.connection.type] : void 0,
@@ -1730,7 +1727,7 @@ function As() {
1730
1727
  return {
1731
1728
  transportStatus: 0,
1732
1729
  currentBackoffTime: Gn,
1733
- bandwidthMonitor: Is(),
1730
+ bandwidthMonitor: Rs(),
1734
1731
  queuedPayloads: Yn(),
1735
1732
  queueFullReported: !1
1736
1733
  };
@@ -1757,7 +1754,7 @@ function Yn() {
1757
1754
  }
1758
1755
  };
1759
1756
  }
1760
- function Is() {
1757
+ function Rs() {
1761
1758
  return {
1762
1759
  ongoingRequestCount: 0,
1763
1760
  ongoingByteCount: 0,
@@ -1792,11 +1789,11 @@ function qn(e, t, n) {
1792
1789
  */
1793
1790
  sendOnExit: (s) => {
1794
1791
  for (const i of e)
1795
- Rs(i, t, s);
1792
+ Is(i, t, s);
1796
1793
  }
1797
1794
  };
1798
1795
  }
1799
- function Rs(e, t, n) {
1796
+ function Is(e, t, n) {
1800
1797
  if (!!navigator.sendBeacon && n.bytesCount < t)
1801
1798
  try {
1802
1799
  const o = e.build("beacon", n);
@@ -2158,7 +2155,7 @@ function Gs(e, t, n, r, o) {
2158
2155
  function Ks() {
2159
2156
  var e;
2160
2157
  return {
2161
- is_local_file: ((e = R.location) === null || e === void 0 ? void 0 : e.protocol) === "file:",
2158
+ is_local_file: ((e = I.location) === null || e === void 0 ? void 0 : e.protocol) === "file:",
2162
2159
  is_worker: Q
2163
2160
  };
2164
2161
  }
@@ -2285,7 +2282,7 @@ function Qs({ expireDelay: e, maxEntries: t }) {
2285
2282
  }
2286
2283
  const ei = "datadog-synthetics-public-id", ti = "datadog-synthetics-result-id", ni = "datadog-synthetics-injects-rum";
2287
2284
  function Zn() {
2288
- return Q ? !1 : !!(R._DATADOG_SYNTHETICS_INJECTS_RUM || W(ni));
2285
+ return Q ? !1 : !!(I._DATADOG_SYNTHETICS_INJECTS_RUM || W(ni));
2289
2286
  }
2290
2287
  function ri() {
2291
2288
  const e = window._DATADOG_SYNTHETICS_PUBLIC_ID || W(ei);
@@ -2381,7 +2378,7 @@ function pi(e, t) {
2381
2378
  if (a > 14 * B)
2382
2379
  o();
2383
2380
  else {
2384
- const u = It(c.value);
2381
+ const u = Rt(c.value);
2385
2382
  if (u.id && u.id !== t.id) {
2386
2383
  o();
2387
2384
  const d = $() - r;
@@ -2524,9 +2521,9 @@ function tr() {
2524
2521
  }
2525
2522
  function _i() {
2526
2523
  return new S((e) => {
2527
- if (!R.fetch)
2524
+ if (!I.fetch)
2528
2525
  return;
2529
- const { stop: t } = J(R, "fetch", (n) => Oi(n, e), {
2526
+ const { stop: t } = J(I, "fetch", (n) => Oi(n, e), {
2530
2527
  computeHandlingStack: !0
2531
2528
  });
2532
2529
  return t;
@@ -2619,12 +2616,12 @@ function wi(e, t, n) {
2619
2616
  function Ai(e) {
2620
2617
  return typeof e == "string" ? U(e) : ne(e) ? Ln(ge(e)) : we(U(e), void 0, 2);
2621
2618
  }
2622
- const Ii = 500;
2623
- function Ri() {
2619
+ const Ri = 500;
2620
+ function Ii() {
2624
2621
  const e = [];
2625
2622
  return {
2626
2623
  add: (o) => {
2627
- e.push(o) > Ii && e.splice(0, 1);
2624
+ e.push(o) > Ri && e.splice(0, 1);
2628
2625
  },
2629
2626
  remove: (o) => {
2630
2627
  Xn(e, o);
@@ -2635,7 +2632,7 @@ function Ri() {
2635
2632
  };
2636
2633
  }
2637
2634
  function xi(e) {
2638
- const t = In(e) === "object";
2635
+ const t = Rn(e) === "object";
2639
2636
  return t || y.error("Unsupported context:", e), t;
2640
2637
  }
2641
2638
  function dt(e, t, n) {
@@ -2883,7 +2880,7 @@ const Te = {
2883
2880
  console: "console",
2884
2881
  http: "http"
2885
2882
  }, Bi = Object.keys(h);
2886
- class I {
2883
+ class R {
2887
2884
  constructor(t, n, r = Te.http, o = h.debug, s = {}) {
2888
2885
  this.handleLogStrategy = t, this.handlerType = r, this.level = o, this.contextManager = Xe("logger"), this.tags = [], this.contextManager.setContext(s), n && this.contextManager.setContextProperty("logger", { name: n });
2889
2886
  }
@@ -2953,16 +2950,16 @@ class I {
2953
2950
  }
2954
2951
  Hi([
2955
2952
  vr
2956
- ], I.prototype, "logImplementation", null);
2957
- I.prototype.ok = D(h.ok);
2958
- I.prototype.debug = D(h.debug);
2959
- I.prototype.info = D(h.info);
2960
- I.prototype.notice = D(h.notice);
2961
- I.prototype.warn = D(h.warn);
2962
- I.prototype.error = D(h.error);
2963
- I.prototype.critical = D(h.critical);
2964
- I.prototype.alert = D(h.alert);
2965
- I.prototype.emerg = D(h.emerg);
2953
+ ], R.prototype, "logImplementation", null);
2954
+ R.prototype.ok = D(h.ok);
2955
+ R.prototype.debug = D(h.debug);
2956
+ R.prototype.info = D(h.info);
2957
+ R.prototype.notice = D(h.notice);
2958
+ R.prototype.warn = D(h.warn);
2959
+ R.prototype.error = D(h.error);
2960
+ R.prototype.critical = D(h.critical);
2961
+ R.prototype.alert = D(h.alert);
2962
+ R.prototype.emerg = D(h.emerg);
2966
2963
  function D(e) {
2967
2964
  return function(t, n, r) {
2968
2965
  let o;
@@ -3010,7 +3007,7 @@ function ji(e) {
3010
3007
  };
3011
3008
  }
3012
3009
  function zi(e, t, n) {
3013
- const r = Ri(), o = rr();
3010
+ const r = Ii(), o = rr();
3014
3011
  ft(o, C.globalContext, r);
3015
3012
  const s = nr();
3016
3013
  ft(s, C.accountContext, r);
@@ -3059,7 +3056,7 @@ function Yi(e) {
3059
3056
  const u = e(a, Xt, t, n);
3060
3057
  return r = qi(c, u), u;
3061
3058
  });
3062
- const o = () => r, s = {}, i = new I((...c) => r.handleLog(...c));
3059
+ const o = () => r, s = {}, i = new R((...c) => r.handleLog(...c));
3063
3060
  return ls({
3064
3061
  logger: i,
3065
3062
  init: (c) => {
@@ -3074,7 +3071,7 @@ function Yi(e) {
3074
3071
  setGlobalContextProperty: v(o, C.globalContext, w.setContextProperty),
3075
3072
  removeGlobalContextProperty: v(o, C.globalContext, w.removeContextProperty),
3076
3073
  clearGlobalContext: v(o, C.globalContext, w.clearContext),
3077
- createLogger: b((c, a = {}) => (s[c] = new I((...u) => r.handleLog(...u), U(c), a.handler, a.level, U(a.context)), s[c])),
3074
+ createLogger: b((c, a = {}) => (s[c] = new R((...u) => r.handleLog(...u), U(c), a.handler, a.level, U(a.context)), s[c])),
3078
3075
  getLogger: b((c) => s[c]),
3079
3076
  getInitConfiguration: b(() => Fn(r.initConfiguration)),
3080
3077
  getInternalContext: b((c) => r.getInternalContext(c)),
@@ -3205,7 +3202,7 @@ function rc(e, t) {
3205
3202
  s.state === "resolve" && o(yt.FETCH, s);
3206
3203
  });
3207
3204
  function o(s, i) {
3208
- !Io(i.url) && (cc(i) || Hn(i.status)) && ("xhr" in i ? oc(i.xhr, e, c) : i.response ? ic(i.response, e, c) : i.error && sc(i.error, e, c));
3205
+ !Ro(i.url) && (cc(i) || Hn(i.status)) && ("xhr" in i ? oc(i.xhr, e, c) : i.response ? ic(i.response, e, c) : i.error && sc(i.error, e, c));
3209
3206
  function c(a) {
3210
3207
  const u = {
3211
3208
  isAborted: i.isAborted,
@@ -3383,7 +3380,7 @@ function bc(e) {
3383
3380
  }
3384
3381
  const yc = Ds;
3385
3382
  function Sc(e) {
3386
- const t = R;
3383
+ const t = I;
3387
3384
  e.register(0, ({ startTime: o }) => {
3388
3385
  const s = n(o);
3389
3386
  return s || te;
@@ -3492,7 +3489,7 @@ class ae {
3492
3489
  env: t === Ce.PRODUCTION ? "live-production" : "live-sandbox",
3493
3490
  forwardErrorsToLogs: !0,
3494
3491
  service: "montonio-js",
3495
- version: "1.1.3",
3492
+ version: "1.1.4",
3496
3493
  silentMultipleInit: !0,
3497
3494
  forwardConsoleLogs: "all"
3498
3495
  }), Me.setGlobalContext({
@@ -3587,7 +3584,7 @@ var en;
3587
3584
  e.PENDING = "PENDING", e.AUTHORIZED = "AUTHORIZED", e.PAID = "PAID", e.PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED", e.REFUNDED = "REFUNDED", e.VOIDED = "VOIDED", e.ABANDONED = "ABANDONED";
3588
3585
  })(en || (en = {}));
3589
3586
  const Ac = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
3590
- function Ic(e) {
3587
+ function Rc(e) {
3591
3588
  const t = [];
3592
3589
  if (!e)
3593
3590
  throw new ht(["CheckoutOptions object is required"]);
@@ -3598,7 +3595,7 @@ function Ic(e) {
3598
3595
  if (e.environment !== void 0 && e.environment !== null && (Object.values(Ce).includes(e.environment) || t.push(`environment must be one of: production, sandbox. Received: '${e.environment}'`)), t.length > 0)
3599
3596
  throw new ht(t);
3600
3597
  }
3601
- function Rc(e) {
3598
+ function Ic(e) {
3602
3599
  const t = [];
3603
3600
  if (e.locale !== void 0 && e.locale !== null) {
3604
3601
  const n = Object.values(Ye);
@@ -3668,7 +3665,7 @@ class xc extends cr {
3668
3665
  }
3669
3666
  class Lc extends cr {
3670
3667
  constructor(t) {
3671
- super(), this.isValid = !1, this.paymentAuth = null, this.options = t, this.environment = t.environment || Ce.PRODUCTION, ae.instance.initialize(this.environment, this.options.sessionUuid), console.log("MONTONIO-JS: MontonioCheckout: class created with options:", t), Ic(t);
3668
+ super(), this.isValid = !1, this.paymentAuth = null, this.options = t, this.environment = t.environment || Ce.PRODUCTION, ae.instance.initialize(this.environment, this.options.sessionUuid), console.log("MONTONIO-JS: MontonioCheckout: class created with options:", t), Rc(t);
3672
3669
  }
3673
3670
  /**
3674
3671
  * Mount the checkout to the DOM
@@ -3693,7 +3690,7 @@ class Lc extends cr {
3693
3690
  updateOptions(t) {
3694
3691
  if (console.log("MONTONIO-JS: updateOptions: Updating options to:", t), !this.loaded)
3695
3692
  throw new Mt();
3696
- Rc(t), t.locale !== void 0 && (this.options.locale = t.locale, this.messagingService.postMessage(this.iframe, {
3693
+ Ic(t), t.locale !== void 0 && (this.options.locale = t.locale, this.messagingService.postMessage(this.iframe, {
3697
3694
  name: _.CHECKOUT_CHANGE_LOCALE,
3698
3695
  payload: { locale: t.locale }
3699
3696
  }));