/* Metro module 166; source: unknown; dependencies: [154, 167, 160, 168, 155] */ import * as PerformanceEntryModule from './module-00155-PerformanceEntry.js'; /* Metro dependency 155 */ function _fun2479(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#2479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:191:6, offset: 0x00c81b33, size: 112 bytes, params: 8, frame: 17 const env0_0 = require; const rawToPerformanceEntryType2 = rawToPerformanceEntryType; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); exports.RawPerformanceEntryTypeValues = {'MARK': 1, 'MEASURE': 2, 'EVENT': 3, 'LONGTASK': 4, 'RESOURCE': 5}; exports.rawToPerformanceEntry = rawToPerformanceEntry; exports.rawToPerformanceEntryType = rawToPerformanceEntryType2; exports.performanceEntryTypeToRaw = performanceEntryTypeToRaw; function rawToPerformanceEntryType(a0) { // fn#2480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:191:147, offset: 0x00c81ba3, size: 163 bytes, params: 2, frame: 12 const MARK = env0_2.MARK; if (MARK === a0) { return 'mark'; } const MEASURE = env0_2.MEASURE; if (MEASURE === a0) { return 'measure'; } const EVENT = env0_2.EVENT; if (EVENT === a0) { return 'event'; } const LONGTASK = env0_2.LONGTASK; if (LONGTASK === a0) { return 'longtask'; } const RESOURCE = env0_2.RESOURCE; if (RESOURCE === a0) { return 'resource'; } const TypeError = global.TypeError; const value = 'rawToPerformanceEntryType: unexpected performance entry type received: ' + a0; const value2 = Object.create(TypeError.prototype, {constructor: {value: TypeError}}); const typeError = new TypeError(); throw typeError instanceof Object ? typeError : value2; } function rawToPerformanceEntry(a0) { // fn#2481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:191:510, offset: 0x00c81c46, size: 804 bytes, params: 2, frame: 18 var r5; var object; var name; var PerformanceResourceTiming; var fetchStart; var performanceResourceTiming; var PerformanceMeasure; var performanceMeasure; var PerformanceMark; var performanceMark; var PerformanceLongTaskTiming; var performanceLongTaskTiming; var PerformanceEventTiming; var performanceEventTiming; const entryType = a0.entryType; var value; const EVENT = env0_2.EVENT; if (EVENT === entryType) { PerformanceEventTiming = (require(154) /* metro dependency 154 */).PerformanceEventTiming; object = {}; object.name = a0.name; object.startTime = a0.startTime; object.duration = a0.duration; object.processingStart = a0.processingStart; object.processingEnd = a0.processingEnd; object.interactionId = a0.interactionId; value = Object.create(PerformanceEventTiming.prototype, {constructor: {value: PerformanceEventTiming}}); performanceEventTiming = new PerformanceEventTiming(); return performanceEventTiming instanceof Object ? performanceEventTiming : value; } const LONGTASK = env0_2.LONGTASK; if (LONGTASK === entryType) { PerformanceLongTaskTiming = (require(167) /* metro dependency 167 */).PerformanceLongTaskTiming; object = {}; object.name = a0.name; object.entryType = rawToPerformanceEntryType(a0.entryType); object.startTime = a0.startTime; object.duration = a0.duration; value = Object.create(PerformanceLongTaskTiming.prototype, {constructor: {value: PerformanceLongTaskTiming}}); performanceLongTaskTiming = new PerformanceLongTaskTiming(); return performanceLongTaskTiming instanceof Object ? performanceLongTaskTiming : value; } const MARK = env0_2.MARK; if (MARK === entryType) { PerformanceMark = (require(160) /* metro dependency 160 */).PerformanceMark; name = a0.name; ({}).startTime = a0.startTime; value = Object.create(PerformanceMark.prototype, {constructor: {value: PerformanceMark}}); performanceMark = new PerformanceMark(); return performanceMark instanceof Object ? performanceMark : value; } const MEASURE = env0_2.MEASURE; if (MEASURE === entryType) { PerformanceMeasure = (require(160) /* metro dependency 160 */).PerformanceMeasure; name = a0.name; object = {}; object.startTime = a0.startTime; object.duration = a0.duration; value = Object.create(PerformanceMeasure.prototype, {constructor: {value: PerformanceMeasure}}); performanceMeasure = new PerformanceMeasure(); return performanceMeasure instanceof Object ? performanceMeasure : value; } const RESOURCE = env0_2.RESOURCE; if (RESOURCE === entryType) { PerformanceResourceTiming = (require(168) /* metro dependency 168 */).PerformanceResourceTiming; object = {}; object.name = a0.name; object.startTime = a0.startTime; object.duration = a0.duration; fetchStart = a0.fetchStart; value = 0; r5 = fetchStart ?? value; object.fetchStart = r5; r5 = a0.requestStart ?? value; object.requestStart = r5; r5 = a0.connectStart ?? value; object.connectStart = r5; r5 = a0.connectEnd ?? value; object.connectEnd = r5; r5 = a0.responseStart ?? value; object.responseStart = r5; object.responseEnd = a0.responseEnd ?? value; object.responseStatus = a0.responseStatus; value = Object.create(PerformanceResourceTiming.prototype, {constructor: {value: PerformanceResourceTiming}}); performanceResourceTiming = new PerformanceResourceTiming(); return performanceResourceTiming instanceof Object ? performanceResourceTiming : value; } const PerformanceEntry = (PerformanceEntryModule).PerformanceEntry; object = {}; object.name = a0.name; object.entryType = rawToPerformanceEntryType(a0.entryType); object.startTime = a0.startTime; object.duration = a0.duration; value = Object.create(PerformanceEntry.prototype, {constructor: {value: PerformanceEntry}}); const performanceEntry = new PerformanceEntry(); return performanceEntry instanceof Object ? performanceEntry : value; } function performanceEntryTypeToRaw(a0) { // fn#2482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:191:1771, offset: 0x00c81f6a, size: 178 bytes, params: 2, frame: 12 if (a0 === 'mark') { return env0_2.MARK; } if (a0 === 'measure') { return env0_2.MEASURE; } if (a0 === 'event') { return env0_2.EVENT; } if (a0 === 'longtask') { return env0_2.LONGTASK; } if (a0 === 'resource') { return env0_2.RESOURCE; } const TypeError = global.TypeError; const value = 'performanceEntryTypeToRaw: unexpected performance entry type received: ' + a0; const value2 = Object.create(TypeError.prototype, {constructor: {value: TypeError}}); const typeError = new TypeError(); throw typeError instanceof Object ? typeError : value2; } } global.__d(_fun2479, 166, [154, 167, 160, 168, 155]) /* metro module 166, dependencies: [154, 167, 160, 168, 155] */;