/* Metro module 9016; source: modules/phone/PhoneActionCreators.tsx; dependencies: [5, 1226, 9014, 661, 694, 507, 5046, 480, 2] */ import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */ import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */ import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */ import * as PhoneConstantsModule from './PhoneConstants.tsx'; /* Metro dependency 9014 */ function _fun70147(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9201:6, offset: 0x01cf06e6, size: 367 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const object2 = {setCountryCode: setCountryCode, removePhone: function(a0, a1) { var HTTP = require(dependencyMap[5]).HTTP; return HTTP.del({url: Endpoints.PHONE, body: {password: a0, change_phone_reason: a1}, oldFormErrors: true, rejectWithError: false}); }, resendCode: function(a0) { var object = {}; var value2 = AuthenticationStore.getFingerprint(); if (value2 != null && value2 !== '') { object['X-Fingerprint'] = value2; } var HTTP = require(dependencyMap[5]).HTTP; return HTTP.post({url: Endpoints.RESEND_PHONE, headers: object, body: {phone: a0}, rejectWithError: false}); }, beginAddPhone: function(a0, a1) { var HTTP = require(dependencyMap[5]).HTTP; return HTTP.post({url: Endpoints.PHONE, body: {phone: a0, change_phone_reason: a1}, rejectWithError: false}); }, addPhone: function(a0, a1, a2) { var HTTP = require(dependencyMap[5]).HTTP; return HTTP.post({url: Endpoints.PHONE, body: {phone_token: a0, password: a1, change_phone_reason: a2}, oldFormErrors: true, rejectWithError: false}); }, addPhoneWithoutPassword: function(a0) { var HTTP = require(dependencyMap[5]).HTTP; return HTTP.post({url: Endpoints.PHONE_VERIFY_NO_PASSWORD, body: {code: a0}, rejectWithError: false}); }, beginReverifyPhone: function(a0, a1) { var HTTP = require(dependencyMap[5]).HTTP; return HTTP.post({url: Endpoints.PHONE_REVERIFY, body: {phone: a0, change_phone_reason: a1}, rejectWithError: false}); }, reverifyPhone: function(a0, a1, a2) { var HTTP = require(dependencyMap[5]).HTTP; return HTTP.post({url: Endpoints.PHONE_REVERIFY, body: {phone_token: a0, password: a1, change_phone_reason: a2}, oldFormErrors: true, rejectWithError: false}); }, validatePhoneForSupport: function(a0) { var HTTP = require(dependencyMap[5]).HTTP; return HTTP.post({url: Endpoints.VERIFY_PHONE_FOR_TICKET, body: {token: a0}, oldFormErrors: true, rejectWithError: false}); }, verifyPhone: verifyPhone}; (FileImportTrackerModule).fileFinishedImporting('modules/phone/PhoneActionCreators.tsx'); exports.default = object2; exports.ChangePhoneReason = {USER_ACTION_REQUIRED: 'user_action_required', USER_SETTINGS_UPDATE: 'user_settings_update', GUILD_PHONE_REQUIRED: 'guild_phone_required', MFA_PHONE_UPDATE: 'mfa_phone_update', CONTACT_SYNC: 'contact_sync'}; function setCountryCode(a0) { // fn#70148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9201:412, offset: 0x01cf0855, size: 57 bytes, params: 2, frame: 13 (Dispatcher).dispatch({type: 'PHONE_SET_COUNTRY_CODE', countryCode: a0}); } function verifyPhone(a0, a1) { // fn#70157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9201:1581, offset: 0x01cf0b88, size: 69 bytes, params: 3, frame: 13 const value = a2; const value2 = a3; const env0_0 = a0; const env0_1 = a1; const env0_2 = !(value !== undefined) || value; return (value2 !== undefined ? value2 : false)(_fun70159)(); function* _fun70159() { // fn#70159, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9201:1601, offset: 0x01cf0bd8, size: 286 bytes, params: 1, frame: 19 var value10; if (false) { return undefined; } const object = {}; value = environment.__proto__.__proto__; let binding = env2_4; const fingerprint = binding.getFingerprint(); if (fingerprint != null && fingerprint !== '') { object['X-Fingerprint'] = fingerprint; } if (env1_3) { object.authorization = ''; } binding = env2_1; const binding2 = env2_2; const value7 = binding(binding2[6]); const post = value7.post; const object2 = {}; const VERIFY_PHONE = env2_6.VERIFY_PHONE; object2.url = VERIFY_PHONE; object2.headers = object; object2.body = {phone: require, code: importDefault}; object2.oldFormErrors = true; const NetworkActionNames = env2_0(binding2[7]).NetworkActionNames; const USER_VERIFY_PHONE = NetworkActionNames.USER_VERIFY_PHONE; object2.trackedActionData = {event: USER_VERIFY_PHONE}; object2.rejectWithError = false; yield Reflect.apply(post, value7, [object2]); const value8 = undefined; if (false) { return value8; } if (dependencyMap) { value10 = env2_1(env2_2[4]); value10.dispatch({type: 'MODAL_POP', key: env2_5}); } return value8.body; } } } global.__d(_fun70147, 9016, [5, 1226, 9014, 661, 694, 507, 5046, 480, 2]) /* metro module 9016, dependencies: [5, 1226, 9014, 661, 694, 507, 5046, 480, 2] */;