225 lines
12 KiB
TypeScript
225 lines
12 KiB
TypeScript
/* Metro module 1950; source: intl/IntlLoaderStore.tsx; dependencies: [5, 685, 1951, 1244, 1961, 1282, 3230, 3705, 3736, 3738, 1216, 2] */
|
|
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as Module00685Module from '../by-id/module-00685.js'; /* Metro dependency 685 */
|
|
|
|
function _fun21735(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:6, offset: 0x00ef84a8, size: 216 bytes, params: 8, frame: 19
|
|
let env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = Module00685Module;
|
|
value = value.createWithEqualityFn(function(a0, a1) {
|
|
var env0_0 = a0;
|
|
var env0_1 = a1;
|
|
var object = {isLoading: false, inProgressLocale: undefined, error: undefined};
|
|
object.localeData = importDefault(dependencyMap[2]);
|
|
object.setLoadingStarted = _fun21755;
|
|
object.setLoadingSucceeded = _fun21756;
|
|
object.setLoadingFailed = _fun21757;
|
|
object.setLocaleData = _fun21758;
|
|
return object;
|
|
});
|
|
(FileImportTrackerModule).fileFinishedImporting('intl/IntlLoaderStore.tsx');
|
|
exports.useIntlLoaderStore = value;
|
|
exports.subscribeToIntlLoadingSuccess = subscribeToIntlLoadingSuccess;
|
|
exports.setAppLocale = function() {
|
|
return _setAppLocale.apply(this, arguments);
|
|
};
|
|
exports.useLocaleData = useLocaleData;
|
|
function _setAppLocale() { // fn#21736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:523, offset: 0x00ef8580, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun21738).apply(this, arguments);
|
|
function* _fun21738(a0) { // fn#21738, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:572, offset: 0x00ef85b9, size: 319 bytes, params: 2, frame: 19
|
|
var environment;
|
|
if (true) {
|
|
var env0_0 = a0;
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_4;
|
|
var state = binding.getState();
|
|
state.setLoadingStarted(a0);
|
|
var items2 = [];
|
|
binding = env2_0;
|
|
var binding2 = env2_2;
|
|
binding(binding2[3]).intl.setLocale(a0);
|
|
var push = items2.push;
|
|
Reflect.apply(push, items2, []);
|
|
items2.push(env2_3(_fun21740)());
|
|
items2.push(loadDateFnsLocale(a0));
|
|
items2.push(loadFormatJsLocale(a0));
|
|
items2.push(setMomentLocale(a0));
|
|
push = items2.push;
|
|
binding(binding2[10]).default.setTags({locale: a0});
|
|
var Promise = global.Promise;
|
|
Reflect.apply(push, items2, [Promise.resolve()]);
|
|
Promise = global.Promise;
|
|
yield Promise.all(items2).catch(_fun21744);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
state.setLoadingSucceeded(a0);
|
|
}
|
|
function* _fun21740() { // fn#21740, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:681, offset: 0x00ef8701, size: 112 bytes, params: 1, frame: 14
|
|
if (true) {
|
|
value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
var value3 = env4_0(env4_2[4]);
|
|
yield value3.preloadAllIntlMessageFiles();
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = env4_0(env4_2[5]);
|
|
yield value.loadAllMessagesInLocale(env1_0);
|
|
}
|
|
}
|
|
|
|
function loadDateFnsLocale() { // fn#21741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:790, offset: 0x00ef8771, size: 30 bytes, params: 1, frame: 13
|
|
return env3_6.apply(this, arguments);
|
|
}
|
|
|
|
function loadFormatJsLocale() { // fn#21742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:879, offset: 0x00ef878f, size: 30 bytes, params: 1, frame: 13
|
|
return env3_7.apply(this, arguments);
|
|
}
|
|
|
|
function setMomentLocale() { // fn#21743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:970, offset: 0x00ef87ad, size: 30 bytes, params: 1, frame: 13
|
|
return env3_8.apply(this, arguments);
|
|
}
|
|
|
|
function _fun21744(a0) { // fn#21744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:1178, offset: 0x00ef87cb, size: 28 bytes, params: 2, frame: 13
|
|
return env0_1.setLoadingFailed(a0, env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _loadDateFnsLocale() { // fn#21745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:1271, offset: 0x00ef87e7, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun21747).apply(this, arguments);
|
|
function* _fun21747(a0) { // fn#21747, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:1330, offset: 0x00ef8820, size: 135 bytes, params: 2, frame: 16
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var state = env2_4.getState();
|
|
var property = env2_0(env2_2[6]).dateFnsLocales[a0];
|
|
if (property != null) {
|
|
yield property();
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
state.setLocaleData(value);
|
|
} else {
|
|
state.setLocaleData(env2_1(env2_2[2]));
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function _loadFormatJsLocale() { // fn#21748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:1493, offset: 0x00ef88a7, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun21750).apply(this, arguments);
|
|
function* _fun21750(a0) { // fn#21750, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:1554, offset: 0x00ef88e0, size: 74 bytes, params: 2, frame: 12
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var property = env2_0(env2_2[7]).formatjsLocales[a0];
|
|
if (property == null) {
|
|
return undefined;
|
|
}
|
|
yield property();
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function _setMomentLocale() { // fn#21751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:1647, offset: 0x00ef892a, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun21753).apply(this, arguments);
|
|
function* _fun21753(a0) { // fn#21753, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:1702, offset: 0x00ef8963, size: 208 bytes, params: 2, frame: 18
|
|
var push;
|
|
var join;
|
|
var pop;
|
|
let value = a0;
|
|
if (true) {
|
|
var property = env2_0(env2_2[8]).momentLocales[value];
|
|
if (property != null) {
|
|
yield property();
|
|
reducibleJoin4: while (true) {
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
}
|
|
var items2 = [];
|
|
value = (value === 'no' ? 'nb' : value).split('-');
|
|
var length = value.length;
|
|
if (length > 0) {
|
|
reducibleLoop6: while (true) {
|
|
push = items2.push;
|
|
join = value.join;
|
|
Reflect.apply(push, items2, [Reflect.apply(join, value, ['-'])]);
|
|
pop = value.pop;
|
|
Reflect.apply(pop, value, []);
|
|
length = value.length;
|
|
if (length > 0) {
|
|
continue reducibleLoop6;
|
|
}
|
|
break reducibleLoop6;
|
|
}
|
|
}
|
|
items2.push('en-US');
|
|
env2_0(env2_2[9]).locale(items2);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function _fun21754(a0, a1) { // fn#21754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:138, offset: 0x00ef8a33, size: 106 bytes, params: 3, frame: 14
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const object = {isLoading: false, inProgressLocale: undefined, error: undefined};
|
|
object.localeData = importDefault(1951) /* metro dependency 1951 */;
|
|
object.setLoadingStarted = setLoadingStarted;
|
|
object.setLoadingSucceeded = setLoadingSucceeded;
|
|
object.setLoadingFailed = setLoadingFailed;
|
|
object.setLocaleData = setLocaleData;
|
|
return object;
|
|
function setLoadingStarted(a0) { // fn#21755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:234, offset: 0x00ef8a9d, size: 33 bytes, params: 2, frame: 11
|
|
return env0_0({isLoading: true, inProgressLocale: a0});
|
|
}
|
|
|
|
function setLoadingSucceeded(a0) { // fn#21756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:294, offset: 0x00ef8abe, size: 55 bytes, params: 2, frame: 12
|
|
if (require().inProgressLocale === a0) {
|
|
env0_0({isLoading: false, inProgressLocale: undefined, error: undefined});
|
|
}
|
|
}
|
|
|
|
function setLoadingFailed(a0, a1) { // fn#21757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:397, offset: 0x00ef8af5, size: 58 bytes, params: 3, frame: 12
|
|
if (require().inProgressLocale === a1) {
|
|
env0_0({isLoading: false, inProgressLocale: undefined, error: a0});
|
|
}
|
|
}
|
|
|
|
function setLocaleData(a0) { // fn#21758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:496, offset: 0x00ef8b2f, size: 26 bytes, params: 2, frame: 11
|
|
env0_0({localeData: a0});
|
|
}
|
|
|
|
}
|
|
|
|
function subscribeToIntlLoadingSuccess(a0) { // fn#21759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:2025, offset: 0x00ef8b49, size: 34 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
return env0_4.subscribe(_fun21760);
|
|
function _fun21760(a0, a1) { // fn#21760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:2087, offset: 0x00ef8b6b, size: 70 bytes, params: 3, frame: 13
|
|
if (a1.inProgressLocale != null && a0.inProgressLocale == null && a0.error == null) {
|
|
env0_0(a1.inProgressLocale);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function useLocaleData() { // fn#21762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2077:2287, offset: 0x00ef8bb1, size: 49 bytes, params: 1, frame: 13
|
|
return env0_4(function(a0) {
|
|
return a0.localeData;
|
|
}) ?? (importDefault(1951) /* metro dependency 1951 */);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun21735, 1950, [5, 685, 1951, 1244, 1961, 1282, 3230, 3705, 3736, 3738, 1216,
|
|
2]) /* metro module 1950, dependencies: [5, 685, 1951, 1244, 1961, 1282, 3230, 3705, 3736, 3738, 1216, 2] */;
|