decord/source/__polyfill/13xxx/module_13033.js
github-actions 03cf168fbc chore: update source for alpha 347.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4825.js (118.4 MB)
2026-09-17 08:17:09 +00:00

73 lines
2.7 KiB
JavaScript

// Module ID: 13033
// Function ID: 13034
// Dependencies: [12948, 12949, 13034, 12975, 13004, 13035, 12959, 12957, 12996]
// Module 13033
import _mod12975 from "module_12975" /* 12975 */;
import setupIntegration from "module_13004" /* 13004 */;
export const captureConsoleIntegration = setupIntegration.defineIntegration(() => {
let obj = arg0;
if (arg0 === undefined) {
obj = {};
}
let handled;
let CONSOLE_LEVELS = obj.levels;
if (!CONSOLE_LEVELS) {
CONSOLE_LEVELS = CONSOLE_LEVELS(handled[0]).CONSOLE_LEVELS;
}
handled = obj.handled;
return {
name: "CaptureConsole",
setup(arg0) {
closure_0 = arg0;
if ("console" in CONSOLE_LEVELS(handled[1]).GLOBAL_OBJ) {
let result = CONSOLE_LEVELS(handled[2]).addConsoleInstrumentationHandler((arg0) => {
({ args, level } = arg0);
let hasItem = _mod12975.getClient() === args;
if (hasItem) {
hasItem = CONSOLE_LEVELS.includes(level);
}
if (hasItem) {
closure_2 = handled;
let obj2 = { level: tmp(13035).severityLevelFromString(level), extra: null };
const obj3 = { arguments: args };
obj2.extra = obj3;
const tmpResult = tmp(13035);
tmp(12975).withScope((addEventProcessor) => {
addEventProcessor.addEventProcessor((arg0) => {
arg0.logger = "console";
const result = args(level[6]).addExceptionMechanism(arg0, { handled, type: "console" });
return arg0;
});
if ("assert" !== level) {
const found = args.find((item) => item instanceof Error);
if (found) {
tmp14(12996).captureException(found, obj2);
const tmp14Result = tmp14(12996);
} else {
const tmp14Result2 = tmp14(12957);
const safeJoinResult = tmp14(12957).safeJoin(tmp12, " ");
args(12996).captureMessage(safeJoinResult, obj2);
const obj4 = args(12996);
}
tmp12 = args;
} else if (!args[0]) {
const obj = args(12957);
const _HermesInternal = HermesInternal;
const combined = "Assertion failed: " + args(12957).safeJoin(arr.slice(1), " ") || "console.assert";
addEventProcessor.setExtra("arguments", arr.slice(1));
obj2 = args(12996);
obj2.captureMessage(combined, obj2);
const tmp4 = args(12957).safeJoin(arr.slice(1), " ") || "console.assert";
}
});
const tmpResult2 = tmp(12975);
}
});
let tmpResult = CONSOLE_LEVELS(handled[2]);
}
}
};
});