@tracelog/lib 2.7.2 → 2.7.3
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 +7 -2
- package/dist/browser/tracelog.esm.js +373 -361
- package/dist/browser/tracelog.esm.js.map +1 -1
- package/dist/browser/tracelog.js +2 -2
- 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 +11 -1
- package/dist/public-api.d.ts +11 -1
- 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 ls = 9e5;
|
|
2
|
+
const cs = 120, us = 49152, ds = 100, hs = 500, fs = 200;
|
|
3
|
+
const ms = 1e3, gs = 500, Es = 1e3;
|
|
4
|
+
const b = "data-tlog", bt = [
|
|
5
5
|
"button",
|
|
6
6
|
"a",
|
|
7
7
|
'input[type="button"]',
|
|
@@ -33,7 +33,7 @@ const b = "data-tlog", wt = [
|
|
|
33
33
|
".menu-item",
|
|
34
34
|
"[data-testid]",
|
|
35
35
|
'[tabindex="0"]'
|
|
36
|
-
],
|
|
36
|
+
], At = ["utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"], Lt = [
|
|
37
37
|
"token",
|
|
38
38
|
"auth",
|
|
39
39
|
"key",
|
|
@@ -72,27 +72,32 @@ 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
|
+
}, Mt = [
|
|
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", G = `${I}:qa_mode`,
|
|
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`, pe = `${I}:uid`, st = "tlog_mode", Ue = "qa", He = "qa_off", Ct = (s) => s ? `${I}:${s}:queue` : `${I}:queue`, Rt = (s) => s ? `${I}:${s}:session` : `${I}:session`, Nt = (s) => s ? `${I}:${s}:broadcast` : `${I}:broadcast`, Fe = (s, e) => `${I}:${s}:session_counts:${e}`, xe = 10080 * 60 * 1e3, $e = `${I}:session_counts_last_cleanup`, Be = 3600 * 1e3, he = (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 || {}), Te = /* @__PURE__ */ ((s) => (s.EVENT = "event", s.QUEUE = "queue", s))(Te || {});
|
|
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);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
+
class se extends Error {
|
|
90
|
+
constructor(e) {
|
|
91
|
+
super(e), this.name = "RateLimitError", Error.captureStackTrace && Error.captureStackTrace(this, se);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
89
94
|
class O extends Error {
|
|
90
95
|
constructor(e) {
|
|
91
96
|
super(e), this.name = "TimeoutError", Error.captureStackTrace && Error.captureStackTrace(this, O);
|
|
92
97
|
}
|
|
93
98
|
}
|
|
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 || {}),
|
|
95
|
-
const
|
|
99
|
+
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 || {}), ne = /* @__PURE__ */ ((s) => (s.QA = "qa", s))(ne || {});
|
|
100
|
+
const Ss = (s) => s.type === d.SCROLL && "scroll_data" in s && s.scroll_data.is_primary === !0, ps = (s) => s.type === d.SCROLL && "scroll_data" in s && s.scroll_data.is_primary === !1;
|
|
96
101
|
class z extends Error {
|
|
97
102
|
constructor(e, t, r) {
|
|
98
103
|
super(e), this.errorCode = t, this.layer = r, this.name = this.constructor.name, Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
|
|
@@ -103,12 +108,12 @@ class f extends z {
|
|
|
103
108
|
super(e, "APP_CONFIG_INVALID", t);
|
|
104
109
|
}
|
|
105
110
|
}
|
|
106
|
-
class
|
|
111
|
+
class Ot extends z {
|
|
107
112
|
constructor(e, t = "config") {
|
|
108
113
|
super(e, "SESSION_TIMEOUT_INVALID", t);
|
|
109
114
|
}
|
|
110
115
|
}
|
|
111
|
-
class
|
|
116
|
+
class We extends z {
|
|
112
117
|
constructor(e, t = "config") {
|
|
113
118
|
super(e, "SAMPLING_RATE_INVALID", t);
|
|
114
119
|
}
|
|
@@ -118,12 +123,12 @@ class U extends z {
|
|
|
118
123
|
super(e, "INTEGRATION_INVALID", t);
|
|
119
124
|
}
|
|
120
125
|
}
|
|
121
|
-
class
|
|
126
|
+
class Ts extends z {
|
|
122
127
|
constructor(e, t, r = "runtime") {
|
|
123
128
|
super(e, "INITIALIZATION_TIMEOUT", r), this.timeoutMs = t;
|
|
124
129
|
}
|
|
125
130
|
}
|
|
126
|
-
const
|
|
131
|
+
const nt = "background: #ff9800; color: white; font-weight: bold; padding: 2px 8px; border-radius: 3px;", it = "background: #9e9e9e; color: white; font-weight: bold; padding: 2px 8px; border-radius: 3px;", Pt = "background: #d32f2f; color: white; font-weight: bold; padding: 2px 8px; border-radius: 3px;", Dt = (s, e) => {
|
|
127
132
|
if (e) {
|
|
128
133
|
if (e instanceof Error) {
|
|
129
134
|
const t = e.message.replace(/\s+at\s+.*$/gm, "").replace(/\s*\([^()]+:\d+:\d+\)/g, "");
|
|
@@ -142,7 +147,7 @@ const st = "background: #ff9800; color: white; font-weight: bold; padding: 2px 8
|
|
|
142
147
|
return `[TraceLog] ${s}: ${String(e)}`;
|
|
143
148
|
}
|
|
144
149
|
return `[TraceLog] ${s}`;
|
|
145
|
-
},
|
|
150
|
+
}, kt = () => {
|
|
146
151
|
if (typeof window > "u" || typeof sessionStorage > "u")
|
|
147
152
|
return !1;
|
|
148
153
|
try {
|
|
@@ -151,15 +156,15 @@ const st = "background: #ff9800; color: white; font-weight: bold; padding: 2px 8
|
|
|
151
156
|
return !1;
|
|
152
157
|
}
|
|
153
158
|
}, a = (s, e, t) => {
|
|
154
|
-
const { error: r, data: n, showToClient: i = !1, style: o, visibility: l } = t ?? {}, c = r ?
|
|
155
|
-
if (!
|
|
159
|
+
const { error: r, data: n, showToClient: i = !1, style: o, visibility: l } = t ?? {}, c = r ? Dt(e, r) : `[TraceLog] ${e}`, u = s === "error" ? "error" : s === "warn" ? "warn" : "log";
|
|
160
|
+
if (!Vt(l, i))
|
|
156
161
|
return;
|
|
157
|
-
const E =
|
|
158
|
-
|
|
159
|
-
},
|
|
162
|
+
const E = Ut(l, o), T = n !== void 0 ? Ie(n) : void 0;
|
|
163
|
+
Ht(u, c, E, T);
|
|
164
|
+
}, Vt = (s, e) => s === "critical" ? !0 : s === "qa" || e ? kt() : !1, Ut = (s, e) => e !== void 0 && e !== "" ? e : s === "critical" ? Pt : "", Ht = (s, e, t, r) => {
|
|
160
165
|
const n = t !== void 0 && t !== "", i = n ? `%c${e}` : e;
|
|
161
166
|
r !== void 0 ? n ? console[s](i, t, r) : console[s](i, r) : n ? console[s](i, t) : console[s](i);
|
|
162
|
-
},
|
|
167
|
+
}, Ie = (s) => {
|
|
163
168
|
const e = {}, t = ["token", "password", "secret", "key", "apikey", "api_key", "sessionid", "session_id"];
|
|
164
169
|
for (const [r, n] of Object.entries(s)) {
|
|
165
170
|
const i = r.toLowerCase();
|
|
@@ -167,16 +172,16 @@ const st = "background: #ff9800; color: white; font-weight: bold; padding: 2px 8
|
|
|
167
172
|
e[r] = "[REDACTED]";
|
|
168
173
|
continue;
|
|
169
174
|
}
|
|
170
|
-
n !== null && typeof n == "object" && !Array.isArray(n) ? e[r] =
|
|
171
|
-
(o) => o !== null && typeof o == "object" && !Array.isArray(o) ?
|
|
175
|
+
n !== null && typeof n == "object" && !Array.isArray(n) ? e[r] = Ie(n) : Array.isArray(n) ? e[r] = n.map(
|
|
176
|
+
(o) => o !== null && typeof o == "object" && !Array.isArray(o) ? Ie(o) : o
|
|
172
177
|
) : e[r] = n;
|
|
173
178
|
}
|
|
174
179
|
return e;
|
|
175
180
|
};
|
|
176
|
-
let
|
|
177
|
-
const
|
|
178
|
-
typeof window < "u" && !
|
|
179
|
-
},
|
|
181
|
+
let ve, ot;
|
|
182
|
+
const Ft = () => {
|
|
183
|
+
typeof window < "u" && !ve && (ve = window.matchMedia("(pointer: coarse)"), ot = window.matchMedia("(hover: none)"));
|
|
184
|
+
}, ie = "Unknown", xt = (s) => {
|
|
180
185
|
const e = s.userAgentData?.platform;
|
|
181
186
|
if (e != null && e !== "") {
|
|
182
187
|
if (/windows/i.test(e)) return "Windows";
|
|
@@ -187,8 +192,8 @@ const Ht = () => {
|
|
|
187
192
|
if (/ios/i.test(e)) return "iOS";
|
|
188
193
|
}
|
|
189
194
|
const t = navigator.userAgent;
|
|
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" :
|
|
191
|
-
},
|
|
195
|
+
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" : ie;
|
|
196
|
+
}, $t = (s) => {
|
|
192
197
|
const e = s.userAgentData?.brands;
|
|
193
198
|
if (e != null && e.length > 0) {
|
|
194
199
|
const n = e.filter((i) => !/not.?a.?brand|chromium/i.test(i.brand))[0];
|
|
@@ -198,36 +203,36 @@ const Ht = () => {
|
|
|
198
203
|
}
|
|
199
204
|
}
|
|
200
205
|
const t = navigator.userAgent;
|
|
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" :
|
|
202
|
-
},
|
|
206
|
+
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" : ie;
|
|
207
|
+
}, Bt = () => {
|
|
203
208
|
try {
|
|
204
209
|
const s = navigator;
|
|
205
210
|
if (s.userAgentData != null && typeof s.userAgentData.mobile == "boolean") {
|
|
206
211
|
const c = s.userAgentData.platform;
|
|
207
212
|
return c != null && c !== "" && /ipad|tablet/i.test(c) ? L.Tablet : s.userAgentData.mobile ? L.Mobile : L.Desktop;
|
|
208
213
|
}
|
|
209
|
-
|
|
210
|
-
const e = window.innerWidth, t =
|
|
214
|
+
Ft();
|
|
215
|
+
const e = window.innerWidth, t = ve?.matches ?? !1, r = ot?.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
216
|
return e <= 767 || o && n ? L.Mobile : e >= 768 && e <= 1024 || l || t && r && n ? L.Tablet : L.Desktop;
|
|
212
217
|
} catch (s) {
|
|
213
218
|
return a("debug", "Device detection failed, defaulting to desktop", { error: s }), L.Desktop;
|
|
214
219
|
}
|
|
215
|
-
},
|
|
220
|
+
}, Wt = () => {
|
|
216
221
|
try {
|
|
217
222
|
const s = navigator;
|
|
218
223
|
return {
|
|
219
|
-
type:
|
|
220
|
-
os:
|
|
221
|
-
browser:
|
|
224
|
+
type: Bt(),
|
|
225
|
+
os: xt(s),
|
|
226
|
+
browser: $t(s)
|
|
222
227
|
};
|
|
223
228
|
} catch (s) {
|
|
224
229
|
return a("debug", "Device info detection failed, using defaults", { error: s }), {
|
|
225
230
|
type: L.Desktop,
|
|
226
|
-
os:
|
|
227
|
-
browser:
|
|
231
|
+
os: ie,
|
|
232
|
+
browser: ie
|
|
228
233
|
};
|
|
229
234
|
}
|
|
230
|
-
},
|
|
235
|
+
}, at = [
|
|
231
236
|
// Email addresses
|
|
232
237
|
/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/gi,
|
|
233
238
|
// US Phone numbers (various formats)
|
|
@@ -244,7 +249,7 @@ const Ht = () => {
|
|
|
244
249
|
/:\/\/[^:/]+:([^@]+)@/gi,
|
|
245
250
|
// Sensitive URL query parameters (token=, password=, auth=, secret=, api_key=, etc.)
|
|
246
251
|
/[?&](token|password|passwd|auth|secret|secret_key|private_key|auth_key|api_key|apikey|access_token)=[^&\s]+/gi
|
|
247
|
-
],
|
|
252
|
+
], Xe = 500, Ge = 2e3, je = 5e3, te = 50, Xt = te * 2, lt = 1, Gt = 1e3, jt = 10, ze = 5e3, zt = 6e4, Is = {
|
|
248
253
|
LCP: 2500,
|
|
249
254
|
// Good: ≤ 2.5s
|
|
250
255
|
FCP: 1800,
|
|
@@ -256,7 +261,7 @@ const Ht = () => {
|
|
|
256
261
|
TTFB: 800,
|
|
257
262
|
// Good: ≤ 800ms
|
|
258
263
|
LONG_TASK: 50
|
|
259
|
-
},
|
|
264
|
+
}, Qe = {
|
|
260
265
|
LCP: 2500,
|
|
261
266
|
// Needs improvement: > 2.5s (same as good boundary)
|
|
262
267
|
FCP: 1800,
|
|
@@ -268,7 +273,7 @@ const Ht = () => {
|
|
|
268
273
|
TTFB: 800,
|
|
269
274
|
// Needs improvement: > 800ms
|
|
270
275
|
LONG_TASK: 50
|
|
271
|
-
},
|
|
276
|
+
}, Qt = {
|
|
272
277
|
LCP: 4e3,
|
|
273
278
|
// Poor: > 4s
|
|
274
279
|
FCP: 3e3,
|
|
@@ -280,53 +285,53 @@ const Ht = () => {
|
|
|
280
285
|
TTFB: 1800,
|
|
281
286
|
// Poor: > 1800ms
|
|
282
287
|
LONG_TASK: 50
|
|
283
|
-
},
|
|
288
|
+
}, _e = "needs-improvement", Ke = (s = _e) => {
|
|
284
289
|
switch (s) {
|
|
285
290
|
case "all":
|
|
286
291
|
return { LCP: 0, FCP: 0, CLS: 0, INP: 0, TTFB: 0, LONG_TASK: 0 };
|
|
287
292
|
// Track everything
|
|
288
293
|
case "needs-improvement":
|
|
289
|
-
return
|
|
294
|
+
return Qe;
|
|
290
295
|
case "poor":
|
|
291
|
-
return
|
|
296
|
+
return Qt;
|
|
292
297
|
default:
|
|
293
|
-
return
|
|
298
|
+
return Qe;
|
|
294
299
|
}
|
|
295
|
-
},
|
|
300
|
+
}, Kt = 1e3, Yt = 50, qt = "2.7.2", Jt = qt, ct = () => typeof window < "u" && typeof sessionStorage < "u", Zt = () => {
|
|
296
301
|
try {
|
|
297
302
|
const s = new URLSearchParams(window.location.search);
|
|
298
|
-
s.delete(
|
|
303
|
+
s.delete(st);
|
|
299
304
|
const e = s.toString(), t = window.location.pathname + (e ? "?" + e : "") + window.location.hash;
|
|
300
305
|
window.history.replaceState({}, "", t);
|
|
301
306
|
} catch {
|
|
302
307
|
}
|
|
303
|
-
},
|
|
304
|
-
if (!
|
|
308
|
+
}, er = () => {
|
|
309
|
+
if (!ct())
|
|
305
310
|
return !1;
|
|
306
311
|
try {
|
|
307
|
-
const e = new URLSearchParams(window.location.search).get(
|
|
312
|
+
const e = new URLSearchParams(window.location.search).get(st), t = sessionStorage.getItem(G);
|
|
308
313
|
let r = null;
|
|
309
|
-
return e ===
|
|
310
|
-
visibility: "qa",
|
|
311
|
-
style: st
|
|
312
|
-
})) : e === Ue && (r = !1, sessionStorage.setItem(G, "false"), a("info", "QA Mode DISABLED", {
|
|
314
|
+
return e === Ue ? (r = !0, sessionStorage.setItem(G, "true"), a("info", "QA Mode ACTIVE", {
|
|
313
315
|
visibility: "qa",
|
|
314
316
|
style: nt
|
|
315
|
-
}))
|
|
317
|
+
})) : e === He && (r = !1, sessionStorage.setItem(G, "false"), a("info", "QA Mode DISABLED", {
|
|
318
|
+
visibility: "qa",
|
|
319
|
+
style: it
|
|
320
|
+
})), (e === Ue || e === He) && Zt(), r ?? t === "true";
|
|
316
321
|
} catch {
|
|
317
322
|
return !1;
|
|
318
323
|
}
|
|
319
|
-
},
|
|
320
|
-
if (
|
|
324
|
+
}, tr = (s) => {
|
|
325
|
+
if (ct())
|
|
321
326
|
try {
|
|
322
327
|
sessionStorage.setItem(G, s ? "true" : "false"), a("info", s ? "QA Mode ACTIVE" : "QA Mode DISABLED", {
|
|
323
328
|
visibility: "qa",
|
|
324
|
-
style: s ?
|
|
329
|
+
style: s ? nt : it
|
|
325
330
|
});
|
|
326
331
|
} catch {
|
|
327
332
|
a("debug", "Cannot set QA mode: sessionStorage unavailable");
|
|
328
333
|
}
|
|
329
|
-
},
|
|
334
|
+
}, rr = [
|
|
330
335
|
"co.uk",
|
|
331
336
|
"org.uk",
|
|
332
337
|
"com.au",
|
|
@@ -338,37 +343,37 @@ const Ht = () => {
|
|
|
338
343
|
"co.in",
|
|
339
344
|
"com.cn",
|
|
340
345
|
"co.za"
|
|
341
|
-
],
|
|
346
|
+
], Ye = (s) => {
|
|
342
347
|
const e = s.toLowerCase().split(".");
|
|
343
348
|
if (e.length <= 2)
|
|
344
349
|
return s.toLowerCase();
|
|
345
350
|
const t = e.slice(-2).join(".");
|
|
346
|
-
return
|
|
347
|
-
},
|
|
351
|
+
return rr.includes(t) ? e.slice(-3).join(".") : e.slice(-2).join(".");
|
|
352
|
+
}, sr = (s, e) => s === e ? !0 : Ye(s) === Ye(e), fe = () => {
|
|
348
353
|
const s = document.referrer;
|
|
349
354
|
if (!s)
|
|
350
355
|
return "Direct";
|
|
351
356
|
try {
|
|
352
357
|
const e = new URL(s).hostname.toLowerCase(), t = window.location.hostname.toLowerCase();
|
|
353
|
-
return
|
|
358
|
+
return sr(e, t) ? "Direct" : s;
|
|
354
359
|
} catch (e) {
|
|
355
360
|
return a("debug", "Failed to parse referrer URL, using raw value", { error: e, data: { referrer: s } }), s;
|
|
356
361
|
}
|
|
357
|
-
},
|
|
362
|
+
}, me = () => {
|
|
358
363
|
const s = new URLSearchParams(window.location.search), e = {};
|
|
359
|
-
return
|
|
364
|
+
return At.forEach((r) => {
|
|
360
365
|
const n = s.get(r);
|
|
361
366
|
if (n) {
|
|
362
367
|
const i = r.split("utm_")[1];
|
|
363
368
|
e[i] = n;
|
|
364
369
|
}
|
|
365
370
|
}), Object.keys(e).length ? e : void 0;
|
|
366
|
-
},
|
|
371
|
+
}, ut = () => typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (s) => {
|
|
367
372
|
const e = Math.random() * 16 | 0;
|
|
368
373
|
return (s === "x" ? e : e & 3 | 8).toString(16);
|
|
369
374
|
});
|
|
370
375
|
let q = 0, J = 0;
|
|
371
|
-
const
|
|
376
|
+
const nr = () => {
|
|
372
377
|
let s = Date.now();
|
|
373
378
|
s < J && (s = J), s === J ? q = (q + 1) % 1e3 : q = 0, J = s;
|
|
374
379
|
const e = q.toString().padStart(3, "0");
|
|
@@ -381,14 +386,14 @@ const sr = () => {
|
|
|
381
386
|
} catch {
|
|
382
387
|
}
|
|
383
388
|
return t || (t = Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0")), `${s}-${e}-${t}`;
|
|
384
|
-
},
|
|
389
|
+
}, dt = (s, e = !1) => {
|
|
385
390
|
try {
|
|
386
391
|
const t = new URL(s), r = t.protocol === "https:", n = t.protocol === "http:";
|
|
387
392
|
return r || e && n;
|
|
388
393
|
} catch {
|
|
389
394
|
return !1;
|
|
390
395
|
}
|
|
391
|
-
},
|
|
396
|
+
}, ir = (s) => {
|
|
392
397
|
try {
|
|
393
398
|
const t = new URL(window.location.href).hostname;
|
|
394
399
|
if (!t || typeof t != "string")
|
|
@@ -406,28 +411,28 @@ const sr = () => {
|
|
|
406
411
|
if (r.length === 2 ? n = r.join(".") : n = r.slice(-2).join("."), !n || n.split(".").length < 2)
|
|
407
412
|
throw new Error("Invalid domain structure for SaaS");
|
|
408
413
|
const i = `https://${s}.${n}/collect`;
|
|
409
|
-
if (!
|
|
414
|
+
if (!dt(i))
|
|
410
415
|
throw new Error("Generated URL failed validation");
|
|
411
416
|
return i;
|
|
412
417
|
} catch (e) {
|
|
413
418
|
throw new Error(`Invalid SaaS URL configuration: ${e instanceof Error ? e.message : String(e)}`);
|
|
414
419
|
}
|
|
415
|
-
},
|
|
420
|
+
}, or = (s) => {
|
|
416
421
|
const e = {};
|
|
417
|
-
s.integrations?.tracelog?.projectId && (e.saas =
|
|
422
|
+
s.integrations?.tracelog?.projectId && (e.saas = ir(s.integrations.tracelog.projectId));
|
|
418
423
|
const t = s.integrations?.custom?.collectApiUrl;
|
|
419
424
|
if (t) {
|
|
420
425
|
const r = s.integrations?.custom?.allowHttp ?? !1;
|
|
421
|
-
if (!
|
|
426
|
+
if (!dt(t, r))
|
|
422
427
|
throw new Error("Invalid custom API URL");
|
|
423
428
|
e.custom = t;
|
|
424
429
|
}
|
|
425
430
|
return e;
|
|
426
|
-
},
|
|
431
|
+
}, ye = (s, e = []) => {
|
|
427
432
|
if (!s || typeof s != "string")
|
|
428
433
|
return a("warn", "Invalid URL provided to normalizeUrl", { data: { type: typeof s } }), s || "";
|
|
429
434
|
try {
|
|
430
|
-
const t = new URL(s), r = t.searchParams, n = [.../* @__PURE__ */ new Set([...
|
|
435
|
+
const t = new URL(s), r = t.searchParams, n = [.../* @__PURE__ */ new Set([...Lt, ...e])];
|
|
431
436
|
let i = !1;
|
|
432
437
|
const o = [];
|
|
433
438
|
return n.forEach((c) => {
|
|
@@ -436,13 +441,13 @@ const sr = () => {
|
|
|
436
441
|
} catch (t) {
|
|
437
442
|
return a("warn", "URL normalization failed, returning original", { error: t, data: { urlLength: s?.length } }), s;
|
|
438
443
|
}
|
|
439
|
-
},
|
|
444
|
+
}, qe = (s) => {
|
|
440
445
|
if (!s || typeof s != "string" || s.trim().length === 0)
|
|
441
446
|
return "";
|
|
442
447
|
let e = s;
|
|
443
448
|
s.length > 1e3 && (e = s.slice(0, Math.max(0, 1e3)));
|
|
444
449
|
let t = 0;
|
|
445
|
-
for (const n of
|
|
450
|
+
for (const n of Mt) {
|
|
446
451
|
const i = e;
|
|
447
452
|
e = e.replace(n, ""), i !== e && t++;
|
|
448
453
|
}
|
|
@@ -452,11 +457,11 @@ const sr = () => {
|
|
|
452
457
|
valueLength: s.length
|
|
453
458
|
}
|
|
454
459
|
}), e.trim();
|
|
455
|
-
},
|
|
460
|
+
}, we = (s, e = 0) => {
|
|
456
461
|
if (s == null)
|
|
457
462
|
return null;
|
|
458
463
|
if (typeof s == "string")
|
|
459
|
-
return
|
|
464
|
+
return qe(s);
|
|
460
465
|
if (typeof s == "number")
|
|
461
466
|
return !Number.isFinite(s) || s < -Number.MAX_SAFE_INTEGER || s > Number.MAX_SAFE_INTEGER ? 0 : s;
|
|
462
467
|
if (typeof s == "boolean")
|
|
@@ -464,38 +469,38 @@ const sr = () => {
|
|
|
464
469
|
if (e > 10)
|
|
465
470
|
return null;
|
|
466
471
|
if (Array.isArray(s))
|
|
467
|
-
return s.slice(0, 1e3).map((n) =>
|
|
472
|
+
return s.slice(0, 1e3).map((n) => we(n, e + 1)).filter((n) => n !== null);
|
|
468
473
|
if (typeof s == "object") {
|
|
469
474
|
const t = {}, n = Object.entries(s).slice(0, 200);
|
|
470
475
|
for (const [i, o] of n) {
|
|
471
|
-
const l =
|
|
476
|
+
const l = qe(i);
|
|
472
477
|
if (l) {
|
|
473
|
-
const c =
|
|
478
|
+
const c = we(o, e + 1);
|
|
474
479
|
c !== null && (t[l] = c);
|
|
475
480
|
}
|
|
476
481
|
}
|
|
477
482
|
return t;
|
|
478
483
|
}
|
|
479
484
|
return null;
|
|
480
|
-
},
|
|
485
|
+
}, ar = (s) => {
|
|
481
486
|
if (typeof s != "object" || s === null)
|
|
482
487
|
return {};
|
|
483
488
|
try {
|
|
484
|
-
const e =
|
|
489
|
+
const e = we(s);
|
|
485
490
|
return typeof e == "object" && e !== null ? e : {};
|
|
486
491
|
} catch (e) {
|
|
487
492
|
const t = e instanceof Error ? e.message : String(e);
|
|
488
493
|
throw new Error(`[TraceLog] Metadata sanitization failed: ${t}`);
|
|
489
494
|
}
|
|
490
|
-
},
|
|
495
|
+
}, lr = (s) => {
|
|
491
496
|
if (s !== void 0 && (s === null || typeof s != "object"))
|
|
492
497
|
throw new f("Configuration must be an object", "config");
|
|
493
498
|
if (s) {
|
|
494
499
|
if (s.sessionTimeout !== void 0 && (typeof s.sessionTimeout != "number" || s.sessionTimeout < 3e4 || s.sessionTimeout > 864e5))
|
|
495
|
-
throw new
|
|
500
|
+
throw new Ot(m.INVALID_SESSION_TIMEOUT, "config");
|
|
496
501
|
if (s.globalMetadata !== void 0 && (typeof s.globalMetadata != "object" || s.globalMetadata === null))
|
|
497
502
|
throw new f(m.INVALID_GLOBAL_METADATA, "config");
|
|
498
|
-
if (s.integrations &&
|
|
503
|
+
if (s.integrations && ur(s.integrations), s.sensitiveQueryParams !== void 0) {
|
|
499
504
|
if (!Array.isArray(s.sensitiveQueryParams))
|
|
500
505
|
throw new f(m.INVALID_SENSITIVE_QUERY_PARAMS, "config");
|
|
501
506
|
for (const e of s.sensitiveQueryParams)
|
|
@@ -503,9 +508,9 @@ const sr = () => {
|
|
|
503
508
|
throw new f("All sensitive query params must be strings", "config");
|
|
504
509
|
}
|
|
505
510
|
if (s.errorSampling !== void 0 && (typeof s.errorSampling != "number" || s.errorSampling < 0 || s.errorSampling > 1))
|
|
506
|
-
throw new
|
|
511
|
+
throw new We(m.INVALID_ERROR_SAMPLING_RATE, "config");
|
|
507
512
|
if (s.samplingRate !== void 0 && (typeof s.samplingRate != "number" || s.samplingRate < 0 || s.samplingRate > 1))
|
|
508
|
-
throw new
|
|
513
|
+
throw new We(m.INVALID_SAMPLING_RATE, "config");
|
|
509
514
|
if (s.primaryScrollSelector !== void 0) {
|
|
510
515
|
if (typeof s.primaryScrollSelector != "string" || !s.primaryScrollSelector.trim())
|
|
511
516
|
throw new f(m.INVALID_PRIMARY_SCROLL_SELECTOR, "config");
|
|
@@ -527,7 +532,7 @@ const sr = () => {
|
|
|
527
532
|
throw new f(m.INVALID_MAX_SAME_EVENT_PER_MINUTE, "config");
|
|
528
533
|
if (s.sendIntervalMs !== void 0 && (!Number.isFinite(s.sendIntervalMs) || s.sendIntervalMs < 1e3 || s.sendIntervalMs > 6e4))
|
|
529
534
|
throw new f(m.INVALID_SEND_INTERVAL, "config");
|
|
530
|
-
if (s.viewport !== void 0 &&
|
|
535
|
+
if (s.viewport !== void 0 && cr(s.viewport), s.webVitalsMode !== void 0) {
|
|
531
536
|
if (typeof s.webVitalsMode != "string")
|
|
532
537
|
throw new f(
|
|
533
538
|
`Invalid webVitalsMode type: ${typeof s.webVitalsMode}. Must be a string`,
|
|
@@ -558,7 +563,7 @@ const sr = () => {
|
|
|
558
563
|
}
|
|
559
564
|
}
|
|
560
565
|
}
|
|
561
|
-
},
|
|
566
|
+
}, cr = (s) => {
|
|
562
567
|
if (typeof s != "object" || s === null)
|
|
563
568
|
throw new f(m.INVALID_VIEWPORT_CONFIG, "config");
|
|
564
569
|
if (!s.elements || !Array.isArray(s.elements))
|
|
@@ -588,7 +593,7 @@ const sr = () => {
|
|
|
588
593
|
throw new f(m.INVALID_VIEWPORT_COOLDOWN_PERIOD, "config");
|
|
589
594
|
if (s.maxTrackedElements !== void 0 && (typeof s.maxTrackedElements != "number" || s.maxTrackedElements <= 0))
|
|
590
595
|
throw new f(m.INVALID_VIEWPORT_MAX_TRACKED_ELEMENTS, "config");
|
|
591
|
-
},
|
|
596
|
+
}, ur = (s) => {
|
|
592
597
|
if (s) {
|
|
593
598
|
if (s.tracelog && (!s.tracelog.projectId || typeof s.tracelog.projectId != "string" || s.tracelog.projectId.trim() === ""))
|
|
594
599
|
throw new U(m.INVALID_TRACELOG_PROJECT_ID, "config");
|
|
@@ -609,14 +614,14 @@ const sr = () => {
|
|
|
609
614
|
throw new U('fetchCredentials must be "include", "same-origin", or "omit"', "config");
|
|
610
615
|
}
|
|
611
616
|
}
|
|
612
|
-
},
|
|
613
|
-
|
|
617
|
+
}, dr = (s) => {
|
|
618
|
+
lr(s);
|
|
614
619
|
const e = {
|
|
615
620
|
...s ?? {},
|
|
616
621
|
sessionTimeout: s?.sessionTimeout ?? 9e5,
|
|
617
622
|
globalMetadata: s?.globalMetadata ?? {},
|
|
618
623
|
sensitiveQueryParams: s?.sensitiveQueryParams ?? [],
|
|
619
|
-
errorSampling: s?.errorSampling ??
|
|
624
|
+
errorSampling: s?.errorSampling ?? lt,
|
|
620
625
|
samplingRate: s?.samplingRate ?? 1,
|
|
621
626
|
pageViewThrottleMs: s?.pageViewThrottleMs ?? 1e3,
|
|
622
627
|
clickThrottleMs: s?.clickThrottleMs ?? 300,
|
|
@@ -633,18 +638,18 @@ const sr = () => {
|
|
|
633
638
|
cooldownPeriod: e.viewport.cooldownPeriod ?? 6e4,
|
|
634
639
|
maxTrackedElements: e.viewport.maxTrackedElements ?? 100
|
|
635
640
|
}), e;
|
|
636
|
-
},
|
|
641
|
+
}, be = (s, e = /* @__PURE__ */ new Set()) => {
|
|
637
642
|
if (s == null)
|
|
638
643
|
return !0;
|
|
639
644
|
const t = typeof s;
|
|
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) =>
|
|
641
|
-
},
|
|
645
|
+
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) => be(r, e)) : t === "object" ? Object.values(s).every((r) => be(r, e)) : !1);
|
|
646
|
+
}, hr = (s) => typeof s != "object" || s === null ? !1 : be(s), ht = (s) => {
|
|
642
647
|
if (typeof s != "object" || s === null || Array.isArray(s)) return;
|
|
643
648
|
const e = {};
|
|
644
649
|
for (const [t, r] of Object.entries(s))
|
|
645
650
|
typeof r == "string" && (e[t] = r);
|
|
646
651
|
return Object.keys(e).length > 0 ? e : void 0;
|
|
647
|
-
},
|
|
652
|
+
}, fr = (s) => typeof s != "string" ? {
|
|
648
653
|
valid: !1,
|
|
649
654
|
error: "Event name must be a string"
|
|
650
655
|
} : s.length === 0 ? {
|
|
@@ -659,9 +664,9 @@ const sr = () => {
|
|
|
659
664
|
} : ["constructor", "prototype", "__proto__", "eval", "function", "var", "let", "const"].includes(s.toLowerCase()) ? {
|
|
660
665
|
valid: !1,
|
|
661
666
|
error: "Event name cannot be a reserved word"
|
|
662
|
-
} : { valid: !0 },
|
|
663
|
-
const r =
|
|
664
|
-
if (!
|
|
667
|
+
} : { valid: !0 }, Je = (s, e, t) => {
|
|
668
|
+
const r = ar(e), n = t && t === "customEvent" ? `${t} "${s}" metadata error` : `${s} metadata error`;
|
|
669
|
+
if (!hr(r))
|
|
665
670
|
return {
|
|
666
671
|
valid: !1,
|
|
667
672
|
error: `${n}: object has invalid types. Valid types are string, number, boolean or string arrays.`
|
|
@@ -709,7 +714,7 @@ const sr = () => {
|
|
|
709
714
|
valid: !0,
|
|
710
715
|
sanitizedMetadata: r
|
|
711
716
|
};
|
|
712
|
-
},
|
|
717
|
+
}, ft = (s, e, t) => {
|
|
713
718
|
if (Array.isArray(e)) {
|
|
714
719
|
const r = [], n = t && t === "customEvent" ? `${t} "${s}" metadata error` : `${s} metadata error`;
|
|
715
720
|
for (let i = 0; i < e.length; i++) {
|
|
@@ -719,7 +724,7 @@ const sr = () => {
|
|
|
719
724
|
valid: !1,
|
|
720
725
|
error: `${n}: array item at index ${i} must be an object.`
|
|
721
726
|
};
|
|
722
|
-
const l =
|
|
727
|
+
const l = Je(s, o, t);
|
|
723
728
|
if (!l.valid)
|
|
724
729
|
return {
|
|
725
730
|
valid: !1,
|
|
@@ -732,16 +737,16 @@ const sr = () => {
|
|
|
732
737
|
sanitizedMetadata: r
|
|
733
738
|
};
|
|
734
739
|
}
|
|
735
|
-
return
|
|
736
|
-
},
|
|
737
|
-
const t =
|
|
740
|
+
return Je(s, e, t);
|
|
741
|
+
}, mr = (s, e) => {
|
|
742
|
+
const t = fr(s);
|
|
738
743
|
if (!t.valid)
|
|
739
744
|
return a("error", "Event name validation failed", {
|
|
740
745
|
data: { eventName: s, error: t.error }
|
|
741
746
|
}), t;
|
|
742
747
|
if (!e)
|
|
743
748
|
return { valid: !0 };
|
|
744
|
-
const r =
|
|
749
|
+
const r = ft(s, e, "customEvent");
|
|
745
750
|
return r.valid || a("error", "Event metadata validation failed", {
|
|
746
751
|
data: {
|
|
747
752
|
eventName: s,
|
|
@@ -749,7 +754,7 @@ const sr = () => {
|
|
|
749
754
|
}
|
|
750
755
|
}), r;
|
|
751
756
|
};
|
|
752
|
-
class
|
|
757
|
+
class gr {
|
|
753
758
|
listeners = /* @__PURE__ */ new Map();
|
|
754
759
|
/**
|
|
755
760
|
* Subscribes to an event channel
|
|
@@ -866,7 +871,7 @@ class mr {
|
|
|
866
871
|
this.listeners.clear();
|
|
867
872
|
}
|
|
868
873
|
}
|
|
869
|
-
function
|
|
874
|
+
function mt(s, e, t) {
|
|
870
875
|
try {
|
|
871
876
|
const r = e(s);
|
|
872
877
|
return r === null ? null : typeof r == "object" && r !== null && "type" in r ? r : (a("warn", `beforeSend transformer returned invalid data, using original [${t}]`), s);
|
|
@@ -877,10 +882,10 @@ function ft(s, e, t) {
|
|
|
877
882
|
}), s;
|
|
878
883
|
}
|
|
879
884
|
}
|
|
880
|
-
function
|
|
881
|
-
return s.map((r) =>
|
|
885
|
+
function Er(s, e, t) {
|
|
886
|
+
return s.map((r) => mt(r, e, t)).filter((r) => r !== null);
|
|
882
887
|
}
|
|
883
|
-
function
|
|
888
|
+
function gt(s, e, t) {
|
|
884
889
|
try {
|
|
885
890
|
const r = e(s);
|
|
886
891
|
return r === null ? (a("debug", `Batch filtered by beforeBatch transformer [${t}]`, {
|
|
@@ -896,7 +901,7 @@ function mt(s, e, t) {
|
|
|
896
901
|
}), s;
|
|
897
902
|
}
|
|
898
903
|
}
|
|
899
|
-
const
|
|
904
|
+
const ge = { config: {} };
|
|
900
905
|
class w {
|
|
901
906
|
/**
|
|
902
907
|
* Retrieves a value from global state.
|
|
@@ -915,7 +920,7 @@ class w {
|
|
|
915
920
|
* ```
|
|
916
921
|
*/
|
|
917
922
|
get(e) {
|
|
918
|
-
return
|
|
923
|
+
return ge[e];
|
|
919
924
|
}
|
|
920
925
|
/**
|
|
921
926
|
* Sets a value in global state.
|
|
@@ -935,7 +940,7 @@ class w {
|
|
|
935
940
|
* ```
|
|
936
941
|
*/
|
|
937
942
|
set(e, t) {
|
|
938
|
-
|
|
943
|
+
ge[e] = t;
|
|
939
944
|
}
|
|
940
945
|
/**
|
|
941
946
|
* Returns an immutable snapshot of the entire global state.
|
|
@@ -952,10 +957,10 @@ class w {
|
|
|
952
957
|
* ```
|
|
953
958
|
*/
|
|
954
959
|
getState() {
|
|
955
|
-
return { ...
|
|
960
|
+
return { ...ge };
|
|
956
961
|
}
|
|
957
962
|
}
|
|
958
|
-
class
|
|
963
|
+
class Ze extends w {
|
|
959
964
|
storeManager;
|
|
960
965
|
integrationId;
|
|
961
966
|
apiUrl;
|
|
@@ -1040,7 +1045,7 @@ class Je extends w {
|
|
|
1040
1045
|
return { ...this.staticHeaders, ...e };
|
|
1041
1046
|
}
|
|
1042
1047
|
getQueueStorageKey() {
|
|
1043
|
-
const e = this.get("userId") || "anonymous", t =
|
|
1048
|
+
const e = this.get("userId") || "anonymous", t = Ct(e);
|
|
1044
1049
|
return this.integrationId ? `${t}:${this.integrationId}` : t;
|
|
1045
1050
|
}
|
|
1046
1051
|
/**
|
|
@@ -1270,7 +1275,7 @@ class Je extends w {
|
|
|
1270
1275
|
const t = this.transformers.beforeSend;
|
|
1271
1276
|
if (!t)
|
|
1272
1277
|
return e;
|
|
1273
|
-
const r =
|
|
1278
|
+
const r = Er(
|
|
1274
1279
|
e.events,
|
|
1275
1280
|
t,
|
|
1276
1281
|
this.integrationId || "SenderManager"
|
|
@@ -1315,7 +1320,7 @@ class Je extends w {
|
|
|
1315
1320
|
if (this.integrationId === "saas")
|
|
1316
1321
|
return e;
|
|
1317
1322
|
const t = this.transformers.beforeBatch;
|
|
1318
|
-
return t ?
|
|
1323
|
+
return t ? gt(e, t, this.integrationId || "SenderManager") : e;
|
|
1319
1324
|
}
|
|
1320
1325
|
/**
|
|
1321
1326
|
* Calculates exponential backoff delay with jitter for retry attempts.
|
|
@@ -1417,6 +1422,12 @@ class Je extends w {
|
|
|
1417
1422
|
const g = c === 3;
|
|
1418
1423
|
if (u instanceof N)
|
|
1419
1424
|
throw this.consecutiveNetworkFailures = 0, this.circuitOpenedAt = 0, u;
|
|
1425
|
+
if (u instanceof se) {
|
|
1426
|
+
this.consecutiveNetworkFailures = 0, this.circuitOpenedAt = 0, o = !1, l = !0, a("warn", `Rate limited, skipping retries${this.integrationId ? ` [${this.integrationId}]` : ""}`, {
|
|
1427
|
+
data: { events: e.events.length, attempt: c }
|
|
1428
|
+
});
|
|
1429
|
+
break;
|
|
1430
|
+
}
|
|
1420
1431
|
if (u instanceof O || (o = !1), u instanceof TypeError || (l = !0), a(
|
|
1421
1432
|
g ? "error" : "warn",
|
|
1422
1433
|
`Send attempt ${c} failed${this.integrationId ? ` [${this.integrationId}]` : ""}${g ? " (all retries exhausted)" : ", will retry"}`,
|
|
@@ -1485,7 +1496,7 @@ class Je extends w {
|
|
|
1485
1496
|
}
|
|
1486
1497
|
});
|
|
1487
1498
|
if (!l.ok)
|
|
1488
|
-
throw l.status >= 400 && l.status < 500 && l.status !== 408 && l.status !== 429 ? new N(`HTTP ${l.status}: ${l.statusText}`, l.status) : new Error(`HTTP ${l.status}: ${l.statusText}`);
|
|
1499
|
+
throw l.status >= 400 && l.status < 500 && l.status !== 408 && l.status !== 429 ? new N(`HTTP ${l.status}: ${l.statusText}`, l.status) : l.status === 429 ? new se(`HTTP 429: ${l.statusText}`) : new Error(`HTTP ${l.status}: ${l.statusText}`);
|
|
1489
1500
|
return l;
|
|
1490
1501
|
} catch (o) {
|
|
1491
1502
|
throw o instanceof N ? o : n ? new O("Request timed out (server likely received the request)") : o;
|
|
@@ -1571,7 +1582,7 @@ class Je extends w {
|
|
|
1571
1582
|
_metadata: {
|
|
1572
1583
|
referer: typeof window < "u" ? window.location.href : void 0,
|
|
1573
1584
|
timestamp: t,
|
|
1574
|
-
client_version:
|
|
1585
|
+
client_version: Jt
|
|
1575
1586
|
}
|
|
1576
1587
|
};
|
|
1577
1588
|
return {
|
|
@@ -1710,12 +1721,12 @@ class Je extends w {
|
|
|
1710
1721
|
}
|
|
1711
1722
|
logPermanentError(e, t) {
|
|
1712
1723
|
const r = Date.now();
|
|
1713
|
-
(!this.lastPermanentErrorLog || this.lastPermanentErrorLog.statusCode !== t.statusCode || r - this.lastPermanentErrorLog.timestamp >=
|
|
1724
|
+
(!this.lastPermanentErrorLog || this.lastPermanentErrorLog.statusCode !== t.statusCode || r - this.lastPermanentErrorLog.timestamp >= zt) && (a("error", `${e}${this.integrationId ? ` [${this.integrationId}]` : ""}`, {
|
|
1714
1725
|
data: { status: t.statusCode, message: t.message }
|
|
1715
1726
|
}), this.lastPermanentErrorLog = { statusCode: t.statusCode, timestamp: r });
|
|
1716
1727
|
}
|
|
1717
1728
|
}
|
|
1718
|
-
class
|
|
1729
|
+
class Sr extends w {
|
|
1719
1730
|
bootTime;
|
|
1720
1731
|
bootTimestamp;
|
|
1721
1732
|
hasPerformanceNow;
|
|
@@ -1864,8 +1875,8 @@ class Er extends w {
|
|
|
1864
1875
|
};
|
|
1865
1876
|
}
|
|
1866
1877
|
}
|
|
1867
|
-
const
|
|
1868
|
-
class
|
|
1878
|
+
const pr = new Set(Object.values(d));
|
|
1879
|
+
class Tr extends w {
|
|
1869
1880
|
dataSenders;
|
|
1870
1881
|
emitter;
|
|
1871
1882
|
transformers;
|
|
@@ -1904,10 +1915,10 @@ class pr extends w {
|
|
|
1904
1915
|
* @param fetchCredentials - Fetch credentials mode for custom backend. @default 'include'
|
|
1905
1916
|
*/
|
|
1906
1917
|
constructor(e, t = null, r = {}, n = {}, i, o = "include") {
|
|
1907
|
-
super(), this.emitter = t, this.transformers = r, this.timeManager = new
|
|
1918
|
+
super(), this.emitter = t, this.transformers = r, this.timeManager = new Sr(), this.dataSenders = [];
|
|
1908
1919
|
const l = this.get("collectApiUrls");
|
|
1909
|
-
l?.saas && this.dataSenders.push(new
|
|
1910
|
-
new
|
|
1920
|
+
l?.saas && this.dataSenders.push(new Ze(e, "saas", l.saas, r)), l?.custom && this.dataSenders.push(
|
|
1921
|
+
new Ze(
|
|
1911
1922
|
e,
|
|
1912
1923
|
"custom",
|
|
1913
1924
|
l.custom,
|
|
@@ -2035,7 +2046,7 @@ class pr extends w {
|
|
|
2035
2046
|
a("error", "Event type is required - event will be ignored");
|
|
2036
2047
|
return;
|
|
2037
2048
|
}
|
|
2038
|
-
if (!
|
|
2049
|
+
if (!pr.has(e)) {
|
|
2039
2050
|
a("error", "Invalid event type - event will be ignored", {
|
|
2040
2051
|
data: { type: e }
|
|
2041
2052
|
});
|
|
@@ -2079,12 +2090,12 @@ class pr extends w {
|
|
|
2079
2090
|
}
|
|
2080
2091
|
const v = this.getTypeLimitForEvent(S);
|
|
2081
2092
|
if (v) {
|
|
2082
|
-
const
|
|
2083
|
-
if (
|
|
2093
|
+
const de = this.sessionEventCounts[S];
|
|
2094
|
+
if (de !== void 0 && de >= v) {
|
|
2084
2095
|
a("warn", "Session event type limit reached", {
|
|
2085
2096
|
data: {
|
|
2086
2097
|
type: S,
|
|
2087
|
-
count:
|
|
2098
|
+
count: de,
|
|
2088
2099
|
limit: v
|
|
2089
2100
|
}
|
|
2090
2101
|
});
|
|
@@ -2097,7 +2108,7 @@ class pr extends w {
|
|
|
2097
2108
|
if (!this.checkPerEventRateLimit(o.name, v))
|
|
2098
2109
|
return;
|
|
2099
2110
|
}
|
|
2100
|
-
const
|
|
2111
|
+
const Ve = S === d.SESSION_START, Y = t || this.get("pageUrl"), $ = this.buildEventPayload({
|
|
2101
2112
|
type: S,
|
|
2102
2113
|
page_url: Y,
|
|
2103
2114
|
from_page_url: r,
|
|
@@ -2110,7 +2121,7 @@ class pr extends w {
|
|
|
2110
2121
|
page_view: g
|
|
2111
2122
|
});
|
|
2112
2123
|
if ($ && !(!T && !this.shouldSample())) {
|
|
2113
|
-
if (
|
|
2124
|
+
if (Ve) {
|
|
2114
2125
|
const v = this.get("sessionId");
|
|
2115
2126
|
if (!v) {
|
|
2116
2127
|
a("error", "Session start event requires sessionId - event will be ignored");
|
|
@@ -2125,7 +2136,7 @@ class pr extends w {
|
|
|
2125
2136
|
this.set("hasStartSession", !0);
|
|
2126
2137
|
}
|
|
2127
2138
|
if (!this.isDuplicateEvent($)) {
|
|
2128
|
-
if (this.get("mode") ===
|
|
2139
|
+
if (this.get("mode") === ne.QA) {
|
|
2129
2140
|
if (S === d.CUSTOM && o) {
|
|
2130
2141
|
a("info", `Custom Event: ${o.name}`, {
|
|
2131
2142
|
visibility: "qa",
|
|
@@ -2493,7 +2504,7 @@ class pr extends w {
|
|
|
2493
2504
|
};
|
|
2494
2505
|
const i = this.get("collectApiUrls"), o = !!(i?.custom || i?.saas), l = this.transformers.beforeBatch;
|
|
2495
2506
|
if (!o && l) {
|
|
2496
|
-
const c =
|
|
2507
|
+
const c = gt(n, l, "EventManager");
|
|
2497
2508
|
c !== null && (n = c);
|
|
2498
2509
|
}
|
|
2499
2510
|
return n;
|
|
@@ -2505,7 +2516,7 @@ class pr extends w {
|
|
|
2505
2516
|
});
|
|
2506
2517
|
const i = this.get("sessionReferrer"), o = this.get("sessionUtm");
|
|
2507
2518
|
let l = {
|
|
2508
|
-
id:
|
|
2519
|
+
id: nr(),
|
|
2509
2520
|
type: e.type,
|
|
2510
2521
|
page_url: t,
|
|
2511
2522
|
timestamp: r,
|
|
@@ -2522,7 +2533,7 @@ class pr extends w {
|
|
|
2522
2533
|
};
|
|
2523
2534
|
const c = this.get("collectApiUrls"), u = !!c?.custom, g = !!c?.saas, E = u || g, T = u && g, S = this.transformers.beforeSend;
|
|
2524
2535
|
if (S && (!E || u && !T)) {
|
|
2525
|
-
const Y =
|
|
2536
|
+
const Y = mt(l, S, "EventManager");
|
|
2526
2537
|
if (Y === null)
|
|
2527
2538
|
return null;
|
|
2528
2539
|
l = Y;
|
|
@@ -2620,10 +2631,10 @@ class pr extends w {
|
|
|
2620
2631
|
this.eventsQueue = this.eventsQueue.filter((r) => !t.has(r.id));
|
|
2621
2632
|
}
|
|
2622
2633
|
emitEvent(e) {
|
|
2623
|
-
this.emitter && this.emitter.emit(
|
|
2634
|
+
this.emitter && this.emitter.emit(Te.EVENT, e);
|
|
2624
2635
|
}
|
|
2625
2636
|
emitEventsQueue(e) {
|
|
2626
|
-
this.emitter && this.emitter.emit(
|
|
2637
|
+
this.emitter && this.emitter.emit(Te.QUEUE, e);
|
|
2627
2638
|
}
|
|
2628
2639
|
/**
|
|
2629
2640
|
* Creates a debounced version of a function that delays execution until after
|
|
@@ -2699,13 +2710,13 @@ class pr extends w {
|
|
|
2699
2710
|
loadSessionCounts(e) {
|
|
2700
2711
|
if (typeof window > "u" || typeof localStorage > "u")
|
|
2701
2712
|
return this.getInitialCounts();
|
|
2702
|
-
const t = this.get("userId") || "anonymous", r =
|
|
2713
|
+
const t = this.get("userId") || "anonymous", r = Fe(t, e);
|
|
2703
2714
|
try {
|
|
2704
2715
|
const n = localStorage.getItem(r);
|
|
2705
2716
|
if (!n)
|
|
2706
2717
|
return this.getInitialCounts();
|
|
2707
2718
|
const i = JSON.parse(n);
|
|
2708
|
-
return i._timestamp && Date.now() - i._timestamp >
|
|
2719
|
+
return i._timestamp && Date.now() - i._timestamp > xe ? (a("debug", "Session counts expired, clearing", {
|
|
2709
2720
|
data: { sessionId: e, age: Date.now() - i._timestamp }
|
|
2710
2721
|
}), 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" ? {
|
|
2711
2722
|
total: i.total,
|
|
@@ -2750,12 +2761,12 @@ class pr extends w {
|
|
|
2750
2761
|
cleanupExpiredSessionCounts() {
|
|
2751
2762
|
if (!(typeof window > "u" || typeof localStorage > "u"))
|
|
2752
2763
|
try {
|
|
2753
|
-
const e = localStorage.getItem(
|
|
2764
|
+
const e = localStorage.getItem($e);
|
|
2754
2765
|
if (e) {
|
|
2755
2766
|
const i = Date.now() - parseInt(e, 10);
|
|
2756
|
-
if (i <
|
|
2767
|
+
if (i < Be) {
|
|
2757
2768
|
a("debug", "Skipping session counts cleanup (throttled)", {
|
|
2758
|
-
data: { timeSinceLastCleanup: i, throttleMs:
|
|
2769
|
+
data: { timeSinceLastCleanup: i, throttleMs: Be }
|
|
2759
2770
|
});
|
|
2760
2771
|
return;
|
|
2761
2772
|
}
|
|
@@ -2768,14 +2779,14 @@ class pr extends w {
|
|
|
2768
2779
|
const l = localStorage.getItem(o);
|
|
2769
2780
|
if (l) {
|
|
2770
2781
|
const c = JSON.parse(l);
|
|
2771
|
-
c._timestamp && Date.now() - c._timestamp >
|
|
2782
|
+
c._timestamp && Date.now() - c._timestamp > xe && n.push(o);
|
|
2772
2783
|
}
|
|
2773
2784
|
} catch {
|
|
2774
2785
|
}
|
|
2775
2786
|
}
|
|
2776
2787
|
n.forEach((i) => {
|
|
2777
2788
|
localStorage.removeItem(i), a("debug", "Cleaned up expired session counts", { data: { key: i } });
|
|
2778
|
-
}), n.length > 0 && a("info", `Cleaned up ${n.length} expired session counts entries`), localStorage.setItem(
|
|
2789
|
+
}), n.length > 0 && a("info", `Cleaned up ${n.length} expired session counts entries`), localStorage.setItem($e, Date.now().toString());
|
|
2779
2790
|
} catch (e) {
|
|
2780
2791
|
a("warn", "Failed to cleanup expired session counts", { error: e });
|
|
2781
2792
|
}
|
|
@@ -2809,7 +2820,7 @@ class pr extends w {
|
|
|
2809
2820
|
* @internal
|
|
2810
2821
|
*/
|
|
2811
2822
|
saveSessionCounts(e) {
|
|
2812
|
-
const t = this.get("userId") || "anonymous", r =
|
|
2823
|
+
const t = this.get("userId") || "anonymous", r = Fe(t, e);
|
|
2813
2824
|
try {
|
|
2814
2825
|
const n = {
|
|
2815
2826
|
...this.sessionEventCounts,
|
|
@@ -2825,7 +2836,7 @@ class pr extends w {
|
|
|
2825
2836
|
}
|
|
2826
2837
|
}
|
|
2827
2838
|
}
|
|
2828
|
-
class
|
|
2839
|
+
class Ir {
|
|
2829
2840
|
/**
|
|
2830
2841
|
* Gets or creates a unique user ID.
|
|
2831
2842
|
*
|
|
@@ -2843,15 +2854,15 @@ class Tr {
|
|
|
2843
2854
|
* @returns Persistent unique user ID (UUID v4 format)
|
|
2844
2855
|
*/
|
|
2845
2856
|
static getId(e) {
|
|
2846
|
-
const t = e.getItem(
|
|
2857
|
+
const t = e.getItem(pe);
|
|
2847
2858
|
if (t)
|
|
2848
2859
|
return t;
|
|
2849
|
-
const r =
|
|
2850
|
-
return e.setItem(
|
|
2860
|
+
const r = ut();
|
|
2861
|
+
return e.setItem(pe, r), r;
|
|
2851
2862
|
}
|
|
2852
2863
|
}
|
|
2853
|
-
const
|
|
2854
|
-
class
|
|
2864
|
+
const vr = /^\d{13}-[a-z0-9]{9}$/;
|
|
2865
|
+
class _r extends w {
|
|
2855
2866
|
storageManager;
|
|
2856
2867
|
eventManager;
|
|
2857
2868
|
projectId;
|
|
@@ -2877,7 +2888,7 @@ class vr extends w {
|
|
|
2877
2888
|
return;
|
|
2878
2889
|
}
|
|
2879
2890
|
const e = this.getProjectId();
|
|
2880
|
-
this.broadcastChannel = new BroadcastChannel(
|
|
2891
|
+
this.broadcastChannel = new BroadcastChannel(Nt(e)), this.broadcastChannel.onmessage = (t) => {
|
|
2881
2892
|
const { action: r, sessionId: n, timestamp: i, projectId: o } = t.data ?? {};
|
|
2882
2893
|
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 } }));
|
|
2883
2894
|
};
|
|
@@ -2897,7 +2908,7 @@ class vr extends w {
|
|
|
2897
2908
|
const e = this.loadStoredSession();
|
|
2898
2909
|
if (!e)
|
|
2899
2910
|
return null;
|
|
2900
|
-
if (!
|
|
2911
|
+
if (!vr.test(e.id))
|
|
2901
2912
|
return a("warn", "Invalid session ID format recovered from storage, clearing", {
|
|
2902
2913
|
data: { sessionId: e.id }
|
|
2903
2914
|
}), this.clearStoredSession(), null;
|
|
@@ -2942,7 +2953,7 @@ class vr extends w {
|
|
|
2942
2953
|
this.storageManager.setItem(t, r), this.storageManager.setSessionItem(t, r);
|
|
2943
2954
|
}
|
|
2944
2955
|
getSessionStorageKey() {
|
|
2945
|
-
return
|
|
2956
|
+
return Rt(this.getProjectId());
|
|
2946
2957
|
}
|
|
2947
2958
|
getProjectId() {
|
|
2948
2959
|
return this.projectId;
|
|
@@ -3008,9 +3019,9 @@ class vr extends w {
|
|
|
3008
3019
|
let r, n;
|
|
3009
3020
|
if (e) {
|
|
3010
3021
|
const i = this.loadStoredSession();
|
|
3011
|
-
r = i?.referrer ??
|
|
3022
|
+
r = i?.referrer ?? fe(), n = i?.utm ?? me();
|
|
3012
3023
|
} else
|
|
3013
|
-
r =
|
|
3024
|
+
r = fe(), n = me();
|
|
3014
3025
|
a("debug", "Session tracking initialized", {
|
|
3015
3026
|
data: {
|
|
3016
3027
|
sessionId: t,
|
|
@@ -3061,7 +3072,7 @@ class vr extends w {
|
|
|
3061
3072
|
*/
|
|
3062
3073
|
renewSession() {
|
|
3063
3074
|
this.needsRenewal = !1;
|
|
3064
|
-
const e = this.generateSessionId(), t =
|
|
3075
|
+
const e = this.generateSessionId(), t = fe(), r = me();
|
|
3065
3076
|
a("debug", "Renewing session after timeout", {
|
|
3066
3077
|
data: { newSessionId: e }
|
|
3067
3078
|
}), 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({
|
|
@@ -3182,7 +3193,7 @@ class vr extends w {
|
|
|
3182
3193
|
this.clearSessionTimeout(), this.cleanupActivityListeners(), this.cleanupCrossTabSync(), this.cleanupLifecycleListeners(), this.isTracking = !1, this.needsRenewal = !1, this.set("hasStartSession", !1);
|
|
3183
3194
|
}
|
|
3184
3195
|
}
|
|
3185
|
-
class
|
|
3196
|
+
class yr extends w {
|
|
3186
3197
|
eventManager;
|
|
3187
3198
|
storageManager;
|
|
3188
3199
|
sessionManager = null;
|
|
@@ -3217,7 +3228,7 @@ class _r extends w {
|
|
|
3217
3228
|
}
|
|
3218
3229
|
const t = this.get("config")?.integrations?.tracelog?.projectId ?? "custom";
|
|
3219
3230
|
try {
|
|
3220
|
-
this.sessionManager = new
|
|
3231
|
+
this.sessionManager = new _r(this.storageManager, this.eventManager, t), this.sessionManager.startTracking(), this.eventManager.flushPendingEvents();
|
|
3221
3232
|
} catch (r) {
|
|
3222
3233
|
if (this.sessionManager) {
|
|
3223
3234
|
try {
|
|
@@ -3270,7 +3281,7 @@ class _r extends w {
|
|
|
3270
3281
|
this.destroyed || (this.sessionManager && (this.sessionManager.destroy(), this.sessionManager = null), this.destroyed = !0);
|
|
3271
3282
|
}
|
|
3272
3283
|
}
|
|
3273
|
-
class
|
|
3284
|
+
class wr extends w {
|
|
3274
3285
|
eventManager;
|
|
3275
3286
|
onTrack;
|
|
3276
3287
|
originalPushState;
|
|
@@ -3310,7 +3321,7 @@ class yr extends w {
|
|
|
3310
3321
|
};
|
|
3311
3322
|
}
|
|
3312
3323
|
trackCurrentPage = () => {
|
|
3313
|
-
const e = window.location.href, t =
|
|
3324
|
+
const e = window.location.href, t = ye(e, this.get("config").sensitiveQueryParams);
|
|
3314
3325
|
if (this.get("pageUrl") === t)
|
|
3315
3326
|
return;
|
|
3316
3327
|
const r = Date.now(), n = this.get("config").pageViewThrottleMs ?? 1e3;
|
|
@@ -3328,7 +3339,7 @@ class yr extends w {
|
|
|
3328
3339
|
});
|
|
3329
3340
|
};
|
|
3330
3341
|
trackInitialPageView() {
|
|
3331
|
-
const e =
|
|
3342
|
+
const e = ye(window.location.href, this.get("config").sensitiveQueryParams), t = this.extractPageViewData();
|
|
3332
3343
|
this.lastPageViewTime = Date.now(), this.eventManager.track({
|
|
3333
3344
|
type: d.PAGE_VIEW,
|
|
3334
3345
|
page_url: e,
|
|
@@ -3346,7 +3357,7 @@ class yr extends w {
|
|
|
3346
3357
|
};
|
|
3347
3358
|
}
|
|
3348
3359
|
}
|
|
3349
|
-
class
|
|
3360
|
+
class br extends w {
|
|
3350
3361
|
eventManager;
|
|
3351
3362
|
lastClickTimes = /* @__PURE__ */ new Map();
|
|
3352
3363
|
clickHandler;
|
|
@@ -3484,7 +3495,7 @@ class wr extends w {
|
|
|
3484
3495
|
return e.hasAttribute(`${b}-name`) ? e : e.closest(`[${b}-name]`);
|
|
3485
3496
|
}
|
|
3486
3497
|
getRelevantClickElement(e) {
|
|
3487
|
-
for (const t of
|
|
3498
|
+
for (const t of bt)
|
|
3488
3499
|
try {
|
|
3489
3500
|
if (e.matches(t))
|
|
3490
3501
|
return e;
|
|
@@ -3564,7 +3575,7 @@ class wr extends w {
|
|
|
3564
3575
|
*/
|
|
3565
3576
|
sanitizeText(e) {
|
|
3566
3577
|
let t = e;
|
|
3567
|
-
for (const r of
|
|
3578
|
+
for (const r of at) {
|
|
3568
3579
|
const n = new RegExp(r.source, r.flags);
|
|
3569
3580
|
t = t.replace(n, "[REDACTED]");
|
|
3570
3581
|
}
|
|
@@ -3603,7 +3614,7 @@ class wr extends w {
|
|
|
3603
3614
|
};
|
|
3604
3615
|
}
|
|
3605
3616
|
}
|
|
3606
|
-
class
|
|
3617
|
+
class Ar extends w {
|
|
3607
3618
|
eventManager;
|
|
3608
3619
|
containers = [];
|
|
3609
3620
|
limitWarningLogged = !1;
|
|
@@ -3831,7 +3842,7 @@ class br extends w {
|
|
|
3831
3842
|
e.isPrimary = t;
|
|
3832
3843
|
}
|
|
3833
3844
|
}
|
|
3834
|
-
class
|
|
3845
|
+
class Lr extends w {
|
|
3835
3846
|
eventManager;
|
|
3836
3847
|
trackedElements = /* @__PURE__ */ new Map();
|
|
3837
3848
|
observer = null;
|
|
@@ -3992,7 +4003,7 @@ class Ar extends w {
|
|
|
3992
4003
|
});
|
|
3993
4004
|
}
|
|
3994
4005
|
}
|
|
3995
|
-
class
|
|
4006
|
+
class Mr {
|
|
3996
4007
|
storage;
|
|
3997
4008
|
sessionStorageRef;
|
|
3998
4009
|
fallbackStorage = /* @__PURE__ */ new Map();
|
|
@@ -4275,7 +4286,7 @@ class Lr {
|
|
|
4275
4286
|
this.fallbackSessionStorage.delete(e);
|
|
4276
4287
|
}
|
|
4277
4288
|
}
|
|
4278
|
-
class
|
|
4289
|
+
class Cr extends w {
|
|
4279
4290
|
eventManager;
|
|
4280
4291
|
reportedByNav = /* @__PURE__ */ new Map();
|
|
4281
4292
|
navigationHistory = [];
|
|
@@ -4286,7 +4297,7 @@ class Mr extends w {
|
|
|
4286
4297
|
navigationCounter = 0;
|
|
4287
4298
|
// Counter for handling simultaneous navigations edge case
|
|
4288
4299
|
constructor(e) {
|
|
4289
|
-
super(), this.eventManager = e, this.vitalThresholds =
|
|
4300
|
+
super(), this.eventManager = e, this.vitalThresholds = Ke(_e);
|
|
4290
4301
|
}
|
|
4291
4302
|
/**
|
|
4292
4303
|
* Starts tracking Web Vitals and performance metrics.
|
|
@@ -4303,8 +4314,8 @@ class Mr extends w {
|
|
|
4303
4314
|
* @returns Promise that resolves when tracking is initialized
|
|
4304
4315
|
*/
|
|
4305
4316
|
async startTracking() {
|
|
4306
|
-
const e = this.get("config"), t = e?.webVitalsMode ??
|
|
4307
|
-
this.vitalThresholds =
|
|
4317
|
+
const e = this.get("config"), t = e?.webVitalsMode ?? _e;
|
|
4318
|
+
this.vitalThresholds = Ke(t), e?.webVitalsThresholds && (this.vitalThresholds = { ...this.vitalThresholds, ...e.webVitalsThresholds }), await this.initWebVitals(), this.observeLongTasks();
|
|
4308
4319
|
}
|
|
4309
4320
|
/**
|
|
4310
4321
|
* Stops tracking Web Vitals and cleans up resources.
|
|
@@ -4374,7 +4385,7 @@ class Mr extends w {
|
|
|
4374
4385
|
}
|
|
4375
4386
|
async initWebVitals() {
|
|
4376
4387
|
try {
|
|
4377
|
-
const { onLCP: e, onCLS: t, onFCP: r, onTTFB: n, onINP: i } = await Promise.resolve().then(() =>
|
|
4388
|
+
const { onLCP: e, onCLS: t, onFCP: r, onTTFB: n, onINP: i } = await Promise.resolve().then(() => as), o = (l) => (c) => {
|
|
4378
4389
|
const u = Number(c.value.toFixed(2));
|
|
4379
4390
|
this.sendVital({ type: l, value: u });
|
|
4380
4391
|
};
|
|
@@ -4401,7 +4412,7 @@ class Mr extends w {
|
|
|
4401
4412
|
const t = e.getEntries();
|
|
4402
4413
|
for (const r of t) {
|
|
4403
4414
|
const n = Number(r.duration.toFixed(2)), i = Date.now();
|
|
4404
|
-
i - this.lastLongTaskSentAt >=
|
|
4415
|
+
i - this.lastLongTaskSentAt >= Kt && (this.shouldSendVital("LONG_TASK", n) && this.trackWebVital("LONG_TASK", n), this.lastLongTaskSentAt = i);
|
|
4405
4416
|
}
|
|
4406
4417
|
},
|
|
4407
4418
|
{ type: "longtask", buffered: !0 }
|
|
@@ -4417,7 +4428,7 @@ class Mr extends w {
|
|
|
4417
4428
|
return;
|
|
4418
4429
|
if (r)
|
|
4419
4430
|
r.add(e.type);
|
|
4420
|
-
else if (this.reportedByNav.set(t, /* @__PURE__ */ new Set([e.type])), this.navigationHistory.push(t), this.navigationHistory.length >
|
|
4431
|
+
else if (this.reportedByNav.set(t, /* @__PURE__ */ new Set([e.type])), this.navigationHistory.push(t), this.navigationHistory.length > Yt) {
|
|
4421
4432
|
const i = this.navigationHistory.shift();
|
|
4422
4433
|
i && this.reportedByNav.delete(i);
|
|
4423
4434
|
}
|
|
@@ -4508,7 +4519,7 @@ class Mr extends w {
|
|
|
4508
4519
|
return !(typeof r == "number" && t <= r);
|
|
4509
4520
|
}
|
|
4510
4521
|
}
|
|
4511
|
-
class
|
|
4522
|
+
class oe extends w {
|
|
4512
4523
|
eventManager;
|
|
4513
4524
|
recentErrors = /* @__PURE__ */ new Map();
|
|
4514
4525
|
errorBurstCounter = 0;
|
|
@@ -4544,14 +4555,14 @@ class ie extends w {
|
|
|
4544
4555
|
const e = Date.now();
|
|
4545
4556
|
if (e < this.burstBackoffUntil)
|
|
4546
4557
|
return !1;
|
|
4547
|
-
if (e - this.burstWindowStart >
|
|
4548
|
-
return this.burstBackoffUntil = e +
|
|
4558
|
+
if (e - this.burstWindowStart > Gt && (this.errorBurstCounter = 0, this.burstWindowStart = e), this.errorBurstCounter++, this.errorBurstCounter > jt)
|
|
4559
|
+
return this.burstBackoffUntil = e + ze, a("debug", "Error burst detected - entering cooldown", {
|
|
4549
4560
|
data: {
|
|
4550
4561
|
errorsInWindow: this.errorBurstCounter,
|
|
4551
|
-
cooldownMs:
|
|
4562
|
+
cooldownMs: ze
|
|
4552
4563
|
}
|
|
4553
4564
|
}), !1;
|
|
4554
|
-
const r = this.get("config").errorSampling ??
|
|
4565
|
+
const r = this.get("config").errorSampling ?? lt;
|
|
4555
4566
|
return Math.random() < r;
|
|
4556
4567
|
}
|
|
4557
4568
|
handleError = (e) => {
|
|
@@ -4603,12 +4614,12 @@ class ie extends w {
|
|
|
4603
4614
|
}
|
|
4604
4615
|
}
|
|
4605
4616
|
sanitize(e) {
|
|
4606
|
-
const t = e.length >
|
|
4617
|
+
const t = e.length > Xe ? e.slice(0, Xe) + "..." : e;
|
|
4607
4618
|
return this.sanitizePii(t);
|
|
4608
4619
|
}
|
|
4609
4620
|
sanitizePii(e) {
|
|
4610
4621
|
let t = e;
|
|
4611
|
-
for (const r of
|
|
4622
|
+
for (const r of at) {
|
|
4612
4623
|
const n = new RegExp(r.source, r.flags);
|
|
4613
4624
|
t = t.replace(n, "[REDACTED]");
|
|
4614
4625
|
}
|
|
@@ -4616,19 +4627,19 @@ class ie extends w {
|
|
|
4616
4627
|
}
|
|
4617
4628
|
shouldSuppressError(e, t) {
|
|
4618
4629
|
const r = Date.now(), n = `${e}:${t}`, i = this.recentErrors.get(n);
|
|
4619
|
-
return i !== void 0 && r - i <
|
|
4630
|
+
return i !== void 0 && r - i < je ? (this.recentErrors.set(n, r), !0) : (this.recentErrors.set(n, r), this.recentErrors.size > Xt ? (this.recentErrors.clear(), this.recentErrors.set(n, r), !1) : (this.recentErrors.size > te && this.pruneOldErrors(), !1));
|
|
4620
4631
|
}
|
|
4621
4632
|
static TRUNCATION_SUFFIX = `
|
|
4622
4633
|
...truncated`;
|
|
4623
4634
|
truncateStack(e) {
|
|
4624
|
-
if (e.length <=
|
|
4625
|
-
const t =
|
|
4635
|
+
if (e.length <= Ge) return this.sanitizePii(e);
|
|
4636
|
+
const t = Ge - oe.TRUNCATION_SUFFIX.length, r = e.slice(0, t) + oe.TRUNCATION_SUFFIX;
|
|
4626
4637
|
return this.sanitizePii(r);
|
|
4627
4638
|
}
|
|
4628
4639
|
pruneOldErrors() {
|
|
4629
4640
|
const e = Date.now();
|
|
4630
4641
|
for (const [n, i] of this.recentErrors.entries())
|
|
4631
|
-
e - i >
|
|
4642
|
+
e - i > je && this.recentErrors.delete(n);
|
|
4632
4643
|
if (this.recentErrors.size <= te)
|
|
4633
4644
|
return;
|
|
4634
4645
|
const t = Array.from(this.recentErrors.entries()).sort((n, i) => n[1] - i[1]), r = this.recentErrors.size - te;
|
|
@@ -4638,11 +4649,11 @@ class ie extends w {
|
|
|
4638
4649
|
}
|
|
4639
4650
|
}
|
|
4640
4651
|
}
|
|
4641
|
-
class
|
|
4652
|
+
class Rr extends w {
|
|
4642
4653
|
isInitialized = !1;
|
|
4643
4654
|
suppressNextScrollTimer = null;
|
|
4644
4655
|
pageUnloadHandler = null;
|
|
4645
|
-
emitter = new
|
|
4656
|
+
emitter = new gr();
|
|
4646
4657
|
transformers = {};
|
|
4647
4658
|
customHeadersProvider;
|
|
4648
4659
|
managers = {};
|
|
@@ -4660,11 +4671,11 @@ class Cr extends w {
|
|
|
4660
4671
|
async init(e = {}) {
|
|
4661
4672
|
if (this.isInitialized)
|
|
4662
4673
|
return { sessionId: this.get("sessionId") ?? "" };
|
|
4663
|
-
this.managers.storage = new
|
|
4674
|
+
this.managers.storage = new Mr();
|
|
4664
4675
|
try {
|
|
4665
4676
|
this.setupState(e);
|
|
4666
4677
|
const t = e.integrations?.custom?.headers ?? {}, r = e.integrations?.custom?.fetchCredentials ?? "include";
|
|
4667
|
-
return this.managers.event = new
|
|
4678
|
+
return this.managers.event = new Tr(
|
|
4668
4679
|
this.managers.storage,
|
|
4669
4680
|
this.emitter,
|
|
4670
4681
|
this.transformers,
|
|
@@ -4694,9 +4705,9 @@ class Cr extends w {
|
|
|
4694
4705
|
}
|
|
4695
4706
|
let r = t;
|
|
4696
4707
|
t && typeof t == "object" && !Array.isArray(t) && Object.getPrototypeOf(t) !== Object.prototype && (r = Object.assign({}, t));
|
|
4697
|
-
const { valid: n, error: i, sanitizedMetadata: o } =
|
|
4708
|
+
const { valid: n, error: i, sanitizedMetadata: o } = mr(e, r);
|
|
4698
4709
|
if (!n) {
|
|
4699
|
-
if (this.get("mode") ===
|
|
4710
|
+
if (this.get("mode") === ne.QA)
|
|
4700
4711
|
throw new Error(`[TraceLog] Custom event "${e}" validation failed: ${i}`);
|
|
4701
4712
|
a("warn", `Custom event "${e}" dropped: ${i}`);
|
|
4702
4713
|
return;
|
|
@@ -4764,14 +4775,14 @@ class Cr extends w {
|
|
|
4764
4775
|
}
|
|
4765
4776
|
setupState(e = {}) {
|
|
4766
4777
|
this.set("config", e);
|
|
4767
|
-
const t =
|
|
4778
|
+
const t = Ir.getId(this.managers.storage);
|
|
4768
4779
|
this.set("userId", t);
|
|
4769
|
-
const r =
|
|
4780
|
+
const r = or(e);
|
|
4770
4781
|
this.set("collectApiUrls", r);
|
|
4771
|
-
const n =
|
|
4782
|
+
const n = Wt();
|
|
4772
4783
|
this.set("device", n);
|
|
4773
|
-
const i =
|
|
4774
|
-
this.set("pageUrl", i),
|
|
4784
|
+
const i = ye(window.location.href, e.sensitiveQueryParams);
|
|
4785
|
+
this.set("pageUrl", i), er() && this.set("mode", ne.QA);
|
|
4775
4786
|
}
|
|
4776
4787
|
/**
|
|
4777
4788
|
* Returns the current configuration object.
|
|
@@ -4822,7 +4833,7 @@ class Cr extends w {
|
|
|
4822
4833
|
valid: !1,
|
|
4823
4834
|
error: "Global metadata must be a plain object"
|
|
4824
4835
|
};
|
|
4825
|
-
const t =
|
|
4836
|
+
const t = ft("Global", e, "globalMetadata");
|
|
4826
4837
|
return t.valid ? { valid: !0 } : {
|
|
4827
4838
|
valid: !1,
|
|
4828
4839
|
error: t.error
|
|
@@ -4889,7 +4900,7 @@ class Cr extends w {
|
|
|
4889
4900
|
a("warn", "identify() userId exceeds 256 characters", { data: { length: e.trim().length } });
|
|
4890
4901
|
return;
|
|
4891
4902
|
}
|
|
4892
|
-
const r = e.trim(), n =
|
|
4903
|
+
const r = e.trim(), n = ht(t), i = {
|
|
4893
4904
|
userId: r,
|
|
4894
4905
|
...n ? { traits: n } : {}
|
|
4895
4906
|
};
|
|
@@ -4908,8 +4919,8 @@ class Cr extends w {
|
|
|
4908
4919
|
*/
|
|
4909
4920
|
async resetIdentity() {
|
|
4910
4921
|
await this.managers.event?.flushImmediately(), this.set("identity", void 0), this.clearPersistedIdentity();
|
|
4911
|
-
const e =
|
|
4912
|
-
this.managers.storage.setItem(
|
|
4922
|
+
const e = ut();
|
|
4923
|
+
this.managers.storage.setItem(pe, 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");
|
|
4913
4924
|
}
|
|
4914
4925
|
/**
|
|
4915
4926
|
* Returns the project ID used for identity storage scoping.
|
|
@@ -4923,7 +4934,7 @@ class Cr extends w {
|
|
|
4923
4934
|
*/
|
|
4924
4935
|
persistIdentity(e) {
|
|
4925
4936
|
try {
|
|
4926
|
-
const t = this.getProjectId(), r =
|
|
4937
|
+
const t = this.getProjectId(), r = he(t);
|
|
4927
4938
|
this.managers.storage.setItem(r, JSON.stringify(e));
|
|
4928
4939
|
} catch {
|
|
4929
4940
|
a("debug", "Failed to persist identity to localStorage");
|
|
@@ -4934,7 +4945,7 @@ class Cr extends w {
|
|
|
4934
4945
|
* Also migrates pending identity (set before init) to the project-scoped key.
|
|
4935
4946
|
*/
|
|
4936
4947
|
loadPersistedIdentity() {
|
|
4937
|
-
const e = this.managers.storage, t = this.getProjectId(), r =
|
|
4948
|
+
const e = this.managers.storage, t = this.getProjectId(), r = he(t);
|
|
4938
4949
|
try {
|
|
4939
4950
|
const n = e.getItem(H);
|
|
4940
4951
|
if (n) {
|
|
@@ -4986,7 +4997,7 @@ class Cr extends w {
|
|
|
4986
4997
|
clearPersistedIdentity() {
|
|
4987
4998
|
try {
|
|
4988
4999
|
const e = this.managers.storage, t = this.getProjectId();
|
|
4989
|
-
e.removeItem(
|
|
5000
|
+
e.removeItem(he(t)), e.removeItem(H);
|
|
4990
5001
|
} catch {
|
|
4991
5002
|
a("debug", "Failed to clear persisted identity");
|
|
4992
5003
|
}
|
|
@@ -4998,7 +5009,7 @@ class Cr extends w {
|
|
|
4998
5009
|
}
|
|
4999
5010
|
initializeHandlers() {
|
|
5000
5011
|
const e = this.get("config");
|
|
5001
|
-
this.handlers.session = new
|
|
5012
|
+
this.handlers.session = new yr(
|
|
5002
5013
|
this.managers.storage,
|
|
5003
5014
|
this.managers.event
|
|
5004
5015
|
), this.handlers.session.startTracking();
|
|
@@ -5007,16 +5018,16 @@ class Cr extends w {
|
|
|
5007
5018
|
this.set("suppressNextScroll", !1);
|
|
5008
5019
|
}, 500);
|
|
5009
5020
|
};
|
|
5010
|
-
this.handlers.pageView = new
|
|
5021
|
+
this.handlers.pageView = new wr(this.managers.event, t), this.handlers.pageView.startTracking(), this.handlers.click = new br(this.managers.event), this.handlers.click.startTracking(), this.handlers.scroll = new Ar(this.managers.event), this.handlers.scroll.startTracking(), this.handlers.performance = new Cr(this.managers.event), this.handlers.performance.startTracking().catch((r) => {
|
|
5011
5022
|
a("warn", "Failed to start performance tracking", { error: r });
|
|
5012
|
-
}), this.handlers.error = new
|
|
5023
|
+
}), this.handlers.error = new oe(this.managers.event), this.handlers.error.startTracking(), e.viewport && (this.handlers.viewport = new Lr(this.managers.event), this.handlers.viewport.startTracking());
|
|
5013
5024
|
}
|
|
5014
5025
|
}
|
|
5015
5026
|
const k = [], M = [];
|
|
5016
5027
|
let D = null, h = null, R = !1, p = !1, P = null;
|
|
5017
|
-
const
|
|
5028
|
+
const Nr = 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 () => {
|
|
5018
5029
|
try {
|
|
5019
|
-
const e =
|
|
5030
|
+
const e = dr(s ?? {}), t = new Rr();
|
|
5020
5031
|
try {
|
|
5021
5032
|
k.forEach(({ event: o, callback: l }) => {
|
|
5022
5033
|
t.on(o, l);
|
|
@@ -5042,7 +5053,7 @@ const Rr = async (s) => typeof window > "u" || typeof document > "u" ? { session
|
|
|
5042
5053
|
} finally {
|
|
5043
5054
|
R = !1, P = null;
|
|
5044
5055
|
}
|
|
5045
|
-
})()), P)),
|
|
5056
|
+
})()), P)), Or = (s, e) => {
|
|
5046
5057
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5047
5058
|
if (!h)
|
|
5048
5059
|
throw new Error("[TraceLog] TraceLog not initialized. Please call init() first.");
|
|
@@ -5050,7 +5061,7 @@ const Rr = async (s) => typeof window > "u" || typeof document > "u" ? { session
|
|
|
5050
5061
|
throw new Error("[TraceLog] Cannot send events while TraceLog is being destroyed");
|
|
5051
5062
|
h.sendCustomEvent(s, e);
|
|
5052
5063
|
}
|
|
5053
|
-
},
|
|
5064
|
+
}, Pr = (s, e) => {
|
|
5054
5065
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5055
5066
|
if (!h || R) {
|
|
5056
5067
|
k.push({ event: s, callback: e });
|
|
@@ -5058,7 +5069,7 @@ const Rr = async (s) => typeof window > "u" || typeof document > "u" ? { session
|
|
|
5058
5069
|
}
|
|
5059
5070
|
h.on(s, e);
|
|
5060
5071
|
}
|
|
5061
|
-
},
|
|
5072
|
+
}, Dr = (s, e) => {
|
|
5062
5073
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5063
5074
|
if (!h) {
|
|
5064
5075
|
const t = k.findIndex((r) => r.event === s && r.callback === e);
|
|
@@ -5068,7 +5079,7 @@ const Rr = async (s) => typeof window > "u" || typeof document > "u" ? { session
|
|
|
5068
5079
|
h.off(s, e);
|
|
5069
5080
|
}
|
|
5070
5081
|
};
|
|
5071
|
-
function
|
|
5082
|
+
function kr(s, e) {
|
|
5072
5083
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5073
5084
|
if (typeof e != "function")
|
|
5074
5085
|
throw new Error(`[TraceLog] Transformer must be a function, received: ${typeof e}`);
|
|
@@ -5082,7 +5093,7 @@ function Dr(s, e) {
|
|
|
5082
5093
|
s === "beforeSend" ? h.setTransformer("beforeSend", e) : h.setTransformer("beforeBatch", e);
|
|
5083
5094
|
}
|
|
5084
5095
|
}
|
|
5085
|
-
const
|
|
5096
|
+
const Vr = (s) => {
|
|
5086
5097
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5087
5098
|
if (!h) {
|
|
5088
5099
|
const e = M.findIndex((t) => t.hook === s);
|
|
@@ -5093,7 +5104,7 @@ const kr = (s) => {
|
|
|
5093
5104
|
throw new Error("[TraceLog] Cannot remove transformers while TraceLog is being destroyed");
|
|
5094
5105
|
h.removeTransformer(s);
|
|
5095
5106
|
}
|
|
5096
|
-
},
|
|
5107
|
+
}, Ur = (s) => {
|
|
5097
5108
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5098
5109
|
if (typeof s != "function")
|
|
5099
5110
|
throw new Error(`[TraceLog] Custom headers provider must be a function, received: ${typeof s}`);
|
|
@@ -5105,7 +5116,7 @@ const kr = (s) => {
|
|
|
5105
5116
|
throw new Error("[TraceLog] Cannot set custom headers while TraceLog is being destroyed");
|
|
5106
5117
|
h.setCustomHeaders(s);
|
|
5107
5118
|
}
|
|
5108
|
-
},
|
|
5119
|
+
}, Hr = () => {
|
|
5109
5120
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5110
5121
|
if (!h) {
|
|
5111
5122
|
D = null;
|
|
@@ -5115,7 +5126,7 @@ const kr = (s) => {
|
|
|
5115
5126
|
throw new Error("[TraceLog] Cannot remove custom headers while TraceLog is being destroyed");
|
|
5116
5127
|
h.removeCustomHeaders();
|
|
5117
5128
|
}
|
|
5118
|
-
},
|
|
5129
|
+
}, Fr = () => typeof window > "u" || typeof document > "u" ? !1 : h !== null, xr = () => typeof window > "u" || typeof document > "u" || !h ? null : h.getSessionId(), $r = () => {
|
|
5119
5130
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5120
5131
|
if (p)
|
|
5121
5132
|
throw new Error("[TraceLog] Destroy operation already in progress");
|
|
@@ -5130,9 +5141,9 @@ const kr = (s) => {
|
|
|
5130
5141
|
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 });
|
|
5131
5142
|
}
|
|
5132
5143
|
}
|
|
5133
|
-
}, $r = (s) => {
|
|
5134
|
-
typeof window > "u" || typeof document > "u" || er(s);
|
|
5135
5144
|
}, Br = (s) => {
|
|
5145
|
+
typeof window > "u" || typeof document > "u" || tr(s);
|
|
5146
|
+
}, Wr = (s) => {
|
|
5136
5147
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5137
5148
|
if (!h)
|
|
5138
5149
|
throw new Error("[TraceLog] TraceLog not initialized. Please call init() first.");
|
|
@@ -5140,7 +5151,7 @@ const kr = (s) => {
|
|
|
5140
5151
|
throw new Error("[TraceLog] Cannot update metadata while TraceLog is being destroyed");
|
|
5141
5152
|
h.updateGlobalMetadata(s);
|
|
5142
5153
|
}
|
|
5143
|
-
},
|
|
5154
|
+
}, Xr = (s) => {
|
|
5144
5155
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5145
5156
|
if (!h)
|
|
5146
5157
|
throw new Error("[TraceLog] TraceLog not initialized. Please call init() first.");
|
|
@@ -5148,7 +5159,7 @@ const kr = (s) => {
|
|
|
5148
5159
|
throw new Error("[TraceLog] Cannot update metadata while TraceLog is being destroyed");
|
|
5149
5160
|
h.mergeGlobalMetadata(s);
|
|
5150
5161
|
}
|
|
5151
|
-
},
|
|
5162
|
+
}, Gr = (s, e) => {
|
|
5152
5163
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5153
5164
|
if (!s || typeof s != "string" || s.trim().length === 0) {
|
|
5154
5165
|
a("warn", "identify() called with invalid userId");
|
|
@@ -5167,7 +5178,7 @@ const kr = (s) => {
|
|
|
5167
5178
|
return;
|
|
5168
5179
|
}
|
|
5169
5180
|
try {
|
|
5170
|
-
const t =
|
|
5181
|
+
const t = ht(e), r = {
|
|
5171
5182
|
userId: s.trim(),
|
|
5172
5183
|
...t ? { traits: t } : {}
|
|
5173
5184
|
};
|
|
@@ -5176,7 +5187,7 @@ const kr = (s) => {
|
|
|
5176
5187
|
a("debug", "Failed to persist pre-init identity");
|
|
5177
5188
|
}
|
|
5178
5189
|
}
|
|
5179
|
-
},
|
|
5190
|
+
}, jr = async () => {
|
|
5180
5191
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5181
5192
|
if (!h) {
|
|
5182
5193
|
try {
|
|
@@ -5189,37 +5200,37 @@ const kr = (s) => {
|
|
|
5189
5200
|
throw new Error("[TraceLog] Cannot reset identity while TraceLog is being destroyed");
|
|
5190
5201
|
await h.resetIdentity();
|
|
5191
5202
|
}
|
|
5192
|
-
},
|
|
5193
|
-
init:
|
|
5194
|
-
event:
|
|
5195
|
-
on:
|
|
5196
|
-
off:
|
|
5197
|
-
setTransformer:
|
|
5198
|
-
removeTransformer:
|
|
5199
|
-
setCustomHeaders:
|
|
5200
|
-
removeCustomHeaders:
|
|
5201
|
-
isInitialized:
|
|
5202
|
-
getSessionId:
|
|
5203
|
-
destroy:
|
|
5204
|
-
setQaMode:
|
|
5205
|
-
updateGlobalMetadata:
|
|
5206
|
-
mergeGlobalMetadata:
|
|
5207
|
-
identify:
|
|
5208
|
-
resetIdentity:
|
|
5203
|
+
}, vs = {
|
|
5204
|
+
init: Nr,
|
|
5205
|
+
event: Or,
|
|
5206
|
+
on: Pr,
|
|
5207
|
+
off: Dr,
|
|
5208
|
+
setTransformer: kr,
|
|
5209
|
+
removeTransformer: Vr,
|
|
5210
|
+
setCustomHeaders: Ur,
|
|
5211
|
+
removeCustomHeaders: Hr,
|
|
5212
|
+
isInitialized: Fr,
|
|
5213
|
+
getSessionId: xr,
|
|
5214
|
+
destroy: $r,
|
|
5215
|
+
setQaMode: Br,
|
|
5216
|
+
updateGlobalMetadata: Wr,
|
|
5217
|
+
mergeGlobalMetadata: Xr,
|
|
5218
|
+
identify: Gr,
|
|
5219
|
+
resetIdentity: jr
|
|
5209
5220
|
};
|
|
5210
|
-
var
|
|
5221
|
+
var Ae, C, j, Et, ae, St = -1, V = function(s) {
|
|
5211
5222
|
addEventListener("pageshow", (function(e) {
|
|
5212
|
-
e.persisted && (
|
|
5223
|
+
e.persisted && (St = e.timeStamp, s(e));
|
|
5213
5224
|
}), !0);
|
|
5214
|
-
},
|
|
5225
|
+
}, Pe = function() {
|
|
5215
5226
|
var s = self.performance && performance.getEntriesByType && performance.getEntriesByType("navigation")[0];
|
|
5216
5227
|
if (s && s.responseStart > 0 && s.responseStart < performance.now()) return s;
|
|
5217
|
-
},
|
|
5218
|
-
var s =
|
|
5228
|
+
}, ce = function() {
|
|
5229
|
+
var s = Pe();
|
|
5219
5230
|
return s && s.activationStart || 0;
|
|
5220
5231
|
}, _ = function(s, e) {
|
|
5221
|
-
var t =
|
|
5222
|
-
return
|
|
5232
|
+
var t = Pe(), r = "navigate";
|
|
5233
|
+
return St >= 0 ? r = "back-forward-cache" : t && (document.prerendering || ce() > 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
5234
|
}, x = function(s, e, t) {
|
|
5224
5235
|
try {
|
|
5225
5236
|
if (PerformanceObserver.supportedEntryTypes.includes(s)) {
|
|
@@ -5239,7 +5250,7 @@ var be, C, j, gt, oe, Et = -1, V = function(s) {
|
|
|
5239
5250
|
return l > c[1] ? "poor" : l > c[0] ? "needs-improvement" : "good";
|
|
5240
5251
|
})(e.value, t), s(e));
|
|
5241
5252
|
};
|
|
5242
|
-
},
|
|
5253
|
+
}, De = function(s) {
|
|
5243
5254
|
requestAnimationFrame((function() {
|
|
5244
5255
|
return requestAnimationFrame((function() {
|
|
5245
5256
|
return s();
|
|
@@ -5249,23 +5260,23 @@ var be, C, j, gt, oe, Et = -1, V = function(s) {
|
|
|
5249
5260
|
document.addEventListener("visibilitychange", (function() {
|
|
5250
5261
|
document.visibilityState === "hidden" && s();
|
|
5251
5262
|
}));
|
|
5252
|
-
},
|
|
5263
|
+
}, ue = function(s) {
|
|
5253
5264
|
var e = !1;
|
|
5254
5265
|
return function() {
|
|
5255
5266
|
e || (s(), e = !0);
|
|
5256
5267
|
};
|
|
5257
|
-
}, F = -1,
|
|
5268
|
+
}, F = -1, et = function() {
|
|
5258
5269
|
return document.visibilityState !== "hidden" || document.prerendering ? 1 / 0 : 0;
|
|
5259
|
-
},
|
|
5260
|
-
document.visibilityState === "hidden" && F > -1 && (F = s.type === "visibilitychange" ? s.timeStamp : 0,
|
|
5261
|
-
},
|
|
5262
|
-
addEventListener("visibilitychange",
|
|
5263
|
-
},
|
|
5264
|
-
removeEventListener("visibilitychange",
|
|
5265
|
-
},
|
|
5266
|
-
return F < 0 && (F =
|
|
5270
|
+
}, le = function(s) {
|
|
5271
|
+
document.visibilityState === "hidden" && F > -1 && (F = s.type === "visibilitychange" ? s.timeStamp : 0, zr());
|
|
5272
|
+
}, tt = function() {
|
|
5273
|
+
addEventListener("visibilitychange", le, !0), addEventListener("prerenderingchange", le, !0);
|
|
5274
|
+
}, zr = function() {
|
|
5275
|
+
removeEventListener("visibilitychange", le, !0), removeEventListener("prerenderingchange", le, !0);
|
|
5276
|
+
}, ke = function() {
|
|
5277
|
+
return F < 0 && (F = et(), tt(), V((function() {
|
|
5267
5278
|
setTimeout((function() {
|
|
5268
|
-
F =
|
|
5279
|
+
F = et(), tt();
|
|
5269
5280
|
}), 0);
|
|
5270
5281
|
}))), { get firstHiddenTime() {
|
|
5271
5282
|
return F;
|
|
@@ -5274,21 +5285,21 @@ var be, C, j, gt, oe, Et = -1, V = function(s) {
|
|
|
5274
5285
|
document.prerendering ? addEventListener("prerenderingchange", (function() {
|
|
5275
5286
|
return s();
|
|
5276
5287
|
}), !0) : s();
|
|
5277
|
-
},
|
|
5288
|
+
}, Le = [1800, 3e3], pt = function(s, e) {
|
|
5278
5289
|
e = e || {}, K((function() {
|
|
5279
|
-
var t, r =
|
|
5290
|
+
var t, r = ke(), n = _("FCP"), i = x("paint", (function(o) {
|
|
5280
5291
|
o.forEach((function(l) {
|
|
5281
|
-
l.name === "first-contentful-paint" && (i.disconnect(), l.startTime < r.firstHiddenTime && (n.value = Math.max(l.startTime -
|
|
5292
|
+
l.name === "first-contentful-paint" && (i.disconnect(), l.startTime < r.firstHiddenTime && (n.value = Math.max(l.startTime - ce(), 0), n.entries.push(l), t(!0)));
|
|
5282
5293
|
}));
|
|
5283
5294
|
}));
|
|
5284
|
-
i && (t = y(s, n,
|
|
5285
|
-
n = _("FCP"), t = y(s, n,
|
|
5295
|
+
i && (t = y(s, n, Le, e.reportAllChanges), V((function(o) {
|
|
5296
|
+
n = _("FCP"), t = y(s, n, Le, e.reportAllChanges), De((function() {
|
|
5286
5297
|
n.value = performance.now() - o.timeStamp, t(!0);
|
|
5287
5298
|
}));
|
|
5288
5299
|
})));
|
|
5289
5300
|
}));
|
|
5290
|
-
},
|
|
5291
|
-
e = e || {},
|
|
5301
|
+
}, Me = [0.1, 0.25], Qr = function(s, e) {
|
|
5302
|
+
e = e || {}, pt(ue((function() {
|
|
5292
5303
|
var t, r = _("CLS", 0), n = 0, i = [], o = function(c) {
|
|
5293
5304
|
c.forEach((function(u) {
|
|
5294
5305
|
if (!u.hadRecentInput) {
|
|
@@ -5297,27 +5308,27 @@ var be, C, j, gt, oe, Et = -1, V = function(s) {
|
|
|
5297
5308
|
}
|
|
5298
5309
|
})), n > r.value && (r.value = n, r.entries = i, t());
|
|
5299
5310
|
}, l = x("layout-shift", o);
|
|
5300
|
-
l && (t = y(s, r,
|
|
5311
|
+
l && (t = y(s, r, Me, e.reportAllChanges), Q((function() {
|
|
5301
5312
|
o(l.takeRecords()), t(!0);
|
|
5302
5313
|
})), V((function() {
|
|
5303
|
-
n = 0, r = _("CLS", 0), t = y(s, r,
|
|
5314
|
+
n = 0, r = _("CLS", 0), t = y(s, r, Me, e.reportAllChanges), De((function() {
|
|
5304
5315
|
return t();
|
|
5305
5316
|
}));
|
|
5306
5317
|
})), setTimeout(t, 0));
|
|
5307
5318
|
})));
|
|
5308
|
-
},
|
|
5319
|
+
}, Tt = 0, Ee = 1 / 0, Z = 0, Kr = function(s) {
|
|
5309
5320
|
s.forEach((function(e) {
|
|
5310
|
-
e.interactionId && (
|
|
5321
|
+
e.interactionId && (Ee = Math.min(Ee, e.interactionId), Z = Math.max(Z, e.interactionId), Tt = Z ? (Z - Ee) / 7 + 1 : 0);
|
|
5311
5322
|
}));
|
|
5312
|
-
},
|
|
5313
|
-
return
|
|
5314
|
-
},
|
|
5315
|
-
"interactionCount" in performance ||
|
|
5316
|
-
}, A = [], re = /* @__PURE__ */ new Map(),
|
|
5317
|
-
var s = Math.min(A.length - 1, Math.floor((
|
|
5323
|
+
}, It = function() {
|
|
5324
|
+
return Ae ? Tt : performance.interactionCount || 0;
|
|
5325
|
+
}, Yr = function() {
|
|
5326
|
+
"interactionCount" in performance || Ae || (Ae = x("event", Kr, { type: "event", buffered: !0, durationThreshold: 0 }));
|
|
5327
|
+
}, A = [], re = /* @__PURE__ */ new Map(), vt = 0, qr = function() {
|
|
5328
|
+
var s = Math.min(A.length - 1, Math.floor((It() - vt) / 50));
|
|
5318
5329
|
return A[s];
|
|
5319
|
-
},
|
|
5320
|
-
if (
|
|
5330
|
+
}, Jr = [], Zr = function(s) {
|
|
5331
|
+
if (Jr.forEach((function(n) {
|
|
5321
5332
|
return n(s);
|
|
5322
5333
|
})), s.interactionId || s.entryType === "first-input") {
|
|
5323
5334
|
var e = A[A.length - 1], t = re.get(s.interactionId);
|
|
@@ -5334,153 +5345,154 @@ var be, C, j, gt, oe, Et = -1, V = function(s) {
|
|
|
5334
5345
|
}));
|
|
5335
5346
|
}
|
|
5336
5347
|
}
|
|
5337
|
-
},
|
|
5348
|
+
}, _t = function(s) {
|
|
5338
5349
|
var e = self.requestIdleCallback || self.setTimeout, t = -1;
|
|
5339
|
-
return s =
|
|
5340
|
-
},
|
|
5350
|
+
return s = ue(s), document.visibilityState === "hidden" ? s() : (t = e(s), Q(s)), t;
|
|
5351
|
+
}, Ce = [200, 500], es = function(s, e) {
|
|
5341
5352
|
"PerformanceEventTiming" in self && "interactionId" in PerformanceEventTiming.prototype && (e = e || {}, K((function() {
|
|
5342
5353
|
var t;
|
|
5343
|
-
|
|
5354
|
+
Yr();
|
|
5344
5355
|
var r, n = _("INP"), i = function(l) {
|
|
5345
|
-
|
|
5346
|
-
l.forEach(
|
|
5347
|
-
var c =
|
|
5356
|
+
_t((function() {
|
|
5357
|
+
l.forEach(Zr);
|
|
5358
|
+
var c = qr();
|
|
5348
5359
|
c && c.latency !== n.value && (n.value = c.latency, n.entries = c.entries, r());
|
|
5349
5360
|
}));
|
|
5350
5361
|
}, o = x("event", i, { durationThreshold: (t = e.durationThreshold) !== null && t !== void 0 ? t : 40 });
|
|
5351
|
-
r = y(s, n,
|
|
5362
|
+
r = y(s, n, Ce, e.reportAllChanges), o && (o.observe({ type: "first-input", buffered: !0 }), Q((function() {
|
|
5352
5363
|
i(o.takeRecords()), r(!0);
|
|
5353
5364
|
})), V((function() {
|
|
5354
|
-
|
|
5365
|
+
vt = It(), A.length = 0, re.clear(), n = _("INP"), r = y(s, n, Ce, e.reportAllChanges);
|
|
5355
5366
|
})));
|
|
5356
5367
|
})));
|
|
5357
|
-
},
|
|
5368
|
+
}, Re = [2500, 4e3], Se = {}, ts = function(s, e) {
|
|
5358
5369
|
e = e || {}, K((function() {
|
|
5359
|
-
var t, r =
|
|
5370
|
+
var t, r = ke(), n = _("LCP"), i = function(c) {
|
|
5360
5371
|
e.reportAllChanges || (c = c.slice(-1)), c.forEach((function(u) {
|
|
5361
|
-
u.startTime < r.firstHiddenTime && (n.value = Math.max(u.startTime -
|
|
5372
|
+
u.startTime < r.firstHiddenTime && (n.value = Math.max(u.startTime - ce(), 0), n.entries = [u], t());
|
|
5362
5373
|
}));
|
|
5363
5374
|
}, o = x("largest-contentful-paint", i);
|
|
5364
5375
|
if (o) {
|
|
5365
|
-
t = y(s, n,
|
|
5366
|
-
var l =
|
|
5367
|
-
|
|
5376
|
+
t = y(s, n, Re, e.reportAllChanges);
|
|
5377
|
+
var l = ue((function() {
|
|
5378
|
+
Se[n.id] || (i(o.takeRecords()), o.disconnect(), Se[n.id] = !0, t(!0));
|
|
5368
5379
|
}));
|
|
5369
5380
|
["keydown", "click"].forEach((function(c) {
|
|
5370
5381
|
addEventListener(c, (function() {
|
|
5371
|
-
return
|
|
5382
|
+
return _t(l);
|
|
5372
5383
|
}), { once: !0, capture: !0 });
|
|
5373
5384
|
})), Q(l), V((function(c) {
|
|
5374
|
-
n = _("LCP"), t = y(s, n,
|
|
5375
|
-
n.value = performance.now() - c.timeStamp,
|
|
5385
|
+
n = _("LCP"), t = y(s, n, Re, e.reportAllChanges), De((function() {
|
|
5386
|
+
n.value = performance.now() - c.timeStamp, Se[n.id] = !0, t(!0);
|
|
5376
5387
|
}));
|
|
5377
5388
|
}));
|
|
5378
5389
|
}
|
|
5379
5390
|
}));
|
|
5380
|
-
},
|
|
5391
|
+
}, Ne = [800, 1800], rs = function s(e) {
|
|
5381
5392
|
document.prerendering ? K((function() {
|
|
5382
5393
|
return s(e);
|
|
5383
5394
|
})) : document.readyState !== "complete" ? addEventListener("load", (function() {
|
|
5384
5395
|
return s(e);
|
|
5385
5396
|
}), !0) : setTimeout(e, 0);
|
|
5386
|
-
},
|
|
5397
|
+
}, ss = function(s, e) {
|
|
5387
5398
|
e = e || {};
|
|
5388
|
-
var t = _("TTFB"), r = y(s, t,
|
|
5389
|
-
|
|
5390
|
-
var n =
|
|
5391
|
-
n && (t.value = Math.max(n.responseStart -
|
|
5392
|
-
t = _("TTFB", 0), (r = y(s, t,
|
|
5399
|
+
var t = _("TTFB"), r = y(s, t, Ne, e.reportAllChanges);
|
|
5400
|
+
rs((function() {
|
|
5401
|
+
var n = Pe();
|
|
5402
|
+
n && (t.value = Math.max(n.responseStart - ce(), 0), t.entries = [n], r(!0), V((function() {
|
|
5403
|
+
t = _("TTFB", 0), (r = y(s, t, Ne, e.reportAllChanges))(!0);
|
|
5393
5404
|
})));
|
|
5394
5405
|
}));
|
|
5395
|
-
}, X = { passive: !0, capture: !0 },
|
|
5396
|
-
C || (C = e, j = s,
|
|
5397
|
-
},
|
|
5398
|
-
if (j >= 0 && j <
|
|
5406
|
+
}, X = { passive: !0, capture: !0 }, ns = /* @__PURE__ */ new Date(), rt = function(s, e) {
|
|
5407
|
+
C || (C = e, j = s, Et = /* @__PURE__ */ new Date(), wt(removeEventListener), yt());
|
|
5408
|
+
}, yt = function() {
|
|
5409
|
+
if (j >= 0 && j < Et - ns) {
|
|
5399
5410
|
var s = { entryType: "first-input", name: C.type, target: C.target, cancelable: C.cancelable, startTime: C.timeStamp, processingStart: C.timeStamp + j };
|
|
5400
|
-
|
|
5411
|
+
ae.forEach((function(e) {
|
|
5401
5412
|
e(s);
|
|
5402
|
-
})),
|
|
5413
|
+
})), ae = [];
|
|
5403
5414
|
}
|
|
5404
|
-
},
|
|
5415
|
+
}, is = function(s) {
|
|
5405
5416
|
if (s.cancelable) {
|
|
5406
5417
|
var e = (s.timeStamp > 1e12 ? /* @__PURE__ */ new Date() : performance.now()) - s.timeStamp;
|
|
5407
5418
|
s.type == "pointerdown" ? (function(t, r) {
|
|
5408
5419
|
var n = function() {
|
|
5409
|
-
|
|
5420
|
+
rt(t, r), o();
|
|
5410
5421
|
}, i = function() {
|
|
5411
5422
|
o();
|
|
5412
5423
|
}, o = function() {
|
|
5413
5424
|
removeEventListener("pointerup", n, X), removeEventListener("pointercancel", i, X);
|
|
5414
5425
|
};
|
|
5415
5426
|
addEventListener("pointerup", n, X), addEventListener("pointercancel", i, X);
|
|
5416
|
-
})(e, s) :
|
|
5427
|
+
})(e, s) : rt(e, s);
|
|
5417
5428
|
}
|
|
5418
|
-
},
|
|
5429
|
+
}, wt = function(s) {
|
|
5419
5430
|
["mousedown", "keydown", "touchstart", "pointerdown"].forEach((function(e) {
|
|
5420
|
-
return s(e,
|
|
5431
|
+
return s(e, is, X);
|
|
5421
5432
|
}));
|
|
5422
|
-
},
|
|
5433
|
+
}, Oe = [100, 300], os = function(s, e) {
|
|
5423
5434
|
e = e || {}, K((function() {
|
|
5424
|
-
var t, r =
|
|
5435
|
+
var t, r = ke(), n = _("FID"), i = function(c) {
|
|
5425
5436
|
c.startTime < r.firstHiddenTime && (n.value = c.processingStart - c.startTime, n.entries.push(c), t(!0));
|
|
5426
5437
|
}, o = function(c) {
|
|
5427
5438
|
c.forEach(i);
|
|
5428
5439
|
}, l = x("first-input", o);
|
|
5429
|
-
t = y(s, n,
|
|
5440
|
+
t = y(s, n, Oe, e.reportAllChanges), l && (Q(ue((function() {
|
|
5430
5441
|
o(l.takeRecords()), l.disconnect();
|
|
5431
5442
|
}))), V((function() {
|
|
5432
5443
|
var c;
|
|
5433
|
-
n = _("FID"), t = y(s, n,
|
|
5444
|
+
n = _("FID"), t = y(s, n, Oe, e.reportAllChanges), ae = [], j = -1, C = null, wt(addEventListener), c = i, ae.push(c), yt();
|
|
5434
5445
|
})));
|
|
5435
5446
|
}));
|
|
5436
5447
|
};
|
|
5437
|
-
const
|
|
5448
|
+
const as = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5438
5449
|
__proto__: null,
|
|
5439
|
-
CLSThresholds:
|
|
5440
|
-
FCPThresholds:
|
|
5441
|
-
FIDThresholds:
|
|
5442
|
-
INPThresholds:
|
|
5443
|
-
LCPThresholds:
|
|
5444
|
-
TTFBThresholds:
|
|
5445
|
-
onCLS:
|
|
5446
|
-
onFCP:
|
|
5447
|
-
onFID:
|
|
5448
|
-
onINP:
|
|
5449
|
-
onLCP:
|
|
5450
|
-
onTTFB:
|
|
5450
|
+
CLSThresholds: Me,
|
|
5451
|
+
FCPThresholds: Le,
|
|
5452
|
+
FIDThresholds: Oe,
|
|
5453
|
+
INPThresholds: Ce,
|
|
5454
|
+
LCPThresholds: Re,
|
|
5455
|
+
TTFBThresholds: Ne,
|
|
5456
|
+
onCLS: Qr,
|
|
5457
|
+
onFCP: pt,
|
|
5458
|
+
onFID: os,
|
|
5459
|
+
onINP: es,
|
|
5460
|
+
onLCP: ts,
|
|
5461
|
+
onTTFB: ss
|
|
5451
5462
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5452
5463
|
export {
|
|
5453
5464
|
f as AppConfigValidationError,
|
|
5454
|
-
|
|
5455
|
-
|
|
5465
|
+
ls as DEFAULT_SESSION_TIMEOUT,
|
|
5466
|
+
_e as DEFAULT_WEB_VITALS_MODE,
|
|
5456
5467
|
L as DeviceType,
|
|
5457
|
-
|
|
5468
|
+
Te as EmitterEvent,
|
|
5458
5469
|
W as ErrorType,
|
|
5459
5470
|
d as EventType,
|
|
5460
|
-
|
|
5471
|
+
Ts as InitializationTimeoutError,
|
|
5461
5472
|
U as IntegrationValidationError,
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5473
|
+
Es as MAX_ARRAY_LENGTH,
|
|
5474
|
+
hs as MAX_CUSTOM_EVENT_ARRAY_SIZE,
|
|
5475
|
+
ds as MAX_CUSTOM_EVENT_KEYS,
|
|
5476
|
+
cs as MAX_CUSTOM_EVENT_NAME_LENGTH,
|
|
5477
|
+
us as MAX_CUSTOM_EVENT_STRING_SIZE,
|
|
5478
|
+
fs as MAX_NESTED_OBJECT_KEYS,
|
|
5479
|
+
ms as MAX_STRING_LENGTH,
|
|
5480
|
+
gs as MAX_STRING_LENGTH_IN_ARRAY,
|
|
5481
|
+
ne as Mode,
|
|
5482
|
+
at as PII_PATTERNS,
|
|
5472
5483
|
N as PermanentError,
|
|
5473
|
-
|
|
5484
|
+
se as RateLimitError,
|
|
5485
|
+
We as SamplingRateValidationError,
|
|
5474
5486
|
ee as ScrollDirection,
|
|
5475
|
-
|
|
5487
|
+
Ot as SessionTimeoutValidationError,
|
|
5476
5488
|
B as SpecialApiUrl,
|
|
5477
5489
|
O as TimeoutError,
|
|
5478
5490
|
z as TraceLogValidationError,
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5491
|
+
Is as WEB_VITALS_GOOD_THRESHOLDS,
|
|
5492
|
+
Qe as WEB_VITALS_NEEDS_IMPROVEMENT_THRESHOLDS,
|
|
5493
|
+
Qt as WEB_VITALS_POOR_THRESHOLDS,
|
|
5494
|
+
Ke as getWebVitalsThresholds,
|
|
5495
|
+
Ss as isPrimaryScrollEvent,
|
|
5496
|
+
ps as isSecondaryScrollEvent,
|
|
5497
|
+
vs as tracelog
|
|
5486
5498
|
};
|