Files
discord-decomp/sources/by-id/module-00905.jsx
T
2026-07-27 16:20:00 +03:00

183 lines
7.5 KiB
React

/* Metro module 905; source: unknown; dependencies: [65, 57, 5, 872, 846, 883] */
function _fun9740(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#9740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1032:6, offset: 0x00d70e14, size: 150 bytes, params: 8, frame: 19
let env0_0 = require;
const closure = eventFromEnvelope;
const env0_2 = require(65) /* metro dependency 65 */;
const env0_3 = require(57) /* metro dependency 57 */;
const env0_4 = require(5) /* metro dependency 5 */;
const Object = global.Object;
const defineProperty = Object.defineProperty;
const Symbol = global.Symbol;
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
exports.MULTIPLEXED_TRANSPORT_EXTRA_KEY = 'MULTIPLEXED_TRANSPORT_EXTRA_KEY';
exports.eventFromEnvelope = closure;
exports.makeMultiplexedTransport = function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
return _fun9744;
};
}
function eventFromEnvelope(a0, a1) { // fn#9741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1032:169, offset: 0x00d70eaa, size: 60 bytes, params: 3, frame: 14
const env0_0 = a1;
(require(872) /* metro dependency 872 */).forEachEnvelopeItem(a0, _fun9742);
return env0_1;
}
function makeMultiplexedTransport(a0, a1) { // fn#9743, offset: 0x00d70f2e, size: 23 bytes, params: 3, frame: 2
const env0_0 = a0;
const env0_1 = a1;
return _fun9744;
}
function _fun9744(a0) { // fn#9744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1032:471, offset: 0x00d70f45, size: 126 bytes, params: 2, frame: 13
const env0_1 = a0(a0);
const Map = global.Map;
const map = new Map();
const env0_3 = require || (function(a0) {
var value = a0.getEvent();
return value == null || value.extra == null ? [] : value.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY && global.Array.isArray(value.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY) ? value.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY : [];
});
return {send: function(a0) {
return _send2.apply(this, arguments);
}, flush: function(a0) {
return _flush_9758.apply(this, arguments);
}};
}
function getTransport(a0, a1) { // fn#9745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1032:624, offset: 0x00d70fc3, size: 281 bytes, params: 3, frame: 24
var environment;
var r0;
var moduleValue2;
var value7;
var value8;
var Object;
var assign;
var value10;
const value = a0;
let r1 = a1 ? '' + value + ':' + a1 : value;
let binding = env0_2;
const value4 = binding.get(r1);
if (value4) {
return [value, value4];
}
const value6 = (require(846) /* metro dependency 846 */).dsnFromString(value);
if (value6) {
moduleValue2 = require(883) /* metro dependency 883 */;
value7 = moduleValue2.getEnvelopeEndpointWithUrlEncodedAuth(value6, env0_0.tunnel);
value8 = environment.__proto__;
binding = env1_0;
if (a1) {
value10 = ((a0, a1) => {
var env0_0 = a0;
var env0_1 = a1;
return _fun9747;
})(binding, a1);
Object = global.Object;
assign = Object.assign;
binding = env0_0;
r0 = value10(Reflect.apply(assign, Object, [{}, binding, {url: value7}]));
} else {
Object = global.Object;
r0 = binding(Object.assign({}, env0_0, {url: value7}));
}
binding = env0_2;
binding.set(r1, r0);
r1 = r0;
return [value, r1];
}
}
function _send2() { // fn#9751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1032:1186, offset: 0x00d711b4, size: 50 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_4(_fun9753).apply(this, arguments);
}
function _flush_9758() { // fn#9758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1032:1729, offset: 0x00d713a0, size: 50 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_4(_fun9760).apply(this, arguments);
}
function getTransportMakeOverrideReleaseTransport(a0, a1) { // fn#9746, owner: getTransport.makeOverrideReleaseTransport, offset: 0x00d710dc, size: 23 bytes, params: 3, frame: 2
const env0_0 = a0;
const env0_1 = a1;
return _fun9747;
}
function* _fun9753(a0) { // fn#9753, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1032:1221, offset: 0x00d711ef, size: 179 bytes, params: 2, frame: 14
var environment;
if (false) {
return undefined;
}
const env0_0 = a0;
value = environment.__proto__.__proto__;
const value3 = env2_3({envelope: a0, getEvent: getEvent});
const value5 = value3.map(_fun9755).filter(function(a0) {
return !!a0;
});
const r5 = value5.length ? value5 : [['', require]];
const Promise = global.Promise;
yield Promise.all(r5.map(_fun9757));
value = undefined;
if (false) {
return value;
}
return value[0];
}
function* _fun9760(a0) { // fn#9760, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1032:1764, offset: 0x00d713db, size: 145 bytes, params: 2, frame: 17
var environment;
if (false) {
return undefined;
}
const env0_0 = a0;
const items2 = [];
const concat = items2.concat;
value = environment.__proto__.__proto__.__proto__.__proto__;
const binding = env4_2;
value = environment.__proto__.__proto__;
value = Reflect.apply(concat, items2, [binding(env2_2.values()), [require]]);
const Promise = global.Promise;
yield Promise.all(value.map(_fun9761));
value = undefined;
if (false) {
return value;
}
return value.every(function(a0) {
return a0;
});
}
function _fun9747(a0) { // fn#9747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1032:855, offset: 0x00d710f3, size: 80 bytes, params: 2, frame: 18
const value = env0_0(a0);
const Object = global.Object;
const assign = Object.assign;
var env0_0 = env4_4(_fun9749);
return Reflect.apply(assign, Object, [{}, value, {send: send_9750}]);
}
function getEvent(a0) { // fn#9754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1032:1263, offset: 0x00d712a2, size: 51 bytes, params: 2, frame: 13
let value = a0;
const r3 = value == null ? ['event'] : value.length ? value : ['event'];
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
return env5_5(env0_0, r3);
}
function _fun9755(a0) { // fn#9755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1032:1358, offset: 0x00d712d5, size: 60 bytes, params: 2, frame: 14
var r0;
var value;
if (typeof a0 === 'string') {
value = environment.__proto__.__proto__.__proto__;
value = env3_4(a0, undefined);
r0 = value;
} else {
value = environment.__proto__.__proto__.__proto__;
value = env3_4(a0.dsn, a0.release);
r0 = value;
}
return r0;
}