@cloudflare/vite-plugin 0.0.0-6fe4a67d0 → 0.0.0-7006630cf

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,18 +1,18 @@
1
1
  // ../workers-shared/dist/asset-worker.mjs
2
- import { WorkerEntrypoint as zs } from "cloudflare:workers";
3
- var mr = Object.defineProperty;
4
- var hr = (t, e, n) => e in t ? mr(t, e, { enumerable: true, configurable: true, writable: true, value: n }) : t[e] = n;
5
- var Se = (t, e, n) => (hr(t, typeof e != "symbol" ? e + "" : e, n), n);
6
- var zt = (t, e, n) => {
2
+ import { WorkerEntrypoint as Hs } from "cloudflare:workers";
3
+ var dr = Object.defineProperty;
4
+ var lr = (t, e, n) => e in t ? dr(t, e, { enumerable: true, configurable: true, writable: true, value: n }) : t[e] = n;
5
+ var Ee = (t, e, n) => (lr(t, typeof e != "symbol" ? e + "" : e, n), n);
6
+ var Yt = (t, e, n) => {
7
7
  if (!e.has(t)) throw TypeError("Cannot " + n);
8
8
  };
9
- var rt = (t, e, n) => (zt(t, e, "read from private field"), n ? n.call(t) : e.get(t));
10
- var Vt = (t, e, n) => {
9
+ var nt = (t, e, n) => (Yt(t, e, "read from private field"), n ? n.call(t) : e.get(t));
10
+ var jt = (t, e, n) => {
11
11
  if (e.has(t)) throw TypeError("Cannot add the same private member more than once");
12
12
  e instanceof WeakSet ? e.add(t) : e.set(t, n);
13
13
  };
14
- var Jt = (t, e, n, r) => (zt(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n);
15
- var se = class {
14
+ var qt = (t, e, n, r) => (Yt(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n);
15
+ var re = class {
16
16
  constructor(e) {
17
17
  this.performanceTimer = e;
18
18
  }
@@ -20,113 +20,113 @@ var se = class {
20
20
  return this.performanceTimer ? this.performanceTimer.timeOrigin + this.performanceTimer.now() : Date.now();
21
21
  }
22
22
  };
23
- var Te = class extends Response {
23
+ var ye = class extends Response {
24
24
  constructor(e, n) {
25
25
  super(e, { ...n, status: 200 });
26
26
  }
27
27
  };
28
- var ie = class extends Response {
28
+ var se = class extends Response {
29
29
  constructor(...[e, n]) {
30
30
  super(e, { ...n, status: 404, statusText: "Not Found" });
31
31
  }
32
32
  };
33
- var be = class extends Response {
33
+ var Se = class extends Response {
34
34
  constructor(...[e, n]) {
35
35
  super(e, { ...n, status: 405, statusText: "Method Not Allowed" });
36
36
  }
37
37
  };
38
- var $ = class extends Response {
38
+ var F = class extends Response {
39
39
  constructor(e, n) {
40
40
  super(null, { ...n, status: 500 });
41
41
  }
42
42
  };
43
- var xe = class extends Response {
43
+ var Te = class extends Response {
44
44
  constructor(...[e, n]) {
45
45
  super(null, { ...n, status: 304, statusText: "Not Modified" });
46
46
  }
47
47
  };
48
- var Re = class extends Response {
48
+ var be = class extends Response {
49
49
  constructor(e, n) {
50
50
  super(null, { ...n, status: 307, statusText: "Temporary Redirect", headers: { ...n?.headers, Location: e } });
51
51
  }
52
52
  };
53
- var Kt = Object.prototype.toString;
54
- function H(t) {
55
- switch (Kt.call(t)) {
53
+ var Wt = Object.prototype.toString;
54
+ function $(t) {
55
+ switch (Wt.call(t)) {
56
56
  case "[object Error]":
57
57
  case "[object Exception]":
58
58
  case "[object DOMException]":
59
59
  return true;
60
60
  default:
61
- return P(t, Error);
61
+ return C(t, Error);
62
62
  }
63
63
  }
64
- function Xt(t, e) {
65
- return Kt.call(t) === `[object ${e}]`;
64
+ function zt(t, e) {
65
+ return Wt.call(t) === `[object ${e}]`;
66
66
  }
67
- function J(t) {
68
- return Xt(t, "String");
67
+ function V(t) {
68
+ return zt(t, "String");
69
69
  }
70
- function Ie(t) {
70
+ function Re(t) {
71
71
  return t === null || typeof t != "object" && typeof t != "function";
72
72
  }
73
- function N(t) {
74
- return Xt(t, "Object");
73
+ function x(t) {
74
+ return zt(t, "Object");
75
75
  }
76
- function st(t) {
77
- return typeof Event < "u" && P(t, Event);
76
+ function rt(t) {
77
+ return typeof Event < "u" && C(t, Event);
78
78
  }
79
- function it(t) {
80
- return typeof Element < "u" && P(t, Element);
79
+ function st(t) {
80
+ return typeof Element < "u" && C(t, Element);
81
81
  }
82
- function Y(t) {
82
+ function H(t) {
83
83
  return !!(t && t.then && typeof t.then == "function");
84
84
  }
85
- function ot(t) {
86
- return N(t) && "nativeEvent" in t && "preventDefault" in t && "stopPropagation" in t;
85
+ function it(t) {
86
+ return x(t) && "nativeEvent" in t && "preventDefault" in t && "stopPropagation" in t;
87
87
  }
88
- function oe(t) {
88
+ function ie(t) {
89
89
  return typeof t == "number" && t !== t;
90
90
  }
91
- function P(t, e) {
91
+ function C(t, e) {
92
92
  try {
93
93
  return t instanceof e;
94
94
  } catch {
95
95
  return false;
96
96
  }
97
97
  }
98
- function at(t) {
98
+ function ot(t) {
99
99
  return !!(typeof t == "object" && t !== null && (t.__isVue || t._isVue));
100
100
  }
101
- function L(t, e = 0) {
101
+ function U(t, e = 0) {
102
102
  return typeof t != "string" || e === 0 || t.length <= e ? t : `${t.slice(0, e)}...`;
103
103
  }
104
- function Ae(t) {
104
+ function Ie(t) {
105
105
  return t && t.Math == Math ? t : void 0;
106
106
  }
107
- var h = typeof globalThis == "object" && Ae(globalThis) || typeof window == "object" && Ae(window) || typeof self == "object" && Ae(self) || typeof global == "object" && Ae(global) || /* @__PURE__ */ function() {
107
+ var h = typeof globalThis == "object" && Ie(globalThis) || typeof window == "object" && Ie(window) || typeof self == "object" && Ie(self) || typeof global == "object" && Ie(global) || /* @__PURE__ */ function() {
108
108
  return this;
109
109
  }() || {};
110
- function D() {
110
+ function w() {
111
111
  return h;
112
112
  }
113
- function ae(t, e, n) {
113
+ function oe(t, e, n) {
114
114
  let r = n || h, s = r.__SENTRY__ = r.__SENTRY__ || {};
115
115
  return s[t] || (s[t] = e());
116
116
  }
117
- var ni = D();
118
- var _r = 80;
119
- function Zt(t, e = {}) {
117
+ var Xs = w();
118
+ var fr = 80;
119
+ function Vt(t, e = {}) {
120
120
  if (!t) return "<unknown>";
121
121
  try {
122
- let n = t, r = 5, s = [], i = 0, o = 0, a = " > ", c = a.length, u, l = Array.isArray(e) ? e : e.keyAttrs, d = !Array.isArray(e) && e.maxStringLength || _r;
123
- for (; n && i++ < r && (u = gr(n, l), !(u === "html" || i > 1 && o + s.length * c + u.length >= d)); ) s.push(u), o += u.length, n = n.parentNode;
122
+ let n = t, r = 5, s = [], i = 0, o = 0, a = " > ", c = a.length, u, l = Array.isArray(e) ? e : e.keyAttrs, d = !Array.isArray(e) && e.maxStringLength || fr;
123
+ for (; n && i++ < r && (u = pr(n, l), !(u === "html" || i > 1 && o + s.length * c + u.length >= d)); ) s.push(u), o += u.length, n = n.parentNode;
124
124
  return s.reverse().join(a);
125
125
  } catch {
126
126
  return "<unknown>";
127
127
  }
128
128
  }
129
- function gr(t, e) {
129
+ function pr(t, e) {
130
130
  let n = t, r = [], s, i, o, a, c;
131
131
  if (!n || !n.tagName) return "";
132
132
  r.push(n.tagName.toLowerCase());
@@ -134,19 +134,19 @@ function gr(t, e) {
134
134
  if (u && u.length) u.forEach((d) => {
135
135
  r.push(`[${d[0]}="${d[1]}"]`);
136
136
  });
137
- else if (n.id && r.push(`#${n.id}`), s = n.className, s && J(s)) for (i = s.split(/\s+/), c = 0; c < i.length; c++) r.push(`.${i[c]}`);
137
+ else if (n.id && r.push(`#${n.id}`), s = n.className, s && V(s)) for (i = s.split(/\s+/), c = 0; c < i.length; c++) r.push(`.${i[c]}`);
138
138
  let l = ["aria-label", "type", "name", "title", "alt"];
139
139
  for (c = 0; c < l.length; c++) o = l[c], a = n.getAttribute(o), a && r.push(`[${o}="${a}"]`);
140
140
  return r.join("");
141
141
  }
142
- var Er = "Sentry Logger ";
143
- var ce = ["debug", "info", "warn", "error", "log", "assert", "trace"];
144
- var K = {};
145
- function Ne(t) {
142
+ var mr = "Sentry Logger ";
143
+ var ae = ["debug", "info", "warn", "error", "log", "assert", "trace"];
144
+ var J = {};
145
+ function xe(t) {
146
146
  if (!("console" in h)) return t();
147
- let e = h.console, n = {}, r = Object.keys(K);
147
+ let e = h.console, n = {}, r = Object.keys(J);
148
148
  r.forEach((s) => {
149
- let i = K[s];
149
+ let i = J[s];
150
150
  n[s] = e[s], e[s] = i;
151
151
  });
152
152
  try {
@@ -157,34 +157,34 @@ function Ne(t) {
157
157
  });
158
158
  }
159
159
  }
160
- function yr() {
160
+ function hr() {
161
161
  let t = false, e = { enable: () => {
162
162
  t = true;
163
163
  }, disable: () => {
164
164
  t = false;
165
165
  }, isEnabled: () => t };
166
- return typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__ ? ce.forEach((n) => {
166
+ return typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__ ? ae.forEach((n) => {
167
167
  e[n] = (...r) => {
168
- t && Ne(() => {
169
- h.console[n](`${Er}[${n}]:`, ...r);
168
+ t && xe(() => {
169
+ h.console[n](`${mr}[${n}]:`, ...r);
170
170
  });
171
171
  };
172
- }) : ce.forEach((n) => {
172
+ }) : ae.forEach((n) => {
173
173
  e[n] = () => {
174
174
  };
175
175
  }), e;
176
176
  }
177
- var f = yr();
178
- var Sr = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
179
- function Tr(t) {
177
+ var f = hr();
178
+ var _r = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
179
+ function gr(t) {
180
180
  return t === "http" || t === "https";
181
181
  }
182
- function B(t, e = false) {
182
+ function L(t, e = false) {
183
183
  let { host: n, path: r, pass: s, port: i, projectId: o, protocol: a, publicKey: c } = t;
184
184
  return `${a}://${c}${e && s ? `:${s}` : ""}@${n}${i ? `:${i}` : ""}/${r && `${r}/`}${o}`;
185
185
  }
186
- function Qt(t) {
187
- let e = Sr.exec(t);
186
+ function Jt(t) {
187
+ let e = _r.exec(t);
188
188
  if (!e) {
189
189
  console.error(`Invalid Sentry Dsn: ${t}`);
190
190
  return;
@@ -194,88 +194,88 @@ function Qt(t) {
194
194
  let d = u.match(/^\d+/);
195
195
  d && (u = d[0]);
196
196
  }
197
- return en({ host: i, pass: s, path: c, projectId: u, port: o, protocol: n, publicKey: r });
197
+ return Kt({ host: i, pass: s, path: c, projectId: u, port: o, protocol: n, publicKey: r });
198
198
  }
199
- function en(t) {
199
+ function Kt(t) {
200
200
  return { protocol: t.protocol, publicKey: t.publicKey || "", pass: t.pass || "", host: t.host, port: t.port || "", path: t.path || "", projectId: t.projectId };
201
201
  }
202
- function br(t) {
202
+ function Er(t) {
203
203
  if (!(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__)) return true;
204
204
  let { port: e, projectId: n, protocol: r } = t;
205
- return ["protocol", "publicKey", "host", "projectId"].find((o) => t[o] ? false : (f.error(`Invalid Sentry Dsn: ${o} missing`), true)) ? false : n.match(/^\d+$/) ? Tr(r) ? e && isNaN(parseInt(e, 10)) ? (f.error(`Invalid Sentry Dsn: Invalid port ${e}`), false) : true : (f.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), false) : (f.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), false);
205
+ return ["protocol", "publicKey", "host", "projectId"].find((o) => t[o] ? false : (f.error(`Invalid Sentry Dsn: ${o} missing`), true)) ? false : n.match(/^\d+$/) ? gr(r) ? e && isNaN(parseInt(e, 10)) ? (f.error(`Invalid Sentry Dsn: Invalid port ${e}`), false) : true : (f.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), false) : (f.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), false);
206
206
  }
207
- function we(t) {
208
- let e = typeof t == "string" ? Qt(t) : en(t);
209
- if (!(!e || !br(e))) return e;
207
+ function Ae(t) {
208
+ let e = typeof t == "string" ? Jt(t) : Kt(t);
209
+ if (!(!e || !Er(e))) return e;
210
210
  }
211
211
  var T = class extends Error {
212
212
  constructor(e, n = "warn") {
213
213
  super(e), this.message = e, this.name = new.target.prototype.constructor.name, Object.setPrototypeOf(this, new.target.prototype), this.logLevel = n;
214
214
  }
215
215
  };
216
- function w(t, e, n) {
216
+ function A(t, e, n) {
217
217
  if (!(e in t)) return;
218
218
  let r = t[e], s = n(r);
219
- typeof s == "function" && rn(s, r), t[e] = s;
219
+ typeof s == "function" && Qt(s, r), t[e] = s;
220
220
  }
221
- function X(t, e, n) {
221
+ function K(t, e, n) {
222
222
  try {
223
223
  Object.defineProperty(t, e, { value: n, writable: true, configurable: true });
224
224
  } catch {
225
225
  (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(`Failed to add non-enumerable property "${e}" to object`, t);
226
226
  }
227
227
  }
228
- function rn(t, e) {
228
+ function Qt(t, e) {
229
229
  try {
230
230
  let n = e.prototype || {};
231
- t.prototype = e.prototype = n, X(t, "__sentry_original__", e);
231
+ t.prototype = e.prototype = n, K(t, "__sentry_original__", e);
232
232
  } catch {
233
233
  }
234
234
  }
235
- function ut(t) {
235
+ function ct(t) {
236
236
  return Object.keys(t).map((e) => `${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&");
237
237
  }
238
- function De(t) {
239
- if (H(t)) return { message: t.message, name: t.name, stack: t.stack, ...nn(t) };
240
- if (st(t)) {
241
- let e = { type: t.type, target: tn(t.target), currentTarget: tn(t.currentTarget), ...nn(t) };
242
- return typeof CustomEvent < "u" && P(t, CustomEvent) && (e.detail = t.detail), e;
238
+ function Ne(t) {
239
+ if ($(t)) return { message: t.message, name: t.name, stack: t.stack, ...Zt(t) };
240
+ if (rt(t)) {
241
+ let e = { type: t.type, target: Xt(t.target), currentTarget: Xt(t.currentTarget), ...Zt(t) };
242
+ return typeof CustomEvent < "u" && C(t, CustomEvent) && (e.detail = t.detail), e;
243
243
  } else return t;
244
244
  }
245
- function tn(t) {
245
+ function Xt(t) {
246
246
  try {
247
- return it(t) ? Zt(t) : Object.prototype.toString.call(t);
247
+ return st(t) ? Vt(t) : Object.prototype.toString.call(t);
248
248
  } catch {
249
249
  return "<unknown>";
250
250
  }
251
251
  }
252
- function nn(t) {
252
+ function Zt(t) {
253
253
  if (typeof t == "object" && t !== null) {
254
254
  let e = {};
255
255
  for (let n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
256
256
  return e;
257
257
  } else return {};
258
258
  }
259
- function ue(t, e = 40) {
260
- let n = Object.keys(De(t));
259
+ function ce(t, e = 40) {
260
+ let n = Object.keys(Ne(t));
261
261
  if (n.sort(), !n.length) return "[object has no keys]";
262
- if (n[0].length >= e) return L(n[0], e);
262
+ if (n[0].length >= e) return U(n[0], e);
263
263
  for (let r = n.length; r > 0; r--) {
264
264
  let s = n.slice(0, r).join(", ");
265
- if (!(s.length > e)) return r === n.length ? s : L(s, e);
265
+ if (!(s.length > e)) return r === n.length ? s : U(s, e);
266
266
  }
267
267
  return "";
268
268
  }
269
269
  function E(t) {
270
- return ct(t, /* @__PURE__ */ new Map());
270
+ return at(t, /* @__PURE__ */ new Map());
271
271
  }
272
- function ct(t, e) {
273
- if (N(t)) {
272
+ function at(t, e) {
273
+ if (x(t)) {
274
274
  let n = e.get(t);
275
275
  if (n !== void 0) return n;
276
276
  let r = {};
277
277
  e.set(t, r);
278
- for (let s of Object.keys(t)) typeof t[s] < "u" && (r[s] = ct(t[s], e));
278
+ for (let s of Object.keys(t)) typeof t[s] < "u" && (r[s] = at(t[s], e));
279
279
  return r;
280
280
  }
281
281
  if (Array.isArray(t)) {
@@ -283,15 +283,15 @@ function ct(t, e) {
283
283
  if (n !== void 0) return n;
284
284
  let r = [];
285
285
  return e.set(t, r), t.forEach((s) => {
286
- r.push(ct(s, e));
286
+ r.push(at(s, e));
287
287
  }), r;
288
288
  }
289
289
  return t;
290
290
  }
291
- function xr(t, e = false) {
291
+ function yr(t, e = false) {
292
292
  return !(e || t && !t.startsWith("/") && !t.includes(":\\") && !t.startsWith(".") && !t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//)) && t !== void 0 && !t.includes("node_modules/");
293
293
  }
294
- function sn(t) {
294
+ function en(t) {
295
295
  let e = /^\s*[-]{4,}$/, n = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
296
296
  return (r) => {
297
297
  let s = r.match(n);
@@ -309,15 +309,15 @@ function sn(t) {
309
309
  }
310
310
  o && (c = i, u = o), o === "<anonymous>" && (u = void 0, a = void 0), a === void 0 && (u = u || "<anonymous>", a = c ? `${c}.${u}` : u);
311
311
  let l = s[2] && s[2].startsWith("file://") ? s[2].slice(7) : s[2], d = s[5] === "native";
312
- return !l && s[5] && !d && (l = s[5]), { filename: l, module: t ? t(l) : void 0, function: a, lineno: parseInt(s[3], 10) || void 0, colno: parseInt(s[4], 10) || void 0, in_app: xr(l, d) };
312
+ return !l && s[5] && !d && (l = s[5]), { filename: l, module: t ? t(l) : void 0, function: a, lineno: parseInt(s[3], 10) || void 0, colno: parseInt(s[4], 10) || void 0, in_app: yr(l, d) };
313
313
  }
314
314
  if (r.match(e)) return { filename: r };
315
315
  };
316
316
  }
317
- var cn = 50;
318
- var on = /\(error: (.*)\)/;
319
- var an = /captureMessage|captureException/;
320
- function Oe(...t) {
317
+ var rn = 50;
318
+ var tn = /\(error: (.*)\)/;
319
+ var nn = /captureMessage|captureException/;
320
+ function we(...t) {
321
321
  let e = t.sort((n, r) => n[0] - r[0]).map((n) => n[1]);
322
322
  return (n, r = 0) => {
323
323
  let s = [], i = n.split(`
@@ -325,7 +325,7 @@ function Oe(...t) {
325
325
  for (let o = r; o < i.length; o++) {
326
326
  let a = i[o];
327
327
  if (a.length > 1024) continue;
328
- let c = on.test(a) ? a.replace(on, "$1") : a;
328
+ let c = tn.test(a) ? a.replace(tn, "$1") : a;
329
329
  if (!c.match(/\S*Error: /)) {
330
330
  for (let u of e) {
331
331
  let l = u(c);
@@ -334,183 +334,183 @@ function Oe(...t) {
334
334
  break;
335
335
  }
336
336
  }
337
- if (s.length >= cn) break;
337
+ if (s.length >= rn) break;
338
338
  }
339
339
  }
340
- return un(s);
340
+ return sn(s);
341
341
  };
342
342
  }
343
- function lt(t) {
344
- return Array.isArray(t) ? Oe(...t) : t;
343
+ function dt(t) {
344
+ return Array.isArray(t) ? we(...t) : t;
345
345
  }
346
- function un(t) {
346
+ function sn(t) {
347
347
  if (!t.length) return [];
348
348
  let e = Array.from(t);
349
- return /sentryWrapped/.test(e[e.length - 1].function || "") && e.pop(), e.reverse(), an.test(e[e.length - 1].function || "") && (e.pop(), an.test(e[e.length - 1].function || "") && e.pop()), e.slice(0, cn).map((n) => ({ ...n, filename: n.filename || e[e.length - 1].filename, function: n.function || "?" }));
349
+ return /sentryWrapped/.test(e[e.length - 1].function || "") && e.pop(), e.reverse(), nn.test(e[e.length - 1].function || "") && (e.pop(), nn.test(e[e.length - 1].function || "") && e.pop()), e.slice(0, rn).map((n) => ({ ...n, filename: n.filename || e[e.length - 1].filename, function: n.function || "?" }));
350
350
  }
351
- var dt = "<anonymous>";
352
- function de(t) {
351
+ var ut = "<anonymous>";
352
+ function ue(t) {
353
353
  try {
354
- return !t || typeof t != "function" ? dt : t.name || dt;
354
+ return !t || typeof t != "function" ? ut : t.name || ut;
355
355
  } catch {
356
- return dt;
356
+ return ut;
357
357
  }
358
358
  }
359
- function ft(t) {
360
- return [90, sn(t)];
359
+ function lt(t) {
360
+ return [90, en(t)];
361
361
  }
362
- var pt = D();
363
- function Rr() {
364
- if (!("fetch" in pt)) return false;
362
+ var ft = w();
363
+ function Sr() {
364
+ if (!("fetch" in ft)) return false;
365
365
  try {
366
366
  return new Headers(), new Request("http://www.example.com"), new Response(), true;
367
367
  } catch {
368
368
  return false;
369
369
  }
370
370
  }
371
- function dn(t) {
371
+ function on(t) {
372
372
  return t && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString());
373
373
  }
374
- function ln() {
375
- if (!Rr()) return false;
376
- if (dn(pt.fetch)) return true;
377
- let t = false, e = pt.document;
374
+ function an() {
375
+ if (!Sr()) return false;
376
+ if (on(ft.fetch)) return true;
377
+ let t = false, e = ft.document;
378
378
  if (e && typeof e.createElement == "function") try {
379
379
  let n = e.createElement("iframe");
380
- n.hidden = true, e.head.appendChild(n), n.contentWindow && n.contentWindow.fetch && (t = dn(n.contentWindow.fetch)), e.head.removeChild(n);
380
+ n.hidden = true, e.head.appendChild(n), n.contentWindow && n.contentWindow.fetch && (t = on(n.contentWindow.fetch)), e.head.removeChild(n);
381
381
  } catch (n) {
382
382
  (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", n);
383
383
  }
384
384
  return t;
385
385
  }
386
- var ve = D();
387
- function fn() {
388
- let t = ve.chrome, e = t && t.app && t.app.runtime, n = "history" in ve && !!ve.history.pushState && !!ve.history.replaceState;
386
+ var De = w();
387
+ function cn() {
388
+ let t = De.chrome, e = t && t.app && t.app.runtime, n = "history" in De && !!De.history.pushState && !!De.history.replaceState;
389
389
  return !e && n;
390
390
  }
391
- var y = D();
392
- var le = "__sentry_xhr_v2__";
393
- var fe = {};
394
- var pn = {};
395
- function Ir(t) {
396
- if (!pn[t]) switch (pn[t] = true, t) {
391
+ var y = w();
392
+ var de = "__sentry_xhr_v2__";
393
+ var le = {};
394
+ var un = {};
395
+ function Tr(t) {
396
+ if (!un[t]) switch (un[t] = true, t) {
397
397
  case "console":
398
- Ar();
398
+ br();
399
399
  break;
400
400
  case "dom":
401
- yn();
401
+ hn();
402
402
  break;
403
403
  case "xhr":
404
- En();
404
+ mn();
405
405
  break;
406
406
  case "fetch":
407
- Nr();
407
+ Rr();
408
408
  break;
409
409
  case "history":
410
- wr();
410
+ Ir();
411
411
  break;
412
412
  case "error":
413
- kr();
413
+ wr();
414
414
  break;
415
415
  case "unhandledrejection":
416
- Cr();
416
+ Dr();
417
417
  break;
418
418
  default:
419
419
  (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn("unknown instrumentation type:", t);
420
420
  return;
421
421
  }
422
422
  }
423
- function Ue(t, e) {
424
- fe[t] = fe[t] || [], fe[t].push(e), Ir(t);
423
+ function Pe(t, e) {
424
+ le[t] = le[t] || [], le[t].push(e), Tr(t);
425
425
  }
426
- function O(t, e) {
427
- if (!(!t || !fe[t])) for (let n of fe[t] || []) try {
426
+ function D(t, e) {
427
+ if (!(!t || !le[t])) for (let n of le[t] || []) try {
428
428
  n(e);
429
429
  } catch (r) {
430
430
  (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.error(`Error while triggering instrumentation handler.
431
431
  Type: ${t}
432
- Name: ${de(n)}
432
+ Name: ${ue(n)}
433
433
  Error:`, r);
434
434
  }
435
435
  }
436
- function Ar() {
437
- "console" in h && ce.forEach(function(t) {
438
- t in h.console && w(h.console, t, function(e) {
439
- return K[t] = e, function(...n) {
440
- O("console", { args: n, level: t });
441
- let r = K[t];
436
+ function br() {
437
+ "console" in h && ae.forEach(function(t) {
438
+ t in h.console && A(h.console, t, function(e) {
439
+ return J[t] = e, function(...n) {
440
+ D("console", { args: n, level: t });
441
+ let r = J[t];
442
442
  r && r.apply(h.console, n);
443
443
  };
444
444
  });
445
445
  });
446
446
  }
447
- function Nr() {
448
- ln() && w(h, "fetch", function(t) {
447
+ function Rr() {
448
+ an() && A(h, "fetch", function(t) {
449
449
  return function(...e) {
450
- let { method: n, url: r } = gn(e), s = { args: e, fetchData: { method: n, url: r }, startTimestamp: Date.now() };
451
- return O("fetch", { ...s }), t.apply(h, e).then((i) => (O("fetch", { ...s, endTimestamp: Date.now(), response: i }), i), (i) => {
452
- throw O("fetch", { ...s, endTimestamp: Date.now(), error: i }), i;
450
+ let { method: n, url: r } = pn(e), s = { args: e, fetchData: { method: n, url: r }, startTimestamp: Date.now() };
451
+ return D("fetch", { ...s }), t.apply(h, e).then((i) => (D("fetch", { ...s, endTimestamp: Date.now(), response: i }), i), (i) => {
452
+ throw D("fetch", { ...s, endTimestamp: Date.now(), error: i }), i;
453
453
  });
454
454
  };
455
455
  });
456
456
  }
457
- function mt(t, e) {
457
+ function pt(t, e) {
458
458
  return !!t && typeof t == "object" && !!t[e];
459
459
  }
460
- function mn(t) {
461
- return typeof t == "string" ? t : t ? mt(t, "url") ? t.url : t.toString ? t.toString() : "" : "";
460
+ function dn(t) {
461
+ return typeof t == "string" ? t : t ? pt(t, "url") ? t.url : t.toString ? t.toString() : "" : "";
462
462
  }
463
- function gn(t) {
463
+ function pn(t) {
464
464
  if (t.length === 0) return { method: "GET", url: "" };
465
465
  if (t.length === 2) {
466
466
  let [n, r] = t;
467
- return { url: mn(n), method: mt(r, "method") ? String(r.method).toUpperCase() : "GET" };
467
+ return { url: dn(n), method: pt(r, "method") ? String(r.method).toUpperCase() : "GET" };
468
468
  }
469
469
  let e = t[0];
470
- return { url: mn(e), method: mt(e, "method") ? String(e.method).toUpperCase() : "GET" };
470
+ return { url: dn(e), method: pt(e, "method") ? String(e.method).toUpperCase() : "GET" };
471
471
  }
472
- function En() {
472
+ function mn() {
473
473
  if (!y.XMLHttpRequest) return;
474
474
  let t = XMLHttpRequest.prototype;
475
- w(t, "open", function(e) {
475
+ A(t, "open", function(e) {
476
476
  return function(...n) {
477
- let r = Date.now(), s = n[1], i = this[le] = { method: J(n[0]) ? n[0].toUpperCase() : n[0], url: n[1], request_headers: {} };
478
- J(s) && i.method === "POST" && s.match(/sentry_key/) && (this.__sentry_own_request__ = true);
477
+ let r = Date.now(), s = n[1], i = this[de] = { method: V(n[0]) ? n[0].toUpperCase() : n[0], url: n[1], request_headers: {} };
478
+ V(s) && i.method === "POST" && s.match(/sentry_key/) && (this.__sentry_own_request__ = true);
479
479
  let o = () => {
480
- let a = this[le];
480
+ let a = this[de];
481
481
  if (a && this.readyState === 4) {
482
482
  try {
483
483
  a.status_code = this.status;
484
484
  } catch {
485
485
  }
486
- O("xhr", { args: n, endTimestamp: Date.now(), startTimestamp: r, xhr: this });
486
+ D("xhr", { args: n, endTimestamp: Date.now(), startTimestamp: r, xhr: this });
487
487
  }
488
488
  };
489
- return "onreadystatechange" in this && typeof this.onreadystatechange == "function" ? w(this, "onreadystatechange", function(a) {
489
+ return "onreadystatechange" in this && typeof this.onreadystatechange == "function" ? A(this, "onreadystatechange", function(a) {
490
490
  return function(...c) {
491
491
  return o(), a.apply(this, c);
492
492
  };
493
- }) : this.addEventListener("readystatechange", o), w(this, "setRequestHeader", function(a) {
493
+ }) : this.addEventListener("readystatechange", o), A(this, "setRequestHeader", function(a) {
494
494
  return function(...c) {
495
- let [u, l] = c, d = this[le];
495
+ let [u, l] = c, d = this[de];
496
496
  return d && (d.request_headers[u.toLowerCase()] = l), a.apply(this, c);
497
497
  };
498
498
  }), e.apply(this, n);
499
499
  };
500
- }), w(t, "send", function(e) {
500
+ }), A(t, "send", function(e) {
501
501
  return function(...n) {
502
- let r = this[le];
503
- return r && n[0] !== void 0 && (r.body = n[0]), O("xhr", { args: n, startTimestamp: Date.now(), xhr: this }), e.apply(this, n);
502
+ let r = this[de];
503
+ return r && n[0] !== void 0 && (r.body = n[0]), D("xhr", { args: n, startTimestamp: Date.now(), xhr: this }), e.apply(this, n);
504
504
  };
505
505
  });
506
506
  }
507
- var ke;
508
- function wr() {
509
- if (!fn()) return;
507
+ var Oe;
508
+ function Ir() {
509
+ if (!cn()) return;
510
510
  let t = y.onpopstate;
511
511
  y.onpopstate = function(...n) {
512
- let r = y.location.href, s = ke;
513
- if (ke = r, O("history", { from: s, to: r }), t) try {
512
+ let r = y.location.href, s = Oe;
513
+ if (Oe = r, D("history", { from: s, to: r }), t) try {
514
514
  return t.apply(this, n);
515
515
  } catch {
516
516
  }
@@ -519,18 +519,18 @@ function wr() {
519
519
  return function(...r) {
520
520
  let s = r.length > 2 ? r[2] : void 0;
521
521
  if (s) {
522
- let i = ke, o = String(s);
523
- ke = o, O("history", { from: i, to: o });
522
+ let i = Oe, o = String(s);
523
+ Oe = o, D("history", { from: i, to: o });
524
524
  }
525
525
  return n.apply(this, r);
526
526
  };
527
527
  }
528
- w(y.history, "pushState", e), w(y.history, "replaceState", e);
528
+ A(y.history, "pushState", e), A(y.history, "replaceState", e);
529
529
  }
530
- var Dr = 1e3;
531
- var hn;
532
- var Ce;
533
- function Or(t, e) {
530
+ var xr = 1e3;
531
+ var ln;
532
+ var ve;
533
+ function Ar(t, e) {
534
534
  if (t.type !== e.type) return false;
535
535
  try {
536
536
  if (t.target !== e.target) return false;
@@ -538,7 +538,7 @@ function Or(t, e) {
538
538
  }
539
539
  return true;
540
540
  }
541
- function vr(t) {
541
+ function Nr(t) {
542
542
  if (t.type !== "keypress") return false;
543
543
  try {
544
544
  let e = t.target;
@@ -548,27 +548,27 @@ function vr(t) {
548
548
  }
549
549
  return true;
550
550
  }
551
- function _n(t, e = false) {
551
+ function fn(t, e = false) {
552
552
  return (n) => {
553
- if (!n || n._sentryCaptured || vr(n)) return;
554
- X(n, "_sentryCaptured", true);
553
+ if (!n || n._sentryCaptured || Nr(n)) return;
554
+ K(n, "_sentryCaptured", true);
555
555
  let r = n.type === "keypress" ? "input" : n.type;
556
- (Ce === void 0 || !Or(Ce, n)) && (t({ event: n, name: r, global: e }), Ce = n), clearTimeout(hn), hn = y.setTimeout(() => {
557
- Ce = void 0;
558
- }, Dr);
556
+ (ve === void 0 || !Ar(ve, n)) && (t({ event: n, name: r, global: e }), ve = n), clearTimeout(ln), ln = y.setTimeout(() => {
557
+ ve = void 0;
558
+ }, xr);
559
559
  };
560
560
  }
561
- function yn() {
561
+ function hn() {
562
562
  if (!y.document) return;
563
- let t = O.bind(null, "dom"), e = _n(t, true);
563
+ let t = D.bind(null, "dom"), e = fn(t, true);
564
564
  y.document.addEventListener("click", e, false), y.document.addEventListener("keypress", e, false), ["EventTarget", "Node"].forEach((n) => {
565
565
  let r = y[n] && y[n].prototype;
566
- !r || !r.hasOwnProperty || !r.hasOwnProperty("addEventListener") || (w(r, "addEventListener", function(s) {
566
+ !r || !r.hasOwnProperty || !r.hasOwnProperty("addEventListener") || (A(r, "addEventListener", function(s) {
567
567
  return function(i, o, a) {
568
568
  if (i === "click" || i == "keypress") try {
569
569
  let c = this, u = c.__sentry_instrumentation_handlers__ = c.__sentry_instrumentation_handlers__ || {}, l = u[i] = u[i] || { refCount: 0 };
570
570
  if (!l.handler) {
571
- let d = _n(t);
571
+ let d = fn(t);
572
572
  l.handler = d, s.call(this, i, d, a);
573
573
  }
574
574
  l.refCount++;
@@ -576,7 +576,7 @@ function yn() {
576
576
  }
577
577
  return s.call(this, i, o, a);
578
578
  };
579
- }), w(r, "removeEventListener", function(s) {
579
+ }), A(r, "removeEventListener", function(s) {
580
580
  return function(i, o, a) {
581
581
  if (i === "click" || i == "keypress") try {
582
582
  let c = this, u = c.__sentry_instrumentation_handlers__ || {}, l = u[i];
@@ -588,28 +588,28 @@ function yn() {
588
588
  }));
589
589
  });
590
590
  }
591
- var Pe = null;
592
- function kr() {
593
- Pe = y.onerror, y.onerror = function(t, e, n, r, s) {
594
- return O("error", { column: r, error: s, line: n, msg: t, url: e }), Pe && !Pe.__SENTRY_LOADER__ ? Pe.apply(this, arguments) : false;
591
+ var ke = null;
592
+ function wr() {
593
+ ke = y.onerror, y.onerror = function(t, e, n, r, s) {
594
+ return D("error", { column: r, error: s, line: n, msg: t, url: e }), ke && !ke.__SENTRY_LOADER__ ? ke.apply(this, arguments) : false;
595
595
  }, y.onerror.__SENTRY_INSTRUMENTED__ = true;
596
596
  }
597
- var Me = null;
598
- function Cr() {
599
- Me = y.onunhandledrejection, y.onunhandledrejection = function(t) {
600
- return O("unhandledrejection", t), Me && !Me.__SENTRY_LOADER__ ? Me.apply(this, arguments) : true;
597
+ var Ce = null;
598
+ function Dr() {
599
+ Ce = y.onunhandledrejection, y.onunhandledrejection = function(t) {
600
+ return D("unhandledrejection", t), Ce && !Ce.__SENTRY_LOADER__ ? Ce.apply(this, arguments) : true;
601
601
  }, y.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;
602
602
  }
603
- function Sn() {
603
+ function _n() {
604
604
  return typeof __SENTRY_BROWSER_BUNDLE__ < "u" && !!__SENTRY_BROWSER_BUNDLE__;
605
605
  }
606
- function Tn() {
607
- return !Sn() && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]";
606
+ function gn() {
607
+ return !_n() && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]";
608
608
  }
609
- function bn(t, e) {
609
+ function En(t, e) {
610
610
  return t.require(e);
611
611
  }
612
- function xn() {
612
+ function yn() {
613
613
  let t = typeof WeakSet == "function", e = t ? /* @__PURE__ */ new WeakSet() : [];
614
614
  function n(s) {
615
615
  if (t) return e.has(s) ? true : (e.add(s), false);
@@ -634,15 +634,15 @@ function g() {
634
634
  }
635
635
  return ("10000000100040008000" + 1e11).replace(/[018]/g, (r) => (r ^ (n() & 15) >> r / 4).toString(16));
636
636
  }
637
- function Pr(t) {
637
+ function Or(t) {
638
638
  return t.exception && t.exception.values ? t.exception.values[0] : void 0;
639
639
  }
640
- function pe(t, e, n) {
640
+ function fe(t, e, n) {
641
641
  let r = t.exception = t.exception || {}, s = r.values = r.values || [], i = s[0] = s[0] || {};
642
642
  i.value || (i.value = e || ""), i.type || (i.type = n || "Error");
643
643
  }
644
- function me(t, e) {
645
- let n = Pr(t);
644
+ function pe(t, e) {
645
+ let n = Or(t);
646
646
  if (!n) return;
647
647
  let r = { type: "generic", handled: true }, s = n.mechanism;
648
648
  if (n.mechanism = { ...r, ...s, ...e }, e && "data" in e) {
@@ -650,32 +650,32 @@ function me(t, e) {
650
650
  n.mechanism.data = i;
651
651
  }
652
652
  }
653
- function Le(t) {
653
+ function Me(t) {
654
654
  if (t && t.__sentry_captured__) return true;
655
655
  try {
656
- X(t, "__sentry_captured__", true);
656
+ K(t, "__sentry_captured__", true);
657
657
  } catch {
658
658
  }
659
659
  return false;
660
660
  }
661
- function he(t) {
661
+ function me(t) {
662
662
  return Array.isArray(t) ? t : [t];
663
663
  }
664
- function v(t, e = 100, n = 1 / 0) {
664
+ function O(t, e = 100, n = 1 / 0) {
665
665
  try {
666
- return Be("", t, e, n);
666
+ return Ue("", t, e, n);
667
667
  } catch (r) {
668
668
  return { ERROR: `**non-serializable** (${r})` };
669
669
  }
670
670
  }
671
- function Z(t, e = 3, n = 100 * 1024) {
672
- let r = v(t, e);
673
- return Br(r) > n ? Z(t, e - 1, n) : r;
671
+ function X(t, e = 3, n = 100 * 1024) {
672
+ let r = O(t, e);
673
+ return Pr(r) > n ? X(t, e - 1, n) : r;
674
674
  }
675
- function Be(t, e, n = 1 / 0, r = 1 / 0, s = xn()) {
675
+ function Ue(t, e, n = 1 / 0, r = 1 / 0, s = yn()) {
676
676
  let [i, o] = s;
677
- if (e == null || ["number", "boolean", "string"].includes(typeof e) && !oe(e)) return e;
678
- let a = Mr(t, e);
677
+ if (e == null || ["number", "boolean", "string"].includes(typeof e) && !ie(e)) return e;
678
+ let a = vr(t, e);
679
679
  if (!a.startsWith("[object ")) return a;
680
680
  if (e.__sentry_skip_normalization__) return e;
681
681
  let c = typeof e.__sentry_override_normalization_depth__ == "number" ? e.__sentry_override_normalization_depth__ : n;
@@ -684,115 +684,80 @@ function Be(t, e, n = 1 / 0, r = 1 / 0, s = xn()) {
684
684
  let u = e;
685
685
  if (u && typeof u.toJSON == "function") try {
686
686
  let m = u.toJSON();
687
- return Be("", m, c - 1, r, s);
687
+ return Ue("", m, c - 1, r, s);
688
688
  } catch {
689
689
  }
690
- let l = Array.isArray(e) ? [] : {}, d = 0, p = De(e);
690
+ let l = Array.isArray(e) ? [] : {}, d = 0, p = Ne(e);
691
691
  for (let m in p) {
692
692
  if (!Object.prototype.hasOwnProperty.call(p, m)) continue;
693
693
  if (d >= r) {
694
694
  l[m] = "[MaxProperties ~]";
695
695
  break;
696
696
  }
697
- let I = p[m];
698
- l[m] = Be(m, I, c - 1, r, s), d++;
697
+ let k = p[m];
698
+ l[m] = Ue(m, k, c - 1, r, s), d++;
699
699
  }
700
700
  return o(e), l;
701
701
  }
702
- function Mr(t, e) {
702
+ function vr(t, e) {
703
703
  try {
704
704
  if (t === "domain" && e && typeof e == "object" && e._events) return "[Domain]";
705
705
  if (t === "domainEmitter") return "[DomainEmitter]";
706
706
  if (typeof global < "u" && e === global) return "[Global]";
707
707
  if (typeof window < "u" && e === window) return "[Window]";
708
708
  if (typeof document < "u" && e === document) return "[Document]";
709
- if (at(e)) return "[VueViewModel]";
710
- if (ot(e)) return "[SyntheticEvent]";
709
+ if (ot(e)) return "[VueViewModel]";
710
+ if (it(e)) return "[SyntheticEvent]";
711
711
  if (typeof e == "number" && e !== e) return "[NaN]";
712
- if (typeof e == "function") return `[Function: ${de(e)}]`;
712
+ if (typeof e == "function") return `[Function: ${ue(e)}]`;
713
713
  if (typeof e == "symbol") return `[${String(e)}]`;
714
714
  if (typeof e == "bigint") return `[BigInt: ${String(e)}]`;
715
- let n = Ur(e);
715
+ let n = kr(e);
716
716
  return /^HTML(\w*)Element$/.test(n) ? `[HTMLElement: ${n}]` : `[object ${n}]`;
717
717
  } catch (n) {
718
718
  return `**non-serializable** (${n})`;
719
719
  }
720
720
  }
721
- function Ur(t) {
721
+ function kr(t) {
722
722
  let e = Object.getPrototypeOf(t);
723
723
  return e ? e.constructor.name : "null prototype";
724
724
  }
725
- function Lr(t) {
725
+ function Cr(t) {
726
726
  return ~-encodeURI(t).split(/%..|./).length;
727
727
  }
728
- function Br(t) {
729
- return Lr(JSON.stringify(t));
730
- }
731
- function Gr(t, e) {
732
- let n = 0;
733
- for (let r = t.length - 1; r >= 0; r--) {
734
- let s = t[r];
735
- s === "." ? t.splice(r, 1) : s === ".." ? (t.splice(r, 1), n++) : n && (t.splice(r, 1), n--);
736
- }
737
- if (e) for (; n--; n) t.unshift("..");
738
- return t;
728
+ function Pr(t) {
729
+ return Cr(JSON.stringify(t));
739
730
  }
740
- var Fr = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;
741
- function $r(t) {
742
- let e = t.length > 1024 ? `<truncated>${t.slice(-1024)}` : t, n = Fr.exec(e);
731
+ var Mr = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;
732
+ function Ur(t) {
733
+ let e = t.length > 1024 ? `<truncated>${t.slice(-1024)}` : t, n = Mr.exec(e);
743
734
  return n ? n.slice(1) : [];
744
735
  }
745
- function ht(...t) {
746
- let e = "", n = false;
747
- for (let r = t.length - 1; r >= -1 && !n; r--) {
748
- let s = r >= 0 ? t[r] : "/";
749
- s && (e = `${s}/${e}`, n = s.charAt(0) === "/");
750
- }
751
- return e = Gr(e.split("/").filter((r) => !!r), !n).join("/"), (n ? "/" : "") + e || ".";
752
- }
753
- function Rn(t) {
754
- let e = 0;
755
- for (; e < t.length && t[e] === ""; e++) ;
756
- let n = t.length - 1;
757
- for (; n >= 0 && t[n] === ""; n--) ;
758
- return e > n ? [] : t.slice(e, n - e + 1);
759
- }
760
- function _t(t, e) {
761
- t = ht(t).slice(1), e = ht(e).slice(1);
762
- let n = Rn(t.split("/")), r = Rn(e.split("/")), s = Math.min(n.length, r.length), i = s;
763
- for (let a = 0; a < s; a++) if (n[a] !== r[a]) {
764
- i = a;
765
- break;
766
- }
767
- let o = [];
768
- for (let a = i; a < n.length; a++) o.push("..");
769
- return o = o.concat(r.slice(i)), o.join("/");
770
- }
771
- function _e(t, e) {
772
- let n = $r(t)[2];
736
+ function mt(t, e) {
737
+ let n = Ur(t)[2];
773
738
  return e && n.slice(e.length * -1) === e && (n = n.slice(0, n.length - e.length)), n;
774
739
  }
775
- var M;
740
+ var P;
776
741
  (function(t) {
777
742
  t[t.PENDING = 0] = "PENDING";
778
743
  let n = 1;
779
744
  t[t.RESOLVED = n] = "RESOLVED";
780
745
  let r = 2;
781
746
  t[t.REJECTED = r] = "REJECTED";
782
- })(M || (M = {}));
747
+ })(P || (P = {}));
783
748
  function b(t) {
784
749
  return new S((e) => {
785
750
  e(t);
786
751
  });
787
752
  }
788
- function j(t) {
753
+ function Y(t) {
789
754
  return new S((e, n) => {
790
755
  n(t);
791
756
  });
792
757
  }
793
758
  var S = class {
794
759
  constructor(e) {
795
- S.prototype.__init.call(this), S.prototype.__init2.call(this), S.prototype.__init3.call(this), S.prototype.__init4.call(this), this._state = M.PENDING, this._handlers = [];
760
+ S.prototype.__init.call(this), S.prototype.__init2.call(this), S.prototype.__init3.call(this), S.prototype.__init4.call(this), this._state = P.PENDING, this._handlers = [];
796
761
  try {
797
762
  e(this._resolve, this._reject);
798
763
  } catch (n) {
@@ -839,18 +804,18 @@ var S = class {
839
804
  }
840
805
  __init() {
841
806
  this._resolve = (e) => {
842
- this._setResult(M.RESOLVED, e);
807
+ this._setResult(P.RESOLVED, e);
843
808
  };
844
809
  }
845
810
  __init2() {
846
811
  this._reject = (e) => {
847
- this._setResult(M.REJECTED, e);
812
+ this._setResult(P.REJECTED, e);
848
813
  };
849
814
  }
850
815
  __init3() {
851
816
  this._setResult = (e, n) => {
852
- if (this._state === M.PENDING) {
853
- if (Y(n)) {
817
+ if (this._state === P.PENDING) {
818
+ if (H(n)) {
854
819
  n.then(this._resolve, this._reject);
855
820
  return;
856
821
  }
@@ -860,15 +825,15 @@ var S = class {
860
825
  }
861
826
  __init4() {
862
827
  this._executeHandlers = () => {
863
- if (this._state === M.PENDING) return;
828
+ if (this._state === P.PENDING) return;
864
829
  let e = this._handlers.slice();
865
830
  this._handlers = [], e.forEach((n) => {
866
- n[0] || (this._state === M.RESOLVED && n[1](this._value), this._state === M.REJECTED && n[2](this._value), n[0] = true);
831
+ n[0] || (this._state === P.RESOLVED && n[1](this._value), this._state === P.REJECTED && n[2](this._value), n[0] = true);
867
832
  });
868
833
  };
869
834
  }
870
835
  };
871
- function gt(t) {
836
+ function ht(t) {
872
837
  let e = [];
873
838
  function n() {
874
839
  return t === void 0 || e.length < t;
@@ -877,7 +842,7 @@ function gt(t) {
877
842
  return e.splice(e.indexOf(o), 1)[0];
878
843
  }
879
844
  function s(o) {
880
- if (!n()) return j(new T("Not adding Promise because buffer limit was reached."));
845
+ if (!n()) return Y(new T("Not adding Promise because buffer limit was reached."));
881
846
  let a = o();
882
847
  return e.indexOf(a) === -1 && e.push(a), a.then(() => r(a)).then(null, () => r(a).then(null, () => {
883
848
  })), a;
@@ -898,48 +863,48 @@ function gt(t) {
898
863
  }
899
864
  return { $: e, add: s, drain: i };
900
865
  }
901
- var An = D();
902
- var yt = { nowSeconds: () => Date.now() / 1e3 };
903
- function Hr() {
904
- let { performance: t } = An;
866
+ var Tn = w();
867
+ var gt = { nowSeconds: () => Date.now() / 1e3 };
868
+ function Lr() {
869
+ let { performance: t } = Tn;
905
870
  if (!t || !t.now) return;
906
871
  let e = Date.now() - t.now();
907
872
  return { now: () => t.now(), timeOrigin: e };
908
873
  }
909
- function Yr() {
874
+ function Br() {
910
875
  try {
911
- return bn(module, "perf_hooks").performance;
876
+ return En(module, "perf_hooks").performance;
912
877
  } catch {
913
878
  return;
914
879
  }
915
880
  }
916
- var Et = Tn() ? Yr() : Hr();
917
- var In = Et === void 0 ? yt : { nowSeconds: () => (Et.timeOrigin + Et.now()) / 1e3 };
918
- var q = yt.nowSeconds.bind(yt);
919
- var W = In.nowSeconds.bind(In);
920
- var ge;
921
- var jr = (() => {
922
- let { performance: t } = An;
881
+ var _t = gn() ? Br() : Lr();
882
+ var Sn = _t === void 0 ? gt : { nowSeconds: () => (_t.timeOrigin + _t.now()) / 1e3 };
883
+ var j = gt.nowSeconds.bind(gt);
884
+ var q = Sn.nowSeconds.bind(Sn);
885
+ var he;
886
+ var Gr = (() => {
887
+ let { performance: t } = Tn;
923
888
  if (!t || !t.now) {
924
- ge = "none";
889
+ he = "none";
925
890
  return;
926
891
  }
927
892
  let e = 3600 * 1e3, n = t.now(), r = Date.now(), s = t.timeOrigin ? Math.abs(t.timeOrigin + n - r) : e, i = s < e, o = t.timing && t.timing.navigationStart, c = typeof o == "number" ? Math.abs(o + n - r) : e, u = c < e;
928
- return i || u ? s <= c ? (ge = "timeOrigin", t.timeOrigin) : (ge = "navigationStart", o) : (ge = "dateNow", r);
893
+ return i || u ? s <= c ? (he = "timeOrigin", t.timeOrigin) : (he = "navigationStart", o) : (he = "dateNow", r);
929
894
  })();
930
- var qr = new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");
931
- function St(t = g(), e = g().substring(16), n) {
895
+ var Fr = new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");
896
+ function Et(t = g(), e = g().substring(16), n) {
932
897
  let r = "";
933
898
  return n !== void 0 && (r = n ? "-1" : "-0"), `${t}-${e}${r}`;
934
899
  }
935
- function G(t, e = []) {
900
+ function B(t, e = []) {
936
901
  return [t, e];
937
902
  }
938
- function bt(t, e) {
903
+ function St(t, e) {
939
904
  let [n, r] = t;
940
905
  return [n, [...r, e]];
941
906
  }
942
- function Ge(t, e) {
907
+ function Le(t, e) {
943
908
  let n = t[1];
944
909
  for (let r of n) {
945
910
  let s = r[0].type;
@@ -947,13 +912,13 @@ function Ge(t, e) {
947
912
  }
948
913
  return false;
949
914
  }
950
- function Tt(t, e) {
915
+ function yt(t, e) {
951
916
  return (e || new TextEncoder()).encode(t);
952
917
  }
953
- function xt(t, e) {
918
+ function Tt(t, e) {
954
919
  let [n, r] = t, s = JSON.stringify(n);
955
920
  function i(o) {
956
- typeof s == "string" ? s = typeof o == "string" ? s + o : [Tt(s, e), o] : s.push(typeof o == "string" ? Tt(o, e) : o);
921
+ typeof s == "string" ? s = typeof o == "string" ? s + o : [yt(s, e), o] : s.push(typeof o == "string" ? yt(o, e) : o);
957
922
  }
958
923
  for (let o of r) {
959
924
  let [a, c] = o;
@@ -965,156 +930,117 @@ ${JSON.stringify(a)}
965
930
  try {
966
931
  u = JSON.stringify(c);
967
932
  } catch {
968
- u = JSON.stringify(v(c));
933
+ u = JSON.stringify(O(c));
969
934
  }
970
935
  i(u);
971
936
  }
972
937
  }
973
- return typeof s == "string" ? s : Wr(s);
938
+ return typeof s == "string" ? s : $r(s);
974
939
  }
975
- function Wr(t) {
940
+ function $r(t) {
976
941
  let e = t.reduce((s, i) => s + i.length, 0), n = new Uint8Array(e), r = 0;
977
942
  for (let s of t) n.set(s, r), r += s.length;
978
943
  return n;
979
944
  }
980
- function Rt(t, e) {
981
- let n = typeof t.data == "string" ? Tt(t.data, e) : t.data;
945
+ function bt(t, e) {
946
+ let n = typeof t.data == "string" ? yt(t.data, e) : t.data;
982
947
  return [E({ type: "attachment", length: n.length, filename: t.filename, content_type: t.contentType, attachment_type: t.attachmentType }), n];
983
948
  }
984
- var zr = { session: "session", sessions: "session", attachment: "attachment", transaction: "transaction", event: "error", client_report: "internal", user_report: "default", profile: "profile", replay_event: "replay", replay_recording: "replay", check_in: "monitor", statsd: "unknown" };
985
- function Fe(t) {
986
- return zr[t];
949
+ var Hr = { session: "session", sessions: "session", attachment: "attachment", transaction: "transaction", event: "error", client_report: "internal", user_report: "default", profile: "profile", replay_event: "replay", replay_recording: "replay", check_in: "monitor", statsd: "unknown" };
950
+ function Be(t) {
951
+ return Hr[t];
987
952
  }
988
- function $e(t) {
953
+ function Ge(t) {
989
954
  if (!t || !t.sdk) return;
990
955
  let { name: e, version: n } = t.sdk;
991
956
  return { name: e, version: n };
992
957
  }
993
- function It(t, e, n, r) {
958
+ function Rt(t, e, n, r) {
994
959
  let s = t.sdkProcessingMetadata && t.sdkProcessingMetadata.dynamicSamplingContext;
995
- return { event_id: t.event_id, sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...e && { sdk: e }, ...!!n && r && { dsn: B(r) }, ...s && { trace: E({ ...s }) } };
960
+ return { event_id: t.event_id, sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...e && { sdk: e }, ...!!n && r && { dsn: L(r) }, ...s && { trace: E({ ...s }) } };
996
961
  }
997
- function Nn(t, e = Date.now()) {
962
+ function bn(t, e = Date.now()) {
998
963
  let n = parseInt(`${t}`, 10);
999
964
  if (!isNaN(n)) return n * 1e3;
1000
965
  let r = Date.parse(`${t}`);
1001
966
  return isNaN(r) ? 6e4 : r - e;
1002
967
  }
1003
- function wn(t, e) {
968
+ function Rn(t, e) {
1004
969
  return t[e] || t.all || 0;
1005
970
  }
1006
- function At(t, e, n = Date.now()) {
1007
- return wn(t, e) > n;
971
+ function It(t, e, n = Date.now()) {
972
+ return Rn(t, e) > n;
1008
973
  }
1009
- function Nt(t, { statusCode: e, headers: n }, r = Date.now()) {
974
+ function xt(t, { statusCode: e, headers: n }, r = Date.now()) {
1010
975
  let s = { ...t }, i = n && n["x-sentry-rate-limits"], o = n && n["retry-after"];
1011
976
  if (i) for (let a of i.trim().split(",")) {
1012
977
  let [c, u] = a.split(":", 2), l = parseInt(c, 10), d = (isNaN(l) ? 60 : l) * 1e3;
1013
978
  if (!u) s.all = r + d;
1014
979
  else for (let p of u.split(";")) s[p] = r + d;
1015
980
  }
1016
- else o ? s.all = r + Nn(o, r) : e === 429 && (s.all = r + 60 * 1e3);
981
+ else o ? s.all = r + bn(o, r) : e === 429 && (s.all = r + 60 * 1e3);
1017
982
  return s;
1018
983
  }
1019
- function wt(t, e) {
984
+ function At(t, e) {
1020
985
  return t(e.stack || "", 1);
1021
986
  }
1022
- function Dn(t, e) {
1023
- let n = { type: e.name || e.constructor.name, value: e.message }, r = wt(t, e);
987
+ function In(t, e) {
988
+ let n = { type: e.name || e.constructor.name, value: e.message }, r = At(t, e);
1024
989
  return r.length && (n.stacktrace = { frames: r }), n;
1025
990
  }
1026
- function Vr(t) {
991
+ function Yr(t) {
1027
992
  if ("name" in t && typeof t.name == "string") {
1028
993
  let e = `'${t.name}' captured as exception`;
1029
994
  return "message" in t && typeof t.message == "string" && (e += ` with message '${t.message}'`), e;
1030
- } else return "message" in t && typeof t.message == "string" ? t.message : `Object captured as exception with keys: ${ue(t)}`;
995
+ } else return "message" in t && typeof t.message == "string" ? t.message : `Object captured as exception with keys: ${ce(t)}`;
1031
996
  }
1032
- function Dt(t, e, n, r) {
997
+ function Nt(t, e, n, r) {
1033
998
  let s = n, o = r && r.data && r.data.mechanism || { handled: true, type: "generic" };
1034
- if (!H(n)) {
1035
- if (N(n)) {
999
+ if (!$(n)) {
1000
+ if (x(n)) {
1036
1001
  let c = t(), u = c.getClient(), l = u && u.getOptions().normalizeDepth;
1037
1002
  c.configureScope((p) => {
1038
- p.setExtra("__serialized__", Z(n, l));
1003
+ p.setExtra("__serialized__", X(n, l));
1039
1004
  });
1040
- let d = Vr(n);
1005
+ let d = Yr(n);
1041
1006
  s = r && r.syntheticException || new Error(d), s.message = d;
1042
1007
  } else s = r && r.syntheticException || new Error(n), s.message = n;
1043
1008
  o.synthetic = true;
1044
1009
  }
1045
- let a = { exception: { values: [Dn(e, s)] } };
1046
- return pe(a, void 0, void 0), me(a, o), { ...a, event_id: r && r.event_id };
1010
+ let a = { exception: { values: [In(e, s)] } };
1011
+ return fe(a, void 0, void 0), pe(a, o), { ...a, event_id: r && r.event_id };
1047
1012
  }
1048
- function Ot(t, e, n = "info", r, s) {
1013
+ function wt(t, e, n = "info", r, s) {
1049
1014
  let i = { event_id: r && r.event_id, level: n, message: e };
1050
1015
  if (s && r && r.syntheticException) {
1051
- let o = wt(t, r.syntheticException);
1016
+ let o = At(t, r.syntheticException);
1052
1017
  o.length && (i.exception = { values: [{ value: e, stacktrace: { frames: o } }] });
1053
1018
  }
1054
1019
  return i;
1055
1020
  }
1056
- var C = class {
1057
- static __initStatic() {
1058
- this.id = "RewriteFrames";
1059
- }
1060
- constructor(e = {}) {
1061
- C.prototype.__init.call(this), this.name = C.id, e.root && (this._root = e.root), this._prefix = e.prefix || "app:///", e.iteratee && (this._iteratee = e.iteratee);
1062
- }
1063
- setupOnce(e, n) {
1064
- }
1065
- processEvent(e) {
1066
- return this.process(e);
1067
- }
1068
- process(e) {
1069
- let n = e;
1070
- return e.exception && Array.isArray(e.exception.values) && (n = this._processExceptionsEvent(n)), n;
1071
- }
1072
- __init() {
1073
- this._iteratee = (e) => {
1074
- if (!e.filename) return e;
1075
- let n = /^[a-zA-Z]:\\/.test(e.filename) || e.filename.includes("\\") && !e.filename.includes("/"), r = /^\//.test(e.filename);
1076
- if (n || r) {
1077
- let s = n ? e.filename.replace(/^[a-zA-Z]:/, "").replace(/\\/g, "/") : e.filename, i = this._root ? _t(this._root, s) : _e(s);
1078
- e.filename = `${this._prefix}${i}`;
1079
- }
1080
- return e;
1081
- };
1082
- }
1083
- _processExceptionsEvent(e) {
1084
- try {
1085
- return { ...e, exception: { ...e.exception, values: e.exception.values.map((n) => ({ ...n, ...n.stacktrace && { stacktrace: this._processStacktrace(n.stacktrace) } })) } };
1086
- } catch {
1087
- return e;
1088
- }
1089
- }
1090
- _processStacktrace(e) {
1091
- return { ...e, frames: e && e.frames && e.frames.map((n) => this._iteratee(n)) };
1092
- }
1093
- };
1094
- C.__initStatic();
1095
- var Q = "production";
1096
- function Ee() {
1097
- return ae("globalEventProcessors", () => []);
1021
+ var Z = "production";
1022
+ function _e() {
1023
+ return oe("globalEventProcessors", () => []);
1098
1024
  }
1099
- function On(t) {
1100
- Ee().push(t);
1025
+ function xn(t) {
1026
+ _e().push(t);
1101
1027
  }
1102
- function ee(t, e, n, r = 0) {
1028
+ function Q(t, e, n, r = 0) {
1103
1029
  return new S((s, i) => {
1104
1030
  let o = t[r];
1105
1031
  if (e === null || typeof o != "function") s(e);
1106
1032
  else {
1107
1033
  let a = o({ ...e }, n);
1108
- (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && o.id && a === null && f.log(`Event processor "${o.id}" dropped event`), Y(a) ? a.then((c) => ee(t, c, n, r + 1).then(s)).then(null, i) : ee(t, a, n, r + 1).then(s).then(null, i);
1034
+ (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && o.id && a === null && f.log(`Event processor "${o.id}" dropped event`), H(a) ? a.then((c) => Q(t, c, n, r + 1).then(s)).then(null, i) : Q(t, a, n, r + 1).then(s).then(null, i);
1109
1035
  }
1110
1036
  });
1111
1037
  }
1112
- function vn(t) {
1113
- let e = W(), n = { sid: g(), init: true, timestamp: e, started: e, duration: 0, status: "ok", errors: 0, ignoreDuration: false, toJSON: () => Jr(n) };
1114
- return t && U(n, t), n;
1038
+ function An(t) {
1039
+ let e = q(), n = { sid: g(), init: true, timestamp: e, started: e, duration: 0, status: "ok", errors: 0, ignoreDuration: false, toJSON: () => jr(n) };
1040
+ return t && M(n, t), n;
1115
1041
  }
1116
- function U(t, e = {}) {
1117
- if (e.user && (!t.ipAddress && e.user.ip_address && (t.ipAddress = e.user.ip_address), !t.did && !e.did && (t.did = e.user.id || e.user.email || e.user.username)), t.timestamp = e.timestamp || W(), e.abnormal_mechanism && (t.abnormal_mechanism = e.abnormal_mechanism), e.ignoreDuration && (t.ignoreDuration = e.ignoreDuration), e.sid && (t.sid = e.sid.length === 32 ? e.sid : g()), e.init !== void 0 && (t.init = e.init), !t.did && e.did && (t.did = `${e.did}`), typeof e.started == "number" && (t.started = e.started), t.ignoreDuration) t.duration = void 0;
1042
+ function M(t, e = {}) {
1043
+ if (e.user && (!t.ipAddress && e.user.ip_address && (t.ipAddress = e.user.ip_address), !t.did && !e.did && (t.did = e.user.id || e.user.email || e.user.username)), t.timestamp = e.timestamp || q(), e.abnormal_mechanism && (t.abnormal_mechanism = e.abnormal_mechanism), e.ignoreDuration && (t.ignoreDuration = e.ignoreDuration), e.sid && (t.sid = e.sid.length === 32 ? e.sid : g()), e.init !== void 0 && (t.init = e.init), !t.did && e.did && (t.did = `${e.did}`), typeof e.started == "number" && (t.started = e.started), t.ignoreDuration) t.duration = void 0;
1118
1044
  else if (typeof e.duration == "number") t.duration = e.duration;
1119
1045
  else {
1120
1046
  let n = t.timestamp - t.started;
@@ -1122,20 +1048,20 @@ function U(t, e = {}) {
1122
1048
  }
1123
1049
  e.release && (t.release = e.release), e.environment && (t.environment = e.environment), !t.ipAddress && e.ipAddress && (t.ipAddress = e.ipAddress), !t.userAgent && e.userAgent && (t.userAgent = e.userAgent), typeof e.errors == "number" && (t.errors = e.errors), e.status && (t.status = e.status);
1124
1050
  }
1125
- function kn(t, e) {
1051
+ function Nn(t, e) {
1126
1052
  let n = {};
1127
- e ? n = { status: e } : t.status === "ok" && (n = { status: "exited" }), U(t, n);
1053
+ e ? n = { status: e } : t.status === "ok" && (n = { status: "exited" }), M(t, n);
1128
1054
  }
1129
- function Jr(t) {
1055
+ function jr(t) {
1130
1056
  return E({ sid: `${t.sid}`, init: t.init, started: new Date(t.started * 1e3).toISOString(), timestamp: new Date(t.timestamp * 1e3).toISOString(), status: t.status, errors: t.errors, did: typeof t.did == "number" || typeof t.did == "string" ? `${t.did}` : void 0, duration: t.duration, abnormal_mechanism: t.abnormal_mechanism, attrs: { release: t.release, environment: t.environment, ip_address: t.ipAddress, user_agent: t.userAgent } });
1131
1057
  }
1132
- var Kr = 100;
1133
- var k = class {
1058
+ var qr = 100;
1059
+ var v = class {
1134
1060
  constructor() {
1135
- this._notifyingListeners = false, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = Cn();
1061
+ this._notifyingListeners = false, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = wn();
1136
1062
  }
1137
1063
  static clone(e) {
1138
- let n = new k();
1064
+ let n = new v();
1139
1065
  return e && (n._breadcrumbs = [...e._breadcrumbs], n._tags = { ...e._tags }, n._extra = { ...e._extra }, n._contexts = { ...e._contexts }, n._user = e._user, n._level = e._level, n._span = e._span, n._session = e._session, n._transactionName = e._transactionName, n._fingerprint = e._fingerprint, n._eventProcessors = [...e._eventProcessors], n._requestSession = e._requestSession, n._attachments = [...e._attachments], n._sdkProcessingMetadata = { ...e._sdkProcessingMetadata }, n._propagationContext = { ...e._propagationContext }), n;
1140
1066
  }
1141
1067
  addScopeListener(e) {
@@ -1145,7 +1071,7 @@ var k = class {
1145
1071
  return this._eventProcessors.push(e), this;
1146
1072
  }
1147
1073
  setUser(e) {
1148
- return this._user = e || {}, this._session && U(this._session, { user: e }), this._notifyScopeListeners(), this;
1074
+ return this._user = e || {}, this._session && M(this._session, { user: e }), this._notifyScopeListeners(), this;
1149
1075
  }
1150
1076
  getUser() {
1151
1077
  return this._user;
@@ -1200,17 +1126,17 @@ var k = class {
1200
1126
  if (!e) return this;
1201
1127
  if (typeof e == "function") {
1202
1128
  let n = e(this);
1203
- return n instanceof k ? n : this;
1129
+ return n instanceof v ? n : this;
1204
1130
  }
1205
- return e instanceof k ? (this._tags = { ...this._tags, ...e._tags }, this._extra = { ...this._extra, ...e._extra }, this._contexts = { ...this._contexts, ...e._contexts }, e._user && Object.keys(e._user).length && (this._user = e._user), e._level && (this._level = e._level), e._fingerprint && (this._fingerprint = e._fingerprint), e._requestSession && (this._requestSession = e._requestSession), e._propagationContext && (this._propagationContext = e._propagationContext)) : N(e) && (e = e, this._tags = { ...this._tags, ...e.tags }, this._extra = { ...this._extra, ...e.extra }, this._contexts = { ...this._contexts, ...e.contexts }, e.user && (this._user = e.user), e.level && (this._level = e.level), e.fingerprint && (this._fingerprint = e.fingerprint), e.requestSession && (this._requestSession = e.requestSession), e.propagationContext && (this._propagationContext = e.propagationContext)), this;
1131
+ return e instanceof v ? (this._tags = { ...this._tags, ...e._tags }, this._extra = { ...this._extra, ...e._extra }, this._contexts = { ...this._contexts, ...e._contexts }, e._user && Object.keys(e._user).length && (this._user = e._user), e._level && (this._level = e._level), e._fingerprint && (this._fingerprint = e._fingerprint), e._requestSession && (this._requestSession = e._requestSession), e._propagationContext && (this._propagationContext = e._propagationContext)) : x(e) && (e = e, this._tags = { ...this._tags, ...e.tags }, this._extra = { ...this._extra, ...e.extra }, this._contexts = { ...this._contexts, ...e.contexts }, e.user && (this._user = e.user), e.level && (this._level = e.level), e.fingerprint && (this._fingerprint = e.fingerprint), e.requestSession && (this._requestSession = e.requestSession), e.propagationContext && (this._propagationContext = e.propagationContext)), this;
1206
1132
  }
1207
1133
  clear() {
1208
- return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._span = void 0, this._session = void 0, this._notifyScopeListeners(), this._attachments = [], this._propagationContext = Cn(), this;
1134
+ return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._span = void 0, this._session = void 0, this._notifyScopeListeners(), this._attachments = [], this._propagationContext = wn(), this;
1209
1135
  }
1210
1136
  addBreadcrumb(e, n) {
1211
- let r = typeof n == "number" ? n : Kr;
1137
+ let r = typeof n == "number" ? n : qr;
1212
1138
  if (r <= 0) return this;
1213
- let s = { timestamp: q(), ...e }, i = this._breadcrumbs;
1139
+ let s = { timestamp: j(), ...e }, i = this._breadcrumbs;
1214
1140
  return i.push(s), this._breadcrumbs = i.length > r ? i.slice(-r) : i, this._notifyScopeListeners(), this;
1215
1141
  }
1216
1142
  getLastBreadcrumb() {
@@ -1240,7 +1166,7 @@ var k = class {
1240
1166
  }
1241
1167
  this._applyFingerprint(e);
1242
1168
  let s = this._getBreadcrumbs(), i = [...e.breadcrumbs || [], ...s];
1243
- return e.breadcrumbs = i.length > 0 ? i : void 0, e.sdkProcessingMetadata = { ...e.sdkProcessingMetadata, ...this._sdkProcessingMetadata, propagationContext: this._propagationContext }, ee([...r || [], ...Ee(), ...this._eventProcessors], e, n);
1169
+ return e.breadcrumbs = i.length > 0 ? i : void 0, e.sdkProcessingMetadata = { ...e.sdkProcessingMetadata, ...this._sdkProcessingMetadata, propagationContext: this._propagationContext }, Q([...r || [], ..._e(), ...this._eventProcessors], e, n);
1244
1170
  }
1245
1171
  setSDKProcessingMetadata(e) {
1246
1172
  return this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...e }, this;
@@ -1260,16 +1186,16 @@ var k = class {
1260
1186
  }), this._notifyingListeners = false);
1261
1187
  }
1262
1188
  _applyFingerprint(e) {
1263
- e.fingerprint = e.fingerprint ? he(e.fingerprint) : [], this._fingerprint && (e.fingerprint = e.fingerprint.concat(this._fingerprint)), e.fingerprint && !e.fingerprint.length && delete e.fingerprint;
1189
+ e.fingerprint = e.fingerprint ? me(e.fingerprint) : [], this._fingerprint && (e.fingerprint = e.fingerprint.concat(this._fingerprint)), e.fingerprint && !e.fingerprint.length && delete e.fingerprint;
1264
1190
  }
1265
1191
  };
1266
- function Cn() {
1192
+ function wn() {
1267
1193
  return { traceId: g(), spanId: g().substring(16) };
1268
1194
  }
1269
- var Pn = 4;
1270
- var Xr = 100;
1271
- var z = class {
1272
- constructor(e, n = new k(), r = Pn) {
1195
+ var Dn = 4;
1196
+ var Wr = 100;
1197
+ var W = class {
1198
+ constructor(e, n = new v(), r = Dn) {
1273
1199
  this._version = r, this._stack = [{ scope: n }], e && this.bindClient(e);
1274
1200
  }
1275
1201
  isOlderThan(e) {
@@ -1280,7 +1206,7 @@ var z = class {
1280
1206
  n.client = e, e && e.setupIntegrations && e.setupIntegrations();
1281
1207
  }
1282
1208
  pushScope() {
1283
- let e = k.clone(this.getScope());
1209
+ let e = v.clone(this.getScope());
1284
1210
  return this.getStack().push({ client: this.getClient(), scope: e }), e;
1285
1211
  }
1286
1212
  popScope() {
@@ -1330,9 +1256,9 @@ var z = class {
1330
1256
  addBreadcrumb(e, n) {
1331
1257
  let { scope: r, client: s } = this.getStackTop();
1332
1258
  if (!s) return;
1333
- let { beforeBreadcrumb: i = null, maxBreadcrumbs: o = Xr } = s.getOptions && s.getOptions() || {};
1259
+ let { beforeBreadcrumb: i = null, maxBreadcrumbs: o = Wr } = s.getOptions && s.getOptions() || {};
1334
1260
  if (o <= 0) return;
1335
- let c = { timestamp: q(), ...e }, u = i ? Ne(() => i(c, n)) : c;
1261
+ let c = { timestamp: j(), ...e }, u = i ? xe(() => i(c, n)) : c;
1336
1262
  u !== null && (s.emit && s.emit("beforeAddBreadcrumb", u, n), r.addBreadcrumb(u, o));
1337
1263
  }
1338
1264
  setUser(e) {
@@ -1358,11 +1284,11 @@ var z = class {
1358
1284
  r && e(n);
1359
1285
  }
1360
1286
  run(e) {
1361
- let n = vt(this);
1287
+ let n = Dt(this);
1362
1288
  try {
1363
1289
  e(this);
1364
1290
  } finally {
1365
- vt(n);
1291
+ Dt(n);
1366
1292
  }
1367
1293
  }
1368
1294
  getIntegration(e) {
@@ -1394,11 +1320,11 @@ Sentry.init({...});
1394
1320
  }
1395
1321
  endSession() {
1396
1322
  let n = this.getStackTop().scope, r = n.getSession();
1397
- r && kn(r), this._sendSessionUpdate(), n.setSession();
1323
+ r && Nn(r), this._sendSessionUpdate(), n.setSession();
1398
1324
  }
1399
1325
  startSession(e) {
1400
- let { scope: n, client: r } = this.getStackTop(), { release: s, environment: i = Q } = r && r.getOptions() || {}, { userAgent: o } = h.navigator || {}, a = vn({ release: s, environment: i, user: n.getUser(), ...o && { userAgent: o }, ...e }), c = n.getSession && n.getSession();
1401
- return c && c.status === "ok" && U(c, { status: "exited" }), this.endSession(), n.setSession(a), a;
1326
+ let { scope: n, client: r } = this.getStackTop(), { release: s, environment: i = Z } = r && r.getOptions() || {}, { userAgent: o } = h.navigator || {}, a = An({ release: s, environment: i, user: n.getUser(), ...o && { userAgent: o }, ...e }), c = n.getSession && n.getSession();
1327
+ return c && c.status === "ok" && M(c, { status: "exited" }), this.endSession(), n.setSession(a), a;
1402
1328
  }
1403
1329
  shouldSendDefaultPii() {
1404
1330
  let e = this.getClient(), n = e && e.getOptions();
@@ -1413,56 +1339,56 @@ Sentry.init({...});
1413
1339
  r && e(r, n);
1414
1340
  }
1415
1341
  _callExtensionMethod(e, ...n) {
1416
- let s = V().__SENTRY__;
1342
+ let s = z().__SENTRY__;
1417
1343
  if (s && s.extensions && typeof s.extensions[e] == "function") return s.extensions[e].apply(this, n);
1418
1344
  (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn(`Extension method ${e} couldn't be found, doing nothing.`);
1419
1345
  }
1420
1346
  };
1421
- function V() {
1347
+ function z() {
1422
1348
  return h.__SENTRY__ = h.__SENTRY__ || { extensions: {}, hub: void 0 }, h;
1423
1349
  }
1424
- function vt(t) {
1425
- let e = V(), n = He(e);
1426
- return kt(e, t), n;
1350
+ function Dt(t) {
1351
+ let e = z(), n = Fe(e);
1352
+ return Ot(e, t), n;
1427
1353
  }
1428
- function x() {
1429
- let t = V();
1354
+ function R() {
1355
+ let t = z();
1430
1356
  if (t.__SENTRY__ && t.__SENTRY__.acs) {
1431
1357
  let e = t.__SENTRY__.acs.getCurrentHub();
1432
1358
  if (e) return e;
1433
1359
  }
1434
- return Zr(t);
1360
+ return zr(t);
1435
1361
  }
1436
- function Zr(t = V()) {
1437
- return (!Qr(t) || He(t).isOlderThan(Pn)) && kt(t, new z()), He(t);
1362
+ function zr(t = z()) {
1363
+ return (!Vr(t) || Fe(t).isOlderThan(Dn)) && Ot(t, new W()), Fe(t);
1438
1364
  }
1439
- function Qr(t) {
1365
+ function Vr(t) {
1440
1366
  return !!(t && t.__SENTRY__ && t.__SENTRY__.hub);
1441
1367
  }
1442
- function He(t) {
1443
- return ae("hub", () => new z(), t);
1368
+ function Fe(t) {
1369
+ return oe("hub", () => new W(), t);
1444
1370
  }
1445
- function kt(t, e) {
1371
+ function Ot(t, e) {
1446
1372
  if (!t) return false;
1447
1373
  let n = t.__SENTRY__ = t.__SENTRY__ || {};
1448
1374
  return n.hub = e, true;
1449
1375
  }
1450
- function Mn(t) {
1451
- return (t || x()).getScope().getTransaction();
1376
+ function On(t) {
1377
+ return (t || R()).getScope().getTransaction();
1452
1378
  }
1453
- var Un = false;
1454
- function Ln() {
1455
- Un || (Un = true, Ue("error", Ct), Ue("unhandledrejection", Ct));
1379
+ var vn = false;
1380
+ function kn() {
1381
+ vn || (vn = true, Pe("error", vt), Pe("unhandledrejection", vt));
1456
1382
  }
1457
- function Ct() {
1458
- let t = Mn();
1383
+ function vt() {
1384
+ let t = On();
1459
1385
  if (t) {
1460
1386
  let e = "internal_error";
1461
1387
  (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(`[Tracing] Transaction: ${e} -> Global error occured`), t.setStatus(e);
1462
1388
  }
1463
1389
  }
1464
- Ct.tag = "sentry_tracingErrorCallback";
1465
- var Ye = class {
1390
+ vt.tag = "sentry_tracingErrorCallback";
1391
+ var $e = class {
1466
1392
  constructor(e = 1e3) {
1467
1393
  this._maxlen = e, this.spans = [];
1468
1394
  }
@@ -1470,9 +1396,9 @@ var Ye = class {
1470
1396
  this.spans.length > this._maxlen ? e.spanRecorder = void 0 : this.spans.push(e);
1471
1397
  }
1472
1398
  };
1473
- var te = class {
1399
+ var ee = class {
1474
1400
  constructor(e = {}) {
1475
- this.traceId = e.traceId || g(), this.spanId = e.spanId || g().substring(16), this.startTimestamp = e.startTimestamp || W(), this.tags = e.tags || {}, this.data = e.data || {}, this.instrumenter = e.instrumenter || "sentry", this.origin = e.origin || "manual", e.parentSpanId && (this.parentSpanId = e.parentSpanId), "sampled" in e && (this.sampled = e.sampled), e.op && (this.op = e.op), e.description && (this.description = e.description), e.name && (this.description = e.name), e.status && (this.status = e.status), e.endTimestamp && (this.endTimestamp = e.endTimestamp);
1401
+ this.traceId = e.traceId || g(), this.spanId = e.spanId || g().substring(16), this.startTimestamp = e.startTimestamp || q(), this.tags = e.tags || {}, this.data = e.data || {}, this.instrumenter = e.instrumenter || "sentry", this.origin = e.origin || "manual", e.parentSpanId && (this.parentSpanId = e.parentSpanId), "sampled" in e && (this.sampled = e.sampled), e.op && (this.op = e.op), e.description && (this.description = e.description), e.name && (this.description = e.name), e.status && (this.status = e.status), e.endTimestamp && (this.endTimestamp = e.endTimestamp);
1476
1402
  }
1477
1403
  get name() {
1478
1404
  return this.description || "";
@@ -1481,7 +1407,7 @@ var te = class {
1481
1407
  this.setName(e);
1482
1408
  }
1483
1409
  startChild(e) {
1484
- let n = new te({ ...e, parentSpanId: this.spanId, sampled: this.sampled, traceId: this.traceId });
1410
+ let n = new ee({ ...e, parentSpanId: this.spanId, sampled: this.sampled, traceId: this.traceId });
1485
1411
  if (n.spanRecorder = this.spanRecorder, n.spanRecorder && n.spanRecorder.add(n), n.transaction = this.transaction, (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && n.transaction) {
1486
1412
  let r = e && e.op || "< unknown op >", s = n.transaction.name || "< unknown name >", i = n.transaction.spanId, o = `[Tracing] Starting '${r}' span on transaction '${s}' (${i}).`;
1487
1413
  n.transaction.metadata.spanMetadata[n.spanId] = { logMessage: o }, f.log(o);
@@ -1499,7 +1425,7 @@ var te = class {
1499
1425
  }
1500
1426
  setHttpStatus(e) {
1501
1427
  this.setTag("http.status_code", String(e)), this.setData("http.response.status_code", e);
1502
- let n = es(e);
1428
+ let n = Jr(e);
1503
1429
  return n !== "unknown_error" && this.setStatus(n), this;
1504
1430
  }
1505
1431
  setName(e) {
@@ -1513,10 +1439,10 @@ var te = class {
1513
1439
  let { logMessage: n } = this.transaction.metadata.spanMetadata[this.spanId];
1514
1440
  n && f.log(n.replace("Starting", "Finishing"));
1515
1441
  }
1516
- this.endTimestamp = typeof e == "number" ? e : W();
1442
+ this.endTimestamp = typeof e == "number" ? e : q();
1517
1443
  }
1518
1444
  toTraceparent() {
1519
- return St(this.traceId, this.spanId, this.sampled);
1445
+ return Et(this.traceId, this.spanId, this.sampled);
1520
1446
  }
1521
1447
  toContext() {
1522
1448
  return E({ data: this.data, description: this.description, endTimestamp: this.endTimestamp, op: this.op, parentSpanId: this.parentSpanId, sampled: this.sampled, spanId: this.spanId, startTimestamp: this.startTimestamp, status: this.status, tags: this.tags, traceId: this.traceId });
@@ -1531,7 +1457,7 @@ var te = class {
1531
1457
  return E({ data: Object.keys(this.data).length > 0 ? this.data : void 0, description: this.description, op: this.op, parent_span_id: this.parentSpanId, span_id: this.spanId, start_timestamp: this.startTimestamp, status: this.status, tags: Object.keys(this.tags).length > 0 ? this.tags : void 0, timestamp: this.endTimestamp, trace_id: this.traceId, origin: this.origin });
1532
1458
  }
1533
1459
  };
1534
- function es(t) {
1460
+ function Jr(t) {
1535
1461
  if (t < 400 && t >= 100) return "ok";
1536
1462
  if (t >= 400 && t < 500) switch (t) {
1537
1463
  case 401:
@@ -1561,13 +1487,13 @@ function es(t) {
1561
1487
  }
1562
1488
  return "unknown_error";
1563
1489
  }
1564
- function ne(t, e, n) {
1565
- let r = e.getOptions(), { publicKey: s } = e.getDsn() || {}, { segment: i } = n && n.getUser() || {}, o = E({ environment: r.environment || Q, release: r.release, user_segment: i, public_key: s, trace_id: t });
1490
+ function te(t, e, n) {
1491
+ let r = e.getOptions(), { publicKey: s } = e.getDsn() || {}, { segment: i } = n && n.getUser() || {}, o = E({ environment: r.environment || Z, release: r.release, user_segment: i, public_key: s, trace_id: t });
1566
1492
  return e.emit && e.emit("createDsc", o), o;
1567
1493
  }
1568
- var je = class extends te {
1494
+ var He = class extends ee {
1569
1495
  constructor(e, n) {
1570
- super(e), delete this.description, this._measurements = {}, this._contexts = {}, this._hub = n || x(), this._name = e.name || "", this.metadata = { source: "custom", ...e.metadata, spanMetadata: {} }, this._trimEnd = e.trimEnd, this.transaction = this;
1496
+ super(e), delete this.description, this._measurements = {}, this._contexts = {}, this._hub = n || R(), this._name = e.name || "", this.metadata = { source: "custom", ...e.metadata, spanMetadata: {} }, this._trimEnd = e.trimEnd, this.transaction = this;
1571
1497
  let r = this.metadata.dynamicSamplingContext;
1572
1498
  r && (this._frozenDynamicSamplingContext = { ...r });
1573
1499
  }
@@ -1581,7 +1507,7 @@ var je = class extends te {
1581
1507
  this._name = e, this.metadata.source = n;
1582
1508
  }
1583
1509
  initSpanRecorder(e = 1e3) {
1584
- this.spanRecorder || (this.spanRecorder = new Ye(e)), this.spanRecorder.add(this);
1510
+ this.spanRecorder || (this.spanRecorder = new $e(e)), this.spanRecorder.add(this);
1585
1511
  }
1586
1512
  setContext(e, n) {
1587
1513
  n === null ? delete this._contexts[e] : this._contexts[e] = n;
@@ -1605,9 +1531,9 @@ var je = class extends te {
1605
1531
  }
1606
1532
  getDynamicSamplingContext() {
1607
1533
  if (this._frozenDynamicSamplingContext) return this._frozenDynamicSamplingContext;
1608
- let e = this._hub || x(), n = e.getClient();
1534
+ let e = this._hub || R(), n = e.getClient();
1609
1535
  if (!n) return {};
1610
- let r = e.getScope(), s = ne(this.traceId, n, r), i = this.metadata.sampleRate;
1536
+ let r = e.getScope(), s = te(this.traceId, n, r), i = this.metadata.sampleRate;
1611
1537
  i !== void 0 && (s.sample_rate = `${i}`);
1612
1538
  let o = this.metadata.source;
1613
1539
  return o && o !== "url" && (s.transaction = this.name), this.sampled !== void 0 && (s.sampled = String(this.sampled)), s;
@@ -1629,36 +1555,36 @@ var je = class extends te {
1629
1555
  return Object.keys(this._measurements).length > 0 && ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log("[Measurements] Adding measurements to transaction", JSON.stringify(this._measurements, void 0, 2)), i.measurements = this._measurements), (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`), i;
1630
1556
  }
1631
1557
  };
1632
- function Bn(t) {
1558
+ function Cn(t) {
1633
1559
  if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__) return false;
1634
- let e = x().getClient(), n = t || e && e.getOptions();
1560
+ let e = R().getClient(), n = t || e && e.getOptions();
1635
1561
  return !!n && (n.enableTracing || "tracesSampleRate" in n || "tracesSampler" in n);
1636
1562
  }
1637
- function Gn(t, e, n) {
1638
- if (!Bn(e)) return t.sampled = false, t;
1563
+ function Pn(t, e, n) {
1564
+ if (!Cn(e)) return t.sampled = false, t;
1639
1565
  if (t.sampled !== void 0) return t.setMetadata({ sampleRate: Number(t.sampled) }), t;
1640
1566
  let r;
1641
- return typeof e.tracesSampler == "function" ? (r = e.tracesSampler(n), t.setMetadata({ sampleRate: Number(r) })) : n.parentSampled !== void 0 ? r = n.parentSampled : typeof e.tracesSampleRate < "u" ? (r = e.tracesSampleRate, t.setMetadata({ sampleRate: Number(r) })) : (r = 1, t.setMetadata({ sampleRate: r })), ts(r) ? r ? (t.sampled = Math.random() < r, t.sampled ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(`[Tracing] starting ${t.op} transaction - ${t.name}`), t) : ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`), t)) : ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler == "function" ? "tracesSampler returned 0 or false" : "a negative sampling decision was inherited or tracesSampleRate is set to 0"}`), t.sampled = false, t) : ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn("[Tracing] Discarding transaction because of invalid sample rate."), t.sampled = false, t);
1567
+ return typeof e.tracesSampler == "function" ? (r = e.tracesSampler(n), t.setMetadata({ sampleRate: Number(r) })) : n.parentSampled !== void 0 ? r = n.parentSampled : typeof e.tracesSampleRate < "u" ? (r = e.tracesSampleRate, t.setMetadata({ sampleRate: Number(r) })) : (r = 1, t.setMetadata({ sampleRate: r })), Kr(r) ? r ? (t.sampled = Math.random() < r, t.sampled ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(`[Tracing] starting ${t.op} transaction - ${t.name}`), t) : ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`), t)) : ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler == "function" ? "tracesSampler returned 0 or false" : "a negative sampling decision was inherited or tracesSampleRate is set to 0"}`), t.sampled = false, t) : ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn("[Tracing] Discarding transaction because of invalid sample rate."), t.sampled = false, t);
1642
1568
  }
1643
- function ts(t) {
1644
- return oe(t) || !(typeof t == "number" || typeof t == "boolean") ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`), false) : t < 0 || t > 1 ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${t}.`), false) : true;
1569
+ function Kr(t) {
1570
+ return ie(t) || !(typeof t == "number" || typeof t == "boolean") ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`), false) : t < 0 || t > 1 ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${t}.`), false) : true;
1645
1571
  }
1646
- function ns() {
1572
+ function Xr() {
1647
1573
  let e = this.getScope().getSpan();
1648
1574
  return e ? { "sentry-trace": e.toTraceparent() } : {};
1649
1575
  }
1650
- function rs(t, e) {
1576
+ function Zr(t, e) {
1651
1577
  let n = this.getClient(), r = n && n.getOptions() || {}, s = r.instrumenter || "sentry", i = t.instrumenter || "sentry";
1652
1578
  s !== i && ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.error(`A transaction was started with instrumenter=\`${i}\`, but the SDK is configured with the \`${s}\` instrumenter.
1653
1579
  The transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`), t.sampled = false);
1654
- let o = new je(t, this);
1655
- return o = Gn(o, r, { parentSampled: t.parentSampled, transactionContext: t, ...e }), o.sampled && o.initSpanRecorder(r._experiments && r._experiments.maxSpans), n && n.emit && n.emit("startTransaction", o), o;
1580
+ let o = new He(t, this);
1581
+ return o = Pn(o, r, { parentSampled: t.parentSampled, transactionContext: t, ...e }), o.sampled && o.initSpanRecorder(r._experiments && r._experiments.maxSpans), n && n.emit && n.emit("startTransaction", o), o;
1656
1582
  }
1657
- function Fn() {
1658
- let t = V();
1659
- t.__SENTRY__ && (t.__SENTRY__.extensions = t.__SENTRY__.extensions || {}, t.__SENTRY__.extensions.startTransaction || (t.__SENTRY__.extensions.startTransaction = rs), t.__SENTRY__.extensions.traceHeaders || (t.__SENTRY__.extensions.traceHeaders = ns), Ln());
1583
+ function Mn() {
1584
+ let t = z();
1585
+ t.__SENTRY__ && (t.__SENTRY__.extensions = t.__SENTRY__.extensions || {}, t.__SENTRY__.extensions.startTransaction || (t.__SENTRY__.extensions.startTransaction = Zr), t.__SENTRY__.extensions.traceHeaders || (t.__SENTRY__.extensions.traceHeaders = Xr), kn());
1660
1586
  }
1661
- var qe = class {
1587
+ var Ye = class {
1662
1588
  constructor(e, n) {
1663
1589
  this._client = e, this.flushTimeout = 60, this._pendingAggregates = {}, this._isEnabled = true, this._intervalId = setInterval(() => this.flush(), this.flushTimeout * 1e3), this._sessionAttrs = n;
1664
1590
  }
@@ -1675,7 +1601,7 @@ var qe = class {
1675
1601
  }
1676
1602
  incrementSessionStatusCount() {
1677
1603
  if (!this._isEnabled) return;
1678
- let e = x().getScope(), n = e.getRequestSession();
1604
+ let e = R().getScope(), n = e.getRequestSession();
1679
1605
  n && n.status && (this._incrementSessionStatusCount(n.status, /* @__PURE__ */ new Date()), e.setRequestSession(void 0));
1680
1606
  }
1681
1607
  _incrementSessionStatusCount(e, n) {
@@ -1692,64 +1618,64 @@ var qe = class {
1692
1618
  }
1693
1619
  }
1694
1620
  };
1695
- var ss = "7";
1696
- function is(t) {
1621
+ var Qr = "7";
1622
+ function es(t) {
1697
1623
  let e = t.protocol ? `${t.protocol}:` : "", n = t.port ? `:${t.port}` : "";
1698
1624
  return `${e}//${t.host}${n}${t.path ? `/${t.path}` : ""}/api/`;
1699
1625
  }
1700
- function os(t) {
1701
- return `${is(t)}${t.projectId}/envelope/`;
1626
+ function ts(t) {
1627
+ return `${es(t)}${t.projectId}/envelope/`;
1702
1628
  }
1703
- function as(t, e) {
1704
- return ut({ sentry_key: t.publicKey, sentry_version: ss, ...e && { sentry_client: `${e.name}/${e.version}` } });
1629
+ function ns(t, e) {
1630
+ return ct({ sentry_key: t.publicKey, sentry_version: Qr, ...e && { sentry_client: `${e.name}/${e.version}` } });
1705
1631
  }
1706
- function $n(t, e = {}) {
1632
+ function Un(t, e = {}) {
1707
1633
  let n = typeof e == "string" ? e : e.tunnel, r = typeof e == "string" || !e._metadata ? void 0 : e._metadata.sdk;
1708
- return n || `${os(t)}?${as(t, r)}`;
1634
+ return n || `${ts(t)}?${ns(t, r)}`;
1709
1635
  }
1710
- function cs(t, e) {
1636
+ function rs(t, e) {
1711
1637
  return e && (t.sdk = t.sdk || {}, t.sdk.name = t.sdk.name || e.name, t.sdk.version = t.sdk.version || e.version, t.sdk.integrations = [...t.sdk.integrations || [], ...e.integrations || []], t.sdk.packages = [...t.sdk.packages || [], ...e.packages || []]), t;
1712
1638
  }
1713
- function Hn(t, e, n, r) {
1714
- let s = $e(n), i = { sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...s && { sdk: s }, ...!!r && e && { dsn: B(e) } }, o = "aggregates" in t ? [{ type: "sessions" }, t] : [{ type: "session" }, t.toJSON()];
1715
- return G(i, [o]);
1639
+ function Ln(t, e, n, r) {
1640
+ let s = Ge(n), i = { sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...s && { sdk: s }, ...!!r && e && { dsn: L(e) } }, o = "aggregates" in t ? [{ type: "sessions" }, t] : [{ type: "session" }, t.toJSON()];
1641
+ return B(i, [o]);
1716
1642
  }
1717
- function Yn(t, e, n, r) {
1718
- let s = $e(n), i = t.type && t.type !== "replay_event" ? t.type : "event";
1719
- cs(t, n && n.sdk);
1720
- let o = It(t, s, r, e);
1721
- return delete t.sdkProcessingMetadata, G(o, [[{ type: i }, t]]);
1643
+ function Bn(t, e, n, r) {
1644
+ let s = Ge(n), i = t.type && t.type !== "replay_event" ? t.type : "event";
1645
+ rs(t, n && n.sdk);
1646
+ let o = Rt(t, s, r, e);
1647
+ return delete t.sdkProcessingMetadata, B(o, [[{ type: i }, t]]);
1722
1648
  }
1723
- var jn = [];
1724
- function us(t) {
1649
+ var Gn = [];
1650
+ function ss(t) {
1725
1651
  let e = {};
1726
1652
  return t.forEach((n) => {
1727
1653
  let { name: r } = n, s = e[r];
1728
1654
  s && !s.isDefaultInstance && n.isDefaultInstance || (e[r] = n);
1729
1655
  }), Object.keys(e).map((n) => e[n]);
1730
1656
  }
1731
- function Pt(t) {
1657
+ function kt(t) {
1732
1658
  let e = t.defaultIntegrations || [], n = t.integrations;
1733
1659
  e.forEach((o) => {
1734
1660
  o.isDefaultInstance = true;
1735
1661
  });
1736
1662
  let r;
1737
- Array.isArray(n) ? r = [...e, ...n] : typeof n == "function" ? r = he(n(e)) : r = e;
1738
- let s = us(r), i = ds(s, (o) => o.name === "Debug");
1663
+ Array.isArray(n) ? r = [...e, ...n] : typeof n == "function" ? r = me(n(e)) : r = e;
1664
+ let s = ss(r), i = is(s, (o) => o.name === "Debug");
1739
1665
  if (i !== -1) {
1740
1666
  let [o] = s.splice(i, 1);
1741
1667
  s.push(o);
1742
1668
  }
1743
1669
  return s;
1744
1670
  }
1745
- function qn(t, e) {
1671
+ function Fn(t, e) {
1746
1672
  let n = {};
1747
1673
  return e.forEach((r) => {
1748
- r && Mt(t, r, n);
1674
+ r && Ct(t, r, n);
1749
1675
  }), n;
1750
1676
  }
1751
- function Mt(t, e, n) {
1752
- if (n[e.name] = e, jn.indexOf(e.name) === -1 && (e.setupOnce(On, x), jn.push(e.name)), t.on && typeof e.preprocessEvent == "function") {
1677
+ function Ct(t, e, n) {
1678
+ if (n[e.name] = e, Gn.indexOf(e.name) === -1 && (e.setupOnce(xn, R), Gn.push(e.name)), t.on && typeof e.preprocessEvent == "function") {
1753
1679
  let r = e.preprocessEvent.bind(e);
1754
1680
  t.on("preprocessEvent", (s, i) => r(s, i, t));
1755
1681
  }
@@ -1759,15 +1685,15 @@ function Mt(t, e, n) {
1759
1685
  }
1760
1686
  (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(`Integration installed: ${e.name}`);
1761
1687
  }
1762
- function ds(t, e) {
1688
+ function is(t, e) {
1763
1689
  for (let n = 0; n < t.length; n++) if (e(t[n]) === true) return n;
1764
1690
  return -1;
1765
1691
  }
1766
- function zn(t, e, n, r, s) {
1767
- let { normalizeDepth: i = 3, normalizeMaxBreadth: o = 1e3 } = t, a = { ...e, event_id: e.event_id || n.event_id || g(), timestamp: e.timestamp || q() }, c = n.integrations || t.integrations.map((p) => p.name);
1768
- ls(a, t), ms(a, c), e.type === void 0 && fs(a, t.stackParser);
1692
+ function Hn(t, e, n, r, s) {
1693
+ let { normalizeDepth: i = 3, normalizeMaxBreadth: o = 1e3 } = t, a = { ...e, event_id: e.event_id || n.event_id || g(), timestamp: e.timestamp || j() }, c = n.integrations || t.integrations.map((p) => p.name);
1694
+ os(a, t), us(a, c), e.type === void 0 && as(a, t.stackParser);
1769
1695
  let u = r;
1770
- n.captureContext && (u = k.clone(u).update(n.captureContext));
1696
+ n.captureContext && (u = v.clone(u).update(n.captureContext));
1771
1697
  let l = b(a), d = s && s.getEventProcessors ? s.getEventProcessors() : [];
1772
1698
  if (u) {
1773
1699
  if (u.getAttachments) {
@@ -1775,23 +1701,23 @@ function zn(t, e, n, r, s) {
1775
1701
  p.length && (n.attachments = p);
1776
1702
  }
1777
1703
  l = u.applyToEvent(a, n, d);
1778
- } else l = ee([...d, ...Ee()], a, n);
1779
- return l.then((p) => (p && ps(p), typeof i == "number" && i > 0 ? hs(p, i, o) : p));
1704
+ } else l = Q([...d, ..._e()], a, n);
1705
+ return l.then((p) => (p && cs(p), typeof i == "number" && i > 0 ? ds(p, i, o) : p));
1780
1706
  }
1781
- function ls(t, e) {
1707
+ function os(t, e) {
1782
1708
  let { environment: n, release: r, dist: s, maxValueLength: i = 250 } = e;
1783
- "environment" in t || (t.environment = "environment" in e ? n : Q), t.release === void 0 && r !== void 0 && (t.release = r), t.dist === void 0 && s !== void 0 && (t.dist = s), t.message && (t.message = L(t.message, i));
1709
+ "environment" in t || (t.environment = "environment" in e ? n : Z), t.release === void 0 && r !== void 0 && (t.release = r), t.dist === void 0 && s !== void 0 && (t.dist = s), t.message && (t.message = U(t.message, i));
1784
1710
  let o = t.exception && t.exception.values && t.exception.values[0];
1785
- o && o.value && (o.value = L(o.value, i));
1711
+ o && o.value && (o.value = U(o.value, i));
1786
1712
  let a = t.request;
1787
- a && a.url && (a.url = L(a.url, i));
1713
+ a && a.url && (a.url = U(a.url, i));
1788
1714
  }
1789
- var Wn = /* @__PURE__ */ new WeakMap();
1790
- function fs(t, e) {
1715
+ var $n = /* @__PURE__ */ new WeakMap();
1716
+ function as(t, e) {
1791
1717
  let n = h._sentryDebugIds;
1792
1718
  if (!n) return;
1793
- let r, s = Wn.get(e);
1794
- s ? r = s : (r = /* @__PURE__ */ new Map(), Wn.set(e, r));
1719
+ let r, s = $n.get(e);
1720
+ s ? r = s : (r = /* @__PURE__ */ new Map(), $n.set(e, r));
1795
1721
  let i = Object.keys(n).reduce((o, a) => {
1796
1722
  let c, u = r.get(a);
1797
1723
  u ? c = u : (c = e(a), r.set(a, c));
@@ -1813,7 +1739,7 @@ function fs(t, e) {
1813
1739
  } catch {
1814
1740
  }
1815
1741
  }
1816
- function ps(t) {
1742
+ function cs(t) {
1817
1743
  let e = {};
1818
1744
  try {
1819
1745
  t.exception.values.forEach((r) => {
@@ -1830,25 +1756,25 @@ function ps(t) {
1830
1756
  n.push({ type: "sourcemap", code_file: r, debug_id: e[r] });
1831
1757
  });
1832
1758
  }
1833
- function ms(t, e) {
1759
+ function us(t, e) {
1834
1760
  e.length > 0 && (t.sdk = t.sdk || {}, t.sdk.integrations = [...t.sdk.integrations || [], ...e]);
1835
1761
  }
1836
- function hs(t, e, n) {
1762
+ function ds(t, e, n) {
1837
1763
  if (!t) return null;
1838
- let r = { ...t, ...t.breadcrumbs && { breadcrumbs: t.breadcrumbs.map((s) => ({ ...s, ...s.data && { data: v(s.data, e, n) } })) }, ...t.user && { user: v(t.user, e, n) }, ...t.contexts && { contexts: v(t.contexts, e, n) }, ...t.extra && { extra: v(t.extra, e, n) } };
1839
- return t.contexts && t.contexts.trace && r.contexts && (r.contexts.trace = t.contexts.trace, t.contexts.trace.data && (r.contexts.trace.data = v(t.contexts.trace.data, e, n))), t.spans && (r.spans = t.spans.map((s) => (s.data && (s.data = v(s.data, e, n)), s))), r;
1764
+ let r = { ...t, ...t.breadcrumbs && { breadcrumbs: t.breadcrumbs.map((s) => ({ ...s, ...s.data && { data: O(s.data, e, n) } })) }, ...t.user && { user: O(t.user, e, n) }, ...t.contexts && { contexts: O(t.contexts, e, n) }, ...t.extra && { extra: O(t.extra, e, n) } };
1765
+ return t.contexts && t.contexts.trace && r.contexts && (r.contexts.trace = t.contexts.trace, t.contexts.trace.data && (r.contexts.trace.data = O(t.contexts.trace.data, e, n))), t.spans && (r.spans = t.spans.map((s) => (s.data && (s.data = O(s.data, e, n)), s))), r;
1840
1766
  }
1841
- var Vn = "Not capturing exception because it's already been captured.";
1842
- var We = class {
1767
+ var Yn = "Not capturing exception because it's already been captured.";
1768
+ var je = class {
1843
1769
  constructor(e) {
1844
- if (this._options = e, this._integrations = {}, this._integrationsInitialized = false, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn = we(e.dsn) : (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn("No DSN provided, client will not send events."), this._dsn) {
1845
- let n = $n(this._dsn, e);
1770
+ if (this._options = e, this._integrations = {}, this._integrationsInitialized = false, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn = Ae(e.dsn) : (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn("No DSN provided, client will not send events."), this._dsn) {
1771
+ let n = Un(this._dsn, e);
1846
1772
  this._transport = e.transport({ recordDroppedEvent: this.recordDroppedEvent.bind(this), ...e.transportOptions, url: n });
1847
1773
  }
1848
1774
  }
1849
1775
  captureException(e, n, r) {
1850
- if (Le(e)) {
1851
- (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(Vn);
1776
+ if (Me(e)) {
1777
+ (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(Yn);
1852
1778
  return;
1853
1779
  }
1854
1780
  let s = n && n.event_id;
@@ -1857,14 +1783,14 @@ var We = class {
1857
1783
  })), s;
1858
1784
  }
1859
1785
  captureMessage(e, n, r, s) {
1860
- let i = r && r.event_id, o = Ie(e) ? this.eventFromMessage(String(e), n, r) : this.eventFromException(e, r);
1786
+ let i = r && r.event_id, o = Re(e) ? this.eventFromMessage(String(e), n, r) : this.eventFromException(e, r);
1861
1787
  return this._process(o.then((a) => this._captureEvent(a, r, s)).then((a) => {
1862
1788
  i = a;
1863
1789
  })), i;
1864
1790
  }
1865
1791
  captureEvent(e, n, r) {
1866
- if (n && n.originalException && Le(n.originalException)) {
1867
- (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(Vn);
1792
+ if (n && n.originalException && Me(n.originalException)) {
1793
+ (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(Yn);
1868
1794
  return;
1869
1795
  }
1870
1796
  let s = n && n.event_id;
@@ -1873,7 +1799,7 @@ var We = class {
1873
1799
  })), s;
1874
1800
  }
1875
1801
  captureSession(e) {
1876
- typeof e.release != "string" ? (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn("Discarded session because of missing or non-string release") : (this.sendSession(e), U(e, { init: false }));
1802
+ typeof e.release != "string" ? (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn("Discarded session because of missing or non-string release") : (this.sendSession(e), M(e, { init: false }));
1877
1803
  }
1878
1804
  getDsn() {
1879
1805
  return this._dsn;
@@ -1901,7 +1827,7 @@ var We = class {
1901
1827
  this._eventProcessors.push(e);
1902
1828
  }
1903
1829
  setupIntegrations(e) {
1904
- (e && !this._integrationsInitialized || this._isEnabled() && !this._integrationsInitialized) && (this._integrations = qn(this, this._options.integrations), this._integrationsInitialized = true);
1830
+ (e && !this._integrationsInitialized || this._isEnabled() && !this._integrationsInitialized) && (this._integrations = Fn(this, this._options.integrations), this._integrationsInitialized = true);
1905
1831
  }
1906
1832
  getIntegrationById(e) {
1907
1833
  return this._integrations[e];
@@ -1914,17 +1840,17 @@ var We = class {
1914
1840
  }
1915
1841
  }
1916
1842
  addIntegration(e) {
1917
- Mt(this, e, this._integrations);
1843
+ Ct(this, e, this._integrations);
1918
1844
  }
1919
1845
  sendEvent(e, n = {}) {
1920
1846
  this.emit("beforeSendEvent", e, n);
1921
- let r = Yn(e, this._dsn, this._options._metadata, this._options.tunnel);
1922
- for (let i of n.attachments || []) r = bt(r, Rt(i, this._options.transportOptions && this._options.transportOptions.textEncoder));
1847
+ let r = Bn(e, this._dsn, this._options._metadata, this._options.tunnel);
1848
+ for (let i of n.attachments || []) r = St(r, bt(i, this._options.transportOptions && this._options.transportOptions.textEncoder));
1923
1849
  let s = this._sendEnvelope(r);
1924
1850
  s && s.then((i) => this.emit("afterSendEvent", e, i), null);
1925
1851
  }
1926
1852
  sendSession(e) {
1927
- let n = Hn(e, this._dsn, this._options._metadata, this._options.tunnel);
1853
+ let n = Ln(e, this._dsn, this._options._metadata, this._options.tunnel);
1928
1854
  this._sendEnvelope(n);
1929
1855
  }
1930
1856
  recordDroppedEvent(e, n, r) {
@@ -1952,7 +1878,7 @@ var We = class {
1952
1878
  }
1953
1879
  }
1954
1880
  let o = e.status === "ok";
1955
- (o && e.errors === 0 || o && r) && (U(e, { ...r && { status: "crashed" }, errors: e.errors || Number(s || r) }), this.captureSession(e));
1881
+ (o && e.errors === 0 || o && r) && (M(e, { ...r && { status: "crashed" }, errors: e.errors || Number(s || r) }), this.captureSession(e));
1956
1882
  }
1957
1883
  _isClientDoneProcessing(e) {
1958
1884
  return new S((n) => {
@@ -1966,13 +1892,13 @@ var We = class {
1966
1892
  }
1967
1893
  _prepareEvent(e, n, r) {
1968
1894
  let s = this.getOptions(), i = Object.keys(this._integrations);
1969
- return !n.integrations && i.length > 0 && (n.integrations = i), this.emit("preprocessEvent", e, n), zn(s, e, n, r, this).then((o) => {
1895
+ return !n.integrations && i.length > 0 && (n.integrations = i), this.emit("preprocessEvent", e, n), Hn(s, e, n, r, this).then((o) => {
1970
1896
  if (o === null) return o;
1971
1897
  let { propagationContext: a } = o.sdkProcessingMetadata || {};
1972
1898
  if (!(o.contexts && o.contexts.trace) && a) {
1973
1899
  let { traceId: u, spanId: l, parentSpanId: d, dsc: p } = a;
1974
1900
  o.contexts = { trace: { trace_id: u, span_id: l, parent_span_id: d }, ...o.contexts };
1975
- let m = p || ne(u, this, r);
1901
+ let m = p || te(u, this, r);
1976
1902
  o.sdkProcessingMetadata = { dynamicSamplingContext: m, ...o.sdkProcessingMetadata };
1977
1903
  }
1978
1904
  return o;
@@ -1987,22 +1913,22 @@ var We = class {
1987
1913
  });
1988
1914
  }
1989
1915
  _processEvent(e, n, r) {
1990
- let s = this.getOptions(), { sampleRate: i } = s, o = Kn(e), a = Jn(e), c = e.type || "error", u = `before send for type \`${c}\``;
1991
- if (a && typeof i == "number" && Math.random() > i) return this.recordDroppedEvent("sample_rate", "error", e), j(new T(`Discarding event because it's not included in the random sample (sampling rate = ${i})`, "log"));
1916
+ let s = this.getOptions(), { sampleRate: i } = s, o = qn(e), a = jn(e), c = e.type || "error", u = `before send for type \`${c}\``;
1917
+ if (a && typeof i == "number" && Math.random() > i) return this.recordDroppedEvent("sample_rate", "error", e), Y(new T(`Discarding event because it's not included in the random sample (sampling rate = ${i})`, "log"));
1992
1918
  let l = c === "replay_event" ? "replay" : c;
1993
1919
  return this._prepareEvent(e, n, r).then((d) => {
1994
1920
  if (d === null) throw this.recordDroppedEvent("event_processor", l, e), new T("An event processor returned `null`, will not send event.", "log");
1995
1921
  if (n.data && n.data.__sentry__ === true) return d;
1996
- let m = gs(s, d, n);
1997
- return _s(m, u);
1922
+ let m = fs(s, d, n);
1923
+ return ls(m, u);
1998
1924
  }).then((d) => {
1999
1925
  if (d === null) throw this.recordDroppedEvent("before_send", l, e), new T(`${u} returned \`null\`, will not send event.`, "log");
2000
1926
  let p = r && r.getSession();
2001
1927
  !o && p && this._updateSessionFromEvent(p, d);
2002
1928
  let m = d.transaction_info;
2003
1929
  if (o && m && d.transaction !== e.transaction) {
2004
- let I = "custom";
2005
- d.transaction_info = { ...m, source: I };
1930
+ let k = "custom";
1931
+ d.transaction_info = { ...m, source: k };
2006
1932
  }
2007
1933
  return this.sendEvent(d, n), d;
2008
1934
  }).then(null, (d) => {
@@ -2027,45 +1953,45 @@ Reason: ${d}`));
2027
1953
  });
2028
1954
  }
2029
1955
  };
2030
- function _s(t, e) {
1956
+ function ls(t, e) {
2031
1957
  let n = `${e} must return \`null\` or a valid event.`;
2032
- if (Y(t)) return t.then((r) => {
2033
- if (!N(r) && r !== null) throw new T(n);
1958
+ if (H(t)) return t.then((r) => {
1959
+ if (!x(r) && r !== null) throw new T(n);
2034
1960
  return r;
2035
1961
  }, (r) => {
2036
1962
  throw new T(`${e} rejected with ${r}`);
2037
1963
  });
2038
- if (!N(t) && t !== null) throw new T(n);
1964
+ if (!x(t) && t !== null) throw new T(n);
2039
1965
  return t;
2040
1966
  }
2041
- function gs(t, e, n) {
1967
+ function fs(t, e, n) {
2042
1968
  let { beforeSend: r, beforeSendTransaction: s } = t;
2043
- return Jn(e) && r ? r(e, n) : Kn(e) && s ? s(e, n) : e;
1969
+ return jn(e) && r ? r(e, n) : qn(e) && s ? s(e, n) : e;
2044
1970
  }
2045
- function Jn(t) {
1971
+ function jn(t) {
2046
1972
  return t.type === void 0;
2047
1973
  }
2048
- function Kn(t) {
1974
+ function qn(t) {
2049
1975
  return t.type === "transaction";
2050
1976
  }
2051
- function Xn(t, e, n, r, s) {
1977
+ function Wn(t, e, n, r, s) {
2052
1978
  let i = { sent_at: (/* @__PURE__ */ new Date()).toISOString() };
2053
- n && n.sdk && (i.sdk = { name: n.sdk.name, version: n.sdk.version }), r && s && (i.dsn = B(s)), e && (i.trace = E(e));
2054
- let o = Es(t);
2055
- return G(i, [o]);
1979
+ n && n.sdk && (i.sdk = { name: n.sdk.name, version: n.sdk.version }), r && s && (i.dsn = L(s)), e && (i.trace = E(e));
1980
+ let o = ps(t);
1981
+ return B(i, [o]);
2056
1982
  }
2057
- function Es(t) {
1983
+ function ps(t) {
2058
1984
  return [{ type: "check_in" }, t];
2059
1985
  }
2060
- var ye = class extends We {
1986
+ var ge = class extends je {
2061
1987
  constructor(e) {
2062
- Fn(), super(e);
1988
+ Mn(), super(e);
2063
1989
  }
2064
1990
  eventFromException(e, n) {
2065
- return b(Dt(x, this._options.stackParser, e, n));
1991
+ return b(Nt(R, this._options.stackParser, e, n));
2066
1992
  }
2067
1993
  eventFromMessage(e, n = "info", r) {
2068
- return b(Ot(this._options.stackParser, e, n, r, this._options.attachStacktrace));
1994
+ return b(wt(this._options.stackParser, e, n, r, this._options.attachStacktrace));
2069
1995
  }
2070
1996
  captureException(e, n, r) {
2071
1997
  if (this._options.autoSessionTracking && this._sessionFlusher && r) {
@@ -2086,7 +2012,7 @@ var ye = class extends We {
2086
2012
  }
2087
2013
  initSessionFlusher() {
2088
2014
  let { release: e, environment: n } = this._options;
2089
- e ? this._sessionFlusher = new qe(this, { release: e, environment: n }) : (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn("Cannot initialise an instance of SessionFlusher if no release is provided!");
2015
+ e ? this._sessionFlusher = new Ye(this, { release: e, environment: n }) : (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn("Cannot initialise an instance of SessionFlusher if no release is provided!");
2090
2016
  }
2091
2017
  captureCheckIn(e, n, r) {
2092
2018
  let s = e.status !== "in_progress" && e.checkInId ? e.checkInId : g();
@@ -2095,7 +2021,7 @@ var ye = class extends We {
2095
2021
  e.status !== "in_progress" && (u.duration = e.duration), n && (u.monitor_config = { schedule: n.schedule, checkin_margin: n.checkinMargin, max_runtime: n.maxRuntime, timezone: n.timezone });
2096
2022
  let [l, d] = this._getTraceInfoFromScope(r);
2097
2023
  d && (u.contexts = { trace: d });
2098
- let p = Xn(u, l, this.getSdkMetadata(), c, this.getDsn());
2024
+ let p = Wn(u, l, this.getSdkMetadata(), c, this.getDsn());
2099
2025
  return (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.info("Sending checkin:", e.monitorSlug, e.status), this._sendEnvelope(p), s;
2100
2026
  }
2101
2027
  _captureRequestSession() {
@@ -2109,27 +2035,27 @@ var ye = class extends We {
2109
2035
  let n = e.getSpan();
2110
2036
  if (n) return [n.transaction ? n.transaction.getDynamicSamplingContext() : void 0, n.getTraceContext()];
2111
2037
  let { traceId: r, spanId: s, parentSpanId: i, dsc: o } = e.getPropagationContext(), a = { trace_id: r, span_id: s, parent_span_id: i };
2112
- return o ? [o, a] : [ne(r, this, e), a];
2038
+ return o ? [o, a] : [te(r, this, e), a];
2113
2039
  }
2114
2040
  };
2115
- var ys = 30;
2116
- function Ut(t, e, n = gt(t.bufferSize || ys)) {
2041
+ var ms = 30;
2042
+ function Pt(t, e, n = ht(t.bufferSize || ms)) {
2117
2043
  let r = {}, s = (o) => n.drain(o);
2118
2044
  function i(o) {
2119
2045
  let a = [];
2120
- if (Ge(o, (d, p) => {
2121
- let m = Fe(p);
2122
- if (At(r, m)) {
2123
- let I = Zn(d, p);
2124
- t.recordDroppedEvent("ratelimit_backoff", m, I);
2046
+ if (Le(o, (d, p) => {
2047
+ let m = Be(p);
2048
+ if (It(r, m)) {
2049
+ let k = zn(d, p);
2050
+ t.recordDroppedEvent("ratelimit_backoff", m, k);
2125
2051
  } else a.push(d);
2126
2052
  }), a.length === 0) return b();
2127
- let c = G(o[0], a), u = (d) => {
2128
- Ge(c, (p, m) => {
2129
- let I = Zn(p, m);
2130
- t.recordDroppedEvent(d, Fe(m), I);
2053
+ let c = B(o[0], a), u = (d) => {
2054
+ Le(c, (p, m) => {
2055
+ let k = zn(p, m);
2056
+ t.recordDroppedEvent(d, Be(m), k);
2131
2057
  });
2132
- }, l = () => e({ body: xt(c, t.textEncoder) }).then((d) => (d.statusCode !== void 0 && (d.statusCode < 200 || d.statusCode >= 300) && (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn(`Sentry responded with status code ${d.statusCode} to sent event.`), r = Nt(r, d), d), (d) => {
2058
+ }, l = () => e({ body: Tt(c, t.textEncoder) }).then((d) => (d.statusCode !== void 0 && (d.statusCode < 200 || d.statusCode >= 300) && (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn(`Sentry responded with status code ${d.statusCode} to sent event.`), r = xt(r, d), d), (d) => {
2133
2059
  throw u("network_error"), d;
2134
2060
  });
2135
2061
  return n.add(l).then((d) => d, (d) => {
@@ -2139,110 +2065,110 @@ function Ut(t, e, n = gt(t.bufferSize || ys)) {
2139
2065
  }
2140
2066
  return i.__sentry__baseTransport__ = true, { send: i, flush: s };
2141
2067
  }
2142
- function Zn(t, e) {
2068
+ function zn(t, e) {
2143
2069
  if (!(e !== "event" && e !== "transaction")) return Array.isArray(t) ? t[1] : void 0;
2144
2070
  }
2145
- function er(t) {
2071
+ function Jn(t) {
2146
2072
  return typeof t == "object" && t !== null;
2147
2073
  }
2148
- function Ss(t) {
2149
- return er(t) && "handled" in t && typeof t.handled == "boolean" && "type" in t && typeof t.type == "string";
2074
+ function hs(t) {
2075
+ return Jn(t) && "handled" in t && typeof t.handled == "boolean" && "type" in t && typeof t.type == "string";
2150
2076
  }
2151
- function Ts(t) {
2152
- return er(t) && "mechanism" in t && Ss(t.mechanism);
2077
+ function _s(t) {
2078
+ return Jn(t) && "mechanism" in t && hs(t.mechanism);
2153
2079
  }
2154
- function bs() {
2080
+ function gs() {
2155
2081
  if (h.SENTRY_RELEASE && h.SENTRY_RELEASE.id) return h.SENTRY_RELEASE.id;
2156
2082
  }
2157
- function Qn(t, e) {
2083
+ function Vn(t, e) {
2158
2084
  return t !== void 0 ? (t[e[0]] = e[1], t) : { [e[0]]: e[1] };
2159
2085
  }
2160
- function tr(t, e) {
2086
+ function Kn(t, e) {
2161
2087
  return t(e.stack || "", 1);
2162
2088
  }
2163
- function xs(t) {
2089
+ function Es(t) {
2164
2090
  let e = t && t.message;
2165
2091
  return e ? e.error && typeof e.error.message == "string" ? e.error.message : e : "No error message";
2166
2092
  }
2167
- function nr(t, e) {
2168
- let n = { type: e.name || e.constructor.name, value: xs(e) }, r = tr(t, e);
2093
+ function Xn(t, e) {
2094
+ let n = { type: e.name || e.constructor.name, value: Es(e) }, r = Kn(t, e);
2169
2095
  return r.length && (n.stacktrace = { frames: r }), n.type === void 0 && n.value === "" && (n.value = "Unrecoverable error caught"), n;
2170
2096
  }
2171
- function Rs(t, e, n, r) {
2172
- let s, o = (r && r.data && Ts(r.data) ? r.data.mechanism : void 0) ?? { handled: true, type: "generic" };
2173
- if (H(n)) s = n;
2097
+ function ys(t, e, n, r) {
2098
+ let s, o = (r && r.data && _s(r.data) ? r.data.mechanism : void 0) ?? { handled: true, type: "generic" };
2099
+ if ($(n)) s = n;
2174
2100
  else {
2175
- if (N(n)) {
2176
- let c = `Non-Error exception captured with keys: ${ue(n)}`, u = t?.getClient(), l = u && u.getOptions().normalizeDepth;
2101
+ if (x(n)) {
2102
+ let c = `Non-Error exception captured with keys: ${ce(n)}`, u = t?.getClient(), l = u && u.getOptions().normalizeDepth;
2177
2103
  t?.configureScope((d) => {
2178
- d.setExtra("__serialized__", Z(n, l));
2104
+ d.setExtra("__serialized__", X(n, l));
2179
2105
  }), s = r && r.syntheticException || new Error(c), s.message = c;
2180
2106
  } else s = r && r.syntheticException || new Error(n), s.message = n;
2181
2107
  o.synthetic = true;
2182
2108
  }
2183
- let a = { exception: { values: [nr(e, s)] } };
2184
- return pe(a, void 0, void 0), me(a, o), { ...a, event_id: r && r.event_id };
2109
+ let a = { exception: { values: [Xn(e, s)] } };
2110
+ return fe(a, void 0, void 0), pe(a, o), { ...a, event_id: r && r.event_id };
2185
2111
  }
2186
- function Is(t, e, n = "info", r, s) {
2112
+ function Ss(t, e, n = "info", r, s) {
2187
2113
  let i = { event_id: r && r.event_id, level: n, message: e };
2188
2114
  if (s && r && r.syntheticException) {
2189
- let o = tr(t, r.syntheticException);
2115
+ let o = Kn(t, r.syntheticException);
2190
2116
  o.length && (i.exception = { values: [{ value: e, stacktrace: { frames: o } }] });
2191
2117
  }
2192
2118
  return i;
2193
2119
  }
2194
- var As = 5;
2195
- var Ke = class {
2196
- name = Ke.id;
2120
+ var Ts = 5;
2121
+ var Ve = class {
2122
+ name = Ve.id;
2197
2123
  limit;
2198
2124
  constructor(e = {}) {
2199
- this.limit = e.limit || As;
2125
+ this.limit = e.limit || Ts;
2200
2126
  }
2201
2127
  setupOnce(e, n) {
2202
2128
  let r = n().getClient();
2203
2129
  r && e((s, i) => {
2204
- let o = n().getIntegration(Ke);
2205
- return o ? Ns(r.getOptions().stackParser, o.limit, s, i) : s;
2130
+ let o = n().getIntegration(Ve);
2131
+ return o ? bs(r.getOptions().stackParser, o.limit, s, i) : s;
2206
2132
  });
2207
2133
  }
2208
2134
  };
2209
- var ze = Ke;
2210
- Se(ze, "id", "LinkedErrors");
2211
- function Ns(t, e, n, r) {
2212
- if (!n.exception || !n.exception.values || !r || !P(r.originalException, Error)) return n;
2213
- let s = rr(t, e, r.originalException);
2135
+ var qe = Ve;
2136
+ Ee(qe, "id", "LinkedErrors");
2137
+ function bs(t, e, n, r) {
2138
+ if (!n.exception || !n.exception.values || !r || !C(r.originalException, Error)) return n;
2139
+ let s = Zn(t, e, r.originalException);
2214
2140
  return n.exception.values = [...s, ...n.exception.values], n;
2215
2141
  }
2216
- function rr(t, e, n, r = []) {
2217
- if (!P(n.cause, Error) || r.length + 1 >= e) return r;
2218
- let s = nr(t, n.cause);
2219
- return rr(t, e, n.cause, [s, ...r]);
2142
+ function Zn(t, e, n, r = []) {
2143
+ if (!C(n.cause, Error) || r.length + 1 >= e) return r;
2144
+ let s = Xn(t, n.cause);
2145
+ return Zn(t, e, n.cause, [s, ...r]);
2220
2146
  }
2221
- var ws = { allowedHeaders: ["CF-RAY", "CF-Worker"] };
2222
- var re;
2223
- var Xe = class {
2147
+ var Rs = { allowedHeaders: ["CF-RAY", "CF-Worker"] };
2148
+ var ne;
2149
+ var Je = class {
2224
2150
  constructor(e = {}) {
2225
- Se(this, "name", Xe.id);
2226
- Vt(this, re, void 0);
2227
- Jt(this, re, { ...ws, ...e });
2151
+ Ee(this, "name", Je.id);
2152
+ jt(this, ne, void 0);
2153
+ qt(this, ne, { ...Rs, ...e });
2228
2154
  }
2229
2155
  setupOnce(e, n) {
2230
2156
  n().getClient() && e((s) => {
2231
2157
  let { sdkProcessingMetadata: i } = s;
2232
- return !n().getIntegration(Xe) || !i || ("request" in i && i.request instanceof Request && (s.request = Os(i.request, rt(this, re)), s.user = Ds(s.user ?? {}, i.request, rt(this, re))), "requestData" in i && (s.request ? s.request.data = i.requestData : s.request = { data: i.requestData })), s;
2158
+ return !n().getIntegration(Je) || !i || ("request" in i && i.request instanceof Request && (s.request = xs(i.request, nt(this, ne)), s.user = Is(s.user ?? {}, i.request, nt(this, ne))), "requestData" in i && (s.request ? s.request.data = i.requestData : s.request = { data: i.requestData })), s;
2233
2159
  });
2234
2160
  }
2235
2161
  };
2236
- var Ve = Xe;
2237
- re = /* @__PURE__ */ new WeakMap(), Se(Ve, "id", "RequestData");
2238
- function Ds(t, e, n) {
2162
+ var We = Je;
2163
+ ne = /* @__PURE__ */ new WeakMap(), Ee(We, "id", "RequestData");
2164
+ function Is(t, e, n) {
2239
2165
  let r = e.headers.get("CF-Connecting-IP"), { allowedIps: s } = n, i = { ...t };
2240
- return !("ip_address" in t) && r && s !== void 0 && vs(r, s) && (i.ip_address = r), Object.keys(i).length > 0 ? i : void 0;
2166
+ return !("ip_address" in t) && r && s !== void 0 && As(r, s) && (i.ip_address = r), Object.keys(i).length > 0 ? i : void 0;
2241
2167
  }
2242
- function Os(t, e) {
2168
+ function xs(t, e) {
2243
2169
  let n = t.headers.get("cookie"), r;
2244
2170
  if (n) try {
2245
- r = ks(n);
2171
+ r = Ns(n);
2246
2172
  } catch {
2247
2173
  }
2248
2174
  let s = {};
@@ -2256,18 +2182,18 @@ function Os(t, e) {
2256
2182
  l < 0 ? i.url = t.url : (i.url = t.url.substr(0, l), i.query_string = t.url.substr(l + 1));
2257
2183
  }
2258
2184
  let { allowedHeaders: o, allowedCookies: a, allowedSearchParams: c } = e;
2259
- if (o !== void 0 && i.headers ? (i.headers = Lt(i.headers, o), Object.keys(i.headers).length === 0 && delete i.headers) : delete i.headers, a !== void 0 && i.cookies ? (i.cookies = Lt(i.cookies, a), Object.keys(i.cookies).length === 0 && delete i.cookies) : delete i.cookies, c !== void 0) {
2185
+ if (o !== void 0 && i.headers ? (i.headers = Mt(i.headers, o), Object.keys(i.headers).length === 0 && delete i.headers) : delete i.headers, a !== void 0 && i.cookies ? (i.cookies = Mt(i.cookies, a), Object.keys(i.cookies).length === 0 && delete i.cookies) : delete i.cookies, c !== void 0) {
2260
2186
  let u = Object.fromEntries(new URLSearchParams(i.query_string)), l = new URLSearchParams();
2261
- Object.keys(Lt(u, c)).forEach((d) => {
2187
+ Object.keys(Mt(u, c)).forEach((d) => {
2262
2188
  l.set(d, u[d]);
2263
2189
  }), i.query_string = l.toString();
2264
2190
  } else delete i.query_string;
2265
2191
  return i;
2266
2192
  }
2267
- function vs(t, e) {
2193
+ function As(t, e) {
2268
2194
  return typeof e == "boolean" ? e : e instanceof RegExp ? e.test(t) : Array.isArray(e) ? e.map((r) => r.toLowerCase()).includes(t) : false;
2269
2195
  }
2270
- function Lt(t, e) {
2196
+ function Mt(t, e) {
2271
2197
  let n = () => false;
2272
2198
  if (typeof e == "boolean") return e ? t : {};
2273
2199
  if (e instanceof RegExp) n = (r) => e.test(r);
@@ -2277,7 +2203,7 @@ function Lt(t, e) {
2277
2203
  } else return {};
2278
2204
  return Object.keys(t).filter(n).reduce((r, s) => (r[s] = t[s], r), {});
2279
2205
  }
2280
- function ks(t) {
2206
+ function Ns(t) {
2281
2207
  if (typeof t != "string") return {};
2282
2208
  try {
2283
2209
  return t.split(";").map((e) => e.split("=")).reduce((e, [n, r]) => (e[decodeURIComponent(n.trim())] = decodeURIComponent(r.trim()), e), {});
@@ -2285,7 +2211,7 @@ function ks(t) {
2285
2211
  return {};
2286
2212
  }
2287
2213
  }
2288
- function Cs(t, e) {
2214
+ function ws(t, e) {
2289
2215
  let n = {};
2290
2216
  return t.forEach((r) => {
2291
2217
  n[r.name] = r, r.setupOnce((s) => {
@@ -2293,22 +2219,22 @@ function Cs(t, e) {
2293
2219
  }, () => e);
2294
2220
  }), n;
2295
2221
  }
2296
- var Bt = class extends ye {
2222
+ var Ut = class extends ge {
2297
2223
  #e = null;
2298
2224
  constructor(e) {
2299
2225
  e._metadata = e._metadata || {}, e._metadata.sdk = e._metadata.sdk || { name: "toucan-js", packages: [{ name: "npm:toucan-js", version: "3.3.1" }], version: "3.3.1" }, super(e);
2300
2226
  }
2301
2227
  setupIntegrations() {
2302
- this._isEnabled() && !this._integrationsInitialized && this.#e && (this._integrations = Cs(this._options.integrations, this.#e), this._integrationsInitialized = true);
2228
+ this._isEnabled() && !this._integrationsInitialized && this.#e && (this._integrations = ws(this._options.integrations, this.#e), this._integrationsInitialized = true);
2303
2229
  }
2304
2230
  eventFromException(e, n) {
2305
- return b(Rs(this.#e, this._options.stackParser, e, n));
2231
+ return b(ys(this.#e, this._options.stackParser, e, n));
2306
2232
  }
2307
2233
  eventFromMessage(e, n = "info", r) {
2308
- return b(Is(this._options.stackParser, e, n, r, this._options.attachStacktrace));
2234
+ return b(Ss(this._options.stackParser, e, n, r, this._options.attachStacktrace));
2309
2235
  }
2310
2236
  _prepareEvent(e, n, r) {
2311
- return e.platform = e.platform || "javascript", this.getOptions().request && (e.sdkProcessingMetadata = Qn(e.sdkProcessingMetadata, ["request", this.getOptions().request])), this.getOptions().requestData && (e.sdkProcessingMetadata = Qn(e.sdkProcessingMetadata, ["requestData", this.getOptions().requestData])), super._prepareEvent(e, n, r);
2237
+ return e.platform = e.platform || "javascript", this.getOptions().request && (e.sdkProcessingMetadata = Vn(e.sdkProcessingMetadata, ["request", this.getOptions().request])), this.getOptions().requestData && (e.sdkProcessingMetadata = Vn(e.sdkProcessingMetadata, ["requestData", this.getOptions().requestData])), super._prepareEvent(e, n, r);
2312
2238
  }
2313
2239
  getSdk() {
2314
2240
  return this.#e;
@@ -2323,8 +2249,8 @@ var Bt = class extends ye {
2323
2249
  this.getOptions().enabled = e;
2324
2250
  }
2325
2251
  };
2326
- function Ps(t) {
2327
- let [e, n] = ft(t);
2252
+ function Ds(t) {
2253
+ let [e, n] = lt(t);
2328
2254
  return [e, (s) => {
2329
2255
  let i = n(s);
2330
2256
  if (i) {
@@ -2334,28 +2260,28 @@ function Ps(t) {
2334
2260
  return i;
2335
2261
  }];
2336
2262
  }
2337
- function Ms(t) {
2338
- if (t) return _e(t, ".js");
2263
+ function Os(t) {
2264
+ if (t) return mt(t, ".js");
2339
2265
  }
2340
- var Us = Oe(Ps(Ms));
2341
- function Ls(t) {
2266
+ var vs = we(Ds(Os));
2267
+ function ks(t) {
2342
2268
  function e({ body: n }) {
2343
2269
  try {
2344
2270
  let s = (t.fetcher ?? fetch)(t.url, { method: "POST", headers: t.headers, body: n }).then((i) => ({ statusCode: i.status, headers: { "retry-after": i.headers.get("Retry-After"), "x-sentry-rate-limits": i.headers.get("X-Sentry-Rate-Limits") } }));
2345
2271
  return t.context && t.context.waitUntil(s), s;
2346
2272
  } catch (r) {
2347
- return j(r);
2273
+ return Y(r);
2348
2274
  }
2349
2275
  }
2350
- return Ut(t, e);
2276
+ return Pt(t, e);
2351
2277
  }
2352
- var Je = class extends z {
2278
+ var ze = class extends W {
2353
2279
  constructor(e) {
2354
- if (e.defaultIntegrations = e.defaultIntegrations === false ? [] : [...Array.isArray(e.defaultIntegrations) ? e.defaultIntegrations : [new Ve(e.requestDataOptions), new ze()]], e.release === void 0) {
2355
- let r = bs();
2280
+ if (e.defaultIntegrations = e.defaultIntegrations === false ? [] : [...Array.isArray(e.defaultIntegrations) ? e.defaultIntegrations : [new We(e.requestDataOptions), new qe()]], e.release === void 0) {
2281
+ let r = gs();
2356
2282
  r !== void 0 && (e.release = r);
2357
2283
  }
2358
- let n = new Bt({ ...e, transport: Ls, integrations: Pt(e), stackParser: lt(e.stackParser || Us), transportOptions: { ...e.transportOptions, context: e.context } });
2284
+ let n = new Ut({ ...e, transport: ks, integrations: kt(e), stackParser: dt(e.stackParser || vs), transportOptions: { ...e.transportOptions, context: e.context } });
2359
2285
  super(n), n.setSdk(this), n.setupIntegrations();
2360
2286
  }
2361
2287
  setRequestBody(e) {
@@ -2368,23 +2294,21 @@ var Je = class extends z {
2368
2294
  return e.status === "in_progress" && this.setContext("monitor", { slug: e.monitorSlug }), this.getClient().captureCheckIn(e, n, r);
2369
2295
  }
2370
2296
  };
2371
- function sr(t, e, n, r, s, i, o, a, c) {
2297
+ function Qn(t, e, n, r, s, i, o, a) {
2372
2298
  if (!(n && r && s)) return;
2373
- let u = new Je({ dsn: n, request: t, context: e, sampleRate: 1, release: o?.tag, integrations: [new C({ iteratee(l) {
2374
- return l.filename = "/index.js", l;
2375
- } })], requestDataOptions: { allowedHeaders: ["user-agent", "cf-challenge", "accept-encoding", "accept-language", "cf-ray", "content-length", "content-type", "host"], allowedSearchParams: /(.*)/ }, transportOptions: { headers: { "CF-Access-Client-ID": r, "CF-Access-Client-Secret": s } } });
2376
- return i && (u.setTag("colo", i.coloId), u.setTag("metal", i.metalId)), a && c && (u.setTag("accountId", a), u.setTag("scriptId", c)), u.setUser({ id: a?.toString() }), u;
2299
+ let c = new ze({ dsn: n, request: t, context: e, sampleRate: 1, requestDataOptions: { allowedHeaders: ["user-agent", "cf-challenge", "accept-encoding", "accept-language", "cf-ray", "content-length", "content-type", "host"], allowedSearchParams: /(.*)/ }, transportOptions: { headers: { "CF-Access-Client-ID": r, "CF-Access-Client-Secret": s } } });
2300
+ return i && (c.setTag("colo", i.coloId), c.setTag("metal", i.metalId)), o && a && (c.setTag("accountId", o), c.setTag("scriptId", a)), c.setUser({ id: o?.toString() }), c;
2377
2301
  }
2378
- function Bs() {
2302
+ function Cs() {
2379
2303
  return { addLogs: () => {
2380
2304
  }, setTags: () => {
2381
2305
  }, end: () => {
2382
2306
  }, isRecording: true };
2383
2307
  }
2384
- function ir() {
2385
- return { enterSpan: (t, e, ...n) => e(Bs(), ...n), getSpanContext: () => ({ traceId: "test-trace", spanId: "test-span", parentSpanId: "test-parent-span", traceFlags: 0 }), runWithSpanContext: (t, e, ...n) => e(...n), traceId: "test-trace", spanId: "test-span", parentSpanId: "test-parent-span", cfTraceIdHeader: "test-trace:test-span:0" };
2308
+ function er() {
2309
+ return { enterSpan: (t, e, ...n) => e(Cs(), ...n), getSpanContext: () => ({ traceId: "test-trace", spanId: "test-span", parentSpanId: "test-parent-span", traceFlags: 0 }), runWithSpanContext: (t, e, ...n) => e(...n), traceId: "test-trace", spanId: "test-span", parentSpanId: "test-parent-span", cfTraceIdHeader: "test-trace:test-span:0" };
2386
2310
  }
2387
- var Ze = class {
2311
+ var Ke = class {
2388
2312
  constructor(e) {
2389
2313
  this.data = {};
2390
2314
  this.readyAnalytics = e;
@@ -2396,67 +2320,62 @@ var Ze = class {
2396
2320
  return this.data[e];
2397
2321
  }
2398
2322
  write() {
2399
- this.readyAnalytics && this.readyAnalytics.logEvent({ version: 1, accountId: this.data.accountId, indexId: this.data.scriptId?.toString(), doubles: [this.data.requestTime ?? -1, this.data.coloId ?? -1, this.data.metalId ?? -1, this.data.coloTier ?? -1, this.data.status ?? -1], blobs: [this.data.hostname?.substring(0, 256), this.data.userAgent?.substring(0, 256), this.data.htmlHandling, this.data.notFoundHandling, this.data.error?.substring(0, 256), this.data.version, this.data.coloRegion] });
2323
+ this.readyAnalytics && this.readyAnalytics.logEvent({ version: 1, accountId: this.data.accountId, indexId: this.data.scriptId?.toString(), doubles: [this.data.requestTime ?? -1, this.data.coloId ?? -1, this.data.metalId ?? -1, this.data.coloTier ?? -1], blobs: [this.data.hostname?.substring(0, 256), this.data.userAgent?.substring(0, 256), this.data.htmlHandling, this.data.notFoundHandling, this.data.error?.substring(0, 256), this.data.version, this.data.coloRegion] });
2400
2324
  }
2401
2325
  };
2402
- var Qe = class {
2326
+ var Ze = class {
2403
2327
  constructor(e) {
2404
2328
  this.data = e;
2405
2329
  }
2406
2330
  async getWithBinarySearch(e) {
2407
- let n = await ar(e), r = Ft(new Uint8Array(this.data, 20), n);
2408
- return r ? cr(r) : null;
2331
+ let n = await nr(e), r = Lt(new Uint8Array(this.data, 20), n);
2332
+ return r ? rr(r) : null;
2409
2333
  }
2410
2334
  async getWithInterpolationSearch(e) {
2411
- let n = await ar(e), r = Fs(new Uint8Array(this.data, 20), n);
2412
- return r ? cr(r) : null;
2335
+ let n = await nr(e), r = Ms(new Uint8Array(this.data, 20), n);
2336
+ return r ? rr(r) : null;
2413
2337
  }
2414
2338
  };
2415
- var ar = async (t) => {
2339
+ var nr = async (t) => {
2416
2340
  let n = new TextEncoder().encode(t), r = await crypto.subtle.digest("SHA-256", n.buffer);
2417
2341
  return new Uint8Array(r, 0, 16);
2418
2342
  };
2419
- var Ft = (t, e) => {
2343
+ var Lt = (t, e) => {
2420
2344
  if (t.byteLength === 0) return false;
2421
2345
  let n = t.byteOffset + (t.byteLength / 40 >> 1) * 40, r = new Uint8Array(t.buffer, n, 16);
2422
2346
  if (r.byteLength !== e.byteLength) throw new TypeError("Search value and current value are of different lengths");
2423
- let s = $t(e, r);
2347
+ let s = Bt(e, r);
2424
2348
  if (s < 0) {
2425
2349
  let i = t.byteOffset, o = n - t.byteOffset;
2426
- return Ft(new Uint8Array(t.buffer, i, o), e);
2350
+ return Lt(new Uint8Array(t.buffer, i, o), e);
2427
2351
  } else if (s > 0) {
2428
2352
  let i = n + 40, o = t.buffer.byteLength - n - 40;
2429
- return Ft(new Uint8Array(t.buffer, i, o), e);
2353
+ return Lt(new Uint8Array(t.buffer, i, o), e);
2430
2354
  } else return new Uint8Array(t.buffer, n, 40);
2431
2355
  };
2432
- var Gt = (t) => {
2356
+ var Xe = (t) => {
2433
2357
  let e = new DataView(t.buffer, t.byteOffset);
2434
2358
  return (e.getBigUint64(0) << 64n) + e.getBigUint64(8);
2435
2359
  };
2436
- var Fs = (t, e) => {
2360
+ var Ms = (t, e) => {
2437
2361
  if (t.byteLength === 0) return false;
2438
- let n = 0, r = t.byteLength / 40 - 1, s = Gt(e);
2362
+ let n = 0, r = t.byteLength / 40 - 1;
2363
+ if (r === n) {
2364
+ let i = new Uint8Array(t.buffer, t.byteOffset, 16);
2365
+ if (i.byteLength !== e.byteLength) throw new TypeError("Search value and current value are of different lengths");
2366
+ return Bt(i, e) === 0 ? new Uint8Array(t.buffer, t.byteOffset, 40) : false;
2367
+ }
2368
+ let s = Xe(e);
2439
2369
  for (; n <= r; ) {
2440
- if (n === r) {
2441
- let I = new Uint8Array(t.buffer, t.byteOffset + n * 40, 16);
2442
- if (I.byteLength !== e.byteLength) throw new TypeError("Search value and current value are of different lengths");
2443
- return $t(I, e) === 0 ? new Uint8Array(t.buffer, t.byteOffset + n * 40, 40) : false;
2444
- }
2445
- let i = new Uint8Array(t.buffer, t.byteOffset + n * 40, 16), o = new Uint8Array(t.buffer, t.byteOffset + r * 40, 16), a = Gt(i), u = Gt(o) - a;
2446
- if (u <= 0n) throw new TypeError("Search space is unordered");
2447
- let l = s - a;
2448
- if (l < 0n) return false;
2449
- let d = Math.floor(Number(BigInt(n) + BigInt(r - n) * l / u));
2450
- if (d < n || d > r) return false;
2451
- let p = new Uint8Array(t.buffer, t.byteOffset + d * 40, 16);
2452
- if (p.byteLength !== e.byteLength) throw new TypeError("Search value and current value are of different lengths");
2453
- let m = $t(p, e);
2454
- if (m === 0) return new Uint8Array(t.buffer, t.byteOffset + d * 40, 40);
2455
- m < 0 ? n = d + 1 : r = d - 1;
2370
+ let i = new Uint8Array(t.buffer, t.byteOffset + n * 40, 16), o = new Uint8Array(t.buffer, t.byteOffset + r * 40, 16), a = Math.floor(Number(BigInt(n) + BigInt(r - n) * (s - Xe(i)) / (Xe(o) - Xe(i)))), c = new Uint8Array(t.buffer, t.byteOffset + a * 40, 16);
2371
+ if (c.byteLength !== e.byteLength) throw new TypeError("Search value and current value are of different lengths");
2372
+ let u = Bt(c, e);
2373
+ if (u === 0) return new Uint8Array(t.buffer, t.byteOffset + a * 40, 40);
2374
+ u < 0 ? n = a + 1 : r = a - 1;
2456
2375
  }
2457
2376
  return false;
2458
2377
  };
2459
- var $t = (t, e) => {
2378
+ var Bt = (t, e) => {
2460
2379
  if (t.byteLength < e.byteLength) return -1;
2461
2380
  if (t.byteLength > e.byteLength) return 1;
2462
2381
  for (let [n, r] of t.entries()) {
@@ -2465,12 +2384,12 @@ var $t = (t, e) => {
2465
2384
  }
2466
2385
  return 0;
2467
2386
  };
2468
- var cr = (t) => [...t.slice(16, 16 + 16)].map((n) => n.toString(16).padStart(2, "0")).join("");
2469
- var Ht = (t) => {
2387
+ var rr = (t) => [...t.slice(16, 16 + 16)].map((n) => n.toString(16).padStart(2, "0")).join("");
2388
+ var Gt = (t) => {
2470
2389
  let e;
2471
2390
  return t?.run_worker_first !== void 0 ? e = t?.run_worker_first : t?.serve_directly !== void 0 ? e = !t.serve_directly : e = false, { html_handling: t?.html_handling ?? "auto-trailing-slash", not_found_handling: t?.not_found_handling ?? "none", run_worker_first: e, serve_directly: !e };
2472
2391
  };
2473
- var et = class {
2392
+ var Qe = class {
2474
2393
  constructor(e) {
2475
2394
  this.data = {};
2476
2395
  this.readyAnalytics = e;
@@ -2485,49 +2404,49 @@ var et = class {
2485
2404
  this.readyAnalytics && this.readyAnalytics.logEvent({ version: 1, accountId: this.data.accountId, indexId: this.data.experimentName, doubles: [this.data.manifestReadTime ?? -1], blobs: [this.data.manifestReadMethod] });
2486
2405
  }
2487
2406
  };
2488
- var ur = "public, max-age=0, must-revalidate";
2489
- function dr(t, e, n) {
2407
+ var sr = "public, max-age=0, must-revalidate";
2408
+ function ir(t, e, n) {
2490
2409
  let r = new Headers({ "Content-Type": e, ETag: `"${t}"` });
2491
- return $s(n) && r.append("Cache-Control", ur), r;
2410
+ return Us(n) && r.append("Cache-Control", sr), r;
2492
2411
  }
2493
- function $s(t) {
2412
+ function Us(t) {
2494
2413
  return !t.headers.has("Authorization") && !t.headers.has("Range");
2495
2414
  }
2496
- var lr = async (t, e, n, r, s) => {
2497
- let { pathname: i, search: o } = new URL(t.url), a = Yt(i);
2415
+ var or = async (t, e, n, r, s) => {
2416
+ let { pathname: i, search: o } = new URL(t.url), a = Ft(i);
2498
2417
  a = a.replace(/\/+/g, "/");
2499
- let c = await tt(a, n, r);
2500
- if (!c) return e.JAEGER.enterSpan("no_intent", (A) => (A.setTags({ decodedPathname: a, configuration: JSON.stringify(n), status: 404 }), new ie()));
2418
+ let c = await et(a, n, r);
2419
+ if (!c) return e.JAEGER.enterSpan("no_intent", (I) => (I.setTags({ decodedPathname: a, configuration: JSON.stringify(n), status: 404 }), new se()));
2501
2420
  let u = t.method.toUpperCase();
2502
- if (!["GET", "HEAD"].includes(u)) return e.JAEGER.enterSpan("method_not_allowed", (A) => (A.setTags({ method: u, status: 405 }), new be()));
2503
- let l = c.redirect ?? a, d = Ws(l);
2504
- if (d !== i && c.asset || c.redirect) return e.JAEGER.enterSpan("redirect", (A) => (A.setTags({ originalPath: i, location: d !== i ? d : c.redirect ?? "<unknown>", status: 307 }), new Re(d + o)));
2505
- if (!c.asset) return e.JAEGER.enterSpan("unknown_action", (A) => (A.setTags({ pathname: i, status: 500 }), new $(new Error("Unknown action"))));
2506
- let p = await e.JAEGER.enterSpan("getByETag", async (A) => (A.setTags({ pathname: i, eTag: c.asset.eTag, status: c.asset.status }), await s(c.asset.eTag))), m = dr(c.asset.eTag, p.contentType, t), I = `"${c.asset.eTag}"`, jt = `W/${I}`, qt = t.headers.get("If-None-Match") || "";
2507
- return [jt, I].includes(qt) ? e.JAEGER.enterSpan("matched_etag", (A) => (A.setTags({ matchedEtag: qt, status: 304 }), new xe(null, { headers: m }))) : e.JAEGER.enterSpan("response", (A) => {
2508
- A.setTags({ etag: c.asset.eTag, status: c.asset.status, head: u === "HEAD" });
2509
- let Wt = u === "HEAD" ? null : p.readableStream;
2421
+ if (!["GET", "HEAD"].includes(u)) return e.JAEGER.enterSpan("method_not_allowed", (I) => (I.setTags({ method: u, status: 405 }), new Se()));
2422
+ let l = c.redirect ?? a, d = $s(l);
2423
+ if (d !== i && c.asset || c.redirect) return e.JAEGER.enterSpan("redirect", (I) => (I.setTags({ originalPath: i, location: d !== i ? d : c.redirect ?? "<unknown>", status: 307 }), new be(d + o)));
2424
+ if (!c.asset) return e.JAEGER.enterSpan("unknown_action", (I) => (I.setTags({ pathname: i, status: 500 }), new F(new Error("Unknown action"))));
2425
+ let p = await e.JAEGER.enterSpan("getByETag", async (I) => (I.setTags({ pathname: i, eTag: c.asset.eTag, status: c.asset.status }), await s(c.asset.eTag))), m = ir(c.asset.eTag, p.contentType, t), k = `"${c.asset.eTag}"`, ur = `W/${k}`, $t = t.headers.get("If-None-Match") || "";
2426
+ return [ur, k].includes($t) ? e.JAEGER.enterSpan("matched_etag", (I) => (I.setTags({ matchedEtag: $t, status: 304 }), new Te(null, { headers: m }))) : e.JAEGER.enterSpan("response", (I) => {
2427
+ I.setTags({ etag: c.asset.eTag, status: c.asset.status, head: u === "HEAD" });
2428
+ let Ht = u === "HEAD" ? null : p.readableStream;
2510
2429
  switch (c.asset.status) {
2511
2430
  case 404:
2512
- return new ie(Wt, { headers: m });
2431
+ return new se(Ht, { headers: m });
2513
2432
  case 200:
2514
- return new Te(Wt, { headers: m });
2433
+ return new ye(Ht, { headers: m });
2515
2434
  }
2516
2435
  });
2517
2436
  };
2518
- var tt = async (t, e, n, r = false) => {
2437
+ var et = async (t, e, n, r = false) => {
2519
2438
  switch (e.html_handling) {
2520
2439
  case "auto-trailing-slash":
2521
- return Hs(t, e, n, r);
2440
+ return Ls(t, e, n, r);
2522
2441
  case "force-trailing-slash":
2523
- return Ys(t, e, n, r);
2442
+ return Bs(t, e, n, r);
2524
2443
  case "drop-trailing-slash":
2525
- return js(t, e, n, r);
2444
+ return Gs(t, e, n, r);
2526
2445
  case "none":
2527
- return qs(t, e, n);
2446
+ return Fs(t, e, n);
2528
2447
  }
2529
2448
  };
2530
- var Hs = async (t, e, n, r) => {
2449
+ var Ls = async (t, e, n, r) => {
2531
2450
  let s = null, i = null, o = await n(t);
2532
2451
  if (t.endsWith("/index")) {
2533
2452
  if (o) return { asset: { eTag: o, status: 200 }, redirect: null };
@@ -2543,9 +2462,9 @@ var Hs = async (t, e, n, r) => {
2543
2462
  if (s = await _(t, t.slice(0, -5), e, n, r)) return s;
2544
2463
  if (s = await _(`${t.slice(0, -5)}/index.html`, `${t.slice(0, -5)}/`, e, n, r)) return s;
2545
2464
  }
2546
- return o ? { asset: { eTag: o, status: 200 }, redirect: null } : (i = await n(`${t}.html`)) ? { asset: { eTag: i, status: 200 }, redirect: null } : (s = await _(`${t}/index.html`, `${t}/`, e, n, r)) ? s : nt(t, e, n);
2465
+ return o ? { asset: { eTag: o, status: 200 }, redirect: null } : (i = await n(`${t}.html`)) ? { asset: { eTag: i, status: 200 }, redirect: null } : (s = await _(`${t}/index.html`, `${t}/`, e, n, r)) ? s : tt(t, e, n);
2547
2466
  };
2548
- var Ys = async (t, e, n, r) => {
2467
+ var Bs = async (t, e, n, r) => {
2549
2468
  let s = null, i = null, o = await n(t);
2550
2469
  if (t.endsWith("/index")) {
2551
2470
  if (o) return { asset: { eTag: o, status: 200 }, redirect: null };
@@ -2562,9 +2481,9 @@ var Ys = async (t, e, n, r) => {
2562
2481
  if (o) return { asset: { eTag: o, status: 200 }, redirect: null };
2563
2482
  if (s = await _(`${t.slice(0, -5)}/index.html`, `${t.slice(0, -5)}/`, e, n, r)) return s;
2564
2483
  }
2565
- return o ? { asset: { eTag: o, status: 200 }, redirect: null } : (s = await _(`${t}.html`, `${t}/`, e, n, r)) || (s = await _(`${t}/index.html`, `${t}/`, e, n, r)) ? s : nt(t, e, n);
2484
+ return o ? { asset: { eTag: o, status: 200 }, redirect: null } : (s = await _(`${t}.html`, `${t}/`, e, n, r)) || (s = await _(`${t}/index.html`, `${t}/`, e, n, r)) ? s : tt(t, e, n);
2566
2485
  };
2567
- var js = async (t, e, n, r) => {
2486
+ var Gs = async (t, e, n, r) => {
2568
2487
  let s = null, i = null, o = await n(t);
2569
2488
  if (t.endsWith("/index")) {
2570
2489
  if (o) return { asset: { eTag: o, status: 200 }, redirect: null };
@@ -2591,13 +2510,13 @@ var js = async (t, e, n, r) => {
2591
2510
  if (s = await _(t, t.slice(0, -5), e, n, r)) return s;
2592
2511
  if (s = await _(`${t.slice(0, -5)}/index.html`, t.slice(0, -5), e, n, r)) return s;
2593
2512
  }
2594
- return o ? { asset: { eTag: o, status: 200 }, redirect: null } : (i = await n(`${t}.html`)) ? { asset: { eTag: i, status: 200 }, redirect: null } : (i = await n(`${t}/index.html`)) ? { asset: { eTag: i, status: 200 }, redirect: null } : nt(t, e, n);
2513
+ return o ? { asset: { eTag: o, status: 200 }, redirect: null } : (i = await n(`${t}.html`)) ? { asset: { eTag: i, status: 200 }, redirect: null } : (i = await n(`${t}/index.html`)) ? { asset: { eTag: i, status: 200 }, redirect: null } : tt(t, e, n);
2595
2514
  };
2596
- var qs = async (t, e, n) => {
2515
+ var Fs = async (t, e, n) => {
2597
2516
  let r = await n(t);
2598
- return r ? { asset: { eTag: r, status: 200 }, redirect: null } : nt(t, e, n);
2517
+ return r ? { asset: { eTag: r, status: 200 }, redirect: null } : tt(t, e, n);
2599
2518
  };
2600
- var nt = async (t, e, n) => {
2519
+ var tt = async (t, e, n) => {
2601
2520
  switch (e.not_found_handling) {
2602
2521
  case "single-page-application": {
2603
2522
  let r = await n("/index.html");
@@ -2620,26 +2539,26 @@ var nt = async (t, e, n) => {
2620
2539
  var _ = async (t, e, n, r, s) => {
2621
2540
  if (s) return null;
2622
2541
  if (!await r(e)) {
2623
- let i = await tt(e, n, r, true);
2542
+ let i = await et(e, n, r, true);
2624
2543
  if (i?.asset && i.asset.eTag === await r(t)) return { asset: null, redirect: e };
2625
2544
  }
2626
2545
  return null;
2627
2546
  };
2628
- var Yt = (t) => t.split("/").map((e) => {
2547
+ var Ft = (t) => t.split("/").map((e) => {
2629
2548
  try {
2630
2549
  return decodeURIComponent(e);
2631
2550
  } catch {
2632
2551
  return e;
2633
2552
  }
2634
2553
  }).join("/");
2635
- var Ws = (t) => t.split("/").map((e) => {
2554
+ var $s = (t) => t.split("/").map((e) => {
2636
2555
  try {
2637
2556
  return encodeURIComponent(e);
2638
2557
  } catch {
2639
2558
  return e;
2640
2559
  }
2641
2560
  }).join("/");
2642
- async function fr(t, e, n, r = 1) {
2561
+ async function ar(t, e, n, r = 1) {
2643
2562
  let s = 0;
2644
2563
  for (; s <= r; ) try {
2645
2564
  let i = await t.getWithMetadata(e, { type: "stream", cacheTtl: 31536e3 });
@@ -2656,17 +2575,13 @@ async function fr(t, e, n, r = 1) {
2656
2575
  await new Promise((o) => setTimeout(o, Math.pow(2, s++) * 1e3));
2657
2576
  }
2658
2577
  }
2659
- var pr = class extends zs {
2578
+ var cr = class extends Hs {
2660
2579
  async fetch(t) {
2661
- let e, n = new Ze(this.env.ANALYTICS), r = new se(this.env.UNSAFE_PERFORMANCE), s = r.now();
2580
+ let e, n = new Ke(this.env.ANALYTICS), r = new re(this.env.UNSAFE_PERFORMANCE), s = r.now();
2662
2581
  try {
2663
- this.env.JAEGER || (this.env.JAEGER = ir()), e = sr(t, this.ctx, this.env.SENTRY_DSN, this.env.SENTRY_ACCESS_CLIENT_ID, this.env.SENTRY_ACCESS_CLIENT_SECRET, this.env.COLO_METADATA, this.env.VERSION_METADATA, this.env.CONFIG?.account_id, this.env.CONFIG?.script_id);
2664
- let i = Ht(this.env.CONFIG), o = t.headers.get("user-agent") ?? "UA UNKNOWN", a = new URL(t.url);
2665
- return this.env.COLO_METADATA && this.env.VERSION_METADATA && this.env.CONFIG && n.setData({ accountId: this.env.CONFIG.account_id, scriptId: this.env.CONFIG.script_id, coloId: this.env.COLO_METADATA.coloId, metalId: this.env.COLO_METADATA.metalId, coloTier: this.env.COLO_METADATA.coloTier, coloRegion: this.env.COLO_METADATA.coloRegion, version: this.env.VERSION_METADATA.tag, hostname: a.hostname, htmlHandling: i.html_handling, notFoundHandling: i.not_found_handling, userAgent: o }), await this.env.JAEGER.enterSpan("handleRequest", async (c) => {
2666
- c.setTags({ hostname: a.hostname, eyeballPath: a.pathname, env: this.env.ENVIRONMENT, version: this.env.VERSION_METADATA?.id });
2667
- let u = await lr(t, this.env, i, this.unstable_exists.bind(this), this.unstable_getByETag.bind(this));
2668
- return n.setData({ status: u.status }), u;
2669
- });
2582
+ this.env.JAEGER || (this.env.JAEGER = er()), e = Qn(t, this.ctx, this.env.SENTRY_DSN, this.env.SENTRY_ACCESS_CLIENT_ID, this.env.SENTRY_ACCESS_CLIENT_SECRET, this.env.COLO_METADATA, this.env.CONFIG?.account_id, this.env.CONFIG?.script_id);
2583
+ let i = Gt(this.env.CONFIG), o = t.headers.get("user-agent") ?? "UA UNKNOWN", a = new URL(t.url);
2584
+ return this.env.COLO_METADATA && this.env.VERSION_METADATA && this.env.CONFIG && n.setData({ accountId: this.env.CONFIG.account_id, scriptId: this.env.CONFIG.script_id, coloId: this.env.COLO_METADATA.coloId, metalId: this.env.COLO_METADATA.metalId, coloTier: this.env.COLO_METADATA.coloTier, coloRegion: this.env.COLO_METADATA.coloRegion, version: this.env.VERSION_METADATA.id, hostname: a.hostname, htmlHandling: i.html_handling, notFoundHandling: i.not_found_handling, userAgent: o }), await this.env.JAEGER.enterSpan("handleRequest", async (c) => (c.setTags({ hostname: a.hostname, eyeballPath: a.pathname, env: this.env.ENVIRONMENT, version: this.env.VERSION_METADATA?.id }), or(t, this.env, i, this.unstable_exists.bind(this), this.unstable_getByETag.bind(this))));
2670
2585
  } catch (i) {
2671
2586
  return this.handleError(e, n, i);
2672
2587
  } finally {
@@ -2675,10 +2590,10 @@ var pr = class extends zs {
2675
2590
  }
2676
2591
  handleError(t, e, n) {
2677
2592
  try {
2678
- let r = new $(n);
2593
+ let r = new F(n);
2679
2594
  return t && t.captureException(n), n instanceof Error && e.setData({ error: n.message }), r;
2680
2595
  } catch (r) {
2681
- return console.error("Error handling error", r), new $(r);
2596
+ return console.error("Error handling error", r), new F(r);
2682
2597
  }
2683
2598
  }
2684
2599
  submitMetrics(t, e, n) {
@@ -2689,11 +2604,11 @@ var pr = class extends zs {
2689
2604
  }
2690
2605
  }
2691
2606
  async unstable_canFetch(t) {
2692
- let e = new URL(t.url), n = Yt(e.pathname);
2693
- return await tt(n, { ...Ht(this.env.CONFIG), not_found_handling: "none" }, this.unstable_exists.bind(this)) !== null;
2607
+ let e = new URL(t.url), n = Ft(e.pathname);
2608
+ return await et(n, { ...Gt(this.env.CONFIG), not_found_handling: "none" }, this.unstable_exists.bind(this)) !== null;
2694
2609
  }
2695
2610
  async unstable_getByETag(t) {
2696
- let e = await fr(this.env.ASSETS_KV_NAMESPACE, t);
2611
+ let e = await ar(this.env.ASSETS_KV_NAMESPACE, t);
2697
2612
  if (!e || !e.value) throw new Error(`Requested asset ${t} exists in the asset manifest but not in the KV namespace.`);
2698
2613
  return { readableStream: e.value, contentType: e.metadata?.contentType ?? "application/octet-stream" };
2699
2614
  }
@@ -2702,17 +2617,12 @@ var pr = class extends zs {
2702
2617
  return e ? this.unstable_getByETag(e) : null;
2703
2618
  }
2704
2619
  async unstable_exists(t) {
2705
- let e = new et(this.env.EXPERIMENT_ANALYTICS), n = new se(this.env.UNSAFE_PERFORMANCE), r = 0.5, s = "binary";
2620
+ let e = new Qe(this.env.EXPERIMENT_ANALYTICS), n = new re(this.env.UNSAFE_PERFORMANCE), r = 0, s = "binary";
2706
2621
  Math.random() < r && (s = "interpolation"), e.setData({ manifestReadMethod: s }), this.env.COLO_METADATA && this.env.VERSION_METADATA && this.env.CONFIG && e.setData({ accountId: this.env.CONFIG.account_id, experimentName: "manifest-read-timing" });
2707
2622
  let i = n.now();
2708
2623
  try {
2709
- let o = new Qe(this.env.ASSETS_MANIFEST);
2710
- if (s === "interpolation") try {
2711
- return await o.getWithInterpolationSearch(t);
2712
- } catch {
2713
- return e.setData({ manifestReadMethod: "binary-fallback" }), await o.getWithBinarySearch(t);
2714
- }
2715
- else return await o.getWithBinarySearch(t);
2624
+ let o = new Ze(this.env.ASSETS_MANIFEST);
2625
+ return s === "interpolation" ? await o.getWithInterpolationSearch(t) : await o.getWithBinarySearch(t);
2716
2626
  } finally {
2717
2627
  e.setData({ manifestReadTime: n.now() - i }), e.write();
2718
2628
  }
@@ -2727,7 +2637,7 @@ var UNKNOWN_HOST = "http://localhost";
2727
2637
  var MODULE_PATTERN = `__CLOUDFLARE_MODULE__(${MODULE_TYPES.join("|")})__(.*?)__`;
2728
2638
 
2729
2639
  // src/asset-workers/asset-worker.ts
2730
- var CustomAssetWorker = class extends pr {
2640
+ var CustomAssetWorker = class extends cr {
2731
2641
  async fetch(request) {
2732
2642
  const response = await super.fetch(request);
2733
2643
  const modifiedResponse = new Response(response.body, response);