/* Metro module 7382; source: unknown; dependencies: [57, 7376, 7368, 7369] */ import * as Module00057Module from './module-00057.js'; /* Metro dependency 57 */ function _fun59463(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:6, offset: 0x016eaf63, size: 174 bytes, params: 8, frame: 18 const env0_0 = require; const parseBaggageHeader_594642 = parseBaggageHeader_59464; const baggageHeaderToObject_59467 = function(a0) { var value = a0.split(','); value = value.map(_fun59468); return value.reduce(_fun59470, {}); }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const regexp = RegExp('^sentry-', ''); exports.BAGGAGE_HEADER_NAME = 'baggage'; exports.MAX_BAGGAGE_STRING_LENGTH = 8192; exports.SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-'; exports.SENTRY_BAGGAGE_KEY_PREFIX_REGEX = regexp; exports.baggageHeaderToDynamicSamplingContext = baggageHeaderToDynamicSamplingContext_59471; exports.dynamicSamplingContextToSentryBaggageHeader = function(a0) { var value; if (a0) { value = global.Object.entries(a0); value = value.reduce(_fun59476, {}); return _fun59474(value); } }; exports.parseBaggageHeader = parseBaggageHeader_594642; function parseBaggageHeader_59464(a0) { // fn#59464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:129, offset: 0x016eb011, size: 125 bytes, params: 2, frame: 14 var moduleValue; var Array; if (a0) { moduleValue = require(7376) /* metro dependency 7376 */; if (moduleValue.isString(a0)) { Array = global.Array; return Array.isArray(a0) ? a0.reduce(_fun59465, {}) : baggageHeaderToObject_59467(a0); } Array = global.Array; if (Array.isArray(a0)) { Array = global.Array; return Array.isArray(a0) ? a0.reduce(_fun59465, {}) : baggageHeaderToObject_59467(a0); } } function _fun59465(a0, a1) { // fn#59465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:240, offset: 0x016eb08e, size: 62 bytes, params: 3, frame: 13 var environment; const env0_0 = a0; let value = environment.__proto__; value = baggageHeaderToObject_59467(a1); const Object = global.Object; value = Object.entries(value); value.forEach(_fun59466); return a0; function _fun59466(a0) { // fn#59466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:319, offset: 0x00d5e363, size: 47 bytes, params: 2, frame: 13 let value = environment.__proto__.__proto__; value = env2_2(a0, 2); env0_0[value[0]] = value[1]; } } } function baggageHeaderToObject_59467(a0) { // fn#59467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:401, offset: 0x016eb0cc, size: 55 bytes, params: 2, frame: 13 let value = a0.split(','); value = value.map(function(a0) { return a0.split('=').map(_fun59469); }); return value.reduce(_fun59470, {}); function _fun59468(a0) { // fn#59468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:460, offset: 0x016eb103, size: 36 bytes, params: 2, frame: 11 return a0.split('=').map(function(a0) { return global.decodeURIComponent(a0.trim()); }); } function _fun59470(a0, a1) { // fn#59470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:559, offset: 0x00d5e44f, size: 55 bytes, params: 3, frame: 14 let value = environment.__proto__; value = env1_2(a1, 2); const property = value[0]; const property2 = value[1]; if (property && property2) { a0[property] = property2; } return a0; } } function baggageHeaderToDynamicSamplingContext_59471(a0) { // fn#59471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:798, offset: 0x016eb145, size: 99 bytes, params: 2, frame: 15 var Object; var value3; const parseBaggageHeader_59464Binding = parseBaggageHeader_59464; const value = undefined; const baggageHeader_59464 = parseBaggageHeader_59464Binding(a0); if (baggageHeader_59464) { Object = global.Object; value3 = Object.entries(baggageHeader_59464).reduce(_fun59472, {}); Object = global.Object; return Object.keys(value3).length > 0 ? value3 : value; } return value; function _fun59472(a0, a1) { // fn#59472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:914, offset: 0x00d5e62a, size: 74 bytes, params: 3, frame: 15 const value2 = env1_2(a1, 2); const property = value2[0]; if (property.match(env1_3)) { a0[property.slice(7)] = value2[1]; } return a0; } } function dynamicSamplingContextToSentryBaggageHeader_59473(a0) { // fn#59473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:1088, offset: 0x016eb1a8, size: 64 bytes, params: 2, frame: 14 var value; if (a0) { value = global.Object.entries(a0); value = value.reduce(_fun59476, {}); return ((a0) => { var property = global.Object; property = property.keys(a0).length; if (property === 0) { return undefined; } return global.Object.entries(a0).reduce(_fun59475, ''); })(value); } function dynamicSamplingContextToSentryBaggageHeader_59473ObjectToBaggageHeader(a0) { // fn#59474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:1156, owner: dynamicSamplingContextToSentryBaggageHeader_59473.objectToBaggageHeader, offset: 0x016eb1e8, size: 78 bytes, params: 2, frame: 13 let Object = global.Object; if (Object.keys(a0).length === 0) { return undefined; } Object = global.Object; return Object.entries(a0).reduce(_fun59475, ''); function _fun59475(a0, a1, a2) { // fn#59475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:1259, offset: 0x016eb236, size: 243 bytes, params: 4, frame: 24 const value = a0; const value3 = env2_2(a1, 2); const property = value3[0]; const property2 = value3[1]; const value6 = '' + global.encodeURIComponent(property) + '=' + global.encodeURIComponent(property2); let r0 = a2 === 0 ? value6 : '' + value + ',' + value6; if (r0.length > 8192) { if ((require(7368) /* metro dependency 7368 */).DEBUG_BUILD) { (require(7369) /* metro dependency 7369 */).logger.warn('Not adding key: ' + property + ' with val: ' + property2 + ' to baggage header due to exceeding baggage size limits.'); r0 = value; } else { r0 = value; } } return r0; } } function _fun59476(a0, a1) { // fn#59476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:1571, offset: 0x00d5e6b6, size: 75 bytes, params: 3, frame: 15 let value = environment.__proto__; value = env1_2(a1, 2); const property = value[0]; const property2 = value[1]; if (property2) { a0['' + 'sentry-' + property] = property2; } return a0; } } } function _fun59469(a0) { // fn#59469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7560:497, offset: 0x016eb127, size: 30 bytes, params: 2, frame: 11 return global.decodeURIComponent(a0.trim()); } global.__d(_fun59463, 7382, [57, 7376, 7368, 7369]) /* metro module 7382, dependencies: [57, 7376, 7368, 7369] */;