/* 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] */ 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 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; let DCDSecurityKeyManager = NativeModules.DCDSecurityKeyManager; object6[AUTHENTICATE] = DCDSecurityKeyManager.authenticate; const ANDROID_PASSKEY = object4.ANDROID_PASSKEY; DCDSecurityKeyManager = NativeModules.DCDSecurityKeyManager; object6[ANDROID_PASSKEY] = DCDSecurityKeyManager.authenticatePasskey; (require(2) /* metro dependency 2 */).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 ( ); } 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 = ; object2.content = (importDefault(8978) /* metro dependency 8978: NativeCeremonies */).shouldDisplayAndroidFidoSelector && ; const defaultImport2 = importDefault(14217) /* metro dependency 14217: button */; string = intl.string; const Xr3Eks = (require(1244) /* metro dependency 1244: indexNative */).t.Xr3Eks; object2.submit = ((Component) => )(defaultImport2); object2.screenProps = {mfaChallenge: mfaChallenge, finish: finish}; object2.mfaMethod = 'webauthn'; object2.error = property2; return ; } 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); } }