This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,229 +1,247 @@
/* Metro module 14221; source: modules/mfa/native/screens/BackupScreen.tsx; dependencies: [5, 57, 31, 33, 14219, 4573, 1244, 8973, 14214, 14220, 14217, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseWideAuthView from '../../../auth/native/useWideAuthView.tsx'; /* Metro dependency 8973 */
import MfaOptionScreen from './MfaOptionScreen.tsx'; /* Metro dependency 14214 */
import Button from '../components/button.tsx'; /* Metro dependency 14217 */
import ClipboardCopyInput from '../components/ClipboardCopyInput.tsx'; /* Metro dependency 14220 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun107537(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:6, offset: 0x022ffef2, size: 215 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 value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsxs;
const env0_7 = value.jsx;
const env0_8 = value.Fragment;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/mfa/native/screens/BackupScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/mfa/native/screens/BackupScreen.tsx');
exports.default = BackupScreen;
}
function isValidClipboardCode_107538(a0) { // fn#107538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:166, offset: 0x022fffc9, size: 80 bytes, params: 2, frame: 15
const length = a0.length;
const BACKUP_CODE_MIN_LENGTH = (require(14219) /* metro dependency 14219: MFA */).BACKUP_CODE_MIN_LENGTH;
return length >= BACKUP_CODE_MIN_LENGTH && a0.length <= (require(14219) /* metro dependency 14219: MFA */).BACKUP_CODE_MAX_LENGTH;
}
function getFormattedExplainer(a0) { // fn#107539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:289, offset: 0x02300019, size: 328 bytes, params: 2, frame: 21
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
if (a0 > 0) {
object = {variant: 'text-md/normal', children: [intl.string(t.RRtlLg), intl.format(t.tsWkAE, {countdown: a0})]};
} else {
string = intl.string;
items2 = [Reflect.apply(string, intl, [t.RRtlLg])];
string = intl.string;
items2[1] = Reflect.apply(string, intl, [t.v3a6Pd]);
object = {variant: 'text-md/normal', children: items2};
function isValidClipboardCode_107538(a0) { // fn#107538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:166, offset: 0x022fffc9, size: 80 bytes, params: 2, frame: 15
const length = a0.length;
const BACKUP_CODE_MIN_LENGTH = (require(14219) /* metro dependency 14219: MFA */).BACKUP_CODE_MIN_LENGTH;
return length >= BACKUP_CODE_MIN_LENGTH && a0.length <= (require(14219) /* metro dependency 14219: MFA */).BACKUP_CODE_MAX_LENGTH;
}
return <Text {...object} />;
}
function BackupScreen({mfaChallenge, finish}) { // fn#107540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:680, offset: 0x02300161, size: 852 bytes, params: 2, frame: 37
var object2;
const value2 = (importDefault(8973) /* metro dependency 8973: useWideAuthView */)();
const binding = env0_5;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_4;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_1 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, ['']), 2);
const property2 = value5[0];
const env0_3 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [undefined]), 2);
const property3 = value6[0];
var env0_4 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property4 = value7[0];
var env0_5 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [10]), 2);
const property5 = value8[0];
const env0_7 = value8[1];
binding.useEffect(_fun107541, [property5]);
const env0_8 = binding.useCallback(_fun107545(), [finish]);
const MfaOptionScreen = importDefault(14214) /* metro dependency 14214: MfaOptionScreen */;
object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const B2T1HD = (require(1244) /* metro dependency 1244: indexNative */).t.B2T1HD;
object2.headerText = Reflect.apply(string, intl, [B2T1HD]);
object2.subtitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.c5J7O0);
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const formattedExplainer = getFormattedExplainer(property5);
const ClipboardCopyInput = importDefault(14220) /* metro dependency 14220: ClipboardCopyInput */;
const clipboardCopyInputProps = {label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['C/ZAw/']),
placeholder: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fZSi1D),
isValidClipboardCode: isValidClipboardCode_107538};
const BACKUP_CODE_MAX_LENGTH = (require(14219) /* metro dependency 14219: MFA */).BACKUP_CODE_MAX_LENGTH;
clipboardCopyInputProps.maxLength = BACKUP_CODE_MAX_LENGTH;
clipboardCopyInputProps.onChangeCode = onChangeCode;
clipboardCopyInputProps.error = property3;
clipboardCopyInputProps.isDisabled = property || property4;
clipboardCopyInputProps.autoFocus = !value2;
object2.input = <>{formattedExplainer}<ClipboardCopyInput {...clipboardCopyInputProps} /></>;
const defaultImport3 = importDefault(14217) /* metro dependency 14217: button */;
const defaultImport3Props = {variant: 'primary',
text: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.geKm7t),
loading: property || property4, onPress: onPress_107550};
let r9 = property || property4;
r9 = !r9 ? property2.length < (require(14219) /* metro dependency 14219: MFA */).BACKUP_CODE_MIN_LENGTH : r9;
r9 = !r9 ? property5 > 0 : r9;
defaultImport3Props.disabled = r9;
object2.submit = ((Component) => <Component {...defaultImport3Props} />)(defaultImport3);
object2.screenProps = {mfaChallenge: mfaChallenge, finish: finish};
object2.mfaMethod = 'backup';
return <MfaOptionScreen {...object2} />;
}
function _fun107541() { // fn#107541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:962, offset: 0x023004b5, size: 61 bytes, params: 1, frame: 14
if (env0_6 <= 0) {
return undefined;
function getFormattedExplainer(a0) { // fn#107539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:289, offset: 0x02300019, size: 328 bytes, params: 2, frame: 21
var object2;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var items2;
const Text = (TextModule).Text;
if (a0 > 0) {
object2 = {variant: 'text-md/normal', children: [intl.string(t.RRtlLg), intl.format(t.tsWkAE,
{countdown: a0})]};
} else {
string = intl.string;
items2 = [Reflect.apply(string, intl, [t.RRtlLg])];
string = intl.string;
items2[1] = Reflect.apply(string, intl, [t.v3a6Pd]);
object2 = {variant: 'text-md/normal', children: items2};
}
return <Text {...object2} />;
}
const env0_0 = global.setTimeout(_fun107542, 1000);
return _fun107544;
}
function _fun107545() { // fn#107545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:1075, offset: 0x0230050b, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun107547);
return _fun107548;
}
function BackupScreen({mfaChallenge, finish}) { // fn#107540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:680, offset: 0x02300161, size: 852 bytes, params: 2, frame: 37
const value2 = (UseWideAuthView)();
const binding = env0_5;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_4;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_1 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, ['']), 2);
const property2 = value5[0];
const env0_3 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [undefined]), 2);
const property3 = value6[0];
var env0_4 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property4 = value7[0];
var env0_5 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [10]), 2);
const property5 = value8[0];
const env0_7 = value8[1];
binding.useEffect(_fun107541, [property5]);
const env0_8 = binding.useCallback(_fun107545(), [finish]);
object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const B2T1HD = (require(1244) /* metro dependency 1244: indexNative */).t.B2T1HD;
object.headerText = Reflect.apply(string, intl, [B2T1HD]);
object.subtitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.c5J7O0);
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const formattedExplainer = getFormattedExplainer(property5);
const clipboardCopyInputProps = {label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['C/ZAw/']),
placeholder: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fZSi1D),
isValidClipboardCode: isValidClipboardCode_107538};
const BACKUP_CODE_MAX_LENGTH = (require(14219) /* metro dependency 14219: MFA */).BACKUP_CODE_MAX_LENGTH;
clipboardCopyInputProps.maxLength = BACKUP_CODE_MAX_LENGTH;
clipboardCopyInputProps.onChangeCode = onChangeCode;
clipboardCopyInputProps.error = property3;
clipboardCopyInputProps.isDisabled = property || property4;
clipboardCopyInputProps.autoFocus = !value2;
object.input = (
<>
{formattedExplainer}
<ClipboardCopyInput {...clipboardCopyInputProps} />
</>
);
const defaultImport3 = Button;
const defaultImport3Props = {variant: 'primary',
text: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.geKm7t),
loading: property || property4, onPress: onPress_107550};
let r9 = property || property4;
r9 = !r9 ? property2.length < (require(14219) /* metro dependency 14219: MFA */).BACKUP_CODE_MIN_LENGTH : r9;
r9 = !r9 ? property5 > 0 : r9;
defaultImport3Props.disabled = r9;
object.submit = ((Component) => <Component {...defaultImport3Props} />)(defaultImport3);
object.screenProps = {mfaChallenge: mfaChallenge, finish: finish};
object.mfaMethod = 'backup';
return <MfaOptionScreen {...object} />;
function _fun107541() { // fn#107541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:962, offset: 0x023004b5, size: 61 bytes, params: 1, frame: 14
if (JsxRuntimeModule.jsxs <= 0) {
return undefined;
}
const env0_0 = global.setTimeout(_fun107542, 1000);
return _fun107544;
function _fun107542() { // fn#107542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:997, offset: 0x023004f2, size: 25 bytes, params: 1, frame: 11
env1_7(function(a0) {
return a0 - 1;
});
}
function onChangeCode(a0) { // fn#107549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:1685, owner: BackupScreen.onChangeCode, offset: 0x023005e8, size: 28 bytes, params: 2, frame: 12
env0_3(a0);
env0_4(undefined);
}
function _fun107544() { // fn#107544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:1027, offset: 0x016d7e7e, size: 24 bytes, params: 1, frame: 11
return global.clearTimeout(env0_0);
}
function BackupScreenOnPress() { // fn#107550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:1856, owner: BackupScreen.onPress, offset: 0x02300604, size: 20 bytes, params: 1, frame: 11
return env0_8(env0_2);
}
}
function _fun107542() { // fn#107542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:997, offset: 0x023004f2, size: 25 bytes, params: 1, frame: 11
env1_7(function(a0) {
return a0 - 1;
});
}
function* _fun107547(a0) { // fn#107547, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:1095, offset: 0x0230053a, size: 174 bytes, params: 2, frame: 19
var message;
var r3;
var object2;
var moduleValue;
var value4;
var value5;
var binding;
var error;
var body;
let value = undefined;
if (true) {
value = undefined;
env2_4(value);
importDefault(true);
reducibleJoin3: while (true) {
reduciblePort20: while (true) {
exceptionLanding14: while (true) {
function _fun107545() { // fn#107545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:1075, offset: 0x0230050b, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun107547);
return _fun107548;
function* _fun107547(a0) { // fn#107547, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:1095, offset: 0x0230053a, size: 174 bytes, params: 2, frame: 19
var message;
var r3;
var object;
var moduleValue;
var value4;
var value5;
var binding;
var error;
var body;
let value = undefined;
if (true) {
value = undefined;
env2_4(value);
importDefault(true);
reducibleJoin3: while (true) {
reduciblePort20: while (true) {
exceptionLanding14: while (true) {
try {
} catch (error) {
break exceptionLanding14;
}
break reducibleJoin3;
}
binding = env2_4;
reducibleJoin17: while (true) {
if (error == null) {
message = value;
break reducibleJoin17;
}
body = error.body;
if (body == null) {
message = value;
break reducibleJoin17;
}
message = body.message;
break reducibleJoin17;
}
reducibleJoin19: while (true) {
if (message != null) {
r3 = message;
break reducibleJoin19;
}
message = error.message;
r3 = message;
break reducibleJoin19;
}
binding(r3);
break reduciblePort20;
}
importDefault(false);
return value;
}
try {
object = {};
} catch (error) {
break exceptionLanding14;
}
break reducibleJoin3;
}
binding = env2_4;
reducibleJoin17: while (true) {
if (error == null) {
message = value;
break reducibleJoin17;
try {
object.mfaType = 'backup';
} catch (error) {
break exceptionLanding14;
}
body = error.body;
if (body == null) {
message = value;
break reducibleJoin17;
try {
object.data = a0;
} catch (error) {
break exceptionLanding14;
}
message = body.message;
break reducibleJoin17;
}
reducibleJoin19: while (true) {
if (message != null) {
r3 = message;
break reducibleJoin19;
try {
moduleValue = require(object);
} catch (error) {
break exceptionLanding14;
}
message = error.message;
r3 = message;
break reducibleJoin19;
yield moduleValue;
try {
value4 = undefined;
value5 = false;
} catch (error) {
break exceptionLanding14;
}
if (value5) {
return value4;
}
try {
binding = env2_5;
} catch (error) {
break exceptionLanding14;
}
try {
binding(true);
} catch (error) {
break exceptionLanding14;
}
importDefault(false);
}
binding(r3);
break reduciblePort20;
return value;
}
importDefault(false);
return value;
function _fun107548() { // fn#107548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:1270, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
try {
object2 = {};
} catch (error) {
break exceptionLanding14;
function onChangeCode(a0) { // fn#107549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:1685, owner: BackupScreen.onChangeCode, offset: 0x023005e8, size: 28 bytes, params: 2, frame: 12
env0_3(a0);
env0_4(undefined);
}
try {
object2.mfaType = 'backup';
} catch (error) {
break exceptionLanding14;
function BackupScreenOnPress() { // fn#107550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14418:1856, owner: BackupScreen.onPress, offset: 0x02300604, size: 20 bytes, params: 1, frame: 11
return env0_8(env0_2);
}
try {
object2.data = a0;
} catch (error) {
break exceptionLanding14;
}
try {
moduleValue = require(object2);
} catch (error) {
break exceptionLanding14;
}
yield moduleValue;
try {
value4 = undefined;
value5 = false;
} catch (error) {
break exceptionLanding14;
}
if (value5) {
return value4;
}
try {
binding = env2_5;
} catch (error) {
break exceptionLanding14;
}
try {
binding(true);
} catch (error) {
break exceptionLanding14;
}
importDefault(false);
}
return value;
}
global.__d(_fun107537, 14221, [5, 57, 31, 33, 14219, 4573, 1244, 8973, 14214, 14220, 14217,
2]) /* metro module 14221, dependencies: [5, 57, 31, 33, 14219, 4573, 1244, 8973, 14214, 14220, 14217, 2] */;
@@ -1,38 +1,74 @@
/* Metro module 14214; source: modules/mfa/native/screens/MfaOptionScreen.tsx; dependencies: [27, 33, 8973, 14215, 6618, 4572, 4573, 14216, 8584, 2] */
import UseWideAuthView from '../../../auth/native/useWideAuthView.tsx'; /* Metro dependency 8973 */
import MfaScreenUtils from '../MfaScreenUtils.tsx'; /* Metro dependency 14215 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SafeAreaViewModule from '../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
function _fun107499(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14411:6, offset: 0x022fea71, size: 164 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).ScrollView;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
const env0_6 = value.Fragment;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/mfa/native/screens/MfaOptionScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/mfa/native/screens/MfaOptionScreen.tsx');
exports.default = MFAOptionScreen;
function MFAOptionScreen({headerText, headerImage, subtitle, input, submit, screenProps, mfaMethod, error, content}) { // fn#107500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14411:247, offset: 0x022feb15, size: 724 bytes, params: 2, frame: 36
const Text = (TextModule).Text;
const value3 = (UseWideAuthView)();
const value4 = (MfaScreenUtils).useScreenStyles(value3);
const value5 = screenProps.mfaChallenge.methods[0]?.type === mfaMethod;
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const value6 = !value3;
const contentContainer = value4.contentContainer;
const Stack = (StackNativeModule).Stack;
const Stack2 = (StackNativeModule).Stack;
const mfaContainerHeader = value4.mfaContainerHeader;
const items2 = [headerImage != null && headerImage];
items2[1] = (
<Text variant="heading-xl/extrabold" style={value4.mfaContainerHeaderText}>
{headerText}
</Text>
);
items2[2] = subtitle != null && <Text variant="heading-sm/normal" color="text-default">{subtitle}</Text>;
items2[3] = error != null && <Text variant="text-sm/normal" color="text-feedback-critical">{error}</Text>;
const safeAreaPaddingView = (
<SafeAreaPaddingView
bottom={value6}
top={value6}
style={contentContainer}
>
<Stack>
<Stack2 style={mfaContainerHeader} spacing={4}>
{items2}
</Stack2>
{input}
</Stack>
{content}
<Stack style={value4.submit}>
{submit}
{value5 && ((Component) => <Component props={screenProps} />)(importDefault(14216) /* metro dependency 14216: BackButton */)}
</Stack>
</SafeAreaPaddingView>
);
return (
<>
{((Component) => <Component backgroundImageCover={false} />)(importDefault(8584) /* metro dependency 8584: BackgroundImage */)}
{
value3
? (
<ScrollView keyboardShouldPersistTaps="handled">
{safeAreaPaddingView}
</ScrollView>
)
: safeAreaPaddingView
}
</>
);
}
}
function MFAOptionScreen({headerText, headerImage, subtitle, input, submit, screenProps, mfaMethod, error, content}) { // fn#107500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14411:247, offset: 0x022feb15, size: 724 bytes, params: 2, frame: 36
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const value3 = (importDefault(8973) /* metro dependency 8973: useWideAuthView */)();
const value4 = (importDefault(14215) /* metro dependency 14215: MfaScreenUtils */).useScreenStyles(value3);
const value5 = screenProps.mfaChallenge.methods[0]?.type === mfaMethod;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const value6 = !value3;
const contentContainer = value4.contentContainer;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const mfaContainerHeader = value4.mfaContainerHeader;
const items2 = [headerImage != null && headerImage];
items2[1] = <Text variant="heading-xl/extrabold" style={value4.mfaContainerHeaderText}>{headerText}</Text>;
items2[2] = subtitle != null && <Text variant="heading-sm/normal" color="text-default">{subtitle}</Text>;
items2[3] = error != null && <Text variant="text-sm/normal" color="text-feedback-critical">{error}</Text>;
const safeAreaPaddingView = <SafeAreaPaddingView bottom={value6} top={value6} style={contentContainer}><Stack><Stack2 style={mfaContainerHeader} spacing={4}>{items2}</Stack2>{input}</Stack>{content}<Stack style={value4.submit}>{submit}{value5 && ((Component) => <Component props={screenProps} />)(importDefault(14216) /* metro dependency 14216: BackButton */)}</Stack></SafeAreaPaddingView>;
return (
<>
{((Component) => <Component backgroundImageCover={false} />)(importDefault(8584) /* metro dependency 8584: BackgroundImage */)}
{value3 ? <ScrollView keyboardShouldPersistTaps="handled">{safeAreaPaddingView}</ScrollView> : safeAreaPaddingView}
</>
);
}
global.__d(_fun107499, 14214, [27, 33, 8973, 14215, 6618, 4572, 4573, 14216, 8584,
2]) /* metro module 14214, dependencies: [27, 33, 8973, 14215, 6618, 4572, 4573, 14216, 8584, 2] */;
@@ -1,159 +1,188 @@
/* Metro module 14223; source: modules/mfa/native/screens/PasswordScreen.tsx; dependencies: [5, 57, 31, 27, 33, 8973, 14215, 14214, 1244, 7981, 14217, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseWideAuthView from '../../../auth/native/useWideAuthView.tsx'; /* Metro dependency 8973 */
import MfaOptionScreen from './MfaOptionScreen.tsx'; /* Metro dependency 14214 */
import MfaScreenUtils from '../MfaScreenUtils.tsx'; /* Metro dependency 14215 */
import Button from '../components/button.tsx'; /* Metro dependency 14217 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as TextInputNativeModule from '../../../../design/components/TextInput/native/TextInput.native.tsx'; /* Metro dependency 7981 */
function _fun107565(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14420:6, offset: 0x02300ebf, size: 195 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(27) /* metro dependency 27 */).View;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/mfa/native/screens/PasswordScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/mfa/native/screens/PasswordScreen.tsx');
exports.default = PasswordScreen;
}
function PasswordScreen({mfaChallenge, finish}) { // fn#107566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14420:245, offset: 0x02300f82, size: 670 bytes, params: 2, frame: 35
const value3 = (importDefault(14215) /* metro dependency 14215: MfaScreenUtils */).useScreenStyles((importDefault(8973) /* metro dependency 8973: useWideAuthView */)());
const binding = env0_5;
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [null]);
const binding2 = env0_4;
const value5 = binding2(value4, 2);
const property = value5[0];
const env0_1 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, ['']), 2);
const property2 = value6[0];
const property3 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property4 = value7[0];
const env0_3 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property5 = value8[0];
var env0_4 = value8[1];
const value9 = _fun107567();
const MfaOptionScreen = importDefault(14214) /* metro dependency 14214: MfaOptionScreen */;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const Rw1XuM = (require(1244) /* metro dependency 1244: indexNative */).t.Rw1XuM;
object2.headerText = Reflect.apply(string, intl, [Rw1XuM]);
const inputContainer = value3.inputContainer;
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
object2.input = <View style={inputContainer}><TextInput autoFocus required textContentType="password" label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['CIGa+7'])} placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['CIGa+7'])} autoComplete="current-password" errorMessage={property} returnKeyType="done" onChange={property3} onSubmitEditing={value9} isDisabled={property4 || property5} isClearable secureTextEntry /></View>;
const defaultImport3 = importDefault(14217) /* metro dependency 14217: button */;
string = intl.string;
const geKm7t = (require(1244) /* metro dependency 1244: indexNative */).t.geKm7t;
let r13 = property4 || property5;
r13 = !r13 ? property2.length === 0 : r13;
object2.submit = ((Component) => <Component text={Reflect.apply(string, intl,
[geKm7t])} disabled={r13} loading={property4 || property5} onPress={value9} />)(defaultImport3);
object2.screenProps = {mfaChallenge: mfaChallenge, finish: finish};
object2.mfaMethod = 'password';
return <MfaOptionScreen {...object2} />;
}
function _fun107567() { // fn#107567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14420:505, offset: 0x02301220, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun107569);
return _fun107570;
}
function* _fun107569() { // fn#107569, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14420:525, offset: 0x0230124f, size: 163 bytes, params: 1, frame: 19
var message;
var r3;
var object2;
var moduleValue;
var value4;
var value5;
var binding;
var error;
var body;
let value = undefined;
if (true) {
value = undefined;
importDefault(null);
env2_3(true);
reducibleJoin3: while (true) {
reduciblePort20: while (true) {
exceptionLanding15: while (true) {
function PasswordScreen({mfaChallenge, finish}) { // fn#107566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14420:245, offset: 0x02300f82, size: 670 bytes, params: 2, frame: 35
const value3 = (MfaScreenUtils).useScreenStyles((UseWideAuthView)());
let useState = ReactModule.useState;
const value4 = Reflect.apply(useState, ReactModule, [null]);
const binding2 = env0_4;
const value5 = binding2(value4, 2);
const property = value5[0];
const env0_1 = value5[1];
useState = ReactModule.useState;
const value6 = binding2(Reflect.apply(useState, ReactModule, ['']), 2);
const property2 = value6[0];
const property3 = value6[1];
useState = ReactModule.useState;
const value7 = binding2(Reflect.apply(useState, ReactModule, [false]), 2);
const property4 = value7[0];
const env0_3 = value7[1];
useState = ReactModule.useState;
const value8 = binding2(Reflect.apply(useState, ReactModule, [false]), 2);
const property5 = value8[0];
var env0_4 = value8[1];
const value9 = _fun107567();
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const Rw1XuM = (require(1244) /* metro dependency 1244: indexNative */).t.Rw1XuM;
object.headerText = Reflect.apply(string, intl, [Rw1XuM]);
const inputContainer = value3.inputContainer;
const TextInput = (TextInputNativeModule).TextInput;
object.input = (
<View style={inputContainer}>
<TextInput
autoFocus
required
textContentType="password"
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['CIGa+7'])}
placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['CIGa+7'])}
autoComplete="current-password"
errorMessage={property}
returnKeyType="done"
onChange={property3}
onSubmitEditing={value9}
isDisabled={property4 || property5}
isClearable
secureTextEntry
/>
</View>
);
const defaultImport3 = Button;
string = intl.string;
const geKm7t = (require(1244) /* metro dependency 1244: indexNative */).t.geKm7t;
let r13 = property4 || property5;
r13 = !r13 ? property2.length === 0 : r13;
object.submit = ((Component) => <Component text={Reflect.apply(string, intl,
[geKm7t])} disabled={r13} loading={property4 || property5} onPress={value9} />)(defaultImport3);
object.screenProps = {mfaChallenge: mfaChallenge, finish: finish};
object.mfaMethod = 'password';
return <MfaOptionScreen {...object} />;
function _fun107567() { // fn#107567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14420:505, offset: 0x02301220, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun107569);
return _fun107570;
function* _fun107569() { // fn#107569, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14420:525, offset: 0x0230124f, size: 163 bytes, params: 1, frame: 19
var message;
var r3;
var object;
var moduleValue;
var value4;
var value5;
var binding;
var error;
var body;
let value = undefined;
if (true) {
value = undefined;
importDefault(null);
env2_3(true);
reducibleJoin3: while (true) {
reduciblePort20: while (true) {
exceptionLanding15: while (true) {
try {
} catch (error) {
break exceptionLanding15;
}
break reducibleJoin3;
}
body = error.body;
reducibleJoin17: while (true) {
if (body == null) {
message = value;
break reducibleJoin17;
}
message = body.message;
break reducibleJoin17;
}
reducibleJoin19: while (true) {
if (message != null) {
r3 = message;
break reducibleJoin19;
}
message = error.message;
r3 = message;
break reducibleJoin19;
}
importDefault(r3);
break reduciblePort20;
}
env2_3(false);
return value;
}
try {
object = {};
} catch (error) {
break exceptionLanding15;
}
try {
object.mfaType = 'password';
} catch (error) {
break exceptionLanding15;
}
try {
} catch (error) {
break exceptionLanding15;
}
break reducibleJoin3;
}
body = error.body;
reducibleJoin17: while (true) {
if (body == null) {
message = value;
break reducibleJoin17;
try {
object.data = dependencyMap;
} catch (error) {
break exceptionLanding15;
}
message = body.message;
break reducibleJoin17;
}
reducibleJoin19: while (true) {
if (message != null) {
r3 = message;
break reducibleJoin19;
try {
moduleValue = require(object);
} catch (error) {
break exceptionLanding15;
}
message = error.message;
r3 = message;
break reducibleJoin19;
yield moduleValue;
try {
value4 = undefined;
value5 = false;
} catch (error) {
break exceptionLanding15;
}
if (value5) {
return value4;
}
try {
binding = env2_4;
} catch (error) {
break exceptionLanding15;
}
try {
binding(true);
} catch (error) {
break exceptionLanding15;
}
env2_3(false);
}
importDefault(r3);
break reduciblePort20;
return value;
}
env2_3(false);
return value;
function _fun107570() { // fn#107570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14420:690, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
try {
object2 = {};
} catch (error) {
break exceptionLanding15;
}
try {
object2.mfaType = 'password';
} catch (error) {
break exceptionLanding15;
}
try {
} catch (error) {
break exceptionLanding15;
}
try {
object2.data = dependencyMap;
} catch (error) {
break exceptionLanding15;
}
try {
moduleValue = require(object2);
} catch (error) {
break exceptionLanding15;
}
yield moduleValue;
try {
value4 = undefined;
value5 = false;
} catch (error) {
break exceptionLanding15;
}
if (value5) {
return value4;
}
try {
binding = env2_4;
} catch (error) {
break exceptionLanding15;
}
try {
binding(true);
} catch (error) {
break exceptionLanding15;
}
env2_3(false);
}
return value;
}
global.__d(_fun107565, 14223, [5, 57, 31, 27, 33, 8973, 14215, 14214, 1244, 7981, 14217,
2]) /* metro module 14223, dependencies: [5, 57, 31, 27, 33, 8973, 14215, 14214, 1244, 7981, 14217, 2] */;
@@ -1,70 +1,90 @@
/* Metro module 14212; source: modules/mfa/native/screens/SelectScreen.tsx; dependencies: [31, 27, 14209, 33, 4501, 5314, 7975, 8973, 1484, 6618, 4573, 1244, 2] */
import UseWideAuthView from '../../../auth/native/useWideAuthView.tsx'; /* Metro dependency 8973 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SafeAreaViewModule from '../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as RowButtonNativeModule from '../../../../design/components/TableRow/native/RowButton.native.tsx'; /* Metro dependency 7975 */
import * as MFAConstantsModule from '../../MFAConstants.tsx'; /* Metro dependency 14209 */
function _fun107482(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14409:6, offset: 0x022fe030, size: 223 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_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(14209) /* metro dependency 14209: MFAConstants */).SELECT_NAMES;
const value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun107483);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/mfa/native/screens/SelectScreen.tsx');
ReactModule;
const env0_7 = (CreateStylesModule).createStyles(_fun107483);
(FileImportTrackerModule).fileFinishedImporting('modules/mfa/native/screens/SelectScreen.tsx');
exports.default = SelectScreen;
}
function _fun107483(a0) { // fn#107483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14409:193, offset: 0x022fe10f, size: 108 bytes, params: 2, frame: 16
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
return {container: {'marginLeft': 16, 'marginRight': 16}, selectContainer: {'marginTop': null, 'marginLeft': 16,
'marginRight': 16, 'display': 'flex', 'alignItems': 'center',
marginTop: a0 ? NAV_BAR_HEIGHT : NAV_BAR_HEIGHT - (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).STATUS_BAR_HEIGHT}};
}
function _fun107483(a0) { // fn#107483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14409:193, offset: 0x022fe10f, size: 108 bytes, params: 2, frame: 16
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
return {container: {'marginLeft': 16, 'marginRight': 16}, selectContainer: {'marginTop': null, 'marginLeft': 16,
'marginRight': 16, 'display': 'flex', 'alignItems': 'center',
marginTop: a0 ? NAV_BAR_HEIGHT : NAV_BAR_HEIGHT - (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).STATUS_BAR_HEIGHT}};
}
function SelectScreen(a0) { // fn#107484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14409:497, offset: 0x022fe17b, size: 412 bytes, params: 2, frame: 27
const env0_0 = a0;
const value2 = (importDefault(8973) /* metro dependency 8973: useWideAuthView */)();
const styles = useStyles(value2);
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const S9b9bX = (require(1244) /* metro dependency 1244: indexNative */).t.S9b9bX;
let value = <Text variant="heading-xl/extrabold">{Reflect.apply(string, intl, [S9b9bX])}</Text>;
string = intl.string;
const Jz1lXO = (require(1244) /* metro dependency 1244: indexNative */).t.Jz1lXO;
value = <View style={styles.selectContainer}>{value}<Text variant="text-sm/medium">{Reflect.apply(string, intl,
[Jz1lXO])}</Text></View>;
return (
<SafeAreaPaddingView top={!value2} style={styles.container}>
{value}
<View style={{'marginTop': 16, 'gap': 8}}>
{a0.mfaChallenge.methods.map(_fun107485)}
function SelectScreen(a0) { // fn#107484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14409:497, offset: 0x022fe17b, size: 412 bytes, params: 2, frame: 27
const env0_0 = a0;
const value2 = (UseWideAuthView)();
const styles = useStyles(value2);
const env0_1 = (UseNavigationNativeModule).useNavigation();
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const S9b9bX = (IndexNativeModule).t.S9b9bX;
let value = (
<Text variant="heading-xl/extrabold">
{Reflect.apply(string, intl, [S9b9bX])}
</Text>
);
string = intl.string;
const Jz1lXO = (IndexNativeModule).t.Jz1lXO;
value = (
<View style={styles.selectContainer}>
{value}
<Text variant="text-sm/medium">
{Reflect.apply(string, intl, [Jz1lXO])}
</Text>
</View>
</SafeAreaPaddingView>
);
}
);
return (
<SafeAreaPaddingView top={!value2} style={styles.container}>
{value}
<View style={{'marginTop': 16, 'gap': 8}}>
{a0.mfaChallenge.methods.map(_fun107485)}
</View>
</SafeAreaPaddingView>
);
function _fun107485(a0) { // fn#107485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14409:947, offset: 0x022fe317, size: 34 bytes, params: 2, frame: 15
return getOptionButton(env0_0, a0, env0_1);
function getOptionButton(a0, a1, a2) { // fn#107486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14409:950, offset: 0x022fe339, size: 102 bytes, params: 4, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const RowButton = (RowButtonNativeModule).RowButton;
return (
<RowButton
label={SELECT_NAMES[a1.type]}
onPress={onPress_107487}
key={a1.type}
/>
);
function getOptionButtonOnPress() { // fn#107487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14409:1034, owner: getOptionButton.onPress, offset: 0x022fe39f, size: 35 bytes, params: 1, frame: 13
importDefault.push(require.type, env0_0);
}
function _fun107485(a0) { // fn#107485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14409:947, offset: 0x022fe317, size: 34 bytes, params: 2, frame: 15
return getOptionButton(env0_0, a0, env0_1);
}
}
function getOptionButton(a0, a1, a2) { // fn#107486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14409:950, offset: 0x022fe339, size: 102 bytes, params: 4, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const RowButton = (require(7975) /* metro dependency 7975: RowButtonNative */).RowButton;
return (
<RowButton
label={SELECT_NAMES[a1.type]}
onPress={onPress_107487}
key={a1.type}
/>
);
}
}
}
function getOptionButtonOnPress() { // fn#107487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14409:1034, owner: getOptionButton.onPress, offset: 0x022fe39f, size: 35 bytes, params: 1, frame: 13
importDefault.push(require.type, env0_0);
}
global.__d(_fun107482, 14212, [31, 27, 14209, 33, 4501, 5314, 7975, 8973, 1484, 6618, 4573, 1244,
2]) /* metro module 14212, dependencies: [31, 27, 14209, 33, 4501, 5314, 7975, 8973, 1484, 6618, 4573, 1244, 2] */;
File diff suppressed because it is too large. Load diff
+173 -163
View File
@@ -1,186 +1,196 @@
/* Metro module 14218; source: modules/mfa/native/screens/TotpScreen.tsx; dependencies: [5, 57, 31, 33, 14219, 14214, 1244, 14220, 14217, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import MfaOptionScreen from './MfaOptionScreen.tsx'; /* Metro dependency 14214 */
import Button from '../components/button.tsx'; /* Metro dependency 14217 */
import ClipboardCopyInput from '../components/ClipboardCopyInput.tsx'; /* Metro dependency 14220 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as MFAModule from '../../../../external/discord_common/js/shared/MFA.tsx'; /* Metro dependency 14219 */
function _fun107508(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14415:6, offset: 0x022ff298, size: 185 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(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/mfa/native/screens/TotpScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/mfa/native/screens/TotpScreen.tsx');
exports.default = TotpScreen;
}
function isValidClipboardCode(a0) { // fn#107509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14415:140, offset: 0x022ff351, size: 72 bytes, params: 2, frame: 13
const length = a0.length;
const TOTP_CODE_LENGTH = (MFAModule).TOTP_CODE_LENGTH;
return length === TOTP_CODE_LENGTH && RegExp('^\\d+$', '').test(a0);
}
function isValidClipboardCode(a0) { // fn#107509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14415:140, offset: 0x022ff351, size: 72 bytes, params: 2, frame: 13
const length = a0.length;
const TOTP_CODE_LENGTH = (require(14219) /* metro dependency 14219: MFA */).TOTP_CODE_LENGTH;
return length === TOTP_CODE_LENGTH && RegExp('^\\d+$', '').test(a0);
}
function TotpScreen({mfaChallenge, finish}) { // fn#107510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14415:318, offset: 0x022ff399, size: 691 bytes, params: 2, frame: 30
var object4;
const binding = env0_5;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_4;
const value3 = binding2(value2, 2);
const property = value3[0];
const env0_1 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, ['']), 2);
const property2 = value4[0];
const env0_3 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [undefined]), 2);
const property3 = value5[0];
var env0_4 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property4 = value6[0];
var env0_5 = value6[1];
const value8 = binding.useCallback(_fun107511(), [finish]);
const MfaOptionScreen = importDefault(14214) /* metro dependency 14214: MfaOptionScreen */;
object4 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object4.headerText = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.uc00u5]);
const ClipboardCopyInput = importDefault(14220) /* metro dependency 14220: ClipboardCopyInput */;
const object3 = {};
string = intl.string;
const HZPBOd = (require(1244) /* metro dependency 1244: indexNative */).t.HZPBOd;
object3.label = Reflect.apply(string, intl, [HZPBOd]);
object3.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tARzgo);
object3.isValidClipboardCode = isValidClipboardCode;
const TOTP_CODE_LENGTH = (require(14219) /* metro dependency 14219: MFA */).TOTP_CODE_LENGTH;
object3.maxLength = TOTP_CODE_LENGTH;
object3.onChangeCode = value8;
object3.error = property3;
object3.isDisabled = property || property4;
object3.textContentType = 'oneTimeCode';
object3.autoComplete = 'one-time-code';
object3.keyboardType = 'number-pad';
object4.input = <ClipboardCopyInput {...object3} />;
const defaultImport3 = importDefault(14217) /* metro dependency 14217: button */;
const defaultImport3Props = {variant: 'primary',
text: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.geKm7t),
loading: property || property4, onPress: onPress_107515};
let r9 = property || property4;
r9 = !r9 ? property2.length !== (require(14219) /* metro dependency 14219: MFA */).TOTP_CODE_LENGTH : r9;
defaultImport3Props.disabled = r9;
object4.submit = ((Component) => <Component {...defaultImport3Props} />)(defaultImport3);
object4.screenProps = {mfaChallenge: mfaChallenge, finish: finish};
object4.mfaMethod = 'totp';
return <MfaOptionScreen {...object4} />;
}
function _fun107511() { // fn#107511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14415:549, offset: 0x022ff64c, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun107513);
return _fun107514;
}
function TotpScreenOnPress() { // fn#107515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14415:1308, owner: TotpScreen.onPress, offset: 0x022ff747, size: 20 bytes, params: 1, frame: 11
env0_6(env0_2);
}
function* _fun107513(a0) { // fn#107513, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14415:569, offset: 0x022ff67b, size: 204 bytes, params: 2, frame: 19
var message;
var r3;
var object2;
var moduleValue;
var value5;
var value6;
var binding;
var error;
var body;
let value = undefined;
if (true) {
value = undefined;
env2_3(a0);
if (env3_7(a0)) {
env2_4(value);
importDefault(true);
reducibleJoin4: while (true) {
reduciblePort21: while (true) {
exceptionLanding15: while (true) {
function TotpScreen({mfaChallenge, finish}) { // fn#107510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14415:318, offset: 0x022ff399, size: 691 bytes, params: 2, frame: 30
var object2;
const binding = env0_5;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_4;
const value3 = binding2(value2, 2);
const property = value3[0];
const env0_1 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, ['']), 2);
const property2 = value4[0];
const env0_3 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [undefined]), 2);
const property3 = value5[0];
var env0_4 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property4 = value6[0];
var env0_5 = value6[1];
const value8 = binding.useCallback(_fun107511(), [finish]);
object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.headerText = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.uc00u5]);
const object = {};
string = intl.string;
const HZPBOd = (require(1244) /* metro dependency 1244: indexNative */).t.HZPBOd;
object.label = Reflect.apply(string, intl, [HZPBOd]);
object.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tARzgo);
object.isValidClipboardCode = isValidClipboardCode;
const TOTP_CODE_LENGTH = (require(14219) /* metro dependency 14219: MFA */).TOTP_CODE_LENGTH;
object.maxLength = TOTP_CODE_LENGTH;
object.onChangeCode = value8;
object.error = property3;
object.isDisabled = property || property4;
object.textContentType = 'oneTimeCode';
object.autoComplete = 'one-time-code';
object.keyboardType = 'number-pad';
object2.input = <ClipboardCopyInput {...object} />;
const defaultImport3 = Button;
const defaultImport3Props = {variant: 'primary',
text: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.geKm7t),
loading: property || property4, onPress: onPress_107515};
let r9 = property || property4;
r9 = !r9 ? property2.length !== (require(14219) /* metro dependency 14219: MFA */).TOTP_CODE_LENGTH : r9;
defaultImport3Props.disabled = r9;
object2.submit = ((Component) => <Component {...defaultImport3Props} />)(defaultImport3);
object2.screenProps = {mfaChallenge: mfaChallenge, finish: finish};
object2.mfaMethod = 'totp';
return <MfaOptionScreen {...object2} />;
function _fun107511() { // fn#107511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14415:549, offset: 0x022ff64c, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun107513);
return _fun107514;
function* _fun107513(a0) { // fn#107513, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14415:569, offset: 0x022ff67b, size: 204 bytes, params: 2, frame: 19
var message;
var r3;
var object;
var moduleValue;
var value5;
var value6;
var binding;
var error;
var body;
let value = undefined;
if (true) {
value = undefined;
env2_3(a0);
if (env3_7(a0)) {
env2_4(value);
importDefault(true);
reducibleJoin4: while (true) {
reduciblePort21: while (true) {
exceptionLanding15: while (true) {
try {
} catch (error) {
break exceptionLanding15;
}
break reducibleJoin4;
}
binding = env2_4;
reducibleJoin18: while (true) {
if (error == null) {
message = value;
break reducibleJoin18;
}
body = error.body;
if (body == null) {
message = value;
break reducibleJoin18;
}
message = body.message;
break reducibleJoin18;
}
reducibleJoin20: while (true) {
if (message != null) {
r3 = message;
break reducibleJoin20;
}
message = error.message;
r3 = message;
break reducibleJoin20;
}
binding(r3);
break reduciblePort21;
}
importDefault(false);
return value;
}
try {
object = {};
} catch (error) {
break exceptionLanding15;
}
break reducibleJoin4;
}
binding = env2_4;
reducibleJoin18: while (true) {
if (error == null) {
message = value;
break reducibleJoin18;
try {
object.mfaType = 'totp';
} catch (error) {
break exceptionLanding15;
}
body = error.body;
if (body == null) {
message = value;
break reducibleJoin18;
try {
object.data = a0;
} catch (error) {
break exceptionLanding15;
}
message = body.message;
break reducibleJoin18;
}
reducibleJoin20: while (true) {
if (message != null) {
r3 = message;
break reducibleJoin20;
try {
moduleValue = require(object);
} catch (error) {
break exceptionLanding15;
}
message = error.message;
r3 = message;
break reducibleJoin20;
yield moduleValue;
try {
value5 = undefined;
value6 = false;
} catch (error) {
break exceptionLanding15;
}
if (value6) {
return value5;
}
try {
binding = env2_5;
} catch (error) {
break exceptionLanding15;
}
try {
binding(true);
} catch (error) {
break exceptionLanding15;
}
importDefault(false);
}
binding(r3);
break reduciblePort21;
}
importDefault(false);
return value;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding15;
function _fun107514() { // fn#107514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14415:776, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
try {
object2.mfaType = 'totp';
} catch (error) {
break exceptionLanding15;
}
try {
object2.data = a0;
} catch (error) {
break exceptionLanding15;
}
try {
moduleValue = require(object2);
} catch (error) {
break exceptionLanding15;
}
yield moduleValue;
try {
value5 = undefined;
value6 = false;
} catch (error) {
break exceptionLanding15;
}
if (value6) {
return value5;
}
try {
binding = env2_5;
} catch (error) {
break exceptionLanding15;
}
try {
binding(true);
} catch (error) {
break exceptionLanding15;
}
importDefault(false);
}
function TotpScreenOnPress() { // fn#107515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14415:1308, owner: TotpScreen.onPress, offset: 0x022ff747, size: 20 bytes, params: 1, frame: 11
(0, JsxRuntimeModule.jsx)(env0_2);
}
}
return value;
}
global.__d(_fun107508, 14218, [5, 57, 31, 33, 14219, 14214, 1244, 14220, 14217,
2]) /* metro module 14218, dependencies: [5, 57, 31, 33, 14219, 14214, 1244, 14220, 14217, 2] */;
@@ -1,157 +1,173 @@
/* Metro module 14213; source: modules/mfa/native/screens/WebAuthnScreen.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 1244, 1305, 477, 507, 8980, 14214, 13262, 8978, 14217, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import MfaOptionScreen from './MfaOptionScreen.tsx'; /* Metro dependency 14214 */
import Button from '../components/button.tsx'; /* Metro dependency 14217 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as HTTPUtilsModule from '../../../../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as KeyImageModule from '../components/KeyImage.tsx'; /* Metro dependency 13262 */
function _fun107488(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14410:6, offset: 0x022fe3c2, size: 367 bytes, params: 8, frame: 25
var object4;
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 NativeModules = (require(27) /* metro dependency 27 */).NativeModules;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object5 = {};
const NativeModules = (ReactNativeModule).NativeModules;
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object5.backgroundColor = BACKGROUND_SURFACE_HIGH;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{radioItem: object5}]);
object4 = {AUTHENTICATE: 0};
object4[0] = 'AUTHENTICATE';
object4.ANDROID_PASSKEY = 1;
object4[1] = 'ANDROID_PASSKEY';
const object6 = {};
const AUTHENTICATE = object4.AUTHENTICATE;
object2.backgroundColor = BACKGROUND_SURFACE_HIGH;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [{radioItem: object2}]);
object = {AUTHENTICATE: 0};
object[0] = 'AUTHENTICATE';
object.ANDROID_PASSKEY = 1;
object[1] = 'ANDROID_PASSKEY';
const object3 = {};
const AUTHENTICATE = object.AUTHENTICATE;
let DCDSecurityKeyManager = NativeModules.DCDSecurityKeyManager;
object6[AUTHENTICATE] = DCDSecurityKeyManager.authenticate;
const ANDROID_PASSKEY = object4.ANDROID_PASSKEY;
object3[AUTHENTICATE] = DCDSecurityKeyManager.authenticate;
const ANDROID_PASSKEY = object.ANDROID_PASSKEY;
DCDSecurityKeyManager = NativeModules.DCDSecurityKeyManager;
object6[ANDROID_PASSKEY] = DCDSecurityKeyManager.authenticatePasskey;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/mfa/native/screens/WebAuthnScreen.tsx');
object3[ANDROID_PASSKEY] = DCDSecurityKeyManager.authenticatePasskey;
(FileImportTrackerModule).fileFinishedImporting('modules/mfa/native/screens/WebAuthnScreen.tsx');
exports.default = WebAuthnScreen;
exports.AuthenticatorOption = object4;
}
function AndroidAuthRadioGroup({authenticatorSelection, setAuthenticator, inProgress}) { // fn#107489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14410:504, offset: 0x022fe531, size: 268 bytes, params: 2, frame: 22
const styles = useStyles();
let object2 = {};
const ANDROID_PASSKEY = env0_7.ANDROID_PASSKEY;
object2.value = ANDROID_PASSKEY;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const PVVXRI = (require(1244) /* metro dependency 1244: indexNative */).t.PVVXRI;
object2.name = Reflect.apply(string, intl, [PVVXRI]);
const items2 = [object2];
object2 = {};
const AUTHENTICATE = env0_7.AUTHENTICATE;
object2.value = AUTHENTICATE;
string = intl.string;
const TKop3X = (require(1244) /* metro dependency 1244: indexNative */).t.TKop3X;
object2.name = Reflect.apply(string, intl, [TKop3X]);
items2[1] = object2;
const RadioGroup = (require(1305) /* metro dependency 1305: native */).RadioGroup;
return (
<RadioGroup
style={styles.radioItem}
options={items2}
onChange={function({value}) {
return setAuthenticator(value);
}}
value={authenticatorSelection}
disabled={inProgress}
withSpacing
/>
);
}
function WebAuthnScreen({mfaChallenge, finish}) { // fn#107491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14410:954, offset: 0x022fe63d, size: 729 bytes, params: 2, frame: 29
var object2;
let env0_4 = undefined;
let binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = undefined;
const value3 = binding2(value2, 2);
const property = value3[0];
const env0_1 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, [undefined]), 2);
const property2 = value4[0];
const env0_2 = value4[1];
useState = binding.useState;
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
const binding3 = env0_7;
const value5 = Reflect.apply(useState, binding, [isAndroid2 ? binding3.ANDROID_PASSKEY : binding3.AUTHENTICATE]);
binding = undefined;
const value6 = binding(value5, 2);
const property3 = value6[0];
const property4 = value6[1];
const binding4 = env0_4;
useState = binding4.useState;
const value7 = binding(Reflect.apply(useState, binding4, [false]), 2);
const property5 = value7[0];
env0_4 = value7[1];
const methods = mfaChallenge.methods;
const challenge = methods.find(function(a0) {
return a0.type === 'webauthn';
}).challenge;
const useMemo = binding4.useMemo;
const value9 = binding4.useCallback(_fun107494, [Reflect.apply(useMemo, binding4, [_fun107493, [property3]]),
challenge, finish]);
const MfaOptionScreen = importDefault(14214) /* metro dependency 14214: MfaOptionScreen */;
object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.headerText = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.saHocI]);
string = intl.string;
const YpMrqM = (require(1244) /* metro dependency 1244: indexNative */).t.YpMrqM;
object2.subtitle = Reflect.apply(string, intl, [YpMrqM]);
const KeyImage = (require(13262) /* metro dependency 13262: KeyImage */).KeyImage;
object2.headerImage = <KeyImage />;
object2.content = (importDefault(8978) /* metro dependency 8978: NativeCeremonies */).shouldDisplayAndroidFidoSelector && <AndroidAuthRadioGroup authenticatorSelection={property3} setAuthenticator={property4} inProgress={property || property5} />;
const defaultImport2 = importDefault(14217) /* metro dependency 14217: button */;
string = intl.string;
const Xr3Eks = (require(1244) /* metro dependency 1244: indexNative */).t.Xr3Eks;
object2.submit = ((Component) => <Component variant="primary" text={Reflect.apply(string, intl,
[Xr3Eks])} loading={property || property5} disabled={property || property5} onPress={value9} />)(defaultImport2);
object2.screenProps = {mfaChallenge: mfaChallenge, finish: finish};
object2.mfaMethod = 'webauthn';
object2.error = property2;
return <MfaOptionScreen {...object2} />;
}
function _fun107493() { // fn#107493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14410:1289, offset: 0x022fe928, size: 20 bytes, params: 1, frame: 2
return env1_8[env0_3];
}
function _fun107494() { // fn#107494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14410:1321, offset: 0x022fe93c, size: 112 bytes, params: 1, frame: 13
env0_2(undefined);
env0_1(true);
let value = env0_6(challenge);
value = value.then(function(a0) {
return finish({mfaType: 'webauthn', data: a0});
});
value = value.then(_fun107496);
value = value.catch(_fun107497);
value.finally(_fun107498);
}
function _fun107497(a0) { // fn#107497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14410:1414, offset: 0x022fe9ce, size: 163 bytes, params: 2, frame: 16
var binding;
var value2;
var intl;
let value = environment.__proto__.__proto__;
const HTTPResponseError = (require(507) /* metro dependency 507: HTTPUtils */).HTTPResponseError;
if (a0 instanceof HTTPResponseError) {
value2 = environment.__proto__;
binding = env1_2;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
binding(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xSCvBf));
} else {
value = require(8980) /* metro dependency 8980: MFAUtils */;
value.captureWebAuthnException(a0, {});
value = environment.__proto__;
env1_2(a0.message);
exports.AuthenticatorOption = object;
function AndroidAuthRadioGroup({authenticatorSelection, setAuthenticator, inProgress}) { // fn#107489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14410:504, offset: 0x022fe531, size: 268 bytes, params: 2, frame: 22
const styles = useStyles();
let object = {};
const ANDROID_PASSKEY = env0_7.ANDROID_PASSKEY;
object.value = ANDROID_PASSKEY;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const PVVXRI = (IndexNativeModule).t.PVVXRI;
object.name = Reflect.apply(string, intl, [PVVXRI]);
const items2 = [object];
object = {};
const AUTHENTICATE = env0_7.AUTHENTICATE;
object.value = AUTHENTICATE;
string = intl.string;
const TKop3X = (IndexNativeModule).t.TKop3X;
object.name = Reflect.apply(string, intl, [TKop3X]);
items2[1] = object;
const RadioGroup = (NativeModule).RadioGroup;
return (
<RadioGroup
style={styles.radioItem}
options={items2}
onChange={function({value}) {
return setAuthenticator(value);
}}
value={authenticatorSelection}
disabled={inProgress}
withSpacing
/>
);
}
function WebAuthnScreen({mfaChallenge, finish}) { // fn#107491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14410:954, offset: 0x022fe63d, size: 729 bytes, params: 2, frame: 29
let env0_4 = undefined;
let binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = undefined;
const value3 = binding2(value2, 2);
const property = value3[0];
const env0_1 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, [undefined]), 2);
const property2 = value4[0];
const env0_2 = value4[1];
useState = binding.useState;
const isAndroid2 = (PlatformUtilsModule).isAndroid();
const binding3 = env0_7;
const value5 = Reflect.apply(useState, binding, [isAndroid2 ? binding3.ANDROID_PASSKEY : binding3.AUTHENTICATE]);
binding = undefined;
const value6 = binding(value5, 2);
const property3 = value6[0];
const property4 = value6[1];
const binding4 = env0_4;
useState = binding4.useState;
const value7 = binding(Reflect.apply(useState, binding4, [false]), 2);
const property5 = value7[0];
env0_4 = value7[1];
const methods = mfaChallenge.methods;
const challenge = methods.find(function(a0) {
return a0.type === 'webauthn';
}).challenge;
const useMemo = binding4.useMemo;
const value9 = binding4.useCallback(_fun107494, [Reflect.apply(useMemo, binding4, [_fun107493, [property3]]),
challenge, finish]);
object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object.headerText = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.saHocI]);
string = intl.string;
const YpMrqM = (require(1244) /* metro dependency 1244: indexNative */).t.YpMrqM;
object.subtitle = Reflect.apply(string, intl, [YpMrqM]);
const KeyImage = (KeyImageModule).KeyImage;
object.headerImage = <KeyImage />;
object.content = (importDefault(8978) /* metro dependency 8978: NativeCeremonies */).shouldDisplayAndroidFidoSelector && <AndroidAuthRadioGroup authenticatorSelection={property3} setAuthenticator={property4} inProgress={property || property5} />;
const defaultImport2 = Button;
string = intl.string;
const Xr3Eks = (require(1244) /* metro dependency 1244: indexNative */).t.Xr3Eks;
object.submit = ((Component) => <Component variant="primary" text={Reflect.apply(string, intl,
[Xr3Eks])} loading={property || property5} disabled={property || property5} onPress={value9} />)(defaultImport2);
object.screenProps = {mfaChallenge: mfaChallenge, finish: finish};
object.mfaMethod = 'webauthn';
object.error = property2;
return <MfaOptionScreen {...object} />;
function _fun107493() { // fn#107493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14410:1289, offset: 0x022fe928, size: 20 bytes, params: 1, frame: 2
return env1_8[Module00057];
}
function _fun107494() { // fn#107494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14410:1321, offset: 0x022fe93c, size: 112 bytes, params: 1, frame: 13
env0_2(undefined);
env0_1(true);
let value = env0_6(challenge);
value = value.then(function(a0) {
return finish({mfaType: 'webauthn', data: a0});
});
value = value.then(_fun107496);
value = value.catch(_fun107497);
value.finally(_fun107498);
function _fun107496() { // fn#107496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14410:1395, offset: 0x020587be, size: 18 bytes, params: 1, frame: 11
return env1_4(true);
}
function _fun107497(a0) { // fn#107497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14410:1414, offset: 0x022fe9ce, size: 163 bytes, params: 2, frame: 16
var binding;
var value2;
var intl;
let value = environment.__proto__.__proto__;
const HTTPResponseError = (HTTPUtilsModule).HTTPResponseError;
if (a0 instanceof HTTPResponseError) {
value2 = environment.__proto__;
binding = env1_2;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
binding(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xSCvBf));
} else {
value = require(8980) /* metro dependency 8980: MFAUtils */;
value.captureWebAuthnException(a0, {});
value = environment.__proto__;
env1_2(a0.message);
}
}
function _fun107498() { // fn#107498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14410:1565, offset: 0x00e6aafb, size: 18 bytes, params: 1, frame: 11
return env1_1(false);
}
}
}
}
global.__d(_fun107488, 14213, [57, 31, 27, 33, 4501, 697, 1244, 1305, 477, 507, 8980, 14214, 13262, 8978, 14217,
2]) /* metro module 14213, dependencies: [57, 31, 27, 33, 4501, 697, 1244, 1305, 477, 507, 8980, 14214, 13262, 8978, 14217, 2] */;