191 lines
11 KiB
TypeScript
191 lines
11 KiB
TypeScript
/* Metro module 15854; source: modules/verification/native/components/Overview.tsx; dependencies: [31, 27, 1373, 1878, 661, 33, 4501, 697, 1948, 566, 8961, 1484, 4571, 4578, 1244, 15638, 507, 7620, 4573, 6766, 13935, 2] */
|
|
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import UserRequiredActionStore from '../../../../stores/UserRequiredActionStore.tsx'; /* Metro dependency 1373 */
|
|
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
import UseBackPressHandler from '../../../routing/native/useBackPressHandler.tsx'; /* Metro dependency 4571 */
|
|
import VerificationUtils from '../../VerificationUtils.tsx'; /* Metro dependency 8961 */
|
|
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 FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
|
|
import * as UseBackPressHandlerModule from '../../../routing/native/useBackPressHandler.tsx'; /* Metro dependency 4571 */
|
|
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
|
|
import * as TextWithIOSLinkWorkaroundModule from '../../../a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
|
|
import * as SupportUtilsModule from '../../../../utils/native/SupportUtils.tsx'; /* Metro dependency 13935 */
|
|
|
|
function _fun121928(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16062:6, offset: 0x02554650, size: 515 bytes, params: 8, frame: 24
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ConstantsModule;
|
|
const env0_7 = value.Endpoints;
|
|
const env0_8 = value.VerificationModalScenes;
|
|
const env0_9 = value.VerificationTypes;
|
|
const HelpdeskArticles = value.HelpdeskArticles;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_10 = value.jsx;
|
|
const env0_11 = value.Fragment;
|
|
const env0_12 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
|
|
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
|
|
object.containerInner = {'flex': 1, 'padding': 20, 'justifyContent': 'center', 'alignItems': 'center'};
|
|
const MOBILE_TEXT_HEADING_PRIMARY = (Native).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
|
object.title = {'marginTop': 20, 'fontSize': 17, 'textAlign': 'center', color: MOBILE_TEXT_HEADING_PRIMARY};
|
|
const PRIMARY_400 = (Native).unsafe_rawColors.PRIMARY_400;
|
|
object.body = {'marginTop': 4, 'marginBottom': 20, 'fontSize': 14, 'textAlign': 'center', color: PRIMARY_400};
|
|
object.blocks = {'width': '60%', 'justifyContent': 'center'};
|
|
object.verificationType = {marginBottom: 20};
|
|
object.button = {'marginBottom': 20, 'marginHorizontal': 20, 'alignSelf': 'center'};
|
|
const env0_13 = Reflect.apply(createStyles, value, [object]);
|
|
value = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
|
const getArticleURL = value.getArticleURL;
|
|
const VERIFICATION_FAQ = HelpdeskArticles.VERIFICATION_FAQ;
|
|
const env0_14 = Reflect.apply(getArticleURL, value, [VERIFICATION_FAQ]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/verification/native/components/Overview.tsx');
|
|
exports.default = Overview;
|
|
function Overview() { // fn#121929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16062:945, offset: 0x02554853, size: 665 bytes, params: 1, frame: 30
|
|
const styles = useStyles();
|
|
const value2 = (FluxModule).useStateFromStores([UserRequiredActionStore],
|
|
_fun121930, [], (VerificationUtils).areVerificationTypesEqual);
|
|
const value3 = (UseNavigationNativeModule).useNavigation();
|
|
const defaultImport = UseBackPressHandler;
|
|
const BackPressHandler = (UseBackPressHandlerModule).BackPressHandler;
|
|
defaultImport(BackPressHandler.minimize);
|
|
const value4 = ReactModule.useCallback(_fun121931, [value3, value2, styles.verificationType]);
|
|
const Text = (TextModule).Text;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const string = intl.string;
|
|
const Iz0kDg = (require(1244) /* metro dependency 1244: indexNative */).t.Iz0kDg;
|
|
const items2 = [
|
|
<Text
|
|
variant="heading-lg/semibold"
|
|
style={styles.title}
|
|
accessibilityRole="header"
|
|
>
|
|
{Reflect.apply(string, intl, [Iz0kDg])}
|
|
</Text>,
|
|
];
|
|
const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround;
|
|
items2[1] = (
|
|
<TextWithIOSLinkWorkaround variant="text-sm/medium" style={styles.body}>
|
|
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['0rqMV5'],
|
|
{helpCenterURL: env0_14})}
|
|
</TextWithIOSLinkWorkaround>
|
|
);
|
|
items2[2] = (
|
|
<View style={styles.blocks}>
|
|
{value4()}
|
|
</View>
|
|
);
|
|
const view = (
|
|
<View style={styles.containerInner}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
const Button = (ButtonNativeModule).Button;
|
|
return (
|
|
<View style={styles.container}>
|
|
{view}
|
|
<View style={styles.button} accessibilityRole="link">
|
|
<Button
|
|
variant="secondary"
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Yl/Riu'])}
|
|
onPress={(SupportUtilsModule).emailSupport}
|
|
/>
|
|
</View>
|
|
</View>
|
|
);
|
|
function _fun121930() { // fn#121930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16062:1009, offset: 0x02554aec, size: 52 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__;
|
|
return (VerificationUtils).getVerificationTypes(UserRequiredActionStore.getAction());
|
|
}
|
|
|
|
function _fun121931() { // fn#121931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16062:1208, offset: 0x02554b20, size: 53 bytes, params: 1, frame: 15
|
|
return (
|
|
<>
|
|
{env0_1.map(_fun121932)}
|
|
</>
|
|
);
|
|
function _fun121932(a0) { // fn#121932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16062:1233, offset: 0x02554b55, size: 265 bytes, params: 2, frame: 22
|
|
var environment;
|
|
var r0;
|
|
var object;
|
|
var value2;
|
|
const Button = (ButtonNativeModule).Button;
|
|
var intl;
|
|
const env0_0 = a0;
|
|
let value = environment.__proto__.__proto__;
|
|
const CAPTCHA = VerificationTypes.CAPTCHA;
|
|
if (a0 === CAPTCHA) {
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r0 = (
|
|
<Button
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3413d0'])}
|
|
onPress={onPress_121933}
|
|
grow
|
|
/>
|
|
);
|
|
} else {
|
|
object = {};
|
|
value2 = environment.__proto__;
|
|
object.style = styles.verificationType;
|
|
value = importDefault(8961) /* metro dependency 8961: VerificationUtils */;
|
|
value = (
|
|
<View {...object} key={a0}>
|
|
<Button
|
|
text={value.getButtonTitle(a0)}
|
|
onPress={onPress_121935}
|
|
grow
|
|
/>
|
|
</View>
|
|
);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
function onPress_121933() { // fn#121933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16062:1325, offset: 0x02554c5e, size: 56 bytes, params: 1, frame: 12
|
|
var environment;
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
value = importDefault(15638) /* metro dependency 15638: CaptchaUtils */;
|
|
value = value.showCaptcha();
|
|
value.then(function(a0) {
|
|
var HTTP = require(dependencyMap[16]).HTTP;
|
|
HTTP.post({url: Endpoints.CAPTCHA, body: {captcha_key: a0}, oldFormErrors: true, rejectWithError: true});
|
|
});
|
|
}
|
|
|
|
function onPress_121935() { // fn#121935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16062:1568, offset: 0x02554cea, size: 189 bytes, params: 1, frame: 14
|
|
var r2;
|
|
var value6;
|
|
var currentUser;
|
|
const ADD_PHONE = VerificationModalScenes.ADD_PHONE;
|
|
const binding = env0_0;
|
|
const EMAIL_OR_PHONE = VerificationTypes.EMAIL_OR_PHONE;
|
|
if (binding !== EMAIL_OR_PHONE && env0_0 !== VerificationTypes.EMAIL && env0_0 !== VerificationTypes.REVERIFY_EMAIL) {
|
|
r2 = ADD_PHONE;
|
|
} else {
|
|
value6 = undefined;
|
|
(require(7620) /* metro dependency 7620: UserSettingsAccountActionCreators */).accountDetailsInit();
|
|
currentUser = UserStore.getCurrentUser();
|
|
r2 = (currentUser == null ? value6 : currentUser.email) != null ? VerificationModalScenes.RESEND_EMAIL : VerificationModalScenes.ENTER_EMAIL;
|
|
}
|
|
env2_2.push(r2);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun121928, 15854, [31, 27, 1373, 1878, 661, 33, 4501, 697, 1948, 566, 8961, 1484, 4571, 4578, 1244,
|
|
15638, 507, 7620, 4573, 6766, 13935,
|
|
2]) /* metro module 15854, dependencies: [31, 27, 1373, 1878, 661, 33, 4501, 697, 1948, 566, 8961, 1484, 4571, 4578, 1244, 15638, 507, 7620, 4573, 6766, 13935, 2] */;
|