/* Metro module 1102; source: unknown; dependencies: [1080, 826, 1041] */ import * as Module00826Module from './module-00826.js'; /* Metro dependency 826 */ import * as Module01041Module from './module-01041.js'; /* Metro dependency 1041 */ function _fun12326(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#12326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1229:6, offset: 0x00dc7be8, size: 130 bytes, params: 8, frame: 20 let env0_0 = require; const closure = function(a0) { var r1; var Boolean = global.Boolean; r1 = a0.type === 'transaction' && a0.spans && a0.contexts?.trace; r1 = r1 && a0.contexts.trace.op === 'ui.action.click' && a0.spans.some(_fun12328); return Boolean(r1); }; const Object = global.Object; const defineProperty = Object.defineProperty; const Symbol = global.Symbol; Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]); let value = Module00826Module; value = value.defineIntegration(function() { var env0_0 = (arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}).sidecarUrl || 'http://localhost:8969/stream'; return {name: 'SpotlightBrowser', setup: _fun12330, processEvent: _fun12331, afterAllSetup: _fun12332}; }); exports.INTEGRATION_NAME = 'SpotlightBrowser'; exports.isSpotlightInteraction = closure; exports.spotlightBrowserIntegration = value; function isSpotlightInteraction(a0) { // fn#12327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1229:1079, offset: 0x00dc7c6a, size: 128 bytes, params: 2, frame: 14 const Boolean = global.Boolean; let r1 = a0.type === 'transaction' && a0.spans && a0.contexts?.trace; r1 = r1 && a0.contexts.trace.op === 'ui.action.click' && a0.spans.some(function({description}) { return description?.includes('#sentry-spotlight'); }); return Boolean(r1); } function _spotlightIntegration() { // fn#12329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1229:149, offset: 0x00dc7d0f, size: 94 bytes, params: 1, frame: 5 if ((arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}).sidecarUrl) { } return {name: 'SpotlightBrowser', setup: setup_12330, processEvent: function(a0) { var value = a0; return isSpotlightInteraction(value) ? null : value; }, afterAllSetup: function(a0) { _fun12333(a0, sidecarUrl); }}; function _spotlightIntegrationSetup() { // fn#12330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1229:311, owner: _spotlightIntegration.setup, offset: 0x00dc7d6d, size: 86 bytes, params: 1, frame: 14 var debug; if ((require(1080) /* metro dependency 1080 */).DEBUG_BUILD) { debug = (require(826) /* metro dependency 826 */).debug; debug.log('Using Sidecar URL', sidecarUrl); } } function _spotlightIntegrationProcessEvent(a0) { // fn#12331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1229:404, owner: _spotlightIntegration.processEvent, offset: 0x00dc7dc3, size: 27 bytes, params: 2, frame: 11 const value = a0; return isSpotlightInteraction(value) ? null : value; } function _spotlightIntegrationAfterAllSetup(a0) { // fn#12332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1229:484, owner: _spotlightIntegration.afterAllSetup, offset: 0x00dc7dde, size: 27 bytes, params: 2, frame: 13 setupSidecarForwarding(a0, sidecarUrl); function setupSidecarForwarding(a0, a1) { // fn#12333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1229:511, owner: _spotlightIntegration.afterAllSetup.setupSidecarForwarding, offset: 0x00dc7df9, size: 87 bytes, params: 3, frame: 15 var environment; const env0_0 = a1; const value = environment.__proto__.__proto__; const env0_1 = (Module01041Module).getNativeImplementation('fetch'); a0.on('beforeEnvelope', _fun12334); function _fun12334(a0) { // fn#12334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1229:622, offset: 0x00dc7e50, size: 196 bytes, params: 2, frame: 18 var environment; var binding; var object; var value2; var value; if (env0_2 > 3) { value2 = environment.__proto__.__proto__.__proto__; (require(826) /* metro dependency 826 */).debug.warn('[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:', env0_2); } else { binding = env0_1; object = {method: 'POST'}; value = environment.__proto__.__proto__.__proto__; value = require(826) /* metro dependency 826 */; object.body = value.serializeEnvelope(a0); object.headers = {['Content-Type']: 'application/x-sentry-envelope'}; object.mode = 'cors'; value = binding(require, object); value.then(_fun12335, _fun12336); } function _fun12335(a0) { // fn#12335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1229:878, offset: 0x00dc7f14, size: 49 bytes, params: 2, frame: 3 let value = a0.status >= 200; if (value && a0.status < 400) { value = environment.__proto__; } } function _fun12336(a0) { // fn#12336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1229:928, offset: 0x00dc7f45, size: 67 bytes, params: 2, frame: 14 const binding = env1_2; env1_2 = typeof binding === 'bigint' ? binding + 1n : +binding + 1; (Module00826Module).debug.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/", a0); } } } } } } function _fun12328({description}) { // fn#12328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1229:1262, offset: 0x00dc7cea, size: 37 bytes, params: 2, frame: 12 return description?.includes('#sentry-spotlight'); } global.__d(_fun12326, 1102, [1080, 826, 1041]) /* metro module 1102, dependencies: [1080, 826, 1041] */;