/* Metro module 9280; source: modules/rtc/native/SecureFramesUserVerificationModal.tsx; dependencies: [57, 31, 27, 1379, 1878, 9277, 661, 1309, 33, 4501, 697, 566, 4617, 9281, 9282, 9256, 9283, 9275, 5080, 3857, 4073, 1244, 4248, 9284, 9212, 6771, 8743, 9285, 1305, 6618, 5278, 5284, 4573, 4572, 9286, 9288, 4578, 2] */ import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */ import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */ import NicknameUtils from '../../../utils/NicknameUtils.tsx'; /* Metro dependency 4617 */ import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */ import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */ import ShowUserProfileActionSheet from '../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */ 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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */ import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */ import * as FormConstantsModule from '../../../design/void/Form/native/FormConstants.tsx'; /* Metro dependency 1309 */ import * as SecureFramesDeeplinkExperimentModule from '../SecureFramesDeeplinkExperiment.tsx'; /* Metro dependency 4248 */ 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 ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */ import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */ import * as ArrowLargeLeftIconModule from '../../../design/components/Icon/native/redesign/generated/ArrowLargeLeftIcon.tsx'; /* Metro dependency 5284 */ import * as SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */ import * as UseIsSecureFramesVerifiedModule from '../hooks/useIsSecureFramesVerified.tsx'; /* Metro dependency 9256 */ import * as SecureFramesUtilsModule from '../SecureFramesUtils.tsx'; /* Metro dependency 9275 */ import * as UseSecureFramesPairwiseFingerprintModule from '../hooks/useSecureFramesPairwiseFingerprint.tsx'; /* Metro dependency 9281 */ import * as UseReadableSecureFramesFingerprintModule from '../hooks/useReadableSecureFramesFingerprint.tsx'; /* Metro dependency 9282 */ import * as UseIsPersistentSecureFramesFingerprintModule from '../hooks/useIsPersistentSecureFramesFingerprint.tsx'; /* Metro dependency 9283 */ import * as SecureFramesTrackingModule from '../SecureFramesTracking.tsx'; /* Metro dependency 9284 */ import * as UseIsSecureFramesKeyInconsistentModule from '../hooks/useIsSecureFramesKeyInconsistent.tsx'; /* Metro dependency 9285 */ function _fun72582(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9466:6, offset: 0x01d4a679, size: 499 bytes, params: 8, frame: 22 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactNativeModule; const env0_5 = value.ActivityIndicator; const env0_6 = value.View; value = require(9277) /* metro dependency 9277: SecureFramesConstants */; const env0_9 = value.USER_VERIFICATION_CHUNK_SIZE; const env0_10 = value.USER_VERIFICATION_LENGTH; const env0_11 = value.USER_VERIFICATION_NUM_COLUMNS; const env0_12 = value.USER_VERIFIED_TOAST_KEY; value = require(661) /* metro dependency 661: Constants */; const env0_13 = value.AnalyticsLocations; const env0_14 = value.AnalyticsSections; value = require(33) /* metro dependency 33 */; const env0_16 = value.jsx; const env0_17 = value.jsxs; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW; const env0_18 = Reflect.apply(createStyles, value, [{container: {'flex': 1, 'padding': 16, 'flexDirection': 'column', backgroundColor: BACKGROUND_BASE_LOW}, footer: {'flex': 1, 'gap': 16, 'justifyContent': 'flex-end'}, footerText: {textAlign: 'center'}, header: {'height': 56, 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'}, subtitle: {textAlign: 'center'}, code: {marginTop: 24}, helpMessage: {marginBottom: 16}}]); (FileImportTrackerModule).fileFinishedImporting('modules/rtc/native/SecureFramesUserVerificationModal.tsx'); exports.default = SecureFramesUserVerificationModal; function SecureFramesUserVerificationModal({userId, channelId}) { // fn#72583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9466:912, offset: 0x01d4a86c, size: 1954 bytes, params: 2, frame: 44 var object4; var object; var RDE0Sc; const Text = (TextModule).Text; const styles = useStyles(); const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() { return UserStore.getUser(userId); }); const value3 = (NicknameUtils).useName((require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun72585), null, user); const value4 = (UseSecureFramesPairwiseFingerprintModule).useSecureFramesPairwiseFingerprint({userId: userId}); const fingerprint = value4.fingerprint; const fingerprint2 = fingerprint; const userKey = value4.userKey; const userKey2 = userKey; const value5 = (UseReadableSecureFramesFingerprintModule).useReadableSecureFramesFingerprint({fingerprintBase64: fingerprint, chunkSize: USER_VERIFICATION_CHUNK_SIZE, desiredLength: USER_VERIFICATION_LENGTH}); const value6 = (UseIsSecureFramesVerifiedModule).useIsUserSecureFramesVerified({userId: userId, channelId: channelId}); const {isCurrentUserKeyPersistent, isOtherUserKeyPersistent, loading} = (UseIsPersistentSecureFramesFingerprintModule).useIsPersistentSecureFramesFingerprint({userId: userId}); const binding = userKey2; const value8 = binding.useCallback(_fun72586, [channelId, userKey, isOtherUserKeyPersistent, value3, userId]); const value9 = binding.useCallback(_fun72587, [userKey, isOtherUserKeyPersistent, userId]); const useSecureFramesDeeplinkExperiment = SecureFramesDeeplinkExperimentModule.useSecureFramesDeeplinkExperiment; const value10 = binding.useCallback(_fun72588, [channelId, value5, fingerprint, Reflect.apply(useSecureFramesDeeplinkExperiment, SecureFramesDeeplinkExperimentModule, [{location: 'SecureFramesUserVerificationModal'}]).enabled, userId]); const value11 = binding.useCallback(_fun72589, [(UseAnalyticsLocations)().analyticsLocations, channelId, userId]); const useAlertIfSecureFramesKeyInconsistent = UseIsSecureFramesKeyInconsistentModule.useAlertIfSecureFramesKeyInconsistent; object4 = {channelId: channelId, userId: userId, nickname: value3}; object4.onAlertOpen = (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop; Reflect.apply(useAlertIfSecureFramesKeyInconsistent, UseIsSecureFramesKeyInconsistentModule, [object4]); const useMemo = binding.useMemo; const value13 = fingerprint2(Reflect.apply(useMemo, binding, [_fun72590, [value6]]), 2); const property = value13[0]; const property2 = value13[1]; const value14 = binding.useMemo(_fun72591, [isCurrentUserKeyPersistent, isOtherUserKeyPersistent, value3]); binding.useEffect(_fun72592, [channelId, userId]); const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView; const PressableOpacity = (PressablesModule).PressableOpacity; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; let string = intl.string; const t = (require(1244) /* metro dependency 1244: indexNative */).t; const cpT0Cq = t.cpT0Cq; const ArrowLargeLeftIcon = (ArrowLargeLeftIconModule).ArrowLargeLeftIcon; const pressableOpacity = ( ); let r7 = fingerprint != null && value5 != null; if (r7) { object = {accessibilityRole: 'button'}; string = intl.string; RDE0Sc = t.RDE0Sc; object.accessibilityLabel = Reflect.apply(string, intl, [RDE0Sc]); object.androidRippleConfig = ANDROID_FOREGROUND_RIPPLE; object.hitSlop = 8; object.onPress = value10; string = intl.string; RDE0Sc = t.RDE0Sc; r7 = ( {Reflect.apply(string, intl, [RDE0Sc])} ); } const items2 = [ {pressableOpacity} {r7} , ]; const Stack = (StackNativeModule).Stack; items2[1] = ( {intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/WPGnF'])} {intl.format((require(1244) /* metro dependency 1244: indexNative */).t.oc2kce, {username: value3})} ); items2[2] = ( {((Component) => )(importDefault(9286) /* metro dependency 9286: SecureFramesExistingVerificationsHelpMessage */)} {((Component) => : ((TextBadge) => )((require(1305) /* metro dependency 1305: native */).TextBadge)} />)(importDefault(9288) /* metro dependency 9288: SecureFramesCode */)} ); const text = ( {value14} ); const Button = (ButtonNativeModule).Button; const r16 = value5 == null || loading; const r14 = value6 ? value9 : value8; string = intl.string; items2[3] = ( {text}