This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

+25 -21
View File
@@ -1,29 +1,33 @@
/* Metro module 12043; source: modules/nuf/NUFActionCreators.tsx; dependencies: [694, 2] */
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun92541(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12229:6, offset: 0x0208ec18, size: 112 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/NUFActionCreators.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/NUFActionCreators.tsx');
exports.setNewUser = setNewUser;
exports.setNewUserFlowCompleted = setNewUserFlowCompleted;
function setNewUser(a0) { // fn#92542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12229:172, offset: 0x0208ec88, size: 53 bytes, params: 2, frame: 12
const env0_0 = a0;
(Dispatcher).wait(_fun92543);
function _fun92543() { // fn#92543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12229:209, offset: 0x0208ecbd, size: 60 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (Dispatcher).dispatch({type: 'NUF_NEW_USER',
newUserType: env0_0});
}
}
function setNewUserFlowCompleted() { // fn#92544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12229:296, offset: 0x0208ecf9, size: 46 bytes, params: 1, frame: 12
(Dispatcher).wait(_fun92545);
function _fun92545() { // fn#92545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12229:345, offset: 0x0208ed27, size: 46 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (Dispatcher).dispatch({type: 'NUF_COMPLETE'});
}
}
}
function setNewUser(a0) { // fn#92542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12229:172, offset: 0x0208ec88, size: 53 bytes, params: 2, frame: 12
const env0_0 = a0;
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun92543);
}
function setNewUserFlowCompleted() { // fn#92544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12229:296, offset: 0x0208ecf9, size: 46 bytes, params: 1, frame: 12
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun92545);
}
function _fun92543() { // fn#92543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12229:209, offset: 0x0208ecbd, size: 60 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NUF_NEW_USER',
newUserType: env0_0});
}
function _fun92545() { // fn#92545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12229:345, offset: 0x0208ed27, size: 46 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NUF_COMPLETE'});
}
global.__d(_fun92541, 12043, [694, 2]) /* metro module 12043, dependencies: [694, 2] */;
+13 -11
View File
@@ -1,19 +1,21 @@
/* Metro module 12022; source: modules/nuf/NUFConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun92361(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12208:6, offset: 0x02085945, size: 181 bytes, params: 8, frame: 16
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {MARKETING_UNCLAIMED: 0};
object2[0] = 'MARKETING_UNCLAIMED';
object2.INVITE_UNCLAIMED = 1;
object2[1] = 'INVITE_UNCLAIMED';
object2.ORGANIC_REGISTERED = 2;
object2[2] = 'ORGANIC_REGISTERED';
object2.ORGANIC_REGISTERED_GUILD_TEMPLATE = 3;
object2[3] = 'ORGANIC_REGISTERED_GUILD_TEMPLATE';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/NUFConstants.tsx');
exports.NewUserTypes = object2;
object = {MARKETING_UNCLAIMED: 0};
object[0] = 'MARKETING_UNCLAIMED';
object.INVITE_UNCLAIMED = 1;
object[1] = 'INVITE_UNCLAIMED';
object.ORGANIC_REGISTERED = 2;
object[2] = 'ORGANIC_REGISTERED';
object.ORGANIC_REGISTERED_GUILD_TEMPLATE = 3;
object[3] = 'ORGANIC_REGISTERED_GUILD_TEMPLATE';
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/NUFConstants.tsx');
exports.NewUserTypes = object;
exports.NUF_NOTIFICATION_MODAL_KEY = 'nuf-notification-modal-key';
exports.NUF_DISCOVERABILITY_MODAL_KEY = 'nuf-discoverability-modal-key';
}
global.__d(_fun92361, 12022, [2]) /* metro module 12022, dependencies: [2] */;
+81 -64
View File
@@ -1,77 +1,94 @@
/* Metro module 4256; source: modules/nuf/NewUserStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun35377(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#35377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4428:6, offset: 0x0107119b, size: 293 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
let value = _fun35381(PersistedStore);
value.displayName = 'NewUserStore';
value.persistKey = 'nuf';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {NUF_NEW_USER: NUF_NEW_USER,
NUF_COMPLETE: NUF_COMPLETE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/NewUserStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/NewUserStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_35378() { // fn#35378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4428:148, offset: 0x010712c0, size: 94 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) {
function _isNativeReflectConstruct_35378() { // fn#35378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4428:148, offset: 0x010712c0, size: 94 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_35378_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_35378_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun35381(a0) { // fn#35381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4428:358, offset: 0x0107131e, size: 114 bytes, params: 2, frame: 16
const closure = NewUserStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: value_35383}, {key: 'getType', value: value_35384},
{key: 'getState', value: value_35385}]);
}
function NUF_NEW_USER({newUserType}) { // fn#35386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4428:911, offset: 0x010713c9, size: 34 bytes, params: 2, frame: 9
env0_6.persist();
}
function NUF_COMPLETE() { // fn#35387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4428:981, offset: 0x010713eb, size: 27 bytes, params: 1, frame: 9
env0_6.persist();
}
function value_35383(a0) { // fn#35383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4428:648, offset: 0x01071390, size: 42 bytes, params: 2, frame: 5
let value = null;
const value2 = undefined;
const type = value == a0 ? value2 : a0.type;
const r2 = value != type ? type : value;
value = environment.__proto__;
return value2;
}
function value_35385() { // fn#35385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4428:774, offset: 0x010713ba, size: 15 bytes, params: 1, frame: 2
return {type: env1_5};
function _fun35381(a0) { // fn#35381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4428:358, offset: 0x0107131e, size: 114 bytes, params: 2, frame: 16
const NewUserStore2 = NewUserStore;
Inherits(NewUserStore2, a0);
return CreateClass(NewUserStore2, [{key: 'initialize', value: value_35383}, {key: 'getType', value: value_35384},
{key: 'getState', value: value_35385}]);
function NewUserStore() { // fn#35382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4428:370, offset: 0x00e3db8d, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, NewUserStore);
const value3 = env1_3(NewUserStore);
return env1_2(this, _isNativeReflectConstruct_35378() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_35383(a0) { // fn#35383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4428:648, offset: 0x01071390, size: 42 bytes, params: 2, frame: 5
let value = null;
const value2 = undefined;
const type = value == a0 ? value2 : a0.type;
const r2 = value != type ? type : value;
value = environment.__proto__;
return value2;
}
function value_35384() { // fn#35384, offset: 0x00e40571, size: 9 bytes, params: 1, frame: 1
return env1_5;
}
function value_35385() { // fn#35385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4428:774, offset: 0x010713ba, size: 15 bytes, params: 1, frame: 2
return {type: env1_5};
}
}
function NUF_NEW_USER({newUserType}) { // fn#35386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4428:911, offset: 0x010713c9, size: 34 bytes, params: 2, frame: 9
env0_6.persist();
}
function NUF_COMPLETE() { // fn#35387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4428:981, offset: 0x010713eb, size: 27 bytes, params: 1, frame: 9
env0_6.persist();
}
}
global.__d(_fun35377, 4256, [6, 7, 15, 17, 18, 566, 694,
2]) /* metro module 4256, dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */;
@@ -1,12 +1,16 @@
/* Metro module 14889; source: modules/nuf/native/GuildPushNotificationNudgeExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun112642(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15086:6, offset: 0x023d5d04, size: 177 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-04-guild-push-notification-nudge', 'kind': 'user',
defaultConfig: {'showOldSheet': true, 'showNewSheet': false}, variations: {[1]: {'showOldSheet': false,
'showNewSheet': false}, [2]: {'showOldSheet': false, 'showNewSheet': true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/GuildPushNotificationNudgeExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/GuildPushNotificationNudgeExperiment.tsx');
exports.default = value;
}
global.__d(_fun112642, 14889, [1854, 2]) /* metro module 14889, dependencies: [1854, 2] */;
+124 -122
View File
@@ -1,20 +1,20 @@
/* Metro module 12021; source: modules/nuf/native/NUFActionCreators.tsx; dependencies: [5, 11994, 5040, 1878, 12022, 661, 9006, 694, 5080, 12023, 1962, 9443, 12043, 12044, 676, 11997, 12001, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ConnectedAccountsStore from '../../../stores/ConnectedAccountsStore.tsx'; /* Metro dependency 5040 */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CreateGuildConstantsModule from '../../create_guild/native/CreateGuildConstants.tsx'; /* Metro dependency 9006 */
import * as ContactSyncModalStoreModule from '../../contact_sync/native/ContactSyncModalStore.tsx'; /* Metro dependency 11994 */
import * as NUFConstantsModule from '../NUFConstants.tsx'; /* Metro dependency 12022 */
function _fun92343(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:6, offset: 0x020852ed, size: 383 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 contactSyncModalStoreModule = require(11994) /* metro dependency 11994: ContactSyncModalStore */;
const env0_4 = contactSyncModalStoreModule.setAllowEmail;
const env0_5 = contactSyncModalStoreModule.setAllowSync;
const env0_6 = contactSyncModalStoreModule.setName;
const env0_7 = contactSyncModalStoreModule.useContactSyncModalStore;
const connectedAccountsStore = importDefault(5040) /* metro dependency 5040: ConnectedAccountsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_10 = (require(12022) /* metro dependency 12022: NUFConstants */).NUF_DISCOVERABILITY_MODAL_KEY;
const env0_11 = (require(661) /* metro dependency 661: Constants */).PlatformTypes;
const env0_12 = (require(9006) /* metro dependency 9006: CreateGuildConstants */).IN_APP_GUILD_TEMPLATES_MODAL_KEY;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/NUFActionCreators.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/NUFActionCreators.tsx');
exports.startOnboarding = startOnboarding_92347;
exports.nextOnboardingStep = nextOnboardingStep;
exports.previousOnboardingStep = previousOnboardingStep;
@@ -42,125 +42,127 @@ function _fun92343(global, require, importDefault, importAll, module, exports, d
}
return value3;
};
}
function _startContactSyncForDiscoverability() { // fn#92344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:319, offset: 0x0208546c, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun92346).apply(this, arguments);
function* _fun92346(a0) { // fn#92346, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:412, offset: 0x020854a9, size: 263 bytes, params: 2, frame: 19
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_9;
const currentUser = binding.getCurrentUser();
const value4 = undefined;
const phone = currentUser == null ? value4 : currentUser.phone;
binding = env2_8;
const getLocalAccount = binding.getLocalAccount;
const CONTACTS = env2_11.CONTACTS;
const isContactSyncEnabled2 = env2_0(env2_2[15]).isContactSyncEnabled(Reflect.apply(getLocalAccount, binding,
[CONTACTS]));
if (phone == null) {
throw new global.Error('Cannot start contact sync without a phone number');
}
env2_6(a0);
const value7 = env2_1(env2_2[16]);
yield value7.updateContactSyncEnabled({enabled: isContactSyncEnabled2, name: a0});
if (false) {
return undefined;
}
value = env2_0(env2_2[15]);
yield value.uploadContacts('[]', true);
return value4;
}
function _startContactSyncForDiscoverability() { // fn#92344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:319, offset: 0x0208546c, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun92346).apply(this, arguments);
}
function startOnboarding_92347() { // fn#92347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:846, offset: 0x020855b0, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ONBOARDING_START'});
}
function nextOnboardingStep({skip, skipAttempt}) { // fn#92348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:917, offset: 0x020855e1, size: 86 bytes, params: 2, frame: 15
skip = !(skip === undefined) && skip;
skipAttempt = !(skipAttempt === undefined) && skipAttempt;
const value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'ONBOARDING_STEP', skip: skip, skipAttempt: skipAttempt});
}
function previousOnboardingStep() { // fn#92349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:1040, offset: 0x02085637, size: 51 bytes, params: 1, frame: 12
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'ONBOARDING_STEP', 'back': true});
}
function transitionToNUFGuildTemplatesModal(a0) { // fn#92350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:1163, offset: 0x0208566a, size: 71 bytes, params: 2, frame: 16
const env0_0 = a0;
const defaultImport = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
defaultImport.pushLazy(env0_3(_fun92352), {}, IN_APP_GUILD_TEMPLATES_MODAL_KEY);
}
function transitionToHubEmailConnectionModal(a0) { // fn#92353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:1372, offset: 0x0208571a, size: 72 bytes, params: 2, frame: 15
let value = a1;
const r1 = value !== undefined ? value : false;
value = importDefault(9443) /* metro dependency 9443: HubEmailConnectionModalActionCreators */;
value.open({onCloseExtra: onCloseExtra, displayStudentPrompt: r1}, a0);
}
function openDiscoverabilityModal() { // fn#92355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:1593, offset: 0x020857bd, size: 64 bytes, params: 1, frame: 16
const defaultImport = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
defaultImport.pushLazy(env0_3(_fun92357), {}, NUF_DISCOVERABILITY_MODAL_KEY);
}
function closeDiscoverabilityModal(a0) { // fn#92358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:1817, offset: 0x0208587f, size: 84 bytes, params: 2, frame: 14
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(NUF_DISCOVERABILITY_MODAL_KEY);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ONBOARDING_STEP', skip: a0});
}
function* _fun92346(a0) { // fn#92346, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:412, offset: 0x020854a9, size: 263 bytes, params: 2, frame: 19
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_9;
const currentUser = binding.getCurrentUser();
const value4 = undefined;
const phone = currentUser == null ? value4 : currentUser.phone;
binding = env2_8;
const getLocalAccount = binding.getLocalAccount;
const CONTACTS = env2_11.CONTACTS;
const isContactSyncEnabled2 = env2_0(env2_2[15]).isContactSyncEnabled(Reflect.apply(getLocalAccount, binding,
[CONTACTS]));
if (phone == null) {
throw new global.Error('Cannot start contact sync without a phone number');
function startOnboarding_92347() { // fn#92347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:846, offset: 0x020855b0, size: 49 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'ONBOARDING_START'});
}
env2_6(a0);
const value7 = env2_1(env2_2[16]);
yield value7.updateContactSyncEnabled({enabled: isContactSyncEnabled2, name: a0});
if (false) {
return undefined;
function nextOnboardingStep({skip, skipAttempt}) { // fn#92348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:917, offset: 0x020855e1, size: 86 bytes, params: 2, frame: 15
skip = !(skip === undefined) && skip;
skipAttempt = !(skipAttempt === undefined) && skipAttempt;
Dispatcher.dispatch({type: 'ONBOARDING_STEP', skip: skip, skipAttempt: skipAttempt});
}
value = env2_0(env2_2[15]);
yield value.uploadContacts('[]', true);
return value4;
}
function* _fun92352() { // fn#92352, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:1230, offset: 0x020856bc, size: 94 bytes, params: 1, frame: 14
if (false) {
return undefined;
function previousOnboardingStep() { // fn#92349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:1040, offset: 0x02085637, size: 51 bytes, params: 1, frame: 12
(Dispatcher).dispatch({'type': 'ONBOARDING_STEP', 'back': true});
}
value = environment.__proto__.__proto__;
const binding = env2_0;
const binding2 = env2_2;
value = binding(binding2[10]);
let property = binding2[9];
yield value(property, binding2.paths);
value = undefined;
if (false) {
return value;
function transitionToNUFGuildTemplatesModal(a0) { // fn#92350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:1163, offset: 0x0208566a, size: 71 bytes, params: 2, frame: 16
const env0_0 = a0;
const defaultImport = ModalActionCreators;
defaultImport.pushLazy(Module00005(_fun92352), {}, IN_APP_GUILD_TEMPLATES_MODAL_KEY);
function* _fun92352() { // fn#92352, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:1230, offset: 0x020856bc, size: 94 bytes, params: 1, frame: 14
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const binding = env2_0;
const binding2 = env2_2;
value = binding(binding2[10]);
let property = binding2[9];
yield value(property, binding2.paths);
value = undefined;
if (false) {
return value;
}
property = value.default;
value = environment.__proto__;
property.modalConfig = {animation: require};
return property;
}
}
property = value.default;
value = environment.__proto__;
property.modalConfig = {animation: require};
return property;
}
function onCloseExtra(a0) { // fn#92354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:1453, owner: transitionToHubEmailConnectionModal.onCloseExtra, offset: 0x02085762, size: 91 bytes, params: 2, frame: 13
const value = environment.__proto__;
if (a0) {
(require(12043) /* metro dependency 12043: NUFActionCreators */).setNewUserFlowCompleted();
} else {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ONBOARDING_STEP'});
function transitionToHubEmailConnectionModal(a0) { // fn#92353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:1372, offset: 0x0208571a, size: 72 bytes, params: 2, frame: 15
let value = a1;
const r1 = value !== undefined ? value : false;
value = importDefault(9443) /* metro dependency 9443: HubEmailConnectionModalActionCreators */;
value.open({onCloseExtra: onCloseExtra, displayStudentPrompt: r1}, a0);
function onCloseExtra(a0) { // fn#92354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:1453, owner: transitionToHubEmailConnectionModal.onCloseExtra, offset: 0x02085762, size: 91 bytes, params: 2, frame: 13
const value = environment.__proto__;
if (a0) {
(require(12043) /* metro dependency 12043: NUFActionCreators */).setNewUserFlowCompleted();
} else {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ONBOARDING_STEP'});
}
}
}
}
function* _fun92357() { // fn#92357, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:1649, offset: 0x02085808, size: 119 bytes, params: 1, frame: 17
if (false) {
return undefined;
function openDiscoverabilityModal() { // fn#92355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:1593, offset: 0x020857bd, size: 64 bytes, params: 1, frame: 16
const defaultImport = ModalActionCreators;
defaultImport.pushLazy(Module00005(_fun92357), {}, NUF_DISCOVERABILITY_MODAL_KEY);
function* _fun92357() { // fn#92357, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:1649, offset: 0x02085808, size: 119 bytes, params: 1, frame: 17
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const binding = env2_0;
const binding2 = env2_2;
const value3 = binding(binding2[10]);
let property = binding2[13];
yield value3(property, binding2.paths);
const value4 = undefined;
if (false) {
return value4;
}
property = value4.default;
const ModalAnimation = env2_0(env2_2[14]).ModalAnimation;
const SLIDE_IN_OUT = ModalAnimation.SLIDE_IN_OUT;
property.modalConfig = {animation: SLIDE_IN_OUT};
return property;
}
}
value = environment.__proto__.__proto__;
const binding = env2_0;
const binding2 = env2_2;
const value3 = binding(binding2[10]);
let property = binding2[13];
yield value3(property, binding2.paths);
const value4 = undefined;
if (false) {
return value4;
function closeDiscoverabilityModal(a0) { // fn#92358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12207:1817, offset: 0x0208587f, size: 84 bytes, params: 2, frame: 14
(ModalActionCreators).popWithKey(NUF_DISCOVERABILITY_MODAL_KEY);
(Dispatcher).dispatch({type: 'ONBOARDING_STEP', skip: a0});
}
property = value4.default;
const ModalAnimation = env2_0(env2_2[14]).ModalAnimation;
const SLIDE_IN_OUT = ModalAnimation.SLIDE_IN_OUT;
property.modalConfig = {animation: SLIDE_IN_OUT};
return property;
}
global.__d(_fun92343, 12021, [5, 11994, 5040, 1878, 12022, 661, 9006, 694, 5080, 12023, 1962, 9443, 12043, 12044,
676, 11997, 12001,
2]) /* metro module 12021, dependencies: [5, 11994, 5040, 1878, 12022, 661, 9006, 694, 5080, 12023, 1962, 9443, 12043, 12044, 676, 11997, 12001, 2] */;
@@ -1,24 +1,28 @@
/* Metro module 12000; source: modules/nuf/native/NewUserAnalyticsUtils.tsx; dependencies: [661, 683, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun92198(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12186:6, offset: 0x0207f70c, size: 124 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/NewUserAnalyticsUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/NewUserAnalyticsUtils.tsx');
exports.trackNUFStep = trackNUFStep;
function trackNUFStep(a0, a1, a2) { // fn#92199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12186:218, offset: 0x0207f788, size: 149 bytes, params: 4, frame: 19
const Date = global.Date;
const value3 = (Date.now() - env0_3) / 1000;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const NUO_TRANSITION = AnalyticEvents.NUO_TRANSITION;
const object = {};
copyDataProperties(object, a2, undefined);
object['flow_type'] = 'Mobile NUX Post Reg';
object['from_step'] = a0;
object['to_step'] = a1;
object['seconds_on_from_step'] = value3;
Reflect.apply(track, defaultImport, [NUO_TRANSITION, object]);
}
}
function trackNUFStep(a0, a1, a2) { // fn#92199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12186:218, offset: 0x0207f788, size: 149 bytes, params: 4, frame: 19
const Date = global.Date;
const value3 = (Date.now() - env0_3) / 1000;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const NUO_TRANSITION = AnalyticEvents.NUO_TRANSITION;
const object2 = {};
copyDataProperties(object2, a2, undefined);
object2['flow_type'] = 'Mobile NUX Post Reg';
object2['from_step'] = a0;
object2['to_step'] = a1;
object2['seconds_on_from_step'] = value3;
Reflect.apply(track, defaultImport, [NUO_TRANSITION, object2]);
}
global.__d(_fun92198, 12000, [661, 683, 2]) /* metro module 12000, dependencies: [661, 683, 2] */;
+240 -228
View File
@@ -1,257 +1,269 @@
/* Metro module 15776; source: modules/nuf/native/NewUserManager.tsx; dependencies: [5, 7, 6, 15, 17, 18, 8972, 5040, 1878, 4256, 12022, 661, 9445, 15777, 11993, 12021, 676, 9151, 694, 12000, 12043, 4860, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import NewUserStore from '../NewUserStore.tsx'; /* Metro dependency 4256 */
import AutomaticLifecycleManager from '../../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
import ConnectedAccountsStore from '../../../stores/ConnectedAccountsStore.tsx'; /* Metro dependency 5040 */
import PhoneStore from '../../phone/PhoneStore.tsx'; /* Metro dependency 8972 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ConstantsIOSModule from '../../../ConstantsIOS.tsx'; /* Metro dependency 676 */
import * as HubConstantsModule from '../../hub/HubConstants.tsx'; /* Metro dependency 9445 */
import * as NUFActionCreatorsModule from './NUFActionCreators.tsx'; /* Metro dependency 12021 */
import * as NUFConstantsModule from '../NUFConstants.tsx'; /* Metro dependency 12022 */
function _fun121230(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:6, offset: 0x025419de, size: 768 bytes, params: 8, frame: 21
var object5;
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(7) /* metro dependency 7 */;
const env0_5 = importDefault(6) /* metro dependency 6 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
const phoneStore = importDefault(8972) /* metro dependency 8972: PhoneStore */;
const connectedAccountsStore = importDefault(5040) /* metro dependency 5040: ConnectedAccountsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const newUserStore = importDefault(4256) /* metro dependency 4256: NewUserStore */;
const env0_13 = (require(12022) /* metro dependency 12022: NUFConstants */).NewUserTypes;
const env0_14 = (require(661) /* metro dependency 661: Constants */).PlatformTypes;
const env0_15 = (require(9445) /* metro dependency 9445: HubConstants */).HUBS_IN_ONBOARDING_COUNTRIES;
object5 = {REGISTRATION: 'Registration', ADD_AVATAR: 'Add Avatar', CONTACT_SYNC: 'Contact Sync',
object = {REGISTRATION: 'Registration', ADD_AVATAR: 'Add Avatar', CONTACT_SYNC: 'Contact Sync',
GUILD_TEMPLATE: 'Guild Template', STUDENT_HUB: 'Student Hub', NEW_USER_INTENT: 'New User Intent',
ACCEPT_INVITE: 'Accept Invite', DISCOVERABILITY: 'Discoverability'};
const object6 = {};
const ADD_AVATAR = object5.ADD_AVATAR;
object6.key = ADD_AVATAR;
object6.shouldShowStep = shouldShowStep;
object6.transitionToStep = (require(15777) /* metro dependency 15777: AddAvatarModalActionCreators */).openAddAvatarModal;
const object8 = {};
const CONTACT_SYNC = object5.CONTACT_SYNC;
object8.key = CONTACT_SYNC;
object8.shouldShowStep = shouldShowStep_121235;
object8.transitionToStep = (require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */).openContactSyncModalOnboarding;
const items2 = [object6];
const object9 = {};
const DISCOVERABILITY = object5.DISCOVERABILITY;
object9.key = DISCOVERABILITY;
object9.shouldShowStep = shouldShowStep_121236;
object9.transitionToStep = (require(12021) /* metro dependency 12021: NUFActionCreators */).openDiscoverabilityModal;
items2[1] = object9;
items2[2] = object8;
const STUDENT_HUB = object5.STUDENT_HUB;
const object2 = {};
const ADD_AVATAR = object.ADD_AVATAR;
object2.key = ADD_AVATAR;
object2.shouldShowStep = shouldShowStep;
object2.transitionToStep = (require(15777) /* metro dependency 15777: AddAvatarModalActionCreators */).openAddAvatarModal;
const object3 = {};
const CONTACT_SYNC = object.CONTACT_SYNC;
object3.key = CONTACT_SYNC;
object3.shouldShowStep = shouldShowStep_121235;
object3.transitionToStep = (require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */).openContactSyncModalOnboarding;
const items2 = [object2];
const object4 = {};
const DISCOVERABILITY = object.DISCOVERABILITY;
object4.key = DISCOVERABILITY;
object4.shouldShowStep = shouldShowStep_121236;
object4.transitionToStep = (require(12021) /* metro dependency 12021: NUFActionCreators */).openDiscoverabilityModal;
items2[1] = object4;
items2[2] = object3;
const STUDENT_HUB = object.STUDENT_HUB;
items2[3] = {key: STUDENT_HUB, shouldShowStep: shouldShowStep_121237, transitionToStep: transitionToStep};
const GUILD_TEMPLATE = object5.GUILD_TEMPLATE;
const GUILD_TEMPLATE = object.GUILD_TEMPLATE;
items2[4] = {key: GUILD_TEMPLATE, shouldShowStep: function() {
return NewUserStore.getType() === NewUserTypes.ORGANIC_REGISTERED;
}, transitionToStep: transitionToStep_121240};
const object10 = {};
const ACCEPT_INVITE = object5.ACCEPT_INVITE;
object10.key = ACCEPT_INVITE;
object10.shouldShowStep = (require(9151) /* metro dependency 9151: InstantInviteUtils */).hasDeferredInvite;
object10.transitionToStep = transitionToStep_121241;
items2[5] = object10;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
const object7 = {};
const ACCEPT_INVITE = object.ACCEPT_INVITE;
object7.key = ACCEPT_INVITE;
object7.shouldShowStep = (require(9151) /* metro dependency 9151: InstantInviteUtils */).hasDeferredInvite;
object7.transitionToStep = transitionToStep_121241;
items2[5] = object7;
let value = AutomaticLifecycleManager;
value = _fun121242(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/NewUserManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/NewUserManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_121231() { // fn#121231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:287, offset: 0x02541cde, 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) {
function _isNativeReflectConstruct_121231() { // fn#121231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:287, offset: 0x02541cde, 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_121231_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_121231_isNativeReflectConstruct = function() {
return !!result;
})();
}
function shouldShowStep() { // fn#121234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:802, offset: 0x02541d40, size: 39 bytes, params: 1, frame: 11
return UserStore.getCurrentUser()?.avatar == null;
}
function shouldShowStep_121235() { // fn#121235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:957, offset: 0x02541d67, size: 83 bytes, params: 1, frame: 13
var value;
const getLocalAccount = ConnectedAccountsStore.getLocalAccount;
const CONTACTS = PlatformTypes.CONTACTS;
const value2 = Reflect.apply(getLocalAccount, ConnectedAccountsStore, [CONTACTS]);
let r0 = value2 == null || !value2.friendSync;
if (r0) {
value = UserStore.getCurrentUser();
value = value?.phone != null;
r0 = value;
function shouldShowStep() { // fn#121234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:802, offset: 0x02541d40, size: 39 bytes, params: 1, frame: 11
return UserStore.getCurrentUser()?.avatar == null;
}
return r0;
}
function shouldShowStep_121236() { // fn#121236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:1186, offset: 0x02541dba, size: 36 bytes, params: 1, frame: 11
const getLocalAccount = ConnectedAccountsStore.getLocalAccount;
const CONTACTS = PlatformTypes.CONTACTS;
return Reflect.apply(getLocalAccount, ConnectedAccountsStore, [CONTACTS]) == null;
}
function shouldShowStep_121237() { // fn#121237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:1314, offset: 0x02541dde, size: 82 bytes, params: 1, frame: 13
const type = NewUserStore.getType();
const ORGANIC_REGISTERED = NewUserTypes.ORGANIC_REGISTERED;
if (type !== ORGANIC_REGISTERED) {
return false;
function shouldShowStep_121235() { // fn#121235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:957, offset: 0x02541d67, size: 83 bytes, params: 1, frame: 13
var value;
const connectedAccountsStoreBinding = ConnectedAccountsStore;
const getLocalAccount = connectedAccountsStoreBinding.getLocalAccount;
const CONTACTS = PlatformTypes.CONTACTS;
const value2 = Reflect.apply(getLocalAccount, connectedAccountsStoreBinding, [CONTACTS]);
let r0 = value2 == null || !value2.friendSync;
if (r0) {
value = UserStore.getCurrentUser();
value = value?.phone != null;
r0 = value;
}
return r0;
}
return HUBS_IN_ONBOARDING_COUNTRIES.includes(PhoneStore.getCountryCode()?.alpha2);
}
function transitionToStep() { // fn#121238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:1452, offset: 0x02541e30, size: 65 bytes, params: 1, frame: 15
const value = require(12021) /* metro dependency 12021: NUFActionCreators */;
const transitionToHubEmailConnectionModal = value.transitionToHubEmailConnectionModal;
const ModalAnimation = (require(676) /* metro dependency 676: ConstantsIOS */).ModalAnimation;
const SLIDE_IN = ModalAnimation.SLIDE_IN;
Reflect.apply(transitionToHubEmailConnectionModal, value, [SLIDE_IN, true]);
}
function transitionToStep_121240() { // fn#121240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:1634, offset: 0x02541e92, size: 62 bytes, params: 1, frame: 14
const value = require(12021) /* metro dependency 12021: NUFActionCreators */;
const transitionToNUFGuildTemplatesModal = value.transitionToNUFGuildTemplatesModal;
const ModalAnimation = (require(676) /* metro dependency 676: ConstantsIOS */).ModalAnimation;
const SLIDE_IN = ModalAnimation.SLIDE_IN;
return Reflect.apply(transitionToNUFGuildTemplatesModal, value, [SLIDE_IN]);
}
function transitionToStep_121241() { // fn#121241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:1797, offset: 0x02541ed0, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DEFERRED_INVITE_SHOW'});
}
function _fun121242(a0) { // fn#121242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:1856, offset: 0x02541f01, size: 42 bytes, params: 2, frame: 14
const closure = NewUserManager;
env0_8(closure, a0);
return env0_4(closure);
}
function NewUserManager(a0) { // fn#121243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:1868, offset: 0x02541f2b, size: 191 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_5;
binding(this, NewUserManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_7(NewUserManager);
binding = env1_6;
if (_isNativeReflectConstruct_121231()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
function shouldShowStep_121236() { // fn#121236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:1186, offset: 0x02541dba, size: 36 bytes, params: 1, frame: 11
const connectedAccountsStoreBinding = ConnectedAccountsStore;
const getLocalAccount = connectedAccountsStoreBinding.getLocalAccount;
const CONTACTS = PlatformTypes.CONTACTS;
return Reflect.apply(getLocalAccount, connectedAccountsStoreBinding, [CONTACTS]) == null;
}
value = binding(this, r0);
value._onboardingStepIndex = -1;
value._lastStep = null;
value.actions = {ONBOARDING_STEP: ONBOARDING_STEP};
value.handleOnboardingStep = _fun121245();
return value;
}
function ONBOARDING_STEP(a0) { // fn#121244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:2166, owner: NewUserManager.ONBOARDING_STEP, offset: 0x02541fea, size: 25 bytes, params: 2, frame: 11
env0_0.handleOnboardingStep(a0);
}
function _fun121245() { // fn#121245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:2221, offset: 0x02542003, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun121247);
return _fun121248;
}
async function _fun121247({skip, skipAttempt, back}) { // fn#121247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:2241, offset: 0x0254203b, size: 556 bytes, params: 2, frame: 27
var key;
var binding;
var property;
var transitionToStep;
var value12;
var value13;
var binding2;
var value14;
var value16;
var value17;
var value18;
if (false) {
return undefined;
function shouldShowStep_121237() { // fn#121237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:1314, offset: 0x02541dde, size: 82 bytes, params: 1, frame: 13
const type = NewUserStore.getType();
const ORGANIC_REGISTERED = NewUserTypes.ORGANIC_REGISTERED;
if (type !== ORGANIC_REGISTERED) {
return false;
}
return HUBS_IN_ONBOARDING_COUNTRIES.includes(PhoneStore.getCountryCode()?.alpha2);
}
value = undefined;
skip = !(skip === value) && skip;
skipAttempt = !(skipAttempt === value) && skipAttempt;
back = !(back === value) && back;
await value;
if (false) {
return undefined;
function transitionToStep() { // fn#121238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:1452, offset: 0x02541e30, size: 65 bytes, params: 1, frame: 15
const transitionToHubEmailConnectionModal = NUFActionCreatorsModule.transitionToHubEmailConnectionModal;
const ModalAnimation = (ConstantsIOSModule).ModalAnimation;
const SLIDE_IN = ModalAnimation.SLIDE_IN;
Reflect.apply(transitionToHubEmailConnectionModal, NUFActionCreatorsModule, [SLIDE_IN, true]);
}
let _onboardingStepIndex = NewUserManager._onboardingStepIndex;
if (back) {
value16 = environment.__proto__.__proto__.__proto__.__proto__;
property = env4_16[_onboardingStepIndex];
value17 = null;
key = value17 == property ? value : property.key;
NewUserManager._lastStep = value17 != key ? key : value17;
_onboardingStepIndex = NewUserManager._onboardingStepIndex;
NewUserManager._onboardingStepIndex = _onboardingStepIndex - 1;
binding = env4_16;
_onboardingStepIndex = NewUserManager._onboardingStepIndex;
property = binding[_onboardingStepIndex];
key = property.key;
transitionToStep = property.transitionToStep;
binding = env4_0;
value18 = binding(env4_2[19]);
value18.trackNUFStep(NewUserManager._lastStep, key, {back: true});
transitionToStep();
} else {
NewUserManager._onboardingStepIndex = NewUserManager._onboardingStepIndex + 1;
if (NewUserManager._onboardingStepIndex >= env4_16.length) {
binding = env4_0;
binding2 = env4_2;
value14 = binding(binding2[19]);
value14.trackNUFStep(NewUserManager._lastStep, 'NUF Complete', {skip_attempt: skipAttempt});
binding(binding2[20]).setNewUserFlowCompleted();
function transitionToStep_121240() { // fn#121240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:1634, offset: 0x02541e92, size: 62 bytes, params: 1, frame: 14
const transitionToNUFGuildTemplatesModal = NUFActionCreatorsModule.transitionToNUFGuildTemplatesModal;
const ModalAnimation = (ConstantsIOSModule).ModalAnimation;
const SLIDE_IN = ModalAnimation.SLIDE_IN;
return Reflect.apply(transitionToNUFGuildTemplatesModal, NUFActionCreatorsModule, [SLIDE_IN]);
}
function transitionToStep_121241() { // fn#121241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:1797, offset: 0x02541ed0, size: 49 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'DEFERRED_INVITE_SHOW'});
}
function _fun121242(a0) { // fn#121242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:1856, offset: 0x02541f01, size: 42 bytes, params: 2, frame: 14
const NewUserManager2 = NewUserManager;
Inherits(NewUserManager2, a0);
return CreateClass(NewUserManager2);
function NewUserManager(a0) { // fn#121243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:1868, offset: 0x02541f2b, size: 191 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_5;
binding(this, NewUserManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(NewUserManager);
binding = env1_6;
if (_isNativeReflectConstruct_121231()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value._onboardingStepIndex = -1;
value._lastStep = null;
value.actions = {ONBOARDING_STEP: ONBOARDING_STEP};
value.handleOnboardingStep = _fun121245();
return value;
function ONBOARDING_STEP(a0) { // fn#121244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:2166, owner: NewUserManager.ONBOARDING_STEP, offset: 0x02541fea, size: 25 bytes, params: 2, frame: 11
env0_0.handleOnboardingStep(a0);
}
function _fun121245() { // fn#121245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:2221, offset: 0x02542003, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun121247);
return _fun121248;
async function _fun121247({skip, skipAttempt, back}) { // fn#121247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:2241, offset: 0x0254203b, size: 556 bytes, params: 2, frame: 27
var key;
var binding;
var property;
var transitionToStep;
var value12;
var value13;
var binding2;
var value14;
var value16;
var value17;
var value18;
if (false) {
return undefined;
}
value = undefined;
skip = !(skip === value) && skip;
skipAttempt = !(skipAttempt === value) && skipAttempt;
back = !(back === value) && back;
await value;
if (false) {
return undefined;
}
let _onboardingStepIndex = NewUserManager._onboardingStepIndex;
if (back) {
value16 = environment.__proto__.__proto__.__proto__.__proto__;
property = env4_16[_onboardingStepIndex];
value17 = null;
key = value17 == property ? value : property.key;
NewUserManager._lastStep = value17 != key ? key : value17;
_onboardingStepIndex = NewUserManager._onboardingStepIndex;
NewUserManager._onboardingStepIndex = _onboardingStepIndex - 1;
binding = env4_16;
_onboardingStepIndex = NewUserManager._onboardingStepIndex;
property = binding[_onboardingStepIndex];
key = property.key;
transitionToStep = property.transitionToStep;
binding = env4_0;
value18 = binding(env4_2[19]);
value18.trackNUFStep(NewUserManager._lastStep, key, {back: true});
transitionToStep();
} else {
NewUserManager._onboardingStepIndex = NewUserManager._onboardingStepIndex + 1;
if (NewUserManager._onboardingStepIndex >= env4_16.length) {
binding = env4_0;
binding2 = env4_2;
value14 = binding(binding2[19]);
value14.trackNUFStep(NewUserManager._lastStep, 'NUF Complete', {skip_attempt: skipAttempt});
binding(binding2[20]).setNewUserFlowCompleted();
return value;
}
property = env4_16[NewUserManager._onboardingStepIndex];
key = property.key;
var shouldShowStep = property.shouldShowStep;
transitionToStep = property.transitionToStep;
await shouldShowStep();
if (false) {
return undefined;
}
if (undefined) {
value12 = env4_0(env4_2[19]);
value12.trackNUFStep(NewUserManager._lastStep, key, {skip: skip, skip_attempt: skipAttempt});
property = env4_16[_onboardingStepIndex];
value13 = null;
key = value13 == property ? value : property.key;
NewUserManager._lastStep = value13 != key ? key : value13;
transitionToStep();
} else {
NewUserManager.handleOnboardingStep({skip: skip});
}
}
return value;
}
function _fun121248() { // fn#121248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15984:2980, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
}
property = env4_16[NewUserManager._onboardingStepIndex];
key = property.key;
var shouldShowStep = property.shouldShowStep;
transitionToStep = property.transitionToStep;
await shouldShowStep();
if (false) {
return undefined;
}
if (undefined) {
value12 = env4_0(env4_2[19]);
value12.trackNUFStep(NewUserManager._lastStep, key, {skip: skip, skip_attempt: skipAttempt});
property = env4_16[_onboardingStepIndex];
value13 = null;
key = value13 == property ? value : property.key;
NewUserManager._lastStep = value13 != key ? key : value13;
transitionToStep();
} else {
NewUserManager.handleOnboardingStep({skip: skip});
}
}
return value;
}
global.__d(_fun121230, 15776, [5, 7, 6, 15, 17, 18, 8972, 5040, 1878, 4256, 12022, 661, 9445, 15777, 11993, 12021,
676, 9151, 694, 12000, 12043, 4860,
2]) /* metro module 15776, dependencies: [5, 7, 6, 15, 17, 18, 8972, 5040, 1878, 4256, 12022, 661, 9445, 15777, 11993, 12021, 676, 9151, 694, 12000, 12043, 4860, 2] */;
+220 -205
View File
@@ -1,239 +1,254 @@
/* Metro module 15791; source: modules/nuf/native/NewUserUtils.tsx; dependencies: [5, 27, 14316, 5040, 1878, 661, 11995, 4661, 11997, 477, 9151, 694, 1485, 12000, 4007, 15792, 5080, 1230, 12043, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ConnectedAccountsStore from '../../../stores/ConnectedAccountsStore.tsx'; /* Metro dependency 5040 */
import ParentalConsentStore from '../../parent_tools/ParentalConsentStore.tsx'; /* Metro dependency 14316 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as Router_utilsModule from '../../routing/router_utils.tsx'; /* Metro dependency 1230 */
import * as NavigationRouteUtilsNativeModule from '../../main_tabs_v2/helpers/NavigationRouteUtils.native.tsx'; /* Metro dependency 4007 */
import * as NativePermissionConstantsModule from '../../native_permissions/NativePermissionConstants.tsx'; /* Metro dependency 4661 */
import * as ContactSyncConstantsModule from '../../contact_sync/native/ContactSyncConstants.tsx'; /* Metro dependency 11995 */
import * as NewUserAnalyticsUtilsModule from './NewUserAnalyticsUtils.tsx'; /* Metro dependency 12000 */
import * as NUFActionCreatorsModule from '../NUFActionCreators.tsx'; /* Metro dependency 12043 */
import * as NewUserModalTypesModule from './components/NewUserModalTypes.tsx'; /* Metro dependency 15792 */
function _fun121308(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:6, offset: 0x025442de, size: 558 bytes, params: 8, frame: 21
var object3;
const env0_0 = require;
const closure = function() {
return _getNextOnboardingStep.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importDefault(5) /* metro dependency 5 */;
const env0_4 = (require(27) /* metro dependency 27 */).NativeModules;
const parentalConsentStore = importDefault(14316) /* metro dependency 14316: ParentalConsentStore */;
const connectedAccountsStore = importDefault(5040) /* metro dependency 5040: ConnectedAccountsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_8 = constantsModule.PlatformTypes;
const env0_9 = constantsModule.Routes;
const env0_10 = (require(11995) /* metro dependency 11995: ContactSyncConstants */).ContactPermissions;
const env0_11 = (require(4661) /* metro dependency 4661: NativePermissionConstants */).NotificationAuthorizationStatus;
object3 = {key: 'choose-avatar', shouldShowStep: shouldShowStep_121317};
const object4 = {key: 'enable-notification'};
const value = Module00005;
object = {key: 'choose-avatar', shouldShowStep: shouldShowStep_121317};
const object2 = {key: 'enable-notification'};
const env0_12 = value(_fun121319);
object4.shouldShowStep = shouldShowStep_121320;
object2.shouldShowStep = shouldShowStep_121320;
const env0_13 = value(_fun121322);
const items2 = [object4, {key: 'contact-sync', shouldShowStep: shouldShowStep_121324}];
const items2 = [object2, {key: 'contact-sync', shouldShowStep: shouldShowStep_121324}];
items2[2] = {key: 'discoverability', shouldShowStep: function() {
return true;
}};
items2[3] = object3;
items2[3] = object;
items2[4] = {key: 'connect-guardian', shouldShowStep: function() {
return ParentalConsentStore.getShouldShowGuardianConnect();
}};
object3 = {key: 'accept-invite'};
object3.shouldShowStep = (require(9151) /* metro dependency 9151: InstantInviteUtils */).hasDeferredInvite;
object3.transitionStep = transitionStep;
items2[5] = object3;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/NewUserUtils.tsx');
object = {key: 'accept-invite'};
object.shouldShowStep = (require(9151) /* metro dependency 9151: InstantInviteUtils */).hasDeferredInvite;
object.transitionStep = transitionStep;
items2[5] = object;
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/NewUserUtils.tsx');
exports.getKeyForOnboardingStep = getKeyForOnboardingStep;
exports.continueToNextStep = continueToNextStep;
exports.getNextOnboardingStep = closure;
}
function _shouldSkipContactSyncStep() { // fn#121309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:381, offset: 0x0254450c, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun121311).apply(this, arguments);
}
function lastStepComplete(a0) { // fn#121312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:1382, offset: 0x025445de, size: 215 bytes, params: 2, frame: 17
(require(12000) /* metro dependency 12000: NewUserAnalyticsUtils */).trackNUFStep(a0, 'NUF Complete');
const navigationRouteUtilsNativeModule = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
const isModalOpen = navigationRouteUtilsNativeModule.isModalOpen;
const NEW_USER_MODAL_KEY = (require(15792) /* metro dependency 15792: NewUserModalTypes */).NEW_USER_MODAL_KEY;
if (Reflect.apply(isModalOpen, navigationRouteUtilsNativeModule, [NEW_USER_MODAL_KEY])) {
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(NEW_USER_MODAL_KEY);
}
const router_utilsModule = require(1230) /* metro dependency 1230: router_utils */;
const transitionTo = router_utilsModule.transitionTo;
const ME = Routes.ME;
Reflect.apply(transitionTo, router_utilsModule, [ME, {navigationReplace: true}]);
(require(12043) /* metro dependency 12043: NUFActionCreators */).setNewUserFlowCompleted();
}
function _getNextOnboardingStep() { // fn#121314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:1722, offset: 0x025446b5, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun121316).apply(this, arguments);
}
function shouldShowStep_121317() { // fn#121317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:308, offset: 0x02544877, size: 39 bytes, params: 1, frame: 11
return UserStore.getCurrentUser()?.avatar == null;
}
function* _fun121319() { // fn#121319, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:669, offset: 0x025448a9, size: 106 bytes, params: 1, frame: 13
var NativePermissionManager;
var value5;
if (false) {
return undefined;
}
value = environment.__proto__;
const isIOS2 = env1_0(env1_2[9]).isIOS();
const value4 = !!isIOS2;
if (isIOS2) {
NativePermissionManager = env1_4.NativePermissionManager;
yield NativePermissionManager.getNotificationAuthorizationStatus();
value5 = undefined;
if (false) {
return value5;
function _shouldSkipContactSyncStep() { // fn#121309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:381, offset: 0x0254450c, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun121311).apply(this, arguments);
function* _fun121311() { // fn#121311, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:456, offset: 0x02544549, size: 149 bytes, params: 1, frame: 16
var r3;
var value5;
var value6;
var value8;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const isContactSyncAvailable2 = env2_0(env2_2[8]).isContactSyncAvailable();
const value4 = !isContactSyncAvailable2;
if (isContactSyncAvailable2) {
value5 = env2_0(env2_2[8]);
yield value5.checkContactPermissions();
value6 = undefined;
if (false) {
return value6;
}
value8 = value6 === env2_10.UNAUTHORIZED;
if (value8) {
value = env2_0(env2_2[9]);
value = value.isIOS();
r3 = value;
} else {
r3 = value8;
}
return r3;
}
return value4;
}
return value5 !== env1_11.AUTHORIZED;
}
return value4;
}
function* _fun121322() { // fn#121322, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:883, offset: 0x0254491e, size: 93 bytes, params: 1, frame: 12
var environment;
if (false) {
return undefined;
}
value = environment.__proto__;
const binding = env1_6;
const getLocalAccount = binding.getLocalAccount;
const CONTACTS = env1_8.CONTACTS;
value = Reflect.apply(getLocalAccount, binding, [CONTACTS]);
const r1 = value != null && value.friendSync;
if (r1) {
return !r1;
}
yield shouldSkipContactSyncStep();
value = undefined;
if (false) {
return value;
}
return !value;
}
function transitionStep() { // fn#121327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:1325, offset: 0x025449ae, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DEFERRED_INVITE_SHOW'});
}
function getKeyForOnboardingStep(a0) { // fn#121328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:2489, offset: 0x025449df, size: 32 bytes, params: 2, frame: 3
return env0_14[a0]?.key;
}
function continueToNextStep(a0, a1) { // fn#121329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:2588, offset: 0x025449ff, size: 88 bytes, params: 3, frame: 16
const env0_0 = a1;
const property = env0_14[a0];
const value = undefined;
const key = property == null ? value : property.key;
if (key !== null) {
a1.navigate(key, {});
global.setTimeout(_fun121330, 500);
}
return value;
}
function* _fun121311() { // fn#121311, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:456, offset: 0x02544549, size: 149 bytes, params: 1, frame: 16
var r3;
var value5;
var value6;
var value8;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const isContactSyncAvailable2 = env2_0(env2_2[8]).isContactSyncAvailable();
const value4 = !isContactSyncAvailable2;
if (isContactSyncAvailable2) {
value5 = env2_0(env2_2[8]);
yield value5.checkContactPermissions();
value6 = undefined;
if (false) {
return value6;
function lastStepComplete(a0) { // fn#121312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:1382, offset: 0x025445de, size: 215 bytes, params: 2, frame: 17
(NewUserAnalyticsUtilsModule).trackNUFStep(a0, 'NUF Complete');
const isModalOpen = NavigationRouteUtilsNativeModule.isModalOpen;
const NEW_USER_MODAL_KEY = (NewUserModalTypesModule).NEW_USER_MODAL_KEY;
if (Reflect.apply(isModalOpen, NavigationRouteUtilsNativeModule, [NEW_USER_MODAL_KEY])) {
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(NEW_USER_MODAL_KEY);
}
value8 = value6 === env2_10.UNAUTHORIZED;
if (value8) {
value = env2_0(env2_2[9]);
value = value.isIOS();
r3 = value;
} else {
r3 = value8;
}
return r3;
const transitionTo = Router_utilsModule.transitionTo;
const ME = Routes.ME;
Reflect.apply(transitionTo, Router_utilsModule, [ME, {navigationReplace: true}]);
(NUFActionCreatorsModule).setNewUserFlowCompleted();
}
return value4;
}
async function _fun121316() { // fn#121316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:1789, offset: 0x025446fb, size: 380 bytes, params: 1, frame: 26
var object;
let value = a0;
if (false) {
return undefined;
}
const value4 = undefined;
const r15 = value !== value4 ? value : false;
await value4;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let property = env2_14[a1];
let key = property == null ? value4 : property.key;
const r5 = key ?? 'registration';
const value7 = a2 + 1;
if (value7 >= env2_14.length) {
env2_16(r5);
return {lastShownStepIndex: a1, onboardingStepIndex: value7, continueNavigation: false};
}
property = env2_14[value7];
key = property.key;
const shouldShowStep = property.shouldShowStep;
const transitionStep = property.transitionStep;
await shouldShowStep();
const value8 = undefined;
if (false) {
return value8;
}
if (value8) {
env2_0(env2_2[13]).trackNUFStep(r5, key, {skip: r15});
if (transitionStep != null) {
env2_16(key);
env2_1(env2_2[11]).wait(transitionStep);
object = {lastShownStepIndex: value7, onboardingStepIndex: value7, continueNavigation: false};
} else {
function _getNextOnboardingStep() { // fn#121314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:1722, offset: 0x025446b5, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun121316).apply(this, arguments);
async function _fun121316() { // fn#121316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:1789, offset: 0x025446fb, size: 380 bytes, params: 1, frame: 26
var object2;
let value = a0;
if (false) {
return undefined;
}
const value4 = undefined;
const r15 = value !== value4 ? value : false;
await value4;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let property = env2_14[a1];
let key = property == null ? value4 : property.key;
const r5 = key ?? 'registration';
const value7 = a2 + 1;
if (value7 >= env2_14.length) {
env2_16(r5);
return {lastShownStepIndex: a1, onboardingStepIndex: value7, continueNavigation: false};
}
property = env2_14[value7];
object = {lastShownStepIndex: value7, onboardingStepIndex: value7,
continueNavigation: (property == null ? value4 : property.transitionStep) == null};
key = property.key;
const shouldShowStep = property.shouldShowStep;
const transitionStep = property.transitionStep;
await shouldShowStep();
const value8 = undefined;
if (false) {
return value8;
}
if (value8) {
env2_0(env2_2[13]).trackNUFStep(r5, key, {skip: r15});
if (transitionStep != null) {
env2_16(key);
env2_1(env2_2[11]).wait(transitionStep);
object2 = {lastShownStepIndex: value7, onboardingStepIndex: value7, continueNavigation: false};
} else {
property = env2_14[value7];
object2 = {lastShownStepIndex: value7, onboardingStepIndex: value7,
continueNavigation: (property == null ? value4 : property.transitionStep) == null};
}
return object2;
}
await env2_17(r15, a1, value7);
value = undefined;
if (false) {
}
return value;
}
return object;
}
await env2_17(r15, a1, value7);
value = undefined;
if (false) {
}
return value;
}
function shouldSkipContactSyncStep() { // fn#121323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:969, offset: 0x0254497b, size: 30 bytes, params: 1, frame: 13
return env2_15.apply(this, arguments);
}
}
function _fun121330() { // fn#121330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:2697, offset: 0x02544a57, size: 142 bytes, params: 1, frame: 16
var items2;
var dispatch;
var CommonActions;
var reset;
var object2;
const state = require.getState();
const routes = state.routes;
if (routes.length === 2) {
items2 = [routes[1]];
dispatch = require.dispatch;
function shouldShowStep_121317() { // fn#121317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:308, offset: 0x02544877, size: 39 bytes, params: 1, frame: 11
return UserStore.getCurrentUser()?.avatar == null;
}
function* _fun121319() { // fn#121319, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:669, offset: 0x025448a9, size: 106 bytes, params: 1, frame: 13
var NativePermissionManager;
var value5;
if (false) {
return undefined;
}
value = environment.__proto__;
CommonActions = (require(1485) /* metro dependency 1485 */).CommonActions;
reset = CommonActions.reset;
object2 = {};
copyDataProperties(object2, state, items2);
object2['routes'] = items2;
object2['index'] = 0;
Reflect.apply(dispatch, require, [Reflect.apply(reset, CommonActions, [object2])]);
const isIOS2 = env1_0(env1_2[9]).isIOS();
const value4 = !!isIOS2;
if (isIOS2) {
NativePermissionManager = env1_4.NativePermissionManager;
yield NativePermissionManager.getNotificationAuthorizationStatus();
value5 = undefined;
if (false) {
return value5;
}
return value5 !== env1_11.AUTHORIZED;
}
return value4;
}
function shouldShowStep_121320() { // fn#121320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:795, offset: 0x00f29a76, size: 30 bytes, params: 1, frame: 13
return env0_12.apply(this, arguments);
}
function* _fun121322() { // fn#121322, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:883, offset: 0x0254491e, size: 93 bytes, params: 1, frame: 12
var environment;
if (false) {
return undefined;
}
value = environment.__proto__;
const binding = env1_6;
const getLocalAccount = binding.getLocalAccount;
const CONTACTS = env1_8.CONTACTS;
value = Reflect.apply(getLocalAccount, binding, [CONTACTS]);
const r1 = value != null && value.friendSync;
if (r1) {
return !r1;
}
yield shouldSkipContactSyncStep();
value = undefined;
if (false) {
return value;
}
return !value;
function shouldSkipContactSyncStep() { // fn#121323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:969, offset: 0x0254497b, size: 30 bytes, params: 1, frame: 13
return env2_15.apply(this, arguments);
}
}
function shouldShowStep_121324() { // fn#121324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:1070, offset: 0x00f29a05, size: 30 bytes, params: 1, frame: 13
return env0_13.apply(this, arguments);
}
function transitionStep() { // fn#121327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:1325, offset: 0x025449ae, size: 49 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'DEFERRED_INVITE_SHOW'});
}
function getKeyForOnboardingStep(a0) { // fn#121328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:2489, offset: 0x025449df, size: 32 bytes, params: 2, frame: 3
return env0_14[a0]?.key;
}
function continueToNextStep(a0, a1) { // fn#121329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:2588, offset: 0x025449ff, size: 88 bytes, params: 3, frame: 16
const env0_0 = a1;
const property = env0_14[a0];
const value = undefined;
const key = property == null ? value : property.key;
if (key !== null) {
a1.navigate(key, {});
global.setTimeout(_fun121330, 500);
}
return value;
function _fun121330() { // fn#121330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15999:2697, offset: 0x02544a57, size: 142 bytes, params: 1, frame: 16
var items2;
var dispatch;
var CommonActions;
var reset;
var object;
const state = require.getState();
const routes = state.routes;
if (routes.length === 2) {
items2 = [routes[1]];
dispatch = require.dispatch;
value = environment.__proto__;
CommonActions = (require(1485) /* metro dependency 1485 */).CommonActions;
reset = CommonActions.reset;
object = {};
copyDataProperties(object, state, items2);
object['routes'] = items2;
object['index'] = 0;
Reflect.apply(dispatch, require, [Reflect.apply(reset, CommonActions, [object])]);
}
}
}
}
global.__d(_fun121308, 15791, [5, 27, 14316, 5040, 1878, 661, 11995, 4661, 11997, 477, 9151, 694, 1485, 12000, 4007,
15792, 5080, 1230, 12043,
2]) /* metro module 15791, dependencies: [5, 27, 14316, 5040, 1878, 661, 11995, 4661, 11997, 477, 9151, 694, 1485, 12000, 4007, 15792, 5080, 1230, 12043, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,18 +1,22 @@
/* Metro module 11874; source: modules/nuf/native/NotificationPermissionUtil.tsx; dependencies: [57, 5, 31, 27, 11872, 11873, 661, 4661, 10744, 683, 11875, 11881, 11882, 566, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import PushNotificationPermissionStore from '../../../stores/native/PushNotificationPermissionStore.tsx'; /* Metro dependency 11872 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativePermissionConstantsModule from '../../native_permissions/NativePermissionConstants.tsx'; /* Metro dependency 4661 */
import * as NotificationPermissionConstantsModule from './components/notification/NotificationPermissionConstants.tsx'; /* Metro dependency 11873 */
import * as RegionalTeenUtilsModule from '../../regional_feature_config/RegionalTeenUtils.tsx'; /* Metro dependency 11882 */
function _fun91054(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:6, offset: 0x02051cd0, size: 335 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = useCanSeePushNotificationNudge;
const useCanSeePushNotificationNudge2 = useCanSeePushNotificationNudge;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).NativeModules;
const pushNotificationPermissionStore = importDefault(11872) /* metro dependency 11872: PushNotificationPermissionStore */;
const env0_8 = (require(11873) /* metro dependency 11873: NotificationPermissionConstants */).EventActionType;
const env0_9 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_10 = (require(4661) /* metro dependency 4661: NativePermissionConstants */).NotificationAuthorizationStatus;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/NotificationPermissionUtil.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/NotificationPermissionUtil.tsx');
exports.requestPushNotificationPermission = function() {
return _requestPushNotificationPermission.apply(this, arguments);
};
@@ -20,177 +24,182 @@ function _fun91054(global, require, importDefault, importAll, module, exports, d
exports.enableProvisionalPushNotification = function() {
return _enableProvisionalPushNotification.apply(this, arguments);
};
exports.useCanSeePushNotificationNudge = closure;
exports.useCanSeePushNotificationNudge = useCanSeePushNotificationNudge2;
exports.useShouldShowPushNotificationNudgeByPromptType = useShouldShowPushNotificationNudgeByPromptType;
}
function _requestPushNotificationPermission() { // fn#91055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:253, offset: 0x02051e1f, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun91057).apply(this, arguments);
function* _fun91057(a0, a1, a2) { // fn#91057, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:344, offset: 0x02051e5c, size: 277 bytes, params: 4, frame: 19
var environment;
var binding;
var binding2;
var value5;
if (true) {
var env0_0 = a0;
var env0_1 = a1;
var env0_2 = a2;
value = environment.__proto__.__proto__;
var NativePermissionManager = env2_6.NativePermissionManager;
var getNotificationAuthorizationStatus = NativePermissionManager.getNotificationAuthorizationStatus;
yield Reflect.apply(getNotificationAuthorizationStatus, NativePermissionManager, []);
var value3 = undefined;
if (false) {
return value3;
}
var DENIED = env2_10.DENIED;
if (value3 === DENIED) {
binding = env2_1;
binding2 = env2_2;
binding(binding2[8])();
value5 = binding(binding2[9]);
value5.track(env2_9.NOTIFICATION_PERMISSION_PREPROMPT_ACKED, {action_type: env2_8.TO_SETTINGS,
action_location: a1});
a2();
} else if (value3 === env2_10.AUTHORIZED) {
env2_0(env2_2[10]).updateNotificationAuthorizationStatus(value3);
a2();
} else {
env2_1(env2_2[11]).requestPermission(_fun91058);
}
}
function _fun91058(a0) { // fn#91058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:669, offset: 0x02051f71, size: 87 bytes, params: 2, frame: 16
const value2 = env3_1(env3_2[9]);
const track = value2.track;
const NOTIFICATION_PERMISSION_PREPROMPT_ACKED = env3_9.NOTIFICATION_PERMISSION_PREPROMPT_ACKED;
Reflect.apply(track, value2, [NOTIFICATION_PERMISSION_PREPROMPT_ACKED, {action_type: env0_0,
action_location: require, permission_granted: a0}]);
importDefault();
}
function _requestPushNotificationPermission() { // fn#91055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:253, offset: 0x02051e1f, size: 50 bytes, params: 1, frame: 14
return env0_4(_fun91057).apply(this, arguments);
}
function _enableProvisionalPushNotification() { // fn#91059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:818, offset: 0x02051fc8, size: 50 bytes, params: 1, frame: 14
return env0_4(_fun91061).apply(this, arguments);
}
function useCanSeePushNotificationNudge() { // fn#91064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:1343, offset: 0x02052110, size: 227 bytes, params: 1, frame: 17
const value2 = (require(11882) /* metro dependency 11882: RegionalTeenUtils */).useIsTeenInStrictCountry();
const authorizationStatus = (require(566) /* metro dependency 566: flux */).useStateFromStores([PushNotificationPermissionStore],
function() {
return PushNotificationPermissionStore.authorizationStatus;
});
const [property, env0_0] = env0_3(env0_5.useState(false), 2);
env0_5.useEffect(_fun91066, []);
return property && !value2 && authorizationStatus != null && [NotificationAuthorizationStatus.DENIED,
NotificationAuthorizationStatus.PROVISIONAL,
NotificationAuthorizationStatus.UNDETERMINED].includes(authorizationStatus);
}
function useShowReactivationPrompt() { // fn#91069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:2028, offset: 0x0205226f, size: 81 bytes, params: 1, frame: 15
let [property, env0_0] = env0_3(env0_5.useState(false), 2);
env0_5.useEffect(function() {
var env0_0 = _fun91071;
_fun91074();
}, []);
return property;
}
function useShouldShowPushNotificationNudgeByPromptType(a0) { // fn#91076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:2721, offset: 0x02052370, size: 83 bytes, params: 2, frame: 15
const value2 = useCanSeePushNotificationNudge();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
return value2 && Reflect.apply(useStateFromStores, fluxModule, [[PushNotificationPermissionStore], function() {
return PushNotificationPermissionStore.getState().eligiblePromptTypes;
}]).has(a0);
}
function* _fun91057(a0, a1, a2) { // fn#91057, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:344, offset: 0x02051e5c, size: 277 bytes, params: 4, frame: 19
var environment;
var binding;
var binding2;
var value5;
if (true) {
var env0_0 = a0;
var env0_1 = a1;
var env0_2 = a2;
value = environment.__proto__.__proto__;
var NativePermissionManager = env2_6.NativePermissionManager;
var getNotificationAuthorizationStatus = NativePermissionManager.getNotificationAuthorizationStatus;
yield Reflect.apply(getNotificationAuthorizationStatus, NativePermissionManager, []);
var value3 = undefined;
if (false) {
return value3;
}
var DENIED = env2_10.DENIED;
if (value3 === DENIED) {
binding = env2_1;
binding2 = env2_2;
binding(binding2[8])();
value5 = binding(binding2[9]);
value5.track(env2_9.NOTIFICATION_PERMISSION_PREPROMPT_ACKED, {action_type: env2_8.TO_SETTINGS,
action_location: a1});
a2();
} else if (value3 === env2_10.AUTHORIZED) {
env2_0(env2_2[10]).updateNotificationAuthorizationStatus(value3);
a2();
} else {
env2_1(env2_2[11]).requestPermission(_fun91058);
}
}
}
function* _fun91061() { // fn#91061, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:909, offset: 0x02052005, size: 99 bytes, params: 1, frame: 13
var environment;
if (true) {
value = environment.__proto__.__proto__;
var NativePermissionManager = env2_6.NativePermissionManager;
var getNotificationAuthorizationStatus = NativePermissionManager.getNotificationAuthorizationStatus;
yield Reflect.apply(getNotificationAuthorizationStatus, NativePermissionManager, []);
var value3 = undefined;
if (false) {
return value3;
function _enableProvisionalPushNotification() { // fn#91059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:818, offset: 0x02051fc8, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun91061).apply(this, arguments);
function* _fun91061() { // fn#91061, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:909, offset: 0x02052005, size: 99 bytes, params: 1, frame: 13
var environment;
if (true) {
value = environment.__proto__.__proto__;
var NativePermissionManager = env2_6.NativePermissionManager;
var getNotificationAuthorizationStatus = NativePermissionManager.getNotificationAuthorizationStatus;
yield Reflect.apply(getNotificationAuthorizationStatus, NativePermissionManager, []);
var value3 = undefined;
if (false) {
return value3;
}
var UNDETERMINED = env2_10.UNDETERMINED;
if (value3 === UNDETERMINED) {
env2_6.DCDProvisionalNotificationUtils.registerProvisionalNotification(_fun91062);
}
}
function _fun91062(a0) { // fn#91062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:1077, offset: 0x02052068, size: 119 bytes, params: 2, frame: 17
var environment;
const value = environment.__proto__.__proto__.__proto__;
const value2 = env3_1(env3_2[9]);
const track = value2.track;
const PERMISSIONS_ACKED = env3_9.PERMISSIONS_ACKED;
Reflect.apply(track, value2, [PERMISSIONS_ACKED, {type: 'provisional_notification',
action: a0 ? 'accepted' : 'denied'}]);
const NativePermissionManager = env3_6.NativePermissionManager;
NativePermissionManager.getNotificationAuthorizationStatus().then(_fun91063);
function _fun91063(a0) { // fn#91063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:1248, offset: 0x020520df, size: 49 bytes, params: 2, frame: 12
var value;
if (a0 != null) {
value = environment.__proto__.__proto__.__proto__.__proto__;
value = env4_0(env4_2[10]);
value.updateNotificationAuthorizationStatus(a0);
}
}
}
}
var UNDETERMINED = env2_10.UNDETERMINED;
if (value3 === UNDETERMINED) {
env2_6.DCDProvisionalNotificationUtils.registerProvisionalNotification(_fun91062);
}
function useCanSeePushNotificationNudge() { // fn#91064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:1343, offset: 0x02052110, size: 227 bytes, params: 1, frame: 17
const value2 = (RegionalTeenUtilsModule).useIsTeenInStrictCountry();
const authorizationStatus = (require(566) /* metro dependency 566: flux */).useStateFromStores([PushNotificationPermissionStore],
function() {
return PushNotificationPermissionStore.authorizationStatus;
});
const [property, env0_0] = Module00057(ReactModule.useState(false), 2);
ReactModule.useEffect(_fun91066, []);
return property && !value2 && authorizationStatus != null && [NotificationAuthorizationStatus.DENIED,
NotificationAuthorizationStatus.PROVISIONAL,
NotificationAuthorizationStatus.UNDETERMINED].includes(authorizationStatus);
function _fun91066() { // fn#91066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:1550, offset: 0x02052202, size: 46 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
const NativePermissionManager = NativeModules.NativePermissionManager;
NativePermissionManager.getNotificationAuthorizationStatus().then(_fun91067);
function _fun91067(a0) { // fn#91067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:1624, offset: 0x02052230, size: 63 bytes, params: 2, frame: 12
var value;
if (a0 != null) {
value = environment.__proto__.__proto__;
value = require(11875) /* metro dependency 11875: PushNotificationActionCreators */;
value.updateNotificationAuthorizationStatus(a0);
}
value = environment.__proto__;
env1_0(true);
}
}
}
}
function _fun91066() { // fn#91066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:1550, offset: 0x02052202, size: 46 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
const NativePermissionManager = NativeModules.NativePermissionManager;
NativePermissionManager.getNotificationAuthorizationStatus().then(_fun91067);
}
function useShowReactivationPrompt() { // fn#91069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:2028, offset: 0x0205226f, size: 81 bytes, params: 1, frame: 15
let [property, env0_0] = Module00057(ReactModule.useState(false), 2);
ReactModule.useEffect(function() {
var env0_0 = _fun91071;
_fun91074();
}, []);
return property;
function _fun91070() { // fn#91070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:2129, offset: 0x020522c0, size: 31 bytes, params: 1, frame: 9
(function() {
return _shouldShowReactivationPrompts.apply(this, arguments);
})();
function _shouldShowReactivationPrompts() { // fn#91071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:2134, offset: 0x020522df, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_4(_fun91073).apply(this, arguments);
function* _fun91073() { // fn#91073, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:2217, offset: 0x0205231f, size: 81 bytes, params: 1, frame: 13
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
var NativePermissionManager = env4_6.NativePermissionManager;
var getNotificationAuthorizationStatus = NativePermissionManager.getNotificationAuthorizationStatus;
yield Reflect.apply(getNotificationAuthorizationStatus, NativePermissionManager, []);
var value3 = undefined;
if (false) {
return value3;
}
var AUTHORIZED = env4_10.AUTHORIZED;
if (value3 !== AUTHORIZED) {
value = environment.__proto__.__proto__.__proto__;
require(true);
}
}
}
function _fun91070() { // fn#91070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:2129, offset: 0x020522c0, size: 31 bytes, params: 1, frame: 9
(function() {
return _shouldShowReactivationPrompts.apply(this, arguments);
})();
}
}
function _fun91058(a0) { // fn#91058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:669, offset: 0x02051f71, size: 87 bytes, params: 2, frame: 16
const value2 = env3_1(env3_2[9]);
const track = value2.track;
const NOTIFICATION_PERMISSION_PREPROMPT_ACKED = env3_9.NOTIFICATION_PERMISSION_PREPROMPT_ACKED;
Reflect.apply(track, value2, [NOTIFICATION_PERMISSION_PREPROMPT_ACKED, {action_type: env0_0,
action_location: require, permission_granted: a0}]);
importDefault();
}
function shouldShowReactivationPrompts() { // fn#91074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:2349, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return _shouldShowReactivationPrompts.apply(this, arguments);
}
function _fun91062(a0) { // fn#91062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:1077, offset: 0x02052068, size: 119 bytes, params: 2, frame: 17
var environment;
const value = environment.__proto__.__proto__.__proto__;
const value2 = env3_1(env3_2[9]);
const track = value2.track;
const PERMISSIONS_ACKED = env3_9.PERMISSIONS_ACKED;
Reflect.apply(track, value2, [PERMISSIONS_ACKED, {type: 'provisional_notification',
action: a0 ? 'accepted' : 'denied'}]);
const NativePermissionManager = env3_6.NativePermissionManager;
NativePermissionManager.getNotificationAuthorizationStatus().then(_fun91063);
}
function _fun91067(a0) { // fn#91067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:1624, offset: 0x02052230, size: 63 bytes, params: 2, frame: 12
var value;
if (a0 != null) {
value = environment.__proto__.__proto__;
value = require(11875) /* metro dependency 11875: PushNotificationActionCreators */;
value.updateNotificationAuthorizationStatus(a0);
}
value = environment.__proto__;
env1_0(true);
}
function _shouldShowReactivationPrompts() { // fn#91071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:2134, offset: 0x020522df, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_4(_fun91073).apply(this, arguments);
}
function _fun91063(a0) { // fn#91063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:1248, offset: 0x020520df, size: 49 bytes, params: 2, frame: 12
var value;
if (a0 != null) {
value = environment.__proto__.__proto__.__proto__.__proto__;
value = env4_0(env4_2[10]);
value.updateNotificationAuthorizationStatus(a0);
}
}
function* _fun91073() { // fn#91073, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:2217, offset: 0x0205231f, size: 81 bytes, params: 1, frame: 13
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
var NativePermissionManager = env4_6.NativePermissionManager;
var getNotificationAuthorizationStatus = NativePermissionManager.getNotificationAuthorizationStatus;
yield Reflect.apply(getNotificationAuthorizationStatus, NativePermissionManager, []);
var value3 = undefined;
if (false) {
return value3;
}
var AUTHORIZED = env4_10.AUTHORIZED;
if (value3 !== AUTHORIZED) {
value = environment.__proto__.__proto__.__proto__;
require(true);
}
}
function useShouldShowPushNotificationNudgeByPromptType(a0) { // fn#91076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12060:2721, offset: 0x02052370, size: 83 bytes, params: 2, frame: 15
const value2 = useCanSeePushNotificationNudge();
const useStateFromStores = FluxModule.useStateFromStores;
return value2 && Reflect.apply(useStateFromStores, FluxModule, [[PushNotificationPermissionStore], function() {
return PushNotificationPermissionStore.getState().eligiblePromptTypes;
}]).has(a0);
}
}
global.__d(_fun91054, 11874, [57, 5, 31, 27, 11872, 11873, 661, 4661, 10744, 683, 11875, 11881, 11882, 566,
2]) /* metro module 11874, dependencies: [57, 5, 31, 27, 11872, 11873, 661, 4661, 10744, 683, 11875, 11881, 11882, 566, 2] */;
@@ -1,11 +1,15 @@
/* Metro module 13873; source: modules/nuf/native/NotificationSettingsPermissionHeaderExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun105495(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#105495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14070:6, offset: 0x022baa6e, size: 145 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-04-notification-settings-permission-header', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/NotificationSettingsPermissionHeaderExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/NotificationSettingsPermissionHeaderExperiment.tsx');
exports.default = value;
}
global.__d(_fun105495, 13873, [1854, 2]) /* metro module 13873, dependencies: [1854, 2] */;
@@ -1,11 +1,15 @@
/* Metro module 14891; source: modules/nuf/native/PostCallDisconnectNudgeExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun112650(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15088:6, offset: 0x023d621f, size: 145 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-04-post-call-disconnect-nudge', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/PostCallDisconnectNudgeExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/PostCallDisconnectNudgeExperiment.tsx');
exports.default = value;
}
global.__d(_fun112650, 14891, [1854, 2]) /* metro module 14891, dependencies: [1854, 2] */;
@@ -1,11 +1,15 @@
/* Metro module 11883; source: modules/nuf/native/PostReactionPermissionNudgeExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun91166(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12069:6, offset: 0x02054573, size: 145 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-04-post-reaction-push-banner', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/PostReactionPermissionNudgeExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/PostReactionPermissionNudgeExperiment.tsx');
exports.default = value;
}
global.__d(_fun91166, 11883, [1854, 2]) /* metro module 11883, dependencies: [1854, 2] */;
@@ -1,135 +1,145 @@
/* Metro module 15790; source: modules/nuf/native/RedesignNewUserManager.tsx; dependencies: [7, 6, 15, 17, 18, 11994, 4256, 9151, 15791, 5080, 15793, 1962, 15792, 477, 4007, 4860, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import NewUserStore from '../NewUserStore.tsx'; /* Metro dependency 4256 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ContactSyncModalStoreModule from '../../contact_sync/native/ContactSyncModalStore.tsx'; /* Metro dependency 11994 */
function _fun121296(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:6, offset: 0x02543e83, size: 278 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = require(11994) /* metro dependency 11994: ContactSyncModalStore */;
let value = ContactSyncModalStoreModule;
const env0_8 = value.initialize;
const env0_9 = value.ContactSyncModes;
const newUserStore = importDefault(4256) /* metro dependency 4256: NewUserStore */;
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun121300(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/RedesignNewUserManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/RedesignNewUserManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_121297() { // fn#121297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:204, offset: 0x02543f99, 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_121297_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun121300(a0) { // fn#121300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:407, offset: 0x02543ffb, size: 42 bytes, params: 2, frame: 14
const closure = RedesignNewUserManager;
env0_7(closure, a0);
return env0_3(closure);
}
function RedesignNewUserManager(a0) { // fn#121301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:419, offset: 0x02544025, size: 225 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, RedesignNewUserManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(RedesignNewUserManager);
binding = env1_5;
if (_isNativeReflectConstruct_121297()) {
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._onboardingStepIndex = -1;
value._lastShownStepIndex = -1;
value.actions = {POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_121302, ONBOARDING_START: ONBOARDING_START};
value.startOnboarding = startOnboarding_121304;
value.handleOnboardingStart = handleOnboardingStart;
value.handleConnectionOpen = handleConnectionOpen_121307;
return value;
}
function ONBOARDING_START() { // fn#121303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:800, owner: RedesignNewUserManager.ONBOARDING_START, offset: 0x02544106, size: 19 bytes, params: 1, frame: 9
return env0_0.handleOnboardingStart();
}
function RedesignNewUserManagerStartOnboarding() { // fn#121304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:849, owner: RedesignNewUserManager.startOnboarding, offset: 0x02544119, size: 127 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__.__proto__;
initialize((require(9151) /* metro dependency 9151: InstantInviteUtils */).hasDeferredInvite() ? ContactSyncModes.ONBOARDING_INVITE : ContactSyncModes.ONBOARDING);
value = require(15791) /* metro dependency 15791: NewUserUtils */;
value = value.getNextOnboardingStep(false, -1, -1);
value.then(_fun121305);
}
function handleOnboardingStart() { // fn#121306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:1339, owner: RedesignNewUserManager.handleOnboardingStart, offset: 0x0254427a, size: 21 bytes, params: 1, frame: 9
env0_0.startOnboarding();
}
function RedesignNewUserManagerHandleConnectionOpen() { // fn#121307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:1388, owner: RedesignNewUserManager.handleConnectionOpen, offset: 0x0254428f, size: 79 bytes, params: 1, frame: 11
let value = environment.__proto__.__proto__;
if (NewUserStore.getType() != null) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
if (!value.isModalOpen()) {
env0_0.startOnboarding();
function _isNativeReflectConstruct_121297() { // fn#121297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:204, offset: 0x02543f99, 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_121297_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun121300(a0) { // fn#121300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:407, offset: 0x02543ffb, size: 42 bytes, params: 2, frame: 14
const RedesignNewUserManager2 = RedesignNewUserManager;
Inherits(RedesignNewUserManager2, a0);
return CreateClass(RedesignNewUserManager2);
function RedesignNewUserManager(a0) { // fn#121301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:419, offset: 0x02544025, size: 225 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, RedesignNewUserManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(RedesignNewUserManager);
binding = env1_5;
if (_isNativeReflectConstruct_121297()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value._onboardingStepIndex = -1;
value._lastShownStepIndex = -1;
value.actions = {POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_121302, ONBOARDING_START: ONBOARDING_START};
value.startOnboarding = startOnboarding_121304;
value.handleOnboardingStart = handleOnboardingStart;
value.handleConnectionOpen = handleConnectionOpen_121307;
return value;
function RedesignNewUserManagerPOST_CONNECTION_OPEN() { // fn#121302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:754, owner: RedesignNewUserManager.POST_CONNECTION_OPEN, offset: 0x00eed68e, size: 19 bytes, params: 1, frame: 9
return env0_0.handleConnectionOpen();
}
function ONBOARDING_START() { // fn#121303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:800, owner: RedesignNewUserManager.ONBOARDING_START, offset: 0x02544106, size: 19 bytes, params: 1, frame: 9
return env0_0.handleOnboardingStart();
}
function RedesignNewUserManagerStartOnboarding() { // fn#121304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:849, owner: RedesignNewUserManager.startOnboarding, offset: 0x02544119, size: 127 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__.__proto__;
initialize((require(9151) /* metro dependency 9151: InstantInviteUtils */).hasDeferredInvite() ? ContactSyncModes.ONBOARDING_INVITE : ContactSyncModes.ONBOARDING);
value = require(15791) /* metro dependency 15791: NewUserUtils */;
value = value.getNextOnboardingStep(false, -1, -1);
value.then(_fun121305);
function _fun121305(a0) { // fn#121305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:972, offset: 0x02544198, size: 226 bytes, params: 2, frame: 21
var defaultImport;
var pushLazy;
var object;
var NEW_USER_MODAL_KEY;
var object2;
a0.lastShownStepIndex;
const onboardingStepIndex = a0.onboardingStepIndex;
let value = environment.__proto__.__proto__.__proto__;
const keyForOnboardingStep = require(dependencyMap[8]).getKeyForOnboardingStep(onboardingStepIndex);
if (keyForOnboardingStep != null) {
defaultImport = importDefault(dependencyMap[9]);
pushLazy = defaultImport.pushLazy;
value = require(dependencyMap[11]);
value = value(dependencyMap[10], dependencyMap.paths);
object = {initialRouteName: keyForOnboardingStep, initialOnboardingStepIndex: onboardingStepIndex};
NEW_USER_MODAL_KEY = require(dependencyMap[12]).NEW_USER_MODAL_KEY;
object2 = {'fullScreenGestureEnabled': false, 'presentation': null, 'animation': 'slide_from_bottom'};
object2.presentation = require(dependencyMap[13]).isAndroid() ? 'transparentModal' : 'card';
Reflect.apply(pushLazy, defaultImport, [value, object, NEW_USER_MODAL_KEY, object2]);
}
}
}
function handleOnboardingStart() { // fn#121306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:1339, owner: RedesignNewUserManager.handleOnboardingStart, offset: 0x0254427a, size: 21 bytes, params: 1, frame: 9
env0_0.startOnboarding();
}
function RedesignNewUserManagerHandleConnectionOpen() { // fn#121307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:1388, owner: RedesignNewUserManager.handleConnectionOpen, offset: 0x0254428f, size: 79 bytes, params: 1, frame: 11
let value = environment.__proto__.__proto__;
if (NewUserStore.getType() != null) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
if (!value.isModalOpen()) {
env0_0.startOnboarding();
}
}
}
}
}
}
function _fun121305(a0) { // fn#121305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15998:972, offset: 0x02544198, size: 226 bytes, params: 2, frame: 21
var defaultImport;
var pushLazy;
var object3;
var NEW_USER_MODAL_KEY;
var object4;
a0.lastShownStepIndex;
const onboardingStepIndex = a0.onboardingStepIndex;
let value = environment.__proto__.__proto__.__proto__;
const keyForOnboardingStep = require(dependencyMap[8]).getKeyForOnboardingStep(onboardingStepIndex);
if (keyForOnboardingStep != null) {
defaultImport = importDefault(dependencyMap[9]);
pushLazy = defaultImport.pushLazy;
value = require(dependencyMap[11]);
value = value(dependencyMap[10], dependencyMap.paths);
object3 = {initialRouteName: keyForOnboardingStep, initialOnboardingStepIndex: onboardingStepIndex};
NEW_USER_MODAL_KEY = require(dependencyMap[12]).NEW_USER_MODAL_KEY;
object4 = {'fullScreenGestureEnabled': false, 'presentation': null, 'animation': 'slide_from_bottom'};
object4.presentation = require(dependencyMap[13]).isAndroid() ? 'transparentModal' : 'card';
Reflect.apply(pushLazy, defaultImport, [value, object3, NEW_USER_MODAL_KEY, object4]);
}
}
global.__d(_fun121296, 15790, [7, 6, 15, 17, 18, 11994, 4256, 9151, 15791, 5080, 15793, 1962, 15792, 477, 4007,
4860,
2]) /* metro module 15790, dependencies: [7, 6, 15, 17, 18, 11994, 4256, 9151, 15791, 5080, 15793, 1962, 15792, 477, 4007, 4860, 2] */;
@@ -1,339 +1,400 @@
/* Metro module 12042; source: modules/nuf/native/components/ChannelPrompt.tsx; dependencies: [5, 57, 31, 27, 1935, 1867, 33, 4501, 5314, 566, 1484, 5282, 1244, 4603, 4131, 6618, 6819, 1423, 4573, 8967, 4578, 8970, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildChannelStore from '../../../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
function _fun92533(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12228:6, offset: 0x0208e36e, size: 430 bytes, params: 8, frame: 23
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 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_6 = value.ScrollView;
const env0_7 = value.View;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
const env0_12 = Reflect.apply(createStyles, value, [{flex: {flex: 1}, safePadding: {marginTop: NAV_BAR_HEIGHT,
flex: 1}, contentContainer: {paddingHorizontal: 16}, guildIcon: {alignSelf: 'center'},
guildName: {'marginTop': 8, 'textAlign': 'center'}, title: {'marginTop': 16, 'textAlign': 'center'},
subTitle: {'marginTop': 8, 'textAlign': 'center'}, topicInput: {marginTop: 24}, buttonWrapper: {marginTop: 8},
error: {marginTop: 4}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/ChannelPrompt.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/ChannelPrompt.tsx');
exports.default = ChannelPrompt;
}
function ChannelPrompt({guildId, buttonText, hasBack, hasSkip, onCancel, onSuccess}) { // fn#92534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12228:666, offset: 0x0208e51c, size: 1286 bytes, params: 2, frame: 38
var r9;
var r0;
var SafeAreaPaddingView;
var GuildIcon;
var name;
var items2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var FreeFormInputGroup;
const env0_3 = onCancel;
const env0_4 = onSuccess;
var value;
const styles = useStyles();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const binding = env0_5;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, ['']);
const binding2 = env0_4;
const value4 = binding2(value3, 2);
const property = value4[0];
const property2 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property3 = value5[0];
const env0_6 = value5[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property4 = value7[0];
const env0_7 = value7[1];
binding.useLayoutEffect(_fun92536,
[(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(), hasBack, hasSkip, onCancel,
onSuccess]);
const value10 = binding.useCallback(env0_3(_fun92540), [guildId, onSuccess, property]);
if (guild == null) {
r0 = null;
} else {
SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
var safeAreaPaddingViewProps = {top: true, style: styles.safePadding};
var scrollViewBindingProps = {'style': null, 'contentInset': null, 'automaticallyAdjustContentInsets': false,
'keyboardShouldPersistTaps': 'handled', 'alwaysBounceVertical': false, style: styles.flex,
contentInset: {top: 0}, contentContainerStyle: styles.contentContainer};
GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
name = guild.name;
items2 = [<GuildIcon style={styles.guildIcon} value={name} icon={guild.icon != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildIconURL({id: guild.id,
icon: guild.icon, canAnimate: true, size: 128}) : null} selected />];
name = guild.name;
items2[1] = <Text style={styles.guildName} lineClamp={1} variant="text-sm/semibold" color="mobile-text-heading-primary">{name}</Text>;
string = intl.string;
items2[2] = <Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [t['8VRa7d']])}</Text>;
string = intl.string;
items2[3] = <Text style={styles.subTitle} variant="text-sm/medium" color="text-default">{Reflect.apply(string,
intl,
[t['+855Pm']])}</Text>;
FreeFormInputGroup = importDefault(8967) /* metro dependency 8967: FreeFormInputGroup */;
items2[4] = <FreeFormInputGroup style={styles.topicInput} label={intl.string(t.bY20tU)} value={property} error={property4?.getFirstFieldErrorMessage('name')} onChangeText={property2} onSubmitEditing={value10} maxLength={100} placeholder={intl.string(t.xGOYA8)} returnKeyType="done" autoFocus />;
items2[5] = <View style={styles.buttonWrapper}>{((Button) => <Button size="md" text={buttonText} onPress={value10} loading={property3} disabled={property3} grow />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
if (property4 != null) {
if (property4.hasFieldErrors()) {
value = importDefault(8970) /* metro dependency 8970: FreeFormErrorLabel */;
value = ((Component) => <Component style={styles.error}>{property4?.getAnyErrorMessage()}</Component>)(value);
r9 = value;
function ChannelPrompt({guildId, buttonText, hasBack, hasSkip, onCancel, onSuccess}) { // fn#92534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12228:666, offset: 0x0208e51c, size: 1286 bytes, params: 2, frame: 38
var r9;
var r0;
var SafeAreaPaddingView;
var GuildIcon;
var name;
var items2;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var FreeFormInputGroup;
const onCancel2 = onCancel;
const onSuccess2 = onSuccess;
var value;
const styles = useStyles();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
let useState = ReactModule.useState;
const value3 = Reflect.apply(useState, ReactModule, ['']);
const binding2 = onSuccess2;
const value4 = binding2(value3, 2);
const property = value4[0];
const property2 = value4[1];
useState = ReactModule.useState;
const value5 = binding2(Reflect.apply(useState, ReactModule, [false]), 2);
const property3 = value5[0];
const env0_6 = value5[1];
useState = ReactModule.useState;
const value7 = binding2(Reflect.apply(useState, ReactModule, [null]), 2);
const property4 = value7[0];
const env0_7 = value7[1];
ReactModule.useLayoutEffect(_fun92536,
[(UseNavigationNativeModule).useNavigation(), hasBack, hasSkip, onCancel,
onSuccess]);
const value10 = ReactModule.useCallback(onCancel2(_fun92540), [guildId, onSuccess, property]);
if (guild == null) {
r0 = null;
} else {
SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
var safeAreaPaddingViewProps = {top: true, style: styles.safePadding};
var scrollViewBindingProps = {'style': null, 'contentInset': null, 'automaticallyAdjustContentInsets': false,
'keyboardShouldPersistTaps': 'handled', 'alwaysBounceVertical': false, style: styles.flex,
contentInset: {top: 0}, contentContainerStyle: styles.contentContainer};
GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
name = guild.name;
items2 = [
<GuildIcon
style={styles.guildIcon}
value={name}
icon={guild.icon != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildIconURL({id: guild.id,
icon: guild.icon, canAnimate: true, size: 128}) : null}
selected
/>,
];
name = guild.name;
items2[1] = (
<Text
style={styles.guildName}
lineClamp={1}
variant="text-sm/semibold"
color="mobile-text-heading-primary"
>
{name}
</Text>
);
string = intl.string;
items2[2] = (
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [t['8VRa7d']])}
</Text>
);
string = intl.string;
items2[3] = (
<Text
style={styles.subTitle}
variant="text-sm/medium"
color="text-default"
>
{Reflect.apply(string, intl, [t['+855Pm']])}
</Text>
);
FreeFormInputGroup = importDefault(8967) /* metro dependency 8967: FreeFormInputGroup */;
items2[4] = (
<FreeFormInputGroup
style={styles.topicInput}
label={intl.string(t.bY20tU)}
value={property}
error={property4?.getFirstFieldErrorMessage('name')}
onChangeText={property2}
onSubmitEditing={value10}
maxLength={100}
placeholder={intl.string(t.xGOYA8)}
returnKeyType="done"
autoFocus
/>
);
items2[5] = (
<View style={styles.buttonWrapper}>
{((Button) => <Button size="md" text={buttonText} onPress={value10} loading={property3} disabled={property3} grow />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}
</View>
);
if (property4 != null) {
if (property4.hasFieldErrors()) {
value = importDefault(8970) /* metro dependency 8970: FreeFormErrorLabel */;
value = ((Component) => <Component style={styles.error}>{property4?.getAnyErrorMessage()}</Component>)(value);
r9 = value;
} else {
r9 = null;
}
} else {
r9 = null;
}
} else {
r9 = null;
items2[6] = r9;
value = (
<SafeAreaPaddingView {...safeAreaPaddingViewProps}>
<ScrollView {...scrollViewBindingProps}>
{items2}
</ScrollView>
</SafeAreaPaddingView>
);
r0 = value;
}
return r0;
function _fun92536() { // fn#92536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12228:990, offset: 0x0208ea22, size: 196 bytes, params: 1, frame: 22
var environment;
var r5;
var r3;
var value2;
var moduleValue;
var value4;
var moduleValue2;
var getHeaderTextButton;
var intl;
const binding = env0_8;
const setOptions = binding.setOptions;
const object = {};
if (hasBack) {
value2 = environment.__proto__;
moduleValue = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
r5 = moduleValue.getHeaderBackButton(onCancel);
} else {
r5 = function() {
return null;
};
}
object.headerLeft = r5;
if (hasSkip) {
value4 = environment.__proto__;
moduleValue2 = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
getHeaderTextButton = moduleValue2.getHeaderTextButton;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r3 = Reflect.apply(getHeaderTextButton, moduleValue2,
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd']), onSuccess]);
} else {
r3 = function() {
return null;
};
}
object.headerRight = r3;
Reflect.apply(setOptions, binding, [object]);
}
items2[6] = r9;
value = <SafeAreaPaddingView {...safeAreaPaddingViewProps}><ScrollView {...scrollViewBindingProps}>{items2}</ScrollView></SafeAreaPaddingView>;
r0 = value;
}
return r0;
}
function _fun92536() { // fn#92536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12228:990, offset: 0x0208ea22, size: 196 bytes, params: 1, frame: 22
var environment;
var r5;
var r3;
var value2;
var moduleValue;
var value4;
var moduleValue2;
var getHeaderTextButton;
var intl;
const binding = env0_8;
const setOptions = binding.setOptions;
const object2 = {};
if (hasBack) {
value2 = environment.__proto__;
moduleValue = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
r5 = moduleValue.getHeaderBackButton(onCancel);
} else {
r5 = function() {
return null;
};
}
object2.headerLeft = r5;
if (hasSkip) {
value4 = environment.__proto__;
moduleValue2 = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
getHeaderTextButton = moduleValue2.getHeaderTextButton;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r3 = Reflect.apply(getHeaderTextButton, moduleValue2,
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd']), onSuccess]);
} else {
r3 = function() {
return null;
};
}
object2.headerRight = r3;
Reflect.apply(setOptions, binding, [object2]);
}
function* _fun92540() { // fn#92540, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12228:1201, offset: 0x0208eaf1, size: 295 bytes, params: 1, frame: 25
var parent_id;
var binding2;
var property;
var value6;
var intl;
var formatToPlainString;
var value7;
var t;
var V4lepJ;
var object2;
var value8;
var binding3;
var value9;
var createTextChannel;
var value10;
var textChannel;
var value11;
var value12;
var error;
var APIError;
var prototype;
var value13;
var aPIError;
var value14;
let value = undefined;
if (true) {
value = undefined;
View(null);
ScrollView(true);
var binding = env2_8;
var defaultChannel = binding.getDefaultChannel(require);
reducibleJoin3: while (true) {
reduciblePort36: while (true) {
exceptionLanding35: while (true) {
try {
function* _fun92540() { // fn#92540, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12228:1201, offset: 0x0208eaf1, size: 295 bytes, params: 1, frame: 25
var parent_id;
var binding2;
var property;
var value6;
var intl;
var formatToPlainString;
var value7;
var t;
var V4lepJ;
var object;
var value8;
var binding3;
var value9;
var createTextChannel;
var value10;
var textChannel;
var value11;
var value12;
var error;
var APIError;
var prototype;
var value13;
var aPIError;
var value14;
let value = undefined;
if (true) {
value = undefined;
View(null);
ScrollView(true);
var binding = env2_8;
var defaultChannel = binding.getDefaultChannel(require);
reducibleJoin3: while (true) {
reduciblePort36: while (true) {
exceptionLanding35: while (true) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding35;
}
break reducibleJoin3;
}
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
prototype = APIError.prototype;
value13 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value14 = aPIError instanceof Object ? aPIError : value13;
View(value14);
break reduciblePort36;
}
ScrollView(false);
return value;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding2[12];
} catch (error) {
break exceptionLanding35;
}
try {
value6 = binding(property);
} catch (error) {
break exceptionLanding35;
}
try {
intl = value6.intl;
} catch (error) {
break exceptionLanding35;
}
try {
formatToPlainString = intl.formatToPlainString;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding2[12];
} catch (error) {
break exceptionLanding35;
}
try {
value7 = binding(property);
} catch (error) {
break exceptionLanding35;
}
try {
t = value7.t;
} catch (error) {
break exceptionLanding35;
}
try {
V4lepJ = t.V4lepJ;
} catch (error) {
break exceptionLanding35;
}
try {
object = {};
} catch (error) {
break exceptionLanding35;
}
try {
binding = env1_5;
} catch (error) {
break exceptionLanding35;
}
try {
object.topic = binding;
} catch (error) {
break exceptionLanding35;
}
try {
value8 = Reflect.apply(formatToPlainString, intl, [V4lepJ, object]);
} catch (error) {
break exceptionLanding35;
}
try {
binding3 = env2_1;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding2[13];
} catch (error) {
break exceptionLanding35;
}
try {
value9 = binding3(property);
} catch (error) {
break exceptionLanding35;
}
try {
createTextChannel = value9.createTextChannel;
} catch (error) {
break exceptionLanding35;
}
try {
} catch (error) {
break exceptionLanding35;
}
try {
value10 = defaultChannel == null;
} catch (error) {
break exceptionLanding35;
}
reducibleJoin27: while (true) {
if (value10) {
parent_id = value;
break reducibleJoin27;
}
try {
parent_id = defaultChannel.parent_id;
} catch (error) {
break exceptionLanding35;
}
break reducibleJoin3;
break reducibleJoin27;
}
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
prototype = APIError.prototype;
value13 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value14 = aPIError instanceof Object ? aPIError : value13;
View(value14);
break reduciblePort36;
try {
textChannel = Reflect.apply(createTextChannel, value9, [require, binding, parent_id, value8]);
} catch (error) {
break exceptionLanding35;
}
yield textChannel;
try {
value11 = undefined;
value12 = false;
} catch (error) {
break exceptionLanding35;
}
if (value12) {
return value11;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding35;
}
try {
binding();
} catch (error) {
break exceptionLanding35;
}
ScrollView(false);
}
ScrollView(false);
return value;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding2[12];
} catch (error) {
break exceptionLanding35;
}
try {
value6 = binding(property);
} catch (error) {
break exceptionLanding35;
}
try {
intl = value6.intl;
} catch (error) {
break exceptionLanding35;
}
try {
formatToPlainString = intl.formatToPlainString;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding2[12];
} catch (error) {
break exceptionLanding35;
}
try {
value7 = binding(property);
} catch (error) {
break exceptionLanding35;
}
try {
t = value7.t;
} catch (error) {
break exceptionLanding35;
}
try {
V4lepJ = t.V4lepJ;
} catch (error) {
break exceptionLanding35;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding35;
}
try {
binding = env1_5;
} catch (error) {
break exceptionLanding35;
}
try {
object2.topic = binding;
} catch (error) {
break exceptionLanding35;
}
try {
value8 = Reflect.apply(formatToPlainString, intl, [V4lepJ, object2]);
} catch (error) {
break exceptionLanding35;
}
try {
binding3 = env2_1;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding2[13];
} catch (error) {
break exceptionLanding35;
}
try {
value9 = binding3(property);
} catch (error) {
break exceptionLanding35;
}
try {
createTextChannel = value9.createTextChannel;
} catch (error) {
break exceptionLanding35;
}
try {
} catch (error) {
break exceptionLanding35;
}
try {
value10 = defaultChannel == null;
} catch (error) {
break exceptionLanding35;
}
reducibleJoin27: while (true) {
if (value10) {
parent_id = value;
break reducibleJoin27;
}
try {
parent_id = defaultChannel.parent_id;
} catch (error) {
break exceptionLanding35;
}
break reducibleJoin27;
}
try {
textChannel = Reflect.apply(createTextChannel, value9, [require, binding, parent_id, value8]);
} catch (error) {
break exceptionLanding35;
}
yield textChannel;
try {
value11 = undefined;
value12 = false;
} catch (error) {
break exceptionLanding35;
}
if (value12) {
return value11;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding35;
}
try {
binding();
} catch (error) {
break exceptionLanding35;
}
ScrollView(false);
}
return value;
}
global.__d(_fun92533, 12042, [5, 57, 31, 27, 1935, 1867, 33, 4501, 5314, 566, 1484, 5282, 1244, 4603, 4131, 6618,
6819, 1423, 4573, 8967, 4578, 8970,
2]) /* metro module 12042, dependencies: [5, 57, 31, 27, 1935, 1867, 33, 4501, 5314, 566, 1484, 5282, 1244, 4603, 4131, 6618, 6819, 1423, 4573, 8967, 4578, 8970, 2] */;
@@ -1,124 +1,171 @@
/* Metro module 15798; source: modules/nuf/native/components/ConnectGuardianModal.tsx; dependencies: [31, 27, 661, 5117, 33, 4501, 697, 1585, 15799, 683, 5461, 4573, 1244, 2224, 6766, 15800, 4578, 2] */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as FamilyCenterConstantsModule from '../../../parent_tools/FamilyCenterConstants.tsx'; /* Metro dependency 5117 */
import * as UseConnectGuardianGateModule from '../../../parent_tools/hooks/useConnectGuardianGate.tsx'; /* Metro dependency 15799 */
function _fun121383(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16006:6, offset: 0x0254679c, size: 557 bytes, params: 8, frame: 24
var object2;
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(27) /* metro dependency 27 */).View;
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_6 = (require(5117) /* metro dependency 5117: FamilyCenterConstants */).FamilyCenterAction;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.centered = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', paddingHorizontal: PX_16};
object.centered = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', paddingHorizontal: PX_16};
const PX_40 = (importDefault(697) /* metro dependency 697: native */).space.PX_40;
object2.header = {marginBottom: PX_40};
const object3 = {};
object.header = {marginBottom: PX_40};
const object5 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
object5.paddingHorizontal = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.marginBottom = PX_8;
object3.textAlign = 'center';
object2.title = object3;
object5.marginBottom = PX_8;
object5.textAlign = 'center';
object.title = object5;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.description = {paddingHorizontal: PX_16, textAlign: 'center'};
object2.cardSection = {alignItems: 'center'};
const object4 = {};
object.description = {paddingHorizontal: PX_16, textAlign: 'center'};
object.cardSection = {alignItems: 'center'};
const object6 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
object6.paddingHorizontal = PX_16;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.marginBottom = PX_24;
object4.textAlign = 'center';
object2.scanPrompt = object4;
object2.grow = {flexGrow: 1};
object6.marginBottom = PX_24;
object6.textAlign = 'center';
object.scanPrompt = object6;
object.grow = {flexGrow: 1};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.footer = {paddingHorizontal: PX_16};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/ConnectGuardianModal.tsx');
object.footer = {paddingHorizontal: PX_16};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/ConnectGuardianModal.tsx');
exports.default = ConnectGuardianModal;
}
function ConnectGuardianModal(a0) { // fn#121384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16006:909, offset: 0x025469c9, size: 925 bytes, params: 2, frame: 34
var r0;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
var items3;
var items2;
var object;
var items4;
var object2;
var Button;
const onComplete = a0.route.params.onComplete;
var value;
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value2 = (require(15799) /* metro dependency 15799: useConnectGuardianGate */).useConnectGuardianGate();
const binding = env0_3;
const env0_2 = binding.useRef(false);
binding.useEffect(_fun121385, [value2.state, onComplete]);
if (value2.state !== 'gate') {
r0 = <View style={[styles.container,
styles.centered]}>{((ActivityIndicator) => <ActivityIndicator />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator)}</View>;
} else {
var viewBindingProps = {style: styles.container};
var viewBindingProps2 = {style: styles.header};
string = intl.string;
value = <Text style={styles.title} variant="heading-xl/bold" color="text-default">{Reflect.apply(string, intl,
[(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).vELYWk])}</Text>;
items3 = [value];
items3[1] = ((TextWithIOSLinkWorkaround) => <TextWithIOSLinkWorkaround style={styles.description} variant="text-sm/medium" color="text-muted">{intl.format((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).pDByAB,
{link: 'https://support.discord.com/hc/articles/14155060633623'})}</TextWithIOSLinkWorkaround>)((require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround);
value = <View {...viewBindingProps2}>{items3}</View>;
items2 = [value];
var viewBindingProps3 = {style: styles.cardSection};
string = intl.string;
value = <Text style={styles.scanPrompt} variant="text-md/semibold" color="text-default">{Reflect.apply(string,
intl,
[(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Mi60fm])}</Text>;
items2[1] = <View {...viewBindingProps3}>{value}{((ConnectGuardianCard) => <ConnectGuardianCard linkCode={value2.linkCode} expiresAt={value2.expiresAt} onRefresh={value2.refresh} />)((require(15800) /* metro dependency 15800: ConnectGuardianCard */).ConnectGuardianCard)}</View>;
items2[2] = <View style={styles.grow} />;
object = {};
items4 = [styles.footer];
object2 = {};
object2.paddingBottom = bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items4[1] = object2;
object.style = items4;
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items2[3] = <View {...object}><Button variant="primary" size="lg" text={Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['3PatSz']])} onPress={onPress_121386} /></View>;
value = <View {...viewBindingProps}>{items2}</View>;
r0 = value;
}
return r0;
}
function _fun121385() { // fn#121385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16006:1071, offset: 0x02546d66, size: 142 bytes, params: 1, frame: 17
var value3;
var defaultImport;
if (!(env0_1.state !== 'error' || env0_2.current)) {
env0_2.current = true;
value3 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.FAMILY_CENTER_ACTION,
{action: FamilyCenterAction.NufConsentGateLinkCodeError,
source: 'NUF Connect Guardian'});
if (onComplete != null) {
onComplete(true);
function ConnectGuardianModal(a0) { // fn#121384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16006:909, offset: 0x025469c9, size: 925 bytes, params: 2, frame: 34
var r0;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
var items3;
var items2;
var object3;
var items4;
var object4;
var Button;
const onComplete = a0.route.params.onComplete;
var value;
const styles = useStyles();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const value2 = (UseConnectGuardianGateModule).useConnectGuardianGate();
const env0_2 = ReactModule.useRef(false);
ReactModule.useEffect(_fun121385, [value2.state, onComplete]);
if (value2.state !== 'gate') {
r0 = (
<View style={[styles.container, styles.centered]}>
{((ActivityIndicator) => <ActivityIndicator />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator)}
</View>
);
} else {
var viewBindingProps = {style: styles.container};
var viewBindingProps2 = {style: styles.header};
string = intl.string;
value = (
<Text
style={styles.title}
variant="heading-xl/bold"
color="text-default"
>
{Reflect.apply(string, intl,
[(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).vELYWk])}
</Text>
);
items3 = [value];
items3[1] = ((TextWithIOSLinkWorkaround) => <TextWithIOSLinkWorkaround style={styles.description} variant="text-sm/medium" color="text-muted">{intl.format((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).pDByAB,
{link: 'https://support.discord.com/hc/articles/14155060633623'})}</TextWithIOSLinkWorkaround>)((require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround);
value = (
<View {...viewBindingProps2}>
{items3}
</View>
);
items2 = [value];
var viewBindingProps3 = {style: styles.cardSection};
string = intl.string;
value = (
<Text
style={styles.scanPrompt}
variant="text-md/semibold"
color="text-default"
>
{Reflect.apply(string, intl,
[(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Mi60fm])}
</Text>
);
items2[1] = (
<View {...viewBindingProps3}>
{value}
{((ConnectGuardianCard) => <ConnectGuardianCard linkCode={value2.linkCode} expiresAt={value2.expiresAt} onRefresh={value2.refresh} />)((require(15800) /* metro dependency 15800: ConnectGuardianCard */).ConnectGuardianCard)}
</View>
);
items2[2] = <View style={styles.grow} />;
object3 = {};
items4 = [styles.footer];
object4 = {};
object4.paddingBottom = bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items4[1] = object4;
object3.style = items4;
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items2[3] = (
<View {...object3}>
<Button
variant="primary"
size="lg"
text={Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['3PatSz']])}
onPress={onPress_121386}
/>
</View>
);
value = (
<View {...viewBindingProps}>
{items2}
</View>
);
r0 = value;
}
return r0;
function _fun121385() { // fn#121385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16006:1071, offset: 0x02546d66, size: 142 bytes, params: 1, frame: 17
var value3;
var defaultImport;
if (!(env0_1.state !== 'error' || env0_2.current)) {
env0_2.current = true;
value3 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.FAMILY_CENTER_ACTION,
{action: FamilyCenterAction.NufConsentGateLinkCodeError,
source: 'NUF Connect Guardian'});
if (onComplete != null) {
onComplete(true);
}
}
}
function ConnectGuardianModalOnPress() { // fn#121386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16006:2222, owner: ConnectGuardianModal.onPress, offset: 0x02546df4, size: 33 bytes, params: 1, frame: 12
return onComplete?.(false);
}
}
}
function ConnectGuardianModalOnPress() { // fn#121386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16006:2222, owner: ConnectGuardianModal.onPress, offset: 0x02546df4, size: 33 bytes, params: 1, frame: 12
return onComplete?.(false);
}
global.__d(_fun121383, 15798, [31, 27, 661, 5117, 33, 4501, 697, 1585, 15799, 683, 5461, 4573, 1244, 2224, 6766,
15800, 4578,
2]) /* metro module 15798, dependencies: [31, 27, 661, 5117, 33, 4501, 697, 1585, 15799, 683, 5461, 4573, 1244, 2224, 6766, 15800, 4578, 2] */;
@@ -1,117 +1,172 @@
/* Metro module 12046; source: modules/nuf/native/components/DiscoverabilityActionSheet.tsx; dependencies: [31, 27, 11994, 661, 33, 4501, 697, 7972, 1244, 4573, 11997, 6805, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ActionSheetNativeModule from '../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as NativeModule from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as ContactSyncModalStoreModule from '../../../contact_sync/native/ContactSyncModalStore.tsx'; /* Metro dependency 11994 */
import * as ContactSyncUtilsModule from '../../../contact_sync/native/ContactSyncUtils.tsx'; /* Metro dependency 11997 */
function _fun92566(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12232:6, offset: 0x0208fa60, size: 449 bytes, params: 8, frame: 23
var object2;
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(27) /* metro dependency 27 */).View;
let value = require(11994) /* metro dependency 11994: ContactSyncModalStore */;
let value = ContactSyncModalStoreModule;
const env0_4 = value.useContactSyncModalStore;
const env0_5 = value.setAllowSync;
const env0_6 = value.setAllowPhone;
const env0_7 = value.setAllowEmail;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const Fonts = (ConstantsModule).Fonts;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = 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 = {backgroundColor: BACKGROUND_BASE_LOW, paddingBottom: 16};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.formRow = {'marginTop': 8, 'paddingVertical': 16, backgroundColor: BACKGROUND_SURFACE_HIGH};
object2.syncRow = {marginTop: 24};
const object3 = {};
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.container = {backgroundColor: BACKGROUND_BASE_LOW, paddingBottom: 16};
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
object.formRow = {'marginTop': 8, 'paddingVertical': 16, backgroundColor: BACKGROUND_SURFACE_HIGH};
object.syncRow = {marginTop: 24};
const object4 = {};
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
object3.fontFamily = PRIMARY_SEMIBOLD;
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
object3.color = INTERACTIVE_TEXT_ACTIVE;
object2.formText = object3;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object2.info = {'marginTop': 8, 'fontSize': 14, 'lineHeight': 18, 'paddingHorizontal': 16, color: TEXT_SUBTLE};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/DiscoverabilityActionSheet.tsx');
object4.fontFamily = PRIMARY_SEMIBOLD;
const INTERACTIVE_TEXT_ACTIVE = (Native).colors.INTERACTIVE_TEXT_ACTIVE;
object4.color = INTERACTIVE_TEXT_ACTIVE;
object.formText = object4;
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
object.info = {'marginTop': 8, 'fontSize': 14, 'lineHeight': 18, 'paddingHorizontal': 16, color: TEXT_SUBTLE};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/DiscoverabilityActionSheet.tsx');
exports.default = DiscoverabilityActionSheet;
function DiscoverabilityActionSheet() { // fn#92567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12232:771, offset: 0x0208fc21, size: 1289 bytes, params: 1, frame: 33
const styles = useStyles();
const {allowPhone, allowEmail} = useContactSyncModalStore();
const r14 = allowPhone || allowEmail;
const binding = r14;
const value3 = binding.useCallback(_fun92568, [r14]);
const value4 = binding.useCallback(function() {
setAllowPhone(!allowPhone);
}, [allowPhone]);
const value5 = binding.useCallback(function() {
setAllowEmail(!allowEmail);
}, [allowEmail]);
const FormRow = (NativeModule).FormRow;
const formRowProps3 = {DEPRECATED_style: [styles.formRow, styles.syncRow]};
const FormRow2 = (NativeModule).FormRow;
let Label = FormRow2.Label;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
formRowProps3.label = (
<Label
style={styles.formText}
text={Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.gMUgpv])}
/>
);
formRowProps3.onPress = value3;
const FormRow3 = (NativeModule).FormRow;
let Checkbox = FormRow3.Checkbox;
formRowProps3.trailing = <Checkbox selected={r14} />;
const items2 = [
<FormRow {...formRowProps3} />,
];
const FormText = (NativeModule).FormText;
items2[1] = (
<FormText style={styles.info}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pfjsB5)}
</FormText>
);
items2[2] = (
<FormText style={styles.info}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cW1nr9)}
</FormText>
);
items2[3] = (
<FormText style={styles.info}>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.eswIfi,
{learnMoreHook: learnMoreHook_92571})}
</FormText>
);
const FormTitle = (NativeModule).FormTitle;
items2[4] = (
<FormTitle title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0t2wRW'])} thinTitle />
);
const formRowProps = {DEPRECATED_style: styles.formRow};
const FormRow4 = (NativeModule).FormRow;
Label = FormRow4.Label;
formRowProps.label = (
<Label
style={styles.formText}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['eJnn0+'])}
/>
);
const Text = (TextModule).Text;
string = intl.string;
const X7pIKN = (require(1244) /* metro dependency 1244: indexNative */).t.X7pIKN;
formRowProps.subLabel = (
<Text variant="text-sm/medium" color="text-default">
{Reflect.apply(string, intl, [X7pIKN])}
</Text>
);
formRowProps.onPress = value4;
const FormRow5 = (NativeModule).FormRow;
Checkbox = FormRow5.Checkbox;
formRowProps.trailing = <Checkbox selected={allowPhone} />;
items2[5] = <FormRow {...formRowProps} />;
const formRowProps2 = {DEPRECATED_style: styles.formRow};
const FormRow6 = (NativeModule).FormRow;
Label = FormRow6.Label;
formRowProps2.label = (
<Label
style={styles.formText}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dI4d4S)}
/>
);
formRowProps2.subLabel = (
<Text variant="text-sm/medium" color="text-default">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ilGsHE)}
</Text>
);
formRowProps2.onPress = value5;
const FormRow7 = (NativeModule).FormRow;
Checkbox = FormRow7.Checkbox;
formRowProps2.trailing = <Checkbox selected={allowEmail} />;
items2[6] = <FormRow {...formRowProps2} />;
const view = (
<View style={styles.container}>
{items2}
</View>
);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
return (
<ActionSheet startExpanded>
{view}
</ActionSheet>
);
function _fun92568() { // fn#92568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12232:879, offset: 0x02081e18, size: 26 bytes, params: 1, frame: 11
setAllowSync(!ReactModule);
}
function DiscoverabilityActionSheetLearnMoreHook(a0, a1) { // fn#92571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12232:1473, owner: DiscoverabilityActionSheet.learnMoreHook, offset: 0x0209015e, size: 91 bytes, params: 3, frame: 17
const Text = (TextModule).Text;
return (
<Text
onPress={(ContactSyncUtilsModule).handleOpenLearnMoreLink}
variant="text-sm/medium"
color="text-link"
key={a1}
>
{a0}
</Text>
);
}
}
}
function DiscoverabilityActionSheet() { // fn#92567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12232:771, offset: 0x0208fc21, size: 1289 bytes, params: 1, frame: 33
const styles = useStyles();
const {allowPhone, allowEmail} = useContactSyncModalStore();
const r14 = allowPhone || allowEmail;
const binding = r14;
const value3 = binding.useCallback(_fun92568, [r14]);
const value4 = binding.useCallback(function() {
setAllowPhone(!allowPhone);
}, [allowPhone]);
const value5 = binding.useCallback(function() {
setAllowEmail(!allowEmail);
}, [allowEmail]);
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const formRowProps3 = {DEPRECATED_style: [styles.formRow, styles.syncRow]};
const FormRow2 = (require(7972) /* metro dependency 7972: native */).FormRow;
let Label = FormRow2.Label;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
formRowProps3.label = <Label style={styles.formText} text={Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.gMUgpv])} />;
formRowProps3.onPress = value3;
const FormRow3 = (require(7972) /* metro dependency 7972: native */).FormRow;
let Checkbox = FormRow3.Checkbox;
formRowProps3.trailing = <Checkbox selected={r14} />;
const items2 = [<FormRow {...formRowProps3} />];
const FormText = (require(7972) /* metro dependency 7972: native */).FormText;
items2[1] = <FormText style={styles.info}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pfjsB5)}</FormText>;
items2[2] = <FormText style={styles.info}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cW1nr9)}</FormText>;
items2[3] = <FormText style={styles.info}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.eswIfi,
{learnMoreHook: learnMoreHook})}</FormText>;
const FormTitle = (require(7972) /* metro dependency 7972: native */).FormTitle;
items2[4] = <FormTitle title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0t2wRW'])} thinTitle />;
const formRowProps = {DEPRECATED_style: styles.formRow};
const FormRow4 = (require(7972) /* metro dependency 7972: native */).FormRow;
Label = FormRow4.Label;
formRowProps.label = <Label style={styles.formText} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['eJnn0+'])} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
const X7pIKN = (require(1244) /* metro dependency 1244: indexNative */).t.X7pIKN;
formRowProps.subLabel = <Text variant="text-sm/medium" color="text-default">{Reflect.apply(string, intl,
[X7pIKN])}</Text>;
formRowProps.onPress = value4;
const FormRow5 = (require(7972) /* metro dependency 7972: native */).FormRow;
Checkbox = FormRow5.Checkbox;
formRowProps.trailing = <Checkbox selected={allowPhone} />;
items2[5] = <FormRow {...formRowProps} />;
const formRowProps2 = {DEPRECATED_style: styles.formRow};
const FormRow6 = (require(7972) /* metro dependency 7972: native */).FormRow;
Label = FormRow6.Label;
formRowProps2.label = <Label style={styles.formText} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dI4d4S)} />;
formRowProps2.subLabel = <Text variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ilGsHE)}</Text>;
formRowProps2.onPress = value5;
const FormRow7 = (require(7972) /* metro dependency 7972: native */).FormRow;
Checkbox = FormRow7.Checkbox;
formRowProps2.trailing = <Checkbox selected={allowEmail} />;
items2[6] = <FormRow {...formRowProps2} />;
const view = <View style={styles.container}>{items2}</View>;
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
return (
<ActionSheet startExpanded>
{view}
</ActionSheet>
);
}
function DiscoverabilityActionSheetLearnMoreHook(a0, a1) { // fn#92571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12232:1473, owner: DiscoverabilityActionSheet.learnMoreHook, offset: 0x0209015e, size: 91 bytes, params: 3, frame: 17
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
onPress={(require(11997) /* metro dependency 11997: ContactSyncUtils */).handleOpenLearnMoreLink}
variant="text-sm/medium"
color="text-link"
key={a1}
>
{a0}
</Text>
);
}
global.__d(_fun92566, 12046, [31, 27, 11994, 661, 33, 4501, 697, 7972, 1244, 4573, 11997, 6805,
2]) /* metro module 12046, dependencies: [31, 27, 11994, 661, 33, 4501, 697, 7972, 1244, 4573, 11997, 6805, 2] */;
@@ -1,121 +1,179 @@
/* Metro module 12045; source: modules/nuf/native/components/DiscoverabilityLanding.tsx; dependencies: [31, 27, 11994, 661, 33, 4501, 697, 6597, 1585, 4080, 12046, 1962, 5314, 5475, 12047, 4573, 1244, 1305, 7972, 12021, 4578, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import FastImage from '../../../../components_native/common/FastImage.tsx'; /* Metro dependency 5475 */
import TextStyles from '../../../rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import Module12047 from '../../../../by-id/module-12047.js'; /* Metro dependency 12047 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
import * as NativeModule2 from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as ContactSyncModalStoreModule from '../../../contact_sync/native/ContactSyncModalStore.tsx'; /* Metro dependency 11994 */
function _fun92561(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12231:6, offset: 0x0208f34a, size: 600 bytes, params: 8, frame: 29
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const env0_5 = value.ScrollView;
const env0_6 = (require(11994) /* metro dependency 11994: ContactSyncModalStore */).useContactSyncModalStore;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const Fonts = (ConstantsModule).Fonts;
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;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
object2.headerContainer = {'flexGrow': 0, 'justifyContent': 'center', 'marginBottom': 24};
object2.header = {'paddingHorizontal': 16, 'alignItems': 'center'};
object2.image = {'width': '100%', 'marginHorizontal': 0};
object2.button = {'flexGrow': 0, 'marginHorizontal': 16, 'marginBottom': 24};
object2.title = {'textAlign': 'center', 'marginTop': 16};
const object4 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
object.headerContainer = {'flexGrow': 0, 'justifyContent': 'center', 'marginBottom': 24};
object.header = {'paddingHorizontal': 16, 'alignItems': 'center'};
object.image = {'width': '100%', 'marginHorizontal': 0};
object.button = {'flexGrow': 0, 'marginHorizontal': 16, 'marginBottom': 24};
object.title = {'textAlign': 'center', 'marginTop': 16};
const object3 = {};
const DISPLAY_MEDIUM = Fonts.DISPLAY_MEDIUM;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
copyDataProperties(object4, textStyles(DISPLAY_MEDIUM, TEXT_SUBTLE, 14), undefined);
object4['textAlign'] = 'center';
object4['marginTop'] = 8;
object2.subtitle = object4;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.formRow = {paddingVertical: 16, backgroundColor: BACKGROUND_SURFACE_HIGH};
const object6 = {};
const value3 = textStyles;
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
copyDataProperties(object3, TextStyles(DISPLAY_MEDIUM, TEXT_SUBTLE, 14), undefined);
object3['textAlign'] = 'center';
object3['marginTop'] = 8;
object.subtitle = object3;
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
object.formRow = {paddingVertical: 16, backgroundColor: BACKGROUND_SURFACE_HIGH};
const object5 = {};
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
copyDataProperties(object6, value3(PRIMARY_SEMIBOLD, INTERACTIVE_TEXT_ACTIVE, 16), undefined);
object2.formText = object6;
object2.footerContainer = {'flexGrow': 1, 'width': '100%'};
object2.info = {'paddingHorizontal': 16, 'marginTop': 8, 'marginBottom': 24};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/DiscoverabilityLanding.tsx');
const INTERACTIVE_TEXT_ACTIVE = (Native).colors.INTERACTIVE_TEXT_ACTIVE;
copyDataProperties(object5, TextStyles(PRIMARY_SEMIBOLD, INTERACTIVE_TEXT_ACTIVE, 16), undefined);
object.formText = object5;
object.footerContainer = {'flexGrow': 1, 'width': '100%'};
object.info = {'paddingHorizontal': 16, 'marginTop': 8, 'marginBottom': 24};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/DiscoverabilityLanding.tsx');
exports.default = DiscoverabilityLanding;
}
function DiscoverabilityLanding({onNext}) { // fn#92562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12231:942, offset: 0x0208f5a2, size: 1031 bytes, params: 2, frame: 33
const styles = useStyles();
const {allowEmail, allowPhone} = useContactSyncModalStore();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const env0_3Binding = env0_3.useCallback(_fun92563, [allowPhone, allowEmail]);
const object = {};
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object.paddingTop = NAV_BAR_HEIGHT + 32;
object.paddingBottom = bottom + 16;
const items2 = [((Component) => <Component resizeMode="contain" style={styles.image} source={importDefault(12047) /* metro dependency 12047 */} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items2[1] = <Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [(require(1244) /* metro dependency 1244: indexNative */).t.n8nw6j])}</Text>;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
string = intl.string;
const KMW0kP = (require(1244) /* metro dependency 1244: indexNative */).t.KMW0kP;
items2[2] = <LegacyText style={styles.subtitle}>{Reflect.apply(string, intl, [KMW0kP])}</LegacyText>;
const view = <View style={styles.headerContainer}><View style={styles.header}>{items2}</View></View>;
const FormCheckboxRow = (require(7972) /* metro dependency 7972: native */).FormCheckboxRow;
const formCheckboxRowProps = {DEPRECATED_style: styles.formRow};
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const Label = FormRow.Label;
formCheckboxRowProps.label = <Label style={styles.formText} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gMUgpv)} />;
formCheckboxRowProps.onPress = (require(12021) /* metro dependency 12021: NUFActionCreators */).toggleDiscoverabilityForUser;
formCheckboxRowProps.selected = allowEmail || allowPhone;
const items3 = [<FormCheckboxRow {...formCheckboxRowProps} />];
const items4 = [intl.string((require(1244) /* metro dependency 1244: indexNative */).t['DGZg+k']), ' '];
const format = intl.format;
const QmF5z4 = (require(1244) /* metro dependency 1244: indexNative */).t.QmF5z4;
items4[2] = Reflect.apply(format, intl, [QmF5z4, {learnMoreHook: learnMoreHook}]);
items3[1] = <Text style={styles.info} variant="heading-deprecated-12/medium" color="text-default">{items4}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const PDTjLN = (require(1244) /* metro dependency 1244: indexNative */).t.PDTjLN;
items3[2] = <View style={styles.button}><Button text={Reflect.apply(string, intl, [PDTjLN])} onPress={function() {
return onNext();
}} grow /></View>;
return (
<ScrollView style={styles.container} contentContainerStyle={object}>
{view}
<View style={styles.footerContainer}>
{items3}
function DiscoverabilityLanding({onNext}) { // fn#92562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12231:942, offset: 0x0208f5a2, size: 1031 bytes, params: 2, frame: 33
const styles = useStyles();
const {allowEmail, allowPhone} = useContactSyncModalStore();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const env0_3Binding = ReactModule.useCallback(_fun92563, [allowPhone, allowEmail]);
const object2 = {};
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
object2.paddingTop = NAV_BAR_HEIGHT + 32;
object2.paddingBottom = bottom + 16;
const items2 = [
((Component) => <Component resizeMode="contain" style={styles.image} source={Module12047} />)(FastImage),
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items2[1] = (
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.n8nw6j])}
</Text>
);
const LegacyText = (NativeModule).LegacyText;
string = intl.string;
const KMW0kP = (require(1244) /* metro dependency 1244: indexNative */).t.KMW0kP;
items2[2] = (
<LegacyText style={styles.subtitle}>
{Reflect.apply(string, intl, [KMW0kP])}
</LegacyText>
);
const view = (
<View style={styles.headerContainer}>
<View style={styles.header}>
{items2}
</View>
</View>
</ScrollView>
);
}
);
const FormCheckboxRow = (NativeModule2).FormCheckboxRow;
const formCheckboxRowProps = {DEPRECATED_style: styles.formRow};
const FormRow = (NativeModule2).FormRow;
const Label = FormRow.Label;
formCheckboxRowProps.label = (
<Label
style={styles.formText}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gMUgpv)}
/>
);
formCheckboxRowProps.onPress = (require(12021) /* metro dependency 12021: NUFActionCreators */).toggleDiscoverabilityForUser;
formCheckboxRowProps.selected = allowEmail || allowPhone;
const items3 = [
<FormCheckboxRow {...formCheckboxRowProps} />,
];
const items4 = [intl.string((require(1244) /* metro dependency 1244: indexNative */).t['DGZg+k']), ' '];
const format = intl.format;
const QmF5z4 = (require(1244) /* metro dependency 1244: indexNative */).t.QmF5z4;
items4[2] = Reflect.apply(format, intl, [QmF5z4, {learnMoreHook: learnMoreHook_92564}]);
items3[1] = (
<Text
style={styles.info}
variant="heading-deprecated-12/medium"
color="text-default"
>
{items4}
</Text>
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const PDTjLN = (require(1244) /* metro dependency 1244: indexNative */).t.PDTjLN;
items3[2] = (
<View style={styles.button}>
<Button
text={Reflect.apply(string, intl, [PDTjLN])}
onPress={function() {
return onNext();
}}
grow
/>
</View>
);
return (
<ScrollView style={styles.container} contentContainerStyle={object2}>
{view}
<View style={styles.footerContainer}>
{items3}
</View>
</ScrollView>
);
function _fun92563() { // fn#92563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12231:1070, offset: 0x0208f9a9, size: 103 bytes, params: 1, frame: 17
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[9]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[11]);
value = value(dependencyMap[10], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'Discoverability Landing', {allowPhone: allowPhone,
allowEmail: allowEmail}]);
}
function _fun92563() { // fn#92563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12231:1070, offset: 0x0208f9a9, size: 103 bytes, params: 1, frame: 17
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[9]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[11]);
value = value(dependencyMap[10], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'Discoverability Landing', {allowPhone: allowPhone,
allowEmail: allowEmail}]);
}
function DiscoverabilityLandingLearnMoreHook(a0, a1) { // fn#92564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12231:2159, owner: DiscoverabilityLanding.learnMoreHook, offset: 0x0208fa10, size: 80 bytes, params: 3, frame: 15
const Text = (TextModule).Text;
return (
<Text
onPress={ReactModule}
variant="text-sm/medium"
color="text-link"
key={a1}
>
{a0}
</Text>
);
}
}
function DiscoverabilityLandingLearnMoreHook(a0, a1) { // fn#92564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12231:2159, owner: DiscoverabilityLanding.learnMoreHook, offset: 0x0208fa10, size: 80 bytes, params: 3, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
onPress={env0_3}
variant="text-sm/medium"
color="text-link"
key={a1}
>
{a0}
</Text>
);
}
global.__d(_fun92561, 12045, [31, 27, 11994, 661, 33, 4501, 697, 6597, 1585, 4080, 12046, 1962, 5314, 5475, 12047,
4573, 1244, 1305, 7972, 12021, 4578,
2]) /* metro module 12045, dependencies: [31, 27, 11994, 661, 33, 4501, 697, 6597, 1585, 4080, 12046, 1962, 5314, 5475, 12047, 4573, 1244, 1305, 7972, 12021, 4578, 2] */;
@@ -1,126 +1,146 @@
/* Metro module 12044; source: modules/nuf/native/components/DiscoverabilityModal.tsx; dependencies: [31, 27, 11994, 1878, 661, 33, 4501, 697, 5314, 1484, 566, 12001, 676, 12021, 12045, 12014, 480, 5280, 1244, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ContactSyncActionCreators from '../../../contact_sync/native/ContactSyncActionCreators.tsx'; /* Metro dependency 12001 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AnalyticsUtilsModule from '../../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ConstantsIOSModule from '../../../../ConstantsIOS.tsx'; /* Metro dependency 676 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
import * as ContactSyncModalStoreModule from '../../../contact_sync/native/ContactSyncModalStore.tsx'; /* Metro dependency 11994 */
import * as NUFActionCreatorsModule from '../NUFActionCreators.tsx'; /* Metro dependency 12021 */
function _fun92546(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:6, offset: 0x0208ed55, size: 365 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = DiscoverabilityModal;
const DiscoverabilityModal2 = DiscoverabilityModal;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(11994) /* metro dependency 11994: ContactSyncModalStore */).useContactSyncModalStore;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const ModalAnimation = (require(661) /* metro dependency 661: Constants */).ModalAnimation;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'flex': 1, 'backgroundColor': null, 'justifyContent': 'center', 'paddingBottom': 44};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object.paddingTop = NAV_BAR_HEIGHT + 32;
const env0_8 = Reflect.apply(createStyles, createStylesModule, [{container: object}]);
const ModalAnimation = (ConstantsModule).ModalAnimation;
const createStyles = CreateStylesModule.createStyles;
const object2 = {'flex': 1, 'backgroundColor': null, 'justifyContent': 'center', 'paddingBottom': 44};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
object2.paddingTop = NAV_BAR_HEIGHT + 32;
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [{container: object2}]);
const SLIDE_IN_OUT = ModalAnimation.SLIDE_IN_OUT;
closure.modalConfig = {animation: SLIDE_IN_OUT};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/DiscoverabilityModal.tsx');
exports.default = closure;
}
function DiscoverabilityLandingScene() { // fn#92547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:379, offset: 0x0208eec2, size: 213 bytes, params: 1, frame: 20
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun92548);
const {allowPhone, allowEmail} = useContactSyncModalStore();
return ((Component) => <Component onNext={allowEmail.useCallback(_fun92549, [value2, value3, allowEmail, allowPhone,
allowPhone || allowEmail])} />)(importDefault(12045) /* metro dependency 12045: DiscoverabilityLanding */);
}
function DiscoverabilityNameScene() { // fn#92550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:805, offset: 0x0208f060, size: 190 bytes, params: 1, frame: 19
const styles = useStyles();
const {name, allowPhone} = useContactSyncModalStore();
env0_3.useEffect(_fun92551, [allowPhone]);
return (
<View style={styles.container}>
{((Component) => <Component onNext={env0_3.useCallback(_fun92552,
[])} loading={false} initialName={name ?? ''} />)(importDefault(12014) /* metro dependency 12014: ContactSyncNameInput */)}
</View>
);
}
function DiscoverabilityModal() { // fn#92553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1165, offset: 0x0208f191, size: 159 bytes, params: 1, frame: 19
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const navigatorProps = {screens: env0_3.useMemo(function() {
return _fun92555();
}, [])};
const DiscoverabilityScenes = (require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes;
const LANDING = DiscoverabilityScenes.LANDING;
navigatorProps.initialRouteName = LANDING;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
navigatorProps.headerBackTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
return <Navigator {...navigatorProps} />;
}
function _fun92549() { // fn#92549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:608, offset: 0x0208efba, size: 166 bytes, params: 1, frame: 15
var binding;
const value = environment.__proto__;
(importDefault(12001) /* metro dependency 12001: ContactSyncActionCreators */).updateDiscoverability({phone: allowPhone,
email: allowEmail});
if (env0_4) {
if (env0_1 == null) {
(require(12021) /* metro dependency 12021: NUFActionCreators */).closeDiscoverabilityModal(false);
} else if (allowPhone) {
binding = env0_0;
binding.push((require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes.NAME);
} else {
(require(12021) /* metro dependency 12021: NUFActionCreators */).closeDiscoverabilityModal(false);
DiscoverabilityModal2.modalConfig = {animation: SLIDE_IN_OUT};
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/DiscoverabilityModal.tsx');
exports.default = DiscoverabilityModal2;
function DiscoverabilityLandingScene() { // fn#92547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:379, offset: 0x0208eec2, size: 213 bytes, params: 1, frame: 20
const value2 = (UseNavigationNativeModule).useNavigation();
const value3 = (FluxModule).useStateFromStores([UserStore], _fun92548);
const {allowPhone, allowEmail} = useContactSyncModalStore();
return ((Component) => <Component onNext={allowEmail.useCallback(_fun92549, [value2, value3, allowEmail, allowPhone,
allowPhone || allowEmail])} />)(importDefault(12045) /* metro dependency 12045: DiscoverabilityLanding */);
function _fun92548() { // fn#92548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:483, offset: 0x0208ef97, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.phone;
}
} else {
(require(12021) /* metro dependency 12021: NUFActionCreators */).closeDiscoverabilityModal(false);
function _fun92549() { // fn#92549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:608, offset: 0x0208efba, size: 166 bytes, params: 1, frame: 15
var binding;
const value = environment.__proto__;
(ContactSyncActionCreators).updateDiscoverability({phone: allowPhone,
email: allowEmail});
if (ReactNativeModule.View) {
if (env0_1 == null) {
(require(12021) /* metro dependency 12021: NUFActionCreators */).closeDiscoverabilityModal(false);
} else if (allowPhone) {
binding = env0_0;
binding.push((require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes.NAME);
} else {
(require(12021) /* metro dependency 12021: NUFActionCreators */).closeDiscoverabilityModal(false);
}
} else {
(require(12021) /* metro dependency 12021: NUFActionCreators */).closeDiscoverabilityModal(false);
}
}
}
}
function _fun92551() { // fn#92551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:894, offset: 0x0208f11e, size: 52 bytes, params: 1, frame: 11
var value;
if (!allowPhone) {
value = environment.__proto__;
value = require(12021) /* metro dependency 12021: NUFActionCreators */;
value.closeDiscoverabilityModal(false);
function DiscoverabilityNameScene() { // fn#92550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:805, offset: 0x0208f060, size: 190 bytes, params: 1, frame: 19
const styles = useStyles();
const {name, allowPhone} = useContactSyncModalStore();
ReactModule.useEffect(_fun92551, [allowPhone]);
return (
<View style={styles.container}>
{((Component) => <Component onNext={ReactModule.useCallback(_fun92552,
[])} loading={false} initialName={name ?? ''} />)(importDefault(12014) /* metro dependency 12014: ContactSyncNameInput */)}
</View>
);
function _fun92551() { // fn#92551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:894, offset: 0x0208f11e, size: 52 bytes, params: 1, frame: 11
var value;
if (!allowPhone) {
value = environment.__proto__;
value = require(12021) /* metro dependency 12021: NUFActionCreators */;
value.closeDiscoverabilityModal(false);
}
}
function _fun92552(a0) { // fn#92552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:969, offset: 0x0208f152, size: 63 bytes, params: 2, frame: 15
const value = environment.__proto__;
(NUFActionCreatorsModule).startContactSyncForDiscoverability(a0);
(NUFActionCreatorsModule).closeDiscoverabilityModal(false);
}
}
function DiscoverabilityModal() { // fn#92553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1165, offset: 0x0208f191, size: 159 bytes, params: 1, frame: 19
const Navigator = (NavigatorNativeModule).Navigator;
const navigatorProps = {screens: ReactModule.useMemo(function() {
return _fun92555();
}, [])};
const DiscoverabilityScenes = (ConstantsIOSModule).DiscoverabilityScenes;
const LANDING = DiscoverabilityScenes.LANDING;
navigatorProps.initialRouteName = LANDING;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
navigatorProps.headerBackTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
return <Navigator {...navigatorProps} />;
function _fun92554() { // fn#92554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1245, offset: 0x0208f230, size: 17 bytes, params: 1, frame: 9
return getScreens_92555();
function getScreens_92555() { // fn#92555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1249, offset: 0x0208f241, size: 219 bytes, params: 1, frame: 18
const object = {};
const DiscoverabilityScenes = (ConstantsIOSModule).DiscoverabilityScenes;
const LANDING = DiscoverabilityScenes.LANDING;
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
let DISCOVERABILITY = ImpressionNames.DISCOVERABILITY;
object[LANDING] = {'ignoreKeyboard': true, 'impressionName': null, 'fullscreen': true,
impressionName: DISCOVERABILITY, headerLeft: function() {
return null;
}, headerTitle: function() {
return null;
}, render: render_92558};
const NAME = DiscoverabilityScenes.NAME;
DISCOVERABILITY = ImpressionNames.DISCOVERABILITY;
object[NAME] = {'ignoreKeyboard': true, 'impressionName': null, 'fullscreen': true, impressionName: DISCOVERABILITY,
headerTitle: function() {
return null;
}, render: render_92560};
return object;
function getScreens_92555Render() { // fn#92558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1456, owner: getScreens_92555.render, offset: 0x0208f31c, size: 23 bytes, params: 1, frame: 13
return <DiscoverabilityLandingScene />;
}
function getScreens_92555Render_92560() { // fn#92560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1650, owner: getScreens_92555.render, offset: 0x0208f333, size: 23 bytes, params: 1, frame: 13
return <DiscoverabilityNameScene />;
}
}
}
}
}
function _fun92552(a0) { // fn#92552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:969, offset: 0x0208f152, size: 63 bytes, params: 2, frame: 15
const value = environment.__proto__;
(require(12021) /* metro dependency 12021: NUFActionCreators */).startContactSyncForDiscoverability(a0);
(require(12021) /* metro dependency 12021: NUFActionCreators */).closeDiscoverabilityModal(false);
}
function _fun92554() { // fn#92554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1245, offset: 0x0208f230, size: 17 bytes, params: 1, frame: 9
return getScreens_92555();
}
function getScreens_92555() { // fn#92555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1249, offset: 0x0208f241, size: 219 bytes, params: 1, frame: 18
const object2 = {};
const DiscoverabilityScenes = (require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes;
const LANDING = DiscoverabilityScenes.LANDING;
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
let DISCOVERABILITY = ImpressionNames.DISCOVERABILITY;
object2[LANDING] = {'ignoreKeyboard': true, 'impressionName': null, 'fullscreen': true,
impressionName: DISCOVERABILITY, headerLeft: function() {
return null;
}, headerTitle: function() {
return null;
}, render: render_92558};
const NAME = DiscoverabilityScenes.NAME;
DISCOVERABILITY = ImpressionNames.DISCOVERABILITY;
object2[NAME] = {'ignoreKeyboard': true, 'impressionName': null, 'fullscreen': true,
impressionName: DISCOVERABILITY, headerTitle: function() {
return null;
}, render: render_92560};
return object2;
}
function getScreens_92555Render() { // fn#92558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1456, owner: getScreens_92555.render, offset: 0x0208f31c, size: 23 bytes, params: 1, frame: 13
return <DiscoverabilityLandingScene />;
}
function getScreens_92555Render_92560() { // fn#92560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12230:1650, owner: getScreens_92555.render, offset: 0x0208f333, size: 23 bytes, params: 1, frame: 13
return <DiscoverabilityNameScene />;
}
global.__d(_fun92546, 12044, [31, 27, 11994, 1878, 661, 33, 4501, 697, 5314, 1484, 566, 12001, 676, 12021, 12045,
12014, 480, 5280, 1244,
2]) /* metro module 12044, dependencies: [31, 27, 11994, 1878, 661, 33, 4501, 697, 5314, 1484, 566, 12001, 676, 12021, 12045, 12014, 480, 5280, 1244, 2] */;
@@ -1,218 +1,229 @@
/* Metro module 12023; source: modules/nuf/native/components/NUFGuildTemplates.tsx; dependencies: [5, 31, 27, 3973, 661, 12024, 9006, 33, 6593, 11932, 8776, 12025, 12041, 683, 480, 5282, 12000, 1230, 12027, 12029, 9662, 1244, 12032, 12033, 12042, 9444, 5280, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import DefaultRouteStore from '../../../../stores/DefaultRouteStore.tsx'; /* Metro dependency 3973 */
import HubEmailConnectionModal from '../../../hub/native/components/HubEmailConnectionModal.tsx'; /* Metro dependency 9444 */
import CreateGuildContainer from '../../../create_guild/native/components/CreateGuildContainer.tsx'; /* Metro dependency 9662 */
import CreateGuildModalActionCreators from '../../../create_guild/native/CreateGuildModalActionCreators.tsx'; /* Metro dependency 12025 */
import GuildTemplates from '../../../create_guild/native/components/GuildTemplates.tsx'; /* Metro dependency 12027 */
import CreationIntent from '../../../create_guild/native/components/CreationIntent.tsx'; /* Metro dependency 12029 */
import JoinServer from '../../../create_guild/native/components/JoinServer.tsx'; /* Metro dependency 12032 */
import AcceptInviteContainer from '../../../create_guild/native/components/AcceptInviteContainer.tsx'; /* Metro dependency 12033 */
import ChannelPrompt from './ChannelPrompt.tsx'; /* Metro dependency 12042 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AnalyticsUtilsModule from '../../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as Router_utilsModule from '../../../routing/router_utils.tsx'; /* Metro dependency 1230 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as NewUserAnalyticsUtilsModule from '../NewUserAnalyticsUtils.tsx'; /* Metro dependency 12000 */
import * as CreateGuildConstantsModule from '../../../create_guild/CreateGuildConstants.tsx'; /* Metro dependency 12024 */
function _fun92362(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:6, offset: 0x020859fa, size: 381 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const onCreateGuild = function() {
return _onCreateGuild.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).Keyboard;
const defaultRouteStore = importDefault(3973) /* metro dependency 3973: DefaultRouteStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_7 = value.AnalyticEvents;
const env0_8 = value.AnalyticsSections;
const env0_9 = value.NOOP;
const env0_10 = (require(12024) /* metro dependency 12024: CreateGuildConstants */).GuildTemplateId;
value = require(9006) /* metro dependency 9006: CreateGuildConstants */;
const env0_11 = value.CreateGuildModalStates;
const env0_12 = value.GuildTemplateTriggers;
const env0_13 = value.NUXGuildTemplatesAnalytics;
const env0_14 = (require(33) /* metro dependency 33 */).jsx;
object2 = {};
const ImpressionGroups = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionGroups;
object = {};
const ImpressionGroups = (AnalyticsUtilsModule).ImpressionGroups;
const GUILD_ADD_FLOW = ImpressionGroups.GUILD_ADD_FLOW;
object2.impression_group = GUILD_ADD_FLOW;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/NUFGuildTemplates.tsx');
object.impression_group = GUILD_ADD_FLOW;
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/NUFGuildTemplates.tsx');
exports.default = NUFGuildTemplates;
}
function _onCreateGuild() { // fn#92364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:408, offset: 0x02085b77, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun92366).apply(this, arguments);
}
function _onCreateServer() { // fn#92367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:778, offset: 0x02085ca7, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun92369).apply(this, arguments);
}
function getScreens_92370() { // fn#92370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1016, offset: 0x02085d47, size: 634 bytes, params: 1, frame: 21
const GUILD_TEMPLATES = CreateGuildModalStates.GUILD_TEMPLATES;
const object = {};
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const GUILD_ADD_LANDING = ImpressionNames.GUILD_ADD_LANDING;
object.impressionName = GUILD_ADD_LANDING;
object.impressionProperties = env0_15;
object.fullscreen = true;
object.headerTitle = function() {
return null;
};
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun92372);
object.render = render_92373;
const CREATION_INTENT = CreateGuildModalStates.CREATION_INTENT;
const GUILD_ADD_INTENT_SELECTION = ImpressionNames.GUILD_ADD_INTENT_SELECTION;
const CREATE_SERVER = CreateGuildModalStates.CREATE_SERVER;
const GUILD_ADD_CUSTOMIZE = ImpressionNames.GUILD_ADD_CUSTOMIZE;
const JOIN_SERVER = CreateGuildModalStates.JOIN_SERVER;
const GUILD_ADD_JOIN = ImpressionNames.GUILD_ADD_JOIN;
const ACCEPT_INVITE = CreateGuildModalStates.ACCEPT_INVITE;
const GUILD_ADD_ACCEPT_INVITE = ImpressionNames.GUILD_ADD_ACCEPT_INVITE;
const CHANNEL_PROMPT = CreateGuildModalStates.CHANNEL_PROMPT;
const GUILD_ADD_CHANNEL_PROMPT = ImpressionNames.GUILD_ADD_CHANNEL_PROMPT;
const JOIN_STUDENT_HUB = CreateGuildModalStates.JOIN_STUDENT_HUB;
return {[GUILD_TEMPLATES]: object, [CREATION_INTENT]: {impressionName: GUILD_ADD_INTENT_SELECTION,
impressionProperties: env0_15, fullscreen: true, headerTitle: function() {
return null;
}, render: render_92375}, [CREATE_SERVER]: {impressionName: GUILD_ADD_CUSTOMIZE, impressionProperties: env0_15,
fullscreen: true, headerTitle: function() {
return null;
}, render: render_92377}, [JOIN_SERVER]: {impressionName: GUILD_ADD_JOIN, impressionProperties: env0_15,
fullscreen: true, headerTitle: function() {
return null;
}, render: render_92381}, [ACCEPT_INVITE]: {impressionName: GUILD_ADD_ACCEPT_INVITE, impressionProperties: env0_15,
fullscreen: true, headerTitle: function() {
return null;
}, headerLeft: function() {
return null;
}, render: render_92384}, [CHANNEL_PROMPT]: {impressionName: GUILD_ADD_CHANNEL_PROMPT,
impressionProperties: env0_15, fullscreen: true, headerTitle: function() {
return null;
}, render: render_92386}, [JOIN_STUDENT_HUB]: {impressionName: undefined, impressionProperties: env0_15,
fullscreen: true, ignoreKeyboard: true, headerTitle: function() {
return null;
}, headerLeft: function() {
return null;
}, render: render_92390}};
}
function NUFGuildTemplates() { // fn#92391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:3063, offset: 0x020862e9, size: 160 bytes, params: 1, frame: 20
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const navigatorProps = {screens: env0_4.useMemo(function() {
return getScreens_92370();
}, []), onWillFocus: Keyboard.dismiss};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
navigatorProps.headerBackTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
const GUILD_TEMPLATES = CreateGuildModalStates.GUILD_TEMPLATES;
navigatorProps.initialRouteName = GUILD_TEMPLATES;
return <Navigator {...navigatorProps} />;
}
function* _fun92366(a0) { // fn#92366, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:459, offset: 0x02085bb4, size: 243 bytes, params: 2, frame: 19
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_1;
var value3 = binding(env2_2[8]);
yield value3.transitionToGuildSync(a0);
if (false) {
return undefined;
}
binding = env2_0;
var binding2 = env2_2;
binding(binding2[9]).createGuildProgress(a0);
var binding3 = env2_1;
binding3(binding2[10])();
binding3(binding2[11]).closeCreateGuildOnboardingModal();
binding(binding2[12]).showInstantInviteModal(a0);
var value9 = binding3(binding2[13]);
var track = value9.track;
var USER_FLOW_TRANSITION = env2_7.USER_FLOW_TRANSITION;
var GUILD_CREATE_MODAL = env2_8.GUILD_CREATE_MODAL;
var CREATE_SERVER = env2_11.CREATE_SERVER;
Reflect.apply(track, value9, [USER_FLOW_TRANSITION, {flow_type: GUILD_CREATE_MODAL, from_step: CREATE_SERVER,
to_step: 'modal_closed'}]);
}
}
function* _fun92369(a0, a1, {id}) { // fn#92369, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:831, offset: 0x02085ce4, size: 99 bytes, params: 4, frame: 17
if (true) {
value = environment.__proto__.__proto__;
var CREATE = env2_10.CREATE;
if (id !== CREATE) {
yield env2_16(a1);
if (false) {
return undefined;
function _onCreateGuild() { // fn#92364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:408, offset: 0x02085b77, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun92366).apply(this, arguments);
function* _fun92366(a0) { // fn#92366, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:459, offset: 0x02085bb4, size: 243 bytes, params: 2, frame: 19
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_1;
var value3 = binding(env2_2[8]);
yield value3.transitionToGuildSync(a0);
if (false) {
return undefined;
}
binding = env2_0;
var binding2 = env2_2;
binding(binding2[9]).createGuildProgress(a0);
var binding3 = env2_1;
binding3(binding2[10])();
binding3(binding2[11]).closeCreateGuildOnboardingModal();
binding(binding2[12]).showInstantInviteModal(a0);
var value9 = binding3(binding2[13]);
var track = value9.track;
var USER_FLOW_TRANSITION = env2_7.USER_FLOW_TRANSITION;
var GUILD_CREATE_MODAL = env2_8.GUILD_CREATE_MODAL;
var CREATE_SERVER = env2_11.CREATE_SERVER;
Reflect.apply(track, value9, [USER_FLOW_TRANSITION, {flow_type: GUILD_CREATE_MODAL, from_step: CREATE_SERVER,
to_step: 'modal_closed'}]);
}
} else {
var push = a0.push;
var CHANNEL_PROMPT = env2_11.CHANNEL_PROMPT;
Reflect.apply(push, a0, [CHANNEL_PROMPT, {guildId: a1}]);
}
}
function _onCreateServer() { // fn#92367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:778, offset: 0x02085ca7, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun92369).apply(this, arguments);
function* _fun92369(a0, a1, {id}) { // fn#92369, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:831, offset: 0x02085ce4, size: 99 bytes, params: 4, frame: 17
if (true) {
value = environment.__proto__.__proto__;
var CREATE = env2_10.CREATE;
if (id !== CREATE) {
yield env2_16(a1);
if (false) {
return undefined;
}
} else {
var push = a0.push;
var CHANNEL_PROMPT = env2_11.CHANNEL_PROMPT;
Reflect.apply(push, a0, [CHANNEL_PROMPT, {guildId: a1}]);
}
}
}
}
function getScreens_92370() { // fn#92370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1016, offset: 0x02085d47, size: 634 bytes, params: 1, frame: 21
const GUILD_TEMPLATES = CreateGuildModalStates.GUILD_TEMPLATES;
const object2 = {};
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
const GUILD_ADD_LANDING = ImpressionNames.GUILD_ADD_LANDING;
object2.impressionName = GUILD_ADD_LANDING;
object2.impressionProperties = env0_15;
object2.fullscreen = true;
object2.headerTitle = function() {
return null;
};
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun92372);
object2.render = render_92373;
const CREATION_INTENT = CreateGuildModalStates.CREATION_INTENT;
const GUILD_ADD_INTENT_SELECTION = ImpressionNames.GUILD_ADD_INTENT_SELECTION;
const CREATE_SERVER = CreateGuildModalStates.CREATE_SERVER;
const GUILD_ADD_CUSTOMIZE = ImpressionNames.GUILD_ADD_CUSTOMIZE;
const JOIN_SERVER = CreateGuildModalStates.JOIN_SERVER;
const GUILD_ADD_JOIN = ImpressionNames.GUILD_ADD_JOIN;
const ACCEPT_INVITE = CreateGuildModalStates.ACCEPT_INVITE;
const GUILD_ADD_ACCEPT_INVITE = ImpressionNames.GUILD_ADD_ACCEPT_INVITE;
const CHANNEL_PROMPT = CreateGuildModalStates.CHANNEL_PROMPT;
const GUILD_ADD_CHANNEL_PROMPT = ImpressionNames.GUILD_ADD_CHANNEL_PROMPT;
const JOIN_STUDENT_HUB = CreateGuildModalStates.JOIN_STUDENT_HUB;
return {[GUILD_TEMPLATES]: object2, [CREATION_INTENT]: {impressionName: GUILD_ADD_INTENT_SELECTION,
impressionProperties: env0_15, fullscreen: true, headerTitle: function() {
return null;
}, render: render_92375}, [CREATE_SERVER]: {impressionName: GUILD_ADD_CUSTOMIZE, impressionProperties: env0_15,
fullscreen: true, headerTitle: function() {
return null;
}, render: render_92377}, [JOIN_SERVER]: {impressionName: GUILD_ADD_JOIN, impressionProperties: env0_15,
fullscreen: true, headerTitle: function() {
return null;
}, render: render_92381}, [ACCEPT_INVITE]: {impressionName: GUILD_ADD_ACCEPT_INVITE, impressionProperties: env0_15,
fullscreen: true, headerTitle: function() {
return null;
}, headerLeft: function() {
return null;
}, render: render_92384}, [CHANNEL_PROMPT]: {impressionName: GUILD_ADD_CHANNEL_PROMPT,
impressionProperties: env0_15, fullscreen: true, headerTitle: function() {
return null;
}, render: render_92386}, [JOIN_STUDENT_HUB]: {impressionName: undefined, impressionProperties: env0_15,
fullscreen: true, ignoreKeyboard: true, headerTitle: function() {
return null;
}, headerLeft: function() {
return null;
}, render: render_92390}};
function _fun92372() { // fn#92372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1224, offset: 0x02085fc1, size: 130 bytes, params: 1, frame: 20
const value = environment.__proto__;
const trackNUFStep = NewUserAnalyticsUtilsModule.trackNUFStep;
const STEP_GUILD_TEMPLATE = NUXGuildTemplatesAnalytics.STEP_GUILD_TEMPLATE;
const STEP_FRIEND_LIST = NUXGuildTemplatesAnalytics.STEP_FRIEND_LIST;
Reflect.apply(trackNUFStep, NewUserAnalyticsUtilsModule, [STEP_GUILD_TEMPLATE, STEP_FRIEND_LIST, {skip: true}]);
Router_utilsModule.transitionTo(DefaultRouteStore.fallbackRoute);
(CreateGuildModalActionCreators).closeCreateGuildOnboardingModal();
}
function getScreens_92370Render() { // fn#92373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1395, owner: getScreens_92370.render, offset: 0x02086043, size: 54 bytes, params: 1, frame: 14
const NUF = GuildTemplateTriggers.NUF;
return <GuildTemplates trigger={NUF} />;
}
function getScreens_92370Render_92375({guildTemplate}) { // fn#92375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1581, owner: getScreens_92370.render, offset: 0x02086079, size: 68 bytes, params: 2, frame: 15
const NUF = GuildTemplateTriggers.NUF;
return <CreationIntent guildTemplate={guildTemplate} trigger={NUF} />;
}
function getScreens_92370Render_92377(a0, a1) { // fn#92377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1791, owner: getScreens_92370.render, offset: 0x020860bd, size: 143 bytes, params: 3, frame: 18
var environment;
const env0_0 = a0;
const env0_1 = a1;
const value = environment.__proto__;
const defaultImportProps = {...a0};
defaultImportProps['onCreate'] = renderOnCreate;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
defaultImportProps['customTitle'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5HZu07']);
return <CreateGuildContainer {...defaultImportProps} />;
function renderOnCreate({guild}) { // fn#92378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1824, owner: getScreens_92370.render.onCreate, offset: 0x0208614c, size: 50 bytes, params: 2, frame: 15
return (function() {
return _onCreateServer.apply(this, arguments);
})(require, guild.id, env0_0.guildTemplate);
}
}
function getScreens_92370Render_92381() { // fn#92381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:2128, owner: getScreens_92370.render, offset: 0x0208617e, size: 72 bytes, params: 1, frame: 16
const value = environment.__proto__;
return ((Component) => <Component location="Onboarding Join Guild Modal" onClose={(CreateGuildModalActionCreators).closeCreateGuildModal} />)(JoinServer);
}
function getScreens_92370Render_92384({code}) { // fn#92384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:2393, owner: getScreens_92370.render, offset: 0x020861c6, size: 74 bytes, params: 2, frame: 16
const value = environment.__proto__;
return ((Component) => <Component code={code} onPressClose={(CreateGuildModalActionCreators).closeCreateGuildModal} />)(AcceptInviteContainer);
}
function getScreens_92370Render_92386({guildId}) { // fn#92386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:2621, owner: getScreens_92370.render, offset: 0x02086210, size: 148 bytes, params: 2, frame: 18
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<ChannelPrompt
hasSkip
hasBack={false}
onCancel={NOOP}
onSuccess={function() {
return onCreateGuild(guildId);
}}
guildId={guildId}
buttonText={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['uHXB+F'])}
/>
);
}
function getScreens_92370Render_92390() { // fn#92390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:2926, owner: getScreens_92370.render, offset: 0x020862bb, size: 46 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component isNestedNavigator />)(HubEmailConnectionModal);
}
}
function NUFGuildTemplates() { // fn#92391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:3063, offset: 0x020862e9, size: 160 bytes, params: 1, frame: 20
const Navigator = (NavigatorNativeModule).Navigator;
const navigatorProps = {screens: ReactModule.useMemo(function() {
return getScreens_92370();
}, []), onWillFocus: Keyboard.dismiss};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
navigatorProps.headerBackTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
const GUILD_TEMPLATES = CreateGuildModalStates.GUILD_TEMPLATES;
navigatorProps.initialRouteName = GUILD_TEMPLATES;
return <Navigator {...navigatorProps} />;
}
}
function _fun92372() { // fn#92372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1224, offset: 0x02085fc1, size: 130 bytes, params: 1, frame: 20
const value = environment.__proto__;
const newUserAnalyticsUtilsModule = require(12000) /* metro dependency 12000: NewUserAnalyticsUtils */;
const trackNUFStep = newUserAnalyticsUtilsModule.trackNUFStep;
const STEP_GUILD_TEMPLATE = NUXGuildTemplatesAnalytics.STEP_GUILD_TEMPLATE;
const STEP_FRIEND_LIST = NUXGuildTemplatesAnalytics.STEP_FRIEND_LIST;
Reflect.apply(trackNUFStep, newUserAnalyticsUtilsModule, [STEP_GUILD_TEMPLATE, STEP_FRIEND_LIST, {skip: true}]);
const router_utilsModule = require(1230) /* metro dependency 1230: router_utils */;
router_utilsModule.transitionTo(DefaultRouteStore.fallbackRoute);
(importDefault(12025) /* metro dependency 12025: CreateGuildModalActionCreators */).closeCreateGuildOnboardingModal();
}
function getScreens_92370Render() { // fn#92373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1395, owner: getScreens_92370.render, offset: 0x02086043, size: 54 bytes, params: 1, frame: 14
const GuildTemplates = importDefault(12027) /* metro dependency 12027: GuildTemplates */;
const NUF = GuildTemplateTriggers.NUF;
return <GuildTemplates trigger={NUF} />;
}
function getScreens_92370Render_92375({guildTemplate}) { // fn#92375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1581, owner: getScreens_92370.render, offset: 0x02086079, size: 68 bytes, params: 2, frame: 15
const CreationIntent = importDefault(12029) /* metro dependency 12029: CreationIntent */;
const NUF = GuildTemplateTriggers.NUF;
return <CreationIntent guildTemplate={guildTemplate} trigger={NUF} />;
}
function getScreens_92370Render_92377(a0, a1) { // fn#92377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1791, owner: getScreens_92370.render, offset: 0x020860bd, size: 143 bytes, params: 3, frame: 18
var environment;
const env0_0 = a0;
const env0_1 = a1;
const value = environment.__proto__;
const CreateGuildContainer = importDefault(9662) /* metro dependency 9662: CreateGuildContainer */;
const defaultImportProps = {...a0};
defaultImportProps['onCreate'] = renderOnCreate;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
defaultImportProps['customTitle'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5HZu07']);
return <CreateGuildContainer {...defaultImportProps} />;
}
function getScreens_92370Render_92381() { // fn#92381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:2128, owner: getScreens_92370.render, offset: 0x0208617e, size: 72 bytes, params: 1, frame: 16
const value = environment.__proto__;
return ((Component) => <Component location="Onboarding Join Guild Modal" onClose={(importDefault(12025) /* metro dependency 12025: CreateGuildModalActionCreators */).closeCreateGuildModal} />)(importDefault(12032) /* metro dependency 12032: JoinServer */);
}
function getScreens_92370Render_92384({code}) { // fn#92384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:2393, owner: getScreens_92370.render, offset: 0x020861c6, size: 74 bytes, params: 2, frame: 16
const value = environment.__proto__;
return ((Component) => <Component code={code} onPressClose={(importDefault(12025) /* metro dependency 12025: CreateGuildModalActionCreators */).closeCreateGuildModal} />)(importDefault(12033) /* metro dependency 12033: AcceptInviteContainer */);
}
function getScreens_92370Render_92386({guildId}) { // fn#92386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:2621, owner: getScreens_92370.render, offset: 0x02086210, size: 148 bytes, params: 2, frame: 18
const ChannelPrompt = importDefault(12042) /* metro dependency 12042: ChannelPrompt */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<ChannelPrompt
hasSkip
hasBack={false}
onCancel={NOOP}
onSuccess={function() {
return onCreateGuild(guildId);
}}
guildId={guildId}
buttonText={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['uHXB+F'])}
/>
);
}
function getScreens_92370Render_92390() { // fn#92390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:2926, owner: getScreens_92370.render, offset: 0x020862bb, size: 46 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component isNestedNavigator />)(importDefault(9444) /* metro dependency 9444: HubEmailConnectionModal */);
}
function renderOnCreate({guild}) { // fn#92378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12209:1824, owner: getScreens_92370.render.onCreate, offset: 0x0208614c, size: 50 bytes, params: 2, frame: 15
return (function() {
return _onCreateServer.apply(this, arguments);
})(require, guild.id, env0_0.guildTemplate);
}
global.__d(_fun92362, 12023, [5, 31, 27, 3973, 661, 12024, 9006, 33, 6593, 11932, 8776, 12025, 12041, 683, 480,
5282, 12000, 1230, 12027, 12029, 9662, 1244, 12032, 12033, 12042, 9444, 5280,
2]) /* metro module 12023, dependencies: [5, 31, 27, 3973, 661, 12024, 9006, 33, 6593, 11932, 8776, 12025, 12041, 683, 480, 5282, 12000, 1230, 12027, 12029, 9662, 1244, 12032, 12033, 12042, 9444, 5280, 2] */;
@@ -1,150 +1,197 @@
/* Metro module 15793; source: modules/nuf/native/components/NewUserModal.tsx; dependencies: [57, 31, 27, 33, 9884, 4501, 697, 15794, 1962, 4497, 5280, 15791, 5080, 15792, 5286, 477, 14357, 15795, 12013, 12002, 15796, 15798, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import SkipHeaderButton from './SkipHeaderButton.tsx'; /* Metro dependency 12013 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseAlertStoreNativeModule from '../../../../design/components/AlertModal/native/useAlertStore.native.tsx'; /* Metro dependency 4497 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as Module09884Module from '../../../../by-id/module-09884.js'; /* Metro dependency 9884 */
import * as NewUserModalTypesModule from './NewUserModalTypes.tsx'; /* Metro dependency 15792 */
function _fun121332(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:6, offset: 0x02544b39, size: 290 bytes, params: 8, frame: 21
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 */).NativeModules;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
const env0_8 = (Module09884Module).createNativeStackNavigator();
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
const env0_9 = Reflect.apply(createStyles, value, [{header: {'borderBottomWidth': 0, 'backgroundColor': null,
'shadowColor': 'transparent', backgroundColor: BACKGROUND_BASE_LOW}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/NewUserModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/NewUserModal.tsx');
exports.default = NewUserModal;
}
function NewUserModal({initialRouteName, initialOnboardingStepIndex}) { // fn#121333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:429, offset: 0x02544c5b, size: 593 bytes, params: 2, frame: 23
const env0_0 = useStyles();
let binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [initialOnboardingStepIndex]);
const value3 = Module00057(value2, 2);
const property = value3[0];
const env0_2 = value3[1];
useState = binding.useState;
const value4 = Module00057(Reflect.apply(useState, binding, [initialOnboardingStepIndex]), 2);
const property2 = value4[0];
var env0_4 = value4[1];
const env0_5 = binding.useRef(null);
const env0_6 = (NavigatorNativeModule).useAccessibilityNativeStackOptions();
const value5 = binding.useCallback(_fun121334, [property2, property]);
(require(5286) /* metro dependency 5286: useNavigatorBackPressHandlerNative */).useNavigatorBackPressHandler(function() {
var MinimizeApp = NativeModules.MinimizeApp;
MinimizeApp.minimizeApp();
return true;
});
const Navigator = env0_8.Navigator;
object = {screenOptions: screenOptions_121337};
const value6 = 'choose-avatar';
object.initialRouteName = initialRouteName ?? value6;
binding = env0_8;
let Screen = binding.Screen;
const items2 = [
<Screen
name="enable-notification"
getComponent={function() {
return require(dependencyMap[16]).RedesignNotificationScreen;
}}
initialParams={{onComplete: value5}}
/>,
];
Screen = binding.Screen;
items2[1] = (
<Screen
name={value6}
getComponent={function() {
return require(dependencyMap[17]).default;
}}
options={function() {
return {headerRight: _fun121343};
}}
initialParams={{onComplete: value5}}
/>
);
Screen = binding.Screen;
items2[2] = (
<Screen
name="contact-sync"
options={{headerShown: false}}
getComponent={function() {
return require(dependencyMap[19]).ContactSyncOnboardingModal;
}}
initialParams={{onComplete: value5}}
/>
);
Screen = binding.Screen;
items2[3] = (
<Screen
name="discoverability"
options={{headerShown: false}}
getComponent={function() {
return require(dependencyMap[20]).default;
}}
initialParams={{onComplete: value5}}
/>
);
Screen = binding.Screen;
items2[4] = (
<Screen
name="connect-guardian"
getComponent={function() {
return require(dependencyMap[21]).default;
}}
initialParams={{onComplete: value5}}
/>
);
return (
<Navigator {...object}>
{items2}
</Navigator>
);
function _fun121334(a0) { // fn#121334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:672, offset: 0x02544eac, size: 85 bytes, params: 2, frame: 16
let value = a0;
value = (require(15791) /* metro dependency 15791: NewUserUtils */).getNextOnboardingStep(value != null && value,
Module00057, env0_1);
value.then(_fun121335);
function _fun121335({lastShownStepIndex, onboardingStepIndex, continueNavigation}) { // fn#121335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:729, offset: 0x02544f01, size: 166 bytes, params: 2, frame: 17
const NEW_USER_MODAL_KEY = (NewUserModalTypesModule).NEW_USER_MODAL_KEY;
var value2;
var moduleValue;
env1_2(onboardingStepIndex);
env1_4(lastShownStepIndex);
if (continueNavigation) {
if (env1_5.current != null) {
value2 = environment.__proto__.__proto__;
moduleValue = require(15791) /* metro dependency 15791: NewUserUtils */;
moduleValue.continueToNextStep(onboardingStepIndex, env1_5.current);
} else {
value = environment.__proto__.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(NEW_USER_MODAL_KEY);
}
} else {
value = environment.__proto__.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(NEW_USER_MODAL_KEY);
}
}
function NewUserModal({initialRouteName, initialOnboardingStepIndex}) { // fn#121333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:429, offset: 0x02544c5b, size: 593 bytes, params: 2, frame: 23
var object2;
const env0_0 = useStyles();
let binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [initialOnboardingStepIndex]);
const binding2 = env0_3;
const value3 = binding2(value2, 2);
const property = value3[0];
const env0_2 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, [initialOnboardingStepIndex]), 2);
const property2 = value4[0];
var env0_4 = value4[1];
const env0_5 = binding.useRef(null);
const env0_6 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
const value5 = binding.useCallback(_fun121334, [property2, property]);
(require(5286) /* metro dependency 5286: useNavigatorBackPressHandlerNative */).useNavigatorBackPressHandler(function() {
var MinimizeApp = NativeModules.MinimizeApp;
MinimizeApp.minimizeApp();
return true;
});
const Navigator = env0_8.Navigator;
object2 = {screenOptions: screenOptions_121337};
const value6 = 'choose-avatar';
object2.initialRouteName = initialRouteName ?? value6;
binding = env0_8;
let Screen = binding.Screen;
const items2 = [<Screen name="enable-notification" getComponent={function() {
return require(dependencyMap[16]).RedesignNotificationScreen;
}} initialParams={{onComplete: value5}} />];
Screen = binding.Screen;
items2[1] = <Screen name={value6} getComponent={function() {
return require(dependencyMap[17]).default;
}} options={function() {
return {headerRight: _fun121343};
}} initialParams={{onComplete: value5}} />;
Screen = binding.Screen;
items2[2] = <Screen name="contact-sync" options={{headerShown: false}} getComponent={function() {
return require(dependencyMap[19]).ContactSyncOnboardingModal;
}} initialParams={{onComplete: value5}} />;
Screen = binding.Screen;
items2[3] = <Screen name="discoverability" options={{headerShown: false}} getComponent={function() {
return require(dependencyMap[20]).default;
}} initialParams={{onComplete: value5}} />;
Screen = binding.Screen;
items2[4] = <Screen name="connect-guardian" getComponent={function() {
return require(dependencyMap[21]).default;
}} initialParams={{onComplete: value5}} />;
return (
<Navigator {...object2}>
{items2}
</Navigator>
);
}
function _fun121334(a0) { // fn#121334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:672, offset: 0x02544eac, size: 85 bytes, params: 2, frame: 16
let value = a0;
value = (require(15791) /* metro dependency 15791: NewUserUtils */).getNextOnboardingStep(value != null && value,
env0_3, env0_1);
value.then(_fun121335);
}
function NewUserModalScreenOptions({navigation}) { // fn#121337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1044, owner: NewUserModal.screenOptions, offset: 0x02544fc2, size: 163 bytes, params: 2, frame: 15
env0_5.current = navigation;
const object2 = {'headerStyle': null, 'headerShadowVisible': false, 'title': '', 'headerLeft': null,
'headerRight': null, 'fullScreenGestureEnabled': false};
object2.headerStyle = styles.header;
object2.headerLeft = function() {
return null;
};
object2.headerRight = function() {
return null;
};
object2.presentation = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 'transparentModal' : 'card';
object2.animation = 'slide_from_right';
object2.headerBackVisible = false;
copyDataProperties(object2, env0_6, require);
return object2;
}
function NewUserModalOptions() { // fn#121342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1566, owner: NewUserModal.options, offset: 0x02545086, size: 18 bytes, params: 1, frame: 2
return {headerRight: headerRight_121343};
}
function _fun121335({lastShownStepIndex, onboardingStepIndex, continueNavigation}) { // fn#121335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:729, offset: 0x02544f01, size: 166 bytes, params: 2, frame: 17
const NEW_USER_MODAL_KEY = (require(15792) /* metro dependency 15792: NewUserModalTypes */).NEW_USER_MODAL_KEY;
var value2;
var moduleValue;
env1_2(onboardingStepIndex);
env1_4(lastShownStepIndex);
if (continueNavigation) {
if (env1_5.current != null) {
value2 = environment.__proto__.__proto__;
moduleValue = require(15791) /* metro dependency 15791: NewUserUtils */;
moduleValue.continueToNextStep(onboardingStepIndex, env1_5.current);
} else {
value = environment.__proto__.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(NEW_USER_MODAL_KEY);
}
} else {
value = environment.__proto__.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(NEW_USER_MODAL_KEY);
function NewUserModalScreenOptions({navigation}) { // fn#121337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1044, owner: NewUserModal.screenOptions, offset: 0x02544fc2, size: 163 bytes, params: 2, frame: 15
env0_5.current = navigation;
const object = {'headerStyle': null, 'headerShadowVisible': false, 'title': '', 'headerLeft': null,
'headerRight': null, 'fullScreenGestureEnabled': false};
object.headerStyle = styles.header;
object.headerLeft = function() {
return null;
};
object.headerRight = function() {
return null;
};
object.presentation = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 'transparentModal' : 'card';
object.animation = 'slide_from_right';
object.headerBackVisible = false;
copyDataProperties(object, env0_6, require);
return object;
}
function NewUserModalOptions() { // fn#121342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1566, owner: NewUserModal.options, offset: 0x02545086, size: 18 bytes, params: 1, frame: 2
return {headerRight: headerRight_121343};
function optionsHeaderRight_121343(a0) { // fn#121343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1584, owner: NewUserModal.options.headerRight, offset: 0x02545098, size: 67 bytes, params: 2, frame: 15
var environment;
const value = environment.__proto__.__proto__;
return ((Component) => <Component {...a0} {...{['onPress']: headerRightOnPress_121344}} />)(SkipHeaderButton);
function headerRightOnPress_121344() { // fn#121344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1612, owner: NewUserModal.options.headerRight.onPress, offset: 0x025450db, size: 25 bytes, params: 1, frame: 11
handleChooseAvatarSkip(env2_7);
function handleChooseAvatarSkip(a0) { // fn#121345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1616, owner: NewUserModal.options.headerRight.onPress.handleChooseAvatarSkip, offset: 0x025450f4, size: 100 bytes, params: 2, frame: 16
var environment;
const env0_0 = a0;
const value = environment.__proto__.__proto__.__proto__.__proto__;
(UseAlertStoreNativeModule).openAlert('skip-avatar-upload',
((Component) => <Component onConfirm={onConfirm_121347} />)(env4_4.lazy(_fun121346)));
function _fun121346() { // fn#121346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1665, offset: 0x02545158, size: 45 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
return require(dependencyMap[8])(dependencyMap[7], dependencyMap.paths);
}
function handleChooseAvatarSkipOnConfirm() { // fn#121347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1747, owner: NewUserModal.options.headerRight.onPress.handleChooseAvatarSkip.onConfirm, offset: 0x01d72e0f, size: 18 bytes, params: 1, frame: 11
return env0_0(true);
}
}
}
}
}
}
}
function optionsHeaderRight_121343(a0) { // fn#121343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1584, owner: NewUserModal.options.headerRight, offset: 0x02545098, size: 67 bytes, params: 2, frame: 15
var environment;
const value = environment.__proto__.__proto__;
return ((Component) => <Component {...a0} {...{['onPress']: headerRightOnPress_121344}} />)(importDefault(12013) /* metro dependency 12013: SkipHeaderButton */);
}
function headerRightOnPress_121344() { // fn#121344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1612, owner: NewUserModal.options.headerRight.onPress, offset: 0x025450db, size: 25 bytes, params: 1, frame: 11
handleChooseAvatarSkip(env2_7);
}
function handleChooseAvatarSkip(a0) { // fn#121345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1616, owner: NewUserModal.options.headerRight.onPress.handleChooseAvatarSkip, offset: 0x025450f4, size: 100 bytes, params: 2, frame: 16
var environment;
const env0_0 = a0;
const value = environment.__proto__.__proto__.__proto__.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert('skip-avatar-upload',
((Component) => <Component onConfirm={onConfirm_121347} />)(env4_4.lazy(_fun121346)));
}
function _fun121346() { // fn#121346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16001:1665, offset: 0x02545158, size: 45 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
return require(dependencyMap[8])(dependencyMap[7], dependencyMap.paths);
}
global.__d(_fun121332, 15793, [57, 31, 27, 33, 9884, 4501, 697, 15794, 1962, 4497, 5280, 15791, 5080, 15792, 5286,
477, 14357, 15795, 12013, 12002, 15796, 15798,
2]) /* metro module 15793, dependencies: [57, 31, 27, 33, 9884, 4501, 697, 15794, 1962, 4497, 5280, 15791, 5080, 15792, 5286, 477, 14357, 15795, 12013, 12002, 15796, 15798, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 15792; source: modules/nuf/native/components/NewUserModalTypes.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun121331(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16000:6, offset: 0x02544ae5, size: 84 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/NewUserModalTypes.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/NewUserModalTypes.tsx');
exports.NEW_USER_MODAL_KEY = 'new-user-modal';
}
global.__d(_fun121331, 15792, [2]) /* metro module 15792, dependencies: [2] */;
@@ -1,11 +1,17 @@
/* Metro module 12005; source: modules/nuf/native/components/NewUserPermissionsOnboarding.android.tsx; dependencies: [31, 27, 33, 4501, 5314, 697, 4573, 4578, 1244, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
function _fun92272(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12191:6, offset: 0x02081ec1, size: 557 bytes, params: 8, frame: 24
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 */;
ReactModule;
let value = ReactNativeModule;
const env0_2 = value.View;
const env0_3 = value.ScrollView;
value = require(33) /* metro dependency 33 */;
@@ -13,65 +19,94 @@ function _fun92272(global, require, importDefault, importAll, module, exports, d
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.scrollContainer = {minHeight: '100%'};
object2.container = {'flexGrow': 1, 'alignItems': 'center', 'justifyContent': 'center'};
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object2.alertContainer = {paddingTop: 80 + NAV_BAR_HEIGHT};
const object3 = {'backgroundColor': null, 'borderRadius': null, 'borderWidth': 1, 'borderColor': null,
object = {};
object.scrollContainer = {minHeight: '100%'};
object.container = {'flexGrow': 1, 'alignItems': 'center', 'justifyContent': 'center'};
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
object.alertContainer = {paddingTop: 80 + NAV_BAR_HEIGHT};
const object4 = {'backgroundColor': null, 'borderRadius': null, 'borderWidth': 1, 'borderColor': null,
'alignItems': 'center', 'maxWidth': 290};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const INTERACTIVE_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_ACTIVE;
object3.borderColor = INTERACTIVE_BACKGROUND_ACTIVE;
object4.borderColor = INTERACTIVE_BACKGROUND_ACTIVE;
const SHADOW_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_HIGH;
copyDataProperties(object3, SHADOW_HIGH, undefined);
object2.alert = object3;
object2.alertContent = {'paddingVertical': 24, 'paddingHorizontal': 24, 'alignItems': 'center'};
object2.alertTitle = {'paddingBottom': 8, 'textAlign': 'center'};
copyDataProperties(object4, SHADOW_HIGH, undefined);
object.alert = object4;
object.alertContent = {'paddingVertical': 24, 'paddingHorizontal': 24, 'alignItems': 'center'};
object.alertTitle = {'paddingBottom': 8, 'textAlign': 'center'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.alertSubtitle = {paddingBottom: PX_16, textAlign: 'center'};
object2.buttonWrapper = {flexDirection: 'row'};
object.alertSubtitle = {paddingBottom: PX_16, textAlign: 'center'};
object.buttonWrapper = {flexDirection: 'row'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.primaryButtonContainer = {marginBottom: PX_12};
object.primaryButtonContainer = {marginBottom: PX_12};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.trailing = {flexGrow: 0, padding: PX_16};
const env0_6 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/NewUserPermissionsOnboarding.android.tsx');
object.trailing = {flexGrow: 0, padding: PX_16};
const env0_6 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/NewUserPermissionsOnboarding.android.tsx');
exports.default = NewUserPermissionsOnboarding;
}
function NewUserPermissionsOnboarding({title, subtitle, header, trailing, loading, showSkip, onAllow, onDontAllow}) { // fn#92273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12191:1025, offset: 0x020820ee, size: 688 bytes, params: 2, frame: 39
showSkip = showSkip === undefined || showSkip;
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<Text style={styles.alertTitle} variant="heading-lg/bold" color="text-default">{title}</Text>];
items2[1] = <Text style={styles.alertSubtitle} variant="text-sm/medium" color="text-default">{subtitle}</Text>;
const items3 = [styles.buttonWrapper];
items3[1] = showSkip && styles.primaryButtonContainer;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[2] = <View style={items3}><Button variant="primary" size="md" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2nYlT2'])} onPress={onAllow} loading={loading} grow /></View>;
items2[3] = showSkip && <View style={styles.buttonWrapper}><Button variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd'])} onPress={onDontAllow} grow /></View>;
return (
<ScrollView contentContainerStyle={styles.scrollContainer}>
<View style={styles.container}>
<View style={styles.alertContainer}>
<View>
{header}
<View style={styles.alert}>
<View style={styles.alertContent}>
{items2}
function NewUserPermissionsOnboarding({title, subtitle, header, trailing, loading, showSkip, onAllow, onDontAllow}) { // fn#92273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12191:1025, offset: 0x020820ee, size: 688 bytes, params: 2, frame: 39
showSkip = showSkip === undefined || showSkip;
const styles = useStyles();
const Text = (TextModule).Text;
const items2 = [
<Text
style={styles.alertTitle}
variant="heading-lg/bold"
color="text-default"
>
{title}
</Text>,
];
items2[1] = (
<Text
style={styles.alertSubtitle}
variant="text-sm/medium"
color="text-default"
>
{subtitle}
</Text>
);
const items3 = [styles.buttonWrapper];
items3[1] = showSkip && styles.primaryButtonContainer;
const Button = (ButtonNativeModule).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[2] = (
<View style={items3}>
<Button
variant="primary"
size="md"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2nYlT2'])}
onPress={onAllow}
loading={loading}
grow
/>
</View>
);
items2[3] = showSkip && <View style={styles.buttonWrapper}><Button variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd'])} onPress={onDontAllow} grow /></View>;
return (
<ScrollView contentContainerStyle={styles.scrollContainer}>
<View style={styles.container}>
<View style={styles.alertContainer}>
<View>
{header}
<View style={styles.alert}>
<View style={styles.alertContent}>
{items2}
</View>
</View>
</View>
</View>
</View>
</View>
<View style={styles.trailing}>
{trailing}
</View>
</ScrollView>
);
<View style={styles.trailing}>
{trailing}
</View>
</ScrollView>
);
}
}
global.__d(_fun92272, 12005, [31, 27, 33, 4501, 5314, 697, 4573, 4578, 1244,
2]) /* metro module 12005, dependencies: [31, 27, 33, 4501, 5314, 697, 4573, 4578, 1244, 2] */;
@@ -1,11 +1,20 @@
/* Metro module 15797; source: modules/nuf/native/components/RedesignDiscoverabilityLanding.tsx; dependencies: [31, 27, 33, 4501, 697, 1585, 5314, 4573, 1244, 5475, 12047, 11997, 4578, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
import * as ContactSyncUtilsModule from '../../../contact_sync/native/ContactSyncUtils.tsx'; /* Metro dependency 11997 */
function _fun121380(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16005:6, offset: 0x0254629e, size: 418 bytes, params: 8, frame: 23
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 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.ScrollView;
value = require(33) /* metro dependency 33 */;
@@ -13,74 +22,108 @@ function _fun121380(global, require, importDefault, importAll, module, exports,
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.topContainer = {paddingTop: PX_16};
object2.growContainer = {flexGrow: 2};
object.topContainer = {paddingTop: PX_16};
object.growContainer = {flexGrow: 2};
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.image = {width: '100%', marginBottom: PX_32};
object.image = {width: '100%', marginBottom: PX_32};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.title = {textAlign: 'center', marginBottom: PX_16};
object.title = {textAlign: 'center', marginBottom: PX_16};
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.subtitle = {textAlign: 'center', marginBottom: PX_32};
object2.info = {'paddingHorizontal': 16, 'marginTop': 8, 'marginBottom': 24, 'textAlign': 'center'};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/RedesignDiscoverabilityLanding.tsx');
object.subtitle = {textAlign: 'center', marginBottom: PX_32};
object.info = {'paddingHorizontal': 16, 'marginTop': 8, 'marginBottom': 24, 'textAlign': 'center'};
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/RedesignDiscoverabilityLanding.tsx');
exports.default = RedesignDiscoverabilityLanding;
function RedesignDiscoverabilityLanding({onNext}) { // fn#121381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16005:695, offset: 0x02546440, size: 769 bytes, params: 2, frame: 29
const styles = useStyles();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const object2 = {flexGrow: 2};
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
object2.paddingTop = NAV_BAR_HEIGHT + 32;
object2.paddingBottom = bottom + 16;
const PX_16 = (Native).space.PX_16;
object2.paddingHorizontal = PX_16;
const items3 = [
<View style={styles.topContainer} />,
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items3[1] = (
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.n8nw6j])}
</Text>
);
string = intl.string;
const KMW0kP = (require(1244) /* metro dependency 1244: indexNative */).t.KMW0kP;
items3[2] = (
<Text
variant="text-sm/medium"
color="text-default"
style={styles.subtitle}
>
{Reflect.apply(string, intl, [KMW0kP])}
</Text>
);
items3[3] = ((Component) => <Component resizeMode="contain" style={styles.image} source={importDefault(12047) /* metro dependency 12047 */} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const items2 = [intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ci12MJ), ' '];
const format = intl.format;
const VcSQ4n = (require(1244) /* metro dependency 1244: indexNative */).t.VcSQ4n;
items2[2] = Reflect.apply(format, intl, [VcSQ4n, {learnMoreHook: learnMoreHook_121382}]);
items3[4] = (
<Text
style={styles.info}
variant="text-sm/medium"
color="text-default"
>
{items2}
</Text>
);
items3[5] = <View style={styles.growContainer} />;
const Button = (ButtonNativeModule).Button;
items3[6] = (
<Button
variant="primary"
size="lg"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gHPk3I)}
onPress={onNext}
/>
);
return (
<ScrollView
style={styles.container}
alwaysBounceVertical={false}
contentContainerStyle={object2}
>
{items3}
</ScrollView>
);
function RedesignDiscoverabilityLandingLearnMoreHook(a0, a1) { // fn#121382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16005:1543, owner: RedesignDiscoverabilityLanding.learnMoreHook, offset: 0x02546741, size: 91 bytes, params: 3, frame: 17
const Text = (TextModule).Text;
return (
<Text
onPress={(ContactSyncUtilsModule).handleOpenLearnMoreLink}
variant="text-sm/medium"
color="text-link"
key={a1}
>
{a0}
</Text>
);
}
}
}
function RedesignDiscoverabilityLanding({onNext}) { // fn#121381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16005:695, offset: 0x02546440, size: 769 bytes, params: 2, frame: 29
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const object = {flexGrow: 2};
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object.paddingTop = NAV_BAR_HEIGHT + 32;
object.paddingBottom = bottom + 16;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingHorizontal = PX_16;
const items3 = [<View style={styles.topContainer} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items3[1] = <Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [(require(1244) /* metro dependency 1244: indexNative */).t.n8nw6j])}</Text>;
string = intl.string;
const KMW0kP = (require(1244) /* metro dependency 1244: indexNative */).t.KMW0kP;
items3[2] = <Text variant="text-sm/medium" color="text-default" style={styles.subtitle}>{Reflect.apply(string, intl,
[KMW0kP])}</Text>;
items3[3] = ((Component) => <Component resizeMode="contain" style={styles.image} source={importDefault(12047) /* metro dependency 12047 */} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const items2 = [intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ci12MJ), ' '];
const format = intl.format;
const VcSQ4n = (require(1244) /* metro dependency 1244: indexNative */).t.VcSQ4n;
items2[2] = Reflect.apply(format, intl, [VcSQ4n, {learnMoreHook: learnMoreHook}]);
items3[4] = <Text style={styles.info} variant="text-sm/medium" color="text-default">{items2}</Text>;
items3[5] = <View style={styles.growContainer} />;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items3[6] = <Button variant="primary" size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gHPk3I)} onPress={onNext} />;
return (
<ScrollView
style={styles.container}
alwaysBounceVertical={false}
contentContainerStyle={object}
>
{items3}
</ScrollView>
);
}
function RedesignDiscoverabilityLandingLearnMoreHook(a0, a1) { // fn#121382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16005:1543, owner: RedesignDiscoverabilityLanding.learnMoreHook, offset: 0x02546741, size: 91 bytes, params: 3, frame: 17
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
onPress={(require(11997) /* metro dependency 11997: ContactSyncUtils */).handleOpenLearnMoreLink}
variant="text-sm/medium"
color="text-link"
key={a1}
>
{a0}
</Text>
);
}
global.__d(_fun121380, 15797, [31, 27, 33, 4501, 697, 1585, 5314, 4573, 1244, 5475, 12047, 11997, 4578,
2]) /* metro module 15797, dependencies: [31, 27, 33, 4501, 697, 1585, 5314, 4573, 1244, 5475, 12047, 11997, 4578, 2] */;
@@ -1,152 +1,177 @@
/* Metro module 15796; source: modules/nuf/native/components/RedesignDiscoverabilityModal.tsx; dependencies: [31, 27, 11994, 1878, 661, 33, 4501, 697, 5314, 1484, 566, 12001, 676, 15797, 12021, 12014, 480, 12013, 5280, 1244, 2] */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ContactSyncActionCreators from '../../../contact_sync/native/ContactSyncActionCreators.tsx'; /* Metro dependency 12001 */
import SkipHeaderButton from './SkipHeaderButton.tsx'; /* Metro dependency 12013 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AnalyticsUtilsModule from '../../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ConstantsIOSModule from '../../../../ConstantsIOS.tsx'; /* Metro dependency 676 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
import * as ContactSyncModalStoreModule from '../../../contact_sync/native/ContactSyncModalStore.tsx'; /* Metro dependency 11994 */
import * as NUFActionCreatorsModule from '../NUFActionCreators.tsx'; /* Metro dependency 12021 */
function _fun121362(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:6, offset: 0x02545be2, size: 409 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const closure = RedesignDiscoverabilityModal;
const RedesignDiscoverabilityModal2 = RedesignDiscoverabilityModal;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(11994) /* metro dependency 11994: ContactSyncModalStore */).useContactSyncModalStore;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const ModalAnimation = (require(661) /* metro dependency 661: Constants */).ModalAnimation;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const ModalAnimation = (ConstantsModule).ModalAnimation;
const createStyles = CreateStylesModule.createStyles;
object = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.header = {'borderBottomWidth': 0, 'backgroundColor': null, 'shadowColor': 'transparent',
object.header = {'borderBottomWidth': 0, 'backgroundColor': null, 'shadowColor': 'transparent',
backgroundColor: BACKGROUND_BASE_LOW};
const object4 = {'flex': 1, 'backgroundColor': null, 'justifyContent': 'center', 'paddingBottom': 44};
const object3 = {'flex': 1, 'backgroundColor': null, 'justifyContent': 'center', 'paddingBottom': 44};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object4.paddingTop = NAV_BAR_HEIGHT + 32;
object2.container = object4;
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
object3.backgroundColor = BACKGROUND_BASE_LOW;
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
object3.paddingTop = NAV_BAR_HEIGHT + 32;
object.container = object3;
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const SLIDE_IN_OUT = ModalAnimation.SLIDE_IN_OUT;
closure.modalConfig = {animation: SLIDE_IN_OUT};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/RedesignDiscoverabilityModal.tsx');
exports.default = closure;
}
function DiscoverabilityLandingScene_121363({onComplete}) { // fn#121363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:485, offset: 0x02545d7b, size: 247 bytes, params: 2, frame: 22
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun121364);
const value4 = useContactSyncModalStore();
const allowPhone = value4.allowPhone;
const env0_3 = allowPhone;
const name = value4.name;
const allowEmail = value4.allowEmail;
return ((Component) => <Component onNext={env0_3.useCallback(_fun121365, [allowPhone, allowEmail,
allowPhone || allowEmail, value3, name, value2,
onComplete])} />)(importDefault(15797) /* metro dependency 15797: RedesignDiscoverabilityLanding */);
}
function DiscoverabilityNameScene_121366({onComplete}) { // fn#121366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:912, offset: 0x02545f07, size: 211 bytes, params: 2, frame: 19
const styles = useStyles();
const {name, allowPhone} = useContactSyncModalStore();
env0_3.useEffect(function() {
if (!allowPhone) {
onComplete();
RedesignDiscoverabilityModal2.modalConfig = {animation: SLIDE_IN_OUT};
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/RedesignDiscoverabilityModal.tsx');
exports.default = RedesignDiscoverabilityModal2;
function DiscoverabilityLandingScene_121363({onComplete}) { // fn#121363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:485, offset: 0x02545d7b, size: 247 bytes, params: 2, frame: 22
const value2 = (UseNavigationNativeModule).useNavigation();
const value3 = (FluxModule).useStateFromStores([UserStore], _fun121364);
const value4 = useContactSyncModalStore();
const allowPhone = value4.allowPhone;
const allowPhone2 = allowPhone;
const name = value4.name;
const allowEmail = value4.allowEmail;
return ((Component) => <Component onNext={allowPhone2.useCallback(_fun121365, [allowPhone, allowEmail,
allowPhone || allowEmail, value3, name, value2,
onComplete])} />)(importDefault(15797) /* metro dependency 15797: RedesignDiscoverabilityLanding */);
function _fun121364() { // fn#121364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:603, offset: 0x0208ef97, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.phone;
}
}, [allowPhone, onComplete]);
return (
<View style={styles.container}>
{((Component) => <Component onNext={env0_3.useCallback(_fun121368,
[onComplete])} loading={false} initialName={name ?? ''} />)(importDefault(12014) /* metro dependency 12014: ContactSyncNameInput */)}
</View>
);
}
function RedesignDiscoverabilityModal(a0) { // fn#121369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1219, offset: 0x02546026, size: 206 bytes, params: 2, frame: 20
const onComplete = a0.route.params.onComplete;
const styles = useStyles();
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const binding = env0_3;
const useMemo = binding.useMemo;
const items2 = [onComplete];
const DiscoverabilityScenes = (require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes;
const LANDING = DiscoverabilityScenes.LANDING;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Navigator
headerStyle={styles.header}
screens={Reflect.apply(useMemo, binding, [function() {
return _fun121371(onComplete ?? _fun121379);
}, items2])}
initialRouteName={LANDING}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
}
function _fun121365() { // fn#121365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:737, offset: 0x02545e72, size: 149 bytes, params: 1, frame: 15
var binding;
(importDefault(12001) /* metro dependency 12001: ContactSyncActionCreators */).updateDiscoverability({phone: allowPhone,
email: allowEmail});
if (env0_6) {
if (env0_2 == null) {
onComplete();
} else if (allowPhone) {
if (name == null) {
binding = env0_1;
binding.push((require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes.NAME);
function _fun121365() { // fn#121365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:737, offset: 0x02545e72, size: 149 bytes, params: 1, frame: 15
var binding;
(ContactSyncActionCreators).updateDiscoverability({phone: allowPhone,
email: allowEmail});
if (env0_6) {
if (env0_2 == null) {
onComplete();
} else if (allowPhone) {
if (name == null) {
binding = env0_1;
binding.push((require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes.NAME);
} else {
onComplete();
}
} else {
onComplete();
}
} else {
onComplete();
}
} else {
}
}
function DiscoverabilityNameScene_121366({onComplete}) { // fn#121366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:912, offset: 0x02545f07, size: 211 bytes, params: 2, frame: 19
const styles = useStyles();
const {name, allowPhone} = useContactSyncModalStore();
ReactModule.useEffect(function() {
if (!allowPhone) {
onComplete();
}
}, [allowPhone, onComplete]);
return (
<View style={styles.container}>
{((Component) => <Component onNext={ReactModule.useCallback(_fun121368,
[onComplete])} loading={false} initialName={name ?? ''} />)(importDefault(12014) /* metro dependency 12014: ContactSyncNameInput */)}
</View>
);
function _fun121368(a0) { // fn#121368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1057, offset: 0x02545ff2, size: 52 bytes, params: 2, frame: 12
const value = environment.__proto__;
(NUFActionCreatorsModule).startContactSyncForDiscoverability(a0);
onComplete();
}
} else {
onComplete();
}
function RedesignDiscoverabilityModal(a0) { // fn#121369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1219, offset: 0x02546026, size: 206 bytes, params: 2, frame: 20
const onComplete = a0.route.params.onComplete;
const styles = useStyles();
const Navigator = (NavigatorNativeModule).Navigator;
const useMemo = ReactModule.useMemo;
const items2 = [onComplete];
const DiscoverabilityScenes = (ConstantsIOSModule).DiscoverabilityScenes;
const LANDING = DiscoverabilityScenes.LANDING;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Navigator
headerStyle={styles.header}
screens={Reflect.apply(useMemo, ReactModule, [function() {
return _fun121371(onComplete ?? _fun121379);
}, items2])}
initialRouteName={LANDING}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
function _fun121370() { // fn#121370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1369, offset: 0x025460f4, size: 44 bytes, params: 1, frame: 12
return getScreens_121371(onComplete ?? (function() {
}));
function getScreens_121371(a0) { // fn#121371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1373, offset: 0x02546120, size: 238 bytes, params: 2, frame: 18
const env0_0 = a0;
const object = {};
const DiscoverabilityScenes = (ConstantsIOSModule).DiscoverabilityScenes;
const LANDING = DiscoverabilityScenes.LANDING;
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
let DISCOVERABILITY = ImpressionNames.DISCOVERABILITY;
object[LANDING] = {'ignoreKeyboard': true, 'impressionName': null, 'fullscreen': true,
impressionName: DISCOVERABILITY, headerLeft: function() {
return null;
}, headerTitle: function() {
return null;
}, headerRight: headerRight_121374, render: render_121376};
const NAME = DiscoverabilityScenes.NAME;
DISCOVERABILITY = ImpressionNames.DISCOVERABILITY;
object[NAME] = {'ignoreKeyboard': true, 'impressionName': null, 'fullscreen': true, impressionName: DISCOVERABILITY,
headerTitle: function() {
return null;
}, render: render_121378};
return object;
function getScreens_121371HeaderRight(a0) { // fn#121374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1586, owner: getScreens_121371.headerRight, offset: 0x0254620e, size: 74 bytes, params: 2, frame: 15
var environment;
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component insideNavigator {...a0} {...{['onPress']: headerRightOnPress_121375}} />)(SkipHeaderButton);
function headerRightOnPress_121375() { // fn#121375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1633, owner: getScreens_121371.headerRight.onPress, offset: 0x010095e8, size: 18 bytes, params: 1, frame: 11
return env1_0(true);
}
}
function getScreens_121371Render() { // fn#121376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1652, owner: getScreens_121371.render, offset: 0x02546258, size: 35 bytes, params: 1, frame: 13
return <DiscoverabilityLandingScene_121363 onComplete={env0_0} />;
}
function getScreens_121371Render_121378() { // fn#121378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1858, owner: getScreens_121371.render, offset: 0x0254627b, size: 35 bytes, params: 1, frame: 13
return <DiscoverabilityNameScene_121366 onComplete={env0_0} />;
}
}
}
}
}
function _fun121368(a0) { // fn#121368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1057, offset: 0x02545ff2, size: 52 bytes, params: 2, frame: 12
const value = environment.__proto__;
(require(12021) /* metro dependency 12021: NUFActionCreators */).startContactSyncForDiscoverability(a0);
onComplete();
}
function _fun121370() { // fn#121370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1369, offset: 0x025460f4, size: 44 bytes, params: 1, frame: 12
return getScreens_121371(onComplete ?? (function() {
}));
}
function getScreens_121371(a0) { // fn#121371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1373, offset: 0x02546120, size: 238 bytes, params: 2, frame: 18
const env0_0 = a0;
const object2 = {};
const DiscoverabilityScenes = (require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes;
const LANDING = DiscoverabilityScenes.LANDING;
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
let DISCOVERABILITY = ImpressionNames.DISCOVERABILITY;
object2[LANDING] = {'ignoreKeyboard': true, 'impressionName': null, 'fullscreen': true,
impressionName: DISCOVERABILITY, headerLeft: function() {
return null;
}, headerTitle: function() {
return null;
}, headerRight: headerRight_121374, render: render_121376};
const NAME = DiscoverabilityScenes.NAME;
DISCOVERABILITY = ImpressionNames.DISCOVERABILITY;
object2[NAME] = {'ignoreKeyboard': true, 'impressionName': null, 'fullscreen': true,
impressionName: DISCOVERABILITY, headerTitle: function() {
return null;
}, render: render_121378};
return object2;
}
function getScreens_121371HeaderRight(a0) { // fn#121374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1586, owner: getScreens_121371.headerRight, offset: 0x0254620e, size: 74 bytes, params: 2, frame: 15
var environment;
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component insideNavigator {...a0} {...{['onPress']: headerRightOnPress_121375}} />)(importDefault(12013) /* metro dependency 12013: SkipHeaderButton */);
}
function getScreens_121371Render() { // fn#121376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1652, owner: getScreens_121371.render, offset: 0x02546258, size: 35 bytes, params: 1, frame: 13
return <DiscoverabilityLandingScene_121363 onComplete={env0_0} />;
}
function getScreens_121371Render_121378() { // fn#121378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1858, owner: getScreens_121371.render, offset: 0x0254627b, size: 35 bytes, params: 1, frame: 13
return <DiscoverabilityNameScene_121366 onComplete={env0_0} />;
function _fun121379() { // fn#121379, offset: 0x00c37b63, size: 4 bytes, params: 1, frame: 1
}
global.__d(_fun121362, 15796, [31, 27, 11994, 1878, 661, 33, 4501, 697, 5314, 1484, 566, 12001, 676, 15797, 12021,
12014, 480, 12013, 5280, 1244,
2]) /* metro module 15796, dependencies: [31, 27, 11994, 1878, 661, 33, 4501, 697, 5314, 1484, 566, 12001, 676, 15797, 12021, 12014, 480, 12013, 5280, 1244, 2] */;
@@ -1,39 +1,46 @@
/* Metro module 12013; source: modules/nuf/native/components/SkipHeaderButton.tsx; dependencies: [31, 33, 4501, 697, 1244, 9603, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as HeaderSharedModule from '../../../main_tabs_v2/native/shared_components/HeaderShared.tsx'; /* Metro dependency 9603 */
function _fun92291(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12199:6, offset: 0x02082f1a, size: 211 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
const env0_3 = Reflect.apply(createStyles, createStylesModule, [{button: {color: INTERACTIVE_TEXT_DEFAULT},
ReactModule;
const createStyles = CreateStylesModule.createStyles;
const INTERACTIVE_TEXT_DEFAULT = (Native).colors.INTERACTIVE_TEXT_DEFAULT;
const env0_3 = Reflect.apply(createStyles, CreateStylesModule, [{button: {color: INTERACTIVE_TEXT_DEFAULT},
insideNavigatorButton: {paddingRight: 16}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/SkipHeaderButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/SkipHeaderButton.tsx');
exports.default = SkipHeaderButton;
}
function SkipHeaderButton(a0) { // fn#92292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12199:333, offset: 0x02082fed, size: 194 bytes, params: 2, frame: 19
var r5;
var intl;
const value2 = undefined;
const styles = useStyles();
const label = a0.label;
if (label != null) {
r5 = label;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd']);
function SkipHeaderButton(a0) { // fn#92292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12199:333, offset: 0x02082fed, size: 194 bytes, params: 2, frame: 19
var r5;
var intl;
const value2 = undefined;
const styles = useStyles();
const label = a0.label;
if (label != null) {
r5 = label;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd']);
}
const HeaderTextButton = (HeaderSharedModule).HeaderTextButton;
return (
<HeaderTextButton
{...a0}
{...{['labelStyle']: [styles.button, a0.insideNavigator ? styles.insideNavigatorButton : value2]}}
{...{['label']: r5}}
{...{['accessibilityLabel']: r5}}
/>
);
}
const HeaderTextButton = (require(9603) /* metro dependency 9603: HeaderShared */).HeaderTextButton;
return (
<HeaderTextButton
{...a0}
{...{['labelStyle']: [styles.button, a0.insideNavigator ? styles.insideNavigatorButton : value2]}}
{...{['label']: r5}}
{...{['accessibilityLabel']: r5}}
/>
);
}
global.__d(_fun92291, 12013, [31, 33, 4501, 697, 1244, 9603,
2]) /* metro module 12013, dependencies: [31, 33, 4501, 697, 1244, 9603, 2] */;
@@ -1,181 +1,194 @@
/* Metro module 14887; source: modules/nuf/native/components/notification/GuildOpenNotificationNudge.tsx; dependencies: [57, 31, 1945, 1867, 3969, 4864, 11872, 11873, 661, 33, 566, 14888, 1244, 14889, 11874, 5105, 3987, 7013, 1365, 11875, 4080, 14887, 1962, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildStore from '../../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildMemberStore from '../../../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import SelectedGuildStore from '../../../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import UserGuildSettingsStore from '../../../../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
import PushNotificationPermissionStore from '../../../../../stores/native/PushNotificationPermissionStore.tsx'; /* Metro dependency 11872 */
import NotificationNudgeBottomSheet from './NotificationNudgeBottomSheet.tsx'; /* Metro dependency 14888 */
import GuildPushNotificationNudgeExperiment from '../../GuildPushNotificationNudgeExperiment.tsx'; /* Metro dependency 14889 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as UseSelectedDismissibleContentModule from '../../../../dismissible_content/hooks/useSelectedDismissibleContent.tsx'; /* Metro dependency 7013 */
import * as PushNotificationPermissionStoreModule from '../../../../../stores/native/PushNotificationPermissionStore.tsx'; /* Metro dependency 11872 */
import * as NotificationPermissionConstantsModule from './NotificationPermissionConstants.tsx'; /* Metro dependency 11873 */
import * as NotificationPermissionUtilModule from '../../NotificationPermissionUtil.tsx'; /* Metro dependency 11874 */
function _fun112625(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:6, offset: 0x023d4fdf, size: 369 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 guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const pushNotificationPermissionStore = importDefault(11872) /* metro dependency 11872: PushNotificationPermissionStore */;
const env0_10 = (require(11872) /* metro dependency 11872: PushNotificationPermissionStore */).PermissionPromptType;
let value = require(11873) /* metro dependency 11873: NotificationPermissionConstants */;
let value = NotificationPermissionConstantsModule;
const env0_11 = value.EventActionLocation;
const env0_12 = value.NotificationNudgeSurface;
value = require(661) /* metro dependency 661: Constants */;
const env0_13 = value.UserNotificationSettings;
const env0_14 = value.ZERO_STRING_GUILD_ID;
const env0_15 = (require(33) /* metro dependency 33 */).jsx;
object = {cooldownDurationMs: 5184000000};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/notification/GuildOpenNotificationNudge.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/notification/GuildOpenNotificationNudge.tsx');
exports.default = GuildOpenNotificationNudge;
exports.GUILD_OPEN_NOTIFICATION_NUDGE_KEY = 'guild-open-notification-nudge-key';
exports.useGuildOpenNudge = useGuildOpenNudge;
}
function GuildOpenNotificationNudge({guildId, markAsDismissed, onHide}) { // fn#112626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:524, offset: 0x023d5150, size: 262 bytes, params: 2, frame: 24
const value2 = (FluxModule).useStateFromStores([GuildStore], _fun112627);
object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.tyWHMY,
{guildName: value2});
object.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ehJH+P']);
const GUILD_OPEN = EventActionLocation.GUILD_OPEN;
object.actionLocation = GUILD_OPEN;
const GUILD_OPEN_BOTTOM_SHEET = NotificationNudgeSurface.GUILD_OPEN_BOTTOM_SHEET;
object.surface = GUILD_OPEN_BOTTOM_SHEET;
object.markAsDismissed = markAsDismissed;
object.onHide = onHide;
return <NotificationNudgeBottomSheet {...object} />;
function _fun112627() { // fn#112627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:639, offset: 0x023d5256, size: 57 bytes, params: 1, frame: 12
const value = environment.__proto__;
return GuildStore.getGuild(guildId)?.name ?? '';
}
function GuildOpenNotificationNudge({guildId, markAsDismissed, onHide}) { // fn#112626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:524, offset: 0x023d5150, size: 262 bytes, params: 2, frame: 24
var object2;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun112627);
const NotificationNudgeBottomSheet = importDefault(14888) /* metro dependency 14888: NotificationNudgeBottomSheet */;
object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.tyWHMY,
{guildName: value2});
object2.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ehJH+P']);
const GUILD_OPEN = EventActionLocation.GUILD_OPEN;
object2.actionLocation = GUILD_OPEN;
const GUILD_OPEN_BOTTOM_SHEET = NotificationNudgeSurface.GUILD_OPEN_BOTTOM_SHEET;
object2.surface = GUILD_OPEN_BOTTOM_SHEET;
object2.markAsDismissed = markAsDismissed;
object2.onHide = onHide;
return <NotificationNudgeBottomSheet {...object2} />;
}
function useGuildOpenNudge() { // fn#112628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1005, offset: 0x023d528f, size: 619 bytes, params: 1, frame: 30
var r6;
var moduleValue7;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore], _fun112629);
const defaultImport = importDefault(14889) /* metro dependency 14889: GuildPushNotificationNudgeExperiment */;
const useConfig = defaultImport.useConfig;
const showNewSheet = Reflect.apply(useConfig, defaultImport, [{location: 'useGuildOpenNudge'}]).showNewSheet;
const value3 = (require(11874) /* metro dependency 11874: NotificationPermissionUtil */).useCanSeePushNotificationNudge();
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
_fun112630);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
_fun112631);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore, GuildMemberStore],
_fun112632);
const binding = env0_4;
const env0_2 = binding.useRef(value2);
let [property, env0_3] = env0_3Binding(binding.useState(value6), 2);
binding.useEffect(_fun112633, [value2, value6]);
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PushNotificationPermissionStore],
_fun112634);
const value10 = null;
const value11 = value10 != value2;
if (value11) {
moduleValue7 = require(3987) /* metro dependency 3987: RouteUtils */;
r6 = !moduleValue7.isPseudoGuildId(value2);
} else {
r6 = value11;
}
r6 = r6 && showNewSheet && value3;
r6 = r6 && !property && !value4;
r6 = r6 && value5 !== UserNotificationSettings.NO_MESSAGES && value9;
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
const useSelectedTimeRecurringGuildDismissibleContent = useSelectedDismissibleContentModule.useSelectedTimeRecurringGuildDismissibleContent;
const NOTIFICATION_NUDGE_GUILD_OPEN_PER_GUILD = r6 ? (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.NOTIFICATION_NUDGE_GUILD_OPEN_PER_GUILD : value10;
const value17 = env0_3Binding(Reflect.apply(useSelectedTimeRecurringGuildDismissibleContent,
useSelectedDismissibleContentModule, [NOTIFICATION_NUDGE_GUILD_OPEN_PER_GUILD,
value10 != value2 ? value2 : ZERO_STRING_GUILD_ID, env0_16]), 2);
property = value17[0];
var env0_4 = property;
env0_4.useEffect(_fun112635, [value2, value17[1], property]);
}
function _fun112627() { // fn#112627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:639, offset: 0x023d5256, size: 57 bytes, params: 1, frame: 12
const value = environment.__proto__;
return GuildStore.getGuild(guildId)?.name ?? '';
}
function useGuildOpenNudge() { // fn#112628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1005, offset: 0x023d528f, size: 619 bytes, params: 1, frame: 30
var r6;
var moduleValue7;
let useStateFromStores = FluxModule.useStateFromStores;
const value2 = Reflect.apply(useStateFromStores, FluxModule, [[SelectedGuildStore], _fun112629]);
const defaultImport = GuildPushNotificationNudgeExperiment;
const useConfig = defaultImport.useConfig;
const showNewSheet = Reflect.apply(useConfig, defaultImport, [{location: 'useGuildOpenNudge'}]).showNewSheet;
const value3 = (NotificationPermissionUtilModule).useCanSeePushNotificationNudge();
useStateFromStores = FluxModule.useStateFromStores;
const userGuildSettingsStoreBinding = UserGuildSettingsStore;
const value4 = Reflect.apply(useStateFromStores, FluxModule, [[userGuildSettingsStoreBinding], _fun112630]);
const value5 = FluxModule.useStateFromStores([userGuildSettingsStoreBinding], _fun112631);
const value6 = FluxModule.useStateFromStores([GuildStore, GuildMemberStore], _fun112632);
const binding = property2;
const env0_2 = binding.useRef(value2);
let [property, env0_3] = env0_3Binding(binding.useState(value6), 2);
binding.useEffect(_fun112633, [value2, value6]);
const value9 = FluxModule.useStateFromStores([PushNotificationPermissionStore], _fun112634);
const value10 = null;
const value11 = value10 != value2;
if (value11) {
moduleValue7 = require(3987) /* metro dependency 3987: RouteUtils */;
r6 = !moduleValue7.isPseudoGuildId(value2);
} else {
r6 = value11;
}
r6 = r6 && showNewSheet && value3;
r6 = r6 && !property && !value4;
r6 = r6 && value5 !== UserNotificationSettings.NO_MESSAGES && value9;
const useSelectedTimeRecurringGuildDismissibleContent = UseSelectedDismissibleContentModule.useSelectedTimeRecurringGuildDismissibleContent;
const NOTIFICATION_NUDGE_GUILD_OPEN_PER_GUILD = r6 ? (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.NOTIFICATION_NUDGE_GUILD_OPEN_PER_GUILD : value10;
const value17 = env0_3Binding(Reflect.apply(useSelectedTimeRecurringGuildDismissibleContent,
UseSelectedDismissibleContentModule, [NOTIFICATION_NUDGE_GUILD_OPEN_PER_GUILD,
value10 != value2 ? value2 : ZERO_STRING_GUILD_ID, env0_16]), 2);
property = value17[0];
var property2 = property;
property2.useEffect(_fun112635, [value2, value17[1], property]);
function _fun112629() { // fn#112629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1073, offset: 0x023d54fa, size: 31 bytes, params: 1, frame: 10
let value = environment.__proto__;
value = SelectedGuildStore.getGuildId();
const value2 = null;
return value2 != value ? value : value2;
}
function _fun112629() { // fn#112629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1073, offset: 0x023d54fa, size: 31 bytes, params: 1, frame: 10
let value = environment.__proto__;
value = SelectedGuildStore.getGuildId();
const value2 = null;
return value2 != value ? value : value2;
}
function _fun112630() { // fn#112630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1271, offset: 0x023d5519, size: 40 bytes, params: 1, frame: 12
return env0_0 == null || UserGuildSettingsStore.isMuted(env0_0);
}
function _fun112630() { // fn#112630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1271, offset: 0x023d5519, size: 40 bytes, params: 1, frame: 12
return env0_0 == null || UserGuildSettingsStore.isMuted(env0_0);
}
function _fun112631() { // fn#112631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1334, offset: 0x023d5541, size: 52 bytes, params: 1, frame: 12
return env0_0 != null ? UserGuildSettingsStore.getMessageNotifications(env0_0) : UserNotificationSettings.NO_MESSAGES;
}
function _fun112631() { // fn#112631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1334, offset: 0x023d5541, size: 52 bytes, params: 1, frame: 12
return env0_0 != null ? UserGuildSettingsStore.getMessageNotifications(env0_0) : UserNotificationSettings.NO_MESSAGES;
}
function _fun112632() { // fn#112632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1428, offset: 0x023d5575, size: 89 bytes, params: 1, frame: 16
var r0;
var value3;
var moduleValue;
var isBlockedByOnboarding;
var guildStoreBinding;
var getGuild;
var binding;
var guildMemberStoreBinding;
var value;
const value2 = env0_0 != null;
if (value2) {
value3 = environment.__proto__;
moduleValue = require(5105) /* metro dependency 5105: GuildOnboardingUtils */;
isBlockedByOnboarding = moduleValue.isBlockedByOnboarding;
guildStoreBinding = GuildStore;
getGuild = guildStoreBinding.getGuild;
binding = env0_0;
value = Reflect.apply(getGuild, guildStoreBinding, [binding]);
guildMemberStoreBinding = GuildMemberStore;
value = Reflect.apply(isBlockedByOnboarding, moduleValue, [value,
guildMemberStoreBinding.getSelfMember(binding)]);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function _fun112632() { // fn#112632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1428, offset: 0x023d5575, size: 89 bytes, params: 1, frame: 16
var r0;
var value3;
var moduleValue;
var isBlockedByOnboarding;
var getGuild;
var binding;
var value;
const value2 = env0_0 != null;
if (value2) {
value3 = environment.__proto__;
moduleValue = require(5105) /* metro dependency 5105: GuildOnboardingUtils */;
isBlockedByOnboarding = moduleValue.isBlockedByOnboarding;
getGuild = GuildStore.getGuild;
binding = env0_0;
value = Reflect.apply(getGuild, GuildStore, [binding]);
value = Reflect.apply(isBlockedByOnboarding, moduleValue, [value, GuildMemberStore.getSelfMember(binding)]);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function _fun112633() { // fn#112633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1574, offset: 0x023d55ce, size: 67 bytes, params: 1, frame: 12
const binding = env0_2;
const current = binding.current;
const binding2 = env0_0;
binding.current = binding2;
if (current !== binding2) {
env0_3(env0_1);
} else if (env0_1) {
env0_3(true);
}
}
function _fun112633() { // fn#112633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1574, offset: 0x023d55ce, size: 67 bytes, params: 1, frame: 12
const binding = env0_2;
const current = binding.current;
const binding2 = env0_0;
binding.current = binding2;
if (current !== binding2) {
env0_3(env0_1);
} else if (env0_1) {
env0_3(true);
}
}
function _fun112634() { // fn#112634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1675, offset: 0x023d5611, size: 118 bytes, params: 1, frame: 13
var r0;
var Date;
var date;
let value = environment.__proto__;
const pushNotificationPermissionStoreBinding = PushNotificationPermissionStore;
const getState = pushNotificationPermissionStoreBinding.getState;
const promptLastSeen = Reflect.apply(getState, pushNotificationPermissionStoreBinding, []).promptLastSeen;
const GUILD_OPEN_BOTTOM_SHEET = PermissionPromptType.GUILD_OPEN_BOTTOM_SHEET;
const property = promptLastSeen[GUILD_OPEN_BOTTOM_SHEET];
value = property == null;
if (value) {
r0 = value;
} else {
Date = global.Date;
value = Date.now();
Date = global.Date;
date = new Date(property);
value -= date.getTime();
value = value >= 604800000;
r0 = value;
}
return r0;
}
function _fun112634() { // fn#112634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1675, offset: 0x023d5611, size: 118 bytes, params: 1, frame: 13
var r0;
var Date;
var date;
let value = environment.__proto__;
const getState = PushNotificationPermissionStore.getState;
const promptLastSeen = Reflect.apply(getState, PushNotificationPermissionStore, []).promptLastSeen;
const GUILD_OPEN_BOTTOM_SHEET = PermissionPromptType.GUILD_OPEN_BOTTOM_SHEET;
const property = promptLastSeen[GUILD_OPEN_BOTTOM_SHEET];
value = property == null;
if (value) {
r0 = value;
} else {
Date = global.Date;
value = Date.now();
Date = global.Date;
date = new Date(property);
value -= date.getTime();
value = value >= 604800000;
r0 = value;
}
return r0;
}
function _fun112635() { // fn#112635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:2062, offset: 0x023d5687, size: 164 bytes, params: 1, frame: 18
var value4;
var moduleValue;
var defaultImport;
if (env0_0 != null && ReactModule != null) {
value4 = environment.__proto__;
moduleValue = require(dependencyMap[19]);
moduleValue.setPushPermissionReactivationSeen(PermissionPromptType.GUILD_OPEN_BOTTOM_SHEET);
defaultImport = importDefault(dependencyMap[20]);
defaultImport.openLazy(require(dependencyMap[22])(dependencyMap[21], dependencyMap.paths),
'guild-open-notification-nudge-key', {guildId: env0_0, markAsDismissed: env0_5});
}
}
function _fun112635() { // fn#112635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:2062, offset: 0x023d5687, size: 164 bytes, params: 1, frame: 18
var value4;
var moduleValue;
var defaultImport;
if (env0_0 != null && env0_4 != null) {
value4 = environment.__proto__;
moduleValue = require(dependencyMap[19]);
moduleValue.setPushPermissionReactivationSeen(PermissionPromptType.GUILD_OPEN_BOTTOM_SHEET);
defaultImport = importDefault(dependencyMap[20]);
defaultImport.openLazy(require(dependencyMap[22])(dependencyMap[21], dependencyMap.paths),
'guild-open-notification-nudge-key', {guildId: env0_0, markAsDismissed: env0_5});
}
}
global.__d(_fun112625, 14887, [57, 31, 1945, 1867, 3969, 4864, 11872, 11873, 661, 33, 566, 14888, 1244, 14889,
11874, 5105, 3987, 7013, 1365, 11875, 4080, 14887, 1962,
2]) /* metro module 14887, dependencies: [57, 31, 1945, 1867, 3969, 4864, 11872, 11873, 661, 33, 566, 14888, 1244, 14889, 11874, 5105, 3987, 7013, 1365, 11875, 4080, 14887, 1962, 2] */;
@@ -1,107 +1,154 @@
/* Metro module 14888; source: modules/nuf/native/components/notification/NotificationNudgeBottomSheet.tsx; dependencies: [31, 27, 11873, 661, 1376, 33, 4501, 697, 683, 4080, 11874, 6275, 5473, 4573, 6261, 4578, 1244, 2] */
import AnalyticsUtils from '../../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import ActionSheetActionCreators from '../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as DismissibleContentConstantsModule from '../../../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NativeModule from '../../../../../design/assets/native.tsx'; /* Metro dependency 5473 */
import * as ButtonGroupNativeModule from '../../../../../design/components/ButtonGroup/native/ButtonGroup.native.tsx'; /* Metro dependency 6261 */
import * as BottomSheetNativeModule from '../../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as NotificationPermissionConstantsModule from './NotificationPermissionConstants.tsx'; /* Metro dependency 11873 */
import * as NotificationPermissionUtilModule from '../../NotificationPermissionUtil.tsx'; /* Metro dependency 11874 */
function _fun112636(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:6, offset: 0x023d572b, size: 433 bytes, params: 8, frame: 23
var object2;
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(27) /* metro dependency 27 */).View;
let value = require(11873) /* metro dependency 11873: NotificationPermissionConstants */;
let value = NotificationPermissionConstantsModule;
const env0_5 = value.EventActionType;
const env0_6 = value.NotificationNudgeAnalyticsAction;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_8 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
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;
object2 = {};
object = {};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.container = {marginHorizontal: PX_24, alignItems: 'center'};
object.container = {marginHorizontal: PX_24, alignItems: 'center'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.illustration = {marginVertical: PX_24};
object2.title = {textAlign: 'center'};
object.illustration = {marginVertical: PX_24};
object.title = {textAlign: 'center'};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.body = {textAlign: 'center', marginTop: PX_8};
object.body = {textAlign: 'center', marginTop: PX_8};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.buttonsContainer = {marginTop: PX_8, width: '100%'};
const env0_11 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/notification/NotificationNudgeBottomSheet.tsx');
object.buttonsContainer = {marginTop: PX_8, width: '100%'};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/notification/NotificationNudgeBottomSheet.tsx');
exports.default = NotificationNudgeBottomSheet;
}
function NotificationNudgeBottomSheet({title, body, actionLocation, surface, markAsDismissed, onHide}) { // fn#112637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:683, offset: 0x023d58dc, size: 685 bytes, params: 2, frame: 31
const env0_3 = onHide;
const styles = useStyles();
const binding = env0_3;
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[8]);
var CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
defaultImport.track(CONTEXTUAL_REMINDER_ACTION, {action: NotificationNudgeAnalyticsAction.IMPRESSION,
prompt_type: surface});
}, [surface]);
const value2 = binding.useCallback(_fun112639, [onHide]);
const value3 = binding.useCallback(_fun112640, [surface, actionLocation, value2, markAsDismissed]);
const value4 = binding.useCallback(_fun112641, [surface, value2, markAsDismissed]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const BellSpotIllustration = (require(5473) /* metro dependency 5473: native */).BellSpotIllustration;
const items2 = [<View style={styles.illustration}><BellSpotIllustration scale={0.8} /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text style={styles.title} variant="heading-xl/bold" accessibilityRole="header">{title}</Text>;
items2[2] = <Text style={styles.body} variant="text-sm/medium" color="text-default">{body}</Text>;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const button = <Button text={Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['+7MDbQ']])} onPress={value3} />;
string = intl.string;
const L5eIZ2 = (require(1244) /* metro dependency 1244: indexNative */).t.L5eIZ2;
items2[3] = <View style={styles.buttonsContainer}><ButtonGroup>{button}<Button text={Reflect.apply(string, intl,
[L5eIZ2])} onPress={value4} variant="secondary" /></ButtonGroup></View>;
return (
<BottomSheet>
<View style={styles.container}>
{items2}
function NotificationNudgeBottomSheet({title, body, actionLocation, surface, markAsDismissed, onHide}) { // fn#112637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:683, offset: 0x023d58dc, size: 685 bytes, params: 2, frame: 31
const onHide2 = onHide;
const styles = useStyles();
const binding = onHide2;
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[8]);
var CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
defaultImport.track(CONTEXTUAL_REMINDER_ACTION, {action: NotificationNudgeAnalyticsAction.IMPRESSION,
prompt_type: surface});
}, [surface]);
const value2 = binding.useCallback(_fun112639, [onHide]);
const value3 = binding.useCallback(_fun112640, [surface, actionLocation, value2, markAsDismissed]);
const value4 = binding.useCallback(_fun112641, [surface, value2, markAsDismissed]);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const BellSpotIllustration = (NativeModule).BellSpotIllustration;
const items2 = [
<View style={styles.illustration}>
<BellSpotIllustration scale={0.8} />
</View>,
];
const Text = (TextModule).Text;
items2[1] = (
<Text
style={styles.title}
variant="heading-xl/bold"
accessibilityRole="header"
>
{title}
</Text>
);
items2[2] = (
<Text
style={styles.body}
variant="text-sm/medium"
color="text-default"
>
{body}
</Text>
);
const ButtonGroup = (ButtonGroupNativeModule).ButtonGroup;
const Button = (ButtonNativeModule).Button;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const button = (
<Button
text={Reflect.apply(string, intl, [(IndexNativeModule).t['+7MDbQ']])}
onPress={value3}
/>
);
string = intl.string;
const L5eIZ2 = (IndexNativeModule).t.L5eIZ2;
items2[3] = (
<View style={styles.buttonsContainer}>
<ButtonGroup>
{button}
<Button
text={Reflect.apply(string, intl, [L5eIZ2])}
onPress={value4}
variant="secondary"
/>
</ButtonGroup>
</View>
</BottomSheet>
);
}
);
return (
<BottomSheet>
<View style={styles.container}>
{items2}
</View>
</BottomSheet>
);
function _fun112639() { // fn#112639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:929, offset: 0x023d5bd5, size: 58 bytes, params: 1, frame: 12
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
if (onHide != null) {
onHide();
}
}
function _fun112640() { // fn#112640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:997, offset: 0x023d5c0f, size: 142 bytes, params: 1, frame: 19
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
const ACCEPT = NotificationNudgeAnalyticsAction.ACCEPT;
Reflect.apply(track, defaultImport, [CONTEXTUAL_REMINDER_ACTION, {action: ACCEPT, prompt_type: surface}]);
const markAsDismissedBinding = markAsDismissed;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
markAsDismissedBinding(USER_DISMISS);
const requestPushNotificationPermission = NotificationPermissionUtilModule.requestPushNotificationPermission;
const ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
Reflect.apply(requestPushNotificationPermission, NotificationPermissionUtilModule, [ALLOW_TO_REQUEST,
actionLocation, ReactNativeModule.View]);
}
function _fun112641() { // fn#112641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:1193, offset: 0x023d5c9d, size: 103 bytes, params: 1, frame: 17
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
const DISMISS = NotificationNudgeAnalyticsAction.DISMISS;
Reflect.apply(track, defaultImport, [CONTEXTUAL_REMINDER_ACTION, {action: DISMISS, prompt_type: surface}]);
const markAsDismissedBinding = markAsDismissed;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
markAsDismissedBinding(USER_DISMISS);
(0, ReactNativeModule.View)();
}
function _fun112639() { // fn#112639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:929, offset: 0x023d5bd5, size: 58 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
if (onHide != null) {
onHide();
}
}
function _fun112640() { // fn#112640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:997, offset: 0x023d5c0f, size: 142 bytes, params: 1, frame: 19
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
const ACCEPT = NotificationNudgeAnalyticsAction.ACCEPT;
Reflect.apply(track, defaultImport, [CONTEXTUAL_REMINDER_ACTION, {action: ACCEPT, prompt_type: surface}]);
const markAsDismissedBinding = markAsDismissed;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
markAsDismissedBinding(USER_DISMISS);
const notificationPermissionUtilModule = require(11874) /* metro dependency 11874: NotificationPermissionUtil */;
const requestPushNotificationPermission = notificationPermissionUtilModule.requestPushNotificationPermission;
const ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
Reflect.apply(requestPushNotificationPermission, notificationPermissionUtilModule, [ALLOW_TO_REQUEST,
actionLocation, env0_4]);
}
function _fun112641() { // fn#112641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:1193, offset: 0x023d5c9d, size: 103 bytes, params: 1, frame: 17
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
const DISMISS = NotificationNudgeAnalyticsAction.DISMISS;
Reflect.apply(track, defaultImport, [CONTEXTUAL_REMINDER_ACTION, {action: DISMISS, prompt_type: surface}]);
const markAsDismissedBinding = markAsDismissed;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
markAsDismissedBinding(USER_DISMISS);
env0_4();
}
global.__d(_fun112636, 14888, [31, 27, 11873, 661, 1376, 33, 4501, 697, 683, 4080, 11874, 6275, 5473, 4573, 6261,
4578, 1244,
2]) /* metro module 14888, dependencies: [31, 27, 11873, 661, 1376, 33, 4501, 697, 683, 4080, 11874, 6275, 5473, 4573, 6261, 4578, 1244, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 11873; source: modules/nuf/native/components/notification/NotificationPermissionConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun91053(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12059:6, offset: 0x02051aee, size: 482 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/notification/NotificationPermissionConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/notification/NotificationPermissionConstants.tsx');
exports.EventActionType = {SKIP_STEP: 'skip_step', ALLOW_TO_REQUEST: 'allow_to_request', REQUEST: 'request',
TO_SETTINGS: 'to_settings', REQUEST_PROVISIONAL: 'request_provisional', DISMISS: 'dismiss'};
exports.EventActionLocation = {ALERT: 'alert', AUTO_PROMPT: 'auto_prompt', NAV: 'nav', FOOTER: 'footer', CTA: 'cta',
@@ -20,3 +22,4 @@ function _fun91053(global, require, importDefault, importAll, module, exports, d
exports.NotificationNudgeAnalyticsAction = {IMPRESSION: 'impression', DISMISS: 'dismiss', ACCEPT: 'accept'};
}
global.__d(_fun91053, 11873, [2]) /* metro module 11873, dependencies: [2] */;
@@ -1,84 +1,126 @@
/* Metro module 15802; source: modules/nuf/native/components/notification/NotificationReactivationActionSheet.tsx; dependencies: [31, 27, 11873, 661, 33, 4501, 697, 683, 11874, 4080, 6275, 15803, 4573, 1244, 6261, 4578, 2] */
import AnalyticsUtils from '../../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import ActionSheetActionCreators from '../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import Module15803 from '../../../../../by-id/module-15803.js'; /* Metro dependency 15803 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as ButtonGroupNativeModule from '../../../../../design/components/ButtonGroup/native/ButtonGroup.native.tsx'; /* Metro dependency 6261 */
import * as BottomSheetNativeModule from '../../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as NotificationPermissionConstantsModule from './NotificationPermissionConstants.tsx'; /* Metro dependency 11873 */
import * as NotificationPermissionUtilModule from '../../NotificationPermissionUtil.tsx'; /* Metro dependency 11874 */
function _fun121447(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:6, offset: 0x025483d6, size: 409 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const env0_5 = value.Image;
const env0_6 = (require(11873) /* metro dependency 11873: NotificationPermissionConstants */).EventActionType;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.container = {marginHorizontal: PX_24, alignItems: 'center'};
object.container = {marginHorizontal: PX_24, alignItems: 'center'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.image = {marginVertical: PX_24, height: 120};
object2.title = {textAlign: 'center'};
object.image = {marginVertical: PX_24, height: 120};
object.title = {textAlign: 'center'};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.subtitle = {textAlign: 'center', marginTop: PX_8};
object.subtitle = {textAlign: 'center', marginTop: PX_8};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.buttons = {marginTop: PX_8};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/notification/NotificationReactivationActionSheet.tsx');
object.buttons = {marginTop: PX_8};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/notification/NotificationReactivationActionSheet.tsx');
exports.default = NotificationReactivationActionSheet;
function NotificationReactivationActionSheet({location}) { // fn#121448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:614, offset: 0x0254856f, size: 634 bytes, params: 2, frame: 30
const styles = useStyles();
const value2 = ReactModule.useCallback(function() {
var moduleValue = require(dependencyMap[8]);
var ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
moduleValue.requestPushNotificationPermission(ALLOW_TO_REQUEST, location, _fun121450);
}, [location]);
const value3 = ReactModule.useCallback(_fun121451, [location]);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const items2 = [
<Image
style={styles.image}
source={Module15803}
resizeMode="contain"
/>,
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = (
<Text
style={styles.title}
variant="heading-xl/bold"
accessibilityRole="header"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a4bgO0)}
</Text>
);
items2[2] = (
<Text
style={styles.subtitle}
variant="text-sm/medium"
color="text-default"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['rW5gw/'])}
</Text>
);
const ButtonGroup = (ButtonGroupNativeModule).ButtonGroup;
const Button = (ButtonNativeModule).Button;
items2[3] = (
<ButtonGroup style={styles.buttons}>
<Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a4bgO0)} onPress={value2} />
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/L3kom'])}
onPress={value3}
variant="secondary"
/>
</ButtonGroup>
);
return (
<BottomSheet>
<View style={styles.container}>
{items2}
</View>
</BottomSheet>
);
function _fun121449() { // fn#121449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:700, offset: 0x025487e9, size: 66 bytes, params: 1, frame: 16
const requestPushNotificationPermission = NotificationPermissionUtilModule.requestPushNotificationPermission;
const ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
Reflect.apply(requestPushNotificationPermission, NotificationPermissionUtilModule, [ALLOW_TO_REQUEST, location,
_fun121450]);
function _fun121450() { // fn#121450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:769, offset: 0x0254882b, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
}
function _fun121451() { // fn#121451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:827, offset: 0x02548850, size: 104 bytes, params: 1, frame: 18
const value = environment.__proto__;
const SKIP_STEP = EventActionType.SKIP_STEP;
const locationBinding = location;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const NOTIFICATION_PERMISSION_PREPROMPT_ACKED = AnalyticEvents.NOTIFICATION_PERMISSION_PREPROMPT_ACKED;
Reflect.apply(track, defaultImport, [NOTIFICATION_PERMISSION_PREPROMPT_ACKED, {action_type: SKIP_STEP,
action_location: locationBinding, permission_granted: undefined}]);
(ActionSheetActionCreators).hideActionSheet();
}
}
}
function NotificationReactivationActionSheet({location}) { // fn#121448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:614, offset: 0x0254856f, size: 634 bytes, params: 2, frame: 30
const styles = useStyles();
const binding = env0_3;
const value2 = binding.useCallback(function() {
var moduleValue = require(dependencyMap[8]);
var ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
moduleValue.requestPushNotificationPermission(ALLOW_TO_REQUEST, location, _fun121450);
}, [location]);
const value3 = binding.useCallback(_fun121451, [location]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const items2 = [<Image style={styles.image} source={importDefault(15803) /* metro dependency 15803 */} resizeMode="contain" />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <Text style={styles.title} variant="heading-xl/bold" accessibilityRole="header">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a4bgO0)}</Text>;
items2[2] = <Text style={styles.subtitle} variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['rW5gw/'])}</Text>;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[3] = <ButtonGroup style={styles.buttons}><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a4bgO0)} onPress={value2} /><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/L3kom'])} onPress={value3} variant="secondary" /></ButtonGroup>;
return (
<BottomSheet>
<View style={styles.container}>
{items2}
</View>
</BottomSheet>
);
}
function _fun121449() { // fn#121449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:700, offset: 0x025487e9, size: 66 bytes, params: 1, frame: 16
const notificationPermissionUtilModule = require(11874) /* metro dependency 11874: NotificationPermissionUtil */;
const requestPushNotificationPermission = notificationPermissionUtilModule.requestPushNotificationPermission;
const ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
Reflect.apply(requestPushNotificationPermission, notificationPermissionUtilModule, [ALLOW_TO_REQUEST, location,
_fun121450]);
}
function _fun121451() { // fn#121451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:827, offset: 0x02548850, size: 104 bytes, params: 1, frame: 18
const value = environment.__proto__;
const SKIP_STEP = EventActionType.SKIP_STEP;
const locationBinding = location;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const NOTIFICATION_PERMISSION_PREPROMPT_ACKED = AnalyticEvents.NOTIFICATION_PERMISSION_PREPROMPT_ACKED;
Reflect.apply(track, defaultImport, [NOTIFICATION_PERMISSION_PREPROMPT_ACKED, {action_type: SKIP_STEP,
action_location: locationBinding, permission_granted: undefined}]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun121450() { // fn#121450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:769, offset: 0x0254882b, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
global.__d(_fun121447, 15802, [31, 27, 11873, 661, 33, 4501, 697, 683, 11874, 4080, 6275, 15803, 4573, 1244, 6261,
4578,
2]) /* metro module 15802, dependencies: [31, 27, 11873, 661, 33, 4501, 697, 683, 11874, 4080, 6275, 15803, 4573, 1244, 6261, 4578, 2] */;
@@ -1,84 +1,89 @@
/* Metro module 14890; source: modules/nuf/native/components/notification/PostCallDisconnectNudge.tsx; dependencies: [57, 31, 1934, 4297, 11872, 11873, 33, 14888, 1244, 14891, 11874, 566, 7013, 1365, 11875, 4080, 14890, 1962, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import SelectedChannelStore from '../../../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import VoiceStateStore from '../../../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import NotificationNudgeBottomSheet from './NotificationNudgeBottomSheet.tsx'; /* Metro dependency 14888 */
import PostCallDisconnectNudgeExperiment from '../../PostCallDisconnectNudgeExperiment.tsx'; /* Metro dependency 14891 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseSelectedDismissibleContentModule from '../../../../dismissible_content/hooks/useSelectedDismissibleContent.tsx'; /* Metro dependency 7013 */
import * as PushNotificationPermissionStoreModule from '../../../../../stores/native/PushNotificationPermissionStore.tsx'; /* Metro dependency 11872 */
import * as NotificationPermissionConstantsModule from './NotificationPermissionConstants.tsx'; /* Metro dependency 11873 */
import * as NotificationPermissionUtilModule from '../../NotificationPermissionUtil.tsx'; /* Metro dependency 11874 */
function _fun112643(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:6, offset: 0x023d5db5, size: 288 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 selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_7 = (require(11872) /* metro dependency 11872: PushNotificationPermissionStore */).PermissionPromptType;
const notificationPermissionConstantsModule = require(11873) /* metro dependency 11873: NotificationPermissionConstants */;
const env0_8 = notificationPermissionConstantsModule.EventActionLocation;
const env0_9 = notificationPermissionConstantsModule.NotificationNudgeSurface;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
object = {cooldownDurationMs: 604800000};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/notification/PostCallDisconnectNudge.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/notification/PostCallDisconnectNudge.tsx');
exports.default = PostCallDisconnectNudge;
exports.POST_CALL_DISCONNECT_NUDGE_KEY = 'post-call-disconnect-nudge-key';
exports.usePostCallDisconnectNudge = usePostCallDisconnectNudge;
}
function PostCallDisconnectNudge({markAsDismissed, onHide}) { // fn#112644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:424, offset: 0x023d5ed5, size: 201 bytes, params: 2, frame: 22
const NotificationNudgeBottomSheet = importDefault(14888) /* metro dependency 14888: NotificationNudgeBottomSheet */;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pJbYq1);
object2.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vegtFT);
const CALL_DISCONNECT = EventActionLocation.CALL_DISCONNECT;
object2.actionLocation = CALL_DISCONNECT;
const CALL_DISCONNECT_BOTTOM_SHEET = NotificationNudgeSurface.CALL_DISCONNECT_BOTTOM_SHEET;
object2.surface = CALL_DISCONNECT_BOTTOM_SHEET;
object2.markAsDismissed = markAsDismissed;
object2.onHide = onHide;
return <NotificationNudgeBottomSheet {...object2} />;
}
function usePostCallDisconnectNudge() { // fn#112645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:758, offset: 0x023d5f9e, size: 395 bytes, params: 1, frame: 25
const defaultImport = importDefault(14891) /* metro dependency 14891: PostCallDisconnectNudgeExperiment */;
const useConfig = defaultImport.useConfig;
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'usePostCallDisconnectNudge'}]).enabled;
const value2 = (require(11874) /* metro dependency 11874: NotificationPermissionUtil */).useCanSeePushNotificationNudge();
const currentClientVoiceChannelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore],
function() {
return VoiceStateStore.getCurrentClientVoiceChannelId(null);
});
const channelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedChannelStore],
function() {
return SelectedChannelStore.getChannelId();
});
const binding = env0_4;
const env0_2 = binding.useRef(currentClientVoiceChannelId);
let [property, env0_3] = env0_3Binding(binding.useState(false), 2);
binding.useEffect(_fun112648, [currentClientVoiceChannelId, channelId]);
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
const useSelectedTimeRecurringDismissibleContent = useSelectedDismissibleContentModule.useSelectedTimeRecurringDismissibleContent;
const NOTIFICATION_NUDGE_POST_CALL_DISCONNECT = property && enabled && value2 ? (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.NOTIFICATION_NUDGE_POST_CALL_DISCONNECT : null;
const value7 = env0_3Binding(Reflect.apply(useSelectedTimeRecurringDismissibleContent,
useSelectedDismissibleContentModule, [NOTIFICATION_NUDGE_POST_CALL_DISCONNECT, env0_11]), 2);
property = value7[0];
var env0_4 = property;
env0_4.useEffect(_fun112649, [property, value7[1]]);
}
function _fun112648() { // fn#112648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:1118, offset: 0x023d6152, size: 63 bytes, params: 1, frame: 14
const binding = env0_2;
const current = binding.current;
binding.current = currentClientVoiceChannelId;
env0_3(current != null && currentClientVoiceChannelId == null && current === channelId);
}
function _fun112649() { // fn#112649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:1365, offset: 0x023d6191, size: 142 bytes, params: 1, frame: 18
var value2;
var moduleValue;
var defaultImport;
if (env0_4 != null) {
value2 = environment.__proto__;
moduleValue = require(dependencyMap[14]);
moduleValue.setPushPermissionReactivationSeen(PermissionPromptType.CALL_DISCONNECT_BOTTOM_SHEET);
defaultImport = importDefault(dependencyMap[15]);
defaultImport.openLazy(require(dependencyMap[17])(dependencyMap[16], dependencyMap.paths),
'post-call-disconnect-nudge-key', {markAsDismissed: env0_5});
function PostCallDisconnectNudge({markAsDismissed, onHide}) { // fn#112644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:424, offset: 0x023d5ed5, size: 201 bytes, params: 2, frame: 22
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pJbYq1);
object.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vegtFT);
const CALL_DISCONNECT = EventActionLocation.CALL_DISCONNECT;
object.actionLocation = CALL_DISCONNECT;
const CALL_DISCONNECT_BOTTOM_SHEET = NotificationNudgeSurface.CALL_DISCONNECT_BOTTOM_SHEET;
object.surface = CALL_DISCONNECT_BOTTOM_SHEET;
object.markAsDismissed = markAsDismissed;
object.onHide = onHide;
return <NotificationNudgeBottomSheet {...object} />;
}
function usePostCallDisconnectNudge() { // fn#112645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:758, offset: 0x023d5f9e, size: 395 bytes, params: 1, frame: 25
const defaultImport = PostCallDisconnectNudgeExperiment;
const useConfig = defaultImport.useConfig;
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'usePostCallDisconnectNudge'}]).enabled;
const value2 = (NotificationPermissionUtilModule).useCanSeePushNotificationNudge();
const currentClientVoiceChannelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore],
function() {
return VoiceStateStore.getCurrentClientVoiceChannelId(null);
});
const channelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedChannelStore],
function() {
return SelectedChannelStore.getChannelId();
});
const binding = property2;
const env0_2 = binding.useRef(currentClientVoiceChannelId);
let [property, env0_3] = env0_3Binding(binding.useState(false), 2);
binding.useEffect(_fun112648, [currentClientVoiceChannelId, channelId]);
const useSelectedTimeRecurringDismissibleContent = UseSelectedDismissibleContentModule.useSelectedTimeRecurringDismissibleContent;
const NOTIFICATION_NUDGE_POST_CALL_DISCONNECT = property && enabled && value2 ? (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.NOTIFICATION_NUDGE_POST_CALL_DISCONNECT : null;
const value7 = env0_3Binding(Reflect.apply(useSelectedTimeRecurringDismissibleContent,
UseSelectedDismissibleContentModule, [NOTIFICATION_NUDGE_POST_CALL_DISCONNECT, env0_11]), 2);
property = value7[0];
var property2 = property;
property2.useEffect(_fun112649, [property, value7[1]]);
function _fun112648() { // fn#112648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:1118, offset: 0x023d6152, size: 63 bytes, params: 1, frame: 14
const binding = env0_2;
const current = binding.current;
binding.current = currentClientVoiceChannelId;
env0_3(current != null && currentClientVoiceChannelId == null && current === channelId);
}
function _fun112649() { // fn#112649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:1365, offset: 0x023d6191, size: 142 bytes, params: 1, frame: 18
var value2;
var moduleValue;
var defaultImport;
if (ReactModule != null) {
value2 = environment.__proto__;
moduleValue = require(dependencyMap[14]);
moduleValue.setPushPermissionReactivationSeen(PermissionPromptType.CALL_DISCONNECT_BOTTOM_SHEET);
defaultImport = importDefault(dependencyMap[15]);
defaultImport.openLazy(require(dependencyMap[17])(dependencyMap[16], dependencyMap.paths),
'post-call-disconnect-nudge-key', {markAsDismissed: env0_5});
}
}
}
}
global.__d(_fun112643, 14890, [57, 31, 1934, 4297, 11872, 11873, 33, 14888, 1244, 14891, 11874, 566, 7013, 1365,
11875, 4080, 14890, 1962,
2]) /* metro module 14890, dependencies: [57, 31, 1934, 4297, 11872, 11873, 33, 14888, 1244, 14891, 11874, 566, 7013, 1365, 11875, 4080, 14890, 1962, 2] */;
@@ -1,93 +1,107 @@
/* Metro module 14357; source: modules/nuf/native/components/notification/RedesignNotificationModal.tsx; dependencies: [31, 27, 11872, 11873, 661, 33, 4501, 697, 11874, 683, 11875, 12005, 14358, 1244, 2] */
import AnalyticsUtils from '../../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import NewUserPermissionsOnboardingAndroid from '../NewUserPermissionsOnboarding.android.tsx'; /* Metro dependency 12005 */
import Module14358 from '../../../../../by-id/module-14358.js'; /* Metro dependency 14358 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as PushNotificationPermissionStoreModule from '../../../../../stores/native/PushNotificationPermissionStore.tsx'; /* Metro dependency 11872 */
import * as NotificationPermissionUtilModule from '../../NotificationPermissionUtil.tsx'; /* Metro dependency 11874 */
import * as PushNotificationActionCreatorsModule from '../../../../../actions/native/PushNotificationActionCreators.tsx'; /* Metro dependency 11875 */
function _fun108657(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:6, offset: 0x02328763, size: 377 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = RedesignNotificationModal;
const RedesignNotificationModal2 = RedesignNotificationModal;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.Image;
const env0_5 = value.View;
const env0_6 = (require(11872) /* metro dependency 11872: PushNotificationPermissionStore */).PermissionStateType;
value = require(11873) /* metro dependency 11873: NotificationPermissionConstants */;
const env0_7 = value.EventActionLocation;
const env0_8 = value.EventActionType;
const env0_9 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {flex: 1};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
object.marginTop = -PX_48;
const env0_11 = Reflect.apply(createStyles, value, [{container: object,
const object2 = {flex: 1};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
const PX_48 = (Native).space.PX_48;
object2.marginTop = -PX_48;
const env0_11 = Reflect.apply(createStyles, value, [{container: object2,
notificationHeaderImage: {'position': 'absolute', 'alignSelf': 'center', 'zIndex': 2, 'top': -140,
'height': 156, 'width': 150}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/notification/RedesignNotificationModal.tsx');
exports.default = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/notification/RedesignNotificationModal.tsx');
exports.default = RedesignNotificationModal2;
exports.RedesignNotificationScreen = RedesignNotificationScreen;
}
function RedesignNotificationModal({onComplete}) { // fn#108658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:489, offset: 0x023288dc, size: 323 bytes, params: 2, frame: 24
const styles = useStyles();
const value2 = ReactModule.useCallback(function() {
var moduleValue = require(dependencyMap[8]);
var ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
var ALERT = EventActionLocation.ALERT;
moduleValue.requestPushNotificationPermission(ALLOW_TO_REQUEST, ALERT, _fun108660);
}, [onComplete]);
const value3 = ReactModule.useCallback(_fun108661, [onComplete]);
const defaultImportProps = {onAllow: value2, onDontAllow: value3,
header: <Image resizeMode="contain" style={styles.notificationHeaderImage} source={Module14358} />};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
defaultImportProps.title = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['3nx0b5']]);
string = intl.string;
const Gf7U1T = (require(1244) /* metro dependency 1244: indexNative */).t.Gf7U1T;
defaultImportProps.subtitle = Reflect.apply(string, intl, [Gf7U1T]);
return (
<View style={styles.container}>
<NewUserPermissionsOnboardingAndroid {...defaultImportProps} />
</View>
);
function _fun108659() { // fn#108659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:567, offset: 0x02328a1f, size: 69 bytes, params: 1, frame: 16
const requestPushNotificationPermission = NotificationPermissionUtilModule.requestPushNotificationPermission;
const ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
const ALERT = EventActionLocation.ALERT;
Reflect.apply(requestPushNotificationPermission, NotificationPermissionUtilModule, [ALLOW_TO_REQUEST, ALERT,
function() {
if (onComplete != null) {
onComplete();
}
}]);
function _fun108660() { // fn#108660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:642, offset: 0x01eef8c0, size: 27 bytes, params: 1, frame: 10
if (onComplete != null) {
onComplete();
}
}
function RedesignNotificationModal({onComplete}) { // fn#108658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:489, offset: 0x023288dc, size: 323 bytes, params: 2, frame: 24
const styles = useStyles();
const value2 = env0_3.useCallback(function() {
var moduleValue = require(dependencyMap[8]);
var ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
var ALERT = EventActionLocation.ALERT;
moduleValue.requestPushNotificationPermission(ALLOW_TO_REQUEST, ALERT, _fun108660);
}, [onComplete]);
const value3 = env0_3.useCallback(_fun108661, [onComplete]);
const NewUserPermissionsOnboardingAndroid = importDefault(12005) /* metro dependency 12005: NewUserPermissionsOnboardingAndroid */;
const defaultImportProps = {onAllow: value2, onDontAllow: value3,
header: <Image resizeMode="contain" style={styles.notificationHeaderImage} source={importDefault(14358) /* metro dependency 14358 */} />};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
defaultImportProps.title = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['3nx0b5']]);
string = intl.string;
const Gf7U1T = (require(1244) /* metro dependency 1244: indexNative */).t.Gf7U1T;
defaultImportProps.subtitle = Reflect.apply(string, intl, [Gf7U1T]);
return (
<View style={styles.container}>
<NewUserPermissionsOnboardingAndroid {...defaultImportProps} />
</View>
);
}
function RedesignNotificationScreen(a0) { // fn#108662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:1347, offset: 0x02328b07, size: 49 bytes, params: 2, frame: 13
return <RedesignNotificationModal onComplete={a0.route.params.onComplete} />;
}
function _fun108659() { // fn#108659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:567, offset: 0x02328a1f, size: 69 bytes, params: 1, frame: 16
const notificationPermissionUtilModule = require(11874) /* metro dependency 11874: NotificationPermissionUtil */;
const requestPushNotificationPermission = notificationPermissionUtilModule.requestPushNotificationPermission;
const ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
const ALERT = EventActionLocation.ALERT;
Reflect.apply(requestPushNotificationPermission, notificationPermissionUtilModule, [ALLOW_TO_REQUEST, ALERT,
function() {
if (onComplete != null) {
onComplete();
}
}]);
}
function _fun108661() { // fn#108661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:687, offset: 0x02328a64, size: 163 bytes, params: 1, frame: 17
const value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const NOTIFICATION_PERMISSION_PREPROMPT_ACKED = AnalyticEvents.NOTIFICATION_PERMISSION_PREPROMPT_ACKED;
const SKIP_STEP = EventActionType.SKIP_STEP;
const ALERT = EventActionLocation.ALERT;
Reflect.apply(track, defaultImport, [NOTIFICATION_PERMISSION_PREPROMPT_ACKED, {action_type: SKIP_STEP,
action_location: ALERT}]);
const pushNotificationActionCreatorsModule = require(11875) /* metro dependency 11875: PushNotificationActionCreators */;
const setPushPermissionState = pushNotificationActionCreatorsModule.setPushPermissionState;
const PROMPT_SKIPPED = PermissionStateType.PROMPT_SKIPPED;
Reflect.apply(setPushPermissionState, pushNotificationActionCreatorsModule, [PROMPT_SKIPPED]);
(require(11874) /* metro dependency 11874: NotificationPermissionUtil */).enableProvisionalPushNotification();
if (onComplete != null) {
onComplete(true);
function _fun108661() { // fn#108661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:687, offset: 0x02328a64, size: 163 bytes, params: 1, frame: 17
const value = environment.__proto__;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const NOTIFICATION_PERMISSION_PREPROMPT_ACKED = AnalyticEvents.NOTIFICATION_PERMISSION_PREPROMPT_ACKED;
const SKIP_STEP = EventActionType.SKIP_STEP;
const ALERT = EventActionLocation.ALERT;
Reflect.apply(track, defaultImport, [NOTIFICATION_PERMISSION_PREPROMPT_ACKED, {action_type: SKIP_STEP,
action_location: ALERT}]);
const setPushPermissionState = PushNotificationActionCreatorsModule.setPushPermissionState;
const PROMPT_SKIPPED = PermissionStateType.PROMPT_SKIPPED;
Reflect.apply(setPushPermissionState, PushNotificationActionCreatorsModule, [PROMPT_SKIPPED]);
(NotificationPermissionUtilModule).enableProvisionalPushNotification();
if (onComplete != null) {
onComplete(true);
}
}
}
function RedesignNotificationScreen(a0) { // fn#108662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:1347, offset: 0x02328b07, size: 49 bytes, params: 2, frame: 13
return <RedesignNotificationModal onComplete={a0.route.params.onComplete} />;
}
}
global.__d(_fun108657, 14357, [31, 27, 11872, 11873, 661, 33, 4501, 697, 11874, 683, 11875, 12005, 14358, 1244,
2]) /* metro module 14357, dependencies: [31, 27, 11872, 11873, 661, 33, 4501, 697, 11874, 683, 11875, 12005, 14358, 1244, 2] */;
@@ -1,23 +1,27 @@
/* Metro module 14356; source: modules/nuf/native/showPushNotificationPromptModal.tsx; dependencies: [11872, 12022, 5080, 14357, 1962, 11875, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PushNotificationPermissionStoreModule from '../../../stores/native/PushNotificationPermissionStore.tsx'; /* Metro dependency 11872 */
import * as NUFConstantsModule from '../NUFConstants.tsx'; /* Metro dependency 12022 */
function _fun108654(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14553:6, offset: 0x02328610, size: 146 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(11872) /* metro dependency 11872: PushNotificationPermissionStore */).PermissionStateType;
const env0_4 = (require(12022) /* metro dependency 12022: NUFConstants */).NUF_NOTIFICATION_MODAL_KEY;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/showPushNotificationPromptModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/showPushNotificationPromptModal.tsx');
exports.showPushNotificationPromptModal = showPushNotificationPromptModal;
function showPushNotificationPromptModal({onComplete}) { // fn#108655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14553:285, offset: 0x023286a2, size: 140 bytes, params: 2, frame: 20
const defaultImport = importDefault(dependencyMap[2]);
defaultImport.pushLazy(require(dependencyMap[4])(dependencyMap[3], dependencyMap.paths), {onComplete: function() {
importDefault(dependencyMap[2]).popWithKey(NUF_NOTIFICATION_MODAL_KEY);
onComplete();
}}, NUF_NOTIFICATION_MODAL_KEY);
const moduleValue2 = require(dependencyMap[5]);
const setPushPermissionState = moduleValue2.setPushPermissionState;
const PROMPT_SEEN = PermissionStateType.PROMPT_SEEN;
Reflect.apply(setPushPermissionState, moduleValue2, [PROMPT_SEEN]);
}
}
function showPushNotificationPromptModal({onComplete}) { // fn#108655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14553:285, offset: 0x023286a2, size: 140 bytes, params: 2, frame: 20
const defaultImport = importDefault(dependencyMap[2]);
defaultImport.pushLazy(require(dependencyMap[4])(dependencyMap[3], dependencyMap.paths), {onComplete: function() {
importDefault(dependencyMap[2]).popWithKey(NUF_NOTIFICATION_MODAL_KEY);
onComplete();
}}, NUF_NOTIFICATION_MODAL_KEY);
const moduleValue2 = require(dependencyMap[5]);
const setPushPermissionState = moduleValue2.setPushPermissionState;
const PROMPT_SEEN = PermissionStateType.PROMPT_SEEN;
Reflect.apply(setPushPermissionState, moduleValue2, [PROMPT_SEEN]);
}
global.__d(_fun108654, 14356, [11872, 12022, 5080, 14357, 1962, 11875,
2]) /* metro module 14356, dependencies: [11872, 12022, 5080, 14357, 1962, 11875, 2] */;
@@ -1,41 +1,47 @@
/* Metro module 14886; source: modules/nuf/native/useNotificationPermissionPrompt.tsx; dependencies: [31, 1372, 4257, 1373, 11872, 566, 1375, 11881, 14887, 14890, 2] */
import LoginRequiredActionStore from '../../auth/LoginRequiredActionStore.tsx'; /* Metro dependency 1372 */
import UserRequiredActionStore from '../../../stores/UserRequiredActionStore.tsx'; /* Metro dependency 1373 */
import GatewayConnectionStore from '../../gateway/GatewayConnectionStore.tsx'; /* Metro dependency 4257 */
import PushNotificationPermissionStore from '../../../stores/native/PushNotificationPermissionStore.tsx'; /* Metro dependency 11872 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as GuildOpenNotificationNudgeModule from './components/notification/GuildOpenNotificationNudge.tsx'; /* Metro dependency 14887 */
import * as PostCallDisconnectNudgeModule from './components/notification/PostCallDisconnectNudge.tsx'; /* Metro dependency 14890 */
function _fun112620(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15083:6, offset: 0x023d4dc8, size: 185 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const loginRequiredActionStore = importDefault(1372) /* metro dependency 1372: LoginRequiredActionStore */;
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const userRequiredActionStore = importDefault(1373) /* metro dependency 1373: UserRequiredActionStore */;
const pushNotificationPermissionStore = importDefault(11872) /* metro dependency 11872: PushNotificationPermissionStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/useNotificationPermissionPrompt.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/useNotificationPermissionPrompt.tsx');
exports.default = useNotificationPermissionPrompt;
}
function useNotificationPermissionPrompt() { // fn#112621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15083:245, offset: 0x023d4e81, size: 192 bytes, params: 1, frame: 19
env0_3.useEffect(_fun112624,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([GatewayConnectionStore], function() {
return GatewayConnectionStore.isConnected();
}), (require(566) /* metro dependency 566: flux */).useStateFromStores([UserRequiredActionStore,
LoginRequiredActionStore], function() {
return importDefault(dependencyMap[6])(LoginRequiredActionStore, UserRequiredActionStore);
})]);
(require(14887) /* metro dependency 14887: GuildOpenNotificationNudge */).useGuildOpenNudge();
(require(14890) /* metro dependency 14890: PostCallDisconnectNudge */).usePostCallDisconnectNudge();
}
function _fun112624() { // fn#112624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15083:416, offset: 0x023d4f6a, size: 117 bytes, params: 1, frame: 14
var value;
if (env0_0) {
if (!env0_1) {
value = environment.__proto__;
if ((importDefault(11881) /* metro dependency 11881: NotificationUtils */).shouldRequestNotification && !PushNotificationPermissionStore.promptSeen) {
value = importDefault(11881) /* metro dependency 11881: NotificationUtils */;
value.requestPermission();
value = importDefault(11881) /* metro dependency 11881: NotificationUtils */;
value.shouldRequestNotification = false;
function useNotificationPermissionPrompt() { // fn#112621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15083:245, offset: 0x023d4e81, size: 192 bytes, params: 1, frame: 19
ReactModule.useEffect(_fun112624,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([GatewayConnectionStore], function() {
return GatewayConnectionStore.isConnected();
}), (require(566) /* metro dependency 566: flux */).useStateFromStores([UserRequiredActionStore,
LoginRequiredActionStore], function() {
return importDefault(dependencyMap[6])(LoginRequiredActionStore, UserRequiredActionStore);
})]);
(GuildOpenNotificationNudgeModule).useGuildOpenNudge();
(PostCallDisconnectNudgeModule).usePostCallDisconnectNudge();
function _fun112624() { // fn#112624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15083:416, offset: 0x023d4f6a, size: 117 bytes, params: 1, frame: 14
var value;
if (env0_0) {
if (!env0_1) {
value = environment.__proto__;
if ((importDefault(11881) /* metro dependency 11881: NotificationUtils */).shouldRequestNotification && !PushNotificationPermissionStore.promptSeen) {
value = importDefault(11881) /* metro dependency 11881: NotificationUtils */;
value.requestPermission();
value = importDefault(11881) /* metro dependency 11881: NotificationUtils */;
value.shouldRequestNotification = false;
}
}
}
}
}
}
global.__d(_fun112620, 14886, [31, 1372, 4257, 1373, 11872, 566, 1375, 11881, 14887, 14890,
2]) /* metro module 14886, dependencies: [31, 1372, 4257, 1373, 11872, 566, 1375, 11881, 14887, 14890, 2] */;