/* Metro module 15653; source: modules/age_gate/native/AgeGateManager.tsx; dependencies: [5, 6, 7, 15, 17, 18, 1379, 1934, 3969, 1229, 661, 5072, 5080, 15654, 1962, 676, 4860, 2] */ function _fun119985(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15861:6, offset: 0x0251d347, size: 358 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(5) /* metro dependency 5 */; const env0_4 = importDefault(6) /* metro dependency 6 */; const env0_5 = importDefault(7) /* metro dependency 7 */; const env0_6 = importDefault(15) /* metro dependency 15 */; const env0_7 = importDefault(17) /* metro dependency 17 */; const env0_8 = importDefault(18) /* metro dependency 18 */; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */; const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */; let value = require(1229) /* metro dependency 1229: AgeGateConstants */; const env0_12 = value.EXISTING_USER_AGE_GATE_MODAL_KEY; const env0_13 = value.AgeGateSource; value = require(661) /* metro dependency 661: Constants */; const env0_14 = value.ChannelTypes; const env0_15 = value.GuildNSFWContentLevel; value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */; value = _fun119989(value); value = new value(); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/native/AgeGateManager.tsx'); exports.default = value; } function _isNativeReflectConstruct_119986() { // fn#119986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15861:307, offset: 0x0251d4ad, 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_119986_isNativeReflectConstruct = function() { return !!result; })(); } function _fun119989(a0) { // fn#119989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15861:510, offset: 0x0251d50f, size: 176 bytes, params: 2, frame: 16 const closure = AgeGateManager; env0_8(closure, a0); return env0_5(closure, [{key: 'handlePostConnectionOpen', value: value_119991}, {key: 'handleChannelSelect', value: value_119992}, {key: 'handleAgeGateModalOpen', value: value_119993}, {key: 'handleAgeGateModalClose', value: function() { importDefault(dependencyMap[12]).popWithKey(EXISTING_USER_AGE_GATE_MODAL_KEY); }}, {key: 'handleGuildUpdate', value: value_119997}]); } function AgeGateManager(a0) { // fn#119990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15861:522, offset: 0x0251d5bf, size: 197 bytes, params: 2, frame: 19 var r0; var Reflect; let value = copyRestArgs(0, undefined); let binding = env1_4; binding(this, AgeGateManager); const items = []; arraySpread(items, value, 0, items); value = env1_7(AgeGateManager); binding = env1_6; if (_isNativeReflectConstruct_119986()) { Reflect = global.Reflect; value = Reflect.construct(value, items, env1_7(this).constructor); r0 = value; } else { value = value.apply(this, items); r0 = value; } value = binding(this, r0); value.actions = {POST_CONNECTION_OPEN: value.handlePostConnectionOpen, CHANNEL_SELECT: value.handleChannelSelect, AGE_GATE_MODAL_OPEN: value.handleAgeGateModalOpen, AGE_GATE_MODAL_CLOSE: value.handleAgeGateModalClose, GUILD_UPDATE: value.handleGuildUpdate}; return value; } function value_119991() { // fn#119991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15861:1057, offset: 0x0251d684, size: 67 bytes, params: 1, frame: 14 const value = environment.__proto__; (require(5072) /* metro dependency 5072: AgeGateUtils */).maybeShowAgeGate(SelectedGuildStore.getGuildId(), SelectedChannelStore.getChannelId()); } function value_119992({guildId, channelId}) { // fn#119992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15861:1174, offset: 0x0251d6c7, size: 108 bytes, params: 2, frame: 16 const value = environment.__proto__; if (guildId != null && ChannelStore.getChannel(channelId)?.type !== ChannelTypes.GUILD_VOICE) { (require(5072) /* metro dependency 5072: AgeGateUtils */).maybeShowAgeGate(guildId, channelId); } } function value_119993({source}) { // fn#119993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15861:1349, offset: 0x0251d733, size: 80 bytes, params: 2, frame: 17 const defaultImport = importDefault(5080) /* metro dependency 5080: ModalActionCreators */; defaultImport.pushLazy(env1_3(_fun119995), {source: source}, EXISTING_USER_AGE_GATE_MODAL_KEY); } function value_119997({guild}) { // fn#119997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15861:1658, offset: 0x0251d847, size: 112 bytes, params: 2, frame: 15 let value = environment.__proto__; const guildId = SelectedGuildStore.getGuildId(); if (guildId != null && guild.id === guildId && guild.owner_configured_content_level === GuildNSFWContentLevel.AGE_RESTRICTED) { value = require(5072) /* metro dependency 5072: AgeGateUtils */; value.maybeShowAgeGate(guild.id, null); } } function* _fun119995() { // fn#119995, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15861:1391, offset: 0x0251d78e, size: 143 bytes, params: 1, frame: 17 var object2; if (false) { return undefined; } value = environment.__proto__.__proto__.__proto__; const binding = env3_0; const binding2 = env3_2; const value3 = binding(binding2[14]); let property = binding2[13]; yield value3(property, binding2.paths); const value4 = undefined; if (false) { return value4; } property = value4.default; const AUTH = env3_13.AUTH; if (AgeGateManager === AUTH) { object2 = {}; object2.animation = env3_0(env3_2[15]).ModalAnimation.SLIDE_IN_OUT; property.modalConfig = object2; } return property; }