@cloudflare/vite-plugin 0.0.0-a2f695b96 → 0.0.0-a783c2d27

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.
@@ -11,7 +11,7 @@ var Ft = (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 Gt = (t, e, n, r) => (Bt(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n);
14
+ var $t = (t, e, n, r) => (Bt(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n);
15
15
  var _e = class {
16
16
  constructor(e) {
17
17
  this.performanceTimer = e;
@@ -20,19 +20,19 @@ var _e = class {
20
20
  return this.performanceTimer ? this.performanceTimer.timeOrigin + this.performanceTimer.now() : Date.now();
21
21
  }
22
22
  };
23
- var $t = Object.prototype.toString;
23
+ var Gt = Object.prototype.toString;
24
24
  function L(t) {
25
- switch ($t.call(t)) {
25
+ switch (Gt.call(t)) {
26
26
  case "[object Error]":
27
27
  case "[object Exception]":
28
28
  case "[object DOMException]":
29
29
  return true;
30
30
  default:
31
- return O(t, Error);
31
+ return v(t, Error);
32
32
  }
33
33
  }
34
34
  function Ht(t, e) {
35
- return $t.call(t) === `[object ${e}]`;
35
+ return Gt.call(t) === `[object ${e}]`;
36
36
  }
37
37
  function q(t) {
38
38
  return Ht(t, "String");
@@ -44,10 +44,10 @@ function x(t) {
44
44
  return Ht(t, "Object");
45
45
  }
46
46
  function et(t) {
47
- return typeof Event < "u" && O(t, Event);
47
+ return typeof Event < "u" && v(t, Event);
48
48
  }
49
49
  function tt(t) {
50
- return typeof Element < "u" && O(t, Element);
50
+ return typeof Element < "u" && v(t, Element);
51
51
  }
52
52
  function B(t) {
53
53
  return !!(t && t.then && typeof t.then == "function");
@@ -58,7 +58,7 @@ function nt(t) {
58
58
  function ee(t) {
59
59
  return typeof t == "number" && t !== t;
60
60
  }
61
- function O(t, e) {
61
+ function v(t, e) {
62
62
  try {
63
63
  return t instanceof e;
64
64
  } catch {
@@ -209,7 +209,7 @@ function Te(t) {
209
209
  if (L(t)) return { message: t.message, name: t.name, stack: t.stack, ...zt(t) };
210
210
  if (et(t)) {
211
211
  let e = { type: t.type, target: Wt(t.target), currentTarget: Wt(t.currentTarget), ...zt(t) };
212
- return typeof CustomEvent < "u" && O(t, CustomEvent) && (e.detail = t.detail), e;
212
+ return typeof CustomEvent < "u" && v(t, CustomEvent) && (e.detail = t.detail), e;
213
213
  } else return t;
214
214
  }
215
215
  function Wt(t) {
@@ -633,7 +633,7 @@ function ue(t) {
633
633
  }
634
634
  function D(t, e = 100, n = 1 / 0) {
635
635
  try {
636
- return ve("", t, e, n);
636
+ return Oe("", t, e, n);
637
637
  } catch (r) {
638
638
  return { ERROR: `**non-serializable** (${r})` };
639
639
  }
@@ -642,7 +642,7 @@ function V(t, e = 3, n = 100 * 1024) {
642
642
  let r = D(t, e);
643
643
  return Dr(r) > n ? V(t, e - 1, n) : r;
644
644
  }
645
- function ve(t, e, n = 1 / 0, r = 1 / 0, s = mn()) {
645
+ function Oe(t, e, n = 1 / 0, r = 1 / 0, s = mn()) {
646
646
  let [i, o] = s;
647
647
  if (e == null || ["number", "boolean", "string"].includes(typeof e) && !ee(e)) return e;
648
648
  let a = Ir(t, e);
@@ -654,7 +654,7 @@ function ve(t, e, n = 1 / 0, r = 1 / 0, s = mn()) {
654
654
  let u = e;
655
655
  if (u && typeof u.toJSON == "function") try {
656
656
  let m = u.toJSON();
657
- return ve("", m, c - 1, r, s);
657
+ return Oe("", m, c - 1, r, s);
658
658
  } catch {
659
659
  }
660
660
  let l = Array.isArray(e) ? [] : {}, d = 0, p = Te(e);
@@ -664,8 +664,8 @@ function ve(t, e, n = 1 / 0, r = 1 / 0, s = mn()) {
664
664
  l[m] = "[MaxProperties ~]";
665
665
  break;
666
666
  }
667
- let v = p[m];
668
- l[m] = ve(m, v, c - 1, r, s), d++;
667
+ let O = p[m];
668
+ l[m] = Oe(m, O, c - 1, r, s), d++;
669
669
  }
670
670
  return o(e), l;
671
671
  }
@@ -699,12 +699,12 @@ function Dr(t) {
699
699
  return Ar(JSON.stringify(t));
700
700
  }
701
701
  var wr = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;
702
- function vr(t) {
702
+ function Or(t) {
703
703
  let e = t.length > 1024 ? `<truncated>${t.slice(-1024)}` : t, n = wr.exec(e);
704
704
  return n ? n.slice(1) : [];
705
705
  }
706
706
  function lt(t, e) {
707
- let n = vr(t)[2];
707
+ let n = Or(t)[2];
708
708
  return e && n.slice(e.length * -1) === e && (n = n.slice(0, n.length - e.length)), n;
709
709
  }
710
710
  var k;
@@ -835,7 +835,7 @@ function ft(t) {
835
835
  }
836
836
  var _n = N();
837
837
  var mt = { nowSeconds: () => Date.now() / 1e3 };
838
- function Or() {
838
+ function vr() {
839
839
  let { performance: t } = _n;
840
840
  if (!t || !t.now) return;
841
841
  let e = Date.now() - t.now();
@@ -848,10 +848,10 @@ function kr() {
848
848
  return;
849
849
  }
850
850
  }
851
- var pt = fn() ? kr() : Or();
851
+ var pt = fn() ? kr() : vr();
852
852
  var hn = pt === void 0 ? mt : { nowSeconds: () => (pt.timeOrigin + pt.now()) / 1e3 };
853
- var G = mt.nowSeconds.bind(mt);
854
- var $ = hn.nowSeconds.bind(hn);
853
+ var $ = mt.nowSeconds.bind(mt);
854
+ var G = hn.nowSeconds.bind(hn);
855
855
  var de;
856
856
  var Cr = (() => {
857
857
  let { performance: t } = _n;
@@ -874,7 +874,7 @@ function gt(t, e) {
874
874
  let [n, r] = t;
875
875
  return [n, [...r, e]];
876
876
  }
877
- function Oe(t, e) {
877
+ function ve(t, e) {
878
878
  let n = t[1];
879
879
  for (let r of n) {
880
880
  let s = r[0].type;
@@ -1006,11 +1006,11 @@ function K(t, e, n, r = 0) {
1006
1006
  });
1007
1007
  }
1008
1008
  function Tn(t) {
1009
- let e = $(), n = { sid: g(), init: true, timestamp: e, started: e, duration: 0, status: "ok", errors: 0, ignoreDuration: false, toJSON: () => Br(n) };
1009
+ let e = G(), n = { sid: g(), init: true, timestamp: e, started: e, duration: 0, status: "ok", errors: 0, ignoreDuration: false, toJSON: () => Br(n) };
1010
1010
  return t && C(n, t), n;
1011
1011
  }
1012
1012
  function C(t, e = {}) {
1013
- 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 || $(), 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;
1013
+ 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 || G(), 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;
1014
1014
  else if (typeof e.duration == "number") t.duration = e.duration;
1015
1015
  else {
1016
1016
  let n = t.timestamp - t.started;
@@ -1106,7 +1106,7 @@ var w = class {
1106
1106
  addBreadcrumb(e, n) {
1107
1107
  let r = typeof n == "number" ? n : Fr;
1108
1108
  if (r <= 0) return this;
1109
- let s = { timestamp: G(), ...e }, i = this._breadcrumbs;
1109
+ let s = { timestamp: $(), ...e }, i = this._breadcrumbs;
1110
1110
  return i.push(s), this._breadcrumbs = i.length > r ? i.slice(-r) : i, this._notifyScopeListeners(), this;
1111
1111
  }
1112
1112
  getLastBreadcrumb() {
@@ -1163,7 +1163,7 @@ function Rn() {
1163
1163
  return { traceId: g(), spanId: g().substring(16) };
1164
1164
  }
1165
1165
  var xn = 4;
1166
- var Gr = 100;
1166
+ var $r = 100;
1167
1167
  var H = class {
1168
1168
  constructor(e, n = new w(), r = xn) {
1169
1169
  this._version = r, this._stack = [{ scope: n }], e && this.bindClient(e);
@@ -1226,9 +1226,9 @@ var H = class {
1226
1226
  addBreadcrumb(e, n) {
1227
1227
  let { scope: r, client: s } = this.getStackTop();
1228
1228
  if (!s) return;
1229
- let { beforeBreadcrumb: i = null, maxBreadcrumbs: o = Gr } = s.getOptions && s.getOptions() || {};
1229
+ let { beforeBreadcrumb: i = null, maxBreadcrumbs: o = $r } = s.getOptions && s.getOptions() || {};
1230
1230
  if (o <= 0) return;
1231
- let c = { timestamp: G(), ...e }, u = i ? ye(() => i(c, n)) : c;
1231
+ let c = { timestamp: $(), ...e }, u = i ? ye(() => i(c, n)) : c;
1232
1232
  u !== null && (s.emit && s.emit("beforeAddBreadcrumb", u, n), r.addBreadcrumb(u, o));
1233
1233
  }
1234
1234
  setUser(e) {
@@ -1327,9 +1327,9 @@ function R() {
1327
1327
  let e = t.__SENTRY__.acs.getCurrentHub();
1328
1328
  if (e) return e;
1329
1329
  }
1330
- return $r(t);
1330
+ return Gr(t);
1331
1331
  }
1332
- function $r(t = Y()) {
1332
+ function Gr(t = Y()) {
1333
1333
  return (!Hr(t) || Pe(t).isOlderThan(xn)) && At(t, new H()), Pe(t);
1334
1334
  }
1335
1335
  function Hr(t) {
@@ -1368,7 +1368,7 @@ var Me = class {
1368
1368
  };
1369
1369
  var X = class {
1370
1370
  constructor(e = {}) {
1371
- this.traceId = e.traceId || g(), this.spanId = e.spanId || g().substring(16), this.startTimestamp = e.startTimestamp || $(), 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);
1371
+ this.traceId = e.traceId || g(), this.spanId = e.spanId || g().substring(16), this.startTimestamp = e.startTimestamp || G(), 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);
1372
1372
  }
1373
1373
  get name() {
1374
1374
  return this.description || "";
@@ -1409,7 +1409,7 @@ var X = class {
1409
1409
  let { logMessage: n } = this.transaction.metadata.spanMetadata[this.spanId];
1410
1410
  n && f.log(n.replace("Starting", "Finishing"));
1411
1411
  }
1412
- this.endTimestamp = typeof e == "number" ? e : $();
1412
+ this.endTimestamp = typeof e == "number" ? e : G();
1413
1413
  }
1414
1414
  toTraceparent() {
1415
1415
  return ht(this.traceId, this.spanId, this.sampled);
@@ -1550,7 +1550,7 @@ The transaction will not be sampled. Please use the ${s} instrumentation to star
1550
1550
  let o = new Ue(t, this);
1551
1551
  return o = wn(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;
1552
1552
  }
1553
- function vn() {
1553
+ function On() {
1554
1554
  let t = Y();
1555
1555
  t.__SENTRY__ && (t.__SENTRY__.extensions = t.__SENTRY__.extensions || {}, t.__SENTRY__.extensions.startTransaction || (t.__SENTRY__.extensions.startTransaction = Wr), t.__SENTRY__.extensions.traceHeaders || (t.__SENTRY__.extensions.traceHeaders = qr), An());
1556
1556
  }
@@ -1599,7 +1599,7 @@ function Jr(t) {
1599
1599
  function Kr(t, e) {
1600
1600
  return it({ sentry_key: t.publicKey, sentry_version: zr, ...e && { sentry_client: `${e.name}/${e.version}` } });
1601
1601
  }
1602
- function On(t, e = {}) {
1602
+ function vn(t, e = {}) {
1603
1603
  let n = typeof e == "string" ? e : e.tunnel, r = typeof e == "string" || !e._metadata ? void 0 : e._metadata.sdk;
1604
1604
  return n || `${Jr(t)}?${Kr(t, r)}`;
1605
1605
  }
@@ -1641,10 +1641,10 @@ function wt(t) {
1641
1641
  function Mn(t, e) {
1642
1642
  let n = {};
1643
1643
  return e.forEach((r) => {
1644
- r && vt(t, r, n);
1644
+ r && Ot(t, r, n);
1645
1645
  }), n;
1646
1646
  }
1647
- function vt(t, e, n) {
1647
+ function Ot(t, e, n) {
1648
1648
  if (n[e.name] = e, Pn.indexOf(e.name) === -1 && (e.setupOnce(Sn, R), Pn.push(e.name)), t.on && typeof e.preprocessEvent == "function") {
1649
1649
  let r = e.preprocessEvent.bind(e);
1650
1650
  t.on("preprocessEvent", (s, i) => r(s, i, t));
@@ -1660,7 +1660,7 @@ function Qr(t, e) {
1660
1660
  return -1;
1661
1661
  }
1662
1662
  function Ln(t, e, n, r, s) {
1663
- let { normalizeDepth: i = 3, normalizeMaxBreadth: o = 1e3 } = t, a = { ...e, event_id: e.event_id || n.event_id || g(), timestamp: e.timestamp || G() }, c = n.integrations || t.integrations.map((p) => p.name);
1663
+ let { normalizeDepth: i = 3, normalizeMaxBreadth: o = 1e3 } = t, a = { ...e, event_id: e.event_id || n.event_id || g(), timestamp: e.timestamp || $() }, c = n.integrations || t.integrations.map((p) => p.name);
1664
1664
  es(a, t), rs(a, c), e.type === void 0 && ts(a, t.stackParser);
1665
1665
  let u = r;
1666
1666
  n.captureContext && (u = w.clone(u).update(n.captureContext));
@@ -1738,7 +1738,7 @@ var Bn = "Not capturing exception because it's already been captured.";
1738
1738
  var Be = class {
1739
1739
  constructor(e) {
1740
1740
  if (this._options = e, this._integrations = {}, this._integrationsInitialized = false, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn = Se(e.dsn) : (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn("No DSN provided, client will not send events."), this._dsn) {
1741
- let n = On(this._dsn, e);
1741
+ let n = vn(this._dsn, e);
1742
1742
  this._transport = e.transport({ recordDroppedEvent: this.recordDroppedEvent.bind(this), ...e.transportOptions, url: n });
1743
1743
  }
1744
1744
  }
@@ -1810,7 +1810,7 @@ var Be = class {
1810
1810
  }
1811
1811
  }
1812
1812
  addIntegration(e) {
1813
- vt(this, e, this._integrations);
1813
+ Ot(this, e, this._integrations);
1814
1814
  }
1815
1815
  sendEvent(e, n = {}) {
1816
1816
  this.emit("beforeSendEvent", e, n);
@@ -1883,7 +1883,7 @@ var Be = class {
1883
1883
  });
1884
1884
  }
1885
1885
  _processEvent(e, n, r) {
1886
- let s = this.getOptions(), { sampleRate: i } = s, o = Gn(e), a = Fn(e), c = e.type || "error", u = `before send for type \`${c}\``;
1886
+ let s = this.getOptions(), { sampleRate: i } = s, o = $n(e), a = Fn(e), c = e.type || "error", u = `before send for type \`${c}\``;
1887
1887
  if (a && typeof i == "number" && Math.random() > i) return this.recordDroppedEvent("sample_rate", "error", e), F(new T(`Discarding event because it's not included in the random sample (sampling rate = ${i})`, "log"));
1888
1888
  let l = c === "replay_event" ? "replay" : c;
1889
1889
  return this._prepareEvent(e, n, r).then((d) => {
@@ -1897,8 +1897,8 @@ var Be = class {
1897
1897
  !o && p && this._updateSessionFromEvent(p, d);
1898
1898
  let m = d.transaction_info;
1899
1899
  if (o && m && d.transaction !== e.transaction) {
1900
- let v = "custom";
1901
- d.transaction_info = { ...m, source: v };
1900
+ let O = "custom";
1901
+ d.transaction_info = { ...m, source: O };
1902
1902
  }
1903
1903
  return this.sendEvent(d, n), d;
1904
1904
  }).then(null, (d) => {
@@ -1936,15 +1936,15 @@ function is(t, e) {
1936
1936
  }
1937
1937
  function os(t, e, n) {
1938
1938
  let { beforeSend: r, beforeSendTransaction: s } = t;
1939
- return Fn(e) && r ? r(e, n) : Gn(e) && s ? s(e, n) : e;
1939
+ return Fn(e) && r ? r(e, n) : $n(e) && s ? s(e, n) : e;
1940
1940
  }
1941
1941
  function Fn(t) {
1942
1942
  return t.type === void 0;
1943
1943
  }
1944
- function Gn(t) {
1944
+ function $n(t) {
1945
1945
  return t.type === "transaction";
1946
1946
  }
1947
- function $n(t, e, n, r, s) {
1947
+ function Gn(t, e, n, r, s) {
1948
1948
  let i = { sent_at: (/* @__PURE__ */ new Date()).toISOString() };
1949
1949
  n && n.sdk && (i.sdk = { name: n.sdk.name, version: n.sdk.version }), r && s && (i.dsn = M(s)), e && (i.trace = E(e));
1950
1950
  let o = as(t);
@@ -1955,7 +1955,7 @@ function as(t) {
1955
1955
  }
1956
1956
  var fe = class extends Be {
1957
1957
  constructor(e) {
1958
- vn(), super(e);
1958
+ On(), super(e);
1959
1959
  }
1960
1960
  eventFromException(e, n) {
1961
1961
  return b(xt(R, this._options.stackParser, e, n));
@@ -1991,7 +1991,7 @@ var fe = class extends Be {
1991
1991
  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 });
1992
1992
  let [l, d] = this._getTraceInfoFromScope(r);
1993
1993
  d && (u.contexts = { trace: d });
1994
- let p = $n(u, l, this.getSdkMetadata(), c, this.getDsn());
1994
+ let p = Gn(u, l, this.getSdkMetadata(), c, this.getDsn());
1995
1995
  return (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.info("Sending checkin:", e.monitorSlug, e.status), this._sendEnvelope(p), s;
1996
1996
  }
1997
1997
  _captureRequestSession() {
@@ -2009,21 +2009,21 @@ var fe = class extends Be {
2009
2009
  }
2010
2010
  };
2011
2011
  var cs = 30;
2012
- function Ot(t, e, n = ft(t.bufferSize || cs)) {
2012
+ function vt(t, e, n = ft(t.bufferSize || cs)) {
2013
2013
  let r = {}, s = (o) => n.drain(o);
2014
2014
  function i(o) {
2015
2015
  let a = [];
2016
- if (Oe(o, (d, p) => {
2016
+ if (ve(o, (d, p) => {
2017
2017
  let m = ke(p);
2018
2018
  if (Tt(r, m)) {
2019
- let v = Hn(d, p);
2020
- t.recordDroppedEvent("ratelimit_backoff", m, v);
2019
+ let O = Hn(d, p);
2020
+ t.recordDroppedEvent("ratelimit_backoff", m, O);
2021
2021
  } else a.push(d);
2022
2022
  }), a.length === 0) return b();
2023
2023
  let c = U(o[0], a), u = (d) => {
2024
- Oe(c, (p, m) => {
2025
- let v = Hn(p, m);
2026
- t.recordDroppedEvent(d, ke(m), v);
2024
+ ve(c, (p, m) => {
2025
+ let O = Hn(p, m);
2026
+ t.recordDroppedEvent(d, ke(m), O);
2027
2027
  });
2028
2028
  }, l = () => e({ body: Et(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 = bt(r, d), d), (d) => {
2029
2029
  throw u("network_error"), d;
@@ -2105,12 +2105,12 @@ var He = class {
2105
2105
  var Fe = He;
2106
2106
  he(Fe, "id", "LinkedErrors");
2107
2107
  function _s(t, e, n, r) {
2108
- if (!n.exception || !n.exception.values || !r || !O(r.originalException, Error)) return n;
2108
+ if (!n.exception || !n.exception.values || !r || !v(r.originalException, Error)) return n;
2109
2109
  let s = zn(t, e, r.originalException);
2110
2110
  return n.exception.values = [...s, ...n.exception.values], n;
2111
2111
  }
2112
2112
  function zn(t, e, n, r = []) {
2113
- if (!O(n.cause, Error) || r.length + 1 >= e) return r;
2113
+ if (!v(n.cause, Error) || r.length + 1 >= e) return r;
2114
2114
  let s = Wn(t, n.cause);
2115
2115
  return zn(t, e, n.cause, [s, ...r]);
2116
2116
  }
@@ -2120,7 +2120,7 @@ var Ye = class {
2120
2120
  constructor(e = {}) {
2121
2121
  he(this, "name", Ye.id);
2122
2122
  Ft(this, Q, void 0);
2123
- Gt(this, Q, { ...gs, ...e });
2123
+ $t(this, Q, { ...gs, ...e });
2124
2124
  }
2125
2125
  setupOnce(e, n) {
2126
2126
  n().getClient() && e((s) => {
@@ -2129,8 +2129,8 @@ var Ye = class {
2129
2129
  });
2130
2130
  }
2131
2131
  };
2132
- var Ge = Ye;
2133
- Q = /* @__PURE__ */ new WeakMap(), he(Ge, "id", "RequestData");
2132
+ var $e = Ye;
2133
+ Q = /* @__PURE__ */ new WeakMap(), he($e, "id", "RequestData");
2134
2134
  function Es(t, e, n) {
2135
2135
  let r = e.headers.get("CF-Connecting-IP"), { allowedIps: s } = n, i = { ...t };
2136
2136
  return !("ip_address" in t) && r && s !== void 0 && Ss(r, s) && (i.ip_address = r), Object.keys(i).length > 0 ? i : void 0;
@@ -2243,11 +2243,11 @@ function Ns(t) {
2243
2243
  return F(r);
2244
2244
  }
2245
2245
  }
2246
- return Ot(t, e);
2246
+ return vt(t, e);
2247
2247
  }
2248
- var $e = class extends H {
2248
+ var Ge = class extends H {
2249
2249
  constructor(e) {
2250
- if (e.defaultIntegrations = e.defaultIntegrations === false ? [] : [...Array.isArray(e.defaultIntegrations) ? e.defaultIntegrations : [new Ge(e.requestDataOptions), new Fe()]], e.release === void 0) {
2250
+ if (e.defaultIntegrations = e.defaultIntegrations === false ? [] : [...Array.isArray(e.defaultIntegrations) ? e.defaultIntegrations : [new $e(e.requestDataOptions), new Fe()]], e.release === void 0) {
2251
2251
  let r = ls();
2252
2252
  r !== void 0 && (e.release = r);
2253
2253
  }
@@ -2264,10 +2264,12 @@ var $e = class extends H {
2264
2264
  return e.status === "in_progress" && this.setContext("monitor", { slug: e.monitorSlug }), this.getClient().captureCheckIn(e, n, r);
2265
2265
  }
2266
2266
  };
2267
- function Vn(t, e, n, r, s, i, o, a) {
2267
+ function Vn(t, e, n, r, s) {
2268
2268
  if (!(n && r && s)) return;
2269
- let c = new $e({ 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 } } });
2270
- 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;
2269
+ let i = new Ge({ 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 } } }), o = t.cf?.colo ?? "UNKNOWN";
2270
+ i.setTag("colo", o);
2271
+ let a = t.headers.get("user-agent") ?? "UA UNKNOWN";
2272
+ return i.setUser({ userAgent: a, colo: o }), i;
2271
2273
  }
2272
2274
  var je = class {
2273
2275
  constructor(e) {
@@ -2281,7 +2283,7 @@ var je = class {
2281
2283
  return this.data[e];
2282
2284
  }
2283
2285
  write() {
2284
- 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] });
2286
+ this.readyAnalytics && this.readyAnalytics.logEvent({ version: 1, accountId: 0, indexId: this.data.hostname?.substring(0, 96), 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] });
2285
2287
  }
2286
2288
  };
2287
2289
  var We = class {
@@ -2290,7 +2292,7 @@ var We = class {
2290
2292
  }
2291
2293
  async get(e) {
2292
2294
  let n = await ws(e), r = Pt(new Uint8Array(this.data, 20), n);
2293
- return r ? Os(r) : null;
2295
+ return r ? vs(r) : null;
2294
2296
  }
2295
2297
  };
2296
2298
  var ws = async (t) => {
@@ -2301,7 +2303,7 @@ var Pt = (t, e) => {
2301
2303
  if (t.byteLength === 0) return false;
2302
2304
  let n = t.byteOffset + (t.byteLength / 40 >> 1) * 40, r = new Uint8Array(t.buffer, n, 16);
2303
2305
  if (r.byteLength !== e.byteLength) throw new TypeError("Search value and current value are of different lengths");
2304
- let s = vs(e, r);
2306
+ let s = Os(e, r);
2305
2307
  if (s < 0) {
2306
2308
  let i = t.byteOffset, o = n - t.byteOffset;
2307
2309
  return Pt(new Uint8Array(t.buffer, i, o), e);
@@ -2310,7 +2312,7 @@ var Pt = (t, e) => {
2310
2312
  return Pt(new Uint8Array(t.buffer, i, o), e);
2311
2313
  } else return new Uint8Array(t.buffer, n, 40);
2312
2314
  };
2313
- var vs = (t, e) => {
2315
+ var Os = (t, e) => {
2314
2316
  if (t.byteLength < e.byteLength) return -1;
2315
2317
  if (t.byteLength > e.byteLength) return 1;
2316
2318
  for (let [n, r] of t.entries()) {
@@ -2319,7 +2321,7 @@ var vs = (t, e) => {
2319
2321
  }
2320
2322
  return 0;
2321
2323
  };
2322
- var Os = (t) => [...t.slice(16, 16 + 16)].map((n) => n.toString(16).padStart(2, "0")).join("");
2324
+ var vs = (t) => [...t.slice(16, 16 + 16)].map((n) => n.toString(16).padStart(2, "0")).join("");
2323
2325
  var Mt = (t) => ({ html_handling: t?.html_handling ?? "auto-trailing-slash", not_found_handling: t?.not_found_handling ?? "none", serve_directly: t?.serve_directly ?? true });
2324
2326
  var ze = class extends Response {
2325
2327
  constructor(e, n) {
@@ -2369,8 +2371,8 @@ var Xn = async (t, e, n, r, s) => {
2369
2371
  let l = c.redirect ?? a, d = Ls(l);
2370
2372
  if (d !== i && c.asset || c.redirect) return new Ke(d + o);
2371
2373
  if (!c.asset) return new j(new Error("Unknown action"));
2372
- let p = await e.JAEGER.enterSpan("getByETag", async (rr) => (rr.setTags({ pathname: i, eTag: c.asset.eTag, status: c.asset.status }), await s(c.asset.eTag))), m = Kn(c.asset.eTag, p.contentType, t), v = `"${c.asset.eTag}"`, tr = `W/${v}`, nr = t.headers.get("If-None-Match") || "";
2373
- if ([tr, v].includes(nr)) return new Je(null, { headers: m });
2374
+ let p = await e.JAEGER.enterSpan("getByETag", async (rr) => (rr.setTags({ pathname: i, eTag: c.asset.eTag, status: c.asset.status }), await s(c.asset.eTag))), m = Kn(c.asset.eTag, p.contentType, t), O = `"${c.asset.eTag}"`, tr = `W/${O}`, nr = t.headers.get("If-None-Match") || "";
2375
+ if ([tr, O].includes(nr)) return new Je(null, { headers: m });
2374
2376
  let Lt = u === "HEAD" ? null : p.readableStream;
2375
2377
  switch (c.asset.status) {
2376
2378
  case 404:
@@ -2530,9 +2532,14 @@ var er = class extends Fs {
2530
2532
  async fetch(t) {
2531
2533
  let e, n = new je(this.env.ANALYTICS), r = new _e(this.env.UNSAFE_PERFORMANCE), s = r.now();
2532
2534
  try {
2533
- this.env.JAEGER || (this.env.JAEGER = Qn()), e = Vn(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);
2534
- let i = Mt(this.env.CONFIG), o = t.headers.get("user-agent") ?? "UA UNKNOWN", a = new URL(t.url);
2535
- 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 }), 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 }), Xn(t, this.env, i, this.unstable_exists.bind(this), this.unstable_getByETag.bind(this)))).catch((c) => this.handleError(e, n, c)).finally(() => this.submitMetrics(n, r, s));
2535
+ this.env.JAEGER || (this.env.JAEGER = Qn()), e = Vn(t, this.ctx, this.env.SENTRY_DSN, this.env.SENTRY_ACCESS_CLIENT_ID, this.env.SENTRY_ACCESS_CLIENT_SECRET);
2536
+ let i = Mt(this.env.CONFIG), o = t.headers.get("user-agent") ?? "UA UNKNOWN";
2537
+ if (e) {
2538
+ let c = this.env.COLO_METADATA.coloId;
2539
+ e.setTag("colo", this.env.COLO_METADATA.coloId), e.setTag("metal", this.env.COLO_METADATA.metalId), e.setUser({ userAgent: o, colo: c });
2540
+ }
2541
+ let a = new URL(t.url);
2542
+ return this.env.COLO_METADATA && this.env.VERSION_METADATA && n.setData({ 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 }), 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 }), Xn(t, this.env, i, this.unstable_exists.bind(this), this.unstable_getByETag.bind(this)))).catch((c) => this.handleError(e, n, c)).finally(() => this.submitMetrics(n, r, s));
2536
2543
  } catch (i) {
2537
2544
  let o = this.handleError(e, n, i);
2538
2545
  return this.submitMetrics(n, r, s), o;