@tracelog/lib 2.7.0 → 2.7.1-rc.96.5
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.
- package/README.md +3 -3
- package/dist/browser/tracelog.esm.js +415 -394
- package/dist/browser/tracelog.esm.js.map +1 -1
- package/dist/browser/tracelog.js +2 -1
- package/dist/browser/tracelog.js.map +1 -1
- package/dist/public-api.cjs +2 -2
- package/dist/public-api.cjs.map +1 -1
- package/dist/public-api.d.mts +10 -5
- package/dist/public-api.d.ts +10 -5
- package/dist/public-api.js +2 -2
- package/dist/public-api.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const b = "data-tlog",
|
|
1
|
+
const as = 9e5;
|
|
2
|
+
const ls = 120, cs = 49152, us = 100, ds = 500, hs = 200;
|
|
3
|
+
const fs = 1e3, ms = 500, gs = 1e3;
|
|
4
|
+
const b = "data-tlog", wt = [
|
|
5
5
|
"button",
|
|
6
6
|
"a",
|
|
7
7
|
'input[type="button"]',
|
|
@@ -33,7 +33,7 @@ const b = "data-tlog", _t = [
|
|
|
33
33
|
".menu-item",
|
|
34
34
|
"[data-testid]",
|
|
35
35
|
'[tabindex="0"]'
|
|
36
|
-
],
|
|
36
|
+
], bt = ["utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"], At = [
|
|
37
37
|
"token",
|
|
38
38
|
"auth",
|
|
39
39
|
"key",
|
|
@@ -72,15 +72,15 @@ const m = {
|
|
|
72
72
|
INVALID_VIEWPORT_COOLDOWN_PERIOD: "Viewport cooldownPeriod must be a non-negative number",
|
|
73
73
|
INVALID_VIEWPORT_MAX_TRACKED_ELEMENTS: "Viewport maxTrackedElements must be a positive number",
|
|
74
74
|
INVALID_SEND_INTERVAL: "Send interval must be between 1000ms (1 second) and 60000ms (60 seconds)"
|
|
75
|
-
},
|
|
75
|
+
}, Lt = [
|
|
76
76
|
/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
|
|
77
77
|
/javascript:/gi,
|
|
78
78
|
/on\w+\s*=/gi,
|
|
79
79
|
/<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi,
|
|
80
80
|
/<embed\b[^>]*>/gi,
|
|
81
81
|
/<object\b[^<]*(?:(?!<\/object>)<[^<]*)*<\/object>/gi
|
|
82
|
-
], I = "tlog",
|
|
83
|
-
var B = /* @__PURE__ */ ((s) => (s.Localhost = "localhost:8080", s.Fail = "localhost:9999", s))(B || {}), L = /* @__PURE__ */ ((s) => (s.Mobile = "mobile", s.Tablet = "tablet", s.Desktop = "desktop", s.Unknown = "unknown", s))(L || {}),
|
|
82
|
+
], I = "tlog", G = `${I}:qa_mode`, Se = `${I}:uid`, rt = "tlog_mode", Ve = "qa", Ue = "qa_off", Mt = (s) => s ? `${I}:${s}:queue` : `${I}:queue`, Ct = (s) => s ? `${I}:${s}:session` : `${I}:session`, Rt = (s) => s ? `${I}:${s}:broadcast` : `${I}:broadcast`, He = (s, e) => `${I}:${s}:session_counts:${e}`, Fe = 10080 * 60 * 1e3, xe = `${I}:session_counts_last_cleanup`, $e = 3600 * 1e3, de = (s) => s ? `${I}:${s}:identity` : `${I}:identity`, H = `${I}:pending_identity`;
|
|
83
|
+
var B = /* @__PURE__ */ ((s) => (s.Localhost = "localhost:8080", s.Fail = "localhost:9999", s))(B || {}), L = /* @__PURE__ */ ((s) => (s.Mobile = "mobile", s.Tablet = "tablet", s.Desktop = "desktop", s.Unknown = "unknown", s))(L || {}), pe = /* @__PURE__ */ ((s) => (s.EVENT = "event", s.QUEUE = "queue", s))(pe || {});
|
|
84
84
|
class N extends Error {
|
|
85
85
|
constructor(e, t) {
|
|
86
86
|
super(e), this.statusCode = t, this.name = "PermanentError", Error.captureStackTrace && Error.captureStackTrace(this, N);
|
|
@@ -92,38 +92,38 @@ class O extends Error {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
var d = /* @__PURE__ */ ((s) => (s.PAGE_VIEW = "page_view", s.CLICK = "click", s.SCROLL = "scroll", s.SESSION_START = "session_start", s.CUSTOM = "custom", s.WEB_VITALS = "web_vitals", s.ERROR = "error", s.VIEWPORT_VISIBLE = "viewport_visible", s))(d || {}), ee = /* @__PURE__ */ ((s) => (s.UP = "up", s.DOWN = "down", s))(ee || {}), W = /* @__PURE__ */ ((s) => (s.JS_ERROR = "js_error", s.PROMISE_REJECTION = "promise_rejection", s))(W || {}), se = /* @__PURE__ */ ((s) => (s.QA = "qa", s))(se || {});
|
|
95
|
-
const
|
|
96
|
-
class
|
|
95
|
+
const Es = (s) => s.type === d.SCROLL && "scroll_data" in s && s.scroll_data.is_primary === !0, Ss = (s) => s.type === d.SCROLL && "scroll_data" in s && s.scroll_data.is_primary === !1;
|
|
96
|
+
class z extends Error {
|
|
97
97
|
constructor(e, t, r) {
|
|
98
98
|
super(e), this.errorCode = t, this.layer = r, this.name = this.constructor.name, Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
class f extends
|
|
101
|
+
class f extends z {
|
|
102
102
|
constructor(e, t = "config") {
|
|
103
103
|
super(e, "APP_CONFIG_INVALID", t);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
class
|
|
106
|
+
class Nt extends z {
|
|
107
107
|
constructor(e, t = "config") {
|
|
108
108
|
super(e, "SESSION_TIMEOUT_INVALID", t);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
class
|
|
111
|
+
class Be extends z {
|
|
112
112
|
constructor(e, t = "config") {
|
|
113
113
|
super(e, "SAMPLING_RATE_INVALID", t);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
class U extends
|
|
116
|
+
class U extends z {
|
|
117
117
|
constructor(e, t = "config") {
|
|
118
118
|
super(e, "INTEGRATION_INVALID", t);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
class
|
|
121
|
+
class ps extends z {
|
|
122
122
|
constructor(e, t, r = "runtime") {
|
|
123
123
|
super(e, "INITIALIZATION_TIMEOUT", r), this.timeoutMs = t;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
const
|
|
126
|
+
const st = "background: #ff9800; color: white; font-weight: bold; padding: 2px 8px; border-radius: 3px;", nt = "background: #9e9e9e; color: white; font-weight: bold; padding: 2px 8px; border-radius: 3px;", Ot = "background: #d32f2f; color: white; font-weight: bold; padding: 2px 8px; border-radius: 3px;", Pt = (s, e) => {
|
|
127
127
|
if (e) {
|
|
128
128
|
if (e instanceof Error) {
|
|
129
129
|
const t = e.message.replace(/\s+at\s+.*$/gm, "").replace(/\s*\([^()]+:\d+:\d+\)/g, "");
|
|
@@ -142,24 +142,24 @@ const tt = "background: #ff9800; color: white; font-weight: bold; padding: 2px 8
|
|
|
142
142
|
return `[TraceLog] ${s}: ${String(e)}`;
|
|
143
143
|
}
|
|
144
144
|
return `[TraceLog] ${s}`;
|
|
145
|
-
},
|
|
145
|
+
}, Dt = () => {
|
|
146
146
|
if (typeof window > "u" || typeof sessionStorage > "u")
|
|
147
147
|
return !1;
|
|
148
148
|
try {
|
|
149
|
-
return sessionStorage.getItem(
|
|
149
|
+
return sessionStorage.getItem(G) === "true";
|
|
150
150
|
} catch {
|
|
151
151
|
return !1;
|
|
152
152
|
}
|
|
153
153
|
}, a = (s, e, t) => {
|
|
154
|
-
const { error: r, data: n, showToClient: i = !1, style: o, visibility: l } = t ?? {}, c = r ?
|
|
155
|
-
if (!
|
|
154
|
+
const { error: r, data: n, showToClient: i = !1, style: o, visibility: l } = t ?? {}, c = r ? Pt(e, r) : `[TraceLog] ${e}`, u = s === "error" ? "error" : s === "warn" ? "warn" : "log";
|
|
155
|
+
if (!kt(l, i))
|
|
156
156
|
return;
|
|
157
|
-
const E =
|
|
158
|
-
|
|
159
|
-
},
|
|
157
|
+
const E = Vt(l, o), T = n !== void 0 ? Te(n) : void 0;
|
|
158
|
+
Ut(u, c, E, T);
|
|
159
|
+
}, kt = (s, e) => s === "critical" ? !0 : s === "qa" || e ? Dt() : !1, Vt = (s, e) => e !== void 0 && e !== "" ? e : s === "critical" ? Ot : "", Ut = (s, e, t, r) => {
|
|
160
160
|
const n = t !== void 0 && t !== "", i = n ? `%c${e}` : e;
|
|
161
161
|
r !== void 0 ? n ? console[s](i, t, r) : console[s](i, r) : n ? console[s](i, t) : console[s](i);
|
|
162
|
-
},
|
|
162
|
+
}, Te = (s) => {
|
|
163
163
|
const e = {}, t = ["token", "password", "secret", "key", "apikey", "api_key", "sessionid", "session_id"];
|
|
164
164
|
for (const [r, n] of Object.entries(s)) {
|
|
165
165
|
const i = r.toLowerCase();
|
|
@@ -167,16 +167,16 @@ const tt = "background: #ff9800; color: white; font-weight: bold; padding: 2px 8
|
|
|
167
167
|
e[r] = "[REDACTED]";
|
|
168
168
|
continue;
|
|
169
169
|
}
|
|
170
|
-
n !== null && typeof n == "object" && !Array.isArray(n) ? e[r] =
|
|
171
|
-
(o) => o !== null && typeof o == "object" && !Array.isArray(o) ?
|
|
170
|
+
n !== null && typeof n == "object" && !Array.isArray(n) ? e[r] = Te(n) : Array.isArray(n) ? e[r] = n.map(
|
|
171
|
+
(o) => o !== null && typeof o == "object" && !Array.isArray(o) ? Te(o) : o
|
|
172
172
|
) : e[r] = n;
|
|
173
173
|
}
|
|
174
174
|
return e;
|
|
175
175
|
};
|
|
176
|
-
let
|
|
177
|
-
const
|
|
178
|
-
typeof window < "u" && !
|
|
179
|
-
}, ne = "Unknown",
|
|
176
|
+
let Ie, it;
|
|
177
|
+
const Ht = () => {
|
|
178
|
+
typeof window < "u" && !Ie && (Ie = window.matchMedia("(pointer: coarse)"), it = window.matchMedia("(hover: none)"));
|
|
179
|
+
}, ne = "Unknown", Ft = (s) => {
|
|
180
180
|
const e = s.userAgentData?.platform;
|
|
181
181
|
if (e != null && e !== "") {
|
|
182
182
|
if (/windows/i.test(e)) return "Windows";
|
|
@@ -188,7 +188,7 @@ const kt = () => {
|
|
|
188
188
|
}
|
|
189
189
|
const t = navigator.userAgent;
|
|
190
190
|
return /Windows/i.test(t) ? "Windows" : /iPhone|iPad|iPod/i.test(t) ? "iOS" : /Mac OS X|Macintosh/i.test(t) ? "macOS" : /Android/i.test(t) ? "Android" : /CrOS/i.test(t) ? "ChromeOS" : /Linux/i.test(t) ? "Linux" : ne;
|
|
191
|
-
},
|
|
191
|
+
}, xt = (s) => {
|
|
192
192
|
const e = s.userAgentData?.brands;
|
|
193
193
|
if (e != null && e.length > 0) {
|
|
194
194
|
const n = e.filter((i) => !/not.?a.?brand|chromium/i.test(i.brand))[0];
|
|
@@ -199,26 +199,26 @@ const kt = () => {
|
|
|
199
199
|
}
|
|
200
200
|
const t = navigator.userAgent;
|
|
201
201
|
return /Edg\//i.test(t) ? "Edge" : /OPR\//i.test(t) ? "Opera" : /Chrome/i.test(t) ? "Chrome" : /Firefox/i.test(t) ? "Firefox" : /Safari/i.test(t) && !/Chrome/i.test(t) ? "Safari" : ne;
|
|
202
|
-
},
|
|
202
|
+
}, $t = () => {
|
|
203
203
|
try {
|
|
204
204
|
const s = navigator;
|
|
205
205
|
if (s.userAgentData != null && typeof s.userAgentData.mobile == "boolean") {
|
|
206
206
|
const c = s.userAgentData.platform;
|
|
207
207
|
return c != null && c !== "" && /ipad|tablet/i.test(c) ? L.Tablet : s.userAgentData.mobile ? L.Mobile : L.Desktop;
|
|
208
208
|
}
|
|
209
|
-
|
|
210
|
-
const e = window.innerWidth, t =
|
|
209
|
+
Ht();
|
|
210
|
+
const e = window.innerWidth, t = Ie?.matches ?? !1, r = it?.matches ?? !1, n = "ontouchstart" in window || navigator.maxTouchPoints > 0, i = navigator.userAgent.toLowerCase(), o = /mobile|android|iphone|ipod|blackberry|iemobile|opera mini/.test(i), l = /tablet|ipad|android(?!.*mobile)/.test(i);
|
|
211
211
|
return e <= 767 || o && n ? L.Mobile : e >= 768 && e <= 1024 || l || t && r && n ? L.Tablet : L.Desktop;
|
|
212
212
|
} catch (s) {
|
|
213
213
|
return a("debug", "Device detection failed, defaulting to desktop", { error: s }), L.Desktop;
|
|
214
214
|
}
|
|
215
|
-
},
|
|
215
|
+
}, Bt = () => {
|
|
216
216
|
try {
|
|
217
217
|
const s = navigator;
|
|
218
218
|
return {
|
|
219
|
-
type:
|
|
220
|
-
os:
|
|
221
|
-
browser:
|
|
219
|
+
type: $t(),
|
|
220
|
+
os: Ft(s),
|
|
221
|
+
browser: xt(s)
|
|
222
222
|
};
|
|
223
223
|
} catch (s) {
|
|
224
224
|
return a("debug", "Device info detection failed, using defaults", { error: s }), {
|
|
@@ -227,7 +227,7 @@ const kt = () => {
|
|
|
227
227
|
browser: ne
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
|
-
},
|
|
230
|
+
}, ot = [
|
|
231
231
|
// Email addresses
|
|
232
232
|
/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/gi,
|
|
233
233
|
// US Phone numbers (various formats)
|
|
@@ -241,8 +241,10 @@ const kt = () => {
|
|
|
241
241
|
// Bearer tokens (JWT-like patterns - matches complete and partial tokens)
|
|
242
242
|
/Bearer\s+[A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)?(?:\.[A-Za-z0-9_-]+)?/gi,
|
|
243
243
|
// Passwords in connection strings (protocol://user:password@host)
|
|
244
|
-
/:\/\/[^:/]+:([^@]+)@/gi
|
|
245
|
-
|
|
244
|
+
/:\/\/[^:/]+:([^@]+)@/gi,
|
|
245
|
+
// Sensitive URL query parameters (token=, key=, password=, auth=, secret=, api_key=)
|
|
246
|
+
/[?&](token|key|password|passwd|auth|secret|api_key|apikey|access_token)=[^&\s]+/gi
|
|
247
|
+
], We = 500, Xe = 2e3, Ge = 5e3, te = 50, Wt = te * 2, at = 1, Xt = 1e3, Gt = 10, je = 5e3, jt = 6e4, Ts = {
|
|
246
248
|
LCP: 2500,
|
|
247
249
|
// Good: ≤ 2.5s
|
|
248
250
|
FCP: 1800,
|
|
@@ -254,7 +256,7 @@ const kt = () => {
|
|
|
254
256
|
TTFB: 800,
|
|
255
257
|
// Good: ≤ 800ms
|
|
256
258
|
LONG_TASK: 50
|
|
257
|
-
},
|
|
259
|
+
}, ze = {
|
|
258
260
|
LCP: 2500,
|
|
259
261
|
// Needs improvement: > 2.5s (same as good boundary)
|
|
260
262
|
FCP: 1800,
|
|
@@ -266,7 +268,7 @@ const kt = () => {
|
|
|
266
268
|
TTFB: 800,
|
|
267
269
|
// Needs improvement: > 800ms
|
|
268
270
|
LONG_TASK: 50
|
|
269
|
-
},
|
|
271
|
+
}, zt = {
|
|
270
272
|
LCP: 4e3,
|
|
271
273
|
// Poor: > 4s
|
|
272
274
|
FCP: 3e3,
|
|
@@ -278,53 +280,53 @@ const kt = () => {
|
|
|
278
280
|
TTFB: 1800,
|
|
279
281
|
// Poor: > 1800ms
|
|
280
282
|
LONG_TASK: 50
|
|
281
|
-
},
|
|
283
|
+
}, ve = "needs-improvement", Qe = (s = ve) => {
|
|
282
284
|
switch (s) {
|
|
283
285
|
case "all":
|
|
284
286
|
return { LCP: 0, FCP: 0, CLS: 0, INP: 0, TTFB: 0, LONG_TASK: 0 };
|
|
285
287
|
// Track everything
|
|
286
288
|
case "needs-improvement":
|
|
287
|
-
return
|
|
289
|
+
return ze;
|
|
288
290
|
case "poor":
|
|
289
|
-
return
|
|
291
|
+
return zt;
|
|
290
292
|
default:
|
|
291
|
-
return
|
|
293
|
+
return ze;
|
|
292
294
|
}
|
|
293
|
-
},
|
|
295
|
+
}, Qt = 1e3, Kt = 50, Yt = "2.7.1", qt = Yt, lt = () => typeof window < "u" && typeof sessionStorage < "u", Jt = () => {
|
|
294
296
|
try {
|
|
295
297
|
const s = new URLSearchParams(window.location.search);
|
|
296
|
-
s.delete(
|
|
298
|
+
s.delete(rt);
|
|
297
299
|
const e = s.toString(), t = window.location.pathname + (e ? "?" + e : "") + window.location.hash;
|
|
298
300
|
window.history.replaceState({}, "", t);
|
|
299
301
|
} catch {
|
|
300
302
|
}
|
|
301
|
-
},
|
|
302
|
-
if (!
|
|
303
|
+
}, Zt = () => {
|
|
304
|
+
if (!lt())
|
|
303
305
|
return !1;
|
|
304
306
|
try {
|
|
305
|
-
const e = new URLSearchParams(window.location.search).get(
|
|
307
|
+
const e = new URLSearchParams(window.location.search).get(rt), t = sessionStorage.getItem(G);
|
|
306
308
|
let r = null;
|
|
307
|
-
return e === Ve ? (r = !0, sessionStorage.setItem(
|
|
309
|
+
return e === Ve ? (r = !0, sessionStorage.setItem(G, "true"), a("info", "QA Mode ACTIVE", {
|
|
308
310
|
visibility: "qa",
|
|
309
|
-
style:
|
|
310
|
-
})) : e ===
|
|
311
|
+
style: st
|
|
312
|
+
})) : e === Ue && (r = !1, sessionStorage.setItem(G, "false"), a("info", "QA Mode DISABLED", {
|
|
311
313
|
visibility: "qa",
|
|
312
|
-
style:
|
|
313
|
-
})), (e === Ve || e ===
|
|
314
|
+
style: nt
|
|
315
|
+
})), (e === Ve || e === Ue) && Jt(), r ?? t === "true";
|
|
314
316
|
} catch {
|
|
315
317
|
return !1;
|
|
316
318
|
}
|
|
317
|
-
},
|
|
318
|
-
if (
|
|
319
|
+
}, er = (s) => {
|
|
320
|
+
if (lt())
|
|
319
321
|
try {
|
|
320
|
-
sessionStorage.setItem(
|
|
322
|
+
sessionStorage.setItem(G, s ? "true" : "false"), a("info", s ? "QA Mode ACTIVE" : "QA Mode DISABLED", {
|
|
321
323
|
visibility: "qa",
|
|
322
|
-
style: s ?
|
|
324
|
+
style: s ? st : nt
|
|
323
325
|
});
|
|
324
326
|
} catch {
|
|
325
327
|
a("debug", "Cannot set QA mode: sessionStorage unavailable");
|
|
326
328
|
}
|
|
327
|
-
},
|
|
329
|
+
}, tr = [
|
|
328
330
|
"co.uk",
|
|
329
331
|
"org.uk",
|
|
330
332
|
"com.au",
|
|
@@ -336,37 +338,37 @@ const kt = () => {
|
|
|
336
338
|
"co.in",
|
|
337
339
|
"com.cn",
|
|
338
340
|
"co.za"
|
|
339
|
-
],
|
|
341
|
+
], Ke = (s) => {
|
|
340
342
|
const e = s.toLowerCase().split(".");
|
|
341
343
|
if (e.length <= 2)
|
|
342
344
|
return s.toLowerCase();
|
|
343
345
|
const t = e.slice(-2).join(".");
|
|
344
|
-
return
|
|
345
|
-
},
|
|
346
|
+
return tr.includes(t) ? e.slice(-3).join(".") : e.slice(-2).join(".");
|
|
347
|
+
}, rr = (s, e) => s === e ? !0 : Ke(s) === Ke(e), he = () => {
|
|
346
348
|
const s = document.referrer;
|
|
347
349
|
if (!s)
|
|
348
350
|
return "Direct";
|
|
349
351
|
try {
|
|
350
352
|
const e = new URL(s).hostname.toLowerCase(), t = window.location.hostname.toLowerCase();
|
|
351
|
-
return
|
|
353
|
+
return rr(e, t) ? "Direct" : s;
|
|
352
354
|
} catch (e) {
|
|
353
355
|
return a("debug", "Failed to parse referrer URL, using raw value", { error: e, data: { referrer: s } }), s;
|
|
354
356
|
}
|
|
355
|
-
},
|
|
357
|
+
}, fe = () => {
|
|
356
358
|
const s = new URLSearchParams(window.location.search), e = {};
|
|
357
|
-
return
|
|
359
|
+
return bt.forEach((r) => {
|
|
358
360
|
const n = s.get(r);
|
|
359
361
|
if (n) {
|
|
360
362
|
const i = r.split("utm_")[1];
|
|
361
363
|
e[i] = n;
|
|
362
364
|
}
|
|
363
365
|
}), Object.keys(e).length ? e : void 0;
|
|
364
|
-
},
|
|
366
|
+
}, ct = () => typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (s) => {
|
|
365
367
|
const e = Math.random() * 16 | 0;
|
|
366
368
|
return (s === "x" ? e : e & 3 | 8).toString(16);
|
|
367
369
|
});
|
|
368
370
|
let q = 0, J = 0;
|
|
369
|
-
const
|
|
371
|
+
const sr = () => {
|
|
370
372
|
let s = Date.now();
|
|
371
373
|
s < J && (s = J), s === J ? q = (q + 1) % 1e3 : q = 0, J = s;
|
|
372
374
|
const e = q.toString().padStart(3, "0");
|
|
@@ -379,14 +381,14 @@ const tr = () => {
|
|
|
379
381
|
} catch {
|
|
380
382
|
}
|
|
381
383
|
return t || (t = Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0")), `${s}-${e}-${t}`;
|
|
382
|
-
},
|
|
384
|
+
}, ut = (s, e = !1) => {
|
|
383
385
|
try {
|
|
384
386
|
const t = new URL(s), r = t.protocol === "https:", n = t.protocol === "http:";
|
|
385
387
|
return r || e && n;
|
|
386
388
|
} catch {
|
|
387
389
|
return !1;
|
|
388
390
|
}
|
|
389
|
-
},
|
|
391
|
+
}, nr = (s) => {
|
|
390
392
|
try {
|
|
391
393
|
const t = new URL(window.location.href).hostname;
|
|
392
394
|
if (!t || typeof t != "string")
|
|
@@ -404,28 +406,28 @@ const tr = () => {
|
|
|
404
406
|
if (r.length === 2 ? n = r.join(".") : n = r.slice(-2).join("."), !n || n.split(".").length < 2)
|
|
405
407
|
throw new Error("Invalid domain structure for SaaS");
|
|
406
408
|
const i = `https://${s}.${n}/collect`;
|
|
407
|
-
if (!
|
|
409
|
+
if (!ut(i))
|
|
408
410
|
throw new Error("Generated URL failed validation");
|
|
409
411
|
return i;
|
|
410
412
|
} catch (e) {
|
|
411
413
|
throw new Error(`Invalid SaaS URL configuration: ${e instanceof Error ? e.message : String(e)}`);
|
|
412
414
|
}
|
|
413
|
-
},
|
|
415
|
+
}, ir = (s) => {
|
|
414
416
|
const e = {};
|
|
415
|
-
s.integrations?.tracelog?.projectId && (e.saas =
|
|
417
|
+
s.integrations?.tracelog?.projectId && (e.saas = nr(s.integrations.tracelog.projectId));
|
|
416
418
|
const t = s.integrations?.custom?.collectApiUrl;
|
|
417
419
|
if (t) {
|
|
418
420
|
const r = s.integrations?.custom?.allowHttp ?? !1;
|
|
419
|
-
if (!
|
|
421
|
+
if (!ut(t, r))
|
|
420
422
|
throw new Error("Invalid custom API URL");
|
|
421
423
|
e.custom = t;
|
|
422
424
|
}
|
|
423
425
|
return e;
|
|
424
|
-
},
|
|
426
|
+
}, _e = (s, e = []) => {
|
|
425
427
|
if (!s || typeof s != "string")
|
|
426
428
|
return a("warn", "Invalid URL provided to normalizeUrl", { data: { type: typeof s } }), s || "";
|
|
427
429
|
try {
|
|
428
|
-
const t = new URL(s), r = t.searchParams, n = [.../* @__PURE__ */ new Set([...
|
|
430
|
+
const t = new URL(s), r = t.searchParams, n = [.../* @__PURE__ */ new Set([...At, ...e])];
|
|
429
431
|
let i = !1;
|
|
430
432
|
const o = [];
|
|
431
433
|
return n.forEach((c) => {
|
|
@@ -434,13 +436,13 @@ const tr = () => {
|
|
|
434
436
|
} catch (t) {
|
|
435
437
|
return a("warn", "URL normalization failed, returning original", { error: t, data: { urlLength: s?.length } }), s;
|
|
436
438
|
}
|
|
437
|
-
},
|
|
439
|
+
}, Ye = (s) => {
|
|
438
440
|
if (!s || typeof s != "string" || s.trim().length === 0)
|
|
439
441
|
return "";
|
|
440
442
|
let e = s;
|
|
441
443
|
s.length > 1e3 && (e = s.slice(0, Math.max(0, 1e3)));
|
|
442
444
|
let t = 0;
|
|
443
|
-
for (const n of
|
|
445
|
+
for (const n of Lt) {
|
|
444
446
|
const i = e;
|
|
445
447
|
e = e.replace(n, ""), i !== e && t++;
|
|
446
448
|
}
|
|
@@ -450,11 +452,11 @@ const tr = () => {
|
|
|
450
452
|
valueLength: s.length
|
|
451
453
|
}
|
|
452
454
|
}), e.trim();
|
|
453
|
-
},
|
|
455
|
+
}, ye = (s, e = 0) => {
|
|
454
456
|
if (s == null)
|
|
455
457
|
return null;
|
|
456
458
|
if (typeof s == "string")
|
|
457
|
-
return
|
|
459
|
+
return Ye(s);
|
|
458
460
|
if (typeof s == "number")
|
|
459
461
|
return !Number.isFinite(s) || s < -Number.MAX_SAFE_INTEGER || s > Number.MAX_SAFE_INTEGER ? 0 : s;
|
|
460
462
|
if (typeof s == "boolean")
|
|
@@ -462,38 +464,38 @@ const tr = () => {
|
|
|
462
464
|
if (e > 10)
|
|
463
465
|
return null;
|
|
464
466
|
if (Array.isArray(s))
|
|
465
|
-
return s.slice(0,
|
|
467
|
+
return s.slice(0, 1e3).map((n) => ye(n, e + 1)).filter((n) => n !== null);
|
|
466
468
|
if (typeof s == "object") {
|
|
467
|
-
const t = {}, n = Object.entries(s).slice(0,
|
|
469
|
+
const t = {}, n = Object.entries(s).slice(0, 200);
|
|
468
470
|
for (const [i, o] of n) {
|
|
469
|
-
const l =
|
|
471
|
+
const l = Ye(i);
|
|
470
472
|
if (l) {
|
|
471
|
-
const c =
|
|
473
|
+
const c = ye(o, e + 1);
|
|
472
474
|
c !== null && (t[l] = c);
|
|
473
475
|
}
|
|
474
476
|
}
|
|
475
477
|
return t;
|
|
476
478
|
}
|
|
477
479
|
return null;
|
|
478
|
-
},
|
|
480
|
+
}, or = (s) => {
|
|
479
481
|
if (typeof s != "object" || s === null)
|
|
480
482
|
return {};
|
|
481
483
|
try {
|
|
482
|
-
const e =
|
|
484
|
+
const e = ye(s);
|
|
483
485
|
return typeof e == "object" && e !== null ? e : {};
|
|
484
486
|
} catch (e) {
|
|
485
487
|
const t = e instanceof Error ? e.message : String(e);
|
|
486
488
|
throw new Error(`[TraceLog] Metadata sanitization failed: ${t}`);
|
|
487
489
|
}
|
|
488
|
-
},
|
|
490
|
+
}, ar = (s) => {
|
|
489
491
|
if (s !== void 0 && (s === null || typeof s != "object"))
|
|
490
492
|
throw new f("Configuration must be an object", "config");
|
|
491
493
|
if (s) {
|
|
492
494
|
if (s.sessionTimeout !== void 0 && (typeof s.sessionTimeout != "number" || s.sessionTimeout < 3e4 || s.sessionTimeout > 864e5))
|
|
493
|
-
throw new
|
|
495
|
+
throw new Nt(m.INVALID_SESSION_TIMEOUT, "config");
|
|
494
496
|
if (s.globalMetadata !== void 0 && (typeof s.globalMetadata != "object" || s.globalMetadata === null))
|
|
495
497
|
throw new f(m.INVALID_GLOBAL_METADATA, "config");
|
|
496
|
-
if (s.integrations &&
|
|
498
|
+
if (s.integrations && cr(s.integrations), s.sensitiveQueryParams !== void 0) {
|
|
497
499
|
if (!Array.isArray(s.sensitiveQueryParams))
|
|
498
500
|
throw new f(m.INVALID_SENSITIVE_QUERY_PARAMS, "config");
|
|
499
501
|
for (const e of s.sensitiveQueryParams)
|
|
@@ -501,9 +503,9 @@ const tr = () => {
|
|
|
501
503
|
throw new f("All sensitive query params must be strings", "config");
|
|
502
504
|
}
|
|
503
505
|
if (s.errorSampling !== void 0 && (typeof s.errorSampling != "number" || s.errorSampling < 0 || s.errorSampling > 1))
|
|
504
|
-
throw new
|
|
506
|
+
throw new Be(m.INVALID_ERROR_SAMPLING_RATE, "config");
|
|
505
507
|
if (s.samplingRate !== void 0 && (typeof s.samplingRate != "number" || s.samplingRate < 0 || s.samplingRate > 1))
|
|
506
|
-
throw new
|
|
508
|
+
throw new Be(m.INVALID_SAMPLING_RATE, "config");
|
|
507
509
|
if (s.primaryScrollSelector !== void 0) {
|
|
508
510
|
if (typeof s.primaryScrollSelector != "string" || !s.primaryScrollSelector.trim())
|
|
509
511
|
throw new f(m.INVALID_PRIMARY_SCROLL_SELECTOR, "config");
|
|
@@ -525,7 +527,7 @@ const tr = () => {
|
|
|
525
527
|
throw new f(m.INVALID_MAX_SAME_EVENT_PER_MINUTE, "config");
|
|
526
528
|
if (s.sendIntervalMs !== void 0 && (!Number.isFinite(s.sendIntervalMs) || s.sendIntervalMs < 1e3 || s.sendIntervalMs > 6e4))
|
|
527
529
|
throw new f(m.INVALID_SEND_INTERVAL, "config");
|
|
528
|
-
if (s.viewport !== void 0 &&
|
|
530
|
+
if (s.viewport !== void 0 && lr(s.viewport), s.webVitalsMode !== void 0) {
|
|
529
531
|
if (typeof s.webVitalsMode != "string")
|
|
530
532
|
throw new f(
|
|
531
533
|
`Invalid webVitalsMode type: ${typeof s.webVitalsMode}. Must be a string`,
|
|
@@ -556,7 +558,7 @@ const tr = () => {
|
|
|
556
558
|
}
|
|
557
559
|
}
|
|
558
560
|
}
|
|
559
|
-
},
|
|
561
|
+
}, lr = (s) => {
|
|
560
562
|
if (typeof s != "object" || s === null)
|
|
561
563
|
throw new f(m.INVALID_VIEWPORT_CONFIG, "config");
|
|
562
564
|
if (!s.elements || !Array.isArray(s.elements))
|
|
@@ -586,7 +588,7 @@ const tr = () => {
|
|
|
586
588
|
throw new f(m.INVALID_VIEWPORT_COOLDOWN_PERIOD, "config");
|
|
587
589
|
if (s.maxTrackedElements !== void 0 && (typeof s.maxTrackedElements != "number" || s.maxTrackedElements <= 0))
|
|
588
590
|
throw new f(m.INVALID_VIEWPORT_MAX_TRACKED_ELEMENTS, "config");
|
|
589
|
-
},
|
|
591
|
+
}, cr = (s) => {
|
|
590
592
|
if (s) {
|
|
591
593
|
if (s.tracelog && (!s.tracelog.projectId || typeof s.tracelog.projectId != "string" || s.tracelog.projectId.trim() === ""))
|
|
592
594
|
throw new U(m.INVALID_TRACELOG_PROJECT_ID, "config");
|
|
@@ -607,14 +609,14 @@ const tr = () => {
|
|
|
607
609
|
throw new U('fetchCredentials must be "include", "same-origin", or "omit"', "config");
|
|
608
610
|
}
|
|
609
611
|
}
|
|
610
|
-
},
|
|
611
|
-
|
|
612
|
+
}, ur = (s) => {
|
|
613
|
+
ar(s);
|
|
612
614
|
const e = {
|
|
613
615
|
...s ?? {},
|
|
614
616
|
sessionTimeout: s?.sessionTimeout ?? 9e5,
|
|
615
617
|
globalMetadata: s?.globalMetadata ?? {},
|
|
616
618
|
sensitiveQueryParams: s?.sensitiveQueryParams ?? [],
|
|
617
|
-
errorSampling: s?.errorSampling ??
|
|
619
|
+
errorSampling: s?.errorSampling ?? at,
|
|
618
620
|
samplingRate: s?.samplingRate ?? 1,
|
|
619
621
|
pageViewThrottleMs: s?.pageViewThrottleMs ?? 1e3,
|
|
620
622
|
clickThrottleMs: s?.clickThrottleMs ?? 300,
|
|
@@ -631,18 +633,18 @@ const tr = () => {
|
|
|
631
633
|
cooldownPeriod: e.viewport.cooldownPeriod ?? 6e4,
|
|
632
634
|
maxTrackedElements: e.viewport.maxTrackedElements ?? 100
|
|
633
635
|
}), e;
|
|
634
|
-
},
|
|
636
|
+
}, we = (s, e = /* @__PURE__ */ new Set()) => {
|
|
635
637
|
if (s == null)
|
|
636
638
|
return !0;
|
|
637
639
|
const t = typeof s;
|
|
638
|
-
return t === "string" || t === "number" || t === "boolean" ? !0 : t === "function" || t === "symbol" || t === "bigint" || e.has(s) ? !1 : (e.add(s), Array.isArray(s) ? s.every((r) =>
|
|
639
|
-
},
|
|
640
|
+
return t === "string" || t === "number" || t === "boolean" ? !0 : t === "function" || t === "symbol" || t === "bigint" || e.has(s) ? !1 : (e.add(s), Array.isArray(s) ? s.every((r) => we(r, e)) : t === "object" ? Object.values(s).every((r) => we(r, e)) : !1);
|
|
641
|
+
}, dr = (s) => typeof s != "object" || s === null ? !1 : we(s), dt = (s) => {
|
|
640
642
|
if (typeof s != "object" || s === null || Array.isArray(s)) return;
|
|
641
643
|
const e = {};
|
|
642
644
|
for (const [t, r] of Object.entries(s))
|
|
643
645
|
typeof r == "string" && (e[t] = r);
|
|
644
646
|
return Object.keys(e).length > 0 ? e : void 0;
|
|
645
|
-
},
|
|
647
|
+
}, hr = (s) => typeof s != "string" ? {
|
|
646
648
|
valid: !1,
|
|
647
649
|
error: "Event name must be a string"
|
|
648
650
|
} : s.length === 0 ? {
|
|
@@ -657,9 +659,9 @@ const tr = () => {
|
|
|
657
659
|
} : ["constructor", "prototype", "__proto__", "eval", "function", "var", "let", "const"].includes(s.toLowerCase()) ? {
|
|
658
660
|
valid: !1,
|
|
659
661
|
error: "Event name cannot be a reserved word"
|
|
660
|
-
} : { valid: !0 },
|
|
661
|
-
const r =
|
|
662
|
-
if (!
|
|
662
|
+
} : { valid: !0 }, qe = (s, e, t) => {
|
|
663
|
+
const r = or(e), n = t && t === "customEvent" ? `${t} "${s}" metadata error` : `${s} metadata error`;
|
|
664
|
+
if (!dr(r))
|
|
663
665
|
return {
|
|
664
666
|
valid: !1,
|
|
665
667
|
error: `${n}: object has invalid types. Valid types are string, number, boolean or string arrays.`
|
|
@@ -673,41 +675,41 @@ const tr = () => {
|
|
|
673
675
|
error: `${n}: object contains circular references or cannot be serialized.`
|
|
674
676
|
};
|
|
675
677
|
}
|
|
676
|
-
if (i.
|
|
678
|
+
if (new TextEncoder().encode(i).byteLength > 49152)
|
|
677
679
|
return {
|
|
678
680
|
valid: !1,
|
|
679
|
-
error: `${n}: object is too large (max ${
|
|
681
|
+
error: `${n}: object is too large (max ${49152 / 1024} KB).`
|
|
680
682
|
};
|
|
681
|
-
if (Object.keys(r).length >
|
|
683
|
+
if (Object.keys(r).length > 100)
|
|
682
684
|
return {
|
|
683
685
|
valid: !1,
|
|
684
|
-
error: `${n}: object has too many keys (max
|
|
686
|
+
error: `${n}: object has too many keys (max 100 keys).`
|
|
685
687
|
};
|
|
686
|
-
for (const [
|
|
687
|
-
if (Array.isArray(
|
|
688
|
-
if (
|
|
688
|
+
for (const [c, u] of Object.entries(r)) {
|
|
689
|
+
if (Array.isArray(u)) {
|
|
690
|
+
if (u.length > 500)
|
|
689
691
|
return {
|
|
690
692
|
valid: !1,
|
|
691
|
-
error: `${n}: array property "${
|
|
693
|
+
error: `${n}: array property "${c}" is too large (max 500 items).`
|
|
692
694
|
};
|
|
693
|
-
for (const
|
|
694
|
-
if (typeof
|
|
695
|
+
for (const g of u)
|
|
696
|
+
if (typeof g == "string" && g.length > 500)
|
|
695
697
|
return {
|
|
696
698
|
valid: !1,
|
|
697
|
-
error: `${n}: array property "${
|
|
699
|
+
error: `${n}: array property "${c}" contains strings that are too long (max 500 characters).`
|
|
698
700
|
};
|
|
699
701
|
}
|
|
700
|
-
if (typeof
|
|
702
|
+
if (typeof u == "string" && u.length > 1e3)
|
|
701
703
|
return {
|
|
702
704
|
valid: !1,
|
|
703
|
-
error: `${n}: property "${
|
|
705
|
+
error: `${n}: property "${c}" is too long (max 1000 characters).`
|
|
704
706
|
};
|
|
705
707
|
}
|
|
706
708
|
return {
|
|
707
709
|
valid: !0,
|
|
708
710
|
sanitizedMetadata: r
|
|
709
711
|
};
|
|
710
|
-
},
|
|
712
|
+
}, ht = (s, e, t) => {
|
|
711
713
|
if (Array.isArray(e)) {
|
|
712
714
|
const r = [], n = t && t === "customEvent" ? `${t} "${s}" metadata error` : `${s} metadata error`;
|
|
713
715
|
for (let i = 0; i < e.length; i++) {
|
|
@@ -717,7 +719,7 @@ const tr = () => {
|
|
|
717
719
|
valid: !1,
|
|
718
720
|
error: `${n}: array item at index ${i} must be an object.`
|
|
719
721
|
};
|
|
720
|
-
const l =
|
|
722
|
+
const l = qe(s, o, t);
|
|
721
723
|
if (!l.valid)
|
|
722
724
|
return {
|
|
723
725
|
valid: !1,
|
|
@@ -730,16 +732,16 @@ const tr = () => {
|
|
|
730
732
|
sanitizedMetadata: r
|
|
731
733
|
};
|
|
732
734
|
}
|
|
733
|
-
return
|
|
734
|
-
},
|
|
735
|
-
const t =
|
|
735
|
+
return qe(s, e, t);
|
|
736
|
+
}, fr = (s, e) => {
|
|
737
|
+
const t = hr(s);
|
|
736
738
|
if (!t.valid)
|
|
737
739
|
return a("error", "Event name validation failed", {
|
|
738
740
|
data: { eventName: s, error: t.error }
|
|
739
741
|
}), t;
|
|
740
742
|
if (!e)
|
|
741
743
|
return { valid: !0 };
|
|
742
|
-
const r =
|
|
744
|
+
const r = ht(s, e, "customEvent");
|
|
743
745
|
return r.valid || a("error", "Event metadata validation failed", {
|
|
744
746
|
data: {
|
|
745
747
|
eventName: s,
|
|
@@ -747,7 +749,7 @@ const tr = () => {
|
|
|
747
749
|
}
|
|
748
750
|
}), r;
|
|
749
751
|
};
|
|
750
|
-
class
|
|
752
|
+
class mr {
|
|
751
753
|
listeners = /* @__PURE__ */ new Map();
|
|
752
754
|
/**
|
|
753
755
|
* Subscribes to an event channel
|
|
@@ -864,7 +866,7 @@ class hr {
|
|
|
864
866
|
this.listeners.clear();
|
|
865
867
|
}
|
|
866
868
|
}
|
|
867
|
-
function
|
|
869
|
+
function ft(s, e, t) {
|
|
868
870
|
try {
|
|
869
871
|
const r = e(s);
|
|
870
872
|
return r === null ? null : typeof r == "object" && r !== null && "type" in r ? r : (a("warn", `beforeSend transformer returned invalid data, using original [${t}]`), s);
|
|
@@ -875,10 +877,10 @@ function dt(s, e, t) {
|
|
|
875
877
|
}), s;
|
|
876
878
|
}
|
|
877
879
|
}
|
|
878
|
-
function
|
|
879
|
-
return s.map((r) =>
|
|
880
|
+
function gr(s, e, t) {
|
|
881
|
+
return s.map((r) => ft(r, e, t)).filter((r) => r !== null);
|
|
880
882
|
}
|
|
881
|
-
function
|
|
883
|
+
function mt(s, e, t) {
|
|
882
884
|
try {
|
|
883
885
|
const r = e(s);
|
|
884
886
|
return r === null ? (a("debug", `Batch filtered by beforeBatch transformer [${t}]`, {
|
|
@@ -894,7 +896,7 @@ function ht(s, e, t) {
|
|
|
894
896
|
}), s;
|
|
895
897
|
}
|
|
896
898
|
}
|
|
897
|
-
const
|
|
899
|
+
const me = { config: {} };
|
|
898
900
|
class w {
|
|
899
901
|
/**
|
|
900
902
|
* Retrieves a value from global state.
|
|
@@ -913,7 +915,7 @@ class w {
|
|
|
913
915
|
* ```
|
|
914
916
|
*/
|
|
915
917
|
get(e) {
|
|
916
|
-
return
|
|
918
|
+
return me[e];
|
|
917
919
|
}
|
|
918
920
|
/**
|
|
919
921
|
* Sets a value in global state.
|
|
@@ -933,7 +935,7 @@ class w {
|
|
|
933
935
|
* ```
|
|
934
936
|
*/
|
|
935
937
|
set(e, t) {
|
|
936
|
-
|
|
938
|
+
me[e] = t;
|
|
937
939
|
}
|
|
938
940
|
/**
|
|
939
941
|
* Returns an immutable snapshot of the entire global state.
|
|
@@ -950,10 +952,10 @@ class w {
|
|
|
950
952
|
* ```
|
|
951
953
|
*/
|
|
952
954
|
getState() {
|
|
953
|
-
return { ...
|
|
955
|
+
return { ...me };
|
|
954
956
|
}
|
|
955
957
|
}
|
|
956
|
-
class
|
|
958
|
+
class Je extends w {
|
|
957
959
|
storeManager;
|
|
958
960
|
integrationId;
|
|
959
961
|
apiUrl;
|
|
@@ -1038,7 +1040,7 @@ class Ye extends w {
|
|
|
1038
1040
|
return { ...this.staticHeaders, ...e };
|
|
1039
1041
|
}
|
|
1040
1042
|
getQueueStorageKey() {
|
|
1041
|
-
const e = this.get("userId") || "anonymous", t =
|
|
1043
|
+
const e = this.get("userId") || "anonymous", t = Mt(e);
|
|
1042
1044
|
return this.integrationId ? `${t}:${this.integrationId}` : t;
|
|
1043
1045
|
}
|
|
1044
1046
|
/**
|
|
@@ -1268,7 +1270,7 @@ class Ye extends w {
|
|
|
1268
1270
|
const t = this.transformers.beforeSend;
|
|
1269
1271
|
if (!t)
|
|
1270
1272
|
return e;
|
|
1271
|
-
const r =
|
|
1273
|
+
const r = gr(
|
|
1272
1274
|
e.events,
|
|
1273
1275
|
t,
|
|
1274
1276
|
this.integrationId || "SenderManager"
|
|
@@ -1313,7 +1315,7 @@ class Ye extends w {
|
|
|
1313
1315
|
if (this.integrationId === "saas")
|
|
1314
1316
|
return e;
|
|
1315
1317
|
const t = this.transformers.beforeBatch;
|
|
1316
|
-
return t ?
|
|
1318
|
+
return t ? mt(e, t, this.integrationId || "SenderManager") : e;
|
|
1317
1319
|
}
|
|
1318
1320
|
/**
|
|
1319
1321
|
* Calculates exponential backoff delay with jitter for retry attempts.
|
|
@@ -1569,7 +1571,7 @@ class Ye extends w {
|
|
|
1569
1571
|
_metadata: {
|
|
1570
1572
|
referer: typeof window < "u" ? window.location.href : void 0,
|
|
1571
1573
|
timestamp: t,
|
|
1572
|
-
client_version:
|
|
1574
|
+
client_version: qt
|
|
1573
1575
|
}
|
|
1574
1576
|
};
|
|
1575
1577
|
return {
|
|
@@ -1708,12 +1710,12 @@ class Ye extends w {
|
|
|
1708
1710
|
}
|
|
1709
1711
|
logPermanentError(e, t) {
|
|
1710
1712
|
const r = Date.now();
|
|
1711
|
-
(!this.lastPermanentErrorLog || this.lastPermanentErrorLog.statusCode !== t.statusCode || r - this.lastPermanentErrorLog.timestamp >=
|
|
1713
|
+
(!this.lastPermanentErrorLog || this.lastPermanentErrorLog.statusCode !== t.statusCode || r - this.lastPermanentErrorLog.timestamp >= jt) && (a("error", `${e}${this.integrationId ? ` [${this.integrationId}]` : ""}`, {
|
|
1712
1714
|
data: { status: t.statusCode, message: t.message }
|
|
1713
1715
|
}), this.lastPermanentErrorLog = { statusCode: t.statusCode, timestamp: r });
|
|
1714
1716
|
}
|
|
1715
1717
|
}
|
|
1716
|
-
class
|
|
1718
|
+
class Er extends w {
|
|
1717
1719
|
bootTime;
|
|
1718
1720
|
bootTimestamp;
|
|
1719
1721
|
hasPerformanceNow;
|
|
@@ -1862,8 +1864,8 @@ class mr extends w {
|
|
|
1862
1864
|
};
|
|
1863
1865
|
}
|
|
1864
1866
|
}
|
|
1865
|
-
const
|
|
1866
|
-
class
|
|
1867
|
+
const Sr = new Set(Object.values(d));
|
|
1868
|
+
class pr extends w {
|
|
1867
1869
|
dataSenders;
|
|
1868
1870
|
emitter;
|
|
1869
1871
|
transformers;
|
|
@@ -1902,10 +1904,10 @@ class Er extends w {
|
|
|
1902
1904
|
* @param fetchCredentials - Fetch credentials mode for custom backend. @default 'include'
|
|
1903
1905
|
*/
|
|
1904
1906
|
constructor(e, t = null, r = {}, n = {}, i, o = "include") {
|
|
1905
|
-
super(), this.emitter = t, this.transformers = r, this.timeManager = new
|
|
1907
|
+
super(), this.emitter = t, this.transformers = r, this.timeManager = new Er(), this.dataSenders = [];
|
|
1906
1908
|
const l = this.get("collectApiUrls");
|
|
1907
|
-
l?.saas && this.dataSenders.push(new
|
|
1908
|
-
new
|
|
1909
|
+
l?.saas && this.dataSenders.push(new Je(e, "saas", l.saas, r)), l?.custom && this.dataSenders.push(
|
|
1910
|
+
new Je(
|
|
1909
1911
|
e,
|
|
1910
1912
|
"custom",
|
|
1911
1913
|
l.custom,
|
|
@@ -2033,7 +2035,7 @@ class Er extends w {
|
|
|
2033
2035
|
a("error", "Event type is required - event will be ignored");
|
|
2034
2036
|
return;
|
|
2035
2037
|
}
|
|
2036
|
-
if (!
|
|
2038
|
+
if (!Sr.has(e)) {
|
|
2037
2039
|
a("error", "Invalid event type - event will be ignored", {
|
|
2038
2040
|
data: { type: e }
|
|
2039
2041
|
});
|
|
@@ -2077,12 +2079,12 @@ class Er extends w {
|
|
|
2077
2079
|
}
|
|
2078
2080
|
const v = this.getTypeLimitForEvent(S);
|
|
2079
2081
|
if (v) {
|
|
2080
|
-
const
|
|
2081
|
-
if (
|
|
2082
|
+
const ue = this.sessionEventCounts[S];
|
|
2083
|
+
if (ue !== void 0 && ue >= v) {
|
|
2082
2084
|
a("warn", "Session event type limit reached", {
|
|
2083
2085
|
data: {
|
|
2084
2086
|
type: S,
|
|
2085
|
-
count:
|
|
2087
|
+
count: ue,
|
|
2086
2088
|
limit: v
|
|
2087
2089
|
}
|
|
2088
2090
|
});
|
|
@@ -2095,7 +2097,7 @@ class Er extends w {
|
|
|
2095
2097
|
if (!this.checkPerEventRateLimit(o.name, v))
|
|
2096
2098
|
return;
|
|
2097
2099
|
}
|
|
2098
|
-
const
|
|
2100
|
+
const ke = S === d.SESSION_START, Y = t || this.get("pageUrl"), $ = this.buildEventPayload({
|
|
2099
2101
|
type: S,
|
|
2100
2102
|
page_url: Y,
|
|
2101
2103
|
from_page_url: r,
|
|
@@ -2108,7 +2110,7 @@ class Er extends w {
|
|
|
2108
2110
|
page_view: g
|
|
2109
2111
|
});
|
|
2110
2112
|
if ($ && !(!T && !this.shouldSample())) {
|
|
2111
|
-
if (
|
|
2113
|
+
if (ke) {
|
|
2112
2114
|
const v = this.get("sessionId");
|
|
2113
2115
|
if (!v) {
|
|
2114
2116
|
a("error", "Session start event requires sessionId - event will be ignored");
|
|
@@ -2491,7 +2493,7 @@ class Er extends w {
|
|
|
2491
2493
|
};
|
|
2492
2494
|
const i = this.get("collectApiUrls"), o = !!(i?.custom || i?.saas), l = this.transformers.beforeBatch;
|
|
2493
2495
|
if (!o && l) {
|
|
2494
|
-
const c =
|
|
2496
|
+
const c = mt(n, l, "EventManager");
|
|
2495
2497
|
c !== null && (n = c);
|
|
2496
2498
|
}
|
|
2497
2499
|
return n;
|
|
@@ -2503,7 +2505,7 @@ class Er extends w {
|
|
|
2503
2505
|
});
|
|
2504
2506
|
const i = this.get("sessionReferrer"), o = this.get("sessionUtm");
|
|
2505
2507
|
let l = {
|
|
2506
|
-
id:
|
|
2508
|
+
id: sr(),
|
|
2507
2509
|
type: e.type,
|
|
2508
2510
|
page_url: t,
|
|
2509
2511
|
timestamp: r,
|
|
@@ -2520,7 +2522,7 @@ class Er extends w {
|
|
|
2520
2522
|
};
|
|
2521
2523
|
const c = this.get("collectApiUrls"), u = !!c?.custom, g = !!c?.saas, E = u || g, T = u && g, S = this.transformers.beforeSend;
|
|
2522
2524
|
if (S && (!E || u && !T)) {
|
|
2523
|
-
const Y =
|
|
2525
|
+
const Y = ft(l, S, "EventManager");
|
|
2524
2526
|
if (Y === null)
|
|
2525
2527
|
return null;
|
|
2526
2528
|
l = Y;
|
|
@@ -2618,10 +2620,10 @@ class Er extends w {
|
|
|
2618
2620
|
this.eventsQueue = this.eventsQueue.filter((r) => !t.has(r.id));
|
|
2619
2621
|
}
|
|
2620
2622
|
emitEvent(e) {
|
|
2621
|
-
this.emitter && this.emitter.emit(
|
|
2623
|
+
this.emitter && this.emitter.emit(pe.EVENT, e);
|
|
2622
2624
|
}
|
|
2623
2625
|
emitEventsQueue(e) {
|
|
2624
|
-
this.emitter && this.emitter.emit(
|
|
2626
|
+
this.emitter && this.emitter.emit(pe.QUEUE, e);
|
|
2625
2627
|
}
|
|
2626
2628
|
/**
|
|
2627
2629
|
* Creates a debounced version of a function that delays execution until after
|
|
@@ -2697,13 +2699,13 @@ class Er extends w {
|
|
|
2697
2699
|
loadSessionCounts(e) {
|
|
2698
2700
|
if (typeof window > "u" || typeof localStorage > "u")
|
|
2699
2701
|
return this.getInitialCounts();
|
|
2700
|
-
const t = this.get("userId") || "anonymous", r =
|
|
2702
|
+
const t = this.get("userId") || "anonymous", r = He(t, e);
|
|
2701
2703
|
try {
|
|
2702
2704
|
const n = localStorage.getItem(r);
|
|
2703
2705
|
if (!n)
|
|
2704
2706
|
return this.getInitialCounts();
|
|
2705
2707
|
const i = JSON.parse(n);
|
|
2706
|
-
return i._timestamp && Date.now() - i._timestamp >
|
|
2708
|
+
return i._timestamp && Date.now() - i._timestamp > Fe ? (a("debug", "Session counts expired, clearing", {
|
|
2707
2709
|
data: { sessionId: e, age: Date.now() - i._timestamp }
|
|
2708
2710
|
}), localStorage.removeItem(r), this.getInitialCounts()) : typeof i.total == "number" && typeof i[d.CLICK] == "number" && typeof i[d.PAGE_VIEW] == "number" && typeof i[d.CUSTOM] == "number" && typeof i[d.VIEWPORT_VISIBLE] == "number" && typeof i[d.SCROLL] == "number" ? {
|
|
2709
2711
|
total: i.total,
|
|
@@ -2751,9 +2753,9 @@ class Er extends w {
|
|
|
2751
2753
|
const e = localStorage.getItem(xe);
|
|
2752
2754
|
if (e) {
|
|
2753
2755
|
const i = Date.now() - parseInt(e, 10);
|
|
2754
|
-
if (i <
|
|
2756
|
+
if (i < $e) {
|
|
2755
2757
|
a("debug", "Skipping session counts cleanup (throttled)", {
|
|
2756
|
-
data: { timeSinceLastCleanup: i, throttleMs:
|
|
2758
|
+
data: { timeSinceLastCleanup: i, throttleMs: $e }
|
|
2757
2759
|
});
|
|
2758
2760
|
return;
|
|
2759
2761
|
}
|
|
@@ -2766,7 +2768,7 @@ class Er extends w {
|
|
|
2766
2768
|
const l = localStorage.getItem(o);
|
|
2767
2769
|
if (l) {
|
|
2768
2770
|
const c = JSON.parse(l);
|
|
2769
|
-
c._timestamp && Date.now() - c._timestamp >
|
|
2771
|
+
c._timestamp && Date.now() - c._timestamp > Fe && n.push(o);
|
|
2770
2772
|
}
|
|
2771
2773
|
} catch {
|
|
2772
2774
|
}
|
|
@@ -2807,7 +2809,7 @@ class Er extends w {
|
|
|
2807
2809
|
* @internal
|
|
2808
2810
|
*/
|
|
2809
2811
|
saveSessionCounts(e) {
|
|
2810
|
-
const t = this.get("userId") || "anonymous", r =
|
|
2812
|
+
const t = this.get("userId") || "anonymous", r = He(t, e);
|
|
2811
2813
|
try {
|
|
2812
2814
|
const n = {
|
|
2813
2815
|
...this.sessionEventCounts,
|
|
@@ -2823,7 +2825,7 @@ class Er extends w {
|
|
|
2823
2825
|
}
|
|
2824
2826
|
}
|
|
2825
2827
|
}
|
|
2826
|
-
class
|
|
2828
|
+
class Tr {
|
|
2827
2829
|
/**
|
|
2828
2830
|
* Gets or creates a unique user ID.
|
|
2829
2831
|
*
|
|
@@ -2841,15 +2843,15 @@ class Sr {
|
|
|
2841
2843
|
* @returns Persistent unique user ID (UUID v4 format)
|
|
2842
2844
|
*/
|
|
2843
2845
|
static getId(e) {
|
|
2844
|
-
const t = e.getItem(
|
|
2846
|
+
const t = e.getItem(Se);
|
|
2845
2847
|
if (t)
|
|
2846
2848
|
return t;
|
|
2847
|
-
const r =
|
|
2848
|
-
return e.setItem(
|
|
2849
|
+
const r = ct();
|
|
2850
|
+
return e.setItem(Se, r), r;
|
|
2849
2851
|
}
|
|
2850
2852
|
}
|
|
2851
|
-
const
|
|
2852
|
-
class
|
|
2853
|
+
const Ir = /^\d{13}-[a-z0-9]{9}$/;
|
|
2854
|
+
class vr extends w {
|
|
2853
2855
|
storageManager;
|
|
2854
2856
|
eventManager;
|
|
2855
2857
|
projectId;
|
|
@@ -2875,7 +2877,7 @@ class Tr extends w {
|
|
|
2875
2877
|
return;
|
|
2876
2878
|
}
|
|
2877
2879
|
const e = this.getProjectId();
|
|
2878
|
-
this.broadcastChannel = new BroadcastChannel(
|
|
2880
|
+
this.broadcastChannel = new BroadcastChannel(Rt(e)), this.broadcastChannel.onmessage = (t) => {
|
|
2879
2881
|
const { action: r, sessionId: n, timestamp: i, projectId: o } = t.data ?? {};
|
|
2880
2882
|
o === e && (r === "session_start" && n && typeof i == "number" && i > Date.now() - 5e3 ? (this.set("sessionId", n), this.persistSession(n, i), this.isTracking && this.setupSessionTimeout()) : r && r !== "session_start" && a("debug", "Ignored BroadcastChannel message with unknown action", { data: { action: r } }));
|
|
2881
2883
|
};
|
|
@@ -2895,7 +2897,7 @@ class Tr extends w {
|
|
|
2895
2897
|
const e = this.loadStoredSession();
|
|
2896
2898
|
if (!e)
|
|
2897
2899
|
return null;
|
|
2898
|
-
if (!
|
|
2900
|
+
if (!Ir.test(e.id))
|
|
2899
2901
|
return a("warn", "Invalid session ID format recovered from storage, clearing", {
|
|
2900
2902
|
data: { sessionId: e.id }
|
|
2901
2903
|
}), this.clearStoredSession(), null;
|
|
@@ -2940,7 +2942,7 @@ class Tr extends w {
|
|
|
2940
2942
|
this.storageManager.setItem(t, r), this.storageManager.setSessionItem(t, r);
|
|
2941
2943
|
}
|
|
2942
2944
|
getSessionStorageKey() {
|
|
2943
|
-
return
|
|
2945
|
+
return Ct(this.getProjectId());
|
|
2944
2946
|
}
|
|
2945
2947
|
getProjectId() {
|
|
2946
2948
|
return this.projectId;
|
|
@@ -3006,9 +3008,9 @@ class Tr extends w {
|
|
|
3006
3008
|
let r, n;
|
|
3007
3009
|
if (e) {
|
|
3008
3010
|
const i = this.loadStoredSession();
|
|
3009
|
-
r = i?.referrer ??
|
|
3011
|
+
r = i?.referrer ?? he(), n = i?.utm ?? fe();
|
|
3010
3012
|
} else
|
|
3011
|
-
r =
|
|
3013
|
+
r = he(), n = fe();
|
|
3012
3014
|
a("debug", "Session tracking initialized", {
|
|
3013
3015
|
data: {
|
|
3014
3016
|
sessionId: t,
|
|
@@ -3059,7 +3061,7 @@ class Tr extends w {
|
|
|
3059
3061
|
*/
|
|
3060
3062
|
renewSession() {
|
|
3061
3063
|
this.needsRenewal = !1;
|
|
3062
|
-
const e = this.generateSessionId(), t =
|
|
3064
|
+
const e = this.generateSessionId(), t = he(), r = fe();
|
|
3063
3065
|
a("debug", "Renewing session after timeout", {
|
|
3064
3066
|
data: { newSessionId: e }
|
|
3065
3067
|
}), this.set("sessionId", e), this.set("sessionReferrer", t), this.set("sessionUtm", r), this.persistSession(e, Date.now(), t, r), this.cleanupCrossTabSync(), this.initCrossTabSync(), this.shareSession(e), this.eventManager.track({
|
|
@@ -3180,7 +3182,7 @@ class Tr extends w {
|
|
|
3180
3182
|
this.clearSessionTimeout(), this.cleanupActivityListeners(), this.cleanupCrossTabSync(), this.cleanupLifecycleListeners(), this.isTracking = !1, this.needsRenewal = !1, this.set("hasStartSession", !1);
|
|
3181
3183
|
}
|
|
3182
3184
|
}
|
|
3183
|
-
class
|
|
3185
|
+
class _r extends w {
|
|
3184
3186
|
eventManager;
|
|
3185
3187
|
storageManager;
|
|
3186
3188
|
sessionManager = null;
|
|
@@ -3215,7 +3217,7 @@ class Ir extends w {
|
|
|
3215
3217
|
}
|
|
3216
3218
|
const t = this.get("config")?.integrations?.tracelog?.projectId ?? "custom";
|
|
3217
3219
|
try {
|
|
3218
|
-
this.sessionManager = new
|
|
3220
|
+
this.sessionManager = new vr(this.storageManager, this.eventManager, t), this.sessionManager.startTracking(), this.eventManager.flushPendingEvents();
|
|
3219
3221
|
} catch (r) {
|
|
3220
3222
|
if (this.sessionManager) {
|
|
3221
3223
|
try {
|
|
@@ -3268,7 +3270,7 @@ class Ir extends w {
|
|
|
3268
3270
|
this.destroyed || (this.sessionManager && (this.sessionManager.destroy(), this.sessionManager = null), this.destroyed = !0);
|
|
3269
3271
|
}
|
|
3270
3272
|
}
|
|
3271
|
-
class
|
|
3273
|
+
class yr extends w {
|
|
3272
3274
|
eventManager;
|
|
3273
3275
|
onTrack;
|
|
3274
3276
|
originalPushState;
|
|
@@ -3308,7 +3310,7 @@ class vr extends w {
|
|
|
3308
3310
|
};
|
|
3309
3311
|
}
|
|
3310
3312
|
trackCurrentPage = () => {
|
|
3311
|
-
const e = window.location.href, t =
|
|
3313
|
+
const e = window.location.href, t = _e(e, this.get("config").sensitiveQueryParams);
|
|
3312
3314
|
if (this.get("pageUrl") === t)
|
|
3313
3315
|
return;
|
|
3314
3316
|
const r = Date.now(), n = this.get("config").pageViewThrottleMs ?? 1e3;
|
|
@@ -3326,7 +3328,7 @@ class vr extends w {
|
|
|
3326
3328
|
});
|
|
3327
3329
|
};
|
|
3328
3330
|
trackInitialPageView() {
|
|
3329
|
-
const e =
|
|
3331
|
+
const e = _e(window.location.href, this.get("config").sensitiveQueryParams), t = this.extractPageViewData();
|
|
3330
3332
|
this.lastPageViewTime = Date.now(), this.eventManager.track({
|
|
3331
3333
|
type: d.PAGE_VIEW,
|
|
3332
3334
|
page_url: e,
|
|
@@ -3344,7 +3346,7 @@ class vr extends w {
|
|
|
3344
3346
|
};
|
|
3345
3347
|
}
|
|
3346
3348
|
}
|
|
3347
|
-
class
|
|
3349
|
+
class wr extends w {
|
|
3348
3350
|
eventManager;
|
|
3349
3351
|
lastClickTimes = /* @__PURE__ */ new Map();
|
|
3350
3352
|
clickHandler;
|
|
@@ -3482,7 +3484,7 @@ class _r extends w {
|
|
|
3482
3484
|
return e.hasAttribute(`${b}-name`) ? e : e.closest(`[${b}-name]`);
|
|
3483
3485
|
}
|
|
3484
3486
|
getRelevantClickElement(e) {
|
|
3485
|
-
for (const t of
|
|
3487
|
+
for (const t of wt)
|
|
3486
3488
|
try {
|
|
3487
3489
|
if (e.matches(t))
|
|
3488
3490
|
return e;
|
|
@@ -3562,7 +3564,7 @@ class _r extends w {
|
|
|
3562
3564
|
*/
|
|
3563
3565
|
sanitizeText(e) {
|
|
3564
3566
|
let t = e;
|
|
3565
|
-
for (const r of
|
|
3567
|
+
for (const r of ot) {
|
|
3566
3568
|
const n = new RegExp(r.source, r.flags);
|
|
3567
3569
|
t = t.replace(n, "[REDACTED]");
|
|
3568
3570
|
}
|
|
@@ -3601,7 +3603,7 @@ class _r extends w {
|
|
|
3601
3603
|
};
|
|
3602
3604
|
}
|
|
3603
3605
|
}
|
|
3604
|
-
class
|
|
3606
|
+
class br extends w {
|
|
3605
3607
|
eventManager;
|
|
3606
3608
|
containers = [];
|
|
3607
3609
|
limitWarningLogged = !1;
|
|
@@ -3829,7 +3831,7 @@ class yr extends w {
|
|
|
3829
3831
|
e.isPrimary = t;
|
|
3830
3832
|
}
|
|
3831
3833
|
}
|
|
3832
|
-
class
|
|
3834
|
+
class Ar extends w {
|
|
3833
3835
|
eventManager;
|
|
3834
3836
|
trackedElements = /* @__PURE__ */ new Map();
|
|
3835
3837
|
observer = null;
|
|
@@ -3990,7 +3992,7 @@ class wr extends w {
|
|
|
3990
3992
|
});
|
|
3991
3993
|
}
|
|
3992
3994
|
}
|
|
3993
|
-
class
|
|
3995
|
+
class Lr {
|
|
3994
3996
|
storage;
|
|
3995
3997
|
sessionStorageRef;
|
|
3996
3998
|
fallbackStorage = /* @__PURE__ */ new Map();
|
|
@@ -4273,7 +4275,7 @@ class br {
|
|
|
4273
4275
|
this.fallbackSessionStorage.delete(e);
|
|
4274
4276
|
}
|
|
4275
4277
|
}
|
|
4276
|
-
class
|
|
4278
|
+
class Mr extends w {
|
|
4277
4279
|
eventManager;
|
|
4278
4280
|
reportedByNav = /* @__PURE__ */ new Map();
|
|
4279
4281
|
navigationHistory = [];
|
|
@@ -4284,7 +4286,7 @@ class Ar extends w {
|
|
|
4284
4286
|
navigationCounter = 0;
|
|
4285
4287
|
// Counter for handling simultaneous navigations edge case
|
|
4286
4288
|
constructor(e) {
|
|
4287
|
-
super(), this.eventManager = e, this.vitalThresholds =
|
|
4289
|
+
super(), this.eventManager = e, this.vitalThresholds = Qe(ve);
|
|
4288
4290
|
}
|
|
4289
4291
|
/**
|
|
4290
4292
|
* Starts tracking Web Vitals and performance metrics.
|
|
@@ -4301,8 +4303,8 @@ class Ar extends w {
|
|
|
4301
4303
|
* @returns Promise that resolves when tracking is initialized
|
|
4302
4304
|
*/
|
|
4303
4305
|
async startTracking() {
|
|
4304
|
-
const e = this.get("config"), t = e?.webVitalsMode ??
|
|
4305
|
-
this.vitalThresholds =
|
|
4306
|
+
const e = this.get("config"), t = e?.webVitalsMode ?? ve;
|
|
4307
|
+
this.vitalThresholds = Qe(t), e?.webVitalsThresholds && (this.vitalThresholds = { ...this.vitalThresholds, ...e.webVitalsThresholds }), await this.initWebVitals(), this.observeLongTasks();
|
|
4306
4308
|
}
|
|
4307
4309
|
/**
|
|
4308
4310
|
* Stops tracking Web Vitals and cleans up resources.
|
|
@@ -4372,7 +4374,7 @@ class Ar extends w {
|
|
|
4372
4374
|
}
|
|
4373
4375
|
async initWebVitals() {
|
|
4374
4376
|
try {
|
|
4375
|
-
const { onLCP: e, onCLS: t, onFCP: r, onTTFB: n, onINP: i } = await Promise.resolve().then(() =>
|
|
4377
|
+
const { onLCP: e, onCLS: t, onFCP: r, onTTFB: n, onINP: i } = await Promise.resolve().then(() => os), o = (l) => (c) => {
|
|
4376
4378
|
const u = Number(c.value.toFixed(2));
|
|
4377
4379
|
this.sendVital({ type: l, value: u });
|
|
4378
4380
|
};
|
|
@@ -4399,7 +4401,7 @@ class Ar extends w {
|
|
|
4399
4401
|
const t = e.getEntries();
|
|
4400
4402
|
for (const r of t) {
|
|
4401
4403
|
const n = Number(r.duration.toFixed(2)), i = Date.now();
|
|
4402
|
-
i - this.lastLongTaskSentAt >=
|
|
4404
|
+
i - this.lastLongTaskSentAt >= Qt && (this.shouldSendVital("LONG_TASK", n) && this.trackWebVital("LONG_TASK", n), this.lastLongTaskSentAt = i);
|
|
4403
4405
|
}
|
|
4404
4406
|
},
|
|
4405
4407
|
{ type: "longtask", buffered: !0 }
|
|
@@ -4415,7 +4417,7 @@ class Ar extends w {
|
|
|
4415
4417
|
return;
|
|
4416
4418
|
if (r)
|
|
4417
4419
|
r.add(e.type);
|
|
4418
|
-
else if (this.reportedByNav.set(t, /* @__PURE__ */ new Set([e.type])), this.navigationHistory.push(t), this.navigationHistory.length >
|
|
4420
|
+
else if (this.reportedByNav.set(t, /* @__PURE__ */ new Set([e.type])), this.navigationHistory.push(t), this.navigationHistory.length > Kt) {
|
|
4419
4421
|
const i = this.navigationHistory.shift();
|
|
4420
4422
|
i && this.reportedByNav.delete(i);
|
|
4421
4423
|
}
|
|
@@ -4506,7 +4508,7 @@ class Ar extends w {
|
|
|
4506
4508
|
return !(typeof r == "number" && t <= r);
|
|
4507
4509
|
}
|
|
4508
4510
|
}
|
|
4509
|
-
class
|
|
4511
|
+
class ie extends w {
|
|
4510
4512
|
eventManager;
|
|
4511
4513
|
recentErrors = /* @__PURE__ */ new Map();
|
|
4512
4514
|
errorBurstCounter = 0;
|
|
@@ -4542,28 +4544,32 @@ class Lr extends w {
|
|
|
4542
4544
|
const e = Date.now();
|
|
4543
4545
|
if (e < this.burstBackoffUntil)
|
|
4544
4546
|
return !1;
|
|
4545
|
-
if (e - this.burstWindowStart >
|
|
4546
|
-
return this.burstBackoffUntil = e +
|
|
4547
|
+
if (e - this.burstWindowStart > Xt && (this.errorBurstCounter = 0, this.burstWindowStart = e), this.errorBurstCounter++, this.errorBurstCounter > Gt)
|
|
4548
|
+
return this.burstBackoffUntil = e + je, a("debug", "Error burst detected - entering cooldown", {
|
|
4547
4549
|
data: {
|
|
4548
4550
|
errorsInWindow: this.errorBurstCounter,
|
|
4549
|
-
cooldownMs:
|
|
4551
|
+
cooldownMs: je
|
|
4550
4552
|
}
|
|
4551
4553
|
}), !1;
|
|
4552
|
-
const r = this.get("config")
|
|
4554
|
+
const r = this.get("config").errorSampling ?? at;
|
|
4553
4555
|
return Math.random() < r;
|
|
4554
4556
|
}
|
|
4555
4557
|
handleError = (e) => {
|
|
4556
4558
|
if (!this.shouldSample())
|
|
4557
4559
|
return;
|
|
4558
4560
|
const t = this.sanitize(e.message || "Unknown error");
|
|
4559
|
-
this.shouldSuppressError(W.JS_ERROR, t)
|
|
4561
|
+
if (this.shouldSuppressError(W.JS_ERROR, t))
|
|
4562
|
+
return;
|
|
4563
|
+
const r = typeof e.error?.stack == "string" ? this.truncateStack(e.error.stack) : void 0;
|
|
4564
|
+
this.eventManager.track({
|
|
4560
4565
|
type: d.ERROR,
|
|
4561
4566
|
error_data: {
|
|
4562
4567
|
type: W.JS_ERROR,
|
|
4563
4568
|
message: t,
|
|
4564
|
-
...e.filename && { filename: e.filename },
|
|
4565
|
-
...e.lineno && { line: e.lineno },
|
|
4566
|
-
...e.colno && { column: e.colno }
|
|
4569
|
+
...e.filename !== "" && { filename: e.filename },
|
|
4570
|
+
...e.lineno !== 0 && { line: e.lineno },
|
|
4571
|
+
...e.colno !== 0 && { column: e.colno },
|
|
4572
|
+
...r !== void 0 && { stack: r }
|
|
4567
4573
|
}
|
|
4568
4574
|
});
|
|
4569
4575
|
};
|
|
@@ -4571,30 +4577,38 @@ class Lr extends w {
|
|
|
4571
4577
|
if (!this.shouldSample())
|
|
4572
4578
|
return;
|
|
4573
4579
|
const t = this.extractRejectionMessage(e.reason), r = this.sanitize(t);
|
|
4574
|
-
this.shouldSuppressError(W.PROMISE_REJECTION, r)
|
|
4580
|
+
if (this.shouldSuppressError(W.PROMISE_REJECTION, r))
|
|
4581
|
+
return;
|
|
4582
|
+
const n = e.reason instanceof Error && typeof e.reason.stack == "string" ? this.truncateStack(e.reason.stack) : void 0;
|
|
4583
|
+
this.eventManager.track({
|
|
4575
4584
|
type: d.ERROR,
|
|
4576
4585
|
error_data: {
|
|
4577
4586
|
type: W.PROMISE_REJECTION,
|
|
4578
|
-
message: r
|
|
4587
|
+
message: r,
|
|
4588
|
+
...n !== void 0 && { stack: n }
|
|
4579
4589
|
}
|
|
4580
4590
|
});
|
|
4581
4591
|
};
|
|
4582
4592
|
extractRejectionMessage(e) {
|
|
4583
|
-
if (
|
|
4593
|
+
if (e == null) return "Unknown rejection";
|
|
4584
4594
|
if (typeof e == "string") return e;
|
|
4585
4595
|
if (e instanceof Error)
|
|
4586
|
-
return e.
|
|
4596
|
+
return e.message;
|
|
4587
4597
|
if (typeof e == "object" && "message" in e)
|
|
4588
4598
|
return String(e.message);
|
|
4589
4599
|
try {
|
|
4590
4600
|
return JSON.stringify(e);
|
|
4591
4601
|
} catch {
|
|
4592
|
-
return
|
|
4602
|
+
return "Unserializable rejection";
|
|
4593
4603
|
}
|
|
4594
4604
|
}
|
|
4595
4605
|
sanitize(e) {
|
|
4596
|
-
|
|
4597
|
-
|
|
4606
|
+
const t = e.length > We ? e.slice(0, We) + "..." : e;
|
|
4607
|
+
return this.sanitizePii(t);
|
|
4608
|
+
}
|
|
4609
|
+
sanitizePii(e) {
|
|
4610
|
+
let t = e;
|
|
4611
|
+
for (const r of ot) {
|
|
4598
4612
|
const n = new RegExp(r.source, r.flags);
|
|
4599
4613
|
t = t.replace(n, "[REDACTED]");
|
|
4600
4614
|
}
|
|
@@ -4602,12 +4616,19 @@ class Lr extends w {
|
|
|
4602
4616
|
}
|
|
4603
4617
|
shouldSuppressError(e, t) {
|
|
4604
4618
|
const r = Date.now(), n = `${e}:${t}`, i = this.recentErrors.get(n);
|
|
4605
|
-
return i && r - i <
|
|
4619
|
+
return i !== void 0 && r - i < Ge ? (this.recentErrors.set(n, r), !0) : (this.recentErrors.set(n, r), this.recentErrors.size > Wt ? (this.recentErrors.clear(), this.recentErrors.set(n, r), !1) : (this.recentErrors.size > te && this.pruneOldErrors(), !1));
|
|
4620
|
+
}
|
|
4621
|
+
static TRUNCATION_SUFFIX = `
|
|
4622
|
+
...truncated`;
|
|
4623
|
+
truncateStack(e) {
|
|
4624
|
+
if (e.length <= Xe) return this.sanitizePii(e);
|
|
4625
|
+
const t = Xe - ie.TRUNCATION_SUFFIX.length, r = e.slice(0, t) + ie.TRUNCATION_SUFFIX;
|
|
4626
|
+
return this.sanitizePii(r);
|
|
4606
4627
|
}
|
|
4607
4628
|
pruneOldErrors() {
|
|
4608
4629
|
const e = Date.now();
|
|
4609
4630
|
for (const [n, i] of this.recentErrors.entries())
|
|
4610
|
-
e - i >
|
|
4631
|
+
e - i > Ge && this.recentErrors.delete(n);
|
|
4611
4632
|
if (this.recentErrors.size <= te)
|
|
4612
4633
|
return;
|
|
4613
4634
|
const t = Array.from(this.recentErrors.entries()).sort((n, i) => n[1] - i[1]), r = this.recentErrors.size - te;
|
|
@@ -4617,11 +4638,11 @@ class Lr extends w {
|
|
|
4617
4638
|
}
|
|
4618
4639
|
}
|
|
4619
4640
|
}
|
|
4620
|
-
class
|
|
4641
|
+
class Cr extends w {
|
|
4621
4642
|
isInitialized = !1;
|
|
4622
4643
|
suppressNextScrollTimer = null;
|
|
4623
4644
|
pageUnloadHandler = null;
|
|
4624
|
-
emitter = new
|
|
4645
|
+
emitter = new mr();
|
|
4625
4646
|
transformers = {};
|
|
4626
4647
|
customHeadersProvider;
|
|
4627
4648
|
managers = {};
|
|
@@ -4639,11 +4660,11 @@ class Mr extends w {
|
|
|
4639
4660
|
async init(e = {}) {
|
|
4640
4661
|
if (this.isInitialized)
|
|
4641
4662
|
return { sessionId: this.get("sessionId") ?? "" };
|
|
4642
|
-
this.managers.storage = new
|
|
4663
|
+
this.managers.storage = new Lr();
|
|
4643
4664
|
try {
|
|
4644
4665
|
this.setupState(e);
|
|
4645
4666
|
const t = e.integrations?.custom?.headers ?? {}, r = e.integrations?.custom?.fetchCredentials ?? "include";
|
|
4646
|
-
return this.managers.event = new
|
|
4667
|
+
return this.managers.event = new pr(
|
|
4647
4668
|
this.managers.storage,
|
|
4648
4669
|
this.emitter,
|
|
4649
4670
|
this.transformers,
|
|
@@ -4673,7 +4694,7 @@ class Mr extends w {
|
|
|
4673
4694
|
}
|
|
4674
4695
|
let r = t;
|
|
4675
4696
|
t && typeof t == "object" && !Array.isArray(t) && Object.getPrototypeOf(t) !== Object.prototype && (r = Object.assign({}, t));
|
|
4676
|
-
const { valid: n, error: i, sanitizedMetadata: o } =
|
|
4697
|
+
const { valid: n, error: i, sanitizedMetadata: o } = fr(e, r);
|
|
4677
4698
|
if (!n) {
|
|
4678
4699
|
if (this.get("mode") === se.QA)
|
|
4679
4700
|
throw new Error(`[TraceLog] Custom event "${e}" validation failed: ${i}`);
|
|
@@ -4743,14 +4764,14 @@ class Mr extends w {
|
|
|
4743
4764
|
}
|
|
4744
4765
|
setupState(e = {}) {
|
|
4745
4766
|
this.set("config", e);
|
|
4746
|
-
const t =
|
|
4767
|
+
const t = Tr.getId(this.managers.storage);
|
|
4747
4768
|
this.set("userId", t);
|
|
4748
|
-
const r =
|
|
4769
|
+
const r = ir(e);
|
|
4749
4770
|
this.set("collectApiUrls", r);
|
|
4750
|
-
const n =
|
|
4771
|
+
const n = Bt();
|
|
4751
4772
|
this.set("device", n);
|
|
4752
|
-
const i =
|
|
4753
|
-
this.set("pageUrl", i),
|
|
4773
|
+
const i = _e(window.location.href, e.sensitiveQueryParams);
|
|
4774
|
+
this.set("pageUrl", i), Zt() && this.set("mode", se.QA);
|
|
4754
4775
|
}
|
|
4755
4776
|
/**
|
|
4756
4777
|
* Returns the current configuration object.
|
|
@@ -4801,7 +4822,7 @@ class Mr extends w {
|
|
|
4801
4822
|
valid: !1,
|
|
4802
4823
|
error: "Global metadata must be a plain object"
|
|
4803
4824
|
};
|
|
4804
|
-
const t =
|
|
4825
|
+
const t = ht("Global", e, "globalMetadata");
|
|
4805
4826
|
return t.valid ? { valid: !0 } : {
|
|
4806
4827
|
valid: !1,
|
|
4807
4828
|
error: t.error
|
|
@@ -4868,7 +4889,7 @@ class Mr extends w {
|
|
|
4868
4889
|
a("warn", "identify() userId exceeds 256 characters", { data: { length: e.trim().length } });
|
|
4869
4890
|
return;
|
|
4870
4891
|
}
|
|
4871
|
-
const r = e.trim(), n =
|
|
4892
|
+
const r = e.trim(), n = dt(t), i = {
|
|
4872
4893
|
userId: r,
|
|
4873
4894
|
...n ? { traits: n } : {}
|
|
4874
4895
|
};
|
|
@@ -4887,8 +4908,8 @@ class Mr extends w {
|
|
|
4887
4908
|
*/
|
|
4888
4909
|
async resetIdentity() {
|
|
4889
4910
|
await this.managers.event?.flushImmediately(), this.set("identity", void 0), this.clearPersistedIdentity();
|
|
4890
|
-
const e =
|
|
4891
|
-
this.managers.storage.setItem(
|
|
4911
|
+
const e = ct();
|
|
4912
|
+
this.managers.storage.setItem(Se, e), this.set("userId", e), this.set("hasStartSession", !1), this.set("sessionId", null), this.handlers.session?.stopTracking(), this.handlers.session?.startTracking(), a("debug", "Identity reset, new UUID generated");
|
|
4892
4913
|
}
|
|
4893
4914
|
/**
|
|
4894
4915
|
* Returns the project ID used for identity storage scoping.
|
|
@@ -4902,7 +4923,7 @@ class Mr extends w {
|
|
|
4902
4923
|
*/
|
|
4903
4924
|
persistIdentity(e) {
|
|
4904
4925
|
try {
|
|
4905
|
-
const t = this.getProjectId(), r =
|
|
4926
|
+
const t = this.getProjectId(), r = de(t);
|
|
4906
4927
|
this.managers.storage.setItem(r, JSON.stringify(e));
|
|
4907
4928
|
} catch {
|
|
4908
4929
|
a("debug", "Failed to persist identity to localStorage");
|
|
@@ -4913,7 +4934,7 @@ class Mr extends w {
|
|
|
4913
4934
|
* Also migrates pending identity (set before init) to the project-scoped key.
|
|
4914
4935
|
*/
|
|
4915
4936
|
loadPersistedIdentity() {
|
|
4916
|
-
const e = this.managers.storage, t = this.getProjectId(), r =
|
|
4937
|
+
const e = this.managers.storage, t = this.getProjectId(), r = de(t);
|
|
4917
4938
|
try {
|
|
4918
4939
|
const n = e.getItem(H);
|
|
4919
4940
|
if (n) {
|
|
@@ -4965,7 +4986,7 @@ class Mr extends w {
|
|
|
4965
4986
|
clearPersistedIdentity() {
|
|
4966
4987
|
try {
|
|
4967
4988
|
const e = this.managers.storage, t = this.getProjectId();
|
|
4968
|
-
e.removeItem(
|
|
4989
|
+
e.removeItem(de(t)), e.removeItem(H);
|
|
4969
4990
|
} catch {
|
|
4970
4991
|
a("debug", "Failed to clear persisted identity");
|
|
4971
4992
|
}
|
|
@@ -4977,7 +4998,7 @@ class Mr extends w {
|
|
|
4977
4998
|
}
|
|
4978
4999
|
initializeHandlers() {
|
|
4979
5000
|
const e = this.get("config");
|
|
4980
|
-
this.handlers.session = new
|
|
5001
|
+
this.handlers.session = new _r(
|
|
4981
5002
|
this.managers.storage,
|
|
4982
5003
|
this.managers.event
|
|
4983
5004
|
), this.handlers.session.startTracking();
|
|
@@ -4986,20 +5007,20 @@ class Mr extends w {
|
|
|
4986
5007
|
this.set("suppressNextScroll", !1);
|
|
4987
5008
|
}, 500);
|
|
4988
5009
|
};
|
|
4989
|
-
this.handlers.pageView = new
|
|
5010
|
+
this.handlers.pageView = new yr(this.managers.event, t), this.handlers.pageView.startTracking(), this.handlers.click = new wr(this.managers.event), this.handlers.click.startTracking(), this.handlers.scroll = new br(this.managers.event), this.handlers.scroll.startTracking(), this.handlers.performance = new Mr(this.managers.event), this.handlers.performance.startTracking().catch((r) => {
|
|
4990
5011
|
a("warn", "Failed to start performance tracking", { error: r });
|
|
4991
|
-
}), this.handlers.error = new
|
|
5012
|
+
}), this.handlers.error = new ie(this.managers.event), this.handlers.error.startTracking(), e.viewport && (this.handlers.viewport = new Ar(this.managers.event), this.handlers.viewport.startTracking());
|
|
4992
5013
|
}
|
|
4993
5014
|
}
|
|
4994
|
-
const
|
|
5015
|
+
const k = [], M = [];
|
|
4995
5016
|
let D = null, h = null, R = !1, p = !1, P = null;
|
|
4996
|
-
const
|
|
5017
|
+
const Rr = async (s) => typeof window > "u" || typeof document > "u" ? { sessionId: "" } : (p = !1, window.__traceLogDisabled === !0 ? { sessionId: "" } : h ? { sessionId: h.getSessionId() ?? "" } : (R && P || (R = !0, P = (async () => {
|
|
4997
5018
|
try {
|
|
4998
|
-
const e =
|
|
5019
|
+
const e = ur(s ?? {}), t = new Cr();
|
|
4999
5020
|
try {
|
|
5000
|
-
|
|
5021
|
+
k.forEach(({ event: o, callback: l }) => {
|
|
5001
5022
|
t.on(o, l);
|
|
5002
|
-
}),
|
|
5023
|
+
}), k.length = 0, M.forEach(({ hook: o, fn: l }) => {
|
|
5003
5024
|
o === "beforeSend" ? t.setTransformer("beforeSend", l) : t.setTransformer("beforeBatch", l);
|
|
5004
5025
|
}), M.length = 0, D && (t.setCustomHeaders(D), D = null);
|
|
5005
5026
|
const r = t.init(e), n = new Promise((o, l) => {
|
|
@@ -5021,7 +5042,7 @@ const Cr = async (s) => typeof window > "u" || typeof document > "u" ? { session
|
|
|
5021
5042
|
} finally {
|
|
5022
5043
|
R = !1, P = null;
|
|
5023
5044
|
}
|
|
5024
|
-
})()), P)),
|
|
5045
|
+
})()), P)), Nr = (s, e) => {
|
|
5025
5046
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5026
5047
|
if (!h)
|
|
5027
5048
|
throw new Error("[TraceLog] TraceLog not initialized. Please call init() first.");
|
|
@@ -5029,25 +5050,25 @@ const Cr = async (s) => typeof window > "u" || typeof document > "u" ? { session
|
|
|
5029
5050
|
throw new Error("[TraceLog] Cannot send events while TraceLog is being destroyed");
|
|
5030
5051
|
h.sendCustomEvent(s, e);
|
|
5031
5052
|
}
|
|
5032
|
-
},
|
|
5053
|
+
}, Or = (s, e) => {
|
|
5033
5054
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5034
5055
|
if (!h || R) {
|
|
5035
|
-
|
|
5056
|
+
k.push({ event: s, callback: e });
|
|
5036
5057
|
return;
|
|
5037
5058
|
}
|
|
5038
5059
|
h.on(s, e);
|
|
5039
5060
|
}
|
|
5040
|
-
},
|
|
5061
|
+
}, Pr = (s, e) => {
|
|
5041
5062
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5042
5063
|
if (!h) {
|
|
5043
|
-
const t =
|
|
5044
|
-
t !== -1 &&
|
|
5064
|
+
const t = k.findIndex((r) => r.event === s && r.callback === e);
|
|
5065
|
+
t !== -1 && k.splice(t, 1);
|
|
5045
5066
|
return;
|
|
5046
5067
|
}
|
|
5047
5068
|
h.off(s, e);
|
|
5048
5069
|
}
|
|
5049
5070
|
};
|
|
5050
|
-
function
|
|
5071
|
+
function Dr(s, e) {
|
|
5051
5072
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5052
5073
|
if (typeof e != "function")
|
|
5053
5074
|
throw new Error(`[TraceLog] Transformer must be a function, received: ${typeof e}`);
|
|
@@ -5061,7 +5082,7 @@ function Pr(s, e) {
|
|
|
5061
5082
|
s === "beforeSend" ? h.setTransformer("beforeSend", e) : h.setTransformer("beforeBatch", e);
|
|
5062
5083
|
}
|
|
5063
5084
|
}
|
|
5064
|
-
const
|
|
5085
|
+
const kr = (s) => {
|
|
5065
5086
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5066
5087
|
if (!h) {
|
|
5067
5088
|
const e = M.findIndex((t) => t.hook === s);
|
|
@@ -5084,7 +5105,7 @@ const Dr = (s) => {
|
|
|
5084
5105
|
throw new Error("[TraceLog] Cannot set custom headers while TraceLog is being destroyed");
|
|
5085
5106
|
h.setCustomHeaders(s);
|
|
5086
5107
|
}
|
|
5087
|
-
},
|
|
5108
|
+
}, Ur = () => {
|
|
5088
5109
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5089
5110
|
if (!h) {
|
|
5090
5111
|
D = null;
|
|
@@ -5094,7 +5115,7 @@ const Dr = (s) => {
|
|
|
5094
5115
|
throw new Error("[TraceLog] Cannot remove custom headers while TraceLog is being destroyed");
|
|
5095
5116
|
h.removeCustomHeaders();
|
|
5096
5117
|
}
|
|
5097
|
-
},
|
|
5118
|
+
}, Hr = () => typeof window > "u" || typeof document > "u" ? !1 : h !== null, Fr = () => typeof window > "u" || typeof document > "u" || !h ? null : h.getSessionId(), xr = () => {
|
|
5098
5119
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5099
5120
|
if (p)
|
|
5100
5121
|
throw new Error("[TraceLog] Destroy operation already in progress");
|
|
@@ -5104,14 +5125,14 @@ const Dr = (s) => {
|
|
|
5104
5125
|
}
|
|
5105
5126
|
p = !0;
|
|
5106
5127
|
try {
|
|
5107
|
-
h.destroy(), h = null, R = !1, P = null,
|
|
5128
|
+
h.destroy(), h = null, R = !1, P = null, k.length = 0, M.length = 0, D = null, p = !1;
|
|
5108
5129
|
} catch (s) {
|
|
5109
|
-
h = null, R = !1, P = null,
|
|
5130
|
+
h = null, R = !1, P = null, k.length = 0, M.length = 0, D = null, p = !1, a("warn", "Error during destroy, forced cleanup completed", { error: s });
|
|
5110
5131
|
}
|
|
5111
5132
|
}
|
|
5112
|
-
}, Fr = (s) => {
|
|
5113
|
-
typeof window > "u" || typeof document > "u" || Jt(s);
|
|
5114
5133
|
}, $r = (s) => {
|
|
5134
|
+
typeof window > "u" || typeof document > "u" || er(s);
|
|
5135
|
+
}, Br = (s) => {
|
|
5115
5136
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5116
5137
|
if (!h)
|
|
5117
5138
|
throw new Error("[TraceLog] TraceLog not initialized. Please call init() first.");
|
|
@@ -5119,7 +5140,7 @@ const Dr = (s) => {
|
|
|
5119
5140
|
throw new Error("[TraceLog] Cannot update metadata while TraceLog is being destroyed");
|
|
5120
5141
|
h.updateGlobalMetadata(s);
|
|
5121
5142
|
}
|
|
5122
|
-
},
|
|
5143
|
+
}, Wr = (s) => {
|
|
5123
5144
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5124
5145
|
if (!h)
|
|
5125
5146
|
throw new Error("[TraceLog] TraceLog not initialized. Please call init() first.");
|
|
@@ -5127,7 +5148,7 @@ const Dr = (s) => {
|
|
|
5127
5148
|
throw new Error("[TraceLog] Cannot update metadata while TraceLog is being destroyed");
|
|
5128
5149
|
h.mergeGlobalMetadata(s);
|
|
5129
5150
|
}
|
|
5130
|
-
},
|
|
5151
|
+
}, Xr = (s, e) => {
|
|
5131
5152
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5132
5153
|
if (!s || typeof s != "string" || s.trim().length === 0) {
|
|
5133
5154
|
a("warn", "identify() called with invalid userId");
|
|
@@ -5146,7 +5167,7 @@ const Dr = (s) => {
|
|
|
5146
5167
|
return;
|
|
5147
5168
|
}
|
|
5148
5169
|
try {
|
|
5149
|
-
const t =
|
|
5170
|
+
const t = dt(e), r = {
|
|
5150
5171
|
userId: s.trim(),
|
|
5151
5172
|
...t ? { traits: t } : {}
|
|
5152
5173
|
};
|
|
@@ -5168,38 +5189,38 @@ const Dr = (s) => {
|
|
|
5168
5189
|
throw new Error("[TraceLog] Cannot reset identity while TraceLog is being destroyed");
|
|
5169
5190
|
await h.resetIdentity();
|
|
5170
5191
|
}
|
|
5171
|
-
},
|
|
5172
|
-
init:
|
|
5173
|
-
event:
|
|
5174
|
-
on:
|
|
5175
|
-
off:
|
|
5176
|
-
setTransformer:
|
|
5177
|
-
removeTransformer:
|
|
5192
|
+
}, Is = {
|
|
5193
|
+
init: Rr,
|
|
5194
|
+
event: Nr,
|
|
5195
|
+
on: Or,
|
|
5196
|
+
off: Pr,
|
|
5197
|
+
setTransformer: Dr,
|
|
5198
|
+
removeTransformer: kr,
|
|
5178
5199
|
setCustomHeaders: Vr,
|
|
5179
|
-
removeCustomHeaders:
|
|
5180
|
-
isInitialized:
|
|
5181
|
-
getSessionId:
|
|
5200
|
+
removeCustomHeaders: Ur,
|
|
5201
|
+
isInitialized: Hr,
|
|
5202
|
+
getSessionId: Fr,
|
|
5182
5203
|
destroy: xr,
|
|
5183
|
-
setQaMode:
|
|
5184
|
-
updateGlobalMetadata:
|
|
5185
|
-
mergeGlobalMetadata:
|
|
5186
|
-
identify:
|
|
5204
|
+
setQaMode: $r,
|
|
5205
|
+
updateGlobalMetadata: Br,
|
|
5206
|
+
mergeGlobalMetadata: Wr,
|
|
5207
|
+
identify: Xr,
|
|
5187
5208
|
resetIdentity: Gr
|
|
5188
5209
|
};
|
|
5189
|
-
var
|
|
5210
|
+
var be, C, j, gt, oe, Et = -1, V = function(s) {
|
|
5190
5211
|
addEventListener("pageshow", (function(e) {
|
|
5191
|
-
e.persisted && (
|
|
5212
|
+
e.persisted && (Et = e.timeStamp, s(e));
|
|
5192
5213
|
}), !0);
|
|
5193
|
-
},
|
|
5214
|
+
}, Oe = function() {
|
|
5194
5215
|
var s = self.performance && performance.getEntriesByType && performance.getEntriesByType("navigation")[0];
|
|
5195
5216
|
if (s && s.responseStart > 0 && s.responseStart < performance.now()) return s;
|
|
5196
|
-
},
|
|
5197
|
-
var s =
|
|
5217
|
+
}, le = function() {
|
|
5218
|
+
var s = Oe();
|
|
5198
5219
|
return s && s.activationStart || 0;
|
|
5199
5220
|
}, _ = function(s, e) {
|
|
5200
|
-
var t =
|
|
5201
|
-
return
|
|
5202
|
-
},
|
|
5221
|
+
var t = Oe(), r = "navigate";
|
|
5222
|
+
return Et >= 0 ? r = "back-forward-cache" : t && (document.prerendering || le() > 0 ? r = "prerender" : document.wasDiscarded ? r = "restore" : t.type && (r = t.type.replace(/_/g, "-"))), { name: s, value: e === void 0 ? -1 : e, rating: "good", delta: 0, entries: [], id: "v4-".concat(Date.now(), "-").concat(Math.floor(8999999999999 * Math.random()) + 1e12), navigationType: r };
|
|
5223
|
+
}, x = function(s, e, t) {
|
|
5203
5224
|
try {
|
|
5204
5225
|
if (PerformanceObserver.supportedEntryTypes.includes(s)) {
|
|
5205
5226
|
var r = new PerformanceObserver((function(n) {
|
|
@@ -5218,56 +5239,56 @@ var we, C, j, ft, ie, mt = -1, k = function(s) {
|
|
|
5218
5239
|
return l > c[1] ? "poor" : l > c[0] ? "needs-improvement" : "good";
|
|
5219
5240
|
})(e.value, t), s(e));
|
|
5220
5241
|
};
|
|
5221
|
-
},
|
|
5242
|
+
}, Pe = function(s) {
|
|
5222
5243
|
requestAnimationFrame((function() {
|
|
5223
5244
|
return requestAnimationFrame((function() {
|
|
5224
5245
|
return s();
|
|
5225
5246
|
}));
|
|
5226
5247
|
}));
|
|
5227
|
-
},
|
|
5248
|
+
}, Q = function(s) {
|
|
5228
5249
|
document.addEventListener("visibilitychange", (function() {
|
|
5229
5250
|
document.visibilityState === "hidden" && s();
|
|
5230
5251
|
}));
|
|
5231
|
-
},
|
|
5252
|
+
}, ce = function(s) {
|
|
5232
5253
|
var e = !1;
|
|
5233
5254
|
return function() {
|
|
5234
5255
|
e || (s(), e = !0);
|
|
5235
5256
|
};
|
|
5236
|
-
},
|
|
5257
|
+
}, F = -1, Ze = function() {
|
|
5237
5258
|
return document.visibilityState !== "hidden" || document.prerendering ? 1 / 0 : 0;
|
|
5238
|
-
},
|
|
5239
|
-
document.visibilityState === "hidden" &&
|
|
5240
|
-
},
|
|
5241
|
-
addEventListener("visibilitychange",
|
|
5242
|
-
},
|
|
5243
|
-
removeEventListener("visibilitychange",
|
|
5244
|
-
},
|
|
5245
|
-
return
|
|
5259
|
+
}, ae = function(s) {
|
|
5260
|
+
document.visibilityState === "hidden" && F > -1 && (F = s.type === "visibilitychange" ? s.timeStamp : 0, jr());
|
|
5261
|
+
}, et = function() {
|
|
5262
|
+
addEventListener("visibilitychange", ae, !0), addEventListener("prerenderingchange", ae, !0);
|
|
5263
|
+
}, jr = function() {
|
|
5264
|
+
removeEventListener("visibilitychange", ae, !0), removeEventListener("prerenderingchange", ae, !0);
|
|
5265
|
+
}, De = function() {
|
|
5266
|
+
return F < 0 && (F = Ze(), et(), V((function() {
|
|
5246
5267
|
setTimeout((function() {
|
|
5247
|
-
|
|
5268
|
+
F = Ze(), et();
|
|
5248
5269
|
}), 0);
|
|
5249
5270
|
}))), { get firstHiddenTime() {
|
|
5250
|
-
return
|
|
5271
|
+
return F;
|
|
5251
5272
|
} };
|
|
5252
5273
|
}, K = function(s) {
|
|
5253
5274
|
document.prerendering ? addEventListener("prerenderingchange", (function() {
|
|
5254
5275
|
return s();
|
|
5255
5276
|
}), !0) : s();
|
|
5256
|
-
},
|
|
5277
|
+
}, Ae = [1800, 3e3], St = function(s, e) {
|
|
5257
5278
|
e = e || {}, K((function() {
|
|
5258
|
-
var t, r =
|
|
5279
|
+
var t, r = De(), n = _("FCP"), i = x("paint", (function(o) {
|
|
5259
5280
|
o.forEach((function(l) {
|
|
5260
|
-
l.name === "first-contentful-paint" && (i.disconnect(), l.startTime < r.firstHiddenTime && (n.value = Math.max(l.startTime -
|
|
5281
|
+
l.name === "first-contentful-paint" && (i.disconnect(), l.startTime < r.firstHiddenTime && (n.value = Math.max(l.startTime - le(), 0), n.entries.push(l), t(!0)));
|
|
5261
5282
|
}));
|
|
5262
5283
|
}));
|
|
5263
|
-
i && (t = y(s, n,
|
|
5264
|
-
n = _("FCP"), t = y(s, n,
|
|
5284
|
+
i && (t = y(s, n, Ae, e.reportAllChanges), V((function(o) {
|
|
5285
|
+
n = _("FCP"), t = y(s, n, Ae, e.reportAllChanges), Pe((function() {
|
|
5265
5286
|
n.value = performance.now() - o.timeStamp, t(!0);
|
|
5266
5287
|
}));
|
|
5267
5288
|
})));
|
|
5268
5289
|
}));
|
|
5269
|
-
},
|
|
5270
|
-
e = e || {},
|
|
5290
|
+
}, Le = [0.1, 0.25], zr = function(s, e) {
|
|
5291
|
+
e = e || {}, St(ce((function() {
|
|
5271
5292
|
var t, r = _("CLS", 0), n = 0, i = [], o = function(c) {
|
|
5272
5293
|
c.forEach((function(u) {
|
|
5273
5294
|
if (!u.hadRecentInput) {
|
|
@@ -5275,28 +5296,28 @@ var we, C, j, ft, ie, mt = -1, k = function(s) {
|
|
|
5275
5296
|
n && u.startTime - E.startTime < 1e3 && u.startTime - g.startTime < 5e3 ? (n += u.value, i.push(u)) : (n = u.value, i = [u]);
|
|
5276
5297
|
}
|
|
5277
5298
|
})), n > r.value && (r.value = n, r.entries = i, t());
|
|
5278
|
-
}, l =
|
|
5279
|
-
l && (t = y(s, r,
|
|
5299
|
+
}, l = x("layout-shift", o);
|
|
5300
|
+
l && (t = y(s, r, Le, e.reportAllChanges), Q((function() {
|
|
5280
5301
|
o(l.takeRecords()), t(!0);
|
|
5281
|
-
})),
|
|
5282
|
-
n = 0, r = _("CLS", 0), t = y(s, r,
|
|
5302
|
+
})), V((function() {
|
|
5303
|
+
n = 0, r = _("CLS", 0), t = y(s, r, Le, e.reportAllChanges), Pe((function() {
|
|
5283
5304
|
return t();
|
|
5284
5305
|
}));
|
|
5285
5306
|
})), setTimeout(t, 0));
|
|
5286
5307
|
})));
|
|
5287
|
-
},
|
|
5308
|
+
}, pt = 0, ge = 1 / 0, Z = 0, Qr = function(s) {
|
|
5288
5309
|
s.forEach((function(e) {
|
|
5289
|
-
e.interactionId && (
|
|
5310
|
+
e.interactionId && (ge = Math.min(ge, e.interactionId), Z = Math.max(Z, e.interactionId), pt = Z ? (Z - ge) / 7 + 1 : 0);
|
|
5290
5311
|
}));
|
|
5291
|
-
},
|
|
5292
|
-
return
|
|
5293
|
-
},
|
|
5294
|
-
"interactionCount" in performance ||
|
|
5295
|
-
}, A = [], re = /* @__PURE__ */ new Map(),
|
|
5296
|
-
var s = Math.min(A.length - 1, Math.floor((
|
|
5312
|
+
}, Tt = function() {
|
|
5313
|
+
return be ? pt : performance.interactionCount || 0;
|
|
5314
|
+
}, Kr = function() {
|
|
5315
|
+
"interactionCount" in performance || be || (be = x("event", Qr, { type: "event", buffered: !0, durationThreshold: 0 }));
|
|
5316
|
+
}, A = [], re = /* @__PURE__ */ new Map(), It = 0, Yr = function() {
|
|
5317
|
+
var s = Math.min(A.length - 1, Math.floor((Tt() - It) / 50));
|
|
5297
5318
|
return A[s];
|
|
5298
|
-
},
|
|
5299
|
-
if (
|
|
5319
|
+
}, qr = [], Jr = function(s) {
|
|
5320
|
+
if (qr.forEach((function(n) {
|
|
5300
5321
|
return n(s);
|
|
5301
5322
|
})), s.interactionId || s.entryType === "first-input") {
|
|
5302
5323
|
var e = A[A.length - 1], t = re.get(s.interactionId);
|
|
@@ -5313,153 +5334,153 @@ var we, C, j, ft, ie, mt = -1, k = function(s) {
|
|
|
5313
5334
|
}));
|
|
5314
5335
|
}
|
|
5315
5336
|
}
|
|
5316
|
-
},
|
|
5337
|
+
}, vt = function(s) {
|
|
5317
5338
|
var e = self.requestIdleCallback || self.setTimeout, t = -1;
|
|
5318
|
-
return s =
|
|
5319
|
-
},
|
|
5339
|
+
return s = ce(s), document.visibilityState === "hidden" ? s() : (t = e(s), Q(s)), t;
|
|
5340
|
+
}, Me = [200, 500], Zr = function(s, e) {
|
|
5320
5341
|
"PerformanceEventTiming" in self && "interactionId" in PerformanceEventTiming.prototype && (e = e || {}, K((function() {
|
|
5321
5342
|
var t;
|
|
5322
|
-
|
|
5343
|
+
Kr();
|
|
5323
5344
|
var r, n = _("INP"), i = function(l) {
|
|
5324
|
-
|
|
5325
|
-
l.forEach(
|
|
5326
|
-
var c =
|
|
5345
|
+
vt((function() {
|
|
5346
|
+
l.forEach(Jr);
|
|
5347
|
+
var c = Yr();
|
|
5327
5348
|
c && c.latency !== n.value && (n.value = c.latency, n.entries = c.entries, r());
|
|
5328
5349
|
}));
|
|
5329
|
-
}, o =
|
|
5330
|
-
r = y(s, n,
|
|
5350
|
+
}, o = x("event", i, { durationThreshold: (t = e.durationThreshold) !== null && t !== void 0 ? t : 40 });
|
|
5351
|
+
r = y(s, n, Me, e.reportAllChanges), o && (o.observe({ type: "first-input", buffered: !0 }), Q((function() {
|
|
5331
5352
|
i(o.takeRecords()), r(!0);
|
|
5332
|
-
})),
|
|
5333
|
-
|
|
5353
|
+
})), V((function() {
|
|
5354
|
+
It = Tt(), A.length = 0, re.clear(), n = _("INP"), r = y(s, n, Me, e.reportAllChanges);
|
|
5334
5355
|
})));
|
|
5335
5356
|
})));
|
|
5336
|
-
},
|
|
5357
|
+
}, Ce = [2500, 4e3], Ee = {}, es = function(s, e) {
|
|
5337
5358
|
e = e || {}, K((function() {
|
|
5338
|
-
var t, r =
|
|
5359
|
+
var t, r = De(), n = _("LCP"), i = function(c) {
|
|
5339
5360
|
e.reportAllChanges || (c = c.slice(-1)), c.forEach((function(u) {
|
|
5340
|
-
u.startTime < r.firstHiddenTime && (n.value = Math.max(u.startTime -
|
|
5361
|
+
u.startTime < r.firstHiddenTime && (n.value = Math.max(u.startTime - le(), 0), n.entries = [u], t());
|
|
5341
5362
|
}));
|
|
5342
|
-
}, o =
|
|
5363
|
+
}, o = x("largest-contentful-paint", i);
|
|
5343
5364
|
if (o) {
|
|
5344
|
-
t = y(s, n,
|
|
5345
|
-
var l =
|
|
5346
|
-
|
|
5365
|
+
t = y(s, n, Ce, e.reportAllChanges);
|
|
5366
|
+
var l = ce((function() {
|
|
5367
|
+
Ee[n.id] || (i(o.takeRecords()), o.disconnect(), Ee[n.id] = !0, t(!0));
|
|
5347
5368
|
}));
|
|
5348
5369
|
["keydown", "click"].forEach((function(c) {
|
|
5349
5370
|
addEventListener(c, (function() {
|
|
5350
|
-
return
|
|
5371
|
+
return vt(l);
|
|
5351
5372
|
}), { once: !0, capture: !0 });
|
|
5352
|
-
})),
|
|
5353
|
-
n = _("LCP"), t = y(s, n,
|
|
5354
|
-
n.value = performance.now() - c.timeStamp,
|
|
5373
|
+
})), Q(l), V((function(c) {
|
|
5374
|
+
n = _("LCP"), t = y(s, n, Ce, e.reportAllChanges), Pe((function() {
|
|
5375
|
+
n.value = performance.now() - c.timeStamp, Ee[n.id] = !0, t(!0);
|
|
5355
5376
|
}));
|
|
5356
5377
|
}));
|
|
5357
5378
|
}
|
|
5358
5379
|
}));
|
|
5359
|
-
},
|
|
5380
|
+
}, Re = [800, 1800], ts = function s(e) {
|
|
5360
5381
|
document.prerendering ? K((function() {
|
|
5361
5382
|
return s(e);
|
|
5362
5383
|
})) : document.readyState !== "complete" ? addEventListener("load", (function() {
|
|
5363
5384
|
return s(e);
|
|
5364
5385
|
}), !0) : setTimeout(e, 0);
|
|
5365
|
-
},
|
|
5386
|
+
}, rs = function(s, e) {
|
|
5366
5387
|
e = e || {};
|
|
5367
|
-
var t = _("TTFB"), r = y(s, t,
|
|
5368
|
-
|
|
5369
|
-
var n =
|
|
5370
|
-
n && (t.value = Math.max(n.responseStart -
|
|
5371
|
-
t = _("TTFB", 0), (r = y(s, t,
|
|
5388
|
+
var t = _("TTFB"), r = y(s, t, Re, e.reportAllChanges);
|
|
5389
|
+
ts((function() {
|
|
5390
|
+
var n = Oe();
|
|
5391
|
+
n && (t.value = Math.max(n.responseStart - le(), 0), t.entries = [n], r(!0), V((function() {
|
|
5392
|
+
t = _("TTFB", 0), (r = y(s, t, Re, e.reportAllChanges))(!0);
|
|
5372
5393
|
})));
|
|
5373
5394
|
}));
|
|
5374
|
-
},
|
|
5375
|
-
C || (C = e, j = s,
|
|
5376
|
-
},
|
|
5377
|
-
if (j >= 0 && j <
|
|
5395
|
+
}, X = { passive: !0, capture: !0 }, ss = /* @__PURE__ */ new Date(), tt = function(s, e) {
|
|
5396
|
+
C || (C = e, j = s, gt = /* @__PURE__ */ new Date(), yt(removeEventListener), _t());
|
|
5397
|
+
}, _t = function() {
|
|
5398
|
+
if (j >= 0 && j < gt - ss) {
|
|
5378
5399
|
var s = { entryType: "first-input", name: C.type, target: C.target, cancelable: C.cancelable, startTime: C.timeStamp, processingStart: C.timeStamp + j };
|
|
5379
|
-
|
|
5400
|
+
oe.forEach((function(e) {
|
|
5380
5401
|
e(s);
|
|
5381
|
-
})),
|
|
5402
|
+
})), oe = [];
|
|
5382
5403
|
}
|
|
5383
|
-
},
|
|
5404
|
+
}, ns = function(s) {
|
|
5384
5405
|
if (s.cancelable) {
|
|
5385
5406
|
var e = (s.timeStamp > 1e12 ? /* @__PURE__ */ new Date() : performance.now()) - s.timeStamp;
|
|
5386
5407
|
s.type == "pointerdown" ? (function(t, r) {
|
|
5387
5408
|
var n = function() {
|
|
5388
|
-
|
|
5409
|
+
tt(t, r), o();
|
|
5389
5410
|
}, i = function() {
|
|
5390
5411
|
o();
|
|
5391
5412
|
}, o = function() {
|
|
5392
|
-
removeEventListener("pointerup", n,
|
|
5413
|
+
removeEventListener("pointerup", n, X), removeEventListener("pointercancel", i, X);
|
|
5393
5414
|
};
|
|
5394
|
-
addEventListener("pointerup", n,
|
|
5395
|
-
})(e, s) :
|
|
5415
|
+
addEventListener("pointerup", n, X), addEventListener("pointercancel", i, X);
|
|
5416
|
+
})(e, s) : tt(e, s);
|
|
5396
5417
|
}
|
|
5397
|
-
},
|
|
5418
|
+
}, yt = function(s) {
|
|
5398
5419
|
["mousedown", "keydown", "touchstart", "pointerdown"].forEach((function(e) {
|
|
5399
|
-
return s(e,
|
|
5420
|
+
return s(e, ns, X);
|
|
5400
5421
|
}));
|
|
5401
|
-
},
|
|
5422
|
+
}, Ne = [100, 300], is = function(s, e) {
|
|
5402
5423
|
e = e || {}, K((function() {
|
|
5403
|
-
var t, r =
|
|
5424
|
+
var t, r = De(), n = _("FID"), i = function(c) {
|
|
5404
5425
|
c.startTime < r.firstHiddenTime && (n.value = c.processingStart - c.startTime, n.entries.push(c), t(!0));
|
|
5405
5426
|
}, o = function(c) {
|
|
5406
5427
|
c.forEach(i);
|
|
5407
|
-
}, l =
|
|
5408
|
-
t = y(s, n,
|
|
5428
|
+
}, l = x("first-input", o);
|
|
5429
|
+
t = y(s, n, Ne, e.reportAllChanges), l && (Q(ce((function() {
|
|
5409
5430
|
o(l.takeRecords()), l.disconnect();
|
|
5410
|
-
}))),
|
|
5431
|
+
}))), V((function() {
|
|
5411
5432
|
var c;
|
|
5412
|
-
n = _("FID"), t = y(s, n,
|
|
5433
|
+
n = _("FID"), t = y(s, n, Ne, e.reportAllChanges), oe = [], j = -1, C = null, yt(addEventListener), c = i, oe.push(c), _t();
|
|
5413
5434
|
})));
|
|
5414
5435
|
}));
|
|
5415
5436
|
};
|
|
5416
|
-
const
|
|
5437
|
+
const os = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5417
5438
|
__proto__: null,
|
|
5418
|
-
CLSThresholds:
|
|
5419
|
-
FCPThresholds:
|
|
5420
|
-
FIDThresholds:
|
|
5421
|
-
INPThresholds:
|
|
5422
|
-
LCPThresholds:
|
|
5423
|
-
TTFBThresholds:
|
|
5424
|
-
onCLS:
|
|
5425
|
-
onFCP:
|
|
5426
|
-
onFID:
|
|
5427
|
-
onINP:
|
|
5428
|
-
onLCP:
|
|
5429
|
-
onTTFB:
|
|
5439
|
+
CLSThresholds: Le,
|
|
5440
|
+
FCPThresholds: Ae,
|
|
5441
|
+
FIDThresholds: Ne,
|
|
5442
|
+
INPThresholds: Me,
|
|
5443
|
+
LCPThresholds: Ce,
|
|
5444
|
+
TTFBThresholds: Re,
|
|
5445
|
+
onCLS: zr,
|
|
5446
|
+
onFCP: St,
|
|
5447
|
+
onFID: is,
|
|
5448
|
+
onINP: Zr,
|
|
5449
|
+
onLCP: es,
|
|
5450
|
+
onTTFB: rs
|
|
5430
5451
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5431
5452
|
export {
|
|
5432
5453
|
f as AppConfigValidationError,
|
|
5433
|
-
|
|
5434
|
-
|
|
5454
|
+
as as DEFAULT_SESSION_TIMEOUT,
|
|
5455
|
+
ve as DEFAULT_WEB_VITALS_MODE,
|
|
5435
5456
|
L as DeviceType,
|
|
5436
|
-
|
|
5457
|
+
pe as EmitterEvent,
|
|
5437
5458
|
W as ErrorType,
|
|
5438
5459
|
d as EventType,
|
|
5439
|
-
|
|
5460
|
+
ps as InitializationTimeoutError,
|
|
5440
5461
|
U as IntegrationValidationError,
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5462
|
+
gs as MAX_ARRAY_LENGTH,
|
|
5463
|
+
ds as MAX_CUSTOM_EVENT_ARRAY_SIZE,
|
|
5464
|
+
us as MAX_CUSTOM_EVENT_KEYS,
|
|
5465
|
+
ls as MAX_CUSTOM_EVENT_NAME_LENGTH,
|
|
5466
|
+
cs as MAX_CUSTOM_EVENT_STRING_SIZE,
|
|
5467
|
+
hs as MAX_NESTED_OBJECT_KEYS,
|
|
5468
|
+
fs as MAX_STRING_LENGTH,
|
|
5469
|
+
ms as MAX_STRING_LENGTH_IN_ARRAY,
|
|
5449
5470
|
se as Mode,
|
|
5450
|
-
|
|
5471
|
+
ot as PII_PATTERNS,
|
|
5451
5472
|
N as PermanentError,
|
|
5452
|
-
|
|
5473
|
+
Be as SamplingRateValidationError,
|
|
5453
5474
|
ee as ScrollDirection,
|
|
5454
|
-
|
|
5475
|
+
Nt as SessionTimeoutValidationError,
|
|
5455
5476
|
B as SpecialApiUrl,
|
|
5456
5477
|
O as TimeoutError,
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5478
|
+
z as TraceLogValidationError,
|
|
5479
|
+
Ts as WEB_VITALS_GOOD_THRESHOLDS,
|
|
5480
|
+
ze as WEB_VITALS_NEEDS_IMPROVEMENT_THRESHOLDS,
|
|
5481
|
+
zt as WEB_VITALS_POOR_THRESHOLDS,
|
|
5482
|
+
Qe as getWebVitalsThresholds,
|
|
5483
|
+
Es as isPrimaryScrollEvent,
|
|
5484
|
+
Ss as isSecondaryScrollEvent,
|
|
5485
|
+
Is as tracelog
|
|
5465
5486
|
};
|