/* Metro module 1300; source: unknown; dependencies: [57, 6, 7, 1284, 1283, 1286] */ 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 */ import * as Module01286Module from './module-01286.js'; /* Metro dependency 1286 */ function _fun14348(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#14348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1427:6, offset: 0x00e02efa, size: 143 bytes, params: 8, frame: 17 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); exports.DEFAULT_LOCALE = undefined; exports.IntlManager = undefined; exports.DEFAULT_LOCALE = 'en-US'; exports.IntlManager = _fun14349(); function _fun14349() { // fn#14349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1427:195, offset: 0x00e02f89, size: 199 bytes, params: 1, frame: 15 return CreateClassModule(IntlManager, [{key: 'withFormatters', value: value_14353}, {key: 'makeFormatFunction', value: function(a0) { var env0_0 = this; var format = a0.format; var env0_1 = a0.builder; var env0_2 = format.bind(this); return _fun14355; }}, {key: 'setLocale', value: function(a0) { this.currentLocale = a0; this.data = require(dependencyMap[4]).makeDataFormatters([this.currentLocale, this.defaultLocale], this.formatConfig, this._forceLookupMatcher); this.emitLocaleChange(a0); }}, {key: 'emitLocaleChange', value: function(a0) { var error; var iterator = this._localeSubscriptions[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(a0); } 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: 'string', value: function(a0) { var r0; var value = ''; if (a0 == null) { r0 = value; } else { value = a0(this.currentLocale); value = value.reserialize(); r0 = value; } return r0; }}, {key: 'reserialize', value: function(a0) { var r0; if (a0 == null) { return ''; } var value = a0(this.currentLocale); if (typeof value === 'string') { r0 = value; } else { value = value.reserialize(); r0 = value; } return r0; }}, {key: 'bindFormatValues', value: value_14360}]); function IntlManager({initialLocale, defaultLocale, formatConfig, forceLookupMatcher}) { // fn#14350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1427:216, offset: 0x00e03050, size: 283 bytes, params: 2, frame: 20 var environment; const r6 = initialLocale !== undefined ? initialLocale : env1_1.DEFAULT_LOCALE; const r5 = defaultLocale !== undefined ? defaultLocale : env1_1.DEFAULT_LOCALE; const r4 = formatConfig !== undefined ? formatConfig : (require(1284) /* metro dependency 1284 */).DEFAULT_FORMAT_CONFIG; const r3 = forceLookupMatcher !== undefined && forceLookupMatcher; const value = environment.__proto__; env1_4(this, IntlManager); this.onLocaleChange = function(a0) { a0._localeSubscriptions.add(a0); return _fun14352; }; this.currentLocale = r6; this.defaultLocale = r5; this.formatConfig = r4; this._forceLookupMatcher = r3; this.data = (require(1283) /* metro dependency 1283 */).makeDataFormatters([this.currentLocale, this.defaultLocale], this.formatConfig, this._forceLookupMatcher); const Set = global.Set; this._localeSubscriptions = new Set(); function onLocaleChange(a0) { // fn#14351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1427:492, owner: IntlManager.onLocaleChange, offset: 0x00e0316b, size: 39 bytes, params: 2, frame: 12 a0._localeSubscriptions.add(a0); return _fun14352; function _fun14352() { // fn#14352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1427:541, offset: 0x00e03192, size: 32 bytes, params: 1, frame: 11 return env1_0._localeSubscriptions.delete(env0_0); } } } function value_14353(a0) { // fn#14353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1427:873, offset: 0x00e031b2, size: 101 bytes, params: 2, frame: 20 var binding; var value2; var property; var property2; var makeFormatFunction; var formatFunction; var error; const Object = global.Object; const iterator = Object.entries(a0)[Symbol.iterator](); const iterator2 = iterator.next; let r2 = iterator; let item2 = Reflect.apply(iterator2, r2, []); let item = item2.value; item2 = item2.done ? undefined : r2; reducibleJoin2: while (true) { if (item2 === undefined) { return this; } break reducibleJoin2; } reducibleLoop2: while (true) { try { binding = env1_3; } catch (error) { try { item2.return(); } catch { } throw error; } try { value2 = binding(item, 2); } catch (error) { try { item2.return(); } catch { } throw error; } try { property = value2[0]; } catch (error) { try { item2.return(); } catch { } throw error; } try { property2 = value2[1]; } catch (error) { try { item2.return(); } catch { } throw error; } try { makeFormatFunction = this.makeFormatFunction; } catch (error) { try { item2.return(); } catch { } throw error; } try { formatFunction = Reflect.apply(makeFormatFunction, this, [property2]); } catch (error) { try { item2.return(); } catch { } throw error; } try { this[property] = formatFunction; } 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; } return this; } function value_14354({format, builder}) { // fn#14354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1427:1040, offset: 0x00e03217, size: 48 bytes, params: 2, frame: 12 const env0_2 = format.bind(this); return _fun14355; function _fun14355(a0, a1) { // fn#14355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1427:1127, offset: 0x00e03247, size: 52 bytes, params: 3, frame: 16 const value = null; return value == a0 ? value : env0_2(a0(env0_0.currentLocale), a1, builder); } } function value_14360(a0, {ast}, a2) { // fn#14360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1427:1780, offset: 0x00e0337d, size: 131 bytes, params: 4, frame: 14 return (Module01286Module).bindFormatValues({Builder: a0, nodes: ast, locales: [this.currentLocale, this.defaultLocale], dataFormatters: this.data, formatConfig: this.formatConfig, values: a2, keyPrefix: ''}); } } } global.__d(_fun14348, 1300, [57, 6, 7, 1284, 1283, 1286]) /* metro module 1300, dependencies: [57, 6, 7, 1284, 1283, 1286] */;