267 lines
13 KiB
JavaScript
267 lines
13 KiB
JavaScript
/* Metro module 1078; source: unknown; dependencies: [77, 1067, 826, 1042, 1047] */
|
|
import * as Module00077Module from './module-00077.js'; /* Metro dependency 77 */
|
|
import * as Module00826Module from './module-00826.js'; /* Metro dependency 826 */
|
|
import * as Module01042Module from './module-01042.js'; /* Metro dependency 1042 */
|
|
import * as Module01067Module from './module-01067.js'; /* Metro dependency 1067 */
|
|
|
|
function _fun11263(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#11263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1205:6, offset: 0x00da6dc8, size: 224 bytes, params: 8, frame: 20
|
|
let env0_0 = require;
|
|
const closure = function() {
|
|
return require(dependencyMap[3]).addInpInstrumentationHandler(_onInp);
|
|
};
|
|
const Object = global.Object;
|
|
const defineProperty = Object.defineProperty;
|
|
const Symbol = global.Symbol;
|
|
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
|
|
const env0_3 = [];
|
|
let Map = global.Map;
|
|
let map = new Map();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
const env0_6 = {'click': 'click', 'pointerdown': 'click', 'pointerup': 'click', 'mousedown': 'click',
|
|
'mouseup': 'click', 'touchstart': 'click', 'touchend': 'click', 'mouseover': 'hover', 'mouseout': 'hover',
|
|
'mouseenter': 'hover', 'mouseleave': 'hover', 'pointerover': 'hover', 'pointerout': 'hover',
|
|
'pointerenter': 'hover', 'pointerleave': 'hover', 'dragstart': 'drag', 'dragend': 'drag', 'drag': 'drag',
|
|
'dragenter': 'drag', 'dragleave': 'drag', 'dragover': 'drag', 'drop': 'drag', 'keydown': 'press',
|
|
'keyup': 'press', 'keypress': 'press', 'input': 'press'};
|
|
exports._onInp = _onInp;
|
|
exports._trackINP = closure;
|
|
exports.registerInpInteractionListener = registerInpInteractionListener;
|
|
exports.startTrackingINP = function() {
|
|
if (require(dependencyMap[1]).getBrowserPerformanceAPI()) {
|
|
if (require(dependencyMap[2]).browserPerformanceTimeOrigin()) {
|
|
var env0_0 = _trackINP();
|
|
return _fun11273;
|
|
}
|
|
}
|
|
return _fun11274;
|
|
};
|
|
function _onInp({metric}) { // fn#11265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1205:659, offset: 0x00da6ed2, size: 661 bytes, params: 2, frame: 28
|
|
var r9;
|
|
var r2;
|
|
var r13;
|
|
var elementName;
|
|
var r11;
|
|
var value2;
|
|
var moduleValue;
|
|
var value4;
|
|
var value5;
|
|
var interactionId;
|
|
var binding;
|
|
var property;
|
|
var moduleValue2;
|
|
var value7;
|
|
var activeSpan;
|
|
var moduleValue6;
|
|
var currentScope;
|
|
var moduleValue7;
|
|
var value15;
|
|
var moduleValue8;
|
|
var value16;
|
|
var addEvent;
|
|
let value = metric.value;
|
|
if (value != null) {
|
|
value2 = undefined;
|
|
moduleValue = require(1067) /* metro dependency 1067 */;
|
|
value4 = moduleValue.msToSec(metric.value);
|
|
if (!(value4 > 60)) {
|
|
value5 = metric.entries.find(_fun11266);
|
|
if (value5) {
|
|
interactionId = value5.interactionId;
|
|
binding = env0_6;
|
|
property = binding[value5.name];
|
|
moduleValue2 = require(1067) /* metro dependency 1067 */;
|
|
value7 = moduleValue2.msToSec((require(826) /* metro dependency 826 */).browserPerformanceTimeOrigin() + value5.startTime);
|
|
activeSpan = (require(826) /* metro dependency 826 */).getActiveSpan();
|
|
r9 = activeSpan ? (require(826) /* metro dependency 826 */).getRootSpan(activeSpan) : value2;
|
|
r2 = interactionId != null ? env0_4.get(interactionId) : value2;
|
|
r13 = (r2 == null ? value2 : r2.span) || r9;
|
|
moduleValue6 = require(826) /* metro dependency 826 */;
|
|
if (r13) {
|
|
r9 = moduleValue6.spanToJSON(r13).description;
|
|
} else {
|
|
currentScope = moduleValue6.getCurrentScope();
|
|
r9 = currentScope.getScopeData().transactionName;
|
|
}
|
|
elementName = r2 == null ? value2 : r2.elementName;
|
|
if (elementName) {
|
|
r11 = elementName;
|
|
} else {
|
|
moduleValue7 = require(826) /* metro dependency 826 */;
|
|
r11 = moduleValue7.htmlTreeAsString(value5.target);
|
|
}
|
|
binding = Module00077Module;
|
|
value15 = binding(binding(binding({},
|
|
(require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
|
|
'auto.http.browser.inp'), (require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_OP,
|
|
'ui.interaction.' + property),
|
|
(require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME,
|
|
value5.duration);
|
|
moduleValue8 = require(1067) /* metro dependency 1067 */;
|
|
value16 = moduleValue8.startStandaloneWebVitalSpan({name: r11, transaction: r9, attributes: value15,
|
|
startTime: value7});
|
|
if (value16) {
|
|
addEvent = value16.addEvent;
|
|
binding = Module00077Module;
|
|
value = binding({},
|
|
(require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT,
|
|
'millisecond');
|
|
value = binding(value,
|
|
(require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE,
|
|
metric.value);
|
|
Reflect.apply(addEvent, value16, ['inp', value]);
|
|
value16.end(value7 + value4);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function _fun11266(a0) { // fn#11266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1205:776, offset: 0x00da7167, size: 45 bytes, params: 2, frame: 3
|
|
const duration = a0.duration;
|
|
let value = metric.value;
|
|
value = duration === value;
|
|
return value && env1_6[a0.name];
|
|
}
|
|
|
|
}
|
|
|
|
function registerInpInteractionListener() { // fn#11267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1205:1735, offset: 0x00da7194, size: 156 bytes, params: 1, frame: 17
|
|
const Object = global.Object;
|
|
const value2 = Object.keys(env0_6);
|
|
if (Module00826Module.isBrowser()) {
|
|
value2.forEach(function(a0) {
|
|
var WINDOW = require(dependencyMap[4]).WINDOW;
|
|
WINDOW.addEventListener(a0, captureElementFromEvent, {'capture': true, 'passive': true});
|
|
});
|
|
}
|
|
const registerInpInteractionListenerHandleEntries2 = registerInpInteractionListenerHandleEntries;
|
|
(Module01042Module).addPerformanceInstrumentationHandler('event',
|
|
registerInpInteractionListenerHandleEntries2);
|
|
(Module01042Module).addPerformanceInstrumentationHandler('first-input',
|
|
registerInpInteractionListenerHandleEntries2);
|
|
function captureElementFromEvent(a0) { // fn#11268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1205:1798, owner: registerInpInteractionListener.captureElementFromEvent, offset: 0x00da7230, size: 151 bytes, params: 2, frame: 15
|
|
var value;
|
|
var value2;
|
|
var Math;
|
|
var value3;
|
|
var binding;
|
|
var value4;
|
|
var value5;
|
|
const target = a0.target;
|
|
if (target) {
|
|
value = environment.__proto__;
|
|
value2 = (require(826) /* metro dependency 826 */).htmlTreeAsString(target);
|
|
Math = global.Math;
|
|
value3 = Math.round(a0.timeStamp);
|
|
binding = env1_5;
|
|
binding.set(value3, value2);
|
|
if (binding.size > 50) {
|
|
value4 = env1_5.keys();
|
|
value5 = value4.next().value;
|
|
if (value5 !== undefined) {
|
|
env1_5.delete(value5);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function registerInpInteractionListenerHandleEntries({entries}) { // fn#11270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1205:2130, owner: registerInpInteractionListener.handleEntries, offset: 0x00da7309, size: 101 bytes, params: 2, frame: 16
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
const activeSpan = (require(826) /* metro dependency 826 */).getActiveSpan();
|
|
if (activeSpan) {
|
|
value = require(826) /* metro dependency 826 */;
|
|
value = value.getRootSpan(activeSpan);
|
|
}
|
|
entries.forEach(_fun11271);
|
|
function _fun11271(a0) { // fn#11271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1205:2237, offset: 0x00da736e, size: 315 bytes, params: 2, frame: 21
|
|
var r6;
|
|
var r5;
|
|
var interactionId;
|
|
var binding;
|
|
var Math;
|
|
var value2;
|
|
var value3;
|
|
var value5;
|
|
var value6;
|
|
var moduleValue2;
|
|
var value9;
|
|
if (Module01042Module.isPerformanceEventTiming(a0)) {
|
|
interactionId = a0.interactionId;
|
|
if (interactionId != null) {
|
|
binding = env2_4;
|
|
if (!binding.has(interactionId)) {
|
|
if (a0.target) {
|
|
moduleValue2 = require(826) /* metro dependency 826 */;
|
|
r5 = moduleValue2.htmlTreeAsString(a0.target);
|
|
} else {
|
|
Math = global.Math;
|
|
value2 = Math.round(a0.startTime);
|
|
binding = env2_5;
|
|
value3 = binding.get(value2);
|
|
if (value3) {
|
|
r5 = value3;
|
|
} else {
|
|
r6 = -5;
|
|
while (true) {
|
|
binding = env2_5;
|
|
value5 = binding.get(value2 + r6);
|
|
if (value5) {
|
|
r5 = value5;
|
|
break;
|
|
}
|
|
value6 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
|
|
if (value6 <= 5) {
|
|
r6 = value6;
|
|
continue;
|
|
}
|
|
r5 = value3;
|
|
break;
|
|
}
|
|
}
|
|
r5 = !r5 ? '<unknown>' : r5;
|
|
}
|
|
if (env2_3.length > 10) {
|
|
binding = env2_3;
|
|
value9 = binding.shift();
|
|
binding = env2_4;
|
|
binding.delete(value9);
|
|
}
|
|
binding = env2_3;
|
|
binding.push(interactionId);
|
|
binding = env2_4;
|
|
binding.set(interactionId, {span: env0_0, elementName: r5});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function startTrackingINP() { // fn#11272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1205:2784, offset: 0x00da74a9, size: 99 bytes, params: 1, frame: 14
|
|
var moduleValue2;
|
|
const getBrowserPerformanceAPI = Module01067Module.getBrowserPerformanceAPI;
|
|
if (Reflect.apply(getBrowserPerformanceAPI, Module01067Module, [])) {
|
|
moduleValue2 = require(826) /* metro dependency 826 */;
|
|
if (moduleValue2.browserPerformanceTimeOrigin()) {
|
|
var env0_0 = _trackINP();
|
|
return _fun11273;
|
|
}
|
|
}
|
|
return function() {
|
|
};
|
|
function _fun11273() { // fn#11273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1205:2916, offset: 0x00da750c, size: 15 bytes, params: 1, frame: 9
|
|
env0_0();
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _fun11274() { // fn#11274, offset: 0x00c37b63, size: 4 bytes, params: 1, frame: 1
|
|
}
|
|
|
|
global.__d(_fun11263, 1078, [77, 1067, 826, 1042,
|
|
1047]) /* metro module 1078, dependencies: [77, 1067, 826, 1042, 1047] */;
|