Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,300 @@
|
||||
/* Metro module 15983; source: modules/guild_settings/native/GuildSettingsModalInstantInvites.tsx; dependencies: [57, 31, 27, 10906, 8150, 1379, 1867, 9113, 661, 33, 4501, 1244, 1948, 8950, 6766, 6242, 8947, 11838, 566, 22, 8277, 8275, 4080, 11445, 1962, 3857, 12132, 5460, 1305, 15984, 5462, 2] */
|
||||
function _fun123633(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#123633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:6, offset: 0x02595bda, size: 462 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const closure = InvitesDisabledRow;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
value.Platform;
|
||||
const env0_5 = value.FlatList;
|
||||
const guildIncidentsStore = importDefault(10906) /* metro dependency 10906: GuildIncidentsStore */;
|
||||
value = importDefault(8150) /* metro dependency 8150: InviteRecord */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_10 = constantsModule.GuildFeatures;
|
||||
const env0_11 = constantsModule.HelpdeskArticles;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_12 = value3.jsx;
|
||||
const env0_13 = value3.Fragment;
|
||||
const env0_14 = value3.jsxs;
|
||||
const env0_15 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({list: {paddingTop: 8},
|
||||
content: {'padding': 16, 'gap': 24}, listWithPause: {paddingTop: 0}});
|
||||
value = new value({code: 'pause_invites'});
|
||||
const env0_18 = {};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalInstantInvites.tsx');
|
||||
exports.default = ConnectedGuildSettingsModalInstantInvites;
|
||||
exports.InvitesDisabledRow = closure;
|
||||
}
|
||||
|
||||
function InvitesDisabledRow({onPauseInvites, invitesDisabled}) { // fn#123634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:438, offset: 0x02595da8, size: 390 bytes, params: 2, frame: 24
|
||||
var r9;
|
||||
var format;
|
||||
var IFBHag;
|
||||
var defaultImport;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const Uwsjn6 = (require(1244) /* metro dependency 1244: indexNative */).t.Uwsjn6;
|
||||
const value2 = Reflect.apply(string, intl, [Uwsjn6]);
|
||||
if (invitesDisabled) {
|
||||
r9 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2LLbj9']);
|
||||
} else {
|
||||
format = intl.format;
|
||||
IFBHag = (require(1244) /* metro dependency 1244: indexNative */).t.IFBHag;
|
||||
defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
||||
r9 = Reflect.apply(format, intl, [IFBHag,
|
||||
{helpArticleUrl: defaultImport.getArticleURL(HelpdeskArticles.INVITE_DISABLED)}]);
|
||||
}
|
||||
const TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
|
||||
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
return (
|
||||
<TableCheckboxRow
|
||||
label={value2}
|
||||
subLabel={<TextWithIOSLinkWorkaround variant="text-xs/medium">{r9}</TextWithIOSLinkWorkaround>}
|
||||
icon={invitesDisabled ? ((TableRowIcon) => <TableRowIcon source={importDefault(8947) /* metro dependency 8947 */} />)((require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon) : null}
|
||||
checked={invitesDisabled}
|
||||
onPress={onPauseInvites}
|
||||
start
|
||||
end
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function GuildSettingsModalInstantInvites({invites, guild, showChannel, contentContainerStyle}) { // fn#123635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:918, offset: 0x02595f2e, size: 1031 bytes, params: 2, frame: 28
|
||||
var invitesDisabledUntil;
|
||||
var r2;
|
||||
var r10;
|
||||
var r0;
|
||||
var value6;
|
||||
var Date;
|
||||
var prototype;
|
||||
var value7;
|
||||
var date;
|
||||
var value8;
|
||||
var value9;
|
||||
var jsxRuntimeEnv0_13Binding;
|
||||
var items3;
|
||||
var EmptyState;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
showChannel = !(showChannel === undefined) && showChannel;
|
||||
const styles = useStyles();
|
||||
const value4 = (require(11838) /* metro dependency 11838: GuildInvitesDisabledUtils */).useInvitesDisabledPermission(guild);
|
||||
const env0_3 = value4;
|
||||
const guildIncident = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildIncidentsStore],
|
||||
function() {
|
||||
return GuildIncidentsStore.getGuildIncident(guild.id);
|
||||
});
|
||||
const env0_4 = guildIncident;
|
||||
const features = guild.features;
|
||||
const has = features.has;
|
||||
const INVITES_DISABLED = GuildFeatures.INVITES_DISABLED;
|
||||
const value5 = Reflect.apply(has, features, [INVITES_DISABLED]);
|
||||
if (value5) {
|
||||
r10 = value5;
|
||||
} else {
|
||||
invitesDisabledUntil = guildIncident?.invitesDisabledUntil;
|
||||
value6 = invitesDisabledUntil != null;
|
||||
if (value6) {
|
||||
Date = global.Date;
|
||||
invitesDisabledUntil = guildIncident.invitesDisabledUntil;
|
||||
prototype = Date.prototype;
|
||||
value7 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
value8 = date instanceof Object ? date : value7;
|
||||
Date = global.Date;
|
||||
prototype = Date.prototype;
|
||||
value9 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
r2 = value8 > (date instanceof Object ? date : value9);
|
||||
} else {
|
||||
r2 = value6;
|
||||
}
|
||||
r10 = r2;
|
||||
}
|
||||
let binding = env0_4;
|
||||
const [property, env0_7] = env0_3(binding.useState(false), 2);
|
||||
const [property2, env0_8] = env0_3(env0_4.useState(21), 2);
|
||||
const value18 = env0_4.useMemo(_fun123640, [env0_4.useMemo(_fun123637, [invites, value4, showChannel]),
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ChannelStore], function() {
|
||||
return ChannelStore.getSortedLinkedChannelsForGuild(guild.id);
|
||||
})]);
|
||||
env0_4.useEffect(_fun123643, []);
|
||||
binding = env0_4;
|
||||
let useCallback = binding.useCallback;
|
||||
const value19 = Reflect.apply(useCallback, binding, [function(a0) {
|
||||
return a0.type === 'invite' ? a0.data.code : a0.data.id;
|
||||
}, []]);
|
||||
const value20 = env0_4.useCallback(_fun123645, [property, guildIncident, guild]);
|
||||
binding = env0_4;
|
||||
useCallback = binding.useCallback;
|
||||
if (invites == null) {
|
||||
const SceneLoadingIndicator = (require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator;
|
||||
r0 = <SceneLoadingIndicator />;
|
||||
} else if (value18.length === 0) {
|
||||
jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
|
||||
items3 = [<InvitesDisabledRow onPauseInvites={value20} invitesDisabled={r10} invitesDisabledLoading={property} />];
|
||||
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
|
||||
items3[1] = <EmptyState Illustration={(require(15984) /* metro dependency 15984: InviteEmpty */).InviteEmpty} title={intl.string(t['+nLJkZ'])} body={intl.string(t.F53CAc)} />;
|
||||
r0 = <>{items3}</>;
|
||||
} else {
|
||||
r0 = <FlatList style={[value4 ? styles.listWithPause : styles.list]} data={value18} keyExtractor={value19} renderItem={Reflect.apply(useCallback,
|
||||
|
||||
binding, [_fun123646, [r10, value20,
|
||||
property]])} initialNumToRender={10} windowSize={property2} contentContainerStyle={[contentContainerStyle,
|
||||
styles.content]} />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function ConnectedGuildSettingsModalInstantInvites({guildId, contentContainerStyle}) { // fn#123647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:3055, offset: 0x0259668e, size: 232 bytes, params: 2, frame: 21
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
});
|
||||
return guild != null ? <><GuildSettingsModalInstantInvites guild={guild} invites={(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildSettingsStore],
|
||||
_fun123649)} contentContainerStyle={contentContainerStyle} showChannel />{((NavScrim) => <NavScrim />)((require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim)}</> : null;
|
||||
}
|
||||
|
||||
function _fun123637() { // fn#123637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:1361, offset: 0x02596355, size: 77 bytes, params: 1, frame: 15
|
||||
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
||||
const value3 = defaultImport.sortBy(invites, _fun123638);
|
||||
if (env0_3) {
|
||||
value3.unshift(env1_17);
|
||||
}
|
||||
return value3;
|
||||
}
|
||||
|
||||
function _fun123640() { // fn#123640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:1680, offset: 0x0259642d, size: 69 bytes, params: 1, frame: 15
|
||||
let binding = env0_9;
|
||||
const value2 = binding.map(function(a0) {
|
||||
return {type: 'invite', data: a0};
|
||||
});
|
||||
const items2 = [];
|
||||
const value3 = arraySpread(items2, value2, 0, binding);
|
||||
binding = env0_10;
|
||||
arraySpread(items2, binding.map(function(a0) {
|
||||
return {type: 'channel', data: a0};
|
||||
}), value3, binding);
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun123643() { // fn#123643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:1788, offset: 0x02596472, size: 19 bytes, params: 1, frame: 11
|
||||
env0_8(21);
|
||||
}
|
||||
|
||||
function _fun123645() { // fn#123645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:1891, offset: 0x025964ad, size: 286 bytes, params: 1, frame: 19
|
||||
var object2;
|
||||
var value2;
|
||||
var property;
|
||||
var moduleValue;
|
||||
var GuildIncidentActionSources;
|
||||
var MESSAGE;
|
||||
var moduleValue2;
|
||||
var incidentAlertType;
|
||||
var defaultImport;
|
||||
var openLazy;
|
||||
var moduleValue3;
|
||||
var paths;
|
||||
var value4;
|
||||
var error;
|
||||
var value5;
|
||||
var defaultImport2;
|
||||
var open;
|
||||
var defaultImport3;
|
||||
var message;
|
||||
if (!env0_6) {
|
||||
env0_7(true);
|
||||
try {
|
||||
try {
|
||||
object2 = {};
|
||||
value2 = environment.__proto__;
|
||||
property = dependencyMap[20];
|
||||
moduleValue = require(property);
|
||||
GuildIncidentActionSources = moduleValue.GuildIncidentActionSources;
|
||||
MESSAGE = GuildIncidentActionSources.MESSAGE;
|
||||
object2.source = MESSAGE;
|
||||
property = dependencyMap[21];
|
||||
moduleValue2 = require(property);
|
||||
incidentAlertType = moduleValue2.getIncidentAlertType(guildIncident);
|
||||
object2.alertType = incidentAlertType;
|
||||
property = dependencyMap[22];
|
||||
defaultImport = importDefault(property);
|
||||
openLazy = defaultImport.openLazy;
|
||||
property = dependencyMap[24];
|
||||
moduleValue3 = require(property);
|
||||
property = dependencyMap[23];
|
||||
paths = dependencyMap.paths;
|
||||
value4 = moduleValue3(property, paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value4, 'GuildIncidentActionsActionSheet', {guild: guild,
|
||||
analyticsData: object2}]);
|
||||
} catch (error) {
|
||||
value5 = environment.__proto__;
|
||||
property = dependencyMap[25];
|
||||
defaultImport2 = importDefault(property);
|
||||
open = defaultImport2.open;
|
||||
property = dependencyMap[16];
|
||||
defaultImport3 = importDefault(property);
|
||||
message = error.message;
|
||||
Reflect.apply(open, defaultImport2, [{key: 'GUILD_SETTINGS_MODAL_INVITE_ERROR', icon: defaultImport3,
|
||||
content: message}]);
|
||||
}
|
||||
} catch (error) {
|
||||
env0_7(false);
|
||||
throw error;
|
||||
}
|
||||
env0_7(false);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun123646({item}) { // fn#123646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:2260, offset: 0x025965cb, size: 195 bytes, params: 2, frame: 16
|
||||
var r1;
|
||||
var r0;
|
||||
var value;
|
||||
var code;
|
||||
if (item.type === 'invite') {
|
||||
code = item.data.code;
|
||||
value = environment.__proto__;
|
||||
if (code === env1_16) {
|
||||
r1 = <InvitesDisabledRow invitesDisabled={env0_5} invitesDisabledLoading={env0_6} onPauseInvites={env0_11} />;
|
||||
} else {
|
||||
value = importDefault(12132) /* metro dependency 12132: InstantInvite */;
|
||||
value = ((Component) => <Component invite={item.data} />)(value);
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
const LinkedChannelInvite = (require(12132) /* metro dependency 12132: InstantInvite */).LinkedChannelInvite;
|
||||
value = <LinkedChannelInvite channel={item.data} />;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun123649() { // fn#123649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:3237, offset: 0x02596776, size: 35 bytes, params: 1, frame: 10
|
||||
const getProps = GuildSettingsStore.getProps;
|
||||
return Reflect.apply(getProps, GuildSettingsStore, []).invites ?? env1_18;
|
||||
}
|
||||
|
||||
function _fun123638(a0) { // fn#123638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16191:1391, offset: 0x025963a2, size: 107 bytes, params: 2, frame: 13
|
||||
var r2;
|
||||
var r0;
|
||||
var inviter;
|
||||
var channel;
|
||||
let value = environment.__proto__;
|
||||
if (showChannel) {
|
||||
channel = a0.channel;
|
||||
r0 = channel == null ? undefined : channel.name.toLowerCase();
|
||||
} else {
|
||||
inviter = a0.inviter;
|
||||
value = undefined;
|
||||
r2 = inviter == null || inviter.username == null ? value : inviter.username.toLowerCase();
|
||||
value = '';
|
||||
r0 = r2 ?? value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user