Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,880 @@
|
||||
/* Metro module 16251; source: modules/libdiscore/DispatcherBridge.tsx; dependencies: [6, 7, 4649, 6542, 6584, 10329, 1226, 1938, 1867, 661, 3, 1872, 1870, 683, 694, 7030, 1216, 2] */
|
||||
function _fun125574(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:6, offset: 0x025dd1e7, size: 478 bytes, params: 8, frame: 24
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_125577 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const devSettingsStore = importDefault(4649) /* metro dependency 4649: DevSettingsStore */;
|
||||
let value = importDefault(6542) /* metro dependency 6542: RawGuildEmojiStore */;
|
||||
const guildStickersStore = importDefault(6584) /* metro dependency 6584: GuildStickersStore */;
|
||||
const noteStore = importDefault(10329) /* metro dependency 10329: NoteStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const value8 = new (importDefault(3) /* metro dependency 3: Logger */)('DispatcherBridge');
|
||||
items = [noteStore, guildStore, guildRoleStore, value, guildStickersStore];
|
||||
const env0_9 = {GUILD_MEMBER_ADD: GUILD_MEMBER_ADD_125578, CONNECTION_OPEN: function(a0) {
|
||||
return {guilds: a0.guilds, unavailableGuilds: a0.unavailableGuilds};
|
||||
}, CACHE_LOADED: function(a0) {
|
||||
return {guilds: a0.guilds};
|
||||
}, CACHE_LOADED_LAZY: function(a0) {
|
||||
return {guilds: a0.guilds};
|
||||
}, BACKGROUND_SYNC: function(a0) {
|
||||
return {guilds: a0.guilds};
|
||||
}};
|
||||
value = _fun125583();
|
||||
const Set = global.Set;
|
||||
const set = new Set(['libdiscore', 'typescript-libdiscore-dual-read']);
|
||||
value = new value(((a0) => a0.filter(_fun125606))(items));
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/libdiscore/DispatcherBridge.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_125575(a0, a1) { // fn#125575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:216, offset: 0x025dd3c5, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun125576;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_125577(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_125577(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_125577(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun125576;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function GUILD_MEMBER_ADD_125578(a0) { // fn#125578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:1200, offset: 0x025dd539, size: 40 bytes, params: 2, frame: 12
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0, undefined);
|
||||
object2['currentUserId'] = AuthenticationStore.getId();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun125583() { // fn#125583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:1432, offset: 0x025dd590, size: 140 bytes, params: 1, frame: 15
|
||||
return env0_4(DispatcherBridge, [{key: 'handleFatalError', value: value_125601}, {key: 'handleStoreError',
|
||||
value: value_125602}, {key: 'withStoreToken', value: value_125603}, {key: 'hasAnyAuthoritativeStore',
|
||||
value: value_125604}]);
|
||||
}
|
||||
|
||||
function filterStores(a0) { // fn#125605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:6070, offset: 0x025de45b, size: 24 bytes, params: 2, frame: 11
|
||||
return a0.filter(_fun125606);
|
||||
}
|
||||
|
||||
function DispatcherBridge(a0) { // fn#125584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:1453, offset: 0x025dd61c, size: 681 bytes, params: 2, frame: 33
|
||||
var r12;
|
||||
var FLUX_API;
|
||||
var info;
|
||||
var items2;
|
||||
var value5;
|
||||
var value6;
|
||||
var done;
|
||||
var value7;
|
||||
var name;
|
||||
var value9;
|
||||
var tokenToStore;
|
||||
var push;
|
||||
var mode;
|
||||
var value11;
|
||||
var value12;
|
||||
var value13;
|
||||
var value14;
|
||||
var registeredActionTypes;
|
||||
var value16;
|
||||
var value17;
|
||||
var closure;
|
||||
var property;
|
||||
var defaultImport;
|
||||
var register;
|
||||
var Object;
|
||||
var fromEntries;
|
||||
var value18;
|
||||
var value19;
|
||||
var moduleValue;
|
||||
var DispatchBand;
|
||||
var Database;
|
||||
var moduleValue2;
|
||||
var error;
|
||||
let binding = env1_3;
|
||||
binding(this, DispatcherBridge);
|
||||
const Map = global.Map;
|
||||
const value3 = Object.create(Map.prototype, {constructor: {value: Map}});
|
||||
const map = new Map();
|
||||
this.tokenToStore = map instanceof Object ? map : value3;
|
||||
this.disabledFromFatalError = false;
|
||||
let length = a0.length;
|
||||
if (length !== 0) {
|
||||
FLUX_API = require(dependencyMap[11]).FLUX_API;
|
||||
if (FLUX_API != null) {
|
||||
try {
|
||||
items2 = [];
|
||||
value5 = _createForOfIteratorHelperLoose_125575(a0);
|
||||
value6 = value5();
|
||||
done = value6.done;
|
||||
if (!done) {
|
||||
r12 = value6;
|
||||
while (true) {
|
||||
value7 = r12.value;
|
||||
name = value7.getName();
|
||||
value9 = value7.connectWithLibdiscore(FLUX_API);
|
||||
tokenToStore = this.tokenToStore;
|
||||
tokenToStore.set(value9, value7);
|
||||
push = items2.push;
|
||||
mode = value7.getMode();
|
||||
value11 = '' + name + ' => [token: ' + value9 + ', mode: ' + mode + ']';
|
||||
Reflect.apply(push, items2, [value11]);
|
||||
value12 = value5();
|
||||
done = value12.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r12 = value12;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
binding = env1_8;
|
||||
info = binding.info;
|
||||
length = a0.length;
|
||||
value13 = items2.join(', ');
|
||||
value14 = 'Connected ' + length + ' store(s), mapping: ' + value13 + '.';
|
||||
Reflect.apply(info, binding, [value14]);
|
||||
registeredActionTypes = FLUX_API.getRegisteredActionTypes();
|
||||
info = binding.info;
|
||||
length = registeredActionTypes.length;
|
||||
value16 = registeredActionTypes.join(', ');
|
||||
value17 = 'Registering ' + length + ' bridged action(s): ' + value16 + '.';
|
||||
Reflect.apply(info, binding, [value17]);
|
||||
closure = actionHandler;
|
||||
var actionHandler = closure;
|
||||
property = dependencyMap[14];
|
||||
defaultImport = importDefault(property);
|
||||
register = defaultImport.register;
|
||||
Object = global.Object;
|
||||
fromEntries = Object.fromEntries;
|
||||
closure = function(a0) {
|
||||
return [a0, actionHandler];
|
||||
};
|
||||
value18 = registeredActionTypes.map(closure);
|
||||
value19 = Reflect.apply(fromEntries, Object, [value18]);
|
||||
property = dependencyMap[14];
|
||||
moduleValue = require(property);
|
||||
DispatchBand = moduleValue.DispatchBand;
|
||||
Database = DispatchBand.Database;
|
||||
closure = _fun125598;
|
||||
Reflect.apply(register, defaultImport, ['LibDiscoreDispatcherBridge', value19, closure, Database]);
|
||||
property = dependencyMap[15];
|
||||
moduleValue2 = require(property);
|
||||
property = moduleValue2.default;
|
||||
var env0_4 = property;
|
||||
closure = _fun125599;
|
||||
property.addChangeListener(closure);
|
||||
} catch (error) {
|
||||
binding = env1_8;
|
||||
binding.error('Failed to initialize the dispatcher bridge', error);
|
||||
}
|
||||
} else {
|
||||
env1_8.info('Not initializing DispatcherBridge, because kvStoreApi is unavailable.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function value_125601(a0, a1) { // fn#125601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:4285, offset: 0x025de0b2, size: 294 bytes, params: 3, frame: 22
|
||||
var r4;
|
||||
var value4;
|
||||
var disableDualReadValidation;
|
||||
var value5;
|
||||
const Error = global.Error;
|
||||
let error = new Error(a0);
|
||||
const hasAnyAuthoritativeStore2 = this.hasAnyAuthoritativeStore();
|
||||
env1_8.error('Fatal dispatch error for action', a1, 'hasAuthoritativeStore:', hasAnyAuthoritativeStore2, error);
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureException(error,
|
||||
{extra: {actionType: a1, hasAuthoritativeStore: hasAnyAuthoritativeStore2}, tags: {'source': 'libdiscore',
|
||||
'errorKind': 'fatal_dispatch'}});
|
||||
if (hasAnyAuthoritativeStore2) {
|
||||
(require(1870) /* metro dependency 1870: libdiscoreExperiments */).clearLibdiscoreExperimentCache();
|
||||
throw error;
|
||||
}
|
||||
env1_8.warn('Disabling DispatcherBridge until restart');
|
||||
this.disabledFromFatalError = true;
|
||||
const _createForOfIteratorHelperLoose_125575Binding = _createForOfIteratorHelperLoose_125575;
|
||||
const tokenToStore = this.tokenToStore;
|
||||
error = _createForOfIteratorHelperLoose_125575Binding(tokenToStore.values());
|
||||
const value3 = error();
|
||||
let done = value3.done;
|
||||
if (!done) {
|
||||
r4 = value3;
|
||||
reducibleLoop2: while (true) {
|
||||
value4 = r4.value;
|
||||
disableDualReadValidation = value4.disableDualReadValidation;
|
||||
Reflect.apply(disableDualReadValidation, value4, []);
|
||||
value5 = error();
|
||||
done = value5.done;
|
||||
if (done) {
|
||||
break reducibleLoop2;
|
||||
}
|
||||
r4 = value5;
|
||||
continue reducibleLoop2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function value_125602(a0, a1) { // fn#125602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:4868, offset: 0x025de1d8, size: 462 bytes, params: 3, frame: 28
|
||||
var r0;
|
||||
const value = this.tokenToStore.get(a0.storeToken);
|
||||
const value2 = undefined;
|
||||
let r8 = value == null ? value2 : value.getName();
|
||||
r8 = r8 ?? 'unknown(token:' + a0.storeToken + ')';
|
||||
const r7 = value == null ? value2 : value.getMode();
|
||||
const Error = global.Error;
|
||||
let error = a0.error;
|
||||
error = new Error(error ?? 'unknown store error');
|
||||
env1_8.error('Store', r8, 'failed to handle action', a1, 'mode:', r7, error);
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureException(error,
|
||||
{extra: {actionType: a1, storeName: r8, storeMode: r7}, tags: {'source': 'libdiscore',
|
||||
'errorKind': 'store_dispatch'}});
|
||||
if (r7 !== 'typescript-libdiscore-dual-read') {
|
||||
if (r7 === 'libdiscore') {
|
||||
(require(1870) /* metro dependency 1870: libdiscoreExperiments */).clearLibdiscoreExperimentCache();
|
||||
r0 = error;
|
||||
} else {
|
||||
r0 = new global.Error("unexpected storeMode '" + r7 + "' for store " + r8);
|
||||
}
|
||||
throw r0;
|
||||
}
|
||||
env1_8.warn('Store: ' + r8 + ' had unexpected error in Rust implementation, disabling moving forward');
|
||||
if (value != null) {
|
||||
value.disableDualReadValidation();
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function value_125603(a0, a1, a2) { // fn#125603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:5619, offset: 0x025de3a6, size: 87 bytes, params: 4, frame: 19
|
||||
let value = this.tokenToStore.get(a0);
|
||||
if (value == null) {
|
||||
value = environment.__proto__;
|
||||
env1_8.warn('When dispatching action', a1, 'we got a store token', a0, 'that is unknown');
|
||||
} else {
|
||||
a2(value);
|
||||
}
|
||||
}
|
||||
|
||||
function value_125604() { // fn#125604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:5813, offset: 0x025de3fd, size: 94 bytes, params: 1, frame: 14
|
||||
var value3;
|
||||
var getMode;
|
||||
var value4;
|
||||
let value = environment.__proto__;
|
||||
const _createForOfIteratorHelperLoose_125575Binding = _createForOfIteratorHelperLoose_125575;
|
||||
value = this.tokenToStore.values();
|
||||
value = _createForOfIteratorHelperLoose_125575Binding(value);
|
||||
const value2 = value();
|
||||
let done = value2.done;
|
||||
if (done) {
|
||||
return false;
|
||||
}
|
||||
let r1 = value2;
|
||||
loopExit1: while (true) {
|
||||
value3 = r1.value;
|
||||
getMode = value3.getMode;
|
||||
if (Reflect.apply(getMode, value3, []) === 'libdiscore') {
|
||||
break loopExit1;
|
||||
}
|
||||
value4 = value();
|
||||
done = value4.done;
|
||||
if (done) {
|
||||
return false;
|
||||
}
|
||||
r1 = value4;
|
||||
continue;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function _fun125606(a0) { // fn#125606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:6112, offset: 0x025de473, size: 32 bytes, params: 2, frame: 12
|
||||
const binding = env1_10;
|
||||
const has = binding.has;
|
||||
const getMode = a0.getMode;
|
||||
return Reflect.apply(has, binding, [Reflect.apply(getMode, a0, [])]);
|
||||
}
|
||||
|
||||
function actionHandler(a0) { // fn#125585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:2029, owner: DispatcherBridge.actionHandler, offset: 0x025dd8c5, size: 997 bytes, params: 2, frame: 31
|
||||
var environment;
|
||||
var r12;
|
||||
var r15;
|
||||
var value2;
|
||||
var binding;
|
||||
var type;
|
||||
var property;
|
||||
var performance;
|
||||
var now;
|
||||
var value3;
|
||||
var JSON;
|
||||
var stringify;
|
||||
var value4;
|
||||
var object2;
|
||||
var value5;
|
||||
const TelemetryExperiment = (require(1870) /* metro dependency 1870: libdiscoreExperiments */).TelemetryExperiment;
|
||||
var shouldCollectMetrics;
|
||||
var shouldCollectMetrics2;
|
||||
var dispatchAction;
|
||||
var value6;
|
||||
var ok;
|
||||
var handleFatalError;
|
||||
var error;
|
||||
var value7;
|
||||
var value8;
|
||||
var metrics;
|
||||
var items4;
|
||||
var _createForOfIteratorHelperLoose_125575Binding;
|
||||
var storeResults;
|
||||
var value9;
|
||||
var value10;
|
||||
var done;
|
||||
var value11;
|
||||
var push;
|
||||
var handleStoreError;
|
||||
var value12;
|
||||
var closure;
|
||||
var length;
|
||||
var value13;
|
||||
var value14;
|
||||
var withStoreToken;
|
||||
var storeToken;
|
||||
var value15;
|
||||
var items2;
|
||||
var timings;
|
||||
var get;
|
||||
var map;
|
||||
var join;
|
||||
var items3;
|
||||
var mutations;
|
||||
var memory;
|
||||
var filter;
|
||||
var info;
|
||||
var HermesInternal;
|
||||
var concat;
|
||||
var track;
|
||||
var LIBDISCORE_DISPATCH_BRIDGE_TELEMETRY;
|
||||
var didEmit;
|
||||
const env0_0 = a0;
|
||||
let value = environment;
|
||||
reducibleJoin20: while (true) {
|
||||
if (env0_0.disabledFromFatalError) {
|
||||
break reducibleJoin20;
|
||||
}
|
||||
value2 = environment.__proto__.__proto__;
|
||||
binding = env2_9;
|
||||
type = a0.type;
|
||||
property = binding[type];
|
||||
performance = global.performance;
|
||||
now = performance.now;
|
||||
value3 = Reflect.apply(now, performance, []);
|
||||
if (property != null) {
|
||||
JSON = global.JSON;
|
||||
stringify = JSON.stringify;
|
||||
object2 = {};
|
||||
type = a0.type;
|
||||
object2.type = type;
|
||||
copyDataProperties(object2, property(a0), undefined);
|
||||
value5 = Reflect.apply(stringify, JSON, [object2]);
|
||||
r12 = value5;
|
||||
} else {
|
||||
JSON = global.JSON;
|
||||
stringify = JSON.stringify;
|
||||
value4 = Reflect.apply(stringify, JSON, [a0]);
|
||||
r12 = value4;
|
||||
}
|
||||
object2 = {kind: 'json_stringify_action'};
|
||||
performance = global.performance;
|
||||
now = performance.now;
|
||||
object2.durationMillis = Reflect.apply(now, performance, []) - value3;
|
||||
shouldCollectMetrics = TelemetryExperiment.shouldCollectMetrics;
|
||||
shouldCollectMetrics2 = Reflect.apply(shouldCollectMetrics, TelemetryExperiment, []);
|
||||
dispatchAction = FLUX_API.dispatchAction;
|
||||
value6 = Reflect.apply(dispatchAction, FLUX_API, [r12, shouldCollectMetrics2]);
|
||||
ok = value6.ok;
|
||||
if (ok) {
|
||||
performance = global.performance;
|
||||
now = performance.now;
|
||||
value7 = Reflect.apply(now, performance, []) - value3;
|
||||
value8 = value6.value;
|
||||
metrics = value8.metrics;
|
||||
items4 = [];
|
||||
_createForOfIteratorHelperLoose_125575Binding = _createForOfIteratorHelperLoose_125575;
|
||||
storeResults = value8.storeResults;
|
||||
value9 = _createForOfIteratorHelperLoose_125575Binding(storeResults);
|
||||
value10 = value9();
|
||||
done = value10.done;
|
||||
if (!done) {
|
||||
r12 = value10;
|
||||
reducibleLoop7: while (true) {
|
||||
value11 = r12.value;
|
||||
error = value11.error;
|
||||
if (error != null) {
|
||||
binding = env0_0;
|
||||
handleStoreError = binding.handleStoreError;
|
||||
type = a0.type;
|
||||
Reflect.apply(handleStoreError, binding, [value11, type]);
|
||||
} else {
|
||||
push = items4.push;
|
||||
Reflect.apply(push, items4, [value11]);
|
||||
}
|
||||
value12 = value9();
|
||||
done = value12.done;
|
||||
if (done) {
|
||||
break reducibleLoop7;
|
||||
}
|
||||
r12 = value12;
|
||||
continue reducibleLoop7;
|
||||
}
|
||||
}
|
||||
closure = actionHandler_loop;
|
||||
length = items4.length;
|
||||
value13 = 0;
|
||||
if (value13 < length) {
|
||||
r15 = value13;
|
||||
reducibleLoop12: while (true) {
|
||||
closure(items4[r15]);
|
||||
value14 = typeof r15 === 'bigint' ? r15 + 1n : +r15 + 1;
|
||||
length = items4.length;
|
||||
if (value14 < length) {
|
||||
r15 = value14;
|
||||
continue reducibleLoop12;
|
||||
}
|
||||
break reducibleLoop12;
|
||||
}
|
||||
}
|
||||
length = items4.length;
|
||||
if (value13 < length) {
|
||||
r12 = value13;
|
||||
reducibleLoop14: while (true) {
|
||||
property = items4[r12];
|
||||
binding = env0_0;
|
||||
withStoreToken = binding.withStoreToken;
|
||||
storeToken = property.storeToken;
|
||||
type = a0.type;
|
||||
Reflect.apply(withStoreToken, binding, [storeToken, type, _fun125588]);
|
||||
value15 = typeof r12 === 'bigint' ? r12 + 1n : +r12 + 1;
|
||||
length = items4.length;
|
||||
if (value15 < length) {
|
||||
r12 = value15;
|
||||
continue reducibleLoop14;
|
||||
}
|
||||
break reducibleLoop14;
|
||||
}
|
||||
}
|
||||
if (metrics == null) {
|
||||
break reducibleJoin20;
|
||||
}
|
||||
if (shouldCollectMetrics2) {
|
||||
items2 = [object2];
|
||||
timings = metrics.timings;
|
||||
arraySpread(items2, timings, 1, undefined);
|
||||
get = DevSettingsStore.get;
|
||||
reducibleJoin19: while (true) {
|
||||
if (Reflect.apply(get, DevSettingsStore, ['libdiscore_verbose_telemetry_logging'])) {
|
||||
map = items2.map;
|
||||
value = Reflect.apply(map, items2, [function({kind, durationMillis}) {
|
||||
return ' - ' + kind + ': ' + durationMillis + 'ms';
|
||||
}]);
|
||||
join = value.join;
|
||||
value = Reflect.apply(join, value, ['\n']);
|
||||
items3 = [['Timings', value]];
|
||||
mutations = metrics.mutations;
|
||||
map = mutations.map;
|
||||
value = Reflect.apply(map, mutations, [_fun125590]);
|
||||
join = value.join;
|
||||
value = Reflect.apply(join, value, ['\n']);
|
||||
items3[1] = ['Mutations', value];
|
||||
memory = metrics.memory;
|
||||
map = memory.map;
|
||||
value = Reflect.apply(map, memory, [_fun125593]);
|
||||
join = value.join;
|
||||
value = Reflect.apply(join, value, ['\n']);
|
||||
items3[2] = ['Memory Usage', value];
|
||||
filter = items3.filter;
|
||||
value = Reflect.apply(filter, items3, [_fun125595]);
|
||||
map = value.map;
|
||||
value = Reflect.apply(map, value, [_fun125596]);
|
||||
join = value.join;
|
||||
value = Reflect.apply(join, value, ['\n\n']);
|
||||
binding = env2_8;
|
||||
info = binding.info;
|
||||
type = a0.type;
|
||||
HermesInternal = global.HermesInternal;
|
||||
concat = HermesInternal.concat;
|
||||
Reflect.apply(info, binding, ['Handling action ' + type + ' took ' + value7 + 'ms\n' + value]);
|
||||
break reducibleJoin19;
|
||||
}
|
||||
break reducibleJoin19;
|
||||
}
|
||||
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = value.track;
|
||||
LIBDISCORE_DISPATCH_BRIDGE_TELEMETRY = AnalyticEvents.LIBDISCORE_DISPATCH_BRIDGE_TELEMETRY;
|
||||
object2 = {};
|
||||
type = a0.type;
|
||||
object2.action_type = type;
|
||||
object2.total_duration_millis = value7;
|
||||
JSON = global.JSON;
|
||||
stringify = JSON.stringify;
|
||||
object2.timings = Reflect.apply(stringify, JSON, [items2]);
|
||||
JSON = global.JSON;
|
||||
stringify = JSON.stringify;
|
||||
mutations = metrics.mutations;
|
||||
object2.mutations = Reflect.apply(stringify, JSON, [mutations]);
|
||||
JSON = global.JSON;
|
||||
stringify = JSON.stringify;
|
||||
memory = metrics.memory;
|
||||
object2.memory_usage = Reflect.apply(stringify, JSON, [memory]);
|
||||
Reflect.apply(track, value, [LIBDISCORE_DISPATCH_BRIDGE_TELEMETRY, object2]);
|
||||
didEmit = TelemetryExperiment.didEmit;
|
||||
Reflect.apply(didEmit, TelemetryExperiment, []);
|
||||
break reducibleJoin20;
|
||||
}
|
||||
break reducibleJoin20;
|
||||
}
|
||||
binding = env0_0;
|
||||
handleFatalError = binding.handleFatalError;
|
||||
error = value6.error;
|
||||
type = a0.type;
|
||||
Reflect.apply(handleFatalError, binding, [error, type]);
|
||||
break reducibleJoin20;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun125599() { // fn#125599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:3918, offset: 0x025de004, size: 91 bytes, params: 1, frame: 12
|
||||
var value;
|
||||
if (env0_4.getState() !== 'active') {
|
||||
var env0_0 = global.Date.now();
|
||||
value = FLUX_API.flushReplicationStates();
|
||||
if (value != null) {
|
||||
value.then(_fun125600);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function actionHandler_loop(a0) { // fn#125586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:2539, owner: DispatcherBridge.actionHandler._loop, offset: 0x025ddcaa, size: 58 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
const binding = env1_1;
|
||||
binding.withStoreToken(a0.storeToken, env0_0.type, _fun125587);
|
||||
}
|
||||
|
||||
function _fun125588(a0) { // fn#125588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:2751, offset: 0x025ddd05, size: 25 bytes, params: 2, frame: 11
|
||||
a0.doEmitChanges(env0_0);
|
||||
}
|
||||
|
||||
function _fun125590({recordType, metrics}) { // fn#125590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:2985, offset: 0x025ddd4f, size: 110 bytes, params: 2, frame: 16
|
||||
const Object = global.Object;
|
||||
let value = Object.entries(metrics);
|
||||
value = value.filter(function(a0) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var item3;
|
||||
var value3;
|
||||
var iterator = a0[Symbol.iterator]();
|
||||
var iterator2 = iterator.next;
|
||||
var item2 = Reflect.apply(iterator2, iterator, []);
|
||||
var item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
var value = undefined;
|
||||
var value2 = item2 === value;
|
||||
if (value2) {
|
||||
r0 = item2;
|
||||
r1 = value;
|
||||
r2 = value2;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r0 = item3;
|
||||
r1 = value;
|
||||
r2 = value3;
|
||||
} else {
|
||||
r0 = item3;
|
||||
r1 = item;
|
||||
r2 = value3;
|
||||
}
|
||||
}
|
||||
if (!r2) {
|
||||
r0.return();
|
||||
}
|
||||
return r1 !== 0;
|
||||
});
|
||||
value = value.map(function(a0) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r3;
|
||||
var item3;
|
||||
var value3;
|
||||
var iterator = a0[Symbol.iterator]();
|
||||
var iterator2 = iterator.next;
|
||||
var item2 = Reflect.apply(iterator2, iterator, []);
|
||||
var item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
var value = undefined;
|
||||
var value2 = item2 === value;
|
||||
var r4 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r0 = item2;
|
||||
r1 = value2;
|
||||
r3 = value;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r0 = item3;
|
||||
r1 = value3;
|
||||
r3 = value;
|
||||
} else {
|
||||
r0 = item3;
|
||||
r1 = value3;
|
||||
r3 = item;
|
||||
}
|
||||
}
|
||||
if (!r1) {
|
||||
r0.return();
|
||||
}
|
||||
return ' - ' + r4 + ': ' + r3;
|
||||
});
|
||||
value = value.join('\n');
|
||||
return ' * Record Type: ' + recordType + '\n' + value;
|
||||
}
|
||||
|
||||
function _fun125593({recordType, statistics}) { // fn#125593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:3170, offset: 0x025dde5d, size: 95 bytes, params: 2, frame: 15
|
||||
const Object = global.Object;
|
||||
let value = Object.entries(statistics);
|
||||
value = value.map(function(a0) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r3;
|
||||
var item3;
|
||||
var value3;
|
||||
var iterator = a0[Symbol.iterator]();
|
||||
var iterator2 = iterator.next;
|
||||
var item2 = Reflect.apply(iterator2, iterator, []);
|
||||
var item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
var value = undefined;
|
||||
var value2 = item2 === value;
|
||||
var r4 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r0 = item2;
|
||||
r1 = value2;
|
||||
r3 = value;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r0 = item3;
|
||||
r1 = value3;
|
||||
r3 = value;
|
||||
} else {
|
||||
r0 = item3;
|
||||
r1 = value3;
|
||||
r3 = item;
|
||||
}
|
||||
}
|
||||
if (!r1) {
|
||||
r0.return();
|
||||
}
|
||||
var JSON = global.JSON;
|
||||
return ' - ' + r4 + ': ' + JSON.stringify(r3);
|
||||
});
|
||||
value = value.join('\n');
|
||||
return ' * Record Type: ' + recordType + '\n' + value;
|
||||
}
|
||||
|
||||
function _fun125595(a0) { // fn#125595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:3328, offset: 0x025ddf2e, size: 95 bytes, params: 2, frame: 10
|
||||
var r1;
|
||||
var r2;
|
||||
var r4;
|
||||
var item3;
|
||||
var value3;
|
||||
const iterator = a0[Symbol.iterator]();
|
||||
const iterator2 = iterator.next;
|
||||
const value = undefined;
|
||||
let item2 = Reflect.apply(iterator2, iterator, []);
|
||||
let item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
const value2 = item2 === value;
|
||||
if (value2) {
|
||||
}
|
||||
if (value2) {
|
||||
r1 = item2;
|
||||
r2 = value2;
|
||||
r4 = value;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r1 = item3;
|
||||
r2 = value3;
|
||||
r4 = value;
|
||||
} else {
|
||||
r1 = item3;
|
||||
r2 = value3;
|
||||
r4 = item;
|
||||
}
|
||||
}
|
||||
if (!r2) {
|
||||
r1.return();
|
||||
}
|
||||
return r4.length > 0;
|
||||
}
|
||||
|
||||
function _fun125596(a0) { // fn#125596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:3354, offset: 0x025ddf8d, size: 95 bytes, params: 2, frame: 17
|
||||
var r0;
|
||||
var r1;
|
||||
var r3;
|
||||
var item3;
|
||||
var value3;
|
||||
const iterator = a0[Symbol.iterator]();
|
||||
const iterator2 = iterator.next;
|
||||
let item2 = Reflect.apply(iterator2, iterator, []);
|
||||
let item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
const value = undefined;
|
||||
const value2 = item2 === value;
|
||||
const r4 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r0 = item2;
|
||||
r1 = value2;
|
||||
r3 = value;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r0 = item3;
|
||||
r1 = value3;
|
||||
r3 = value;
|
||||
} else {
|
||||
r0 = item3;
|
||||
r1 = value3;
|
||||
r3 = item;
|
||||
}
|
||||
}
|
||||
if (!r1) {
|
||||
r0.return();
|
||||
}
|
||||
return '' + r4 + ':\n' + r3;
|
||||
}
|
||||
|
||||
function _fun125600(a0) { // fn#125600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:4016, offset: 0x025de05f, size: 83 bytes, params: 2, frame: 15
|
||||
var value;
|
||||
var binding;
|
||||
var info;
|
||||
if (a0) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
binding = env3_8;
|
||||
info = binding.info;
|
||||
value = global.Date.now();
|
||||
value -= env0_0;
|
||||
Reflect.apply(info, binding, ['Successfully flushed replication states in ' + value + 'ms']);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun125587(a0) { // fn#125587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16459:2589, offset: 0x025ddce4, size: 33 bytes, params: 2, frame: 11
|
||||
a0.applyChanges(env0_0.databaseChanges);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/* Metro module 1872; source: modules/libdiscore/FluxApi.tsx; dependencies: [1873, 2] */
|
||||
function _fun20238(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1999:6, offset: 0x00ec2cb0, size: 117 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(1873) /* metro dependency 1873: shimNative */;
|
||||
value = value.getFluxApi();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/libdiscore/FluxApi.tsx');
|
||||
exports.FLUX_API = value;
|
||||
exports.hasFluxApi = hasFluxApi;
|
||||
}
|
||||
|
||||
function hasFluxApi() { // fn#20239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1999:209, offset: 0x00ec2d25, size: 15 bytes, params: 1, frame: 2
|
||||
return env0_0 != null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,300 @@
|
||||
/* Metro module 16193; source: modules/libdiscore/LibdiscoreExperimentManager.tsx; dependencies: [6, 7, 15, 17, 18, 1220, 1873, 1870, 628, 1854, 4860, 2] */
|
||||
function _fun125124(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16401:6, offset: 0x025cec92, size: 296 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_125130 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const initializeAllExperiments = function() {
|
||||
var ALL_LIBDISCORE_EXPERIMENTS = require(dependencyMap[7]).ALL_LIBDISCORE_EXPERIMENTS;
|
||||
ALL_LIBDISCORE_EXPERIMENTS.forEach(_fun125133);
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
const apexExperimentStore = importDefault(1220) /* metro dependency 1220: ApexExperimentStore */;
|
||||
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun125136(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/libdiscore/LibdiscoreExperimentManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_125125() { // fn#125125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16401:160, offset: 0x025cedba, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_125125_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_125128(a0, a1) { // fn#125128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16401:353, offset: 0x025cee1c, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun125129;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_125130(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_125130(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_125130(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun125129;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function experimentStoreUpdateHandler() { // fn#125131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16401:1274, offset: 0x025cef90, size: 273 bytes, params: 1, frame: 18
|
||||
var r4;
|
||||
var r3;
|
||||
var moduleValue2;
|
||||
var isExperimentSyncDisabled;
|
||||
var object2;
|
||||
var _createForOfIteratorHelperLoose_125128Binding;
|
||||
var ALL_LIBDISCORE_EXPERIMENTS;
|
||||
var value2;
|
||||
var value3;
|
||||
var done;
|
||||
var value4;
|
||||
var id;
|
||||
var getCurrentConfig;
|
||||
var value5;
|
||||
var value6;
|
||||
var defaultImport;
|
||||
var value7;
|
||||
var moduleValue3;
|
||||
var getExperimentCacher;
|
||||
var value8;
|
||||
var flushToCache;
|
||||
var JSON;
|
||||
var stringify;
|
||||
const shimNativeModule = require(1873) /* metro dependency 1873: shimNative */;
|
||||
reducibleJoin8: while (true) {
|
||||
if (shimNativeModule.isLibdiscoreInitialized()) {
|
||||
moduleValue2 = require(1870) /* metro dependency 1870: libdiscoreExperiments */;
|
||||
isExperimentSyncDisabled = moduleValue2.isExperimentSyncDisabled;
|
||||
if (Reflect.apply(isExperimentSyncDisabled, moduleValue2, [])) {
|
||||
break reducibleJoin8;
|
||||
}
|
||||
object2 = {};
|
||||
_createForOfIteratorHelperLoose_125128Binding = _createForOfIteratorHelperLoose_125128;
|
||||
ALL_LIBDISCORE_EXPERIMENTS = (require(1870) /* metro dependency 1870: libdiscoreExperiments */).ALL_LIBDISCORE_EXPERIMENTS;
|
||||
value2 = _createForOfIteratorHelperLoose_125128Binding(ALL_LIBDISCORE_EXPERIMENTS);
|
||||
value3 = value2();
|
||||
done = value3.done;
|
||||
if (!done) {
|
||||
r4 = value3;
|
||||
reducibleLoop3: while (true) {
|
||||
value4 = r4.value;
|
||||
id = value4.id;
|
||||
getCurrentConfig = value4.getCurrentConfig;
|
||||
object2[id] = Reflect.apply(getCurrentConfig, value4, []);
|
||||
value5 = value2();
|
||||
done = value5.done;
|
||||
if (done) {
|
||||
break reducibleLoop3;
|
||||
}
|
||||
r4 = value5;
|
||||
continue reducibleLoop3;
|
||||
}
|
||||
}
|
||||
value6 = env0_9 != null;
|
||||
reducibleJoin6: while (true) {
|
||||
if (value6) {
|
||||
defaultImport = importDefault(628) /* metro dependency 628: shallowEqual */;
|
||||
value7 = defaultImport(env0_9, object2);
|
||||
r3 = value7;
|
||||
break reducibleJoin6;
|
||||
}
|
||||
r3 = value6;
|
||||
break reducibleJoin6;
|
||||
}
|
||||
if (r3) {
|
||||
break reducibleJoin8;
|
||||
}
|
||||
moduleValue3 = shimNativeModule;
|
||||
getExperimentCacher = moduleValue3.getExperimentCacher;
|
||||
value8 = Reflect.apply(getExperimentCacher, moduleValue3, []);
|
||||
flushToCache = value8.flushToCache;
|
||||
JSON = global.JSON;
|
||||
stringify = JSON.stringify;
|
||||
Reflect.apply(flushToCache, value8, [Reflect.apply(stringify, JSON, [object2])]);
|
||||
env0_9 = object2;
|
||||
break reducibleJoin8;
|
||||
}
|
||||
break reducibleJoin8;
|
||||
}
|
||||
}
|
||||
|
||||
function initializeAllExperiments() { // fn#125132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16401:1629, offset: 0x025cf0a1, size: 52 bytes, params: 1, frame: 12
|
||||
const ALL_LIBDISCORE_EXPERIMENTS = (require(1870) /* metro dependency 1870: libdiscoreExperiments */).ALL_LIBDISCORE_EXPERIMENTS;
|
||||
ALL_LIBDISCORE_EXPERIMENTS.forEach(function(a0) {
|
||||
a0.setExperiment(_fun125134(a0));
|
||||
});
|
||||
}
|
||||
|
||||
function _fun125136(a0) { // fn#125136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16401:1976, offset: 0x025cf19a, size: 97 bytes, params: 2, frame: 16
|
||||
const closure = LibdiscoreExperimentManager;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: '_initialize', value: function() {
|
||||
initializeAllExperiments();
|
||||
}}, {key: '_terminate', value: function() {
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun125133(a0) { // fn#125133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16401:1710, offset: 0x025cf0d5, size: 34 bytes, params: 2, frame: 12
|
||||
a0.setExperiment(createApexExperimentWrapper(a0));
|
||||
}
|
||||
|
||||
function LibdiscoreExperimentManager(a0) { // fn#125137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16401:1988, offset: 0x025cf1fb, size: 187 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_3;
|
||||
binding(this, LibdiscoreExperimentManager);
|
||||
const items2 = [];
|
||||
arraySpread(items2, value, 0, items2);
|
||||
value = env1_6(LibdiscoreExperimentManager);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_125125()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items2, env1_6(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items2);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.actions = {};
|
||||
const Map = global.Map;
|
||||
const map = new Map();
|
||||
value.stores = map.set(ApexExperimentStore, experimentStoreUpdateHandler);
|
||||
return value;
|
||||
}
|
||||
|
||||
function createApexExperimentWrapper(a0) { // fn#125134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16401:1730, offset: 0x025cf0f7, size: 133 bytes, params: 2, frame: 16
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(1854) /* metro dependency 1854: apex */;
|
||||
const createApexExperiment = value.createApexExperiment;
|
||||
const object2 = {kind: 'user'};
|
||||
object2.name = a0.id;
|
||||
object2.defaultConfig = {treatmentId: -1};
|
||||
const Object = global.Object;
|
||||
const fromEntries = Object.fromEntries;
|
||||
const treatments = a0.getTreatments();
|
||||
object2.variations = Reflect.apply(fromEntries, Object, [treatments.map(function({treatmentId}) {
|
||||
return [treatmentId, {treatmentId: treatmentId}];
|
||||
})]);
|
||||
return Reflect.apply(createApexExperiment, value, [object2]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
/* Metro module 16252; source: modules/libdiscore/libDiscoreSmokeTest.tsx; dependencies: [5, 661, 3, 1876, 1873, 1870, 683, 2] */
|
||||
function _fun125607(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16460:6, offset: 0x025de493, size: 264 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const closure = function() {
|
||||
return _libDiscoreSmokeTest.apply(this, arguments);
|
||||
};
|
||||
const closure2 = function() {
|
||||
require(dependencyMap[5]).ALL_LIBDISCORE_EXPERIMENTS.forEach(_fun125613);
|
||||
importDefault(dependencyMap[6]).track(AnalyticEvents.LIBDISCORE_LOADED, {success: true,
|
||||
experimental_features: []});
|
||||
};
|
||||
const closure3 = formatErrorMessage;
|
||||
const closure4 = trackLibdiscoreFailure;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('libdiscore');
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/libdiscore/libDiscoreSmokeTest.tsx');
|
||||
exports.default = closure;
|
||||
exports.libDiscoreSmokeTest = closure;
|
||||
exports.trackLibdiscoreSuccess = closure2;
|
||||
exports.formatErrorMessage = closure3;
|
||||
exports.trackLibdiscoreFailure = closure4;
|
||||
}
|
||||
|
||||
function _libDiscoreSmokeTest() { // fn#125609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16460:246, offset: 0x025de59b, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun125611).apply(this, arguments);
|
||||
}
|
||||
|
||||
function trackLibdiscoreSuccess() { // fn#125612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16460:551, offset: 0x025de67d, size: 113 bytes, params: 1, frame: 16
|
||||
const ALL_LIBDISCORE_EXPERIMENTS = (require(1870) /* metro dependency 1870: libdiscoreExperiments */).ALL_LIBDISCORE_EXPERIMENTS;
|
||||
ALL_LIBDISCORE_EXPERIMENTS.forEach(_fun125613);
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const LIBDISCORE_LOADED = AnalyticEvents.LIBDISCORE_LOADED;
|
||||
Reflect.apply(track, defaultImport, [LIBDISCORE_LOADED, {success: true, experimental_features: []}]);
|
||||
}
|
||||
|
||||
function formatErrorMessage(a0) { // fn#125614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16460:768, offset: 0x025de718, size: 147 bytes, params: 2, frame: 17
|
||||
var r6;
|
||||
var name;
|
||||
var r4;
|
||||
var value;
|
||||
var message;
|
||||
const Error = global.Error;
|
||||
if (a0 instanceof Error) {
|
||||
message = a0.message;
|
||||
name = a0.name;
|
||||
r6 = message;
|
||||
} else {
|
||||
value = null;
|
||||
r6 = value != a0 ? global.String(a0) : 'Unknown error';
|
||||
name = value;
|
||||
}
|
||||
if (r6.length > 1000) {
|
||||
value = r6.substring(0, 997);
|
||||
value += '...';
|
||||
r4 = value;
|
||||
} else {
|
||||
r4 = r6;
|
||||
}
|
||||
return name == null ? r4 : '' + name + ': ' + r4;
|
||||
}
|
||||
|
||||
function trackLibdiscoreFailure(a0) { // fn#125615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16460:966, offset: 0x025de7ab, size: 94 bytes, params: 2, frame: 16
|
||||
env0_5.error('Failed to execute smoke test:', a0);
|
||||
const value2 = formatErrorMessage(a0);
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const LIBDISCORE_LOADED = AnalyticEvents.LIBDISCORE_LOADED;
|
||||
Reflect.apply(track, defaultImport, [LIBDISCORE_LOADED, {success: false, error: value2}]);
|
||||
}
|
||||
|
||||
function* _fun125611() { // fn#125611, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16460:309, offset: 0x025de5d8, size: 165 bytes, params: 1, frame: 17
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var value3;
|
||||
var initLibdiscore;
|
||||
var value4;
|
||||
var value5;
|
||||
var value6;
|
||||
var binding3;
|
||||
var value7;
|
||||
var rustMultiply;
|
||||
var value8;
|
||||
var info;
|
||||
var error;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
if (!env2_6) {
|
||||
reducibleJoin3: while (true) {
|
||||
reduciblePort29: while (true) {
|
||||
exceptionLanding28: while (true) {
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
break reducibleJoin3;
|
||||
}
|
||||
env2_10(error);
|
||||
break reduciblePort29;
|
||||
}
|
||||
env2_6 = true;
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
property = binding2[3];
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
value3 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
initLibdiscore = value3.initLibdiscore;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
value4 = Reflect.apply(initLibdiscore, value3, []);
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
yield value4;
|
||||
try {
|
||||
value5 = undefined;
|
||||
value6 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
if (value6) {
|
||||
return value5;
|
||||
}
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
binding3 = env2_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
property = binding3[4];
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
value7 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
rustMultiply = value7.rustMultiply;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
value8 = Reflect.apply(rustMultiply, value7, [6, 7]);
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
binding = env2_5;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
info = binding.info;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(info, binding, ['The answer for life the universe and everything is:', value8]);
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
binding = env2_8;
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
try {
|
||||
binding();
|
||||
} catch (error) {
|
||||
break exceptionLanding28;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun125613(a0) { // fn#125613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16460:638, offset: 0x025de6ee, size: 42 bytes, params: 2, frame: 11
|
||||
const enabledFeatureName = a0.getEnabledFeatureName();
|
||||
if (enabledFeatureName != null) {
|
||||
env0_0.push(enabledFeatureName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,277 @@
|
||||
/* Metro module 1870; source: modules/libdiscore/libdiscoreExperiments.tsx; dependencies: [15, 17, 18, 6, 7, 1871, 3, 1873, 44, 2] */
|
||||
function _fun20200(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:6, offset: 0x00ec208f, size: 649 bytes, params: 8, frame: 27
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_4 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_5 = importDefault(18) /* metro dependency 18 */;
|
||||
const env0_6 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_7 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_8 = (require(1871) /* metro dependency 1871: BridgedStore */).ensureValidMode;
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('libdiscoreExperiments');
|
||||
const Symbol = global.Symbol;
|
||||
const env0_11 = Symbol('unknown');
|
||||
value = _fun20205();
|
||||
const value3 = _fun20211(value);
|
||||
const value4 = _fun20216(value);
|
||||
const value5 = _fun20222(value);
|
||||
const value7 = new value4('2026-01-libdiscore-batch-store-refactor', 'batch-store-refactor');
|
||||
const value10 = new value5('2025-09-libdiscore-telemetry');
|
||||
const value13 = new value3('2025-11-defer-load-late-lazy-cache',
|
||||
'Allow react to render before lazy cache is loaded');
|
||||
const value15 = _fun20229(value);
|
||||
const value17 = new value15('2026-01-android-rmle', 'Android Pull Mode Rendering', 4);
|
||||
const value20 = new value15('2026-02-android-fresco-cache', 'Android Fresco Cache', 3);
|
||||
const value23 = new value3('2026-02-android-chat-mosaic-shared-pool', 'Android Chat Mosaic Shared Pool');
|
||||
const value26 = new value3('2026-03-mobile-hermes-occupancy-target', 'Android Hermes Occupancy Target');
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/libdiscore/libdiscoreExperiments.tsx');
|
||||
exports.ALL_LIBDISCORE_EXPERIMENTS = [];
|
||||
exports.LibdiscoreCachedExperiment = value;
|
||||
exports.LibdiscoreWrapperSimpleExperiment = value3;
|
||||
exports.LibdiscoreBatchStoreRefactorExperiment = value7;
|
||||
exports.TelemetryExperiment = value10;
|
||||
exports.DelayLoadLateLazyCacheHoldoutExperiment = value13;
|
||||
exports.AndroidPullModeRenderingExperiment = value17;
|
||||
exports.AndroidFrescoCacheExperiment = value20;
|
||||
exports.AndroidChatMosaicSharedPoolExperiment = value23;
|
||||
exports.AndroidHermesOccupancyTargetExperiment = value26;
|
||||
exports.isExperimentSyncDisabled = isExperimentSyncDisabled;
|
||||
exports.clearLibdiscoreExperimentCache = clearLibdiscoreExperimentCache;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_20202() { // fn#20202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:311, offset: 0x00ec237c, size: 94 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_20202_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun20205() { // fn#20205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:576, offset: 0x00ec23da, size: 128 bytes, params: 1, frame: 15
|
||||
return env0_7(LibdiscoreCachedExperiment, [{key: 'getEnabledFeatureName', value: function() {
|
||||
var value = this.getCachedConfig();
|
||||
return value === undefined || value.treatmentId <= 0 ? null : '' + this.id + ':' + value.treatmentId;
|
||||
}}, {key: 'getCachedConfig', value: value_20208}, {key: 'setExperiment', value: function(a0) {
|
||||
this.inner = a0;
|
||||
}}, {key: 'getCurrentConfig', value: value_20210}]);
|
||||
}
|
||||
|
||||
function _fun20211(a0) { // fn#20211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:1419, offset: 0x00ec25ee, size: 118 bytes, params: 2, frame: 16
|
||||
const closure = LibdiscoreWrapperSimpleExperiment;
|
||||
env0_5(closure, a0);
|
||||
return env0_7(closure, [{key: 'getLabel', value: function() {
|
||||
return this.label;
|
||||
}}, {key: 'getTreatments', value: function() {
|
||||
return [{treatmentId: 0}, {treatmentId: 1}];
|
||||
}}, {key: 'getCachedEnabled', value: function() {
|
||||
var value = this.getCachedConfig();
|
||||
return value == null || value.treatmentId === -1 ? this.defaultValue : value.treatmentId === 1;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun20216(a0) { // fn#20216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:1992, offset: 0x00ec2712, size: 141 bytes, params: 2, frame: 16
|
||||
const closure = LibdiscoreBridgedStoreExperiment;
|
||||
env0_5(closure, a0);
|
||||
return env0_7(closure, [{key: 'getCachedBridgedStoreMode', value: value_20218}, {key: 'getEnabledFeatureName',
|
||||
value: function() {
|
||||
var value = this.getCachedBridgedStoreMode();
|
||||
return value === 'typescript' ? null : 'BridgedStore[' + this.storeName + ',' + value + ']';
|
||||
}}, {key: 'getLabel', value: function() {
|
||||
return "libdiscore '" + this.storeName + "' Migration";
|
||||
}}, {key: 'getTreatments', value: function() {
|
||||
return [{treatmentId: 0}, {treatmentId: 1}, {treatmentId: 2}];
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun20222(a0) { // fn#20222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:2861, offset: 0x00ec28dc, size: 168 bytes, params: 2, frame: 16
|
||||
const closure = LibdiscoreTelemetryExperiment;
|
||||
env0_5(closure, a0);
|
||||
return env0_7(closure, [{key: 'getLabel', value: function() {
|
||||
return 'libdiscore Telemetry';
|
||||
}}, {key: 'getTreatments', value: function() {
|
||||
return [{treatmentId: 0}, {treatmentId: 1}, {treatmentId: 2}, {treatmentId: 3}];
|
||||
}}, {key: 'getMetricsSampleRate', value: function() {
|
||||
var r2;
|
||||
r2 = this.getCachedConfig()?.treatmentId;
|
||||
if (r2 === 1) {
|
||||
return 0.01;
|
||||
}
|
||||
if (r2 === 2) {
|
||||
return 0.05;
|
||||
}
|
||||
if (r2 === 3) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}}, {key: 'didEmit', value: function() {
|
||||
var emissionsCount = this.emissionsCount;
|
||||
this.emissionsCount = typeof emissionsCount === 'bigint' ? emissionsCount + 1n : +emissionsCount + 1;
|
||||
}}, {key: 'shouldCollectMetrics', value: function() {
|
||||
var r2;
|
||||
var r1;
|
||||
var r0;
|
||||
var value3;
|
||||
var value4;
|
||||
var value = this.getMetricsSampleRate();
|
||||
var value2 = value !== 0;
|
||||
if (value2) {
|
||||
value3 = value === 1;
|
||||
if (value3) {
|
||||
r1 = value3;
|
||||
} else {
|
||||
value4 = this.emissionsCount >= this.MAX_EMISSIONS_PER_APP_LAUNCH;
|
||||
if (value4) {
|
||||
r2 = !value4;
|
||||
} else {
|
||||
value = global.Math.random() < value;
|
||||
r2 = value;
|
||||
}
|
||||
r1 = r2;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun20229(a0) { // fn#20229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:3966, offset: 0x00ec2ad3, size: 93 bytes, params: 2, frame: 16
|
||||
const closure = LibdiscoreCustomTreatmentsExperiment;
|
||||
env0_5(closure, a0);
|
||||
return env0_7(closure, [{key: 'getLabel', value: function() {
|
||||
return this.label;
|
||||
}}, {key: 'getTreatments', value: function() {
|
||||
var Array = global.Array;
|
||||
return Array.from({length: this.treatmentCount}, _fun20233);
|
||||
}}]);
|
||||
}
|
||||
|
||||
function isExperimentSyncDisabled() { // fn#20234, offset: 0x00ec2baa, size: 9 bytes, params: 1, frame: 1
|
||||
return env0_12;
|
||||
}
|
||||
|
||||
function clearLibdiscoreExperimentCache() { // fn#20235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:5310, offset: 0x00ec2bb3, size: 104 bytes, params: 1, frame: 14
|
||||
var value;
|
||||
const shimNativeModule = require(1873) /* metro dependency 1873: shimNative */;
|
||||
if (shimNativeModule.isLibdiscoreInitialized()) {
|
||||
env0_9.info('Clearing libdiscore experiment cache and disabling sync');
|
||||
value = shimNativeModule;
|
||||
value = value.getExperimentCacher();
|
||||
value.clearCache();
|
||||
}
|
||||
}
|
||||
|
||||
function LibdiscoreCachedExperiment(a0) { // fn#20206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:597, offset: 0x00ec245a, size: 68 bytes, params: 2, frame: 14
|
||||
env1_6(this, LibdiscoreCachedExperiment);
|
||||
this.id = a0;
|
||||
this.inner = null;
|
||||
this.cachedConfig = env1_11;
|
||||
env1_10.push(this);
|
||||
}
|
||||
|
||||
function value_20208() { // fn#20208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:910, offset: 0x00ec24ed, size: 120 bytes, params: 1, frame: 14
|
||||
var moduleValue;
|
||||
const cachedConfig = this.cachedConfig;
|
||||
let value = environment.__proto__;
|
||||
if (cachedConfig === env1_11) {
|
||||
moduleValue = require(1873) /* metro dependency 1873: shimNative */;
|
||||
if (moduleValue.isLibdiscoreInitialized()) {
|
||||
value = require(1873) /* metro dependency 1873: shimNative */;
|
||||
value = value.getExperimentCacher();
|
||||
this.cachedConfig = value.getConfig(this.id);
|
||||
} else {
|
||||
this.cachedConfig = undefined;
|
||||
}
|
||||
}
|
||||
return this.cachedConfig;
|
||||
}
|
||||
|
||||
function value_20210() { // fn#20210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:1183, offset: 0x00ec2575, size: 121 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(44) /* metro dependency 44 */;
|
||||
let inner = this.inner;
|
||||
value(inner != null, 'experiment must be set before calling getCurrentConfig');
|
||||
value = 'getCurrentConfig' in this.inner;
|
||||
inner = this.inner;
|
||||
return value ? inner.getCurrentConfig({location: 'default'}) : inner.getConfig({location: 'default'});
|
||||
}
|
||||
|
||||
function LibdiscoreWrapperSimpleExperiment(a0, a1) { // fn#20212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:1431, offset: 0x00ec2664, size: 73 bytes, params: 3, frame: 17
|
||||
let value = a2;
|
||||
const r1 = value !== undefined ? value : false;
|
||||
value = environment.__proto__;
|
||||
env1_6(this, LibdiscoreWrapperSimpleExperiment);
|
||||
value = _callSuper_20201(this, LibdiscoreWrapperSimpleExperiment, [a0]);
|
||||
value.label = a1;
|
||||
value.defaultValue = r1;
|
||||
return value;
|
||||
}
|
||||
|
||||
function LibdiscoreBridgedStoreExperiment(a0, a1, a2) { // fn#20217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:2004, offset: 0x00ec279f, size: 65 bytes, params: 4, frame: 16
|
||||
let value = environment.__proto__;
|
||||
env1_6(this, LibdiscoreBridgedStoreExperiment);
|
||||
value = _callSuper_20201(this, LibdiscoreBridgedStoreExperiment, [a0, a2]);
|
||||
value.storeName = a1;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_20218() { // fn#20218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:2301, offset: 0x00ec27e0, size: 96 bytes, params: 1, frame: 13
|
||||
const r3 = this.getCachedConfig()?.treatmentId ?? -1;
|
||||
const r1 = r3 === 1 ? 'typescript-libdiscore-dual-read' : r3 === 2 ? 'libdiscore' : 'typescript';
|
||||
value = environment.__proto__;
|
||||
return ensureValidMode(r1);
|
||||
}
|
||||
|
||||
function LibdiscoreTelemetryExperiment(a0) { // fn#20223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:2873, offset: 0x00ec2984, size: 77 bytes, params: 2, frame: 17
|
||||
let value = copyRestArgs(0, undefined);
|
||||
env1_6(this, LibdiscoreTelemetryExperiment);
|
||||
const _callSuper_20201Binding = _callSuper_20201;
|
||||
const items2 = [];
|
||||
arraySpread(items2, value, 0, value);
|
||||
value = _callSuper_20201Binding(this, LibdiscoreTelemetryExperiment, items2);
|
||||
value.MAX_EMISSIONS_PER_APP_LAUNCH = 5;
|
||||
value.emissionsCount = 0;
|
||||
return value;
|
||||
}
|
||||
|
||||
function LibdiscoreCustomTreatmentsExperiment(a0, a1, a2) { // fn#20230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:3978, offset: 0x00ec2b30, size: 67 bytes, params: 4, frame: 16
|
||||
let value = environment.__proto__;
|
||||
env1_6(this, LibdiscoreCustomTreatmentsExperiment);
|
||||
value = _callSuper_20201(this, LibdiscoreCustomTreatmentsExperiment, [a0]);
|
||||
value.label = a1;
|
||||
value.treatmentCount = a2;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_20232() { // fn#20232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:4349, offset: 0x00ec2b73, size: 43 bytes, params: 1, frame: 13
|
||||
const Array = global.Array;
|
||||
return Array.from({length: this.treatmentCount}, function(a0, a1) {
|
||||
return {treatmentId: a1};
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/* Metro module 1871; source: modules/libdiscore/stores/BridgedStore.tsx; dependencies: [1872, 2] */
|
||||
function _fun20236(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1998:6, offset: 0x00ec2c1b, size: 94 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/libdiscore/stores/BridgedStore.tsx');
|
||||
exports.ensureValidMode = function(a0) {
|
||||
var value = a0;
|
||||
var value2 = 'typescript';
|
||||
return value2 === value || require(dependencyMap[0]).hasFluxApi() ? value : value2;
|
||||
};
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,44 @@
|
||||
/* Metro module 16253; source: modules/libdiscore/timerUtils.tsx; dependencies: [661, 3, 683, 6949, 1877, 2] */
|
||||
function _fun125616(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16461:6, offset: 0x025de809, size: 227 bytes, params: 8, frame: 20
|
||||
const closure = flushDelayLogs;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('libdiscore.timers');
|
||||
const env0_5 = [];
|
||||
const env0_6 = (importDefault(6949) /* metro dependency 6949 */)(closure, 5000);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/libdiscore/timerUtils.tsx');
|
||||
exports.setupLibdiscoreTimersMonitor = function() {
|
||||
importAll(dependencyMap[4]).setTimersMonitorCallback(onTimersDelayCallback);
|
||||
};
|
||||
}
|
||||
|
||||
function flushDelayLogs() { // fn#125617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16461:162, offset: 0x025de8ec, size: 165 bytes, params: 1, frame: 17
|
||||
var binding;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var LIBDISCORE_SLOW_TIMERS;
|
||||
var object2;
|
||||
if (env0_5.length !== 0) {
|
||||
binding = env0_4;
|
||||
binding.warn('[libdiscore.timers] Flushing ' + env0_5.length + ' delay logs', env0_5);
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
LIBDISCORE_SLOW_TIMERS = AnalyticEvents.LIBDISCORE_SLOW_TIMERS;
|
||||
object2 = {};
|
||||
object2.delay_reports = global.JSON.stringify(env0_5);
|
||||
Reflect.apply(track, defaultImport, [LIBDISCORE_SLOW_TIMERS, object2]);
|
||||
env0_5 = [];
|
||||
}
|
||||
}
|
||||
|
||||
function onTimersDelayCallback(a0, a1, a2, a3) { // fn#125618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16461:381, offset: 0x025de991, size: 99 bytes, params: 5, frame: 13
|
||||
env0_5.push({timerId: a0, expectedDelay: a1, actualDelay: a2, executionTime: a3});
|
||||
if (env0_5.length >= 10) {
|
||||
flushDelayLogs();
|
||||
} else {
|
||||
env0_6();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user