Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

+67
View File
@@ -0,0 +1,67 @@
/* Metro module 4110; source: modules/auth/AuthInviteStore.tsx; dependencies: [6, 7, 15, 17, 18, 1418, 566, 694, 2] */
function _fun33739(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4275:6, offset: 0x0103a9d9, size: 275 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const env0_7 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let value = _fun33743(Store);
value.displayName = 'AuthInviteStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{AUTH_INVITE_UPDATE: AUTH_INVITE_UPDATE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/AuthInviteStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_33740() { // fn#33740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4275:148, offset: 0x0103aaec, size: 94 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_33740_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun33743(a0) { // fn#33743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4275:356, offset: 0x0103ab4a, size: 68 bytes, params: 2, frame: 15
const closure = AuthInviteStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'getGuild', value: value_33745}]);
}
function AUTH_INVITE_UPDATE({invite}) { // fn#33746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4275:775, offset: 0x0103ab9e, size: 75 bytes, params: 2, frame: 14
const guild = invite.guild;
if (guild == null) {
return false;
}
const binding = env0_7;
const id = guild.id;
const guildRecordUtilsModule = require(1418) /* metro dependency 1418: GuildRecordUtils */;
binding[id] = guildRecordUtilsModule.fromInviteGuild(guild);
}
@@ -0,0 +1,35 @@
/* Metro module 6910; source: modules/auth/LoginHandoffSource.tsx; dependencies: [1386, 670, 4246, 6537, 2] */
function _fun55004(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7088:6, offset: 0x01372fe6, size: 171 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoute;
const env0_3 = (require(670) /* metro dependency 670: UserSettingsConstants */).UserSettingsPath;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/LoginHandoffSource.tsx');
exports.LoginHandoffSource = {ROLE_SUBSCRIPTION: 'role_subscription',
ROLE_SUBSCRIPTION_SETTING: 'role_subscription_setting'};
exports.getLoginHandoffSourceFromRedirectTo = getLoginHandoffSourceFromRedirectTo;
}
function getLoginHandoffSourceFromRedirectTo(a0) { // fn#55005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7088:406, offset: 0x01373091, size: 158 bytes, params: 2, frame: 14
var r0;
var value5;
var moduleValue2;
const decodeURIComponent = global.decodeURIComponent;
const value = undefined;
const value2 = decodeURIComponent(a0);
const value4 = (require(4246) /* metro dependency 4246: LinkUtils */).tryParseChannelPath(value2);
if (value4 == null) {
value5 = value2.toLowerCase();
moduleValue2 = require(6537) /* metro dependency 6537: UserSettingsURLUtils */;
r0 = value5 !== moduleValue2.settingsPathToRoute(UserSettingsPath.SUBSCRIPTIONS_ROLE_SUBSCRIPTIONS) ? value : env0_4.ROLE_SUBSCRIPTION_SETTING;
} else if (value4.channelId === StaticChannelRoute.ROLE_SUBSCRIPTIONS) {
r0 = env0_4.ROLE_SUBSCRIPTION;
} else {
value5 = value2.toLowerCase();
moduleValue2 = require(6537) /* metro dependency 6537: UserSettingsURLUtils */;
r0 = value5 !== moduleValue2.settingsPathToRoute(UserSettingsPath.SUBSCRIPTIONS_ROLE_SUBSCRIPTIONS) ? value : env0_4.ROLE_SUBSCRIPTION_SETTING;
}
return r0;
}
@@ -0,0 +1,104 @@
/* Metro module 1372; source: modules/auth/LoginRequiredActionStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
function _fun15811(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#15811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1499:6, offset: 0x00e401c8, size: 337 bytes, params: 8, frame: 19
const closure = function(a0) {
env0_7 = a0.user.id;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_5 = {};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
let value = _fun15817(PersistedStore);
value.displayName = 'LoginRequiredActionStore';
value.persistKey = 'LoginRequiredActionStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{LOGIN_ATTEMPTED: function({required_actions, user_id}) {
var updateRequiredActionsBinding = updateRequiredActions;
env0_6 = user_id;
updateRequiredActionsBinding(user_id, required_actions);
}, CONNECTION_OPEN: closure, CURRENT_USER_UPDATE: closure, LOGOUT: LOGOUT_15826,
PASSWORD_UPDATED: function({userId}) {
updateRequiredActions(userId, null);
}, MULTI_ACCOUNT_REMOVE_ACCOUNT: function({userId}) {
updateRequiredActions(userId, null);
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/LoginRequiredActionStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_15812() { // fn#15812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1499:148, offset: 0x00e40319, size: 94 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_15812_isNativeReflectConstruct = function() {
return !!result;
})();
}
function updateRequiredActions(a0, a1) { // fn#15815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1499:364, offset: 0x00e40377, size: 55 bytes, params: 3, frame: 4
if (a1 == null) {
if (a0 in env0_5) {
delete env0_5[a0];
}
} else if (a0 != null) {
env0_5[a0] = a1;
}
}
function _fun15817(a0) { // fn#15817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1499:495, offset: 0x00e403c6, size: 164 bytes, params: 2, frame: 16
const closure = LoginRequiredActionStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: value_15819}, {key: 'requiredActions', value: value_15820},
{key: 'requiredActionsIncludes', value: function(a0, a1) {
var value = this.requiredActions(a0);
var env0_0 = value;
value = value != null;
return value && a1.reduce(_fun15822, false);
}}, {key: 'wasLoginAttemptedInSession', value: value_15823}, {key: 'getState', value: value_15824}]);
}
function LOGOUT_15826({isSwitchingAccount}) { // fn#15826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1499:1515, offset: 0x00e4059e, size: 53 bytes, params: 2, frame: 13
if (!(isSwitchingAccount || env0_7 == null)) {
updateRequiredActions(env0_7, null);
}
}
function value_15821(a0, a1) { // fn#15821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1499:989, offset: 0x00e4050b, size: 58 bytes, params: 3, frame: 14
let value = this.requiredActions(a0);
value = value != null;
return value && a1.reduce(_fun15822, false);
}
function value_15823(a0) { // fn#15823, offset: 0x00e40561, size: 16 bytes, params: 2, frame: 2
return env1_6 === a0;
}
function _fun15822(a0, a1) { // fn#15822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1499:1059, offset: 0x00e40545, size: 28 bytes, params: 3, frame: 12
return a0 || env0_0.includes(a1);
}
@@ -0,0 +1,29 @@
/* Metro module 5077; source: modules/auth/PromoEmailConsentStore.tsx; dependencies: [629, 690, 2] */
function _fun44076(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5255:6, offset: 0x01167dee, size: 141 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(629) /* metro dependency 629 */;
value = value.create(function() {
return {'required': false, 'checked': false, 'preChecked': false};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/PromoEmailConsentStore.tsx');
exports.setPromoEmailConsentState = setPromoEmailConsentState;
exports.setPromoEmailConsentChecked = setPromoEmailConsentChecked;
exports.usePromoEmailConsentStore = value;
}
function setPromoEmailConsentState(a0) { // fn#44078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5255:266, offset: 0x01167e8b, size: 52 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun44079);
}
function setPromoEmailConsentChecked(a0) { // fn#44080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5255:343, offset: 0x01167eda, size: 52 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun44081);
}
function _fun44081() { // fn#44081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5255:369, offset: 0x01167f0e, size: 34 bytes, params: 1, frame: 12
return env1_2.setState({checked: env0_0});
}
@@ -0,0 +1,30 @@
/* Metro module 15131; source: modules/auth/RedirectUnauthenticated.tsx; dependencies: [31, 661, 668, 33, 484, 3980, 2] */
function _fun115341(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15328:6, offset: 0x0245d52b, size: 194 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = function() {
var r0;
var value = global.location.pathname + global.location.search;
if (CONFERENCE_MODE_ENABLED) {
r0 = Routes.REGISTER;
} else {
value = require(dependencyMap[4]).getLoginPath(value, false);
r0 = value;
}
return r0;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(661) /* metro dependency 661: Constants */).Routes;
const env0_3 = (require(668) /* metro dependency 668: ConferenceModeConstants */).CONFERENCE_MODE_ENABLED;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/RedirectUnauthenticated.tsx');
exports.default = RedirectUnauthenticated;
exports.getRedirectPath = closure;
}
function RedirectUnauthenticated() { // fn#115343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15328:289, offset: 0x0245d647, size: 57 bytes, params: 1, frame: 14
const Redirect = (require(3980) /* metro dependency 3980 */).Redirect;
return <Redirect to={getRedirectPath()} />;
}
@@ -0,0 +1,42 @@
/* Metro module 14305; source: modules/auth/RegistrationConstants.tsx; dependencies: [676, 2] */
function _fun108258(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14502:6, offset: 0x02319aa3, size: 368 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/RegistrationConstants.tsx');
exports.RegistrationTransitionActionTypes = {VIEWED: 'viewed', SUBMITTED: 'submitted', RESEND_CODE: 'resend_code',
INPUT_ERROR: 'input_error', RESPONSE_ERROR: 'response_error', SUCCESS: 'success'};
exports.RegistrationSteps = {IDENTITY: 'identity', DISPLAY_NAME: 'display_name',
ACCOUNT_INFORMATION: 'account_information', FULL: 'full', AGE_GATE: 'age_gate', INVITE: 'invite',
SMS_VERIFY: 'sms_verify'};
exports.RegisterTransitionSteps = {ACCOUNT_IDENTITY: 'Account Identity',
ACCOUNT_DISPLAY_NAME: 'Account Display Name', ACCOUNT_INFORMATION: 'Account Information', AGE_GATE: 'Age Gate',
AGE_GATE_UNDERAGE: 'Age Gate Underage', PHONE_VERIFICATION: 'Phone Verification', REGISTER: 'Register',
CAPTCHA: 'Captcha'};
exports.authStateToRegisterTransitionStep = authStateToRegisterTransitionStep;
}
function authStateToRegisterTransitionStep(a0) { // fn#108259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14502:978, offset: 0x02319c13, size: 243 bytes, params: 2, frame: 14
const AuthStates = (require(676) /* metro dependency 676: ConstantsIOS */).AuthStates;
const REGISTER_IDENTITY = AuthStates.REGISTER_IDENTITY;
if (REGISTER_IDENTITY === a0) {
return env0_2.ACCOUNT_IDENTITY;
}
const REGISTER_DISPLAY_NAME = AuthStates.REGISTER_DISPLAY_NAME;
if (REGISTER_DISPLAY_NAME === a0) {
return env0_2.ACCOUNT_DISPLAY_NAME;
}
const REGISTER_ACCOUNT_INFORMATION = AuthStates.REGISTER_ACCOUNT_INFORMATION;
if (REGISTER_ACCOUNT_INFORMATION === a0) {
return env0_2.ACCOUNT_INFORMATION;
}
const AGE_GATE = AuthStates.AGE_GATE;
if (AGE_GATE === a0) {
return env0_2.AGE_GATE;
}
const VERIFY_PHONE = AuthStates.VERIFY_PHONE;
if (VERIFY_PHONE === a0) {
return env0_2.PHONE_VERIFICATION;
}
}
@@ -0,0 +1,25 @@
/* Metro module 14317; source: modules/auth/experiment/trackAgeGateSubmitted.tsx; dependencies: [661, 683, 3738, 2] */
function _fun108378(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14514:6, offset: 0x0231e94d, size: 120 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/experiment/trackAgeGateSubmitted.tsx');
exports.default = trackAgeGateSubmitted;
}
function trackAgeGateSubmitted(a0, a1) { // fn#108379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14514:214, offset: 0x0231e9c5, size: 189 bytes, params: 3, frame: 19
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const AGE_GATE_SUBMITTED = AnalyticEvents.AGE_GATE_SUBMITTED;
const object2 = {};
let value = (importDefault(3738) /* metro dependency 3738 */)();
value = value.diff(a0, 'years');
value = null;
object2.dob = value < 18 ? a0.format('YYYY-MM-DD') : value;
object2.dob_day = a0.date();
object2.dob_month = a0.month() + 1;
object2.dob_year = a0.year();
object2.source = {section: a1};
Reflect.apply(track, defaultImport, [AGE_GATE_SUBMITTED, object2]);
}
@@ -0,0 +1,28 @@
/* Metro module 16225; source: modules/auth/externalFingerprint.tsx; dependencies: [1226, 4123, 694, 2] */
function _fun125468(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16433:6, offset: 0x025d9a69, size: 118 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/externalFingerprint.tsx');
exports.default = externalFingerprint;
}
function externalFingerprint(a0) { // fn#125469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16433:186, offset: 0x025d9adf, size: 137 bytes, params: 2, frame: 15
var moduleValue;
var parse;
var moduleValue2;
var fingerprint;
var value;
if (!AuthenticationStore.isAuthenticated()) {
moduleValue = require(4123) /* metro dependency 4123 */;
parse = moduleValue.parse;
moduleValue2 = require(4123) /* metro dependency 4123 */;
fingerprint = Reflect.apply(parse, moduleValue, [moduleValue2.extract(a0)]).fingerprint;
if (fingerprint != null) {
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'FINGERPRINT', fingerprint: fingerprint});
}
}
}
@@ -0,0 +1,68 @@
/* Metro module 8977; source: modules/auth/getAuthenticationErrorsFromAPIError.tsx; dependencies: [2] */
function _fun69966(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9162:6, offset: 0x01cea1c4, size: 100 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/getAuthenticationErrorsFromAPIError.tsx');
exports.getAuthenticationErrorsFromAPIError = getAuthenticationErrorsFromAPIError;
exports.getAuthenticationErrorsFromV6OrEarlierAPIError = function(a0) {
var property = global.Object;
property = property.keys(a0.fields).length;
if (property > 0) {
return a0.fields;
}
var object = {message: a0.message};
if (a0.retryAfter != null) {
object.retry_after = a0.retryAfter;
}
return object;
};
}
function getAuthenticationErrorsFromAPIError(a0) { // fn#69967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9162:216, offset: 0x01cea228, size: 142 bytes, params: 2, frame: 15
var r2;
var Object;
var value;
var length;
var value2;
var property;
var getFirstFieldErrorMessage;
var value3;
var value4;
const object2 = {};
object2.error_code = a0.code;
if (a0.errors != null) {
Object = global.Object;
value = Object.keys(a0.errors);
length = value.length;
value2 = 0;
if (value2 < length) {
r2 = value2;
reducibleLoop5: while (true) {
property = value[r2];
getFirstFieldErrorMessage = a0.getFirstFieldErrorMessage;
value3 = Reflect.apply(getFirstFieldErrorMessage, a0, [property]);
object2[property] = [value3];
value4 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = value.length;
if (value4 < length) {
r2 = value4;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
} else {
object2.message = a0.message;
var retryAfter = a0.retryAfter;
reducibleJoin3: while (true) {
if (retryAfter == null) {
break reducibleJoin3;
}
retryAfter = a0.retryAfter;
object2.retry_after = retryAfter;
break reducibleJoin3;
}
}
return object2;
}
@@ -0,0 +1,58 @@
/* Metro module 15130; source: modules/auth/makeAuthenticated.tsx; dependencies: [31, 1226, 661, 33, 1355, 15131, 2] */
function _fun115338(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15327:6, offset: 0x0245d314, size: 176 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).LoginStates;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/makeAuthenticated.tsx');
exports.makeAuthenticated = function(a0, a1) {
var value = a2;
var env0_0 = a0;
var env0_1 = a1;
var env0_2 = value !== undefined ? value : {passProps: true};
var closure = _fun115340;
closure.displayName = 'Authenticated(' + (a0.displayName ?? a0.name ?? '<Unknown>') + ')';
return closure;
};
}
function makeAuthenticated(a0, a1) { // fn#115339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15327:238, offset: 0x0245d3c4, size: 119 bytes, params: 3, frame: 14
const value = a2;
const env0_0 = a0;
const env0_1 = a1;
const r1 = value !== undefined ? value : {passProps: true};
const closure = Authenticated;
closure.displayName = 'Authenticated(' + (a0.displayName ?? a0.name ?? '<Unknown>') + ')';
return closure;
}
function Authenticated(a0) { // fn#115340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15327:295, owner: makeAuthenticated.Authenticated, offset: 0x0245d43b, size: 240 bytes, params: 2, frame: 19
var r0;
let value = a0;
const authenticationUtilsModule = require(1355) /* metro dependency 1355: AuthenticationUtils */;
if (authenticationUtilsModule.isAuthenticated()) {
value = ((Component) => <Component {...env0_2.passProps ? value : null} />)(env0_0);
r0 = value;
} else if (AuthenticationStore.getLoginStatus() === LoginStates.LOGGING_IN) {
value = ((Component) => <Component {...env0_2.passProps ? value : null} />)(env0_0);
r0 = value;
} else if (AuthenticationStore.allowLogoutRedirect()) {
if (require != null) {
value = importDefault(15131) /* metro dependency 15131: RedirectUnauthenticated */;
value = ((Component) => <Component renderRedirect={((Component) => <Component />)(value)} />)(require);
r0 = value;
} else {
value = importDefault(15131) /* metro dependency 15131: RedirectUnauthenticated */;
value = ((Component) => <Component />)(value);
r0 = value;
}
} else {
value = ((Component) => <Component {...env0_2.passProps ? value : null} />)(env0_0);
r0 = value;
}
return r0;
}
@@ -0,0 +1,13 @@
/* Metro module 8985; source: modules/auth/makePasswordResetLink.tsx; dependencies: [661, 2] */
function _fun70017(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9170:6, offset: 0x01ceb7a0, size: 109 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(661) /* metro dependency 661: Constants */).Routes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/makePasswordResetLink.tsx');
exports.default = function(a0) {
var WEBAPP_ENDPOINT = global.window.GLOBAL_ENV.WEBAPP_ENDPOINT;
var RESET = Routes.RESET;
return 'https:' + WEBAPP_ENDPOINT + RESET + '#token=' + a0;
};
}
+211
View File
@@ -0,0 +1,211 @@
/* Metro module 14355; source: modules/auth/native/AuthManager.tsx; dependencies: [5, 6, 7, 15, 17, 18, 27, 11872, 661, 4661, 12022, 1375, 14356, 477, 11875, 9151, 12043, 12021, 6947, 694, 7148, 4561, 2] */
function _fun108634(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14552:6, offset: 0x02327e7d, size: 398 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 */;
let value = require(27) /* metro dependency 27 */;
const env0_9 = value.NativeModules;
const env0_10 = value.Keyboard;
const env0_11 = (require(11872) /* metro dependency 11872: PushNotificationPermissionStore */).PermissionStateType;
const env0_12 = (require(661) /* metro dependency 661: Constants */).ME;
const env0_13 = (require(4661) /* metro dependency 4661: NativePermissionConstants */).NotificationAuthorizationStatus;
const env0_14 = (require(12022) /* metro dependency 12022: NUFConstants */).NewUserTypes;
object = {REGISTER: 'register', LOGIN: 'login'};
value = importDefault(4561) /* metro dependency 4561: LifecycleManager */;
value = _fun108638(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/AuthManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_108635() { // fn#108635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14552:308, offset: 0x0232800b, 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_108635_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun108638(a0) { // fn#108638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14552:583, offset: 0x0232806d, size: 97 bytes, params: 2, frame: 16
const closure = AuthManager;
env0_8(closure, a0);
return env0_5(closure, [{key: '_initialize', value: value_108652}, {key: '_terminate', value: value_108653}]);
}
function AuthManager(a0) { // fn#108639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14552:595, offset: 0x023280ce, size: 240 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, AuthManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(AuthManager);
binding = env1_6;
if (_isNativeReflectConstruct_108635()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.handleRegister = handleRegister;
value.handleLogin = handleLogin_108641;
value.handlePushNotificationOptIn = _fun108642();
value.handleRegisterWithConnection = handleRegisterWithConnection;
value.handleRegisterComplete = handleRegisterComplete;
value.handleLoginWithConnection = handleLoginWithConnection;
value.handleConnectionOpen = handleConnectionOpen_108650;
value.handleLogout = function() {
importDefault(dependencyMap[20]).deleteAllInteractions();
var DCDShortcutManager = NativeModules.DCDShortcutManager;
if (DCDShortcutManager != null) {
DCDShortcutManager.handleLogout();
}
};
return value;
}
function value_108652() { // fn#108652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14552:2084, offset: 0x023284ee, size: 145 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.subscribe('CONNECTION_OPEN', this.handleConnectionOpen);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.subscribe('LOGIN_SUCCESS', this.handleLogin);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.subscribe('REGISTER_SUCCESS', this.handleRegister);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.subscribe('LOGOUT', this.handleLogout);
}
function value_108653() { // fn#108653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14552:2344, offset: 0x0232857f, size: 145 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('CONNECTION_OPEN', this.handleConnectionOpen);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('LOGIN_SUCCESS', this.handleLogin);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('REGISTER_SUCCESS', this.handleRegister);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('LOGOUT', this.handleLogout);
}
function handleRegister() { // fn#108640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14552:831, owner: AuthManager.handleRegister, offset: 0x023281be, size: 21 bytes, params: 1, frame: 2
env2_16 = env2_15.REGISTER;
}
function AuthManagerHandleLogin() { // fn#108641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14552:864, owner: AuthManager.handleLogin, offset: 0x023281d3, size: 21 bytes, params: 1, frame: 2
env2_16 = env2_15.LOGIN;
}
function _fun108642() { // fn#108642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14552:910, offset: 0x023281e8, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun108644);
return _fun108645;
}
function handleRegisterWithConnection() { // fn#108646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14552:1208, owner: AuthManager.handleRegisterWithConnection, offset: 0x023282b9, size: 98 bytes, params: 1, frame: 13
var moduleValue2;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
moduleValue2 = require(11875) /* metro dependency 11875: PushNotificationActionCreators */;
moduleValue2.setPushPermissionState(PermissionStateType.PROMPT_SEEN);
}
env0_0.handleRegisterComplete();
}
function handleRegisterComplete() { // fn#108647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14552:1331, owner: AuthManager.handleRegisterComplete, offset: 0x0232831b, size: 111 bytes, params: 1, frame: 13
var moduleValue2;
const value = environment.__proto__.__proto__;
const instantInviteUtilsModule = require(9151) /* metro dependency 9151: InstantInviteUtils */;
if (!instantInviteUtilsModule.hasDeferredInvite()) {
moduleValue2 = require(12043) /* metro dependency 12043: NUFActionCreators */;
moduleValue2.setNewUser(NewUserTypes.ORGANIC_REGISTERED);
}
(require(12021) /* metro dependency 12021: NUFActionCreators */).startOnboarding();
}
function handleLoginWithConnection() { // fn#108648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14552:1464, owner: AuthManager.handleLoginWithConnection, offset: 0x0232838a, size: 31 bytes, params: 1, frame: 11
env0_0.handlePushNotificationOptIn(_fun108649);
}
function AuthManagerHandleConnectionOpen() { // fn#108650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14552:1611, owner: AuthManager.handleConnectionOpen, offset: 0x023283f9, size: 180 bytes, params: 1, frame: 12
var DCDSKAdNetworkManager;
const binding = env2_16;
const REGISTER = env2_15.REGISTER;
if (REGISTER === binding) {
env0_0.handleRegisterWithConnection();
DCDSKAdNetworkManager = NativeModules.DCDSKAdNetworkManager;
if (DCDSKAdNetworkManager != null) {
DCDSKAdNetworkManager.updateConversionValue(1);
}
} else if (env2_15.LOGIN === binding) {
env0_0.handleLoginWithConnection();
DCDSKAdNetworkManager = NativeModules.DCDSKAdNetworkManager;
if (DCDSKAdNetworkManager != null) {
DCDSKAdNetworkManager.updateConversionValue(10);
}
} else {
(require(6947) /* metro dependency 6947: transitionToGuildNative */).transitionToGuild(ME);
}
}
function* _fun108644(a0) { // fn#108644, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14552:930, offset: 0x02328217, size: 162 bytes, params: 2, frame: 16
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
env4_10.dismiss();
if (env4_1(env4_2[11])()) {
a0();
} else {
var NativePermissionManager = env4_9.NativePermissionManager;
var getNotificationAuthorizationStatus = NativePermissionManager.getNotificationAuthorizationStatus;
yield Reflect.apply(getNotificationAuthorizationStatus, NativePermissionManager, []);
var value3 = undefined;
if (false) {
return value3;
}
var UNDETERMINED = env4_13.UNDETERMINED;
if (value3 === UNDETERMINED) {
env4_0(env4_2[12]).showPushNotificationPromptModal({onComplete: a0});
} else {
a0();
}
}
}
}
function _fun108649() { // fn#108649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14552:1500, offset: 0x023283a9, size: 80 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
(require(6947) /* metro dependency 6947: transitionToGuildNative */).transitionToGuild(ME);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DEFERRED_INVITE_SHOW'});
}
@@ -0,0 +1,127 @@
/* Metro module 15758; source: modules/auth/native/LoginRequiredActionManager.tsx; dependencies: [6, 7, 15, 17, 18, 1878, 1372, 661, 7007, 5076, 4860, 2] */
function _fun121015(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15966:6, offset: 0x0253cb69, size: 304 bytes, params: 8, frame: 19
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 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const loginRequiredActionStore = importDefault(1372) /* metro dependency 1372: LoginRequiredActionStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_10 = value.LoginRequiredActions;
const env0_11 = value.Routes;
const env0_12 = value.UserSettingsSections;
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun121019(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/LoginRequiredActionManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_121016() { // fn#121016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15966:239, offset: 0x0253cc99, 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_121016_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun121019(a0) { // fn#121019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15966:442, offset: 0x0253ccfb, size: 72 bytes, params: 2, frame: 15
const closure = LoginRequiredActionManager;
env0_7(closure, a0);
return env0_4(closure, [{key: 'handleConnectionOpen', value: value_121021}]);
}
function LoginRequiredActionManager(a0) { // fn#121020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15966:454, offset: 0x0253cd43, size: 145 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, LoginRequiredActionManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(LoginRequiredActionManager);
binding = env1_5;
if (_isNativeReflectConstruct_121016()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.actions = {POST_CONNECTION_OPEN: value.handleConnectionOpen};
return value;
}
function value_121021() { // fn#121021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15966:879, offset: 0x0253cdd4, size: 232 bytes, params: 1, frame: 17
var wasLoginAttemptedInSession;
var id;
var value3;
var requiredActionsIncludes;
var value4;
var defaultImport;
const currentUser = UserStore.getCurrentUser();
if (currentUser != null) {
wasLoginAttemptedInSession = LoginRequiredActionStore.wasLoginAttemptedInSession;
id = currentUser.id;
value3 = Reflect.apply(wasLoginAttemptedInSession, LoginRequiredActionStore, [id]);
requiredActionsIncludes = LoginRequiredActionStore.requiredActionsIncludes;
id = currentUser.id;
value4 = Reflect.apply(requiredActionsIncludes, LoginRequiredActionStore, [id,
[LoginRequiredActions.UPDATE_PASSWORD]]);
if (value3) {
if (value4) {
(require(7007) /* metro dependency 7007: openUserSettings */).openUserSettings({screen: UserSettingsSections.ACCOUNT_CHANGE_PASSWORD,
params: {isLoginRequiredAction: true}, onClose: onClose_121022});
} else if (value4) {
defaultImport = importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */;
defaultImport.logout('login_required_account_manager', Routes.LOGIN);
}
} else if (value4) {
defaultImport = importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */;
defaultImport.logout('login_required_account_manager', Routes.LOGIN);
}
}
}
function value_121021OnClose() { // fn#121022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15966:1128, owner: value_121021.onClose, offset: 0x0253cebc, size: 106 bytes, params: 1, frame: 15
var defaultImport;
const requiredActionsIncludes = LoginRequiredActionStore.requiredActionsIncludes;
const id = env0_0.id;
const UPDATE_PASSWORD = LoginRequiredActions.UPDATE_PASSWORD;
if (Reflect.apply(requiredActionsIncludes, LoginRequiredActionStore, [id, [UPDATE_PASSWORD]])) {
defaultImport = importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */;
defaultImport.logout('login_required_account_manager', Routes.LOGIN);
}
}
@@ -0,0 +1,12 @@
/* Metro module 8987; source: modules/auth/native/PasskeyButtonUpdateExperiment.tsx; dependencies: [1854, 2] */
function _fun70021(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9172:6, offset: 0x01ceb8d9, size: 177 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
value = value.createApexExperiment({'name': '2026-04-passkey-button-update', 'kind': 'installation',
defaultConfig: {'newButton': true, 'canDisable': true}, variations: {[1]: {'newButton': false,
'canDisable': false}, [2]: {'newButton': true, 'canDisable': false}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/PasskeyButtonUpdateExperiment.tsx');
exports.default = value;
}
@@ -0,0 +1,530 @@
/* Metro module 14303; source: modules/auth/native/RegistrationStepsUtils.tsx; dependencies: [5, 31, 13285, 5077, 14304, 14305, 661, 33, 480, 14306, 14312, 14313, 14325, 14326, 14332, 8971, 14334, 14335, 9019, 9016, 14339, 14340, 14344, 14345, 1861, 14315, 4131, 8977, 14352, 2] */
function _fun108207(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:6, offset: 0x02318942, size: 522 bytes, params: 8, frame: 21
const env0_0 = require;
const headerTitle_108208 = function() {
return null;
};
const closure = function() {
return _handleRegistrationSubmit.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
importAll(31) /* metro dependency 31 */;
const uniqueUsernamesStore = importDefault(13285) /* metro dependency 13285: UniqueUsernamesStore */;
const env0_5 = (require(5077) /* metro dependency 5077: PromoEmailConsentStore */).usePromoEmailConsentStore;
let value = require(14304) /* metro dependency 14304: RegistrationUIStore */;
const env0_6 = value.setRegistrationErrors;
const env0_7 = value.setSubmitting;
const env0_8 = value.useRegistrationUIStore;
const env0_9 = value.clearRegistrationErrorMessage;
value = require(14305) /* metro dependency 14305: RegistrationConstants */;
const env0_10 = value.authStateToRegisterTransitionStep;
const env0_11 = value.RegisterTransitionSteps;
const env0_12 = value.RegistrationSteps;
const env0_13 = value.RegistrationTransitionActionTypes;
const AuthStates = (require(661) /* metro dependency 661: Constants */).AuthStates;
const env0_15 = (require(33) /* metro dependency 33 */).jsx;
const WELCOME = AuthStates.WELCOME;
items = [WELCOME];
const REGISTER_IDENTITY = AuthStates.REGISTER_IDENTITY;
items[1] = REGISTER_IDENTITY;
const REGISTER_DISPLAY_NAME = AuthStates.REGISTER_DISPLAY_NAME;
items[2] = REGISTER_DISPLAY_NAME;
const REGISTER_ACCOUNT_INFORMATION = AuthStates.REGISTER_ACCOUNT_INFORMATION;
items[3] = REGISTER_ACCOUNT_INFORMATION;
const AGE_GATE = AuthStates.AGE_GATE;
items[4] = AGE_GATE;
const closure2 = getRegistrationSteps;
const closure3 = getNextAuthState;
const closure4 = getPreviousAuthState;
const closure5 = function(a0) {
var value2 = getPreviousAuthState(a0);
if (value2 != null) {
return authStateToRegisterTransitionStep(value2);
}
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/RegistrationStepsUtils.tsx');
exports.getRegistrationSteps = closure2;
exports.getAllAuthScreens = getAllAuthScreens;
exports.getNextAuthState = closure3;
exports.getPreviousAuthState = closure4;
exports.getPreviousRegistrationTransitionStep = closure5;
exports.getNextRegistrationTransitionStep = function(a0) {
var value2 = getNextAuthState(a0);
if (value2 != null) {
return authStateToRegisterTransitionStep(value2);
}
};
exports.handleNextOrSubmitRegistration = function() {
return _handleNextOrSubmitRegistration.apply(this, arguments);
};
exports.handleRegistrationSubmit = closure;
}
function _handleNextOrSubmitRegistration() { // fn#108209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:919, offset: 0x02318b4c, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun108211).apply(this, arguments);
}
function _handleRegistrationSubmit() { // fn#108213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:1274, offset: 0x02318c0f, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun108215).apply(this, arguments);
}
function getRegistrationSteps() { // fn#108216, offset: 0x02318e34, size: 9 bytes, params: 1, frame: 1
return env0_16;
}
function getNextAuthState(a0) { // fn#108217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:633, offset: 0x02318e3d, size: 65 bytes, params: 2, frame: 13
const registrationSteps = getRegistrationSteps();
const value2 = registrationSteps.indexOf(a0);
if (value2 !== -1) {
if (value2 !== registrationSteps.length - 1) {
return registrationSteps[value2 + 1];
}
}
}
function getPreviousAuthState(a0) { // fn#108218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:743, offset: 0x02318e7e, size: 58 bytes, params: 2, frame: 12
const registrationSteps = getRegistrationSteps();
const value2 = registrationSteps.indexOf(a0);
if (value2 !== -1) {
if (value2 !== 0) {
return registrationSteps[value2 - 1];
}
}
}
function getAllAuthScreens() { // fn#108220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:2088, offset: 0x02318edc, size: 1042 bytes, params: 1, frame: 22
const object2 = {};
const WELCOME = AuthStates.WELCOME;
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const USER_WELCOME = ImpressionNames.USER_WELCOME;
const headerTitle_108208Binding = headerTitle_108208;
object2[WELCOME] = {'ignoreKeyboard': true, 'fullscreen': true, 'impressionName': null, 'headerTitle': null,
'headerShown': false, impressionName: USER_WELCOME, headerTitle: headerTitle_108208Binding,
render: render_108221};
const REGISTER_IDENTITY = AuthStates.REGISTER_IDENTITY;
const object4 = {'ignoreKeyboard': true, 'fullscreen': true};
let USER_REGISTRATION = ImpressionNames.USER_REGISTRATION;
object4.impressionName = USER_REGISTRATION;
const ImpressionGroups = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionGroups;
let USER_REGISTRATION_FLOW = ImpressionGroups.USER_REGISTRATION_FLOW;
const IDENTITY = RegistrationSteps.IDENTITY;
object4.impressionProperties = {impression_group: USER_REGISTRATION_FLOW, step: IDENTITY};
object4.headerTitle = headerTitle_108208Binding;
object4.headerLeft = headerLeft_108222;
object4.render = render_108223;
object2[REGISTER_IDENTITY] = object4;
const REGISTER_DISPLAY_NAME = AuthStates.REGISTER_DISPLAY_NAME;
USER_REGISTRATION = ImpressionNames.USER_REGISTRATION;
USER_REGISTRATION_FLOW = ImpressionGroups.USER_REGISTRATION_FLOW;
const DISPLAY_NAME = RegistrationSteps.DISPLAY_NAME;
object2[REGISTER_DISPLAY_NAME] = {'ignoreKeyboard': true, 'fullscreen': true, impressionName: USER_REGISTRATION,
impressionProperties: {impression_group: USER_REGISTRATION_FLOW, step: DISPLAY_NAME},
headerTitle: headerTitle_108208Binding, headerLeft: headerLeft_108224, render: render_108225};
const REGISTER_ACCOUNT_INFORMATION = AuthStates.REGISTER_ACCOUNT_INFORMATION;
USER_REGISTRATION = ImpressionNames.USER_REGISTRATION;
USER_REGISTRATION_FLOW = ImpressionGroups.USER_REGISTRATION_FLOW;
const ACCOUNT_INFORMATION = RegistrationSteps.ACCOUNT_INFORMATION;
object2[REGISTER_ACCOUNT_INFORMATION] = {'ignoreKeyboard': true, 'fullscreen': true,
impressionName: USER_REGISTRATION, impressionProperties: {impression_group: USER_REGISTRATION_FLOW,
step: ACCOUNT_INFORMATION}, headerTitle: headerTitle_108208Binding, headerLeft: headerLeft_108226,
render: render_108227};
const VERIFY_PHONE = AuthStates.VERIFY_PHONE;
const USER_VERIFY_PHONE = ImpressionNames.USER_VERIFY_PHONE;
USER_REGISTRATION_FLOW = ImpressionGroups.USER_REGISTRATION_FLOW;
object2[VERIFY_PHONE] = {ignoreKeyboard: true, impressionName: USER_VERIFY_PHONE,
impressionProperties: {impression_group: USER_REGISTRATION_FLOW}, headerTitle: headerTitle_108208Binding,
headerLeft: headerLeft_108228, render: render_108229};
const LOGIN = AuthStates.LOGIN;
const USER_LOGIN = ImpressionNames.USER_LOGIN;
const USER_LOGIN_FLOW = ImpressionGroups.USER_LOGIN_FLOW;
object2[LOGIN] = {'ignoreKeyboard': true, 'fullscreen': true, impressionName: USER_LOGIN,
impressionProperties: {impression_group: USER_LOGIN_FLOW}, headerTitle: headerTitle_108208Binding,
render: render_108230};
const MFA = AuthStates.MFA;
object2[MFA] = {'fullscreen': true, 'ignoreKeyboard': true, 'headerTitle': null, 'headerShown': false,
headerTitle: headerTitle_108208Binding, render: render_108231};
const ACCOUNT_DISABLED_OR_DELETION_SCHEDULED = AuthStates.ACCOUNT_DISABLED_OR_DELETION_SCHEDULED;
object2[ACCOUNT_DISABLED_OR_DELETION_SCHEDULED] = {'ignoreKeyboard': true, 'fullscreen': true,
headerTitle: headerTitle_108208Binding, render: render_108232};
const COUNTRY_SELECT = AuthStates.COUNTRY_SELECT;
object2[COUNTRY_SELECT] = {ignoreKeyboard: true, headerTitle: headerTitle_108208Binding, render: render_108233};
const EXTERNAL_LINK = AuthStates.EXTERNAL_LINK;
object2[EXTERNAL_LINK] = {ignoreKeyboard: true, headerTitle: headerTitle_108208Binding, render: render_108236};
const AGE_GATE = AuthStates.AGE_GATE;
const USER_AGE_GATE = ImpressionNames.USER_AGE_GATE;
object2[AGE_GATE] = {'ignoreKeyboard': true, 'fullscreen': true, impressionName: USER_AGE_GATE,
headerTitle: headerTitle_108208Binding, headerLeft: headerLeft_108237, render: render_108238};
const AGE_GATE_UNDERAGE = AuthStates.AGE_GATE_UNDERAGE;
const USER_AGE_GATE_UNDERAGE = ImpressionNames.USER_AGE_GATE_UNDERAGE;
object2[AGE_GATE_UNDERAGE] = {'ignoreKeyboard': true, 'fullscreen': true, impressionName: USER_AGE_GATE_UNDERAGE,
impressionProperties: function({existingUser}) {
var object = {};
object.impression_group = require(dependencyMap[8]).ImpressionGroups.USER_REGISTRATION_FLOW;
object.existing_user = existingUser;
return object;
}, headerTitle: headerTitle_108208Binding, render: render_108240};
const COMPANION_REMOTE_AUTH = AuthStates.COMPANION_REMOTE_AUTH;
object2[COMPANION_REMOTE_AUTH] = {'ignoreKeyboard': true, 'fullscreen': true,
headerTitle: headerTitle_108208Binding, render: render_108242};
return object2;
}
function* _fun108211(a0, a1, a2) { // fn#108211, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:1004, offset: 0x02318b89, size: 134 bytes, params: 4, frame: 19
var object2;
if (true) {
value = environment.__proto__.__proto__;
env2_9();
var value3 = env2_18(a0);
if (value3 != null) {
object2 = {step: env2_10(a0), toStep: env2_10(value3)};
object2.actionType = env2_13.SUCCESS;
a2(object2);
a1.push(value3);
return undefined;
}
yield env2_23(a0, a1, a2);
}
}
function* _fun108215(a0, a1, a2) { // fn#108215, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:1347, offset: 0x02318c4c, size: 488 bytes, params: 4, frame: 27
var r12;
var username;
var value6;
var binding2;
var property;
var value8;
var registerFull;
var value9;
var value10;
var value11;
var object4;
var value12;
var SUCCESS;
var object5;
var REGISTER;
var error;
var APIError;
var value13;
var getAuthenticationErrorsFromAPIError;
var value14;
var value15;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_4;
var value3 = binding.registrationUsernameSuggestion();
binding = env2_8;
var getState = binding.getState;
var registrationOptions = Reflect.apply(getState, binding, []).registrationOptions;
var isNullOrEmpty2 = env2_0(env2_2[24]).isNullOrEmpty(value3);
var value5 = null;
reducibleJoin3: while (true) {
if (isNullOrEmpty2) {
r12 = value5;
break reducibleJoin3;
}
username = registrationOptions.username;
value6 = username === value3;
r12 = value6;
break reducibleJoin3;
}
var object6 = {};
copyDataProperties(object6, registrationOptions, undefined);
object6['usedUsernameSuggestion'] = r12;
var state = env2_5.getState();
reducibleJoin5: while (true) {
if (state.required) {
object6.promoEmailConsent = state;
break reducibleJoin5;
}
break reducibleJoin5;
}
env2_7(true);
env2_6({});
reducibleJoin7: while (true) {
reduciblePort42: while (true) {
exceptionLanding38: while (true) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding38;
}
break reducibleJoin7;
}
env2_7(false);
binding = env2_0;
APIError = binding(env2_2[26]).APIError;
if (!(error instanceof APIError)) {
return undefined;
}
binding = env2_0;
value13 = binding(env2_2[27]);
getAuthenticationErrorsFromAPIError = value13.getAuthenticationErrorsFromAPIError;
value14 = Reflect.apply(getAuthenticationErrorsFromAPIError, value13, [error]);
env2_6(value14);
value15 = env2_10(a0);
reducibleJoin42: while (true) {
if (value5 == value15) {
break reducibleJoin42;
}
binding = env2_1;
binding(env2_2[28])(a1, a2, value14, value15);
break reducibleJoin42;
}
break reduciblePort42;
}
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding38;
}
try {
property = binding2[25];
} catch (error) {
break exceptionLanding38;
}
try {
value8 = binding(property);
} catch (error) {
break exceptionLanding38;
}
try {
registerFull = value8.registerFull;
} catch (error) {
break exceptionLanding38;
}
try {
value9 = Reflect.apply(registerFull, value8, [object6]);
} catch (error) {
break exceptionLanding38;
}
yield value9;
try {
value10 = undefined;
value11 = false;
} catch (error) {
break exceptionLanding38;
}
if (value11) {
return value10;
}
try {
object4 = {};
} catch (error) {
break exceptionLanding38;
}
try {
binding = env2_10;
} catch (error) {
break exceptionLanding38;
}
try {
value12 = binding(a0);
} catch (error) {
break exceptionLanding38;
}
try {
object4.step = value12;
} catch (error) {
break exceptionLanding38;
}
try {
binding = env2_13;
} catch (error) {
break exceptionLanding38;
}
try {
SUCCESS = binding.SUCCESS;
} catch (error) {
break exceptionLanding38;
}
try {
object4.actionType = SUCCESS;
} catch (error) {
break exceptionLanding38;
}
try {
object4.overrideRegistrationOptions = object6;
} catch (error) {
break exceptionLanding38;
}
try {
a2(object4);
} catch (error) {
break exceptionLanding38;
}
try {
object5 = {};
} catch (error) {
break exceptionLanding38;
}
try {
binding = env2_11;
} catch (error) {
break exceptionLanding38;
}
try {
REGISTER = binding.REGISTER;
} catch (error) {
break exceptionLanding38;
}
try {
object5.step = REGISTER;
} catch (error) {
break exceptionLanding38;
}
try {
binding = env2_13;
} catch (error) {
break exceptionLanding38;
}
try {
SUCCESS = binding.SUCCESS;
} catch (error) {
break exceptionLanding38;
}
try {
object5.actionType = SUCCESS;
} catch (error) {
break exceptionLanding38;
}
try {
object5.overrideRegistrationOptions = object6;
} catch (error) {
break exceptionLanding38;
}
try {
a2(object5);
} catch (error) {
break exceptionLanding38;
}
}
}
function getAllAuthScreensRender() { // fn#108221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:2267, owner: getAllAuthScreens.render, offset: 0x023192ee, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(14306) /* metro dependency 14306: Welcome */);
}
function getAllAuthScreensHeaderLeft(a0) { // fn#108222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:2537, owner: getAllAuthScreens.headerLeft, offset: 0x02319315, size: 85 bytes, params: 2, frame: 15
const value = environment.__proto__;
const BackButtonWithTracking = (require(14312) /* metro dependency 14312: RegistrationUtils */).BackButtonWithTracking;
const backButtonWithTrackingProps = {...a0};
const getPreviousRegistrationTransitionStepBinding = getPreviousRegistrationTransitionStep;
const REGISTER_IDENTITY = AuthStates.REGISTER_IDENTITY;
backButtonWithTrackingProps['destinationStep'] = getPreviousRegistrationTransitionStepBinding(REGISTER_IDENTITY);
return <BackButtonWithTracking {...backButtonWithTrackingProps} />;
}
function getAllAuthScreensRender_108223() { // fn#108223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:2664, owner: getAllAuthScreens.render, offset: 0x0231936a, size: 45 bytes, params: 1, frame: 13
const RegisterIdentity = (require(14313) /* metro dependency 14313: RegisterIdentity */).RegisterIdentity;
return <RegisterIdentity />;
}
function getAllAuthScreensHeaderLeft_108224(a0) { // fn#108224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:2960, owner: getAllAuthScreens.headerLeft, offset: 0x02319397, size: 85 bytes, params: 2, frame: 15
const value = environment.__proto__;
const BackButtonWithTracking = (require(14312) /* metro dependency 14312: RegistrationUtils */).BackButtonWithTracking;
const backButtonWithTrackingProps = {...a0};
const getPreviousRegistrationTransitionStepBinding = getPreviousRegistrationTransitionStep;
const REGISTER_DISPLAY_NAME = AuthStates.REGISTER_DISPLAY_NAME;
backButtonWithTrackingProps['destinationStep'] = getPreviousRegistrationTransitionStepBinding(REGISTER_DISPLAY_NAME);
return <BackButtonWithTracking {...backButtonWithTrackingProps} />;
}
function getAllAuthScreensRender_108225() { // fn#108225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:3091, owner: getAllAuthScreens.render, offset: 0x023193ec, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(14325) /* metro dependency 14325: RegisterDisplayName */);
}
function getAllAuthScreensHeaderLeft_108226(a0) { // fn#108226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:3384, owner: getAllAuthScreens.headerLeft, offset: 0x02319413, size: 85 bytes, params: 2, frame: 15
const value = environment.__proto__;
const BackButtonWithTracking = (require(14312) /* metro dependency 14312: RegistrationUtils */).BackButtonWithTracking;
const backButtonWithTrackingProps = {...a0};
const getPreviousRegistrationTransitionStepBinding = getPreviousRegistrationTransitionStep;
const REGISTER_ACCOUNT_INFORMATION = AuthStates.REGISTER_ACCOUNT_INFORMATION;
backButtonWithTrackingProps['destinationStep'] = getPreviousRegistrationTransitionStepBinding(REGISTER_ACCOUNT_INFORMATION);
return <BackButtonWithTracking {...backButtonWithTrackingProps} />;
}
function getAllAuthScreensRender_108227() { // fn#108227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:3522, owner: getAllAuthScreens.render, offset: 0x02319468, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(14326) /* metro dependency 14326: RegisterAccountInformation */);
}
function getAllAuthScreensHeaderLeft_108228(a0) { // fn#108228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:3758, owner: getAllAuthScreens.headerLeft, offset: 0x0231948f, size: 76 bytes, params: 2, frame: 15
const BackButtonWithTracking = (require(14312) /* metro dependency 14312: RegistrationUtils */).BackButtonWithTracking;
const ACCOUNT_IDENTITY = RegisterTransitionSteps.ACCOUNT_IDENTITY;
return <BackButtonWithTracking {...a0} {...{['destinationStep']: ACCOUNT_IDENTITY}} />;
}
function getAllAuthScreensRender_108229(a0) { // fn#108229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:3845, owner: getAllAuthScreens.render, offset: 0x023194db, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component {...a0} />)(importDefault(14332) /* metro dependency 14332: VerifyPhone */);
}
function getAllAuthScreensRender_108230() { // fn#108230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:4073, owner: getAllAuthScreens.render, offset: 0x0231950c, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(8971) /* metro dependency 8971: Login */);
}
function getAllAuthScreensRender_108231() { // fn#108231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:4180, owner: getAllAuthScreens.render, offset: 0x02319533, size: 46 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component inContainer />)(importDefault(14334) /* metro dependency 14334: MFA */);
}
function getAllAuthScreensRender_108232(a0) { // fn#108232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:4321, owner: getAllAuthScreens.render, offset: 0x02319561, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component {...a0} />)(importDefault(14335) /* metro dependency 14335: AccountDisabledOrDeletionScheduled */);
}
function getAllAuthScreensRender_108233(a0, a1) { // fn#108233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:4413, owner: getAllAuthScreens.render, offset: 0x02319592, size: 72 bytes, params: 3, frame: 15
var environment;
const env0_0 = a1;
const value = environment.__proto__;
return ((Component) => <Component onClose={function() {
return require.pop();
}} onCountrySelected={onCountrySelected} />)(importDefault(9019) /* metro dependency 9019: CountryCallingCodeSelect */);
}
function getAllAuthScreensRender_108236(a0) { // fn#108236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:4571, owner: getAllAuthScreens.render, offset: 0x02319603, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component {...a0} />)(importDefault(14339) /* metro dependency 14339: ExternalLink */);
}
function getAllAuthScreensHeaderLeft_108237(a0) { // fn#108237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:4728, owner: getAllAuthScreens.headerLeft, offset: 0x02319634, size: 85 bytes, params: 2, frame: 15
const value = environment.__proto__;
const BackButtonWithTracking = (require(14312) /* metro dependency 14312: RegistrationUtils */).BackButtonWithTracking;
const backButtonWithTrackingProps = {...a0};
const getPreviousRegistrationTransitionStepBinding = getPreviousRegistrationTransitionStep;
const AGE_GATE = AuthStates.AGE_GATE;
backButtonWithTrackingProps['destinationStep'] = getPreviousRegistrationTransitionStepBinding(AGE_GATE);
return <BackButtonWithTracking {...backButtonWithTrackingProps} />;
}
function getAllAuthScreensRender_108238() { // fn#108238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:4846, owner: getAllAuthScreens.render, offset: 0x02319689, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(14340) /* metro dependency 14340: RegisterAgeGate */);
}
function getAllAuthScreensRender_108240(a0, a1) { // fn#108240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:5140, owner: getAllAuthScreens.render, offset: 0x023196ec, size: 70 bytes, params: 3, frame: 14
var environment;
const env0_0 = a1;
const value = environment.__proto__;
return ((Component) => <Component onClose={function() {
return require.popToTop();
}} {...a0} />)(importDefault(14344) /* metro dependency 14344: AgeGateUnderage */);
}
function getAllAuthScreensRender_108242() { // fn#108242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:5282, owner: getAllAuthScreens.render, offset: 0x02319745, size: 45 bytes, params: 1, frame: 13
const CompanionRemoteAuth = (require(14345) /* metro dependency 14345: CompanionRemoteAuth */).CompanionRemoteAuth;
return <CompanionRemoteAuth />;
}
function onCountrySelected(a0) { // fn#108235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14500:4470, owner: getAllAuthScreens.render.onCountrySelected, offset: 0x023195da, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return (importDefault(9016) /* metro dependency 9016: PhoneActionCreators */).setCountryCode(a0);
}
@@ -0,0 +1,77 @@
/* Metro module 14304; source: modules/auth/native/RegistrationUIStore.tsx; dependencies: [629, 690, 2] */
function _fun108245(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14501:6, offset: 0x02319796, size: 199 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(629) /* metro dependency 629 */;
value = value.create(function() {
return {errors: {}, registrationOptions: {}, submitting: false, registrationVariant: undefined};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/RegistrationUIStore.tsx');
exports.useRegistrationUIStore = value;
exports.setRegistrationErrors = setRegistrationErrors;
exports.clearRegistrationErrorMessage = clearRegistrationErrorMessage;
exports.updateRegistrationOptions = updateRegistrationOptions;
exports.resetRegistration = resetRegistration;
exports.setSubmitting = setSubmitting;
exports.doesRegistrationHaveIdentityType = doesRegistrationHaveIdentityType;
}
function setRegistrationErrors(a0) { // fn#108247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14501:326, offset: 0x0231987f, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun108248);
}
function clearRegistrationErrorMessage() { // fn#108249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14501:446, offset: 0x023198d9, size: 85 bytes, params: 1, frame: 14
const object2 = {};
const binding = env0_2;
const getState = binding.getState;
copyDataProperties(object2, Reflect.apply(getState, binding, []).errors, binding);
delete object2.message;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun108250);
}
function updateRegistrationOptions(a0) { // fn#108251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14501:617, offset: 0x0231992e, size: 78 bytes, params: 2, frame: 12
const env0_0 = a0;
const binding = env0_2;
const getState = binding.getState;
const env0_1 = Reflect.apply(getState, binding, []).registrationOptions;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun108252);
}
function resetRegistration() { // fn#108253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14501:791, offset: 0x023199b4, size: 47 bytes, params: 1, frame: 12
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun108254);
}
function setSubmitting(a0) { // fn#108255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14501:928, offset: 0x02319a10, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun108256);
}
function doesRegistrationHaveIdentityType() { // fn#108257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14501:1057, offset: 0x02319a71, size: 50 bytes, params: 1, frame: 11
const binding = env0_2;
const getState = binding.getState;
const registrationOptions = Reflect.apply(getState, binding, []).registrationOptions;
return registrationOptions.email != null || registrationOptions.phone != null;
}
function _fun108248() { // fn#108248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14501:382, offset: 0x023198b5, size: 36 bytes, params: 1, frame: 12
env1_2.setState({errors: env0_0});
}
function _fun108252() { // fn#108252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14501:716, offset: 0x0231997c, size: 56 bytes, params: 1, frame: 15
const binding = env1_2;
const setState = binding.setState;
const object = {};
copyDataProperties(object, env0_0, copyDataProperties(object, registrationOptions, undefined));
Reflect.apply(setState, binding, [{registrationOptions: object}]);
}
function _fun108254() { // fn#108254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14501:842, offset: 0x023199e3, size: 45 bytes, params: 1, frame: 12
env1_2.setState({errors: {}, registrationOptions: {}, submitting: false});
}
function _fun108256() { // fn#108256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14501:976, offset: 0x02319a46, size: 43 bytes, params: 1, frame: 12
env1_2.setState({errors: {}, submitting: env0_0});
}
@@ -0,0 +1,145 @@
/* Metro module 14312; source: modules/auth/native/RegistrationUtils.tsx; dependencies: [31, 4097, 9156, 14304, 14305, 661, 33, 683, 14302, 5287, 2] */
function _fun108314(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14509:6, offset: 0x0231c2a0, size: 316 bytes, params: 8, frame: 20
let env0_0 = require;
const closure = trackRegTransition;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const inviteStore = importDefault(4097) /* metro dependency 4097: InviteStore */;
const displayedInviteStore = importDefault(9156) /* metro dependency 9156: DisplayedInviteStore */;
let value = require(14304) /* metro dependency 14304: RegistrationUIStore */;
const env0_6 = value.clearRegistrationErrorMessage;
const env0_7 = value.useRegistrationUIStore;
value = require(14305) /* metro dependency 14305: RegistrationConstants */;
const env0_8 = value.RegisterTransitionSteps;
const env0_9 = value.RegistrationTransitionActionTypes;
const env0_10 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/RegistrationUtils.tsx');
exports.hasAllRegistrationFieldsCompleted = function(a0, {isConsentRequired}) {
return (a0.email != null || a0.phoneToken != null) && (a0.username != null && (a0.password != null && (a0.birthday != null && (a0.consent != null && (isConsentRequired ? a0.consent === true : !isConsentRequired)))));
};
exports.trackRegTransition = closure;
exports.getTrackRegTransition = function(a0) {
var env0_0 = a0;
return _fun108318;
};
exports.BackButtonWithTracking = BackButtonWithTracking;
exports.getCommonErrorDetails = getCommonErrorDetails;
}
function trackRegTransition({step, fromStep, toStep, actionType, details, overrideRegistrationOptions}) { // fn#108315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14509:312, offset: 0x0231c3dc, size: 413 bytes, params: 2, frame: 23
const displayedInviteCode = DisplayedInviteStore.getDisplayedInviteCode();
const r3 = overrideRegistrationOptions ?? useRegistrationUIStore.getState().registrationOptions;
const r8 = displayedInviteCode != null ? InviteStore.getInvite(displayedInviteCode) : null;
const r7 = r8 != null ? 'invite' : null;
const r12 = r3?.email != null ? 'email' : r3?.phone != null ? 'phone' : null;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const REGISTER_TRANSITION = AnalyticEvents.REGISTER_TRANSITION;
Reflect.apply(track, defaultImport, [REGISTER_TRANSITION, {step: step, identity_type: r12, action_type: actionType,
action_details: details, registration_source: r7, invite_code: r8?.code,
invite_channel_id: r8 == null || r8.channel == null ? undefined : r8.channel.id,
invite_channel_type: r8 == null || r8.channel == null ? undefined : r8.channel.type,
invite_guild_id: r8 == null || r8.guild == null ? undefined : r8.guild.id,
invite_inviter_id: r8 == null || r8.inviter == null ? undefined : r8.inviter.id, from_step: fromStep,
to_step: toStep}]);
}
function getTrackRegTransition(a0) { // fn#108317, offset: 0x0231c5f8, size: 18 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun108318;
}
function BackButtonWithTracking(a0) { // fn#108319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14509:1900, offset: 0x0231c6f6, size: 134 bytes, params: 2, frame: 18
const binding = env0_3;
const useContext = binding.useContext;
const TrackRegistrationContext = (require(14302) /* metro dependency 14302: Auth */).TrackRegistrationContext;
const env0_0 = Reflect.apply(useContext, binding, [TrackRegistrationContext]);
const env0_1 = a0.destinationStep;
const env0_2 = a0.onPress;
const HeaderBackButton = (require(5287) /* metro dependency 5287 */).HeaderBackButton;
return <HeaderBackButton {...a0} {...{['onPress']: BackButtonWithTrackingOnPress}} />;
}
function getCommonErrorDetails(a0) { // fn#108321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14509:2127, offset: 0x0231c7c5, size: 333 bytes, params: 2, frame: 13
if (a0 === -1) {
return '' + a0 + ': Captcha was not completed';
}
if (a0 === 0) {
return '' + a0 + ': Internal server error';
}
if (a0 === 40333) {
return '' + a0 + ': Blocked by proxy';
}
if (a0 === 50022) {
return '' + a0 + ': Phone number invalid';
}
if (a0 === 70005) {
return '' + a0 + ': Phone number not mobile';
}
if (a0 === 70003) {
return '' + a0 + ': Unable to send sms to phone number';
}
if (a0 === 70008) {
return '' + a0 + ': Phone number already associated with an account';
}
if (a0 === 70011) {
return '' + a0 + ': Phone number already associated with an account';
}
if (a0 === undefined) {
return 'No error code';
}
return a0.toString();
}
function _fun108318({step, toStep, actionType, details, overrideRegistrationOptions}) { // fn#108318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14509:1490, offset: 0x0231c60a, size: 236 bytes, params: 2, frame: 18
var r0;
const value = environment.__proto__;
const VIEWED = RegistrationTransitionActionTypes.VIEWED;
if (actionType !== VIEWED) {
if (actionType === RegistrationTransitionActionTypes.VIEWED) {
if (step != null) {
trackRegTransition({step: step, fromStep: env0_0.current, actionType: actionType});
}
env0_0.current = step;
r0 = undefined;
} else {
if (step != null) {
trackRegTransition({step: step, toStep: toStep, actionType: actionType, details: details,
overrideRegistrationOptions: overrideRegistrationOptions});
}
r0 = undefined;
}
return r0;
}
const CAPTCHA = RegisterTransitionSteps.CAPTCHA;
if (step !== CAPTCHA) {
if (actionType === RegistrationTransitionActionTypes.VIEWED) {
if (step != null) {
trackRegTransition({step: step, fromStep: env0_0.current, actionType: actionType});
}
env0_0.current = step;
r0 = undefined;
} else {
if (step != null) {
trackRegTransition({step: step, toStep: toStep, actionType: actionType, details: details,
overrideRegistrationOptions: overrideRegistrationOptions});
}
r0 = undefined;
}
return r0;
}
trackRegTransition({step: step, fromStep: env0_0.current, actionType: actionType});
}
function BackButtonWithTrackingOnPress() { // fn#108320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14509:2037, owner: BackButtonWithTracking.onPress, offset: 0x0231c77c, size: 73 bytes, params: 1, frame: 14
var value2;
if (onPress != null) {
value2 = environment.__proto__;
clearRegistrationErrorMessage();
env0_0({step: destinationStep, actionType: RegistrationTransitionActionTypes.VIEWED});
onPress();
}
}
@@ -0,0 +1,11 @@
/* Metro module 8974; source: modules/auth/native/TabletAuthUIExperiment.tsx; dependencies: [1854, 2] */
function _fun69962(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9159:6, offset: 0x01ce9f41, size: 145 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
value = value.createApexExperiment({'name': '2026-02-tablet-auth-ui', 'kind': 'installation',
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/TabletAuthUIExperiment.tsx');
exports.default = value;
}
@@ -0,0 +1,108 @@
/* Metro module 14335; source: modules/auth/native/components/AccountDisabledOrDeletionScheduled.tsx; dependencies: [31, 27, 1226, 661, 33, 4501, 697, 1484, 566, 5076, 8973, 1244, 9001, 14336, 4573, 6261, 4578, 2] */
function _fun108504(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14532:6, offset: 0x02323353, size: 243 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).LoginStates;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun108505);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/AccountDisabledOrDeletionScheduled.tsx');
exports.default = AccountDisabledOrDeletionScheduled;
}
function _fun108505(a0) { // fn#108505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14532:204, offset: 0x02323446, size: 222 bytes, params: 2, frame: 17
const object = {'display': 'flex', 'height': '100%', 'flex': 1};
const space = (importDefault(697) /* metro dependency 697: native */).space;
object.paddingBottom = a0 ? space.PX_8 : space.PX_16;
const PX_16 = a0 ? 0 : (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingHorizontal = PX_16;
const BACKGROUND_BASE_LOW = a0 ? 'transparent' : (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
object.justifyContent = a0 ? 'space-between' : 'center';
return {container: object, image: {'marginBottom': 32, 'alignSelf': 'center'}, title: {'textAlign': 'center',
'marginBottom': 8}, description: {'lineHeight': 18, 'marginBottom': 24, 'textAlign': 'center'}};
}
function AccountDisabledOrDeletionScheduled({handleLogin, onReset}) { // fn#108506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14532:729, offset: 0x02323524, size: 888 bytes, params: 2, frame: 31
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const loginStatus = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore],
function() {
return AuthenticationStore.getLoginStatus();
});
const binding = loginStatus;
const env0_4 = binding.useRef(null);
binding.useEffect(_fun108508, [loginStatus, value2]);
const value3 = binding.useCallback(_fun108509, [onReset]);
const value4 = binding.useCallback(_fun108510, [handleLogin]);
const styles = useStyles((importDefault(8973) /* metro dependency 8973: useWideAuthView */)());
const ACCOUNT_DISABLED = LoginStates.ACCOUNT_DISABLED;
const value6 = loginStatus === ACCOUNT_DISABLED;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r17 = value6 ? Reflect.apply(string, intl, [t['j3rC+U']]) : Reflect.apply(string, intl, [t.ZFWofo]);
string = intl.string;
const r11 = value6 ? Reflect.apply(string, intl, [t['6eNTWe']]) : Reflect.apply(string, intl, [t['pCBti+']]);
const AuthFormView = importDefault(9001) /* metro dependency 9001: AuthFormView */;
const WumpTrash = (require(14336) /* metro dependency 14336: WumpTrash */).WumpTrash;
const items3 = [<WumpTrash style={styles.image} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items3[1] = <Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{r17}</Text>;
items3[2] = <Text style={styles.description} variant="text-sm/medium" color="text-default">{r11}</Text>;
const items2 = [<View>{items3}</View>];
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const JhDw5o = (require(1244) /* metro dependency 1244: indexNative */).t.JhDw5o;
items2[1] = <View><ButtonGroup><Button variant="primary" text={Reflect.apply(string, intl,
[JhDw5o])} onPress={value3} /><Button variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.v51oiN)} onPress={value4} /></ButtonGroup></View>;
return (
<AuthFormView contentStyle={{flexGrow: 1}}>
<View style={styles.container}>
{items2}
</View>
</AuthFormView>
);
}
function _fun108508() { // fn#108508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14532:919, offset: 0x023238af, size: 114 bytes, params: 1, frame: 11
var value2;
const current = env0_4.current;
let loginStatusBinding = loginStatus;
if (current !== loginStatusBinding) {
if (env0_4.current != null) {
loginStatusBinding = loginStatus;
value2 = environment.__proto__;
if (loginStatusBinding !== LoginStates.ACCOUNT_SCHEDULED_FOR_DELETION && loginStatus !== LoginStates.ACCOUNT_DISABLED) {
env0_2.pop();
}
} else {
env0_4.current = loginStatus;
}
}
}
function _fun108509() { // fn#108509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14532:1069, offset: 0x02323921, size: 64 bytes, params: 1, frame: 11
var value;
if (onReset == null) {
value = environment.__proto__;
value = importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */;
value.loginReset();
} else {
onReset();
}
}
function _fun108510() { // fn#108510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14532:1131, offset: 0x02323961, size: 60 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = AuthenticationStore.getCredentials();
const login = value.login;
const password = value.password;
handleLogin(login, password === undefined ? '' : password, true);
}
@@ -0,0 +1,293 @@
/* Metro module 14302; source: modules/auth/native/components/Auth.tsx; dependencies: [57, 31, 27, 661, 33, 14303, 5282, 14312, 5315, 8980, 4501, 697, 14353, 8973, 1599, 8584, 14354, 9002, 5280, 478, 1244, 14355, 4884, 14359, 2] */
function _fun108193(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14499:6, offset: 0x02317f07, size: 676 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const getInitialAuthScreen = function() {
return AuthStates.WELCOME;
};
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.Keyboard;
const StyleSheet = value2.StyleSheet;
const env0_6 = value2.View;
const AuthStates = (require(661) /* metro dependency 661: Constants */).AuthStates;
const value3 = require(33) /* metro dependency 33 */;
const env0_8 = value3.jsx;
const env0_9 = value3.Fragment;
const env0_10 = value3.jsxs;
const allAuthScreens = (require(14303) /* metro dependency 14303: RegistrationStepsUtils */).getAllAuthScreens();
Object = global.Object;
const fromEntries = Object.fromEntries;
const Object2 = global.Object;
const value6 = Object2.entries(allAuthScreens);
const env0_12 = Reflect.apply(fromEntries, Object, [value6.map(_fun108198)]);
object2 = {};
const LOGIN = AuthStates.LOGIN;
object2[LOGIN] = (require(8980) /* metro dependency 8980: MFAUtils */).hasWebAuthn ? 600 : 540;
const MFA = AuthStates.MFA;
object2[MFA] = 600;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.transparent = {backgroundColor: 'transparent'};
object2.cardContainer = {'flex': 1, 'position': 'relative', 'backgroundColor': 'transparent'};
object2.wideOuterContainer = {'flex': 1, 'justifyContent': 'center'};
const object4 = {'backgroundColor': 'transparent', 'borderRadius': null, 'maxWidth': 480, 'alignSelf': 'center',
'width': '100%', 'maxHeight': '90%', 'overflow': 'hidden', 'height': 520};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.wideCard = object4;
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.wideHeaderFlat = {borderBottomWidth: 0, backgroundColor: BACKGROUND_BASE_LOW};
const object6 = {};
object6.borderBottomWidth = StyleSheet.hairlineWidth;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object6.borderBottomColor = BORDER_SUBTLE;
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object6.backgroundColor = BACKGROUND_BASE_LOW;
object2.wideHeader = object6;
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object2]);
const context = value.createContext(function() {
});
value = value.memo(Auth);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/Auth.tsx');
exports.default = value;
exports.TrackRegistrationContext = context;
}
function NavigatorWithCaptchaHook() { // fn#108195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14499:1453, offset: 0x023181ba, size: 977 bytes, params: 1, frame: 38
var r16;
var transparent;
var r5;
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
var object;
var intl;
var Provider;
var object2;
var object4;
var value11;
var object7;
var items3;
var object9;
var space;
(require(14353) /* metro dependency 14353: useIsHCaptchaModalOpenTracking */).useIsHCaptchaModalOpenTracking();
const value2 = (importDefault(8973) /* metro dependency 8973: useWideAuthView */)();
const styles = useStyles();
const binding = env0_4;
const useState = binding.useState;
const value4 = env0_3(Reflect.apply(useState, binding, [getInitialAuthScreen()]), 2);
const property = value4[0];
const env0_0 = value4[1];
const [property2, property3] = env0_3(env0_4.useState(false), 2);
const value7 = (require(1599) /* metro dependency 1599 */).useKeyboardState(function(a0) {
return a0.height;
});
const value8 = value7 > 200;
const value9 = env0_4.useCallback(_fun108197, []);
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const value10 = ((Component) => <Component backgroundImageSource={require(14354) /* metro dependency 14354 */} backgroundImageCover />)(importDefault(8584) /* metro dependency 8584: BackgroundImage */);
if (value2) {
Provider = (require(9002) /* metro dependency 9002: WideAuthScrollContext */).WideAuthScrollContext.Provider;
object2 = {value: property3};
object4 = {};
value11 = null;
object4.style = [styles.wideOuterContainer, value8 ? {paddingBottom: value7} : value11];
object7 = {};
items3 = [styles.wideCard];
r16 = value11 != property ? {height: value11 != env0_13[property] ? env0_13[property] : 520} : value11;
items3[1] = r16;
r16 = value8 ? {'maxHeight': '100%', 'height': '100%', 'marginTop': 32, 'borderBottomLeftRadius': 0,
'borderBottomRightRadius': 0} : value11;
items3[2] = r16;
object7.style = items3;
var navigatorProps2 = {'screens': null, 'containerStyle': null, 'viewStyle': null, 'headerStatusBarHeight': 0,
'cardOverlayEnabled': false, 'cardShadowEnabled': false, screens: env0_12,
containerStyle: styles.cardContainer,
viewStyle: property !== AuthStates.WELCOME ? value11 : styles.transparent,
initialRouteName: getInitialAuthScreen(), onWillFocus: Keyboard.dismiss, onStateChange: value9,
headerStyle: property2 ? styles.wideHeader : styles.wideHeaderFlat};
object9 = {};
object9.paddingLeft = (require(478) /* metro dependency 478: PlatformUtils */).isAndroid() ? (importDefault(697) /* metro dependency 697: native */).space.PX_12 : 20;
space = (importDefault(697) /* metro dependency 697: native */).space;
object9.paddingTop = space.PX_24;
space = (importDefault(697) /* metro dependency 697: native */).space;
object9.paddingBottom = space.PX_16;
navigatorProps2.headerLeftContainerStyle = object9;
navigatorProps2.disableHeaderAnimation = true;
r5 = <Provider {...object2}><View {...object4}><View {...object7}><Navigator {...navigatorProps2} /></View></View></Provider>;
} else {
object = {screens: env0_11};
transparent = styles.transparent;
object.viewStyle = transparent;
transparent = styles.transparent;
object.containerStyle = transparent;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.headerBackTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
object.initialRouteName = getInitialAuthScreen();
object.onWillFocus = Keyboard.dismiss;
object.headerStyle = {borderBottomWidth: 0};
r5 = <Navigator {...object} />;
}
return (
<>
{value10}
{r5}
</>
);
}
function _fun108198(a0) { // fn#108198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14499:351, offset: 0x023185e7, size: 336 bytes, params: 2, frame: 18
var environment;
var r0;
var r1;
var r2;
var r8;
var item3;
var value4;
var closure;
var object2;
const value = Object.create(environment);
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = undefined;
const value3 = item2 === value2;
const r7 = value3 ? value2 : item;
if (value3) {
r0 = item2;
r1 = value3;
r2 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value4 = item3 === value2;
if (value4) {
r0 = item3;
r1 = value4;
r2 = value2;
} else {
r0 = item3;
r1 = value4;
r2 = item;
}
}
if (!r1) {
r0.return();
}
const items2 = [r7];
const object3 = {};
copyDataProperties(object3, r2, value);
const fullscreen = r2.fullscreen;
const value5 = null;
let r3 = fullscreen ? {'fullscreen': false, 'headerTransparent': false} : value5;
copyDataProperties(object3, r3, value);
const MFA = AuthStates.MFA;
if (r7 === MFA) {
r3 = value5;
r8 = value;
} else if (r7 === AuthStates.WELCOME) {
r3 = value5;
r8 = value;
} else {
closure = headerLeft_108199;
r3 = {headerLeft: closure};
r8 = closure;
}
copyDataProperties(object3, r3, r8);
const Set = global.Set;
const REGISTER_IDENTITY = AuthStates.REGISTER_IDENTITY;
const LOGIN = AuthStates.LOGIN;
const AGE_GATE_UNDERAGE = AuthStates.AGE_GATE_UNDERAGE;
const set = new Set([REGISTER_IDENTITY, LOGIN, AGE_GATE_UNDERAGE]);
if (set.has(r7)) {
object2 = {};
object2.cardStyleInterpolator = (require(5315) /* metro dependency 5315 */).CardStyleInterpolators.forFadeFromCenter;
r2 = object2;
} else {
r2 = value5;
}
copyDataProperties(object3, r2, Set);
items2[1] = object3;
return items2;
}
function Auth() { // fn#108202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14499:2995, offset: 0x023187e9, size: 180 bytes, params: 1, frame: 16
env0_4.useEffect(_fun108203, []);
env0_4.useLayoutEffect(_fun108205, []);
(importDefault(14359) /* metro dependency 14359: useOrientationLock */)();
const env0_0 = env0_4.useRef(undefined);
const value2 = env0_4.useCallback(_fun108206, []);
const Provider = env0_15.Provider;
return (
<Provider value={value2()}>
<NavigatorWithCaptchaHook />
</Provider>
);
}
function _fun108197(a0) { // fn#108197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14499:1728, offset: 0x02318595, size: 82 bytes, params: 2, frame: 15
const binding = env0_0;
const value2 = null;
const value3 = undefined;
const name = value2 == a0 || value2 == a0.routes[a0.index] ? value3 : a0.routes[a0.index].name;
binding(value2 != name ? name : value2);
env0_1(false);
return value3;
}
function headerLeft_108199(a0) { // fn#108199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14499:456, offset: 0x02318737, size: 133 bytes, params: 2, frame: 17
var environment;
var r0;
var object2;
var binding;
const closure = backImage;
var value;
let headerLeft = env0_0.headerLeft;
if (headerLeft != null) {
binding = env0_0;
headerLeft = binding.headerLeft;
object2 = {};
copyDataProperties(object2, a0, undefined);
object2['backImage'] = closure;
r0 = Reflect.apply(headerLeft, binding, [object2]);
} else {
value = environment.__proto__;
const BackButtonWithTracking = (require(14312) /* metro dependency 14312: RegistrationUtils */).BackButtonWithTracking;
value = <BackButtonWithTracking {...a0} {...{['backImage']: closure}} />;
r0 = value;
}
return r0;
}
function _fun108203() { // fn#108203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14499:3024, offset: 0x0231889d, size: 46 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
(importDefault(14355) /* metro dependency 14355: AuthManager */).initialize();
return _fun108204;
}
function _fun108205() { // fn#108205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14499:3101, offset: 0x023188f0, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(4884) /* metro dependency 4884: TTIAnalyticsUtils */).trackAppUIViewed();
}
function _fun108206() { // fn#108206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14499:3189, offset: 0x02318915, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(14312) /* metro dependency 14312: RegistrationUtils */).getTrackRegTransition(env0_0);
}
function backImage() { // fn#108200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14499:484, owner: headerLeft_108199.backImage, offset: 0x023187bc, size: 45 bytes, params: 1, frame: 13
const HeaderBackImage = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).HeaderBackImage;
return <HeaderBackImage />;
}
function _fun108204() { // fn#108204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14499:3051, offset: 0x023188cb, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return (importDefault(14355) /* metro dependency 14355: AuthManager */).terminate();
}
@@ -0,0 +1,79 @@
/* Metro module 9001; source: modules/auth/native/components/AuthFormView.tsx; dependencies: [31, 27, 33, 4501, 697, 8973, 9002, 9003, 8584, 9004, 2] */
function _fun70060(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9186:6, offset: 0x01cec7c9, size: 215 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_4 = value.View;
const env0_5 = value.ScrollView;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun70061);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/AuthFormView.tsx');
exports.default = AuthFormView;
}
function _fun70061(a0) { // fn#70061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9186:193, offset: 0x01cec8a0, size: 161 bytes, params: 2, frame: 16
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const value = 1;
const value2 = 0;
const value4 = 16;
return {container: {backgroundColor: BACKGROUND_BASE_LOW, flex: value}, flex: {flex: value},
content: {paddingTop: a0 ? 12 : value2, paddingRight: a0 ? 24 : value4, paddingLeft: a0 ? 24 : value4,
paddingBottom: a0 ? value4 : value2, flex: a0 ? value2 : value}, subHeader: {'marginTop': 8,
'alignItems': 'center'}};
}
function AuthFormView({children, headerText, subHeader, contentStyle, backgroundImageSource, backgroundImageCover}) { // fn#70062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9186:524, offset: 0x01cec941, size: 627 bytes, params: 2, frame: 29
var r0;
var object2;
var flex;
var items2;
var value4;
var items4;
var value6;
var items6;
const value2 = (importDefault(8973) /* metro dependency 8973: useWideAuthView */)();
const styles = useStyles(value2);
const binding = env0_3;
const useContext = binding.useContext;
const WideAuthScrollContext = (require(9002) /* metro dependency 9002: WideAuthScrollContext */).WideAuthScrollContext;
const env0_0 = Reflect.apply(useContext, binding, [WideAuthScrollContext]);
if (value2) {
var scrollViewBindingProps = {'contentInset': null, 'automaticallyAdjustContentInsets': false,
'keyboardShouldPersistTaps': 'handled', 'alwaysBounceVertical': false, 'scrollEventThrottle': 16,
contentInset: {top: 0}, onScroll: onScroll_70063, style: styles.container,
contentContainerStyle: [styles.content, contentStyle]};
value6 = null;
items6 = [value6 != headerText ? ((Component) => <Component>{headerText}</Component>)(importDefault(9003) /* metro dependency 9003: AuthHeader */) : value6];
items6[1] = value6 != subHeader ? <View style={styles.subHeader}>{subHeader}</View> : value6;
items6[2] = children;
r0 = <ScrollView {...scrollViewBindingProps}>{items6}</ScrollView>;
} else {
object2 = {};
flex = styles.flex;
object2.style = [styles.container, flex];
items2 = [((Component) => <Component backgroundImageSource={backgroundImageSource} backgroundImageCover={backgroundImageCover} />)(importDefault(8584) /* metro dependency 8584: BackgroundImage */)];
items2[1] = ((Component) => <Component />)(importDefault(9004) /* metro dependency 9004: AuthNavbarPlaceholder */);
var scrollViewBindingProps = {'contentInset': null, 'automaticallyAdjustContentInsets': false,
'keyboardShouldPersistTaps': 'handled', 'alwaysBounceVertical': false, contentInset: {top: 0}};
flex = styles.flex;
scrollViewBindingProps.style = flex;
flex = styles.flex;
scrollViewBindingProps.contentContainerStyle = [styles.content, flex, contentStyle];
value4 = null;
items4 = [value4 != headerText ? ((Component) => <Component>{headerText}</Component>)(importDefault(9003) /* metro dependency 9003: AuthHeader */) : value4];
items4[1] = value4 != subHeader ? <View style={styles.subHeader}>{subHeader}</View> : value4;
items4[2] = children;
items2[2] = <ScrollView {...scrollViewBindingProps}>{items4}</ScrollView>;
r0 = <View {...object2}>{items2}</View>;
}
return r0;
}
function AuthFormViewOnScroll({nativeEvent}) { // fn#70063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9186:879, owner: AuthFormView.onScroll, offset: 0x01cecbb4, size: 42 bytes, params: 2, frame: 11
return env0_0(nativeEvent.contentOffset.y > 0);
}
@@ -0,0 +1,58 @@
/* Metro module 14339; source: modules/auth/native/components/ExternalLink.tsx; dependencies: [31, 27, 33, 4501, 697, 8973, 1484, 9003, 1244, 4573, 6261, 4578, 2] */
function _fun108519(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14536:6, offset: 0x02323b2e, size: 225 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_4 = value.Linking;
const env0_5 = value.ScrollView;
const env0_6 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun108520);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/ExternalLink.tsx');
exports.default = ExternalLink;
}
function _fun108520(a0) { // fn#108520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14536:203, offset: 0x02323c0f, size: 188 bytes, params: 2, frame: 17
const object = {'backgroundColor': null, 'height': '100%', 'display': 'flex'};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
object.justifyContent = a0 ? 'space-between' : 'center';
let space = (importDefault(697) /* metro dependency 697: native */).space;
object.paddingLeft = a0 ? space.PX_24 : space.PX_16;
space = (importDefault(697) /* metro dependency 697: native */).space;
object.paddingRight = a0 ? space.PX_24 : space.PX_16;
return {container: object, description: {'textAlign': 'center', 'marginTop': 8}};
}
function ExternalLink({externalURL}) { // fn#108521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14536:592, offset: 0x02323ccb, size: 630 bytes, params: 2, frame: 28
const styles = useStyles((importDefault(8973) /* metro dependency 8973: useWideAuthView */)());
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const binding = env0_3;
const value3 = binding.useCallback(function() {
Linking.openURL(externalURL);
}, [externalURL]);
binding.useEffect(_fun108523, [value3]);
let value = importDefault(9003) /* metro dependency 9003: AuthHeader */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = ((Component) => <Component>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0Niu/F'])}</Component>)(value);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = <View>{value}<Text style={styles.description} variant="text-md/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nToOEg)}</Text></View>;
const items2 = [value];
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[1] = <ButtonGroup><Button shrink variant="primary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2ixEBi'])} onPress={value3} /><Button shrink variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.j3cG2p)} onPress={onPress_108524} /></ButtonGroup>;
return (
<ScrollView
alwaysBounceVertical={false}
keyboardShouldPersistTaps="handled"
contentContainerStyle={styles.container}
>
{items2}
</ScrollView>
);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,70 @@
/* Metro module 14334; source: modules/auth/native/components/MFA.tsx; dependencies: [31, 1226, 33, 5076, 22, 1484, 8973, 566, 14210, 478, 697, 2] */
function _fun108498(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14531:6, offset: 0x02323033, size: 194 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = {'flex': 1, 'position': 'relative'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/MFA.tsx');
exports.default = ConnectedMFA;
}
function handleFinish({mfaType, data, ticket}) { // fn#108499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14531:130, offset: 0x023230f5, size: 74 bytes, params: 2, frame: 14
const authenticationActionCreators = importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */;
return authenticationActionCreators.loginMFAv2({code: data, ticket: ticket, mfaType: mfaType});
}
function statesAreEqual(a0, a1) { // fn#108500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14531:236, offset: 0x0232313f, size: 45 bytes, params: 3, frame: 13
return (importDefault(22) /* metro dependency 22 */).isEqual(a0, a1);
}
function ConnectedMFA() { // fn#108501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14531:411, offset: 0x0232316c, size: 442 bytes, params: 1, frame: 23
var r4;
var object;
var isAndroid2;
var space;
var object4;
const value = a0;
const value2 = undefined;
const inContainer = (value !== value2 ? value : {}).inContainer;
const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const r5 = inContainer && (importDefault(8973) /* metro dependency 8973: useWideAuthView */)();
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore],
function() {
var object = {};
object.ticket = AuthenticationStore.getMFATicket();
object.methods = AuthenticationStore.getMFAMethods();
return object;
}, [], statesAreEqual);
const MFAModal = (require(14210) /* metro dependency 14210: MFAModal */).MFAModal;
const mfaModalProps = {mfaChallenge: value4, finish: handleFinish, handleOnClose: handleOnClose, ignoreKeyboard: r5,
containerStyle: r5 ? env0_5 : value2, headerStatusBarHeight: r5 ? 0 : value2};
if (r5) {
object = {};
isAndroid2 = (require(478) /* metro dependency 478: PlatformUtils */).isAndroid();
space = (importDefault(697) /* metro dependency 697: native */).space;
object.paddingLeft = isAndroid2 ? space.PX_8 : space.PX_16;
space = (importDefault(697) /* metro dependency 697: native */).space;
object.paddingTop = space.PX_12;
r4 = object;
} else {
r4 = value2;
}
mfaModalProps.headerLeftContainerStyle = r4;
if (r5) {
object4 = {};
space = (importDefault(697) /* metro dependency 697: native */).space;
object4.paddingRight = space.PX_16;
space = (importDefault(697) /* metro dependency 697: native */).space;
object4.paddingTop = space.PX_12;
object4.marginLeft = 0;
r4 = object4;
} else {
r4 = value2;
}
mfaModalProps.headerRightContainerStyle = r4;
return <MFAModal {...mfaModalProps} />;
}
@@ -0,0 +1,169 @@
/* Metro module 13313; source: modules/auth/native/components/MFACodeInput.tsx; dependencies: [57, 31, 27, 1226, 661, 33, 4501, 697, 4002, 6797, 4594, 5076, 8967, 1244, 4573, 2] */
function _fun101432(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13503:6, offset: 0x02214733, size: 389 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.ActivityIndicator;
const env0_6 = value2.View;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).AppStates;
const value3 = require(33) /* metro dependency 33 */;
const env0_9 = value3.jsx;
const env0_10 = value3.Fragment;
const env0_11 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
const env0_12 = Reflect.apply(createStyles, createStylesModule, [{inputContainer: {'marginTop': 20,
'flexDirection': 'row', 'justifyContent': 'center', 'alignSelf': 'stretch'}, input: {'flex': 1, 'maxWidth': 336,
'flexDirection': 'row', 'alignSelf': 'stretch'}, status: {'flex': 1, 'maxHeight': 20, 'alignItems': 'center',
'marginTop': 8}, error: {color: RED_400}, minHeightGuard: {minHeight: 20}}]);
value = value.forwardRef(_fun101433);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/MFACodeInput.tsx');
exports.default = value;
}
function _fun101433({appState, handleSubmit, style, error, showActivityIndicator, resetLoginOnClose}, a1) { // fn#101433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13503:569, offset: 0x022148b8, size: 750 bytes, params: 3, frame: 32
var r8;
var isThemeDark2;
var unsafe_rawColors;
if (resetLoginOnClose !== undefined) {
}
const styles = useStyles();
const sharedModule = require(4002) /* metro dependency 4002: shared */;
const useThemeContext = sharedModule.useThemeContext;
const theme = Reflect.apply(useThemeContext, sharedModule, []).theme;
const binding = undefined;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, ['']);
const binding2 = undefined;
const value3 = binding2(value2, 2);
const property = value3[0];
const property2 = value3[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property3 = value5[0];
const env0_6 = value5[1];
const value6 = binding.useCallback(_fun101434, [property3]);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun101436);
binding.useEffect(_fun101439, [appState, value6]);
binding.useEffect(_fun101440, [property, handleSubmit]);
binding.useImperativeHandle(a1, function() {
return {clear: _fun101442};
}, []);
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const FreeFormInputGroup = importDefault(8967) /* metro dependency 8967: FreeFormInputGroup */;
const items2 = [styles.inputContainer, style];
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const freeFormInputGroup = <FreeFormInputGroup autoFocus style={items2} textStyle={styles.input} value={property} autoCapitalize="none" maxLength={8} textContentType="oneTimeCode" onChangeText={property2} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yO4lAM)} />;
const items3 = [styles.status];
const Boolean = global.Boolean;
items3[1] = Boolean(error) && styles.minHeightGuard;
if (showActivityIndicator) {
isThemeDark2 = sharedModule.isThemeDark(theme);
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
r8 = <ActivityIndicator color={isThemeDark2 ? unsafe_rawColors.WHITE : unsafe_rawColors.PRIMARY_500} />;
} else if (error != null) {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
r8 = <Text style={styles.error} variant="text-md/medium">{error}</Text>;
} else {
r8 = null;
}
return (
<>
{freeFormInputGroup}
<View style={items3}>
{r8}
</View>
</>
);
}
function _fun101434() { // fn#101434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13503:815, offset: 0x02214ba6, size: 56 bytes, params: 1, frame: 12
var environment;
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value = value.getString();
value.then(_fun101435);
}
function _fun101436() { // fn#101436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13503:982, offset: 0x02214c6b, size: 24 bytes, params: 1, frame: 9
env0_7();
return _fun101437;
}
function _fun101439() { // fn#101439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13503:1150, offset: 0x02214d4e, size: 38 bytes, params: 1, frame: 10
const appStateBinding = appState;
const ACTIVE = AppStates.ACTIVE;
if (appStateBinding === ACTIVE) {
env0_7();
}
}
function _fun101440() { // fn#101440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13503:1195, offset: 0x02214d74, size: 91 bytes, params: 1, frame: 13
let r1 = env0_3.length === 6 && RegExp('^\\d+$', '').test(env0_3);
r1 = !r1 ? env0_3.length === 8 : r1;
if (r1) {
handleSubmit(env0_3);
}
}
function _fun101441() { // fn#101441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13503:1286, offset: 0x02214dcf, size: 18 bytes, params: 1, frame: 2
return {clear: clear_101442};
}
function _fun101435(a0) { // fn#101435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13503:846, offset: 0x02214bde, size: 141 bytes, params: 2, frame: 15
var r3;
var r1;
const value = a0.trim();
const value3 = value !== env1_5;
if (value3) {
r3 = value.length === 6 && RegExp('^\\d+$', '').test(value);
r3 = !r3 ? value.length === 8 && RegExp('^[a-z0-9]+$', 'i').test(value) : r3;
r1 = r3;
} else {
r1 = value3;
}
if (r1) {
env1_4(value);
env1_6(value);
}
}
function _fun101437() { // fn#101437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13503:991, offset: 0x02214c83, size: 131 bytes, params: 1, frame: 13
var environment;
var value2;
var resetLoginOnCloseBinding;
let value = environment.__proto__.__proto__;
if (AuthenticationStore.isAuthenticated()) {
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value = value.getString();
value.then(_fun101438);
} else {
value2 = environment.__proto__;
resetLoginOnCloseBinding = resetLoginOnClose;
value = importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */;
if (resetLoginOnCloseBinding) {
value.loginReset();
} else {
value.loginStatusReset();
}
}
}
function clear_101442() { // fn#101442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13503:1292, offset: 0x02214de1, size: 20 bytes, params: 1, frame: 11
env1_4('');
}
function _fun101438(a0) { // fn#101438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13503:1042, offset: 0x02214d06, size: 72 bytes, params: 2, frame: 12
let value = environment.__proto__.__proto__;
if (env2_3 !== '' && env2_3 === a0) {
value = environment.__proto__.__proto__.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy('');
}
}
@@ -0,0 +1,27 @@
/* Metro module 8976; source: modules/auth/native/components/OneTimeLoginForgotPasswordConfirmAlertModal.tsx; dependencies: [31, 33, 4500, 1244, 4500, 2] */
function _fun69964(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9161:6, offset: 0x01cea03c, size: 131 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/OneTimeLoginForgotPasswordConfirmAlertModal.tsx');
exports.default = OneTimeLoginForgotPasswordConfirmAlertModal;
}
function OneTimeLoginForgotPasswordConfirmAlertModal() { // fn#69965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9161:240, offset: 0x01cea0bf, size: 261 bytes, params: 1, frame: 23
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['6Ecyts']]);
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iAcrqV);
const AlertActions = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActions;
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
string = intl.string;
const BddRzS = (require(1244) /* metro dependency 1244: indexNative */).t.BddRzS;
object2.actions = <AlertActions><AlertActionButton text={Reflect.apply(string, intl,
[BddRzS])} key="okay" /></AlertActions>;
return <AlertModal {...object2} />;
}
@@ -0,0 +1,84 @@
/* Metro module 14342; source: modules/auth/native/components/PrivacyHint.tsx; dependencies: [31, 27, 5077, 14304, 661, 33, 4501, 6766, 1244, 3874, 7974, 7972, 14343, 2] */
function _fun108541(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14539:6, offset: 0x023249f5, size: 362 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.View;
const env0_4 = value.Pressable;
const env0_5 = (require(5077) /* metro dependency 5077: PromoEmailConsentStore */).usePromoEmailConsentStore;
const env0_6 = (require(14304) /* metro dependency 14304: RegistrationUIStore */).useRegistrationUIStore;
const env0_7 = (require(661) /* metro dependency 661: Constants */).MarketingURLs;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({multiItem: {'flexDirection': 'column',
'gap': 16}, checkbox: {'flexDirection': 'row', 'alignItems': 'flex-start', 'gap': 8},
radio: {'flexDirection': 'row', 'alignItems': 'center', 'gap': 8}, checkboxLabel: {flex: 1}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/PrivacyHint.tsx');
exports.default = PrivacyHint;
}
function PrivacyPolicyDescription({style}) { // fn#108542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14539:463, offset: 0x02324b5f, size: 157 bytes, params: 2, frame: 19
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const property = (require(1244) /* metro dependency 1244: indexNative */).t['KI+BSb'];
const TERMS = MarketingURLs.TERMS;
const PRIVACY = MarketingURLs.PRIVACY;
return (
<TextWithIOSLinkWorkaround
style={style}
variant="text-xs/medium"
color="text-muted"
>
{Reflect.apply(format, intl, [property, {termsURL: TERMS, privacyURL: PRIVACY}])}
</TextWithIOSLinkWorkaround>
);
}
function PrivacyPolicyCheckbox({consent, onToggleConsent, asCheckbox}) { // fn#108543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14539:696, offset: 0x02324bfc, size: 461 bytes, params: 2, frame: 23
var object2;
asCheckbox = !(asCheckbox === undefined) && asCheckbox;
const styles = useStyles();
const {accessibilityRole,
accessibilityState} = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useCheckboxA11yNative({checked: consent});
object2 = {style: asCheckbox ? styles.checkbox : styles.radio, accessibilityState: accessibilityState,
accessibilityRole: accessibilityRole};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Y7Kgvf = (require(1244) /* metro dependency 1244: indexNative */).t.Y7Kgvf;
object2.accessibilityLabel = Reflect.apply(string, intl, [Y7Kgvf]);
object2.onPress = onToggleConsent;
object2.hitSlop = {'top': 11, 'bottom': 11, 'left': 11};
const r5 = asCheckbox ? ((FormCheckbox) => <FormCheckbox checked={consent} />)((require(7974) /* metro dependency 7974: FormCheckboxNative */).FormCheckbox) : ((Radio) => <Radio selected={consent} />)((require(7972) /* metro dependency 7972: native */).FormRow.Radio);
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
const format = intl.format;
const qMDAP0 = (require(1244) /* metro dependency 1244: indexNative */).t.qMDAP0;
const TERMS = MarketingURLs.TERMS;
const PRIVACY = MarketingURLs.PRIVACY;
return (
<Pressable {...object2}>
{r5}
<TextWithIOSLinkWorkaround
variant="text-xs/medium"
color="text-muted"
style={styles.checkboxLabel}
>
{Reflect.apply(format, intl, [qMDAP0, {termsURL: TERMS, privacyURL: PRIVACY}])}
</TextWithIOSLinkWorkaround>
</Pressable>
);
}
function PrivacyHint({consent, consentRequired, onToggleConsent}) { // fn#108544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14539:1430, offset: 0x02324dc9, size: 338 bytes, params: 2, frame: 23
const styles = useStyles();
const r2 = useRegistrationUIStore(function(a0) {
return a0.registrationOptions.email != null;
}) && usePromoEmailConsentStore(function(a0) {
return a0.required;
});
return consentRequired ? consentRequired && r2 ? <View style={styles.multiItem}>{((Component) => <Component />)(importDefault(14343) /* metro dependency 14343: PromotionalEmailCheckBox */)}<PrivacyPolicyCheckbox consent={consent} onToggleConsent={onToggleConsent} asCheckbox /></View> : consentRequired ? <PrivacyPolicyCheckbox consent={consent} onToggleConsent={onToggleConsent} /> : <PrivacyPolicyDescription /> : r2 ? <View style={styles.multiItem}>{((Component) => <Component />)(importDefault(14343) /* metro dependency 14343: PromotionalEmailCheckBox */)}<PrivacyPolicyDescription /></View> : consentRequired && r2 ? <View style={styles.multiItem}>{((Component) => <Component />)(importDefault(14343) /* metro dependency 14343: PromotionalEmailCheckBox */)}<PrivacyPolicyCheckbox consent={consent} onToggleConsent={onToggleConsent} asCheckbox /></View> : consentRequired ? <PrivacyPolicyCheckbox consent={consent} onToggleConsent={onToggleConsent} /> : <PrivacyPolicyDescription />;
}
@@ -0,0 +1,72 @@
/* Metro module 14343; source: modules/auth/native/components/PromotionalEmailCheckBox.tsx; dependencies: [31, 27, 5077, 33, 4501, 3874, 1244, 7974, 4573, 2] */
function _fun108547(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14540:6, offset: 0x02324f32, size: 261 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_2 = value.View;
const env0_3 = value.Pressable;
value = require(5077) /* metro dependency 5077: PromoEmailConsentStore */;
const env0_4 = value.usePromoEmailConsentStore;
const env0_5 = value.setPromoEmailConsentChecked;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({checkboxRow: {'flexDirection': 'row',
'alignItems': 'flex-start', 'gap': 8}, checkboxLabel: {flex: 1}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/PromotionalEmailCheckBox.tsx');
exports.default = PromotionalEmailCheckBox;
}
function PromotionalEmailCheckBox({style}) { // fn#108548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14540:452, offset: 0x02325037, size: 381 bytes, params: 2, frame: 27
var r0;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var ylFCLt;
var items2;
var Text;
var value;
const styles = useStyles();
const value2 = usePromoEmailConsentStore(function(a0) {
return a0.required;
});
const value3 = usePromoEmailConsentStore(function(a0) {
return a0.checked;
});
const useA11yRolesNativeModule = require(3874) /* metro dependency 3874: useA11yRolesNative */;
const useCheckboxA11yNative = useA11yRolesNativeModule.useCheckboxA11yNative;
let object4 = {checked: value3};
const value4 = Reflect.apply(useCheckboxA11yNative, useA11yRolesNativeModule, [object4]);
if (value2) {
object4 = {style: style};
object3 = {accessibilityRole: value4.accessibilityRole};
string = intl.string;
ylFCLt = t.ylFCLt;
object3.accessibilityLabel = Reflect.apply(string, intl, [ylFCLt]);
object3.accessibilityState = value4.accessibilityState;
object3.onPress = onPress_108551;
object3.style = styles.checkboxRow;
const FormCheckbox = (require(7974) /* metro dependency 7974: FormCheckboxNative */).FormCheckbox;
value = <FormCheckbox checked={value3} />;
items2 = [value];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
ylFCLt = t.ylFCLt;
items2[1] = <Text variant="text-xs/medium" color="text-muted" style={styles.checkboxLabel}>{Reflect.apply(string,
intl, [ylFCLt])}</Text>;
value = <View {...object4}><Pressable {...object3}>{items2}</Pressable></View>;
r0 = value;
} else {
r0 = null;
}
return r0;
}
function PromotionalEmailCheckBoxOnPress() { // fn#108551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14540:788, owner: PromotionalEmailCheckBox.onPress, offset: 0x023251bf, size: 26 bytes, params: 1, frame: 11
return setPromoEmailConsentChecked(!env0_0);
}
@@ -0,0 +1,242 @@
/* Metro module 14326; source: modules/auth/native/components/RegisterAccountInformation.tsx; dependencies: [5, 57, 31, 27, 5078, 4097, 9156, 14304, 14305, 661, 33, 4501, 697, 4017, 8973, 14302, 566, 14327, 14329, 14312, 1244, 14320, 14303, 14319, 9001, 14330, 14331, 4578, 8970, 5467, 2] */
function _fun108426(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14523:6, offset: 0x02320232, size: 494 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(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_6 = value.View;
const env0_7 = value.ScrollView;
const consentStore = importDefault(5078) /* metro dependency 5078: ConsentStore */;
const inviteStore = importDefault(4097) /* metro dependency 4097: InviteStore */;
const displayedInviteStore = importDefault(9156) /* metro dependency 9156: DisplayedInviteStore */;
value = require(14304) /* metro dependency 14304: RegistrationUIStore */;
const env0_11 = value.setRegistrationErrors;
const env0_12 = value.updateRegistrationOptions;
const env0_13 = value.useRegistrationUIStore;
value = require(14305) /* metro dependency 14305: RegistrationConstants */;
const env0_14 = value.RegisterTransitionSteps;
const env0_15 = value.RegistrationTransitionActionTypes;
const env0_16 = (require(661) /* metro dependency 661: Constants */).AuthStates;
value = require(33) /* metro dependency 33 */;
const env0_17 = value.jsx;
const env0_18 = value.jsxs;
const env0_19 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun108427);
object2 = {};
const LinearTransition = (require(4017) /* metro dependency 4017: ReanimatedRexport */).LinearTransition;
const easing = LinearTransition.easing;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
const inOut = Easing.inOut;
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
object2.layout = Reflect.apply(easing, LinearTransition, [Reflect.apply(inOut, Easing,
[Easing2.quad])]).duration(300);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/RegisterAccountInformation.tsx');
exports.default = RegisterAccountInformation;
}
function _fun108427(a0) { // fn#108427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14523:433, offset: 0x02320420, size: 118 bytes, params: 2, frame: 13
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
return {container: {marginTop: PX_24}, password: {marginTop: 24}, button: {marginTop: 24,
marginBottom: a0 ? 0 : 50}, errors: {marginTop: 4}, page: {flex: 1}};
}
function RegisterAccountInformation() { // fn#108428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14523:795, offset: 0x02320496, size: 1386 bytes, params: 1, frame: 44
var object2;
var r0;
const closure = function() {
return RegisterAccountInformation_handleSubmit.apply(this, arguments);
};
var value;
const value2 = undefined;
const value3 = (importDefault(8973) /* metro dependency 8973: useWideAuthView */)();
const styles = useStyles(value3);
let binding = env0_5;
const useContext = binding.useContext;
const TrackRegistrationContext = (require(14302) /* metro dependency 14302: Auth */).TrackRegistrationContext;
const value4 = Reflect.apply(useContext, binding, [TrackRegistrationContext]);
const value5 = useRegistrationUIStore(function(a0) {
return a0.registrationOptions;
});
const value6 = useRegistrationUIStore(function(a0) {
return a0.submitting;
});
const [property, env0_1] = env0_4(binding.useState(false), 2);
const value9 = useRegistrationUIStore(function(a0) {
return a0.errors;
});
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([DisplayedInviteStore],
function() {
return DisplayedInviteStore.getDisplayedInviteCode();
});
const value10 = (require(566) /* metro dependency 566: flux */).useStateFromStores([InviteStore], _fun108437);
const value11 = null;
const value12 = binding.useRef(value11);
const value13 = (require(14327) /* metro dependency 14327: usePasswordRegistrationStep */).usePasswordRegistrationStep();
const password = value13.password;
const setPassword = value13.setPassword;
const passwordScore = value13.passwordScore;
const preventSubmitPassword = value13.preventSubmitPassword;
var env0_4 = value13.validatePassword;
const useUsernameRegistrationStepModule = require(14329) /* metro dependency 14329: useUsernameRegistrationStep */;
const useUsernameRegistrationStep = useUsernameRegistrationStepModule.useUsernameRegistrationStep;
let REGISTER_ACCOUNT_INFORMATION = AuthStates.REGISTER_ACCOUNT_INFORMATION;
const value14 = Reflect.apply(useUsernameRegistrationStep, useUsernameRegistrationStepModule,
[REGISTER_ACCOUNT_INFORMATION]);
const usernameStatus = value14.usernameStatus;
var env0_5 = value14.transitionToNextStepOrSubmit;
const username = value14.username;
const setUsername = value14.setUsername;
const preventSubmitUsername = value14.preventSubmitUsername;
const env0_6 = value14.validateUsername;
object2 = {};
copyDataProperties(object2, value5, username);
object2['username'] = username;
object2['password'] = password;
object2['invite'] = value11 == value10 ? value2 : value10.code;
const authenticationConsentRequired = (require(566) /* metro dependency 566: flux */).useStateFromStores([ConsentStore],
function() {
return ConsentStore.getAuthenticationConsentRequired();
});
const registrationUtilsModule = require(14312) /* metro dependency 14312: RegistrationUtils */;
const hasAllRegistrationFieldsCompleted2 = registrationUtilsModule.hasAllRegistrationFieldsCompleted(object2,
{isConsentRequired: authenticationConsentRequired === true});
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r23 = hasAllRegistrationFieldsCompleted2 ? Reflect.apply(string, intl, [t['825cFy']]) : Reflect.apply(string,
intl, [t.PDTjLN]);
const defaultImport = importDefault(14320) /* metro dependency 14320: useAuthFlowBackHandler */;
const registrationStepsUtilsModule = require(14303) /* metro dependency 14303: RegistrationStepsUtils */;
const getPreviousRegistrationTransitionStep = registrationStepsUtilsModule.getPreviousRegistrationTransitionStep;
REGISTER_ACCOUNT_INFORMATION = AuthStates.REGISTER_ACCOUNT_INFORMATION;
defaultImport(Reflect.apply(getPreviousRegistrationTransitionStep, registrationStepsUtilsModule,
[REGISTER_ACCOUNT_INFORMATION]));
const defaultImport2 = importDefault(14319) /* metro dependency 14319: useInitialRegistrationStep */;
REGISTER_ACCOUNT_INFORMATION = AuthStates.REGISTER_ACCOUNT_INFORMATION;
defaultImport2(REGISTER_ACCOUNT_INFORMATION);
binding = env0_5;
binding.useEffect(_fun108439, [value4]);
const value17 = binding.useCallback(_fun108440, []);
const AuthFormView = importDefault(9001) /* metro dependency 9001: AuthFormView */;
string = intl.string;
const jec90v = (require(1244) /* metro dependency 1244: indexNative */).t.jec90v;
const RegisterUsernameInput = (require(14330) /* metro dependency 14330: RegisterUsernameInput */).RegisterUsernameInput;
const items2 = [<View style={styles.container}><RegisterUsernameInput username={username} setUsername={setUsername} onSubmitEditing={value17} usernameStatus={usernameStatus} submitBehavior="submit" autoFocus /></View>];
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const view2Props = {style: styles.password, ...env0_20};
const RegisterPasswordInput = (require(14331) /* metro dependency 14331: RegisterPasswordInput */).RegisterPasswordInput;
items2[1] = <View2 {...view2Props}><RegisterPasswordInput ref={value12} password={password} onPasswordChange={setPassword} onSubmitEditing={closure} passwordScore={passwordScore} returnKeyType={hasAllRegistrationFieldsCompleted2 ? 'done' : 'next'} /></View2>;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const view3Props = {style: styles.button, ...env0_20};
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <View3 {...view3Props}><Button size="lg" loading={value6 || property} text={r23} onPress={closure} disabled={preventSubmitUsername || preventSubmitPassword} />{value11 != value9.message ? value9.message === '' ? value11 : ((Component) => <Component style={styles.errors}>{value9.message}</Component>)(importDefault(8970) /* metro dependency 8970: FreeFormErrorLabel */) : value11}</View3>;
const authFormView = <AuthFormView headerText={Reflect.apply(string, intl,
[jec90v])}><ScrollView contentContainerStyle={{flexGrow: 1}} keyboardShouldPersistTaps="handled">{items2}</ScrollView></AuthFormView>;
if (value3) {
r0 = authFormView;
} else {
value = importDefault(5467) /* metro dependency 5467: KeyboardAwareView */;
value = ((Component) => <Component style={styles.page}>{authFormView}</Component>)(value);
r0 = value;
}
return r0;
}
function RegisterAccountInformation_handleSubmit() { // fn#108430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14523:1877, owner: RegisterAccountInformation._handleSubmit, offset: 0x02320a00, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun108432).apply(this, arguments);
}
function _fun108437() { // fn#108437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14523:1124, offset: 0x02320ba8, size: 40 bytes, params: 1, frame: 12
const displayedInviteCodeBinding = displayedInviteCode;
const value2 = null;
return value2 != displayedInviteCodeBinding ? InviteStore.getInvite(displayedInviteCode) : value2;
}
function _fun108439() { // fn#108439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14523:2412, offset: 0x02320be3, size: 51 bytes, params: 1, frame: 12
const binding = env0_0;
const ACCOUNT_INFORMATION = RegisterTransitionSteps.ACCOUNT_INFORMATION;
const VIEWED = RegistrationTransitionActionTypes.VIEWED;
binding({step: ACCOUNT_INFORMATION, actionType: VIEWED});
}
function* _fun108432() { // fn#108432, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14523:1926, offset: 0x02320a40, size: 319 bytes, params: 1, frame: 18
var object4;
var binding;
var value5;
var value6;
var value7;
var value8;
var object3;
var error;
if (true) {
value = environment.__proto__.__proto__;
var ACCOUNT_INFORMATION = env3_14.ACCOUNT_INFORMATION;
var SUBMITTED = env3_15.SUBMITTED;
require({step: ACCOUNT_INFORMATION, actionType: SUBMITTED});
object4 = {};
var value4 = View();
if (value4 != null) {
object4.username = value4;
}
importDefault(true);
try {
binding = env2_4;
} catch (error) {
importDefault(false);
throw error;
}
try {
value5 = binding();
} catch (error) {
importDefault(false);
throw error;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
importDefault(false);
throw error;
}
if (value7) {
importDefault(false);
return value6;
}
try {
value8 = value6 == null;
} catch (error) {
importDefault(false);
throw error;
}
if (!value8) {
try {
object4.password = value6;
} catch (error) {
importDefault(false);
throw error;
}
}
importDefault(false);
var Object = global.Object;
if (Object.keys(object4).length > 0) {
env3_11(object4);
object3 = {};
object3.step = env3_14.ACCOUNT_INFORMATION;
object3.actionType = env3_15.INPUT_ERROR;
object3.details = global.Object.keys(object4);
require(object3);
} else {
binding = env3_12;
binding(ScrollView);
binding = env2_5;
binding(ConsentStore);
}
}
}
@@ -0,0 +1,165 @@
/* Metro module 14340; source: modules/auth/native/components/RegisterAgeGate.tsx; dependencies: [57, 31, 27, 5078, 14304, 14305, 661, 33, 4501, 697, 3738, 14341, 3868, 1484, 14302, 566, 8986, 14320, 14303, 44, 9001, 1244, 7682, 8554, 14342, 4578, 8970, 9068, 4002, 2] */
function _fun108525(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14537:6, offset: 0x02323f5e, size: 545 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const consentStore = importDefault(5078) /* metro dependency 5078: ConsentStore */;
let value = require(14304) /* metro dependency 14304: RegistrationUIStore */;
const env0_7 = value.updateRegistrationOptions;
const env0_8 = value.useRegistrationUIStore;
value = require(14305) /* metro dependency 14305: RegistrationConstants */;
const env0_9 = value.RegisterTransitionSteps;
const env0_10 = value.RegistrationTransitionActionTypes;
const env0_11 = (require(661) /* metro dependency 661: Constants */).AuthStates;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
const env0_14 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
const env0_15 = Reflect.apply(createStyles, value, [{inputGroup: {'marginTop': 24, 'marginBottom': 24},
flexGrow: {flexGrow: 1}, button: {'flexGrow': 0, 'marginBottom': 4, 'marginTop': 16, 'flexDirection': 'column'},
datePickerButton: {color: INTERACTIVE_TEXT_DEFAULT}, page: {flex: 1}}]);
value = importDefault(3738) /* metro dependency 3738 */;
value = value.utc();
const env0_17 = value.toDate();
const env0_18 = value.clone().endOf('year').toDate();
value = value.clone();
value = value.subtract(100, 'years');
const env0_19 = value.toDate();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/RegisterAgeGate.tsx');
exports.default = RegisterAgeGate;
}
function RegisterAgeGate() { // fn#108526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14537:788, offset: 0x0232417f, size: 1593 bytes, params: 1, frame: 42
const value2 = undefined;
const styles = useStyles();
const nativeModule = require(3868) /* metro dependency 3868: native */;
const useThemeContext = nativeModule.useThemeContext;
const theme = Reflect.apply(useThemeContext, nativeModule, []).theme;
const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const binding = env0_4;
const useContext = binding.useContext;
const TrackRegistrationContext = (require(14302) /* metro dependency 14302: Auth */).TrackRegistrationContext;
const value3 = Reflect.apply(useContext, binding, [TrackRegistrationContext]);
let useState = binding.useState;
let getState = useRegistrationUIStore.getState;
const birthday = Reflect.apply(getState, useRegistrationUIStore, []).registrationOptions.birthday;
const value4 = null;
const value5 = Reflect.apply(useState, binding,
[value4 != birthday && (importDefault(14341) /* metro dependency 14341: isDateValidDateOfBirth */)(birthday) ? birthday : value4]);
const binding2 = env0_3;
const value6 = binding2(value5, 2);
const property = value6[0];
var env0_3 = value6[1];
useState = binding.useState;
getState = useRegistrationUIStore.getState;
const consent = Reflect.apply(getState, useRegistrationUIStore, []).registrationOptions.consent;
const value8 = binding2(Reflect.apply(useState, binding, [value4 != consent && consent]), 2);
const property2 = value8[0];
var env0_4 = property2;
const env0_5 = value8[1];
const value9 = binding.useMemo(_fun108527, [property]);
useState = binding.useState;
const value10 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property3 = value10[0];
const env0_6 = value10[1];
const value11 = useRegistrationUIStore(function(a0) {
return a0.submitting;
});
const authenticationConsentRequired = (require(566) /* metro dependency 566: flux */).useStateFromStores([ConsentStore],
function() {
return ConsentStore.getAuthenticationConsentRequired();
});
const value12 = useRegistrationUIStore(function(a0) {
return a0.errors;
});
const value13 = (importDefault(8986) /* metro dependency 8986: getError */)('consent', value12);
const r22 = value4 != value13 ? value13 : value12.message;
const defaultImport2 = importDefault(14320) /* metro dependency 14320: useAuthFlowBackHandler */;
const registrationStepsUtilsModule = require(14303) /* metro dependency 14303: RegistrationStepsUtils */;
const getPreviousRegistrationTransitionStep = registrationStepsUtilsModule.getPreviousRegistrationTransitionStep;
const AGE_GATE = AuthStates.AGE_GATE;
defaultImport2(Reflect.apply(getPreviousRegistrationTransitionStep, registrationStepsUtilsModule, [AGE_GATE]));
env0_4.useEffect(_fun108531, [value3]);
const value14 = (importDefault(14341) /* metro dependency 14341: isDateValidDateOfBirth */)(property);
const jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
const AuthFormView = importDefault(9001) /* metro dependency 9001: AuthFormView */;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const NgL2GX = (require(1244) /* metro dependency 1244: indexNative */).t.NgL2GX;
object.headerText = Reflect.apply(string, intl, [NgL2GX]);
object.contentStyle = styles.flexGrow;
const Input = (require(7682) /* metro dependency 7682: InputNative */).Input;
const inputProps = {label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xNpFJ6),
errorMessage: value14 ? value4 : value4 != property ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.udnqh6) : value4};
const InputButton = (require(8554) /* metro dependency 8554: native */).InputButton;
const items2 = [<View style={styles.inputGroup}><Input {...inputProps}><InputButton value={value4 == property ? value2 : property.format('L')} text={env0_16.format('L')} onPress={onPress_108532} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xNpFJ6)} accessibilityHint={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['hZaF/O'])} /></Input></View>];
const PrivacyHint = importDefault(14342) /* metro dependency 14342: PrivacyHint */;
const Boolean = global.Boolean;
items2[1] = <PrivacyHint consentRequired={Boolean(authenticationConsentRequired)} consent={property2} onToggleConsent={onToggleConsent} />;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <View style={styles.button}><Button size="lg" loading={value11} disabled={!value14} onPress={onPress_108535} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['825cFy'])} /></View>;
items2[3] = value4 != r22 ? r22 === '' ? value4 : ((Component) => <Component>{r22}</Component>)(importDefault(8970) /* metro dependency 8970: FreeFormErrorLabel */) : value4;
return (
<>
<View style={styles.page}>
<AuthFormView {...object}>
{items2}
</AuthFormView>
</View>
{((Component) => <Component modal open={property3} title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xNpFJ6)} mode="date" theme={(require(4002) /* metro dependency 4002: shared */).isThemeLight(theme) ? 'light' : 'dark'} date={value4 != value9 ? value9 : env0_17} maximumDate={env0_18} minimumDate={env0_19} onConfirm={onConfirm} onDateChange={onDateChange} onCancel={onCancel} buttonColor={styles.datePickerButton.color} />)(importDefault(9068) /* metro dependency 9068 */)}
</>
);
}
function _fun108527() { // fn#108527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14537:1247, offset: 0x023247b8, size: 34 bytes, params: 1, frame: 10
return env0_2?.toDate();
}
function _fun108531() { // fn#108531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14537:1571, offset: 0x023247ed, size: 51 bytes, params: 1, frame: 12
const binding = env0_1;
const AGE_GATE = RegisterTransitionSteps.AGE_GATE;
const VIEWED = RegistrationTransitionActionTypes.VIEWED;
binding({step: AGE_GATE, actionType: VIEWED});
}
function onToggleConsent() { // fn#108533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14537:2251, owner: RegisterAgeGate.onToggleConsent, offset: 0x02324820, size: 25 bytes, params: 1, frame: 11
return env0_5(function(a0) {
return !a0;
});
}
function RegisterAgeGateOnPress_108535() { // fn#108535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14537:2355, owner: RegisterAgeGate.onPress, offset: 0x02324839, size: 175 bytes, params: 1, frame: 17
const defaultImport = importDefault(44) /* metro dependency 44 */;
let binding = env0_2;
defaultImport(binding != null, 'birthday was not null');
updateRegistrationOptions({birthday: binding, consent: env0_4 || !authenticationConsentRequired});
binding = env0_1;
let AGE_GATE = RegisterTransitionSteps.AGE_GATE;
const SUBMITTED = RegistrationTransitionActionTypes.SUBMITTED;
binding({step: AGE_GATE, actionType: SUBMITTED});
const registrationStepsUtilsModule = require(14303) /* metro dependency 14303: RegistrationStepsUtils */;
const handleRegistrationSubmit = registrationStepsUtilsModule.handleRegistrationSubmit;
AGE_GATE = AuthStates.AGE_GATE;
Reflect.apply(handleRegistrationSubmit, registrationStepsUtilsModule, [AGE_GATE, env0_0, binding]);
}
function RegisterAgeGateOnConfirm(a0) { // fn#108536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14537:2842, owner: RegisterAgeGate.onConfirm, offset: 0x023248e8, size: 58 bytes, params: 2, frame: 13
env0_6(false);
const binding = env0_3;
const value = environment.__proto__;
binding((importDefault(3738) /* metro dependency 3738 */)(a0));
}
function onDateChange(a0) { // fn#108537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14537:2881, owner: RegisterAgeGate.onDateChange, offset: 0x02324922, size: 47 bytes, params: 2, frame: 12
const binding = env0_3;
const value = environment.__proto__;
binding((importDefault(3738) /* metro dependency 3738 */)(a0));
}
@@ -0,0 +1,245 @@
/* Metro module 14325; source: modules/auth/native/components/RegisterDisplayName.tsx; dependencies: [5, 57, 31, 27, 13285, 14304, 14305, 33, 4501, 697, 1244, 8973, 1484, 14302, 14320, 14303, 676, 14319, 14322, 13286, 5277, 8986, 9001, 7981, 4578, 5467, 2] */
function _fun108411(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14522:6, offset: 0x0231f937, size: 416 bytes, params: 8, frame: 23
var object2;
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(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const uniqueUsernamesStore = importDefault(13285) /* metro dependency 13285: UniqueUsernamesStore */;
let value = require(14304) /* metro dependency 14304: RegistrationUIStore */;
const env0_8 = value.updateRegistrationOptions;
const env0_9 = value.useRegistrationUIStore;
value = require(14305) /* metro dependency 14305: RegistrationConstants */;
const env0_10 = value.RegisterTransitionSteps;
const env0_11 = value.RegistrationTransitionActionTypes;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.globalName = {marginTop: PX_24};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.button = {marginTop: PX_24};
object2.page = {flex: 1};
const env0_14 = Reflect.apply(createStyles, value, [object2]);
const env0_15 = ['discord', 'hypesquad', 'snowsgiving', 'system message', 'system mesage', 'sustem mesage',
'sustem message'];
const env0_16 = ['everyone', 'here'];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/RegisterDisplayName.tsx');
exports.default = _default_108412;
}
function _default_108412() { // fn#108412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14522:580, offset: 0x0231fad7, size: 1226 bytes, params: 1, frame: 32
var object2;
var r12;
var r14;
var r0;
var binding4;
var length;
var property3;
var toLowerCase;
var value10;
var value11;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
var t;
var WeJZyy;
var value12;
var value;
const value2 = undefined;
const styles = useStyles();
const value3 = (importDefault(8973) /* metro dependency 8973: useWideAuthView */)();
const value4 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const binding = env0_5;
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_4;
const value6 = binding2(value5, 2);
const value7 = 0;
const property = value6[value7];
const env0_1 = value6[1];
const value8 = useRegistrationUIStore(function(a0) {
return a0.errors;
});
useState = binding.useState;
const value9 = binding2(Reflect.apply(useState, binding, [_fun108414]), 2);
const property2 = value9[value7];
const env0_3 = value9[1];
const binding3 = env0_16;
let includes = binding3.includes;
if (Reflect.apply(includes, binding3, [property2])) {
r14 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WeJZyy);
} else {
binding4 = env0_15;
length = binding4.length;
if (value7 < length) {
r12 = value7;
loopExit2: while (true) {
property3 = binding4[r12];
toLowerCase = property2.toLowerCase;
value10 = Reflect.apply(toLowerCase, property2, []);
includes = value10.includes;
if (Reflect.apply(includes, value10, [property3])) {
string = intl.string;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
WeJZyy = t.WeJZyy;
value12 = Reflect.apply(string, intl, [WeJZyy]);
r14 = value12;
break loopExit2;
}
value11 = typeof r12 === 'bigint' ? r12 + 1n : +r12 + 1;
length = binding4.length;
if (value11 < length) {
r12 = value11;
continue;
}
r14 = value2;
break loopExit2;
}
} else {
r14 = value2;
}
}
const useContext = binding.useContext;
const TrackRegistrationContext = (require(14302) /* metro dependency 14302: Auth */).TrackRegistrationContext;
const value14 = Reflect.apply(useContext, binding, [TrackRegistrationContext]);
const defaultImport = importDefault(14320) /* metro dependency 14320: useAuthFlowBackHandler */;
const registrationStepsUtilsModule = require(14303) /* metro dependency 14303: RegistrationStepsUtils */;
const getPreviousRegistrationTransitionStep = registrationStepsUtilsModule.getPreviousRegistrationTransitionStep;
const AuthStates = (require(676) /* metro dependency 676: ConstantsIOS */).AuthStates;
let REGISTER_DISPLAY_NAME = AuthStates.REGISTER_DISPLAY_NAME;
defaultImport(Reflect.apply(getPreviousRegistrationTransitionStep, registrationStepsUtilsModule,
[REGISTER_DISPLAY_NAME]));
const defaultImport2 = importDefault(14319) /* metro dependency 14319: useInitialRegistrationStep */;
REGISTER_DISPLAY_NAME = AuthStates.REGISTER_DISPLAY_NAME;
defaultImport2(REGISTER_DISPLAY_NAME);
binding.useEffect(_fun108415, [value14]);
const value15 = binding.useRef(null);
(importDefault(14322) /* metro dependency 14322: useFocusRefOnNavigation */)({inputRef: value15});
binding.useLayoutEffect(_fun108420, [binding.useCallback(_fun108416(), [value4, value14]), value4]);
r12 = (importDefault(8986) /* metro dependency 8986: getError */)('global_name', value8) ?? r14;
const AuthFormView = importDefault(9001) /* metro dependency 9001: AuthFormView */;
object2 = {};
string = intl.string;
const LYIh7j = (require(1244) /* metro dependency 1244: indexNative */).t.LYIh7j;
object2.headerText = Reflect.apply(string, intl, [LYIh7j]);
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const textInputProps = {ref: value15, value: property2, onChange: onChange_108423, returnKeyType: 'next',
onSubmitEditing: onSubmitEditing_108424, textContentType: 'nickname', errorMessage: r12,
label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9AjdkD'])};
r12 = r12 == null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fbKwSs) : value2;
textInputProps.description = r12;
textInputProps.isClearable = true;
const view = <View style={styles.globalName}><TextInput {...textInputProps} /></View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const PDTjLN = (require(1244) /* metro dependency 1244: indexNative */).t.PDTjLN;
const authFormView = <AuthFormView {...object2}>{view}<View style={styles.button}><Button size="lg" loading={property} text={Reflect.apply(string,
intl,
[PDTjLN])} onPress={onPress_108425} disabled={r14 != null || property2.trim() === ''} /></View></AuthFormView>;
if (value3) {
r0 = authFormView;
} else {
value = importDefault(5467) /* metro dependency 5467: KeyboardAwareView */;
value = ((Component) => <Component style={styles.page}>{authFormView}</Component>)(value);
r0 = value;
}
return r0;
}
function _fun108414() { // fn#108414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14522:710, offset: 0x0231ffa1, size: 47 bytes, params: 1, frame: 10
const value = environment.__proto__;
const getState = useRegistrationUIStore.getState;
return Reflect.apply(getState, useRegistrationUIStore, []).registrationOptions.globalName ?? '';
}
function _fun108415() { // fn#108415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14522:1226, offset: 0x0231ffd0, size: 51 bytes, params: 1, frame: 12
const binding = env0_4;
const ACCOUNT_DISPLAY_NAME = RegisterTransitionSteps.ACCOUNT_DISPLAY_NAME;
const VIEWED = RegistrationTransitionActionTypes.VIEWED;
binding({step: ACCOUNT_DISPLAY_NAME, actionType: VIEWED});
}
function _fun108416() { // fn#108416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14522:1355, offset: 0x02320003, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun108418);
return _fun108419;
}
function _fun108420() { // fn#108420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14522:1807, offset: 0x02320151, size: 38 bytes, params: 1, frame: 12
const binding = env0_0;
binding.setOptions({headerRight: headerRight_108421});
}
function _default_108412OnChange(a0) { // fn#108423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14522:2153, owner: _default_108412.onChange, offset: 0x023201f6, size: 40 bytes, params: 2, frame: 12
const value = a0;
const binding = env0_3;
const value3 = value.trim();
const value4 = '';
binding(value4 === value3 ? value4 : value);
}
function _default_108412OnSubmitEditing() { // fn#108424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14522:2217, owner: _default_108412.onSubmitEditing, offset: 0x0232021e, size: 20 bytes, params: 1, frame: 11
return env0_5(env0_2);
}
function* _fun108418(a0) { // fn#108418, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14522:1375, offset: 0x02320032, size: 287 bytes, params: 2, frame: 19
var binding2;
if (true) {
value = environment.__proto__.__proto__.__proto__;
var binding = env3_8;
binding({globalName: a0});
binding = env3_9;
var getState = binding.getState;
var registrationOptions = Reflect.apply(getState, binding, []).registrationOptions;
binding = env2_4;
var ACCOUNT_DISPLAY_NAME = env3_10.ACCOUNT_DISPLAY_NAME;
var SUBMITTED = env3_11.SUBMITTED;
binding({step: ACCOUNT_DISPLAY_NAME, actionType: SUBMITTED});
var username = registrationOptions.username;
if (!(username != null && registrationOptions.username !== '')) {
importDefault(true);
binding = env3_7;
if (binding.wasRegistrationSuggestionFetched(a0)) {
importDefault(false);
binding = env3_0;
binding2 = env3_2;
value = binding(binding2[15]);
value.handleNextOrSubmitRegistration(binding(binding2[16]).AuthStates.REGISTER_DISPLAY_NAME, require,
env2_4);
return undefined;
}
binding = env3_1;
var value6 = binding(env3_2[19]);
yield value6.fetchSuggestionsRegistration(a0);
if (false) {
return undefined;
}
importDefault(false);
}
binding = env3_0;
binding2 = env3_2;
value = binding(binding2[15]);
value.handleNextOrSubmitRegistration(binding(binding2[16]).AuthStates.REGISTER_DISPLAY_NAME, require, env2_4);
}
}
function headerRight_108421() { // fn#108421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14522:1838, offset: 0x02320177, size: 109 bytes, params: 1, frame: 18
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<HeaderActionButton
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd'])}
onPress={onPress_108422}
/>
);
}
function headerRight_108421OnPress() { // fn#108422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14522:1929, owner: headerRight_108421.onPress, offset: 0x023201e4, size: 18 bytes, params: 1, frame: 11
return env2_5(null);
}
@@ -0,0 +1,280 @@
/* Metro module 14313; source: modules/auth/native/components/RegisterIdentity.tsx; dependencies: [5, 57, 31, 27, 14304, 14305, 33, 4501, 4584, 8973, 1484, 14314, 676, 14302, 14319, 14320, 14303, 4594, 8993, 9001, 14321, 4578, 1244, 8970, 5467, 14323, 14324, 8853, 9221, 2] */
function _fun108322(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14510:6, offset: 0x0231c912, size: 342 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(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_6 = value.View;
const env0_7 = value.ScrollView;
value = require(14304) /* metro dependency 14304: RegistrationUIStore */;
const env0_8 = value.clearRegistrationErrorMessage;
const env0_9 = value.setRegistrationErrors;
const env0_10 = value.updateRegistrationOptions;
const env0_11 = value.useRegistrationUIStore;
value = require(14305) /* metro dependency 14305: RegistrationConstants */;
const env0_12 = value.RegisterTransitionSteps;
const env0_13 = value.RegistrationTransitionActionTypes;
value = require(33) /* metro dependency 33 */;
const env0_14 = value.jsx;
const env0_15 = value.jsxs;
const env0_16 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0) {
return {container: {'marginTop': 24, 'flex': 1}, page: {flex: 1}, button: {'width': '100%', 'marginTop': 24},
errors: {marginTop: 4}, segmentedControl: {minHeight: a0, marginBottom: 24},
scrollContent: {paddingBottom: 128}};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/RegisterIdentity.tsx');
exports.RegisterIdentity = RegisterIdentity;
}
function RegisterIdentityBase({inputMode, setInputMode, headerText, controlComponent, subheader}) { // fn#108323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14510:606, offset: 0x0231ca68, size: 1015 bytes, params: 2, frame: 35
var r0;
const closure = function() {
return RegisterIdentityBase_handleSubmit.apply(this, arguments);
};
const Math = global.Math;
const min = Math.min;
var value;
const styles = useStyles(45 * Reflect.apply(min, Math, [2,
(require(4584) /* metro dependency 4584: useFontScale */).useFontScale()]));
const value4 = (importDefault(8973) /* metro dependency 8973: useWideAuthView */)();
const env0_2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value5 = useRegistrationUIStore(function(a0) {
return a0.errors;
});
const useIdentityRegistrationStepModule = require(14314) /* metro dependency 14314: useIdentityRegistrationStep */;
const useIdentityRegistrationStep = useIdentityRegistrationStepModule.useIdentityRegistrationStep;
const AuthStates = (require(676) /* metro dependency 676: ConstantsIOS */).AuthStates;
let REGISTER_IDENTITY = AuthStates.REGISTER_IDENTITY;
const value6 = Reflect.apply(useIdentityRegistrationStep, useIdentityRegistrationStepModule, [REGISTER_IDENTITY,
inputMode]);
const loginEmail = value6.loginEmail;
const env0_4 = loginEmail;
const setLoginEmail = value6.setLoginEmail;
const loginPhone = value6.loginPhone;
const updateLoginPhone = value6.updateLoginPhone;
const identityErrorMessage = value6.identityErrorMessage;
const env0_5 = identityErrorMessage;
const env0_6 = value6.registerAndVerifyPhone;
const preventSubmitIdentity = value6.preventSubmitIdentity;
const identityError = value6.identityError;
const env0_7 = value6.validateEmail;
let binding = env0_5;
const [property, env0_8] = env0_4(binding.useState(false), 2);
binding = env0_5;
const useContext = binding.useContext;
const TrackRegistrationContext = (require(14302) /* metro dependency 14302: Auth */).TrackRegistrationContext;
const env0_9 = Reflect.apply(useContext, binding, [TrackRegistrationContext]);
const value9 = env0_5.useMemo(_fun108330, [value5.message, identityErrorMessage]);
const defaultImport = importDefault(14319) /* metro dependency 14319: useInitialRegistrationStep */;
REGISTER_IDENTITY = AuthStates.REGISTER_IDENTITY;
defaultImport(REGISTER_IDENTITY);
const defaultImport2 = importDefault(14320) /* metro dependency 14320: useAuthFlowBackHandler */;
const registrationStepsUtilsModule = require(14303) /* metro dependency 14303: RegistrationStepsUtils */;
const getPreviousRegistrationTransitionStep = registrationStepsUtilsModule.getPreviousRegistrationTransitionStep;
REGISTER_IDENTITY = AuthStates.REGISTER_IDENTITY;
defaultImport2(Reflect.apply(getPreviousRegistrationTransitionStep, registrationStepsUtilsModule,
[REGISTER_IDENTITY]));
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun108331);
const AuthFormView = importDefault(9001) /* metro dependency 9001: AuthFormView */;
const items2 = [controlComponent];
const RegisterPhoneOrEmailInput = (require(14321) /* metro dependency 14321: RegisterPhoneOrEmailInput */).RegisterPhoneOrEmailInput;
items2[1] = <RegisterPhoneOrEmailInput loginPhone={loginPhone} loginEmail={loginEmail} setLoginPhone={updateLoginPhone} setLoginEmail={setLoginEmail} inputMode={inputMode} onSubmit={closure} inputError={identityError} autoFocus />;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const PDTjLN = (require(1244) /* metro dependency 1244: indexNative */).t.PDTjLN;
items2[2] = <View style={styles.button}><Button loading={property} size="lg" text={Reflect.apply(string, intl,
[PDTjLN])} onPress={closure} disabled={preventSubmitIdentity} /></View>;
items2[3] = value9 != null ? value9 === '' ? null : ((Component) => <Component style={styles.errors}>{value9}</Component>)(importDefault(8970) /* metro dependency 8970: FreeFormErrorLabel */) : null;
const authFormView = <AuthFormView headerText={headerText} subHeader={subheader}><ScrollView style={styles.container} contentContainerStyle={styles.scrollContent} keyboardShouldPersistTaps="handled">{items2}</ScrollView></AuthFormView>;
if (value4) {
r0 = authFormView;
} else {
value = importDefault(5467) /* metro dependency 5467: KeyboardAwareView */;
value = ((Component) => <Component style={styles.page}>{authFormView}</Component>)(value);
r0 = value;
}
return r0;
}
function RegisterIdentity() { // fn#108333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14510:2715, offset: 0x0231d114, size: 534 bytes, params: 1, frame: 22
var object2;
const Math = global.Math;
const styles = useStyles(45 * Math.min(2, (require(4584) /* metro dependency 4584: useFontScale */).useFontScale()));
const deviceCountry = (require(14323) /* metro dependency 14323: getDeviceCountry */).getDeviceCountry();
const r1 = deviceCountry != null && (require(14324) /* metro dependency 14324: emailFirstCountries */).EMAIL_FIRST_COUNTRIES.has(deviceCountry);
let binding = env0_5;
const value7 = binding.useMemo(_fun108334, [r1]);
binding = env0_5;
const useState = binding.useState;
const value9 = env0_4(Reflect.apply(useState, binding, [value7[0].mode]), 2);
const property = value9[0];
const value10 = env0_5.useCallback(_fun108335, [value9[1], value7]);
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
object2 = {'pageWidth': 0, 'defaultIndex': 0};
object2.onSetActiveIndex = value10;
object2.items = value7.map(function({descriptor}) {
var object = {};
object.id = require(dependencyMap[22]).intl.string(descriptor);
object.label = require(dependencyMap[22]).intl.string(descriptor);
object.page = null;
return object;
});
const value11 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object2]);
object2 = {inputMode: property, setInputMode: env0_5.useCallback(_fun108337, [value11, value7])};
const SegmentedControl = (require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl;
object2.controlComponent = <View style={styles.segmentedControl}><SegmentedControl state={value11} keyboardShouldPersistTaps="handled" /></View>;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const WEdDgv = (require(1244) /* metro dependency 1244: indexNative */).t.WEdDgv;
object2.headerText = Reflect.apply(string, intl, [WEdDgv]);
return <RegisterIdentityBase {...object2} />;
}
function RegisterIdentityBase_handleSubmit() { // fn#108325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14510:1292, owner: RegisterIdentityBase._handleSubmit, offset: 0x0231ce5f, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun108327).apply(this, arguments);
}
function _fun108330() { // fn#108330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14510:1185, offset: 0x0231d059, size: 30 bytes, params: 1, frame: 3
return identityErrorMessage ?? env0_3.message;
}
function _fun108331() { // fn#108331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14510:1970, offset: 0x0231d077, size: 51 bytes, params: 1, frame: 12
const binding = env0_9;
const ACCOUNT_IDENTITY = RegisterTransitionSteps.ACCOUNT_IDENTITY;
const VIEWED = RegistrationTransitionActionTypes.VIEWED;
binding({step: ACCOUNT_IDENTITY, actionType: VIEWED});
}
function _fun108334() { // fn#108334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14510:2886, offset: 0x0231d32a, size: 255 bytes, params: 1, frame: 18
var items;
const PhoneOrEmailSelectorForceMode = (require(8993) /* metro dependency 8993: PhoneOrEmailUtils */).PhoneOrEmailSelectorForceMode;
const binding = env0_0;
const object2 = {};
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (binding) {
object2.descriptor = t['w/qqKK'];
object2.mode = PhoneOrEmailSelectorForceMode.EMAIL;
items = [object2, {descriptor: t.dEYpSt, mode: PhoneOrEmailSelectorForceMode.PHONE}];
} else {
object2.descriptor = t.dEYpSt;
object2.mode = PhoneOrEmailSelectorForceMode.PHONE;
items = [object2, {descriptor: t['w/qqKK'], mode: PhoneOrEmailSelectorForceMode.EMAIL}];
}
return items;
}
function _fun108335(a0) { // fn#108335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14510:3296, offset: 0x0231d429, size: 43 bytes, params: 2, frame: 12
clearRegistrationErrorMessage();
env0_2(env0_1[a0].mode);
}
function _fun108337(a0) { // fn#108337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14510:3532, offset: 0x0231d4b0, size: 66 bytes, params: 2, frame: 13
const env0_0 = a0;
const index = env0_1.findIndex(_fun108338);
if (index !== -1) {
env0_3.setActiveIndex(index, false);
}
}
function* _fun108327() { // fn#108327, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14510:1341, offset: 0x0231ce9f, size: 380 bytes, params: 1, frame: 20
var environment;
var clearRegistrationErrorMessageBinding;
var closure;
var value4;
var error;
var value5;
var binding2;
if (true) {
value = environment.__proto__.__proto__.__proto__;
var binding = env3_9;
binding({});
var setRegistrationErrorsBinding = setRegistrationErrors;
var ACCOUNT_IDENTITY = env3_12.ACCOUNT_IDENTITY;
var SUBMITTED = env3_13.SUBMITTED;
setRegistrationErrorsBinding({step: ACCOUNT_IDENTITY, actionType: SUBMITTED});
var PhoneOrEmailSelectorForceMode = env3_0(env3_2[18]).PhoneOrEmailSelectorForceMode;
var EMAIL = PhoneOrEmailSelectorForceMode.EMAIL;
if (require === EMAIL) {
binding = env3_10;
binding({email: env2_4, phoneToken: undefined});
value5 = ScrollView();
if (value5 != null) {
env3_9({email: value5});
setRegistrationErrors({step: env3_12.ACCOUNT_IDENTITY, actionType: env3_13.INPUT_ERROR,
details: ['email']});
} else {
binding = env3_0;
binding2 = env3_2;
value = binding(binding2[16]);
value.handleNextOrSubmitRegistration(binding(binding2[12]).AuthStates.REGISTER_IDENTITY, dependencyMap,
setRegistrationErrors);
}
} else {
try {
clearRegistrationErrorMessageBinding = clearRegistrationErrorMessage;
} catch (error) {
clearRegistrationErrorMessage(false);
throw error;
}
try {
clearRegistrationErrorMessageBinding(true);
} catch (error) {
clearRegistrationErrorMessage(false);
throw error;
}
try {
} catch (error) {
clearRegistrationErrorMessage(false);
throw error;
}
try {
} catch (error) {
clearRegistrationErrorMessage(false);
throw error;
}
try {
closure = _fun108328;
} catch (error) {
clearRegistrationErrorMessage(false);
throw error;
}
try {
value = View(closure);
} catch (error) {
clearRegistrationErrorMessage(false);
throw error;
}
yield value;
try {
value = undefined;
value4 = false;
} catch (error) {
clearRegistrationErrorMessage(false);
throw error;
}
if (value4) {
clearRegistrationErrorMessage(false);
return value;
}
clearRegistrationErrorMessage(false);
}
}
}
function _fun108338({mode}) { // fn#108338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14510:3555, offset: 0x0231d4f2, size: 21 bytes, params: 2, frame: 2
return mode === env0_0;
}
function _fun108328() { // fn#108328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14510:1719, offset: 0x0231d01b, size: 51 bytes, params: 1, frame: 12
const PhoneOrEmailSelectorForceMode = env4_0(env4_2[18]).PhoneOrEmailSelectorForceMode;
const EMAIL = PhoneOrEmailSelectorForceMode.EMAIL;
importDefault(EMAIL);
}
@@ -0,0 +1,199 @@
/* Metro module 14331; source: modules/auth/native/components/RegisterPasswordInput.tsx; dependencies: [29, 57, 31, 8972, 14304, 33, 4501, 697, 4017, 14328, 1244, 4573, 14322, 8986, 566, 3839, 7981, 3864, 8998, 8999, 2] */
function _fun108471(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14528:6, offset: 0x02321f02, size: 602 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const env0_3 = ['password'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(29) /* metro dependency 29 */;
const env0_5 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const phoneStore = importDefault(8972) /* metro dependency 8972: PhoneStore */;
const registrationUIStoreModule = require(14304) /* metro dependency 14304: RegistrationUIStore */;
const env0_8 = registrationUIStoreModule.setRegistrationErrors;
const env0_9 = registrationUIStoreModule.useRegistrationUIStore;
const value3 = require(33) /* metro dependency 33 */;
const env0_10 = value3.jsxs;
const env0_11 = value3.jsx;
const env0_12 = value3.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
object2.weak = {color: TEXT_FEEDBACK_CRITICAL};
const TEXT_FEEDBACK_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_WARNING;
object2.medium = {color: TEXT_FEEDBACK_WARNING};
const TEXT_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_POSITIVE;
object2.strong = {color: TEXT_FEEDBACK_POSITIVE};
object2.passwordStrength = {'marginTop': 4, 'marginBottom': 4};
object2.inputHint = {width: '100%'};
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {};
const FadeIn = (require(4017) /* metro dependency 4017: ReanimatedRexport */).FadeIn;
object2.entering = FadeIn.duration(300);
const FadeOut = (require(4017) /* metro dependency 4017: ReanimatedRexport */).FadeOut;
object2.exiting = FadeOut.duration(300);
object2 = {};
const LinearTransition = (require(4017) /* metro dependency 4017: ReanimatedRexport */).LinearTransition;
const easing = LinearTransition.easing;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
const inOut = Easing.inOut;
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
object2.layout = Reflect.apply(easing, LinearTransition, [Reflect.apply(inOut, Easing,
[Easing2.quad])]).duration(300);
value = value.forwardRef(_fun108473);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/RegisterPasswordInput.tsx');
exports.RegisterPasswordInput = value;
}
function PasswordStrength({password, isPasswordFocused, passwordError, passwordScore}) { // fn#108472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14528:691, offset: 0x0232215c, size: 582 bytes, params: 2, frame: 21
var r5;
var r6;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value4;
var strong;
var value5;
var medium;
var value6;
var weak;
const styles = useStyles();
if (passwordScore != null) {
if (isPasswordFocused) {
if (password.length === 0) {
return null;
}
if (passwordError != null) {
return null;
}
if (passwordScore <= (require(14328) /* metro dependency 14328: usePasswordScore */).PasswordScore.WEAK) {
value6 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['w/8TuV']);
weak = styles.weak;
r5 = value6;
r6 = weak;
} else if (passwordScore === (require(14328) /* metro dependency 14328: usePasswordScore */).PasswordScore.MEDIUM) {
value5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2fmTpT']);
medium = styles.medium;
r5 = value5;
r6 = medium;
} else if (passwordScore !== (require(14328) /* metro dependency 14328: usePasswordScore */).PasswordScore.STRONG) {
r5 = '';
r6 = undefined;
} else {
value4 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Xraqqc);
strong = styles.strong;
r5 = value4;
r6 = strong;
}
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
{...env0_14}
{...env0_15}
{...{['variant']: 'text-xs/medium'}}
{...{['style']: [styles.passwordStrength, r6]}}
{...{['animated']: true}}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5gbdUX'])}
{': '}
{r5}
</Text>
);
}
}
return null;
}
function _fun108473({password, onPasswordChange, onSubmitEditing, passwordScore, returnKeyType, autoFocus}, a1) { // fn#108473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14528:1303, offset: 0x023223a2, size: 1073 bytes, params: 3, frame: 37
const styles = useStyles();
let binding = env0_6;
const value4 = binding.useRef(null);
(importDefault(14322) /* metro dependency 14322: useFocusRefOnNavigation */)({inputRef: value4,
enabled: autoFocus != null && autoFocus});
binding = env0_6;
let useState = binding.useState;
const value6 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_5;
const value7 = binding2(value6, 2);
const property = value7[0];
const property2 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property3 = value8[0];
const property4 = value8[1];
const value9 = useRegistrationUIStore(function(a0) {
return a0.errors;
});
const value10 = (importDefault(8986) /* metro dependency 8986: getError */)('password', value9);
const value11 = binding.useCallback(_fun108475, [onPasswordChange, value9]);
const value13 = binding.useMemo(_fun108477, [property3,
(require(566) /* metro dependency 566: flux */).useStateFromStores([PhoneStore], _fun108476)]);
const value14 = binding.useCallback(_fun108478, [property4]);
const value15 = binding.useCallback(_fun108479, [property4]);
const value16 = binding.useCallback(_fun108480, [property2]);
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const textInputProps = {'ref': null, 'textContentType': 'newPassword', 'autoComplete': 'new-password',
ref: (require(3864) /* metro dependency 3864: mergePropsNative */).mergeRefs(a1, value4), onChange: value11,
value: password};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
textInputProps.label = Reflect.apply(string, intl, [t['CIGa+7']]);
textInputProps.accessibilityHint = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cUVsEG);
textInputProps.secureTextEntry = !property;
textInputProps.returnKeyType = returnKeyType ?? 'next';
textInputProps.autoCapitalize = 'none';
textInputProps.onSubmitEditing = onSubmitEditing;
textInputProps.onFocus = value14;
textInputProps.onBlur = value15;
textInputProps.trailingIcon = property ? (require(8998) /* metro dependency 8998: EyeSlashIcon */).EyeSlashIcon : (require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon;
string = intl.string;
textInputProps.trailingPressableProps = {accessibilityLabel: property ? Reflect.apply(string, intl,
[t.Nusip4]) : Reflect.apply(string, intl, [t.nFzpM5]), onPress: value16, hitSlop: {'top': 8, 'bottom': 8}};
textInputProps.errorMessage = value10;
textInputProps.status = value10 != null ? 'error' : undefined;
const items2 = [<TextInput {...textInputProps} />];
items2[1] = <PasswordStrength password={password} isPasswordFocused={property3} passwordError={value10} passwordScore={passwordScore} />;
items2[2] = value13 != null && value10 == null ? ((Text) => <Text {...env0_14} {...env0_15} {...{['style']: styles.inputHint}} {...{['variant']: 'text-xs/medium'}} {...{['color']: 'text-muted'}} {...{['animated']: true}}>{value13}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : null;
return (
<>
{items2}
</>
);
}
function _fun108475(a0) { // fn#108475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14528:1635, offset: 0x023227d3, size: 77 bytes, params: 2, frame: 15
var value2;
if (env0_4.password != null) {
env0_4.password;
value2 = environment.__proto__;
setRegistrationErrors(env1_4(env0_4, env1_3));
}
onPasswordChange(a0);
}
function _fun108476() { // fn#108476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14528:1738, offset: 0x02322820, size: 78 bytes, params: 1, frame: 12
const value = environment.__proto__;
const CountryCodesSets = (require(3839) /* metro dependency 3839: CountryCodes */).CountryCodesSets;
const FRANCE_AND_FRENCH_REGION = CountryCodesSets.FRANCE_AND_FRENCH_REGION;
const has = FRANCE_AND_FRENCH_REGION.has;
const getCountryCode = PhoneStore.getCountryCode;
return Reflect.apply(has, FRANCE_AND_FRENCH_REGION, [Reflect.apply(getCountryCode, PhoneStore, []).alpha2]) ? 12 : 8;
}
function _fun108477() { // fn#108477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14528:1844, offset: 0x0232286e, size: 92 bytes, params: 1, frame: 16
var value2;
var intl;
if (env0_2) {
value2 = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return intl.format((require(1244) /* metro dependency 1244: indexNative */).t.VUUJ6V, {minimumLength: env0_5});
}
}
function _fun108480() { // fn#108480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14528:2015, offset: 0x023228ca, size: 25 bytes, params: 1, frame: 11
env0_1(function(a0) {
return !a0;
});
}
@@ -0,0 +1,127 @@
/* Metro module 14321; source: modules/auth/native/components/RegisterPhoneOrEmailInput.tsx; dependencies: [31, 8972, 14304, 33, 1484, 14322, 566, 8993, 676, 1244, 8992, 2] */
function _fun108395(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14518:6, offset: 0x0231f086, size: 190 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const phoneStore = importDefault(8972) /* metro dependency 8972: PhoneStore */;
const registrationUIStoreModule = require(14304) /* metro dependency 14304: RegistrationUIStore */;
const env0_5 = registrationUIStoreModule.setRegistrationErrors;
const env0_6 = registrationUIStoreModule.useRegistrationUIStore;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/RegisterPhoneOrEmailInput.tsx');
exports.RegisterPhoneOrEmailInput = RegisterPhoneOrEmailInput;
}
function RegisterPhoneOrEmailInput({loginPhone, loginEmail, setLoginPhone, setLoginEmail, inputMode, onSubmit, inputError, submitBehavior, autoFocus}) { // fn#108396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14518:316, offset: 0x0231f144, size: 935 bytes, params: 2, frame: 32
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const env0_3 = setLoginEmail;
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
let binding = env0_3;
const value4 = binding.useRef(null);
(importDefault(14322) /* metro dependency 14322: useFocusRefOnNavigation */)({inputRef: value4,
enabled: autoFocus != null && autoFocus});
const countryCode = (require(566) /* metro dependency 566: flux */).useStateFromStores([PhoneStore], function() {
return PhoneStore.getCountryCode();
});
const code = countryCode.code;
const value6 = useRegistrationUIStore(function(a0) {
return a0.errors;
});
binding = env0_3;
const value8 = binding.useCallback(_fun108400, [inputMode, binding.useCallback(_fun108399, [value6]), setLoginPhone,
setLoginEmail]);
const value9 = binding.useCallback(_fun108401, [value3]);
const env0_9 = binding.useRef(inputMode);
binding.useLayoutEffect(_fun108402, [inputMode, loginEmail, loginPhone]);
const PhoneOrEmailSelectorForceMode = (require(8993) /* metro dependency 8993: PhoneOrEmailUtils */).PhoneOrEmailSelectorForceMode;
let PHONE = PhoneOrEmailSelectorForceMode.PHONE;
const r12 = inputMode === PHONE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['eJnn0+']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dI4d4S);
PHONE = PhoneOrEmailSelectorForceMode.PHONE;
const r13 = inputMode === PHONE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wpJ1dT) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a17rBk);
const PhoneOrEmailInput = importDefault(8992) /* metro dependency 8992: PhoneOrEmailInput */;
const alpha2 = countryCode.alpha2;
PHONE = PhoneOrEmailSelectorForceMode.PHONE;
const r7 = inputMode !== PHONE ? 'email' : 'tel';
PHONE = PhoneOrEmailSelectorForceMode.PHONE;
return (
<PhoneOrEmailInput
ref={value4}
alpha2={alpha2}
countryCode={code}
onChange={value8}
onSubmitEditing={onSubmit}
placeholder={r12}
returnKeyType="next"
autoCapitalize="none"
accessibilityHint={r13}
label={r12}
errorMessage={inputError}
onPressCountrySelector={value9}
forceMode={inputMode}
submitBehavior={submitBehavior}
autoComplete={r7}
keyboardType={inputMode !== PHONE ? 'email-address' : 'number-pad'}
isClearable
status={inputError != null ? 'error' : undefined}
/>
);
}
function _fun108399(a0) { // fn#108399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14518:673, offset: 0x0231f4fe, size: 55 bytes, params: 2, frame: 13
var object2;
const property = env0_7[a0];
if (property != null) {
object2 = {};
copyDataProperties(object2, env0_7, property);
delete object2[a0];
value = environment.__proto__;
setRegistrationErrors(object2);
}
}
function _fun108400(a0, a1) { // fn#108400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14518:747, offset: 0x0231f535, size: 103 bytes, params: 3, frame: 15
const inputModeBinding = inputMode;
const PhoneOrEmailSelectorForceMode = (require(8993) /* metro dependency 8993: PhoneOrEmailUtils */).PhoneOrEmailSelectorForceMode;
const PHONE = PhoneOrEmailSelectorForceMode.PHONE;
if (inputModeBinding === PHONE) {
env0_8('phone');
setLoginPhone(a0, a1);
} else {
env0_8('email');
setLoginEmail(a0);
}
}
function _fun108401() { // fn#108401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14518:871, offset: 0x0231f59c, size: 56 bytes, params: 1, frame: 13
const binding = env0_5;
const push = binding.push;
const AuthStates = (require(676) /* metro dependency 676: ConstantsIOS */).AuthStates;
const COUNTRY_SELECT = AuthStates.COUNTRY_SELECT;
Reflect.apply(push, binding, [COUNTRY_SELECT]);
}
function _fun108402() { // fn#108402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14518:958, offset: 0x0231f5d4, size: 141 bytes, params: 1, frame: 13
var binding;
var value2;
let current = env0_9.current;
let inputModeBinding = inputMode;
if (current !== inputModeBinding) {
binding = env0_9;
inputModeBinding = inputMode;
binding.current = inputModeBinding;
value2 = environment.__proto__;
if (inputModeBinding === (require(8993) /* metro dependency 8993: PhoneOrEmailUtils */).PhoneOrEmailSelectorForceMode.PHONE) {
current = env0_6.current;
if (current != null) {
current.setText(loginPhone);
}
} else {
current = env0_6.current;
if (current != null) {
current.setText(loginEmail);
}
}
}
}
@@ -0,0 +1,145 @@
/* Metro module 14330; source: modules/auth/native/components/RegisterUsernameInput.tsx; dependencies: [29, 57, 31, 14304, 33, 4501, 4017, 13282, 4572, 7684, 697, 4573, 1244, 14322, 7981, 477, 2] */
function _fun108464(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14527:6, offset: 0x0232176a, size: 480 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const env0_3 = ['username'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(29) /* metro dependency 29 */;
const env0_5 = importDefault(57) /* metro dependency 57 */;
const env0_6 = importAll(31) /* metro dependency 31 */;
let value = require(14304) /* metro dependency 14304: RegistrationUIStore */;
const env0_7 = value.setRegistrationErrors;
const env0_8 = value.useRegistrationUIStore;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
const env0_11 = value.Fragment;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({status: {width: '90%'},
inputHint: {width: '100%'}});
object2 = {};
const FadeIn = (require(4017) /* metro dependency 4017: ReanimatedRexport */).FadeIn;
object2.entering = FadeIn.duration(300);
const FadeOut = (require(4017) /* metro dependency 4017: ReanimatedRexport */).FadeOut;
object2.exiting = FadeOut.duration(300);
object2 = {};
const LinearTransition = (require(4017) /* metro dependency 4017: ReanimatedRexport */).LinearTransition;
const easing = LinearTransition.easing;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
const inOut = Easing.inOut;
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
object2.layout = Reflect.apply(easing, LinearTransition, [Reflect.apply(inOut, Easing,
[Easing2.quad])]).duration(300);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/RegisterUsernameInput.tsx');
exports.RegisterUsernameInput = RegisterUsernameInput;
}
function UsernameStatusMessage_108465({usernameStatus, isUsernameFocused}) { // fn#108465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14527:522, offset: 0x0232194a, size: 708 bytes, params: 2, frame: 24
var r0;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var Stack;
var items2;
var value;
const styles = useStyles();
const type = usernameStatus?.type;
const NameValidationState = (require(13282) /* metro dependency 13282: UniqueUsernamesTypes */).NameValidationState;
const ERROR = NameValidationState.ERROR;
if (type === ERROR) {
Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
items2 = [((CircleErrorIcon) => <CircleErrorIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL} />)((require(7684) /* metro dependency 7684: CircleErrorIcon */).CircleErrorIcon)];
items2[1] = <Text variant="text-xs/medium" color="text-feedback-critical" style={styles.status} {...env0_13} {...env0_14} {...{['animated']: true}}>{usernameStatus.message}</Text>;
r0 = <Stack direction="horizontal" spacing={4} align="flex-start">{items2}</Stack>;
} else if (isUsernameFocused) {
if (usernameStatus?.type === (require(13282) /* metro dependency 13282: UniqueUsernamesTypes */).NameValidationState.AVAILABLE) {
var textProps = {...env0_13, ...env0_14};
textProps['style'] = styles.status;
textProps['variant'] = 'text-xs/medium';
textProps['animated'] = true;
value = <Text variant="text-xs/medium" color="text-feedback-positive">{usernameStatus.message}</Text>;
value = <Text {...textProps}>{value}</Text>;
r0 = value;
} else if (isUsernameFocused) {
var textProps = {...env0_13, ...env0_14};
textProps['style'] = styles.inputHint;
textProps['variant'] = 'text-xs/medium';
textProps['color'] = 'text-muted';
textProps['animated'] = true;
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y7LSyU);
value = <Text {...textProps}>{value}</Text>;
r0 = value;
} else {
r0 = null;
}
} else if (isUsernameFocused) {
var textProps = {...env0_13, ...env0_14};
textProps['style'] = styles.inputHint;
textProps['variant'] = 'text-xs/medium';
textProps['color'] = 'text-muted';
textProps['animated'] = true;
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y7LSyU);
value = <Text {...textProps}>{value}</Text>;
r0 = value;
} else {
r0 = null;
}
return r0;
}
function RegisterUsernameInput({username, setUsername, usernameStatus, onSubmitEditing, submitBehavior, autoFocus}) { // fn#108466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14527:1464, offset: 0x02321c0e, size: 669 bytes, params: 2, frame: 33
let binding = env0_6;
const value3 = binding.useRef(null);
(importDefault(14322) /* metro dependency 14322: useFocusRefOnNavigation */)({inputRef: value3,
enabled: autoFocus != null && autoFocus});
binding = env0_6;
const [property, property2] = env0_5(binding.useState(true), 2);
const value8 = binding.useCallback(_fun108468, [useRegistrationUIStore(function(a0) {
return a0.errors;
}), setUsername]);
const value9 = binding.useCallback(_fun108469, [property2]);
const value10 = binding.useCallback(_fun108470, [property2]);
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const object = {ref: value3};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const IEpCBQ = (require(1244) /* metro dependency 1244: indexNative */).t.IEpCBQ;
object.label = Reflect.apply(string, intl, [IEpCBQ]);
object.accessibilityHint = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['47dcUZ']);
object.onChange = value8;
object.autoCorrect = false;
object.secureTextEntry = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
object.keyboardType = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 'visible-password' : 'default';
object.value = username;
object.onSubmitEditing = onSubmitEditing;
object.returnKeyType = 'next';
object.autoComplete = 'username';
object.textContentType = 'username';
object.autoCapitalize = 'none';
object.onFocus = value9;
object.onBlur = value10;
object.isClearable = true;
const type = usernameStatus?.type;
const NameValidationState = (require(13282) /* metro dependency 13282: UniqueUsernamesTypes */).NameValidationState;
const ERROR = NameValidationState.ERROR;
object.status = type !== ERROR ? undefined : 'error';
object.submitBehavior = submitBehavior;
return (
<>
<TextInput {...object} />
<UsernameStatusMessage_108465 usernameStatus={usernameStatus} isUsernameFocused={property} />
</>
);
}
function _fun108468(a0) { // fn#108468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14527:1730, offset: 0x02321eab, size: 87 bytes, params: 2, frame: 16
var value2;
const username = env0_2.username;
if (username != null) {
env0_2.username;
value2 = environment.__proto__;
setRegistrationErrors(env1_4(env0_2, env1_3));
}
setUsername(a0.toLowerCase());
}
@@ -0,0 +1,36 @@
/* Metro module 14333; source: modules/auth/native/components/RegistrationBailoutButton.tsx; dependencies: [31, 33, 4501, 1305, 1244, 2] */
function _fun108496(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14530:6, offset: 0x02322ea9, size: 178 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
const env0_3 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({bail: {'marginBottom': 16,
'marginLeft': 'auto', 'marginRight': 'auto'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/RegistrationBailoutButton.tsx');
exports.default = _default_108497;
}
function _default_108497({onBail}) { // fn#108497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14530:213, offset: 0x02322f5b, size: 216 bytes, params: 2, frame: 21
const styles = useStyles();
const Button = (require(1305) /* metro dependency 1305: native */).Button;
const object2 = {shrink: true};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const CZ7wvG = (require(1244) /* metro dependency 1244: indexNative */).t.CZ7wvG;
object2.text = Reflect.apply(string, intl, [CZ7wvG]);
const Button2 = (require(1305) /* metro dependency 1305: native */).Button;
const Sizes = Button2.Sizes;
const MEDIUM = Sizes.MEDIUM;
object2.size = MEDIUM;
const ButtonLooks = (require(1305) /* metro dependency 1305: native */).ButtonLooks;
let LINK = ButtonLooks.LINK;
object2.look = LINK;
const ButtonColors = (require(1305) /* metro dependency 1305: native */).ButtonColors;
LINK = ButtonColors.LINK;
object2.color = LINK;
object2.style = styles.bail;
object2.onPress = onBail;
return <Button {...object2} />;
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,359 @@
/* Metro module 14306; source: modules/auth/native/components/Welcome.tsx; dependencies: [31, 27, 14307, 4107, 7069, 11876, 1885, 4097, 9156, 661, 6934, 4118, 33, 4501, 697, 11976, 1244, 44, 1305, 3995, 10555, 7556, 12636, 4573, 1484, 1585, 566, 4594, 4884, 683, 587, 5076, 6518, 14308, 14303, 6261, 4578, 3868, 5314, 9871, 2] */
function _fun108260(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14503:6, offset: 0x02319d06, size: 681 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_4 = value.View;
const env0_5 = value.Image;
const env0_6 = value.ScrollView;
const ageGateStore = importDefault(14307) /* metro dependency 14307: AgeGateStore */;
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
const guildTemplateStore = importDefault(7069) /* metro dependency 7069: GuildTemplateStore */;
const multiAccountStore = importDefault(11876) /* metro dependency 11876: MultiAccountStore */;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
const inviteStore = importDefault(4097) /* metro dependency 4097: InviteStore */;
const displayedInviteStore = importDefault(9156) /* metro dependency 9156: DisplayedInviteStore */;
value = require(661) /* metro dependency 661: Constants */;
const Fonts = value.Fonts;
const env0_14 = value.AnalyticEvents;
const env0_15 = value.StorageKeys;
const env0_16 = value.AuthStates;
const env0_17 = value.InviteStates;
const env0_18 = (require(6934) /* metro dependency 6934: GuildTemplatesConstants */).GuildTemplateStates;
const env0_19 = (require(4118) /* metro dependency 4118: Constants */).InviteTypes;
value = require(33) /* metro dependency 33 */;
const env0_20 = value.jsx;
const env0_21 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = value.createStyles;
const env0_22 = Reflect.apply(createStyles, value, [_fun108264]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
object3 = {};
const object4 = {'backgroundColor': null, 'padding': 16, 'flexDirection': 'row'};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object4.backgroundColor = BACKGROUND_BASE_LOWEST;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.container = object4;
object3.text = {marginLeft: 16};
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
object3.name = {color: MOBILE_TEXT_HEADING_PRIMARY, fontFamily: PRIMARY_SEMIBOLD, fontSize: 16, lineHeight: 20};
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object3.inviteText = {'color': null, 'fontSize': 14, 'lineHeight': 18, color: TEXT_SUBTLE};
const env0_23 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/Welcome.tsx');
exports.default = Welcome;
}
function InviteCard({invite, style}) { // fn#108261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14503:1365, offset: 0x02319faf, size: 708 bytes, params: 2, frame: 28
var r5;
var r12;
var r17;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
var userRecord;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value7;
var avatar;
var value10;
var formattedName;
var value12;
var value13;
var name;
var items2;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
var items3;
const styles = useStyles();
const guild = invite.guild;
const inviter = invite.inviter;
const channel = invite.channel;
const state = invite.state;
const RESOLVED = InviteStates.RESOLVED;
if (state !== RESOLVED) {
return null;
}
if (guild != null) {
value12 = ((Component) => <Component guild={guild} />)(importDefault(11976) /* metro dependency 11976: GuildInviteIcon */);
value13 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3rE1P8']);
name = guild.name;
r5 = value12;
r12 = name;
r17 = value13;
var viewBindingProps = {style: [styles.container, style]};
items2 = [r5];
var viewBinding2Props = {style: styles.text};
items3 = [<LegacyText style={styles.inviteText}>{r17}</LegacyText>];
name = styles.name;
items3[1] = <LegacyText style={name}>{r12}</LegacyText>;
items2[1] = <View {...viewBinding2Props}>{items3}</View>;
return (
<View {...viewBindingProps}>
{items2}
</View>
);
}
if (channel != null) {
(importDefault(44) /* metro dependency 44 */)(inviter != null, 'Null inviter');
value7 = Object.create(UserRecord.prototype, {constructor: {value: UserRecord}});
userRecord = new UserRecord(inviter);
avatar = <Avatar user={userRecord instanceof Object ? userRecord : value7} guildId={undefined} />;
value10 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.OsdY8B);
formattedName = (importDefault(3995) /* metro dependency 3995: UserUtils */).getFormattedName(inviter);
r5 = avatar;
r12 = formattedName;
r17 = value10;
var viewBindingProps = {style: [styles.container, style]};
items2 = [r5];
var viewBinding2Props = {style: styles.text};
items3 = [<LegacyText style={styles.inviteText}>{r17}</LegacyText>];
items3[1] = <LegacyText style={styles.name}>{r12}</LegacyText>;
items2[1] = <View {...viewBinding2Props}>{items3}</View>;
return (
<View {...viewBindingProps}>
{items2}
</View>
);
}
if (inviter == null) {
return null;
}
const value2 = Object.create(UserRecord.prototype, {constructor: {value: UserRecord}});
userRecord = new UserRecord(inviter);
return (
<View style={[styles.container, style]}>
<Avatar user={userRecord instanceof Object ? userRecord : value2} guildId={undefined} />
<View style={styles.text}>
<LegacyText style={styles.inviteText}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+ITYkQ'])}
</LegacyText>
<LegacyText style={styles.name}>
{(importDefault(3995) /* metro dependency 3995: UserUtils */).getFormattedName(inviter, true)}
</LegacyText>
</View>
</View>
);
}
function GuildTemplateCard({guildTemplate, style}) { // fn#108262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14503:2097, offset: 0x0231a273, size: 303 bytes, params: 2, frame: 29
const styles = useStyles();
const items2 = [styles.container, style];
const image = <Image source={importDefault(10555) /* metro dependency 10555 */} />;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const QzUORX = (require(1244) /* metro dependency 1244: indexNative */).t.QzUORX;
return (
<View style={items2}>
{image}
<View style={styles.text}>
<LegacyText style={styles.inviteText}>
{Reflect.apply(string, intl, [QzUORX])}
</LegacyText>
<LegacyText style={styles.name}>
{guildTemplate.name}
</LegacyText>
</View>
</View>
);
}
function Centerpiece({invite, guildTemplate, inlineButtons}) { // fn#108263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14503:2409, offset: 0x0231a3a2, size: 591 bytes, params: 2, frame: 38
const value2 = (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)();
const styles = useStyles(value2);
const moduleValue = require(12636) /* metro dependency 12636 */;
const value4 = invite != null;
const r15 = guildTemplate != null && guildTemplate.state === GuildTemplateStates.RESOLVED;
const items2 = [styles.centerpieceContainer];
const image = <Image style={styles.logo} source={moduleValue} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const r16 = value2 ? 1 : 2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const items3 = [<Text style={styles.header} adjustsFontSizeToFit lineClamp={r16} variant="display-md" color="always-white" maxFontSizeMultiplier={1}>{Reflect.apply(string,
intl, [(require(1244) /* metro dependency 1244: indexNative */).t['3S2xmm']])}</Text>];
const items4 = [styles.subHeader];
items4[1] = value4 || r15 ? styles.subHeaderWithInvite : null;
string = intl.string;
const Gtcthl = (require(1244) /* metro dependency 1244: indexNative */).t.Gtcthl;
items3[1] = <Text variant="text-md/medium" color="always-white" style={items4} maxFontSizeMultiplier={3}>{Reflect.apply(string,
intl, [Gtcthl])}</Text>;
items3[2] = value4 ? <InviteCard invite={invite} /> : null;
items3[3] = r15 ? <GuildTemplateCard guildTemplate={guildTemplate} /> : null;
return (
<View style={items2}>
<ScrollView alwaysBounceVertical={false} contentContainerStyle={styles.scrollViewContainer}>
{image}
<View>
{items3}
</View>
{inlineButtons}
</ScrollView>
</View>
);
}
function _fun108264(a0) { // fn#108264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14503:414, offset: 0x0231a5f1, size: 173 bytes, params: 2, frame: 5
return {container: {'height': '100%', 'flex': 1, 'padding': 16}, logo: {'flex': 0, 'width': 93, 'height': 70,
'tintColor': 'white', 'alignSelf': 'center', 'marginBottom': 24}, scrollViewContainer: {'flexShrink': 0,
'flexGrow': 1, 'justifyContent': 'center'}, header: {'textAlign': 'center', 'marginBottom': 8,
'textTransform': 'uppercase'}, subHeader: {'fontSize': 18, 'textAlign': 'center', 'alignSelf': 'center',
'maxWidth': null, 'marginBottom': 24, 'marginHorizontal': 16, maxWidth: a0 ? 480 : 300},
subHeaderWithInvite: {marginBottom: 16}, centerpieceContainer: {'flexGrow': 1, 'flexShrink': 1,
'justifyContent': 'center'}, buttonContainer: {'paddingHorizontal': 28, 'maxWidth': 480, 'alignSelf': 'center',
'width': '100%'}};
}
function Welcome() { // fn#108265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14503:3287, offset: 0x0231a69e, size: 1013 bytes, params: 1, frame: 34
const TTIFirstContentfulPaint = (require(9871) /* metro dependency 9871: TTIFirstContentfulPaint */).TTIFirstContentfulPaint;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items4;
var view;
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
var object;
var items2;
var object2;
var items3;
const value2 = (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)();
const styles = useStyles(value2);
const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const {top, bottom} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([DisplayedInviteStore],
function() {
return DisplayedInviteStore.getDisplayedInviteCode();
});
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([InviteStore], _fun108267);
const guildTemplate = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildTemplateStore],
_fun108268);
const env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AgeGateStore], function() {
return AgeGateStore.isUnderageAnonymous();
});
const hasLoggedInAccounts = (require(566) /* metro dependency 566: flux */).useStateFromStores([MultiAccountStore],
function() {
return MultiAccountStore.getHasLoggedInAccounts();
});
const canUseMultiAccountMobile = (require(566) /* metro dependency 566: flux */).useStateFromStores([MultiAccountStore],
function() {
return MultiAccountStore.getCanUseMultiAccountMobile();
});
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun108272);
const binding = env0_3;
binding.useEffect(_fun108273, []);
(importDefault(6518) /* metro dependency 6518: useInitialValue */)(ExperimentStore.hasLoadedExperiments);
binding.useEffect(function() {
});
binding.useEffect(function() {
});
if (canUseMultiAccountMobile) {
if (hasLoggedInAccounts) {
return ((Component) => <Component />)(importDefault(14308) /* metro dependency 14308: ChooseAccount */);
}
var viewBindingProps = {style: styles.buttonContainer};
items4 = [<Button size="lg" variant="primary-overlay" onPress={onPress_108276} text={intl.string(t.pV8xeR)} />];
items4[1] = <Button size="lg" variant="secondary-overlay" onPress={onPress_108277} text={intl.string(t.dKhVQN)} />;
view = <View {...viewBindingProps}><ButtonGroup>{items4}</ButtonGroup></View>;
object = {};
items2 = [styles.container];
object2 = {};
object2.paddingTop = top + (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object2.paddingBottom = bottom;
items2[1] = object2;
object.style = items2;
items3 = [<Centerpiece invite={value4} guildTemplate={guildTemplate} inlineButtons={value2 ? view : null} />];
items3[1] = !value2 && view;
items3[2] = <TTIFirstContentfulPaint label="welcome" />;
return (
<ThemeContextProvider theme="darker">
<View {...object}>
{items3}
</View>
</ThemeContextProvider>
);
}
const button = <Button size="lg" variant="primary-overlay" onPress={onPress_108276} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pV8xeR)} />;
view = <View style={styles.buttonContainer}><ButtonGroup>{button}<Button size="lg" variant="secondary-overlay" onPress={onPress_108277} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dKhVQN)} /></ButtonGroup></View>;
items2 = [styles.container];
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
items2[1] = {paddingTop: top + NAV_BAR_HEIGHT, paddingBottom: bottom};
return (
<ThemeContextProvider theme="darker">
<View style={items2}>
<Centerpiece
invite={value4}
guildTemplate={guildTemplate}
inlineButtons={value2 ? view : null}
/>
{!value2 && view}
<TTIFirstContentfulPaint label="welcome" />
</View>
</ThemeContextProvider>
);
}
function _fun108267() { // fn#108267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14503:3492, offset: 0x0231aaa6, size: 40 bytes, params: 1, frame: 12
const displayedInviteCodeBinding = displayedInviteCode;
const value2 = null;
return value2 != displayedInviteCodeBinding ? InviteStore.getInvite(displayedInviteCode) : value2;
}
function _fun108268() { // fn#108268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14503:3561, offset: 0x0231aace, size: 30 bytes, params: 1, frame: 11
const value = environment.__proto__;
return GuildTemplateStore.getGuildTemplate(GuildTemplateStore.getDisplayedGuildTemplateCode());
}
function _fun108272() { // fn#108272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14503:3857, offset: 0x0231ab29, size: 313 bytes, params: 1, frame: 21
const value2 = undefined;
(require(4884) /* metro dependency 4884: TTIAnalyticsUtils */).trackAppUIViewed();
(require(4884) /* metro dependency 4884: TTIAnalyticsUtils */).trackAppLaunchCompleted();
const value4 = null;
const r5 = value4 != env0_2 && value4 != env0_2.type ? InviteTypes[env0_2.type] : value4;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const APP_LANDING_VIEWED = AnalyticEvents.APP_LANDING_VIEWED;
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
const get = Storage.get;
const LOGOUT_TIMESTAMP_KEY = StorageKeys.LOGOUT_TIMESTAMP_KEY;
Reflect.apply(track, defaultImport, [APP_LANDING_VIEWED, {last_logout_ts: Reflect.apply(get, Storage,
[LOGOUT_TIMESTAMP_KEY]), invite_type: r5,
guild_id: value4 == env0_2 || value4 == env0_2.guild ? value2 : env0_2.guild.id,
channel_id: value4 == env0_2 || value4 == env0_2.channel ? value2 : env0_2.channel.id,
invite_code: value4 == env0_2 ? value2 : env0_2.code}]);
return value2;
}
function _fun108273() { // fn#108273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14503:4239, offset: 0x0231ac62, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */).getLocationMetadata();
}
function WelcomeOnPress() { // fn#108276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14503:4526, owner: Welcome.onPress, offset: 0x0231ac87, size: 146 bytes, params: 1, frame: 16
var moduleValue;
var binding;
var value;
if (env0_3) {
binding = env0_0;
binding.push(AuthStates.AGE_GATE_UNDERAGE, {fromRegister: true});
} else {
moduleValue = require(14303) /* metro dependency 14303: RegistrationStepsUtils */;
env0_0.push(moduleValue.getNextAuthState(AuthStates.WELCOME));
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
value.track(AnalyticEvents.REGISTER_VIEWED);
}
}
function WelcomeOnPress_108277() { // fn#108277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14503:4814, owner: Welcome.onPress, offset: 0x0231ad19, size: 87 bytes, params: 1, frame: 15
const binding = env0_0;
const push = binding.push;
const LOGIN = AuthStates.LOGIN;
Reflect.apply(push, binding, [LOGIN]);
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const LOGIN_VIEWED = AnalyticEvents.LOGIN_VIEWED;
Reflect.apply(track, defaultImport, [LOGIN_VIEWED, {source: 'welcome'}]);
}
@@ -0,0 +1,11 @@
/* Metro module 9002; source: modules/auth/native/components/WideAuthScrollContext.tsx; dependencies: [31, 2] */
function _fun70064(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9187:6, offset: 0x01cecbde, size: 113 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
value = value.createContext(function() {
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/WideAuthScrollContext.tsx');
exports.WideAuthScrollContext = value;
}
@@ -0,0 +1,31 @@
/* Metro module 9003; source: modules/auth/native/components/atoms/AuthHeader.tsx; dependencies: [31, 661, 33, 4501, 6597, 697, 1305, 2] */
function _fun70066(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9188:6, offset: 0x01cecc4f, size: 257 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object, textStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 24), undefined);
object['textAlign'] = 'center';
const env0_3 = Reflect.apply(createStyles, createStylesModule, [{header: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/atoms/AuthHeader.tsx');
exports.default = AuthHeader;
}
function AuthHeader({children, style}) { // fn#70067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9188:361, offset: 0x01cecd50, size: 99 bytes, params: 2, frame: 17
const styles = useStyles();
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<LegacyText style={[styles.header, style]} accessibilityRole="header">
{children}
</LegacyText>
);
}
@@ -0,0 +1,26 @@
/* Metro module 9004; source: modules/auth/native/components/atoms/AuthNavbarPlaceholder.tsx; dependencies: [31, 33, 4501, 697, 5282, 2] */
function _fun70068(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9189:6, offset: 0x01cecdb3, size: 201 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const TRANSPARENT = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.TRANSPARENT;
const env0_3 = Reflect.apply(createStyles, createStylesModule, [{navBar: {backgroundColor: TRANSPARENT,
borderBottomWidth: 0}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/atoms/AuthNavbarPlaceholder.tsx');
exports.default = AuthNavbarPlaceholder;
}
function AuthNavbarPlaceholder() { // fn#70069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9189:332, offset: 0x01cece7c, size: 69 bytes, params: 1, frame: 15
const styles = useStyles();
const FauxHeader = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).FauxHeader;
return (
<FauxHeader style={styles.navBar}>
{null}
</FauxHeader>
);
}
@@ -0,0 +1,36 @@
/* Metro module 8584; source: modules/auth/native/components/atoms/BackgroundImage.tsx; dependencies: [31, 27, 33, 4048, 4002, 8585, 8586, 2] */
function _fun67887(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8769:6, offset: 0x01c36eb2, size: 183 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const value = require(27) /* metro dependency 27 */;
const env0_4 = value.Image;
const env0_5 = value.View;
const env0_6 = value.StyleSheet;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/atoms/BackgroundImage.tsx');
exports.default = BackgroundImage;
}
function BackgroundImage({backgroundImageSource, backgroundImageCover}) { // fn#67888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8769:264, offset: 0x01c36f69, size: 161 bytes, params: 2, frame: 18
backgroundImageCover = !(backgroundImageCover === undefined) && backgroundImageCover;
return (
<View style={StyleSheet.absoluteFill}>
<Image
{...env0_3.useMemo(_fun67889, [backgroundImageSource, backgroundImageCover,
(importDefault(4048) /* metro dependency 4048: useTheme */)()])}
/>
</View>
);
}
function _fun67889() { // fn#67889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8769:371, offset: 0x01c3700a, size: 165 bytes, params: 1, frame: 15
const object2 = {};
const value = environment.__proto__;
object2.style = [StyleSheet.absoluteFill, backgroundImageCover ? {'width': '100%',
'height': '100%'} : {width: '100%'}];
object2.source = backgroundImageSource ?? ((require(4002) /* metro dependency 4002: shared */).isThemeDark(env0_2) ? importDefault(8585) /* metro dependency 8585 */ : importDefault(8586) /* metro dependency 8586 */);
return object2;
}
@@ -0,0 +1,21 @@
/* Metro module 14324; source: modules/auth/native/components/utils/emailFirstCountries.tsx; dependencies: [2] */
function _fun108410(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14521:6, offset: 0x0231f8c5, size: 114 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Set = global.Set;
const set = new Set(['FI', 'ID', 'NG', 'BJ', 'BI', 'MH', 'LS', 'IR', 'AS', 'CU', 'GI', 'SC', 'AX', 'BL', 'FK', 'GG',
'IO', 'NU', 'PM', 'TK', 'TM', 'TV', 'WF', 'BD', 'PK', 'PH', 'MM', 'UA', 'UZ', 'KZ', 'KG', 'SA', 'MA', 'PE',
'NL', 'KH', 'VE', 'NP', 'DZ', 'IL', 'MN', 'AZ', 'SV', 'RO', 'BY', 'EC', 'GE', 'ZA', 'RS', 'GR', 'LB', 'YE',
'GT', 'BG', 'JO', 'NO', 'LK', 'BE', 'KW', 'PA', 'HR', 'SE', 'ET', 'KE', 'NZ', 'AO', 'HN', 'TN', 'IE', 'DO',
'GH', 'SG', 'MG', 'DK', 'PS', 'SI', 'NI', 'HU', 'OM', 'BA', 'TJ', 'UG', 'ZM', 'CL', 'RE', 'LY', 'AM', 'JM',
'ZW', 'QA', 'PY', 'BT', 'XK', 'PT', 'CR', 'SN', 'CM', 'TZ', 'HT', 'GN', 'CN', 'UY', 'SY', 'SK', 'CD', 'GA',
'LT', 'ME', 'SO', 'CZ', 'TT', 'MD', 'CI', 'AL', 'MK', 'BF', 'PF', 'LU', 'RU', 'LV', 'BH', 'EE', 'SL', 'MU',
'TR', 'GM', 'CV', 'TG', 'SD', 'BW', 'SS', 'LA', 'BZ', 'PG', 'NE', 'BS', 'SZ', 'MO', 'PR', 'GD', 'AW', 'GY',
'CG', 'SR', 'TC', 'IS', 'TD', 'GQ', 'TO', 'GU', 'GP', 'WS', 'MQ', 'NC', 'KN', 'MW', 'BN', 'MR', 'ST', 'RW',
'VU', 'FO', 'LR', 'GL', 'BM', 'CF', 'MC', 'VI', 'MP', 'YT', 'FM', 'IM', 'GW', 'AD', 'MV', 'SB', 'BB', 'DM',
'MT', 'AG', 'CW', 'JE', 'KI', 'DJ', 'MF', 'CK', 'LC', 'CY', 'KY', 'VC', 'ML', 'VG', 'GF', 'FJ', 'MZ', 'EG',
'AF', 'KM', 'AI', 'BQ', 'ER', 'LI', 'MS', 'NR', 'PW', 'SM', 'SX', 'TL']);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/utils/emailFirstCountries.tsx');
exports.EMAIL_FIRST_COUNTRIES = set;
}
@@ -0,0 +1,23 @@
/* Metro module 14323; source: modules/auth/native/components/utils/getDeviceCountry.tsx; dependencies: [27, 477, 651, 2] */
function _fun108408(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14520:6, offset: 0x0231f7ac, size: 117 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(27) /* metro dependency 27 */).NativeModules;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/utils/getDeviceCountry.tsx');
exports.getDeviceCountry = getDeviceCountry;
}
function getDeviceCountry() { // fn#108409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14520:230, offset: 0x0231f821, size: 164 bytes, params: 1, frame: 14
const value2 = undefined;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
const r2 = platformUtilsModule.isAndroid() ? (require(651) /* metro dependency 651: NativeDeviceLocaleModule */).default : NativeModules.LocalizationManager;
const value = null;
const Language = value == r2 ? value2 : r2.getConstants().Language;
if (value == Language) {
return value;
}
const value3 = Language.split('-');
return value3.length >= 2 ? value3[value3.length - 1].toUpperCase() : value;
}
@@ -0,0 +1,283 @@
/* Metro module 14352; source: modules/auth/native/components/utils/handleRegisterErrorRedirection.tsx; dependencies: [14305, 661, 676, 8986, 14303, 14312, 2] */
function _fun108623(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14549:6, offset: 0x023276d1, size: 316 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const _arrayLikeToArray_108626 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const registrationConstantsModule = require(14305) /* metro dependency 14305: RegistrationConstants */;
const env0_3 = registrationConstantsModule.RegisterTransitionSteps;
const env0_4 = registrationConstantsModule.RegistrationTransitionActionTypes;
const env0_5 = registrationConstantsModule.authStateToRegisterTransitionStep;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AbortCodes;
object2 = {};
const AuthStates = (require(676) /* metro dependency 676: ConstantsIOS */).AuthStates;
const REGISTER_IDENTITY = AuthStates.REGISTER_IDENTITY;
object2[REGISTER_IDENTITY] = ['email', 'phoneToken'];
const REGISTER_DISPLAY_NAME = AuthStates.REGISTER_DISPLAY_NAME;
object2[REGISTER_DISPLAY_NAME] = ['global_name'];
const REGISTER_ACCOUNT_INFORMATION = AuthStates.REGISTER_ACCOUNT_INFORMATION;
object2[REGISTER_ACCOUNT_INFORMATION] = ['username', 'password'];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/utils/handleRegisterErrorRedirection.tsx');
exports.default = handleRegisterErrorRedirection;
}
function _createForOfIteratorHelperLoose_108624(a0, a1) { // fn#108624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14549:237, offset: 0x0232780d, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun108625;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_108626(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_108626(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_108626(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun108625;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function getRedirectStepForErrorKey(a0) { // fn#108627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14549:1380, offset: 0x02327981, size: 164 bytes, params: 2, frame: 11
const AuthStates = (require(676) /* metro dependency 676: ConstantsIOS */).AuthStates;
if (a0 === 'email') {
return AuthStates.REGISTER_IDENTITY;
}
if (a0 === 'phoneToken') {
return AuthStates.REGISTER_IDENTITY;
}
if (a0 === 'global_name') {
return AuthStates.REGISTER_DISPLAY_NAME;
}
if (a0 === 'username') {
return AuthStates.REGISTER_ACCOUNT_INFORMATION;
}
if (a0 === 'password') {
return AuthStates.REGISTER_ACCOUNT_INFORMATION;
}
return null;
}
function handleRegisterErrorRedirection(a0, a1, a2, a3) { // fn#108628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14549:1760, offset: 0x02327a25, size: 607 bytes, params: 5, frame: 30
var r10;
var r1;
var r16;
var _createForOfIteratorHelperLoose_108624Binding;
var moduleValue;
var getRegistrationSteps;
var value4;
var value5;
var done;
var value6;
var property;
var object2;
var value7;
var value8;
var value9;
var value10;
var redirectStepForErrorKey;
var value12;
var RESPONSE_ERROR;
var items2;
var getCommonErrorDetails;
var error_code;
var value13;
var value14;
var message;
var value15;
let value = environment;
if ((importDefault(8986) /* metro dependency 8986: getError */)('date_of_birth', a2) == null) {
reducibleJoin16: while (true) {
if (global.Number(a2.code) !== AbortCodes.UNDER_MINIMUM_AGE) {
_createForOfIteratorHelperLoose_108624Binding = _createForOfIteratorHelperLoose_108624;
moduleValue = require(14303) /* metro dependency 14303: RegistrationStepsUtils */;
getRegistrationSteps = moduleValue.getRegistrationSteps;
value4 = _createForOfIteratorHelperLoose_108624Binding(Reflect.apply(getRegistrationSteps, moduleValue,
[]));
value5 = value4();
done = value5.done;
if (!done) {
r10 = value5;
reducibleLoop3: while (true) {
value6 = r10.value;
_createForOfIteratorHelperLoose_108624Binding = _createForOfIteratorHelperLoose_108624;
property = env0_7[value6];
reducibleJoin5: while (true) {
if (property != null) {
r1 = property;
break reducibleJoin5;
}
r1 = [];
break reducibleJoin5;
}
value7 = _createForOfIteratorHelperLoose_108624Binding(r1);
value8 = value7();
done = value8.done;
if (!done) {
r16 = value8;
reducibleLoop6: while (true) {
value9 = r16.value;
value10 = (importDefault(8986) /* metro dependency 8986: getError */)(value9, a2);
if (value10 != null) {
redirectStepForErrorKey = getRedirectStepForErrorKey(value9);
reducibleJoin8: while (true) {
if (redirectStepForErrorKey != null) {
object2 = {};
object2.step = authStateToRegisterTransitionStep(redirectStepForErrorKey);
object2.actionType = RegistrationTransitionActionTypes.RESPONSE_ERROR;
items2 = [value10];
value = require(14312) /* metro dependency 14312: RegistrationUtils */;
items2[1] = value.getCommonErrorDetails(a2.error_code);
object2.details = items2;
a1(object2);
a0.navigate(redirectStepForErrorKey);
return undefined;
}
break reducibleJoin8;
}
}
value12 = value7();
done = value12.done;
if (done) {
break reducibleLoop6;
}
r16 = value12;
continue reducibleLoop6;
}
}
value13 = value4();
done = value13.done;
if (done) {
break reducibleLoop3;
}
r10 = value13;
continue reducibleLoop3;
}
}
error_code = a2.error_code;
value14 = error_code != null;
reducibleJoin13: while (true) {
if (value14) {
message = a2.message;
value15 = message != null;
r1 = value15;
break reducibleJoin13;
}
r1 = value14;
break reducibleJoin13;
}
reducibleJoin15: while (true) {
if (r1) {
object2 = {step: a3};
RESPONSE_ERROR = RegistrationTransitionActionTypes.RESPONSE_ERROR;
object2.actionType = RESPONSE_ERROR;
value = require(14312) /* metro dependency 14312: RegistrationUtils */;
getCommonErrorDetails = value.getCommonErrorDetails;
error_code = a2.error_code;
value = Reflect.apply(getCommonErrorDetails, value, [error_code]);
object2.details = [value];
a1(object2);
break reducibleJoin15;
}
break reducibleJoin15;
}
return undefined;
}
break reducibleJoin16;
}
}
let AGE_GATE_UNDERAGE = RegisterTransitionSteps.AGE_GATE_UNDERAGE;
const VIEWED = RegistrationTransitionActionTypes.VIEWED;
a1({step: AGE_GATE_UNDERAGE, actionType: VIEWED});
const push = a0.push;
const AuthStates = (require(676) /* metro dependency 676: ConstantsIOS */).AuthStates;
AGE_GATE_UNDERAGE = AuthStates.AGE_GATE_UNDERAGE;
Reflect.apply(push, a0, [AGE_GATE_UNDERAGE, {'fromRegister': true, 'disableSwipe': true}]);
}
@@ -0,0 +1,27 @@
/* Metro module 14320; source: modules/auth/native/components/utils/useAuthFlowBackHandler.tsx; dependencies: [31, 14305, 14302, 5286, 2] */
function _fun108392(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14517:6, offset: 0x0231ef74, size: 136 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(14305) /* metro dependency 14305: RegistrationConstants */).RegistrationTransitionActionTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/utils/useAuthFlowBackHandler.tsx');
exports.default = useAuthFlowBackHandler;
}
function useAuthFlowBackHandler(a0) { // fn#108393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14517:257, offset: 0x0231effc, size: 91 bytes, params: 2, frame: 15
const env0_0 = a0;
const binding = env0_2;
const useContext = binding.useContext;
const TrackRegistrationContext = (require(14302) /* metro dependency 14302: Auth */).TrackRegistrationContext;
const env0_1 = Reflect.apply(useContext, binding, [TrackRegistrationContext]);
(require(5286) /* metro dependency 5286: useNavigatorBackPressHandlerNative */).useNavigatorBackPressHandler(_fun108394);
}
function _fun108394() { // fn#108394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14517:383, offset: 0x0231f057, size: 47 bytes, params: 1, frame: 11
const binding = env0_1;
const VIEWED = RegistrationTransitionActionTypes.VIEWED;
binding({step: env0_0, actionType: VIEWED});
return false;
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,40 @@
/* Metro module 14353; source: modules/auth/native/components/utils/useIsHCaptchaModalOpenTracking.tsx; dependencies: [31, 14304, 14305, 14302, 4008, 4007, 2] */
function _fun108629(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14550:6, offset: 0x02327c84, size: 168 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(14304) /* metro dependency 14304: RegistrationUIStore */).doesRegistrationHaveIdentityType;
const registrationConstantsModule = require(14305) /* metro dependency 14305: RegistrationConstants */;
const env0_4 = registrationConstantsModule.RegisterTransitionSteps;
const env0_5 = registrationConstantsModule.RegistrationTransitionActionTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/utils/useIsHCaptchaModalOpenTracking.tsx');
exports.useIsHCaptchaModalOpenTracking = useIsHCaptchaModalOpenTracking;
}
function useIsHCaptchaModalOpenTracking() { // fn#108630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14550:363, offset: 0x02327d2c, size: 81 bytes, params: 1, frame: 15
const binding = env0_2;
const useContext = binding.useContext;
const TrackRegistrationContext = (require(14302) /* metro dependency 14302: Auth */).TrackRegistrationContext;
binding.useLayoutEffect(_fun108631, [Reflect.apply(useContext, binding, [TrackRegistrationContext])]);
}
function _fun108631() { // fn#108631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14550:477, offset: 0x02327d7d, size: 84 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
value = undefined;
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if ((rootNavigationRef == null ? value : rootNavigationRef.current) != null) {
return rootNavigationRef.addListener('state', _fun108632);
}
return value;
}
function _fun108632() { // fn#108632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14550:585, offset: 0x02327dd1, size: 102 bytes, params: 1, frame: 13
var value3;
if ((require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).isModalOpen('hcaptcha') && doesRegistrationHaveIdentityType()) {
value3 = environment.__proto__;
env1_0({step: RegisterTransitionSteps.CAPTCHA, actionType: RegistrationTransitionActionTypes.VIEWED});
}
}
@@ -0,0 +1,219 @@
/* Metro module 14327; source: modules/auth/native/components/utils/usePasswordRegistrationStep.tsx; dependencies: [5, 57, 31, 14304, 8986, 14328, 1244, 14315, 2] */
function _fun108441(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14524:6, offset: 0x02320c16, size: 175 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(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(14304) /* metro dependency 14304: RegistrationUIStore */).useRegistrationUIStore;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/utils/usePasswordRegistrationStep.tsx');
exports.usePasswordRegistrationStep = usePasswordRegistrationStep;
}
function usePasswordRegistrationStep() { // fn#108442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14524:291, offset: 0x02320cc5, size: 288 bytes, params: 1, frame: 21
const value2 = useRegistrationUIStore(function(a0) {
return a0.registrationOptions;
});
let binding = env0_5;
const useState = binding.useState;
const value5 = env0_4(Reflect.apply(useState, binding, [value2.password ?? '']), 2);
const property = value5[0];
const property2 = value5[1];
const value7 = (importDefault(8986) /* metro dependency 8986: getError */)('password',
useRegistrationUIStore(function(a0) {
return a0.errors;
}));
const {passwordScore,
passwordValid} = (require(14328) /* metro dependency 14328: usePasswordScore */).usePasswordScore(property);
binding = env0_5;
const value9 = binding.useMemo(_fun108445, [property, value7, passwordValid]);
const useCallback = binding.useCallback;
let value = env0_3(_fun108447);
value = Reflect.apply(useCallback, binding, [value, [property, value7]]);
return {password: property, setPassword: property2, passwordScore: passwordScore, preventSubmitPassword: value9,
validatePassword: value};
}
function _fun108445() { // fn#108445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14524:553, offset: 0x02320de5, size: 76 bytes, params: 1, frame: 5
var r1;
let r0 = env0_0 == null || env0_0 === '';
if (!r0) {
r1 = env0_0.length < 8 || env0_1 != null;
r1 = !r1 ? passwordValid === false : r1;
r0 = r1;
}
return r0;
}
function* _fun108447() { // fn#108447, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14524:633, offset: 0x02320e3c, size: 339 bytes, params: 1, frame: 18
var length;
var value3;
var binding;
var binding2;
var property;
var value4;
var scorePassword;
var value5;
var valid;
var binding3;
var intl;
var string;
var t;
var DfaKHr;
var error;
var binding4;
if (false) {
return undefined;
}
value = environment.__proto__;
if (require != null) {
reducibleJoin39: while (true) {
if (require !== '') {
length = require.length;
if (length < 8) {
value = environment.__proto__.__proto__;
binding = env2_0;
binding4 = env2_2;
intl = binding(binding4[6]).intl;
return intl.string(binding(binding4[6]).t.DfaKHr);
}
if (importDefault != null) {
return importDefault;
}
value3 = environment.__proto__.__proto__;
reducibleJoin7: while (true) {
reduciblePort36: while (true) {
exceptionLanding35: while (true) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding35;
}
break reducibleJoin7;
}
break reduciblePort36;
}
return null;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding2[7];
} catch (error) {
break exceptionLanding35;
}
try {
value4 = binding(property);
} catch (error) {
break exceptionLanding35;
}
try {
scorePassword = value4.scorePassword;
} catch (error) {
break exceptionLanding35;
}
try {
} catch (error) {
break exceptionLanding35;
}
try {
value = Reflect.apply(scorePassword, value4, [require]);
} catch (error) {
break exceptionLanding35;
}
yield value;
try {
value = undefined;
value5 = false;
} catch (error) {
break exceptionLanding35;
}
if (value5) {
return value;
}
try {
valid = value.valid;
} catch (error) {
break exceptionLanding35;
}
try {
value = valid === false;
} catch (error) {
break exceptionLanding35;
}
if (value) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding35;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding3[6];
} catch (error) {
break exceptionLanding35;
}
try {
value = binding(property);
} catch (error) {
break exceptionLanding35;
}
try {
intl = value.intl;
} catch (error) {
break exceptionLanding35;
}
try {
string = intl.string;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding3[6];
} catch (error) {
break exceptionLanding35;
}
try {
value = binding(property);
} catch (error) {
break exceptionLanding35;
}
try {
t = value.t;
} catch (error) {
break exceptionLanding35;
}
try {
DfaKHr = t.DfaKHr;
} catch (error) {
break exceptionLanding35;
}
try {
value = Reflect.apply(string, intl, [DfaKHr]);
} catch (error) {
break exceptionLanding35;
}
return value;
}
return null;
}
break reducibleJoin39;
}
}
value = environment.__proto__.__proto__;
binding = env2_0;
const binding5 = env2_2;
intl = binding(binding5[6]).intl;
string = intl.string;
const R98xD5 = binding(binding5[6]).t.R98xD5;
return Reflect.apply(string, intl, [R98xD5]);
}
@@ -0,0 +1,198 @@
/* Metro module 14328; source: modules/auth/native/components/utils/usePasswordScore.tsx; dependencies: [5, 57, 31, 22, 14315, 2] */
function _fun108448(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14525:6, offset: 0x02320f8f, size: 205 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
object2 = {WEAK: 2};
object2[2] = 'WEAK';
object2.MEDIUM = 3;
object2[3] = 'MEDIUM';
object2.STRONG = 4;
object2[4] = 'STRONG';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/utils/usePasswordScore.tsx');
exports.PasswordScore = object2;
exports.usePasswordScore = usePasswordScore;
}
function usePasswordScore(a0) { // fn#108449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14525:347, offset: 0x0232105c, size: 164 bytes, params: 2, frame: 20
const env0_0 = a0;
const binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [null]);
const binding2 = env0_3;
let value = binding2(value2, 2);
const property = value[0];
const env0_1 = value[1];
useState = binding.useState;
value = binding2(Reflect.apply(useState, binding, [null]), 2);
const property2 = value[0];
const env0_2 = value[1];
var env0_3 = binding.useRef(null);
binding.useEffect(_fun108450, []);
binding.useEffect(_fun108456, [a0]);
return {passwordScore: property, passwordValid: property2};
}
function _fun108450() { // fn#108450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14525:501, offset: 0x02321100, size: 75 bytes, params: 1, frame: 15
var environment;
const binding = env0_3;
let value = environment.__proto__;
value = require(22) /* metro dependency 22 */;
binding.current = value.throttle(_fun108451(), 250);
return _fun108455;
}
function _fun108456() { // fn#108456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14525:846, offset: 0x02321250, size: 61 bytes, params: 1, frame: 12
if (env0_3.current != null && env0_0.length > 0) {
env0_3.current(env0_0);
}
}
function _fun108451() { // fn#108451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14525:533, offset: 0x0232114b, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_2(_fun108453);
return _fun108454;
}
function _fun108455() { // fn#108455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14525:751, offset: 0x02321218, size: 56 bytes, params: 1, frame: 13
const current = env1_3.current;
const value2 = undefined;
if ((current == null ? value2 : current.cancel) != null) {
env1_3.current.cancel();
}
return value2;
}
function* _fun108453(a0) { // fn#108453, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14525:553, offset: 0x0232117a, size: 158 bytes, params: 2, frame: 15
var binding;
var binding2;
var property;
var scorePassword;
var value3;
var value4;
var password_strength;
var valid;
var error;
let value = undefined;
if (false) {
return value;
}
if (a0 != null) {
if (a0.length > 0) {
value = environment.__proto__.__proto__.__proto__.__proto__;
try {
binding = env4_0;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap(null);
env3_2(null);
return undefined;
}
try {
binding2 = env4_1;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap(null);
env3_2(null);
return undefined;
}
try {
property = binding2[4];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap(null);
env3_2(null);
return undefined;
}
try {
value = binding(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap(null);
env3_2(null);
return undefined;
}
try {
scorePassword = value.scorePassword;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap(null);
env3_2(null);
return undefined;
}
try {
value = Reflect.apply(scorePassword, value, [a0]);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap(null);
env3_2(null);
return undefined;
}
yield value;
try {
value = undefined;
value3 = false;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap(null);
env3_2(null);
return undefined;
}
if (value3) {
return value;
}
value4 = environment.__proto__.__proto__.__proto__;
try {
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap(null);
env3_2(null);
return undefined;
}
try {
password_strength = value.password_strength;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap(null);
env3_2(null);
return undefined;
}
try {
dependencyMap(password_strength);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap(null);
env3_2(null);
return undefined;
}
try {
binding = env3_2;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap(null);
env3_2(null);
return undefined;
}
try {
valid = value.valid;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap(null);
env3_2(null);
return undefined;
}
try {
binding(valid);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap(null);
env3_2(null);
}
return undefined;
}
}
}
@@ -0,0 +1,145 @@
/* Metro module 14329; source: modules/auth/native/components/utils/useUsernameRegistrationStep.tsx; dependencies: [57, 31, 13285, 14304, 14305, 14302, 1484, 8986, 13283, 13282, 14303, 1244, 2] */
function _fun108457(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14526:6, offset: 0x0232128d, size: 207 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const uniqueUsernamesStore = importDefault(13285) /* metro dependency 13285: UniqueUsernamesStore */;
const env0_6 = (require(14304) /* metro dependency 14304: RegistrationUIStore */).useRegistrationUIStore;
const registrationConstantsModule = require(14305) /* metro dependency 14305: RegistrationConstants */;
const env0_7 = registrationConstantsModule.authStateToRegisterTransitionStep;
const env0_8 = registrationConstantsModule.RegistrationTransitionActionTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/utils/useUsernameRegistrationStep.tsx');
exports.useUsernameRegistrationStep = useUsernameRegistrationStep;
}
function useUsernameRegistrationStep(a0) { // fn#108458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14526:378, offset: 0x0232135c, size: 486 bytes, params: 2, frame: 25
var r4;
var object;
const env0_0 = a0;
let binding = env0_4;
const useContext = binding.useContext;
const value2 = undefined;
const TrackRegistrationContext = (require(14302) /* metro dependency 14302: Auth */).TrackRegistrationContext;
const value3 = Reflect.apply(useContext, binding, [TrackRegistrationContext]);
const value4 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value5 = useRegistrationUIStore(function(a0) {
return a0.registrationOptions;
});
const useState = binding.useState;
const username = value5.username;
const value9 = env0_3(Reflect.apply(useState, binding,
[username ?? UniqueUsernamesStore.registrationUsernameSuggestion() ?? '']), 2);
const property = value9[0];
const property2 = value9[1];
const value11 = (importDefault(8986) /* metro dependency 8986: getError */)('username',
useRegistrationUIStore(function(a0) {
return a0.errors;
}));
const value12 = (require(13283) /* metro dependency 13283: useUsernameStatus */).useUsernameStatus(property, true,
true);
var env0_4 = value12;
if (value11 == null) {
r4 = value12;
} else {
object = {};
object.type = (require(13282) /* metro dependency 13282: UniqueUsernamesTypes */).NameValidationState.ERROR;
object.message = value11;
env0_4 = object;
r4 = object;
}
binding = env0_4;
let useCallback = binding.useCallback;
const value = Reflect.apply(useCallback, binding, [_fun108461, [r4, value4, value3, a0]]);
const value13 = binding.useMemo(_fun108462, [property, r4]);
useCallback = binding.useCallback;
object = [property];
object[1] = r4 == null ? value2 : r4.message;
object[2] = r4 == null ? value2 : r4.type;
object = {username: property, setUsername: property2, usernameStatus: r4, transitionToNextStepOrSubmit: value,
preventSubmitUsername: value13, validateUsername: Reflect.apply(useCallback, binding, [_fun108463, object])};
return object;
}
function _fun108461(a0) { // fn#108461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14526:812, offset: 0x02321542, size: 299 bytes, params: 2, frame: 21
var object2;
var authStateToRegisterTransitionStepBinding;
var binding2;
var nextAuthState;
var moduleValue3;
let binding = env0_4;
const value2 = undefined;
const type = binding == null ? value2 : binding.type;
const NameValidationState = (require(13282) /* metro dependency 13282: UniqueUsernamesTypes */).NameValidationState;
const ERROR = NameValidationState.ERROR;
if (type === ERROR) {
binding = env0_1;
object2 = {};
object2.step = authStateToRegisterTransitionStep(env0_0);
object2.actionType = RegistrationTransitionActionTypes.INPUT_ERROR;
object2.details = [env0_4.message];
binding(object2);
}
if (a0) {
moduleValue3 = require(14303) /* metro dependency 14303: RegistrationStepsUtils */;
moduleValue3.handleRegistrationSubmit(env0_0, env0_2, env0_1);
} else {
binding = env0_1;
object2 = {};
authStateToRegisterTransitionStepBinding = authStateToRegisterTransitionStep;
binding2 = env0_0;
object2.step = authStateToRegisterTransitionStepBinding(binding2);
object2.toStep = (require(14303) /* metro dependency 14303: RegistrationStepsUtils */).getNextRegistrationTransitionStep(binding2);
object2.actionType = RegistrationTransitionActionTypes.SUCCESS;
binding(object2);
nextAuthState = (require(14303) /* metro dependency 14303: RegistrationStepsUtils */).getNextAuthState(binding2);
binding = env0_2;
binding.push(nextAuthState);
}
return value2;
}
function _fun108462() { // fn#108462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14526:1159, offset: 0x0232166d, size: 92 bytes, params: 1, frame: 14
var type;
var binding;
var value4;
var value;
let r0 = env0_3 == null || env0_3 === '';
if (!r0) {
binding = env0_4;
value = undefined;
type = binding == null ? value : binding.type;
value4 = environment.__proto__;
value = type === (require(13282) /* metro dependency 13282: UniqueUsernamesTypes */).NameValidationState.ERROR;
r0 = value;
}
return r0;
}
function _fun108463() { // fn#108463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14526:1284, offset: 0x023216c9, size: 161 bytes, params: 1, frame: 15
var type;
var r0;
var binding;
var value4;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value;
const value2 = null;
if (value2 == env0_3) {
value = environment.__proto__;
value = intl.string(t.GPfy3L);
r0 = value;
} else if (env0_3 === '') {
value = environment.__proto__;
value = intl.string(t.GPfy3L);
r0 = value;
} else {
binding = env0_4;
type = value2 == binding ? undefined : binding.type;
value4 = environment.__proto__;
r0 = type !== (require(13282) /* metro dependency 13282: UniqueUsernamesTypes */).NameValidationState.ERROR ? value2 : env0_4.message;
}
return r0;
}
@@ -0,0 +1,201 @@
/* Metro module 8984; source: modules/auth/native/components/utils/useWithPostLoginRouting.tsx; dependencies: [5, 57, 31, 1226, 661, 566, 1244, 8985, 5076, 2] */
function _fun70006(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9169:6, offset: 0x01ceb1c2, size: 201 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(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_7 = constantsModule.LoginStates;
const env0_8 = constantsModule.AuthStates;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/utils/useWithPostLoginRouting.tsx');
exports.default = useWithPostLoginRouting;
}
function useWithPostLoginRouting(a0, a1) { // fn#70007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9169:285, offset: 0x01ceb28b, size: 169 bytes, params: 3, frame: 19
const env0_0 = a0;
const env0_1 = a1;
const binding = env0_5;
const [property, env0_3] = env0_4(binding.useState(), 2);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
binding.useEffect(_fun70009, [a0, a1, Reflect.apply(useStateFromStoresObject, fluxModule, [[AuthenticationStore],
function() {
var object = {};
object.loginStatus = AuthenticationStore.getLoginStatus();
return object;
}]).loginStatus, property]);
}
function _fun70009() { // fn#70009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9169:471, offset: 0x01ceb34e, size: 712 bytes, params: 1, frame: 24
var loginStatusBinding;
var push;
var object2;
var credentials;
var login;
var password;
var VERIFY_PHONE;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var replace;
let binding = env0_2;
const LOGGING_IN = LoginStates.LOGGING_IN;
if (binding === LOGGING_IN) {
loginStatusBinding = loginStatus;
if (LoginStates.MFA_STEP === loginStatusBinding) {
binding = env0_0;
binding.push(AuthStates.MFA);
} else if (LoginStates.ACCOUNT_SCHEDULED_FOR_DELETION === loginStatusBinding) {
binding = env0_0;
binding.push(AuthStates.ACCOUNT_DISABLED_OR_DELETION_SCHEDULED, {handleLogin: require});
} else if (LoginStates.ACCOUNT_DISABLED === loginStatusBinding) {
binding = env0_0;
binding.push(AuthStates.ACCOUNT_DISABLED_OR_DELETION_SCHEDULED, {handleLogin: require});
} else if (LoginStates.LOGIN_AGE_GATE === loginStatusBinding) {
binding = env0_0;
binding.push(AuthStates.AGE_GATE_UNDERAGE, {existingUser: true});
}
loginStatusBinding = loginStatus;
if (LoginStates.PASSWORD_RECOVERY_PHONE_VERIFICATION === loginStatusBinding) {
login = AuthenticationStore.getCredentials().login;
binding = env0_0;
replace = binding.replace;
VERIFY_PHONE = AuthStates.VERIFY_PHONE;
object2 = {};
object2.title = intl.string(t['+xqy3d']);
object2.description = intl.string(t.myKyqh);
object2.phone = login;
object2.onPhoneTokenReceived = onPhoneTokenReceived;
object2.onClose = onClose_70011;
Reflect.apply(replace, binding, [VERIFY_PHONE, object2]);
} else if (LoginStates.PHONE_IP_AUTHORIZATION === loginStatusBinding) {
credentials = AuthenticationStore.getCredentials();
login = credentials.login;
var env0_0 = login;
password = credentials.password;
binding = env0_0;
push = binding.push;
VERIFY_PHONE = AuthStates.VERIFY_PHONE;
object2 = {};
object2.title = intl.string(t.w55Oco);
object2.description = intl.string(t['0/ALaJ']);
login = AuthenticationStore.getCredentials().login;
object2.phone = login;
var env0_2 = env1_3(_fun70013);
object2.onPhoneTokenReceived = onPhoneTokenReceived_70015;
object2.onClose = onClose_70016;
Reflect.apply(push, binding, [VERIFY_PHONE, object2]);
}
binding = env0_3;
binding(loginStatus);
} else {
binding = env0_2;
if (binding === LoginStates.FORGOT_PASSWORD) {
loginStatusBinding = loginStatus;
if (LoginStates.MFA_STEP === loginStatusBinding) {
binding = env0_0;
binding.push(AuthStates.MFA);
} else if (LoginStates.ACCOUNT_SCHEDULED_FOR_DELETION === loginStatusBinding) {
binding = env0_0;
binding.push(AuthStates.ACCOUNT_DISABLED_OR_DELETION_SCHEDULED, {handleLogin: require});
} else if (LoginStates.ACCOUNT_DISABLED === loginStatusBinding) {
binding = env0_0;
binding.push(AuthStates.ACCOUNT_DISABLED_OR_DELETION_SCHEDULED, {handleLogin: require});
} else if (LoginStates.LOGIN_AGE_GATE === loginStatusBinding) {
binding = env0_0;
binding.push(AuthStates.AGE_GATE_UNDERAGE, {existingUser: true});
}
loginStatusBinding = loginStatus;
if (LoginStates.PASSWORD_RECOVERY_PHONE_VERIFICATION === loginStatusBinding) {
login = AuthenticationStore.getCredentials().login;
binding = env0_0;
replace = binding.replace;
VERIFY_PHONE = AuthStates.VERIFY_PHONE;
object2 = {};
object2.title = intl.string(t['+xqy3d']);
object2.description = intl.string(t.myKyqh);
object2.phone = login;
object2.onPhoneTokenReceived = onPhoneTokenReceived;
object2.onClose = onClose_70011;
Reflect.apply(replace, binding, [VERIFY_PHONE, object2]);
} else if (LoginStates.PHONE_IP_AUTHORIZATION === loginStatusBinding) {
credentials = AuthenticationStore.getCredentials();
login = credentials.login;
var env0_0 = login;
password = credentials.password;
binding = env0_0;
push = binding.push;
VERIFY_PHONE = AuthStates.VERIFY_PHONE;
object2 = {};
object2.title = intl.string(t.w55Oco);
object2.description = intl.string(t['0/ALaJ']);
login = AuthenticationStore.getCredentials().login;
object2.phone = login;
var env0_2 = env1_3(_fun70013);
object2.onPhoneTokenReceived = onPhoneTokenReceived_70015;
object2.onClose = onClose_70016;
Reflect.apply(push, binding, [VERIFY_PHONE, object2]);
}
binding = env0_3;
binding(loginStatus);
} else {
env0_3(loginStatus);
}
}
}
function onPhoneTokenReceived(a0) { // fn#70010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9169:1004, offset: 0x01ceb616, size: 70 bytes, params: 2, frame: 15
const value2 = (importDefault(8985) /* metro dependency 8985: makePasswordResetLink */)(a0);
const binding = env1_0;
const replace = binding.replace;
const EXTERNAL_LINK = AuthStates.EXTERNAL_LINK;
Reflect.apply(replace, binding, [EXTERNAL_LINK, {externalURL: value2}]);
}
function onClose_70011() { // fn#70011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9169:1077, offset: 0x01ceb65c, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */).loginReset();
}
function* _fun70013(a0) { // fn#70013, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9169:1368, offset: 0x01ceb68c, size: 148 bytes, params: 2, frame: 15
var environment;
if (true) {
value = environment.__proto__.__proto__.__proto__;
value = env3_1(env3_2[8]);
yield value.authorizeIPAddress(a0);
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
var getState = require.getState;
var index = Reflect.apply(getState, require, []).routes.findIndex(_fun70014);
if (index >= 0) {
require.pop(index);
} else {
require.pop();
}
}
}
function onClose_70016(a0) { // fn#70016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9169:1553, offset: 0x01ceb73b, size: 101 bytes, params: 2, frame: 13
var value;
var value4;
if (a0) {
if (password != null && password !== '') {
value4 = environment.__proto__;
require(login, password);
}
} else {
value = environment.__proto__.__proto__;
value = importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */;
value.loginReset();
}
}
function _fun70014({name}) { // fn#70014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9169:1454, offset: 0x01ceb720, size: 27 bytes, params: 2, frame: 2
const LOGIN = env4_8.LOGIN;
return name === LOGIN;
}
@@ -0,0 +1,22 @@
/* Metro module 14341; source: modules/auth/native/experiment/isDateValidDateOfBirth.tsx; dependencies: [3738, 2] */
function _fun108539(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14538:6, offset: 0x02324951, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/experiment/isDateValidDateOfBirth.tsx');
exports.default = isDateValidDateOfBirth;
}
function isDateValidDateOfBirth(a0) { // fn#108540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14538:193, offset: 0x023249b4, size: 65 bytes, params: 2, frame: 14
var r0;
let value = a0 != null;
if (value) {
value = (importDefault(3738) /* metro dependency 3738 */)();
value = value.diff(a0, 'days');
value = value >= 1;
r0 = value;
} else {
r0 = value;
}
return r0;
}
+12
View File
@@ -0,0 +1,12 @@
/* Metro module 8986; source: modules/auth/native/getError.tsx; dependencies: [2] */
function _fun70019(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9171:6, offset: 0x01ceb84c, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/getError.tsx');
exports.default = function(a0, a1) {
var property = a1[a0];
var value = null;
return value == property ? value : global.Array.isArray(property) ? property[0] : property;
};
}
@@ -0,0 +1,38 @@
/* Metro module 13816; source: modules/auth/native/images/flags.tsx; dependencies: [13817, 13818, 13819, 13820, 13821, 13822, 13823, 13824, 13825, 13826, 13827, 13828, 13829, 13830, 13831, 13832, 13833, 13834, 13835, 13836, 13837, 13838, 13839, 13840, 13841, 13842, 13843, 13844, 13845, 13846, 13847, 2] */
function _fun105339(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#105339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14013:6, offset: 0x022b599a, size: 605 bytes, params: 8, frame: 17
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {bg: require(13817) /* metro dependency 13817 */, cs: require(13818) /* metro dependency 13818 */,
da: require(13819) /* metro dependency 13819 */, de: require(13820) /* metro dependency 13820 */,
el: require(13821) /* metro dependency 13821 */};
object2['en-GB'] = require(13822) /* metro dependency 13822 */;
object2['en-US'] = require(13823) /* metro dependency 13823 */;
object2['es-ES'] = require(13824) /* metro dependency 13824 */;
object2['es-419'] = require(13825) /* metro dependency 13825 */;
object2.fi = require(13826) /* metro dependency 13826 */;
object2.fr = require(13827) /* metro dependency 13827 */;
object2.hi = require(13828) /* metro dependency 13828 */;
object2.hr = require(13829) /* metro dependency 13829 */;
object2.hu = require(13830) /* metro dependency 13830 */;
object2.it = require(13831) /* metro dependency 13831 */;
object2.ja = require(13832) /* metro dependency 13832 */;
object2.ko = require(13833) /* metro dependency 13833 */;
object2.lt = require(13834) /* metro dependency 13834 */;
object2.nl = require(13835) /* metro dependency 13835 */;
object2.no = require(13836) /* metro dependency 13836 */;
object2.pl = require(13837) /* metro dependency 13837 */;
object2['pt-BR'] = require(13838) /* metro dependency 13838 */;
object2.ro = require(13839) /* metro dependency 13839 */;
object2.ru = require(13840) /* metro dependency 13840 */;
object2['sv-SE'] = require(13841) /* metro dependency 13841 */;
object2.th = require(13842) /* metro dependency 13842 */;
object2.tr = require(13843) /* metro dependency 13843 */;
object2.uk = require(13844) /* metro dependency 13844 */;
object2.vi = require(13845) /* metro dependency 13845 */;
object2['zh-CN'] = require(13846) /* metro dependency 13846 */;
object2['zh-TW'] = require(13847) /* metro dependency 13847 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/images/flags.tsx');
exports.flags = object2;
}
@@ -0,0 +1,51 @@
/* Metro module 14319; source: modules/auth/native/useInitialRegistrationStep.tsx; dependencies: [31, 1226, 5078, 14304, 14303, 566, 5076, 2] */
function _fun108385(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14516:6, offset: 0x0231ed4a, size: 186 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const consentStore = importDefault(5078) /* metro dependency 5078: ConsentStore */;
const env0_6 = (require(14304) /* metro dependency 14304: RegistrationUIStore */).resetRegistration;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/useInitialRegistrationStep.tsx');
exports.default = useInitialRegistrationStep;
}
function isFirstStep(a0) { // fn#108386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14516:154, offset: 0x0231ee04, size: 51 bytes, params: 2, frame: 11
let value = require(14303) /* metro dependency 14303: RegistrationStepsUtils */;
value = value.getRegistrationSteps();
return a0 === value[1];
}
function useInitialRegistrationStep(a0) { // fn#108387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14516:317, offset: 0x0231ee37, size: 130 bytes, params: 2, frame: 17
const env0_0 = a0;
const authenticationConsentRequired = (require(566) /* metro dependency 566: flux */).useStateFromStores([ConsentStore],
function() {
return ConsentStore.getAuthenticationConsentRequired();
});
const binding = env0_3;
binding.useEffect(_fun108389, [authenticationConsentRequired, a0]);
binding.useEffect(_fun108390, [a0]);
}
function _fun108389() { // fn#108389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14516:450, offset: 0x0231eecc, size: 69 bytes, params: 1, frame: 13
const value = environment.__proto__;
if (isFirstStep(env0_0) && authenticationConsentRequired == null) {
(importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */).getLocationMetadata();
}
}
function _fun108390() { // fn#108390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14516:532, offset: 0x0231ef11, size: 37 bytes, params: 1, frame: 11
if (isFirstStep(env0_0)) {
return _fun108391;
}
}
function _fun108391() { // fn#108391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14516:561, offset: 0x0231ef36, size: 62 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
resetRegistration();
if (!AuthenticationStore.isAuthenticated()) {
(importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */).loginReset();
}
}
@@ -0,0 +1,27 @@
/* Metro module 8983; source: modules/auth/native/useLoginReset.tsx; dependencies: [31, 1226, 5076, 2] */
function _fun70002(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9168:6, offset: 0x01ceb0d7, size: 133 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/useLoginReset.tsx');
exports.default = useLoginReset;
}
function useLoginReset() { // fn#70003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9168:197, offset: 0x01ceb15c, size: 35 bytes, params: 1, frame: 13
env0_2.useEffect(function() {
return _fun70005;
}, []);
}
function _fun70004() { // fn#70004, offset: 0x01ceb17f, size: 11 bytes, params: 1, frame: 1
return _fun70005;
}
function _fun70005() { // fn#70005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9168:239, offset: 0x01ceb18a, size: 56 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
if (!AuthenticationStore.isAuthenticated()) {
(importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */).loginReset();
}
}
@@ -0,0 +1,42 @@
/* Metro module 14359; source: modules/auth/native/useOrientationLock.tsx; dependencies: [31, 4092, 1581, 8973, 7717, 2] */
function _fun108664(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14556:6, offset: 0x02328b7e, size: 121 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/useOrientationLock.tsx');
exports.default = usePortraitOrientationOnly;
}
function usePortraitOrientationOnly() { // fn#108665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14556:192, offset: 0x02328bf7, size: 67 bytes, params: 1, frame: 15
env0_3.useEffect(_fun108666, [(importDefault(8973) /* metro dependency 8973: useWideAuthView */)()]);
}
function _fun108666() { // fn#108666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14556:259, offset: 0x02328c3a, size: 143 bytes, params: 1, frame: 16
var environment;
var r2;
var moduleValue2;
const value = environment.__proto__;
const isIpadOS2 = (require(4092) /* metro dependency 4092: DeviceUtils */).isIpadOS();
if (isIpadOS2) {
r2 = !isIpadOS2;
} else {
moduleValue2 = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
r2 = !moduleValue2.isMetaQuest();
}
r2 = r2 && !env0_0;
if (r2) {
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT', false);
}
return _fun108667;
}
function _fun108667() { // fn#108667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14556:417, offset: 0x02328cc9, size: 59 bytes, params: 1, frame: 12
var value;
if (env0_0) {
value = environment.__proto__.__proto__;
value = require(7717) /* metro dependency 7717: DeviceOrientation */;
value.unlockOrientation({unlockAfterRotatingToPreviousLock: false});
}
}
@@ -0,0 +1,19 @@
/* Metro module 8973; source: modules/auth/native/useWideAuthView.tsx; dependencies: [7556, 8974, 1581, 2] */
function _fun69960(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9158:6, offset: 0x01ce9e68, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/useWideAuthView.tsx');
exports.default = useWideAuthView;
}
function useWideAuthView() { // fn#69961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9158:175, offset: 0x01ce9ecf, size: 114 bytes, params: 1, frame: 16
const value2 = (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)();
const defaultImport = importDefault(8974) /* metro dependency 8974: TabletAuthUIExperiment */;
const useConfig = defaultImport.useConfig;
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'useWideAuthView'}]).enabled;
let value = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
value = value.isMetaQuest();
return value ? !!value : value2 && enabled;
}
+859
View File
@@ -0,0 +1,859 @@
/* Metro module 14315; source: modules/auth/register.tsx; dependencies: [5, 14316, 1226, 661, 1229, 3738, 683, 5046, 480, 4132, 9486, 694, 14317, 14318, 2] */
function _fun108353(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14512:6, offset: 0x0231dd8c, size: 292 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = registerFull;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(5) /* metro dependency 5 */;
require(14316) /* metro dependency 14316: ParentalConsentStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_6 = value.AnalyticEvents;
const env0_7 = value.AnalyticsSections;
const env0_8 = value.Endpoints;
value = require(1229) /* metro dependency 1229: AgeGateConstants */;
const env0_9 = value.AgeGateAnalyticAction;
const env0_10 = value.AgeGateSource;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/register.tsx');
exports.default = function(a0) {
var r6;
var r5;
var r4;
var value;
var property = a0.invite;
r5 = property !== undefined ? property : null;
property = a0.giftCodeSKUId;
r4 = property !== undefined ? property : null;
value = Object.create(null);
value.invite = 0;
value.giftCodeSKUId = 0;
var value2 = copyDataProperties({}, a0, value, r6);
var registerFullBinding = registerFull;
var object = {};
copyDataProperties(object, value2, value);
object['invite'] = r5;
object['giftCodeSKUId'] = r4;
return registerFullBinding(object);
};
exports.scorePassword = function() {
return _scorePassword.apply(this, arguments);
};
exports.registerPhone = function() {
return _registerPhone.apply(this, arguments);
};
exports.registerFull = closure;
}
function _scorePassword() { // fn#108354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14512:247, offset: 0x0231deb0, size: 50 bytes, params: 1, frame: 14
return env0_4(_fun108356).apply(this, arguments);
}
function _registerPhone() { // fn#108357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14512:537, offset: 0x0231dfb3, size: 50 bytes, params: 1, frame: 14
return env0_4(_fun108359).apply(this, arguments);
}
function registerFull({email, phoneToken, username, globalName, consent, password, guildTemplateCode, birthday, invite, giftCodeSKUId, promoEmailConsent, usedUsernameSuggestion}) { // fn#108360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14512:880, offset: 0x0231e0f4, size: 717 bytes, params: 2, frame: 33
var object3;
var r20;
var defaultImport2;
var REGISTER;
var defaultImport3;
var track;
var AGE_GATE_ACTION;
var value8;
var defaultImport4;
const value = undefined;
invite = invite === value ? null : invite;
giftCodeSKUId = giftCodeSKUId === value ? null : giftCodeSKUId;
promoEmailConsent = promoEmailConsent === value ? null : promoEmailConsent;
usedUsernameSuggestion = usedUsernameSuggestion === value ? null : usedUsernameSuggestion;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'REGISTER'});
if (birthday != null) {
defaultImport2 = importDefault(14317) /* metro dependency 14317: trackAgeGateSubmitted */;
REGISTER = AnalyticsSections.REGISTER;
defaultImport2(birthday, REGISTER);
defaultImport3 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport3.track;
AGE_GATE_ACTION = AnalyticEvents.AGE_GATE_ACTION;
REGISTER = AgeGateSource.REGISTER;
Reflect.apply(track, defaultImport3, [AGE_GATE_ACTION, {source: REGISTER,
action: AgeGateAnalyticAction.AGE_GATE_SUBMITTED}]);
value8 = (importDefault(3738) /* metro dependency 3738 */)().diff(birthday, 'years');
if (!(value8 < 13)) {
r20 = value8 >= 13 && value8 <= 17 ? '13-17' : value8 >= 18 && value8 <= 22 ? '18-22' : '23+';
defaultImport4 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport4.track(AnalyticEvents.USER_AGE_SUBMITTED, {age_bucket: r20});
}
}
const defaultImport5 = importDefault(5046) /* metro dependency 5046: TrackedHTTPUtils */;
const post = defaultImport5.post;
object3 = {};
REGISTER = Endpoints.REGISTER;
object3.url = REGISTER;
const object4 = {};
object4.fingerprint = AuthenticationStore.getFingerprint();
object4.email = email;
object4.username = username;
object4.global_name = globalName;
object4.password = password;
object4.invite = invite;
object4.consent = consent;
object4.phone_token = phoneToken;
object4.date_of_birth = birthday == null ? value : birthday.format('YYYY-MM-DD');
object4.gift_code_sku_id = giftCodeSKUId;
object4.guild_template_code = guildTemplateCode;
object4.promotional_email_opt_in = promoEmailConsent == null ? value : promoEmailConsent.checked;
object3.body = object4;
const NetworkActionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).NetworkActionNames;
const USER_REGISTER = NetworkActionNames.USER_REGISTER;
object3.trackedActionData = {event: USER_REGISTER, properties: {invite_code: invite,
used_username_suggestion: usedUsernameSuggestion,
promotional_email_opt_in: promoEmailConsent == null ? value : promoEmailConsent.checked,
promotional_email_pre_checked: promoEmailConsent == null ? value : promoEmailConsent.preChecked,
was_unique_username: true}};
object3.rejectWithError = false;
return Reflect.apply(post, defaultImport5, [object3]).then(_fun108361, _fun108362);
}
function* _fun108356(a0) { // fn#108356, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14512:298, offset: 0x0231deed, size: 198 bytes, params: 2, frame: 17
var binding;
var binding2;
var property;
var value3;
var post;
var object4;
var SCORE_PASSWORD;
var object5;
var object6;
var value4;
var NetworkActionNames;
var PASSWORD_VALIDATE;
var value5;
var value6;
var value7;
var body;
var error;
var prototype;
var value8;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
binding2 = env2_3;
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
property = binding2[7];
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
post = value3.post;
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
object4 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
binding = env2_8;
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
SCORE_PASSWORD = binding.SCORE_PASSWORD;
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
object4.url = SCORE_PASSWORD;
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
object5 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
object5.password = a0;
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
object4.body = object5;
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
object6 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
property = binding2[8];
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
value4 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
NetworkActionNames = value4.NetworkActionNames;
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
PASSWORD_VALIDATE = NetworkActionNames.PASSWORD_VALIDATE;
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
object6.event = PASSWORD_VALIDATE;
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
object4.trackedActionData = object6;
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
object4.rejectWithError = false;
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
try {
value5 = Reflect.apply(post, value3, [object4]);
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
if (value7) {
return value6;
}
try {
body = value6.body;
} catch (error) {
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value8 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value8;
throw value;
}
return body;
}
async function _fun108359({phone}) { // fn#108359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14512:588, offset: 0x0231dff9, size: 251 bytes, params: 2, frame: 19
var binding;
var binding2;
var property;
var value4;
var post;
var object4;
var REGISTER_PHONE;
var object5;
var object6;
var value5;
var NetworkActionNames;
var USER_REGISTER_PHONE;
var value6;
var value7;
var value8;
var error;
var CaptchaCancelError;
var prototype;
var value9;
if (false) {
return undefined;
}
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
binding2 = env2_3;
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
property = binding2[7];
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
value4 = binding(property);
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
post = value4.post;
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
object4 = {};
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
binding = env2_8;
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
REGISTER_PHONE = binding.REGISTER_PHONE;
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
object4.url = REGISTER_PHONE;
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
object5 = {};
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
object5.phone = phone;
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
object4.body = object5;
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
object6 = {};
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
property = binding2[8];
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
value5 = binding(property);
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
NetworkActionNames = value5.NetworkActionNames;
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
USER_REGISTER_PHONE = NetworkActionNames.USER_REGISTER_PHONE;
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
object6.event = USER_REGISTER_PHONE;
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
object4.trackedActionData = object6;
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
object4.rejectWithError = false;
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
try {
value6 = Reflect.apply(post, value4, [object4]);
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
await value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
binding = env2_0;
CaptchaCancelError = binding(env2_3[10]).CaptchaCancelError;
if (error instanceof CaptchaCancelError) {
throw error;
}
binding = env2_1;
value = binding(env2_3[9]);
prototype = value.prototype;
value9 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value9;
throw value;
}
return value8 ? value7 : value7;
}
function _fun108361(a0) { // fn#108361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14512:1991, offset: 0x0231e3c1, size: 184 bytes, params: 2, frame: 19
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'REGISTER_SUCCESS',
token: a0.body.token});
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUARDIAN_CONNECT_REQUIRED',
shouldShowGuardianConnect: a0.body.show_guardian_connect === true});
const defaultImport3 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport3.track;
const AGE_GATE_ACTION = AnalyticEvents.AGE_GATE_ACTION;
const REGISTER = AgeGateSource.REGISTER;
const AGE_GATE_SUCCESS = AgeGateAnalyticAction.AGE_GATE_SUCCESS;
Reflect.apply(track, defaultImport3, [AGE_GATE_ACTION, {source: REGISTER, action: AGE_GATE_SUCCESS}]);
}
function _fun108362(a0) { // fn#108362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14512:2255, offset: 0x0231e479, size: 482 bytes, params: 2, frame: 18
var moduleValue;
const CaptchaCancelError = (require(9486) /* metro dependency 9486: SharedCaptchaUtils */).CaptchaCancelError;
if (a0 instanceof CaptchaCancelError) {
throw a0;
}
const value3 = new (importDefault(4132) /* metro dependency 4132: APIError */)(a0);
if (value3.getFieldErrors('date_of_birth') != null) {
moduleValue = importAll(14318) /* metro dependency 14318: AgeGateActionCreators */;
moduleValue.preventUnderageRegistration(AgeGateSource.REGISTER);
}
const defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport2.track;
const REGISTER_SUBMIT_ERRORED = AnalyticEvents.REGISTER_SUBMIT_ERRORED;
const object2 = {is_unique_username_registration: true};
object2.email_error_reason = value3.getFirstFieldErrorMessage('email');
object2.phone_error_reason = value3.getFirstFieldErrorMessage('phone_token');
object2.password_error_reason = value3.getFirstFieldErrorMessage('password');
object2.username_error_reason = value3.getFirstFieldErrorMessage('username');
object2.global_name_error_reason = value3.getFirstFieldErrorMessage('global_name');
object2.date_of_birth_error_reason = value3.getFirstFieldErrorMessage('date_of_birth');
object2.promotional_email_opt_in_error_reason = value3.getFirstFieldErrorMessage('promotional_email_opt_in');
object2.fingerprint_error_reason = value3.getFirstFieldErrorMessage('fingerprint');
object2.invite_error_reason = value3.getFirstFieldErrorMessage('invite');
object2.gift_code_sku_id_error_reason = value3.getFirstFieldErrorMessage('gift_code_sku_id');
object2.guild_template_code_error_reason = value3.getFirstFieldErrorMessage('guild_template_code');
object2.consent_error_reason = value3.getFirstFieldErrorMessage('consent');
object2.generic_error_reason = value3.getAnyErrorMessage();
Reflect.apply(track, defaultImport2, [REGISTER_SUBMIT_ERRORED, object2]);
throw value3;
}