/* Metro module 9292; source: modules/rtc/native/SecureFramesUserVerificationBottomSheet.tsx; dependencies: [57, 31, 27, 4294, 1878, 9277, 661, 33, 4501, 697, 9281, 9293, 9256, 9283, 566, 9285, 8061, 4617, 9275, 9284, 9294, 9296, 4080, 3857, 4073, 1244, 6275, 6758, 6806, 4573, 9286, 4572, 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 UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import RTCConnectionStore from '../../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import NicknameUtils from '../../../utils/NicknameUtils.tsx'; /* Metro dependency 4617 */
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 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 BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetCloseButtonNativeModule from '../../../design/components/Sheet/native/ActionSheetCloseButton.native.tsx'; /* Metro dependency 6806 */
import * as UserActionCreatorsModule from '../../../actions/UserActionCreators.tsx'; /* Metro dependency 8061 */
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 UseIsPersistentSecureFramesFingerprintModule from '../hooks/useIsPersistentSecureFramesFingerprint.tsx'; /* Metro dependency 9283 */
import * as UseIsSecureFramesKeyInconsistentModule from '../hooks/useIsSecureFramesKeyInconsistent.tsx'; /* Metro dependency 9285 */
import * as UseIsSecureFramesUIEnabledModule from '../hooks/useIsSecureFramesUIEnabled.tsx'; /* Metro dependency 9293 */
import * as CheckmarkLargeBoldIconModule from '../../../design/components/Icon/native/redesign/generated/CheckmarkLargeBoldIcon.tsx'; /* Metro dependency 9294 */
import * as XLargeBoldIconModule from '../../../design/components/Icon/native/redesign/generated/XLargeBoldIcon.tsx'; /* Metro dependency 9296 */
function _fun72666(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9478:6, offset: 0x01d4d954, size: 453 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.AnalyticsSecureFramesUserVerification;
const env0_10 = value.SECURE_FRAMES_PUBLIC_KEY_VERSION;
const env0_11 = value.USER_VERIFIED_TOAST_KEY;
value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsx;
const env0_14 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_MOD_STRONG = (Native).colors.BACKGROUND_MOD_STRONG;
const env0_15 = Reflect.apply(createStyles, value, [{iconContainer: {'height': 80, 'width': 80, 'borderRadius': 40,
'alignItems': 'center', 'justifyContent': 'center', 'backgroundColor': null, 'marginBottom': 16,
backgroundColor: BACKGROUND_MOD_STRONG}, icon: {'height': 48, 'width': 48}, content: {'padding': 16,
'justifyContent': 'center', 'alignItems': 'center'}, subtitle: {'textAlign': 'center', 'marginTop': 8,
'marginBottom': 40}, buttons: {marginTop: 40}, helpMessage: {marginTop: 16}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/rtc/native/SecureFramesUserVerificationBottomSheet.tsx');
exports.default = SecureFramesUserVerificationBottomSheet;
function SecureFramesUserVerificationBottomSheet({userId, channelId, guildId, fingerprint}) { // fn#72667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9478:745, offset: 0x01d4db19, size: 1325 bytes, params: 2, frame: 35
const styles = useStyles();
const styles2 = styles;
const value2 = (UseSecureFramesPairwiseFingerprintModule).useSecureFramesPairwiseFingerprint({userId: userId});
const userKey = value2.userKey;
const userKey2 = userKey;
const fingerprint2 = value2.fingerprint;
const loading = value2.loading;
const value3 = (UseIsSecureFramesUIEnabledModule).useIsSecureFramesUIEnabled({channelId: channelId});
const value4 = (UseIsSecureFramesVerifiedModule).useIsUserSecureFramesVerified({userId: userId,
channelId: channelId});
const value5 = (UseIsPersistentSecureFramesFingerprintModule).useIsPersistentSecureFramesFingerprint({userId: userId});
const isOtherUserKeyPersistent = value5.isOtherUserKeyPersistent;
const loading2 = value5.loading;
const useStateFromStores = FluxModule.useStateFromStores;
const rtcConnectionStoreBinding = RTCConnectionStore;
const value6 = Reflect.apply(useStateFromStores, FluxModule, [[rtcConnectionStoreBinding], function() {
return RTCConnectionStore.isConnected();
}]);
const value7 = FluxModule.useStateFromStores([rtcConnectionStoreBinding], function() {
return RTCConnectionStore.isUserConnected(userId);
});
const value8 = (UseIsSecureFramesKeyInconsistentModule).useIsSecureFramesKeyInconsistent({userId: userId});
const binding = userKey2;
let useMemo = binding.useMemo;
const value9 = Reflect.apply(useMemo, binding, [_fun72670, [fingerprint, channelId, fingerprint2, value6, value8,
value7, value3, value4]]);
binding.useEffect(_fun72671, [userId]);
const user = FluxModule.useStateFromStores([UserStore], function() {
return UserStore.getUser(userId);
});
const value10 = (NicknameUtils).useName(guildId, channelId, user);
useMemo = binding.useMemo;
const value12 = styles2(Reflect.apply(useMemo, binding, [_fun72673, [value9, value10]]), 2);
const property = value12[0];
const property2 = value12[1];
binding.useEffect(_fun72674, [channelId, value9, userId]);
const value13 = binding.useMemo(_fun72675, [value9, styles.icon]);
const value14 = binding.useCallback(_fun72676, []);
const value15 = binding.useCallback(_fun72677, [channelId, userKey, isOtherUserKeyPersistent, value10, userId]);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
object = {startExpanded: true};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const ActionSheetCloseButton = (ActionSheetCloseButtonNativeModule).ActionSheetCloseButton;
object.header = } />;
const items2 = [
{
loading2 || loading
? (
)
: (
fingerprint2 != null
? value13
: (
)
)
}
,
];
const Text = (TextModule).Text;
items2[1] = (
{property}
);
items2[2] = (
{property2}
);
items2[3] = ((Component) => )(importDefault(9286) /* metro dependency 9286: SecureFramesExistingVerificationsHelpMessage */);
const Stack = (StackNativeModule).Stack;
const Button = (ButtonNativeModule).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[4] = (
);
return (
{items2}
);
function _fun72670() { // fn#72670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9478:1359, offset: 0x01d4e074, size: 177 bytes, params: 1, frame: 5
return channelId == null ? AnalyticsSecureFramesUserVerification.CURRENT_USER_DISCONNECTED : env0_9 ? env0_10 ? env0_6 ? env0_7 ? AnalyticsSecureFramesUserVerification.OTHER_USER_ALREADY_VERIFIED : env0_11 ? AnalyticsSecureFramesUserVerification.OTHER_USER_INCONSISTENT_KEYS : fingerprint !== fingerprint ? AnalyticsSecureFramesUserVerification.FINGERPRINT_MISMATCH : AnalyticsSecureFramesUserVerification.MATCH : AnalyticsSecureFramesUserVerification.UNABLE_TO_VERIFY : AnalyticsSecureFramesUserVerification.OTHER_USER_DISCONNECTED : AnalyticsSecureFramesUserVerification.CURRENT_USER_DISCONNECTED;
}
function _fun72671() { // fn#72671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9478:1586, offset: 0x01d4e125, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(UserActionCreatorsModule).getUser(userId);
}
function _fun72673() { // fn#72673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9478:1715, offset: 0x01d4e152, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (SecureFramesUtilsModule).getUserVerifyStateText(ConstantsModule.AnalyticsLocations, env0_13);
}
function _fun72674() { // fn#72674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9478:1800, offset: 0x01d4e184, size: 113 bytes, params: 1, frame: 15
const OTHER_USER_ALREADY_VERIFIED = AnalyticsSecureFramesUserVerification.OTHER_USER_ALREADY_VERIFIED;
if (OTHER_USER_ALREADY_VERIFIED !== ConstantsModule.AnalyticsLocations) {
var MATCH = AnalyticsSecureFramesUserVerification.MATCH;
if (MATCH === ConstantsModule.AnalyticsLocations) {
return undefined;
}
(require(9284) /* metro dependency 9284: SecureFramesTracking */).trackE2EEUserVerificationFailed({channelId: channelId,
userId: userId, reason: ConstantsModule.AnalyticsLocations, keyVersion: SECURE_FRAMES_PUBLIC_KEY_VERSION});
}
}
function _fun72675() { // fn#72675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9478:1994, offset: 0x01d4e1f5, size: 210 bytes, params: 1, frame: 18
const CheckmarkLargeBoldIcon = (CheckmarkLargeBoldIconModule).CheckmarkLargeBoldIcon;
const OTHER_USER_ALREADY_VERIFIED = AnalyticsSecureFramesUserVerification.OTHER_USER_ALREADY_VERIFIED;
if (OTHER_USER_ALREADY_VERIFIED === ConstantsModule.AnalyticsLocations) {
return (
);
}
const MATCH = AnalyticsSecureFramesUserVerification.MATCH;
if (MATCH === ConstantsModule.AnalyticsLocations) {
return (
);
}
const XLargeBoldIcon = (XLargeBoldIconModule).XLargeBoldIcon;
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
return ;
}
function _fun72676() { // fn#72676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9478:2291, offset: 0x01d4e2c7, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
function _fun72677() { // fn#72677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9478:2346, offset: 0x01d4e2ec, size: 253 bytes, params: 1, frame: 24
var value4;
var moduleValue;
var defaultImport2;
var open;
var object;
var intl;
if (channelId != null && userKey != null) {
value4 = environment.__proto__;
moduleValue = require(9275) /* metro dependency 9275: SecureFramesUtils */;
moduleValue.addVerification(userId, userKey, isOtherUserKeyPersistent, channelId, AnalyticsLocations.DEEP_LINK);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
defaultImport2 = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
open = defaultImport2.open;
object = {};
object.key = USER_VERIFIED_TOAST_KEY;
object.iconColor = 'text-feedback-positive';
object.IconComponent = (require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.content = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Gwu134,
{username: env0_13});
Reflect.apply(open, defaultImport2, [object]);
}
}
}
}
global.__d(_fun72666, 9292, [57, 31, 27, 4294, 1878, 9277, 661, 33, 4501, 697, 9281, 9293, 9256, 9283, 566, 9285,
8061, 4617, 9275, 9284, 9294, 9296, 4080, 3857, 4073, 1244, 6275, 6758, 6806, 4573, 9286, 4572, 4578,
2]) /* metro module 9292, dependencies: [57, 31, 27, 4294, 1878, 9277, 661, 33, 4501, 697, 9281, 9293, 9256, 9283, 566, 9285, 8061, 4617, 9275, 9284, 9294, 9296, 4080, 3857, 4073, 1244, 6275, 6758, 6806, 4573, 9286, 4572, 4578, 2] */;