230 lines
16 KiB
TypeScript
230 lines
16 KiB
TypeScript
/* 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
|
|
const env0_0 = require;
|
|
const onCreateGuild = function() {
|
|
return _onCreateGuild.apply(this, arguments);
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ConstantsModule;
|
|
const env0_7 = value.AnalyticEvents;
|
|
const env0_8 = value.AnalyticsSections;
|
|
const env0_9 = value.NOOP;
|
|
value = require(9006) /* metro dependency 9006: CreateGuildConstants */;
|
|
const env0_11 = value.CreateGuildModalStates;
|
|
const env0_12 = value.GuildTemplateTriggers;
|
|
const env0_13 = value.NUXGuildTemplatesAnalytics;
|
|
object = {};
|
|
const ImpressionGroups = (AnalyticsUtilsModule).ImpressionGroups;
|
|
const GUILD_ADD_FLOW = ImpressionGroups.GUILD_ADD_FLOW;
|
|
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 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'}]);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
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} />;
|
|
}
|
|
|
|
}
|
|
|
|
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] */;
|