decord/source/1144_reactRouterV3BrowserTracingIntegration.js

200 lines
7.1 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 1144
// Function ID: 1145
// Name: reactRouterV3BrowserTracingIntegration
// Dependencies: [1024, 817]
// Module 1144 (reactRouterV3BrowserTracingIntegration)
2026-08-24 06:08:38 +00:00
import feedbackAsyncIntegration from "feedbackAsyncIntegration" /* 1024 */;
require = arg1;
2026-07-29 08:29:29 +00:00
const dependencyMap = arg6;
Object.defineProperty(arg5, Symbol.toStringTag, { value: "Module" });
arg5.reactRouterV3BrowserTracingIntegration = function reactRouterV3BrowserTracingIntegration(instrumentNavigation) {
2026-08-24 06:08:38 +00:00
let obj = feedbackAsyncIntegration;
2026-07-29 08:29:29 +00:00
obj = {};
const merged = Object.assign(instrumentNavigation);
obj.instrumentPageLoad = false;
obj.instrumentNavigation = false;
let result = obj.browserTracingIntegration(obj);
require = result;
({ history: dependencyMap, routes: closure_2, match: closure_3, instrumentPageLoad } = instrumentNavigation);
2026-08-24 06:08:38 +00:00
closure_4 = undefined === instrumentPageLoad || instrumentPageLoad;
2026-07-29 08:29:29 +00:00
instrumentNavigation = instrumentNavigation.instrumentNavigation;
2026-08-24 06:08:38 +00:00
closure_5 = undefined === instrumentNavigation || instrumentNavigation;
2026-07-29 08:29:29 +00:00
obj = {};
const merged1 = Object.assign(result);
obj.afterAllSetup = function afterAllSetup(arg0) {
2026-08-24 06:08:38 +00:00
let f104458 = arg0;
f104458.afterAllSetup(arg0);
2026-07-29 08:29:29 +00:00
let _location = closure_4;
if (closure_4) {
2026-08-24 06:08:38 +00:00
_location = result(closure_1_1[0]).WINDOW.location;
2026-07-29 08:29:29 +00:00
}
if (_location) {
2026-08-24 06:08:38 +00:00
const _location2 = result(closure_1_1[0]).WINDOW.location;
f104458 = (name) => {
2026-07-29 08:29:29 +00:00
let str = arg1;
if (arg1 === undefined) {
str = "url";
}
2026-08-24 06:08:38 +00:00
let obj = result(closure_2_1[0]);
2026-07-29 08:29:29 +00:00
obj = { name, attributes: obj };
2026-08-24 06:08:38 +00:00
obj = { [closure_2_0(closure_2_1[1]).SEMANTIC_ATTRIBUTE_SENTRY_OP]: "pageload", [closure_2_0(closure_2_1[1]).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.pageload.react.reactrouter_v3" };
obj[result(closure_2_1[1]).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = str;
result = obj.startBrowserTracingPageLoadSpan(f104458, obj);
2026-07-29 08:29:29 +00:00
};
let pathname;
pathname = _location2.pathname;
let obj = { location: null, routes: null };
obj[0] = _location2;
obj[1] = closure_2;
callback(obj, (arg0, arg1, routes) => {
if (!arg0) {
if (routes) {
const arr = routes.routes || [];
const _Array = Array;
let str2 = "";
if (Array.isArray(arr)) {
str2 = "";
if (0 !== arr.length) {
const found = arr.filter((path) => path.path);
let diff = found.length - 1;
let num2 = -1;
if (0 <= diff) {
while (true) {
let path = found[diff].path;
let tmp4 = diff;
let startsWithResult;
if (path != null) {
startsWithResult = path.startsWith("/");
}
num2 = diff;
if (startsWithResult) {
break;
} else {
diff = diff - 1;
num2 = -1;
if (0 > diff) {
break;
}
}
}
}
const substr = found.slice(num2);
str2 = substr.reduce((arg0, path) => {
path = path.path;
let combined = path;
if ("/" !== arg0) {
combined = path;
if ("" !== arg0) {
const _HermesInternal = HermesInternal;
combined = "/" + path;
}
}
return "" + arg0 + combined;
}, "");
}
}
if (0 !== str2.length) {
if ("/*" !== str2) {
2026-08-24 06:08:38 +00:00
let tmp8 = f116522(str2, "route");
2026-07-29 08:29:29 +00:00
}
return tmp8;
}
2026-08-24 06:08:38 +00:00
tmp8 = f116522(str2);
2026-07-29 08:29:29 +00:00
}
}
2026-08-24 06:08:38 +00:00
return f116522(str2);
2026-07-29 08:29:29 +00:00
});
}
let listen = closure_5;
if (closure_5) {
listen = pathname.listen;
}
if (listen) {
pathname.listen((action) => {
let tmp = "PUSH" !== action.action;
if (tmp) {
tmp = "POP" !== action.action;
}
if (!tmp) {
2026-08-24 06:08:38 +00:00
const f116522 = (name) => {
2026-07-29 08:29:29 +00:00
let str = arg1;
if (arg1 === undefined) {
str = "url";
}
2026-08-24 06:08:38 +00:00
let obj = f104458(pathname[0]);
2026-07-29 08:29:29 +00:00
obj = { name, attributes: obj };
2026-08-24 06:08:38 +00:00
obj = { [closure_2_0(closure_2_1[1]).SEMANTIC_ATTRIBUTE_SENTRY_OP]: "navigation", [closure_2_0(closure_2_1[1]).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.navigation.react.reactrouter_v3" };
obj[f104458(pathname[1]).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = str;
result = obj.startBrowserTracingNavigationSpan(f116522, obj);
2026-07-29 08:29:29 +00:00
};
2026-08-24 06:08:38 +00:00
pathname = action.pathname;
2026-07-29 08:29:29 +00:00
let obj = { location: null, routes: null };
obj[0] = action;
2026-08-24 06:08:38 +00:00
obj[1] = closure_1_2;
closure_1_3(obj, (arg0, arg1, routes) => {
2026-07-29 08:29:29 +00:00
if (!arg0) {
if (routes) {
const arr = routes.routes || [];
const _Array = Array;
let str2 = "";
if (Array.isArray(arr)) {
str2 = "";
if (0 !== arr.length) {
const found = arr.filter((path) => path.path);
let diff = found.length - 1;
let num2 = -1;
if (0 <= diff) {
while (true) {
let path = found[diff].path;
let tmp4 = diff;
let startsWithResult;
if (path != null) {
startsWithResult = path.startsWith("/");
}
num2 = diff;
if (startsWithResult) {
break;
} else {
diff = diff - 1;
num2 = -1;
if (0 > diff) {
break;
}
}
}
}
const substr = found.slice(num2);
str2 = substr.reduce((arg0, path) => {
path = path.path;
let combined = path;
if ("/" !== arg0) {
combined = path;
if ("" !== arg0) {
const _HermesInternal = HermesInternal;
combined = "/" + path;
}
}
return "" + arg0 + combined;
}, "");
}
}
if (0 !== str2.length) {
if ("/*" !== str2) {
2026-08-24 06:08:38 +00:00
let tmp8 = f116522(str2, "route");
2026-07-29 08:29:29 +00:00
}
return tmp8;
}
2026-08-24 06:08:38 +00:00
tmp8 = f116522(str2);
2026-07-29 08:29:29 +00:00
}
}
2026-08-24 06:08:38 +00:00
return f116522(str2);
2026-07-29 08:29:29 +00:00
});
}
});
}
};
return obj;
};