decord/source/1191__isNativeReflectConstruct.js
2026-07-30 10:14:41 +00:00

115 lines
3.8 KiB
JavaScript

// Module ID: 1191
// Function ID: 1192
// Name: _isNativeReflectConstruct
// Dependencies: [41, 42, 93, 95, 96, 98, 1152, 817, 1135, 1192, 1153]
// Module 1191 (_isNativeReflectConstruct)
import _classCallCheck from "_classCallCheck";
import _possibleConstructorReturn from "_possibleConstructorReturn";
import _getPrototypeOf from "_getPrototypeOf";
import _get from "_get";
import importDefaultResult from "_createClass";
const ReactNativeProfiler = arg1;
function _isNativeReflectConstruct() {
try {
const _Boolean = Boolean;
const call = valueOf.call;
const _Reflect = Reflect;
const _Boolean2 = Boolean;
if (typeof call === "unknown") {
let callResult = valueOf();
} else {
callResult = call(constructResult);
}
let closure_0 = !callResult;
function _isNativeReflectConstruct() {
return closure_0;
}
return _isNativeReflectConstruct();
} catch (err) {
}
}
let closure_7 = {
appStartReported: false,
onRunApplicationHook() {
closure_7.appStartReported = false;
}
};
class ReactNativeProfiler {
constructor(arg0) {
self = this;
tmp = _isNativeReflectConstruct(this, ReactNativeProfiler);
obj = require("setSpanDurationAsMeasurementOnTransactionEvent");
obj2 = require("registerSpanErrorInstrumentation");
result = obj._setRootComponentCreationTimestampMs(1000 * obj2.timestampInSeconds());
items = [];
items[0] = global;
tmp3 = __esModule;
obj3 = __esModule(ReactNativeProfiler);
tmp4 = __esModule;
if (_isNativeReflectConstruct()) {
tmp6 = globalThis;
_Reflect = Reflect;
constructResult = Reflect.construct(obj3, items, tmp3(self).constructor);
} else {
constructResult = obj3.apply(self, items);
}
tmp4Result = tmp4(self, constructResult);
tmp4Result.name = "ReactNativeProfiler";
return tmp4Result;
}
}
require("_inherits")(ReactNativeProfiler, require("init").Profiler);
let items = [
{
key: "componentDidMount",
value: function componentDidMount() {
let self = this;
self = this;
let fn = callback3(callback2(self.prototype), "componentDidMount", this);
if (typeof fn !== "ZodObject") {
fn = (arg0) => fn.apply(self, arg0);
}
!fn([]);
if (!closure_7.appStartReported) {
self._reportAppStart();
tmp2.appStartReported = true;
}
}
},
{
key: "_reportAppStart",
value: function _reportAppStart() {
let _captureAppStart = ReactNativeProfiler;
const client = ReactNativeProfiler(1135).getClient();
if (client) {
const addIntegration = client.addIntegration;
if (!tmp4) {
const self = this;
const call = addIntegration.call;
const integration = _captureAppStart(1192).createIntegration(this.name);
if (typeof call === "unknown") {
addIntegration(integration);
} else {
call(client, integration);
}
const _captureAppStartResult = _captureAppStart(1192);
}
const appRegistryIntegration = _captureAppStart(1153).getAppRegistryIntegration(client);
if (!appRegistryIntegration) {
const debug = _captureAppStart(817).debug;
debug.warn("AppRegistryIntegration.onRunApplication not found or invalid.");
_captureAppStart = _captureAppStart(1152)._captureAppStart;
_captureAppStart({ isManual: false });
const _captureAppStartResult2 = _captureAppStart(1152);
}
appRegistryIntegration.onRunApplication(closure_7.onRunApplicationHook);
const _captureAppStartResult1 = _captureAppStart(1153);
tmp4 = null === addIntegration || undefined === addIntegration;
}
}
}
];
export const ReactNativeProfiler = importDefaultResult(ReactNativeProfiler, items);