602 lines
29 KiB
JavaScript
602 lines
29 KiB
JavaScript
/* Metro module 1302; source: unknown; dependencies: [57, 6, 7, 1301] */
|
|
import * as ClassCallCheckModule from './module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import * as CreateClassModule from './module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import * as Module00057Module from './module-00057.js'; /* Metro dependency 57 */
|
|
|
|
function _fun14367(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#14367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:6, offset: 0x00e03c32, size: 202 bytes, params: 8, frame: 17
|
|
var closure;
|
|
let value = this;
|
|
let env0_0 = require;
|
|
let env0_3 = Module00057Module;
|
|
if (!(value && value.__awaiter)) {
|
|
closure = function(a0, a1, a2, a3) {
|
|
var r2;
|
|
var value = a2;
|
|
var env0_0 = a0;
|
|
var env0_1 = a1;
|
|
var env0_2 = value;
|
|
var env0_3 = a3;
|
|
r2 = value || global.Promise;
|
|
value = Object.create(r2.prototype, {constructor: {value: r2}});
|
|
var value2 = new r2(_fun14369);
|
|
return value2 instanceof Object ? value2 : value;
|
|
};
|
|
}
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.MessageLoader = undefined;
|
|
exports.loadAllMessagesInLocale = loadAllMessagesInLocale;
|
|
exports.waitForAllDefaultIntlMessagesLoaded = waitForAllDefaultIntlMessagesLoaded;
|
|
exports.createLoader = createLoader;
|
|
exports.MessageLoader = _fun14384();
|
|
const env0_8 = [];
|
|
function _fun14368(a0, a1, a2, a3) { // fn#14368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:102, offset: 0x00e03cfc, size: 75 bytes, params: 5, frame: 12
|
|
let value = a2;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_3 = a3;
|
|
let r2 = value || global.Promise;
|
|
value = Object.create(r2.prototype, {constructor: {value: r2}});
|
|
r2 = new r2(_fun14369);
|
|
return r2 instanceof Object ? r2 : value;
|
|
function _fun14369(a0, a1) { // fn#14369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:148, offset: 0x00e03d47, size: 98 bytes, params: 3, frame: 16
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const step_143722 = step_14372;
|
|
const value2 = importAll.apply(env0_0, require || []);
|
|
step_143722(value2.next());
|
|
function fulfilled_14370(a0) { // fn#14370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:162, offset: 0x00d57fb9, size: 56 bytes, params: 2, frame: 12
|
|
var value;
|
|
var step_14372Binding;
|
|
var value2;
|
|
var next;
|
|
var value3;
|
|
var error;
|
|
try {
|
|
value = environment;
|
|
step_14372Binding = step_14372;
|
|
value2 = environment.__proto__;
|
|
next = importAll.next;
|
|
value3 = Reflect.apply(next, importAll, [a0]);
|
|
step_14372Binding(value3);
|
|
} catch (error) {
|
|
require(error);
|
|
}
|
|
}
|
|
|
|
function rejected_14371(a0) { // fn#14371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:219, offset: 0x00d57ff1, size: 57 bytes, params: 2, frame: 12
|
|
var value;
|
|
var step_14372Binding;
|
|
var value2;
|
|
var value3;
|
|
var error;
|
|
try {
|
|
value = environment;
|
|
step_14372Binding = step_14372;
|
|
value2 = environment.__proto__;
|
|
value3 = importAll.throw(a0);
|
|
step_14372Binding(value3);
|
|
} catch (error) {
|
|
require(error);
|
|
}
|
|
}
|
|
|
|
function step_14372(a0) { // fn#14372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:276, offset: 0x00e03da9, size: 77 bytes, params: 2, frame: 14
|
|
var value;
|
|
if (a0.done) {
|
|
env0_0(a0.value);
|
|
} else {
|
|
value = a0.value;
|
|
value = step_14372Adopt(value);
|
|
value.then(fulfilled_14370, rejected_14371);
|
|
}
|
|
function step_14372Adopt(a0) { // fn#14373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:311, owner: step_14372.adopt, offset: 0x00e03df6, size: 54 bytes, params: 2, frame: 12
|
|
const value = a0;
|
|
return value instanceof env2_2 ? value : new env2_2(_fun14374);
|
|
function _fun14374(a0) { // fn#14374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:360, offset: 0x00cd9b0e, size: 19 bytes, params: 2, frame: 11
|
|
a0(env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function loadAllMessagesInLocale(a0) { // fn#14375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:554, offset: 0x00e03e2c, size: 36 bytes, params: 2, frame: 15
|
|
const env0_0 = a0;
|
|
return env0_6(this, undefined, undefined, _fun14377);
|
|
function* _fun14377() { // fn#14377, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:619, offset: 0x00e03e59, size: 71 bytes, params: 1, frame: 14
|
|
var environment;
|
|
if (true) {
|
|
var Promise = global.Promise;
|
|
var all = Promise.all;
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_8;
|
|
yield Reflect.apply(all, Promise, [binding.map(function(a0) {
|
|
return a0._loadLocale(require);
|
|
})]);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function waitForAllDefaultIntlMessagesLoaded() { // fn#14379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:739, offset: 0x00e03eb7, size: 29 bytes, params: 1, frame: 15
|
|
return env0_6(this, undefined, undefined, _fun14381);
|
|
function* _fun14381() { // fn#14381, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:815, offset: 0x00e03edd, size: 71 bytes, params: 1, frame: 14
|
|
var environment;
|
|
if (true) {
|
|
var Promise = global.Promise;
|
|
var all = Promise.all;
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_8;
|
|
yield Reflect.apply(all, Promise, [binding.map(function(a0) {
|
|
return a0.waitForDefaultLocale();
|
|
})]);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function createLoader(a0, a1) { // fn#14383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:920, offset: 0x00e03f35, size: 49 bytes, params: 3, frame: 14
|
|
const env0_73 = new env0_7(a0, a1);
|
|
env0_8.push(env0_73);
|
|
return env0_73;
|
|
}
|
|
|
|
function _fun14384() { // fn#14384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:990, offset: 0x00e03f66, size: 295 bytes, params: 1, frame: 15
|
|
return CreateClassModule(MessageLoader, [{key: 'withDebugValues', value: function(a0, a1) {
|
|
this._debugKeyMap = a0;
|
|
this._localeFileMap = a1;
|
|
}}, {key: 'fallbackWith', value: function(a0) {
|
|
var r2;
|
|
var property;
|
|
var value = this;
|
|
if (value != null) {
|
|
r2 = value;
|
|
loopExit1: while (true) {
|
|
property = r2._parentLoader;
|
|
if (property === value) {
|
|
throw new global.Error('Setting `fallbackWith` on MessageLoader created a circular chain that would never resolve');
|
|
}
|
|
if (property != null) {
|
|
r2 = property;
|
|
continue;
|
|
}
|
|
break loopExit1;
|
|
}
|
|
}
|
|
value.fallbackLoader = a0;
|
|
a0._parentLoader = value;
|
|
}}, {key: 'get', value: value_14392}, {key: 'getMessageValue', value: value_14393}, {key: '_loadLocale',
|
|
value: value_14394}, {key: 'emitChange', value: function() {
|
|
var error;
|
|
var iterator = this._subscribers.values()[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) {
|
|
try {
|
|
item();
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
r2 = item2;
|
|
item2 = Reflect.apply(iterator2, r2, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r2;
|
|
if (item2 === undefined) {
|
|
break reducibleLoop2;
|
|
}
|
|
continue reducibleLoop2;
|
|
}
|
|
}}, {key: 'onChange', value: function(a0) {
|
|
var env0_0 = a0;
|
|
var env0_1 = this;
|
|
this._subscribers.add(a0);
|
|
return _fun14399;
|
|
}}, {key: 'isLocaleLoading', value: function(a0) {
|
|
var property = this._localeLoadingPromises[a0];
|
|
var value = undefined;
|
|
return (property === null || value === property ? value : property.current) != null;
|
|
}}, {key: 'isLocaleLoaded', value: function(a0) {
|
|
var r1;
|
|
r1 = arguments.length > 1 && arguments[1] !== undefined && arguments[1];
|
|
var property = this._localeLoadingPromises[a0];
|
|
return property != null && property.initialized != 0 && (r1 ? property.current == null : !r1);
|
|
}}, {key: 'waitForLocaleLoaded', value: value_14402}, {key: 'waitForDefaultLocale', value: value_14406}]);
|
|
function MessageLoader(a0, a1) { // fn#14385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:1011, offset: 0x00e0408d, size: 294 bytes, params: 3, frame: 20
|
|
var environment;
|
|
var r2;
|
|
var value;
|
|
var binding;
|
|
var value2;
|
|
var Object;
|
|
var keys;
|
|
var Set;
|
|
var prototype;
|
|
var value3;
|
|
var set;
|
|
var value4;
|
|
var InternalIntlMessage;
|
|
var defaultLocale;
|
|
var value5;
|
|
var internalIntlMessage;
|
|
var value6;
|
|
var hot;
|
|
var MessageLoader_loop2;
|
|
var entries;
|
|
var iterator;
|
|
var iterator2;
|
|
var item;
|
|
var item2;
|
|
var value7;
|
|
var property;
|
|
var property2;
|
|
var error;
|
|
exceptionSkip10: while (true) {
|
|
exceptionLanding10: while (true) {
|
|
var env0_0 = this;
|
|
value = environment.__proto__;
|
|
binding = env1_4;
|
|
value2 = environment;
|
|
binding(this, MessageLoader);
|
|
this.messages = {};
|
|
this.localeImportMap = a0;
|
|
Object = global.Object;
|
|
keys = Object.keys;
|
|
this.supportedLocales = Reflect.apply(keys, Object, [a0]);
|
|
this.defaultLocale = a1;
|
|
this._localeLoadingPromises = {};
|
|
this._parseCache = {};
|
|
Set = global.Set;
|
|
prototype = Set.prototype;
|
|
value3 = Object.create(prototype, {constructor: {value: Set}});
|
|
set = new Set();
|
|
value4 = set instanceof Object ? set : value3;
|
|
this._subscribers = value4;
|
|
InternalIntlMessage = (require(1301) /* metro dependency 1301 */).InternalIntlMessage;
|
|
defaultLocale = this.defaultLocale;
|
|
prototype = InternalIntlMessage.prototype;
|
|
value5 = Object.create(prototype, {constructor: {value: InternalIntlMessage}});
|
|
internalIntlMessage = new InternalIntlMessage([]);
|
|
value6 = internalIntlMessage instanceof Object ? internalIntlMessage : value5;
|
|
this.fallbackMessage = value6;
|
|
hot = env1_1.hot;
|
|
if (hot) {
|
|
MessageLoader_loop2 = MessageLoader_loop;
|
|
Object = global.Object;
|
|
entries = Object.entries;
|
|
iterator = Reflect.apply(entries, Object, [a0])[Symbol.iterator]();
|
|
iterator2 = iterator.next;
|
|
for (r2 = iterator; true; r2 = item2) {
|
|
item2 = Reflect.apply(iterator2, r2, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r2;
|
|
if (item2 === undefined) {
|
|
break;
|
|
}
|
|
try {
|
|
binding = env1_3;
|
|
} catch (error) {
|
|
break exceptionLanding10;
|
|
}
|
|
try {
|
|
value7 = binding(item, 2);
|
|
} catch (error) {
|
|
break exceptionLanding10;
|
|
}
|
|
try {
|
|
property = value7[0];
|
|
} catch (error) {
|
|
break exceptionLanding10;
|
|
}
|
|
try {
|
|
property2 = value7[1];
|
|
} catch (error) {
|
|
break exceptionLanding10;
|
|
}
|
|
try {
|
|
var env0_1 = property2;
|
|
} catch (error) {
|
|
break exceptionLanding10;
|
|
}
|
|
try {
|
|
MessageLoader_loop2(property);
|
|
} catch (error) {
|
|
break exceptionLanding10;
|
|
}
|
|
}
|
|
}
|
|
return undefined;
|
|
break exceptionSkip10;
|
|
}
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
break exceptionSkip10;
|
|
}
|
|
function MessageLoader_loop(a0) { // fn#14386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:1340, owner: MessageLoader._loop, offset: 0x00e041b3, size: 50 bytes, params: 2, frame: 13
|
|
const env0_0 = a0;
|
|
const hot = env2_1.hot;
|
|
hot.accept(env0_1, _fun14387);
|
|
function _fun14387() { // fn#14387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:1374, offset: 0x00e041e5, size: 33 bytes, params: 1, frame: 15
|
|
return env3_6(env1_0, undefined, undefined, _fun14389);
|
|
function* _fun14389() { // fn#14389, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:1411, offset: 0x00e0420f, size: 57 bytes, params: 1, frame: 12
|
|
if (true) {
|
|
var _loadLocale = this._loadLocale;
|
|
value = environment.__proto__.__proto__;
|
|
yield Reflect.apply(_loadLocale, this, [env2_0]);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
this._parseCache = {};
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function value_14393(a0, a1) { // fn#14393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:2674, offset: 0x00e04442, size: 201 bytes, params: 3, frame: 19
|
|
var r0;
|
|
var r2;
|
|
var value2;
|
|
var internalIntlMessage;
|
|
var object;
|
|
let _parseCache = this._parseCache;
|
|
let property = _parseCache[a1];
|
|
const value = undefined;
|
|
if (property === null) {
|
|
r0 = value;
|
|
} else if (value === property) {
|
|
r0 = value;
|
|
} else {
|
|
property = property[a0];
|
|
r0 = property;
|
|
}
|
|
if (r0) {
|
|
return r0;
|
|
}
|
|
if (this.messages[a1] != null) {
|
|
property = this.messages[a1][a0];
|
|
if (property != null) {
|
|
value2 = environment.__proto__;
|
|
internalIntlMessage = new (require(1301) /* metro dependency 1301 */).InternalIntlMessage(property, a1);
|
|
_parseCache = this._parseCache;
|
|
property = _parseCache[a1];
|
|
if (property === null) {
|
|
object = {};
|
|
_parseCache[a1] = object;
|
|
r2 = object;
|
|
} else if (value !== property) {
|
|
r2 = property;
|
|
} else {
|
|
object = {};
|
|
_parseCache[a1] = object;
|
|
r2 = object;
|
|
}
|
|
r2[a0] = internalIntlMessage;
|
|
return internalIntlMessage;
|
|
}
|
|
} else {
|
|
var supportedLocales = this.supportedLocales;
|
|
if (supportedLocales.includes(a1)) {
|
|
this._loadLocale(a1);
|
|
}
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function value_14394(a0) { // fn#14394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:3054, offset: 0x00e0450b, size: 36 bytes, params: 2, frame: 15
|
|
const env0_0 = a0;
|
|
return env1_6(this, undefined, undefined, _fun14396);
|
|
function* _fun14396() { // fn#14396, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:3107, offset: 0x00e04538, size: 391 bytes, params: 1, frame: 19
|
|
var initialized;
|
|
var r8;
|
|
var supportedLocales;
|
|
var value6;
|
|
var value9;
|
|
if (true) {
|
|
var messages = this.messages;
|
|
value = environment.__proto__;
|
|
if (messages[MessageLoader] == null) {
|
|
var _localeLoadingPromises = this._localeLoadingPromises;
|
|
var property = _localeLoadingPromises[MessageLoader];
|
|
var value3 = undefined;
|
|
var current = property === null || value3 === property ? value3 : property.current;
|
|
if (current == null) {
|
|
if (this.localeImportMap[MessageLoader] != null) {
|
|
value6 = this.localeImportMap[MessageLoader]();
|
|
_localeLoadingPromises = this._localeLoadingPromises;
|
|
property = _localeLoadingPromises[MessageLoader];
|
|
initialized = property === null || value3 === property ? value3 : property.initialized;
|
|
r8 = initialized !== null && value3 !== initialized;
|
|
r8 = r8 && initialized;
|
|
_localeLoadingPromises = this._localeLoadingPromises;
|
|
_localeLoadingPromises[MessageLoader] = {initialized: r8, current: value6};
|
|
messages = this.messages;
|
|
yield value6;
|
|
value9 = undefined;
|
|
if (false) {
|
|
return value9;
|
|
}
|
|
messages[MessageLoader] = value9.default;
|
|
_localeLoadingPromises = this._localeLoadingPromises;
|
|
_localeLoadingPromises[MessageLoader] = {initialized: true, current: value3};
|
|
this.emitChange();
|
|
return undefined;
|
|
}
|
|
supportedLocales = this.supportedLocales;
|
|
if (supportedLocales.includes(MessageLoader)) {
|
|
throw new global.Error('Requested to load locale ' + MessageLoader + ', which should be supported, but no source for translation data was provided.');
|
|
}
|
|
return undefined;
|
|
}
|
|
_localeLoadingPromises = this._localeLoadingPromises;
|
|
property = _localeLoadingPromises[MessageLoader];
|
|
current = property === null || value3 === property ? value3 : property.current;
|
|
yield current;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function value_14398(a0) { // fn#14398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:3951, offset: 0x00e046f3, size: 39 bytes, params: 2, frame: 12
|
|
const env0_0 = a0;
|
|
this._subscribers.add(a0);
|
|
return _fun14399;
|
|
function _fun14399() { // fn#14399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:4015, offset: 0x00e0471a, size: 29 bytes, params: 1, frame: 11
|
|
return env0_1._subscribers.delete(env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
function value_14402(a0) { // fn#14402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:4453, offset: 0x00e047bc, size: 34 bytes, params: 2, frame: 16
|
|
return env1_6(this, arguments, undefined, function(a0) {
|
|
var env0_0 = a0;
|
|
var env0_1 = this;
|
|
var env0_2 = arguments.length > 1 && arguments[1] !== undefined && arguments[1];
|
|
return _fun14404();
|
|
});
|
|
function _fun14403(a0) { // fn#14403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:4517, offset: 0x00e047de, size: 63 bytes, params: 2, frame: 13
|
|
const env0_0 = a0;
|
|
const r2 = arguments.length > 1 && arguments[1] !== undefined && arguments[1];
|
|
return _fun14405();
|
|
function _fun14404() { // fn#14404, offset: 0x00e0481d, size: 9 bytes, params: 1, frame: 1
|
|
return _fun14405;
|
|
}
|
|
|
|
function* _fun14405() { // fn#14405, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:4605, offset: 0x00e04826, size: 101 bytes, params: 1, frame: 13
|
|
if (true) {
|
|
value = environment.__proto__;
|
|
var property = env1_1._localeLoadingPromises[env1_0];
|
|
if (property == null) {
|
|
return env1_1._loadLocale(env1_0);
|
|
}
|
|
if (!(property.initialized && !env1_2)) {
|
|
yield property.current;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function value_14406() { // fn#14406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:4765, offset: 0x00e0488b, size: 34 bytes, params: 1, frame: 16
|
|
return env1_6(this, arguments, undefined, function() {
|
|
var env0_0 = this;
|
|
var env0_1 = arguments.length > 0 && arguments[0] !== undefined && arguments[0];
|
|
return _fun14408();
|
|
});
|
|
function _fun14407() { // fn#14407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:4829, offset: 0x00e048ad, size: 55 bytes, params: 1, frame: 13
|
|
const r2 = arguments.length > 0 && arguments[0] !== undefined && arguments[0];
|
|
return _fun14409();
|
|
function _fun14408() { // fn#14408, offset: 0x00e048e4, size: 9 bytes, params: 1, frame: 1
|
|
return _fun14409;
|
|
}
|
|
|
|
function* _fun14409() { // fn#14409, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:4916, offset: 0x00e048ed, size: 44 bytes, params: 1, frame: 14
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__;
|
|
const binding = env1_0;
|
|
return binding.waitForLocaleLoaded(binding.defaultLocale, env1_1);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function value_14392(a0, a1) { // fn#14392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1429:1924, offset: 0x00e042b2, size: 400 bytes, params: 3, frame: 25
|
|
var r2;
|
|
var r12;
|
|
var r11;
|
|
var value4;
|
|
var fallbackLoader;
|
|
var value5;
|
|
var _localeFileMap;
|
|
const value = a0;
|
|
const value2 = a1;
|
|
const messageValue = this.getMessageValue(value, value2);
|
|
if (messageValue != null) {
|
|
return messageValue;
|
|
}
|
|
if (this.isLocaleLoading(value2)) {
|
|
if (this.isLocaleLoaded(this.defaultLocale)) {
|
|
value4 = this.getMessageValue(value, this.defaultLocale);
|
|
if (value4 != null) {
|
|
return value4;
|
|
}
|
|
fallbackLoader = this.fallbackLoader;
|
|
value5 = undefined;
|
|
r2 = fallbackLoader === null || value5 === fallbackLoader ? value5 : fallbackLoader.get(value, value2);
|
|
if (r2 != null) {
|
|
return r2;
|
|
}
|
|
r12 = this._debugKeyMap == null ? value : '"' + this._debugKeyMap[value] + '" (' + value + ')';
|
|
_localeFileMap = this._localeFileMap;
|
|
r11 = _localeFileMap == null ? value2 : '' + value2 + ' (' + this._localeFileMap[value2] + ')';
|
|
_localeFileMap = this._localeFileMap;
|
|
global.console.warn('Requested message ' + r12 + ' does not have a value in the requested locale ' + r11 + ' nor the default locale ' + (_localeFileMap != null ? '' + this.defaultLocale + ' (' + this._localeFileMap[this.defaultLocale] + ')' : this.defaultLocale));
|
|
return this.fallbackMessage;
|
|
}
|
|
} else {
|
|
value4 = this.getMessageValue(value, this.defaultLocale);
|
|
if (value4 != null) {
|
|
return value4;
|
|
}
|
|
fallbackLoader = this.fallbackLoader;
|
|
value5 = undefined;
|
|
r2 = fallbackLoader === null || value5 === fallbackLoader ? value5 : fallbackLoader.get(value, value2);
|
|
if (r2 != null) {
|
|
return r2;
|
|
}
|
|
r12 = this._debugKeyMap == null ? value : '"' + this._debugKeyMap[value] + '" (' + value + ')';
|
|
_localeFileMap = this._localeFileMap;
|
|
r11 = _localeFileMap == null ? value2 : '' + value2 + ' (' + this._localeFileMap[value2] + ')';
|
|
_localeFileMap = this._localeFileMap;
|
|
global.console.warn('Requested message ' + r12 + ' does not have a value in the requested locale ' + r11 + ' nor the default locale ' + (_localeFileMap != null ? '' + this.defaultLocale + ' (' + this._localeFileMap[this.defaultLocale] + ')' : this.defaultLocale));
|
|
}
|
|
return this.fallbackMessage;
|
|
}
|
|
|
|
global.__d(_fun14367, 1302, [57, 6, 7, 1301]) /* metro module 1302, dependencies: [57, 6, 7, 1301] */;
|