/* Metro module 12952; source: modules/interaction_components/InteractionModalStore.tsx; dependencies: [6, 7, 15, 17, 18, 1909, 44, 8055, 672, 7067, 566, 694, 2] */ function _fun98672(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#98672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:6, offset: 0x021b1fa4, size: 391 bytes, params: 8, frame: 21 var object2; const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(6) /* metro dependency 6 */; const env0_4 = importDefault(7) /* metro dependency 7 */; const env0_5 = importDefault(15) /* metro dependency 15 */; const env0_6 = importDefault(17) /* metro dependency 17 */; const env0_7 = importDefault(18) /* metro dependency 18 */; object2 = {IN_FLIGHT: 0}; object2[0] = 'IN_FLIGHT'; object2.ERRORED = 1; object2[1] = 'ERRORED'; object2.SUCCEEDED = 2; object2[2] = 'SUCCEEDED'; const Store = (importDefault(566) /* metro dependency 566: flux */).Store; let value = _fun98676(Store); value.displayName = 'InteractionModalStore'; value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: function() { env0_8 = null; env0_9 = null; env0_10 = null; env0_11 = null; env0_12 = null; return true; }, INTERACTION_MODAL_CREATE: INTERACTION_MODAL_CREATE_98680, INTERACTION_IFRAME_MODAL_CREATE: INTERACTION_IFRAME_MODAL_CREATE_98681, INTERACTION_QUEUE: INTERACTION_QUEUE_98682, INTERACTION_SUCCESS: INTERACTION_SUCCESS_98687, INTERACTION_FAILURE: INTERACTION_FAILURE_98688}); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/InteractionModalStore.tsx'); exports.default = value; exports.InteractionModalState = object2; } function _isNativeReflectConstruct_98673() { // fn#98673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:148, offset: 0x021b212b, 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_98673_isNativeReflectConstruct = function() { return !!result; })(); } function _fun98676(a0) { // fn#98676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:472, offset: 0x021b218d, size: 74 bytes, params: 2, frame: 15 const closure = InteractionModalStore; env0_7(closure, a0); return env0_4(closure, [{key: 'getModalState', value: value_98678}]); } function INTERACTION_MODAL_CREATE_98680({nonce}) { // fn#98680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:1023, offset: 0x021b220a, size: 83 bytes, params: 2, frame: 16 var defaultImport; if (nonce === env0_12) { defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */; defaultImport.deleteMessage(env0_11, env0_10, true); } return false; } function INTERACTION_QUEUE_98682({messageId, nonce, data, preflight}) { // fn#98682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:1319, offset: 0x021b225d, size: 389 bytes, params: 2, frame: 21 var r9; var defaultImport; var IN_FLIGHT; var closure; var channelId; const interactionType = data.interactionType; const InteractionTypes = (require(1909) /* metro dependency 1909: Server */).InteractionTypes; const APPLICATION_COMMAND = InteractionTypes.APPLICATION_COMMAND; if (APPLICATION_COMMAND === interactionType) { channelId = data.channelId; } else { var MODAL_SUBMIT = InteractionTypes.MODAL_SUBMIT; if (MODAL_SUBMIT === interactionType) { defaultImport = importDefault(44) /* metro dependency 44 */; r9 = env0_8 == null || env0_9 === env0_13.ERRORED; r9 = !r9 ? env0_9 === env0_13.SUCCEEDED : r9; defaultImport(r9, 'cannot submit multiple modals at once'); IN_FLIGHT = env0_13.IN_FLIGHT; closure = function(a0) { global.setTimeout(_fun98684, a0); }; if (preflight != null) { closure(2 * (importDefault(672) /* metro dependency 672: Durations */).Millis.MINUTE); preflight.then(_fun98685).catch(_fun98686); } else { closure(10 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND); } return true; } } return false; } function INTERACTION_SUCCESS_98687({nonce}) { // fn#98687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:1963, offset: 0x021b24ba, size: 53 bytes, params: 2, frame: 3 return nonce != null && nonce === env0_8 && true; } function INTERACTION_FAILURE_98688({nonce}) { // fn#98688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:2071, offset: 0x021b24ef, size: 53 bytes, params: 2, frame: 3 return nonce != null && nonce === env0_8 && true; } function value_98678(a0) { // fn#98678, offset: 0x021b21d7, size: 22 bytes, params: 2, frame: 4 return a0 !== env1_8 ? null : env1_9; } function startTimeout(a0) { // fn#98683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:1668, owner: INTERACTION_QUEUE_98682.startTimeout, offset: 0x021b23e2, size: 30 bytes, params: 2, frame: 13 global.setTimeout(_fun98684, a0); } function _fun98685() { // fn#98685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:1802, offset: 0x021b2453, size: 58 bytes, params: 1, frame: 12 const startTimeoutBinding = startTimeout; const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis; const SECOND = Millis.SECOND; return startTimeoutBinding(10 * SECOND); } function _fun98686() { // fn#98686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:1854, offset: 0x021b248d, size: 45 bytes, params: 1, frame: 11 let value = environment.__proto__; value = require(8055) /* metro dependency 8055: InteractionActionCreators */; return value.setFailed(nonce); } function _fun98684() { // fn#98684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:1684, offset: 0x021b2400, size: 83 bytes, params: 1, frame: 13 let value = environment.__proto__.__proto__; if (env2_8 === nonce && env2_9 === env2_13.IN_FLIGHT) { value = require(8055) /* metro dependency 8055: InteractionActionCreators */; value.setFailed(nonce); } }