Files
2026-07-28 01:06:53 +03:00

70 lines
3.8 KiB
TypeScript

/* Metro module 1358; source: modules/experiments/apex/ApexExperiment.tsx; dependencies: [57, 1226, 1220, 1359, 490, 1360, 566, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ApexExperimentStore from './ApexExperimentStore.tsx'; /* Metro dependency 1220 */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ApexExperimentModule from '../../../external/discord_common/js/packages/apex/ApexExperiment.tsx'; /* Metro dependency 1359 */
import * as GlobalUtilsModule from '../../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
function _fun15575(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#15575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1485:6, offset: 0x00e3656b, size: 198 bytes, params: 8, frame: 20
const env0_0 = require;
const getUnitId2 = getUnitId;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(FileImportTrackerModule).fileFinishedImporting('modules/experiments/apex/ApexExperiment.tsx');
exports.default = function(a0) {
return importDefault(dependencyMap[3])(a0, ApexExperimentStore, getUnitId, useUnitId);
};
const ApexExperiment = (ApexExperimentModule).ApexExperiment;
exports.ApexExperiment = ApexExperiment;
exports.getUnitId = getUnitId2;
function getUnitId(a0, a1) { // fn#15576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1485:126, offset: 0x00e36631, size: 165 bytes, params: 3, frame: 12
var moduleValue;
var maybeExtractId;
var authenticationStoreBinding;
if (a0 === 'guild') {
return a1.guildId;
}
if (a0 === 'user') {
return AuthenticationStore.getId();
}
if (a0 === 'installation') {
moduleValue = require(490) /* metro dependency 490: FingerprintUtils */;
maybeExtractId = moduleValue.maybeExtractId;
authenticationStoreBinding = AuthenticationStore;
return Reflect.apply(maybeExtractId, moduleValue,
[authenticationStoreBinding.getInstallationForTracking()]) ?? '';
}
(GlobalUtilsModule).assertNever(a0);
}
function useUnitId(a0, a1) { // fn#15577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1485:351, offset: 0x00e366d6, size: 203 bytes, params: 3, frame: 17
var value;
const useStateFromStoresArray = FluxModule.useStateFromStoresArray;
const value3 = Module00057(Reflect.apply(useStateFromStoresArray, FluxModule, [[AuthenticationStore], function() {
var items = [AuthenticationStore.getId()];
items[1] = AuthenticationStore.getInstallationForTracking();
return items;
}]), 2);
const property = value3[0];
const property2 = value3[1];
if (a0 === 'guild') {
return a1.guildId;
}
if (a0 === 'user') {
return property;
}
if (a0 === 'installation') {
value = require(490) /* metro dependency 490: FingerprintUtils */;
value = value.maybeExtractId(property2);
return value ?? '';
}
(GlobalUtilsModule).assertNever(a0);
}
}
global.__d(_fun15575, 1358, [57, 1226, 1220, 1359, 490, 1360, 566,
2]) /* metro module 1358, dependencies: [57, 1226, 1220, 1359, 490, 1360, 566, 2] */;