71 lines
3.8 KiB
TypeScript
71 lines
3.8 KiB
TypeScript
/* 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} />;
|
|
}
|
|
|