Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,97 @@
/* Metro module 5085; source: modules/webauthn/SignalHelpers.native.tsx; dependencies: [5, 6, 7, 27, 3, 5086, 2] */
function _fun44152(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5263:6, offset: 0x01169454, size: 234 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = (require(27) /* metro dependency 27 */).NativeModules;
let value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('SignalHelpers.native');
const GLOBAL_ENV = global.window.GLOBAL_ENV;
const env0_7 = GLOBAL_ENV.WEBAUTHN_ORIGIN;
value = _fun44153();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/SignalHelpers.native.tsx');
exports.default = value;
}
function _fun44153() { // fn#44153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5263:227, offset: 0x0116953e, size: 150 bytes, params: 1, frame: 18
const binding = env0_4;
const closure = SignalHelpers;
const binding2 = env0_2;
var env0_2 = binding2(_fun44156);
const items2 = [{key: 'signalAllAcceptedCredentials', value: value_44159}];
const env0_1 = binding2(_fun44161);
items2[1] = {key: 'signalCurrentUserDetails', value: value_44162};
const env0_0 = binding2(_fun44164);
items2[2] = {key: 'signalUnknownCredential', value: value_44165};
return binding(closure, null, items2);
}
function* _fun44156(a0, a1) { // fn#44156, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5263:351, offset: 0x011695f8, size: 213 bytes, params: 3, frame: 21
var environment;
if (true) {
value = environment.__proto__.__proto__;
var DCDSecurityKeyManager = env2_5.DCDSecurityKeyManager;
if (DCDSecurityKeyManager.signalAllAcceptedCredentials === undefined) {
return undefined;
}
var binding = env2_0;
var value4 = binding(env2_1[5]).encodeUserIdForWebAuthn(a1);
var value6 = a0.map(function(a0) {
return a0.cred_id;
}).filter(function(a0) {
return a0;
});
binding = env2_6;
var info = binding.info;
var binding2 = env2_7;
Reflect.apply(info, binding, ['signalAllAcceptedCredentials', {rpId: binding2, encodedId: value4,
allAcceptedCredentialIds: value6, credentials: a0}]);
DCDSecurityKeyManager = env2_5.DCDSecurityKeyManager;
yield DCDSecurityKeyManager.signalAllAcceptedCredentials(binding2, value4, value6).catch(binding.warn);
}
}
function* _fun44161(a0) { // fn#44161, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5263:815, offset: 0x011696e1, size: 225 bytes, params: 2, frame: 22
var username;
if (true) {
value = environment.__proto__.__proto__;
var DCDSecurityKeyManager = env2_5.DCDSecurityKeyManager;
if (DCDSecurityKeyManager.signalCurrentUserDetails === undefined) {
return undefined;
}
var binding = env2_0;
var value3 = binding(env2_1[5]);
var value4 = value3.encodeUserIdForWebAuthn(a0.id);
var r7 = a0.email ?? a0.global_name;
r7 = r7 ?? a0.username;
username = a0.username;
binding = env2_6;
var info = binding.info;
var binding2 = env2_7;
Reflect.apply(info, binding, ['signalCurrentUserDetails', {rpId: binding2, encodedId: value4, name: r7,
displayName: username}]);
DCDSecurityKeyManager = env2_5.DCDSecurityKeyManager;
yield DCDSecurityKeyManager.signalCurrentUserDetails(binding2, value4, r7, username).catch(binding.warn);
}
}
function* _fun44164(a0) { // fn#44164, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5263:1286, offset: 0x011697cb, size: 179 bytes, params: 2, frame: 18
if (true) {
value = environment.__proto__.__proto__;
var DCDSecurityKeyManager = env2_5.DCDSecurityKeyManager;
if (DCDSecurityKeyManager.signalUnknownCredential === undefined) {
return undefined;
}
var r6 = typeof a0 === 'string' ? global.JSON.parse(a0).id : a0.cred_id;
var binding = env2_6;
var info = binding.info;
var binding2 = env2_7;
Reflect.apply(info, binding, ['signalUnknownCredential', {rpId: binding2, credentialId: r6}]);
DCDSecurityKeyManager = env2_5.DCDSecurityKeyManager;
yield DCDSecurityKeyManager.signalUnknownCredential(binding2, r6).catch(binding.warn);
}
}
@@ -0,0 +1,247 @@
/* Metro module 5084; source: modules/webauthn/WebAuthnActionCreators.tsx; dependencies: [5, 661, 507, 694, 5046, 648, 2] */
function _fun44121(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5262:6, offset: 0x01168c5c, size: 286 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/WebAuthnActionCreators.tsx');
exports.fetchWebAuthnConditionalChallenge = function() {
return _fetchWebAuthnConditionalChallenge.apply(this, arguments);
};
exports.fetchWebAuthnPasswordlessChallenge = function() {
return _fetchWebAuthnPasswordlessChallenge.apply(this, arguments);
};
exports.fetchWebAuthnCredentials = fetchWebAuthnCredentials;
exports.deleteWebAuthnCredential = function() {
return _deleteWebAuthnCredential.apply(this, arguments);
};
exports.editWebAuthnCredential = function() {
return _editWebAuthnCredential.apply(this, arguments);
};
exports.startRegisterWebAuthnCredential = function() {
return _startRegisterWebAuthnCredential.apply(this, arguments);
};
exports.finishRegisterWebAuthnCredential = function() {
return _finishRegisterWebAuthnCredential.apply(this, arguments);
};
exports.triggerWebAuthnRegister = triggerWebAuthnRegister;
exports.clearWebAuthnRegisterTrigger = clearWebAuthnRegisterTrigger;
}
function _fetchWebAuthnConditionalChallenge() { // fn#44122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5262:126, offset: 0x01168d7a, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun44124).apply(this, arguments);
}
function _fetchWebAuthnPasswordlessChallenge() { // fn#44125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5262:427, offset: 0x01168e3c, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun44127).apply(this, arguments);
}
function _deleteWebAuthnCredential() { // fn#44128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5262:701, offset: 0x01168eeb, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun44130).apply(this, arguments);
}
function _editWebAuthnCredential() { // fn#44132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5262:976, offset: 0x01168fda, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun44134).apply(this, arguments);
}
function _startRegisterWebAuthnCredential() { // fn#44135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5262:1346, offset: 0x0116910f, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun44137).apply(this, arguments);
}
function _finishRegisterWebAuthnCredential() { // fn#44138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5262:1615, offset: 0x011691c4, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun44140).apply(this, arguments);
}
function fetchWebAuthnCredentials() { // fn#44143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5262:2469, offset: 0x011692fc, size: 81 bytes, params: 1, frame: 13
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const MFA_WEBAUTHN_CREDENTIALS = Endpoints.MFA_WEBAUTHN_CREDENTIALS;
Reflect.apply(get, HTTP, [{url: MFA_WEBAUTHN_CREDENTIALS, rejectWithError: true}]).then(_fun44144);
}
function triggerWebAuthnRegister() { // fn#44150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5262:3322, offset: 0x011693f2, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'WEBAUTHN_TRIGGER_REGISTER'});
}
function clearWebAuthnRegisterTrigger() { // fn#44151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5262:3442, offset: 0x01169423, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'WEBAUTHN_CLEAR_REGISTER_TRIGGER'});
}
function* _fun44124() { // fn#44124, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5262:217, offset: 0x01168db3, size: 137 bytes, params: 1, frame: 14
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[2]).HTTP;
const post = HTTP.post;
const WEBAUTHN_CONDITIONAL_UI_CHALLENGE = env2_4.WEBAUTHN_CONDITIONAL_UI_CHALLENGE;
yield Reflect.apply(post, HTTP, [{url: WEBAUTHN_CONDITIONAL_UI_CHALLENGE, headers: {authorization: ''},
rejectWithError: true}]);
value = undefined;
if (false) {
return value;
}
const body = value.body;
return {challenge: body.challenge, ticket: body.ticket};
}
function* _fun44127() { // fn#44127, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5262:520, offset: 0x01168e75, size: 118 bytes, params: 1, frame: 13
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[2]).HTTP;
const post = HTTP.post;
const WEBAUTHN_PASSWORDLESS_CHALLENGE = env2_4.WEBAUTHN_PASSWORDLESS_CHALLENGE;
yield Reflect.apply(post, HTTP, [{url: WEBAUTHN_PASSWORDLESS_CHALLENGE, rejectWithError: true}]);
value = undefined;
if (false) {
return value;
}
const body = value.body;
return {challenge: body.challenge, ticket: body.ticket};
}
function* _fun44130(a0) { // fn#44130, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5262:774, offset: 0x01168f24, size: 123 bytes, params: 2, frame: 16
var environment;
if (true) {
var env0_0 = a0;
value = environment.__proto__.__proto__;
var binding = env2_0;
var HTTP = binding(env2_2[2]).HTTP;
var del = HTTP.del;
binding = env2_4;
var MFA_WEBAUTHN_CREDENTIAL = binding.MFA_WEBAUTHN_CREDENTIAL;
value = Reflect.apply(del, HTTP, [{url: Reflect.apply(MFA_WEBAUTHN_CREDENTIAL, binding, [a0.id]),
rejectWithError: true}]);
yield value.then(_fun44131);
}
}
function* _fun44134(a0, a1) { // fn#44134, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5262:1045, offset: 0x01169013, size: 252 bytes, params: 3, frame: 18
var r5;
var r8;
var last_used;
var Date;
var date;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var HTTP = binding(env2_2[2]).HTTP;
var patch = HTTP.patch;
var object2 = {};
object2.url = env2_4.MFA_WEBAUTHN_CREDENTIAL(a0);
object2.body = {name: a1};
object2.rejectWithError = false;
yield Reflect.apply(patch, HTTP, [object2]);
var value3 = undefined;
if (false) {
return value3;
}
var body = value3.body;
var value5 = null;
if (value5 != body) {
body = value3.body;
last_used = body.last_used;
if (value5 == last_used) {
r5 = value5;
r8 = binding;
} else {
Date = global.Date;
last_used = body.last_used;
date = new Date();
r8 = Date;
}
object2 = {};
copyDataProperties(object2, body, r8);
object2['last_used'] = r5;
binding = env2_1;
value = binding(env2_2[3]);
value.dispatch({type: 'AUTHENTICATOR_UPDATE', credential: object2});
}
}
}
function* _fun44137() { // fn#44137, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5262:1433, offset: 0x01169148, size: 124 bytes, params: 1, frame: 13
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[2]).HTTP;
const post = HTTP.post;
const MFA_WEBAUTHN_CREDENTIALS = env2_4.MFA_WEBAUTHN_CREDENTIALS;
yield Reflect.apply(post, HTTP, [{url: MFA_WEBAUTHN_CREDENTIALS, body: {}, rejectWithError: false}]);
value = undefined;
if (false) {
return value;
}
const body = value.body;
return {ticket: body.ticket, challenge: body.challenge};
}
function* _fun44140(a0, a1, a2) { // fn#44140, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5262:1704, offset: 0x011691fd, size: 255 bytes, params: 4, frame: 18
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_1;
var binding2 = env2_2;
var value3 = binding(binding2[4]);
var post = value3.post;
var object2 = {};
var MFA_WEBAUTHN_CREDENTIALS = env2_4.MFA_WEBAUTHN_CREDENTIALS;
object2.url = MFA_WEBAUTHN_CREDENTIALS;
object2.body = {name: a0, ticket: a1, credential: a2};
var NetworkActionNames = env2_0(binding2[5]).NetworkActionNames;
var WEBAUTHN_REGISTER = NetworkActionNames.WEBAUTHN_REGISTER;
object2.trackedActionData = {event: WEBAUTHN_REGISTER};
object2.rejectWithError = true;
yield Reflect.apply(post, value3, [object2]);
var value4 = undefined;
if (false) {
return value4;
}
binding = env2_1;
var binding3 = env2_2;
value = binding(binding3[3]);
value.dispatch({type: 'AUTHENTICATOR_CREATE', credential: value4.body});
value = binding(binding3[3]);
value.dispatch({type: 'MFA_ENABLE_SUCCESS', codes: value4.body.backup_codes});
}
}
function _fun44144(a0) { // fn#44144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5262:2581, offset: 0x0116934d, size: 90 bytes, params: 2, frame: 13
var environment;
var value;
var value2;
var defaultImport;
if (a0.body != null) {
value = a0.body.map(function(a0) {
var r4;
var r2;
var Date;
var last_used;
var value = null;
if (value == a0.last_used) {
r2 = value;
} else {
Date = global.Date;
last_used = a0.last_used;
r2 = new Date();
r4 = Date;
}
var object = {};
copyDataProperties(object, a0, r4);
object['last_used'] = r2;
return object;
});
value2 = environment.__proto__;
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
defaultImport.dispatch({type: 'MFA_WEBAUTHN_CREDENTIALS_LOADED', credentials: value});
}
}
function _fun44131() { // fn#44131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5262:881, offset: 0x01168f9f, size: 59 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
env3_1(env3_2[3]).dispatch({type: 'AUTHENTICATOR_DELETE', credential: env0_0});
}
@@ -0,0 +1,9 @@
/* Metro module 13244; source: modules/webauthn/WebAuthnConstants.tsx; dependencies: [2] */
function _fun101023(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13434:6, offset: 0x022050e2, size: 140 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/WebAuthnConstants.tsx');
exports.WebAuthnScreens = {MODAL_UPSELL: 'MODAL_UPSELL', INIT: 'INIT', EDIT: 'EDIT', REGISTER: 'REGISTER',
NAME: 'NAME', SUCCESS: 'SUCCESS'};
}
@@ -0,0 +1,124 @@
/* Metro module 16162; source: modules/webauthn/WebAuthnSignalManager.tsx; dependencies: [5, 6, 7, 15, 17, 18, 1226, 5085, 4860, 2] */
function _fun124919(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16370:6, offset: 0x025c74c7, size: 258 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun124923(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/WebAuthnSignalManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_124920() { // fn#124920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16370:168, offset: 0x025c75c9, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_124920_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun124923(a0) { // fn#124923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16370:367, offset: 0x025c762b, size: 178 bytes, params: 2, frame: 17
const closure = WebAuthnSignalManager;
env0_7(closure, a0);
const binding = env0_4;
const binding2 = env0_2;
var env0_2 = binding2(_fun124926);
const items2 = [{key: 'handleAuthenticatorDelete', value: value_124927}];
const env0_1 = binding2(_fun124929);
items2[1] = {key: 'handleWebAuthnCredentialsLoaded', value: value_124930};
const env0_0 = binding2(_fun124932);
items2[2] = {key: 'handleCurrentUserUpdate', value: value_124933};
return binding(closure, items2);
}
function WebAuthnSignalManager(a0) { // fn#124924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16370:379, offset: 0x025c76dd, size: 171 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, WebAuthnSignalManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(WebAuthnSignalManager);
binding = env1_5;
if (_isNativeReflectConstruct_124920()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.actions = {AUTHENTICATOR_DELETE: value.handleAuthenticatorDelete,
MFA_WEBAUTHN_CREDENTIALS_LOADED: value.handleWebAuthnCredentialsLoaded,
CURRENT_USER_UPDATE: value.handleCurrentUserUpdate};
return value;
}
async function _fun124926({credential}) { // fn#124926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16370:907, offset: 0x025c779c, size: 84 bytes, params: 2, frame: 15
if (true) {
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
value = env2_0(env2_1[7]);
await value.signalUnknownCredential(credential);
}
}
async function _fun124929({credentials}) { // fn#124929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16370:1099, offset: 0x025c7804, size: 99 bytes, params: 2, frame: 17
if (true) {
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
var id = env2_8.getId();
value = env2_0(env2_1[7]);
await value.signalAllAcceptedCredentials(credentials, id);
}
}
async function _fun124932({user}) { // fn#124932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16370:1313, offset: 0x025c787b, size: 83 bytes, params: 2, frame: 15
if (true) {
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
value = env2_0(env2_1[7]);
await value.signalCurrentUserDetails(user);
}
}
+132
View File
@@ -0,0 +1,132 @@
/* Metro module 13243; source: modules/webauthn/WebAuthnStore.tsx; dependencies: [6, 7, 15, 17, 18, 1909, 566, 694, 2] */
function _fun101003(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13433:6, offset: 0x02204c9c, size: 371 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let env0_8 = [];
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let value = _fun101007(Store);
value.displayName = 'WebAuthnStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: function() {
env0_8 = [];
env0_7 = false;
env0_9 = false;
}, MFA_WEBAUTHN_CREDENTIALS_LOADED: MFA_WEBAUTHN_CREDENTIALS_LOADED, AUTHENTICATOR_CREATE: AUTHENTICATOR_CREATE,
AUTHENTICATOR_UPDATE: AUTHENTICATOR_UPDATE, AUTHENTICATOR_DELETE: AUTHENTICATOR_DELETE,
WEBAUTHN_TRIGGER_REGISTER: WEBAUTHN_TRIGGER_REGISTER,
WEBAUTHN_CLEAR_REGISTER_TRIGGER: WEBAUTHN_CLEAR_REGISTER_TRIGGER});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/WebAuthnStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_101004() { // fn#101004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13433:148, offset: 0x02204e0f, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_101004_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun101007(a0) { // fn#101007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13433:366, offset: 0x02204e71, size: 149 bytes, params: 2, frame: 16
const closure = WebAuthnStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'hasFetchedCredentials', value: value_101009}, {key: 'hasCredentials',
get: get_101010}, {key: 'getCredentials', value: value_101011}, {key: 'hasPendingRegisterTrigger',
value: value_101012}]);
}
function MFA_WEBAUTHN_CREDENTIALS_LOADED({credentials}) { // fn#101014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13433:1009, offset: 0x02204f33, size: 45 bytes, params: 2, frame: 4
let r0 = !(env0_8 === credentials) && true;
r0 = !env0_7 || r0;
return r0;
}
function AUTHENTICATOR_CREATE({credential}) { // fn#101015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13433:1140, offset: 0x02204f60, size: 126 bytes, params: 2, frame: 17
const type = credential.type;
const AuthenticatorType = (require(1909) /* metro dependency 1909: Server */).AuthenticatorType;
const WEBAUTHN = AuthenticatorType.WEBAUTHN;
if (type !== WEBAUTHN) {
return false;
}
let binding = env0_8;
if (binding.find(function({id}) {
return id === credential.id;
}) !== undefined) {
return false;
}
binding = env0_8;
const items2 = [];
const value2 = arraySpread(items2, binding, 0, require);
items2[value2] = credential;
value2 + 1;
}
function AUTHENTICATOR_UPDATE({credential}) { // fn#101017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13433:1315, offset: 0x02204fde, size: 92 bytes, params: 2, frame: 14
const type = credential.type;
const AuthenticatorType = (require(1909) /* metro dependency 1909: Server */).AuthenticatorType;
const WEBAUTHN = AuthenticatorType.WEBAUTHN;
if (type !== WEBAUTHN) {
return false;
}
env0_8 = env0_8.map(function(a0) {
var value = a0;
return value.id !== credential.id ? value : credential;
});
}
function AUTHENTICATOR_DELETE({credential}) { // fn#101019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13433:1474, offset: 0x02205058, size: 92 bytes, params: 2, frame: 14
const type = credential.type;
const AuthenticatorType = (require(1909) /* metro dependency 1909: Server */).AuthenticatorType;
const WEBAUTHN = AuthenticatorType.WEBAUTHN;
if (type !== WEBAUTHN) {
return false;
}
env0_8 = env0_8.filter(function({id}) {
return id !== credential.id;
});
}
function WEBAUTHN_TRIGGER_REGISTER() { // fn#101021, offset: 0x022050b4, size: 24 bytes, params: 1, frame: 2
if (env0_9) {
return false;
}
}
function WEBAUTHN_CLEAR_REGISTER_TRIGGER() { // fn#101022, offset: 0x022050cc, size: 22 bytes, params: 1, frame: 3
if (env0_9) {
return undefined;
}
return false;
}
function get_101010() { // fn#101010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13433:720, offset: 0x02204f06, size: 20 bytes, params: 1, frame: 2
return env1_8.length > 0;
}
@@ -0,0 +1,53 @@
/* Metro module 8979; source: modules/webauthn/WebAuthnTypes.tsx; dependencies: [7, 6, 15, 17, 18, 162, 2] */
function _fun69987(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9164:6, offset: 0x01cea933, size: 209 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(7) /* metro dependency 7 */;
const env0_1 = importDefault(6) /* metro dependency 6 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(162) /* metro dependency 162 */;
const Error = global.Error;
value = value(Error);
value = _fun69991(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/WebAuthnTypes.tsx');
exports.IgnorableWebAuthnError = value;
}
function _isNativeReflectConstruct_69988() { // fn#69988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9164:148, offset: 0x01ceaa04, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_69988_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun69991(a0) { // fn#69991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9164:347, offset: 0x01ceaa66, size: 42 bytes, params: 2, frame: 14
const closure = IgnorableWebAuthnError;
env0_4(closure, a0);
return env0_0(closure);
}
@@ -0,0 +1,30 @@
/* Metro module 5086; source: modules/webauthn/WebAuthnUtils.tsx; dependencies: [2] */
function _fun44166(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5264:6, offset: 0x0116987e, size: 85 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/WebAuthnUtils.tsx');
exports.encodeUserIdForWebAuthn = encodeUserIdForWebAuthn;
}
function encodeUserIdForWebAuthn(a0) { // fn#44167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5264:186, offset: 0x011698d3, size: 297 bytes, params: 2, frame: 18
const Uint8Array = global.Uint8Array;
let uint8Array = new Uint8Array(16);
const DataView = global.DataView;
const dataView = new DataView(uint8Array.buffer);
dataView.setUint32(0, 821232635);
dataView.setUint16(4, 35878);
dataView.setUint16(6, 20307);
const setBigUint64 = dataView.setBigUint64;
const BigInt = global.BigInt;
Reflect.apply(setBigUint64, dataView, [8, BigInt(a0)]);
const String = global.String;
const fromCharCode = String.fromCharCode;
const items2 = [];
arraySpread(items2, uint8Array, 0, dataView);
uint8Array = apply(fromCharCode, items2, String, dataView);
uint8Array = global.btoa(uint8Array);
uint8Array = uint8Array.replace(RegExp('\\+', 'g'), '-');
uint8Array = uint8Array.replace(RegExp('\\/', 'g'), '_');
return uint8Array.replace(RegExp('=', 'g'), '');
}
@@ -0,0 +1,352 @@
/* Metro module 8978; source: modules/webauthn/native/NativeCeremonies.tsx; dependencies: [5, 27, 3, 5084, 1244, 477, 8979, 8980, 1581, 2] */
function _fun69969(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9163:6, offset: 0x01cea309, size: 301 bytes, params: 8, frame: 21
var object2;
let env0_0 = require;
const closure = registerSecurityKey;
const mutateAndroidRegisterChallengeForDiscoverable = function(a0) {
var env0_0 = a0;
return _fun69978;
};
const closure2 = registerAndroidCredentialManagerPasskey;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = (require(27) /* metro dependency 27 */).NativeModules;
let value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('WebAuthnUtils');
object2 = {};
Object.defineProperty(object2, 'hasAndroidPasskeySupport', {get: _fun69980, set: undefined, enumerable: true,
configurable: true});
Object.defineProperty(object2, 'shouldDisplayAndroidFidoSelector', {get: _fun69981, set: undefined,
enumerable: true, configurable: true});
object2.getPasskeyAuthenticator = getPasskeyAuthenticator;
object2.registerAndroidCredentialManagerPasskey = closure2;
object2.registerAndroidDevicePasskey = registerAndroidDevicePasskey;
object2.registerPasskey = registerPasskey;
object2.registerSecurityKey = closure;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/native/NativeCeremonies.tsx');
exports.default = object2;
}
function _promptForRegisterCredential() { // fn#69970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9163:164, offset: 0x01cea436, size: 50 bytes, params: 1, frame: 14
return env0_2(_fun69972).apply(this, arguments);
}
function registerSecurityKey({onRegisterSuccess, setError, setRegistering}) { // fn#69973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9163:433, offset: 0x01cea50d, size: 147 bytes, params: 2, frame: 15
let value = a1;
const r4 = value !== undefined ? value : NativeModules.DCDSecurityKeyManager.register;
if (setError !== undefined) {
setError('');
}
setRegistering(true);
value = (function() {
return _promptForRegisterCredential.apply(this, arguments);
})(r4);
value = value.then(onRegisterSuccess);
value = value.catch(function(a0) {
if (setError === undefined) {
throw a0;
}
setError(require(dependencyMap[4]).intl.string(require(dependencyMap[4]).t.xSCvBf));
throw a0;
});
return value.finally(function() {
return setRegistering(false);
});
}
function mutateAndroidRegisterChallengeForDiscoverable(a0) { // fn#69977, offset: 0x01cea627, size: 18 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun69978;
}
function registerAndroidCredentialManagerPasskey(a0) { // fn#69979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9163:980, offset: 0x01cea688, size: 45 bytes, params: 2, frame: 13
const registerSecurityKeyBinding = registerSecurityKey;
const mutateAndroidRegisterChallengeForDiscoverableBinding = mutateAndroidRegisterChallengeForDiscoverable;
const DCDSecurityKeyManager = NativeModules.DCDSecurityKeyManager;
return registerSecurityKeyBinding(a0,
mutateAndroidRegisterChallengeForDiscoverableBinding(DCDSecurityKeyManager.registerPasskey));
}
function _fun69980() { // fn#69980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9163:1156, offset: 0x01cea6b5, size: 71 bytes, params: 1, frame: 13
return (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && NativeModules.DCDSecurityKeyManager?.registerPasskey != null;
}
function _fun69981() { // fn#69981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9163:1289, offset: 0x01cea6fc, size: 73 bytes, params: 1, frame: 13
var r0;
var value;
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
if (isAndroid2) {
value = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
value = !value.isMetaQuest();
r0 = value;
} else {
r0 = isAndroid2;
}
return r0;
}
function getPasskeyAuthenticator() { // fn#69982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9163:1404, offset: 0x01cea745, size: 132 bytes, params: 1, frame: 16
var authenticatePasskey;
const DCDSecurityKeyManager = NativeModules.DCDSecurityKeyManager;
const env0_0 = DCDSecurityKeyManager.authenticate;
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && NativeModules.DCDSecurityKeyManager?.authenticatePasskey != null) {
authenticatePasskey = NativeModules.DCDSecurityKeyManager.authenticatePasskey;
}
return env0_2(_fun69984);
}
function registerAndroidDevicePasskey(a0) { // fn#69985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9163:1968, offset: 0x01cea8c7, size: 45 bytes, params: 2, frame: 13
const registerSecurityKeyBinding = registerSecurityKey;
const mutateAndroidRegisterChallengeForDiscoverableBinding = mutateAndroidRegisterChallengeForDiscoverable;
const DCDSecurityKeyManager = NativeModules.DCDSecurityKeyManager;
return registerSecurityKeyBinding(a0,
mutateAndroidRegisterChallengeForDiscoverableBinding(DCDSecurityKeyManager.register));
}
function registerPasskey(a0) { // fn#69986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9163:2136, offset: 0x01cea8f4, size: 63 bytes, params: 2, frame: 13
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
return platformUtilsModule.isAndroid() ? registerAndroidCredentialManagerPasskey(a0) : registerSecurityKey(a0);
}
async function _fun69972() { // fn#69972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9163:243, offset: 0x01cea47c, size: 145 bytes, params: 1, frame: 16
let value = a0;
if (false) {
return undefined;
}
const r6 = value !== undefined ? value : env2_3.DCDSecurityKeyManager.register;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
value = env2_0(env2_1[3]);
await value.startRegisterWebAuthnCredential();
value = undefined;
if (false) {
return value;
}
const ticket = value.ticket;
const challenge = value.challenge;
const object2 = {ticket: ticket};
await r6(challenge);
value = undefined;
if (false) {
return value;
}
object2.credential = value;
return object2;
}
function _fun69978(a0) { // fn#69978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9163:869, offset: 0x01cea639, size: 79 bytes, params: 2, frame: 12
let JSON = global.JSON;
let value = JSON.parse(a0);
value.publicKey.authenticatorSelection.residentKey = 'required';
const binding = env0_0;
JSON = global.JSON;
value = JSON.stringify(value);
return binding(value);
}
async function _fun69984(a0) { // fn#69984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9163:1635, offset: 0x01cea7dd, size: 234 bytes, params: 2, frame: 18
var items2;
var value6;
var error;
var code;
var binding;
var value7;
var IgnorableWebAuthnError;
var prototype;
var ignorableWebAuthnError;
if (false) {
return undefined;
}
value = copyRestArgs(0, undefined);
await undefined;
if (false) {
return undefined;
}
try {
} catch (error) {
code = error.code;
if (code === 'AbortError') {
value = environment.__proto__.__proto__;
binding = env2_4;
binding.warn(error);
binding = env2_0;
IgnorableWebAuthnError = binding(env2_1[6]).IgnorableWebAuthnError;
prototype = IgnorableWebAuthnError.prototype;
value = Object.create(prototype, {constructor: {value: IgnorableWebAuthnError}});
ignorableWebAuthnError = new IgnorableWebAuthnError();
value = ignorableWebAuthnError instanceof Object ? ignorableWebAuthnError : value;
throw value;
}
if (code === 'NotAllowedError') {
value = environment.__proto__.__proto__;
binding = env2_4;
binding.warn(error);
binding = env2_0;
IgnorableWebAuthnError = binding(env2_1[6]).IgnorableWebAuthnError;
prototype = IgnorableWebAuthnError.prototype;
value = Object.create(prototype, {constructor: {value: IgnorableWebAuthnError}});
ignorableWebAuthnError = new IgnorableWebAuthnError();
value = ignorableWebAuthnError instanceof Object ? ignorableWebAuthnError : value;
throw value;
}
value = environment.__proto__.__proto__;
binding = env2_0;
value7 = binding(env2_1[7]);
value7.captureWebAuthnException(error);
binding = env2_4;
binding.error(error);
throw error;
}
try {
items2 = [];
} catch (error) {
code = error.code;
if (code === 'AbortError') {
value = environment.__proto__.__proto__;
binding = env2_4;
binding.warn(error);
binding = env2_0;
IgnorableWebAuthnError = binding(env2_1[6]).IgnorableWebAuthnError;
prototype = IgnorableWebAuthnError.prototype;
value = Object.create(prototype, {constructor: {value: IgnorableWebAuthnError}});
ignorableWebAuthnError = new IgnorableWebAuthnError();
value = ignorableWebAuthnError instanceof Object ? ignorableWebAuthnError : value;
throw value;
}
if (code === 'NotAllowedError') {
value = environment.__proto__.__proto__;
binding = env2_4;
binding.warn(error);
binding = env2_0;
IgnorableWebAuthnError = binding(env2_1[6]).IgnorableWebAuthnError;
prototype = IgnorableWebAuthnError.prototype;
value = Object.create(prototype, {constructor: {value: IgnorableWebAuthnError}});
ignorableWebAuthnError = new IgnorableWebAuthnError();
value = ignorableWebAuthnError instanceof Object ? ignorableWebAuthnError : value;
throw value;
}
value = environment.__proto__.__proto__;
binding = env2_0;
value7 = binding(env2_1[7]);
value7.captureWebAuthnException(error);
binding = env2_4;
binding.error(error);
throw error;
}
try {
arraySpread(items2, value, 0, undefined);
} catch (error) {
code = error.code;
if (code === 'AbortError') {
value = environment.__proto__.__proto__;
binding = env2_4;
binding.warn(error);
binding = env2_0;
IgnorableWebAuthnError = binding(env2_1[6]).IgnorableWebAuthnError;
prototype = IgnorableWebAuthnError.prototype;
value = Object.create(prototype, {constructor: {value: IgnorableWebAuthnError}});
ignorableWebAuthnError = new IgnorableWebAuthnError();
value = ignorableWebAuthnError instanceof Object ? ignorableWebAuthnError : value;
throw value;
}
if (code === 'NotAllowedError') {
value = environment.__proto__.__proto__;
binding = env2_4;
binding.warn(error);
binding = env2_0;
IgnorableWebAuthnError = binding(env2_1[6]).IgnorableWebAuthnError;
prototype = IgnorableWebAuthnError.prototype;
value = Object.create(prototype, {constructor: {value: IgnorableWebAuthnError}});
ignorableWebAuthnError = new IgnorableWebAuthnError();
value = ignorableWebAuthnError instanceof Object ? ignorableWebAuthnError : value;
throw value;
}
value = environment.__proto__.__proto__;
binding = env2_0;
value7 = binding(env2_1[7]);
value7.captureWebAuthnException(error);
binding = env2_4;
binding.error(error);
throw error;
}
try {
value = apply(require, items2, undefined, undefined);
} catch (error) {
code = error.code;
if (code === 'AbortError') {
value = environment.__proto__.__proto__;
binding = env2_4;
binding.warn(error);
binding = env2_0;
IgnorableWebAuthnError = binding(env2_1[6]).IgnorableWebAuthnError;
prototype = IgnorableWebAuthnError.prototype;
value = Object.create(prototype, {constructor: {value: IgnorableWebAuthnError}});
ignorableWebAuthnError = new IgnorableWebAuthnError();
value = ignorableWebAuthnError instanceof Object ? ignorableWebAuthnError : value;
throw value;
}
if (code === 'NotAllowedError') {
value = environment.__proto__.__proto__;
binding = env2_4;
binding.warn(error);
binding = env2_0;
IgnorableWebAuthnError = binding(env2_1[6]).IgnorableWebAuthnError;
prototype = IgnorableWebAuthnError.prototype;
value = Object.create(prototype, {constructor: {value: IgnorableWebAuthnError}});
ignorableWebAuthnError = new IgnorableWebAuthnError();
value = ignorableWebAuthnError instanceof Object ? ignorableWebAuthnError : value;
throw value;
}
value = environment.__proto__.__proto__;
binding = env2_0;
value7 = binding(env2_1[7]);
value7.captureWebAuthnException(error);
binding = env2_4;
binding.error(error);
throw error;
}
await value;
try {
value = undefined;
value6 = false;
} catch (error) {
code = error.code;
if (code === 'AbortError') {
value = environment.__proto__.__proto__;
binding = env2_4;
binding.warn(error);
binding = env2_0;
IgnorableWebAuthnError = binding(env2_1[6]).IgnorableWebAuthnError;
prototype = IgnorableWebAuthnError.prototype;
value = Object.create(prototype, {constructor: {value: IgnorableWebAuthnError}});
ignorableWebAuthnError = new IgnorableWebAuthnError();
value = ignorableWebAuthnError instanceof Object ? ignorableWebAuthnError : value;
throw value;
}
if (code === 'NotAllowedError') {
value = environment.__proto__.__proto__;
binding = env2_4;
binding.warn(error);
binding = env2_0;
IgnorableWebAuthnError = binding(env2_1[6]).IgnorableWebAuthnError;
prototype = IgnorableWebAuthnError.prototype;
value = Object.create(prototype, {constructor: {value: IgnorableWebAuthnError}});
ignorableWebAuthnError = new IgnorableWebAuthnError();
value = ignorableWebAuthnError instanceof Object ? ignorableWebAuthnError : value;
throw value;
}
value = environment.__proto__.__proto__;
binding = env2_0;
value7 = binding(env2_1[7]);
value7.captureWebAuthnException(error);
binding = env2_4;
binding.error(error);
throw error;
}
return value6 ? value : value;
}
@@ -0,0 +1,60 @@
/* Metro module 13250; source: modules/webauthn/native/PasskeyUpsellActionCreators.tsx; dependencies: [3968, 1365, 1367, 5080, 13251, 1962, 4080, 13252, 13254, 2] */
function _fun101052(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13440:6, offset: 0x022065b7, size: 172 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {openPasskeyUpsell: openPasskeyUpsell, openPasskeyUpsellModal: openPasskeyUpsellModal,
closePasskeyUpsellModal: closePasskeyUpsellModal, openPasskeyUpsellPromoSheet: openPasskeyUpsellPromoSheet,
closePasskeyUpsellPromoSheet: closePasskeyUpsellPromoSheet,
openPasskeyUpsellPromoModal: openPasskeyUpsellPromoModal};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/native/PasskeyUpsellActionCreators.tsx');
exports.default = object2;
}
function openPasskeyUpsell() { // fn#101053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13440:122, offset: 0x02206663, size: 129 bytes, params: 1, frame: 16
var value;
const dismissibleContentUnsafeUtilsModule = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
const UNSAFE_isDismissibleContentDismissed = dismissibleContentUnsafeUtilsModule.UNSAFE_isDismissibleContentDismissed;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const PASSWORDLESS_UPSELL = DismissibleContent.PASSWORDLESS_UPSELL;
if (!Reflect.apply(UNSAFE_isDismissibleContentDismissed, dismissibleContentUnsafeUtilsModule,
[PASSWORDLESS_UPSELL])) {
value = require(1367) /* metro dependency 1367: DismissibleContentUtils */;
value.requestMarkDismissibleContentAsShown(DismissibleContent.PASSWORDLESS_UPSELL);
this.openPasskeyUpsellPromoSheet();
}
}
function openPasskeyUpsellModal() { // fn#101054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13440:367, offset: 0x022066e4, size: 80 bytes, params: 1, frame: 16
const defaultImport = importDefault(dependencyMap[3]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[5]);
value = value(dependencyMap[4], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, undefined, 'PASSKEY_UPSELL_KEY']);
}
function closePasskeyUpsellModal() { // fn#101055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13440:442, offset: 0x02206734, size: 44 bytes, params: 1, frame: 12
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('PASSKEY_UPSELL_KEY');
}
function openPasskeyUpsellPromoSheet() { // fn#101056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13440:491, offset: 0x02206760, size: 79 bytes, params: 1, frame: 15
const defaultImport = importDefault(dependencyMap[6]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[5]);
value = value(dependencyMap[7], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'PASSKEY_UPSELL_KEY']);
}
function closePasskeyUpsellPromoSheet() { // fn#101057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13440:564, offset: 0x022067af, size: 44 bytes, params: 1, frame: 12
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('PASSKEY_UPSELL_KEY');
}
function openPasskeyUpsellPromoModal(a0) { // fn#101058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13440:623, offset: 0x022067db, size: 83 bytes, params: 2, frame: 16
const defaultImport = importDefault(dependencyMap[3]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[5]);
value = value(dependencyMap[8], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, a0, 'PASSKEY_UPSELL_KEY']);
}
@@ -0,0 +1,19 @@
/* Metro module 13251; source: modules/webauthn/native/PasskeyUpsellFullModal.tsx; dependencies: [31, 13244, 33, 13247, 10121, 2] */
function _fun101059(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13441:6, offset: 0x0220682e, size: 153 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(13244) /* metro dependency 13244: WebAuthnConstants */).WebAuthnScreens;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/native/PasskeyUpsellFullModal.tsx');
exports.default = PasskeyUpsellFullModal;
}
function PasskeyUpsellFullModal() { // fn#101060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13441:238, offset: 0x022068c7, size: 97 bytes, params: 1, frame: 17
const screens = (require(13247) /* metro dependency 13247: WebAuthnScreens */).getScreens({isModal: true});
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
const MODAL_UPSELL = WebAuthnScreens.MODAL_UPSELL;
return <Modal screens={screens} initialRouteName={MODAL_UPSELL} />;
}
@@ -0,0 +1,147 @@
/* Metro module 13249; source: modules/webauthn/native/PasskeyUpsellManager.tsx; dependencies: [6, 7, 15, 17, 18, 1226, 1878, 13243, 661, 8980, 3968, 1365, 4007, 5084, 13250, 4860, 2] */
function _fun101042(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13439:6, offset: 0x022060a7, size: 310 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const webAuthnStore = importDefault(13243) /* metro dependency 13243: WebAuthnStore */;
const env0_11 = (require(661) /* metro dependency 661: Constants */).LoginStates;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun101046(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/native/PasskeyUpsellManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_101043() { // fn#101043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13439:200, offset: 0x022061dd, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_101043_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun101046(a0) { // fn#101046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13439:413, offset: 0x0220623f, size: 149 bytes, params: 2, frame: 16
const closure = PasskeyUpsellManager;
env0_7(closure, a0);
return env0_4(closure, [{key: 'handlePasskeyUpsellShow', value: value_101048}, {key: 'handleLoginSuccess',
value: function() {
env1_13 = true;
}}, {key: 'handleLogout', value: function() {
env1_12 = false;
env1_13 = false;
}}, {key: 'markDismissed', value: value_101051}]);
}
function PasskeyUpsellManager(a0) { // fn#101047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13439:425, offset: 0x022062d4, size: 277 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, PasskeyUpsellManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(PasskeyUpsellManager);
binding = env1_5;
if (_isNativeReflectConstruct_101043()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.actions = {POST_CONNECTION_OPEN: value.handlePasskeyUpsellShow, LOGIN_RESET: value.handleLogout,
LOGIN_SUCCESS: value.handleLoginSuccess, LOGOUT: value.handleLogout};
const Map = global.Map;
const map = new Map();
const value6 = map.set(AuthenticationStore, value.handlePasskeyUpsellShow);
const value7 = value6.set(UserStore, value.handlePasskeyUpsellShow);
value.stores = value7.set(WebAuthnStore, value.handlePasskeyUpsellShow);
return value;
}
function value_101048() { // fn#101048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13439:1028, offset: 0x022063e9, size: 352 bytes, params: 1, frame: 15
var moduleValue;
var moduleValue2;
var currentUser;
const value = environment.__proto__;
if (env1_13) {
if ((require(8980) /* metro dependency 8980: MFAUtils */).hasWebAuthn) {
if (AuthenticationStore.getLoginStatus() === LoginStates.NONE) {
if (AuthenticationStore.attemptedPasswordLogin()) {
moduleValue = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
if (!moduleValue.UNSAFE_isDismissibleContentDismissed((require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.PASSWORDLESS_UPSELL)) {
if (WebAuthnStore.hasFetchedCredentials()) {
if (!WebAuthnStore.hasCredentials) {
moduleValue2 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
if (!moduleValue2.isModalOpen()) {
currentUser = UserStore.getCurrentUser();
if (currentUser !== undefined && currentUser.verified) {
if (WebAuthnStore.hasFetchedCredentials()) {
(importDefault(13250) /* metro dependency 13250: PasskeyUpsellActionCreators */).openPasskeyUpsell();
} else if (!env1_12) {
(require(5084) /* metro dependency 5084: WebAuthnActionCreators */).fetchWebAuthnCredentials();
}
}
}
}
} else {
moduleValue2 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
if (!moduleValue2.isModalOpen()) {
currentUser = UserStore.getCurrentUser();
if (currentUser !== undefined && currentUser.verified) {
if (WebAuthnStore.hasFetchedCredentials()) {
(importDefault(13250) /* metro dependency 13250: PasskeyUpsellActionCreators */).openPasskeyUpsell();
} else if (!env1_12) {
(require(5084) /* metro dependency 5084: WebAuthnActionCreators */).fetchWebAuthnCredentials();
}
}
}
}
}
}
}
}
}
}
function value_101051(a0) { // fn#101051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13439:1573, offset: 0x02206567, size: 80 bytes, params: 2, frame: 15
let value = environment.__proto__;
value = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
const UNSAFE_markDismissibleContentAsDismissed = value.UNSAFE_markDismissibleContentAsDismissed;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const PASSWORDLESS_UPSELL = DismissibleContent.PASSWORDLESS_UPSELL;
return Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, value, [PASSWORDLESS_UPSELL, {dismissAction: a0,
forceTrack: true}]);
}
@@ -0,0 +1,28 @@
/* Metro module 13254; source: modules/webauthn/native/PasskeyUpsellPromoModal.tsx; dependencies: [31, 13244, 33, 13247, 1244, 10121, 2] */
function _fun101068(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13444:6, offset: 0x02206e01, size: 153 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(13244) /* metro dependency 13244: WebAuthnConstants */).WebAuthnScreens;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/native/PasskeyUpsellPromoModal.tsx');
exports.default = PasskeyUpsellPromoModal;
}
function PasskeyUpsellPromoModal(a0) { // fn#101069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13444:239, offset: 0x02206e9a, size: 184 bytes, params: 2, frame: 19
var object4;
const screens = (require(13247) /* metro dependency 13247: WebAuthnScreens */).getScreens({isModal: true});
object4 = {};
const NAME = WebAuthnScreens.NAME;
object4.name = NAME;
const object3 = {};
copyDataProperties(object3, a0, undefined);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object3['name'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8H5RmH']);
object4.params = object3;
const items2 = [object4];
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
return <Modal screens={screens} initialRouteStack={items2} />;
}
@@ -0,0 +1,81 @@
/* Metro module 13252; source: modules/webauthn/native/PasskeyUpsellPromoSheet.tsx; dependencies: [57, 31, 27, 1376, 33, 13253, 13250, 12765, 1244, 477, 13249, 6261, 4578, 8978, 2] */
function _fun101061(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13442:6, offset: 0x02206928, size: 225 bytes, params: 8, frame: 19
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 env0_5 = (require(27) /* metro dependency 27 */).Image;
const env0_6 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/native/PasskeyUpsellPromoSheet.tsx');
exports.default = PasswordlessUpsellPromoSheet;
exports.PASSWORDLESS_UPSELL_MODAL_KEY = 'PASSWORDLESS_UPSELL_MODAL_KEY';
}
function PasswordlessUpsellPromoSheet() { // fn#101062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13442:290, offset: 0x02206a09, size: 665 bytes, params: 1, frame: 29
var object2;
const image = <Image source={require(13253) /* metro dependency 13253 */} style={{'height': 190, 'width': 220,
'resizeMode': 'contain'}} />;
const binding = env0_4;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, ['']);
const binding2 = env0_3;
const value4 = binding2(value3, 2);
value4[0];
const env0_0 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property = value5[0];
const env0_1 = value5[1];
const PromoSheet = (require(12765) /* metro dependency 12765: PromoSheetNative */).PromoSheet;
object2 = {illustration: image};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const CjleBl = t.CjleBl;
object2.title = Reflect.apply(string, intl, [CjleBl]);
const isIOS2 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS();
string = intl.string;
object2.description = isIOS2 ? Reflect.apply(string, intl, [t['7yxR9t']]) : Reflect.apply(string, intl, [t.d6uxJy]);
object2.onDismiss = function() {
return importDefault(dependencyMap[10]).markDismissed(ContentDismissActionType.USER_DISMISS);
};
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const button = <Button size="lg" onPress={onPress_101065} text={property ? Reflect.apply(string, intl,
[t.wePEBF]) : Reflect.apply(string, intl, [t.NIFmCJ])} loading={property} disabled={property} />;
string = intl.string;
object2.actions = <ButtonGroup>{button}<Button size="lg" variant="secondary" onPress={onPress_101066} text={property ? Reflect.apply(string,
intl, [t.wePEBF]) : Reflect.apply(string, intl, [t['7J6/nG']])} disabled={property} /></ButtonGroup>;
return <PromoSheet {...object2} />;
}
function PasswordlessUpsellPromoSheetOnRegisterSuccess(a0) { // fn#101063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13442:506, owner: PasswordlessUpsellPromoSheet.onRegisterSuccess, offset: 0x02206ca2, size: 60 bytes, params: 2, frame: 14
const value = environment.__proto__;
(importDefault(13250) /* metro dependency 13250: PasskeyUpsellActionCreators */).closePasskeyUpsellPromoSheet();
(importDefault(13250) /* metro dependency 13250: PasskeyUpsellActionCreators */).openPasskeyUpsellPromoModal(a0);
}
function PasswordlessUpsellPromoSheetOnPress() { // fn#101065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13442:916, owner: PasswordlessUpsellPromoSheet.onPress, offset: 0x02206d0e, size: 103 bytes, params: 1, frame: 14
const value = environment.__proto__;
const defaultImport = importDefault(13249) /* metro dependency 13249: PasskeyUpsellManager */;
const markDismissed = defaultImport.markDismissed;
const TAKE_ACTION = ContentDismissActionType.TAKE_ACTION;
Reflect.apply(markDismissed, defaultImport, [TAKE_ACTION]);
(importDefault(8978) /* metro dependency 8978: NativeCeremonies */).registerPasskey({setRegistering: env0_1,
setError: env0_0, onRegisterSuccess: PasswordlessUpsellPromoSheetOnRegisterSuccess});
}
function PasswordlessUpsellPromoSheetOnPress_101066() { // fn#101066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13442:1215, owner: PasswordlessUpsellPromoSheet.onPress, offset: 0x02206d75, size: 70 bytes, params: 1, frame: 14
const value = environment.__proto__;
const defaultImport = importDefault(13249) /* metro dependency 13249: PasskeyUpsellManager */;
const markDismissed = defaultImport.markDismissed;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
Reflect.apply(markDismissed, defaultImport, [USER_DISMISS]);
(importDefault(13250) /* metro dependency 13250: PasskeyUpsellActionCreators */).closePasskeyUpsellPromoSheet();
}
@@ -0,0 +1,30 @@
/* Metro module 13246; source: modules/webauthn/native/UserSettingsWebAuthn.tsx; dependencies: [31, 13244, 33, 13247, 5280, 2] */
function _fun101025(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13436:6, offset: 0x022051b4, size: 157 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(13244) /* metro dependency 13244: WebAuthnConstants */).WebAuthnScreens;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/native/UserSettingsWebAuthn.tsx');
exports.default = UserSettingsWebAuthn;
}
function UserSettingsWebAuthn({navigation, initialRouteName = WebAuthnScreens.INIT, showNav}) { // fn#101026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13436:238, offset: 0x02205251, size: 187 bytes, params: 2, frame: 20
if (showNav !== undefined) {
}
const screens = (require(13247) /* metro dependency 13247: WebAuthnScreens */).getScreens({isModal: false});
env0_2.useLayoutEffect(function() {
navigation.setOptions({headerShown: showNav});
});
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
return (
<Navigator
screens={screens}
initialRouteName={initialRouteName}
initialRouteStack={[{name: initialRouteName}]}
useContainer={false}
/>
);
}
@@ -0,0 +1,104 @@
/* Metro module 13256; source: modules/webauthn/native/WebAuthnDeleteActionSheet.tsx; dependencies: [31, 27, 33, 4501, 697, 4080, 6275, 6758, 1244, 6806, 13257, 4573, 4578, 5084, 3857, 11111, 4073, 9149, 8129, 2] */
function _fun101083(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13446:6, offset: 0x022078b1, size: 365 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.Image;
const env0_4 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.content = {alignItems: 'center'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.subtitle = {textAlign: 'center', marginTop: PX_16};
const object3 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingBottom = PX_16;
object2.sheetContent = object3;
const object6 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.gap = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingBottom = PX_16;
object2.sheetBody = object6;
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/native/WebAuthnDeleteActionSheet.tsx');
exports.default = WebAuthnDeleteActionSheet;
}
function WebAuthnDeleteActionSheet({credential, deleting, setDeleting}) { // fn#101084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13446:531, offset: 0x02207a1e, size: 663 bytes, params: 2, frame: 29
const styles = useStyles();
const closure = onPress_101085;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const mI3CoL = (require(1244) /* metro dependency 1244: indexNative */).t.mI3CoL;
const object = {};
object.keyName = credential.name;
const ActionSheetCloseButton = (require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton;
const items2 = [<BottomSheetTitleHeader title={Reflect.apply(formatToPlainString, intl, [mI3CoL,
object])} trailing={<ActionSheetCloseButton onPress={closure} />} />];
const image = <Image source={importDefault(13257) /* metro dependency 13257 */} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const string = intl.string;
const IfTbc1 = (require(1244) /* metro dependency 1244: indexNative */).t.IfTbc1;
items2[1] = <View style={styles.content}>{image}<Text variant="heading-md/normal" style={styles.subtitle}>{Reflect.apply(string,
intl, [IfTbc1])}</Text></View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <View><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['lqK//z'])} onPress={closure} variant="primary" grow /></View>;
items2[3] = <View><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zYOk0f)} onPress={onPress_101086} variant="destructive" disabled={deleting} loading={deleting} grow /></View>;
return (
<BottomSheet contentStyles={styles.sheetContent} bodyStyles={styles.sheetBody}>
{items2}
</BottomSheet>
);
}
function WebAuthnDeleteActionSheetOnPress() { // fn#101085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13446:629, owner: WebAuthnDeleteActionSheet.onPress, offset: 0x02207cb5, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function WebAuthnDeleteActionSheetOnPress_101086() { // fn#101086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13446:1309, owner: WebAuthnDeleteActionSheet.onPress, offset: 0x02207cda, size: 119 bytes, params: 1, frame: 14
setDeleting(true);
onPress_101085();
const webAuthnActionCreatorsModule = require(5084) /* metro dependency 5084: WebAuthnActionCreators */;
let value = webAuthnActionCreatorsModule.deleteWebAuthnCredential(credential);
value = value.then(_fun101087);
value = value.catch(function(a0) {
var defaultImport = importDefault(dependencyMap[14]);
var object = {key: 'WEBAUTHN_CREDENTIAL_DELETE_ERROR_TOAST_KEY', content: a0.message,
icon: importDefault(dependencyMap[17])};
object.IconComponent = require(dependencyMap[18]).WarningIcon;
object.iconColor = 'icon-feedback-critical';
defaultImport.open(object);
});
value.finally(function() {
setDeleting(false);
});
}
function _fun101087() { // fn#101087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13446:1377, offset: 0x02207d51, size: 156 bytes, params: 1, frame: 18
const defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
const open = defaultImport.open;
const object2 = {key: 'WEBAUTHN_CREDENTIAL_DELETE_SUCCESS_TOAST_KEY'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const ZnkeXs = (require(1244) /* metro dependency 1244: indexNative */).t.ZnkeXs;
object2.content = Reflect.apply(string, intl, [ZnkeXs]);
object2.icon = importDefault(11111) /* metro dependency 11111 */;
const CircleCheckIcon = (require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon;
object2.IconComponent = CircleCheckIcon;
object2.iconColor = 'status-positive';
Reflect.apply(open, defaultImport, [object2]);
}
@@ -0,0 +1,77 @@
/* Metro module 13247; source: modules/webauthn/native/WebAuthnScreens.tsx; dependencies: [13244, 33, 13248, 1244, 13255, 5282, 13250, 13260, 13261, 13264, 13265, 2] */
function _fun101028(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13437:6, offset: 0x0220532d, size: 145 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(13244) /* metro dependency 13244: WebAuthnConstants */).WebAuthnScreens;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/native/WebAuthnScreens.tsx');
exports.getScreens = getScreens_101029;
}
function getScreens_101029({isModal}) { // fn#101029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13437:227, offset: 0x022053be, size: 593 bytes, params: 2, frame: 22
var r5;
var moduleValue;
var moduleValue2;
const object2 = {};
const MODAL_UPSELL = WebAuthnScreens.MODAL_UPSELL;
object2[MODAL_UPSELL] = {title: '', render: render_101030};
const INIT = WebAuthnScreens.INIT;
const object4 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object4.title = Reflect.apply(string, intl, [t['0N1s81']]);
object4.render = render_101031;
if (isModal) {
moduleValue = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
r5 = moduleValue.getHeaderCloseButton((importDefault(13250) /* metro dependency 13250: PasskeyUpsellActionCreators */).closePasskeyUpsellModal);
} else {
r5 = undefined;
}
object4.headerLeft = r5;
object2[INIT] = object4;
const EDIT = WebAuthnScreens.EDIT;
string = intl.string;
const UBBwwF = t.UBBwwF;
object2[EDIT] = {render: render_101032, title: Reflect.apply(string, intl, [UBBwwF])};
const REGISTER = WebAuthnScreens.REGISTER;
object2[REGISTER] = {render: render_101033, title: intl.string(t.vrOCCk)};
const NAME = WebAuthnScreens.NAME;
const object5 = {render: render_101034};
object5.title = intl.string(t['cY/IOu']);
if (isModal) {
moduleValue2 = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
r5 = moduleValue2.getHeaderCloseButton((importDefault(13250) /* metro dependency 13250: PasskeyUpsellActionCreators */).closePasskeyUpsellModal);
} else {
r5 = undefined;
}
object5.headerLeft = r5;
object2[NAME] = object5;
const SUCCESS = WebAuthnScreens.SUCCESS;
const object8 = {render: render_101035};
object8.title = intl.string(t['7wPZln']);
object2[SUCCESS] = object8;
return object2;
}
function getScreens_101029Render() { // fn#101030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13437:301, owner: getScreens_101029.render, offset: 0x0220560f, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(13248) /* metro dependency 13248: PasskeyUpsellView */);
}
function getScreens_101029Render_101032(a0) { // fn#101032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13437:502, owner: getScreens_101029.render, offset: 0x0220565d, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__;
return ((Component) => <Component {...a0} />)(importDefault(13260) /* metro dependency 13260: WebAuthnEditStep */);
}
function getScreens_101029Render_101033() { // fn#101033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13437:589, owner: getScreens_101029.render, offset: 0x0220568e, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(13261) /* metro dependency 13261: WebAuthnRegisterStep */);
}
function getScreens_101029Render_101035() { // fn#101035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13437:840, owner: getScreens_101029.render, offset: 0x022056b5, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(13265) /* metro dependency 13265: WebAuthnSuccessStep */);
}
@@ -0,0 +1,215 @@
/* Metro module 13255; source: modules/webauthn/native/nav_steps/PasskeyInitStep.tsx; dependencies: [57, 31, 27, 13243, 13244, 33, 4501, 697, 566, 13245, 4573, 1244, 6261, 8341, 4071, 4080, 13256, 1962, 9646, 6231, 6238, 13258, 1484, 5084, 8980, 5277, 7972, 2] */
function _fun101070(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13445:6, offset: 0x02206f52, size: 521 bytes, params: 8, frame: 23
var object3;
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 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.Image;
const env0_6 = value.View;
const webAuthnStore = importDefault(13243) /* metro dependency 13243: WebAuthnStore */;
const env0_8 = (require(13244) /* metro dependency 13244: WebAuthnConstants */).WebAuthnScreens;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object5 = {'flex': 1, 'flexDirection': 'column', 'alignItems': 'stretch', 'justifyContent': 'space-between'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.marginLeft = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.marginRight = PX_16;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.marginTop = PX_8;
object3.container = object5;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.upsellContainer = {marginTop: PX_16, alignItems: 'center'};
const object6 = {};
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object6.color = TEXT_SUBTLE;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginTop = PX_16;
object6.textAlign = 'center';
object3.upsellText = object6;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.iconButtonGroup = {flexDirection: 'row', paddingVertical: PX_8};
object3.keychainImage = {'height': 125, 'width': 161};
const env0_11 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/native/nav_steps/PasskeyInitStep.tsx');
exports.default = PasskeyInitStep;
}
function CredentialList({navigation}) { // fn#101071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13445:693, offset: 0x0220715b, size: 490 bytes, params: 2, frame: 23
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
var env0_3Binding = undefined;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
const credentials = Reflect.apply(useStateFromStoresObject, fluxModule, [[WebAuthnStore], function() {
var object = {};
object.credentials = WebAuthnStore.getCredentials();
return object;
}]).credentials;
const styles = useStyles();
var [env0_2, env0_3] = env0_3Binding(env0_4.useState(false), 2);
if (credentials.length === 0) {
var viewBindingProps = {style: styles.upsellContainer};
items2 = [<Image source={importDefault(13245) /* metro dependency 13245 */} style={styles.keychainImage} />];
items2[1] = ((Text) => <Text variant="text-md/normal" style={styles.upsellText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.FSNwFW)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
return (
<View {...viewBindingProps}>
{items2}
</View>
);
}
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<TableRowGroup
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4RIqrQ'])}
hasIcons={false}
>
{credentials.map(_fun101076)}
</TableRowGroup>
);
}
function PasskeyInitStep(a0) { // fn#101077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13445:2141, offset: 0x0220766d, size: 286 bytes, params: 2, frame: 21
if (a0 == null) {
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", undefined);
throw undefined;
}
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
env0_4.useEffect(_fun101079, [Reflect.apply(useStateFromStoresObject, fluxModule, [[WebAuthnStore], function() {
var object = {};
object.hasFetchedCredentials = WebAuthnStore.hasFetchedCredentials();
return object;
}]).hasFetchedCredentials]);
env0_4.useLayoutEffect(_fun101080, [value2]);
const Form = (require(7972) /* metro dependency 7972: native */).Form;
return (
<Form>
<View style={styles.container}>
<CredentialList navigation={value2} />
</View>
</Form>
);
}
function credentialTrailer(a0) { // fn#101072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13445:1097, owner: CredentialList.credentialTrailer, offset: 0x02207345, size: 422 bytes, params: 2, frame: 28
const env0_0 = a0;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const object = {variant: 'secondary'};
const TrashIcon = (require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon;
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
object.icon = <TrashIcon color={TEXT_FEEDBACK_CRITICAL} />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const N86XcP = (require(1244) /* metro dependency 1244: indexNative */).t.N86XcP;
object.accessibilityLabel = Reflect.apply(string, intl, [N86XcP]);
object.size = 'sm';
object.disabled = env0_2;
object.loading = env0_2;
object.onPress = onPress_101073;
const iconButton = <IconButton {...object} />;
const PencilIcon = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
return (
<ButtonGroup style={styles.iconButtonGroup}>
{iconButton}
<IconButton
variant="secondary"
icon={<PencilIcon />}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bt75uw)}
size="sm"
disabled={env0_2}
loading={env0_2}
onPress={onPress_101074}
/>
</ButtonGroup>
);
}
function _fun101076(a0) { // fn#101076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13445:1846, offset: 0x022075a9, size: 196 bytes, params: 2, frame: 23
var r5;
var intl;
var format;
var property;
let value = environment.__proto__;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRowProps = {label: a0.name, trailing: credentialTrailer(a0)};
const last_used = a0.last_used;
const value3 = null;
if (value3 != last_used) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['7JgxF5'];
value = require(13258) /* metro dependency 13258: AuthSessionsUtils */;
value = Reflect.apply(format, intl, [property, {lastUsed: value.formatDate(a0.last_used)}]);
r5 = value;
} else {
r5 = value3;
}
tableRowProps.subLabel = r5;
return <TableRow {...tableRowProps} key={a0.id} />;
}
function _fun101079() { // fn#101079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13445:2347, offset: 0x022077a5, size: 49 bytes, params: 1, frame: 11
var value;
if (!hasFetchedCredentials) {
value = environment.__proto__;
value = require(5084) /* metro dependency 5084: WebAuthnActionCreators */;
value.fetchWebAuthnCredentials();
}
}
function _fun101080() { // fn#101080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13445:2417, offset: 0x022077d6, size: 38 bytes, params: 1, frame: 12
const binding = env0_0;
binding.setOptions({headerRight: headerRight_101081});
}
function credentialTrailerOnPress() { // fn#101073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13445:1406, owner: CredentialList.credentialTrailer.onPress, offset: 0x022074eb, size: 115 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__;
const defaultImport = importDefault(dependencyMap[15]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[17]);
value = value(dependencyMap[16], dependencyMap.paths);
return Reflect.apply(openLazy, defaultImport, [value, 'WEBAUTHN_DELETE_SHEET_KEY', {credential: env0_0,
deleting: env1_2, setDeleting: env1_3}]);
}
function credentialTrailerOnPress_101074() { // fn#101074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13445:1695, owner: CredentialList.credentialTrailer.onPress, offset: 0x0220755e, size: 49 bytes, params: 1, frame: 14
const navigationBinding = navigation;
const push = navigationBinding.push;
const EDIT = WebAuthnScreens.EDIT;
Reflect.apply(push, navigationBinding, [EDIT, {credential: env0_0}]);
}
function headerRight_101081() { // fn#101081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13445:2448, offset: 0x022077fc, size: 147 bytes, params: 1, frame: 18
var HeaderActionButton;
var intl;
if ((require(8980) /* metro dependency 8980: MFAUtils */).hasWebAuthn) {
HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<HeaderActionButton
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.OYkgVk)}
onPress={onPress_101082}
foregroundRipple
/>
);
}
}
function headerRight_101081OnPress() { // fn#101082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13445:2568, owner: headerRight_101081.onPress, offset: 0x0220788f, size: 34 bytes, params: 1, frame: 11
const binding = env2_0;
const push = binding.push;
const REGISTER = WebAuthnScreens.REGISTER;
Reflect.apply(push, binding, [REGISTER]);
}
@@ -0,0 +1,168 @@
/* Metro module 13248; source: modules/webauthn/native/nav_steps/PasskeyUpsellView.tsx; dependencies: [57, 31, 27, 13244, 661, 1376, 33, 4501, 697, 1484, 1244, 13249, 13250, 5282, 1948, 6618, 13253, 4573, 477, 6766, 4578, 8978, 2] */
function _fun101036(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13438:6, offset: 0x022056dc, size: 730 bytes, params: 8, frame: 24
var object2;
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 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.View;
const env0_6 = value.Image;
const env0_7 = value.ScrollView;
const env0_8 = (require(13244) /* metro dependency 13244: WebAuthnConstants */).WebAuthnScreens;
const env0_9 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
const env0_10 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsx;
const env0_12 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {'flex': 1, 'flexDirection': 'column', backgroundColor: BACKGROUND_BASE_LOW};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.scrollViewContainer = {'flexGrow': 1, 'justifyContent': 'space-between', paddingHorizontal: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.headerContainer = {'alignItems': 'center', 'justifyContent': 'center', gap: PX_16};
object2.headerImage = {'height': 190, 'width': 220, 'resizeMode': 'contain'};
object2.headerText = {textAlign: 'center'};
const object3 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object3.backgroundColor = BACKGROUND_BASE_LOWEST;
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object3.width = PX_32;
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object3.height = PX_32;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.circleIcon = object3;
const object4 = {};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.gap = PX_24;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.marginLeft = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.marginRight = PX_8;
object2.listContainer = object4;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.row = {'flexDirection': 'row', 'gap': null, 'alignItems': 'center', gap: PX_8};
object2.text = {flex: 1};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.buttonContainer = {gap: PX_16, alignItems: 'center'};
const env0_13 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/native/nav_steps/PasskeyUpsellView.tsx');
exports.default = PasskeyUpsellView;
}
function PasskeyUpsellView() { // fn#101037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13438:1169, offset: 0x022059b6, size: 1426 bytes, params: 1, frame: 40
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const styles = useStyles();
const binding = env0_4;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, ['']);
const binding2 = env0_3;
const value4 = binding2(value3, 2);
value4[0];
const env0_1 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property = value5[0];
const env0_2 = value5[1];
const closure = onPress_101039;
binding.useLayoutEffect(_fun101040, [value2]);
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
const getArticleURL = defaultImport.getArticleURL;
const SETTING_UP_TWO_FACTOR = HelpdeskArticles.SETTING_UP_TWO_FACTOR;
const value6 = Reflect.apply(getArticleURL, defaultImport, [SETTING_UP_TWO_FACTOR]);
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const items3 = [<Image source={importDefault(13253) /* metro dependency 13253 */} style={styles.headerImage} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
let headerText = styles.headerText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const CjleBl = t.CjleBl;
items3[1] = <Text accessibilityRole="header" variant="heading-xl/bold" color="mobile-text-heading-primary" style={headerText}>{Reflect.apply(string,
intl, [CjleBl])}</Text>;
headerText = styles.headerText;
const isIOS2 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS();
string = intl.string;
items3[2] = <Text variant="heading-md/normal" color="text-default" style={headerText}>{isIOS2 ? Reflect.apply(string,
intl, [t['7yxR9t']]) : Reflect.apply(string, intl, [t.d6uxJy])}</Text>;
const items2 = [<View style={styles.headerContainer}>{items3}</View>];
let row = styles.row;
const view = <View style={styles.circleIcon} />;
let text = styles.text;
string = intl.string;
const HtqVkj = (require(1244) /* metro dependency 1244: indexNative */).t.HtqVkj;
const view2 = <View style={row}>{view}<Text variant="heading-md/normal" color="text-default" style={text}>{Reflect.apply(string,
intl, [HtqVkj])}</Text></View>;
row = styles.row;
const view3 = <View style={styles.circleIcon} />;
text = styles.text;
const isIOS3 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS();
string = intl.string;
items2[1] = <View style={styles.listContainer}>{view2}<View style={row}>{view3}<Text variant="heading-md/normal" color="text-default" style={text}>{isIOS3 ? Reflect.apply(string,
intl, [t.U409I8]) : Reflect.apply(string, intl, [t.uYfqlo])}</Text></View></View>;
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
const format = intl.format;
const OeGXVv = (require(1244) /* metro dependency 1244: indexNative */).t.OeGXVv;
const items6 = [<TextWithIOSLinkWorkaround variant="text-sm/semibold" color="text-brand">{Reflect.apply(format,
intl, [OeGXVv, {learnMoreLink: value6}])}</TextWithIOSLinkWorkaround>];
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items6[1] = <Button text={property ? Reflect.apply(string, intl, [t.wePEBF]) : Reflect.apply(string, intl,
[t.NIFmCJ])} onPress={onPress_101041} size="lg" disabled={property} loading={property} grow />;
string = intl.string;
items6[2] = <Button text={property ? Reflect.apply(string, intl, [t.wePEBF]) : Reflect.apply(string, intl,
[t['7J6/nG']])} onPress={closure} size="lg" variant="secondary" grow />;
items2[2] = <View style={styles.buttonContainer}>{items6}</View>;
return (
<SafeAreaPaddingView bottom style={styles.container}>
<ScrollView contentContainerStyle={styles.scrollViewContainer}>
{items2}
</ScrollView>
</SafeAreaPaddingView>
);
}
function PasskeyUpsellViewOnRegisterSuccess(a0) { // fn#101038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13438:1332, owner: PasskeyUpsellView.onRegisterSuccess, offset: 0x02205f48, size: 111 bytes, params: 2, frame: 19
const binding = env0_0;
const push = binding.push;
const value = environment.__proto__;
const NAME = WebAuthnScreens.NAME;
const object2 = {};
copyDataProperties(object2, a0, undefined);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2['name'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8H5RmH']);
Reflect.apply(push, binding, [NAME, object2]);
}
function PasskeyUpsellViewOnPress() { // fn#101039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13438:1416, owner: PasskeyUpsellView.onPress, offset: 0x02205fb7, size: 70 bytes, params: 1, frame: 14
const value = environment.__proto__;
const defaultImport = importDefault(13249) /* metro dependency 13249: PasskeyUpsellManager */;
const markDismissed = defaultImport.markDismissed;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
Reflect.apply(markDismissed, defaultImport, [USER_DISMISS]);
(importDefault(13250) /* metro dependency 13250: PasskeyUpsellActionCreators */).closePasskeyUpsellModal();
}
function _fun101040() { // fn#101040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13438:1515, offset: 0x02205ffd, size: 67 bytes, params: 1, frame: 15
const binding = env0_0;
const setOptions = binding.setOptions;
const navigatorHeaderNativeModule = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
const getHeaderCloseButton = navigatorHeaderNativeModule.getHeaderCloseButton;
Reflect.apply(setOptions, binding, [{headerLeft: Reflect.apply(getHeaderCloseButton, navigatorHeaderNativeModule,
[onPress_101039])}]);
}
function PasskeyUpsellViewOnPress_101041() { // fn#101041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13438:3015, owner: PasskeyUpsellView.onPress, offset: 0x02206040, size: 103 bytes, params: 1, frame: 14
const value = environment.__proto__;
const defaultImport = importDefault(13249) /* metro dependency 13249: PasskeyUpsellManager */;
const markDismissed = defaultImport.markDismissed;
const TAKE_ACTION = ContentDismissActionType.TAKE_ACTION;
Reflect.apply(markDismissed, defaultImport, [TAKE_ACTION]);
(importDefault(8978) /* metro dependency 8978: NativeCeremonies */).registerPasskey({setRegistering: env0_2,
setError: env0_1, onRegisterSuccess: PasskeyUpsellViewOnRegisterSuccess});
}
@@ -0,0 +1,113 @@
/* Metro module 13260; source: modules/webauthn/native/nav_steps/WebAuthnEditStep.tsx; dependencies: [57, 31, 33, 4501, 697, 1484, 5282, 7972, 1244, 1305, 4578, 5084, 3857, 11111, 4073, 2] */
function _fun101114(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13450:6, offset: 0x022085a9, size: 258 bytes, params: 8, frame: 22
var object2;
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 */;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.inputField = {marginBottom: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.form = {paddingHorizontal: PX_16};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/native/nav_steps/WebAuthnEditStep.tsx');
exports.default = EditCredentialModal;
}
function EditCredentialModal({credential}) { // fn#101115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13450:359, offset: 0x022086ab, size: 579 bytes, params: 2, frame: 29
const styles = useStyles();
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const binding = env0_4;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_2 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, ['']), 2);
const property2 = value5[0];
const property3 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property4 = value6[0];
var env0_4 = value6[1];
binding.useLayoutEffect(_fun101116, [value2]);
const Form = (require(7972) /* metro dependency 7972: native */).Form;
const FormInput = (require(7972) /* metro dependency 7972: native */).FormInput;
const formInputProps = {showTopContainer: false, value: property2, onChange: property3, style: styles.inputField,
error: property4};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formInputProps.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Jzd+z/']);
formInputProps.placeholder = credential.name;
formInputProps.disabled = property;
const ClearButtonVisibility = (require(1305) /* metro dependency 1305: native */).ClearButtonVisibility;
const WITH_CONTENT = ClearButtonVisibility.WITH_CONTENT;
formInputProps.clearButtonVisibility = WITH_CONTENT;
formInputProps.autoFocus = true;
formInputProps.showBorder = true;
formInputProps.required = true;
formInputProps.large = true;
const items2 = [<FormInput {...formInputProps} />];
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
items2[1] = <FormDivider />;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <Button onPress={onPress_101118} disabled={property || property2 === ''} loading={property} size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7asiR3'])} grow />;
return (
<Form style={styles.form}>
{items2}
</Form>
);
}
function _fun101116() { // fn#101116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13450:588, offset: 0x022088ee, size: 72 bytes, params: 1, frame: 15
var environment;
const binding = env0_1;
const setOptions = binding.setOptions;
const object2 = {};
const value = environment.__proto__;
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(_fun101117);
Reflect.apply(setOptions, binding, [object2]);
}
function EditCredentialModalOnPress() { // fn#101118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13450:1043, owner: EditCredentialModal.onPress, offset: 0x0220894b, size: 132 bytes, params: 1, frame: 15
env0_2(true);
env0_4(null);
const webAuthnActionCreatorsModule = require(5084) /* metro dependency 5084: WebAuthnActionCreators */;
let value = webAuthnActionCreatorsModule.editWebAuthnCredential(credential.id, env0_3);
value = value.then(_fun101119);
value = value.catch(_fun101120);
value.finally(_fun101121);
}
function _fun101117() { // fn#101117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13450:647, offset: 0x02208936, size: 21 bytes, params: 1, frame: 9
env1_1.pop();
}
function _fun101119() { // fn#101119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13450:1108, offset: 0x022089cf, size: 173 bytes, params: 1, frame: 18
const defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
const open = defaultImport.open;
const object2 = {key: 'WEBAUTHN_CREDENTIAL_EDIT_SUCCESS_TOAST_KEY'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const IV13mH = (require(1244) /* metro dependency 1244: indexNative */).t.IV13mH;
object2.content = Reflect.apply(string, intl, [IV13mH]);
object2.icon = importDefault(11111) /* metro dependency 11111 */;
const CircleCheckIcon = (require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon;
object2.IconComponent = CircleCheckIcon;
object2.iconColor = 'status-positive';
Reflect.apply(open, defaultImport, [object2]);
env1_1.popToTop();
}
function _fun101120({body}) { // fn#101120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13450:1329, offset: 0x02208a7c, size: 29 bytes, params: 2, frame: 11
env1_4(body.message);
}
@@ -0,0 +1,279 @@
/* Metro module 13264; source: modules/webauthn/native/nav_steps/WebAuthnNameStep.tsx; dependencies: [5, 57, 31, 27, 13244, 33, 4501, 1484, 5084, 3857, 1244, 11111, 4073, 7972, 1305, 4578, 2] */
function _fun101133(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13454:6, offset: 0x02209334, size: 266 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const env0_7 = (require(13244) /* metro dependency 13244: WebAuthnConstants */).WebAuthnScreens;
const value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({margin: {margin: 16}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/native/nav_steps/WebAuthnNameStep.tsx');
exports.default = WebAuthnNameStep;
}
function WebAuthnNameStep({ticket, credential, name}) { // fn#101134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13454:338, offset: 0x0220943e, size: 633 bytes, params: 2, frame: 29
const styles = useStyles();
const env0_2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const binding = undefined;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_4;
const value3 = binding2(value2, 2);
const property = value3[0];
const env0_3 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property2 = value4[0];
var env0_4 = value4[1];
useState = binding.useState;
const value5 = '';
const value7 = env0_4(Reflect.apply(useState, binding, [name ?? value5]), 2);
const property3 = value7[0];
const property4 = value7[1];
const value8 = _fun101135();
const Form = (require(7972) /* metro dependency 7972: native */).Form;
const FormInput = (require(7972) /* metro dependency 7972: native */).FormInput;
const object = {showTopContainer: false, value: property3, onChange: property4};
let margin = styles.margin;
object.style = margin;
object.error = property2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Jzd+z/']);
object.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['I/sJtJ']);
object.disabled = property;
const ClearButtonVisibility = (require(1305) /* metro dependency 1305: native */).ClearButtonVisibility;
const WITH_CONTENT = ClearButtonVisibility.WITH_CONTENT;
object.clearButtonVisibility = WITH_CONTENT;
object.autoFocus = true;
object.showBorder = true;
object.required = true;
object.large = true;
const items2 = [<FormInput {...object} />];
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
items2[1] = <FormDivider />;
margin = styles.margin;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <View style={margin}><Button onPress={value8} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5dyZ1S'])} disabled={value5 === property3} size="lg" /></View>;
return (
<Form>
{items2}
</Form>
);
}
function _fun101135() { // fn#101135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13454:566, offset: 0x022096b7, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun101137);
return _fun101138;
}
function* _fun101137() { // fn#101137, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13454:586, offset: 0x022096e6, size: 356 bytes, params: 1, frame: 24
var value;
var value2;
var binding;
var value3;
var binding2;
var property;
var value4;
var finishRegisterWebAuthnCredential;
var value5;
var value6;
var value7;
var binding3;
var value8;
var open;
var object2;
var binding4;
var intl;
var string;
var t;
var j3d5qI;
var CircleCheckIcon;
var push;
var SUCCESS;
var error;
var body;
var message;
exceptionSkip29: while (true) {
exceptionLanding29: while (true) {
exceptionSkip21: while (true) {
exceptionLanding21: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = environment.__proto__.__proto__;
try {
try {
binding = env2_3;
} catch (error) {
break exceptionLanding21;
}
} catch (error) {
break exceptionLanding29;
}
try {
try {
binding(true);
} catch (error) {
break exceptionLanding21;
}
} catch (error) {
break exceptionLanding29;
}
value3 = environment.__proto__.__proto__.__proto__;
try {
try {
binding = env3_0;
} catch (error) {
break exceptionLanding21;
}
} catch (error) {
break exceptionLanding29;
}
try {
try {
binding2 = env3_2;
} catch (error) {
break exceptionLanding21;
}
} catch (error) {
break exceptionLanding29;
}
try {
try {
property = binding2[8];
} catch (error) {
break exceptionLanding21;
}
} catch (error) {
break exceptionLanding29;
}
try {
try {
value4 = binding(property);
} catch (error) {
break exceptionLanding21;
}
} catch (error) {
break exceptionLanding29;
}
try {
try {
finishRegisterWebAuthnCredential = value4.finishRegisterWebAuthnCredential;
} catch (error) {
break exceptionLanding21;
}
} catch (error) {
break exceptionLanding29;
}
try {
try {
binding = env2_5;
} catch (error) {
break exceptionLanding21;
}
} catch (error) {
break exceptionLanding29;
}
try {
try {
} catch (error) {
break exceptionLanding21;
}
} catch (error) {
break exceptionLanding29;
}
try {
try {
} catch (error) {
break exceptionLanding21;
}
} catch (error) {
break exceptionLanding29;
}
try {
try {
value5 = Reflect.apply(finishRegisterWebAuthnCredential, value4, [binding, require,
importDefault]);
} catch (error) {
break exceptionLanding21;
}
} catch (error) {
break exceptionLanding29;
}
yield value5;
try {
try {
value6 = undefined;
value7 = false;
} catch (error) {
break exceptionLanding21;
}
} catch (error) {
break exceptionLanding29;
}
if (value7) {
env2_3(false);
return value6;
}
env2_3(false);
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[9]);
open = value8.open;
object2 = {key: 'WEBAUTHN_CREDENTIAL_REGISTER_SUCCESS_TOAST_KEY'};
binding4 = env3_0;
intl = binding4(binding3[10]).intl;
string = intl.string;
t = binding4(binding3[10]).t;
j3d5qI = t.j3d5qI;
object2.content = Reflect.apply(string, intl, [j3d5qI]);
object2.icon = binding(binding3[11]);
CircleCheckIcon = binding4(binding3[12]).CircleCheckIcon;
object2.IconComponent = CircleCheckIcon;
object2.iconColor = 'status-success';
Reflect.apply(open, value8, [object2]);
push = dependencyMap.push;
SUCCESS = env3_7.SUCCESS;
Reflect.apply(push, dependencyMap, [SUCCESS, {}]);
return undefined;
break exceptionSkip21;
}
try {
binding = env2_4;
} catch (error) {
break exceptionLanding29;
}
try {
body = error.body;
} catch (error) {
break exceptionLanding29;
}
try {
message = body.message;
} catch (error) {
break exceptionLanding29;
}
try {
binding(message);
} catch (error) {
break exceptionLanding29;
}
env2_3(false);
return undefined;
break exceptionSkip21;
}
break exceptionSkip29;
}
env2_3(false);
throw error;
break exceptionSkip29;
}
}
@@ -0,0 +1,159 @@
/* Metro module 13261; source: modules/webauthn/native/nav_steps/WebAuthnRegisterStep.tsx; dependencies: [57, 31, 27, 13244, 33, 4501, 697, 8978, 1244, 1305, 1484, 477, 6618, 13262, 4573, 6261, 4578, 2] */
function _fun101122(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13451:6, offset: 0x02208a99, size: 499 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 env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(13244) /* metro dependency 13244: WebAuthnConstants */).WebAuthnScreens;
let value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.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_9 = Reflect.apply(createStyles, value, [{flexContainer: {'flex': 1, 'flexDirection': 'column',
'alignItems': 'stretch', 'justifyContent': 'space-between', 'marginLeft': 16, 'marginRight': 16,
'marginTop': 16}, centerFlex: {'display': 'flex', 'alignItems': 'center'}, margin: {'marginTop': 16,
'textAlign': 'center'}, radioItem: object5}]);
object4 = {PASSKEY_CREDENTIAL_MANAGER: 0};
object4[0] = 'PASSKEY_CREDENTIAL_MANAGER';
object4.PASSKEY_DEVICE = 1;
object4[1] = 'PASSKEY_DEVICE';
object4.OTHER_AND_ANDROID_NONDISCOVERABLE = 2;
object4[2] = 'OTHER_AND_ANDROID_NONDISCOVERABLE';
const object6 = {};
const PASSKEY_CREDENTIAL_MANAGER = object4.PASSKEY_CREDENTIAL_MANAGER;
object6[PASSKEY_CREDENTIAL_MANAGER] = (importDefault(8978) /* metro dependency 8978: NativeCeremonies */).registerPasskey;
const PASSKEY_DEVICE = object4.PASSKEY_DEVICE;
object6[PASSKEY_DEVICE] = (importDefault(8978) /* metro dependency 8978: NativeCeremonies */).registerAndroidDevicePasskey;
const OTHER_AND_ANDROID_NONDISCOVERABLE = object4.OTHER_AND_ANDROID_NONDISCOVERABLE;
object6[OTHER_AND_ANDROID_NONDISCOVERABLE] = (importDefault(8978) /* metro dependency 8978: NativeCeremonies */).registerSecurityKey;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/native/nav_steps/WebAuthnRegisterStep.tsx');
exports.default = WebAuthnRegisterStep;
}
function AndroidPasskeyRadioGroup({authenticatorSelection, onChange, registering}) { // fn#101123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13451:927, offset: 0x02208c8c, size: 369 bytes, params: 2, frame: 23
const styles = useStyles();
let object2 = {};
const PASSKEY_CREDENTIAL_MANAGER = env0_10.PASSKEY_CREDENTIAL_MANAGER;
object2.value = PASSKEY_CREDENTIAL_MANAGER;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const JQbo8L = (require(1244) /* metro dependency 1244: indexNative */).t.JQbo8L;
object2.name = Reflect.apply(string, intl, [JQbo8L]);
const items2 = [object2];
object2 = {};
const PASSKEY_DEVICE = env0_10.PASSKEY_DEVICE;
object2.value = PASSKEY_DEVICE;
string = intl.string;
const GjBNMg = (require(1244) /* metro dependency 1244: indexNative */).t.GjBNMg;
object2.name = Reflect.apply(string, intl, [GjBNMg]);
items2[1] = object2;
object2 = {};
const OTHER_AND_ANDROID_NONDISCOVERABLE = env0_10.OTHER_AND_ANDROID_NONDISCOVERABLE;
object2.value = OTHER_AND_ANDROID_NONDISCOVERABLE;
object2.name = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['OhC77+']);
items2[2] = object2;
const RadioGroup = (require(1305) /* metro dependency 1305: native */).RadioGroup;
const RadioGroup2 = (require(1305) /* metro dependency 1305: native */).RadioGroup;
const Sizes = RadioGroup2.Sizes;
const LARGE = Sizes.LARGE;
return (
<RadioGroup
style={styles.radioItem}
options={items2}
onChange={function({value}) {
return onChange(value);
}}
value={authenticatorSelection}
disabled={registering}
size={LARGE}
withSpacing
/>
);
}
function WebAuthnRegisterStep() { // fn#101125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13451:1525, offset: 0x02208e15, size: 878 bytes, params: 1, frame: 32
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const styles = useStyles();
let binding = env0_4;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
const value4 = binding2(value3, 2);
const property = value4[0];
const property2 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, ['']), 2);
const property3 = value5[0];
const property4 = value5[1];
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
binding = env0_10;
const r8 = isAndroid2 ? binding.PASSKEY_CREDENTIAL_MANAGER : binding.OTHER_AND_ANDROID_NONDISCOVERABLE;
binding = env0_4;
const [property5, property6] = env0_3(binding.useState(r8), 2);
const value8 = binding.useCallback(_fun101126, [value2]);
const env0_5 = binding.useMemo(_fun101127, [property5]);
const env0_6 = binding.useMemo(_fun101128, [value8, property4, property2]);
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const KeyImage = (require(13262) /* metro dependency 13262: KeyImage */).KeyImage;
const items2 = [<KeyImage />];
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
items2[1] = <Text style={styles.margin} variant="text-md/normal">{property ? Reflect.apply(string, intl,
[t.aVMiX3]) : Reflect.apply(string, intl, [t.Lh5vTW])}</Text>;
items2[2] = property3 != null && <Text variant="text-md/normal" color="text-feedback-critical">{property3}</Text>;
const view = <View style={styles.centerFlex}>{items2}</View>;
const r5 = (importDefault(8978) /* metro dependency 8978: NativeCeremonies */).shouldDisplayAndroidFidoSelector && <AndroidPasskeyRadioGroup authenticatorSelection={property5} registering={property} onChange={property6} />;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
return (
<SafeAreaPaddingView
bottom
left
right
style={styles.flexContainer}
>
{view}
{r5}
<ButtonGroup>
<Button
text={property ? Reflect.apply(string, intl, [t.wePEBF]) : Reflect.apply(string, intl, [t.oibaQa])}
disabled={property}
loading={property}
onPress={onPress_101129}
size="lg"
/>
</ButtonGroup>
</SafeAreaPaddingView>
);
}
function _fun101126(a0) { // fn#101126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13451:1818, offset: 0x02209183, size: 38 bytes, params: 2, frame: 13
const binding = env0_0;
const push = binding.push;
const NAME = WebAuthnScreens.NAME;
Reflect.apply(push, binding, [NAME, a0]);
}
function _fun101127() { // fn#101127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13451:1859, offset: 0x022091a9, size: 20 bytes, params: 1, frame: 2
return env1_11[env0_3];
}
function _fun101128() { // fn#101128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13451:1887, offset: 0x022091bd, size: 34 bytes, params: 1, frame: 3
return {onRegisterSuccess: env0_4, setError: env0_2, setRegistering: env0_1};
}
function WebAuthnRegisterStepOnPress() { // fn#101129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13451:2639, owner: WebAuthnRegisterStep.onPress, offset: 0x022091df, size: 20 bytes, params: 1, frame: 11
return env0_5(env0_6);
}
@@ -0,0 +1,41 @@
/* Metro module 13265; source: modules/webauthn/native/nav_steps/WebAuthnSuccessStep.tsx; dependencies: [31, 33, 1484, 5282, 13250, 13266, 1244, 2] */
function _fun101139(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13455:6, offset: 0x0220984a, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/webauthn/native/nav_steps/WebAuthnSuccessStep.tsx');
exports.default = WebAuthnSuccessStep;
}
function WebAuthnSuccessStep() { // fn#101140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13455:221, offset: 0x022098d8, size: 166 bytes, params: 1, frame: 18
env0_3.useLayoutEffect(_fun101141,
[(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation()]);
const UserSettingsAccountBackupCodes = importDefault(13266) /* metro dependency 13266: UserSettingsAccountBackupCodes */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<UserSettingsAccountBackupCodes
onGenerate={null}
headerLabel={intl.format((require(1244) /* metro dependency 1244: indexNative */).t.iVTs6i, {})}
/>
);
}
function _fun101141() { // fn#101141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13455:308, offset: 0x0220997e, size: 72 bytes, params: 1, frame: 15
var environment;
const binding = env0_0;
const setOptions = binding.setOptions;
const object2 = {};
const value = environment.__proto__;
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun101142);
Reflect.apply(setOptions, binding, [object2]);
}
function _fun101142() { // fn#101142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13455:368, offset: 0x022099c6, size: 54 bytes, params: 1, frame: 11
let value = environment.__proto__;
env1_0.popToTop();
value = environment.__proto__.__proto__;
(importDefault(13250) /* metro dependency 13250: PasskeyUpsellActionCreators */).closePasskeyUpsellModal();
}