666 lines
33 KiB
React
666 lines
33 KiB
React
/* Metro module 1100; source: unknown; dependencies: [77, 826, 1098, 1036, 1041, 1080, 1101, 1103] */
|
|
function _fun12297(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#12297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:6, offset: 0x00dc5f5c, size: 282 bytes, params: 8, frame: 25
|
|
const env0_0 = require;
|
|
const closure = startBrowserTracingPageLoadSpan;
|
|
const closure2 = startBrowserTracingNavigationSpan;
|
|
const closure3 = getMetaContent;
|
|
const env0_2 = require(77) /* metro dependency 77 */;
|
|
let Object = global.Object;
|
|
const defineProperty = Object.defineProperty;
|
|
const Symbol = global.Symbol;
|
|
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
|
|
Object = global.Object;
|
|
const assign = Object.assign;
|
|
const TRACING_DEFAULTS = (require(826) /* metro dependency 826 */).TRACING_DEFAULTS;
|
|
const env0_3 = Reflect.apply(assign, Object, [{}, TRACING_DEFAULTS, {'instrumentNavigation': true,
|
|
'instrumentPageLoad': true, 'markBackgroundSpan': true, 'enableLongTask': true,
|
|
'enableLongAnimationFrame': true, 'enableInp': true, 'enableElementTiming': true, 'ignoreResourceSpans': null,
|
|
'ignorePerformanceApiSpans': null, 'detectRedirects': true, 'linkPreviousTrace': 'in-memory',
|
|
'consistentTraceSampling': false, 'enableReportPageLoaded': false, ignoreResourceSpans: [],
|
|
ignorePerformanceApiSpans: [], _experiments: {}},
|
|
(require(1098) /* metro dependency 1098 */).defaultRequestInstrumentationOptions]);
|
|
exports.BROWSER_TRACING_INTEGRATION_ID = 'BrowserTracing';
|
|
exports.browserTracingIntegration = browserTracingIntegration;
|
|
exports.getMetaContent = closure3;
|
|
exports.startBrowserTracingNavigationSpan = closure2;
|
|
exports.startBrowserTracingPageLoadSpan = closure;
|
|
}
|
|
|
|
function startBrowserTracingPageLoadSpan(a0, a1, a2) { // fn#12298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:540, offset: 0x00dc6076, size: 111 bytes, params: 4, frame: 16
|
|
a0.emit('startPageLoadSpan', a1, a2);
|
|
const currentScope = (require(826) /* metro dependency 826 */).getCurrentScope();
|
|
currentScope.setTransactionName(a1.name);
|
|
const activeIdleSpan = getActiveIdleSpan(a0);
|
|
if (activeIdleSpan) {
|
|
a0.emit('afterStartPageLoadSpan', activeIdleSpan);
|
|
}
|
|
return activeIdleSpan;
|
|
}
|
|
|
|
function startBrowserTracingNavigationSpan(a0, a1, a2) { // fn#12299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:747, offset: 0x00dc60e5, size: 227 bytes, params: 4, frame: 22
|
|
var setSDKProcessingMetadata;
|
|
var Object;
|
|
const {url, isRedirect} = a2 || ({});
|
|
const emit = a0.emit;
|
|
let object2 = {isRedirect: isRedirect};
|
|
Reflect.apply(emit, a0, ['beforeStartNavigationSpan', a1, object2]);
|
|
a0.emit('startNavigationSpan', a1, {isRedirect: isRedirect});
|
|
const currentScope = (require(826) /* metro dependency 826 */).getCurrentScope();
|
|
currentScope.setTransactionName(a1.name);
|
|
if (url && !isRedirect) {
|
|
setSDKProcessingMetadata = currentScope.setSDKProcessingMetadata;
|
|
object2 = {};
|
|
Object = global.Object;
|
|
object2.normalizedRequest = Object.assign({}, (require(1036) /* metro dependency 1036 */).getHttpRequestData(),
|
|
{url: url});
|
|
Reflect.apply(setSDKProcessingMetadata, currentScope, [object2]);
|
|
}
|
|
return getActiveIdleSpan(a0);
|
|
}
|
|
|
|
function getMetaContent(a0) { // fn#12300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:1131, offset: 0x00dc61c8, size: 122 bytes, params: 2, frame: 18
|
|
const value = undefined;
|
|
const WINDOW = (require(1036) /* metro dependency 1036 */).WINDOW;
|
|
const document = WINDOW.document;
|
|
const r4 = document == null ? value : document.querySelector('meta[name=' + a0 + ']');
|
|
let r0 = r4 == null ? value : r4.getAttribute('content');
|
|
r0 = !r0 ? value : r0;
|
|
return r0;
|
|
}
|
|
|
|
function getActiveIdleSpan(a0) { // fn#12301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:1322, offset: 0x00c8ba8f, size: 16 bytes, params: 2, frame: 2
|
|
return a0[env0_4];
|
|
}
|
|
|
|
function setActiveIdleSpan(a0, a1) { // fn#12302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:1364, offset: 0x00dc6242, size: 50 bytes, params: 3, frame: 16
|
|
(require(826) /* metro dependency 826 */).addNonEnumerableProperty(a0, env0_4, a1);
|
|
}
|
|
|
|
function browserTracingIntegration() { // fn#12303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:1509, offset: 0x00dc6274, size: 435 bytes, params: 1, frame: 17
|
|
const r5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
const WINDOW = (require(1036) /* metro dependency 1036 */).WINDOW;
|
|
const env0_4 = WINDOW.document;
|
|
const Object = global.Object;
|
|
const value = Object.assign({}, {name: undefined, source: undefined}, r5);
|
|
const env0_5 = value.enableInp;
|
|
const env0_6 = value.enableElementTiming;
|
|
const env0_7 = value.enableLongTask;
|
|
const env0_8 = value.enableLongAnimationFrame;
|
|
const _experiments = value._experiments;
|
|
const env0_9 = _experiments.enableInteractions;
|
|
const env0_10 = _experiments.enableStandaloneClsSpans;
|
|
const env0_11 = _experiments.enableStandaloneLcpSpans;
|
|
const env0_12 = value.beforeStartSpan;
|
|
const env0_13 = value.idleTimeout;
|
|
const env0_14 = value.finalTimeout;
|
|
const env0_15 = value.childSpanTimeout;
|
|
const env0_16 = value.markBackgroundSpan;
|
|
const env0_17 = value.traceFetch;
|
|
const env0_18 = value.traceXHR;
|
|
const env0_19 = value.trackFetchStreamPerformance;
|
|
const env0_20 = value.shouldCreateSpanForRequest;
|
|
const env0_21 = value.enableHTTPTimings;
|
|
const env0_22 = value.ignoreResourceSpans;
|
|
const env0_23 = value.ignorePerformanceApiSpans;
|
|
const env0_24 = value.instrumentPageLoad;
|
|
const env0_25 = value.instrumentNavigation;
|
|
const env0_26 = value.detectRedirects;
|
|
const env0_27 = value.linkPreviousTrace;
|
|
const env0_28 = value.consistentTraceSampling;
|
|
const env0_29 = value.enableReportPageLoaded;
|
|
const env0_30 = value.onRequestSpanStart;
|
|
const env0_31 = value.onRequestSpanEnd;
|
|
return {name: 'BrowserTracing', setup: setup_12308, afterAllSetup: afterAllSetup};
|
|
}
|
|
|
|
function _createRouteSpan(a0, a1) { // fn#12304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:2333, owner: browserTracingIntegration._createRouteSpan, offset: 0x00dc6427, size: 484 bytes, params: 3, frame: 25
|
|
var environment;
|
|
var r10;
|
|
var r4;
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = (require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE;
|
|
var moduleValue;
|
|
var startInactiveSpan;
|
|
var Object;
|
|
var binding;
|
|
var value9;
|
|
let value = a1;
|
|
const env0_0 = a0;
|
|
const closure = emitFinish;
|
|
const r6 = arguments.length > 2 && arguments[2] !== undefined;
|
|
const r5 = r6 ? arguments[2] : !r6;
|
|
const value6 = value.op === 'pageload';
|
|
const name = value.name;
|
|
if (beforeStartSpan) {
|
|
value = beforeStartSpan(value);
|
|
r10 = value;
|
|
} else {
|
|
r10 = value;
|
|
}
|
|
const r13 = r10.attributes || ({});
|
|
if (name !== r10.name) {
|
|
value = environment.__proto__;
|
|
r13[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'custom';
|
|
r10.attributes = r13;
|
|
}
|
|
if (r5) {
|
|
binding = env0_3;
|
|
binding.name = r10.name;
|
|
binding = env0_3;
|
|
value = environment.__proto__;
|
|
binding.source = r13[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];
|
|
value9 = (require(826) /* metro dependency 826 */).startIdleSpan(r10, {idleTimeout: idleTimeout,
|
|
finalTimeout: finalTimeout, childSpanTimeout: childSpanTimeout, disableAutoFinish: value6,
|
|
beforeSpanEnd: beforeSpanEnd, trimIdleSpanEndTimestamp: !enableReportPageLoaded});
|
|
if (value6 && enableReportPageLoaded) {
|
|
}
|
|
setActiveIdleSpan(a0, value9);
|
|
r4 = value6 && !enableReportPageLoaded;
|
|
r4 = r4 && document;
|
|
if (r4) {
|
|
document.addEventListener('readystatechange', function() {
|
|
emitFinish();
|
|
});
|
|
closure();
|
|
}
|
|
} else {
|
|
value = environment.__proto__;
|
|
value = require(826) /* metro dependency 826 */;
|
|
value = value.dateTimestampInSeconds();
|
|
moduleValue = require(826) /* metro dependency 826 */;
|
|
startInactiveSpan = moduleValue.startInactiveSpan;
|
|
Object = global.Object;
|
|
Reflect.apply(startInactiveSpan, moduleValue, [Object.assign({}, r10, {startTime: value})]).end(value);
|
|
}
|
|
}
|
|
|
|
function browserTracingIntegrationSetup(a0) { // fn#12308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:3600, owner: browserTracingIntegration.setup, offset: 0x00dc6772, size: 517 bytes, params: 2, frame: 22
|
|
var environment;
|
|
var supportedEntryTypes;
|
|
var closure;
|
|
var addEventListener;
|
|
let env0_0 = a0;
|
|
const value = environment.__proto__;
|
|
(require(826) /* metro dependency 826 */).registerSpanErrorInstrumentation();
|
|
const moduleValue2 = require(1041) /* metro dependency 1041 */;
|
|
env0_0 = moduleValue2.startTrackingWebVitals({recordClsStandaloneSpans: enableStandaloneClsSpans || false,
|
|
recordLcpStandaloneSpans: enableStandaloneLcpSpans || false, client: a0});
|
|
if (enableInp) {
|
|
moduleValue2.startTrackingINP();
|
|
}
|
|
if (enableElementTiming) {
|
|
moduleValue2.startTrackingElementTiming();
|
|
}
|
|
if (enableLongAnimationFrame) {
|
|
if ((require(826) /* metro dependency 826 */).GLOBAL_OBJ.PerformanceObserver) {
|
|
supportedEntryTypes = global.PerformanceObserver.supportedEntryTypes;
|
|
if (supportedEntryTypes) {
|
|
supportedEntryTypes = global.PerformanceObserver.supportedEntryTypes;
|
|
if (supportedEntryTypes.includes('long-animation-frame')) {
|
|
moduleValue2.startTrackingLongAnimationFrames();
|
|
} else if (enableLongTask) {
|
|
(require(1041) /* metro dependency 1041 */).startTrackingLongTasks();
|
|
}
|
|
} else if (enableLongTask) {
|
|
(require(1041) /* metro dependency 1041 */).startTrackingLongTasks();
|
|
}
|
|
} else if (enableLongTask) {
|
|
(require(1041) /* metro dependency 1041 */).startTrackingLongTasks();
|
|
}
|
|
} else if (enableLongTask) {
|
|
(require(1041) /* metro dependency 1041 */).startTrackingLongTasks();
|
|
}
|
|
if (enableInteractions) {
|
|
moduleValue2.startTrackingInteractions();
|
|
}
|
|
if (detectRedirects) {
|
|
if (document) {
|
|
closure = interactionHandler;
|
|
addEventListener = global.addEventListener;
|
|
addEventListener('click', closure, {capture: true});
|
|
addEventListener = global.addEventListener;
|
|
addEventListener('keydown', closure, {'capture': true, 'passive': true});
|
|
}
|
|
}
|
|
a0.on('startNavigationSpan', _fun12311);
|
|
a0.on('startPageLoadSpan', _fun12312);
|
|
a0.on('endPageloadSpan', _fun12313);
|
|
}
|
|
|
|
function browserTracingIntegrationAfterAllSetup(a0) { // fn#12314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:6201, owner: browserTracingIntegration.afterAllSetup, offset: 0x00dc6e7d, size: 598 bytes, params: 2, frame: 26
|
|
var environment;
|
|
var object2;
|
|
var value4;
|
|
var startBrowserTracingPageLoadSpanBinding;
|
|
var binding;
|
|
let env0_0 = a0;
|
|
let value = environment.__proto__;
|
|
const value2 = undefined;
|
|
let env0_1 = (require(826) /* metro dependency 826 */).getLocationHref();
|
|
if (linkPreviousTrace !== 'off') {
|
|
(require(1101) /* metro dependency 1101 */).linkTraces(a0, {linkPreviousTrace: linkPreviousTrace,
|
|
consistentTraceSampling: consistentTraceSampling});
|
|
}
|
|
const WINDOW = (require(1036) /* metro dependency 1036 */).WINDOW;
|
|
if (WINDOW.location) {
|
|
if (instrumentPageLoad) {
|
|
value4 = (require(826) /* metro dependency 826 */).browserPerformanceTimeOrigin();
|
|
startBrowserTracingPageLoadSpanBinding = startBrowserTracingPageLoadSpan;
|
|
object2 = {};
|
|
object2.name = WINDOW.location.pathname;
|
|
object2.startTime = value4 ? value4 / 1000 : value2;
|
|
binding = env1_2;
|
|
object2.attributes = binding(binding({},
|
|
(require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
|
|
'url'), (require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
|
|
'auto.pageload.browser');
|
|
startBrowserTracingPageLoadSpanBinding(a0, object2);
|
|
}
|
|
if (instrumentNavigation) {
|
|
(require(1041) /* metro dependency 1041 */).addHistoryInstrumentationHandler(_fun12315);
|
|
}
|
|
}
|
|
if (markBackgroundSpan) {
|
|
(require(1103) /* metro dependency 1103 */).registerBackgroundTabDetection();
|
|
}
|
|
if (enableInteractions) {
|
|
((a0, a1, a2, a3, a4) => {
|
|
var env0_0 = a0;
|
|
var env0_1 = a1;
|
|
var env0_2 = a2;
|
|
var env0_3 = a3;
|
|
var env0_4 = a4;
|
|
if ((require(1036) /* metro dependency 1036 */).WINDOW.document) {
|
|
global.addEventListener('click', _fun12317, {capture: true});
|
|
}
|
|
})(a0, idleTimeout, finalTimeout, childSpanTimeout, env0_3);
|
|
}
|
|
if (enableInp) {
|
|
(require(1041) /* metro dependency 1041 */).registerInpInteractionListener();
|
|
}
|
|
value = require(1098) /* metro dependency 1098 */;
|
|
const instrumentOutgoingRequests = value.instrumentOutgoingRequests;
|
|
const getOptions = a0.getOptions;
|
|
Reflect.apply(instrumentOutgoingRequests, value, [a0, {traceFetch: traceFetch, traceXHR: traceXHR,
|
|
trackFetchStreamPerformance: trackFetchStreamPerformance, tracePropagationTargets: Reflect.apply(getOptions, a0,
|
|
[]).tracePropagationTargets, shouldCreateSpanForRequest: shouldCreateSpanForRequest,
|
|
enableHTTPTimings: enableHTTPTimings, onRequestSpanStart: onRequestSpanStart,
|
|
onRequestSpanEnd: onRequestSpanEnd}]);
|
|
return value2;
|
|
}
|
|
|
|
function emitFinish() { // fn#12305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:3466, owner: browserTracingIntegration._createRouteSpan.emitFinish, offset: 0x00dc660b, size: 76 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
if (document && ['interactive', 'complete'].includes(document.readyState)) {
|
|
env0_0.emit('idleSpanEnableAutoFinish', env0_2);
|
|
}
|
|
}
|
|
|
|
function beforeSpanEnd(a0) { // fn#12306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:2756, owner: browserTracingIntegration._createRouteSpan.beforeSpanEnd, offset: 0x00dc6657, size: 283 bytes, params: 2, frame: 26
|
|
var object2;
|
|
if (env1_0 != null) {
|
|
env1_0();
|
|
}
|
|
(require(1041) /* metro dependency 1041 */).addPerformanceEntries(a0,
|
|
{recordClsOnPageloadSpan: !enableStandaloneClsSpans, recordLcpOnPageloadSpan: !enableStandaloneLcpSpans,
|
|
ignoreResourceSpans: ignoreResourceSpans, ignorePerformanceApiSpans: ignorePerformanceApiSpans});
|
|
setActiveIdleSpan(env0_0, undefined);
|
|
const currentScope = (require(826) /* metro dependency 826 */).getCurrentScope();
|
|
const propagationContext = currentScope.getPropagationContext();
|
|
const setPropagationContext = currentScope.setPropagationContext;
|
|
const Object = global.Object;
|
|
const assign = Object.assign;
|
|
object2 = {};
|
|
const binding = env0_2;
|
|
object2.traceId = binding.spanContext().traceId;
|
|
object2.sampled = (require(826) /* metro dependency 826 */).spanIsSampled(env0_2);
|
|
object2.dsc = (require(826) /* metro dependency 826 */).getDynamicSamplingContextFromSpan(a0);
|
|
Reflect.apply(setPropagationContext, currentScope, [Reflect.apply(assign, Object, [{}, propagationContext,
|
|
object2])]);
|
|
if (result) {
|
|
}
|
|
}
|
|
|
|
function maybeEndActiveSpan() { // fn#12309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:4285, owner: browserTracingIntegration.setup.maybeEndActiveSpan, offset: 0x00dc6977, size: 241 bytes, params: 1, frame: 17
|
|
var r3;
|
|
var moduleValue;
|
|
var debug;
|
|
var log;
|
|
var moduleValue2;
|
|
const activeIdleSpan = getActiveIdleSpan(env0_0);
|
|
if (activeIdleSpan) {
|
|
moduleValue = require(826) /* metro dependency 826 */;
|
|
r3 = !moduleValue.spanToJSON(activeIdleSpan).timestamp;
|
|
} else {
|
|
r3 = activeIdleSpan;
|
|
}
|
|
if (r3) {
|
|
if ((require(1080) /* metro dependency 1080 */).DEBUG_BUILD) {
|
|
debug = (require(826) /* metro dependency 826 */).debug;
|
|
log = debug.log;
|
|
moduleValue2 = require(826) /* metro dependency 826 */;
|
|
Reflect.apply(log, debug,
|
|
['[Tracing] Finishing current active span with op: ' + moduleValue2.spanToJSON(activeIdleSpan).op]);
|
|
}
|
|
activeIdleSpan.setAttribute((require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON,
|
|
|
|
'cancelled');
|
|
activeIdleSpan.end();
|
|
}
|
|
}
|
|
|
|
function interactionHandler() { // fn#12310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:4128, owner: browserTracingIntegration.setup.interactionHandler, offset: 0x00dc6a68, size: 44 bytes, params: 1, frame: 11
|
|
let value = environment.__proto__.__proto__;
|
|
value = require(826) /* metro dependency 826 */;
|
|
value = value.timestampInSeconds();
|
|
}
|
|
|
|
function _fun12311(a0, a1) { // fn#12311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:4622, offset: 0x00dc6a94, size: 565 bytes, params: 3, frame: 24
|
|
var r10;
|
|
var value5;
|
|
var isolationScope;
|
|
var setPropagationContext;
|
|
var object2;
|
|
var Math;
|
|
var moduleValue4;
|
|
var hasSpansEnabled;
|
|
var currentScope;
|
|
var moduleValue8;
|
|
var _createRouteSpanBinding;
|
|
var binding;
|
|
var Object;
|
|
let value = environment.__proto__.__proto__;
|
|
const value2 = undefined;
|
|
if ((require(826) /* metro dependency 826 */).getClient() === env0_0) {
|
|
if (a1 == null) {
|
|
value5 = environment.__proto__;
|
|
maybeEndActiveSpan();
|
|
isolationScope = (require(826) /* metro dependency 826 */).getIsolationScope();
|
|
setPropagationContext = isolationScope.setPropagationContext;
|
|
object2 = {};
|
|
object2.traceId = (require(826) /* metro dependency 826 */).generateTraceId();
|
|
Math = global.Math;
|
|
object2.sampleRand = Math.random();
|
|
moduleValue4 = require(826) /* metro dependency 826 */;
|
|
hasSpansEnabled = moduleValue4.hasSpansEnabled;
|
|
r10 = Reflect.apply(hasSpansEnabled, moduleValue4,
|
|
[]) ? value2 : (require(826) /* metro dependency 826 */).generateSpanId();
|
|
object2.propagationSpanId = r10;
|
|
Reflect.apply(setPropagationContext, isolationScope, [object2]);
|
|
currentScope = (require(826) /* metro dependency 826 */).getCurrentScope();
|
|
setPropagationContext = currentScope.setPropagationContext;
|
|
object2 = {};
|
|
object2.traceId = (require(826) /* metro dependency 826 */).generateTraceId();
|
|
Math = global.Math;
|
|
object2.sampleRand = Math.random();
|
|
moduleValue8 = require(826) /* metro dependency 826 */;
|
|
hasSpansEnabled = moduleValue8.hasSpansEnabled;
|
|
if (Reflect.apply(hasSpansEnabled, moduleValue8, [])) {
|
|
r10 = value2;
|
|
} else {
|
|
value = require(826) /* metro dependency 826 */;
|
|
value = value.generateSpanId();
|
|
r10 = value;
|
|
}
|
|
object2.propagationSpanId = r10;
|
|
Reflect.apply(setPropagationContext, currentScope, [object2]);
|
|
currentScope.setSDKProcessingMetadata({normalizedRequest: value2});
|
|
_createRouteSpanBinding = _createRouteSpan;
|
|
binding = env0_0;
|
|
Object = global.Object;
|
|
_createRouteSpanBinding(binding, Object.assign({op: 'navigation'}, a0, {'parentSpan': null,
|
|
'forceTransaction': true}));
|
|
return value2;
|
|
}
|
|
if (a1.isRedirect) {
|
|
if ((require(1080) /* metro dependency 1080 */).DEBUG_BUILD) {
|
|
(require(826) /* metro dependency 826 */).debug.warn('[Tracing] Detected redirect, navigation span will not be the root span, but a child span.');
|
|
}
|
|
value = environment.__proto__;
|
|
_createRouteSpanBinding = _createRouteSpan;
|
|
binding = env0_0;
|
|
value = global.Object.assign({op: 'navigation.redirect'}, a0);
|
|
_createRouteSpanBinding(binding, value, false);
|
|
return value2;
|
|
}
|
|
maybeEndActiveSpan();
|
|
isolationScope = (require(826) /* metro dependency 826 */).getIsolationScope();
|
|
setPropagationContext = isolationScope.setPropagationContext;
|
|
object2 = {};
|
|
object2.traceId = (require(826) /* metro dependency 826 */).generateTraceId();
|
|
Math = global.Math;
|
|
object2.sampleRand = Math.random();
|
|
moduleValue4 = require(826) /* metro dependency 826 */;
|
|
r10 = moduleValue4.hasSpansEnabled() ? value2 : (require(826) /* metro dependency 826 */).generateSpanId();
|
|
object2.propagationSpanId = r10;
|
|
Reflect.apply(setPropagationContext, isolationScope, [object2]);
|
|
currentScope = (require(826) /* metro dependency 826 */).getCurrentScope();
|
|
setPropagationContext = currentScope.setPropagationContext;
|
|
object2 = {};
|
|
object2.traceId = (require(826) /* metro dependency 826 */).generateTraceId();
|
|
Math = global.Math;
|
|
object2.sampleRand = Math.random();
|
|
moduleValue8 = require(826) /* metro dependency 826 */;
|
|
if (moduleValue8.hasSpansEnabled()) {
|
|
r10 = value2;
|
|
} else {
|
|
value = require(826) /* metro dependency 826 */;
|
|
value = value.generateSpanId();
|
|
r10 = value;
|
|
}
|
|
object2.propagationSpanId = r10;
|
|
Reflect.apply(setPropagationContext, currentScope, [object2]);
|
|
currentScope.setSDKProcessingMetadata({normalizedRequest: value2});
|
|
_createRouteSpanBinding = _createRouteSpan;
|
|
binding = env0_0;
|
|
Object = global.Object;
|
|
_createRouteSpanBinding(binding, Object.assign({op: 'navigation'}, a0, {'parentSpan': null,
|
|
'forceTransaction': true}));
|
|
}
|
|
return value2;
|
|
}
|
|
|
|
function _fun12312(a0) { // fn#12312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:5491, offset: 0x00dc6cc9, size: 351 bytes, params: 2, frame: 19
|
|
var object2;
|
|
var value6;
|
|
var currentScope;
|
|
var moduleValue4;
|
|
var setSDKProcessingMetadata;
|
|
var _createRouteSpanBinding;
|
|
var binding;
|
|
var Object;
|
|
const r2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
let value = environment.__proto__.__proto__;
|
|
if ((require(826) /* metro dependency 826 */).getClient() === env0_0) {
|
|
maybeEndActiveSpan();
|
|
value6 = (require(826) /* metro dependency 826 */).propagationContextFromHeaders(r2.sentryTrace || getMetaContent('sentry-trace'),
|
|
|
|
r2.baggage || getMetaContent('baggage'));
|
|
currentScope = (require(826) /* metro dependency 826 */).getCurrentScope();
|
|
currentScope.setPropagationContext(value6);
|
|
moduleValue4 = require(826) /* metro dependency 826 */;
|
|
if (!moduleValue4.hasSpansEnabled()) {
|
|
currentScope.getPropagationContext().propagationSpanId = (require(826) /* metro dependency 826 */).generateSpanId();
|
|
}
|
|
setSDKProcessingMetadata = currentScope.setSDKProcessingMetadata;
|
|
object2 = {};
|
|
value = require(1036) /* metro dependency 1036 */;
|
|
object2.normalizedRequest = value.getHttpRequestData();
|
|
Reflect.apply(setSDKProcessingMetadata, currentScope, [object2]);
|
|
value = environment.__proto__;
|
|
_createRouteSpanBinding = _createRouteSpan;
|
|
binding = env0_0;
|
|
Object = global.Object;
|
|
_createRouteSpanBinding(binding, Object.assign({op: 'pageload'}, a0));
|
|
}
|
|
}
|
|
|
|
function _fun12313() { // fn#12313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:6063, offset: 0x00dc6e28, size: 85 bytes, params: 1, frame: 15
|
|
var binding;
|
|
var setAttribute;
|
|
var value2;
|
|
if (enableReportPageLoaded && env1_2) {
|
|
binding = env1_2;
|
|
setAttribute = binding.setAttribute;
|
|
value2 = environment.__proto__.__proto__;
|
|
Reflect.apply(setAttribute, binding,
|
|
[(require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON,
|
|
'reportPageLoaded']);
|
|
binding = env1_2;
|
|
binding.end();
|
|
}
|
|
}
|
|
|
|
function _fun12315({to, from}) { // fn#12315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:6696, offset: 0x00dc70d3, size: 401 bytes, params: 2, frame: 24
|
|
var r5;
|
|
var pathname;
|
|
var binding;
|
|
var value5;
|
|
var stringToURLObject;
|
|
var activeIdleSpan;
|
|
var value8;
|
|
var value9;
|
|
var value10;
|
|
var startBrowserTracingNavigationSpanBinding;
|
|
var object2;
|
|
const WINDOW = (require(1036) /* metro dependency 1036 */).WINDOW;
|
|
var binding2;
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = (require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE;
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = (require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
|
|
if (from !== undefined) {
|
|
value5 = environment.__proto__.__proto__;
|
|
stringToURLObject = (require(826) /* metro dependency 826 */).parseStringToURLObject(to);
|
|
activeIdleSpan = getActiveIdleSpan(env0_0);
|
|
r5 = activeIdleSpan && detectRedirects;
|
|
if (r5) {
|
|
value8 = environment.__proto__;
|
|
binding = env1_1;
|
|
value9 = (require(826) /* metro dependency 826 */).spanToJSON(activeIdleSpan);
|
|
value10 = (require(826) /* metro dependency 826 */).dateTimestampInSeconds();
|
|
r5 = !(value10 - value9.start_timestamp > 1.5 || binding && value10 - binding <= 1.5) && true;
|
|
}
|
|
startBrowserTracingNavigationSpanBinding = startBrowserTracingNavigationSpan;
|
|
binding = env0_0;
|
|
object2 = {};
|
|
pathname = stringToURLObject?.pathname;
|
|
pathname = !pathname ? WINDOW.location.pathname : pathname;
|
|
object2.name = pathname;
|
|
binding2 = env2_2;
|
|
object2.attributes = binding2(binding2({}, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'url'),
|
|
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.navigation.browser');
|
|
startBrowserTracingNavigationSpanBinding(binding, object2, {url: to, isRedirect: r5});
|
|
} else {
|
|
binding = env0_1;
|
|
if (binding?.indexOf(to) === -1) {
|
|
value5 = environment.__proto__.__proto__;
|
|
stringToURLObject = (require(826) /* metro dependency 826 */).parseStringToURLObject(to);
|
|
activeIdleSpan = getActiveIdleSpan(env0_0);
|
|
r5 = activeIdleSpan && detectRedirects;
|
|
if (r5) {
|
|
value8 = environment.__proto__;
|
|
binding = env1_1;
|
|
value9 = (require(826) /* metro dependency 826 */).spanToJSON(activeIdleSpan);
|
|
value10 = (require(826) /* metro dependency 826 */).dateTimestampInSeconds();
|
|
r5 = !(value10 - value9.start_timestamp > 1.5 || binding && value10 - binding <= 1.5) && true;
|
|
}
|
|
startBrowserTracingNavigationSpanBinding = startBrowserTracingNavigationSpan;
|
|
binding = env0_0;
|
|
object2 = {};
|
|
pathname = stringToURLObject?.pathname;
|
|
pathname = !pathname ? WINDOW.location.pathname : pathname;
|
|
object2.name = pathname;
|
|
binding2 = env2_2;
|
|
object2.attributes = binding2(binding2({}, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'url'),
|
|
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.navigation.browser');
|
|
startBrowserTracingNavigationSpanBinding(binding, object2, {url: to, isRedirect: r5});
|
|
}
|
|
}
|
|
}
|
|
|
|
function registerInteractionListener(a0, a1, a2, a3, a4) { // fn#12316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:7349, owner: browserTracingIntegration.afterAllSetup.registerInteractionListener, offset: 0x00dc7264, size: 112 bytes, params: 6, frame: 15
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
const env0_3 = a3;
|
|
const env0_4 = a4;
|
|
const WINDOW = (require(1036) /* metro dependency 1036 */).WINDOW;
|
|
if (WINDOW.document) {
|
|
global.addEventListener('click', registerInteractionTransaction, {capture: true});
|
|
}
|
|
}
|
|
|
|
function registerInteractionTransaction() { // fn#12317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1227:7431, owner: browserTracingIntegration.afterAllSetup.registerInteractionListener.registerInteractionTransaction, offset: 0x00dc72d4, size: 512 bytes, params: 1, frame: 22
|
|
var source;
|
|
var moduleValue;
|
|
var op;
|
|
var object;
|
|
var binding;
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = (require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON;
|
|
const DEBUG_BUILD = (require(1080) /* metro dependency 1080 */).DEBUG_BUILD;
|
|
const debug = (require(826) /* metro dependency 826 */).debug;
|
|
var moduleValue2;
|
|
var startIdleSpan;
|
|
var binding2;
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = (require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE;
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
const activeIdleSpan = getActiveIdleSpan(env0_0);
|
|
if (activeIdleSpan) {
|
|
moduleValue = require(826) /* metro dependency 826 */;
|
|
op = moduleValue.spanToJSON(activeIdleSpan).op;
|
|
object = ['navigation', 'pageload'];
|
|
if (object.includes(op)) {
|
|
if (DEBUG_BUILD) {
|
|
debug.warn('[Tracing] Did not create ' + 'ui.action.click' + ' span because a pageload or navigation span is in progress.');
|
|
}
|
|
return undefined;
|
|
}
|
|
if (env0_5) {
|
|
binding = env0_5;
|
|
binding.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, 'interactionInterrupted');
|
|
binding = env0_5;
|
|
binding.end();
|
|
}
|
|
if (env0_4.name) {
|
|
moduleValue2 = require(826) /* metro dependency 826 */;
|
|
startIdleSpan = moduleValue2.startIdleSpan;
|
|
object = {};
|
|
binding = env0_4;
|
|
object.name = binding.name;
|
|
object.op = 'ui.action.click';
|
|
binding2 = env3_2;
|
|
source = binding.source;
|
|
source = !source ? 'url' : source;
|
|
object.attributes = binding2({}, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source);
|
|
env0_5 = Reflect.apply(startIdleSpan, moduleValue2, [object, {idleTimeout: require,
|
|
finalTimeout: importDefault,
|
|
childSpanTimeout: importAll}]);
|
|
} else if (DEBUG_BUILD) {
|
|
debug.warn('[Tracing] Did not create ' + 'ui.action.click' + ' transaction because _latestRouteName is missing.');
|
|
}
|
|
} else {
|
|
if (env0_5) {
|
|
binding = env0_5;
|
|
binding.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, 'interactionInterrupted');
|
|
binding = env0_5;
|
|
binding.end();
|
|
}
|
|
if (env0_4.name) {
|
|
moduleValue2 = require(826) /* metro dependency 826 */;
|
|
startIdleSpan = moduleValue2.startIdleSpan;
|
|
object = {};
|
|
binding = env0_4;
|
|
object.name = binding.name;
|
|
object.op = 'ui.action.click';
|
|
binding2 = env3_2;
|
|
source = binding.source;
|
|
source = !source ? 'url' : source;
|
|
object.attributes = binding2({}, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source);
|
|
env0_5 = Reflect.apply(startIdleSpan, moduleValue2, [object, {idleTimeout: require,
|
|
finalTimeout: importDefault,
|
|
childSpanTimeout: importAll}]);
|
|
} else if (DEBUG_BUILD) {
|
|
debug.warn('[Tracing] Did not create ' + 'ui.action.click' + ' transaction because _latestRouteName is missing.');
|
|
}
|
|
}
|
|
}
|
|
|