206 lines
7.7 KiB
React
206 lines
7.7 KiB
React
/* Metro module 7425; source: unknown; dependencies: [57, 65, 7397, 7369, 7396] */
|
|
function _fun59914(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7603:6, offset: 0x016f6826, size: 170 bytes, params: 8, frame: 18
|
|
let env0_0 = require;
|
|
const closure = setupIntegration_59915;
|
|
const env0_2 = require(57) /* metro dependency 57 */;
|
|
const env0_3 = require(65) /* metro dependency 65 */;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.addIntegration = addIntegration_59918;
|
|
exports.afterSetupIntegrations = function(a0, a1) {
|
|
var r5;
|
|
var afterAllSetup;
|
|
var error;
|
|
var iterator = a1[Symbol.iterator]();
|
|
var iterator2 = iterator.next;
|
|
var r2 = iterator;
|
|
var item2 = Reflect.apply(iterator2, r2, []);
|
|
var item = item2.value;
|
|
item2 = item2.done ? undefined : r2;
|
|
reducibleJoin2: while (true) {
|
|
if (item2 === undefined) {
|
|
return undefined;
|
|
}
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleLoop2: while (true) {
|
|
reducibleJoin5: while (true) {
|
|
if (item) {
|
|
try {
|
|
afterAllSetup = item.afterAllSetup;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
r5 = afterAllSetup;
|
|
break reducibleJoin5;
|
|
}
|
|
r5 = item;
|
|
break reducibleJoin5;
|
|
}
|
|
reducibleJoin1: while (true) {
|
|
if (r5) {
|
|
try {
|
|
afterAllSetup = item.afterAllSetup;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
Reflect.apply(afterAllSetup, item, [a0]);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
r2 = item2;
|
|
break reducibleJoin1;
|
|
}
|
|
r2 = item2;
|
|
break reducibleJoin1;
|
|
}
|
|
item2 = Reflect.apply(iterator2, r2, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r2;
|
|
if (item2 === undefined) {
|
|
break reducibleLoop2;
|
|
}
|
|
continue reducibleLoop2;
|
|
}
|
|
};
|
|
exports.defineIntegration = function(a0) {
|
|
return a0;
|
|
};
|
|
exports.getIntegrationsToSetup = getIntegrationsToSetup_59921;
|
|
exports.installedIntegrations = [];
|
|
exports.setupIntegration = closure;
|
|
exports.setupIntegrations = function(a0, a1) {
|
|
var env0_0 = a0;
|
|
a1.forEach(_fun59927);
|
|
return {};
|
|
};
|
|
}
|
|
|
|
function setupIntegration_59915(a0, a1, a2) { // fn#59915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7603:112, offset: 0x016f68d0, size: 504 bytes, params: 4, frame: 17
|
|
var r3;
|
|
var binding;
|
|
var indexOf;
|
|
var Object;
|
|
const DEBUG_BUILD = (require(7397) /* metro dependency 7397 */).DEBUG_BUILD;
|
|
const logger = (require(7369) /* metro dependency 7369 */).logger;
|
|
const env0_0 = a0;
|
|
let name = a1.name;
|
|
if (a2[name]) {
|
|
if (DEBUG_BUILD) {
|
|
logger.log('Integration skipped because it was already installed: ' + a1.name);
|
|
}
|
|
} else {
|
|
name = a1.name;
|
|
a2[name] = a1;
|
|
binding = env0_4;
|
|
indexOf = binding.indexOf;
|
|
name = a1.name;
|
|
r3 = Reflect.apply(indexOf, binding, [name]) === -1 && typeof a1.setupOnce === 'function';
|
|
if (r3) {
|
|
a1.setupOnce();
|
|
binding = env0_4;
|
|
binding.push(a1.name);
|
|
}
|
|
r3 = a1.setup && typeof a1.setup === 'function';
|
|
if (r3) {
|
|
a1.setup(a0);
|
|
}
|
|
if (typeof a1.preprocessEvent === 'function') {
|
|
var env0_1 = a1.preprocessEvent.bind(a1);
|
|
a0.on('preprocessEvent', _fun59916);
|
|
}
|
|
if (typeof a1.processEvent === 'function') {
|
|
var env0_2 = a1.processEvent.bind(a1);
|
|
Object = global.Object;
|
|
a0.addEventProcessor(Object.assign(_fun59917, {id: a1.name}));
|
|
}
|
|
if (DEBUG_BUILD) {
|
|
logger.log('Integration installed: ' + a1.name);
|
|
}
|
|
}
|
|
}
|
|
|
|
function addIntegration_59918(a0) { // fn#59918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7603:793, offset: 0x016f6ac8, size: 157 bytes, params: 2, frame: 18
|
|
var logger;
|
|
const client = (require(7396) /* metro dependency 7396 */).getClient();
|
|
if (client) {
|
|
client.addIntegration(a0);
|
|
} else if ((require(7397) /* metro dependency 7397 */).DEBUG_BUILD) {
|
|
logger = (require(7369) /* metro dependency 7369 */).logger;
|
|
logger.warn('Cannot add integration "' + a0.name + '" because no SDK Client is available.');
|
|
}
|
|
}
|
|
|
|
function getIntegrationsToSetup_59921({defaultIntegrations, integrations}) { // fn#59921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7603:1186, offset: 0x016f6bae, size: 237 bytes, params: 2, frame: 17
|
|
var r2;
|
|
var items2;
|
|
var value;
|
|
var concat;
|
|
var binding;
|
|
const r3 = defaultIntegrations || [];
|
|
r3.forEach(function(a0) {
|
|
a0.isDefaultInstance = true;
|
|
});
|
|
let Array = global.Array;
|
|
if (Array.isArray(integrations)) {
|
|
items2 = [];
|
|
concat = items2.concat;
|
|
binding = env0_3;
|
|
value = binding(r3);
|
|
value = Reflect.apply(concat, items2, [value, binding(integrations)]);
|
|
r2 = value;
|
|
} else if (typeof integrations !== 'function') {
|
|
r2 = r3;
|
|
} else {
|
|
value = integrations(r3);
|
|
Array = global.Array;
|
|
r2 = Array.isArray(value) ? value : [value];
|
|
}
|
|
value = ((a0) => {
|
|
a0.forEach(_fun59924);
|
|
var Object = global.Object;
|
|
return Object.values({});
|
|
})(r2);
|
|
const index = value.findIndex(function(a0) {
|
|
return a0.name === 'Debug';
|
|
});
|
|
if (index > -1) {
|
|
value.push(env0_2(value.splice(index, 1), 1)[0]);
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function setupIntegrations_59926(a0, a1) { // fn#59926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7603:1808, offset: 0x016f6cdb, size: 35 bytes, params: 3, frame: 12
|
|
const env0_0 = a0;
|
|
a1.forEach(_fun59927);
|
|
return {};
|
|
}
|
|
|
|
function getIntegrationsToSetup_59921FilterDuplicates(a0) { // fn#59923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7603:1445, owner: getIntegrationsToSetup_59921.filterDuplicates, offset: 0x016f6c9b, size: 46 bytes, params: 2, frame: 12
|
|
a0.forEach(_fun59924);
|
|
const Object = global.Object;
|
|
return Object.values({});
|
|
}
|
|
|
|
function _fun59927(a0) { // fn#59927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7603:1867, offset: 0x016f6cfe, size: 37 bytes, params: 2, frame: 15
|
|
var value;
|
|
if (a0) {
|
|
value = environment.__proto__;
|
|
setupIntegration_59915(env0_0, a0, env0_1);
|
|
}
|
|
}
|
|
|