124 lines
7.2 KiB
JavaScript
124 lines
7.2 KiB
JavaScript
/* Metro module 1071; source: unknown; dependencies: [57, 826, 1067] */
|
|
import * as Module00057Module from './module-00057.js'; /* Metro dependency 57 */
|
|
import * as Module00826Module from './module-00826.js'; /* Metro dependency 826 */
|
|
|
|
function _fun11216(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#11216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1198:6, offset: 0x00da5162, size: 102 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
const defineProperty = Object.defineProperty;
|
|
const Symbol = global.Symbol;
|
|
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
|
|
exports.resourceTimingToSpanAttributes = resourceTimingToSpanAttributes;
|
|
function getAbsoluteTime(a0) { // fn#11217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1198:44, offset: 0x00da51c8, size: 77 bytes, params: 2, frame: 13
|
|
var r0;
|
|
let value = a0;
|
|
if (value) {
|
|
value = (((require(826) /* metro dependency 826 */).browserPerformanceTimeOrigin() || global.performance.timeOrigin) + value) / 1000;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function resourceTimingToSpanAttributes(a0) { // fn#11218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1198:250, offset: 0x00da5215, size: 487 bytes, params: 2, frame: 20
|
|
var r0;
|
|
var value;
|
|
var name;
|
|
var browserPerformanceAPI;
|
|
var Object;
|
|
var assign;
|
|
var object;
|
|
var getAbsoluteTimeBinding;
|
|
var responseStart;
|
|
const object2 = {};
|
|
if (a0.nextHopProtocol != null) {
|
|
value = require(1067) /* metro dependency 1067 */;
|
|
value = value.extractNetworkProtocol(a0.nextHopProtocol);
|
|
name = value.name;
|
|
object2['network.protocol.version'] = value.version;
|
|
object2['network.protocol.name'] = name;
|
|
}
|
|
const value2 = undefined;
|
|
if (Module00826Module.browserPerformanceTimeOrigin()) {
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
object = {};
|
|
getAbsoluteTimeBinding = getAbsoluteTime;
|
|
object['http.request.redirect_start'] = getAbsoluteTimeBinding(a0.redirectStart);
|
|
object['http.request.redirect_end'] = getAbsoluteTimeBinding(a0.redirectEnd);
|
|
object['http.request.worker_start'] = getAbsoluteTimeBinding(a0.workerStart);
|
|
object['http.request.fetch_start'] = getAbsoluteTimeBinding(a0.fetchStart);
|
|
object['http.request.domain_lookup_start'] = getAbsoluteTimeBinding(a0.domainLookupStart);
|
|
object['http.request.domain_lookup_end'] = getAbsoluteTimeBinding(a0.domainLookupEnd);
|
|
object['http.request.connect_start'] = getAbsoluteTimeBinding(a0.connectStart);
|
|
object['http.request.secure_connection_start'] = getAbsoluteTimeBinding(a0.secureConnectionStart);
|
|
object['http.request.connection_end'] = getAbsoluteTimeBinding(a0.connectEnd);
|
|
object['http.request.request_start'] = getAbsoluteTimeBinding(a0.requestStart);
|
|
responseStart = a0.responseStart;
|
|
object['http.request.response_start'] = getAbsoluteTimeBinding(responseStart);
|
|
object['http.request.response_end'] = getAbsoluteTimeBinding(a0.responseEnd);
|
|
responseStart = a0.responseStart;
|
|
object['http.request.time_to_first_byte'] = responseStart != null ? a0.responseStart / 1000 : value2;
|
|
value = Reflect.apply(assign, Object, [{}, object2, object]);
|
|
value = ((a0) => {
|
|
var Object = global.Object;
|
|
var Object2 = global.Object;
|
|
return Object.fromEntries(Object2.entries(a0).filter(_fun11220));
|
|
})(value);
|
|
r0 = value;
|
|
} else {
|
|
browserPerformanceAPI = (require(1067) /* metro dependency 1067 */).getBrowserPerformanceAPI();
|
|
if (browserPerformanceAPI == null) {
|
|
r0 = object2;
|
|
} else if (browserPerformanceAPI.timeOrigin) {
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
object = {};
|
|
getAbsoluteTimeBinding = getAbsoluteTime;
|
|
object['http.request.redirect_start'] = getAbsoluteTimeBinding(a0.redirectStart);
|
|
object['http.request.redirect_end'] = getAbsoluteTimeBinding(a0.redirectEnd);
|
|
object['http.request.worker_start'] = getAbsoluteTimeBinding(a0.workerStart);
|
|
object['http.request.fetch_start'] = getAbsoluteTimeBinding(a0.fetchStart);
|
|
object['http.request.domain_lookup_start'] = getAbsoluteTimeBinding(a0.domainLookupStart);
|
|
object['http.request.domain_lookup_end'] = getAbsoluteTimeBinding(a0.domainLookupEnd);
|
|
object['http.request.connect_start'] = getAbsoluteTimeBinding(a0.connectStart);
|
|
object['http.request.secure_connection_start'] = getAbsoluteTimeBinding(a0.secureConnectionStart);
|
|
object['http.request.connection_end'] = getAbsoluteTimeBinding(a0.connectEnd);
|
|
object['http.request.request_start'] = getAbsoluteTimeBinding(a0.requestStart);
|
|
responseStart = a0.responseStart;
|
|
object['http.request.response_start'] = getAbsoluteTimeBinding(responseStart);
|
|
object['http.request.response_end'] = getAbsoluteTimeBinding(a0.responseEnd);
|
|
responseStart = a0.responseStart;
|
|
object['http.request.time_to_first_byte'] = responseStart != null ? a0.responseStart / 1000 : value2;
|
|
value = Reflect.apply(assign, Object, [{}, object2, object]);
|
|
value = ((a0) => {
|
|
var Object = global.Object;
|
|
var Object2 = global.Object;
|
|
return Object.fromEntries(Object2.entries(a0).filter(_fun11220));
|
|
})(value);
|
|
r0 = value;
|
|
} else {
|
|
r0 = object2;
|
|
}
|
|
}
|
|
return r0;
|
|
function dropUndefinedKeysFromObject(a0) { // fn#11219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1198:576, owner: resourceTimingToSpanAttributes.dropUndefinedKeysFromObject, offset: 0x00da53fc, size: 58 bytes, params: 2, frame: 13
|
|
const Object = global.Object;
|
|
const fromEntries = Object.fromEntries;
|
|
const Object2 = global.Object;
|
|
const value = Object2.entries(a0);
|
|
return Reflect.apply(fromEntries, Object, [value.filter(_fun11220)]);
|
|
function _fun11220(a0) { // fn#11220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1198:668, offset: 0x00da5436, size: 36 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__.__proto__;
|
|
return env2_2(a0, 2)[1] != null;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun11216, 1071, [57, 826, 1067]) /* metro module 1071, dependencies: [57, 826, 1067] */;
|